Commit 7668b8fb authored by dragondean@qq.com's avatar dragondean@qq.com

完善订单编辑翻译

parent 6c33ac08
<template> <template>
<div class="dict-selector"> <div class="dict-selector">
<el-select v-if="formType == 'select'" v-model="valueSync" :placeholder="placeholder" :clearable="clearable" :multiple="multiple" :disabled="disabled" @change="val => $emit('change', val)"> <el-select v-if="formType == 'select'" v-model="valueSync" :placeholder="placeholder || $t('请选择')" :clearable="clearable" :multiple="multiple" :disabled="disabled" @change="val => $emit('change', val)">
<el-option v-for="dict in formattedList" <el-option v-for="dict in formattedList"
:key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/> :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</el-select> </el-select>
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
props:{ props:{
placeholder: { placeholder: {
type: String, type: String,
default: '请选择' default: null
}, },
type: String, type: String,
value: [String, Number, Array, Boolean], value: [String, Number, Array, Boolean],
......
<template> <template>
<el-select v-model="valueSync" :multiple="multiple" :disabled="disabled" :filterable="filterable"> <el-select v-model="valueSync" :multiple="multiple" :disabled="disabled" :filterable="filterable" :placeholder="$t('请选择')">
<el-option v-for="item in optionsFormated" :key="item.key" :label="item.label" :value="item.value" /> <el-option v-for="item in optionsFormated" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<el-row> <el-row>
<el-col class="totle-info"> <el-col class="totle-info">
<div>总计:{{getSumData}}</div> <div>{{$t('总计')}}:{{getSumData}}</div>
<div>容量:{{calcCapacity}}</div> <div>容量:{{calcCapacity}}</div>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -278,10 +278,10 @@ ...@@ -278,10 +278,10 @@
<el-card class="mt-10"> <el-card class="mt-10">
<div class="card-title" slot="header">{{$t('通用')}}</div> <div class="card-title" slot="header">{{$t('通用')}}</div>
<div class="form-section"> <div class="form-section">
<el-form-item label="唛头" prop="marks" > <el-form-item :label="$t('唛头')" prop="marks" >
<el-input v-model="form.marks" ></el-input> <el-input v-model="form.marks" ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否控货" prop="isCargoControl" class="ml-20"> <el-form-item :label="$t('是否控货')" prop="isCargoControl" class="ml-20">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio"/> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio"/>
</el-form-item> </el-form-item>
</div> </div>
...@@ -574,36 +574,6 @@ export default { ...@@ -574,36 +574,6 @@ export default {
}, },
ccIdArr: [], ccIdArr: [],
// 表单校验 // 表单校验
rules: {
marks: [
{required: true, message: this.$t('请填写唛头')},
{
validator: (rule, value, callback) => {
if(!/[a-zA-Z]/.test(value.charAt(0))){
return callback(new Error(this.$t('唛头必须以字母开头')))
}
callback()
},
trigger: 'blur'
}
],
consignorContactsId : [{required: true, message: this.$t('发货人不能为空')}],
consigneeContactsId : [{required: true, message: this.$t('收货人不能为空')}],
transportId : [{required: true, message: this.$t('请选择运输方式')}],
departureId : [{required: true, message: this.$t('请选择始发城市')}],
objectiveId : [{required: true, message: this.$t('请选择目的城市')}],
lineId : [{required: true, message: this.$t('请选择路线')}],
channelId : [{required: true, message: this.$t('请选择出货渠道')}],
deliveryDate : [{required: true, message: this.$t('请选择预计送货日期')}],
consigneeAddress : [{required: true, message: this.$t('请填写详细地址')}],
country : [{required: true, message: this.$t('收货地区填写不完整')}],
isCargoControl : [{required: true, message: this.$t('请选择是否控货')}],
isCollection : [{required: true, message: this.$t('请选择代收货款')}],
collectionProxy : [{required: true, message: this.$t('代收货款不能为空')}],
customsType : [{required: true, message: this.$t('请选择单证报关')}],
warehouseType : [{required: true, message: this.$t('请选择入仓类型')}],
harvestMethod : [{required: true, message: this.$t('请选择收货方式')}]
},
labelStyle: 'width:120px', labelStyle: 'width:120px',
showBatchImportDialog: false, // 显示批量导入弹窗 showBatchImportDialog: false, // 显示批量导入弹窗
importList:[], importList:[],
...@@ -616,6 +586,38 @@ export default { ...@@ -616,6 +586,38 @@ export default {
}; };
}, },
computed:{ computed:{
rules(){
return {
marks: [
{required: true, message: this.$t('请填写唛头')},
{
validator: (rule, value, callback) => {
if(!/[a-zA-Z]/.test(value.charAt(0))){
return callback(new Error(this.$t('唛头必须以字母开头')))
}
callback()
},
trigger: 'blur'
}
],
consignorContactsId : [{required: true, message: this.$t('发货人不能为空')}],
consigneeContactsId : [{required: true, message: this.$t('收货人不能为空')}],
transportId : [{required: true, message: this.$t('请选择运输方式')}],
departureId : [{required: true, message: this.$t('请选择始发城市')}],
objectiveId : [{required: true, message: this.$t('请选择目的城市')}],
lineId : [{required: true, message: this.$t('请选择路线')}],
channelId : [{required: true, message: this.$t('请选择出货渠道')}],
deliveryDate : [{required: true, message: this.$t('请选择预计送货日期')}],
consigneeAddress : [{required: true, message: this.$t('请填写详细地址')}],
country : [{required: true, message: this.$t('收货地区填写不完整')}],
isCargoControl : [{required: true, message: this.$t('请选择是否控货')}],
isCollection : [{required: true, message: this.$t('请选择代收货款')}],
collectionProxy : [{required: true, message: this.$t('代收货款不能为空')}],
customsType : [{required: true, message: this.$t('请选择单证报关')}],
warehouseType : [{required: true, message: this.$t('请选择入仓类型')}],
harvestMethod : [{required: true, message: this.$t('请选择收货方式')}]
}
},
// 是否已完成入仓 // 是否已完成入仓
inWarehouse(){ inWarehouse(){
return !!this.form.inWarehouseState && this.form.inWarehouseState > 201 return !!this.form.inWarehouseState && this.form.inWarehouseState > 201
......
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