Merge branch 'master' of http://git.xdadan.loc/tanex/emis-frontend
This commit is contained in:
commit
a9f50bc4be
@ -265,6 +265,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code+"30"] || dm[code+"40"]){
|
if(dm[code+"30"] || dm[code+"40"]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -251,6 +251,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -268,6 +268,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -259,6 +259,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -262,6 +262,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -253,6 +253,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -261,6 +261,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -262,6 +262,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -252,6 +252,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -321,6 +321,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||||
bcList.forEach((code) => {
|
bcList.forEach((code) => {
|
||||||
|
code = code.trim();
|
||||||
this.getDetail(code, true)
|
this.getDetail(code, true)
|
||||||
})
|
})
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
|
|||||||
@ -243,6 +243,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -330,6 +330,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code+"10"] || dm[code+"20"]){
|
if(dm[code+"10"] || dm[code+"20"]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -245,6 +245,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -237,6 +237,7 @@ export default {
|
|||||||
let haveCode = null;
|
let haveCode = null;
|
||||||
let dm = this.dataMap;
|
let dm = this.dataMap;
|
||||||
let scList=bcList.map(function(code) {
|
let scList=bcList.map(function(code) {
|
||||||
|
code = code.trim();
|
||||||
if(dm[code]){
|
if(dm[code]){
|
||||||
haveCode = code;
|
haveCode = code;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -669,6 +669,21 @@
|
|||||||
</XdTable>
|
</XdTable>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<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-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('运单号')" prop="formBatchBillList">
|
||||||
|
<el-input v-model="formBatchBillList" type="textarea" :rows="8" placeholder="运单号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer" style="text-align:center">
|
||||||
|
<el-button type="primary" @click="submitFormBatch">确 定</el-button>
|
||||||
|
<el-button @click="cancelBatch">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="titleWayBill" :visible.sync="openWayBillForm" width="90%" @close="handleCloseWayBill" :destroy-on-close="true" v-dialogDrag append-to-body>
|
<el-dialog :title="titleWayBill" :visible.sync="openWayBillForm" width="90%" @close="handleCloseWayBill" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
<el-form ref="formCo" size="mini" :model="wayBillData" label-width="100px" class="overflowhidden" >
|
<el-form ref="formCo" size="mini" :model="wayBillData" label-width="100px" class="overflowhidden" >
|
||||||
@ -837,7 +852,7 @@
|
|||||||
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
|
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
|
||||||
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
||||||
import { addEmisTmsSiteBatchLoading, listEmisTmsSiteBatchLoading, updateEmisTmsSiteBatchLoading } from "@/api/emis/emisTmsSiteBatchLoading";
|
import { addEmisTmsSiteBatchLoading, listEmisTmsSiteBatchLoading, updateEmisTmsSiteBatchLoading } from "@/api/emis/emisTmsSiteBatchLoading";
|
||||||
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
import { listEmisWaybill, getWaybillDetail } from "@/api/emis/emisWaybill";
|
||||||
// import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
// import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||||
import emisTmsPackForm from '@/views/emis/emisTmsPack/emisTmsPackForm';
|
import emisTmsPackForm from '@/views/emis/emisTmsPack/emisTmsPackForm';
|
||||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||||
@ -897,6 +912,11 @@ export default {
|
|||||||
coData: {
|
coData: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
openBatch: false,
|
||||||
|
titleBatch: "",
|
||||||
|
formBatchBillList:"",
|
||||||
|
|
||||||
// 新增/修改包详情数据
|
// 新增/修改包详情数据
|
||||||
emisCoPackDetail:[],
|
emisCoPackDetail:[],
|
||||||
blUnpack:"1",
|
blUnpack:"1",
|
||||||
@ -1508,6 +1528,81 @@ export default {
|
|||||||
this.tempCoPackList = selection;
|
this.tempCoPackList = selection;
|
||||||
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
||||||
},
|
},
|
||||||
|
async submitFormBatch(){
|
||||||
|
if(this.formBatchBillList==null || this.formBatchBillList==''){
|
||||||
|
this.$message.error("请输入单号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
||||||
|
|
||||||
|
bcList.forEach(async (billcode) => {
|
||||||
|
billcode = billcode.trim();
|
||||||
|
|
||||||
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
||||||
|
let billRes = await listEmisWaybill({billCode:billcode});
|
||||||
|
if(!billRes || billRes.code != 200 || !billRes.rows || billRes.rows.length < 1){
|
||||||
|
this.$modal.msgError((response && response.msg || '无此运单数据') + ": " + billcode)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let item = billRes.rows[0];
|
||||||
|
this.emisCoPackDetail.push(item);
|
||||||
|
if(this.coPackType=="edit"){
|
||||||
|
let packDetail = {
|
||||||
|
batchNo: this.coData.batchNo,
|
||||||
|
billCode: item.billCode,
|
||||||
|
scanDate: item.scanDate,
|
||||||
|
scanStatus: item.scanStatus,
|
||||||
|
groupStatus: "1",//已组批次
|
||||||
|
scanMan: item.scanMan,
|
||||||
|
scanSite: item.scanSite,
|
||||||
|
createBy: this.$store.getters.empCode,
|
||||||
|
createTime: parseTime(new Date())
|
||||||
|
};
|
||||||
|
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
||||||
|
if(!response || response.code != 200){
|
||||||
|
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.titleBatch="";
|
||||||
|
this.openBatch=false;
|
||||||
|
this.formBatchBillList = "";
|
||||||
|
this.wayBillData = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
params:{}
|
||||||
|
};
|
||||||
|
this.emisWayBillList=[];
|
||||||
|
this.tempCoPackList=[];
|
||||||
|
this.addWayBillDisabled = true;
|
||||||
|
this.wayBillotal=0;
|
||||||
|
this.computeTotal();
|
||||||
|
// 更新主表
|
||||||
|
if(this.coPackType=="edit"){
|
||||||
|
this.tempCoPackInfo.batchName = this.coData.batchName;
|
||||||
|
this.tempCoPackInfo.transType = this.coData.transType;
|
||||||
|
this.tempCoPackInfo.startSiteCode = this.coData.startSiteCode;
|
||||||
|
this.tempCoPackInfo.startSiteName = this.coData.startSiteName || null;
|
||||||
|
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
|
||||||
|
this.tempCoPackInfo.airBilllNo = this.coData.airBilllNo;
|
||||||
|
this.tempCoPackInfo.etd = this.coData.etd;
|
||||||
|
this.tempCoPackInfo.carNo = this.coData.carNo;
|
||||||
|
this.tempCoPackInfo.destCountry = this.coData.destCountry;
|
||||||
|
this.tempCoPackInfo.shipNo = this.coData.shipNo;
|
||||||
|
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
|
||||||
|
this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty;
|
||||||
|
this.tempCoPackInfo.totalWeight = this.coData.totalWeight;
|
||||||
|
this.tempCoPackInfo.totalVolume = this.coData.totalVolume;
|
||||||
|
this.tempCoPackInfo.loadingFile = this.coData.loadingFile;
|
||||||
|
let res = await updateEmisTmsSiteBatch(this.tempCoPackInfo);
|
||||||
|
if(!res || res.code != 200){
|
||||||
|
this.$modal.msgError(res && res.msg || '未知错误')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
async handleCoAdd(){
|
async handleCoAdd(){
|
||||||
this.tempCoPackList.forEach(async (item) => {
|
this.tempCoPackList.forEach(async (item) => {
|
||||||
if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){
|
||||||
@ -1782,8 +1877,15 @@ export default {
|
|||||||
this.$modal.msgError("请先选择必填项")
|
this.$modal.msgError("请先选择必填项")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.openWayBillForm= true;
|
// this.openWayBillForm= true;
|
||||||
this.titleWayBill = "运单列表";
|
// this.titleWayBill = "运单列表";
|
||||||
|
this.openBatch = true;
|
||||||
|
this.titleBatch = "批量输入运单号";
|
||||||
|
},
|
||||||
|
cancelBatch(){
|
||||||
|
this.openBatch=false;
|
||||||
|
this.titleBatch = "";
|
||||||
|
this.formBatchBillList = "";
|
||||||
},
|
},
|
||||||
handleShowMoreInput(){
|
handleShowMoreInput(){
|
||||||
this.moreInputVisible = !this.moreInputVisible;
|
this.moreInputVisible = !this.moreInputVisible;
|
||||||
|
|||||||
@ -669,12 +669,12 @@ export default {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc] && item.problemId == this.form.problemId));
|
let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc].trim() && item.problemId == this.form.problemId));
|
||||||
if(exitlist.length > 0){
|
if(exitlist.length > 0){
|
||||||
this.$message.error("单号:"+ bcList[bc] + ", 已存在");
|
this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在");
|
||||||
continue;
|
continue;
|
||||||
}else{
|
}else{
|
||||||
await this.addToList(bcList[bc]);
|
await this.addToList(bcList[bc].trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user