一些功能调整

This commit is contained in:
王帅 2025-04-23 15:54:18 +08:00
parent 4579f29f72
commit d2bb73b0ef
5 changed files with 106 additions and 27 deletions

View File

@ -3,44 +3,46 @@
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="12"> <a-col :span="24">
<a-form-model-item label="起始区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startArea"> <a-form-model-item label="起始区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startArea">
<a-input v-model="model.startArea" placeholder="请输入起始区域" ></a-input> <!-- <a-input v-model="model.startArea" placeholder="请输入起始区域" ></a-input> -->
<a-auto-complete v-model="model.startArea" placeholder="请输入起始区域" @select="startAreaSelect" @change="startAreaChange" :dataSource="startAreaList"></a-auto-complete>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="起始城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startCity"> <a-form-model-item label="起始城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startCity">
<a-input v-model="model.startCity" placeholder="请输入起始城市" ></a-input> <a-input v-model="model.startCity" placeholder="请输入起始城市" disabled ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="目标区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetArea"> <a-form-model-item label="目标区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetArea">
<a-input v-model="model.targetArea" placeholder="请输入目标区域" ></a-input> <a-input v-model="model.targetArea" placeholder="请输入目标区域" disabled ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="目标城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetCity"> <a-form-model-item label="目标城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetCity">
<a-input v-model="model.targetCity" placeholder="请输入目标城市" ></a-input> <a-input v-model="model.targetCity" placeholder="请输入目标城市" disabled ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="具体路线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="route"> <a-form-model-item label="具体路线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="route">
<a-input v-model="model.route" placeholder="请输入具体路线" ></a-input> <a-input v-model="model.route" placeholder="请输入具体路线" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="公里数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kilometers">
<a-input-number v-model="model.kilometers" placeholder="请输入公里数" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType"> <a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType">
<j-dict-select-tag type="list" v-model="model.carType" dictCode="tms_vehicle_pallet,car_type,car_type" placeholder="请选择车型" /> <!-- <j-dict-select-tag type="list" v-model="model.carType" dictCode="tms_vehicle_pallet,car_type,car_type" placeholder="请选择车型" /> -->
<a-auto-complete v-model="model.carType" placeholder="请输入车型" @select="carTypeSelect" @change="carTypeChange" :dataSource="carTypeList"></a-auto-complete>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="公里数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kilometers">
<a-input-number v-model="model.kilometers" placeholder="请输入公里数" style="width: 100%" disabled/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="车长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carLong"> <a-form-model-item label="车长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carLong">
<a-input-number v-model="model.carLong" placeholder="请输入车长" style="width: 100%" /> <a-input-number v-model="model.carLong" placeholder="请输入车长" style="width: 100%" disabled/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -48,19 +50,20 @@
<a-input-number v-model="model.tonnage" placeholder="请输入装卸吨位" style="width: 100%" /> <a-input-number v-model="model.tonnage" placeholder="请输入装卸吨位" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item label="供应商编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode">
<!-- <a-input v-model="model.supplierCode" placeholder="请输入供应商编码" ></a-input> -->
<a-auto-complete v-model="model.supplierCode" placeholder="请输入供应商编码" @select="supplierCodeSelect" @change="supplierCodeChange" :dataSource="supplierCodeList"></a-auto-complete>
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="运输方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transportMode"> <a-form-model-item label="运输方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transportMode">
<a-input v-model="model.transportMode" placeholder="请输入运输方式" ></a-input> <a-input v-model="model.transportMode" placeholder="请输入运输方式" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item label="供应商编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode">
<a-input v-model="model.supplierCode" placeholder="请输入供应商编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName"> <a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName">
<a-input v-model="model.supplierName" placeholder="请输入供应商名称" ></a-input> <a-input v-model="model.supplierName" placeholder="请输入供应商名称" disabled ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -113,6 +116,12 @@
}, },
data () { data () {
return { return {
areaCityList:[],
startAreaList:[],
carTypeLongList:[],
carTypeList:[],
supplierCodeNameList:[],
supplierCodeList:[],
model:{ model:{
}, },
labelCol: { labelCol: {
@ -129,7 +138,10 @@
url: { url: {
add: "/iogisticsprice/tmsIogisticsPrice/add", add: "/iogisticsprice/tmsIogisticsPrice/add",
edit: "/iogisticsprice/tmsIogisticsPrice/edit", edit: "/iogisticsprice/tmsIogisticsPrice/edit",
queryById: "/iogisticsprice/tmsIogisticsPrice/queryById" queryById: "/iogisticsprice/tmsIogisticsPrice/queryById",
getAreaCity: "/logisticsroute/logisticsRoute/getAreaCity",
getCarTypeLong: "/vehiclepallet/vehiclePallet/getCarTypeLong",
getSupplierCodeName: "/vehicleoperator/tmsVehicleOperator/getSupplierCodeName"
} }
} }
}, },
@ -141,6 +153,9 @@
created () { created () {
//备份model原始值 //备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getAreaCity();
this.getCarTypeLong();
this.getSupplierCodeName();
}, },
methods: { methods: {
add () { add () {
@ -179,6 +194,67 @@
}) })
}, },
getAreaCity(){
getAction(this.url.getAreaCity).then(res => {
if (res.success) {
this.areaCityList = res.result;
this.startAreaList = res.result;
}
})
},
startAreaSelect(){
let startArea = this.startAreaList.filter(x=>x.includes(this.model.startArea))[0].split('&-')[0];
let startCity = this.startAreaList.filter(x=>x.includes(this.model.startArea))[0].split('&-')[1];
let targetArea = this.startAreaList.filter(x=>x.includes(this.model.startArea))[0].split('&-')[2];
let targetCity = this.startAreaList.filter(x=>x.includes(this.model.startArea))[0].split('&-')[3];
let route = this.startAreaList.filter(x=>x.includes(this.model.startArea))[0].split('&-')[4];
let kilometers = this.startAreaList.filter(x=>x.includes(this.model.startArea))[0].split('&-')[5];
this.model.startArea = startArea;
this.model.startCity = startCity;
this.model.targetArea = targetArea;
this.model.targetCity = targetCity;
this.model.route = route;
this.model.kilometers = kilometers;
},
startAreaChange(val){
this.startAreaList = this.areaCityList.filter(x => x.includes(val));
},
getCarTypeLong(){
getAction(this.url.getCarTypeLong).then(res => {
if (res.success) {
this.carTypeLongList = res.result;
this.carTypeList = res.result;
}
})
},
carTypeSelect(){
let carType = this.carTypeList.filter(x=>x.includes(this.model.carType))[0].split('&-')[0];
let carLong = this.carTypeList.filter(x=>x.includes(this.model.carType))[0].split('&-')[1];
this.model.carType = carType;
this.model.carLong = carLong;
},
carTypeChange(val){
this.carTypeList = this.carTypeLongList.filter(x => x.includes(val));
},
getSupplierCodeName(){
getAction(this.url.getSupplierCodeName).then(res => {
if (res.success) {
this.supplierCodeNameList = res.result;
this.supplierCodeList = res.result;
}
})
},
supplierCodeSelect(){
let supplierCode = this.supplierCodeList.filter(x=>x.includes(this.model.supplierCode))[0].split('&-')[0];
let supplierName = this.supplierCodeList.filter(x=>x.includes(this.model.supplierCode))[0].split('&-')[1];
this.model.supplierCode = supplierCode;
this.model.supplierName = supplierName;
},
supplierCodeChange(val){
this.supplierCodeList = this.supplierCodeNameList.filter(x => x.includes(val));
},
} }
} }
</script> </script>

