add
This commit is contained in:
parent
5d4ce160ea
commit
9931ae862f
|
@ -54,7 +54,7 @@
|
|||
"jsencrypt": "3.0.0-rc.1",
|
||||
"mockjs": "^1.1.0",
|
||||
"nprogress": "0.2.0",
|
||||
"obj-modal": "^1.2.0",
|
||||
"obj-modal": "^1.2.2",
|
||||
"obj-table-plus": "^2.4.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
|
|
|
@ -16,6 +16,7 @@ module.exports = {
|
|||
"checkbox-config": { labelField: "", checkRowKeys: [10053, 23666] },
|
||||
"highlight-current-row": true,
|
||||
"show-overflow": true,
|
||||
"scroll-y":{enabled:true},
|
||||
"tree-config": { childrenField: "children" },
|
||||
"header-cell-class-name":"obj-table-header-cell"
|
||||
},
|
||||
|
|
|
@ -177,7 +177,8 @@ export default {
|
|||
//打开弹窗预览
|
||||
const openPreview = (str) => {
|
||||
this.$confirm(str, "详情", {
|
||||
showCancel: false,
|
||||
showCancelButton: false,
|
||||
confirmButtonText:"好的"
|
||||
});
|
||||
};
|
||||
return (
|
||||
|
|
|
@ -9,13 +9,6 @@
|
|||
:modalData="modalData"
|
||||
:modalHandles="modalHandles"
|
||||
>
|
||||
<template slot="dialog__before">
|
||||
<!-- <el-tabs v-model="currentPanel">
|
||||
<el-tab-pane label="基础信息" name="基础信息"></el-tab-pane>
|
||||
<el-tab-pane label="销售信息" name="销售信息"></el-tab-pane>
|
||||
<el-tab-pane label="其他信息" name="其他信息"></el-tab-pane>
|
||||
</el-tabs> -->
|
||||
</template>
|
||||
</obj-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -70,6 +63,16 @@ export default {
|
|||
return "还有未保存的数据,确定离开此页吗?";
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"modalConfig.show"(newVal) {
|
||||
if (newVal) {
|
||||
//关闭弹窗清空校验
|
||||
setTimeout(() => {
|
||||
this.$refs.modal.clearValidate();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
computedCityOptions() {
|
||||
function filterTree(tree, filterArray) {
|
||||
|
@ -121,7 +124,7 @@ export default {
|
|||
|
||||
//默认运费回显
|
||||
_data.shippingTemplatesRegionList =
|
||||
_data.shippingTemplatesRegionResultList?.slice(0,1)||
|
||||
_data.shippingTemplatesRegionResultList?.slice(0, 1) ||
|
||||
cloneDeep(BASE_DATA.shippingTemplatesRegionList);
|
||||
//指定城市设置运费
|
||||
_data.shippingTemplatesRegionListAppend =
|
||||
|
@ -181,8 +184,8 @@ export default {
|
|||
this.isAdd = true;
|
||||
refillData(e);
|
||||
this.modalConfig.title = "添加运费模板";
|
||||
console.log("this.modalData",this.modalData);
|
||||
|
||||
console.log("this.modalData", this.modalData);
|
||||
|
||||
this.modalData.templateName += "(复制)";
|
||||
},
|
||||
};
|
||||
|
@ -217,8 +220,12 @@ export default {
|
|||
render: () => {
|
||||
return (
|
||||
<el-radio-group v-model={this.modalData.calculateMethod}>
|
||||
<el-radio label="按重量">按重量</el-radio>
|
||||
<el-radio label="按件数">按件数</el-radio>
|
||||
<el-radio border label="按重量">
|
||||
按重量
|
||||
</el-radio>
|
||||
<el-radio border label="按件数">
|
||||
按件数
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
);
|
||||
},
|
||||
|
@ -236,8 +243,12 @@ export default {
|
|||
render: () => {
|
||||
return (
|
||||
<el-radio-group v-model={this.modalData.fareConfig}>
|
||||
<el-radio label="全国包邮">全国包邮</el-radio>
|
||||
<el-radio label="自定义运费">自定义运费</el-radio>
|
||||
<el-radio border label="全国包邮">
|
||||
全国包邮
|
||||
</el-radio>
|
||||
<el-radio border label="自定义运费">
|
||||
自定义运费
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
);
|
||||
},
|
||||
|
@ -436,137 +447,141 @@ export default {
|
|||
});
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<div class="d-flex no-warp justify-start items-center">
|
||||
<el-form-item
|
||||
prop="shippingTemplatesRegionList[0].first"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label="默认运费"
|
||||
>
|
||||
<el-input-number
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0].first
|
||||
}
|
||||
min={0}
|
||||
controls={false}
|
||||
precision={
|
||||
this.modalData.calculateMethod == "按重量" ? 2 : 0
|
||||
}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
|
||||
{this.modalData.calculateMethod == "按重量"
|
||||
? "kg内"
|
||||
: "件内"}
|
||||
|
||||
</span>
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop="shippingTemplatesRegionList[0].firstPrice"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label=""
|
||||
>
|
||||
<el-input-number
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0].firstPrice
|
||||
}
|
||||
min={0}
|
||||
controls={false}
|
||||
precision={2}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
元,每增加
|
||||
</span>
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop="shippingTemplatesRegionList[0].renewal"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label=""
|
||||
>
|
||||
<el-input-number
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0].renewal
|
||||
}
|
||||
min={0}
|
||||
controls={false}
|
||||
precision={
|
||||
this.modalData.calculateMethod == "按重量" ? 2 : 0
|
||||
}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
|
||||
{this.modalData.calculateMethod == "按重量" ? "kg" : "件"}
|
||||
,增加运费
|
||||
</span>
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop="shippingTemplatesRegionList[0].renewalPrice"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label=""
|
||||
>
|
||||
<el-input-number
|
||||
min={0}
|
||||
max={Number(
|
||||
this.modalData.shippingTemplatesRegionList[0].firstPrice
|
||||
)}
|
||||
controls={false}
|
||||
precision={2}
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0]
|
||||
.renewalPrice
|
||||
}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
元
|
||||
</span>
|
||||
</div>
|
||||
<transition name="el-fade-in">
|
||||
<div>
|
||||
<obj-table-plus
|
||||
tableProp={{
|
||||
"scroll-y": {
|
||||
enabled: true,
|
||||
gt: 5,
|
||||
},
|
||||
"show-overflow": true,
|
||||
}}
|
||||
style="height:50vh;"
|
||||
enable-auto-query={false}
|
||||
v-model={this.modalData.shippingTemplatesRegionListAppend}
|
||||
tableCols={tableCols}
|
||||
isPagination={false}
|
||||
>
|
||||
<template slot="empty">
|
||||
<el-button
|
||||
onClick={addAreaFare}
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
>
|
||||
为指定地区城市设置运费(除指定地区外,其余地区的运费按照“默认运费”)
|
||||
</el-button>
|
||||
</template>
|
||||
</obj-table-plus>
|
||||
<div class="d-flex no-warp justify-start items-center">
|
||||
<el-form-item
|
||||
prop="shippingTemplatesRegionList[0].first"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label="默认运费"
|
||||
>
|
||||
<el-input-number
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0].first
|
||||
}
|
||||
min={0}
|
||||
controls={false}
|
||||
precision={
|
||||
this.modalData.calculateMethod == "按重量" ? 2 : 0
|
||||
}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
|
||||
{this.modalData.calculateMethod == "按重量"
|
||||
? "kg内"
|
||||
: "件内"}
|
||||
|
||||
</span>
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop="shippingTemplatesRegionList[0].firstPrice"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label=""
|
||||
>
|
||||
<el-input-number
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0]
|
||||
.firstPrice
|
||||
}
|
||||
min={0}
|
||||
controls={false}
|
||||
precision={2}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
元,每增加
|
||||
</span>
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop="shippingTemplatesRegionList[0].renewal"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label=""
|
||||
>
|
||||
<el-input-number
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0].renewal
|
||||
}
|
||||
min={0}
|
||||
controls={false}
|
||||
precision={
|
||||
this.modalData.calculateMethod == "按重量" ? 2 : 0
|
||||
}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
|
||||
{this.modalData.calculateMethod == "按重量" ? "kg" : "件"}
|
||||
,增加运费
|
||||
</span>
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop="shippingTemplatesRegionList[0].renewalPrice"
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请填写默认运费",
|
||||
trigger: "change",
|
||||
}}
|
||||
label=""
|
||||
>
|
||||
<el-input-number
|
||||
min={0}
|
||||
max={Number(
|
||||
this.modalData.shippingTemplatesRegionList[0]
|
||||
.firstPrice
|
||||
)}
|
||||
controls={false}
|
||||
precision={2}
|
||||
v-model={
|
||||
this.modalData.shippingTemplatesRegionList[0]
|
||||
.renewalPrice
|
||||
}
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<span style="transform:translateY(-12px);">
|
||||
元
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<obj-table-plus
|
||||
tableProp={{
|
||||
"scroll-y": {
|
||||
enabled: true
|
||||
},
|
||||
"show-overflow": true,
|
||||
height:"auto"
|
||||
}}
|
||||
style="height:50vh;"
|
||||
enable-auto-query={false}
|
||||
v-model={this.modalData.shippingTemplatesRegionListAppend}
|
||||
tableCols={tableCols}
|
||||
isPagination={false}
|
||||
>
|
||||
<template slot="empty">
|
||||
<el-button
|
||||
onClick={addAreaFare}
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
>
|
||||
为指定地区城市设置运费(除指定地区外,其余地区的运费按照“默认运费”)
|
||||
</el-button>
|
||||
</template>
|
||||
</obj-table-plus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
@ -583,30 +598,44 @@ export default {
|
|||
width: "300px",
|
||||
field: "cityCodes",
|
||||
type: "jsx",
|
||||
render: ({ row }) => {
|
||||
render: ({ row, $rowIndex }) => {
|
||||
const change = (e) => {
|
||||
console.log(e);
|
||||
};
|
||||
return (
|
||||
<el-cascader
|
||||
style="width:100%;"
|
||||
v-model={row.cityCodes}
|
||||
onChange={change}
|
||||
options={this.$api.mer_admin.getCityOptions()}
|
||||
show-all-levels={false}
|
||||
collapse-tags={true}
|
||||
props={{
|
||||
props: {
|
||||
multiple: true,
|
||||
checkStrictly: false,
|
||||
emitPath: false,
|
||||
label: "name",
|
||||
value: "code",
|
||||
},
|
||||
<el-form-item
|
||||
label-width="0"
|
||||
prop={
|
||||
"shippingTemplatesConditionList." +
|
||||
$rowIndex +
|
||||
".cityCodes"
|
||||
}
|
||||
rules={{
|
||||
required: true,
|
||||
message: "请选择运送城市",
|
||||
}}
|
||||
clearable
|
||||
filterable
|
||||
></el-cascader>
|
||||
>
|
||||
<el-cascader
|
||||
style="width:100%;"
|
||||
v-model={row.cityCodes}
|
||||
onChange={change}
|
||||
options={this.$api.mer_admin.getCityOptions()}
|
||||
show-all-levels={false}
|
||||
placeholder="点击选择运送城市"
|
||||
collapse-tags={true}
|
||||
props={{
|
||||
props: {
|
||||
multiple: true,
|
||||
checkStrictly: false,
|
||||
emitPath: false,
|
||||
label: "name",
|
||||
value: "code",
|
||||
},
|
||||
}}
|
||||
clearable
|
||||
filterable
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
@ -727,24 +756,26 @@ export default {
|
|||
});
|
||||
};
|
||||
return (
|
||||
<obj-table-plus
|
||||
class="mt-5"
|
||||
style="height:50vh;"
|
||||
enable-auto-query={false}
|
||||
v-model={this.modalData.shippingTemplatesConditionList}
|
||||
tableCols={tableCols}
|
||||
isPagination={false}
|
||||
>
|
||||
<template slot="empty">
|
||||
<el-button
|
||||
onClick={addAreaFare}
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
>
|
||||
添加其他地区/其他包邮条件
|
||||
</el-button>
|
||||
</template>
|
||||
</obj-table-plus>
|
||||
<transition name="el-fade-in">
|
||||
<obj-table-plus
|
||||
class="mt-5"
|
||||
style="height:50vh;"
|
||||
enable-auto-query={false}
|
||||
v-model={this.modalData.shippingTemplatesConditionList}
|
||||
tableCols={tableCols}
|
||||
isPagination={false}
|
||||
>
|
||||
<template slot="empty">
|
||||
<el-button
|
||||
onClick={addAreaFare}
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
>
|
||||
添加其他地区/其他包邮条件
|
||||
</el-button>
|
||||
</template>
|
||||
</obj-table-plus>
|
||||
</transition>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue