Commit b92e811b authored by knight's avatar knight

集运服务设置

parent 41b3ebb7
......@@ -73,6 +73,7 @@ export const DICT_TYPE = {
ECW_DATA_SOURCE: "data_source", // 数据来源
ECW_REGION_TYPE: "region_trade_type", // 区域类型
ECW_TRANSPORT_TYPE: "transport_type", //货运方式
ECW_PREFERENCE_TRANSPORT_TYPE: "preference_transport_type", //集运货运方式偏好
ECW_KYC_DATA: "member_control_reuest", //会员控单方式
ECW_CHARGE_TYPE: "warehouse_charge_type", //仓储收费方式
ECW_SHELF_TYPE: "shelf_type", //货架类型
......
......@@ -53,11 +53,30 @@
<el-switch v-model="form.defaultPay" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item :label="$t('默认开票')">
<el-switch v-model="form.defaultBilling" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('集运')">
<el-switch v-model="form.isConsService" />
</el-form-item>
</el-col>
<el-col :span="12" v-show="form.isConsService">
<el-form-item :label="$t('运输方式偏好')">
<el-radio-group v-model="preferenceTransportType">
<el-radio
v-for="dict in preferenceTransportData"
:label=parseInt(dict.value)
>
{{ $l(dict, "label") }}</el-radio
>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -73,6 +92,8 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { getTradeCityList } from "@/api/ecw/region"
import { getZhongPaoBest, getZhongPaoPage } from "@/api/ecw/zhongPao"
import { getCustomer, getCustomerLines, customerSettingButton } from "@/api/ecw/customer"
import { DICT_TYPE, getDictDatas } from '@/utils/dict'
import interval from 'echarts/src/scale/Interval'
export default {
name: "CustomerSetting",
components: {
......@@ -81,6 +102,7 @@ export default {
data() {
return {
dialogVisible: false,
preferenceTransportType: 0,
form: {
id: 0,
isShowTidanPrice: false,
......@@ -90,7 +112,8 @@ export default {
customerLines: [],
noConsignee: false,
defaultPay: false,
defaultBilling: false
defaultBilling: false,
isConsService: false,
},
showZhong: false,
showZhong1: false,
......@@ -99,10 +122,13 @@ export default {
zhongLines: [],
warehouseList: [], // 仓库列表
importCityList: [], // 进口地址
paoLines: []
paoLines: [],
preferenceTransportData: getDictDatas(DICT_TYPE.ECW_PREFERENCE_TRANSPORT_TYPE),
}
},
created() {
console.log( this.preferenceTransportData)
getWarehouseList().then((r) => {
this.warehouseList = r.data
})
......@@ -128,7 +154,15 @@ export default {
customerLines: [],
noConsignee: row.noConsignee,
defaultPay: row.defaultPay,
defaultBilling: row.defaultBilling
defaultBilling: row.defaultBilling,
isConsService: row.isConsService,
}
// 判断是否开启集运服务
if (this.form.isConsService){
this.form.isConsService = true
// 选择运输服务偏好
this.preferenceTransportType = row.preferenceTransportType
}
// 打开重泡货开关
if (this.form.weightUnit) {
......@@ -179,6 +213,10 @@ export default {
}
this.updateCustomerLines()
// 集运服务配置
this.form.isConsService = this.form.isConsService ? 1 : 0;
this.form.preferenceTransportType = this.preferenceTransportType
// 检查路线是否启用了但是没选择目的仓
let errors = 0
this.form.customerLines.forEach((line) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment