车辆出入厂流程管理

This commit is contained in:
王帅 2025-06-13 14:17:48 +08:00
parent 857968028c
commit d4c6004baf
12 changed files with 581 additions and 15 deletions

View File

@ -13,7 +13,7 @@ import QRCode from 'qrcode';
export const JeecgListMixin = {
data(){
return {
qrCodeUrl: 'http://123.57.206.181:9000/',
qrCodeUrl: 'http://192.168.1.73:9002/',
qrCodeForm: 'takePhoneForm',
qrCodeValue: 'http://192.168.158.19:3000/takePhoneForm', // 这里填写你想要生成二维码的内容
qrCodeImage: null, // 用于存储二维码图像数据

View File

@ -50,12 +50,12 @@
</a-upload>
<!-- 高级查询区域 -->
<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-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-dropdown> -->
</div>
<!-- table区域-begin -->
@ -110,11 +110,11 @@
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<!-- <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu-item> -->
<a-menu-item>
<a @click="handleTake(record)">车辆预约</a>
</a-menu-item>

View File

@ -95,7 +95,7 @@
</thead>
<tbody>
<tr v-for="(item,index) in poList" align="center" :key="index">
<a-checkbox v-model="item.selected" style="width: 5%;"></a-checkbox>
<td style="width: 5%;"><a-checkbox v-model="item.selected"></a-checkbox></td>
<td style="width: 25%;">{{ item.po }}</td>
<td style="width: 20%;">{{ item.pn }}</td>
<td style="width: 10%;"><a-input-number v-model="item.planQty" :min="0" style="width: 100%;"/></td>

View File

@ -0,0 +1,109 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@/api/manage'
export default {
name: 'VehicleInOutCheckList',
mixins:[JeecgListMixin, mixinDevice],
components: {
},
data () {
return {
description: '对账管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'费用类型',
align:"center",
dataIndex: 'expenseType'
},
{
title:'价格',
align:"center",
dataIndex: 'price'
},
{
title:'发票',
align:"center",
dataIndex: 'invoice',
scopedSlots: { customRender: 'imgSlot' }
},
],
url: {
list: "/vehicleinoutcheck/vehicleInOutCheck/list",
getByVehicleInOutId: '/vehicleinoutcheck/vehicleInOutCheck/getByVehicleInOutId'
},
dictOptions:{},
superFieldList:[],
}
},
created() {
},
methods: {
initDictConfig(){
},
loadData(){},
getByVehicleInOutId(id){
this.loading = true;
getAction(this.url.getByVehicleInOutId, {vehicleInOutId: id}).then(res => {
if(res.success){
this.dataSource = res.result;
}
}).finally(() => {
this.loading = false;
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

View File

@ -71,12 +71,12 @@
</a-upload>
<!-- 高级查询区域 -->
<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-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-dropdown> -->
</div>
<!-- table区域-begin -->
@ -98,6 +98,7 @@
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
:customRow="rowClick"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
@ -130,21 +131,27 @@
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<!-- <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu-item> -->
<a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm2'">
<a-popconfirm title="确定入厂审核吗?" @confirm="() => handleConfirm(record.id, '2')">
<a>入厂审核</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm3'">
<a @click="handleCar(record)">装车审核</a>
</a-menu-item>
<a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm4'">
<a-popconfirm title="确定出厂审核吗?" @confirm="() => handleConfirm(record.id, '4')">
<a>出厂审核</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm5'">
<a @click="handleCheek(record)">对账</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -153,6 +160,11 @@
</div>
<vehicle-in-out-modal ref="modalForm" @ok="modalFormOk"></vehicle-in-out-modal>
<VehicleInOutCheckList ref="vehicleInOutCheckList"></VehicleInOutCheckList>
<!-- 对账 -->
<CheekModal ref="cheekModal"></CheekModal>
<!-- 装车审核车牌绑定 -->
<CarModal ref="carModal"></CarModal>
</a-card>
</template>
@ -163,12 +175,18 @@
import { postAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import VehicleInOutModal from './modules/VehicleInOutModal'
import CheekModal from './modules/CheekModal.vue'
import VehicleInOutCheckList from './VehicleInOutCheckList.vue'
import CarModal from './modules/CarModal.vue'
export default {
name: 'VehicleInOutList',
mixins:[JeecgListMixin, mixinDevice],
components: {
VehicleInOutModal
VehicleInOutModal,
CheekModal,
VehicleInOutCheckList,
CarModal
},
data () {
return {
@ -327,6 +345,25 @@
}
})
},
handleCheek(record){
this.$refs.cheekModal.edit(record);
this.$refs.cheekModal.title = "对账";
this.$refs.cheekModal.disableSubmit = false;
},
handleCar(record){
this.$refs.carModal.edit(record);
this.$refs.carModal.title = "装车审核";
this.$refs.carModal.disableSubmit = false;
},
rowClick(record){
return {
on: {
click:() => {
this.$refs.vehicleInOutCheckList.getByVehicleInOutId(record.id);
},
}
}
},
initDictConfig(){
},
getSuperFieldList(){

View File

@ -0,0 +1,159 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="8">
<a-form-model-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carNum">
<a-input v-model="model.carNum" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="发货单" :labelCol="labelCol" :wrapperCol="wrapperCol">
<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-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
<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" style="margin-left: 20px">删除选中</a-button>
</div>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CarForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
invoiceList: [],
deliveryDetailList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/vehicleinoutcheck/vehicleInOutCheck/add",
getShip: "/deliverydemand/deliveryDemand/getShip",
confirm: "/vehicleinoutdetail/vehicleInOutDetail/confirm",
getByVehicleInOutId: "/vehicleinoutdetail/vehicleInOutDetail/getByVehicleInOutId",
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getShip();
},
methods: {
batchDel(){
this.deliveryDetailList = this.deliveryDetailList.filter(x => x.selected===false)
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
this.getByVehicleInOutId(this.model.id)
},
submitForm () {
if (this.deliveryDetailList.length == 0) {
this.$message.warning('列表不能为空');
return;
}
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
this.model.deliveryDetailList = this.deliveryDetailList
this.model.carNum = this.model.id
httpAction(this.url.confirm,this.model,'post').then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
getShip(){
getAction(this.url.getShip).then(res => {
if (res.success) {
this.invoiceList = res.result
}
})
},
getByVehicleInOutId(vehicleInOutId){
getAction(this.url.getByVehicleInOutId, {vehicleInOutId: vehicleInOutId}).then(res => {
if (res.success) {
this.deliveryDetailList = 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})
},
}
}
</script>

View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<car-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></car-form>
</j-modal>
</template>
<script>
import CarForm from './CarForm'
export default {
name: 'CarModal',
components: {
CarForm
},
data () {
return {
title:'',
width:1000,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
// this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

View File

@ -0,0 +1,142 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="8">
<a-form-model-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carNum">
<a-input v-model="model.carNum" disabled></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
<table style="width: 100%;">
<thead>
<tr align="center">
<th style="width: 5%;"></th>
<th style="width: 15%;">费用类型</th>
<th style="width: 15%;">价格</th>
<th style="width: 15%;">上传发票</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in checkList" align="center" :key="index">
<td><a-checkbox v-model="item.selected" style="width: 5%;"></a-checkbox></td>
<td style="width: 15%;">
<j-dict-select-tag type="list" v-model="item.expenseType" dictCode="expense_type" placeholder="请选择费用类型" style="width: 100%;"/>
</td>
<td style="width: 15%;"><a-input-number v-model="item.price" :min="0" style="width: 100%;"/></td>
<td style="width: 15%;">
<div style="display: flex; justify-content: center; align-items: center;">
<j-image-upload class="avatar-uploader" text="发票" v-model="item.invoice"></j-image-upload>
</div>
</td>
</tr>
</tbody>
</table>
<div align="center" style="margin-top: 20px;">
<a-button @click="addLine" type="primary">新增</a-button>
<a-button @click="batchDel" type="danger" style="margin-left: 20px">删除选中</a-button>
</div>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CheekForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
checkList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/vehicleinoutcheck/vehicleInOutCheck/add",
getByVehicleInOutId: '/vehicleinoutcheck/vehicleInOutCheck/getByVehicleInOutId'
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
addLine(){
this.checkList.push({selected: false})
},
batchDel(){
this.checkList = this.checkList.filter(x => x.selected===false)
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
this.getByVehicleInOutId(this.model.id)
},
submitForm () {
if (this.checkList.length == 0) {
this.$message.warning('列表不能为空');
return;
}
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
this.model.vehicleInOutCheckList = this.checkList
httpAction(this.url.add,this.model,'post').then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
getByVehicleInOutId(id){
getAction(this.url.getByVehicleInOutId, {vehicleInOutId: id}).then(res => {
if(res.success){
this.checkList = res.result;
}
})
}
}
}
</script>

View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<cheek-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cheek-form>
</j-modal>
</template>
<script>
import CheekForm from './CheekForm'
export default {
name: 'CheekModal',
components: {
CheekForm
},
data () {
return {
title:'',
width:1000,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
// this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

View File

@ -115,7 +115,6 @@
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);

View File

@ -98,7 +98,7 @@
</thead>
<tbody>
<tr v-for="(item,index) in deliveryDetailList" align="center" :key="index">
<a-checkbox v-model="item.selected"></a-checkbox>
<td style="width: 5%;"><a-checkbox v-model="item.selected"></a-checkbox></td>
<td style="width: 15%;">{{ item.invoice }}</td>
<td style="width: 15%;">{{ item.pickUpHub }}</td>
<td style="width: 15%;">{{ item.pn }}</td>

View File

@ -127,11 +127,11 @@
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<!-- <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu-item> -->
</a-menu>
</a-dropdown>
</span>