修复扫描记录页bug

This commit is contained in:
liuyp 2024-05-11 17:55:23 +08:00
parent 3b2ebeba1b
commit 02badc1782
12 changed files with 93 additions and 163 deletions

View File

@ -242,7 +242,7 @@ export default {
this.$message.error("请选择派件员"); this.$message.error("请选择派件员");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendMan = this.form.dispatchOrSendMan; let dispatchOrSendMan = this.form.dispatchOrSendMan;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;

View File

@ -233,7 +233,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {

View File

@ -232,7 +232,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight; let scanWeight = this.form.scanWeight;
let bagNo = this.form.bagNo; let bagNo = this.form.bagNo;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;

View File

@ -239,7 +239,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {

View File

@ -13,9 +13,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="重量" prop="scanWeight" label-width="60px"> <el-form-item label="车牌号" prop="carNo" label-width="60px">
<el-input v-model="form.scanWeight" placeholder="扫描重量" > <el-input v-model="form.carNo" placeholder="请输入" >
<span slot="suffix">KG</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -67,7 +66,7 @@
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange"> <el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" /> <el-table-column :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
<el-table-column :label="$t('目的地网点')" align="center" prop="scanMan" min-width="150" /> <el-table-column :label="$t('车牌号')" align="center" prop="carNo" min-width="150" />
<el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" > <el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.emis_scan_type" :value="scope.row.scanType"/> <dict-tag :options="dict.type.emis_scan_type" :value="scope.row.scanType"/>
@ -80,17 +79,8 @@
<span>{{ parseTime(scope.row.scanDate) }}</span> <span>{{ parseTime(scope.row.scanDate) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('省份编号')" align="center" prop="dispatchOrSendMan" min-width="100" />
<el-table-column :label="$t('下一站')" align="center" prop="preOrNextStation" min-width="100" />
<el-table-column :label="$t('重量')" align="center" prop="scanWeight" min-width="100" />
</el-table> </el-table>
<!-- <div style="text-align: center;margin-bottom: 10px;">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div> -->
<el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body> <el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
<el-form ref="formBatch" :model="formBatch" :rules="rulesBatch" size="mini" label-width="60px"> <el-form ref="formBatch" :model="formBatch" :rules="rulesBatch" size="mini" label-width="60px">
<el-row> <el-row>
@ -234,21 +224,22 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight // let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let carNo = this.form.carNo;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, // scanWeight:scanWeight,
// scanWeight:null, carNo:carNo,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
} }
) )
let scanInfo = { let scanInfo = {
scanType:"20", scanType:"301",
opType:1, opType:1,
scanData:scList scanData:scList
}; };
@ -265,8 +256,8 @@ export default {
this.$modal.msgError(scanRstItem.message); this.$modal.msgError(scanRstItem.message);
return; return;
} }
this.form.scanType = '20'; this.form.scanType = '301';
this.form.scanDate = new Date(); this.form.scanDate = new Date();
let record =Object.assign({}, this.form) let record =Object.assign({}, this.form)
record.billCode=scanRstItem.billCode; record.billCode=scanRstItem.billCode;
@ -323,7 +314,9 @@ export default {
updateTime: null, updateTime: null,
remark: null, remark: null,
updateSite: null, updateSite: null,
createSite: null createSite: null,
carNo:null,
bagNo:null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -332,18 +325,6 @@ export default {
this.ids = selection.map(item => item.billCode) this.ids = selection.map(item => item.billCode)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
// this.checkedDetail = selection;
// if (selection.length > 1) {
// this.$refs.multipleTable.clearSelection();
// this.$refs.multipleTable.toggleRowSelection(selection.pop());
// } else {
// //将选中行存入缓存中
// this.checkedDetail = selection;
// }
}, },
// 扫描上传 // 扫描上传
handleScanUpload(){ handleScanUpload(){
@ -356,15 +337,17 @@ export default {
{ {
billCode:item.billCode, billCode:item.billCode,
scanWeight:item.scanWeight, scanWeight:item.scanWeight,
carNo:item.carNo,
preOrNextStationCode:item.preOrNextStationCode, preOrNextStationCode:item.preOrNextStationCode,
scanDate:item.scanDate scanDate:item.scanDate,
bagNo:item.bagNo
// dispatchOrSendManCode:item.dispatchOrSendManCode // dispatchOrSendManCode:item.dispatchOrSendManCode
} }
); );
}); });
// 检查 // 检查
let scanInfo = {scanType:"20",opType:2,scanData:scanData} let scanInfo = {scanType:"301",opType:2,scanData:scanData}
console.log(scanInfo) console.log(scanInfo)
doScan(scanInfo).then(response => { doScan(scanInfo).then(response => {
@ -377,17 +360,6 @@ export default {
} }
this.$modal.msgSuccess(scanRstItem.message); this.$modal.msgSuccess(scanRstItem.message);
// this.form.scanType = '10';
// this.form.scanDate = new Date();
// let record =Object.assign({}, this.form);
// console.log(record)
// let indexBillCode=record.billCode;
// this.dataMap[indexBillCode]=record;
// this.emisTmsScanRecordList.push(record);
// this.form.billCode =null;
}); });
@ -406,13 +378,13 @@ export default {
// 检查 // 检查
let scanInfo = { let scanInfo = {
scanType:"20", scanType:"301",
opType:1, opType:1,
scanData:[ scanData:[
{ {
billCode:this.form.billCode, billCode:this.form.billCode,
scanWeight:this.form.scanWeight, carNo:this.form.carNo,
// dispatchOrSendManCode:this.form.dispatchOrSendManCode dispatchOrSendManCode:this.form.dispatchOrSendManCode
} }
] ]
}; };
@ -426,7 +398,7 @@ export default {
return; return;
} }
this.form.scanType = '20'; this.form.scanType = '301';
this.form.scanDate = new Date(); this.form.scanDate = new Date();
let record =Object.assign({}, this.form) let record =Object.assign({}, this.form)
record.billCode=scanRstItem.billCode; record.billCode=scanRstItem.billCode;

