组批次分组
This commit is contained in:
parent
581ea9d636
commit
a9b5e45712
@ -121,6 +121,15 @@ export function getEmisWaybillByBillCode(billCode) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getBatchDtl(query) {
|
||||
return request({
|
||||
url: '/emis/emisTmsSiteBatchDtl/getBatchDtl',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询运单列表详细
|
||||
export function getEmisWaybill(id) {
|
||||
return request({
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
<dict-tag :options="dict.type.emis_cost_split_type" :value="scope.row.splitType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('分摊重量')" align="center" prop="splitValue" min-width="100" />
|
||||
<el-table-column :label="$t('分摊重量')" align="center" prop="billWeight" min-width="100" />
|
||||
<el-table-column :label="$t('供应商')" align="left" prop="supplierName" min-width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('发件地')" align="center" prop="sendPlace" min-width="100" />
|
||||
<el-table-column :label="$t('目的地')" align="center" prop="destPlace" min-width="100" />
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
<BigBatchListPanel ref="refBatchList" @onCreate="onCreateBatch" @onUpdate="onUpdateBatch" @onCopy="onCopyBatch" @onView="onViewBatch"> </BigBatchListPanel>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="editTabTitle" name="batchEdit" v-if="openEditForm" closable="" >
|
||||
<BigBatchEditForm :key="'batchEdit_'+batchId" :batchId="batchId" :isCopy="isCopy" @on-changed="handleFormChanged" @on-cancel="cancelForm"></BigBatchEditForm>
|
||||
<BigBatchEditForm :key="'batchEdit_'+batchId" name="batchEdit" :batchId="batchId" :isCopy="isCopy" @on-changed="handleFormChanged" @on-cancel="cancelForm"></BigBatchEditForm>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="批次查看" name="batchView" v-if="openViewForm" closable >
|
||||
<BigBatchEditForm :key="'batchView_'+batchId" :batchId="batchId" disabled ></BigBatchEditForm>
|
||||
<BigBatchEditForm :key="'batchView_'+batchId" name="batchView" :batchId="batchId" disabled ></BigBatchEditForm>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="日志记录" name="batchLog" v-if="openViewForm">
|
||||
<BatchLogList :key="'batchLog_'+batchId" :batchNo="batchNo" disabled ></BatchLogList>
|
||||
|
||||
@ -578,6 +578,9 @@ export default {
|
||||
let packDetail = {
|
||||
batchNo: postForm.batchNo,
|
||||
billCode: billcode,
|
||||
batchParcelQty: itemBill.parcelQty,
|
||||
batchWeight: itemBill.billWeight,
|
||||
batchVolume: itemBill.totalVolume,
|
||||
groupStatus: "1",//已组批次
|
||||
};
|
||||
|
||||
|
||||
@ -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"
|
||||
>加入运单</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddWayBill">加入运单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="!disabled">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleCoPackListDelete"
|
||||
:disabled="multiple"
|
||||
>移除运单</el-button>
|
||||
<el-button type="primary" plain size="mini" @click="handleCoPackListDelete"
|
||||
:disabled="multiple">移除运单</el-button>
|
||||
</el-col>
|
||||
<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"
|
||||
>导出</el-button>
|
||||
<el-button style="margin-right: 5px;" type="warning" plain icon="el-icon-download" size="mini"
|
||||
@click="handleDownBatchDtl">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</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>
|
||||
</el-table-column>
|
||||
<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"></el-input-number>
|
||||
|
||||
<!--新增、编辑且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"></el-input-number>
|
||||
|
||||
<!-- 查看 -->
|
||||
<span v-if="name == 'batchView'">{{ scope.row.batchParcelQty
|
||||
? scope.row.batchParcelQty : scope.row.parcelQty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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"></el-input-number>
|
||||
|
||||
<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"></el-input-number>
|
||||
|
||||
<span v-if="name == 'batchView'">{{ scope.row.batchWeight ? scope.row.batchWeight : scope.row.billWeight }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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"></el-input-number>
|
||||
|
||||
|
||||
<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"></el-input-number>
|
||||
|
||||
<!-- 查看 -->
|
||||
<span v-if="name == 'batchView'">{{ scope.row.batchVolume
|
||||
? scope.row.batchVolume : scope.row.totalVolume }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
</el-table-column>
|
||||
</XdTable>
|
||||
</el-table>
|
||||
|
||||
<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};
|
||||
// return item.waybillDetail
|
||||
});
|
||||
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){ // 编辑
|
||||
// packDetail.id = item.id;
|
||||
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;
|
||||
// item.sendSiteCode = this.form.sendSiteCode;
|
||||
@ -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 = "批量输入运单号";
|
||||
},
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
|
||||
<el-form-item label="漏组次数" prop="missCount">
|
||||
<el-select clearable v-model="queryParams.missCount" placeholder="请选择">
|
||||
<el-option label="运单分批后未组完" :value="-6"></el-option>
|
||||
<el-option label="其他" :value="-5"></el-option>
|
||||
<el-option label="组批次完成" :value="-4"></el-option>
|
||||
<el-option label="从未组批次" :value="-1"></el-option>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user