瀏覽代碼

流程修改

yusheng 2 年之前
父節點
當前提交
682d8ada5c

+ 12 - 12
src/api/bpm/components/saleManage/saleorder.js

@@ -176,17 +176,17 @@ export async function approve(params) {
 
 // 选择工艺路线
 export async function routeList(params) {
-  // const res = await request.get('/main/producerouting/page', { params });
-  // if (res.data.code == 0) {
-  //   return res.data.data;
-  // }
+  const res = await request.get('/main/producerouting/page', { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
 }
 // // // 生产版本列表
-// export async function versionPage(params) {
-//   let par = new URLSearchParams(params);
-//   const res = await request.get(`/main/produceversion/page?` + par);
-//   if (res.data.code == 0) {
-//     return res.data.data;
-//   }
-//   return Promise.reject(new Error(res.data.message));
-// }
+export async function versionPage(params) {
+  let par = new URLSearchParams(params);
+  const res = await request.get(`/main/produceversion/page?` + par);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 1 - 0
src/components/ProductionVersion2/index.vue

@@ -130,6 +130,7 @@
         this.$refs.table.reload({ page: 1, where: where });
       },
       open(index) {
+        
         this.currentNum = index;
         this.visible = true;
       },

+ 2 - 2
src/views/bpm/done/index.vue

@@ -216,8 +216,8 @@
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         return getDoneTaskPage({
-          pageNum: page,
-          size: limit,
+          pageNo: page,
+          pageSize: limit,
           ...this.params
         });
       },

+ 17 - 6
src/views/bpm/handleTask/components/businessOpportunity/submit.vue

@@ -64,7 +64,7 @@
         type="danger"
         size="mini"
         @click="handleAudit(0)"
-        v-if="!['starter','salesmanApprove'].includes(taskDefinitionKey)"
+        v-if="!['starter', 'salesmanApprove'].includes(taskDefinitionKey)"
         >驳回
       </el-button>
 
@@ -145,7 +145,7 @@
       head() {
         this.$refs.headRef.open();
       },
-   
+
       /** 处理转办审批人 */
       handleUpdateAssignee() {
         this.$emit('handleUpdateAssignee');
@@ -156,14 +156,25 @@
       },
 
       async handleAudit(status) {
+        if (this.taskDefinitionKey === 'starter') {
+          let arr = await this.getTableValue();
+          if (!arr) {
+            return;
+          }
+          let data = await UpdateInformation(arr);
+          if (data.code != '0') {
+            return;
+          }
+        }
         //生产主管审批选择技术员
         if (
           this.taskDefinitionKey === 'productionSupervisorApprove1' &&
           status === 1
         ) {
           let data = await this.getTableValue();
-          let userIfon=this.userOptions.find(item=>item.id==this.form.technicianId)
-          console.log(userIfon)
+          let userIfon = this.userOptions.find(
+            (item) => item.id == this.form.technicianId
+          );
           let isProduceDeliveryDeadline = true;
           let arr = data.map((item) => {
             if (!item.produceDeliveryDeadline) {
@@ -188,7 +199,7 @@
           if (!arr) {
             return;
           }
-          
+
           await updateProduct(arr);
         }
         //技术员修改
@@ -204,7 +215,7 @@
               singleWeight: item.singleWeight,
               technicalParams: item.technicalParams,
               technicalAnswerId: item.technicalAnswerId,
-              technicalAnswerName: item.technicalAnswerName,
+              technicalAnswerName: item.technicalAnswerName
             };
           });
           // console.log(arr,'dasdasd')

+ 2 - 2
src/views/bpm/handleTask/components/contractBook/inventoryTable.vue

@@ -18,7 +18,7 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="handlAdd"
-            v-if="!taskDefinitionKey || taskDefinitionKey != 'produceLeader'"
+            v-if="!taskDefinitionKey||(pageName!='businessOpportunity'&&taskDefinitionKey != 'produceLeader')||(pageName=='businessOpportunity'&&['starter','salesmanApprove'].includes(taskDefinitionKey))"
           >
             新增
           </el-button>
@@ -441,7 +441,7 @@
           class="ele-action"
           title="确定要删除吗?"
           @confirm="remove(row)"
-          v-if="taskDefinitionKey != 'produceLeader'"
+          v-if="(pageName!='businessOpportunity'&&taskDefinitionKey != 'produceLeader')||(pageName=='businessOpportunity'&&['starter','salesmanApprove'].includes(taskDefinitionKey))"
         >
           <template v-slot:reference>
             <el-link type="danger" :underline="false" icon="el-icon-delete">

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

@@ -16,7 +16,7 @@
     </div>
     <div v-show="activeComp == 'main'">
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <headerTitle title="货信息"></headerTitle>
+        <headerTitle title="货信息"></headerTitle>
         <el-row>
           <el-col :span="12">
             <el-form-item
@@ -146,7 +146,7 @@
     </div>
     <detailDialog
       v-if="activeComp == 'inoutBoundView'"
-      :businessId="form.orderNo"
+      :businessId="form.receiveNo"
       type="sourceBizNo"
       ref="detailDialog"
       :taskDefinitionKey=taskDefinitionKey

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

@@ -172,7 +172,7 @@
       if (this.taskDefinitionKey == 'storeManagerApprove') {
         let data = await getReceiveSaleOrderrecordDetail(this.businessId);
         try {
-          this.outInData = await getOutInBySourceBizNo(data.orderNo);
+          this.outInData = await getOutInBySourceBizNo(data.receiveNo);
         } catch (error) {}
       }
     },

+ 1 - 0
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/addReturnGoodsDialog.vue

@@ -94,6 +94,7 @@
       ref="sendListDialogRef"
       @changeParent="changeOrder"
     ></sendListDialog>
+   
   </div>
 </template>
 

+ 32 - 4
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/submit.vue

@@ -19,13 +19,26 @@
       </el-form-item>
     </el-form>
     <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
-      <el-button
+    <el-button
         icon="el-icon-edit-outline"
         type="success"
         size="mini"
+        v-if="taskDefinitionKey != 'storemanApprove'||(taskDefinitionKey == 'storemanApprove'&&outInData.verifyStatus==2)"
         @click="handleAudit(1)"
+        
         >通过
       </el-button>
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="storemanApprove"
+        v-if="
+          ['storemanApprove'].includes(taskDefinitionKey) &&
+          activeComp == 'outBound'&&[0,3].includes(outInData.verifyStatus)
+        "
+        >申请出库
+      </el-button>
       <el-button
         icon="el-icon-circle-close"
         type="danger"
@@ -68,6 +81,8 @@
     uploadReceipt
   } from '@/api/bpm/components/purchasingManage/returnGoods';
   import { approveTaskWithVariables } from '@/api/bpm/task';
+  import { getReturnSaleOrderrecordDetail } from '@/api/bpm/components/purchasingManage/returnGoods';
+  import { getOutInBySourceBizNo } from '@/api/classifyManage';
 
   // 流程实例的详情页,可用于审批
   export default {
@@ -98,13 +113,26 @@
           technicianId: '',
           reason: ''
         },
-        activeComp:""
+        activeComp: '',
+        outInData: {
+          verifyStatus: ''
+        }
       };
     },
