.
This commit is contained in:
parent
edb73664ea
commit
c7ce2d2eff
@ -169,7 +169,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||
│ │ └──SvgIcon # svg图标
|
||||
│ │ └──Tinymce # 富文本编辑器
|
||||
│ │ └──ThemePicker # 右侧设置按钮,设置组题颜色
|
||||
│ │ └──templatesFrom # 运费模板
|
||||
│ │ └──templatesFrom # 配送模板
|
||||
│ │ └──uploadPicture # 上传图片组件
|
||||
│ │ └──Upload # 上传文件组件
|
||||
│ │ └──UploadExcel # 下载Excel
|
||||
@ -211,7 +211,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||
│ │ └──cityList # 城市数据
|
||||
│ │ └──companyList # 物流公司
|
||||
│ │ └──config # 物流配置
|
||||
│ │ └──shippingTemplates # 运费模板
|
||||
│ │ └──shippingTemplates # 配送模板
|
||||
│ │ └──setting # 系统设置
|
||||
│ │ └──systemStore # 提货点设置
|
||||
│ │ └──appSetting # 应用 小程序 公众号设置
|
||||
|
@ -99,7 +99,7 @@ export function expressDelete(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板列表
|
||||
// 物流配送模板列表
|
||||
export function shippingTemplatesList(data) {
|
||||
return request({
|
||||
url: '/admin/express/shipping/templates/list',
|
||||
@ -108,7 +108,7 @@ export function shippingTemplatesList(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板详情
|
||||
// 物流配送模板详情
|
||||
export function templateDetailApi(data) {
|
||||
return request({
|
||||
url: '/admin/express/shipping/templates/info',
|
||||
@ -117,7 +117,7 @@ export function templateDetailApi(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板包邮
|
||||
// 物流配送模板包邮
|
||||
export function shippingFree(data) {
|
||||
return request({
|
||||
url: '/admin/express/shipping/free/list',
|
||||
@ -126,7 +126,7 @@ export function shippingFree(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板不包邮
|
||||
// 物流配送模板不包邮
|
||||
export function shippingRegion(data) {
|
||||
return request({
|
||||
url: 'admin/express/shipping/region/list',
|
||||
@ -135,7 +135,7 @@ export function shippingRegion(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板新增
|
||||
// 物流配送模板新增
|
||||
export function shippingSave(data) {
|
||||
return request({
|
||||
url: 'admin/express/shipping/templates/save',
|
||||
@ -144,7 +144,7 @@ export function shippingSave(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板更新
|
||||
// 物流配送模板更新
|
||||
export function shippingUpdate(data, id) {
|
||||
return request({
|
||||
url: 'admin/express/shipping/templates/update',
|
||||
@ -154,7 +154,7 @@ export function shippingUpdate(data, id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 物流运费模板删除
|
||||
// 物流配送模板删除
|
||||
export function shippingDetete(data) {
|
||||
return request({
|
||||
url: 'admin/express/shipping/templates/delete',
|
||||
|
@ -326,7 +326,7 @@ export function productGetRuleApi() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 商品 -- 获取运费模板
|
||||
* @description 商品 -- 获取配送模板
|
||||
*/
|
||||
export function productGetTemplateApi() {
|
||||
return request({
|
||||
|
@ -146,7 +146,7 @@ const operationRouter = {
|
||||
path: 'freightSet',
|
||||
component: () => import('@/views/systemSetting/deliverGoods/freightSet'),
|
||||
name: 'freightSet',
|
||||
meta: { title: '运费模板', noCache: true }
|
||||
meta: { title: '配送模板', noCache: true }
|
||||
},
|
||||
]
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="dialogVisible"
|
||||
title="运费模板"
|
||||
title="配送模板"
|
||||
:visible.sync="dialogVisible"
|
||||
width="1000px"
|
||||
:before-close="handleClose"
|
||||
@ -15,9 +15,10 @@
|
||||
<el-radio :label="1">按件数</el-radio>
|
||||
<el-radio :label="2">按重量</el-radio>
|
||||
<el-radio :label="3">按体积</el-radio>
|
||||
<el-radio :label="4">按距离</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="配送区域及运费" prop="region">
|
||||
<el-form-item label="配送区域及费用" prop="region">
|
||||
<el-table v-loading="listLoading" :data="ruleForm.region" border fit highlight-current-row style="width: 100%" size="mini" class="tempBox">
|
||||
<el-table-column align="center" label="可配送区域" min-width="260">
|
||||
<template slot-scope="scope">
|
||||
@ -42,7 +43,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120px" align="center" label="运费(元)" prop="firstPrice">
|
||||
<el-table-column min-width="120px" align="center" label="费用(元)" prop="firstPrice">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item :rules="rules.firstPrice" :prop="'region.'+scope.$index+'.firstPrice'">
|
||||
<el-input-number v-model="scope.row.firstPrice" controls-position="right" />
|
||||
@ -186,6 +187,7 @@ const defaultRole = {
|
||||
}
|
||||
const kg = '重量(kg)'
|
||||
const m = '体积(m³)'
|
||||
const km = '公里(km)'
|
||||
const statusMap = [
|
||||
{
|
||||
title: '首件',
|
||||
@ -201,6 +203,11 @@ const statusMap = [
|
||||
title: `首件${m}`,
|
||||
title2: `续件${m}`,
|
||||
title3: `包邮${m}`
|
||||
},
|
||||
{
|
||||
title: `首${km}`,
|
||||
title2: `续${km}`,
|
||||
title3: `免费${km}`
|
||||
}
|
||||
]
|
||||
export default {
|
||||
@ -239,7 +246,7 @@ export default {
|
||||
{ required: true, message: '请输入', trigger: 'blur' }
|
||||
],
|
||||
firstPrice: [
|
||||
{ required: true, message: '请输入运费', trigger: 'blur' }
|
||||
{ required: true, message: '请输入费用', trigger: 'blur' }
|
||||
],
|
||||
renewalPrice: [
|
||||
{ required: true, message: '请输入续费', trigger: 'blur' }
|
||||
@ -422,7 +429,7 @@ export default {
|
||||
name: this.ruleForm.name,
|
||||
sort: this.ruleForm.sort,
|
||||
type: this.ruleForm.type,
|
||||
// 配送区域及运费
|
||||
// 配送区域及费用
|
||||
// shippingTemplatesRegionRequestList: [],
|
||||
// // 指定包邮设置
|
||||
// shippingTemplatesFreeRequestList: []
|
||||
|
@ -11,7 +11,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button type="primary" size="mini" @click="handleSubmit()" v-hasPermi="['admin:shipping:templates:save']">添加运费模板</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleSubmit()" v-hasPermi="['admin:shipping:templates:save']">添加配送模板</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@ -103,7 +103,8 @@ export default {
|
||||
const statusMap = {
|
||||
1: '按件数',
|
||||
2: '按重量',
|
||||
3: '按体积'
|
||||
3: '按体积',
|
||||
4: '按距离'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
@ -121,7 +121,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<el-form-item label="配送模板:" prop="tempId">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidthd">
|
||||
<el-option
|
||||
@ -131,7 +131,7 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<!--<el-button class="mr15" @click="addTem">添加运费模板</el-button>-->
|
||||
<!--<el-button class="mr15" @click="addTem">添加配送模板</el-button>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -362,7 +362,7 @@
|
||||
loading: false,
|
||||
fullscreenLoading: false,
|
||||
merCateList: [], // 商户分类筛选
|
||||
shippingList: [], // 运费模板
|
||||
shippingList: [], // 配送模板
|
||||
seckillTime: [],
|
||||
ruleValidate: {
|
||||
productId: [
|
||||
@ -384,7 +384,7 @@
|
||||
{ required: true, message: '请输入砍价商品简介', trigger: 'blur' }
|
||||
],
|
||||
tempId: [
|
||||
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
||||
{ required: true, message: '请选择配送模板', trigger: 'change' }
|
||||
],
|
||||
timeId: [
|
||||
{ required: true, message: '请选择活动时间', trigger: 'change' }
|
||||
@ -523,13 +523,13 @@
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 运费模板;
|
||||
// 配送模板;
|
||||
getShippingList() {
|
||||
shippingTemplatesList(this.tempData).then(res => {
|
||||
this.shippingList = res.list
|
||||
})
|
||||
},
|
||||
// 运费模板
|
||||
// 配送模板
|
||||
addTem() {
|
||||
this.$refs.addTemplates.dialogVisible = true
|
||||
this.$refs.addTemplates.getCityList()
|
||||
|
@ -133,7 +133,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<el-form-item label="配送模板:" prop="tempId">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidthd">
|
||||
<el-option
|
||||
@ -143,7 +143,7 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<!--<el-button class="mr15" @click="addTem">添加运费模板</el-button>-->
|
||||
<!--<el-button class="mr15" @click="addTem">添加配送模板</el-button>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -369,7 +369,7 @@
|
||||
loading: false,
|
||||
fullscreenLoading: false,
|
||||
merCateList: [], // 商户分类筛选
|
||||
shippingList: [], // 运费模板
|
||||
shippingList: [], // 配送模板
|
||||
seckillTime: [],
|
||||
ruleValidate: {
|
||||
productId: [
|
||||
@ -391,7 +391,7 @@
|
||||
{ required: true, message: '请输入拼团商品简介', trigger: 'blur' }
|
||||
],
|
||||
tempId: [
|
||||
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
||||
{ required: true, message: '请选择配送模板', trigger: 'change' }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: '请上传商品图', trigger: 'change' }
|
||||
@ -532,13 +532,13 @@
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 运费模板;
|
||||
// 配送模板;
|
||||
getShippingList() {
|
||||
shippingTemplatesList(this.tempData).then(res => {
|
||||
this.shippingList = res.list
|
||||
})
|
||||
},
|
||||
// 运费模板
|
||||
// 配送模板
|
||||
addTem() {
|
||||
this.$refs.addTemplates.dialogVisible = true
|
||||
this.$refs.addTemplates.getCityList()
|
||||
|
@ -86,7 +86,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<el-form-item label="配送模板:" prop="tempId">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidth">
|
||||
<el-option
|
||||
@ -96,7 +96,7 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<!--<el-button class="mr15" @click="addTem">添加运费模板</el-button>-->
|
||||
<!--<el-button class="mr15" @click="addTem">添加配送模板</el-button>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -345,7 +345,7 @@
|
||||
loading: false,
|
||||
fullscreenLoading: false,
|
||||
merCateList: [], // 商户分类筛选
|
||||
shippingList: [], // 运费模板
|
||||
shippingList: [], // 配送模板
|
||||
seckillTime: [],
|
||||
ruleValidate: {
|
||||
productId: [
|
||||
@ -367,7 +367,7 @@
|
||||
{ required: true, message: '请输入秒杀商品简介', trigger: 'blur' }
|
||||
],
|
||||
tempId: [
|
||||
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
||||
{ required: true, message: '请选择配送模板', trigger: 'change' }
|
||||
],
|
||||
timeId: [
|
||||
{ required: true, message: '请选择活动时间', trigger: 'change' }
|
||||
@ -496,13 +496,13 @@
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 运费模板;
|
||||
// 配送模板;
|
||||
getShippingList() {
|
||||
shippingTemplatesList(this.tempData).then(res => {
|
||||
this.shippingList = res.list
|
||||
})
|
||||
},
|
||||
// 运费模板
|
||||
// 配送模板
|
||||
addTem() {
|
||||
this.$refs.addTemplates.dialogVisible = true
|
||||
this.$refs.addTemplates.getCityList()
|
||||
|
@ -72,8 +72,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="18" :sm="18" :md="18" :lg="12" :xl="12">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="mr20" :disabled="isDisabled" style="width:100%;">
|
||||
<el-form-item label="配送模板:" prop="tempId">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="mr20" style="width:100%;">
|
||||
<el-option
|
||||
v-for="item in shippingList"
|
||||
:key="item.id"
|
||||
@ -84,7 +84,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="6" :sm="6" :md="6" :lg="12" :xl="12">
|
||||
<el-button v-show="!isDisabled" class="mr15" @click="addTem">运费模板</el-button>
|
||||
<el-button v-show="!isDisabled" class="mr15" @click="addTem">配送模板</el-button>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品规格:" props="specType">
|
||||
@ -93,9 +93,9 @@
|
||||
<el-radio :label="true">多规格</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="佣金设置:" props="isSub">
|
||||
<el-form-item label="基础设置:" props="isSub">
|
||||
<el-radio-group v-model="formValidate.isSub" @change="onChangetype(formValidate.isSub)" :disabled="isDisabled">
|
||||
<el-radio :label="true" class="radio">单独设置</el-radio>
|
||||
<!-- <el-radio :label="true" class="radio">单独设置</el-radio>-->
|
||||
<el-radio :label="false">默认设置</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@ -422,8 +422,8 @@
|
||||
otPrice: 0,
|
||||
stock: 0,
|
||||
barCode: '',
|
||||
weight: 0,
|
||||
volume: 0
|
||||
// weight: 0,
|
||||
// volume: 0
|
||||
}],
|
||||
attr: [],
|
||||
selectRule: '',
|
||||
@ -433,7 +433,7 @@
|
||||
id: 0,
|
||||
couponIds: [],
|
||||
coupons: [],
|
||||
activity: ['默认','秒杀','砍价','拼团']
|
||||
activity: ['默认','秒杀']
|
||||
}
|
||||
const objTitle = {
|
||||
price: {
|
||||
@ -451,12 +451,12 @@
|
||||
barCode: {
|
||||
title: '商品编号'
|
||||
},
|
||||
weight: {
|
||||
title: '重量(KG)'
|
||||
},
|
||||
volume: {
|
||||
title: '体积(m³)'
|
||||
}
|
||||
// weight: {
|
||||
// title: '重量(KG)'
|
||||
// },
|
||||
// volume: {
|
||||
// title: '体积(m³)'
|
||||
// }
|
||||
}
|
||||
export default {
|
||||
name: 'ProductProductAdd',
|
||||
@ -464,7 +464,7 @@
|
||||
data() {
|
||||
return {
|
||||
isDisabled: this.$route.params.isDisabled==='1'?true:false,
|
||||
activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' },
|
||||
activity: { '默认': 'red', '秒杀': 'blue' },
|
||||
props2: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
@ -482,7 +482,7 @@
|
||||
ManyAttrValue: [Object.assign({}, defaultObj.attrValue[0])], // 多规格
|
||||
ruleList: [],
|
||||
merCateList: [], // 商户分类筛选
|
||||
shippingList: [], // 运费模板
|
||||
shippingList: [], // 配送模板
|
||||
formThead: Object.assign({}, objTitle),
|
||||
formValidate: Object.assign({}, defaultObj),
|
||||
formDynamics: {
|
||||
@ -535,7 +535,7 @@
|
||||
{ required: true, message: '请输入商品简介', trigger: 'blur' }
|
||||
],
|
||||
tempId: [
|
||||
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
||||
{ required: true, message: '请选择配送模板', trigger: 'change' }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: '请上传商品图', trigger: 'change' }
|
||||
@ -706,8 +706,8 @@
|
||||
otPrice: 0,
|
||||
stock: 0,
|
||||
barCode: '',
|
||||
weight: 0,
|
||||
volume: 0,
|
||||
// weight: 0,
|
||||
// volume: 0,
|
||||
brokerage: 0,
|
||||
brokerage_two: 0
|
||||
}
|
||||
@ -737,8 +737,8 @@
|
||||
otPrice: 0,
|
||||
stock: 0,
|
||||
barCode: '',
|
||||
weight: 0,
|
||||
volume: 0,
|
||||
// weight: 0,
|
||||
// volume: 0,
|
||||
brokerage: 0,
|
||||
brokerage_two: 0,
|
||||
attrValue: { [v['attrName']]: vv }
|
||||
@ -756,7 +756,7 @@
|
||||
return res
|
||||
}
|
||||
},
|
||||
// 运费模板
|
||||
// 配送模板
|
||||
addTem() {
|
||||
this.$refs.addTemplates.dialogVisible = true
|
||||
this.$refs.addTemplates.getCityList()
|
||||
@ -823,7 +823,7 @@
|
||||
this.ruleList = list
|
||||
})
|
||||
},
|
||||
// 运费模板;
|
||||
// 配送模板;
|
||||
getShippingList() {
|
||||
shippingTemplatesList(this.tempData).then(res => {
|
||||
this.shippingList = res.list
|
||||
@ -870,8 +870,8 @@
|
||||
this.$set(val, 'otPrice', this.oneFormBatch[0].otPrice)
|
||||
this.$set(val, 'stock', this.oneFormBatch[0].stock)
|
||||
this.$set(val, 'barCode', this.oneFormBatch[0].barCode)
|
||||
this.$set(val, 'weight', this.oneFormBatch[0].weight)
|
||||
this.$set(val, 'volume', this.oneFormBatch[0].volume)
|
||||
// this.$set(val, 'weight', this.oneFormBatch[0].weight)
|
||||
// this.$set(val, 'volume', this.oneFormBatch[0].volume)
|
||||
this.$set(val, 'brokerage', this.oneFormBatch[0].brokerage)
|
||||
this.$set(val, 'brokerageTwo', this.oneFormBatch[0].brokerageTwo)
|
||||
}
|
||||
@ -984,7 +984,7 @@
|
||||
ficti: info.ficti,
|
||||
coupons: info.coupons,
|
||||
couponIds: info.couponIds,
|
||||
activity: info.activityStr ? info.activityStr.split(',') : ['默认','秒杀','砍价','拼团']
|
||||
activity: info.activityStr ? info.activityStr.split(',') : ['默认','秒杀']
|
||||
}
|
||||
marketingSendApi({type:3}).then(res=>{
|
||||
if(this.formValidate.couponIds !== null){
|
||||
|
@ -62,7 +62,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<el-form-item label="配送模板:" prop="tempId">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidth">
|
||||
<el-option
|
||||
v-for="item in shippingList"
|
||||
@ -319,7 +319,7 @@
|
||||
{required: true, message: '请输入单位', trigger: 'blur'}
|
||||
],
|
||||
tempId: [
|
||||
{required: true, message: '请选择运费模板', trigger: 'change', type: 'number'}
|
||||
{required: true, message: '请选择配送模板', trigger: 'change', type: 'number'}
|
||||
],
|
||||
keyword: [
|
||||
{required: true, message: '请输入商品关键字', trigger: 'blur'}
|
||||
@ -485,7 +485,7 @@
|
||||
return res
|
||||
}
|
||||
},
|
||||
// 获取运费模板;
|
||||
// 获取配送模板;
|
||||
productGetTemplate() {
|
||||
shippingTemplatesList(this.tempData).then(res => {
|
||||
this.shippingList = res.list
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="dialogVisible"
|
||||
title="运费模板"
|
||||
title="配送模板"
|
||||
:visible.sync="dialogVisible"
|
||||
width="1000px"
|
||||
:before-close="handleClose"
|
||||
@ -15,9 +15,10 @@
|
||||
<el-radio :label="1">按件数</el-radio>
|
||||
<el-radio :label="2">按重量</el-radio>
|
||||
<el-radio :label="3">按体积</el-radio>
|
||||
<el-radio :label="4">按距离</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="配送区域及运费" prop="region">
|
||||
<el-form-item label="配送区域及费用" prop="region">
|
||||
<el-table v-loading="listLoading" :data="ruleForm.region" border fit highlight-current-row style="width: 100%" size="mini" class="tempBox">
|
||||
<el-table-column align="center" label="可配送区域" min-width="260">
|
||||
<template slot-scope="scope">
|
||||
@ -42,7 +43,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120px" align="center" label="运费(元)" prop="firstPrice">
|
||||
<el-table-column min-width="120px" align="center" label="费用(元)" prop="firstPrice">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item :rules="rules.firstPrice" :prop="'region.'+scope.$index+'.firstPrice'">
|
||||
<el-input-number v-model="scope.row.firstPrice" controls-position="right" :min="0" />
|
||||
@ -107,7 +108,7 @@
|
||||
<el-input-number v-model="row.number" controls-position="right" :step-strictly="ruleForm.type===1?true:false" :min="ruleForm.type===1?1:0.1"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120px" align="center" label="包邮金额(元)">
|
||||
<el-table-column min-width="120px" align="center" label="包邮金额(元)" v-if="isShowPrice">
|
||||
<template slot-scope="{row}">
|
||||
<el-input-number v-model="row.price" controls-position="right" />
|
||||
</template>
|
||||
@ -187,6 +188,7 @@ const defaultRole = {
|
||||
}
|
||||
const kg = '重量(kg)'
|
||||
const m = '体积(m³)'
|
||||
const km = '公里(km)'
|
||||
const statusMap = [
|
||||
{
|
||||
title: '首件',
|
||||
@ -202,6 +204,11 @@ const statusMap = [
|
||||
title: `首件${m}`,
|
||||
title2: `续件${m}`,
|
||||
title3: `包邮${m}`
|
||||
},
|
||||
{
|
||||
title: `首${km}`,
|
||||
title2: `续${km}`,
|
||||
title3: `免费${km}`
|
||||
}
|
||||
]
|
||||
export default {
|
||||
@ -240,7 +247,7 @@ export default {
|
||||
{ required: true, message: '请输入', trigger: 'blur' }
|
||||
],
|
||||
firstPrice: [
|
||||
{ required: true, message: '请输入运费', trigger: 'blur' }
|
||||
{ required: true, message: '请输入费用', trigger: 'blur' }
|
||||
],
|
||||
renewalPrice: [
|
||||
{ required: true, message: '请输入续费', trigger: 'blur' }
|
||||
@ -262,6 +269,7 @@ export default {
|
||||
title2: '续件',
|
||||
title3: '包邮件数'
|
||||
},
|
||||
isShowPrice: true,
|
||||
tempId: 0,
|
||||
type: 0 // 0添加 1编辑
|
||||
}
|
||||
@ -310,6 +318,11 @@ export default {
|
||||
},
|
||||
changeRadio(num) {
|
||||
this.columns = Object.assign({}, statusMap[num - 1])
|
||||
if (num === 4) {
|
||||
this.isShowPrice = false;
|
||||
} else {
|
||||
this.isShowPrice = true;
|
||||
}
|
||||
},
|
||||
// 添加配送区域
|
||||
addRegion(region) {
|
||||
@ -423,7 +436,7 @@ export default {
|
||||
name: this.ruleForm.name,
|
||||
sort: this.ruleForm.sort,
|
||||
type: this.ruleForm.type,
|
||||
// 配送区域及运费
|
||||
// 配送区域及费用
|
||||
// shippingTemplatesRegionRequestList: [],
|
||||
// // 指定包邮设置
|
||||
// shippingTemplatesFreeRequestList: []
|
||||
|
@ -11,7 +11,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button type="primary" size="mini" @click="handleSubmit()" v-hasPermi="['admin:shipping:templates:save']">添加运费模板</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleSubmit()" v-hasPermi="['admin:shipping:templates:save']">添加配送模板</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@ -108,7 +108,8 @@ export default {
|
||||
const statusMap = {
|
||||
1: '按件数',
|
||||
2: '按重量',
|
||||
3: '按体积'
|
||||
3: '按体积',
|
||||
4: '按距离'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="dialogVisible"
|
||||
title="运费模板"
|
||||
title="配送模板"
|
||||
:visible.sync="dialogVisible"
|
||||
width="1000px"
|
||||
:before-close="handleClose"
|
||||
@ -15,9 +15,10 @@
|
||||
<el-radio :label="1">按件数</el-radio>
|
||||
<el-radio :label="2">按重量</el-radio>
|
||||
<el-radio :label="3">按体积</el-radio>
|
||||
<el-radio :label="4">按距离</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="配送区域及运费" prop="region">
|
||||
<el-form-item label="配送区域及费用" prop="region">
|
||||
<el-table v-loading="listLoading" :data="ruleForm.region" border fit highlight-current-row style="width: 100%" size="mini" class="tempBox">
|
||||
<el-table-column align="center" label="可配送区域" min-width="260">
|
||||
<template slot-scope="scope">
|
||||
@ -186,6 +187,7 @@ const defaultRole = {
|
||||
}
|
||||
const kg = '重量(kg)'
|
||||
const m = '体积(m³)'
|
||||
const km = '公里(km)'
|
||||
const statusMap = [
|
||||
{
|
||||
title: '首件',
|
||||
@ -201,6 +203,11 @@ const statusMap = [
|
||||
title: `首件${m}`,
|
||||
title2: `续件${m}`,
|
||||
title3: `包邮${m}`
|
||||
},
|
||||
{
|
||||
title: `首${km}`,
|
||||
title2: `续${km}`,
|
||||
title3: `免费${km}`
|
||||
}
|
||||
]
|
||||
export default {
|
||||
|
@ -11,7 +11,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button type="primary" size="mini" @click="handleSubmit()">添加运费模板</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleSubmit()">添加配送模板</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@ -107,7 +107,8 @@ export default {
|
||||
const statusMap = {
|
||||
1: '按件数',
|
||||
2: '按重量',
|
||||
3: '按体积'
|
||||
3: '按体积',
|
||||
4: '按距离'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user