View File

@ -25,7 +25,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="具体路线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="route"> <a-form-model-item label="具体路线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="route">
<a-input v-model="model.route" placeholder="请输入具体路线" ></a-input> <a-input v-model="model.route" placeholder="请输入具体路线" disabled ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">

View File

@ -5,12 +5,12 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="供应商编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode"> <a-form-model-item label="供应商编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode">
<a-input v-model="model.supplierCode" placeholder="请输入供应商编号" ></a-input> <a-input v-model.trim="model.supplierCode" placeholder="请输入供应商编号" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName"> <a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName">
<a-input v-model="model.supplierName" placeholder="请输入供应商名称" ></a-input> <a-input v-model.trim="model.supplierName" placeholder="请输入供应商名称" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -20,7 +20,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email"> <a-form-model-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
<a-input v-model="model.email" placeholder="请输入邮箱" ></a-input> <a-input v-model.trim="model.email" placeholder="请输入邮箱" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">

View File

@ -5,7 +5,8 @@
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="用车需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vdNo"> <a-form-model-item label="用车需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vdNo">
<a-input v-model="model.vdNo" placeholder="请输入提货用车需求编号" ></a-input> <!-- <a-input v-model="model.vdNo" placeholder="请输入提货用车需求编号" ></a-input> -->
<j-dict-select-tag type="list" v-model="model.vdNo" dictCode="tms_vehicle_demand,vd_no,vd_no" placeholder="请选择用车需求编号" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">

View File

@ -10,7 +10,8 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="送货需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sgNo"> <a-form-model-item label="送货需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sgNo">
<a-input v-model="model.sgNo" placeholder="请输入送货需求编号" ></a-input> <!-- <a-input v-model="model.sgNo" placeholder="请输入送货需求编号" ></a-input> -->
<j-dict-select-tag type="list" v-model="model.sgNo" dictCode="tms_delivery_plan,sg_no,sg_no" placeholder="请选择送货需求编号" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -20,7 +21,8 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="用车需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vdNo"> <a-form-model-item label="用车需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vdNo">
<a-input v-model="model.vdNo" placeholder="请输入用车需求编号" ></a-input> <!-- <a-input v-model="model.vdNo" placeholder="请输入用车需求编号" ></a-input> -->
<j-dict-select-tag type="list" v-model="model.vdNo" dictCode="tms_vehicle_demand,vd_no,vd_no" placeholder="请选择用车需求编号" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">