物流模板

pull/2/head
Jruome 2023-05-15 10:16:19 +08:00
parent 153a26612d
commit 89c09d32b4
5 changed files with 62 additions and 45 deletions

View File

@ -22,7 +22,7 @@ export function cityList(data) {
// 城市列表 // 城市列表
export function cityListTree() { export function cityListTree() {
return request({ return request({
url: '/admin/system/city/list/tree', url: '/system/area/tree',
method: 'get' method: 'get'
}) })
} }
@ -178,4 +178,4 @@ export function expressInfo(data) {
method: 'get', method: 'get',
params: { ...data } params: { ...data }
}) })
} }

View File

@ -59,6 +59,9 @@
line-height: 1.1; line-height: 1.1;
color: inherit; color: inherit;
} }
.el-message-box{
width: 50%;
}
.el-message-box__status + .el-message-box__message{ .el-message-box__status + .el-message-box__message{
word-break: break-word; word-break: break-word;

View File

@ -20,14 +20,15 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="分类图标(180*180)" v-if="biztype.value === 1 || biztype.value === 3"> <el-form-item label="分类图标(180*180)" v-if="biztype.value === 1 || biztype.value === 3">
<div class="upLoadPicBox" @click="modalPicTap('1')"> <imageUpload v-model="editPram.extra" :limit="1"/>
<div v-if="editPram.extra" class="pictrue"> <!-- <div class="upLoadPicBox" @click="modalPicTap('1')">-->
<img :src="editPram.extra"> <!-- <div v-if="editPram.extra" class="pictrue">-->
</div> <!-- <img :src="editPram.extra">-->
<div v-else class="upLoad"> <!-- </div>-->
<i class="el-icon-camera cameraIconfont" /> <!-- <div v-else class="upLoad">-->
</div> <!-- <i class="el-icon-camera cameraIconfont" />-->
</div> <!-- </div>-->
<!-- </div>-->
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input-number v-model="editPram.sort" :min="0"/> <el-input-number v-model="editPram.sort" :min="0"/>
@ -50,7 +51,9 @@
<script> <script>
import * as categoryApi from '@/api/mall/product/category.js' import * as categoryApi from '@/api/mall/product/category.js'
import * as selfUtil from '@/utils/ZBKJIutil.js' import * as selfUtil from '@/utils/ZBKJIutil.js'
import ImageUpload from "@/components/ImageUpload/index.vue";
export default { export default {
components: {ImageUpload},
// name: "edit" // name: "edit"
props: { props: {
prent: { prent: {

View File

@ -130,29 +130,29 @@
添加指定包邮区域 添加指定包邮区域
</el-button> </el-button>
</el-form-item> </el-form-item>
<!--<el-row :gutter="20">--> <el-row :gutter="20">
<!--<el-col :span="7">--> <el-col :span="7">
<!--<el-form-item label="指定区域不配送" prop="undelivery">--> <el-form-item label="指定区域不配送" prop="noDelivery">
<!--<el-radio-group v-model="ruleForm.undelivery">--> <el-radio-group v-model="ruleForm.noDelivery">
<!--<el-radio :label="1">开启</el-radio>--> <el-radio :label="true">开启</el-radio>
<!--<el-radio :label="0">关闭</el-radio>--> <el-radio :label="false">关闭</el-radio>
<!--</el-radio-group>--> </el-radio-group>
<!--</el-form-item>--> </el-form-item>
<!--</el-col>--> </el-col>
<!--<el-col :span="14">--> <el-col :span="14">
<!--<el-form-item v-if="ruleForm.undelivery === 1" class="noBox" prop="city_id3">--> <el-form-item v-if="ruleForm.noDelivery" class="noBox" prop="shippingTemplatesNoDeliveryRespVOS">
<!--<el-cascader--> <el-cascader
<!--v-model="ruleForm.city_id3"--> v-model="ruleForm.shippingTemplatesNoDeliveryRespVOS"
<!--placeholder="请选择不配送区域"--> placeholder="请选择不配送区域"
<!--:options="cityList"--> :options="cityList"
<!--:props="props"--> :props="props"
<!--collapse-tags--> collapse-tags
<!--clearable--> clearable
<!--style="width: 46%"--> style="width: 46%"
<!--/>--> />
<!--</el-form-item>--> </el-form-item>
<!--</el-col>--> </el-col>
<!--</el-row>--> </el-row>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input v-model="ruleForm.sort" class="withs" placeholder="请输入排序" /> <el-input v-model="ruleForm.sort" class="withs" placeholder="请输入排序" />
</el-form-item> </el-form-item>
@ -180,10 +180,10 @@ const defaultRole = {
renewalPrice: 0, renewalPrice: 0,
city_ids: [] city_ids: []
}], }],
undelivery: 0, noDelivery: false,
free: [], free: [],
undelives: {}, undelives: {},
city_id3: [] shippingTemplatesNoDeliveryRespVOS: []
} }
const kg = '重量kg' const kg = '重量kg'
const m = '体积' const m = '体积'
@ -221,7 +221,7 @@ export default {
appoint: [ appoint: [
{ required: true, message: '请选择是否指定包邮', trigger: 'change' } { required: true, message: '请选择是否指定包邮', trigger: 'change' }
], ],
undelivery: [ noDelivery: [
{ required: true, message: '请选择是否指定区域不配送', trigger: 'change' } { required: true, message: '请选择是否指定区域不配送', trigger: 'change' }
], ],
type: [ type: [
@ -230,7 +230,7 @@ export default {
region: [ region: [
{ required: true, message: '请选择活动区域', trigger: 'change' } { required: true, message: '请选择活动区域', trigger: 'change' }
], ],
city_id3: [ shippingTemplatesNoDeliveryRespVOS: [
{ type: 'array', required: true, message: '请至少选择一个地区', trigger: 'change' } { type: 'array', required: true, message: '请至少选择一个地区', trigger: 'change' }
], ],
first: [ first: [
@ -299,10 +299,10 @@ export default {
renewalPrice: 0, renewalPrice: 0,
city_ids: [] city_ids: []
}], }],
undelivery: 0, noDelivery: false,
free: [], free: [],
undelives: {}, undelives: {},
city_id3: [] shippingTemplatesNoDeliveryRespVOS: []
} }
}, },
changeRegion(value) { changeRegion(value) {
@ -430,13 +430,16 @@ export default {
this.loading = true; this.loading = true;
const param = { const param = {
appoint: this.ruleForm.appoint, appoint: this.ruleForm.appoint,
noDelivery: this.ruleForm.noDelivery,
name: this.ruleForm.name, name: this.ruleForm.name,
sort: this.ruleForm.sort, sort: this.ruleForm.sort,
type: this.ruleForm.type, type: this.ruleForm.type,
// //
// shippingTemplatesRegionRequestList: [], // shippingTemplatesRegionRespVOList: [],
// // // //
// shippingTemplatesFreeRequestList: [] // shippingTemplatesFreeRespVOList: []
// //
// shippingTemplatesNoDeliveryRespVOS: []
} }
this.ruleForm.region.forEach((el, index) => { this.ruleForm.region.forEach((el, index) => {
el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) 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' el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
}) })
param.shippingTemplatesRegionRequestList = this.ruleForm.region param.shippingTemplatesRegionRespVOList = this.ruleForm.region
param.shippingTemplatesRegionRequestList.forEach((el, index) => { param.shippingTemplatesRegionRespVOList.forEach((el, index) => {
// delete el.city_ids // delete el.city_ids
// delete el.city_id // delete el.city_id
}) })
@ -458,12 +461,17 @@ export default {
} }
el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all' el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
}) })
param.shippingTemplatesFreeRequestList = this.ruleForm.free param.shippingTemplatesFreeRespVOList = this.ruleForm.free
param.shippingTemplatesFreeRequestList.forEach((el, index) => { param.shippingTemplatesFreeRespVOList.forEach((el, index) => {
// delete el.city_ids // delete el.city_ids
// delete el.city_id // 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) { if (this.type === 0) {
logistics.shippingSave(param).then(res => { logistics.shippingSave(param).then(res => {
this.$message.success('操作成功') this.$message.success('操作成功')
@ -474,6 +482,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.$emit('getList') this.$emit('getList')
}, 600) }, 600)
}).finally(() =>{
this.loading = false; this.loading = false;
}) })
} else { } else {
@ -486,6 +495,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.dialogVisible = false this.dialogVisible = false
}) })
}).finally(() =>{
this.loading = false; this.loading = false;
}) })
} }

View File

@ -250,6 +250,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.selWidth{ .selWidth{
width: 350px !important; width: 350px !important;
} }