emis-frontend/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue

1764 lines
76 KiB
Vue
Raw Normal View History

2024-06-06 17:04:22 +00:00
<template>
<XdPageContainer class="app-container">
<!-- <SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery"> -->
<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="billCode">
<div slot="label">
<el-radio-group class="query-label" v-model="queryParams.params.queryOrderType">
<el-radio label="1">运单号</el-radio>
<el-radio label="0">订单号</el-radio>
</el-radio-group>
</div>
<XdTextareaInput
v-model="queryParams.billCode"
:placeholder="$t('多个流水号逗号或换行隔开')"
clearable
:rows="2"
/>
</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 :span="8">
2024-06-11 13:15:24 +00:00
<el-form-item label="目的国" prop="receiveCountry">
<CountryPicker :placeholder="$t('目的国')" v-model="queryParams.receiveCountry" ></CountryPicker>
2024-06-06 17:04:22 +00:00
</el-form-item>
</el-col>
<el-col :span="8">
2024-06-09 13:18:18 +00:00
<el-form-item label="寄件国" prop="sendCountry">
2024-06-06 17:04:22 +00:00
<CountryPicker :placeholder="$t('寄件国')" v-model="queryParams.sendCountry" ></CountryPicker>
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<!-- <el-col :span="8"> 经确认:这张表不用付款方式,列表中去除
2024-06-06 17:04:22 +00:00
<el-form-item label="付款方式" prop="paymentType" >
<el-select clearable v-model="queryParams.paymentType" placeholder="请选择">
<el-option
v-for="dict in dict.type.emis_payment_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
2024-06-09 13:18:18 +00:00
</el-col> -->
2024-06-06 17:04:22 +00:00
<el-col :span="8">
<!-- <el-form-item label="签收时间" prop="dateTimeRange">
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
</el-form-item> -->
<el-form-item label="" prop="dateTimeRange">
<div slot="label">
<el-radio-group class="query-label" v-model="queryParams.params.queryOrderDateType">
<el-radio label="1">下单时间</el-radio>
<el-radio label="0">录单时间</el-radio>
</el-radio-group>
</div>
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
</el-form-item>
</el-col>
</el-row>
<!-- </SearchForm> -->
</el-form>
<div slot="pageContent"
slot-scope="slotProps"
:style="'height:'+(slotProps.contentHeight)+'px'"
>
<div>
<el-button style="margin-right: 5px;"
type="primary"
plain
size="mini"
v-hasPermi="['emis:emisTmsSiteBatchLoading:query']"
@click="getQuery"
>查询</el-button>
<el-button style="margin-right: 5px;"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['emis:emisTmsSiteBatchLoading:add']"
>去组批次</el-button>
<!-- <el-button style="margin-right: 5px;"
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['emis:emisTmsSiteBatchLoading:add']"
>新增组批次</el-button> -->
<el-button style="margin-right: 5px;"
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDeleteCoPack"
v-hasPermi="['emis:emisTmsSiteBatchLoading:remove']"
>删除</el-button>
<el-button style="margin-right: 5px;"
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleAdd"
v-hasPermi="['emis:emisTmsSiteBatchLoading:export']"
>打印组批次</el-button>
</div>
<el-tabs v-model="activeName" style="margin-top: 10px;" @tab-click="getQuery">
<el-tab-pane label="待组批次" name="first">
<XdTable v-loading="loadingWait"
:height="(slotProps.contentHeight-200)+'px'"
border stripe
size="small"
:data="emisTmsWaitPackList"
:showSearch.sync="showSearch"
:queryParams="queryWaitParams"
:total="waitTotal"
:showRightButton="false"
@queryTable="handleQueryWait"
@selection-change="handleWaitSelectionChange"
@sort-change="handleSortChange"
>
<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="orderSn" min-width="170" />
<el-table-column :label="$t('进仓单号')" align="center" prop="intoWarehouseCode" min-width="100" />
<el-table-column :label="$t('运单状态')" align="center" prop="waybillStatus" min-width="100" />
2024-06-09 13:18:18 +00:00
<!-- <el-table-column :label="$t('物流信息')" align="center" prop="xxx" min-width="100" /> -->
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('当前网点')" align="center" prop="currentSiteName" min-width="100" />
<el-table-column :label="$t('下一网点')" align="center" prop="nextSiteName" min-width="100" />
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('寄件国家')" align="center" prop="sendCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-07 06:57:14 +00:00
<span class="ellipsis">{{ scope.row.sendCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
2024-06-11 13:15:24 +00:00
<el-table-column :label="$t('目的国家')" align="center" prop="receiveCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span class="ellipsis">{{ scope.row.receiveCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100" />
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="170">
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span>{{ parseTime(scope.row.estimateDate || '', '{y}-{m}-{d}') }}</span>
2024-06-06 17:04:22 +00:00
</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="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" />
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.receiveCompany }}</span>
</template>
</el-table-column>
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('取件员')" align="center" prop="takePieceEmployeeName" min-width="150" />
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
</template>
</el-table-column>
<el-table-column :label="$t('付款方式')" align="center" prop="paymentType" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
</template>
</el-table-column>
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="100" />
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="150" />
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sendCompany }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.remark }}</span>
</template>
</el-table-column>
</XdTable>
</el-tab-pane>
<el-tab-pane label="已组批次" name="second">
<XdTable v-loading="loadingDone"
:height="(slotProps.contentHeight-200)+'px'"
border stripe
size="small"
:data="emisTmsDonePackList"
:showSearch.sync="showSearch"
:queryParams="queryDoneParams"
:total="doneTotal"
:showRightButton="false"
@queryTable="handleQueryDone"
@selection-change="handleDoneSelectionChange"
@sort-change="handleSortChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('组批次号')" align="center" prop="packNo" min-width="170" />
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
<el-table-column :label="$t('订单号')" align="center" prop="orderSn" min-width="170" />
<el-table-column :label="$t('进仓单号')" align="center" prop="intoWarehouseCode" min-width="100" />
<el-table-column :label="$t('运单状态')" align="center" prop="waybillStatus" min-width="100" />
2024-06-09 13:18:18 +00:00
<!-- <el-table-column :label="$t('物流信息')" align="center" prop="xxx" min-width="100" /> -->
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('当前网点')" align="center" prop="currentSiteName" min-width="100" />
<el-table-column :label="$t('下一网点')" align="center" prop="nextSiteName" min-width="100" />
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('寄件国家')" align="center" prop="sendCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-07 06:57:14 +00:00
<span class="ellipsis">{{ scope.row.sendCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
2024-06-11 13:15:24 +00:00
<el-table-column :label="$t('目的国家')" align="center" prop="receiveCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span class="ellipsis">{{ scope.row.receiveCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100" />
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="170">
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span>{{ parseTime(scope.row.estimateDate || "", '{y}-{m}-{d}') }}</span>
2024-06-06 17:04:22 +00:00
</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="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" />
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.receiveCompany }}</span>
</template>
</el-table-column>
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('取件员')" align="center" prop="takePieceEmployeeName" min-width="150" />
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
</template>
</el-table-column>
<el-table-column :label="$t('付款方式')" align="center" prop="paymentType" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
</template>
</el-table-column>
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="100" />
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="150" />
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sendCompany }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.remark }}</span>
</template>
</el-table-column>
</XdTable>
</el-tab-pane>
<el-tab-pane label="批次列表" name="third">
<XdTable v-loading="loading"
:height="(slotProps.contentHeight-200)+'px'"
border stripe
size="small"
:data="emisTmsPackList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
:showRightButton="false"
@queryTable="handleQuery"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
>
<el-table-column type="selection" width="55" align="center" />
<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="airBilllNo" min-width="170" />
2024-06-09 13:18:18 +00:00
<el-table-column :label="$t('异常信息')" align="center" prop="remark" min-width="170">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-09 13:18:18 +00:00
<span class="ellipsis">{{ scope.row.remark }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
2024-06-12 07:43:36 +00:00
<el-table-column :label="$t('发件国家')" align="center" prop="sendCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-12 07:43:36 +00:00
<span class="ellipsis">{{ scope.row.sendCountryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('目的国家')" align="center" prop="destCountryName" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.destCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100" />
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
<el-table-column :label="$t('总票数')" align="center" prop="totalWaybillQty" min-width="100" />
<el-table-column :label="$t('总件数')" align="center" prop="totalParcelQty" min-width="100" />
<el-table-column :label="$t('总重量(kg)')" align="center" prop="totalWeight" min-width="100" />
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" min-width="170">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
2024-06-09 13:18:18 +00:00
<el-table-column :label="$t('操作员')" align="center" prop="createByName" min-width="150" />
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['emis:emisTmsSiteBatchLoading:query']"
>查看</el-button>
</template>
</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-row :gutter="20">
<el-col :span="16">
<el-col :span="12">
<el-form-item :label="$t('批次号')" prop="batchNo">
<el-input v-model="coData.batchNo" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('批次名称')" prop="batchName">
<el-input v-model="coData.batchName" />
</el-form-item>
</el-col>
<el-col :span="8">
2024-06-12 07:43:36 +00:00
<el-form-item :label="$t('目的国家')" prop="destCountry">
<CountryPicker :placeholder="$t('选择国家')" v-model="coData.destCountry" ></CountryPicker>
2024-06-06 17:04:22 +00:00
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('起始网点')" prop="startSiteCode">
<span slot="label">
<span style="color: red">{{ $t('起始网点') }}</span>
</span>
2024-06-09 13:18:18 +00:00
<!-- <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 /> -->
<EmisSiteSimplePicker :placeholder="$t('请选择')" @change="onSiteSelect" v-model="coData.startSiteCode" :disabled="$store.getters.ownerSiteCode != '88888'" ></EmisSiteSimplePicker>
2024-06-06 17:04:22 +00:00
</el-form-item>
</el-col>
<el-col :span="8">
<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>
</el-form-item>
</el-col>
2024-06-12 07:43:36 +00:00
<el-col :span="8">
<el-form-item label="运输方式" prop="transType">
<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"
/>
</el-select>
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<el-col :span="8" v-if="coData.transType == 2">
2024-06-06 17:04:22 +00:00
<el-form-item :label="$t('航空单号')" prop="airBilllNo">
<el-input v-model="coData.airBilllNo" />
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<el-col :span="8" v-if="coData.transType == 2">
2024-06-06 17:04:22 +00:00
<el-form-item label="起飞时间" prop="airTime">
<el-date-picker clearable
v-model="coData.airTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择起飞时间">
</el-date-picker>
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<el-col :span="8" v-if="coData.transType == 4">
<el-form-item :label="$t('船次号')" prop="shipNo">
<el-input v-model="coData.shipNo" />
2024-06-06 17:04:22 +00:00
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<el-col :span="8" v-if="coData.transType == 4">
<el-form-item label="开船时间" prop="shipTime">
2024-06-06 17:04:22 +00:00
<el-date-picker clearable
2024-06-09 13:18:18 +00:00
v-model="coData.shipTime"
2024-06-06 17:04:22 +00:00
type="date"
value-format="yyyy-MM-dd"
2024-06-09 13:18:18 +00:00
placeholder="请选择开船时间">
2024-06-06 17:04:22 +00:00
</el-date-picker>
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<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" />
2024-06-06 17:04:22 +00:00
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<el-col :span="8" v-if="['1','3','5'].indexOf(coData.transType) > -1">
<el-form-item label="发车时间" prop="carTime">
2024-06-06 17:04:22 +00:00
<el-date-picker clearable
2024-06-09 13:18:18 +00:00
v-model="coData.carTime"
2024-06-06 17:04:22 +00:00
type="date"
value-format="yyyy-MM-dd"
2024-06-09 13:18:18 +00:00
placeholder="请选择发车时间">
2024-06-06 17:04:22 +00:00
</el-date-picker>
</el-form-item>
</el-col>
2024-06-09 13:18:18 +00:00
<!-- <el-col :span="8">
2024-06-06 17:04:22 +00:00
<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>
2024-06-09 13:18:18 +00:00
</el-col> -->
2024-06-06 17:04:22 +00:00
</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;">
<span>{{$t('总体积') + ': ' + (coData.totalVolume || 0)}}</span>
</el-form-item>
</el-col>
</el-col>
2024-06-11 13:15:24 +00:00
<el-col :span="24">
<el-table :data="tableData" border style="width: 100%">
<!-- 表头1 -->
<el-table-column label="柜头" colspan="2">
<template slot-scope="scope">
<el-row>
<el-col :span="12">
<el-input v-model="scope.row[1]"></el-input>
</el-col>
<el-col :span="12">
<el-input v-model="scope.row[2]"></el-input>
</el-col>
</el-row>
</template>
</el-table-column>
<!-- 表头2 -->
<el-table-column label="中间" colspan="2">
<template slot-scope="scope">
<el-row>
<el-col :span="12">
<el-input v-model="scope.row[3]"></el-input>
</el-col>
<el-col :span="12">
<el-input v-model="scope.row[4]"></el-input>
</el-col>
</el-row>
</template>
</el-table-column>
<!-- 表头3 -->
<el-table-column label="柜尾" colspan="2">
<template slot-scope="scope">
<el-row>
<el-col :span="12">
<el-input v-model="scope.row[5]"></el-input>
</el-col>
<el-col :span="12">
<el-input v-model="scope.row[6]"></el-input>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
</el-col>
2024-06-06 17:04:22 +00:00
</el-row>
</el-form>
<XdTable v-loading="loading"
height="300px"
min-height="300px"
border stripe
size="small"
id="emisCoPackDetail"
:data="emisCoPackDetail"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:showRightButton="false"
@queryTable="donothing"
@selection-change="handleCoPackSelectionChange"
@sort-change="handleSortChange"
>
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleCoPackListDelete"
:disabled="coSingle"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAddWayBill"
>追加</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleAddCoPack"
>确定</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleCancelCo"
>取消</el-button>
</el-col>
</el-row>
</div>
<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="orderSn" min-width="170" />
<el-table-column :label="$t('进仓单号')" align="center" prop="warehouseInNo" min-width="100" />
<el-table-column :label="$t('运单状态')" align="center" prop="emis_pack_status" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_pack_status" :value="coData.packStatus"/>
</template>
</el-table-column>
2024-06-09 13:18:18 +00:00
<!-- <el-table-column :label="$t('物流信息')" align="center" prop="xxx" min-width="100" /> -->
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('当前网点')" align="center" prop="currentSiteName" min-width="100" />
<el-table-column :label="$t('下一网点')" align="center" prop="nextSiteName" min-width="100" />
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('寄件国家')" align="center" prop="sendCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-07 06:57:14 +00:00
<span class="ellipsis">{{ scope.row.sendCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
2024-06-11 13:15:24 +00:00
<el-table-column :label="$t('目的国家')" align="center" prop="receiveCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span class="ellipsis">{{ scope.row.receiveCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100" />
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="170">
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span>{{ parseTime(estimateDate || '') }}</span>
2024-06-06 17:04:22 +00:00
</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="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" />
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.receiveCompany }}</span>
</template>
</el-table-column>
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('取件员')" align="center" prop="takePieceEmployeeName" min-width="150" />
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
</template>
</el-table-column>
<el-table-column :label="$t('付款方式')" align="center" prop="paymentType" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
</template>
</el-table-column>
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="100" />
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="150" />
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sendCompany }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.remark }}</span>
</template>
</el-table-column>
</XdTable>
</el-dialog>
<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="wayBillData" label-width="100px" class="overflowhidden" >
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="" prop="billCode">
<div slot="label">
<el-radio-group class="query-label" v-model="wayBillData.params.queryOrderType">
<el-radio label="1">运单号</el-radio>
<el-radio label="0">订单号</el-radio>
</el-radio-group>
</div>
<!-- <el-input
v-model="wayBillData.billCode"
:placeholder="$t('多个流水号逗号或换行隔开')"
clearable
type="textarea"
rows="2"
/> -->
<XdTextareaInput
v-model="queryParams.billCode"
:placeholder="$t('多个流水号逗号或换行隔开')"
clearable
:rows="2"
/>
</el-form-item>
</el-col>
<el-col :span="8">
2024-06-12 07:43:36 +00:00
<el-form-item :label="$t('目的国家')" prop="receiveCountry">
2024-06-11 13:15:24 +00:00
<CountryPicker :placeholder="$t('选择国家')" v-model="wayBillData.receiveCountry" ></CountryPicker>
2024-06-06 17:04:22 +00:00
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="线路" prop="lineCode">
<TransLinePicker v-model="wayBillData.lineCode" :countryCode="wayBillData.destCountry"></TransLinePicker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品" prop="productType">
<TransProductPicker placeholder="全部" v-model="wayBillData.productType" :transLineCode="wayBillData.lineCode" ></TransProductPicker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" prop="billCode">
<div slot="label">
<el-radio-group class="query-label" v-model="wayBillData.params.dataTimeType">
<el-radio label="1">下单时间</el-radio>
<el-radio label="0">录单时间</el-radio>
</el-radio-group>
</div>
<elDateAdvPicker clearable v-model="wayBillData.dateTimeRange" @dateTimeChange="onWayBillDateSelect" ></elDateAdvPicker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<XdTable v-loading="loading2"
height="300px"
min-height="300px"
border stripe
size="small"
id="emisWayBillList"
:data="emisWayBillList"
:showSearch.sync="showSearch"
:queryParams="wayBillData"
:total="wayBillotal"
:showRightButton="false"
@queryTable="handleQueryWayBill"
@sort-change="handleSortChange"
@selection-change="handleWayBillSelectionChange"
max-height="300px"
>
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleQueryWayBill"
>查询</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleCoAdd"
:disabled="addWayBillDisabled"
>追加</el-button>
</el-col>
</el-row>
</div>
<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="orderSn" min-width="170" />
<el-table-column :label="$t('进仓单号')" align="center" prop="warehouseInNo" min-width="100" />
<el-table-column :label="$t('运单状态')" align="center" prop="emis_pack_status" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_pack_status" :value="coData.packStatus"/>
</template>
</el-table-column>
2024-06-09 13:18:18 +00:00
<!-- <el-table-column :label="$t('物流信息')" align="center" prop="xxx" min-width="100" /> -->
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('当前网点')" align="center" prop="currentSiteName" min-width="100" />
<el-table-column :label="$t('下一网点')" align="center" prop="nextSiteName" min-width="100" />
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('寄件国家')" align="center" prop="sendCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-07 06:57:14 +00:00
<span class="ellipsis">{{ scope.row.sendCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
2024-06-11 13:15:24 +00:00
<el-table-column :label="$t('目的国家')" align="center" prop="receiveCountryName" min-width="100">
2024-06-06 17:04:22 +00:00
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span class="ellipsis">{{ scope.row.receiveCountryName }}</span>
2024-06-06 17:04:22 +00:00
</template>
</el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="100" />
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
<el-table-column :label="$t('预计到达时间')" align="center" prop="estimateDate" min-width="170">
<template slot-scope="scope">
2024-06-11 13:15:24 +00:00
<span>{{ parseTime(estimateDate || "") }}</span>
2024-06-06 17:04:22 +00:00
</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="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" />
<el-table-column :label="$t('收件公司')" align="center" prop="receiveCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.receiveCompany }}</span>
</template>
</el-table-column>
2024-06-07 06:57:14 +00:00
<el-table-column :label="$t('取件员')" align="center" prop="takePieceEmployeeName" min-width="150" />
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_qujian_fangshi" :value="scope.row.pickupMethod"/>
</template>
</el-table-column>
<el-table-column :label="$t('付款方式')" align="center" prop="paymentType" min-width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.paymentType"/>
</template>
</el-table-column>
2024-06-06 17:04:22 +00:00
<el-table-column :label="$t('运费')" align="center" prop="freight" min-width="100" />
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="150" />
<el-table-column :label="$t('寄件公司')" align="center" prop="sendCompany" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sendCompany }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.remark }}</span>
</template>
</el-table-column>
</XdTable>
</el-dialog>
</XdPageContainer>
</template>
<script>
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
2024-06-11 13:15:24 +00:00
import { addEmisTmsSiteBatchLoading, listEmisTmsSiteBatchLoading, updateEmisTmsSiteBatchLoading } from "@/api/emis/emisTmsSiteBatchLoading";
2024-06-06 17:04:22 +00:00
import { listEmisWaybill } from "@/api/emis/emisWaybill";
// import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
import emisTmsPackForm from '@/views/emis/emisTmsPack/emisTmsPackForm';
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
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 { parseTime, dateToStr } from "@/utils/custom";
export default {
name: "CenterGenBatchMgnt",
components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker},
2024-06-07 06:57:14 +00:00
dicts: ['emis_pack_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi'],
2024-06-06 17:04:22 +00:00
data() {
return {
// 遮罩层
loading: false,
loading2: false,
loadingWait: false,
loadingDone: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
coSingle: true,
coMultiple: true,
addWayBillDisabled: true,
// packDisabled: true,
activeName:'third',
// 显示搜索条件
showSearch: true,
// 创建时间搜索
dateTimeRange:[],
// 总条数
total: 0,
// TMS组批次表格数据
emisTmsPackList: [],
// 待组批次列表
emisTmsWaitPackList:[],
waitTotal:0,
// 已组批次列表
emisTmsDonePackList:[],
doneTotal:0,
waitPackList:[],//选择未组包的运单先保存起来,在后续新增组批次的弹框中使用
// 新增/修改弹窗数据
coData: {
blUnpack:"1"
},
// 新增/修改包详情数据
emisCoPackDetail:[],
blUnpack:"1",
// 追加的运单查询数据
wayBillData: {
pageNum: 1,
pageSize: 20,
params:{}
},
// 追加的运单数据
emisWayBillList:[],
wayBillotal:0,
currentId:null,
openForm: false,
titleForm: "",
titleWayBill:null,
openWayBillForm:false,
tempCoPackList:[],
coSelection:[],
//区分当前是新增还是修改
coPackType:'',
// 临时存储已有组批次的运单号
tempExistCoPackWayBillList:[],
tempCoPackInfo:{},
// 弹出展示层
id:null,
titleView:"",
openView: false,
// 更新网点时间范围
daterangeCreateTime: [],
// 更新网点时间范围
daterangeUpdateTime: [],
2024-06-11 13:15:24 +00:00
tableData:[
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
],
tableDataId:[
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
],
2024-06-06 17:04:22 +00:00
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 20,
billCode:null,
orderSN:null,
batchNo:null,
// packNo: null,
// packName: null,
// packDate: null,
destCountry: null,
destCountryName: null,
// blUnpack: null,
// sendSiteCode: null,
// totalParcelQty: null,
// totalWaybillQty: null,
// totalVolume: null,
// totalWeight: null,
// packStatus: null,
// opMan: null,
// remark: null,
// delFlag: null,
params:{}
},
queryCoParams: {
params:{}
},
// 查询参数
queryWaitParams: {
pageNum: 1,
pageSize: 20,
packNo: null,
beginCreateTime: null,
endCreateTime: null,
params:{}
},
// 查询参数
queryDoneParams: {
pageNum: 1,
pageSize: 20,
packNo: null,
params:{}
},
};
},
created() {
},
mounted() {
const end = new Date()
const start = new Date()
start.setHours(0,0,0,0)
end.setHours(23,59,59,0)
this.dateTimeRange=[start,end];
this.activeName="third";
this.getQuery();
},
methods: {
getQuery(){
// this.packDisabled = true;
switch(this.activeName){
case 'first':
this.waitPackList=[];
this.handleQueryWait();
break;
case 'second':
this.waitPackList=[];
this.handleQueryDone();
break;
case 'third':
this.waitPackList=[];
this.getList();
break;
default:
break;
}
},
donothing(){
},
/** 查询TMS组批次列表 */
getList() {
this.loading = true;
// this.queryParams.params = {};
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]));
}
2024-06-12 07:43:36 +00:00
this.queryParams.destCountry = this.queryParams.receiveCountry;
2024-06-06 17:04:22 +00:00
listEmisTmsSiteBatch(this.queryParams).then(response => {
this.emisTmsPackList = response.rows;
this.total = response.total;
this.loading = false;
});
},
handleQueryWait(){
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;
2024-06-11 13:15:24 +00:00
this.queryWaitParams.receiveCountry = this.queryParams.receiveCountry;
this.queryWaitParams.sendCountry = this.queryParams.sendCountry;
2024-06-06 17:04:22 +00:00
this.loadingWait = true;
this.queryWaitParams.params.isNeedBatch = 1;
listEmisWaybill(this.queryWaitParams).then(response => {
this.loadingWait = false;
if(response.code != 200){
this.$message.error(response.msg);
return;
}
this.emisTmsWaitPackList = response.rows;
// this.emisCoPackDetail = response.rows;
console.log(this)
this.waitTotal = response.total;
})
},
handleWaitSelectionChange(selection){
// selection.length > 0 ? this.packDisabled = false : this.packDisabled=true;
this.waitPackList = selection;
},
async handleQueryDone(){
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;
2024-06-11 13:15:24 +00:00
this.queryDoneParams.receiveCountry = this.queryParams.receiveCountry;
this.queryDoneParams.sendCountry = this.queryParams.sendCountry;
2024-06-06 17:04:22 +00:00
let resList = await listEmisTmsSiteBatchDtl(this.queryDoneParams);
this.loadingDone = false;
if(!resList || resList.code != 200){
this.$message.error(resList && resList.msg || "未知错误");
return;
}
//this.tempExistCoPackWayBillList = resList.rows;//临时存储,用于运单号校验
this.doneTotal = resList.total;
this.emisTmsDonePackList = [];
for(let p = 0; p < resList.rows.length;p++){
let obj = {...resList.rows[p].waybillDetail};
obj.packNo = resList.rows[p].packNo;
this.emisTmsDonePackList.push(obj);
}
},
handleDoneSelectionChange(){
},
handleQueryWayBill(){
this.loading2 = true;
if (null != this.wayBillData.dateTimeRange && '' != this.wayBillData.dateTimeRange) {
if(this.wayBillData.dataTimeType == '1'){
// 下单时间
this.wayBillData.params.beginOrderDate = dateToStr(new Date(this.wayBillData.dateTimeRange[0]));
this.wayBillData.params.endOrderDate = dateToStr(new Date(this.wayBillData.dateTimeRange[1]));
}else if(this.wayBillData.dataTimeType == '0'){
// 录单时间
this.wayBillData.params.beginCreateTime = dateToStr(new Date(this.wayBillData.dateTimeRange[0]));
this.wayBillData.params.endCreateTime = dateToStr(new Date(this.wayBillData.dateTimeRange[1]));
}
}
this.wayBillData.params.isNeedBatch = 1;
listEmisWaybill(this.wayBillData).then(response => {
this.loading2 = false;
if(response.code != 200){
this.$message.error(response.msg);
return;
}
this.emisWayBillList = response.rows;
// this.emisCoPackDetail = response.rows;
console.log(this)
this.wayBillotal = response.total;
})
},
onSiteSelect(item){
if(!item){
this.coData.startSiteCode = null;
this.coData.startSiteName = null;
return;
}
this.coData.startSiteCode=item && item.siteCode;
this.coData.startSiteName=item && item.siteName;
},
onDateSelect(value){
console.log("date picker---->", value)
this.dateTimeRange=value;
},
onWayBillDateSelect(value){
console.log("date picker---->", value)
this.wayBillData.dateTimeRange=value;
},
async handleAddCoPack(){
// if(!this.coData.destCountry || !this.coData.sendSiteCode || !this.coData.nextSiteCode || !this.blUnpack){
// this.$modal.msgError("请先选择必填项")
// return;
// }
if(this.emisCoPackDetail.length == 0){
this.$modal.msgError("请先选择至少一条运单信息")
return;
}
2024-06-12 07:43:36 +00:00
let firstItemCountry = this.emisCoPackDetail.length > 0 ? this.emisCoPackDetail[0].receiveCountry : '';
// 将选中的“待组批次”的运单 置为 追加的运单号
for(let p = 0; p < this.emisCoPackDetail.length;p++){
if(this.emisCoPackDetail[p].receiveCountry != firstItemCountry){
this.$message.error("存在了不同的目的国家!");
return ;
}
}
2024-06-06 17:04:22 +00:00
let coPackItem={
batchNo: this.coData.batchNo,
batchName: this.coData.batchName || '',
batchDate: this.coData.createTime,
batchType: this.coData.batchType || null,
transType: this.coData.transType || null,
2024-06-12 07:43:36 +00:00
destCountry: this.coData.destCountry || null,
2024-06-06 17:04:22 +00:00
startSiteCode: this.coData.startSiteCode || null,
startSiteName: this.coData.startSiteName || null,
nextSiteCode: this.coData.nextSiteCode || null,
airBilllNo: this.coData.airBilllNo || null,
2024-06-11 13:15:24 +00:00
// airTime: this.coData.airTime || null,
2024-06-06 17:04:22 +00:00
// etd: this.coData.etd || null,
// eta: this.coData.eta || null,
// packNum: this.coData.packNum || null,
carNo: this.coData.carNo || null,
2024-06-11 13:15:24 +00:00
// carTime: this.coData.carTime || null,
2024-06-06 17:04:22 +00:00
shipNo: this.coData.shipNo || null,
2024-06-11 13:15:24 +00:00
// shipTime: this.coData.shipTime || null,
2024-06-06 17:04:22 +00:00
clearanceResStatus: this.coData.clearanceResStatus || null,
declareResStatus: this.coData.declareResStatus || null,
destCountry: this.coData.destCountry || null,
destCountryName: this.coData.destCountryName || null,
totalParcelQty: this.coData.totalParcelQty || null,
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
}
2024-06-11 13:15:24 +00:00
if(this.coData.transType == 2){
coPackItem.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
this.coData.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
}else if(this.coData.transType == 4){
coPackItem.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
this.coData.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
}else{
coPackItem.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
this.coData.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
}
2024-06-06 17:04:22 +00:00
if(this.coPackType == "add"){// 新增
let resPack = await getTmsGroupBatchNo();
if(!resPack || resPack.code != 200){
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;
}
// })
for(let i = 0; i< this.emisCoPackDetail.length;i++){
let packDetail = {
batchNo:resPack.data,
billCode: this.emisCoPackDetail[i].billCode,
scanDate: this.emisCoPackDetail[i].scanDate,
scanStatus: this.emisCoPackDetail[i].scanStatus,
groupStatus: "1",//已组批次
scanMan: this.emisCoPackDetail[i].scanMan,
scanSite: this.emisCoPackDetail[i].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 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=[];
}
2024-06-11 13:15:24 +00:00
// 新增配载数据 tableData
for(let lr = 0; lr < 3; lr++){
for(let ll = 0; ll < 6; ll++){
let batchLoadingData = {
batchNo: resPack.data,
posNo:lr+":"+ll+":1",
row: lr,
col: ll,
layer: 1,
posDesc:this.tableData[lr][ll],
remark:"",
tenantId:"",
}
let resLD = await addEmisTmsSiteBatchLoading(batchLoadingData);
if(!resLD || resLD.code != 200){
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
return;
}
}
}
2024-06-06 17:04:22 +00:00
}else if(this.coPackType == "edit"){// 修改
//第一步:处理组批次信息的更新;
if(this.tempCoPackInfo.batchName != this.coData.batchName
|| this.tempCoPackInfo.transType != this.coData.transType
|| this.tempCoPackInfo.startSiteCode != this.coData.startSiteCode
|| this.tempCoPackInfo.nextSiteCode != this.coData.nextSiteCode
|| this.tempCoPackInfo.airBilllNo != this.coData.airBilllNo
2024-06-11 13:15:24 +00:00
|| this.tempCoPackInfo.etd != this.coData.etd
2024-06-06 17:04:22 +00:00
|| this.tempCoPackInfo.carNo != this.coData.carNo
2024-06-12 07:43:36 +00:00
|| this.tempCoPackInfo.destCountry != this.coData.destCountry
2024-06-06 17:04:22 +00:00
|| this.tempCoPackInfo.shipNo != this.coData.shipNo
2024-06-11 13:15:24 +00:00
// || this.tempCoPackInfo.shipTime != this.coData.shipTime
2024-06-06 17:04:22 +00:00
|| this.tempCoPackInfo.totalWaybillQty != this.coData.totalWaybillQty
|| this.tempCoPackInfo.totalParcelQty != this.coData.totalParcelQty
|| this.tempCoPackInfo.totalWeight != this.coData.totalWeight
|| this.tempCoPackInfo.totalVolume != this.coData.totalVolume
2024-06-11 13:15:24 +00:00
// || this.tempCoPackInfo.loadingFile != this.coData.loadingFile
2024-06-06 17:04:22 +00:00
){
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;
2024-06-11 13:15:24 +00:00
this.tempCoPackInfo.etd = this.coData.etd;
2024-06-06 17:04:22 +00:00
this.tempCoPackInfo.carNo = this.coData.carNo;
2024-06-12 07:43:36 +00:00
this.tempCoPackInfo.destCountry = this.coData.destCountry;
2024-06-06 17:04:22 +00:00
this.tempCoPackInfo.shipNo = this.coData.shipNo;
2024-06-11 13:15:24 +00:00
// this.tempCoPackInfo.shipTime = this.coData.shipTime;
2024-06-06 17:04:22 +00:00
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;
}
}
//第二步:处理运单列表的数据
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.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;
}
// })
}
// })
2024-06-11 13:15:24 +00:00
// 修改配载数据
for(let lr = 0; lr < 3; lr++){
for(let ll = 0; ll < 6; ll++){
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){
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
return;
}
}
}
}
2024-06-06 17:04:22 +00:00
}
this.openForm= false;
this.titleForm = "";
this.$modal.msgSuccess('操作成功!');
this.getQuery();
},
async handleDeleteCoPack(){
let that =this;
for(let i = 0; i< this.ids.length;i++){
let res = await delEmisTmsSiteBatch(this.ids[i]);
if(!res || res.code != 200){
that.$modal.msgError(res && res.msg || '组批次删除失败')
that.getList();
return;
}
}
this.$modal.msgSuccess('操作成功');
this.getList();
},
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 = {
pageNum: 1,
pageSize: 20,
params:{}
};
this.emisWayBillList=[];
this.tempCoPackList=[];
this.addWayBillDisabled = true;
this.wayBillotal=0;
this.computeTotal();
},
handleCloseWayBill(){
this.titleWayBill="";
this.openWayBillForm=false;
this.wayBillData = {
pageNum: 1,
pageSize: 20,
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() {
this.queryParams.pageNum = 1;
// this.queryParams.pageSize = 20;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.selection = selection;
this.single = selection.length!==1
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 totalParcelQty=0;
let totalWeight=0;
let totalVolume=0;
this.emisCoPackDetail.forEach(item =>{
totalParcelQty +=item.parcelQty;
totalWeight +=item.billWeight;
totalVolume +=item.totalVolume;
item.destCountry = this.coData.destCountry;
// item.sendSiteCode = this.coData.sendSiteCode;
item.startSiteCode = this.coData.startSiteCode;
// item.nextSiteCode = this.coData.nextSiteCode;
item.nextSiteCode = this.coData.nextSiteCode;
item.blUnpack = this.blUnpack;
})
this.coData.totalWaybillQty=this.emisCoPackDetail.length;
this.coData.totalParcelQty=totalParcelQty;
this.coData.totalWeight=totalWeight;
this.coData.totalVolume=parseFloat(totalVolume.toFixed(5));
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
},
/** 新增按钮操作 */
async handleAdd() {
this.coPackType="add";
this.coData = {};
if(this.activeName=="first"){
2024-06-12 07:43:36 +00:00
let firstItemCountry = this.waitPackList.length > 0 ? this.waitPackList[0].receiveCountry : '';
2024-06-06 17:04:22 +00:00
// 将选中的“待组批次”的运单 置为 追加的运单号
for(let p = 0; p < this.waitPackList.length;p++){
2024-06-12 07:43:36 +00:00
if(this.waitPackList[p].receiveCountry != firstItemCountry){
this.$message.error("存在了不同的目的国家!");
return ;
}
2024-06-06 17:04:22 +00:00
this.emisCoPackDetail.push(this.waitPackList[p]);
}
}
this.tempExistCoPackWayBillList = [];// 清空临时保存的已有运单号
this.tempCoPackInfo={};
this.coData.createTime = parseTime(new Date());
this.coData.destCountry = null;
this.coData.destCountryName = null;
// this.coData.sendSiteCode = null;
this.coData.nextSiteCode = null;
this.coData.nextStation = null;
this.blUnpack = "1";
2024-06-11 13:15:24 +00:00
this.tableData = [
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
];
this.tableDataId=[
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
];
2024-06-06 17:04:22 +00:00
this.coData.startSiteCode = this.$store.getters.ownerSiteCode;
this.coData.startSiteName=this.$store.getters.ownerSiteName;
this.computeTotal();
this.currentId=null;
this.openForm= true;
this.titleForm = "新增组批次";
},
handleAddWayBill(){
this.openWayBillForm= true;
this.titleWayBill = "运单列表";
},
handleShowMoreInput(){
this.moreInputVisible = !this.moreInputVisible;
},
/** 修改按钮操作 */
async handleUpdate(row) {
this.coPackType="edit";
let response = await getEmisTmsSiteBatch(row.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;
2024-06-12 07:43:36 +00:00
this.coData.destCountry = resData.destCountry;
2024-06-06 17:04:22 +00:00
// 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;
2024-06-11 13:15:24 +00:00
// this.coData.airTime = resData.airTime || null;
2024-06-06 17:04:22 +00:00
// this.coData.etd = resData.etd || null;
// this.coData.eta = resData.eta || null;
// this.coData.packNum = resData.packNum || null;
this.coData.carNo = resData.carNo || null;
2024-06-11 13:15:24 +00:00
// this.coData.carTime = resData.carTime || null;
2024-06-06 17:04:22 +00:00
this.coData.shipNo = resData.shipNo || null;
2024-06-11 13:15:24 +00:00
// this.coData.shipTime = resData.shipTime || null;
2024-06-06 17:04:22 +00:00
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;
2024-06-11 13:15:24 +00:00
if(resData.transType == 2){
this.coData.airTime = resData.etd;
}else if(resData.transType == 4){
this.coData.shipTime = resData.etd;
}else{
this.coData.carTime = resData.etd;
}
2024-06-06 17:04:22 +00:00
this.emisCoPackDetail=[];
let resList = await listEmisTmsSiteBatchDtl({batchNo: resData.batchNo});
if(!resList || resList.code != 200){
this.$message.error(resList && resList.msg || "未知错误");
return;
}
this.tempExistCoPackWayBillList = resList.rows;//临时存储,用于运单号校验
this.tempCoPackInfo = resData;
for(let p = 0; p < resList.rows.length;p++){
this.emisCoPackDetail.push(resList.rows[p].waybillDetail);
}
this.coData.packStatus = this.tempCoPackInfo.packStatus;
this.coData.scanDate = this.tempCoPackInfo.scanDate;
2024-06-11 13:15:24 +00:00
let resLoadingList = await listEmisTmsSiteBatchLoading({batchNo: resData.batchNo});
if(!resLoadingList || resLoadingList.code != 200){
this.$message.error(resLoadingList && resLoadingList.msg || "未知错误");
return;
}
this.tempCoPackInfo.tableData = [
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
];
this.tempCoPackInfo.tableDataId=[
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' },
{ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }
];
for(let p = 0; p < resLoadingList.rows.length;p++){
this.tempCoPackInfo.tableDataId[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].id;
this.tempCoPackInfo.tableData[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].posDesc;
this.tableData[resLoadingList.rows[p].row][resLoadingList.rows[p].col] = resLoadingList.rows[p].posDesc;
// this.emisCoPackDetail.push(resLoadingList.rows[p].waybillDetail);
}
2024-06-06 17:04:22 +00:00
this.computeTotal();
this.currentId=null;
this.openForm= true;
this.titleForm = "修改组批次";
},
handleView(row) {
this.id=row.id;
this.titleView="查看";
this.openView=true;
// this.router.push({ path: '/emis/emisTmsPack/viewDetail', query: { id: row.id }})
},
handleFormChanged(){
this.openForm = false;
this.getList();
},
cancelForm(){
this.openForm = false;
},
/** 删除按钮操作 */
CoPack(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除').then(function() {
return delEmisTmsSiteBatch(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisTmsPack/export', {
// ...this.queryParams
// }, `emisTmsPack_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisTmsSiteBatch(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
this.downloadLoading = false
if (response.code === 200) {
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 data = this.formatJson(filterVal, curList, response.rows)
excel.export_json_to_excel({
header: tHeader,
data,
filename: 'TMS组批次',
autoWidth: true
})
loadingInstance.close()
})
}
});
},
formatJson(filterVal, jsonData, resData) {
let index = 0
return jsonData.map(v => filterVal.map(j => {
if (j === 'index') {
return ++index
}
if (j === 'status') {
var statusStr='xxx'
if(v[j] == 10){
statusStr='xxx'
}
return statusStr;
}
return v[j]
}))
},
/** 列索引函数 */
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
},
/** 时间搜索响应函数 */
dateTimeChange(value){
this.dateTimeRange=value;
},
}
};
</script>
<style scoped>
.el-divider{
margin-top: 0px;
background: 0 0;
border-top: 1px solid #E6EBF5;
}
.el-divider__text {
color: #0955ee;
cursor: pointer;
}
.query-label {
.el-radio{
display: block;
line-height: 23px;
white-space: normal;
margin-right: 0;
}
}
.overflowhidden{
overflow: hidden;
}
.ellipsis {
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
}
</style>