修改送货计划

This commit is contained in:
王帅 2025-06-05 18:58:57 +08:00
parent efcb13c47e
commit a26fdfa1c9
15 changed files with 536 additions and 84 deletions

View File

@ -1,5 +1,6 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:9001/jeecg-boot
VUE_APP_API_BASE_URL=http://localhost:9001/tms
# VUE_APP_API_BASE_URL=http://114.215.188.164:9001/jeecg-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

View File

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_BASE_URL=http://114.215.188.164:9001/jeecg-boot
VUE_APP_API_BASE_URL=http://123.57.206.181:9001/tms
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

View File

@ -382,5 +382,10 @@ export const constantRouterMap = [
path: '/takePhoneForm',
component: ()=>import('@/views/tms/outbound/vehicledemandcount/modules/TakePhoneForm'),
meta: {title: '提货移动版'}
},
{
path: '/takeDeliverPhoneForm',
component: ()=>import('@/views/tms/carinout/deliveryplan/modules/TakeDeliverPhoneForm'),
meta: {title: '送货移动版'}
}
]

View File

@ -8,10 +8,15 @@ import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/man
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import store from '@/store'
import QRCode from 'qrcode';
export const JeecgListMixin = {
data(){
return {
qrCodeUrl: 'http://123.57.206.181:9000/',
qrCodeForm: 'takePhoneForm',
qrCodeValue: 'http://192.168.158.19:3000/takePhoneForm', // 这里填写你想要生成二维码的内容
qrCodeImage: null, // 用于存储二维码图像数据
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
queryParam: {},
/* 数据源 */
@ -58,6 +63,11 @@ export const JeecgListMixin = {
//初始化字典配置 在自己页面定义
this.initDictConfig();
}
if (process.env.NODE_ENV == 'development') {
this.qrCodeValue = 'http://localhost:3000/'+ this.qrCodeForm
} else {
this.qrCodeValue = this.qrCodeUrl + this.qrCodeForm
}
},
computed: {
//token header
@ -369,6 +379,41 @@ export const JeecgListMixin = {
let url = getFileAccessHttpUrl(text)
window.open(url);
},
// 生成二维码并准备下载
generateQRCodeToDataUrl(id) {
// 使用 qrcode 库的 toDataURL 方法生成二维码图像数据
let qrCodeValueId = this.qrCodeValue + '?id=' + id
QRCode.toDataURL(qrCodeValueId, (err, url) => {
if (err) console.error('生成二维码失败', err);
this.qrCodeImage = url;
});
},
// 下载二维码
handleDownloadQRCode(id,fileName) {
if (!this.qrCodeImage) {
// 如果二维码还未生成则先生成
this.generateQRCodeToDataUrl(id);
// 等待二维码生成完成后进行下载
setTimeout(() => {
this.downloadQRCode(fileName);
}, 100); // 延迟100毫秒确保二维码已生成
} else {
// 如果二维码已经存在则直接下载
this.downloadQRCode(fileName);
}
},
downloadQRCode(fileName){
const link = document.createElement('a');
link.href = this.qrCodeImage;
link.download = fileName; // 设置下载文件名,"提货.png"
// 触发点击事件以开始下载
document.body.appendChild(link);
link.click();
// 移除创建的<a>元素
document.body.removeChild(link);
},
}
}

View File

@ -9,7 +9,7 @@ import { generateIndexRouter, isOAuth2AppEnv } from '@/utils/util'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/user/login', '/user/register', '/user/register-result','/user/alteration','/takePhoneForm'] // no redirect whitelist
const whiteList = ['/user/login', '/user/register', '/user/register-result','/user/alteration','/takePhoneForm','/takeDeliverPhoneForm'] // no redirect whitelist
whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
router.beforeEach((to, from, next) => {

View File

@ -0,0 +1,22 @@
// 车牌验证
export const validateCarNumber = (rule, value, callback) => {
const normalPattern = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵青藏川宁琼使领][A-Z][A-Z0-9]{5}$/;
const newEnergyPattern = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵青藏川宁琼使领][A-Z][DF][A-Z0-9]{5}$/;
if (!normalPattern.test(value) && !newEnergyPattern.test(value)) {
callback(new Error('请输入正确的车牌号'));
} else {
callback();
}
};
// 电话号码验证
export const validateTel = (rule, value, callback) => {
const regMobile = /^1[3-9]\d{9}$/;
const regPhone = /^($\d{3,4}$|\d{3,4}-|\s)?\d{7,8}(-\d{3,5})?$/;
if (!regMobile.test(value) && !regPhone.test(value)) {
callback(new Error('请输入正确的手机号码或固定电话'));
} else {
callback();
}
};

View File

@ -114,6 +114,12 @@
<a>删除</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a @click="handleTake(record)">送货</a>
</a-menu-item>
<a-menu-item>
<a @click="handleDownloadQRCode(record.id, '送货.png')">下载二维码</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -122,6 +128,7 @@
</div>
<delivery-plan-modal ref="modalForm" @ok="modalFormOk"></delivery-plan-modal>
<TakeModal ref="takeModal" @ok="takeModalOk"/>
</a-card>
</template>
@ -131,16 +138,19 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import DeliveryPlanModal from './modules/DeliveryPlanModal'
import TakeModal from './modules/TakeModal.vue'
export default {
name: 'DeliveryPlanList',
mixins:[JeecgListMixin, mixinDevice],
components: {
DeliveryPlanModal
DeliveryPlanModal,
TakeModal
},
data () {
return {
description: '送货计划管理页面',
qrCodeForm: 'takeDeliverPhoneForm',
// 表头
columns: [
{
@ -253,6 +263,15 @@
},
},
methods: {
takeModalOk(){
this.$message.success("操作成功,请到车辆出入厂流程管理中查询数据");
},
// 送货
handleTake(record){
this.$refs.takeModal.edit(record);
this.$refs.takeModal.title = "送货";
this.$refs.takeModal.disableSubmit = false;
},
initDictConfig(){
},
getSuperFieldList(){

View File

@ -23,22 +23,6 @@
<a-input v-model="model.artEmail" placeholder="请输入实际预约人邮箱" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="紧急情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="urgency">
<!-- <a-input v-model="model.urgency" placeholder="请输入紧急" ></a-input> -->
<j-dict-select-tag type="list" v-model="model.urgency" dictCode="urgency" placeholder="请选择紧急情况" />
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="产品标签" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productLabel">
<a-input v-model="model.productLabel" placeholder="请输入产品标签" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="备注信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注信息" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="对接人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cpName">
<a-input v-model="model.cpName" placeholder="请输入入厂对接人姓名" ></a-input>
@ -55,11 +39,27 @@
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="PO" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ffectivePo">
<a-input v-model="model.ffectivePo" placeholder="请输入PO" ></a-input>
<a-form-model-item label="紧急情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="urgency">
<!-- <a-input v-model="model.urgency" placeholder="请输入紧急" ></a-input> -->
<j-dict-select-tag type="list" v-model="model.urgency" dictCode="urgency" placeholder="请选择紧急情况" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="8">
<a-form-model-item label="产品标签" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productLabel">
<a-input v-model="model.productLabel" placeholder="请输入产品标签" ></a-input>
</a-form-model-item>
</a-col> -->
<a-col :span="8">
<a-form-model-item label="备注信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注信息" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="PO" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ffectivePo">
<a-input v-model="model.ffectivePo" placeholder="请输入PO" @keyup.enter.native="getByPo"></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="8">
<a-form-model-item label="料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pn">
<a-input v-model="model.pn" placeholder="请输入料号" ></a-input>
</a-form-model-item>
@ -73,10 +73,28 @@
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<j-dict-select-tag type="list" v-model="model.unit" dictCode="unit" placeholder="请选择单位" />
</a-form-model-item>
</a-col>
</a-col> -->
</a-row>
</a-form-model>
</j-form-container>
<table style="width: 100%;">
<thead>
<tr align="center">
<th style="width: 25%;">料号</th>
<th style="width: 25%;">数量</th>
<th style="width: 25%;">单位</th>
<th style="width: 25%;">供应商</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in poList" align="center" :key="index">
<td style="width: 25%;">{{ item.pn }}</td>
<td style="width: 25%;"><input type="number" v-model="item.planQty" min="0" :max="item.planQty" style="width: 100%;"></td>
<td style="width: 25%;">{{ item.unit }}</td>
<td style="width: 25%;">{{ item.supplier }}</td>
</tr>
</tbody>
</table>
</a-spin>
</template>
@ -101,6 +119,7 @@
return {
model:{
},
poList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 },
@ -115,7 +134,8 @@
url: {
add: "/deliveryplan/deliveryPlan/add",
edit: "/deliveryplan/deliveryPlan/edit",
queryById: "/deliveryplan/deliveryPlan/queryById"
queryById: "/deliveryplan/deliveryPlan/queryById",
getByPo: "/deliveryplan/deliveryPlan/getByPo"
}
}
},
@ -127,6 +147,10 @@
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
const userInfo = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value
this.modelDefault.artName = userInfo.realname
this.modelDefault.artTel = userInfo.phone
this.modelDefault.artEmail = userInfo.email
},
methods: {
add () {
@ -135,6 +159,7 @@
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
this.getByPo();
},
submitForm () {
const that = this;
@ -151,6 +176,7 @@
httpurl+=this.url.edit;
method = 'put';
}
this.model.deliveryPlanDetailList = this.poList;
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
@ -165,6 +191,13 @@
})
},
getByPo(){
getAction(this.url.getByPo,{po: this.model.ffectivePo}).then(res => {
if(res.success){
this.poList = res.result;
}
})
}
}
}
</script>

