|
|
|
@ -26,11 +26,11 @@
|
|
|
|
|
<span class="el_table_span name">配送计费模式</span> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.dispatchPricingType" |
|
|
|
|
filterable |
|
|
|
|
:filterable="form.dispatchIsByCategory" |
|
|
|
|
placeholder="请选择配送计费模式" |
|
|
|
|
:popper-append-to-body="false" |
|
|
|
|
style="width: 100%" |
|
|
|
|
multiple |
|
|
|
|
:multiple="form.dispatchIsByCategory" |
|
|
|
|
@remove-tag="removeTag" |
|
|
|
|
@change="DeliveryType" |
|
|
|
|
> |
|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
<el-checkbox v-model="item.check" @change="isChecked(item)"> |
|
|
|
|
<el-checkbox v-model="item.check" @change="isChecked(item)" v-if="form.dispatchIsByCategory"> |
|
|
|
|
{{ item.label }} |
|
|
|
|
</el-checkbox> |
|
|
|
|
</el-option> |
|
|
|
@ -599,6 +599,18 @@ const categoryChange = val => {
|
|
|
|
|
loading: false, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
form.dispatchPricingType = []; |
|
|
|
|
if(form.dispatchIsByCategory){ |
|
|
|
|
form.value.dispatchPricingType = []; |
|
|
|
|
}else{ |
|
|
|
|
ServiceList.value.forEach(res => { |
|
|
|
|
res.check = false; |
|
|
|
|
res.state = false; |
|
|
|
|
}) |
|
|
|
|
form.value.dispatchPricingType = [] |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 是否最低计费展示 |
|
|
|
|
const MinimumChange = val => { |
|
|
|
@ -1263,7 +1275,7 @@ const handleSubmit = async () => {
|
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!form.value.dispatchPricingType.length) { |
|
|
|
|
if (!form.value.dispatchPricingType.length && !form.value.dispatchPricingType) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择配送计费模式', |
|
|
|
|
type: 'warning', |
|
|
|
@ -1274,8 +1286,12 @@ const handleSubmit = async () => {
|
|
|
|
|
form.value.serviceType = props.templateData.ServiceType.join(','); //顶部选择的服务类型 |
|
|
|
|
// 初始化数据 |
|
|
|
|
const Submit = deepClone(form.value); //拷贝一份要提交的数据 |
|
|
|
|
if(Submit.dispatchPricingType.length){ |
|
|
|
|
Submit.dispatchPricingType = Submit.dispatchPricingType.join(','); //服务类型处理 |
|
|
|
|
}else{ |
|
|
|
|
Submit.dispatchPricingType = Submit.dispatchPricingType; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Submit.dispatchPricingType = Submit.dispatchPricingType.join(','); //服务类型处理 |
|
|
|
|
|
|
|
|
|
// 选择了是否区分品类才进行处理数据 |
|
|
|
|
if (form.value.dispatchIsByCategory) { |
|
|
|
|