-    created() {
-   
+    async created() {
+      if (this.taskDefinitionKey == 'storemanApprove') {
+        let data = await getReturnSaleOrderrecordDetail(this.businessId);
+        try {
+          this.outInData = await getOutInBySourceBizNo(data.returnNo);
+        } catch (error) {
+          this.outInData.verifyStatus = 0;
+        }
+      }
     },
     methods: {
+      async storemanApprove() {
+        this.$emit('submit');
+      },
       /** 处理转办审批人 */
       handleUpdateAssignee() {
         this.$emit('handleUpdateAssignee');

+ 8 - 1
src/views/bpm/handleTask/components/purchasePlanManage/submit.vue

@@ -153,7 +153,14 @@
             userName: userInfo.name,
             id: this.taskId,
             reason: this.form.reason,
-            businessId:this.businessId
+            businessId: this.businessId
+          });
+          approveTaskWithVariables({
+            id: this.taskId,
+            reason: this.form.reason,
+            variables:{
+              pass:!!status
+            }
           });
           this.$emit('handleAudit', {
             status,

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

@@ -164,7 +164,7 @@
       @changeParent="changeOrder"
     ></orderListDialog>
     </div>
-    <detailDialog type="sourceBizNo" :businessId="form.orderNo" v-if="activeComp == 'outBound'"></detailDialog>
+    <detailDialog type="sourceBizNo" :businessId="form.docNo" v-if="activeComp == 'outBound'"></detailDialog>
   </div>
 </template>
 

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

@@ -368,10 +368,15 @@
       },
       taskDefinitionKey: {}
     },
-    created() {
-      this.getDetailData(this.businessId);
+    async created() {
+      await this.getDetailData(this.businessId);
       if (this.taskDefinitionKey == 'storemanApprove') {
         this.tabOptions.push({ key: 'outBound', name: '出库单' });
+        this.activeComp = 'outBound';
+        this.$emit('activeCompChange','outBound');
+        this.$nextTick(() => {
+          this.$refs.add.eomSuccess(this.form);
+        });
       }
     },
     methods: {

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

@@ -23,7 +23,7 @@
         icon="el-icon-edit-outline"
         type="success"
         size="mini"
-        v-if="outInData.verifyStatus==2"
+        v-if="taskDefinitionKey != 'storemanApprove'||(taskDefinitionKey == 'storemanApprove'&&outInData.verifyStatus==2)"
         @click="handleAudit(1)"
         
         >通过
@@ -114,7 +114,7 @@
           technicianId: '',
           reason: ''
         },
-        outInData:{verifyStatus:2},
+        outInData:{verifyStatus:''},
         activeComp: '',
       };
     },
