Przeglądaj źródła

修复嘉实bom审批没有基本数量和单位

695593266@qq.com 10 miesięcy temu
rodzic
commit
518850be63

+ 13 - 15
src/api/bpm/components/bomApprover/index.js

@@ -1,6 +1,5 @@
 import request from '@/utils/request';
 
-
 // 供应商列表
 export async function contactList(params) {
   const res = await request.get(`/eom/contact/page`, { params });
@@ -10,19 +9,17 @@ export async function contactList(params) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
 // 获取产品BOM列表
 export async function getBomPageCategoryId(params) {
-  const res = await request.get(`/main/bomCategory/pageByCategoryId`, { params });
+  const res = await request.get(`/main/bomCategory/pageByCategoryId`, {
+    params
+  });
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // 不通过任务,关闭流程
 
 export async function notPass(data) {
@@ -33,9 +30,15 @@ export async function notPass(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
+// 查询BOM树 详情
+export async function getBomGetById(id) {
+  const res = await request.get(`/main/bomCategory/getById/${id}`);
+  if (res.data.code == 0) {
+    console.log(res.data, '+++++++++++++++++++++++');
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 
 // 嘉实医药不通过任务,关闭流程
 
@@ -57,17 +60,12 @@ export async function deviceNotPass(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
 // 批量修改
 
-export async function batchUpdate (data) {
+export async function batchUpdate(data) {
   const res = await request.post('/main/bomCategory/batchUpdate', data);
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
-
-
-

+ 17 - 8
src/views/bpm/handleTask/components/bomApproverJSYY/detailDialog.vue

@@ -15,7 +15,6 @@
       <template v-slot:toolbar>
         <div class="toolbar_box">
           <div>
-          
             <div v-if="taskDefinitionKey == 'Activity_0uypakw'">
               <el-input
                 size="mini"
@@ -28,7 +27,7 @@
                 type="primary"
                 style="margin-left: 20px"
                 @click="handMaterPL"
-                >批量</el-button
+                >批量111</el-button
               >
             </div>
 
@@ -58,16 +57,16 @@
                 type="primary"
                 style="margin-left: 20px"
                 @click="handMaterPL2"
-                >批量</el-button
+                >批量222</el-button
               >
             </div>
           </div>
 
           <div
             ><span>基本数量</span>
-            <el-input placeholder="请输入" v-model.number="baseCount">
+            <el-input placeholder="请输入" v-model.number="baseCount" disabled>
             </el-input>
-            <DictSelection dictName="计量单位" v-model="unit"
+            <DictSelection dictName="计量单位" v-model="unit" disabled
           /></div>
         </div>
       </template>
@@ -86,7 +85,7 @@
           "
         >
           <el-option
-            v-for="(item,index) in gysList"
+            v-for="(item, index) in gysList"
             :key="item.id + index"
             :value="item.id"
             :label="item.name"
@@ -110,7 +109,8 @@
   import BOMSearch from './BOM-search.vue';
   import {
     getBomPageCategoryId,
-    contactList
+    contactList,
+    getBomGetById
   } from '@/api/bpm/components/bomApprover';
 
   export default {
@@ -179,7 +179,6 @@
             showOverflowTooltip: true
           },
 
-          
           {
             prop: 'dosage',
             label: '用量',
@@ -237,6 +236,7 @@
     },
     created() {
       this.getContactList();
+      this.handBomDetails(this.businessId);
     },
     methods: {
       /* 表格数据源 */
@@ -254,6 +254,15 @@
         this.$refs.table.reload({ where });
       },
 
+      handBomDetails(id) {
+        if (id) {
+          getBomGetById(id).then((res) => {
+            this.baseCount = res.baseCount;
+            this.unit = res.category.measuringUnit;
+          });
+        }
+      },
+
       getContactList() {
         let param = {
           pageNum: 1,

+ 19 - 9
src/views/bpm/handleTask/components/bomApproverJSdevice/detailDialog.vue

@@ -64,9 +64,9 @@
 
           <div
             ><span>基本数量</span>
-            <el-input placeholder="请输入" v-model.number="baseCount">
+            <el-input placeholder="请输入" v-model.number="baseCount" disabled>
             </el-input>
-            <DictSelection dictName="计量单位" v-model="unit"
+            <DictSelection dictName="计量单位" v-model="unit" disabled
           /></div>
         </div>
       </template>
@@ -85,8 +85,8 @@
           "
         >
           <el-option
-            v-for="(item,index) in gysList"
-           :key="item.id + index"  
+            v-for="(item, index) in gysList"
+            :key="item.id + index"
             :value="item.id"
             :label="item.name"
           ></el-option>
@@ -109,7 +109,8 @@
   import BOMSearch from './BOM-search.vue';
   import {
     getBomPageCategoryId,
-    contactList
+    contactList,
+    getBomGetById
   } from '@/api/bpm/components/bomApprover';
 
   export default {
@@ -132,11 +133,11 @@
         visible: false,
         title: '',
         gysList: [],
-        baseCount:'',
-        unit:'',
+        baseCount: '',
+        unit: '',
         materielDesignationPL: null,
         supplierIdPL: null,
-        
+
         columns: [
           {
             label: '序号',
@@ -176,7 +177,6 @@
             showOverflowTooltip: true
           },
 
-          
           {
             prop: 'dosage',
             label: '用量',
@@ -234,6 +234,7 @@
     },
     created() {
       this.getContactList();
+      this.handBomDetails(this.businessId);
     },
     methods: {
       /* 表格数据源 */
@@ -263,6 +264,15 @@
         });
       },
 
+      handBomDetails(id) {
+        if (id) {
+          getBomGetById(id).then((res) => {
+            this.baseCount = res.baseCount;
+            this.unit = res.category.measuringUnit;
+          });
+        }
+      },
+
       handMaterPL() {
         let _arr = this.$refs.table.getData() || [];
         _arr.forEach((f) => {