Vue 3 的 全局状态管理

1.思路梳理 

  • 工厂仓拣货信息:Factory Picking Info (FPI)
  • 工厂仓调度信息:Factory Scheduling Info (FSI)
  • DC 收货信息:DC Receiving Info (DCRI)
  • 上架信息:Shelving Info (SI)
  • 盘点信息:Inventory Count Info (ICI)
  • 移位信息:Shifting Info (SHI)
  • 订单信息:Order Info (OI)
  • 拣货信息:Picking Info (PI)
  • 调度单信息:Dispatch Order Info (DOI)
    <template>
      <div>
        <el-card>
          <div v-if="stageAbbreviation === 'FPI'">工厂仓拣货信息内容</div>
          <div v-else-if="stageAbbreviation === 'FSI'">工厂仓调度信息内容</div>
          <div v-else-if="stageAbbreviation === 'DCRI'">DC 收货信息内容</div>
          <div v-else-if="stageAbbreviation === 'SI'">上架信息内容</div>
          <div v-else-if="stageAbbreviation === 'ICI'">盘点信息内容</div>
          <div v-else-if="stageAbbreviation === 'SHI'">移位信息内容</div>
          <div v-else-if="stageAbbreviation === 'OI'">订单信息内容</div>
          <div v-else-if="stageAbbreviation === 'PI'">拣货信息内容</div>
          <div v-else-if="stageAbbreviation === 'DOI'">调度单信息内容</div>
          <div v-else>未知阶段信息</div>
        </el-card>
      </div>
    </template>
    
    <script>
    export default {
      props: {
        stageAbbreviation: {
          type: String,
          required: true
        }
      }
    };
    </script>
    
    <template>
      <div>
        <StageInfoDisplay stageAbbreviation="FPI" />
        <StageInfoDisplay stageAbbreviation="DCRI" />
        <StageInfoDisplay stageAbbreviation="OI" />
      </div>
    </template>
    
    <script>
    import StageInfoDisplay from './StageInfoDisplay.vue';
    
    export default {
      components: {
        StageInfoDisplay
      }
    };
    </script>
    
    <template>
      <div>
        <el-card>
          <div v-if="stageInfo">{{ stageInfo }}</div>
          <div v-else>加载中...</div>
        </el-card>
      </div>
    </template>
    
    <script>
    export default {
      data() {
        return {
          stageInfo: null
        };
      },
      props: {
        stageAbbreviation: {
          type: String,
          required: true
        }
      },
      mounted() {
        this.loadData();
      },
      methods: {
        loadData() {
          // 模拟异步加载数据,实际情况下可以使用异步请求获取数据
          setTimeout(() => {
            // 根据 stageAbbreviation 加载相应的数据
            switch (this.stageAbbreviation) {
              case 'FPI':
                this.stageInfo = "工厂仓拣货信息内容";
                break;
              case 'DCRI':
                this.stageInfo = "DC 收货信息内容";
                break;
              case 'OI':
                this.stageInfo = "订单信息内容";
                break;
              default:
                this.stageInfo = "未知阶段信息";
            }
          }, 1000); // 模拟1秒后加载完成
        }
      }
    };
    </script>
    

<template>
  <div>
    <StageInfoDisplay :stageAbbreviations="['FPI', 'DCRI', 'OI']" :snData="SNdata" />
  </div>
</template>

<script>
import StageInfoDisplay from './StageInfoDisplay.vue';

export default {
  components: {
    StageInfoDisplay
  },
  data() {
    return {
      SNdata: {
        // SNdata 数据
      }
    };
  }
};
</script>
<template>
  <div>
    <template v-for="abbreviation in stageAbbreviations">
      <el-card v-if="shouldDisplay(abbreviation)" :key="abbreviation">
        <h2>{{ abbreviation }}</h2>
        <p>{{ getStageInfo(abbreviation) }}</p>
      </el-card>
    </template>
  </div>
</template>

<script>
export default {
  props: {
    stageAbbreviations: {
      type: Array,
      required: true
    },
    snData: {
      type: Object,
      required: true
    }
  },
  methods: {
    shouldDisplay(abbreviation) {
      // 根据传入的阶段缩写数组判断是否应该展示该阶段信息
      return this.stageAbbreviations.includes(abbreviation);
    },
    getStageInfo(abbreviation) {
      // 根据缩写获取对应的阶段信息
      switch (abbreviation) {
        case 'FPI':
          return 'First Production Inspection';
        case 'DCRI':
          return 'Delivery Confirmation and Receipt Inspection';
        case 'OI':
          return 'Outbound Inspection';
        default:
          return 'Unknown Stage';
      }
    }
  }
};
</script>

2.路由初步实现

封装组件