@@ -122,11 +122,13 @@
       if (this.taskDefinitionKey == 'storemanApprove') {
         let data = await getSendSaleOrderrecordDetail(this.businessId);
         try {
-          this.outInData = await getOutInBySourceBizNo(data.orderNo)
+          this.outInData = await getOutInBySourceBizNo(data.docNo)
         } catch (error) {
           this.outInData.verifyStatus=0
         }
       }
+      console.log('taskDefinitionKey',this.taskDefinitionKey)
+      console.log('outInData',this.outInData)
     },
     methods: {
       async storemanApprove() {

+ 2 - 2
src/views/bpm/outgoingManagement/add.vue

@@ -905,7 +905,7 @@
                 this.$message.success('保存成功!');
                 this.$emit('success');
               }
-              this.$router.push('/warehouseManagement/outgoingManagement');
+              // this.$router.push('/warehouseManagement/outgoingManagement');
               if (res?.success) {
                 this.$message.success('保存成功!');
                 this.$router.go(-1);
@@ -935,7 +935,7 @@
         this.isTask = true;
         this.$refs.trees.valueTitle = '产品';
         this.title = '产品';
-        this.formData.sourceBizNo = row.orderNo;
+        this.formData.sourceBizNo = row.docNo||row.returnNo;
         this.formData.sid = row.id;
         this.formData.fromId = row.id;
         this.formData.clientName = row.contactName;

+ 19 - 9
src/views/bpm/stockManagement/add.vue

@@ -335,7 +335,9 @@
 
       <div class="material">
         <header-title title="产品信息">
-          <el-button type="primary" @click="addStock">添加</el-button>
+          <el-button type="primary" @click="addStock" v-if="!isTask"
+            >添加</el-button
+          >
         </header-title>
 
         <div class="mt10 form-table">
@@ -760,7 +762,10 @@
                     @click="chooseAssets(row, $index)"
                     >选择资产编号</el-button
                   >
-                  <el-button type="text" @click="listDel(row, $index)"
+                  <el-button
+                    type="text"
+                    @click="listDel(row, $index)"
+                    v-if="!isTask"
                     >删除</el-button
                   >
                 </template>
@@ -1098,7 +1103,11 @@
         </div>
       </div>
       <div class="center mt20">
-        <el-button type="primary" v-if="!isTask" @click="handleSave" :loading="saveLoading"
+        <el-button
+          type="primary"
+          v-if="!isTask"
+          @click="handleSave"
+          :loading="saveLoading"
           >保存</el-button
         >
         <el-button @click="$router.go(-1)" v-if="!isTask">返回</el-button>
@@ -1387,12 +1396,12 @@
       },
       async pickerSuccess(row) {
         this.formData.bizType = '2';
-        this.codeListValue(row.categoryLevelTopId)
+        this.codeListValue(row.categoryLevelTopId);
         this.isTask = true;
         this.pickerRow = row;
         this.formData.extInfo.documentSource = row.orderNo;
-        this.formData.sourceBizNo=row.orderNo;
-        this.formData.fromId=row.id;
+        this.formData.sourceBizNo = row.receiveNo;
+        this.formData.fromId = row.id;
         this.formData.clientName = row.partaName;
         this.formData.clientCode = row.partaId;
         this.formData.extInfo.supplierName = row.supplierName;
@@ -1424,10 +1433,10 @@
         this.$refs.pickerRef.open();
       },
       codeListValue(val) {
-        this.formData.extInfo.assetType = val.id||val;
+        this.formData.extInfo.assetType = val.id || val;
         this.$forceUpdate();
         this.title = val?.name;
-        this.selectEquiType = val?.id||val;
+        this.selectEquiType = val?.id || val;
       },
       //计算生产设备重量
       deviceWeight(row, num) {
@@ -1934,10 +1943,12 @@
             this.formatWarehouseMaterialList();
 
             let arr = this.warehousingMaterialList.map((item) => {
+              console.log(item,'item')
               return {
                 netWeight: item.netWeight,
                 num: item.num,
                 batchNo: item.batchNo,
+                code:item.productCode,
                 categoryId:
                   this.formData.bizType == 2
                     ? item.categoryId
@@ -1961,7 +1972,6 @@
                 weight: item.weight
               };
             });
-
             arr.forEach((item) => {
               if (item.outInDetailRecordAddPOList.length > 0) {
                 let list = item.outInDetailRecordAddPOList.map((it) => {