Browse Source

no message

linwenxin 6 months ago
parent
commit
c2e8576060

+ 4 - 2
src/packageMaterial/pages/apply/product.vue

@@ -31,10 +31,12 @@
           <view class="item" v-for="(item, index) in rightList" :key="index">
             <view class="name">{{ item.goodsName }}</view>
             <view class="text">代码:{{ item.goodsCode }}</view>
+            <view class="text">网点库存:{{ item.qty }}</view>
             <view class="bottom">
               <view class="price"
                 >¥{{ item.price | priceFilter }}<text>/{{ item.goodsSalesUnit }}</text></view
               >
+
               <u-number-box
                 min="0"
                 :step="item.goodsSalesUnit == '米' ? 1 : 1"
@@ -141,7 +143,6 @@ export default {
       applyName: '',
       websitId: null,
       websitName: null,
-
       keyword: '',
 		leftList: [],
 		leftCurrent: 0,
@@ -225,7 +226,8 @@ export default {
     		if(list.length < 1){
     			this.loadStatus = 2;
     		}
-    		this.rightList = list;
+        this.rightList = list;
+        console.log(list,"---------------")
     	}).catch(() => {
     		this.loadStatus = 2;
     	})

+ 8 - 4
src/packageMaterial/pages/newSale/product.vue

@@ -21,6 +21,7 @@
           <view class="item" v-for="(item, index) in rightList" :key="index" @click="selectId = item.goodsCode">
             <view class="name">{{ item.goodsName }}</view>
             <view class="text">代码:{{ item.goodsCode }}</view>
+            <view class="text">师傅库存:{{ item.qty }}</view>
             <view class="bottom">
               <view class="price"
                 >¥{{ item.goodsAmount | priceFilter }}<text>/{{ item.goodsUnit }}</text></view
@@ -134,7 +135,8 @@ export default {
         partsName: this.keyword,
         ...params
     	}).then(res => {
-    		this.loadStatus = 0;
+        this.loadStatus = 0;
+        console.log(res.data)
         let list = res.data.map(item => {
           return this.type === 'M' ? {
             goodsId: item.normId,
@@ -142,7 +144,8 @@ export default {
             goodsCode: item.normCode,
             goodsUnit: item.unit,
             goodsAmount: item.normAmount,
-            num: 0
+            num: 0,
+            qty:item.qty,
           } : {
             goodsId: item.goodsId,
             goodsName: item.goodsName,
@@ -150,7 +153,8 @@ export default {
             goodsUnit: item.goodsStockUnit,
             goodsAmount: item.marketPrice,
             normType: "M",
-            num: 1
+            num: 1,
+            qty:item.qty,
           }
         });
         for(let i = 0; i < list.length; i++) {
@@ -163,7 +167,7 @@ export default {
     		if(list.length < 1){
     			this.loadStatus = 2;
     		}
-    		this.rightList = list;
+        this.rightList = list;
     	}).catch(() => {
     		this.loadStatus = 2;
     	})

+ 26 - 2
src/packageWorkorder/pages/orderDetail.vue

@@ -397,7 +397,19 @@
                 <view class="left">订单总金额</view>
                 <view class="right">
                   <view class="text">合计:</view>
-                  <view class="price">¥{{ item.totalAmount }}</view>
+                  <view class="price"
+                    >¥{{
+                      [
+                        0,
+                        0,
+                        0,
+                        ...item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV').map(val => val.normAmount),
+                        ...item.rpMaterialOrderItems
+                          .filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')
+                          .map(val => val.totalAmount)
+                      ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
+                    }}</view
+                  >
                 </view>
               </view>
               <view class="row mt30">
@@ -473,7 +485,19 @@
                 <view class="left">订单总金额</view>
                 <view class="right">
                   <view class="text">合计:</view>
-                  <view class="price">¥{{ item.totalAmount }}</view>
+                  <view class="price"
+                    >¥{{
+                      [
+                        0,
+                        0,
+                        0,
+                        ...item.workerOrderItems.filter(o => o.chargeType == 'SERV').map(val => val.normAmount),
+                        ...item.workerOrderItems
+                          .filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')
+                          .map(val => val.totalAmount)
+                      ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
+                    }}</view
+                  >
                 </view>
               </view>
               <view class="row mt30">