运费模版
continuous-integration/drone/push Build is passing Details

This commit is contained in:
余同学 2024-11-12 19:52:30 +08:00
parent 7125486063
commit 4ec91760a1
2 changed files with 25 additions and 12 deletions

View File

@ -20,6 +20,19 @@
v-model="searchForm.name" v-model="searchForm.name"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="marketList.length > 0" label="摊铺">
<el-select
v-model="searchForm.linkId"
placeholder="请选择活动区域"
>
<el-option
v-for="item in marketList"
:key="item.marketId"
:label="item.marketName"
:value="item.marketId"
></el-option>
</el-select>
</el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()" <el-button type="primary" @click="$refs.oTable.reload()"
>搜索</el-button >搜索</el-button
> >
@ -49,19 +62,24 @@ export default {
dataList: [], dataList: [],
searchForm: { searchForm: {
name: "", name: "",
linkId: "",
}, },
shopId: "", shopId: "",
marketList: "",
}; };
}, },
created() { created() {
if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) { if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) {
this.shopId = true; this.shopId = true;
this.formInline.marketId = JSON.parse( this.searchForm.linkId = JSON.parse(
sessionStorage.getItem("userInfo") sessionStorage.getItem("userInfo")
).markets[0].marketId; ).markets[0].marketId;
this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets; this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets;
console.log(this.marketList); console.log(this.marketList);
} else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) { } else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) {
this.searchForm.linkId = JSON.parse(
sessionStorage.getItem("userInfo")
).shopId;
this.shopId = true; this.shopId = true;
} else { } else {
this.shopId = false; this.shopId = false;
@ -87,7 +105,7 @@ export default {
}); });
}, },
addFareTemplate() { addFareTemplate() {
this.$refs.addTemplate.toggle().add(); this.$refs.addTemplate.toggle().add(this.searchForm.linkId);
}, },
}, },
computed: { computed: {
@ -100,7 +118,6 @@ export default {
this.$api.mer_admin.getShippingTemplateInfo(row.id).then((res) => { this.$api.mer_admin.getShippingTemplateInfo(row.id).then((res) => {
console.log(res); console.log(res);
console.log("row.tableData", row.tableData); console.log("row.tableData", row.tableData);
if (!row.tableData) { if (!row.tableData) {
if (res.data.data.shippingTemplatesRegionResultList) { if (res.data.data.shippingTemplatesRegionResultList) {
this.$set( this.$set(

View File

@ -57,6 +57,7 @@ export default {
}, },
fileList: [], // fileList: [], //
place: "", // place: "", //
linkId: "",
}; };
}, },
mounted() { mounted() {
@ -141,10 +142,11 @@ export default {
this.modalData = _data; this.modalData = _data;
}; };
return { return {
add: () => { add: (id) => {
this.$nextTick(() => { this.$nextTick(() => {
this.modalData = cloneDeep(BASE_DATA); this.modalData = cloneDeep(BASE_DATA);
}); });
this.linkId = id;
this.isAdd = true; this.isAdd = true;
this.modalConfig.title = "添加运费模板"; this.modalConfig.title = "添加运费模板";
}, },
@ -832,10 +834,7 @@ export default {
if (this.isAdd) { if (this.isAdd) {
this.$api.mer_admin this.$api.mer_admin
.addShippingTemplate({ .addShippingTemplate({
linkId: JSON.parse(sessionStorage.getItem("userInfo")).shopId linkId: this.linkId,
? JSON.parse(sessionStorage.getItem("userInfo")).shopId
: JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
.marketId,
defaults: 0, // defaults: 0, //
sort: 0, // sort: 0, //
type: 2, // type: 2, //
@ -894,10 +893,7 @@ export default {
this.$api.mer_admin this.$api.mer_admin
.updateShippingTemplate({ .updateShippingTemplate({
id: this.modalData.id, id: this.modalData.id,
linkId: JSON.parse(sessionStorage.getItem("userInfo")).shopId linkId: this.linkId,
? JSON.parse(sessionStorage.getItem("userInfo")).shopId
: JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
.marketId,
defaults: 0, // defaults: 0, //
sort: 0, // sort: 0, //
type: 2, // type: 2, //