|
|
@@ -1,4 +1,4 @@
|
|
|
-import { getGoodsDataApi,getProductDataApi,getPxClassDataApi,getGhsProductList } from "@/api/product";
|
|
|
+import { getGoodsDataApi,getProductDataApi,getPxClassDataApi,getGhsProductList,getGhsProductListV2 } from "@/api/product";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
import { copyObject } from "@/utils/util";
|
|
|
export default {
|
|
|
@@ -236,7 +236,30 @@ export default {
|
|
|
this.customData.smallCount = null
|
|
|
}
|
|
|
},
|
|
|
- //采购时请求供货商花材
|
|
|
+ async initGhsDataV2(id,shopId,showAll) {
|
|
|
+ try {
|
|
|
+ let params = { py: this.py, id:id, shopId:shopId, showAll:showAll }
|
|
|
+ const { data } = await getGhsProductListV2(params);
|
|
|
+ this.productInfo = data;
|
|
|
+ if(this.pageType == 'cg' || this.pageType == 'bookCg'){
|
|
|
+ let targetId = this.option.id ? this.option.id : 0
|
|
|
+ let currentInfo = uni.getStorageSync('selectList'+this.pageType+'_ghs_'+targetId)
|
|
|
+ if(!this.$util.isEmpty(currentInfo)){
|
|
|
+ this.setSelectInfoByType({ type: this.pageType, info: currentInfo })
|
|
|
+ }else{
|
|
|
+ //临时解决方案
|
|
|
+ this.resetSelectInfoByType(this.pageType);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.classIndex = 0;
|
|
|
+ this.scroll_into_view = 'class_0';
|
|
|
+ this.scrollPushList();
|
|
|
+ } catch (error) {
|
|
|
+ uni.hideLoading()
|
|
|
+ } finally {
|
|
|
+ uni.hideLoading()
|
|
|
+ }
|
|
|
+ },
|
|
|
async initGhsData(id,shopId,showAll) {
|
|
|
//extendInfo调用时的扩展参数,如shopId
|
|
|
try {
|