修改bug等
This commit is contained in:
parent
5f66e95cff
commit
3ba5f52ac5
@ -4,10 +4,11 @@
|
||||
<el-form slot="pageHeader" ref="form" size="mini" :model="queryParams" label-width="100px">
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="" prop="queryType">
|
||||
<el-form-item label="" prop="queryOrderType">
|
||||
<div slot="label">
|
||||
<el-radio-group class="query-label" v-model="queryParams.queryType">
|
||||
<el-radio-group class="query-label" v-model="queryParams.queryOrderType">
|
||||
<el-radio label="1">合包号</el-radio>
|
||||
<el-radio label="2">运单号</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<!-- <el-input
|
||||
@ -30,6 +31,39 @@
|
||||
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('寄件网点')" prop="sendAreaSiteCode">
|
||||
<EmisSiteSimplePicker v-model="queryParams.sendAreaSiteCode" :placeholder="$t('寄件网点')" isInitiated="true" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的国家" prop="sendCountry">
|
||||
<CountryPicker v-model="queryParams.receiveCountry" :placeholder="$t('目的国家')" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属线路" prop="lineCode">
|
||||
<TransLinePicker v-model="queryParams.lineCode" :countryCode="queryParams.receiveCountry"></TransLinePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品类型" prop="productType">
|
||||
<TransProductPicker placeholder="全部" v-model="queryParams.productType" :transLineCode="queryParams.lineCode" ></TransProductPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="问题件方式" prop="pickupMethod">
|
||||
<el-select clearable="" v-model="queryParams.problemQueryType" placeholder="请选择">
|
||||
<el-option label="只查问题件类型" :value="1"></el-option>
|
||||
<el-option label="剔除问题件类型" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="问题件类型" prop="problemType">
|
||||
<ProblemTypePicker v-model="queryParams.problemType" ></ProblemTypePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </SearchForm> -->
|
||||
</el-form>
|
||||
@ -62,6 +96,15 @@
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['emis:emisTmsPack:add']"
|
||||
>新增合包</el-button> -->
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['emis:emisTmsPack:remove']"
|
||||
>修改</el-button>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
@ -273,7 +316,7 @@
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="totalWeight" min-width="100" />
|
||||
<el-table-column :label="$t('体积')" align="center" prop="totalVolume" min-width="100" />
|
||||
<el-table-column :label="$t('创建时间')" align="center" prop="packDate" min-width="170" />
|
||||
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
|
||||
<!-- <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -282,7 +325,7 @@
|
||||
v-hasPermi="['emis:emisTmsPack:query']"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</XdTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@ -304,19 +347,19 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('目的国家')" prop="destCountry">
|
||||
<span slot="label">
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{ $t('目的国家') }}</span>
|
||||
</span>
|
||||
</span> -->
|
||||
<CountryPicker :placeholder="$t('选择国家')" v-model="coData.destCountry" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('生成网点')" prop="sendSiteCode">
|
||||
<el-form-item :label="$t('生成网点')" prop="sendStiteCode">
|
||||
<span slot="label">
|
||||
<span style="color: red">{{ $t('生成网点') }}</span>
|
||||
</span>
|
||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.sendSiteCode" v-if="$store.getters.ownerSiteCode== '88888'" ></EmisSiteSimplePicker>
|
||||
<el-input v-else v-model="coData.sendSiteName" placeholder="" disabled />
|
||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.sendStiteCode" :disabled="$store.getters.ownerSiteCode!='88888'" ></EmisSiteSimplePicker>
|
||||
<!-- <el-input v-else v-model="coData.sendSiteName" placeholder="" disabled /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -334,8 +377,8 @@
|
||||
<span style="color: red">{{ $t('是否可拆') }}</span>
|
||||
</span>
|
||||
<!-- <el-radio-group v-model="coData.blUnpack" value="1"> -->
|
||||
<el-radio v-model="blUnpack" label="1">是</el-radio>
|
||||
<el-radio v-model="blUnpack" label="0">否</el-radio>
|
||||
<el-radio v-model="blUnpack" label="1" :disabled="packDisabled">是</el-radio>
|
||||
<el-radio v-model="blUnpack" label="0" :disabled="packDisabled">否</el-radio>
|
||||
<!-- </el-radio-group> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -406,7 +449,7 @@
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleCoPackListDelete"
|
||||
:disabled="coSingle"
|
||||
:disabled="coMultiple"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -679,11 +722,14 @@ import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicke
|
||||
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
||||
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
|
||||
|
||||
import { parseTime, dateToStr } from "@/utils/custom";
|
||||
import { formatSearchStr } from '@/utils/index'
|
||||
|
||||
export default {
|
||||
name: "PackageManagement",
|
||||
components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker},
|
||||
components: { ProblemTypePicker, EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker},
|
||||
dicts: ['emis_pack_status', 'emis_qujian_fangshi', 'emis_payment_type'],
|
||||
data() {
|
||||
return {
|
||||
@ -702,6 +748,8 @@ export default {
|
||||
coSingle: true,
|
||||
coMultiple: true,
|
||||
|
||||
packDisabled:false,//是否禁用可拆分包的按钮
|
||||
|
||||
addWayBillDisabled: true,
|
||||
// packDisabled: true,
|
||||
activeName:'first',
|
||||
@ -774,7 +822,7 @@ export default {
|
||||
destCountry: null,
|
||||
destCountryName: null,
|
||||
blUnpack: null,
|
||||
sendSiteCode: null,
|
||||
sendStiteCode: null,
|
||||
totalParcelQty: null,
|
||||
totalWaybillQty: null,
|
||||
totalVolume: null,
|
||||
@ -783,7 +831,10 @@ export default {
|
||||
opMan: null,
|
||||
remark: null,
|
||||
delFlag: null,
|
||||
params:{}
|
||||
params:{},
|
||||
packNo:'',
|
||||
queryOrderType: '1',
|
||||
billCode: ''
|
||||
},
|
||||
queryCoParams: {
|
||||
params:{}
|
||||
@ -845,12 +896,39 @@ export default {
|
||||
/** 查询TMS合包列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.single = true;
|
||||
this.multiple = true;
|
||||
// this.queryParams.params = {};
|
||||
if(this.queryParams.packNo){
|
||||
let qBillCode=formatSearchStr(this.queryParams.packNo);
|
||||
let billArr = qBillCode.split(",");
|
||||
let newBillCodeStr="";
|
||||
billArr.forEach(item=>{
|
||||
if(item.startsWith("T")){
|
||||
let mainBillCode=item.substr(0,14);
|
||||
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||
}else if(item == ""){
|
||||
|
||||
}else{
|
||||
newBillCodeStr=newBillCodeStr+item+",";
|
||||
}
|
||||
});
|
||||
if(this.queryParams.queryOrderType == "1"){
|
||||
this.queryParams.packNo=newBillCodeStr;
|
||||
this.queryParams.billCode=null;
|
||||
}else{
|
||||
// 处理子单号
|
||||
this.queryParams.billCode=newBillCodeStr;
|
||||
this.queryParams.packNo=null;
|
||||
}
|
||||
}
|
||||
|
||||
this.emisTmsPackList = [];
|
||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||
this.queryParams.params["beginCreateTime"] = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
this.queryParams.params["endCreateTime"] = dateToStr(new Date(this.dateTimeRange[1]));
|
||||
this.queryParams.params["beginSendDate"] = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
this.queryParams.params["endSendDate"] = dateToStr(new Date(this.dateTimeRange[1]));
|
||||
}
|
||||
this.queryParams.destCountry = this.queryParams.receiveCountry;
|
||||
listEmisTmsPack(this.queryParams).then(response => {
|
||||
this.emisTmsPackList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -858,11 +936,35 @@ export default {
|
||||
});
|
||||
},
|
||||
handleQueryWait(){
|
||||
this.single = true;
|
||||
this.multiple = true;
|
||||
this.queryWaitParams = {...this.queryParams};
|
||||
if(null != this.dateTimeRange && '' != this.dateTimeRange){
|
||||
this.queryWaitParams.params.beginSendDate = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
this.queryWaitParams.params.endSendDate = dateToStr(new Date(this.dateTimeRange[1]));
|
||||
}
|
||||
this.queryWaitParams.packNo = this.queryParams.packNo;
|
||||
// this.queryWaitParams.packNo = this.queryParams.packNo;
|
||||
let qBillCode=formatSearchStr(this.queryParams.packNo);
|
||||
let billArr = qBillCode.split(",");
|
||||
let newBillCodeStr="";
|
||||
billArr.forEach(item=>{
|
||||
if(item.startsWith("T")){
|
||||
let mainBillCode=item.substr(0,14);
|
||||
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||
}else if(item == ""){
|
||||
|
||||
}else{
|
||||
newBillCodeStr=newBillCodeStr+item+",";
|
||||
}
|
||||
});
|
||||
if(this.queryParams.queryOrderType == "1"){
|
||||
this.queryWaitParams.packNo=newBillCodeStr;
|
||||
this.queryWaitParams.billCode=null;
|
||||
}else{
|
||||
// 处理子单号
|
||||
this.queryWaitParams.billCode=newBillCodeStr;
|
||||
this.queryWaitParams.packNo=null;
|
||||
}
|
||||
|
||||
this.loadingWait = true;
|
||||
this.queryWaitParams.params.isNeedPack = 1;
|
||||
@ -883,12 +985,36 @@ export default {
|
||||
this.waitPackList = selection;
|
||||
},
|
||||
async handleQueryDone(){
|
||||
this.single = true;
|
||||
this.multiple = true;
|
||||
this.loadingDone = true;
|
||||
this.queryDoneParams = {...this.queryParams};
|
||||
if(null != this.dateTimeRange && '' != this.dateTimeRange){
|
||||
this.queryDoneParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
this.queryDoneParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1]));
|
||||
}
|
||||
this.queryDoneParams.packNo = this.queryParams.packNo;
|
||||
// this.queryDoneParams.packNo = this.queryParams.packNo;
|
||||
let qBillCode=formatSearchStr(this.queryParams.packNo);
|
||||
let billArr = qBillCode.split(",");
|
||||
let newBillCodeStr="";
|
||||
billArr.forEach(item=>{
|
||||
if(item.startsWith("T")){
|
||||
let mainBillCode=item.substr(0,14);
|
||||
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||
}else if(item == ""){
|
||||
|
||||
}else{
|
||||
newBillCodeStr=newBillCodeStr+item+",";
|
||||
}
|
||||
});
|
||||
if(this.queryParams.queryOrderType == "1"){
|
||||
this.queryDoneParams.packNo=newBillCodeStr;
|
||||
this.queryDoneParams.billCode=null;
|
||||
}else{
|
||||
// 处理子单号
|
||||
this.queryDoneParams.billCode=newBillCodeStr;
|
||||
this.queryDoneParams.packNo=null;
|
||||
}
|
||||
let resList = await listEmisTmsPackDtl(this.queryDoneParams);
|
||||
this.loadingDone = false;
|
||||
if(!resList || resList.code != 200){
|
||||
@ -942,9 +1068,8 @@ export default {
|
||||
this.wayBillData.dateTimeRange=value;
|
||||
},
|
||||
async handleAddCoPack(){
|
||||
debugger
|
||||
console.log(this.coData)
|
||||
if(!this.coData.destCountry || !this.coData.sendSiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
// if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
if(!this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
@ -960,7 +1085,7 @@ export default {
|
||||
nextSiteCode: this.coData.nextSiteCode,
|
||||
// destCountryName: this.coData.,
|
||||
blUnpack: this.coData.blUnpack,
|
||||
sendSiteCode: this.coData.sendSiteCode,
|
||||
sendStiteCode: this.coData.sendStiteCode,
|
||||
sendSiteName: this.coData.sendSiteName,
|
||||
totalParcelQty: this.coData.totalParcelQty,
|
||||
totalWaybillQty: this.coData.totalWaybillQty,
|
||||
@ -970,6 +1095,10 @@ export default {
|
||||
opMan: this.$store.getters.empCode
|
||||
}
|
||||
if(this.coPackType == "add"){// 新增
|
||||
if(this.emisCoPackDetail.length<2){
|
||||
this.$message.error("合包总件数少于2件");
|
||||
return;
|
||||
}
|
||||
let resPack = await getPackNo();
|
||||
if(!resPack || resPack.code != 200){
|
||||
this.$message.error(resPack && resPack.msg || "未知错误");
|
||||
@ -1007,7 +1136,7 @@ export default {
|
||||
}else if(this.coPackType == "edit"){// 修改
|
||||
//第一步:处理合包信息的更新;
|
||||
if(this.tempCoPackInfo.destCountry != this.coData.destCountry
|
||||
|| this.tempCoPackInfo.sendSiteCode != this.coData.sendSiteCode
|
||||
|| this.tempCoPackInfo.sendStiteCode != this.coData.sendStiteCode
|
||||
|| this.tempCoPackInfo.nextSiteCode != this.coData.nextSiteCode
|
||||
|| this.tempCoPackInfo.blUnpack != this.blUnpack
|
||||
|| this.tempCoPackInfo.totalWaybillQty != this.coData.totalWaybillQty
|
||||
@ -1016,7 +1145,7 @@ export default {
|
||||
|| this.tempCoPackInfo.totalVolume != this.coData.totalVolume
|
||||
){
|
||||
this.tempCoPackInfo.destCountry = this.coData.destCountry;
|
||||
this.tempCoPackInfo.sendSiteCode = this.coData.sendSiteCode;
|
||||
this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode;
|
||||
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
|
||||
this.tempCoPackInfo.blUnpack = this.blUnpack;
|
||||
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
|
||||
@ -1032,64 +1161,31 @@ export default {
|
||||
// });
|
||||
}
|
||||
//第二步:处理运单列表的数据
|
||||
let tempDelList = [];
|
||||
let tempAddList=[];
|
||||
//2.1:计算要删除的运单
|
||||
tempDelList = this.tempExistCoPackWayBillList.filter(item => {
|
||||
let ls = this.emisCoPackDetail.filter(cd => {
|
||||
return cd.billCode == item.billCode
|
||||
})
|
||||
if(ls.length > 0){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
})
|
||||
// tempDelList.forEach(item =>{
|
||||
for(let tdl = 0; tdl < tempDelList.length; tdl++){
|
||||
let item = tempDelList[tdl];
|
||||
let res = await delEmisTmsPackDtl(item.id);
|
||||
// delEmisTmsPackDtl(item.id).then(res => {
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
// })
|
||||
}
|
||||
// let tempDelList = [];
|
||||
// tempDelList = this.tempExistCoPackWayBillList.filter(item => {
|
||||
// let ls = this.emisCoPackDetail.filter(cd => {
|
||||
// return cd.billCode == item.billCode
|
||||
// })
|
||||
// if(ls.length > 0){
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
// })
|
||||
//2.2:计算要新增的运单
|
||||
tempAddList = this.emisCoPackDetail.filter(item => {
|
||||
let ls = this.tempExistCoPackWayBillList.filter(cd => {
|
||||
return cd.billCode == item.billCode
|
||||
})
|
||||
if(ls.length > 0){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
})
|
||||
// tempAddList.forEach(item =>{
|
||||
for(let tal = 0; tal < tempAddList.length; tal++){
|
||||
let item = tempAddList[tal];
|
||||
let packDetail = {
|
||||
packNo:this.coData.packNo,
|
||||
billCode: item.billCode,
|
||||
scanDate: item.scanDate,
|
||||
scanStatus: item.scanStatus,
|
||||
packStatus: null,
|
||||
scanMan: item.scanMan,
|
||||
createBy: this.$store.getters.empCode,
|
||||
createTime: parseTime(new Date())
|
||||
};
|
||||
let response = await addEmisTmsPackDtl(packDetail);
|
||||
// addEmisTmsPackDtl(packDetail).then(response => {
|
||||
if(!response || response.code != 200){
|
||||
this.$modal.msgError(response && response.msg || '合包明细新增失败')
|
||||
return;
|
||||
}
|
||||
// })
|
||||
}
|
||||
// // tempDelList.forEach(item =>{
|
||||
// for(let tdl = 0; tdl < tempDelList.length; tdl++){
|
||||
// let item = tempDelList[tdl];
|
||||
// let res = await delEmisTmsPackDtl(item.id);
|
||||
// // delEmisTmsPackDtl(item.id).then(res => {
|
||||
// if(!res || res.code != 200){
|
||||
// this.$modal.msgError(res && res.msg || '未知错误')
|
||||
// return;
|
||||
// }
|
||||
// // })
|
||||
// }
|
||||
// })
|
||||
|
||||
}
|
||||
this.openForm= false;
|
||||
this.titleForm = "";
|
||||
@ -1115,15 +1211,33 @@ export default {
|
||||
this.coData={};
|
||||
this.blUnpack="1";
|
||||
this.emisCoPackDetail=[];
|
||||
this.getQuery();
|
||||
},
|
||||
handleWayBillSelectionChange(selection){
|
||||
this.tempCoPackList = selection;
|
||||
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
||||
},
|
||||
handleCoAdd(){
|
||||
this.tempCoPackList.forEach(item => {
|
||||
async handleCoAdd(){
|
||||
this.tempCoPackList.forEach(async (item) => {
|
||||
if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){
|
||||
this.emisCoPackDetail.push(item);
|
||||
if(this.coPackType=="edit"){
|
||||
let packDetail = {
|
||||
packNo:this.coData.packNo,
|
||||
billCode: item.billCode,
|
||||
scanDate: item.scanDate,
|
||||
scanStatus: item.scanStatus,
|
||||
packStatus: null,
|
||||
scanMan: item.scanMan,
|
||||
createBy: this.$store.getters.empCode,
|
||||
createTime: parseTime(new Date())
|
||||
};
|
||||
let response = await addEmisTmsPackDtl(packDetail);
|
||||
if(!response || response.code != 200){
|
||||
this.$modal.msgError(response && response.msg || '合包明细新增失败')
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
this.titleWayBill="";
|
||||
@ -1138,6 +1252,23 @@ export default {
|
||||
this.addWayBillDisabled = true;
|
||||
this.wayBillotal=0;
|
||||
this.computeTotal();
|
||||
if(this.coPackType=="edit"){
|
||||
// 更新主表
|
||||
this.tempCoPackInfo.destCountry = this.coData.destCountry;
|
||||
this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode;
|
||||
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
|
||||
this.tempCoPackInfo.blUnpack = this.blUnpack;
|
||||
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
|
||||
this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty;
|
||||
this.tempCoPackInfo.totalWeight = this.coData.totalWeight;
|
||||
this.tempCoPackInfo.totalVolume = this.coData.totalVolume;
|
||||
let res = await updateEmisTmsPack(this.tempCoPackInfo);
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
this.$modal.msgSuccess('追加成功')
|
||||
}
|
||||
},
|
||||
handleCloseWayBill(){
|
||||
this.titleWayBill="";
|
||||
@ -1152,15 +1283,80 @@ export default {
|
||||
this.addWayBillDisabled = true;
|
||||
this.wayBillotal=0;
|
||||
},
|
||||
handleCoPackListDelete(){
|
||||
let newList =[];
|
||||
this.emisCoPackDetail.forEach(item=>{
|
||||
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisCoPackDetail = newList;
|
||||
this.computeTotal();
|
||||
async handleCoPackListDelete(){
|
||||
// if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
if(!this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
if(this.coPackType == "edit"){
|
||||
this.$confirm('确认删除该条数据吗?', '确认信息')
|
||||
.then(async (isPass) => {
|
||||
if (isPass) {
|
||||
//计算要删除的运单, “删除”按钮的操作逻辑
|
||||
// let tempDelList = [];
|
||||
// 计算出选中的数据是已存在还是新增的;
|
||||
let idsArrTemp=[];
|
||||
for(let gti=0; gti < this.tempExistCoPackWayBillList.length;gti++){
|
||||
if(this.coSelection.filter(item => {
|
||||
return this.tempExistCoPackWayBillList[gti].billCode == item.billCode
|
||||
}).length > 0){
|
||||
// 已存在
|
||||
let res = await delEmisTmsPackDtl(this.tempExistCoPackWayBillList[gti].id);
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
idsArrTemp.push(this.tempExistCoPackWayBillList[gti].id)
|
||||
}
|
||||
}
|
||||
let newList =[];
|
||||
this.emisCoPackDetail.forEach(item=>{
|
||||
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisCoPackDetail = newList;
|
||||
let afterList=[];
|
||||
for(let ai = 0; ai < this.tempExistCoPackWayBillList.length; ai++){
|
||||
debugger
|
||||
console.log(idsArrTemp)
|
||||
console.log(this.tempExistCoPackWayBillList[ai])
|
||||
if(idsArrTemp.indexOf(this.tempExistCoPackWayBillList[ai].id) == -1){
|
||||
afterList.push(this.tempExistCoPackWayBillList[ai]);
|
||||
}
|
||||
}
|
||||
this.tempExistCoPackWayBillList = afterList;//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1})
|
||||
|
||||
this.computeTotal();
|
||||
// 更新主表
|
||||
this.tempCoPackInfo.destCountry = this.coData.destCountry;
|
||||
this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode;
|
||||
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
|
||||
this.tempCoPackInfo.blUnpack = this.blUnpack;
|
||||
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
|
||||
this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty;
|
||||
this.tempCoPackInfo.totalWeight = this.coData.totalWeight;
|
||||
this.tempCoPackInfo.totalVolume = this.coData.totalVolume;
|
||||
let res = await updateEmisTmsPack(this.tempCoPackInfo);
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
}
|
||||
})
|
||||
.catch()
|
||||
}else{
|
||||
let newList =[];
|
||||
this.emisCoPackDetail.forEach(item=>{
|
||||
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisCoPackDetail = newList;
|
||||
this.computeTotal();
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@ -1183,22 +1379,33 @@ export default {
|
||||
handleCoPackSelectionChange(selection){
|
||||
// this.coSelection = selection.map(item => item.id)
|
||||
this.coSelection = selection;
|
||||
this.coSingle = selection.length!==1
|
||||
this.coSingle = selection.length !== 1;
|
||||
this.coMultiple = !selection.length
|
||||
},
|
||||
computeTotal(){
|
||||
let totalParcelQty=0;
|
||||
let totalWeight=0;
|
||||
let totalVolume=0;
|
||||
let firstItem = this.emisCoPackDetail.length > 0 ? this.emisCoPackDetail[0] : null;
|
||||
let blUnpack = true;
|
||||
this.emisCoPackDetail.forEach(item =>{
|
||||
totalParcelQty +=item.parcelQty;
|
||||
totalWeight +=item.billWeight;
|
||||
totalVolume +=item.totalVolume;
|
||||
item.destCountry = this.coData.destCountry;
|
||||
item.sendSiteCode = this.coData.sendSiteCode;
|
||||
item.sendStiteCode = this.coData.sendStiteCode;
|
||||
item.nextSiteCode = this.coData.nextSiteCode;
|
||||
item.blUnpack = this.blUnpack;
|
||||
if(firstItem.receiveCountry != item.receiveCountry){
|
||||
blUnpack = false;
|
||||
}
|
||||
})
|
||||
if(!blUnpack){
|
||||
this.packDisabled = true;
|
||||
this.blUnpack = "1";
|
||||
}else{
|
||||
this.packDisabled = false;
|
||||
}
|
||||
this.coData.totalWaybillQty=this.emisCoPackDetail.length;
|
||||
this.coData.totalParcelQty=totalParcelQty;
|
||||
this.coData.totalWeight=totalWeight;
|
||||
@ -1225,12 +1432,12 @@ export default {
|
||||
this.coData.createTime = parseTime(new Date());
|
||||
this.coData.destCountry = null;
|
||||
this.coData.destCountryName = null;
|
||||
// this.coData.sendSiteCode = null;
|
||||
// this.coData.sendStiteCode = null;
|
||||
this.coData.nextSiteCode = null;
|
||||
this.coData.nextStation = null;
|
||||
this.blUnpack = "1";
|
||||
|
||||
this.coData.sendSiteCode = this.$store.getters.ownerSiteCode;
|
||||
this.coData.sendStiteCode = this.$store.getters.ownerSiteCode;
|
||||
this.coData.sendSiteName=this.$store.getters.ownerSiteName;
|
||||
|
||||
this.computeTotal();
|
||||
@ -1240,6 +1447,11 @@ export default {
|
||||
this.titleForm = "新增合包";
|
||||
},
|
||||
handleAddWayBill(){
|
||||
// if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
if(!this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
this.openWayBillForm= true;
|
||||
this.titleWayBill = "运单列表";
|
||||
},
|
||||
@ -1247,9 +1459,10 @@ export default {
|
||||
this.moreInputVisible = !this.moreInputVisible;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
async handleUpdate(row) {
|
||||
async handleUpdate() {
|
||||
let id = this.ids[0]
|
||||
this.coPackType="edit";
|
||||
let response = await getEmisTmsPack(row.id);
|
||||
let response = await getEmisTmsPack(id);
|
||||
if(!response || response.code != 200){
|
||||
this.$message.error(response && response.msg || "未知错误");
|
||||
return;
|
||||
@ -1259,8 +1472,8 @@ export default {
|
||||
this.coData.createTime = resData.createTime;
|
||||
this.coData.destCountry = resData.destCountry;
|
||||
// this.coData.destCountryName = null;
|
||||
this.coData.sendSiteCode = resData.sendSiteCode;
|
||||
// this.coData.sendSiteCode = resData.sendSiteName;
|
||||
this.coData.sendStiteCode = resData.sendStiteCode;
|
||||
this.coData.sendSiteName = resData.sendSiteName;
|
||||
this.coData.nextSiteCode = resData.nextSiteCode;
|
||||
// this.coData.nextStation = null;
|
||||
this.blUnpack = resData.blUnpack;
|
||||
@ -1324,7 +1537,7 @@ export default {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','合包号','合包名称','合包时间','目的国家','目的国家名称','是否可拆','发出网点','下一网点','下一站','总件数','总运单数','总体积','总重量','合包状态','扩展数据','操作员','ext1','ext2','ext3','ext4','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',];
|
||||
const filterVal = ['id','packNo','packName','packDate','destCountry','destCountryName','blUnpack','sendSiteCode','nextSiteCode','nextStation','totalParcelQty','totalWaybillQty','totalVolume','totalWeight','packStatus','extData','opMan','ext1','ext2','ext3','ext4','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
||||
const filterVal = ['id','packNo','packName','packDate','destCountry','destCountryName','blUnpack','sendStiteCode','nextSiteCode','nextStation','totalParcelQty','totalWaybillQty','totalVolume','totalWeight','packStatus','extData','opMan','ext1','ext2','ext3','ext4','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
<el-form-item label="" prop="billCode">
|
||||
<div slot="label">
|
||||
<el-radio-group class="query-label" v-model="queryParams.params.queryOrderType">
|
||||
<el-radio label="0">批次号</el-radio>
|
||||
<el-radio label="1">运单号</el-radio>
|
||||
<el-radio label="0">订单号</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<XdTextareaInput
|
||||
@ -20,29 +20,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="" prop="queryType">
|
||||
<div slot="label">
|
||||
<el-radio-group class="query-label" v-model="queryParams.queryType">
|
||||
<el-radio label="1">组批次号</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-input
|
||||
v-model="queryParams.packNo"
|
||||
:placeholder="$t('多个组批次号逗号可换行隔开')"
|
||||
clearable
|
||||
type="textarea"
|
||||
rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批次号" prop="batchNo" label-width="100px">
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{$t('批次号')}}</span>
|
||||
</span> -->
|
||||
<el-input v-model="queryParams.batchNo" clearable="" placeholder="单号输入后按回车"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的国" prop="receiveCountry">
|
||||
<CountryPicker :placeholder="$t('目的国')" v-model="queryParams.receiveCountry" ></CountryPicker>
|
||||
@ -111,6 +92,14 @@
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['emis:emisTmsSiteBatchLoading:add']"
|
||||
>新增组批次</el-button> -->
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['emis:emisTmsSiteBatchLoading:remove']"
|
||||
>修改</el-button>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
@ -127,7 +116,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['emis:emisTmsSiteBatchLoading:export']"
|
||||
>打印组批次</el-button>
|
||||
>下载批次文件</el-button>
|
||||
</div>
|
||||
|
||||
<el-tabs v-model="activeName" style="margin-top: 10px;" @tab-click="getQuery">
|
||||
@ -302,8 +291,18 @@
|
||||
|
||||
<el-table-column :label="$t('批次号')" align="center" prop="batchNo" min-width="170" />
|
||||
<el-table-column :label="$t('批次名称')" align="center" prop="batchName" min-width="170" />
|
||||
<el-table-column :label="$t('报关资料状态')" align="center" prop="declareResStatus" min-width="170" />
|
||||
<el-table-column :label="$t('清关资料状态')" align="center" prop="clearanceResStatus" min-width="170" />
|
||||
<el-table-column :label="$t('报关资料状态')" align="center" prop="declareResStatus" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.declareResStatus==1" type="success">{{ $t('已上传') }}</el-tag>
|
||||
<el-tag v-else-if="scope.row.declareResStatus==0" type="warning">{{ $t('未上传') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('清关资料状态')" align="center" prop="clearanceResStatus" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.declareResStatus==1" type="success">{{ $t('已上传') }}</el-tag>
|
||||
<el-tag v-else-if="scope.row.declareResStatus==0" type="warning">{{ $t('未上传') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('航空提单号')" align="center" prop="airBilllNo" min-width="170" />
|
||||
<el-table-column :label="$t('异常信息')" align="center" prop="remark" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
@ -331,7 +330,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('操作员')" align="center" prop="createByName" min-width="150" />
|
||||
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
|
||||
<!-- <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -340,14 +339,14 @@
|
||||
v-hasPermi="['emis:emisTmsSiteBatchLoading:query']"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</XdTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" style="height: 80%" :destroy-on-close="true" @close="handleCancelCo" v-dialogDrag append-to-body>
|
||||
<el-form ref="formCo" size="mini" :model="coData" label-width="100px" class="overflowhidden" >
|
||||
<el-form ref="formCo" size="mini" :model="coData" label-width="100px" class="overflowhidden" >
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-col :span="12">
|
||||
@ -357,40 +356,48 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('批次名称')" prop="batchName">
|
||||
<el-input v-model="coData.batchName" />
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{ $t('批次名称') }}</span>
|
||||
</span> -->
|
||||
<el-input v-model="coData.batchName" clearable="" placeholder="" key="test"></el-input>
|
||||
<!-- <el-input v-model="coData.batchName" placeholder=""></el-input> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('目的国家')" prop="destCountry">
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{ $t('目的国家') }}</span>
|
||||
</span> -->
|
||||
<CountryPicker :placeholder="$t('选择国家')" v-model="coData.destCountry" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('起始网点')" prop="startSiteCode">
|
||||
<span slot="label">
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{ $t('起始网点') }}</span>
|
||||
</span>
|
||||
<!-- <EmisSiteSimplePicker :placeholder="$t('请选择')" @change="onSiteSelect" v-model="coData.startSiteCode" v-if="$store.getters.ownerSiteCode== '88888'" ></EmisSiteSimplePicker>
|
||||
<el-input v-else v-model="coData.startSiteName" placeholder="" disabled /> -->
|
||||
</span> -->
|
||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" @change="onSiteSelect" v-model="coData.startSiteCode" :disabled="$store.getters.ownerSiteCode != '88888'" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('下一网点')" prop="nextSiteCode">
|
||||
<span slot="label">
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{ $t('下一网点') }}</span>
|
||||
</span>
|
||||
</span> -->
|
||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.nextSiteCode" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运输方式" prop="transType">
|
||||
<!-- <span slot="label">
|
||||
<span style="color: red">{{ $t('运输方式') }}</span>
|
||||
</span> -->
|
||||
<el-select v-model="coData.transType" placeholder="运输方式" clearable filterable >
|
||||
<el-option
|
||||
v-for="item in dict.type.emis_biz_shipping_method"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
v-for="dict in dict.type.emis_biz_shipping_method"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -427,7 +434,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="['1','3','5'].indexOf(coData.transType) > -1">
|
||||
<el-form-item :label="$t('车牌号')" prop="carNo">
|
||||
<el-input v-model="coData.carNo" />
|
||||
<el-input v-model="coData.carNo" clearable="" placeholder=""></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="['1','3','5'].indexOf(coData.transType) > -1">
|
||||
@ -440,48 +447,22 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item :label="$t('配载文件')" prop="loadingFile">
|
||||
<span slot="label">
|
||||
<span style="color: red">{{ $t('配载文件') }}</span>
|
||||
</span>
|
||||
<ImageUpload v-model="coData.loadingFile" :isShowTip="false" ></ImageUpload>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item style="font-weight:600;">
|
||||
<span>{{$t('总票数') + ': ' + (coData.totalWaybillQty || 0)}}</span>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<span slot="label">
|
||||
<span style="font-weight:600">{{$t('总票数') + ': '}}</span>
|
||||
<span style="font-weight:600">{{coData.totalWaybillQty || 0}}</span>
|
||||
</span>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item style="font-weight:600;">
|
||||
<span>{{$t('总件数') + ': ' + (coData.totalParcelQty || 0)}}</span>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<span slot="label">
|
||||
<span style="font-weight:600">{{$t('总件数') + ': '}}</span>
|
||||
<span style="font-weight:600">{{coData.totalParcelQty || 0}}</span>
|
||||
</span>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item style="font-weight:600;">
|
||||
<span>{{$t('总重量') + ': ' + (coData.totalWeight || 0)}}</span>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<span slot="label">
|
||||
<span style="font-weight:600">{{$t('总重量') + ': '}}</span>
|
||||
<span style="font-weight:600">{{coData.totalWeight || 0}}</span>
|
||||
</span>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item style="font-weight:600;">
|
||||
@ -558,7 +539,7 @@
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleCoPackListDelete"
|
||||
:disabled="coSingle"
|
||||
:disabled="coMultiple"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -833,11 +814,12 @@ import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePic
|
||||
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||
import { parseTime, dateToStr } from "@/utils/custom";
|
||||
import { formatSearchStr } from '@/utils/index'
|
||||
|
||||
export default {
|
||||
name: "CenterGenBatchMgnt",
|
||||
components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker},
|
||||
dicts: ['emis_pack_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi'],
|
||||
dicts: ['emis_pack_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi', 'cebp_return_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -878,7 +860,7 @@ export default {
|
||||
waitPackList:[],//选择未组包的运单先保存起来,在后续新增组批次的弹框中使用
|
||||
// 新增/修改弹窗数据
|
||||
coData: {
|
||||
blUnpack:"1"
|
||||
|
||||
},
|
||||
// 新增/修改包详情数据
|
||||
emisCoPackDetail:[],
|
||||
@ -949,7 +931,9 @@ export default {
|
||||
// opMan: null,
|
||||
// remark: null,
|
||||
// delFlag: null,
|
||||
params:{}
|
||||
params:{
|
||||
queryOrderType: '0',
|
||||
},
|
||||
},
|
||||
queryCoParams: {
|
||||
params:{}
|
||||
@ -1006,11 +990,39 @@ export default {
|
||||
},
|
||||
donothing(){
|
||||
|
||||
},
|
||||
test(ctx){
|
||||
debugger;
|
||||
},
|
||||
/** 查询TMS组批次列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.single = true;
|
||||
this.multiple = true;
|
||||
// this.queryParams.params = {};
|
||||
if(this.queryParams.billCode){
|
||||
let qBillCode=formatSearchStr(this.queryParams.billCode);
|
||||
let billArr = qBillCode.split(",");
|
||||
let newBillCodeStr="";
|
||||
billArr.forEach(item=>{
|
||||
if(item.startsWith("T")){
|
||||
let mainBillCode=item.substr(0,14);
|
||||
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||
}else if(item == ""){
|
||||
|
||||
}else{
|
||||
newBillCodeStr=newBillCodeStr+item+",";
|
||||
}
|
||||
});
|
||||
if(this.queryParams.params.queryOrderType == "0"){
|
||||
this.queryParams.batchNo=newBillCodeStr;
|
||||
this.queryParams.billCode=null;
|
||||
}else{
|
||||
// 处理子单号
|
||||
this.queryParams.billCode=newBillCodeStr;
|
||||
this.queryParams.batchNo=null;
|
||||
}
|
||||
}
|
||||
this.emisTmsPackList = [];
|
||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||
this.queryParams.params["beginCreateTime"] = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
@ -1024,14 +1036,40 @@ export default {
|
||||
});
|
||||
},
|
||||
handleQueryWait(){
|
||||
this.single = true;
|
||||
this.multiple = true;
|
||||
if(null != this.dateTimeRange && '' != this.dateTimeRange){
|
||||
this.queryWaitParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
this.queryWaitParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1]));
|
||||
}
|
||||
this.queryWaitParams.packNo = this.queryParams.packNo;
|
||||
// this.queryWaitParams.packNo = this.queryParams.packNo;
|
||||
this.queryWaitParams.receiveCountry = this.queryParams.receiveCountry;
|
||||
this.queryWaitParams.sendCountry = this.queryParams.sendCountry;
|
||||
|
||||
if(this.queryParams.billCode){
|
||||
let qBillCode=formatSearchStr(this.queryParams.billCode);
|
||||
let billArr = qBillCode.split(",");
|
||||
let newBillCodeStr="";
|
||||
billArr.forEach(item=>{
|
||||
if(item.startsWith("T")){
|
||||
let mainBillCode=item.substr(0,14);
|
||||
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||
}else if(item == ""){
|
||||
|
||||
}else{
|
||||
newBillCodeStr=newBillCodeStr+item+",";
|
||||
}
|
||||
});
|
||||
if(this.queryParams.params.queryOrderType == "0"){
|
||||
this.queryWaitParams.batchNo=newBillCodeStr;
|
||||
this.queryWaitParams.billCode=null;
|
||||
}else{
|
||||
// 处理子单号
|
||||
this.queryWaitParams.billCode=newBillCodeStr;
|
||||
this.queryWaitParams.batchNo=null;
|
||||
}
|
||||
}
|
||||
|
||||
this.loadingWait = true;
|
||||
this.queryWaitParams.params.isNeedBatch = 1;
|
||||
listEmisWaybill(this.queryWaitParams).then(response => {
|
||||
@ -1051,12 +1089,38 @@ export default {
|
||||
this.waitPackList = selection;
|
||||
},
|
||||
async handleQueryDone(){
|
||||
this.single = true;
|
||||
this.multiple = true;
|
||||
this.loadingDone = true;
|
||||
if(null != this.dateTimeRange && '' != this.dateTimeRange){
|
||||
this.queryDoneParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0]));
|
||||
this.queryDoneParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1]));
|
||||
}
|
||||
this.queryDoneParams.packNo = this.queryParams.packNo;
|
||||
// this.queryDoneParams.packNo = this.queryParams.packNo;
|
||||
if(this.queryParams.billCode){
|
||||
let qBillCode=formatSearchStr(this.queryParams.billCode);
|
||||
let billArr = qBillCode.split(",");
|
||||
let newBillCodeStr="";
|
||||
billArr.forEach(item=>{
|
||||
if(item.startsWith("T")){
|
||||
let mainBillCode=item.substr(0,14);
|
||||
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||
}else if(item == ""){
|
||||
|
||||
}else{
|
||||
newBillCodeStr=newBillCodeStr+item+",";
|
||||
}
|
||||
});
|
||||
if(this.queryParams.params.queryOrderType == "0"){
|
||||
this.queryDoneParams.batchNo=newBillCodeStr;
|
||||
this.queryDoneParams.billCode=null;
|
||||
}else{
|
||||
// 处理子单号
|
||||
this.queryDoneParams.billCode=newBillCodeStr;
|
||||
this.queryDoneParams.batchNo=null;
|
||||
}
|
||||
}
|
||||
|
||||
this.queryDoneParams.receiveCountry = this.queryParams.receiveCountry;
|
||||
this.queryDoneParams.sendCountry = this.queryParams.sendCountry;
|
||||
let resList = await listEmisTmsSiteBatchDtl(this.queryDoneParams);
|
||||
@ -1121,10 +1185,14 @@ export default {
|
||||
this.wayBillData.dateTimeRange=value;
|
||||
},
|
||||
async handleAddCoPack(){
|
||||
// if(!this.coData.destCountry || !this.coData.sendSiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||
// this.$modal.msgError("请先选择必填项")
|
||||
// return;
|
||||
// }
|
||||
if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
|| (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
|| (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
|| ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
if(this.emisCoPackDetail.length == 0){
|
||||
this.$modal.msgError("请先选择至少一条运单信息")
|
||||
return;
|
||||
@ -1150,14 +1218,8 @@ export default {
|
||||
startSiteName: this.coData.startSiteName || null,
|
||||
nextSiteCode: this.coData.nextSiteCode || null,
|
||||
airBilllNo: this.coData.airBilllNo || null,
|
||||
// airTime: this.coData.airTime || null,
|
||||
// etd: this.coData.etd || null,
|
||||
// eta: this.coData.eta || null,
|
||||
// packNum: this.coData.packNum || null,
|
||||
carNo: this.coData.carNo || null,
|
||||
// carTime: this.coData.carTime || null,
|
||||
shipNo: this.coData.shipNo || null,
|
||||
// shipTime: this.coData.shipTime || null,
|
||||
clearanceResStatus: this.coData.clearanceResStatus || null,
|
||||
declareResStatus: this.coData.declareResStatus || null,
|
||||
destCountry: this.coData.destCountry || null,
|
||||
@ -1166,23 +1228,6 @@ export default {
|
||||
totalWaybillQty: this.coData.totalWaybillQty || null,
|
||||
totalVolume: this.coData.totalVolume || null,
|
||||
totalWeight: this.coData.totalWeight || null,
|
||||
// batchType: this.coData.batchType || null,
|
||||
// batchType: this.coData.batchType || null,
|
||||
// batchType: this.coData.batchType || null,
|
||||
|
||||
// destCountry: this.coData.destCountry,
|
||||
// // startSiteCode: this.coData.startSiteCode,
|
||||
// // nextSiteCode: this.coData.nextSiteCode,
|
||||
// // destCountryName: this.coData.,
|
||||
// blUnpack: this.coData.blUnpack,
|
||||
// // startSiteCode: this.coData.startSiteCode,
|
||||
// // sendSiteName: this.coData.sendSiteName,
|
||||
// totalParcelQty: this.coData.totalParcelQty,
|
||||
// totalWaybillQty: this.coData.totalWaybillQty,
|
||||
// totalVolume: this.coData.totalVolume,
|
||||
// totalWeight: this.coData.totalWeight,
|
||||
// // packStatus: this.coData.,
|
||||
// opMan: this.$store.getters.empCode
|
||||
}
|
||||
if(this.coData.transType == 2){
|
||||
coPackItem.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
@ -1200,10 +1245,8 @@ export default {
|
||||
this.$message.error(resPack && resPack.msg || "未知错误");
|
||||
return;
|
||||
}
|
||||
// this.coData.packNo = resPack.data;
|
||||
coPackItem.batchNo = resPack.data;
|
||||
let response = await addEmisTmsSiteBatch(coPackItem);
|
||||
// addEmisTmsSiteBatch(coPackItem).then(response => {
|
||||
if(!response || response.code != 200){
|
||||
this.$modal.msgError(response && response.msg || '新增组批次失败')
|
||||
return;
|
||||
@ -1222,25 +1265,10 @@ export default {
|
||||
createTime: parseTime(new Date())
|
||||
};
|
||||
let response = await addEmisTmsSiteBatchDtl(packDetail);
|
||||
// addEmisTmsSiteBatchDtl(packDetail).then(response => {
|
||||
if(!response || response.code != 200){
|
||||
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
||||
return;
|
||||
}
|
||||
// 待确认
|
||||
// let batchLoading = {
|
||||
// batchNo:resPack.data,
|
||||
// posNo: this.emisCoPackDetail[i].posNo,
|
||||
// row: this.emisCoPackDetail[i].row,
|
||||
// col: this.emisCoPackDetail[i].col,
|
||||
// layer: this.emisCoPackDetail[i].layer,
|
||||
// posDesc: this.emisCoPackDetail[i].posDesc,
|
||||
// }
|
||||
// let resBL = await addEmisTmsSiteBatchLoading(batchLoading);
|
||||
// if(!resBL || resBL.code != 200){
|
||||
// this.$modal.msgError(resBL && resBL.msg || '配载新增失败')
|
||||
// return;
|
||||
// }
|
||||
this.waitPackList=[];
|
||||
}
|
||||
|
||||
@ -1305,64 +1333,63 @@ export default {
|
||||
}
|
||||
}
|
||||
//第二步:处理运单列表的数据
|
||||
let tempDelList = [];
|
||||
let tempAddList=[];
|
||||
//2.1:计算要删除的运单
|
||||
tempDelList = this.tempExistCoPackWayBillList.filter(item => {
|
||||
let ls = this.emisCoPackDetail.filter(cd => {
|
||||
return cd.billCode == item.billCode
|
||||
})
|
||||
if(ls.length > 0){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
})
|
||||
// tempDelList.forEach(item =>{
|
||||
for(let tdl = 0; tdl < tempDelList.length; tdl++){
|
||||
let item = tempDelList[tdl];
|
||||
let res = await delEmisTmsSiteBatchDtl(item.id);
|
||||
// delEmisTmsSiteBatchDtl(item.id).then(res => {
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
// })
|
||||
}
|
||||
|
||||
//2.1:计算要删除的运单,提到“删除”按钮的操作逻辑
|
||||
// let tempDelList = [];
|
||||
//
|
||||
// tempDelList = this.tempExistCoPackWayBillList.filter(item => {
|
||||
// let ls = this.emisCoPackDetail.filter(cd => {
|
||||
// return cd.billCode == item.billCode
|
||||
// })
|
||||
// if(ls.length > 0){
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
// })
|
||||
// // tempDelList.forEach(item =>{
|
||||
// for(let tdl = 0; tdl < tempDelList.length; tdl++){
|
||||
// let item = tempDelList[tdl];
|
||||
// let res = await delEmisTmsSiteBatchDtl(item.id);
|
||||
// // delEmisTmsSiteBatchDtl(item.id).then(res => {
|
||||
// if(!res || res.code != 200){
|
||||
// this.$modal.msgError(res && res.msg || '未知错误')
|
||||
// return;
|
||||
// }
|
||||
// // })
|
||||
// }
|
||||
// })
|
||||
//2.2:计算要新增的运单
|
||||
tempAddList = this.emisCoPackDetail.filter(item => {
|
||||
let ls = this.tempExistCoPackWayBillList.filter(cd => {
|
||||
return cd.billCode == item.billCode
|
||||
})
|
||||
if(ls.length > 0){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
})
|
||||
// tempAddList.forEach(item =>{
|
||||
for(let tal = 0; tal < tempAddList.length; tal++){
|
||||
let item = tempAddList[tal];
|
||||
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);
|
||||
// addEmisTmsSiteBatchDtl(packDetail).then(response => {
|
||||
if(!response || response.code != 200){
|
||||
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
|
||||
return;
|
||||
}
|
||||
// })
|
||||
}
|
||||
// let tempAddList=[];
|
||||
// tempAddList = this.emisCoPackDetail.filter(item => {
|
||||
// let ls = this.tempExistCoPackWayBillList.filter(cd => {
|
||||
// return cd.billCode == item.billCode
|
||||
// })
|
||||
// if(ls.length > 0){
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
// })
|
||||
// for(let tal = 0; tal < tempAddList.length; tal++){
|
||||
// let item = tempAddList[tal];
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// 修改配载数据
|
||||
for(let lr = 0; lr < 3; lr++){
|
||||
@ -1370,14 +1397,7 @@ export default {
|
||||
if(this.tempCoPackInfo.tableData[lr][ll] != this.tableData[lr][ll]){
|
||||
let batchLoadingData = {
|
||||
id: this.tempCoPackInfo.tableDataId[lr][ll],
|
||||
// batchNo: resPack.data,
|
||||
posDesc:this.tableData[lr][ll],
|
||||
// row: lr,
|
||||
// col: ll,
|
||||
// layer: 1,
|
||||
// posDesc:"",
|
||||
// remark:"",
|
||||
// tenantId:"",
|
||||
}
|
||||
let resLD = await updateEmisTmsSiteBatchLoading(batchLoadingData);
|
||||
if(!resLD || resLD.code != 200){
|
||||
@ -1412,15 +1432,34 @@ export default {
|
||||
this.coData={};
|
||||
this.blUnpack="1";
|
||||
this.emisCoPackDetail=[];
|
||||
this.getQuery();
|
||||
},
|
||||
handleWayBillSelectionChange(selection){
|
||||
this.tempCoPackList = selection;
|
||||
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
||||
},
|
||||
handleCoAdd(){
|
||||
this.tempCoPackList.forEach(item => {
|
||||
async handleCoAdd(){
|
||||
this.tempCoPackList.forEach(async (item) => {
|
||||
if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 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.titleWayBill="";
|
||||
@ -1435,6 +1474,29 @@ export default {
|
||||
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;
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCloseWayBill(){
|
||||
this.titleWayBill="";
|
||||
@ -1450,14 +1512,83 @@ export default {
|
||||
this.wayBillotal=0;
|
||||
},
|
||||
handleCoPackListDelete(){
|
||||
let newList =[];
|
||||
this.emisCoPackDetail.forEach(item=>{
|
||||
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisCoPackDetail = newList;
|
||||
this.computeTotal();
|
||||
if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
|| (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
|| (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
|| ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.coPackType == "edit"){
|
||||
this.$confirm('确认删除该条数据吗?', '确认信息')
|
||||
.then(async (isPass) => {
|
||||
if (isPass) {
|
||||
//计算要删除的运单, “删除”按钮的操作逻辑
|
||||
// let tempDelList = [];
|
||||
// 计算出选中的数据是已存在还是新增的;
|
||||
let idsArrTemp=[];
|
||||
for(let gti=0; gti < this.tempExistCoPackWayBillList.length;gti++){
|
||||
if(this.coSelection.filter(item => {
|
||||
return this.tempExistCoPackWayBillList[gti].billCode == item.billCode
|
||||
}).length > 0){
|
||||
// 已存在
|
||||
let res = await delEmisTmsSiteBatchDtl(this.tempExistCoPackWayBillList[gti].id);
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
idsArrTemp.push(this.tempExistCoPackWayBillList[gti].id)
|
||||
}
|
||||
}
|
||||
let newList =[];
|
||||
this.emisCoPackDetail.forEach(item=>{
|
||||
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisCoPackDetail = newList;
|
||||
let afterList=[];
|
||||
for(let ai = 0; ai < this.tempExistCoPackWayBillList.length; ai++){
|
||||
debugger
|
||||
console.log(idsArrTemp)
|
||||
console.log(this.tempExistCoPackWayBillList[ai])
|
||||
if(idsArrTemp.indexOf(this.tempExistCoPackWayBillList[ai].id) == -1){
|
||||
afterList.push(this.tempExistCoPackWayBillList[ai]);
|
||||
}
|
||||
}
|
||||
this.tempExistCoPackWayBillList = afterList;//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1})
|
||||
|
||||
this.computeTotal();
|
||||
// 更新主表
|
||||
this.tempCoPackInfo.destCountry = this.coData.destCountry;
|
||||
this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode;
|
||||
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
|
||||
this.tempCoPackInfo.blUnpack = this.blUnpack;
|
||||
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
|
||||
this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty;
|
||||
this.tempCoPackInfo.totalWeight = this.coData.totalWeight;
|
||||
this.tempCoPackInfo.totalVolume = this.coData.totalVolume;
|
||||
let res = await updateEmisTmsSiteBatch(this.tempCoPackInfo);
|
||||
if(!res || res.code != 200){
|
||||
this.$modal.msgError(res && res.msg || '未知错误')
|
||||
return;
|
||||
}
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
}
|
||||
})
|
||||
.catch()
|
||||
}else{
|
||||
let newList =[];
|
||||
this.emisCoPackDetail.forEach(item=>{
|
||||
if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisCoPackDetail = newList;
|
||||
this.computeTotal();
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@ -1532,7 +1663,7 @@ export default {
|
||||
// this.coData.sendSiteCode = null;
|
||||
this.coData.nextSiteCode = null;
|
||||
this.coData.nextStation = null;
|
||||
this.blUnpack = "1";
|
||||
// this.blUnpack = "1";
|
||||
|
||||
this.tableData = [
|
||||
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
|
||||
@ -1555,6 +1686,14 @@ export default {
|
||||
this.titleForm = "新增组批次";
|
||||
},
|
||||
handleAddWayBill(){
|
||||
if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType
|
||||
|| (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime))
|
||||
|| (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime))
|
||||
|| ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime))
|
||||
){
|
||||
this.$modal.msgError("请先选择必填项")
|
||||
return;
|
||||
}
|
||||
this.openWayBillForm= true;
|
||||
this.titleWayBill = "运单列表";
|
||||
},
|
||||
@ -1562,52 +1701,46 @@ export default {
|
||||
this.moreInputVisible = !this.moreInputVisible;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
async handleUpdate(row) {
|
||||
async handleUpdate() {
|
||||
// this.coData={};
|
||||
let id = this.ids[0]
|
||||
this.coPackType="edit";
|
||||
let response = await getEmisTmsSiteBatch(row.id);
|
||||
let response = await getEmisTmsSiteBatch(id);
|
||||
if(!response || response.code != 200){
|
||||
this.$message.error(response && response.msg || "未知错误");
|
||||
return;
|
||||
}
|
||||
let resData = response.data;
|
||||
this.coData.batchNo = resData.batchNo;
|
||||
// this.coData.createTime = resData.createTime;
|
||||
this.coData.destCountry = resData.destCountry;
|
||||
// this.coData.startSiteCode = resData.startSiteCode;
|
||||
// this.coData.nextSiteCode = resData.nextSiteCode;
|
||||
// this.blUnpack = resData.blUnpack;
|
||||
this.coData.batchName = resData.batchName || '';
|
||||
this.coData.batchDate = resData.createTime;
|
||||
this.coData.batchType = resData.batchType || null;
|
||||
this.coData.transType = resData.transType || null;
|
||||
this.coData.startSiteCode = resData.startSiteCode || null;
|
||||
this.coData.startSiteName = resData.startSiteName || null;
|
||||
this.coData.nextSiteCode = resData.nextSiteCode || null;
|
||||
this.coData.airBilllNo = resData.airBilllNo || null;
|
||||
// this.coData.airTime = resData.airTime || null;
|
||||
// this.coData.etd = resData.etd || null;
|
||||
// this.coData.eta = resData.eta || null;
|
||||
// this.coData.packNum = resData.packNum || null;
|
||||
this.coData.carNo = resData.carNo || null;
|
||||
// this.coData.carTime = resData.carTime || null;
|
||||
this.coData.shipNo = resData.shipNo || null;
|
||||
// this.coData.shipTime = resData.shipTime || null;
|
||||
this.coData.clearanceResStatus = resData.clearanceResStatus || null;
|
||||
this.coData.declareResStatus = resData.declareResStatus || null;
|
||||
this.coData.destCountry = resData.destCountry || null;
|
||||
this.coData.destCountryName = resData.destCountryName || null;
|
||||
this.coData.totalParcelQty = resData.totalParcelQty || null;
|
||||
this.coData.totalWaybillQty = resData.totalWaybillQty || null;
|
||||
this.coData.totalVolume = resData.totalVolume || null;
|
||||
this.coData.totalWeight = resData.totalWeight || null;
|
||||
|
||||
let time = {};
|
||||
if(resData.transType == 2){
|
||||
this.coData.airTime = resData.etd;
|
||||
time.airTime = resData.etd;
|
||||
}else if(resData.transType == 4){
|
||||
this.coData.shipTime = resData.etd;
|
||||
time.shipTime = resData.etd;
|
||||
}else{
|
||||
this.coData.carTime = resData.etd;
|
||||
time.carTime = resData.etd;
|
||||
}
|
||||
this.coData = {...resData, ...{batchDate:resData.createTime}, ...time};
|
||||
// this.coData.batchNo = resData.batchNo;
|
||||
// this.coData.destCountry = resData.destCountry;
|
||||
// this.coData.batchDate = resData.createTime;
|
||||
// this.coData.batchType = resData.batchType || null;
|
||||
// this.coData.transType = resData.transType;
|
||||
// this.coData.startSiteCode = resData.startSiteCode || null;
|
||||
// this.coData.startSiteName = resData.startSiteName || null;
|
||||
// this.coData.nextSiteCode = resData.nextSiteCode || null;
|
||||
// this.coData.airBilllNo = resData.airBilllNo || null;
|
||||
// this.coData.carNo = resData.carNo || "";
|
||||
// this.coData.shipNo = resData.shipNo || null;
|
||||
// this.coData.clearanceResStatus = resData.clearanceResStatus || null;
|
||||
// this.coData.declareResStatus = resData.declareResStatus || null;
|
||||
// this.coData.destCountry = resData.destCountry || null;
|
||||
// this.coData.destCountryName = resData.destCountryName || null;
|
||||
// this.coData.totalParcelQty = resData.totalParcelQty || null;
|
||||
// this.coData.totalWaybillQty = resData.totalWaybillQty || null;
|
||||
// this.coData.totalVolume = resData.totalVolume || null;
|
||||
// this.coData.totalWeight = resData.totalWeight || null;
|
||||
|
||||
|
||||
this.emisCoPackDetail=[];
|
||||
let resList = await listEmisTmsSiteBatchDtl({batchNo: resData.batchNo});
|
||||
if(!resList || resList.code != 200){
|
||||
|
||||
@ -94,7 +94,9 @@
|
||||
<el-table-column :label="$t('运单编号')" align="center" prop="billCode" min-width="170" />
|
||||
<el-table-column :label="$t('图片类型')" align="center" prop="attachType" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (attachType[scope.row.attachType]) }}</span>
|
||||
<el-tag v-if="scope.row.attachType==10" type="warning">{{ (attachType[scope.row.attachType]) }}</el-tag>
|
||||
<el-tag v-else-if="scope.row.attachType==1" type="info">{{ (attachType[scope.row.attachType]) }}</el-tag>
|
||||
<el-tag v-else-if="scope.row.attachType==2" type="success">{{ (attachType[scope.row.attachType]) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('图片URL')" align="center" prop="fileUrl" min-width="100">
|
||||
|
||||
@ -393,8 +393,18 @@ export default {
|
||||
notifySiteName:this.tempRecord.dispatchUnderlingSiteName,
|
||||
}
|
||||
]
|
||||
this.form.notifySiteCode = this.tempRecord.sendSiteCode;
|
||||
this.form.notifySiteName = this.tempRecord.sendSiteName;
|
||||
if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){
|
||||
this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode;
|
||||
this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName;
|
||||
}
|
||||
// else if(this.tempRecord.dispatchUnderlingSiteCode == this.$store.getters.ownerSiteCode){
|
||||
// this.form.notifySiteCode = this.tempRecord.sendSiteCode;
|
||||
// this.form.notifySiteName = this.tempRecord.sendSiteName;
|
||||
// }
|
||||
else{
|
||||
this.form.notifySiteCode = this.tempRecord.sendSiteCode;
|
||||
this.form.notifySiteName = this.tempRecord.sendSiteName;
|
||||
}
|
||||
// this.billInputDisabled = true;
|
||||
// this.emisWaybillList.push(tempRecord);
|
||||
// this.dataMap[this.form.billCode]=tempRecord;
|
||||
|
||||
@ -237,16 +237,17 @@
|
||||
<el-input v-model="form.transferResean"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('备注')" prop="remark" label-width="80px">
|
||||
<el-input v-model="form.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('目的城市')" prop="transferCity" label-width="80px">
|
||||
<el-input v-model="form.transferCity"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item :label="$t('备注')" prop="remark" label-width="80px">
|
||||
<!-- <el-input v-model="form.remark"></el-input> -->
|
||||
<el-input v-model="form.remark" rows="2" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="text-align:center;margin-bottom:20px">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user