Procházet zdrojové kódy

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt

yusheng před 10 měsíci
rodič
revize
a74fb32558

+ 2 - 1
package.json

@@ -85,5 +85,6 @@
     "vue-eslint-parser": "^9.0.3",
     "vue-eslint-parser": "^9.0.3",
     "vue-template-compiler": "^2.7.10",
     "vue-template-compiler": "^2.7.10",
     "webpack": "^5.74.0"
     "webpack": "^5.74.0"
-  }
+  },
+  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
 }
 }

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

@@ -1,6 +1,5 @@
 import request from '@/utils/request';
 import request from '@/utils/request';
 
 
-
 // 供应商列表
 // 供应商列表
 export async function contactList(params) {
 export async function contactList(params) {
   const res = await request.get(`/eom/contact/page`, { 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));
   return Promise.reject(new Error(res.data.message));
 }
 }
 
 
-
-
-
 // 获取产品BOM列表
 // 获取产品BOM列表
 export async function getBomPageCategoryId(params) {
 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) {
   if (res.data.code == 0) {
     return res.data.data;
     return res.data.data;
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
 
 
-
 // 不通过任务,关闭流程
 // 不通过任务,关闭流程
 
 
 export async function notPass(data) {
 export async function notPass(data) {
@@ -33,9 +30,15 @@ export async function notPass(data) {
   return Promise.reject(new Error(res.data.message));
   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));
   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);
   const res = await request.post('/main/bomCategory/batchUpdate', data);
   if (res.data.code == 0) {
   if (res.data.code == 0) {
     return res.data.data;
     return res.data.data;
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
-
-
-

+ 15 - 6
src/views/bpm/handleTask/components/bomApproverJSYY/detailDialog.vue

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

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

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

+ 3 - 2
vue.config.js

@@ -28,7 +28,7 @@ module.exports = {
   },
   },
   devServer: {
   devServer: {
     // 代理跨域的配置
     // 代理跨域的配置
-    headers: {			
+    headers: {
       // 允许跨域访问子应用页面
       // 允许跨域访问子应用页面
       'Access-Control-Allow-Origin': '*',
       'Access-Control-Allow-Origin': '*',
     },
     },
@@ -37,8 +37,9 @@ module.exports = {
       '/api': {
       '/api': {
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001',
         // target: 'http://124.71.68.31:50001',
-        target: 'http://192.168.1.105:18086',
+        // target: 'http://192.168.1.105:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18186',
+        target: 'http://192.168.1.125:18086',
         changeOrigin: true, // 只有这个值为true的情况下 s才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 s才表示开启跨域
         pathRewrite: {
         pathRewrite: {
           '^/api': ''
           '^/api': ''