<template>
  <div class="layout-padding">
    <div class="layout-padding-view" style="overflow: auto;height: inherit ;padding:10px">
      <el-form
          ref="dataFormRef"
          :model="form"
          formDialogRef
          label-width="auto"
          :inline="true"
      >
        <el-card shadow="never" >
          <el-collapse v-model="goodsCollapse">
            <el-collapse-item name="1">
              <template #title>
                <span class="titleStyle" style="width: 50%">{{ $t('translate.goodsInfo') }}</span>
                <div style="width: 50%;text-align: right;margin-right: 25px">
                  <el-button @click.stop="onBack()">
                    {{ $t('translate.return') }}
                  </el-button>
                </div>
              </template>
              <el-row class="mb1">
                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsSnNo')" prop="form">
                    <el-input v-model="form.id" name="form" :placeholder="$t('translate.inputgoodsSnNo')"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.cargoOwner')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputCargoOwnerTip')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsName')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputGoodsNameTip')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.GoodsStatus')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.selectGoodsStatus')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.historicalState')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.selectHistoricalState')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.warehouseStatus')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.selectWarehouseStatus')"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.currentStorageLocation')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.selectCurrentWarehouse')"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.currentStorageLocation')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.selectCurrentStorageLocation')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.currentStorageArea')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.selectCurrentStorageArea')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsSource')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputGoodsBatchNo')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.productModel')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputProductModelTip')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsBatchNo')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputGoodsBatchNo')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.package')" prop="form">
                    <el-input v-model="form.id" name="form" :placeholder="$t('translate.inputPackageTip')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.packQty')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputExpectedPackageQty')"></el-input>
                  </el-form-item>
                </el-col>


                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.PackingQty')" prop="form">
                    <el-input v-model="form.id" name="form" :placeholder="$t('translate.PackingQty')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsWeight')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputgoodsWeight')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsColor')" prop="form">
                    <el-input v-model="form.id" name="form" :placeholder="$t('translate.inputGoodsColor')"></el-input>
                  </el-form-item>
                </el-col>

                <el-col :xs="8" :sm="8" :md="6">
                  <el-form-item :label="$t('translate.goodsVolume')" prop="form">
                    <el-input v-model="form.id" name="form"
                              :placeholder="$t('translate.inputgoodsVolume')"></el-input>
                  </el-form-item>
                </el-col>

              </el-row>
            </el-collapse-item>
          </el-collapse>
        </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('FWR')" :key="'FWR'">
            <el-collapse v-model="factoryReceiveCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('工厂仓收货信息') }}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksReceiptNo')" prop="receiptNo">
                      <el-input v-model="form.receiptNo" :placeholder="$t('translate.inputWerksReceiptNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.Consignor')" prop="documentType">
                      <el-input v-model="form.documentType" :placeholder="$t('translate.selectShipper')">></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.shipperTel')" prop="responsible">
                      <el-input v-model="form.responsible" :placeholder="$t('translate.inputshipperTel')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.carNo')" prop="operator">
                      <el-input v-model="form.operator" :placeholder="$t('translate.inputCarNo')"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.DeliveryTime')" prop="receiptCompleteTime">
                      <el-date-picker
                          v-model="form.receiptCompleteTime"
                          type="datetime"
                          :placeholder="$t('translate.DeliveryTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('FWPI')" :key="'FWPI'">
            <el-collapse v-model="factoryPickingCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.werksPickInfo') }}</span>
                </template>
                <!-- 表单项内容 -->
                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksPickNo')" prop="form">
                      <el-input v-model="form.id" name="form"
                                :placeholder="$t('translate.inputWerksPickNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.pickingCondition')" prop="form">
                      <el-input v-model="form.id" name="form"
                                :placeholder="$t('translate.selectPickingCondition')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksPicker')" prop="form">
                      <el-input v-model="form.id" name="form"
                                :placeholder="$t('translate.selectWerksPicker')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksPickDate')" prop="form">
                      <el-date-picker
                          v-model="form.auditTime"
                          type="datetime"
                          :placeholder="$t('translate.selectWerksPicker')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>

              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('FWDI')" :key="'FWDI'">
            <el-collapse v-model="factorySchedulingCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.werksDispatchInfo') }}</span>
                </template>
                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksDispatchNo')" prop="warehouseNo">
                      <el-input v-model="form.warehouseNo"
                                :placeholder="$t('translate.inputWerksDispatchNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksDispatcStatus')" prop="status">
                      <el-select v-model="form.status" :placeholder="$t('translate.selectWerksDispatcStatus')">
                        <el-option label="完成" value="complete"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.auditor')" prop="reviewer">
                      <el-input v-model="form.reviewer" :placeholder="$t('translate.selectauditor')"></el-input>
                    </el-form-item>
                  </el-col>


                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.AuditDate')" prop="applyTime">
                      <el-date-picker
                          v-model="form.applyTime"
                          type="datetime"
                          :placeholder="$t('translate.selectauditTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.RESV1')" prop="transportLine">
                      <el-input v-model="form.transportLine" :placeholder="$t('translate.destinationTip')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.isLoad')" prop="startStation">
                      <el-input v-model="form.startStation" :placeholder="$t('translate.isLoad')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.transportMethod')" prop="transportMode">
                      <el-input v-model="form.transportMode"
                                :placeholder="$t('translate.inputTransportationMethodName')"></el-input>
                    </el-form-item>
                  </el-col>


                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.truck')" prop="vehicleNo">
                      <el-input v-model="form.vehicleNo" :placeholder="$t('translate.selectTruckType')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.Driver')" prop="driver">
                      <el-input v-model="form.driver" :placeholder="$t('translate.inputDriver')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ALCT')" prop="requiredShipTime">
                      <el-date-picker
                          v-model="form.requiredShipTime"
                          type="datetime"
                          :placeholder="$t('translate.ALCT')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.TruckEDD')" prop="estimatedShipTime">
                      <el-date-picker
                          v-model="form.estimatedShipTime"
                          type="datetime"
                          :placeholder="$t('translate.TruckEDD')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.TruckADD')" prop="actualShipTime">
                      <el-date-picker
                          v-model="form.actualShipTime"
                          type="datetime"
                          :placeholder="$t('translate.TruckADD')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('DCRI')" :key="'DCRI'">
            <el-collapse v-model="receiveCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">DC {{ $t('translate.ReceivptGoodsInfo') }}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ReceivptGoodsFormNo')" prop="receiptNo">
                      <el-input v-model="form.receiptNo"
                                :placeholder="$t('translate.inputReceivptGoodsFormNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.DocumentType')" prop="documentType">
                      <el-input v-model="form.documentType" :placeholder="$t('translate.DocumentType')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.author')" prop="responsible">
                      <el-input v-model="form.responsible" :placeholder="$t('translate.inputauthor')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.operateName')" prop="operator">
                      <el-input v-model="form.operator" :placeholder="$t('translate.inputOperators')"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ReceivingWarehouse')" prop="receiptWarehouse">
                      <el-input v-model="form.receiptWarehouse"
                                :placeholder="$t('translate.selectReceivingWarehouse')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.recvStatus')" prop="receiptStatus">
                      <el-input v-model="form.receiptStatus" :placeholder="$t('translate.recvStatus')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ReceivingWarehouseLocation')" prop="goodsLocation">
                      <el-input v-model="form.goodsLocation"
                                :placeholder="$t('translate.selectDefaultReceivingGoodsLocation')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.palletNo')" prop="palletNo">
                      <el-input v-model="form.palletNo" :placeholder="$t('translate.inputPalletNumberTip')"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ReceivptGoodsPlatForm')" prop="receiptPlatform">
                      <el-input v-model="form.receiptPlatform"
                                :placeholder="$t('translate.selectPlanRecvPlat')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ETA')" prop="estimatedArrivalTime">
                      <el-date-picker
                          v-model="form.estimatedArrivalTime"
                          type="datetime"
                          :placeholder="$t('translate.selctETA')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ReservationDate')" prop="appointmentDate">
                      <el-date-picker
                          v-model="form.appointmentDate"
                          type="datetime"
                          :placeholder="$t('translate.ReservationDate')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.startReceivingTime')" prop="startReceiptTime">
                      <el-date-picker
                          v-model="form.startReceiptTime"
                          type="datetime"
                          :placeholder="$t('translate.startReceivingTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.endReceivingTime')" prop="receiptCompleteTime">
                      <el-date-picker
                          v-model="form.receiptCompleteTime"
                          type="datetime"
                          :placeholder="$t('translate.endReceivingTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('SI')" :key="'SI'">
            <el-collapse v-model="putawayCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.putAwayInfo') }}</span>
                </template>
                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayNo')" prop="shelvingTaskNo">
                      <el-input v-model="form.shelvingTaskNo" :placeholder="$t('translate.putAwayNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayStatus')" prop="operationStatus">
                      <el-select v-model="form.operationStatus" :placeholder="$t('translate.selectPutAwayStatus')">
                        <el-option label="已完成" value="completed"></el-option>
                        <el-option label="进行中" value="inProgress"></el-option>
                        <el-option label="未开始" value="notStarted"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayOrganization')" prop="organization">
                      <el-input v-model="form.organization"
                                :placeholder="$t('translate.selectPutAwayOrganization')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayLocation')" prop="shelvingLocation">
                      <el-input v-model="form.shelvingLocation"
                                :placeholder="$t('translate.selectPutAwayLocation')"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayStartTime')" prop="shelvingStartTime">
                      <el-date-picker
                          v-model="form.shelvingStartTime"
                          type="datetime"
                          :placeholder="$t('translate.selectPutAwayStartTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayEndTime')" prop="shelvingEndTime">
                      <el-date-picker
                          v-model="form.shelvingEndTime"
                          type="datetime"
                          :placeholder="$t('translate.selectPutAwayEndTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.putAwayPicker')" prop="operator">
                      <el-input v-model="form.operator" :placeholder="$t('translate.selectPutAwayPicker')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.author')" prop="responsible">
                      <el-input v-model="form.responsible" :placeholder="$t('translate.selectAuthor')"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('ICI')" :key="'ICI'">
            <el-collapse v-model="checkCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.inventoryInfo') }}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.InventoryNumber')" prop="qualityPointNo">
                      <el-input v-model="form.qualityPointNo"
                                :placeholder="$t('translate.inputInventoryNumberTip')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.recountNo')" prop="manufacturingNo">
                      <el-input v-model="form.manufacturingNo" :placeholder="$t('translate.inputRecountNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.inventoryType')" prop="qualityPointType">
                      <el-select v-model="form.qualityPointType" :placeholder="$t('translate.inputInventoryTypeTip')">
                        <el-option label="破损" value="damaged"></el-option>
                        <el-option label="缺失" value="missing"></el-option>
                        <el-option label="正常" value="normal"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.countBy')" prop="qualityInspector">
                      <el-input v-model="form.qualityInspector"
                                :placeholder="$t('translate.inputInventoryName')"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.author')" prop="responsible">
                      <el-input v-model="form.responsible" :placeholder="$t('translate.selectAuthor')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.inventoryDate')" prop="qualityCheckTime">
                      <el-date-picker
                          v-model="form.qualityCheckTime"
                          type="datetime"
                          :placeholder="$t('translate.selectInventoryDate')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.InventoryStatus')" prop="qualityResult">
                      <el-select v-model="form.qualityResult" :placeholder="$t('translate.selectInventoryStatus')">
                        <el-option label="合格" value="qualified"></el-option>
                        <el-option label="不合格" value="unqualified"></el-option>
                        <el-option label="待处理" value="pending"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('SHI')" :key="'SHI'">
            <el-collapse v-model="shiftingCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.moveInfo') }}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ShiftOrderNumber')" prop="moveNo">
                      <el-input v-model="form.moveNo"
                                :placeholder="$t('translate.inputShiftOrderNumberTip')"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveType')" prop="moveNo">
                      <el-select v-model="form.status" :placeholder="$t('translate.selectMoveType')">
                        <el-option :label="$t('translate.MoveInStorage')" value="complete"></el-option>
                        <el-option :label="$t('translate.MoveOutStorage')" value="complete"></el-option>
                        <el-option label="正常" value="complete"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveInZone')" prop="inArea">
                      <el-input v-model="form.inArea"
                                :placeholder="$t('translate.inputShiftOrderNumberTip')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveInLocation')" prop="inLocation">
                      <el-input v-model="form.inLocation"
                                :placeholder="$t('translate.selectMoveInLocation')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveIn')" prop="inOperator">
                      <el-input v-model="form.inOperator" :placeholder="$t('translate.selectMoveIn')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveInTime')" prop="inTime">
                      <el-date-picker
                          v-model="form.inTime"
                          type="datetime"
                          :placeholder="$t('translate.moveInTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveOutZone')" prop="outArea">
                      <el-input v-model="form.outArea" :placeholder="$t('translate.selectinRegionZone')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveOutLocation')" prop="outLocation">
                      <el-input v-model="form.outLocation"
                                :placeholder="$t('translate.selectMoveOutLocation')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveOut')" prop="outOperator">
                      <el-input v-model="form.outOperator" :placeholder="$t('translate.selectMoveOut')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveOutTime')" prop="outTime">
                      <el-date-picker
                          v-model="form.outTime"
                          type="datetime"
                          :placeholder="$t('translate.moveOutTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.moveStatus')" prop="moveStatus">
                      <el-select v-model="form.moveStatus" :placeholder="$t('translate.selectMoveStatus')">
                        <el-option label="已完成" value="completed"></el-option>
                        <el-option label="进行中" value="inProgress"></el-option>
                        <el-option label="待处理" value="pending"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('OI')" :key="'OI'">
            <el-collapse v-model="orderCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.orderInfo') }}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.orderNo')" prop="orderNo">
                      <el-input v-model="form.orderNo" :placeholder="$t('translate.inputOrderNumberTip')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.clientName')" prop="customer">
                      <el-input v-model="form.customer"
                                :placeholder="$t('translate.inputCustomerSelectTip')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.Origin')" prop="originPlace">
                      <el-input v-model="form.originPlace" :placeholder="$t('translate.selectOrigin')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.DeliveryTime')" prop="pickupTime">
                      <el-date-picker
                          v-model="form.pickupTime"
                          type="datetime"
                          :placeholder="$t('translate.endReceivingTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.Consignor')" prop="sender">
                      <el-input v-model="form.sender" :placeholder="$t('translate.selectShipper')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.shipperAddrs')" prop="senderAddress">
                      <el-input v-model="form.senderAddress"
                                :placeholder="$t('translate.inputshipperAddrs')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.shipToName')" prop="receiverName">
                      <el-input v-model="form.receiverName" :placeholder="$t('translate.SelectShipToName')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.shipToAddress1')" prop="receiverAddress">
                      <el-input v-model="form.receiverAddress"
                                :placeholder="$t('translate.inputShipToAddress1')"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.soldToName')" prop="pickupPartyName">
                      <el-input v-model="form.pickupPartyName"
                                :placeholder="$t('translate.inputSoldToPartyName')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.soldToAddress1')" prop="pickupAddress">
                      <el-input v-model="form.pickupAddress" :placeholder="$t('translate.soldToAddress1')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.orderStatus')" prop="orderStatus">
                      <el-select v-model="form.orderStatus" :placeholder="$t('translate.selectOrderStatus')">
                        <el-option label="待处理" value="pending"></el-option>
                        <el-option label="处理中" value="processing"></el-option>
                        <el-option label="已完成" value="completed"></el-option>
                        <el-option label="已取消" value="cancelled"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.SAPOrderRemarks')" prop="orderRemarks">
                      <el-input
                          v-model="form.orderRemarks"
                          type="textarea"
                          :placeholder="$t('translate.inputRemarkTip')"
                          :rows="1"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('PI')" :key="'PI'">
            <el-collapse v-model="orderPickingCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.PickingInfo')}}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.pickerListNo')" prop="pickingNo">
                      <el-input v-model="form.pickingNo" :placeholder="$t('translate.inputpickOrderNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.pickingCondition')" prop="pickingStatus">
                      <el-select v-model="form.pickingStatus" :placeholder="$t('translate.selectPickingCondition')">
                        <el-option label="待拣货" value="pending"></el-option>
                        <el-option label="拣货中" value="processing"></el-option>
                        <el-option label="已完成" value="completed"></el-option>
                        <el-option label="已取消" value="cancelled"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.isReturn')" prop="picker">
                      <el-input v-model="form.picker"  :placeholder="$t('translate.selectisReturn')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.pickBy')" prop="picker">
                      <el-input v-model="form.picker" :placeholder="$t('translate.inputpickBy')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.RESV1')" prop="destination">
                      <el-input v-model="form.destination"
                                :placeholder="$t('translate.selectDestinationCityName')"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.inputStartPlaceholderTip')" prop="pickingStartTime">
                      <el-date-picker
                          v-model="form.pickingStartTime"
                          type="datetime"
                          :placeholder="$t('translate.selectStartPlaceholderTip')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.ActualCompleteTiem')" prop="pickingEndTime">
                      <el-date-picker
                          v-model="form.pickingEndTime"
                          type="datetime"
                          :placeholder="$t('translate.ActualCompleteTiem')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.PickingArea')" prop="pickingArea">
                      <el-input v-model="form.pickingArea" :placeholder="$t('translate.PickingArea')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.pickingMethod')" prop="pickingMethod">
                      <el-select v-model="form.pickingMethod" :placeholder="$t('translate.selectPickingMethod')">
                        <el-option label="人工拣货" value="manual"></el-option>
                        <el-option label="自动拣货" value="automatic"></el-option>
                        <el-option label="混合拣货" value="mixed"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.priority')" prop="priority">
                      <el-select v-model="form.priority" :placeholder="$t('translate.inputPriority')">
                        <el-option label="高" value="high"></el-option>
                        <el-option label="中" value="medium"></el-option>
                        <el-option label="低" value="low"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
          <el-card shadow="never"  v-if="shouldDisplay('DOI')" :key="'DOI'">
            <el-collapse v-model="dispatchCollapse">
              <el-collapse-item name="1">
                <template #title>
                  <span class="titleStyle" style="width: 50%">{{ $t('translate.dispatchInfo') }}</span>
                </template>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.CARBLCDE')" prop="dispatchNo">
                      <el-input v-model="form.dispatchNo" :placeholder="$t('translate.inputDispatchNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.werksDispatcStatus')" prop="dispatchStatus">
                      <el-select v-model="form.dispatchStatus" :placeholder="$t('translate.selectWerksDispatcStatus')">
                        <el-option label="签收" value="signed"></el-option>
                        <el-option label="待签收" value="pending"></el-option>
                        <el-option label="运输中" value="transporting"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.carrier')" prop="carrier">
                      <el-input v-model="form.carrier" :placeholder="$t('translate.inputCarrierName')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item  :label="$t('translate.auditByName')" prop="auditor">
                      <el-input v-model="form.auditor" :placeholder="$t('translate.inputauditByName')"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.auditTime')"  prop="auditTime">
                      <el-date-picker
                          v-model="form.auditTime"
                          type="datetime"
                          :placeholder="$t('translate.selectauditTimeTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.routeLink')" prop="route">
                      <el-input v-model="form.route" :placeholder="$t('translate.routeLinkTip')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.isTransfer')" prop="isTransfer">
                      <el-select v-model="form.isTransfer"    :placeholder="$t('translate.selectisTransfer')">
                        <el-option label="是" value="yes"></el-option>
                        <el-option label="否" value="no"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.transportMethod')"  prop="transportMethod">
                      <el-select v-model="form.transportMethod"   :placeholder="$t('translate.inputTranspModeTip')">
                        <el-option label="汽运" value="truck"></el-option>
                        <el-option label="铁路" value="railway"></el-option>
                        <el-option label="空运" value="air"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.carNumber')" prop="vehicleNo">
                      <el-input v-model="form.vehicleNo" :placeholder="$t('translate.inputCarNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.Driver')"  prop="driver">
                      <el-input v-model="form.driver" :placeholder="$t('translate.inputDriver')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.LoadSheet')"  prop="loadingVehicle">
                      <el-input v-model="form.loadingVehicle" :placeholder="$t('translate.TruckLoadingBillNo')"></el-input>
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.TruckLoadingCompletionTime')"  prop="loadingCompleteTime">
                      <el-date-picker
                          v-model="form.loadingCompleteTime"
                          type="datetime"
                          :placeholder="$t('translate.TruckLoadingCompletionTime')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row class="mb1">
                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.TruckEDD')" prop="expectedDepartureTime">
                      <el-date-picker
                          v-model="form.expectedDepartureTime"
                          type="datetime"
                          :placeholder="$t('translate.TruckEDD')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col :xs="8" :sm="8" :md="6">
                    <el-form-item :label="$t('translate.TruckADD')"  prop="actualDepartureTime">
                      <el-date-picker
                          v-model="form.actualDepartureTime"
                          type="datetime"
                          :placeholder="$t('translate.TruckADD')"
                          format="YYYY-MM-DD HH:mm:ss"
                          value-format="YYYY-MM-DD HH:mm:ss"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </el-card>
      </el-form>
    </div>

  </div>
