提货移动版
This commit is contained in:
parent
298f4ed5c2
commit
5e106935c4
@ -378,5 +378,9 @@ export const constantRouterMap = [
|
||||
path: '/404',
|
||||
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
||||
},
|
||||
|
||||
{
|
||||
path: '/takePhoneForm',
|
||||
component: ()=>import('@/views/tms/outbound/vehicledemandcount/modules/TakePhoneForm'),
|
||||
meta: {title: '提货移动版'}
|
||||
}
|
||||
]
|
||||
|
@ -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'] // no redirect whitelist
|
||||
const whiteList = ['/user/login', '/user/register', '/user/register-result','/user/alteration','/takePhoneForm'] // no redirect whitelist
|
||||
whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
@ -133,7 +133,7 @@
|
||||
<a @click="handleTake(record)">提货</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="record.auditResult == 1">
|
||||
<a @click="handleDownloadQRCode(record)">下载二维码</a>
|
||||
<a @click="handleDownloadQRCode(record.id)">下载二维码</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
@ -168,7 +168,7 @@
|
||||
return {
|
||||
description: '用车需求计算管理页面',
|
||||
totalPallets: 0, // 总费用
|
||||
qrCodeValue: '移动版页面还未开发', // 这里填写你想要生成二维码的内容
|
||||
qrCodeValue: 'http://192.168.158.19:3000/takePhoneForm', // 这里填写你想要生成二维码的内容
|
||||
qrCodeImage: null, // 用于存储二维码图像数据
|
||||
// 表头
|
||||
columns: [
|
||||
@ -265,7 +265,12 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
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: {
|
||||
importExcelUrl: function(){
|
||||
@ -335,18 +340,19 @@
|
||||
initDictConfig(){
|
||||
},
|
||||
// 生成二维码并准备下载
|
||||
generateQRCodeToDataUrl() {
|
||||
generateQRCodeToDataUrl(id) {
|
||||
// 使用 qrcode 库的 toDataURL 方法生成二维码图像数据
|
||||
QRCode.toDataURL(this.qrCodeValue, (err, url) => {
|
||||
let qrCodeValueId = this.qrCodeValue + '?id=' + id
|
||||
QRCode.toDataURL(qrCodeValueId, (err, url) => {
|
||||
if (err) console.error('生成二维码失败', err);
|
||||
this.qrCodeImage = url;
|
||||
});
|
||||
},
|
||||
// 下载二维码
|
||||
handleDownloadQRCode() {
|
||||
handleDownloadQRCode(id) {
|
||||
if (!this.qrCodeImage) {
|
||||
// 如果二维码还未生成,则先生成
|
||||
this.generateQRCodeToDataUrl();
|
||||
this.generateQRCodeToDataUrl(id);
|
||||
// 等待二维码生成完成后进行下载
|
||||
setTimeout(() => {
|
||||
this.downloadQRCode();
|
||||
|
@ -0,0 +1,193 @@
|
||||
<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="vdNo">
|
||||
<a-input v-model="model.vdNo" placeholder="请输入用车需求编号" disabled ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="发货类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipType">
|
||||
<j-dict-select-tag type="list" v-model="model.shipType" dictCode="ship_type" placeholder="请选择发货类型" disabled/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType">
|
||||
<a-input v-model="model.carType" placeholder="请输入车型" disabled ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="车长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carLong">
|
||||
<a-input-number v-model="model.carLong" placeholder="请输入车长" style="width: 100%" disabled/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
|
||||
<a-input v-model="model.pickUpHub" placeholder="请输入取货仓库" disabled ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="送货地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryAddress">
|
||||
<a-input v-model="model.deliveryAddress" placeholder="请输入送货地点" disabled ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="供应商编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode">
|
||||
<a-input v-model.trim="model.supplierCode" placeholder="请输入供应商编码" disabled/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName">
|
||||
<a-input v-model.trim="model.supplierName" placeholder="请输入供应商名称" disabled/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-form-model-item label="物流公司" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logistics">
|
||||
<a-auto-complete v-model="model.logistics" placeholder="请输入物流公司" @select="logisticsSelect" @change="logisticsChange" :dataSource="logisticsList"></a-auto-complete>
|
||||
</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'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
driverInfoList:[],
|
||||
logisticsList:[],
|
||||
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: '请输入车牌号!'}],
|
||||
logistics :[{required: true, message: '请输入物流公司!'}],
|
||||
driverName :[{required: true, message: '请输入司机姓名!'}],
|
||||
driverIdCard :[{required: true, message: '请输入身份证!'}],
|
||||
driverTel :[{required: true, message: '请输入电话!'}],
|
||||
etaTime :[{required: true, message: '请选择时间!'}],
|
||||
},
|
||||
url:{
|
||||
getVdCountById: '/vehicledemandcount/vehicleDemandCount/getVdCountById',
|
||||
getDriverInfo: "/logisticsdriver/logisticsDriver/getDriverInfo",
|
||||
take: "/vehicleinout/vehicleInOut/take",
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getVdCountById();
|
||||
this.getDriverInfo();
|
||||
},
|
||||
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);
|
||||
}
|
||||
})
|
||||
},
|
||||
getDriverInfo(){
|
||||
getAction(this.url.getDriverInfo).then(res => {
|
||||
if (res.success) {
|
||||
this.driverInfoList = res.result;
|
||||
this.logisticsList = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
logisticsSelect(){
|
||||
let logistics = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[0];
|
||||
let carNum = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[1];
|
||||
let driverName = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[2];
|
||||
let driverTel = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[3];
|
||||
let driverIdCard = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[4];
|
||||
this.model.logistics = logistics;
|
||||
this.model.carNum = carNum;
|
||||
this.model.driverName = driverName;
|
||||
this.model.driverTel = driverTel;
|
||||
this.model.driverIdCard = driverIdCard;
|
||||
},
|
||||
logisticsChange(val){
|
||||
this.logisticsList = this.driverInfoList.filter(x => x.includes(val));
|
||||
},
|
||||
handleConfirm(){
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
// 入厂类型: 提货
|
||||
this.model.efType = '1';
|
||||
httpAction(this.url.take,this.model,'post').then((res)=>{
|
||||
if(res.success){
|
||||
this.$message.success(res.message);
|
||||
}else{
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user