Jelajahi Sumber

fix:5187【生产入库审批】从业务流程走的生产入库,产品信息编辑 添加 删除等功能需隐藏掉,只能给驳回操作

mlchen 2 minggu lalu
induk
melakukan
6e314db60b

+ 4 - 0
src/views/bpm/handleTask/components/productionWarehousing/detailDialog.vue

@@ -73,6 +73,7 @@
         :sourceBizNo="form.code"
         :detailList="form.detailList"
         :isMoreProduct="form.type == 3 ? true : false"
+        :isTask="true"
       ></newAdd>
       <newAdd
         ref="add"
@@ -81,6 +82,7 @@
         v-if="form.code && isDetail && clientEnvironmentId != 9"
         :sourceBizNo="form.code"
         :saleProductList="form.detailList"
+        :isTask="true"
       ></newAdd>
 
       <add
@@ -91,6 +93,7 @@
         :sourceBizNo="form.code"
         :detailList="form.detailList"
         :isMoreProduct="form.type == 3 ? true : false"
+        :isTask="true"
       ></add>
       <add
         ref="add"
@@ -99,6 +102,7 @@
         v-if="form.code && isDetail && clientEnvironmentId == 9"
         :sourceBizNo="form.code"
         :saleProductList="form.detailList"
+        :isTask="true"
       ></add>
     </keep-alive>
   </div>

+ 14 - 6
src/views/bpm/handleTask/components/productionWarehousing/storage.vue

@@ -136,7 +136,7 @@
       </el-form>
       <div class="inbound_details">
         <header-title title="产品信息">
-          <el-button type="primary" @click="addProduct">添加</el-button>
+          <el-button v-if="!isTask" type="primary" @click="addProduct">添加</el-button>
         </header-title>
         <div class="form_table">
           <el-form
@@ -146,7 +146,7 @@
           >
             <div style="text-align: right;margin-bottom: 10px;">
               <el-button
-                v-if="productList.length != 0"
+                v-if="productList.length != 0 && !isTask"
                 type="success"
                 plain
                 size="mini"
@@ -154,7 +154,7 @@
                 >批量保存</el-button
               >
               <el-button
-                v-if="productList.length != 0 && this.packingList.length == 0"
+                v-if="productList.length != 0 && this.packingList.length == 0 && !isTask"
                 type="success"
                 plain
                 size="mini"
@@ -343,7 +343,9 @@
 
               <!-- 仓库 -->
               <template v-slot:warehouseName="{ row, $index }">
+                <span v-if="isTask">{{ row.warehouseName }}</span>
                 <el-form-item
+                  v-else
                   :prop="'productList.' + $index + '.warehouseId'"
                   :rules="{
                     required: true,
@@ -437,7 +439,9 @@
 
               <!-- 颜色 -->
               <template v-slot:colorKey="{ row, $index }">
+                <span v-if="isTask">{{ row.colorKey }}</span>
                 <DictSelection
+                  v-else
                   dictName="物品颜色"
                   clearable
                   v-model="row.colorKey"
@@ -451,7 +455,9 @@
 
               <!-- 机型 -->
               <template v-slot:modelKey="{ row, $index }">
+                <span v-if="isTask">{{ row.modelKey }}</span>
                 <DictSelection
+                  v-else
                   dictName="物品机型"
                   clearable
                   v-model="row.modelKey"
@@ -488,7 +494,7 @@
       </div>
       <div v-if="showPackingList.length > 0" class="inbound_details">
         <header-title :title="`包装明细`">
-          <div class="switch_right">
+          <div class="switch_right" v-if="!isTask">
             <el-button
               style="margin-left: 20px"
               type="text"
@@ -1006,7 +1012,8 @@
       detailProductList: { type: Array, default: () => [] },
       isMoreProduct: { type: Boolean, default: false }, //多产品包装明细
       processInstance: { type: Object, default: () => {} },
-      isShowPackage: { type: Boolean, default: false } //售后退货单仓管审批显示
+      isShowPackage: { type: Boolean, default: false }, //售后退货单仓管审批显示
+      isTask: { type: Boolean, default: false }
     },
     data() {
       return {
@@ -1170,7 +1177,7 @@
           // 失效日期
           { label: '失效日期', prop: 'detailExpireDate', slot: 'detailExpireDate', align: 'center', width: 220 },
           // 操作
-          { label: '操作', columnKey: 'action', slot: 'action', width: 140, align: 'center', fixed: 'right' }
+          { label: '操作', columnKey: 'action', slot: 'action', width: 140, align: 'center', fixed: 'right', show: !this.isTask }
         ].filter(col => col.show !== false);
       }
     },