</template>

<script setup lang="ts">
import { ref , onMounted } from 'vue';
import {useRoute} from "vue-router";
const route = useRoute()
const form = ref({})
const goodsCollapse = ref('1')
const factoryReceiveCollapse = ref('1')
const factoryPickingCollapse = ref('1')
const factorySchedulingCollapse = ref('1')
const receiveCollapse = ref('1')
const putawayCollapse = ref('1')
const checkCollapse = ref('1')
const shiftingCollapse = ref('1')
const orderCollapse = ref('1')
const orderPickingCollapse = ref('1')
const dispatchCollapse = ref('1')

const stageAbbreviations = ref([])
// 判断是否显示
const shouldDisplay = (abbreviation: string) => {
  return stageAbbreviations.value.includes(abbreviation);
};


onMounted(() => {
  if (route.query) {
    stageAbbreviations.value = route.query.stageAbbreviations
  }
});

/** 返回列表 */
const onBack = () => {
  window.history.back();
};

</script>

<style>

.titleStyle {
  font-size: 20px;
  height: 48px;
  line-height: 48px;
  text-indent: 1em;
  position: relative;
  border-bottom: 3px solid #fcfdfd;
}

.titleStyle::before {
  content: "";
  display: block;
  position: absolute;
  /*left: 20px;*/
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  height: 20px;
  border: 4px solid #1f5b91;
  width: 2px;
  border-radius: 5px;
  background: #1f5b91;
}
</style>
import {useRoute} from "vue-router";
const route = useRoute()
 

// 判断是否显示
const shouldDisplay = (abbreviation: string) => {
  return stageAbbreviations.value.includes(abbreviation);
};


onMounted(() => {
  if (route.query) {
    stageAbbreviations.value = route.query.stageAbbreviations
  }
});

引用组件

 3.使用 Pinia 来管理全局状态

 1在 Pinia store 中定义一个状态来存储 snData 和 stageAbbreviations

import { defineStore } from 'pinia';

export const useStore = defineStore({
  id: 'global',
  state: () => ({
    snData: {} as Record<string, any>,
    stageAbbreviations: [] as string[],
  }),
  actions: {
    setSNData(data: Record<string, any>) {
      this.snData = data;
    },
    setStageAbbreviations(abbreviations: string[]) {
      this.stageAbbreviations = abbreviations;
    },
  },
});

在你的路由跳转函数中,你可以使用 Pinia store 来存储 snData 和 stageAbbreviations 的值,并在跳转时不传递参数:

import { useStore } from './store';
import { router } from 'your-router-file-path'; // 导入你的 router 实例

const onSNTrace = () => {
  const store = useStore();

  const snData = {
    id: '这个货品的数据',
  };
  const stageAbbreviations = ['ICI', 'SI', 'DCRI', 'FWDI', 'FWPI', 'FWR'];

  // 存储到 Pinia store
  store.setSNData(snData);
  store.setStageAbbreviations(stageAbbreviations);

  // 跳转路由
  router.push('/warehouseManage/snNoManage/components/snTrace');
};