View File

@ -0,0 +1,156 @@
<template>
<div class="table-page-search-wrapper" style="padding: 5px 10px;">
<h3 style="text-align: center;">送货</h3>
<a-form-model ref="form" :model="model" :rules="validatorRules" layout="inline">
<a-row>
<a-col>
<a-form-model-item label="送货需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sgNo">
<a-input v-model="model.sgNo" placeholder="请输入送货需求编号" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="预约人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="artName">
<a-input v-model.trim="model.artName" placeholder="请输入预约人姓名" disabled/>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="预约人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="artTel">
<a-input v-model.trim="model.artTel" placeholder="请输入预约人电话" disabled/>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="预约人邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="artEmail">
<a-input v-model.trim="model.artEmail" placeholder="请输入预约人邮箱" disabled/>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="PO" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ffectivePo">
<a-input v-model.trim="model.ffectivePo" placeholder="请输入PO" disabled/>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="物流公司" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logistics">
<a-input v-model.trim="model.logistics" placeholder="请输入物流公司"/>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carNum">
<a-input v-model.trim="model.carNum" placeholder="请输入车牌号" ></a-input>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverName">
<a-input v-model.trim="model.driverName" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverIdCard">
<a-input v-model.trim="model.driverIdCard" placeholder="请输入身份证" ></a-input>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverTel">
<a-input v-model.trim="model.driverTel" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="预计到达" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="etaTime">
<j-date v-model="model.etaTime" placeholder="请选择时间" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;"></j-date>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="进厂门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterFactoryDoor">
<a-input v-model.trim="model.enterFactoryDoor" placeholder="请输入进厂门" ></a-input>
</a-form-model-item>
</a-col>
<a-col>
<a-form-model-item label="出厂门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="exitFactoryDoor">
<a-input v-model.trim="model.exitFactoryDoor" placeholder="请输入出厂门" ></a-input>
</a-form-model-item>
</a-col>
<a-col style="text-align: center;margin-bottom: 20px;">
<a-button @click="handleConfirm" type="primary">确定</a-button>
</a-col>
</a-row>
</a-form-model>
</div>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { validateCarNumber, validateTel } from '@/utils/validators';
export default {
data() {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
validatorRules: {
vdNo :[{required: true, message: '请选择用车需求编号!'}],
shipType :[{required: true, message: '请选择发货类型!'}],
carType :[{required: true, message: '请选择车型!'}],
carLong :[{required: true, message: '请选择车长!'}],
pickUpHub :[{required: true, message: '请选择取货仓库!'}],
deliveryAddress :[{required: true, message: '请选择送货地点!'}],
supplierCode :[{required: true, message: '请选择供应商编码!'}],
carNum :[{required: true, message: '请输入车牌号!'},
{ validator: validateCarNumber, trigger: 'blur' }
],
logistics :[{required: true, message: '请输入物流公司!'}],
driverName :[{required: true, message: '请输入司机姓名!'}],
driverTel :[{required: true, message: '请输入电话!'},
{ validator: validateTel, trigger: 'blur' }
],
etaTime :[{required: true, message: '请选择时间!'}],
},
url:{
getVdCountById: '/deliveryplan/deliveryPlan/getVdCountById',
take: "/vehicleinout/vehicleInOut/take",
}
};
},
created() {
this.getVdCountById();
},
methods: {
getVdCountById(){
const queryParams = new URLSearchParams(window.location.search);
const id =queryParams.get('id');
console.log(queryParams);
console.log(queryParams.get('id'));
getAction(this.url.getVdCountById, {id:id}).then(res => {
if(res.success){
this.model = res.result.records[0];
}else{
this.$message.warning(res.message);
}
})
},
handleConfirm(){
this.$refs.form.validate(valid => {
if (valid) {
// 入厂类型: 送货
this.model.efType = '0';
httpAction(this.url.take,this.model,'post').then((res)=>{
if(res.success){
this.$message.success(res.message);
this.model = {}
}else{
this.$message.warning(res.message);
}
})
}
})
},
},
};
</script>

View File

@ -0,0 +1,140 @@
<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="logistics">
<a-input v-model.trim="model.logistics" placeholder="请输入物流公司"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverName">
<a-input v-model.trim="model.driverName" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverIdCard">
<a-input v-model.trim="model.driverIdCard" placeholder="请输入身份证" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverTel">
<a-input v-model.trim="model.driverTel" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="预计到达" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="etaTime">
<j-date v-model="model.etaTime" placeholder="请选择时间" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;"></j-date>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="进厂门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterFactoryDoor">
<a-input v-model.trim="model.enterFactoryDoor" placeholder="请输入进厂门" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="出厂门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="exitFactoryDoor">
<a-input v-model.trim="model.exitFactoryDoor" placeholder="请输入出厂门" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TakeForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
driverInfoList:[],
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 18 },
},
confirmLoading: false,
validatorRules: {
vdNo :[{required: true, message: '请选择用车需求编号!'}],
shipType :[{required: true, message: '请选择发货类型!'}],
carType :[{required: true, message: '请选择车型!'}],
carLong :[{required: true, message: '请选择车长!'}],
pickUpHub :[{required: true, message: '请选择取货仓库!'}],
deliveryAddress :[{required: true, message: '请选择送货地点!'}],
supplierCode :[{required: true, message: '请选择供应商编码!'}],
carNum :[{required: true, message: '请输入车牌号!'}],
logistics :[{required: true, message: '请输入物流公司!'}],
driverName :[{required: true, message: '请输入司机姓名!'}],
driverTel :[{required: true, message: '请输入电话!'}],
etaTime :[{required: true, message: '请选择时间!'}],
},
url: {
add: "/vehicledemandcount/vehicleDemandCount/add",
take: "/vehicleinout/vehicleInOut/take",
queryById: "/vehicledemandcount/vehicleDemandCount/queryById",
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
// 入厂类型: 送货
this.model.efType = '0';
httpAction(this.url.take,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;
})
}
})
},
}
}
</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="关闭">
<take-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></take-form>
</j-modal>
</template>
<script>
import TakeForm from './TakeForm'
export default {
name: 'TakeModal',
components: {
TakeForm
},
data () {
return {
title:'',
width:1200,
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(val){
this.$emit('ok',val);
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

View File

@ -135,24 +135,24 @@
<a>删除</a>
</a-popconfirm>
</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>预约入厂</a>
</a-popconfirm>
</a-menu-item>
</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-popconfirm title="确定入厂审核吗?" @confirm="() => handleConfirm(record.id, '3')">
<a>入厂审核</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item v-has="'vehicleinout:vehicleInOut:handleConfirm4'">
<a-popconfirm title="确定审核出厂吗?" @confirm="() => handleConfirm(record.id, '4')">
<a>审核出厂</a>
<a-popconfirm title="确定出厂审核吗?" @confirm="() => handleConfirm(record.id, '4')">
<a>出厂审核</a>
</a-popconfirm>
</a-menu-item>
</a-menu>

View File

@ -54,7 +54,12 @@
<a-col :span="8">
<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> -->
<a-select placeholder="发货单" v-model="model.invoice" showSearch>
<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-col :span="8">
@ -103,6 +108,7 @@ import { min } from 'xe-utils/methods'
pickUpHubList:[],
pnSpecList:[],
pnList:[],
invoiceList:[],
model:{
},
labelCol: {
@ -130,7 +136,8 @@ import { min } from 'xe-utils/methods'
queryById: "/deliverydemand/deliveryDemand/queryById",
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum",
getCity: "/logisticsroute/logisticsRoute/getCity",
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList"
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList",
getShip: "/deliverydemand/deliveryDemand/getShip"
}
}
},
@ -144,6 +151,7 @@ import { min } from 'xe-utils/methods'
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getCity();
this.getPnSpecList();
this.getShip();
},
methods: {
changeGetpalletsNum() {
@ -229,6 +237,13 @@ import { min } from 'xe-utils/methods'
pnChange(val){
this.pnList = this.pnSpecList.filter(x => x.includes(val));
},
getShip(){
getAction(this.url.getShip).then(res => {
if (res.success) {
this.invoiceList = res.result
}
})
}
}
}
</script>

View File

@ -133,7 +133,7 @@
<a @click="handleTake(record)">提货</a>
</a-menu-item>
<a-menu-item v-if="record.auditResult == 1">
<a @click="handleDownloadQRCode(record.id)">下载二维码</a>
<a @click="handleDownloadQRCode(record.id, '提货.png')">下载二维码</a>
</a-menu-item>
</a-menu>
</a-dropdown>
@ -153,7 +153,6 @@
import { mixinDevice } from '@/utils/mixin'
import { getAction,deleteAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import QRCode from 'qrcode';
import VehicleDemandCountModal from './modules/VehicleDemandCountModal'
import TakeModal from './modules/TakeModal.vue'
@ -168,8 +167,6 @@
return {
description: '用车需求计算管理页面',
totalPallets: 0, // 总费用
qrCodeValue: 'http://192.168.158.19:3000/takePhoneForm', // 这里填写你想要生成二维码的内容
qrCodeImage: null, // 用于存储二维码图像数据
// 表头
columns: [
{
@ -265,11 +262,6 @@
}
},
created() {
if (process.env.NODE_ENV == 'development') {
this.qrCodeValue = 'http://localhost:3000/takePhoneForm'
} else {
this.qrCodeValue = 'http://114.215.188.164:9000/takePhoneForm'
}
this.getSuperFieldList();
},
computed: {
@ -339,41 +331,6 @@
loadData(){},
initDictConfig(){
},
// 生成二维码并准备下载
generateQRCodeToDataUrl(id) {
// 使用 qrcode 库的 toDataURL 方法生成二维码图像数据
let qrCodeValueId = this.qrCodeValue + '?id=' + id
QRCode.toDataURL(qrCodeValueId, (err, url) => {
if (err) console.error('生成二维码失败', err);
this.qrCodeImage = url;
});
},
// 下载二维码
handleDownloadQRCode(id) {
if (!this.qrCodeImage) {
// 如果二维码还未生成则先生成
this.generateQRCodeToDataUrl(id);
// 等待二维码生成完成后进行下载
setTimeout(() => {
this.downloadQRCode();
}, 100); // 延迟100毫秒确保二维码已生成
} else {
// 如果二维码已经存在则直接下载
this.downloadQRCode();
}
},
downloadQRCode(){
const link = document.createElement('a');
link.href = this.qrCodeImage;
link.download = '提货.png'; // 设置下载文件名
// 触发点击事件以开始下载
document.body.appendChild(link);
link.click();
// 移除创建的<a>元素
document.body.removeChild(link);
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'vdNo',text:'用车需求编号'})

View File

@ -132,7 +132,6 @@
carNum :[{required: true, message: '请输入车牌号!'}],
logistics :[{required: true, message: '请输入物流公司!'}],
driverName :[{required: true, message: '请输入司机姓名!'}],
driverIdCard :[{required: true, message: '请输入身份证!'}],
driverTel :[{required: true, message: '请输入电话!'}],
etaTime :[{required: true, message: '请选择时间!'}],