yusheng пре 2 година
родитељ
комит
bb4201b690

+ 8 - 0
src/api/classifyManage/index.js

@@ -105,3 +105,11 @@ export async function uploadQualityFile(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+// 根据code查询detail
+export async function getDetailByCode(data) {
+  const res = await request.post(`wms/outin/getDetailByCode`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

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

@@ -75,7 +75,7 @@
         @click="handleAudit(0)"
         v-if="
           !['starter'].includes(taskDefinitionKey) &&
-          [0, 3].includes(outInData.verifyStatus)
+          ![1,2].includes(outInData.verifyStatus)
         "
         >驳回
       </el-button>

+ 4 - 2
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -366,7 +366,7 @@
       businessId: {
         default: ''
       },
-      taskDefinitionKey:{}
+      taskDefinitionKey: {}
     },
     created() {
       this.getDetailData(this.businessId);
@@ -387,8 +387,10 @@
           });
         }
       },
+      save() {
+        this.$refs.add.handleNewSave();
+      },
       success() {
-      
         this.$emit('handleClose');
       },
       cancel() {

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

@@ -36,7 +36,7 @@
           ['storemanApprove'].includes(taskDefinitionKey) &&
           activeComp == 'outBound'
         "
-        >申请
+        >申请
       </el-button>
       <el-button
         icon="el-icon-circle-close"
@@ -79,7 +79,7 @@
 <script>
   import {
     UpdateSendInformation,
-    getSendSaleOrderrecordDetail
+    getSendSaleOrderrecordDetail,getWarehouseListByIds
   } from '@/api/bpm/components/saleManage/saleorder';
   import { approveTaskWithVariables } from '@/api/bpm/task';
   import { getOutInBySourceBizNo } from '@/api/classifyManage';

+ 21 - 13
src/views/bpm/outgoingManagement/add.vue

@@ -21,7 +21,9 @@
                 clearable
                 @change="handleBizSceneChange"
                 :disabled="
-                  !!(warehousingMaterialList && warehousingMaterialList.length)
+                  !!(
+                    warehousingMaterialList && warehousingMaterialList.length
+                  ) || isTask
                 "
               >
                 <el-option
@@ -133,12 +135,15 @@
                 ref="trees"
                 class="form-ipt"
                 :isBindPlan="
-                  !!(warehousingMaterialList && warehousingMaterialList.length)
+                  !!(
+                    warehousingMaterialList && warehousingMaterialList.length
+                  ) || isTask
                 "
                 size="medium"
                 style="width: 100%"
                 clearable
                 :options="codeList"
+                :value="formData.extInfo.assetType"
                 :props="{
                   value: 'id',
                   label: 'name',
@@ -321,8 +326,10 @@
       </el-form>
 
       <div class="material">
-        <div style="width: 100%; text-align: right" v-if="!isTask"
-          ><el-button type="primary" @click="addStock">添加</el-button></div
+        <div style="width: 100%; text-align: right"
+          ><el-button type="primary" @click="addStock" v-if="!isTask"
+            >添加</el-button
+          ></div
         >
         <div v-if="dimension != 4">
           <div class="flex">
@@ -796,8 +803,8 @@
             return {
               ...item,
               packingCountBase:
-                dimension == 4 || dimension == 3 ? 1 : item.packingCountBase,
-              weight: 0
+              dimension == 4 || dimension == 3 ? 1 : item.packingCountBase,
+              // weight: 0
             };
           });
           //物料维度数据
@@ -843,7 +850,7 @@
             return {
               ...item,
               packingCountBase: dimension == 3 ? 1 : item.packingCountBase,
-              weight: 0
+              // weight: 0
             };
           });
           //物料维度数据
@@ -871,7 +878,7 @@
           });
         }
       },
-      handleNewSave() {
+      handleNewSave(type) {
         this.$refs.formName.validate(async (valid) => {
           if (valid) {
             if (!this.warehousingMaterialList?.length) {
@@ -894,8 +901,9 @@
             try {
               const res = await outin.saveNew(obj);
               if (res.code == 0) {
-                await await outin.outApprove({ outInId: res.data });
+                await outin.outApprove({ outInId: res.data });
                 this.$message.success('保存成功!');
+                this.$emit('success');
               }
               this.$router.push('/warehouseManagement/outgoingManagement');
               if (res?.success) {
@@ -909,9 +917,6 @@
           }
         });
       },
-      save() {
-        this.handleNewSave();
-      },
 
       onClear() {
         this.formData.sourceBizNo = '';
@@ -925,7 +930,7 @@
       },
       eomSuccess(row) {
         console.log(row);
-        this.formData.extInfo.assetType = 9;
+        this.formData.extInfo.assetType = '9';
         this.formData.bizType = '3';
         this.isTask = true;
         this.$refs.trees.valueTitle = '产品';
@@ -937,6 +942,9 @@
         this.formData.clientUser = row.linkName;
         this.formData.clientPhone = row.linkPhone;
         this.onSelectTableData(row.tableData || row.productList, 1);
+        if (row.productList.length > 0) {
+          this.$refs.assetsDialogRef.confirm(row.productList, '3');
+        }
         this.$forceUpdate();
       },
       pickOrderRow(row) {

+ 34 - 3
src/views/bpm/outgoingManagement/components/AssetsDialog.vue

@@ -261,7 +261,7 @@
     </el-container>
 
     <div slot="footer">
-      <el-button type="primary" @click="confirm">确定</el-button>
+      <el-button type="primary" @click="confirm()">确定</el-button>
       <el-button @click="cancel">关闭</el-button>
     </div>
   </el-dialog>
@@ -276,7 +276,11 @@
   import outin from '@/api/warehouseManagement/outin';
   import { login } from '@/api/login';
   import { getWarehouseList } from '@/api/classifyManage/itemInformation';
-  import { getBatchDetails, getDetailById } from '@/api/classifyManage';
+  import {
+    getBatchDetails,
+    getDetailById,
+    getDetailByCode
+  } from '@/api/classifyManage';
   export default {
     components: { AssetTree },
     props: {
@@ -358,6 +362,7 @@
               assetCode: item.code
             };
           });
+          return this.tableData;
         } else if (e == 4) {
           res = await outin.getMaterielDetails(params);
           this.tableData = res.list.map((item, index) => {
@@ -436,7 +441,33 @@
         const data = await getDetailById(parmas);
         return data;
       },
-      async confirm() {
+      async getSelectionList(list) {
+        let ajax = [];
+        let arr = [];
+        list.forEach((item) => {
+          this.searchForm.code = item.productCode;
+          ajax.push(this.changeDimension(this.dimension));
+        });
+        (await Promise.all(ajax)).forEach((item) => {
+          arr.push(...item);
+        });
+        return arr;
+      },
+      async confirm(list, dimension) {
+        if (dimension) {
+          const data = await getDetailByCode(
+            list.map((item) => {
+              return {
+                categoryLevelId: item.productCategoryId,
+                code: item.productCode,
+                count: item.totalCount
+              };
+            })
+          );
+          this.$emit('detailData', { ...data, wlList: [] }, dimension);
+          this.visible = false;
+          return;
+        }
         if (!this.selectionList.length) {
           this.$message.error('请至少选择一条数据!');
           return;