Sfoglia il codice sorgente

仓管员审批的时候不要看价格

jingshuyong 11 mesi fa
parent
commit
a439f5e43d

+ 5 - 2
src/views/bpm/handleTask/components/afterSales/accessory.vue

@@ -53,7 +53,7 @@
       </el-col>
     </el-row>
     <!-- 配件信息 -->
-    <spareInfo ref="spareInfoRef" :detailList="detailList" />
+    <spareInfo ref="spareInfoRef" :detailList="detailList" :taskDefinitionKey="taskDefinitionKey" />
     <div class="title" v-if="!isView && taskDefinitionKey == 'wms_out'">
       出库单信息</div
     >
@@ -128,13 +128,16 @@
         this.form.userName = row.userName;
         this.form.purpose = row.purpose;
         this.form.id = row.id;
+         row.details.map((el)=>{
+          el.totalCount = el.totalCount ? el.totalCount : 0;
+         })
         this.detailList = row.details;
         this.form.remark = row.purpose;
-        
         this.form.deptId = row.useDeptId;
         this.form.deptName = row.useDeptName;
         this.form.makerId = row.userId;
         this.form.makerName = row.userName;
+
       },
       getUniqueCategoryLevelIds(arr) {
         return [...new Set(arr.map((item) => item.categoryLevelId))].join(',');

+ 17 - 6
src/views/bpm/handleTask/components/afterSales/spareInfo.vue

@@ -10,7 +10,7 @@
       :needPage="false"
     >
       <template v-slot:toolbar>
-        <div class="toobar toobar_r">
+        <div class="toobar toobar_r" v-if="taskDefinitionKey != 'wms_out'">
           <div class="total_price">总计: {{ totalPrice }} (元)</div>
         </div>
       </template>
@@ -32,11 +32,16 @@
       title: {
         type: String,
         default: '配件信息'
+      },
+      taskDefinitionKey: {
+        type: String,
+        default: ''
       }
     },
     watch: {
       detailList: {
         handler(newVal) {
+          console.log(this.taskDefinitionKey,'this.taskDefinitionKeythis.taskDefinitionKeythis.taskDefinitionKeythis.taskDefinitionKey00000')
           this.tableList = JSON.parse(JSON.stringify(newVal));
           this.calculatePrice();
         },
@@ -87,24 +92,28 @@
             prop: 'totalCount',
             label: '数量',
             align: 'center',
-            width: 100
+            width: 100,
+            show: this.taskDefinitionKey != 'wms_out'
           },
           {
             prop: 'singlePrice',
             label: '单价',
             align: 'center',
-            width: 100
+            width: 100,
+            show: this.taskDefinitionKey != 'wms_out'
           },
           {
             prop: 'totalPrice',
             label: '总价',
             align: 'center',
-            width: 100
+            width: 100,
+            show: this.taskDefinitionKey != 'wms_out'
           },
           {
             prop: 'measureUnit',
             label: '计量单位',
-            align: 'center'
+            align: 'center',
+            show: this.taskDefinitionKey != 'wms_out'
           },
           {
             prop: 'warehouseName',
@@ -115,7 +124,9 @@
         totalPrice: 0 // 总计
       };
     },
-    mounted() {},
+    mounted() {
+      console.log(this.$store.state.user?.info, '--------------- 这是数据信息');
+    },
     methods: {
       // 计算汇总价格 ***
       calculatePrice() {