在你的目标路由组件中,你可以通过 Pinia store 来获取存储的 snData 和 stageAbbreviations 的值

import { useStore } from './store';

export default {
  setup() {
    const store = useStore();

    // 获取存储的值
    const snData = store.snData;
    const stageAbbreviations = store.stageAbbreviations;

  // 在组件销毁前清除存储的值
    onBeforeUnmount(() => {
      store.setSNData({});
      store.setStageAbbreviations([]);
    });


    return {
      snData,
      stageAbbreviations,
    };
  },
};

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/911134.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Win系统通过命令行查看笔记本电池损耗/寿命/健康

在 Windows 10/11 系统中&#xff0c;可以通过指令查看笔记本电池的寿命情况&#xff0c;方法如下&#xff1a; 0&#xff0c;打开cmd/终端 键盘快捷键&#xff1a;Win R&#xff0c;然后输入cmd&#xff0c;点击【确定】 1&#xff0c;执行命令 在命令行中输入下面指令并按…

【DM系列】DM 集成 JDBC 开发指南

前言 数据库访问是数据库应用系统中非常重要的组成部分&#xff0c;DM 作为一个通用数据库管理系统&#xff0c;提供了多种数据库访问接口&#xff0c;包括 ODBC、JDBC、DPI 等方式。本开发指南详细介绍了 DM 的各种访问接口、相应开发环境的配置、以及一些开发用例。本指南的主…

