| 
					
				 | 
			
			
				@@ -6,7 +6,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <view class="product-container card"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <view class="it" v-for="(item, index) in goodsList" :key="index"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <view class="name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            >{{ item.goodsName }}<text>×{{ item.num }}{{ item.goodsUnit }}</text></view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            >({{ { INNER: '保内', OUTSIDE: '保外' }[item.repairFlag] }}){{ item.goodsName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }}<text>×{{ item.num }}{{ item.goodsUnit }}</text></view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <view class="price">¥{{ (item.goodsAmount * item.num) | priceFilter }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </view> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -16,18 +17,20 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <block v-if="type == 'P' && serviceList.length > 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <block v-if="type == 'P'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <view class="common-title">服务费用</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <view class="form-container card"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <view class="item" v-for="(item, index) in serviceList" :key="index"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <view class="label" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              >{{ item.goodsName }}<text>×{{ item.num }}</text></view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <u--input placeholder="请输入单价" border="none" inputAlign="right" v-model="item.goodsAmount"></u--input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <view class="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <view class="label">其他费用</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <u--input placeholder="请输入单价" inputAlign="right" v-model="otherPrice"></u--input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <view class="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <view class="label">服务费用</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <u--input placeholder="请输入单价" inputAlign="right" v-model="servicePrice"></u--input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <view class="total"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <view class="text">合计:</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <view class="price">¥{{ totalServicePrice | priceFilter }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <view class="price">¥{{ (Number(otherPrice) + Number(servicePrice)) | priceFilter }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </block> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,10 +45,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <view class="bottom-container"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <view class="left"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <view class="text">共{{ totalNum }}件,合计:</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <view class="price" v-if="type == 'P' && serviceList.length > 0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            >¥{{ (totalPrice + totalServicePrice) | priceFilter }}</view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <view class="price" v-else>¥{{ totalPrice | priceFilter }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <view class="price">¥{{ totalPrice | priceFilter }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <view class="btn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <u-button 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -77,7 +77,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       type: 'M', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       userMobile: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       orderNo: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // salesType: 'OUT', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       salesType: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       brandId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       brandName: null, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -89,30 +88,23 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       wbIsAllFee: null, // 维保工单是否包含全部费用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       wbPayType: null, // 维保工单费用支付方式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       goodsList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      serviceList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       remark: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      otherPrice: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      servicePrice: "" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   computed: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     totalNum() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // let val = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.goodsList.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      //   val = val + item.num; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      return this.goodsList.length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    totalPrice() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let val = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.goodsList.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        val = val + (item.num * (item.goodsAmount * 100) / 100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        val = val + item.num; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      return  val; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return val 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    totalServicePrice() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    totalPrice() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let val = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.serviceList.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.goodsList.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         val = val + (item.num * (item.goodsAmount * 100) / 100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return  val; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,14 +112,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   onLoad() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    let data = this.$getStorage('materialSaleData'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let data = this.$getStorage('materialSaleDataZhiFu'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.type = data.type; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.userMobile = data.userMobile; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.orderNo = data.orderNo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.salesType = data.salesType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.brandId = data.brandId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.brandName = data.brandName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.categoryId = data.categoryId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.categoryName = data.categoryName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.websitId = data.websitId; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -135,60 +124,17 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.wbId = data.wbId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.wbIsAllFee = data.wbIsAllFee; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.wbPayType = data.wbPayType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(this.type == 'P') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.goodsList = data.goodsList.filter(o => o.normType == 'M'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.serviceList = data.goodsList.filter(o => o.normType == 'S'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.serviceList.forEach(o => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          o.goodsAmount = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.goodsList = data.goodsList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.goodsList = data.goodsList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    this.$removeStorage('materialSaleData'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  onHide: function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.$removeStorage('materialSaleData'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    confirmPartsDialog(e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.parts = this.partsList[e[0]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.isShowPartsDialog = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     submitData(type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let serviceList = JSON.parse(JSON.stringify(this.serviceList)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(this.type == 'P') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for(let i = 0; i < serviceList.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(!serviceList[i].goodsAmount && serviceList[i].goodsAmount !== 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return this.$toast('请输入服务费用价格'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        serviceList.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          item.normAmount = Number(item.goodsAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let goodsList = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ...JSON.parse(JSON.stringify(this.goodsList)), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ...serviceList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      let url = '', params = {}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(type == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(this.wbId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          url = '/engin/material/buy'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          params.rpMaterialOrderItemList = goodsList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          url = '/pay/buy'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          params.workerOrderItems = goodsList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        url = '/engin/material/apply'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        params.rpMaterialOrderItemList = goodsList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$api.postJson(url, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // brand: this.brandName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$api.postJson('/pay/buy', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         settlementType: this.salesType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsType: this.type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         remark: this.remark, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -198,20 +144,13 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         categoryName: this.categoryName || '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         websitId: this.websitId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         websitName: this.websitName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ...params, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        workerOrderItems: this.goodsList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        otherPrice: this.otherPrice, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        servicePrice:this.servicePrice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(type == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$navToPage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            url: `/packageMaterial/pages/newSale/pay?handleOrderId=${res.data}&wbId=${this.wbId}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$successToast(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.$navToPage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              url: `/packageHome/pages/maintenance/applyList` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }, 'reLaunch') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }, 500) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$navToPage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          url: `/packageMaterial/pages/newSale/pay?handleOrderId=${res.data}&wbId=${this.wbId}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, "redirectTo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 |