用车需求新增调整

This commit is contained in:
王帅 2025-04-24 13:04:22 +08:00
parent b8af2f9a46
commit f92ad48d8c
3 changed files with 47 additions and 25 deletions

View File

@ -11,12 +11,12 @@
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.shipDate_end"></j-date> <j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.shipDate_end"></j-date>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="发货类型">
<a-input placeholder="请输入发货类型" v-model="queryParam.shipType"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="发货类型">
<a-input placeholder="请输入发货类型" v-model="queryParam.shipType"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="送货区域"> <a-form-item label="送货区域">
<a-input placeholder="请输入送货区域" v-model="queryParam.deliveryArea"></a-input> <a-input placeholder="请输入送货区域" v-model="queryParam.deliveryArea"></a-input>
@ -38,10 +38,12 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</template> </template>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="10" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-left: 8px">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('用车需求')" style="margin-left: 8px">导出</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px"> <a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }} {{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
@ -55,19 +57,17 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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-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 -->
@ -138,7 +138,7 @@
<a-col :span="12"> <a-col :span="12">
<div class="bordered-container"> <div class="bordered-container">
<div class="title">用车需求物料明细</div> <div class="title">用车需求物料明细</div>
<DeliveryDemand ref="deliveryDemand"/> <DeliveryDemand ref="deliveryDemand" style="margin-bottom: 46px;"/>
</div> </div>
</a-col> </a-col>
<a-col :span="12" style="margin-right: -30px;"> <a-col :span="12" style="margin-right: -30px;">

View File

@ -13,24 +13,25 @@
<j-dict-select-tag type="list" v-model="model.shipType" dictCode="ship_type" placeholder="请选择发货类型" /> <j-dict-select-tag type="list" v-model="model.shipType" dictCode="ship_type" placeholder="请选择发货类型" />
</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="totalPallets">
<a-input-number v-model="model.totalPallets" placeholder="请输入预计装车总托数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="送货区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryArea"> <a-form-model-item label="送货区域" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryArea">
<a-input v-model="model.deliveryArea" placeholder="请输入送货区域" ></a-input> <a-input v-model="model.deliveryArea" placeholder="请输入送货区域" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> -->
<a-col :span="12">
<a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
<!-- <j-dict-select-tag type="list" v-model="model.pickUpHub" dictCode="pick_up_hub" placeholder="请选择取货仓库" /> -->
<a-auto-complete v-model="model.pickUpHub" placeholder="请输入取货仓库" @select="pickUpHubSelect" @change="pickUpHubChange" :dataSource="pickUpHubList"></a-auto-complete>
</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="deliveryAddress">
<a-input v-model="model.deliveryAddress" placeholder="请输入送货地点" ></a-input> <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="pickUpHub"> <a-form-model-item label="预计装车总托数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalPallets">
<j-dict-select-tag type="list" v-model="model.pickUpHub" dictCode="pick_up_hub" placeholder="请选择取货仓库" /> <a-input-number v-model="model.totalPallets" placeholder="请输入预计装车总托数" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -63,6 +64,8 @@
}, },
data () { data () {
return { return {
cityList:[],
pickUpHubList:[],
model:{ model:{
}, },
labelCol: { labelCol: {
@ -79,7 +82,8 @@
url: { url: {
add: "/vehicle_demand/vehicleDemand/add", add: "/vehicle_demand/vehicleDemand/add",
edit: "/vehicle_demand/vehicleDemand/edit", edit: "/vehicle_demand/vehicleDemand/edit",
queryById: "/vehicle_demand/vehicleDemand/queryById" queryById: "/vehicle_demand/vehicleDemand/queryById",
getCity: "/logisticsroute/logisticsRoute/getCity",
} }
} }
}, },
@ -91,6 +95,7 @@
created () { created () {
//备份model原始值 //备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getCity();
}, },
methods: { methods: {
add () { add () {
@ -129,6 +134,23 @@
}) })
}, },
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));
},
} }
} }
</script> </script>

View File

@ -79,7 +79,7 @@
<a-table <a-table
ref="table" ref="table"
size="middle" size="middle"
:scroll="{ y: 300, x:'max-content' }" :scroll="{ y: 200, x:'max-content' }"
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"