解决bug-560:数据未上传时 列表底部统计当前界面 的记录条数;点击上传后 数据未清除掉
This commit is contained in:
parent
070511242f
commit
ca91b3283b
@ -71,7 +71,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" >
|
||||
@ -89,7 +99,7 @@
|
||||
<el-table-column :label="$t('上一站')" align="center" prop="preOrNextStation" min-width="100" />
|
||||
<el-table-column :label="$t('派件员')" align="center" prop="dispatchOrSendMan" min-width="100" />
|
||||
<el-table-column :label="$t('重量')" align="center" prop="scanWeight" min-width="100" />
|
||||
</el-table>
|
||||
</xd-table>
|
||||
|
||||
<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">
|
||||
@ -114,7 +124,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
import EmisGetPreSitePicker from '@/views/emis/EmisBaseTools/EmisGetPreSitePicker.vue';
|
||||
@ -144,6 +153,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -183,9 +194,11 @@ export default {
|
||||
this.form.recordMan=this.$store.getters.empName;
|
||||
this.form.recordManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
console.log(this.form)
|
||||
|
||||
@ -195,15 +208,9 @@ export default {
|
||||
getRowSelect(row, column, event) {
|
||||
// dosomething
|
||||
},
|
||||
|
||||
onStaffSelect(item){
|
||||
console.log(item)
|
||||
|
||||
// this.form.dispatchOrSendMan=item.empName;
|
||||
// this.form.dispatchOrSendManCode=item.empCode;
|
||||
|
||||
this.form.dispatchOrSendMan=item.empName || this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=item.empCode || this.$store.getters.empCode;
|
||||
this.form.dispatchOrSendMan=item.empName || this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=item.empCode || this.$store.getters.empCode;
|
||||
},
|
||||
getRowsSelect(arr) {
|
||||
this.form.ids= arr.map(item=>item.id)
|
||||
@ -244,7 +251,7 @@ export default {
|
||||
this.$message.error("请选择派件员");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendMan = this.form.dispatchOrSendMan;
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
@ -397,6 +404,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode+item.scanType)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -414,8 +422,9 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
async handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
console.log(selData);
|
||||
var selData = this.selection;
|
||||
let newList = Array.from(this.emisTmsScanRecordList);
|
||||
let dataMap = this.dataMap;
|
||||
|
||||
let scanArrivalData=[];
|
||||
let scanDispathData=[];
|
||||
@ -451,21 +460,19 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
scanArrivalData.forEach((item) => {
|
||||
newList = newList.map(function(nitem){
|
||||
if(nitem && item.billCode == nitem.billCode && nitem.scanType == "30"){
|
||||
dataMap[item.billCode+"30"]=null;
|
||||
return null;
|
||||
}else{
|
||||
return nitem;
|
||||
}
|
||||
})
|
||||
this.ids.splice(this.ids.indexOf(item.billCode+"30"),1)
|
||||
})
|
||||
this.$modal.msgSuccess("到件扫描上传"+scanRstItem.message);
|
||||
}
|
||||
|
||||
// scanArrivalData.length > 0 && doScan(scanArrivalInfo).then(response => {
|
||||
// console.log(response);
|
||||
// let scanRstItem = response.data.scanResult[0];
|
||||
// console.log(scanRstItem);
|
||||
// if(scanRstItem.result != 'success'){
|
||||
// this.$modal.msgError(scanRstItem.message);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// this.$modal.msgSuccess("到件扫描上传"+scanRstItem.message);
|
||||
|
||||
// });
|
||||
|
||||
// 派件扫描上传
|
||||
let scanDispathInfo = {scanType:"40",opType:2,scanData:scanDispathData}
|
||||
@ -479,23 +486,24 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
scanDispathData.forEach((item) => {
|
||||
newList = newList.map(function(nitem){
|
||||
if(nitem && item.billCode == nitem.billCode && nitem.scanType == "40"){
|
||||
dataMap[item.billCode+"40"]=null;
|
||||
return null;
|
||||
}else{
|
||||
return nitem;
|
||||
}
|
||||
})
|
||||
this.ids.splice(this.ids.indexOf(item.billCode+"40"),1)
|
||||
})
|
||||
this.$modal.msgSuccess("派件扫描上传"+scanRstItem.message);
|
||||
}
|
||||
|
||||
// .then(response => {
|
||||
// console.log(response);
|
||||
// let scanRstItem = response.data.scanResult[0];
|
||||
// console.log(scanRstItem);
|
||||
// if(scanRstItem.result != 'success'){
|
||||
// this.$modal.msgError(scanRstItem.message);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// this.$modal.msgSuccess("派件扫描上传"+scanRstItem.message);
|
||||
|
||||
// });
|
||||
|
||||
this.dataMap = dataMap;
|
||||
console.log(this.emisTmsScanRecordList)
|
||||
this.emisTmsScanRecordList = newList.filter(function(item) {
|
||||
return item !== null;
|
||||
});
|
||||
},
|
||||
handleScanInput(){
|
||||
|
||||
|
||||
@ -59,7 +59,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" >
|
||||
@ -82,7 +92,7 @@
|
||||
|
||||
<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>
|
||||
</xd-table>
|
||||
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -113,7 +123,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
|
||||
@ -142,7 +151,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单校验
|
||||
@ -184,9 +194,11 @@ export default {
|
||||
this.form.dispatchOrSendMan=this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
|
||||
console.log(this.form)
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -233,7 +245,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
|
||||
@ -341,6 +353,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -358,7 +371,7 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -385,19 +398,18 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -70,7 +70,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('合包号')" align="center" prop="bagNo" min-width="150" />
|
||||
@ -88,7 +98,7 @@
|
||||
</el-table-column>
|
||||
<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>
|
||||
</xd-table>
|
||||
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -119,9 +129,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
// import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
||||
|
||||
export default {
|
||||
@ -149,6 +157,9 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
bagNo:null,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -190,7 +201,11 @@ export default {
|
||||
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -239,7 +254,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight;
|
||||
let bagNo = this.form.bagNo;
|
||||
|
||||
@ -348,6 +363,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -365,7 +381,7 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -393,7 +409,17 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
this.$modal.msgSuccess(scanRstItem.message);
|
||||
});
|
||||
|
||||
|
||||
@ -64,7 +64,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" >
|
||||
@ -79,21 +89,9 @@
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('录入时间')" align="center" prop="createTime" min-width="170" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column :label="$t('派件员')" align="center" prop="dispatchOrSendMan" min-width="100" />
|
||||
<el-table-column :label="$t('重量')" align="center" prop="scanWeight" min-width="100" />
|
||||
</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> -->
|
||||
|
||||
</xd-table>
|
||||
|
||||
<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">
|
||||
@ -118,7 +116,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
|
||||
@ -147,6 +144,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -189,9 +188,11 @@ export default {
|
||||
this.form.dispatchOrSendMan=this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
|
||||
console.log(this.form)
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -239,7 +240,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
|
||||
@ -347,6 +348,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -364,7 +366,7 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -391,19 +393,18 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -70,7 +70,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('车牌号')" align="center" prop="carNo" min-width="150" />
|
||||
@ -86,7 +96,7 @@
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</xd-table>
|
||||
|
||||
<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">
|
||||
@ -111,9 +121,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
// import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
||||
|
||||
export default {
|
||||
@ -141,6 +149,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -182,7 +192,11 @@ export default {
|
||||
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -231,7 +245,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
// let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
let carNo = this.form.carNo;
|
||||
@ -351,12 +365,13 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -386,7 +401,17 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
this.$modal.msgSuccess(scanRstItem.message);
|
||||
});
|
||||
|
||||
|
||||
@ -64,7 +64,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('目的地网点')" align="center" prop="scanMan" min-width="150" />
|
||||
@ -83,7 +93,7 @@
|
||||
<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>
|
||||
</xd-table>
|
||||
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -114,9 +124,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
// import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
||||
|
||||
export default {
|
||||
@ -144,6 +152,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -185,7 +195,11 @@ export default {
|
||||
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -233,7 +247,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
@ -341,8 +355,9 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1;
|
||||
this.multiple = !selection.length;
|
||||
|
||||
// this.checkedDetail = selection;
|
||||
|
||||
@ -358,7 +373,7 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -386,19 +401,18 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -75,7 +75,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('扫描类型')" align="center" prop="scanType" min-width="100" >
|
||||
@ -89,22 +99,10 @@
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('录入时间')" align="center" prop="createTime" min-width="170" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('派件员')" align="center" prop="dispatchOrSendMan" min-width="150" />
|
||||
<el-table-column :label="$t('重量')" align="center" prop="scanWeight" min-width="100" />
|
||||
</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> -->
|
||||
|
||||
</xd-table>
|
||||
|
||||
<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">
|
||||
@ -157,6 +155,9 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
keepWarehouseValue:null,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -198,11 +199,12 @@ export default {
|
||||
|
||||
this.form.dispatchOrSendMan=this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
|
||||
console.log("------->dict.type.emis_scan_type",this.dict.type.emis_keep_warehouse)
|
||||
|
||||
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -243,12 +245,11 @@ export default {
|
||||
this.openBatch=false;
|
||||
},
|
||||
submitFormBatch(){
|
||||
|
||||
if(this.formBatch.billCode==null || this.formBatch.billCode==''){
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
|
||||
@ -357,6 +358,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -374,7 +376,7 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -404,19 +406,18 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -64,30 +64,35 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <el-table :total="1" ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange"> -->
|
||||
<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="scanType" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_scan_type" :value="scope.row.scanType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('扫描员工')" align="center" prop="scanMan" min-width="150" />
|
||||
<el-table-column :label="$t('扫描站点')" align="center" prop="scanSite" min-width="100" />
|
||||
<el-table-column :label="$t('扫描时间')" align="center" prop="scanDate" min-width="170" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('录入时间')" align="center" prop="createTime" min-width="170" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</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="scanWeight" min-width="100" />
|
||||
</el-table>
|
||||
<!-- </el-table> -->
|
||||
</xd-table>
|
||||
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -118,9 +123,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
import { map } from "jquery";
|
||||
|
||||
export default {
|
||||
name: "ScanRecord",
|
||||
@ -142,12 +147,13 @@ export default {
|
||||
loading: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
queryParams:{},
|
||||
titleBatch: "",
|
||||
formBatch: {},
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
|
||||
tableHeight: 200,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单校验
|
||||
@ -189,9 +195,11 @@ export default {
|
||||
this.form.dispatchOrSendMan=this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
|
||||
console.log(this.form)
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -239,7 +247,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
|
||||
@ -346,25 +354,15 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.ids = selection.map(item => item.billCode);
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
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(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -391,6 +389,18 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
|
||||
this.$modal.msgSuccess(scanRstItem.message);
|
||||
|
||||
|
||||
|
||||
@ -111,7 +111,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('清单编号')" align="center" prop="listNo" min-width="150" />
|
||||
@ -139,13 +149,7 @@
|
||||
<el-table-column :label="$t('实名发件人')" align="center" prop="sendMan" min-width="100" />
|
||||
<el-table-column :label="$t('实名发件人身份证号')" align="center" prop="sendManNo" min-width="100" />
|
||||
<el-table-column :label="$t('重量')" align="center" prop="scanWeight" min-width="100" />
|
||||
</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> -->
|
||||
|
||||
</xd-table>
|
||||
|
||||
<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">
|
||||
@ -199,6 +203,9 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
listNo:null,//清单编号
|
||||
fastType:null,//快件类型
|
||||
customerType:null,//客户类型
|
||||
@ -245,7 +252,11 @@ export default {
|
||||
this.form.dispatchOrSendMan=this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -254,7 +265,6 @@ export default {
|
||||
// dosomething
|
||||
},
|
||||
onStaffSelect(item){
|
||||
console.log(item)
|
||||
this.form.dispatchOrSendMan=item.empName || this.$store.getters.empName;
|
||||
this.form.dispatchOrSendManCode=item.empCode || this.$store.getters.empCode;
|
||||
},
|
||||
@ -309,7 +319,7 @@ export default {
|
||||
this.openBatch=false;
|
||||
},
|
||||
submitFormBatch(){
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
let dispatchOrSendMan = this.form.dispatchOrSendMan;
|
||||
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
@ -461,6 +471,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode+item.scanType)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -478,8 +489,9 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
async handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
console.log(selData);
|
||||
var selData = this.selection;
|
||||
let newList = Array.from(this.emisTmsScanRecordList);
|
||||
let dataMap = this.dataMap;
|
||||
|
||||
let scanRecordData=[];
|
||||
let scanOutgoingData=[];
|
||||
@ -509,7 +521,6 @@ export default {
|
||||
|
||||
// 揽件扫描上传
|
||||
let scanRecordInfo = {scanType:"10",opType:2,scanData:scanRecordData}
|
||||
console.log(scanRecordInfo)
|
||||
|
||||
if(scanRecordData.length > 0){
|
||||
let res = await doScan(scanRecordInfo);
|
||||
@ -519,25 +530,22 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
scanRecordData.forEach((item) => {
|
||||
newList = newList.map(function(nitem){
|
||||
if(nitem && item.billCode == nitem.billCode && nitem.scanType == "10"){
|
||||
dataMap[item.billCode+"10"]=null;
|
||||
return null;
|
||||
}else{
|
||||
return nitem;
|
||||
}
|
||||
})
|
||||
this.ids.splice(this.ids.indexOf(item.billCode+"10"),1)
|
||||
})
|
||||
this.$modal.msgSuccess("揽件扫描上传"+scanRstItem.message);
|
||||
}
|
||||
// scanRecordData.length > 0 && doScan(scanRecordInfo).then(response => {
|
||||
// console.log(response);
|
||||
// let scanRstItem = response.data.scanResult[0];
|
||||
// console.log(scanRstItem);
|
||||
// if(scanRstItem.result != 'success'){
|
||||
// this.$modal.msgError(scanRstItem.message);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// this.$modal.msgSuccess("揽件扫描上传"+scanRstItem.message);
|
||||
|
||||
// });
|
||||
|
||||
// 发件扫描上传
|
||||
let scanOutgoingInfo = {scanType:"20",opType:2,scanData:scanOutgoingData}
|
||||
console.log(scanOutgoingInfo)
|
||||
|
||||
if(scanOutgoingData.length > 0){
|
||||
let res = await doScan(scanOutgoingInfo);
|
||||
@ -547,23 +555,24 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
scanOutgoingData.forEach((item) => {
|
||||
newList = newList.map(function(nitem){
|
||||
if(nitem && item.billCode == nitem.billCode && nitem.scanType == "20"){
|
||||
dataMap[item.billCode+"20"]=null;
|
||||
return null;
|
||||
}else{
|
||||
return nitem;
|
||||
}
|
||||
})
|
||||
this.ids.splice(this.ids.indexOf(item.billCode+"20"),1)
|
||||
})
|
||||
this.$modal.msgSuccess("发件扫描上传"+scanRstItem.message);
|
||||
}
|
||||
// scanOutgoingData.length > 0 && doScan(scanOutgoingInfo).then(response => {
|
||||
// console.log(response);
|
||||
// let scanRstItem = response.data.scanResult[0];
|
||||
// console.log(scanRstItem);
|
||||
// if(scanRstItem.result != 'success'){
|
||||
// this.$modal.msgError(scanRstItem.message);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// this.$modal.msgSuccess("发件扫描上传"+scanRstItem.message);
|
||||
|
||||
// });
|
||||
|
||||
|
||||
this.dataMap = dataMap;
|
||||
console.log(this.emisTmsScanRecordList)
|
||||
this.emisTmsScanRecordList = newList.filter(function(item) {
|
||||
return item !== null;
|
||||
});
|
||||
},
|
||||
handleScanInput(){
|
||||
let dispatchOrSendMan = this.form.dispatchOrSendMan;
|
||||
|
||||
@ -65,7 +65,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描单号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('车牌号')" align="center" prop="carNo" min-width="150" />
|
||||
@ -81,7 +91,7 @@
|
||||
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</xd-table>
|
||||
|
||||
|
||||
<el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
||||
@ -135,6 +145,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -176,7 +188,11 @@ export default {
|
||||
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -214,7 +230,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
// let scanWeight = this.form.scanWeight
|
||||
// let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
|
||||
let carNo = this.form.carNo;
|
||||
@ -328,24 +344,13 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
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(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -374,7 +379,17 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
this.$modal.msgSuccess(scanRstItem.message);
|
||||
});
|
||||
|
||||
|
||||
@ -56,7 +56,17 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table ref="multipleTable" border stripe v-loading="loading" :data="emisTmsScanRecordList" @selection-change="handleSelectionChange">
|
||||
<xd-table v-loading="loading"
|
||||
border stripe
|
||||
ref="multipleTable"
|
||||
size="small"
|
||||
:queryParams="queryParams"
|
||||
:data="emisTmsScanRecordList"
|
||||
:total="emisTmsScanRecordList.length"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-if="tableHeight" :height="tableHeight + 'px'"
|
||||
>
|
||||
<!-- <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 :label="$t('扫描包号')" align="center" prop="billCode" min-width="150" />
|
||||
<el-table-column :label="$t('合包号')" align="center" prop="bagNo" min-width="150" />
|
||||
@ -74,7 +84,7 @@
|
||||
</el-table-column>
|
||||
<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>
|
||||
</xd-table>
|
||||
|
||||
<!-- <div style="text-align: center;margin-bottom: 10px;">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -105,10 +115,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisWaybill, getWaybillDetail,getEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
// import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
// import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
||||
import EmisGetPreSitePicker from '@/views/emis/EmisBaseTools/EmisGetPreSitePicker.vue';
|
||||
|
||||
export default {
|
||||
@ -136,6 +143,8 @@ export default {
|
||||
openBatch:false,
|
||||
dataMap:new Map(),
|
||||
emisTmsScanRecordList: [],
|
||||
queryParams:{},
|
||||
tableHeight: 200,
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@ -176,8 +185,11 @@ export default {
|
||||
this.form.recordManCode=this.$store.getters.empCode;
|
||||
|
||||
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
||||
|
||||
// this.form.scanWeight = "1.0";
|
||||
this.$nextTick(function() {
|
||||
let form = this.$refs.form.$el;
|
||||
let tableH = form.offsetHeight+265;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@ -220,7 +232,7 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
let bcList=this.formBatch.billCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||
let scanWeight = this.form.scanWeight
|
||||
|
||||
let haveCode = null;
|
||||
@ -327,6 +339,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.billCode)
|
||||
this.selection = selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
@ -344,7 +357,7 @@ export default {
|
||||
},
|
||||
// 扫描上传
|
||||
handleScanUpload(){
|
||||
var selData = this.$refs.multipleTable.selection;
|
||||
var selData = this.selection;
|
||||
console.log(selData);
|
||||
|
||||
let scanData=[];
|
||||
@ -373,19 +386,18 @@ export default {
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let newList = [];
|
||||
this.emisTmsScanRecordList.forEach(item => {
|
||||
if(this.ids.indexOf(item.billCode) > -1){
|
||||
this.dataMap[item.billCode]=null;
|
||||
}else{
|
||||
newList.push(item);
|
||||
}
|
||||
})
|
||||
this.ids = [];
|
||||
this.selection = null;
|
||||
this.emisTmsScanRecordList = newList;
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user