物流模板
parent
153a26612d
commit
89c09d32b4
|
@ -22,7 +22,7 @@ export function cityList(data) {
|
|||
// 城市列表
|
||||
export function cityListTree() {
|
||||
return request({
|
||||
url: '/admin/system/city/list/tree',
|
||||
url: '/system/area/tree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -178,4 +178,4 @@ export function expressInfo(data) {
|
|||
method: 'get',
|
||||
params: { ...data }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
line-height: 1.1;
|
||||
color: inherit;
|
||||
}
|
||||
.el-message-box{
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.el-message-box__status + .el-message-box__message{
|
||||
word-break: break-word;
|
||||
|
|
|
@ -20,14 +20,15 @@
|
|||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类图标(180*180)" v-if="biztype.value === 1 || biztype.value === 3">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1')">
|
||||
<div v-if="editPram.extra" class="pictrue">
|
||||
<img :src="editPram.extra">
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
<imageUpload v-model="editPram.extra" :limit="1"/>
|
||||
<!-- <div class="upLoadPicBox" @click="modalPicTap('1')">-->
|
||||
<!-- <div v-if="editPram.extra" class="pictrue">-->
|
||||
<!-- <img :src="editPram.extra">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else class="upLoad">-->
|
||||
<!-- <i class="el-icon-camera cameraIconfont" />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="排序">
|
||||
<el-input-number v-model="editPram.sort" :min="0"/>
|
||||
|
@ -50,7 +51,9 @@
|
|||
<script>
|
||||
import * as categoryApi from '@/api/mall/product/category.js'
|
||||
import * as selfUtil from '@/utils/ZBKJIutil.js'
|
||||
import ImageUpload from "@/components/ImageUpload/index.vue";
|
||||
export default {
|
||||
components: {ImageUpload},
|
||||
// name: "edit"
|
||||
props: {
|
||||
prent: {
|
||||
|
|
|
@ -130,29 +130,29 @@
|
|||
添加指定包邮区域
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<!--<el-row :gutter="20">-->
|
||||
<!--<el-col :span="7">-->
|
||||
<!--<el-form-item label="指定区域不配送" prop="undelivery">-->
|
||||
<!--<el-radio-group v-model="ruleForm.undelivery">-->
|
||||
<!--<el-radio :label="1">开启</el-radio>-->
|
||||
<!--<el-radio :label="0">关闭</el-radio>-->
|
||||
<!--</el-radio-group>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="14">-->
|
||||
<!--<el-form-item v-if="ruleForm.undelivery === 1" class="noBox" prop="city_id3">-->
|
||||
<!--<el-cascader-->
|
||||
<!--v-model="ruleForm.city_id3"-->
|
||||
<!--placeholder="请选择不配送区域"-->
|
||||
<!--:options="cityList"-->
|
||||
<!--:props="props"-->
|
||||
<!--collapse-tags-->
|
||||
<!--clearable-->
|
||||
<!--style="width: 46%"-->
|
||||
<!--/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="7">
|
||||
<el-form-item label="指定区域不配送" prop="noDelivery">
|
||||
<el-radio-group v-model="ruleForm.noDelivery">
|
||||
<el-radio :label="true">开启</el-radio>
|
||||
<el-radio :label="false">关闭</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form-item v-if="ruleForm.noDelivery" class="noBox" prop="shippingTemplatesNoDeliveryRespVOS">
|
||||
<el-cascader
|
||||
v-model="ruleForm.shippingTemplatesNoDeliveryRespVOS"
|
||||
placeholder="请选择不配送区域"
|
||||
:options="cityList"
|
||||
:props="props"
|
||||
collapse-tags
|
||||
clearable
|
||||
style="width: 46%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="排序">
|
||||
<el-input v-model="ruleForm.sort" class="withs" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
|
@ -180,10 +180,10 @@ const defaultRole = {
|
|||
renewalPrice: 0,
|
||||
city_ids: []
|
||||
}],
|
||||
undelivery: 0,
|
||||
noDelivery: false,
|
||||
free: [],
|
||||
undelives: {},
|
||||
city_id3: []
|
||||
shippingTemplatesNoDeliveryRespVOS: []
|
||||
}
|
||||
const kg = '重量(kg)'
|
||||
const m = '体积(m³)'
|
||||
|
@ -221,7 +221,7 @@ export default {
|
|||
appoint: [
|
||||
{ required: true, message: '请选择是否指定包邮', trigger: 'change' }
|
||||
],
|
||||
undelivery: [
|
||||
noDelivery: [
|
||||
{ required: true, message: '请选择是否指定区域不配送', trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
|
@ -230,7 +230,7 @@ export default {
|
|||
region: [
|
||||
{ required: true, message: '请选择活动区域', trigger: 'change' }
|
||||
],
|
||||
city_id3: [
|
||||
shippingTemplatesNoDeliveryRespVOS: [
|
||||
{ type: 'array', required: true, message: '请至少选择一个地区', trigger: 'change' }
|
||||
],
|
||||
first: [
|
||||
|
@ -299,10 +299,10 @@ export default {
|
|||
renewalPrice: 0,
|
||||
city_ids: []
|
||||
}],
|
||||
undelivery: 0,
|
||||
noDelivery: false,
|
||||
free: [],
|
||||
undelives: {},
|
||||
city_id3: []
|
||||
shippingTemplatesNoDeliveryRespVOS: []
|
||||
}
|
||||
},
|
||||
changeRegion(value) {
|
||||
|
@ -430,13 +430,16 @@ export default {
|
|||
this.loading = true;
|
||||
const param = {
|
||||
appoint: this.ruleForm.appoint,
|
||||
noDelivery: this.ruleForm.noDelivery,
|
||||
name: this.ruleForm.name,
|
||||
sort: this.ruleForm.sort,
|
||||
type: this.ruleForm.type,
|
||||
// 配送区域及运费
|
||||
// shippingTemplatesRegionRequestList: [],
|
||||
// shippingTemplatesRegionRespVOList: [],
|
||||
// // 指定包邮设置
|
||||
// shippingTemplatesFreeRequestList: []
|
||||
// shippingTemplatesFreeRespVOList: []
|
||||
// // 指定不送达地区
|
||||
// shippingTemplatesNoDeliveryRespVOS: []
|
||||
}
|
||||
this.ruleForm.region.forEach((el, index) => {
|
||||
el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]])
|
||||
|
@ -445,8 +448,8 @@ export default {
|
|||
}
|
||||
el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
|
||||
})
|
||||
param.shippingTemplatesRegionRequestList = this.ruleForm.region
|
||||
param.shippingTemplatesRegionRequestList.forEach((el, index) => {
|
||||
param.shippingTemplatesRegionRespVOList = this.ruleForm.region
|
||||
param.shippingTemplatesRegionRespVOList.forEach((el, index) => {
|
||||
// delete el.city_ids
|
||||
// delete el.city_id
|
||||
})
|
||||
|
@ -458,12 +461,17 @@ export default {
|
|||
}
|
||||
el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
|
||||
})
|
||||
param.shippingTemplatesFreeRequestList = this.ruleForm.free
|
||||
param.shippingTemplatesFreeRequestList.forEach((el, index) => {
|
||||
param.shippingTemplatesFreeRespVOList = this.ruleForm.free
|
||||
param.shippingTemplatesFreeRespVOList.forEach((el, index) => {
|
||||
// delete el.city_ids
|
||||
// delete el.city_id
|
||||
})
|
||||
}
|
||||
if (this.ruleForm.noDelivery) {
|
||||
param.shippingTemplatesNoDeliveryRespVOS = this.ruleForm.shippingTemplatesNoDeliveryRespVOS.map(a => {
|
||||
return a.slice(0, 2).join(',')
|
||||
}).join(',')
|
||||
}
|
||||
if (this.type === 0) {
|
||||
logistics.shippingSave(param).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
|
@ -474,6 +482,7 @@ export default {
|
|||
setTimeout(() => {
|
||||
this.$emit('getList')
|
||||
}, 600)
|
||||
}).finally(() =>{
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
|
@ -486,6 +495,7 @@ export default {
|
|||
this.$nextTick(() => {
|
||||
this.dialogVisible = false
|
||||
})
|
||||
}).finally(() =>{
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -250,6 +250,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.selWidth{
|
||||
width: 350px !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue