合包管理,进度:80%
This commit is contained in:
parent
6903713973
commit
e49b30d1c8
@ -43,7 +43,7 @@ export function delEmisTmsPack(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除TMS合包
|
|
||||||
export function getPackNo(id) {
|
export function getPackNo(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/emis/common/getPackNo',
|
url: '/emis/common/getPackNo',
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- <SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery"> -->
|
<!-- <SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery"> -->
|
||||||
<el-form ref="form" size="mini" :model="queryParams" label-width="70px">
|
<el-form ref="form" size="mini" :model="queryParams" label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="" prop="queryType">
|
<el-form-item label="" prop="queryType">
|
||||||
@ -171,8 +171,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</XdTable>
|
</XdTable>
|
||||||
|
|
||||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" :destroy-on-close="true" @close="handleCancelCo" v-dialogDrag append-to-body>
|
||||||
<el-form ref="formCo" size="mini" :model="queryCoParams" label-width="100px">
|
<el-form ref="formCo" size="mini" :model="coData" label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -187,59 +187,77 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('国家')" prop="destCountry">
|
<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>
|
<CountryPicker :placeholder="$t('选择国家')" v-model="coData.destCountry" ></CountryPicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('生成网点')" prop="sendStiteCode">
|
<el-form-item :label="$t('生成网点')" prop="sendStiteCode">
|
||||||
|
<span slot="label">
|
||||||
|
<span style="color: red">{{ $t('生成网点') }}</span>
|
||||||
|
</span>
|
||||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.sendStiteCode" ></EmisSiteSimplePicker>
|
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.sendStiteCode" ></EmisSiteSimplePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('下一网点')" prop="nextSiteCode">
|
<el-form-item :label="$t('下一网点')" prop="nextSiteCode">
|
||||||
|
<span slot="label">
|
||||||
|
<span style="color: red">{{ $t('下一网点') }}</span>
|
||||||
|
</span>
|
||||||
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.nextSiteCode" ></EmisSiteSimplePicker>
|
<EmisSiteSimplePicker :placeholder="$t('请选择')" v-model="coData.nextSiteCode" ></EmisSiteSimplePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('是否可拆')" prop="blUnpack">
|
<el-form-item :label="$t('是否可拆')" prop="blUnpack">
|
||||||
<el-radio-group class="query-label" v-model="coData.blUnpack">
|
<span slot="label">
|
||||||
<el-radio label="1">是</el-radio>
|
<span style="color: red">{{ $t('是否可拆') }}</span>
|
||||||
<el-radio label="0">否</el-radio>
|
</span>
|
||||||
</el-radio-group>
|
<!-- <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-group> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item style="font-weight:600;">
|
||||||
<span slot="label">
|
<span>{{$t('总票数') + ': ' + (coData.totalWaybillQty || 0)}}</span>
|
||||||
<span style="font-weight:600">{{$t('总票数') + ':'}}</span>
|
|
||||||
<span style="font-weight:600">{{coData.total || 0}}</span>
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</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>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item style="font-weight:600;">
|
||||||
<span slot="label">
|
<span>{{$t('总件数') + ': ' + (coData.parcelQty || 0)}}</span>
|
||||||
<span style="font-weight:600">{{$t('总件数') + ':'}}</span>
|
|
||||||
<span style="font-weight:600">{{coData.total || 0}}</span>
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item>
|
||||||
|
<span slot="label">
|
||||||
|
<span style="font-weight:600">{{$t('总件数') + ': '}}</span>
|
||||||
|
<span style="font-weight:600">{{coData.parcelQty || 0}}</span>
|
||||||
|
</span>
|
||||||
|
</el-form-item> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item style="font-weight:600;">
|
||||||
<span slot="label">
|
<span>{{$t('总重量') + ': ' + (coData.totalWeight || 0)}}</span>
|
||||||
<span style="font-weight:600">{{$t('总重量') + ':'}}</span>
|
|
||||||
<span style="font-weight:600">{{coData.total || 0}}</span>
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</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>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item style="font-weight:600;">
|
||||||
<span slot="label">
|
<span>{{$t('总体积') + ': ' + (coData.totalVolume || 0)}}</span>
|
||||||
<span style="font-weight:600">{{$t('总体积') + ':'}}</span>
|
|
||||||
<span style="font-weight:600">{{coData.total || 0}}</span>
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -255,8 +273,9 @@
|
|||||||
:queryParams="queryParams"
|
:queryParams="queryParams"
|
||||||
:total="emisCoPackDetail.length"
|
:total="emisCoPackDetail.length"
|
||||||
@queryTable="handleQuery"
|
@queryTable="handleQuery"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleCoPackSelectionChange"
|
||||||
@sort-change="handleSortChange"
|
@sort-change="handleSortChange"
|
||||||
|
max-height="400px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div slot="toolbar">
|
<div slot="toolbar">
|
||||||
@ -266,7 +285,8 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleQuery"
|
@click="handleCoPackListDelete"
|
||||||
|
:disabled="coSingle"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -283,7 +303,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAddCoPack"
|
||||||
>确定</el-button>
|
>确定</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -291,42 +311,43 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleCancelCo"
|
||||||
>取消</el-button>
|
>取消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<el-table-column :label="$t('运单号')" align="center" prop="packNo" min-width="100" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column :label="$t('订单号')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="100" />
|
||||||
<el-table-column :label="$t('进仓单号')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('订单号')" align="center" prop="orderSn" min-width="100" />
|
||||||
|
<el-table-column :label="$t('进仓单号')" align="center" prop="intoWarehouseCode" min-width="100" />
|
||||||
<el-table-column :label="$t('扫描状态')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('扫描状态')" align="center" prop="packStatus" min-width="100" />
|
||||||
<el-table-column :label="$t('扫描时间')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('扫描时间')" align="center" prop="packStatus" min-width="100" />
|
||||||
<el-table-column :label="$t('状态')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('状态')" align="center" prop="waybillStatus" min-width="100" />
|
||||||
<el-table-column :label="$t('当前网点')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('当前网点')" align="center" prop="currentSiteCode" min-width="100" />
|
||||||
<el-table-column :label="$t('下一网点')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('下一网点')" align="center" prop="nextSiteCode" min-width="100" />
|
||||||
<el-table-column :label="$t('国家')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('国家')" align="center" prop="destinationCounty" min-width="100" />
|
||||||
<el-table-column :label="$t('线路')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('线路')" align="center" prop="transLineType" min-width="100" />
|
||||||
<el-table-column :label="$t('产品类型')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('产品类型')" align="center" prop="productType" min-width="100" />
|
||||||
<el-table-column :label="$t('预计到达时间')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="100" />
|
||||||
<el-table-column :label="$t('件数')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('件数')" align="center" prop="parcelQty" min-width="100" />
|
||||||
<el-table-column :label="$t('实际重量')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('实际重量')" align="center" prop="billWeight" min-width="100" />
|
||||||
<el-table-column :label="$t('体积')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('体积')" align="center" prop="totalVolume" min-width="100" />
|
||||||
<el-table-column :label="$t('体积重量')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('体积重量')" align="center" prop="volumeWeight" min-width="100" />
|
||||||
<el-table-column :label="$t('结算重量')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('结算重量')" align="center" prop="settlementWeight" min-width="100" />
|
||||||
<el-table-column :label="$t('收件人')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('收件人')" align="center" prop="receiveName" min-width="100" />
|
||||||
<el-table-column :label="$t('收件公司')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="100" />
|
||||||
<el-table-column :label="$t('取件员')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('取件员')" align="center" prop="takePieceEmployeeCode" min-width="100" />
|
||||||
<el-table-column :label="$t('取件方式')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" min-width="100" />
|
||||||
<el-table-column :label="$t('付款方式')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('付款方式')" align="center" prop="paymentType" min-width="100" />
|
||||||
<el-table-column :label="$t('运费')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="100" />
|
||||||
<el-table-column :label="$t('寄件人')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="100" />
|
||||||
<el-table-column :label="$t('寄件公司')" align="center" prop="packStatus" min-width="100" />
|
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="100" />
|
||||||
</XdTable>
|
</XdTable>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog :title="titleWayBill" :visible.sync="openWayBillForm" width="70%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
<el-dialog :title="titleWayBill" :visible.sync="openWayBillForm" width="70%" @close="handleCloseWayBill" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
<el-form ref="formCo" size="mini" :model="queryCoParams" label-width="100px">
|
<el-form ref="formCo" size="mini" :model="wayBillData" label-width="100px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="" prop="billCode">
|
<el-form-item label="" prop="billCode">
|
||||||
@ -382,7 +403,11 @@
|
|||||||
:showSearch.sync="showSearch"
|
:showSearch.sync="showSearch"
|
||||||
:queryParams="queryParams"
|
:queryParams="queryParams"
|
||||||
:total="wayBillotal"
|
:total="wayBillotal"
|
||||||
|
:pageSizes="20"
|
||||||
|
:page="1"
|
||||||
|
@queryTable="handleQueryWayBill"
|
||||||
@sort-change="handleSortChange"
|
@sort-change="handleSortChange"
|
||||||
|
@selection-change="handleWayBillSelectionChange"
|
||||||
max-height="300px"
|
max-height="300px"
|
||||||
>
|
>
|
||||||
|
|
||||||
@ -402,7 +427,8 @@
|
|||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleCoAdd"
|
||||||
|
:disabled="addWayBillDisabled"
|
||||||
>追加</el-button>
|
>追加</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -440,7 +466,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listEmisTmsPack, getPackNo, getEmisTmsPack, delEmisTmsPack, addEmisTmsPack, updateEmisTmsPack } from "@/api/emis/emisTmsPack";
|
import { listEmisTmsPack, getPackNo, getEmisTmsPack, delEmisTmsPack, addEmisTmsPack, updateEmisTmsPack } from "@/api/emis/emisTmsPack";
|
||||||
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
import { listEmisWaybill, getWaybillDetail } from "@/api/emis/emisWaybill";
|
||||||
|
import { listEmisTmsPackDtl, delEmisTmsPackDtl, addEmisTmsPackDtl } from "@/api/emis/emisTmsPackDtl";
|
||||||
// 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';
|
||||||
@ -466,6 +493,12 @@ export default {
|
|||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
|
|
||||||
|
coSingle: true,
|
||||||
|
coMultiple: true,
|
||||||
|
|
||||||
|
addWayBillDisabled: true,
|
||||||
|
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 创建时间搜索
|
// 创建时间搜索
|
||||||
@ -476,10 +509,12 @@ export default {
|
|||||||
emisTmsPackList: [],
|
emisTmsPackList: [],
|
||||||
|
|
||||||
// 新增/修改弹窗数据
|
// 新增/修改弹窗数据
|
||||||
coData: {},
|
coData: {
|
||||||
|
blUnpack:"1"
|
||||||
|
},
|
||||||
// 新增/修改包详情数据
|
// 新增/修改包详情数据
|
||||||
emisCoPackDetail:[],
|
emisCoPackDetail:[],
|
||||||
|
blUnpack:"1",
|
||||||
// 追加的运单查询数据
|
// 追加的运单查询数据
|
||||||
wayBillData: {
|
wayBillData: {
|
||||||
params:{}
|
params:{}
|
||||||
@ -495,6 +530,9 @@ export default {
|
|||||||
titleWayBill:null,
|
titleWayBill:null,
|
||||||
openWayBillForm:false,
|
openWayBillForm:false,
|
||||||
|
|
||||||
|
tempCoPackList:[],
|
||||||
|
coSelection:[],
|
||||||
|
|
||||||
// 弹出展示层
|
// 弹出展示层
|
||||||
id:null,
|
id:null,
|
||||||
titleView:"",
|
titleView:"",
|
||||||
@ -580,6 +618,108 @@ export default {
|
|||||||
console.log("date picker---->", value)
|
console.log("date picker---->", value)
|
||||||
this.wayBillData.dateTimeRange=value;
|
this.wayBillData.dateTimeRange=value;
|
||||||
},
|
},
|
||||||
|
handleAddCoPack(){
|
||||||
|
if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
|
||||||
|
this.$modal.msgError("请先选择必填项")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(this.emisCoPackDetail.length == 0){
|
||||||
|
this.$modal.msgError("请先选择至少一条运单信息")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let coPackItem={
|
||||||
|
packNo: this.coData.packNo,
|
||||||
|
packName: this.coData.packName || '',
|
||||||
|
packDate: this.coData.createTime,
|
||||||
|
destCountry: this.coData.destCountry,
|
||||||
|
// destCountryName: this.coData.,
|
||||||
|
blUnpack: this.coData.blUnpack,
|
||||||
|
sendStiteCode: this.coData.sendStiteCode,
|
||||||
|
totalParcelQty: this.coData.totalParcelQty,
|
||||||
|
totalWaybillQty: this.coData.totalWaybillQty,
|
||||||
|
totalVolume: this.coData.totalVolume,
|
||||||
|
totalWeight: this.coData.totalWeight,
|
||||||
|
// packStatus: this.coData.,
|
||||||
|
opMan: this.$store.getters.empCode
|
||||||
|
}
|
||||||
|
addEmisTmsPack(coPackItem).then(response => {
|
||||||
|
if(!response || response.code != 200){
|
||||||
|
this.$modal.msgError(response && response.msg || '新增合包失败')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
for(let i = 0; i< this.emisCoPackDetail.length;i++){
|
||||||
|
let packDetail = {
|
||||||
|
packNo:this.coData.packNo,
|
||||||
|
billCode: this.emisCoPackDetail[i].billCode,
|
||||||
|
scanDate: this.emisCoPackDetail[i].scanDate,
|
||||||
|
scanStatus: this.emisCoPackDetail[i].scanStatus,
|
||||||
|
packStatus: null,
|
||||||
|
scanMan: this.emisCoPackDetail[i].scanMan,
|
||||||
|
createBy: this.$store.getters.empCode,
|
||||||
|
createTime: parseTime(new Date())
|
||||||
|
};
|
||||||
|
addEmisTmsPackDtl(packDetail).then(response => {
|
||||||
|
if(!response || response.code != 200){
|
||||||
|
this.$modal.msgError(response && response.msg || '合包明细新增失败')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.openForm= false;
|
||||||
|
this.titleForm = "";
|
||||||
|
|
||||||
|
this.$modal.msgSuccess('操作成功!');
|
||||||
|
},
|
||||||
|
handleCancelCo(){
|
||||||
|
this.titleForm='';
|
||||||
|
this.openForm=false;
|
||||||
|
this.coData={};
|
||||||
|
this.blUnpack="1";
|
||||||
|
this.emisCoPackDetail=[];
|
||||||
|
},
|
||||||
|
handleWayBillSelectionChange(selection){
|
||||||
|
this.tempCoPackList = selection;
|
||||||
|
this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true;
|
||||||
|
},
|
||||||
|
handleCoAdd(){
|
||||||
|
this.tempCoPackList.forEach(item => {
|
||||||
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){
|
||||||
|
this.emisCoPackDetail.push(item);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.titleWayBill="";
|
||||||
|
this.openWayBillForm=false;
|
||||||
|
this.wayBillData = {
|
||||||
|
params:{}
|
||||||
|
};
|
||||||
|
this.emisWayBillList=[];
|
||||||
|
this.tempCoPackList=[];
|
||||||
|
this.addWayBillDisabled = true;
|
||||||
|
this.wayBillotal=0;
|
||||||
|
this.computeTotal();
|
||||||
|
},
|
||||||
|
handleCloseWayBill(){
|
||||||
|
this.titleWayBill="";
|
||||||
|
this.openWayBillForm=false;
|
||||||
|
this.wayBillData = {
|
||||||
|
params:{}
|
||||||
|
};
|
||||||
|
this.emisWayBillList=[];
|
||||||
|
this.tempCoPackList=[];
|
||||||
|
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();
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
@ -596,6 +736,30 @@ export default {
|
|||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
handleCoPackSelectionChange(selection){
|
||||||
|
// this.coSelection = selection.map(item => item.id)
|
||||||
|
this.coSelection = selection;
|
||||||
|
this.coSingle = selection.length!==1
|
||||||
|
this.coMultiple = !selection.length
|
||||||
|
},
|
||||||
|
computeTotal(){
|
||||||
|
let parcelQty=0;
|
||||||
|
let totalWeight=0;
|
||||||
|
let totalVolume=0;
|
||||||
|
this.emisCoPackDetail.forEach(item =>{
|
||||||
|
parcelQty +=item.parcelQty;
|
||||||
|
totalWeight +=item.totalWeight;
|
||||||
|
totalVolume +=item.totalVolume;
|
||||||
|
item.destCountry = this.coData.destCountry;
|
||||||
|
item.sendStiteCode = this.coData.sendStiteCode;
|
||||||
|
item.nextSiteCode = this.coData.nextSiteCode;
|
||||||
|
item.blUnpack = this.blUnpack;
|
||||||
|
})
|
||||||
|
this.coData.totalWaybillQty=this.emisCoPackDetail.length;
|
||||||
|
this.coData.parcelQty=parcelQty;
|
||||||
|
this.coData.totalWeight=totalWeight;
|
||||||
|
this.coData.totalVolume=totalVolume;
|
||||||
|
},
|
||||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
handleSortChange(column) {
|
handleSortChange(column) {
|
||||||
this.queryParams.orderByColumn = column.prop;
|
this.queryParams.orderByColumn = column.prop;
|
||||||
@ -617,15 +781,13 @@ export default {
|
|||||||
this.coData.sendStiteCode = null;
|
this.coData.sendStiteCode = null;
|
||||||
this.coData.nextSiteCode = null;
|
this.coData.nextSiteCode = null;
|
||||||
this.coData.nextStation = null;
|
this.coData.nextStation = null;
|
||||||
this.coData.blUnpack = null;
|
this.blUnpack = "1";
|
||||||
|
|
||||||
|
|
||||||
this.currentId=null;
|
this.currentId=null;
|
||||||
this.openForm= true;
|
this.openForm= true;
|
||||||
this.titleForm = "新增合包";
|
this.titleForm = "新增合包";
|
||||||
},
|
},
|
||||||
handleAddWayBill(){
|
handleAddWayBill(){
|
||||||
// this.currentId=null;
|
|
||||||
this.openWayBillForm= true;
|
this.openWayBillForm= true;
|
||||||
this.titleWayBill = "运单列表";
|
this.titleWayBill = "运单列表";
|
||||||
},
|
},
|
||||||
@ -633,10 +795,42 @@ export default {
|
|||||||
this.moreInputVisible = !this.moreInputVisible;
|
this.moreInputVisible = !this.moreInputVisible;
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
async handleUpdate(row) {
|
||||||
this.currentId= row.id;
|
let response = await getEmisTmsPack(row.id);
|
||||||
this.openForm = true;
|
if(!response || response.code != 200){
|
||||||
this.titleForm = "修改";
|
this.$message.error(response && response.msg || "未知错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
debugger;
|
||||||
|
let resData = response.data;
|
||||||
|
this.coData.packNo = resData.packNo;
|
||||||
|
this.coData.createTime = resData.createTime;
|
||||||
|
this.coData.destCountry = resData.destCountry;
|
||||||
|
// this.coData.destCountryName = null;
|
||||||
|
this.coData.sendStiteCode = resData.sendStiteCode;
|
||||||
|
this.coData.nextSiteCode = resData.nextSiteCode;
|
||||||
|
// this.coData.nextStation = null;
|
||||||
|
this.blUnpack = resData.blUnpack;
|
||||||
|
|
||||||
|
this.emisCoPackDetail=[];
|
||||||
|
let resList = await listEmisTmsPackDtl({packNo: resData.packNo});
|
||||||
|
if(!resList || resList.code != 200){
|
||||||
|
this.$message.error(resList && resList.msg || "未知错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
debugger;
|
||||||
|
for(let p = 0; p < resList.rows.length;p++){
|
||||||
|
let resd = await getWaybillDetail(resList.rows[p].billCode);
|
||||||
|
if(!resd || resd.code != 200){
|
||||||
|
this.$message.error(resd && resd.msg || "未知错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.emisCoPackDetail.push(resd.data);
|
||||||
|
}
|
||||||
|
this.computeTotal();
|
||||||
|
this.currentId=null;
|
||||||
|
this.openForm= true;
|
||||||
|
this.titleForm = "修改合包";
|
||||||
},
|
},
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.id=row.id;
|
this.id=row.id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user