【客观理性深入讨论国产中间件及数据库-科创基础软件】

随着国产化的进程&#xff0c;越来越多的国企央企开始要求软件产品匹配过程化的要求&#xff0c; 最近有一家银行保险的科技公司对行为验证码产品就要求匹配国产中间件&#xff0c; 于是开始了解国产中间件都有哪些厂家 一&#xff1a;国产中间件主要产品及厂商 1 东方通&…

python opencv3

三、图像预处理2 1、图像滤波 为图像滤波通过滤波器得到另一个图像。也就是加深图像之间的间隙&#xff0c;增强视觉效果&#xff1b;也可以模糊化间隙&#xff0c;造成图像的噪点被抹平。 2、卷积核 在深度学习中&#xff0c;卷积核越大&#xff0c;看到的信息越多&#xff0…

数据库管理-第258期 23ai:Oracle Data Redaction(20241104)

数据库管理258期 2024-11-04 数据库管理-第258期 23ai&#xff1a;Oracle Data Redaction&#xff08;20241104&#xff09;1 简介2 应用场景与有点3 多租户环境4 特性与能力4.1 全数据编校4.2 部分编校4.3 正则表达式编校4.4 随机编校4.5 空值编校4.6 无编校4.7 不同数据类型上…

Kettle——CSV文件转换成excel文件输出

1.点击—文件—新建—转换 拖入两个组件&#xff1a; 按shift&#xff0b;鼠标左击建立连接&#xff0c;并点击主输出步骤&#xff0c; 点击CSV文件输入&#xff0c;选择浏览的csv文件&#xff0c;然后点击确定 同样&#xff0c;Excel也同上&#xff0c;只是要删除这个xls 并…

【数据集】【YOLO】【目标检测】火情、烟雾、火灾检测数据集 9848 张,YOLO火灾检测算法实战训练教程!

数据集介绍 【数据集】火情、烟火、火灾检测数据集 9848 张&#xff0c;目标检测&#xff0c;包含YOLO/VOC格式标注。 数据集中包含2种分类&#xff1a;{0: Fire, 1: Smoke}&#xff0c;分别是‘火焰’和‘烟雾’。 数据集来自国内外图片网站和视频截图&#xff1b; 可用于…

Python酷库之旅-第三方库Pandas(202)

目录 一、用法精讲 941、pandas.CategoricalIndex.set_categories方法 941-1、语法 941-2、参数 941-3、功能 941-4、返回值 941-5、说明 941-6、用法 941-6-1、数据准备 941-6-2、代码示例 941-6-3、结果输出 942、pandas.CategoricalIndex.as_ordered方法 942-1…

docker 拉取MySQL8.0镜像以及安装

目录 一、docker安装MySQL镜像 搜索images 拉取MySQL镜像 二、数据挂载 在/root/mysql/conf中创建 *.cnf 文件 创建容器,将数据,日志,配置文件映射到本机 检查MySQL是否启动成功&#xff1a; 三、DBeaver数据库连接 问题一、Public Key Retrieval is not allowed 问题…

Java多线程详解⑤(全程干货!!!)线程安全问题 || 锁 || synchronized

这里是Themberfue 在上一节的最后&#xff0c;我们讨论两个线程同时对一个变量累加所产生的现象 在这一节中&#xff0c;我们将更加详细地解释这个现象背后发生的原因以及该如何解决这样类似的现象 线程安全问题 public class Demo15 {private static int count 0;public …

如何使用RabbitMQ和Python实现广播消息

使用 RabbitMQ 和 Python 实现广播消息的过程涉及设置一个消息队列和多个消费者&#xff0c;以便接收相同的消息。RabbitMQ 的 “fanout” 交换机允许你将消息广播到所有绑定的队列。以下是如何实现这一过程的详细步骤。 1、问题背景 在将系统从Morbid迁移到RabbitMQ时&#x…

【RabbitMQ】04-发送者可靠性

1. 生产者重试机制 spring:rabbitmq:connection-timeout: 1s # 设置MQ的连接超时时间template:retry:enabled: true # 开启超时重试机制initial-interval: 1000ms # 失败后的初始等待时间multiplier: 1 # 失败后下次的等待时长倍数&#xff0c;下次等待时长 initial-interval…

java的类加载机制的学习

一、类加载的过程 一个类被加载到虚拟机内存中开始&#xff0c;到卸载出虚拟机内存为止&#xff0c;整个生命周期分为七个阶段&#xff0c;分别是加载、验证、准备、解析、初始化、使用和卸载。其中验证、准备和解析这三个阶段统称为连接。 除去使用和卸载&#xff0c;就是Ja…

uni-app跨域set-cookie

set-cookie的值是作为一个权限控制的 首先&#xff0c;无论什么接口都会返回一个set-cookie&#xff0c;但未登录时&#xff0c;set-cookie是没有任何权限的 其次&#xff0c;登录接口请求时会修改set-cookie&#xff0c;并且在后续其他接口发起请求时&#xff0c;会在请求头…

让智能体—“正念365”陪你一起“养心”

佛学的“八正道”中&#xff0c;笔者个人观点&#xff0c;“正念”是最适合当代人低门槛练习的一个&#xff0c;因为不需要阅读大量的知识来理解概念&#xff0c;只需要保持对当下的觉察&#xff0c;发现分心了&#xff0c;就不带评价的把注意力拉回到当前的事情上就好。就是佛…

浅析Android Handler机制实现原理

0. 背景描述 Android系统出于对简单、高效的考虑&#xff0c;在设计UI体系时采用了单线程模型&#xff0c;即不会在多个线程中对同一个UI界面执行操作。简单是指单线程模型可以不用考虑和处理在多线程环境下操作UI带来的线程安全问题&#xff0c;高效是指单线程模型下无需通过…

vue 3:监听器

目录 1. 基本概念 2. 侦听数据源类型 1. 监听getter函数 2. 监听 ref 或 reactive 的引用 3. 多个来源组成的数组 4. 避免直接传递值&#xff01;&#xff01;&#xff01; 3. 深层侦听器 4. 立即回调的侦听器 5. 一次性侦听器 6. watchEffect() 7. 暂停、恢复和停止…

沉浸式学习新体验:3D虚拟展厅如何重塑教育格局!

3D虚拟展厅对于教育行业产生了深远的影响&#xff0c;主要体现在以下几个方面&#xff1a; 一、创新教学方式 3D虚拟展厅利用三维技术构建的虚拟展示空间&#xff0c;为教育行业带来了一种全新的教学方式。传统的教学方式往往局限于书本和课堂&#xff0c;而3D虚拟展厅则能够…

【Kafka】Windows+KRaft部署指南

【Kafka】WindowsKRaft部署指南 摘要本地环境说明官网快速开始修改config/kraft/server.properties初始化数据存储目录启动 测试创建topic创建生产者创建消费者 FAQ输入行太长。命令语法不正确。问题描述解决方案 参考资料 摘要 Kafka是一种高吞吐量的分布式发布订阅消息系统&…

面相小白的php反序列化漏洞原理剖析

前言 欢迎来到我的博客 个人主页:北岭敲键盘的荒漠猫-CSDN博客 本文整理反序列化漏洞的一些成因原理 建议学习反序列化之前 先对php基础语法与面向对象有个大体的了解 (我觉得我整理的比较细致&#xff0c;了解这俩是个啥就行) 漏洞实战情况 这个漏洞黑盒几乎不会被发现&am…