@@ -1746,6 +1753,7 @@
 
               return {
                 index: this.productList.length + index,
+                isSave: this.isTask || undefined,
                 categoryId: item.id, // 物品id
                 categoryName: item.name, // 物品名称
                 categoryCode: item.code, // 物品编码

+ 0 - 55
src/views/bpm/handleTask/components/productionWarehousing/submit.vue

@@ -18,14 +18,6 @@
       </el-form-item>
     </el-form>
     <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
-      <el-button
-        icon="el-icon-edit-outline"
-        type="success"
-        size="mini"
-        v-click-once
-        @click="storeManagerApprove"
-        >申请入库
-      </el-button>
       <el-button
         icon="el-icon-circle-close"
         type="danger"
@@ -39,8 +31,6 @@
 </template>
 
 <script>
-  import { approveTaskWithVariablesOther } from '@/api/bpm/task';
-  import outin from '@/api/warehouseManagement/outin';
   import storageApi from '@/api/warehouseManagement';
   export default {
     name: '',
@@ -60,7 +50,6 @@
     },
     data() {
       return {
-        isSaveLoading: false,
         form: {
           reason: '同意'
         },
@@ -71,50 +60,6 @@
       console.log('taskDefinitionKey-------------', this.taskDefinitionKey);
     },
     methods: {
-      async storeManagerApprove() {
-        let res = await this.getTableValue();
-        let storageData = res.returnStorageData;
-        if (!storageData) {
-          return;
-        }
-        console.log('我需要的~~~~~~~~~~~~~~~~', res);
-        // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
-        storageData.isSkip = 1;
-        storageData.workOrderCode = res.form.workOrderCode;
-        console.log('storageData~~~~~~~~~~~~~~~~', storageData);
-        // return;
-        // 验证outInDetailList中是否存在数量为空的情况
-        // if (storageData.outInDetailList && storageData.outInDetailList.some(item => item.number ==undefined || item.number == '' || item.number == null)) {
-        //   this.$message.error('计量数量不为空');
-        //   return;
-        // }
-
-        try {
-          this.isSaveLoading = true;
-          let res = await storageApi.storage(storageData);
-
-          approveTaskWithVariablesOther({
-            id: this.taskId,
-            reason: this.form.reason,
-            outInId: res.data[0],
-            businessId: this.businessId,
-            variables: {
-              pass: true
-            }
-          }).then((res) => {
-            if (res.code != '-1') {
-              this.$emit('handleAudit', {
-                status: 1,
-                title: '入库'
-              });
-            }
-            this.isSaveLoading = false;
-          });
-        } catch (error) {
-          this.isSaveLoading = false;
-          this.$message.error('保存失败');
-        }
-      },
       async handleAudit(status) {
         let variables = {
           pass: !!status

+ 15 - 6
src/views/bpm/stockManagement/storage.vue

@@ -136,7 +136,7 @@
       </el-form>
       <div class="inbound_details">
         <header-title title="产品信息">
-          <el-button type="primary" @click="addProduct">添加</el-button>
+          <el-button v-if="!isTask" type="primary" @click="addProduct">添加</el-button>
         </header-title>
         <div class="form_table">
           <el-form
@@ -146,7 +146,7 @@
           >
             <div style="text-align: right; margin-bottom: 10px">
               <el-button
-                v-if="productList.length != 0"
+                v-if="productList.length != 0 && !isTask"
                 type="success"
                 plain
                 size="mini"
@@ -154,7 +154,7 @@
                 >批量保存</el-button
               >
               <el-button
-                v-if="productList.length != 0 && this.packingList.length == 0"
+                v-if="productList.length != 0 && this.packingList.length == 0 && !isTask"
                 type="success"
                 plain
                 size="mini"
@@ -343,7 +343,9 @@
 
               <!-- 仓库 -->
               <template v-slot:warehouseName="{ row, $index }">
+                <span v-if="isTask">{{ row.warehouseName }}</span>
                 <el-form-item
+                  v-else
                   :prop="'productList.' + $index + '.warehouseId'"
                   :rules="{
                     required: true,
@@ -435,7 +437,9 @@
 
               <!-- 颜色 -->
               <template v-slot:colorKey="{ row, $index }">
+                <span v-if="isTask">{{ row.colorKey }}</span>
                 <DictSelection
+                  v-else
                   dictName="物品颜色"
                   clearable
                   v-model="row.colorKey"
@@ -449,7 +453,9 @@
 
               <!-- 机型 -->
               <template v-slot:modelKey="{ row, $index }">
+                <span v-if="isTask">{{ row.modelKey }}</span>
                 <DictSelection
+                  v-else
                   dictName="物品机型"
                   clearable
                   v-model="row.modelKey"
@@ -485,7 +491,7 @@
       </div>
       <div v-if="showPackingList.length > 0" class="inbound_details">
         <header-title :title="`包装明细`">
-          <div class="switch_right">
+          <div class="switch_right" v-if="!isTask">
             <el-button
               style="margin-left: 20px"
               type="text"
@@ -1009,7 +1015,8 @@
       detailProductList: { type: Array, default: () => [] },
       isMoreProduct: { type: Boolean, default: false }, //多产品包装明细
       processInstance: { type: Object, default: () => {} },
-      isShowPackage: { type: Boolean, default: false } //售后退货单仓管审批显示
+      isShowPackage: { type: Boolean, default: false }, //售后退货单仓管审批显示
+      isTask: { type: Boolean, default: false }
     },
     data() {
       return {
@@ -1365,7 +1372,8 @@
             slot: 'action',
             width: 140,
             align: 'center',
-            fixed: 'right'
+            fixed: 'right',
+            show: !this.isTask
           }
         ].filter((col) => col.show !== false);
       }
@@ -1841,6 +1849,7 @@
 
                 return {
                   index: this.productList.length + index,
+                  isSave: this.isTask || undefined,
                   purchaseReceiveProductId:
                     filtersItem.purchaseReceiveProductId,
                   categoryId: item.id, // 物品id