huang_an 2 年之前
父节点
当前提交
1e9b854dae

+ 3 - 0
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -932,6 +932,7 @@
                 minPackingCount: item.selfSum,
                 packingCount: item.outInNum,
                 outInDetailRecordAddPOList: item.warehouseLedgerDetails,
+
                 ...item
                 // position: `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`,
                 // // pathIds: item.categoryLevelPathId.toString(),
@@ -942,6 +943,8 @@
               };
             });
             arr.forEach((item) => {
+              item.warehouseId =
+                item.warehouseLedgerDetails[0].pathIds.split(',')[0];
               delete item.id;
               delete item.warehouseLedgerDetails;
               if (item.outInDetailRecordAddPOList.length > 0) {

+ 37 - 13
src/views/warehouseManagement/outgoingManagement/index.vue

@@ -121,9 +121,9 @@
         </template>
 
         <!-- 领料人 -->
-        <template v-slot:deliveryName="{ row }">
+        <template v-slot:createUserName="{ row }">
           <div class="deviceName">
-            <p class="n-p">{{ getUserName(row.fromUser) }}</p>
+            <p class="n-p">{{ row.createUserName }}</p>
             <!-- <p class="col">出库:{{ row.createTime }}</p> -->
           </div>
         </template>
@@ -133,6 +133,15 @@
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
+          <el-link
+            type="success"
+            :underline="false"
+            icon="el-icon-position"
+            v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
+            @click="submit(row)"
+          >
+            提交
+          </el-link>
           <el-link
             type="primary"
             :underline="false"
@@ -200,14 +209,14 @@
             showOverflowTooltip: true,
             width: 150
           },
-          {
-            prop: 'verifyStatus',
-            label: '状态',
-            align: 'center',
-            slot: 'verifyStatus',
-            showOverflowTooltip: true,
-            width: 120
-          },
+          // {
+          //   prop: 'verifyStatus',
+          //   label: '状态',
+          //   align: 'center',
+          //   slot: 'verifyStatus',
+          //   showOverflowTooltip: true,
+          //   width: 120
+          // },
 
           {
             prop: 'sourceBizNo',
@@ -224,10 +233,10 @@
             width: 120
           },
           {
-            prop: 'deliveryName',
+            prop: 'createUserName',
             label: '领料人',
             align: 'center',
-            slot: 'deliveryName',
+            slot: 'createUserName',
             showOverflowTooltip: true,
             width: 200
           },
@@ -241,7 +250,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 100,
+            width: 200,
             align: 'center',
             slot: 'action',
             showOverflowTooltip: true
@@ -253,6 +262,21 @@
       this.getUser();
     },
     methods: {
+      submit(row) {
+        this.$confirm('此操作将提交流程, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(async () => {
+            const data = await outin.outinApprove({ outInId: row.id });
+            if (data) {
+              this.$message.success('流程发起成功!');
+              this.getList();
+            }
+          })
+          .catch(() => {});
+      },
       handleBizType(code) {
         for (const key in this.outputSceneState) {
           if (this.outputSceneState[key].code == code) {