|
|
|
@ -19,6 +19,20 @@ |
|
|
|
onblur="value=value.replace(/(^\s*)|(\s*$)/g, '')" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="仓库"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="params.storehouseId" placeholder="请选择具体仓库" clearable> |
|
|
|
<el-option |
|
|
|
v-for="(item,index) in storehouseList" |
|
|
|
:key="index" |
|
|
|
:label="item.storehouseName" |
|
|
|
:value="item.storehouseId" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="计费方式"> |
|
|
|
<el-radio-group v-model="params.chargeType"> |
|
|
|
<el-radio :disabled="isDisabled" :label="1">按件数</el-radio> |
|
|
|
@ -145,6 +159,7 @@ |
|
|
|
// import Setting from "@/api/Setting"; |
|
|
|
import { logisticsGetById, logisticsAdd, logisticsUpdate } from '@/api/shopSys' |
|
|
|
import areaJSON from '@/assets/area' |
|
|
|
import { storehouseGetAll } from '@/api/shopSys' |
|
|
|
|
|
|
|
export default { |
|
|
|
props: { |
|
|
|
@ -168,6 +183,7 @@ export default { |
|
|
|
}, |
|
|
|
params: { |
|
|
|
logisticsName: '', |
|
|
|
storehouseId: 0, |
|
|
|
chargeType: 1, |
|
|
|
charges: [ |
|
|
|
{ |
|
|
|
@ -179,6 +195,7 @@ export default { |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
storehouseList: [], |
|
|
|
selectArea: [], |
|
|
|
areaVisible: false, |
|
|
|
areaList: [], |
|
|
|
@ -228,8 +245,15 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getStorehouseList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取商品分组 |
|
|
|
async getStorehouseList() { |
|
|
|
const res = await storehouseGetAll({ page: 1, pageSize: 100 |
|
|
|
}) |
|
|
|
this.storehouseList = res.data.list |
|
|
|
}, |
|
|
|
// 初始化地区 |
|
|
|
initArea() { |
|
|
|
const { province_list, city_list } = areaJSON |
|
|
|
@ -431,6 +455,8 @@ export default { |
|
|
|
async onSubmit() { |
|
|
|
if (this.params.logisticsName === '') { |
|
|
|
this.$message.error('请输入方案名称') |
|
|
|
} else if (this.params.storehouseId === null ||this.params.storehouseId === '' || this.params.storehouseId === 0) { |
|
|
|
this.$message.error('请选择仓库') |
|
|
|
} else if (this.type === 'add') { |
|
|
|
this.add() |
|
|
|
} else if (this.type === 'edit') { |
|
|
|
|