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

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

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