Compare commits

..

4 Commits

Author SHA1 Message Date
王帅
d2bb73b0ef 一些功能调整 2025-04-23 15:54:18 +08:00
王帅
4579f29f72 发货需求新增调整 2025-04-23 14:30:37 +08:00
王帅
e4fba1853a 用车计算 2025-04-23 10:08:39 +08:00
王帅
152a2a7284 用车需求调整 2025-04-22 14:39:18 +08:00
10 changed files with 277 additions and 91 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

@ -3,14 +3,9 @@
<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="24">
<a-form-model-item label="吨数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxTonnage">
<a-input-number v-model="model.maxTonnage" placeholder="请输入吨数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType"> <a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType">
<a-input v-model="model.carType" placeholder="请输入车型" ></a-input> <a-input v-model.trim="model.carType" placeholder="请输入车型" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -23,6 +18,11 @@
<a-input-number v-model="model.maxPallets" placeholder="请输入托数" style="width: 100%" /> <a-input-number v-model="model.maxPallets" placeholder="请输入托数" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-model-item label="吨数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxTonnage">
<a-input-number v-model="model.maxTonnage" placeholder="请输入吨数" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>

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">

View File

@ -1,7 +1,7 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper"> <!-- <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -29,27 +29,26 @@
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div> -->
<!-- 查询区域-END --> <!-- 查询区域-END -->
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <!-- <div class="table-operator">
<a-button type="primary" icon="download" @click="handleExportXls('发货需求')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('发货需求')">导出</a-button>
</div> </div> -->
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<a-table <a-table
ref="table" ref="table"
size="middle" size="small"
:scroll="{x:true}" :scroll="{ y: 300, x:true }"
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="false"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
@ -104,7 +103,7 @@
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { postAction } from '@/api/manage' import { postAction,getAction } from '@/api/manage'
import DeliveryDemandModal from './modules/DeliveryDemandModal' import DeliveryDemandModal from './modules/DeliveryDemandModal'
export default { export default {
@ -131,32 +130,38 @@
{ {
title:'用车需求编号', title:'用车需求编号',
align:"center", align:"center",
dataIndex: 'vdNo' dataIndex: 'vdNo',
width: 120
}, },
{ {
title:'料号', title:'料号',
align:"center", align:"center",
dataIndex: 'pn' dataIndex: 'pn',
width: 120
}, },
{ {
title:'规格', title:'规格',
align:"center", align:"center",
dataIndex: 'spec' dataIndex: 'spec',
width: 100
}, },
{ {
title:'发货数量', title:'发货数量',
align:"center", align:"center",
dataIndex: 'shipNumber' dataIndex: 'shipNumber',
width: 100
}, },
{ {
title:'预估托盘数', title:'预估托盘数',
align:"center", align:"center",
dataIndex: 'palletsNum' dataIndex: 'palletsNum',
width: 100
}, },
{ {
title:'发货单', title:'发货单',
align:"center", align:"center",
dataIndex: 'invoice' dataIndex: 'invoice',
width: 100
}, },
// { // {
// title: '操作', // title: '操作',
@ -173,7 +178,8 @@
deleteBatch: "/deliverydemand/deliveryDemand/deleteBatch", deleteBatch: "/deliverydemand/deliveryDemand/deleteBatch",
exportXlsUrl: "/deliverydemand/deliveryDemand/exportXls", exportXlsUrl: "/deliverydemand/deliveryDemand/exportXls",
importExcelUrl: "deliverydemand/deliveryDemand/importExcel", importExcelUrl: "deliverydemand/deliveryDemand/importExcel",
handleMerge: '/deliverydemand/deliveryDemand/handleMerge' handleMerge: '/deliverydemand/deliveryDemand/handleMerge',
getByVdNo: '/deliverydemand/deliveryDemand/getByVdNo',
}, },
dictOptions:{}, dictOptions:{},
superFieldList:[], superFieldList:[],
@ -218,6 +224,16 @@
} }
}) })
}, },
getByVdNo(vdNo){
getAction(this.url.getByVdNo,{vdNo: vdNo}).then(res => {
if (res.success) {
this.dataSource = res.result;
} else {
this.$message.warning(res.message)
}
})
},
loadData(){},
initDictConfig(){ initDictConfig(){
}, },
getSuperFieldList(){ getSuperFieldList(){

View File

@ -10,12 +10,13 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pn"> <a-form-model-item label="料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pn">
<a-input v-model.trim="model.pn" placeholder="请输入料号" @change="changeGetpalletsNum" ></a-input> <!-- <a-input v-model.trim="model.pn" placeholder="请输入料号" @change="changeGetpalletsNum" ></a-input> -->
<a-auto-complete v-model="model.pn" placeholder="请输入料号" @select="pnSelect" @change="pnChange" :dataSource="pnList"></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="spec"> <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
<a-input v-model="model.spec" placeholder="请输入规格" @change="changeGetpalletsNum" ></a-input> <a-input v-model="model.spec" placeholder="请输入规格" disabled ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -39,15 +40,18 @@
</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="deliveryAddress"> <a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
<j-dict-select-tag placeholder="请选择送货地点" v-model="model.deliveryAddress" dictCode="tms_logistics_route,start_city,start_city"></j-dict-select-tag> <!-- <j-dict-select-tag placeholder="请选择取货仓库" v-model="model.pickUpHub" dictCode="tms_logistics_route,start_city,start_city"></j-dict-select-tag> -->
<a-auto-complete v-model="model.pickUpHub" placeholder="请输入取货仓库" @select="pickUpHubSelect" @change="pickUpHubChange" :dataSource="pickUpHubList"></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="pickUpHub"> <a-form-model-item label="送货地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryAddress">
<j-dict-select-tag placeholder="请选择取货仓库" v-model="model.pickUpHub" dictCode="tms_logistics_route,target_city,target_city"></j-dict-select-tag> <!-- <j-dict-select-tag placeholder="请选择送货地点" v-model="model.deliveryAddress" dictCode="tms_logistics_route,target_city,target_city"></j-dict-select-tag> -->
<a-input v-model="model.deliveryAddress" 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="invoice"> <a-form-model-item label="发货单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoice">
<a-input v-model="model.invoice" placeholder="请输入发货单" ></a-input> <a-input v-model="model.invoice" placeholder="请输入发货单" ></a-input>
@ -95,6 +99,10 @@ import { min } from 'xe-utils/methods'
}, },
data () { data () {
return { return {
cityList:[],
pickUpHubList:[],
pnSpecList:[],
pnList:[],
model:{ model:{
}, },
labelCol: { labelCol: {
@ -120,7 +128,9 @@ import { min } from 'xe-utils/methods'
add: "/deliverydemand/deliveryDemand/add", add: "/deliverydemand/deliveryDemand/add",
edit: "/deliverydemand/deliveryDemand/edit", edit: "/deliverydemand/deliveryDemand/edit",
queryById: "/deliverydemand/deliveryDemand/queryById", queryById: "/deliverydemand/deliveryDemand/queryById",
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum" getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum",
getCity: "/logisticsroute/logisticsRoute/getCity",
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList"
} }
} }
}, },
@ -132,6 +142,8 @@ import { min } from 'xe-utils/methods'
created () { created () {
//备份model原始值 //备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getCity();
this.getPnSpecList();
}, },
methods: { methods: {
changeGetpalletsNum() { changeGetpalletsNum() {
@ -181,6 +193,42 @@ import { min } from 'xe-utils/methods'
}) })
}, },
getCity(){
getAction(this.url.getCity).then(res => {
if (res.success) {
this.cityList = res.result;
this.pickUpHubList = res.result;
}
})
},
pickUpHubSelect(){
let pickUpHub = this.pickUpHubList.filter(x=>x.includes(this.model.pickUpHub))[0].split('&-')[0]
let deliveryAddress = this.pickUpHubList.filter(x=>x.includes(this.model.pickUpHub))[0].split('&-')[1]
this.model.pickUpHub = pickUpHub
this.model.deliveryAddress = deliveryAddress
},
pickUpHubChange(val){
this.pickUpHubList = this.cityList.filter(x => x.includes(val));
},
getPnSpecList(){
getAction(this.url.getPnSpecList).then(res => {
if (res.success) {
this.pnSpecList = res.result;
this.pnList = res.result;
}
})
},
pnSelect(){
let pn = this.pnList.filter(x=>x.includes(this.model.pn))[0].split('&-')[0]
let spec = this.pnList.filter(x=>x.includes(this.model.pn))[0].split('&-')[1]
this.model.pn = pn
this.model.spec = spec
},
pnChange(val){
this.pnList = this.pnSpecList.filter(x => x.includes(val));
},
} }
} }
</script> </script>

