车牌绑定

This commit is contained in:
王帅 2025-06-11 08:35:54 +08:00
parent 0a6088db0d
commit 83858716be
3 changed files with 137 additions and 13 deletions

View File

@ -215,7 +215,7 @@
return item.po == this.model.ffectivePo; return item.po == this.model.ffectivePo;
}); });
if(hasEven){ if(hasEven){
this.$message.warning("列表中已存在"+value); this.$message.warning("列表中已存在"+this.model.ffectivePo);
return; return;
} }
getAction(this.url.getByPo,{po: this.model.ffectivePo}).then(res => { getAction(this.url.getByPo,{po: this.model.ffectivePo}).then(res => {

View File

@ -135,18 +135,8 @@
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> </a-menu-item>
<!-- <a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm2'"> <a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm2'">
<a-popconfirm title="确定预约入厂吗?" @confirm="() => handleConfirm(record.id, '1')"> <a-popconfirm title="确定入厂审核吗?" @confirm="() => handleConfirm(record.id, '2')">
<a>预约入厂</a>
</a-popconfirm>
</a-menu-item> -->
<!-- <a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm1'">
<a-popconfirm title="确定对接人确认吗?" @confirm="() => handleConfirm(record.id, '2')">
<a>对接人确认</a>
</a-popconfirm>
</a-menu-item> -->
<a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm3'">
<a-popconfirm title="确定入厂审核吗?" @confirm="() => handleConfirm(record.id, '3')">
<a>入厂审核</a> <a>入厂审核</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> </a-menu-item>

View File

@ -0,0 +1,134 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="车牌">
<!-- <a-input v-model="model.carNum"></a-input> -->
<a-select placeholder="请选择车牌" v-model="model.carNum" showSearch>
<a-select-option v-for="item in carNumList"
:key="item.id" :value="item.id" :label="item.carNum">
{{item.carNum}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="发货单">
<a-select placeholder="发货单" v-model="model.invoice" showSearch @change="changeInvoice">
<a-select-option v-for="item in invoiceList"
:key="item" :value="item" :label="item">
{{item}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</a-form>
<table style="width: 20%;" align="center">
<thead>
<tr align="center">
<th>选项</th>
<th>发货单</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in deliveryDetailList" align="center" :key="index">
<td><a-checkbox v-model="item.selected"></a-checkbox></td>
<td>{{ item.invoice }}</td>
</tr>
</tbody>
</table>
<div align="center" style="margin-top: 20px;">
<a-button @click="batchDel" type="danger">删除选中</a-button>
<a-button @click="confirm" type="primary" style="margin-left: 20px">确定</a-button>
</div>
</div>
</a-card>
</template>
<script>
import { getAction,postAction } from '@/api/manage'
import '@/assets/less/TableExpand.less'
export default {
name: 'VehicleInOutDetailList',
mixins:[],
components: {
},
data () {
return {
description: '车辆出入厂流程管理明细管理页面',
model:{
},
carNumList: [],
invoiceList: [],
deliveryDetailList: [],
url: {
list: "/vehicleinoutdetail/vehicleInOutDetail/list",
getVehicleInOut: "/vehicleinout/vehicleInOut/getVehicleInOut",
getShip: "/deliverydemand/deliveryDemand/getShip",
confirm: "/vehicleinoutdetail/vehicleInOutDetail/confirm"
},
}
},
created() {
this.getVehicleInOut();
this.getShip();
},
computed: {
},
methods: {
getVehicleInOut(){
getAction(this.url.getVehicleInOut).then(res => {
if(res.success){
this.carNumList = res.result
}
})
},
getShip(){
getAction(this.url.getShip).then(res => {
if (res.success) {
this.invoiceList = res.result
}
})
},
changeInvoice(){
let hasEven = this.deliveryDetailList.some((item) => {
return item.invoice == this.model.invoice;
});
if(hasEven){
this.$message.warning("列表中已存在 "+this.model.invoice);
return;
}
this.deliveryDetailList.push({invoice: this.model.invoice, selected:false})
},
batchDel(){
this.deliveryDetailList = this.deliveryDetailList.filter(x => x.selected===false)
},
confirm(){
if(!this.model.carNum){
this.$message.warning("请选择车牌!");
return;
}
if(this.deliveryDetailList.length == 0){
this.$message.warning("列表不能为空");
return;
}
this.model.deliveryDetailList = this.deliveryDetailList
console.log(this.model)
postAction(this.url.confirm, this.model).then(res => {
if(res.success){
this.$message.success(res.message);
this.deliveryDetailList = [];
this.model = {};
}else{
this.$message.error(res.message);
}
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>