|
@@ -1,5 +1,5 @@
|
|
|
import { getGoodsDataApi,getProductDataApi,getPxClassDataApi } from "@/api/product/index";
|
|
import { getGoodsDataApi,getProductDataApi,getPxClassDataApi } from "@/api/product/index";
|
|
|
-import { getGhsProductList } from "@/api/ghs-product/index";
|
|
|
|
|
|
|
+import { getGhsProductList } from "@/api/product/index";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
import { copyObject } from "@/utils/util";
|
|
import { copyObject } from "@/utils/util";
|
|
|
export default {
|
|
export default {
|
|
@@ -22,13 +22,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
this.options = options;
|
|
this.options = options;
|
|
|
- const { pageType,shopId,sjId } = options;
|
|
|
|
|
|
|
+ const { pageType,id } = options;
|
|
|
if (pageType) {
|
|
if (pageType) {
|
|
|
this.pageType = pageType;
|
|
this.pageType = pageType;
|
|
|
}
|
|
}
|
|
|
if (this.autoLoad) {
|
|
if (this.autoLoad) {
|
|
|
if(this.isGhsProduct){
|
|
if(this.isGhsProduct){
|
|
|
- this.initGhsData(shopId,sjId);//采购-进店下单
|
|
|
|
|
|
|
+ this.initGhsData(id);//采购-进店下单
|
|
|
}else{
|
|
}else{
|
|
|
this.initGoodsData();//成品
|
|
this.initGoodsData();//成品
|
|
|
this.initData();//组合
|
|
this.initData();//组合
|
|
@@ -204,13 +204,12 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 请求商品数据
|
|
* 请求商品数据
|
|
|
*/
|
|
*/
|
|
|
- async initGhsData(shopId,sjId) {
|
|
|
|
|
|
|
+ async initGhsData(id) {
|
|
|
//extendInfo调用时的扩展参数 如 shopId
|
|
//extendInfo调用时的扩展参数 如 shopId
|
|
|
try {
|
|
try {
|
|
|
let params = {
|
|
let params = {
|
|
|
py: this.py,
|
|
py: this.py,
|
|
|
- sjId: sjId,
|
|
|
|
|
- shopId: shopId,
|
|
|
|
|
|
|
+ id:id
|
|
|
};
|
|
};
|
|
|
const { data } = await getGhsProductList(params);
|
|
const { data } = await getGhsProductList(params);
|
|
|
data.forEach(element => {
|
|
data.forEach(element => {
|