View File

@ -87,7 +87,7 @@
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
@ -134,7 +134,16 @@
</a-table> </a-table>
</div> </div>
<a-row :gutter="24">
<a-col :span="12">
<div class="title">用车需求物料明细</div>
<DeliveryDemand ref="deliveryDemand"/>
</a-col>
<a-col :span="12" style="margin-right: -30px;">
<div class="title">用车需求计算</div>
<VehicleDemandCountList ref="vehicleDemandCountList"/>
</a-col>
</a-row>
<vehicle-demand-modal ref="modalForm" @ok="modalFormOk"></vehicle-demand-modal> <vehicle-demand-modal ref="modalForm" @ok="modalFormOk"></vehicle-demand-modal>
</a-card> </a-card>
</template> </template>
@ -146,12 +155,16 @@
import { postAction } from '@/api/manage' import { postAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import VehicleDemandModal from './modules/VehicleDemandModal' import VehicleDemandModal from './modules/VehicleDemandModal'
import DeliveryDemand from '../deliverydemand/DeliveryDemand.vue';
import VehicleDemandCountList from '../vehicledemandcount/VehicleDemandCountList.vue'
export default { export default {
name: 'VehicleDemandList', name: 'VehicleDemandList',
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
components: { components: {
VehicleDemandModal VehicleDemandModal,
DeliveryDemand,
VehicleDemandCountList
}, },
data () { data () {
return { return {
@ -257,6 +270,13 @@
} }
}) })
}, },
onSelectChange(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let vdNo = selectionRows[0].vdNo;
this.$refs.deliveryDemand.getByVdNo(vdNo);
this.$refs.vehicleDemandCountList.getByVdNo(vdNo);
},
initDictConfig(){ initDictConfig(){
}, },
getSuperFieldList(){ getSuperFieldList(){
@ -275,4 +295,8 @@
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.title {
font-size: 18px;
padding-left: 10px;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper"> <!-- <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -48,44 +48,43 @@
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div> -->
<!-- 查询区域-END --> <!-- 查询区域-END -->
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <!-- <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('用车需求计算')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('用车需求计算')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
</a-upload> </a-upload> -->
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown> </a-dropdown>
</div> </div> -->
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
<a style="margin-left: 24px" @click="onClearSelected">清空</a> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div> -->
<a-table <a-table
ref="table" ref="table"
size="middle" size="small"
:scroll="{x:true}" :scroll="{ y: 300, x:true }"
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="false"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
@ -139,6 +138,7 @@
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import VehicleDemandCountModal from './modules/VehicleDemandCountModal' import VehicleDemandCountModal from './modules/VehicleDemandCountModal'
@ -166,51 +166,59 @@
{ {
title:'用车需求编号', title:'用车需求编号',
align:"center", align:"center",
dataIndex: 'vdNo' dataIndex: 'vdNo',
width: 120
}, },
{ {
title:'发货类型', title:'发货类型',
align:"center", align:"center",
dataIndex: 'shipType_dictText' dataIndex: 'shipType_dictText',
width: 80
}, },
{ {
title:'车型', title:'车型',
align:"center", align:"center",
dataIndex: 'carType' dataIndex: 'carType',
width: 80
}, },
{ {
title:'车长', title:'车长',
align:"center", align:"center",
dataIndex: 'carLong' dataIndex: 'carLong',
}, width: 100
{
title:'送货区域',
align:"center",
dataIndex: 'deliveryArea'
}, },
// {
// title:'送货区域',
// align:"center",
// dataIndex: 'deliveryArea',
// width: 100
// },
{ {
title:'送货地点', title:'送货地点',
align:"center", align:"center",
dataIndex: 'deliveryAddress' dataIndex: 'deliveryAddress',
width: 100
}, },
{ {
title:'取货仓库', title:'取货仓库',
align:"center", align:"center",
dataIndex: 'pickUpHub' dataIndex: 'pickUpHub',
width: 100
}, },
{ {
title:'审核结果', title:'审核结果',
align:"center", align:"center",
dataIndex: 'auditResult_dictText' dataIndex: 'auditResult_dictText',
width: 100
}, },
{ // {
title: '操作', // title: '操作',
dataIndex: 'action', // dataIndex: 'action',
align:"center", // align:"center",
fixed:"right", // fixed:"right",
width:147, // width:147,
scopedSlots: { customRender: 'action' } // scopedSlots: { customRender: 'action' }
} // }
], ],
url: { url: {
list: "/vehicledemandcount/vehicleDemandCount/list", list: "/vehicledemandcount/vehicleDemandCount/list",
@ -218,6 +226,7 @@
deleteBatch: "/vehicledemandcount/vehicleDemandCount/deleteBatch", deleteBatch: "/vehicledemandcount/vehicleDemandCount/deleteBatch",
exportXlsUrl: "/vehicledemandcount/vehicleDemandCount/exportXls", exportXlsUrl: "/vehicledemandcount/vehicleDemandCount/exportXls",
importExcelUrl: "vehicledemandcount/vehicleDemandCount/importExcel", importExcelUrl: "vehicledemandcount/vehicleDemandCount/importExcel",
getByVdNo: "vehicledemandcount/vehicleDemandCount/getByVdNo",
}, },
dictOptions:{}, dictOptions:{},
@ -233,6 +242,16 @@
}, },
}, },
methods: { methods: {
getByVdNo(vdNo){
getAction(this.url.getByVdNo,{vdNo: vdNo}).then(res => {
if (res.success) {
this.dataSource = res.result.records||res.result;
} else {
this.$message.warning(res.message)
}
})
},
loadData(){},
initDictConfig(){ initDictConfig(){
}, },
getSuperFieldList(){ getSuperFieldList(){