This commit is contained in:
linfso 2024-05-19 12:07:20 +08:00
commit 146f9fff9e
13 changed files with 267 additions and 98 deletions

View File

@ -64,6 +64,7 @@
optionItems: [],
svalue: this.value,
firstFlag:true,
filterMap:new Map(),
queryParams:{
pageNum:1,
pageSize:10,
@ -115,6 +116,11 @@
this.queryParams.siteName=val;
listSimpleEmisSite(this.queryParams).then(response => {
this.optionItems=response.rows;
response.rows.forEach(item => {
if(!this.filterMap.hasOwnProperty(item.siteCode)){
this.filterMap[item.siteCode]=item;
}
});
});
},
onMouseleave(e, i) {

View File

@ -2,21 +2,23 @@
<div class="app-container">
<el-row :gutter="0">
<el-form ref="form" size="mini" :model="form" :rules="rules" label-width="80px">
<el-col :span="6">
<el-form-item :label="$t('派件员')" prop="dispatchOrSendManCode"><span slot="label">
<span style="color: red">{{$t('派件员')}}</span>
</span>
<EmisUserSimplePicker v-model="form.dispatchOrSendManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扫描单号" prop="billCode" label-width="70px">
<span slot="label">
<span style="color: red">扫描单号</span>
<span style="color: red">{{$t('扫描单号')}}</span>
</span>
<el-input v-model="form.billCode" clearable="" placeholder="单号输入后按回车" @keyup.enter.native="handleScanInput" >
<i slot="suffix" class="iconfont">&#xe656;</i>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('派件员')" prop="dispatchOrSendManCode">
<EmisUserSimplePicker v-model="form.dispatchOrSendManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('上一站')" prop="preOrNextStation">
<EmisGetPreSitePicker v-model="form.preOrNextStation" @onChange="onSiteSelect" ></EmisGetPreSitePicker>
@ -246,15 +248,35 @@ export default {
let scanWeight = this.form.scanWeight
let dispatchOrSendMan = this.form.dispatchOrSendMan;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
// let scList=bcList.map(function(code) {
// return {
// billCode:code,
// scanWeight:scanWeight,
// // scanWeight:null,
// dispatchOrSendManCode: dispatchOrSendManCode
// }
// }
// )
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code+"30"] || dm[code+"40"]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
// 到件批量
let scanArrivalInfo = {

View File

@ -236,15 +236,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"30",

View File

@ -235,17 +235,28 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight;
let bagNo = this.form.bagNo;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
bagNo:bagNo,
scanWeight:scanWeight,
// scanWeight:null,
scanDate:null
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
bagNo:bagNo,
scanWeight:scanWeight,
// scanWeight:null,
scanDate:null
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"200",

View File

@ -242,15 +242,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"40",

View File

@ -228,15 +228,36 @@ export default {
// let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let carNo = this.form.carNo;
// let scList=bcList.map(function(code) {
// return {
// billCode:code,
// // scanWeight:scanWeight,
// carNo:carNo,
// dispatchOrSendManCode: dispatchOrSendManCode
// }
// }
// )
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
// scanWeight:scanWeight,
carNo:carNo,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
// scanWeight:scanWeight,
carNo:carNo,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"301",

View File

@ -229,23 +229,34 @@ 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 scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"20",

View File

@ -247,15 +247,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"70",

View File

@ -242,15 +242,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"10",

View File

@ -278,6 +278,16 @@ export default {
this.form.ids= arr.map(item=>item.id+item.scanType)
},
handleBatchScan(){
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let preOrNextStationCode = this.form.preOrNextStationCode;
if(dispatchOrSendManCode==null || dispatchOrSendManCode==''){
this.$message.error("请选择取件员");
return;
}
if(preOrNextStationCode==null||preOrNextStationCode==''){
this.$message.error("请选择下一站");
return;
}
this.formBatch = {
billCode: null,
}
@ -310,23 +320,26 @@ export default {
this.$message.error("输入单号后回车");
return;
}
if(dispatchOrSendManCode==null || dispatchOrSendManCode==''){
this.$message.error("请选择取件员");
return;
}
if(preOrNextStationCode==null||preOrNextStationCode==''){
this.$message.error("请选择下一站");
return;
}
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code+"10"] || dm[code+"20"]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
// 揽件批量
let scanArrivalInfo = {

View File

@ -210,16 +210,32 @@ export default {
// let scanWeight = this.form.scanWeight
// let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let carNo = this.form.carNo;
// let scList=bcList.map(function(code) {
// return {
// billCode:code,
// carNo: carNo
// }
// }
// )
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
carNo: carNo
// scanWeight:scanWeight,
// scanWeight:null,
// dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
carNo: carNo
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"302",

View File

@ -223,16 +223,25 @@ export default {
}
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
// dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"201",

View File

@ -98,8 +98,9 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="寄件网点" prop="sendSiteName">
<el-input v-model="form.sendSiteName" placeholder="" disabled />
<el-form-item label="寄件网点" prop="sendSiteCode">
<!-- <el-input v-model="form.sendSiteCode" placeholder="" /> -->
<EmisSiteSimplePicker v-model="form.sendSiteCode" @onChange="onSendSiteSelect" ></EmisSiteSimplePicker>
</el-form-item>
</el-col>
@ -644,6 +645,7 @@ import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePick
import EmisUserSimplePicker1 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
import EmisUserSimplePicker2 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
import EmisUserSimplePicker3 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
@ -703,6 +705,7 @@ components: {
EmisUserSimplePicker1,
EmisUserSimplePicker2,
EmisUserSimplePicker3,
EmisSiteSimplePicker,
// CustomerPicker0,
// CustomerPicker1,
// CustomerPicker2,
@ -1141,6 +1144,15 @@ methods: {
this.form.transLine=item[0];
this.form.productType=item[1];
},
onSendSiteSelect(item){
if(!item){
this.form.sendSiteCode = null;
this.form.sendSiteName = null;
return;
}
this.form.sendSiteCode=item.siteCode;
this.form.sendSiteName=item.siteName;
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {