huang_an 1 год назад
Родитель
Сommit
1b4ed64376

+ 5 - 0
src/components/selectTree/index.vue

@@ -95,6 +95,8 @@
       // 这个需要用深度监听,不然回显有时会失效
       value: {
         handler(val) {
+          console.log('value变化', val);
+          console.log(this.value);
           this.valueId = this.value;
           this.initHandle();
         },
@@ -129,8 +131,11 @@
       async initHandle() {
         if (this.valueId) {
           this.$nextTick(async () => {
+            console.log(this.options);
             const tempValue = await this.$refs.selectTree.getNode(this.valueId);
+            console.log(tempValue);
             setTimeout(() => {
+              console.log(tempValue);
               if (tempValue) {
                 this.valueTitle = tempValue.data[this.props.label]; // 初始化显示
                 this.$refs.selectTree.setCurrentKey(this.valueId); // 设置默认选中

+ 9 - 1
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -185,7 +185,7 @@
         v-if="activeComp == 'inoutBound'"
         :form="form"
         :sourceBizNo="form.receiveNo"
-        :detailList="form.productList"
+        :saleProductList="form.productList"
         :bizType="2"
       ></add>
     </keep-alive>
@@ -198,6 +198,7 @@
     <procurementWarehousing
       v-if="activeComp == 'inoutBoundEdit'"
       :businessId="form.receiveNo"
+      :qualityInspectionItems="qualityInspectionItems"
       ref="procurementWarehousing"
     >
     </procurementWarehousing>
@@ -239,6 +240,13 @@
     mixins: [dictMixins],
     data() {
       return {
+        qualityInspectionItems: [
+          'materielDesignation',
+          'clientCode',
+          'engrave',
+          'weight',
+          'result'
+        ],
         isUpload: false,
         activeComp: 'main',
         tabOptions: [{ key: 'main', name: '收货单详情' }],

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/entrustedReceive/boxTabPage.vue

@@ -80,7 +80,8 @@
             return {
               form: this.form,
               bizType: 7,
-              sourceBizNo: this.form.code
+              sourceBizNo: this.form.code,
+              saleProductList: this.form.productList
             };
           case 'tab3':
             return {

+ 1 - 1
src/views/bpm/handleTask/components/saleOrder/invoice/submit.vue

@@ -133,7 +133,7 @@
         let data = await getSendSaleOrderrecordDetail(this.businessId);
         try {
           console.log(1111, '1111111111');
-          this.outInData = await getOutInBySourceBizNo(data.docNo);
+          this.outInData = await storageApi.getInfoBySourceBizNo(data.docNo);
           console.log(this.outInData, '============');
         } catch (error) {
           console.log(22222222, '22222222222');

+ 15 - 1
src/views/bpm/outgoingManagement/components/AssetsDialog.vue

@@ -118,20 +118,23 @@
             :reserve-selection="true"
             width="55"
             align="center"
+            fixed="left"
           >
           </el-table-column>
-          <el-table-column label="序号" type="index" width="50">
+          <el-table-column label="序号" type="index" width="50" fixed="left">
           </el-table-column>
           <el-table-column
             prop="categoryCode"
             label="物品编码"
             min-width="120"
+            fixed="left"
             :show-overflow-tooltip="true"
           ></el-table-column>
           <el-table-column
             prop="categoryName"
             width="200"
             label="物品名称"
+            fixed="left"
             :show-overflow-tooltip="true"
           ></el-table-column>
           <el-table-column
@@ -343,7 +346,18 @@
     created() {
       this.getFieldModel();
     },
+    watch: {
+      tableData(val) {
+        this.doLayout();
+      }
+    },
     methods: {
+      doLayout() {
+        let that = this;
+        this.$nextTick(() => {
+          that.$refs.multipleTable.doLayout();
+        });
+      },
       // 获取动态表头
       getFieldModel() {
         storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {

+ 38 - 16
src/views/bpm/outgoingManagement/outbound.vue

@@ -77,9 +77,10 @@
                 size="medium"
                 style="width: 100%"
                 clearable
+                :value="formData.extInfo.verifyDeptCode"
                 :options="treeList"
                 :props="{
-                  value: 'code',
+                  value: 'id',
                   label: 'name',
                   children: 'children'
                 }"
@@ -550,6 +551,7 @@
             createUserName: '', //创建人名字
             contentImage: [] //图片数组
           },
+          fromId: '', //领料人
           fromUser: '', //送货人
           bizType: '', //物品类型
           verifyId: '', //审核人Id
@@ -581,8 +583,9 @@
     created() {
       this.getFieldModel();
       this.getListItems();
-      this.initUserInfo();
-      this.initDeptData();
+      this.initDeptData().then(() => {
+        this.initUserInfo();
+      });
     },
     methods: {
       // 获取动态表头
@@ -718,7 +721,9 @@
       },
       async getReturnStorage() {
         return new Promise((resolve) => {
+          console.log(this.formData);
           this.$refs.formName.validate(async (valid) => {
+            console.log('valid', valid);
             if (valid) {
               if (!this.productList?.length) {
                 return this.$message.error('请添加出库明细!');
@@ -806,13 +811,16 @@
         }
       },
 
-      async getStaffList(data) {
-        let res = await warehouseDefinition.getUserPage({
-          groupId: data.id,
-          size: 9999,
-          page: 1
+      getStaffList(data) {
+        return new Promise(async (resolve) => {
+          let res = await warehouseDefinition.getUserPage({
+            groupId: data.id,
+            size: 9999,
+            page: 1
+          });
+          this.llrLsit = res.list;
+          resolve();
         });
-        this.llrLsit = res.list;
       },
       // 初始化用户信息
       async initUserInfo() {
@@ -820,7 +828,6 @@
         // let info = JSON.parse(localStorage.getItem('info'));
         console.log('用户信息', this.user);
         console.log(this.form);
-
         let obj = res.find(
           (item) =>
             item.id ===
@@ -841,15 +848,30 @@
         this.formData.sourceBizNo = this.sourceBizNo;
         // 将出库状态改成出库状态 2出库 1入库
         this.formData.type = 2;
+        if (this.type == '自选领用出库') {
+          // 获取领料列表
+          this.getStaffList({ id: this.form.executorDeptId }).then(() => {
+            // 获取领料人和领料部门
+            this.formData.fromId = this.form.executorId;
+            this.formData.fromUser = this.form.executorName;
+            this.formData.extInfo.verifyDeptCode = this.form.executorDeptId;
+            this.formData.extInfo.verifyDeptName = this.form.executorDeptName;
+          });
+        }
         console.log('this.formData', this.formData);
       },
       // 初始化部门数据
-      async initDeptData() {
-        const res = await warehouseDefinition.tree();
-        this.treeList = this.$util.toTreeData({
-          data: res,
-          idField: 'id',
-          parentIdField: 'parentId'
+      initDeptData() {
+        return new Promise(async (resolve) => {
+          const res = await warehouseDefinition.tree();
+          this.treeList = this.$util.toTreeData({
+            data: res,
+            idField: 'id',
+            parentIdField: 'parentId'
+          });
+          this.$nextTick(() => {
+            resolve();
+          });
         });
       },
       addStock() {

+ 23 - 2
src/views/bpm/stockManagement/components/selectType_new.vue

@@ -40,18 +40,30 @@
             :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
             @selection-change="handleSelectionChange"
           >
-            <el-table-column type="selection" width="55" align="center">
+            <el-table-column
+              type="selection"
+              width="55"
+              align="center"
+              fixed="left"
+            >
             </el-table-column>
-            <el-table-column width="55px" label="序号" type="index">
+            <el-table-column
+              width="55px"
+              label="序号"
+              type="index"
+              fixed="left"
+            >
             </el-table-column>
             <el-table-column
               prop="assetCode"
               label="物品编码"
+              fixed="left"
               :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               prop="assetName"
               label="物品名称"
+              fixed="left"
               :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
@@ -154,6 +166,9 @@
       }
     },
     watch: {
+      tableData(val) {
+        this.doLayout();
+      },
       visibleDialog: {
         handler(v) {
           if (v) {
@@ -187,6 +202,12 @@
       this.getFieldModel();
     },
     methods: {
+      doLayout() {
+        let that = this;
+        this.$nextTick(() => {
+          that.$refs.multipleTable.doLayout();
+        });
+      },
       // 获取动态表头
       getFieldModel() {
         storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {

+ 3 - 101
src/views/bpm/stockManagement/details.vue

@@ -170,44 +170,23 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
-            <el-table-column
-              label="最小包装单元"
-              align="center"
-              width="120"
-              prop="minPackingQuantity"
-            >
-              <template slot-scope="{ row, $index }">
-                {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
-                  row.packingUnit
-                }}
-              </template>
-            </el-table-column>
-
             <el-table-column
               label="包装数量"
               prop="packingQuantity"
               align="center"
             >
               <template slot-scope="{ row, $index }">
-                {{ row.packingQuantity }} {{ row.packingUnit }}
+                {{ row.packingQuantity }}
               </template>
             </el-table-column>
+            <el-table-column label="包装单位" align="center" prop="packingUnit">
+            </el-table-column>
             <el-table-column
               label="计量数量"
               prop="measureQuantity"
               width="100"
               align="center"
             >
-              <template slot-scope="{ row, $index }">
-                <template>
-                  {{
-                    $math.format(
-                      row.minPackingQuantity * row.packingQuantity,
-                      14
-                    )
-                  }}
-                </template>
-              </template>
             </el-table-column>
             <el-table-column label="计量单位" prop="measureUnit" align="center">
               <template slot-scope="{ row, $index }">
@@ -312,16 +291,6 @@
               prop="packingUnit"
               :show-overflow-tooltip="true"
             ></el-table-column>
-            <el-table-column
-              label="计量数量"
-              prop="measureQuantity"
-              :show-overflow-tooltip="true"
-            ></el-table-column>
-            <el-table-column
-              label="计量单位"
-              prop="measureUnit"
-              :show-overflow-tooltip="true"
-            ></el-table-column>
             <el-table-column
               label="物料代号"
               prop="materielDesignation"
@@ -384,73 +353,6 @@
             </el-table-column>
           </el-table>
         </div>
-        <div class="mt20">
-          <header-title :title="`物料明细`" size="16px"> </header-title>
-          <el-table
-            ref="multipleTable"
-            :data="showMaterialList"
-            tooltip-effect="dark"
-            :max-height="300"
-            :row-class-name="tableRowClassName"
-            :header-cell-style="rowClass"
-            border
-            style="width: 100%"
-            stripe
-            height="300px"
-            v-el-table-infinite-scroll="materielHandleScroll"
-          >
-            <el-table-column label="序号" type="index" width="50">
-            </el-table-column>
-            <el-table-column
-              label="编码"
-              prop="categoryCode"
-              :show-overflow-tooltip="true"
-            ></el-table-column>
-            <el-table-column
-              label="名称"
-              prop="categoryName"
-              :show-overflow-tooltip="true"
-            ></el-table-column>
-            <el-table-column label="批次号" prop="batchNo"></el-table-column>
-            <el-table-column
-              label="物料编码"
-              prop="materialCode"
-              :show-overflow-tooltip="true"
-            ></el-table-column>
-            <el-table-column
-              label="发货条码"
-              prop="barcodes"
-              :show-overflow-tooltip="true"
-            ></el-table-column>
-            <el-table-column
-              label="计量数量"
-              prop="measureQuantity"
-            ></el-table-column>
-            <el-table-column
-              label="计量单位"
-              prop="measureUnit"
-            ></el-table-column>
-            <el-table-column label="物料代号" prop="materielDesignation">
-            </el-table-column>
-            <el-table-column label="客户代号" prop="clientCode">
-            </el-table-column>
-            <el-table-column label="刻码" prop="engrave"> </el-table-column>
-            <el-table-column width="100" label="重量" prop="weight">
-            </el-table-column>
-            <el-table-column label="重量单位" prop="weightUnit">
-            </el-table-column>
-            <el-table-column label="质检结果" prop="result" width="120">
-              <template slot-scope="{ row }">
-                <span>{{ qualityResults[row.result] }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="质检状态" prop="status" width="120">
-              <template slot-scope="{ row }">
-                <span>{{ qualityStatus[row.status] }}</span>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
       </div>
     </el-card>
   </div>

+ 899 - 0
src/views/bpm/stockManagement/details1112.vue

@@ -0,0 +1,899 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <div>
+        <div class="content-detail">
+          <header-title title="基本信息" size="16px"></header-title>
+          <div class="mt20">
+            <el-form label-width="120px">
+              <el-col :span="8">
+                <el-form-item label="入库单:">
+                  <span>{{ infoData.bizNo }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库物品类型:">
+                  <span>{{ handleAssetType(extInfo.assetType) }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库场景:">
+                  <span>{{ getSceneState(infoData.bizType) }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="关联订单:">
+                  <span>{{ extInfo.documentSource }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="权属部门:">
+                  <span>{{ extInfo.deptName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库登记人:">
+                  <span>{{ extInfo.createUserName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库时间:">
+                  <span>{{ infoData.createTime }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="状态:">
+                  <span>{{ stepsTitle }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="审核人:">
+                  <span>{{ infoData.verifyName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="客户:">
+                  <span>{{ infoData.clientName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="供应商:">
+                  <span>{{ extInfo.supplierName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="送货人:">
+                  <span>{{ infoData.fromUser }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="送货人联系方式:">
+                  <span>{{ extInfo.deliveryPhone }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="isUpload">
+                <el-form-item
+                  prop="qualityFile"
+                  label="回执附件"
+                  :rules="{
+                    required: true,
+                    trigger: 'blur'
+                  }"
+                >
+                  <fileUpload
+                    v-model="qualityFile"
+                    module="main"
+                    :showLib="false"
+                    :limit="10"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col v-else :span="8">
+                <el-form-item label="附件:">
+                  <el-link
+                    type="primary"
+                    v-for="item in infoData.qualityFile"
+                    @click="download(item)"
+                    :key="item.name"
+                    >{{ item.name }}</el-link
+                  >
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="备注:">
+                  <span>{{ infoData.remark }}</span>
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </div>
+        </div>
+        <div class="content-detail mt20">
+          <header-title title="产品信息" size="16px"></header-title>
+          <el-table
+            ref="productListTable"
+            :data="productList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :header-cell-style="rowClass"
+            border
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              align="center"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              align="center"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 4"
+              label="级别"
+              prop="level"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              label="型号"
+              align="center"
+              prop="categoryModel"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="规格"
+              align="center"
+              prop="specification"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="牌号"
+              align="center"
+              prop="brandNum"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="最小包装单元"
+              align="center"
+              width="120"
+              prop="minPackingQuantity"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
+                  row.packingUnit
+                }}
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              align="center"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.packingQuantity }} {{ row.packingUnit }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              width="100"
+              align="center"
+            >
+              <template slot-scope="{ row, $index }">
+                <template>
+                  {{
+                    $math.format(
+                      row.minPackingQuantity * row.packingQuantity,
+                      14
+                    )
+                  }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column label="计量单位" prop="measureUnit" align="center">
+              <template slot-scope="{ row, $index }">
+                <template>
+                  {{ row.measureUnit }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column label="单价" prop="price" align="center">
+              <template slot-scope="{ row }">
+                <template>
+                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                </template>
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="金额"
+              align="center"
+              prop="contentImage"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.totalMoney ? row.totalMoney : 0 }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 4"
+              label="采购原因"
+              align="center"
+              prop="purpose"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="mt20">
+          <header-title :title="`包装明细`" size="16px"></header-title>
+          <el-table
+            ref="showPackingListTable"
+            :data="showPackingList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :row-class-name="tableRowClassName"
+            :header-cell-style="rowClass"
+            border
+            v-el-table-infinite-scroll="pickingHandleScroll"
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="发货条码"
+              prop="barcodes"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装编码"
+              prop="packageNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="物料代号"
+              prop="materielDesignation"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="客户代号"
+              prop="clientCode"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="刻码"
+              prop="engrave"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="质检结果"
+              prop="result"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                <span>{{ qualityResults[row.result] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="质检状态"
+              prop="status"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                <span>{{ qualityStatus[row.status] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="生产日期"
+              prop="productionDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="采购日期"
+              prop="purchaseDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="mt20">
+          <header-title :title="`物料明细`" size="16px"> </header-title>
+          <el-table
+            ref="multipleTable"
+            :data="showMaterialList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :row-class-name="tableRowClassName"
+            :header-cell-style="rowClass"
+            border
+            style="width: 100%"
+            stripe
+            height="300px"
+            v-el-table-infinite-scroll="materielHandleScroll"
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column label="批次号" prop="batchNo"></el-table-column>
+            <el-table-column
+              label="物料编码"
+              prop="materialCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="发货条码"
+              prop="barcodes"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+            ></el-table-column>
+            <el-table-column label="物料代号" prop="materielDesignation">
+            </el-table-column>
+            <el-table-column label="客户代号" prop="clientCode">
+            </el-table-column>
+            <el-table-column label="刻码" prop="engrave"> </el-table-column>
+            <el-table-column width="100" label="重量" prop="weight">
+            </el-table-column>
+            <el-table-column label="重量单位" prop="weightUnit">
+            </el-table-column>
+            <el-table-column label="质检结果" prop="result" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityResults[row.result] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="质检状态" prop="status" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityStatus[row.status] }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import elTableInfiniteScroll from 'el-table-infinite-scroll';
+  import fileUpload from '@/components/upload/fileUpload';
+  import { getFile } from '@/api/system/file/index.js';
+  import storageApi from '@/api/warehouseManagement';
+  import { allCategoryLevel } from '@/api/classifyManage';
+  import { useDictLabel, sceneState } from '@/utils/dict/index';
+  import { mapGetters, mapActions } from 'vuex';
+  export default {
+    directives: {
+      'el-table-infinite-scroll': elTableInfiniteScroll
+    },
+    components: { fileUpload },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      isUpload: {
+        type: Boolean,
+        default: false
+      },
+      isInterior: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data() {
+      return {
+        newColumns: [], // 动态表头
+        qualityFile: [], // 回执附件
+        qualityStatus: {
+          0: '未质检',
+          1: '已质检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          1: '合格',
+          2: '不合格'
+        }, // 质检结果 1合格 2不合格
+        productList: [], // 产品列表
+        showPackingList: [], // 展示的包装列表
+        packingList: [], // 包装列表
+        showMaterialList: [], // 展示物料列表
+        materialList: [], // 物料列表
+        extInfo: {}, // 扩展信息
+        pageSize: 20,
+        pickingPageNum: 1,
+        materielPageNum: 1,
+        codeList: [],
+        infoData: {},
+        stepsTitle: '已完成',
+        stepsStatus: 'success',
+        active: 0
+      };
+    },
+    watch: {
+      'infoData.verifyStatus': {
+        immediate: true,
+        handler(val) {
+          if (val == 0) {
+            this.active = 1;
+            this.stepsTitle = '未审核';
+            this.stepsStatus = 'wait';
+          } else if (val == 1) {
+            this.active = 2;
+            this.stepsTitle = '审核中';
+            this.stepsStatus = 'process';
+          } else if (val == 2) {
+            this.active = 2;
+            this.stepsTitle = '审核通过';
+            this.stepsStatus = 'success';
+          } else if (val == 3) {
+            this.active = 2;
+            this.stepsTitle = '驳回';
+            this.stepsStatus = 'error';
+          }
+        }
+      }
+    },
+    computed: {
+      ...mapGetters(['getDictValue']),
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
+    created() {
+      console.log('this.businessId----------', this.businessId);
+      this.getFieldModel();
+      this.requestDict('类型用途');
+      this.getAllCategoryType();
+      this._getInfo(this.businessId);
+    },
+    methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
+      //获取回执附件
+      getQualityFile() {
+        return { qualityFile: this.qualityFile, id: this.infoData.id };
+      },
+      pickingHandleScroll() {
+        console.log('---------pickingHandleScroll------------');
+        if (this.showPackingList.length < this.packingList.length) {
+          if (this.packingList.length > this.pageSize) {
+            this.pickingPageNum += 1;
+          }
+          this.pickingFetchData();
+        }
+      },
+      pickingFetchData() {
+        const start = (this.pickingPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showPackingList = this.showPackingList.concat(
+          this.packingList.slice(start, end)
+        );
+      },
+      materielHandleScroll() {
+        console.log('---------materielHandleScroll------------');
+        if (this.showMaterialList.length < this.materialList.length) {
+          if (this.materialList.length > this.pageSize) {
+            this.materielPageNum += 1;
+          }
+          this.materielFetchData();
+        }
+      },
+      materielFetchData() {
+        const start = (this.materielPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showMaterialList = this.showMaterialList.concat(
+          this.materialList.slice(start, end)
+        );
+        console.log(this.showMaterialList);
+      },
+      ...mapActions('dict', ['requestDict']),
+      getSceneState: useDictLabel(sceneState),
+      handleAssetType(r) {
+        const code = this.codeList.find((item) => item.dictCode == r);
+        return code?.dictValue;
+      },
+      tableRowClassName({ row, rowIndex }) {
+        console.log(row);
+        if (row.result == 2) {
+          return 'warning-row';
+        } else {
+          return '';
+        }
+      },
+      rowClass({ row, column, rowIndex, columnIndex }) {
+        if (rowIndex === 1) {
+          return {
+            display: 'none',
+            background: '#EEEEEE'
+          };
+        }
+        return { background: '#0000' };
+      },
+      async getAllCategoryType() {
+        const { data } = await allCategoryLevel();
+        this.codeList = data.map((item) => {
+          return { dictCode: item.id, dictValue: item.name };
+        });
+      },
+      async _getInfo(id) {
+        if (!id) return;
+        let res = null;
+        if (this.isInterior) {
+          res = await storageApi.getInboundDetailsById(id);
+        } else {
+          res = await storageApi.getInfoBySourceBizNo(id);
+        }
+        console.log('===', res);
+        this.infoData = res;
+        this.extInfo = res.extInfo;
+        this.productList = res.outInDetailList.map(
+          (productItem, productIndex) => {
+            return {
+              ...productItem,
+              outInDetailRecordRequestList:
+                productItem.outInDetailRecordRequestList.map((packingItem) => {
+                  return {
+                    ...packingItem,
+                    categoryName: productItem.categoryName,
+                    categoryCode: productItem.categoryCode,
+                    materialDetailList: packingItem.materialDetailList.map(
+                      (materialItem) => {
+                        return {
+                          ...materialItem,
+                          categoryName: productItem.categoryName,
+                          categoryCode: productItem.categoryCode
+                        };
+                      }
+                    )
+                  };
+                })
+            };
+          }
+        );
+        // 获取包装维度数据
+        const arr = [];
+        for (const key in this.productList) {
+          for (const k in this.productList[key].outInDetailRecordRequestList) {
+            arr.push({
+              ...this.productList[key].outInDetailRecordRequestList[k]
+            });
+          }
+        }
+        this.packingList = arr;
+        // 获取物料维度数据
+        let iArr = [];
+        arr.forEach((item) => {
+          item.materialDetailList.forEach((ele) => {
+            iArr.push({ ...ele });
+          });
+        });
+        this.materialList = iArr;
+        console.log(this.packingList);
+        console.log(this.materialList);
+        this.pickingFetchData();
+        this.materielFetchData();
+      },
+      download(row) {
+        if (row.storePath) {
+          getFile({ objectName: row.storePath }, row.name);
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .warning-row {
+    color: red;
+  }
+  ::v-deep .page-title {
+    border-bottom: none;
+  }
+  ::v-deep .page-title-div {
+    width: 100%;
+  }
+  .stepsStatus {
+    width: 40%;
+    margin: 0 auto;
+  }
+  .el-form-item {
+    margin-bottom: 10px;
+  }
+  .p20 {
+    padding: 20px;
+  }
+  .flex {
+    display: flex;
+  }
+  .title {
+    justify-content: space-between;
+    border-bottom: 1px solid #ccc;
+    padding-bottom: 5px;
+    span {
+      font-size: 16px;
+    }
+    .col {
+      padding-left: 40px;
+      font-size: 14px;
+      color: #aaaaaa;
+    }
+  }
+  .degree {
+    margin-right: 10px;
+    padding: 0px 15px;
+    color: #fff;
+    font-size: 13px;
+    line-height: 23px;
+    border-radius: 23px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    span {
+      width: 5px;
+      height: 5px;
+      border-radius: 100%;
+      margin-right: 6px;
+      background-color: #fff;
+    }
+  }
+  .red {
+    background-color: rgb(163, 0, 20);
+  }
+  .blue {
+    background-color: #1989fa;
+  }
+  .createdInfo {
+    justify-content: space-around;
+    margin-top: 10px;
+    font-size: 14px;
+    .col {
+      color: #6e6e6e;
+      padding-right: 10px;
+    }
+  }
+  .mt40 {
+    margin-top: 40px;
+  }
+
+  .custSteps {
+    margin-top: 20px;
+    margin-left: 70px;
+    .box {
+      width: 158px;
+      border: 1px solid #ccc;
+      padding: 10px;
+      flex-direction: row;
+      flex-wrap: wrap;
+      // justify-content: space-between;
+      font-size: 12px;
+      color: #9e9e9e;
+      .x {
+        width: 20px;
+        height: 15px;
+        margin-right: 5px;
+      }
+      .q {
+        background-color: #d0e4d5;
+      }
+      .b {
+        background-color: #1989fa;
+      }
+      .g {
+        background-color: #157a2c;
+      }
+      .r {
+        background-color: #a30014;
+      }
+      .a {
+        align-items: center;
+        margin-bottom: 10px;
+      }
+      .mr10 {
+        margin-right: 10px;
+      }
+      .mb0 {
+        margin-bottom: 0;
+      }
+    }
+    .stepsInfo {
+      // flex: 1;
+      width: 483px;
+    }
+  }
+  .mt20 {
+    margin-top: 20px;
+  }
+  .content-detail {
+    overflow: hidden;
+  }
+  .executor {
+    font-size: 14px;
+    .col {
+      color: #6e6e6e;
+      padding-right: 10px;
+    }
+  }
+  .result {
+    justify-content: space-around;
+  }
+  .mr20 {
+    margin-right: 20px;
+  }
+  .details {
+    font-size: 14px;
+    margin-bottom: 10px;
+  }
+
+  .customSteps {
+    margin-top: 40px;
+    font-size: 14px;
+    margin-left: 80px;
+    .time {
+      font-size: 12px;
+      color: #6e6e6e;
+      margin-right: 20px;
+      position: relative;
+      &::after {
+        content: '';
+        width: 1px;
+        height: 100%;
+        background-color: #157a2c;
+        position: absolute;
+        right: -26px;
+      }
+    }
+    .flex:last-child {
+      .time {
+        &::after {
+          display: none;
+        }
+      }
+    }
+    .round {
+      margin-right: 20px;
+      width: 10px;
+      height: 10px;
+      border-radius: 100%;
+      background-color: #157a2c;
+      position: relative;
+      span {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        width: 4px;
+        height: 4px;
+        background-color: #fff;
+        border-radius: 100%;
+        transform: translate(-2px, -2px);
+      }
+    }
+    .text {
+      .info {
+        margin-top: 10px;
+        width: 955px;
+        background-color: #f0f3f3;
+        overflow: hidden;
+        padding: 10px;
+        margin-bottom: 10px;
+      }
+    }
+  }
+  .switch_left li {
+    border-right: 1px solid rgba(222, 222, 222, 1);
+    border-left: 1px solid rgba(222, 222, 222, 1);
+  }
+</style>

+ 273 - 7
src/views/bpm/stockManagement/quality.vue

@@ -307,21 +307,63 @@
             ></el-table-column>
             <el-table-column
               label="物料代号"
+              width="200"
               prop="materielDesignation"
               :show-overflow-tooltip="true"
             >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('materielDesignation')"
+                  :ref="'packing_materielDesignation' + $index"
+                  @keyup.native="
+                    moveFocus(
+                      $event,
+                      $index,
+                      'packing_materielDesignation',
+                      '包装',
+                      row
+                    )
+                  "
+                  v-model="row.materielDesignation"
+                ></el-input>
+                <span v-else>{{ row.materielDesignation }}</span>
+              </template>
             </el-table-column>
             <el-table-column
               label="客户代号"
               prop="clientCode"
+              width="200"
               :show-overflow-tooltip="true"
             >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('clientCode')"
+                  :ref="'packing_clientCode' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'packing_clientCode', '包装', row)
+                  "
+                  v-model="row.clientCode"
+                ></el-input>
+                <span v-else>{{ row.clientCode }}</span>
+              </template>
             </el-table-column>
             <el-table-column
               label="刻码"
               prop="engrave"
+              width="200"
               :show-overflow-tooltip="true"
             >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('engrave')"
+                  :ref="'packing_engrave' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'packing_engrave', '包装', row)
+                  "
+                  v-model="row.engrave"
+                ></el-input>
+                <span v-else>{{ row.engrave }}</span>
+              </template>
             </el-table-column>
             <el-table-column label="重量" prop="weight" width="100">
               <template slot-scope="{ row, $index }">
@@ -330,9 +372,9 @@
                     row.measureUnit != row.weightUnit &&
                     qualityInspectionItems.includes('weight')
                   "
-                  :ref="'weight' + $index"
+                  :ref="'packing_weight' + $index"
                   @keyup.native="
-                    moveFocus($event, $index, 'weight', '包装', row)
+                    moveFocus($event, $index, 'packing_weight', '包装', row)
                   "
                   v-model.number="row.weight"
                   @input="weightInput($event, row, '包装')"
@@ -434,11 +476,61 @@
               label="计量单位"
               prop="measureUnit"
             ></el-table-column>
-            <el-table-column label="物料代号" prop="materielDesignation">
+            <el-table-column
+              label="物料代号"
+              prop="materielDesignation"
+              width="200"
+            >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('materielDesignation')"
+                  :ref="'material_materielDesignation' + $index"
+                  @keyup.native="
+                    moveFocus(
+                      $event,
+                      $index,
+                      'material_materielDesignation',
+                      '物料',
+                      row
+                    )
+                  "
+                  v-model="row.materielDesignation"
+                ></el-input>
+                <span v-else>{{ row.materielDesignation }}</span>
+              </template>
             </el-table-column>
-            <el-table-column label="客户代号" prop="clientCode">
+            <el-table-column label="客户代号" prop="clientCode" width="200">
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('clientCode')"
+                  :ref="'material_clientCode' + $index"
+                  @keyup.native="
+                    moveFocus(
+                      $event,
+                      $index,
+                      'material_clientCode',
+                      '物料',
+                      row
+                    )
+                  "
+                  v-model="row.clientCode"
+                ></el-input>
+                <span v-else>{{ row.clientCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="刻码" prop="engrave" width="200">
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('engrave')"
+                  :ref="'material_engrave' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'material_engrave', '物料', row)
+                  "
+                  v-model="row.engrave"
+                ></el-input>
+                <span v-else>{{ row.engrave }}</span>
+              </template>
             </el-table-column>
-            <el-table-column label="刻码" prop="engrave"> </el-table-column>
             <el-table-column label="重量" prop="weight" width="100">
               <template slot-scope="{ row, $index }">
                 <el-input
@@ -446,7 +538,10 @@
                     row.measureUnit != row.weightUnit &&
                     qualityInspectionItems.includes('weight')
                   "
-                  :ref="'weight' + $index"
+                  :ref="'material_weight' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'material_weight', '物料', row)
+                  "
                   v-model.number="row.weight"
                   @input="weightInput($event, row, '物料')"
                 ></el-input>
@@ -507,7 +602,9 @@
       },
       qualityInspectionItems: {
         type: Array,
-        default: ['result']
+        default: () => {
+          return ['result'];
+        }
       }
     },
     data() {
@@ -608,6 +705,10 @@
       this.requestDict('类型用途');
       this.getAllCategoryType();
       this._getInfo(this.businessId);
+      console.log(
+        'qualityInspectionItems-----------',
+        this.qualityInspectionItems
+      );
     },
     methods: {
       // 获取动态表头
@@ -964,6 +1065,171 @@
         if (row.storePath) {
           getFile({ objectName: row.storePath }, row.name);
         }
+      },
+      // 键盘移动
+      moveFocus(event, index, key, type, row) {
+        let keyfield = [];
+        let listLength = 0;
+        switch (type) {
+          case '包装':
+            listLength = this.showPackingList.length;
+            if (row.measureUnit != row.weightUnit) {
+              keyfield = [
+                'packing_materielDesignation',
+                'packing_clientCode',
+                'packing_engrave',
+                'packing_weight'
+              ];
+            } else {
+              keyfield = [
+                'packing_materielDesignation',
+                'packing_clientCode',
+                'packing_engrave'
+              ];
+            }
+            break;
+          case '物料':
+            listLength = this.showMaterialList.length;
+            if (row.measureUnit != row.weightUnit) {
+              keyfield = [
+                'material_materielDesignation',
+                'material_clientCode',
+                'material_engrave',
+                'material_weight'
+              ];
+            } else {
+              keyfield = [
+                'material_materielDesignation',
+                'material_clientCode',
+                'material_engrave'
+              ];
+            }
+            break;
+        }
+
+        if (event.keyCode === 13) {
+          // 回车
+          if (
+            index === listLength - 1 &&
+            key === keyfield[keyfield.length - 1]
+          ) {
+            // 最后一行最后一个
+            return;
+          }
+
+          this.$refs[key + index].blur();
+          if (key === keyfield[keyfield.length - 1]) {
+            // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
+            this.$refs[keyfield[0] + (index + 1)].focus();
+          } else {
+            // 跳转下一个
+            const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[nextkeyindex] + index].focus();
+            });
+          }
+        }
+
+        // 向上 =38
+        if (event.keyCode === 38) {
+          console.log('向上');
+          if (index === 0) {
+            // 第一行
+            console.log('第一行无法向上');
+            return;
+          }
+          this.$refs[key + index].blur();
+          this.$nextTick(() => {
+            if (this.$refs[key + (index - 1)].value == 0) {
+              this.$refs[key + (index - 1)].value = '';
+            }
+            this.$refs[key + (index - 1)].focus();
+          });
+        }
+
+        // 下 = 40
+        if (event.keyCode === 40) {
+          console.log('向下');
+          if (index === listLength - 1) {
+            // 最后一行
+            console.log('最后一行无法向下');
+            return;
+          }
+          this.$refs[key + index].blur();
+          this.$nextTick(() => {
+            if (this.$refs[key + (index + 1)].value == 0) {
+              this.$refs[key + (index + 1)].value = '';
+            }
+            this.$refs[key + (index + 1)].focus();
+          });
+        }
+
+        // 左 = 37
+        if (event.keyCode === 37) {
+          console.log('向左');
+          if (index === 0 && key === keyfield[0]) {
+            // 第一行第一个
+            console.log('第一行第一个无法向左');
+            return;
+          }
+          this.$refs[key + index].blur();
+          if (key === keyfield[0]) {
+            if (
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value == 0
+            ) {
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value =
+                '';
+            }
+            // 当前行第一个,跳转上一行最后一个
+            this.$refs[keyfield[keyfield.length - 1] + (index - 1)].focus();
+          } else {
+            // 跳转上一个
+            const prevkeyindex = keyfield.findIndex((k) => k === key) - 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[prevkeyindex] + index].value == 0) {
+                this.$refs[keyfield[prevkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[prevkeyindex] + index].focus();
+            });
+          }
+        }
+
+        // 右 = 39
+        if (event.keyCode === 39) {
+          console.log('向右');
+          if (
+            index === listLength - 1 &&
+            key === keyfield[keyfield.length - 1]
+          ) {
+            // 最后一行最后一个
+            console.log('最后一行最后一个无法向左');
+            return;
+          }
+          console.log(this.$refs);
+          this.$refs[key + index].blur();
+          if (key === keyfield[keyfield.length - 1]) {
+            // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
+            this.$refs[keyfield[0] + (index + 1)].focus();
+          } else {
+            // 跳转下一个
+            const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[nextkeyindex] + index].focus();
+            });
+          }
+        }
       }
     }
   };

+ 112 - 21
src/views/bpm/stockManagement/storage.vue

@@ -48,7 +48,7 @@
             <el-form-item label="单据来源" prop="documentSource">
               <el-input
                 placeholder="请选择"
-                v-model="formData.extInfo.documentSource"
+                v-model="formData.sourceBizNo"
                 @click.native="openDocumentSourceDialog"
               >
                 <el-button
@@ -69,6 +69,16 @@
               />
             </el-form-item>
           </el-col> -->
+          <el-col :span="6">
+            <el-form-item label="入库时间">
+              <el-date-picker
+                v-model="formData.storageTime"
+                type="datetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                placeholder="选择日期时间"
+              >
+              </el-date-picker></el-form-item
+          ></el-col>
           <el-col :span="6">
             <el-form-item label="入库登记人">
               <el-input
@@ -101,7 +111,7 @@
                 v-model="formData.extInfo.deliveryPhone"
                 clearable /></el-form-item
           ></el-col>
-          <el-col :span="12">
+          <el-col :span="6">
             <el-form-item label="备注" prop="remark">
               <el-input
                 v-model="formData.remark"
@@ -892,7 +902,8 @@
       form: { type: Object, default: () => {} },
       bizType: { type: Number, default: 1 },
       sourceBizNo: { type: String, default: '' },
-      detailList: { type: Array, default: () => [] }
+      detailList: { type: Array, default: () => [] },
+      saleProductList: { type: Array, default: () => [] }
     },
     data() {
       return {
@@ -905,6 +916,8 @@
         title: '选择产品',
         goodsLists: [],
         formData: {
+          bizType: '',
+          storageTime: '',
           extInfo: {
             assetType: []
           }
@@ -988,6 +1001,7 @@
       this.getFieldModel();
       this.getListItems();
       this.initFormData();
+      this.getNowFormatDate();
     },
     methods: {
       // 获取动态表头
@@ -1008,7 +1022,7 @@
       async initFormData() {
         this.formData.type = 1;
         this.formData.bizType = this.bizType;
-        this.formData.extInfo.documentSource = this.form.orderNo;
+        // this.formData.extInfo.documentSource = this.form.orderNo;
         this.formData.extInfo.assetType =
           this.form.categoryLevelTopId.split(',');
         console.log('this.form---------------', this.form);
@@ -1016,28 +1030,21 @@
         this.formData.sourceBizNo = this.sourceBizNo;
         this.formData.extInfo.supplierName = this.form.supplierName;
         this.formData.extInfo.supplierId = this.form.supplierId;
-        console.log('this.detailList---------', this.detailList);
-        if (this.detailList?.length > 0) {
-          let codeList = this.detailList.map((item) => {
-            return item.productCode || item.categoryCode;
+        if (this.saleProductList?.length > 0) {
+          let codeList = this.saleProductList.map((item) => {
+            return item.productCode;
           });
-          console.log('codeList-----------', codeList);
           storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
-            console.log(res);
             const batchNo = await getCode('lot_number_code');
             this.productList = res.map((item, index) => {
-              let filtersItem = this.detailList.filter(
-                (detailItem) =>
-                  (detailItem.productCode || detailItem.categoryCode) ==
-                  item.code
+              let filtersItem = this.saleProductList.filter(
+                (detailItem) => detailItem.productCode == item.code
               )[0];
-              console.log('filtersItem--------', filtersItem);
+              console.log('filtersItem---------', filtersItem);
               let warehouseId = filtersItem.warehouseId;
               let warehouseName = filtersItem.warehouseName;
-              let minPackingQuantity =
-                filtersItem.totalCount || filtersItem.packingCount;
-              let measureQuantity =
-                filtersItem.totalCount || filtersItem.packingCount;
+              let minPackingQuantity = filtersItem.totalCount;
+              let measureQuantity = filtersItem.totalCount;
               let packingQuantity = 1;
               let price = filtersItem.singlePrice;
               return {
@@ -1072,6 +1079,75 @@
             });
           });
         }
+        if (this.detailList?.length > 0) {
+          let codeList = this.detailList.map((item) => {
+            return item.productCode || item.categoryCode;
+          });
+          console.log('codeList-----------', codeList);
+          storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
+            console.log(res);
+            const batchNo = await getCode('lot_number_code');
+            let warehouseIds = [];
+            let warehouseNames = [];
+            for (let index = 0; index < this.form.totalCount; index++) {
+              warehouseIds.push(this.form.warehouseId);
+              warehouseNames.push(this.form.warehouseName);
+            }
+            this.productList = res.map((item, index) => {
+              return {
+                index: this.productList.length + index,
+                categoryId: item.id, // 物品id
+                categoryName: item.name, // 物品名称
+                categoryCode: item.code, // 物品编码
+                categoryModel: item.modelType, // 物品型号
+                specification: item.specification, // 规格
+                brandNum: item.brandNum, // 牌号
+                batchNo: batchNo, // 批次号
+                minPackingQuantity: 1, // 最小包装单元数量
+                packingQuantity: this.form.totalCount, // 包装数量
+                packingUnit: item.packingUnit, // 包装单位
+                measureQuantity: this.form.totalCount, // 计量数量
+                measureUnit: item.measuringUnit, // 计量单位
+                netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
+                weight: 0, // 重量
+                weightUnit: item.weightUnit, // 重量单位
+                totalMoney: '', // 总价
+                price: item.price, // 单价
+                purpose: '', // 用途
+                isUnpack: item.isUnpack, // 是否允许拆包
+                warehouseId: this.form.warehouseId, // 仓库id
+                warehouseName: this.form.warehouseName, // 仓库名称
+                warehouseIds,
+                warehouseNames
+              };
+            });
+            console.log('this.productList-----------', this.productList);
+            this.$nextTick(() => {
+              this.listSaveArrs();
+            });
+          });
+        }
+      },
+      // 获取当前时间函数
+      getNowDate() {
+        let date = new Date(),
+          obj = {
+            year: date.getFullYear(), //获取完整的年份(4位)
+            month: date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
+            strDate: date.getDate(), // 获取当前日(1-31)
+            hour: date.getHours(), //获取当前小时(0 ~ 23)
+            minute: date.getMinutes(), //获取当前分钟(0 ~ 59)
+            second: date.getSeconds() //获取当前秒数(0 ~ 59)
+          };
+        Object.keys(obj).forEach((key) => {
+          if (obj[key] < 10) obj[key] = `0${obj[key]}`;
+        });
+        return obj;
+      },
+      // 赋值入库时间
+      getNowFormatDate() {
+        let obj = this.getNowDate();
+        this.formData.storageTime = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
       },
       // 获取物品列表
       async getListItems() {
@@ -1861,6 +1937,18 @@
       // 生成包装
       generateWrappers(row, productIndex, packingCodeList) {
         let packingList = [];
+        let obj = this.getNowDate();
+        let productionDate = '';
+        let purchaseDate = '';
+        if (this.formData.bizType == '1') {
+          // 生产入库
+          productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
+          this.curDateType = 'productionDate';
+        } else if (this.formData.bizType == '2') {
+          // 采购入库
+          purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
+          this.curDateType = 'purchaseDate';
+        }
         for (let index = 0; index < row.packingQuantity; index++) {
           let item = {
             index: row.index + '-' + index, // 包装索引
@@ -1868,6 +1956,9 @@
             warehouseName: row.warehouseNames[index], // 仓库名称
             categoryName: row.categoryName, // 产品名称
             categoryCode: row.categoryCode, // 产品编码
+            categoryModel: row.categoryModel, // 物品型号
+            specification: row.specification, // 规格
+            brandNum: row.brandNum, // 牌号
             parentIndex: row.index, // 产品索引
             batchNo: row.batchNo, // 批次号
             packageNo: packingCodeList[index].onlyCode, // 包装编码
@@ -1884,8 +1975,8 @@
             materielDesignation: '', // 物料代号
             engrave: '', // 刻码
             isUnpack: row.isUnpack, // 是否允许拆包
-            productionDate: '', // 生产日期
-            purchaseDate: '', // 采购时间
+            productionDate: productionDate, // 生产日期
+            purchaseDate: purchaseDate, // 采购时间
             result: 1, // 结果(1合格 2不合格)
             status: 1 // 状态(0=未质检 1已质检)
           };