提交 4e650806 编写于 作者: changdi.hao's avatar changdi.hao

fixed:修复新建商品是否支持售后

新建商品页面增加获取售后地址的接口判断
上级 a89003c0
......@@ -869,8 +869,8 @@
import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList } from '@/utils/goods';
import { getStoreAdressRepot } from "@/utils/shop";
import Cropper from '@/components/common/cropper.vue'
import { originRules1, originRules2, originRules } from './rules';
import { originForm1, originForm2, originForm } from './forms';
......@@ -1045,6 +1045,8 @@
console.log(`getCheckPackageIdList`, res);
this.checkPackageIdList = res.data;
})
} else {
this.getStoreAdress();
}
// debugger;
// 判空
......@@ -1778,7 +1780,6 @@
}
}
},
checkCount(){
let flag = true;
if(this.formData.saleType == 1 && this.formData.mostCount == 0){
......@@ -1801,7 +1802,6 @@
return flag;
},
goShopDeatil() {
this.$router.push({
path: `/create-shop`,
......@@ -1810,7 +1810,22 @@
// storeData: JSON.stringify(row),
}
})
},
//店铺是否配置售后地址
getStoreAdress() {
getStoreAdressRepot(this.formData.storeId).then(res => {
if (res.code == "000000") {
// repotList 地址数组
if(res.data && res.data.repotList) {
this.hasRepoFlag = true;
} else {
this.hasRepoFlag = false;
}
} else {
this.$message.error(res.message);
}
})
},
},
}
</script>
......
......@@ -18,7 +18,6 @@ const form1 = {
barCode: "",
modelNo: "", // 型号
standardNo: "", // 执行标准号
expressLimitFlag: "0", //是否支持退货退款
};
const form2 = {
......@@ -49,24 +48,25 @@ const form = {
// specificationImages:[],
// goodsId: 0, // 新增时传0,更新时必需>0
id: 0,
goodsName:'',
goodsDescription:'',
goodsHeaderImages:[],
goodsType:'',
barCode: '',
costPrice:0,
decrStock:0,//减少库存
incrStock:'',//增加库存
storeId: '',
optPrice:'',
goodsStock:0,
goodsName: "",
goodsDescription: "",
goodsHeaderImages: [],
goodsType: "",
barCode: "",
costPrice: 0,
decrStock: 0, //减少库存
incrStock: "", //增加库存
storeId: "",
optPrice: "",
goodsStock: 0,
stock: 0,
externalGoodsCode: '',
leastCount:1,
externalGoodsCode: "",
leastCount: 1,
mostCount: -1,
incrType:1,
saleType:1,
minWhole:0
incrType: 1,
saleType: 1,
minWhole: 0,
expressLimitFlag: 0, //是否支持退货退款
};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册