shish 1 gadu atpakaļ
vecāks
revīzija
10c6240be4

+ 7 - 0
ghs/src/service/live-order/index.js

@@ -61,5 +61,12 @@ export class LiveOrderService extends BaseService {
 		});
 	}
 
+	getUnConvert(data) {
+		return this.request({
+			url: '/un-convert',
+			params: data
+		});
+	}
+
 }
 export default new LiveOrderService();

+ 16 - 1
ghs/src/views/order/add-live.vue

@@ -183,7 +183,22 @@ export default {
 				this.loading = true;
 				this.$service.product.list({name:query,delStatus:0}).then(res=>{
 					that.loading = false
-					that.itemList = res.list	
+					that.itemList = res.list
+					that.$service.liveOrder.getUnConvert().then(ret=>{
+						let has = ret.list ? ret.list : []
+						if(!that.$util.isEmpty(has) && !that.$util.isEmpty(that.itemList)){
+							that.itemList.forEach((item,idx,arr) => {
+								let productId = item.id
+								if(has[productId]){
+									let currentLive = has[productId]
+									let itemPrice = currentLive.itemPrice ? parseFloat(currentLive.itemPrice):0
+									let name = item.name?item.name:''
+									let last = name+' | 已开过 '+itemPrice+'元'
+									item.name = last
+								}
+							})
+						}	
+					})
 				})
 			} else {
 				this.itemList = []