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

联调设置售后地址

上级 e6052bf3
...@@ -145,4 +145,13 @@ export const getLgCompanyList = () => { ...@@ -145,4 +145,13 @@ export const getLgCompanyList = () => {
method: "get", method: "get",
description: "获取物流公司", description: "获取物流公司",
}); });
}; };
\ No newline at end of file
export const getStoreAdressRepot = (storeId) => {
return fetch({
headers,
url: getBaseUrl(`store/query/${storeId}/repot`),
method: "get",
description: "获取店铺退货地址信息",
});
};
...@@ -93,12 +93,12 @@ ...@@ -93,12 +93,12 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否支持退货退款" prop="hcd"> <el-form-item label="是否支持退货退款" prop="expressLimitFlag" v-if="storeType < 3">
<el-radio-group v-model="formData.hcd" disabled="hcd"> <el-radio-group v-model="formData.expressLimitFlag" :disabled="!hasRepoFlag">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
<p class="backTip">若需设置商品支持退货退款,需先至店铺页<span class="ad-back">设置退款地址</span></p> <p class="backTip" v-if="!hasRepoFlag" @click="goShopDeatil">若需设置商品支持退货退款,需先至店铺页<span class="ad-back">设置退款地址</span></p>
</el-form-item> </el-form-item>
...@@ -1001,17 +1001,19 @@ ...@@ -1001,17 +1001,19 @@
limitVisibleFlag:false, limitVisibleFlag:false,
limit:{ limit:{
title:"限购条件" title:"限购条件"
} },
storeType: 1, //1: "供货商",2: "小药房",3: "医生小店"
hasRepoFlag: 0 //店铺是否有退货地址
} }
}, },
created() { created() {
vm = this; vm = this;
const { id, storeId, goodsType, inputType, commissionFlag} = this.$route.query; const { id, storeId, goodsType, inputType, commissionFlag, storeType} = this.$route.query;
this.goodsType = goodsType; this.goodsType = goodsType;
this.storeId = storeId; this.storeId = storeId;
this.inputType = inputType || ''; this.inputType = inputType || '';
this.commissionFlag = commissionFlag; this.commissionFlag = commissionFlag;
this.storeType = storeType;
// this.formData = originForm; // this.formData = originForm;
// this.formData1 = originForm1; // this.formData1 = originForm1;
// this.formData2 = originForm2; // this.formData2 = originForm2;
...@@ -1118,6 +1120,7 @@ ...@@ -1118,6 +1120,7 @@
goodsType :'', goodsType :'',
pageNo:1, pageNo:1,
pageSize: 10, pageSize: 10,
storeId: this.storeId
}); });
if(res.code != '000000'){ if(res.code != '000000'){
return this.$message({ return this.$message({
...@@ -1131,9 +1134,10 @@ ...@@ -1131,9 +1134,10 @@
type: 'error' type: 'error'
}); });
} }
const {goodsList} = res.data; const {goodsList, hasRepoFlag } = res.data;
this.formData1 = goodsList[0]; this.formData1 = goodsList[0];
this.formData = goodsList[0]; this.formData = goodsList[0];
this.hasRepoFlag = hasRepoFlag;
this.buyLimitDtoList = this.formData.buyLimitDtoList; this.buyLimitDtoList = this.formData.buyLimitDtoList;
this.formData.optPrice = this.formData.costPrice/100; this.formData.optPrice = this.formData.costPrice/100;
this.fileGoodsList = this.getImges(goodsList[0].goodsImgList,1); this.fileGoodsList = this.getImges(goodsList[0].goodsImgList,1);
...@@ -1515,7 +1519,8 @@ ...@@ -1515,7 +1519,8 @@
path: '/goods-manage', path: '/goods-manage',
query: { query: {
storeId: this.formData.storeId, storeId: this.formData.storeId,
commissionFlag: this.commissionFlag commissionFlag: this.commissionFlag,
storeType: this.storeType
} }
}) })
}) })
...@@ -1794,8 +1799,17 @@ ...@@ -1794,8 +1799,17 @@
} }
return flag; return flag;
} },
goShopDeatil() {
this.$router.push({
path: `/create-shop`,
query:{
storeId: this.storeId,
// storeData: JSON.stringify(row),
}
})
}
}, },
} }
</script> </script>
...@@ -1868,6 +1882,7 @@ ...@@ -1868,6 +1882,7 @@
.backTip { .backTip {
font-size: 12px; font-size: 12px;
color: red; color: red;
cursor: pointer;
} }
.ad-back { .ad-back {
color: #449284; color: #449284;
......
...@@ -18,7 +18,7 @@ const form1 = { ...@@ -18,7 +18,7 @@ const form1 = {
barCode: "", barCode: "",
modelNo: "", // 型号 modelNo: "", // 型号
standardNo: "", // 执行标准号 standardNo: "", // 执行标准号
hcd: '1' //是否支持退货退款 expressLimitFlag: "0", //是否支持退货退款
}; };
const form2 = { const form2 = {
......
...@@ -486,9 +486,10 @@ ...@@ -486,9 +486,10 @@
vm = this; vm = this;
this.getLists() this.getLists()
this.getLever() this.getLever()
const {storeId,commissionFlag} = this.$route.query; const {storeId,commissionFlag,storeType} = this.$route.query;
this.searchForm.storeId = Number(storeId) || 0; this.searchForm.storeId = Number(storeId) || 0;
this.commissionFlag = commissionFlag; this.commissionFlag = commissionFlag;
this.storeType = storeType;
// if(storeId){ // if(storeId){
// this.searchForm.storeId = storeId // this.searchForm.storeId = storeId
// } // }
...@@ -694,9 +695,9 @@ ...@@ -694,9 +695,9 @@
const { goodsType } = row; const { goodsType } = row;
let url = '' let url = ''
if(row == 'add'){ if(row == 'add'){
url = `/create-good?id=add&storeId=${this.searchForm.storeId}&inputType=1&commissionFlag=${this.commissionFlag}` url = `/create-good?id=add&storeId=${this.searchForm.storeId}&inputType=1&commissionFlag=${this.commissionFlag}&storeType=${this.storeType}`
}else{ }else{
url = `/create-good?id=${row.goodsId}&storeId=${this.searchForm.storeId}&goodsType=${goodsType}&commissionFlag=${this.commissionFlag}` url = `/create-good?id=${row.goodsId}&storeId=${this.searchForm.storeId}&goodsType=${goodsType}&commissionFlag=${this.commissionFlag}&storeType=${this.storeType}`
} }
// this.$store.dispatch('goodsManage/changeGoodsInfo', {...row}); // this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this.$router.push({ this.$router.push({
......
...@@ -534,11 +534,11 @@ ...@@ -534,11 +534,11 @@
</el-form-item> </el-form-item>
<el-form-item label="退货支持的物流公司" class="required-label" v-if="formData.storeType < 3"> <el-form-item label="退货支持的物流公司" class="required-label" v-if="formData.storeType < 3">
<el-radio-group v-model="formData.expressLimitFlag" @change="changeExpressLimitFlag"> <el-radio-group v-model="formData.expressLimitFlag" @change="changeExpressLimitFlag">
<el-radio :label="1">无限制</el-radio> <el-radio :label="0">无限制</el-radio>
<el-radio :label="2">有限制</el-radio> <el-radio :label="1">有限制</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="物流公司名称" prop="repotExpressList" class="required-label" v-if="formData.expressLimitFlag == 2 && formData.storeType < 3"> <el-form-item label="物流公司名称" prop="repotExpressList" class="required-label" v-if="formData.expressLimitFlag && formData.storeType < 3">
<el-select <el-select
v-model="formData.repotExpressList" v-model="formData.repotExpressList"
filterable filterable
...@@ -670,7 +670,7 @@ let vm = null; ...@@ -670,7 +670,7 @@ let vm = null;
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 Cropper from "@/components/common/cropper.vue"; import Cropper from "@/components/common/cropper.vue";
import { saveStore, queryStore, getLgCompanyList } from "@/utils/shop"; import { saveStore, queryStore, getLgCompanyList, getStoreAdressRepot } from "@/utils/shop";
import { getProvinces, getCities, getCounties } from '@/utils/base/baseApi'; import { getProvinces, getCities, getCounties } from '@/utils/base/baseApi';
import { checkMobile } from "@/utils/patients/checkValid"; import { checkMobile } from "@/utils/patients/checkValid";
export default { export default {
...@@ -738,21 +738,21 @@ export default { ...@@ -738,21 +738,21 @@ export default {
imgUrlC2: "", //证明图2 imgUrlC2: "", //证明图2
imgUrlC3: "", //证明图3 imgUrlC3: "", //证明图3
repotList:[//仓库地址 repotList:[//仓库地址
{ // {
addr: "asdasd", // addr: "asdasd",
cityId: 130300000000, // cityId: 130300000000,
cityName: "秦皇岛市", // cityName: "秦皇岛市",
countyId: 130306000000, // countyId: 130306000000,
countyName: "抚宁县", // countyName: "抚宁县",
key: 0, // key: 0,
provinceId: 130, // provinceId: 130,
provinceName: "河北省", // provinceName: "河北省",
receiver: "河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省", // receiver: "河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省河北省",
receiverMobile: "13889873718" // receiverMobile: "13889873718"
} // }
], ],
selectedKey: '', //默认收货地址 selectedKey: '', //默认收货地址
expressLimitFlag: 1, //是否限制物流公司 expressLimitFlag: 0, //是否限制物流公司
repotExpressList:[], //支持的物流公司 repotExpressList:[], //支持的物流公司
expressDesc: '' //退款说明 expressDesc: '' //退款说明
}, },
...@@ -913,22 +913,29 @@ export default { ...@@ -913,22 +913,29 @@ export default {
created() { created() {
vm = this; vm = this;
this.formData.storeId = this.$route.query.storeId || null; this.formData.storeId = this.$route.query.storeId || null;
this.storeData = this.$route.query.storeData || null; // this.storeData = this.$route.query.storeData || null;
this.getProvincesList();
this.getCompanyList();
if (this.formData.storeId) { if (this.formData.storeId) {
this.curmbSecond = "编辑店铺"; this.curmbSecond = "编辑店铺";
this.storeData = JSON.parse(this.storeData);
this.isDisabled = true; this.isDisabled = true;
this.initInfo(); this.initInfo();
this.getStoreInfo(); this.getDetail();
} else { } else {
this.curmbSecond = "新建店铺"; this.curmbSecond = "新建店铺";
this.isDisabled = false; this.isDisabled = false;
} }
this.getProvincesList();
this.getCompanyList();
}, },
methods: { methods: {
getDetail() {
getStoreAdressRepot(this.formData.storeId).then(res => {
if (res.code == "000000") {
Object.assign(this.formData,res.data)
} else {
this.$message.error(res.message);
}
})
},
//回显数据处理 //回显数据处理
getStoreInfo() { getStoreInfo() {
if (!this.storeData || !this.storeData.tradeStore) return; if (!this.storeData || !this.storeData.tradeStore) return;
...@@ -1009,9 +1016,13 @@ export default { ...@@ -1009,9 +1016,13 @@ export default {
initInfo() { initInfo() {
let req = { let req = {
storeId: this.formData.storeId, storeId: this.formData.storeId,
pageNo: 1,
pageSize: 10,
}; };
queryStore(req).then((res) => { queryStore(req).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.storeData = res.data.tradeStore[0];
this.getStoreInfo();
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
...@@ -1021,8 +1032,7 @@ export default { ...@@ -1021,8 +1032,7 @@ export default {
let flag = this.submitForm(); let flag = this.submitForm();
console.log('====== this.formData=============================='); console.log('====== this.formData==============================');
console.log( this.formData); console.log( this.formData);
console.log('===================================='); console.log(flag);
return
if (flag) { if (flag) {
// let para = { // let para = {
// storeId: this.formData.storeId, // storeId: this.formData.storeId,
...@@ -1620,13 +1630,13 @@ export default { ...@@ -1620,13 +1630,13 @@ export default {
message: `${warehouseAdressFormTitle}成功!` message: `${warehouseAdressFormTitle}成功!`
}); });
this.$refs['warehouseAdressForm'].resetFields(); this.$refs['warehouseAdressForm'].resetFields();
// this.warehouseAdressFormVisible = false; this.warehouseAdressFormVisible = false;
} }
}); });
}, },
// 切换退货支持的物流公司类型 // 切换退货支持的物流公司类型
changeExpressLimitFlag() { changeExpressLimitFlag() {
if(this.formData.expressLimitFlag == 1) { if(!this.formData.expressLimitFlag) {
this.formData.repotExpressList = []; this.formData.repotExpressList = [];
} }
}, },
......
...@@ -386,7 +386,8 @@ ...@@ -386,7 +386,8 @@
path: '/goods-manage', path: '/goods-manage',
query: { query: {
storeId: row.tradeStore.id, storeId: row.tradeStore.id,
commissionFlag:row.tradeStore.commissionFlag commissionFlag:row.tradeStore.commissionFlag,
storeType:row.tradeStore.storeType // 1: "供货商",2: "小药房",3: "医生小店"
} }
}); });
window.open(routeData.href, '_blank'); window.open(routeData.href, '_blank');
...@@ -420,7 +421,7 @@ ...@@ -420,7 +421,7 @@
path: `/create-shop`, path: `/create-shop`,
query:{ query:{
storeId: row.tradeStore.id, storeId: row.tradeStore.id,
storeData: JSON.stringify(row), // storeData: JSON.stringify(row),
} }
}) })
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册