Commit a5b83de3 authored by dragondean@qq.com's avatar dragondean@qq.com

部分bug

parent 054714e3
<template> <template>
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false"> <el-dialog :title="$t('选择联系人')" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10 flex-center"> <div class="header mb-10 flex-center">
<div class="flex-center">关键字</div> <div class="flex-center">{{$t('关键字')}}</div>
<el-input v-model="form.searchKey" clearable class="w-200"></el-input> <el-input v-model="form.searchKey" clearable class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button> <el-button type="primary" class="ml-10" @click="handleQuery">{{$t('搜索')}}</el-button>
</div> </div>
<div class="list"> <div class="list">
<div class="list-item" v-for="item in list" :key="item.customerContactsId" @click="choose(item)"> <div class="list-item" v-for="item in list" :key="item.customerContactsId" @click="choose(item)">
<div class="item-box"> <div class="item-box">
<div class="line"> <div class="line">
<div class="label">姓名</div> <div class="label">{{$t('姓名')}}</div>
<div class="value">{{item.contactsName}}</div> <div class="value">{{item.contactsName}}</div>
</div> </div>
<div class="line"> <div class="line">
<div class="label">电话</div> <div class="label">{{$t('电话')}}</div>
<div class="value">+{{item.areaCode}} {{item.phoneNew}}</div> <div class="value">+{{item.areaCode}} {{item.phoneNew}}</div>
</div> </div>
<div class="line"> <div class="line">
<div class="label">邮箱</div> <div class="label">{{$t('邮箱')}}</div>
<div class="value">{{item.email}}</div> <div class="value">{{item.email}}</div>
</div> </div>
<div class="line"> <div class="line">
<div class="label">公司</div> <div class="label">{{$t('公司')}}</div>
<div class="value">{{item.company}}</div> <div class="value">{{item.company}}</div>
</div> </div>
</div> </div>
......
<template> <template>
<el-dialog :visible.sync="show" title="快速新建客户" :close-on-click-modal="false" class="quick-create-customer"> <el-dialog :visible.sync="show" :title="$t('快速新建客户')" :close-on-click-modal="false" class="quick-create-customer">
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :validate-on-rule-change="false"> <el-form ref="form" :model="form" :rules="rules" label-width="100px" :validate-on-rule-change="false">
<el-form-item label="客户类别" prop="type"> <el-form-item :label="$t('客户类别')" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector> <dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="客户名称" prop="name"> <el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="form.name" placeholder="请输入客户名称" /> <el-input v-model="form.name" :placeholder="$t('请输入客户名称')" />
</el-form-item> </el-form-item>
<el-form-item label="联系人" prop="customerContacts.0.name"> <el-form-item :label="$t('联系人')" prop="customerContacts.0.name">
<el-input v-model="form.customerContacts[0].name" placeholder="请输入联系人" /> <el-input v-model="form.customerContacts[0].name" :placeholder="$t('请输入联系人')" />
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="customerContacts.0.phoneNew"> <el-form-item :label="$t('手机号')" prop="customerContacts.0.phoneNew">
<!-- <el-select v-model="form.customerContacts[0].areaCode" placeholder="请选择区号" filterable class="w-200"> <!-- <el-select v-model="form.customerContacts[0].areaCode" :placeholder="$t('请选择区号')" filterable class="w-200">
<el-option v-for="(item, index) in countryList" <el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" /> :key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select> --> </el-select> -->
<area-code-selector v-model="form.customerContacts[0].areaCode" /> <area-code-selector v-model="form.customerContacts[0].areaCode" />
<el-input v-model="form.customerContacts[0].phoneNew" maxlength="11" placeholder="请输入联系方式" class="w-150 ml-10"/> <el-input v-model="form.customerContacts[0].phoneNew" maxlength="11" :placeholder="$t('请输入联系方式')" class="w-150 ml-10"/>
</el-form-item> </el-form-item>
<el-form-item label="客户来源" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" placeholder="请选择客户来源"> <el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item :label="$t('创建时间')" prop="createTime">
<el-date-picker <el-date-picker
v-model="form.createTime" v-model="form.createTime"
type="datetime" type="datetime"
value-format="timestamp" value-format="timestamp"
placeholder="选择创建时间"> :placeholder="$t('选择创建时间')">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="客户经理" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理"> <el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')">
<el-option v-for="item in serviceUserList" <el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" /> :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item :label="$t('备注')" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注"/> <el-input v-model="form.remarks" :placeholder="$t('请输入备注')"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">{{$t('取消')}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -74,7 +74,20 @@ export default { ...@@ -74,7 +74,20 @@ export default {
customerContacts:[{isDefault: 1}] customerContacts:[{isDefault: 1}]
}, },
// 表单校验 // 表单校验
rules: { serviceUserList: [],
countryList: [],
}
},
watch:{
show(){
if(!this.show){
this.$emit('close')
}
}
},
computed:{
rules(){
return {
name : [{ required: true, message: this.$t("客户名称不能为空"), trigger: "blur" }], name : [{ required: true, message: this.$t("客户名称不能为空"), trigger: "blur" }],
'customerContacts.0.phoneNew' : [{ required: true, message: this.$t("手机号不能为空"), trigger: "blur" }], 'customerContacts.0.phoneNew' : [{ required: true, message: this.$t("手机号不能为空"), trigger: "blur" }],
'customerContacts.0.name' : [{ required: true, message: this.$t("联系人不能为空"), trigger: "blur" }], 'customerContacts.0.name' : [{ required: true, message: this.$t("联系人不能为空"), trigger: "blur" }],
...@@ -84,15 +97,6 @@ export default { ...@@ -84,15 +97,6 @@ export default {
customerService : [{ required: true, message: this.$t("客户经理不能为空"), trigger: "blur" }], customerService : [{ required: true, message: this.$t("客户经理不能为空"), trigger: "blur" }],
status : [{ required: true, message: this.$t("客户状态不能为空"), trigger: "blur" }], status : [{ required: true, message: this.$t("客户状态不能为空"), trigger: "blur" }],
founder : [{ required: true, message: this.$t("创建人不能为空"), trigger: "blur" }], founder : [{ required: true, message: this.$t("创建人不能为空"), trigger: "blur" }],
},
serviceUserList: [],
countryList: [],
}
},
watch:{
show(){
if(!this.show){
this.$emit('close')
} }
} }
}, },
...@@ -125,7 +129,7 @@ export default { ...@@ -125,7 +129,7 @@ export default {
let data = {...this.form} let data = {...this.form}
data.type = this.form.type.join(",") data.type = this.form.type.join(",")
createCustomer(data).then(res => { createCustomer(data).then(res => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess(this.$t("新增成功"));
return getCustomerContactsSelect({customerId: res.data}) return getCustomerContactsSelect({customerId: res.data})
}).then(res => { }).then(res => {
this.$emit('success', res.data.list[0]) this.$emit('success', res.data.list[0])
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['bpm:process-instance:query']">{{$t('发起流程')}}</el-button> v-hasPermi="['bpm:process-instance:query']">{{$t('发起流程')}}</el-button>
</el-col> </el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<!-- <el-form-item :label="$t('排序')" prop="sort"> <!-- <el-form-item :label="$t('排序')" prop="sort">
<el-input v-model="queryParams.sort" :placeholder="$t('请输入排序')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.sort" :placeholder="$t('请输入排序')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> --> </el-form-item> -->
<el-form-item label="快递ID" prop="expressId"> <el-form-item :label="$t('快递ID')" prop="expressId">
<el-input v-model="queryParams.expressId" placeholder="请输入快递ID" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.expressId" :placeholder="$t('请输入快递ID')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('预计时间')"> <el-form-item :label="$t('预计时间')">
<el-input v-model="queryParams.etaTime" :placeholder="$t('预计到达天数')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.etaTime" :placeholder="$t('预计到达天数')" clearable @keyup.enter.native="handleQuery"/>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<el-input v-model="queryParams.channelAgent" :placeholder="$t('请输入渠道代理')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.channelAgent" :placeholder="$t('请输入渠道代理')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注')" prop="remarksZh"> <el-form-item :label="$t('备注')" prop="remarksZh">
<el-input v-model="queryParams.remarksZh" placeholder="请输入备注-中文" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.remarksZh" :placeholder="$t('请输入备注-中文')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="备注-英文" prop="remarksEn"> <!-- <el-form-item label="备注-英文" prop="remarksEn">
<el-input v-model="queryParams.remarksEn" placeholder="请输入备注-英文" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.remarksEn" placeholder="请输入备注-英文" clearable @keyup.enter.native="handleQuery"/>
...@@ -69,10 +69,15 @@ ...@@ -69,10 +69,15 @@
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="渠道ID" align="center" prop="channelId" /> <el-table-column :label="$t('渠道ID')" align="center" prop="channelId" />
<el-table-column :label="$t('名称')" align="center" prop="nameZh" /> <el-table-column :label="$t('名称')" align="center" prop="nameZh">
<template slot-scope="{row}">{{$l(row, 'name')}}</template>
</el-table-column>
<!-- <el-table-column label="名称-英文" align="center" prop="nameEn" /> --> <!-- <el-table-column label="名称-英文" align="center" prop="nameEn" /> -->
<el-table-column :label="$t('内部名称')" align="center" prop="internalNameZh" /> <el-table-column :label="$t('内部名称')" align="center" prop="internalNameZh">
<template slot-scope="{row}">{{$l(row, 'internalName')}}</template>
</el-table-column>
<!-- <el-table-column label="内部名称-英文" align="center" prop="internalNameEn" /> <!-- <el-table-column label="内部名称-英文" align="center" prop="internalNameEn" />
<el-table-column :label="$t('类型编码')" align="center" prop="typeNumber" />--> <el-table-column :label="$t('类型编码')" align="center" prop="typeNumber" />-->
<!-- <el-table-column label="仓库id字符串" align="center" prop="warehouseIds" /> --> <!-- <el-table-column label="仓库id字符串" align="center" prop="warehouseIds" /> -->
...@@ -91,7 +96,7 @@ ...@@ -91,7 +96,7 @@
<el-table-column :label="$t('简码')" align="center" prop="code" /> <el-table-column :label="$t('简码')" align="center" prop="code" />
<el-table-column :label="$t('排序')" align="center" prop="sort" /> <el-table-column :label="$t('排序')" align="center" prop="sort" />
<el-table-column :label="$t('快递公司')" align="center" prop="companyName" /> <el-table-column :label="$t('快递公司')" align="center" prop="companyName" />
<el-table-column label="预计时间(天)" align="center" prop="etaTime" /> <el-table-column :label="$t('预计时间(天)')" align="center" prop="etaTime" />
<el-table-column :label="$t('渠道代理')" align="center" prop="channelAgent" /> <el-table-column :label="$t('渠道代理')" align="center" prop="channelAgent" />
<el-table-column :label="$t('备注')" align="center" prop="remarksZh" /> <el-table-column :label="$t('备注')" align="center" prop="remarksZh" />
<!-- <el-table-column label="备注-英文" align="center" prop="remarksEn" /> --> <!-- <el-table-column label="备注-英文" align="center" prop="remarksEn" /> -->
......
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
<el-input v-model="queryParams.marks" :placeholder="$t('请输入关键字查找')" /> <el-input v-model="queryParams.marks" :placeholder="$t('请输入关键字查找')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('资源类型')" prop="customerType"> <el-form-item :label="$t('资源类型')" prop="customerType">
<el-select clearable v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable size="small"> <!-- <el-select clearable v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_ESOURCE_TYPE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_ESOURCE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select> -->
<dict-selector :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable ></dict-selector>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="$t('客户经理')" prop="customerService"> <!-- <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small"> <el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
...@@ -45,17 +46,17 @@ ...@@ -45,17 +46,17 @@
</el-form> </el-form>
<div class="total_num"> <div class="total_num">
<span>{{ $t('开发客户:') }}</span> <span>{{ $t('开发客户:') }}</span>
<span>总箱数 {{totalData.developNum}} </span> <span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>总方数 {{totalData.developVolume}}</span> <span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>总重量 {{totalData.developWeight}}KG </span> <span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span> <span>{{ $t('公司客户:') }}</span>
<span>总箱数 {{totalData.companyNum}} </span> <span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>总方数 {{totalData.companyVolume}}</span> <span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>总重量 {{totalData.companyWeight}}KG </span> <span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span> <span>{{ $t('汇总:') }}</span>
<span>总箱数 {{totalData.sumNum}} </span> <span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>总方数 {{totalData.sumVolume}}</span> <span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>总重量 {{totalData.sumWeight}}KG </span> <span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div> </div>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
v-model="form.channelId" v-model="form.channelId"
:options="channelList" :options="channelList"
value-field="channelId" value-field="channelId"
label-field="nameZh" :label-field="$l('name')"
class="w-200" class="w-200"
></selector> ></selector>
</el-form-item> </el-form-item>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<el-table-column :label="$t('商品特性')" width="250px"> <el-table-column :label="$t('商品特性')" width="250px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="!canAddProduct"> <el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="!canAddProduct">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{item.attrName}}</el-checkbox> <el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</template> </template>
</el-table-column> </el-table-column>
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('其他费用')"> <el-descriptions-item :label="$t('其他费用')">
<el-input v-model="form.otherFee" placeholder="" class="w-100 mr-10"></el-input> <el-input v-model="form.otherFee" placeholder="" class="w-100 mr-10"></el-input>
<selector v-model="form.otherFeeCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" /> <selector v-model="form.otherFeeCurrencyId" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('原价')" :span="2"> <el-descriptions-item :label="$t('原价')" :span="2">
<template v-for="item in originalFeeList"> <template v-for="item in originalFeeList">
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
<div class="card-title" style="padding:20px 0;">{{$t('优惠信息')}}</div> <div class="card-title" style="padding:20px 0;">{{$t('优惠信息')}}</div>
<el-table :data="couponList" :show-header="false"> <el-table :data="couponList" :show-header="false" :empty-text="$t('暂无优惠')">
<el-table-column label=""> <el-table-column label="">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index+1}}. {{scope.$index+1}}.
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
</el-card> </el-card>
<el-card class="mt-10" v-if="transport"> <el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div> <div class="card-title" slot="header">{{$l(transport, 'label')}}</div>
<!-- <el-form-item :label="$t('快递单号')"> <!-- <el-form-item :label="$t('快递单号')">
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input> <el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input>
</el-form-item> --> </el-form-item> -->
......
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
</el-card> </el-card>
<el-card class="mt-10" v-if="transport"> <el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div> <div class="card-title" slot="header">{{$l(transport, 'label')}}</div>
<el-form-item :label="$t('快递单号')"> <el-form-item :label="$t('快递单号')">
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')" :disabled="false"> <el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')" :disabled="false">
<el-button type="primary" slot="append" @click="getOrderCourierNumber" :disabled="false">{{$t('生成单号')}}</el-button> <el-button type="primary" slot="append" @click="getOrderCourierNumber" :disabled="false">{{$t('生成单号')}}</el-button>
......
...@@ -719,6 +719,28 @@ export default { ...@@ -719,6 +719,28 @@ export default {
if(this.form.stepPrice != 1){ if(this.form.stepPrice != 1){
// data.priceStepList = this.priceStepList // data.priceStepList = this.priceStepList
delete data.priceStepList delete data.priceStepList
// 非阶梯价格判断是否运费(全包价是否为空)
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error(this.$t('运费/全包价不能为0'))
}
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => {
if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true
}
})
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
stepPriceEmpty = true
}
})
if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空'))
}
} }
// 修改单条路线 // 修改单条路线
...@@ -771,27 +793,6 @@ export default { ...@@ -771,27 +793,6 @@ export default {
data.productId = this.product.id; data.productId = this.product.id;
data.lineChannelList = this.lineList.length ? this.lineList : this.selectedRoutes data.lineChannelList = this.lineList.length ? this.lineList : this.selectedRoutes
if(this.form.stepPrice != 1){
// 非阶梯价格判断是否运费(全包价是否为空)
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error(this.$t('运费/全包价不能为0'))
}
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
if(!item.startNum || !item.endNum || !item.weightUnit){
stepPriceEmpty = true
}
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
stepPriceEmpty = true
}
})
if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空'))
}
}
this.loading = true this.loading = true
createProductPrice(data).then(response => { createProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("请求成功")); this.$modal.msgSuccess(this.$t("请求成功"));
......
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