View File

@ -234,7 +234,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {

View File

@ -244,7 +244,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {

View File

@ -239,7 +239,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {

View File

@ -60,7 +60,7 @@
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="扫描时间" prop="dateTimeRange"> <el-form-item label="扫描时间" prop="dateTimeRange">
<elDateAdvPicker clearable v-model="dateTimeRange" ></elDateAdvPicker> <elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-col> </el-col>
@ -274,7 +274,7 @@ export default {
status: null, status: null,
delFlag: null, delFlag: null,
remark: null, remark: null,
params:[],//扩展参数 params:{},//扩展参数
// scanSite:null, // scanSite:null,
queryType:"1",// 选择运单类型,默认为 运单号:1,订单号:2 queryType:"1",// 选择运单类型,默认为 运单号:1,订单号:2
@ -319,11 +319,16 @@ export default {
console.log("---->this.queryParams,", this.queryParams); console.log("---->this.queryParams,", this.queryParams);
// debugger; // debugger;
if (null != this.dateTimeRange && '' != this.dateTimeRange) { if (null != this.dateTimeRange && '' != this.dateTimeRange) {
this.queryParams.params["beginScanDate"] = this.dateTimeRange[0]; // this.queryParams.params["beginScanDate"] = this.dateTimeRange[0];
this.queryParams.params["endScanDate"] = this.dateTimeRange[1]; // this.queryParams.params["endScanDate"] = this.dateTimeRange[1];
this.queryParams.params.beginScanDate = this.dateTimeRange[0];
this.queryParams.params.endScanDate = this.dateTimeRange[1];
}else{
this.queryParams.params.beginScanDate = null;
this.queryParams.params.endScanDate = null;
} }
this.queryParams.params["queryType"] = this.queryParams.queryType;//1:yd;2:dd; this.queryParams.params.queryType = this.queryParams.queryType;//1:yd;2:dd;
this.queryParams.params["isSubBill"] = this.queryParams.isSubBill;//1:子单;0:主单 this.queryParams.params.isSubBill = this.queryParams.isSubBill;//1:子单;0:主单
let queryType = this.queryParams.queryType; let queryType = this.queryParams.queryType;
if(queryType == "1"){ if(queryType == "1"){
@ -340,6 +345,7 @@ export default {
// this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0]; // this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
// this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1]; // this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
// } // }
// console.log(this.addDateRange(this.queryParams, this.dateTimeRange))
// listEmisTmsScanRecord(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => { // listEmisTmsScanRecord(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
listEmisTmsScanRecord(this.queryParams).then(response => { listEmisTmsScanRecord(this.queryParams).then(response => {
// this.emisElectronicPagApplyList = response.rows; // this.emisElectronicPagApplyList = response.rows;
@ -383,16 +389,16 @@ export default {
this.resetModifyParams(); this.resetModifyParams();
}, },
onScanSiteSelect(item){ onScanSiteSelect(item){
this.queryParams.scanSite=item.siteName; this.queryParams.scanSite=item && item.siteName;
this.queryParams.scanSiteCode=item.siteCode; this.queryParams.scanSiteCode=item && item.siteCode;
}, },
onPreOrNextSiteSelect(item){ onPreOrNextSiteSelect(item){
this.queryParams.preOrNextStation=item.siteName; this.queryParams.preOrNextStation=item && item.siteName;
this.queryParams.preOrNextStationCode=item.siteCode; this.queryParams.preOrNextStationCode=item && item.siteCode;
}, },
onDestinationSelect(item){ onDestinationSelect(item){
this.queryParams.destCode=item.destCode; this.queryParams.destCode=item && item.destCode;
this.queryParams.destName=item.destName; this.queryParams.destName=item && item.destName;
}, },
onDateSelect(value){ onDateSelect(value){
console.log("date picker---->", value) console.log("date picker---->", value)
@ -621,7 +627,7 @@ export default {
this.queryParams.params["queryType"] = this.queryParams.queryType;//1:yd;2:dd; this.queryParams.params["queryType"] = this.queryParams.queryType;//1:yd;2:dd;
this.queryParams.params["isSubBill"] = this.queryParams.isSubBill;//1:子单;0:主单 this.queryParams.params["isSubBill"] = this.queryParams.isSubBill;//1:子单;0:主单
listEmisTmsScanRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => { listEmisTmsScanRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
this.downloadLoading = false this.downloadLoading = false
if (response.code === 200) { if (response.code === 200) {
const curList = [] const curList = []
@ -648,38 +654,26 @@ export default {
} }
}); });
listEmisTmsScanRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => { // listEmisTmsScanRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
// this.emisElectronicPagApplyList = response.rows; // this.emisElectronicPagApplyList = [];
// this.loading = false; // this.loading = false;
this.emisElectronicPagApplyList = []; // let rows = response.rows;
// this.total = 0; // this.total = response.total;
this.loading = false; // if(!rows || rows.length == 0){
let rows = response.rows; // this.$message.error("未查到单号");
this.total = response.total; // return;
if(!rows || rows.length == 0){ // }
this.$message.error("未查到单号"); // for (let index = 0; index < rows.length; index++) {
return; // let scanRstItem = rows[index];
} // console.log(scanRstItem);
for (let index = 0; index < rows.length; index++) {
let scanRstItem = rows[index];
console.log(scanRstItem);
let record =Object.assign({}, scanRstItem) // let record =Object.assign({}, scanRstItem)
// record.carNo=scanRstItem.carNo; // record.orderType = this.queryParams.orderType;
// record.scanData=scanRstItem.scanData; // record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
// record.scanType=scanRstItem.scanType; // record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
record.orderType = this.queryParams.orderType; // this.emisElectronicPagApplyList.push(record);
record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName; // }
record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation; // });
// record.createTime=scanRstItem.createTime;
// record.scanWeight=scanRstItem.scanWeight;
// console.log(record)
// let indexBillCode=record.billCode;
// this.dataMap[indexBillCode]=record;
// this.emisTmsScanRecordList.push(record);
this.emisElectronicPagApplyList.push(record);
}
});
}, },
@ -704,9 +698,9 @@ export default {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1 return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
}, },
/** 时间搜索响应函数 */ /** 时间搜索响应函数 */
dateTimeChange(value){ // dateTimeChange(value){
this.dateTimeRange=value; // this.dateTimeRange=value;
}, // },
} }
}; };
</script> </script>

View File

@ -300,7 +300,7 @@ export default {
this.openBatch=false; this.openBatch=false;
}, },
submitFormBatch(){ submitFormBatch(){
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendMan = this.form.dispatchOrSendMan; let dispatchOrSendMan = this.form.dispatchOrSendMan;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;

View File

@ -13,22 +13,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="重量" prop="scanWeight" label-width="60px"> <el-form-item label="车牌号" prop="carNo" label-width="60px">
<el-input v-model="form.scanWeight" placeholder="扫描重量" > <el-input v-model="form.carNo" placeholder="请输入" />
<span slot="suffix">KG</span>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item :label="$t('下一站')" prop="preOrNextStation">
<EmisGetNextSitePicker v-model="form.preOrNextStation" @onChange="onSiteSelect" ></EmisGetNextSitePicker>
</el-form-item>
</el-col>
</el-form> </el-form>
</el-row> </el-row>
<div slot="toolbar"> <div slot="toolbar">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
@ -67,7 +58,7 @@
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange"> <el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" /> <el-table-column :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
<el-table-column :label="$t('目的地网点')" align="center" prop="scanMan" min-width="150" /> <el-table-column :label="$t('车牌号')" align="center" prop="carNo" min-width="150" />
<el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" > <el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.emis_scan_type" :value="scope.row.scanType"/> <dict-tag :options="dict.type.emis_scan_type" :value="scope.row.scanType"/>
@ -80,16 +71,8 @@
<span>{{ parseTime(scope.row.scanDate) }}</span> <span>{{ parseTime(scope.row.scanDate) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('省份编号')" align="center" prop="dispatchOrSendMan" min-width="100" />
<el-table-column :label="$t('下一站')" align="center" prop="preOrNextStation" min-width="100" />
<el-table-column :label="$t('重量')" align="center" prop="scanWeight" min-width="100" />
</el-table> </el-table>
<!-- <div style="text-align: center;margin-bottom: 10px;">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div> -->
<el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body> <el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
<el-form ref="formBatch" :model="formBatch" :rules="rulesBatch" size="mini" label-width="60px"> <el-form ref="formBatch" :model="formBatch" :rules="rulesBatch" size="mini" label-width="60px">
@ -120,7 +103,7 @@ import { doScan } from "@/api/emis/emisTmsScanRecord";
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue'; import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
export default { export default {
name: "unLoadingScan", name: "UnLoadingScan",
props:{ props:{
id:undefined id:undefined
}, },
@ -193,16 +176,6 @@ export default {
getRowSelect(row, column, event) { getRowSelect(row, column, event) {
// dosomething // dosomething
}, },
onSiteSelect(item){
console.log(item)
// this.form.dispatchOrSendMan=item.empName;
// this.form.dispatchOrSendManCode=item.empCode;
this.form.preOrNextStation=item.destSiteName;
this.form.preOrNextStationCode=item.destSite;
// Todo
},
getRowsSelect(arr) { getRowsSelect(arr) {
this.form.ids= arr.map(item=>item.id) this.form.ids= arr.map(item=>item.id)
}, },
@ -229,26 +202,27 @@ export default {
this.openBatch=false; this.openBatch=false;
}, },
submitFormBatch(){ submitFormBatch(){
if(this.formBatch.billCode==null || this.formBatch.billCode==''){ if(this.formBatch.billCode==null || this.formBatch.billCode==''){
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight // let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; // let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let carNo = this.form.carNo;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, carNo: carNo
// scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode // dispatchOrSendManCode: dispatchOrSendManCode
} }
} }
) )
let scanInfo = { let scanInfo = {
scanType:"20", scanType:"302",
opType:1, opType:1,
scanData:scList scanData:scList
}; };
@ -266,7 +240,7 @@ export default {
return; return;
} }
this.form.scanType = '20'; this.form.scanType = '302';
this.form.scanDate = new Date(); this.form.scanDate = new Date();
let record =Object.assign({}, this.form) let record =Object.assign({}, this.form)
record.billCode=scanRstItem.billCode; record.billCode=scanRstItem.billCode;
@ -356,16 +330,16 @@ export default {
{ {
billCode:item.billCode, billCode:item.billCode,
scanWeight:item.scanWeight, scanWeight:item.scanWeight,
carNo:item.carNo,
preOrNextStationCode:item.preOrNextStationCode, preOrNextStationCode:item.preOrNextStationCode,
scanDate:item.scanDate scanDate:item.scanDate,
// dispatchOrSendManCode:item.dispatchOrSendManCode bagNo:item.bagNo
} }
); );
}); });
// 检查 // 检查
let scanInfo = {scanType:"20",opType:2,scanData:scanData} let scanInfo = {scanType:"302",opType:2,scanData:scanData}
console.log(scanInfo)
doScan(scanInfo).then(response => { doScan(scanInfo).then(response => {
console.log(response); console.log(response);
@ -377,17 +351,6 @@ export default {
} }
this.$modal.msgSuccess(scanRstItem.message); this.$modal.msgSuccess(scanRstItem.message);
// this.form.scanType = '10';
// this.form.scanDate = new Date();
// let record =Object.assign({}, this.form);
// console.log(record)
// let indexBillCode=record.billCode;
// this.dataMap[indexBillCode]=record;
// this.emisTmsScanRecordList.push(record);
// this.form.billCode =null;
}); });
@ -406,12 +369,13 @@ export default {
// 检查 // 检查
let scanInfo = { let scanInfo = {
scanType:"20", scanType:"302",
opType:1, opType:1,
scanData:[ scanData:[
{ {
billCode:this.form.billCode, billCode:this.form.billCode,
scanWeight:this.form.scanWeight, carNo:this.form.carNo,
// scanWeight:this.form.scanWeight,
// dispatchOrSendManCode:this.form.dispatchOrSendManCode // dispatchOrSendManCode:this.form.dispatchOrSendManCode
} }
] ]
@ -426,7 +390,7 @@ export default {
return; return;
} }
this.form.scanType = '20'; this.form.scanType = '302';
this.form.scanDate = new Date(); this.form.scanDate = new Date();
let record =Object.assign({}, this.form) let record =Object.assign({}, this.form)
record.billCode=scanRstItem.billCode; record.billCode=scanRstItem.billCode;

View File

@ -221,7 +221,7 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {