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

联调设置售后地址

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