Kaynağa Gözat

进店开单

shish 5 yıl önce
ebeveyn
işleme
b1630274be

+ 5 - 4
hdApp/src/mixins/product.js

@@ -22,13 +22,13 @@ export default {
 	},
 	onLoad(options) {
 		this.options = options;
-		const { pageType,id } = options;
+		const { pageType,shopId,id } = options;
 		if (pageType) {
 			this.pageType = pageType;
 		}
 		if (this.autoLoad) {
 			if(this.isGhsProduct){
-				this.initGhsData(id);//采购-进店下单
+				this.initGhsData(id,shopId);//采购-进店下单
 			}else{
 				this.initGoodsData();//成品
 				this.initData();//组合
@@ -204,12 +204,13 @@ export default {
 		/**
 		 * 请求商品数据
 		 */
-		async initGhsData(id) {
+		async initGhsData(id,shopId) {
 			//extendInfo调用时的扩展参数  如  shopId
 			try {
 				let params = {
 					py: this.py,
-					id:id
+					id:id,
+					shopId:shopId
 				};
 				const { data } = await getGhsProductList(params);
 				data.forEach(element => {

+ 1 - 1
hdApp/src/pagesPurchase/order.vue

@@ -110,7 +110,7 @@ export default {
   methods: {
     enter (item) {
     	const {id,ghsShopId,ghsSjId} = item
-      uni.navigateTo({url: `/pagesPurchase/ghsProduct?id=${id}`})
+      uni.navigateTo({url: `/pagesPurchase/ghsProduct?shopId=${ghsShopId}&id=${id}`})
     },
     getGHSList () {
       ghsList().then(res => {