@ -217,50 +217,24 @@
< div style = "margin-top:20px;padding: 3px 5px;font-size: 14px;" >
装柜运单列表
< / div >
< XdTable
max - height = "400px"
v - loading = "loading"
border
size = "mini"
storageName = "waitBatchDtlList_main_240709"
ref = "refTable"
: data = "waitBatchDtlList"
: queryParams = "queryParams"
@ selection - change = "handleSelectionChange"
>
< div slot = "toolbar" >
< el -row :gutter ="10" class = "mb8" >
< el -col :span ="1.5" v-if ="!disabled" >
< el -button
type = "primary"
plain
icon = "el-icon-plus"
size = "mini"
@ click = "handleAddWayBill"
> 加入运单 < / e l - b u t t o n >
< el -button type = "primary" plain icon = "el-icon-plus" size = "mini" @click ="handleAddWayBill" > 加入运单 < / el -button >
< / e l - c o l >
< el -col :span ="1.5" v-if ="!disabled" >
< el -button
type = "primary"
plain
size = "mini"
@ click = "handleCoPackListDelete"
: disabled = "multiple"
> 移除运单 < / e l - b u t t o n >
< el -button type = "primary" plain size = "mini" @click ="handleCoPackListDelete"
: disabled = "multiple" > 移除运单 < / e l - b u t t o n >
< / e l - c o l >
< el -col :span ="1.5" v-if ="this.form.id!=null" >
< el -button style = "margin-right: 5px;"
type = "warning"
plain
icon = "el-icon-download"
size = "mini"
@ click = "handleDownBatchDtl"
> 导出 < / e l - b u t t o n >
< el -button style = "margin-right: 5px;" type = "warning" plain icon = "el-icon-download" size = "mini"
@ click = "handleDownBatchDtl" > 导出 < / e l - b u t t o n >
< / e l - c o l >
< / e l - r o w >
< / div >
< el -table class = "cargoList" max -height = " 400px " v -loading = " loading " border size = "mini"
storageName = "waitBatchDtlList_main_240709" ref = "refTable" : data = "waitBatchDtlList" : queryParams = "queryParams"
@ selection - change = "handleSelectionChange" >
< el -table -column type = "selection" width = "55" align = "center" / >
< el -table -column :label ="$t('运单号')" align = "center" prop = "billCode" min -width = " 170 " / >
< el -table -column :label ="$t('寄件网点')" align = "center" prop = "sendSiteName" min -width = " 80 " :show-overflow-tooltip ="true" / >
@ -282,10 +256,49 @@
< span > { { parseTime ( scope . row . estimateDate || '' ) } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column :label ="$t('总件数')" align = "center" prop = "parcelQty" min -width = " 100 " / >
< el -table -column :label ="$t('实际重量')" align = "center" prop = "billWeight" min -width = " 100 " / >
<!-- < 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 = "parcelQty" min -width = " 140 " >
< template slot -scope = " scope " >
<!-- 新增 、 编辑且batchId为空时 , 显示输入框 -- >
< el -input -number v -if = " ( name = = = ' batchEdit ' & & scope.row.batchParcelQty = = null ) " v -model = " scope.row.parcelQty " size = "mini"
: controls = "false" : max = "scope.row.originalParcelQty" @ blur = "computeTotal" > < / e l - i n p u t - n u m b e r >
<!-- 新增 、 编辑且batchId不为空时 , 显示输入框 -- >
< el -input -number v -if = " name = = = ' batchEdit ' & & scope.row.batchParcelQty ! = null " v -model = " scope.row.batchParcelQty " size = "mini"
: controls = "false" : max = "scope.row.originalParcelQty" @ blur = "computeTotal" > < / e l - i n p u t - n u m b e r >
<!-- 查看 -- >
< span v-if ="name == 'batchView'" > {{ scope.row.batchParcelQty
? scope . row . batchParcelQty : scope . row . parcelQty } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column :label ="$t('实际重量')" align = "center" prop = "billWeight" min -width = " 100 " >
< template slot -scope = " scope " >
< el -input -number v -if = " ( name = = = ' batchEdit ' & & scope.row.batchWeight = = null ) " v -model = " scope.row.billWeight " size = "mini"
: controls = "false" : max = "scope.row.originalBillWeight" @ blur = "computeTotal" > < / e l - i n p u t - n u m b e r >
< el -input -number v -if = " name = = = ' batchEdit ' & & scope.row.batchWeight ! = null " v -model = " scope.row.batchWeight " size = "mini"
: controls = "false" : max = "scope.row.originalBillWeight" @ blur = "computeTotal" > < / e l - i n p u t - n u m b e r >
< span v-if ="name == 'batchView'" > {{ scope.row.batchWeight ? scope.row.batchWeight : scope.row.billWeight }} < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column :label ="$t('总体积')" align = "center" prop = "totalVolume" min -width = " 100 " >
< template slot -scope = " scope " >
< el -input -number v -if = " ( name = = = ' batchEdit ' & & scope.row.batchVolume = = null ) " v -model = " scope.row.totalVolume " size = "mini"
: controls = "false" : disabled = "scope.row.originalTotalVolume===''" : max = "scope.row.originalTotalVolume" @ blur = "computeTotal" > < / e l - i n p u t - n u m b e r >
< el -input -number v -if = " name = = = ' batchEdit ' & & scope.row.batchVolume ! = null " v -model = " scope.row.batchVolume " size = "mini"
: controls = "false" : disabled = "scope.row.originalTotalVolume===0" : max = "scope.row.originalTotalVolume" @ blur = "computeTotal" > < / e l - i n p u t - n u m b e r >
<!-- 查看 -- >
< span v-if ="name == 'batchView'" > {{ scope.row.batchVolume
? scope . row . batchVolume : scope . row . totalVolume } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column :label ="$t('体积重量')" align = "center" prop = "volumeWeight" min -width = " 100 " / >
< el -table -column :label ="$t('结算重量')" align = "center" prop = "settlementWeight" min -width = " 100 " / >
< el -table -column :label ="$t('收件人')" align = "center" prop = "receiveName" min -width = " 150 " / >
@ -327,7 +340,7 @@
< span class = "ellipsis" > { { scope . row . remark } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< / XdTable >
< / e l - t a b l e >
< div style = "text-align: center;margin-bottom: 10px;" v-if ="!disabled" >
< el -button type = "primary" :loading ="isDoing" @click ="submitSaveBatchForm" > 保存批次 < / el -button >
@ -359,7 +372,7 @@ import {
} from "@/api/emis/emisTmsSiteBatch" ;
import { listEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl" ;
import { listEmisTmsSiteBatchLoading } from "@/api/emis/emisTmsSiteBatchLoading" ;
import { getEmisWaybillByBillCode } from "@/api/emis/emisWaybill" ;
import { getEmisWaybillByBillCode , getBatchDtl } from "@/api/emis/emisWaybill" ;
import emisTmsPackForm from '@/views/emis/emisTmsPack/emisTmsPackForm' ;
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker' ;
@ -393,6 +406,10 @@ export default {
required : false
} ,
name : {
type : String ,
default : ''
}
} ,
components : { EmisGetNextSitePicker , CountryPicker , EmisSiteSimplePicker , elDateAdvPicker , emisTmsPackForm , TransLinePicker , TransProductPicker , PackListView , EmisSupplierPicker , EmisTmsSiteBatchSupplierPicker , EmisTmsSiteBatchNextSitePicker } ,
dicts : [ 'emis_waybill_status' , 'emis_payment_type' , 'emis_biz_shipping_method' , 'emis_qujian_fangshi' , 'cebp_return_status' , 'emis_declare_mode' , 'emis_customs_clear' , 'emis_big_batch_type' ] ,
@ -700,9 +717,14 @@ export default {
listEmisTmsSiteBatchDtl ( { batchNo : batchNo } ) . then ( response => {
let rows = response . rows ;
let cvtBillList = rows . map ( item => {
return item . waybillDetail
let batchVolume = item . batchVolume ;
let batchParcelQty = item . batchParcelQty ;
let batchWeight = item . batchWeight ;
return { ... item . waybillDetail , batchVolume , batchParcelQty , batchWeight , batchId : item . id } ;
/ / r e t u r n i t e m . w a y b i l l D e t a i l
} ) ;
this . waitBatchDtlList = cvtBillList ;
this . computeTotal ( ) ;
} ) ;
} ,
@ -817,12 +839,29 @@ export default {
let packDetail = {
batchNo : this . form . batchNo ,
billCode : item . billCode ,
batchParcelQty : item . parcelQty ,
batchWeight : item . billWeight ,
batchVolume : item . totalVolume ,
scanDate : null ,
scanStatus : "0" ,
groupStatus : "1" , / / 已 组 批 次
scanMan : null ,
scanSite : null ,
} ;
if ( this . form . id != null ) { / / 编 辑
/ / p a c k D e t a i l . i d = i t e m . i d ;
packDetail . id = item . batchId ;
}
if ( item . batchVolume ) {
packDetail . batchVolume = item . batchVolume ;
}
if ( item . batchParcelQty ) {
packDetail . batchParcelQty = item . batchParcelQty ;
}
if ( item . batchWeight ) {
packDetail . batchWeight = item . batchWeight ;
}
this . form . batchDtlList . push ( packDetail ) ;
}
@ -888,6 +927,7 @@ export default {
return ;
}
/ / 剔 除 重 复 值 , 并 剔 除 已 存 在 列 表 中 的 数 据
let addBillCodeArr = this . inputBatchBillCode . trim ( ) . split ( /[; \;\,\, \n]/ ) || [ ] ;
let oldBillCodeArr = this . waitBatchDtlList . map ( item => { return item . billCode } ) ;
@ -903,11 +943,27 @@ export default {
for ( let i = 0 ; i < billCodeArr . length ; i ++ ) {
let billcode = billCodeArr [ i ] . trim ( ) ;
getEmisWaybillByBillCode ( billcode ) . then ( res => {
let item = res . data ;
let queryParams = {
billCode : billcode ,
params : {
startSiteCode : this . form . startSiteCode ,
nextSiteCode : this . form . nextSiteCode ,
supplierCode : this . form . supplierCode
}
}
getBatchDtl ( queryParams ) . then ( res => {
const billData = res . data ;
const originalParcelQty = billData . batchParcelQty !== null ? billData . batchParcelQty : billData . waybillDetail . parcelQty ;
const originalBillWeight = billData . batchWeight !== null ? billData . batchWeight : billData . waybillDetail . billWeight ;
const originalTotalVolume = billData . batchVolume !== null ? billData . batchVolume : billData . waybillDetail . totalVolume ;
let item = { ... billData . waybillDetail , "batchParcelQty" : billData . batchParcelQty , "batchWeight" : billData . batchWeight , "batchVolume" : billData . batchVolume , "originalParcelQty" : originalParcelQty , "originalBillWeight" : originalBillWeight , "originalTotalVolume" : originalTotalVolume } ; / / 新 增 字 段 存 剩 余 件 数
this . waitBatchDtlList . push ( item ) ;
this . computeTotal ( ) ;
} ) ;
} )
}
this . titleBatch = "" ;
this . openBatch = false ;
@ -956,9 +1012,9 @@ export default {
let totalVolume = 0 ;
let totalSettlementWeight = 0 ;
this . waitBatchDtlList . forEach ( item => {
totalParcelQty += item . parcelQty ;
totalWeight += item . billWeight ;
totalVolume += item . totalVolume ;
totalParcelQty += ( item . batchParcelQty !== null ? item . batchParcelQty : item . parcelQty ) ;
totalWeight += ( item . batchWeight !== null ? item . batchWeight : item . billWeight ) ;
totalVolume += ( item . batchVolume !== null ? item . batchVolume : item . totalVolume ) ;
totalSettlementWeight += item . settlementWeight ;
item . destCountry = this . form . destCountry ;
/ / i t e m . s e n d S i t e C o d e = t h i s . f o r m . s e n d S i t e C o d e ;
@ -982,6 +1038,18 @@ export default {
this . getList ( ) ;
} ,
handleAddWayBill ( ) {
if ( this . form . startSiteCode == null || this . form . startSiteCode == '' ) {
this . $modal . msgError ( "请选择起始网点" ) ;
return ;
}
if ( this . form . nextSiteCode == null || this . form . nextSiteCode == '' ) {
this . $modal . msgError ( "请选择下一网点" ) ;
return ;
}
if ( this . form . supplierCode == null || this . form . supplierCode == '' ) {
this . $modal . msgError ( "请选择供应商" ) ;
return ;
}
this . openBatch = true ;
this . titleBatch = "批量输入运单号" ;
} ,