md
This commit is contained in:
parent
15c7d055c5
commit
c3835dc1a6
581
src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
Normal file
581
src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
Normal file
@ -0,0 +1,581 @@
|
||||
<template>
|
||||
<XdPageContainer>
|
||||
<!-- <el-form slot="pageHeader" ref="form" size="mini" :model="queryParams" label-width="100px"> -->
|
||||
<SearchForm slot="pageHeader" class="queryForm" :model="queryParams" ref="queryForm" size="mini" :maxShow="9" label-width="100px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
<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="0">批次号</el-radio>
|
||||
<el-radio label="1">运单号</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="receiveCountry">
|
||||
<CountryPicker :placeholder="$t('目的国')" v-model="queryParams.receiveCountry" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="寄件国" prop="sendCountry">
|
||||
<CountryPicker :placeholder="$t('寄件国')" v-model="queryParams.sendCountry" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8"> 经确认:这张表不用付款方式,列表中去除
|
||||
<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>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<!-- <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" style="width:260px" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</SearchForm>
|
||||
|
||||
|
||||
<XdTable
|
||||
|
||||
v-loading="loading"
|
||||
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
ref="refTable"
|
||||
|
||||
storageName="BigBatchPanel_main_241116"
|
||||
|
||||
border
|
||||
size="mini"
|
||||
:data="emisTmsBatchList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
|
||||
@row-dblclick="handleShowBatchInfo"
|
||||
|
||||
>
|
||||
|
||||
<div slot="toolbar">
|
||||
<!-- <el-button style="margin-right: 5px;"
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:query']"
|
||||
@click="getList"
|
||||
>查询</el-button> -->
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:add']"
|
||||
>新组批次</el-button>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:edit']"
|
||||
>修改批次</el-button>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:remove']"
|
||||
>删除</el-button>
|
||||
<!-- <el-button style="margin-right: 5px;"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleDown"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:export']"
|
||||
>下载批次文件</el-button> -->
|
||||
|
||||
<el-button
|
||||
style="margin-right: 5px;"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column :label="$t('批次号')" align="center" prop="batchNo" min-width="100" />
|
||||
<el-table-column :label="$t('批次名称')" align="center" prop="batchName" min-width="130" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('批次类型')" align="center" prop="batchType" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.batchType==1">一程批次</span>
|
||||
<span v-else-if="scope.row.batchType==2">二程批次</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('报关资料状态')" align="center" prop="declareResStatus" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.declareResStatus==1" type="success">{{ $t('已上传') }}</el-tag>
|
||||
<el-tag v-else-if="scope.row.declareResStatus==0" type="warning">{{ $t('未上传') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('清关资料状态')" align="center" prop="clearanceResStatus" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.declareResStatus==1" type="success">{{ $t('已上传') }}</el-tag>
|
||||
<el-tag v-else-if="scope.row.declareResStatus==0" type="warning">{{ $t('未上传') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="$t('运输方式')" align="center" prop="transType" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('运输单号/车牌/航班')" align="center" prop="bizNo" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.transType==2">{{scope.row.airBilllNo}}</span>
|
||||
<span v-else-if="scope.row.transType==4">{{scope.row.shipNo}}</span>
|
||||
<span v-else>{{scope.row.carNo}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('发出时间')" align="center" prop="etd" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.etd, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('异常信息')" align="center" prop="remark" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
<span class="ellipsis">{{ scope.row.remark }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="$t('起始网点')" align="center" prop="startSiteName" min-width="150" />
|
||||
<el-table-column :label="$t('下一网点')" align="center" prop="nextSiteName" min-width="150" />
|
||||
<el-table-column :label="$t('目的国家')" align="center" prop="destCountryName" 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"/>
|
||||
<el-table-column :label="$t('操作员')" align="center" prop="createByName" min-width="150" />
|
||||
</XdTable>
|
||||
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch";
|
||||
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";
|
||||
import { formatSearchStr } from '@/utils/index'
|
||||
|
||||
import PackListView from '@/views/emis/emisTmsSiteBatch/packListView';
|
||||
|
||||
export default {
|
||||
name: "CenterGenBatchMgnt",
|
||||
components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker, PackListView},
|
||||
dicts: ['emis_waybill_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi', 'cebp_return_status'],
|
||||
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组批次表格数据
|
||||
emisTmsBatchList: [],
|
||||
|
||||
// 待组批次列表
|
||||
emisTmsWaitPackList:[],
|
||||
waitTotal:0,
|
||||
|
||||
// 已组批次列表
|
||||
emisTmsDonePackList:[],
|
||||
doneTotal:0,
|
||||
waitPackList:[],//选择未组包的运单先保存起来,在后续新增组批次的弹框中使用
|
||||
// 新增/修改弹窗数据
|
||||
coData: {
|
||||
|
||||
},
|
||||
|
||||
openBatch: false,
|
||||
titleBatch: "",
|
||||
formBatchBillList:"",
|
||||
|
||||
// 新增/修改包详情数据
|
||||
emisCoPackDetail:[],
|
||||
blUnpack:"1",
|
||||
// 追加的运单查询数据
|
||||
wayBillData: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
params:{
|
||||
dataTimeType: '1',
|
||||
queryOrderType: '1'
|
||||
}
|
||||
},
|
||||
// 追加的运单数据
|
||||
emisWayBillList:[],
|
||||
selectionList:[],
|
||||
wayBillotal:0,
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
titleWayBill:null,
|
||||
openWayBillForm:false,
|
||||
|
||||
tempCoPackList:[],
|
||||
coSelection:[],
|
||||
//区分当前是新增还是修改
|
||||
coPackType:'',
|
||||
|
||||
// 临时存储已有组批次的运单号
|
||||
tempExistCoPackWayBillList:[],
|
||||
tempCoPackInfo:{},
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 更新网点时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 更新网点时间范围
|
||||
daterangeUpdateTime: [],
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
billCode:null,
|
||||
orderSN:null,
|
||||
batchNo:null,
|
||||
destCountry: null,
|
||||
destCountryName: null,
|
||||
params:{
|
||||
queryOrderType: '0',
|
||||
queryOrderDateType: '1',
|
||||
blHLK:'1',
|
||||
},
|
||||
},
|
||||
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.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 查询TMS组批次列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"createTime");
|
||||
listEmisTmsSiteBatch(this.queryParams).then(response => {
|
||||
this.emisTmsBatchList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
initQueryParams(){
|
||||
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"createTime");
|
||||
return this.queryParams;
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.selection = selection;
|
||||
this.selectionList=selection;
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.$emit("onCreate");
|
||||
},
|
||||
async handleDelete(){
|
||||
for(let i = 0; i< this.ids.length;i++){
|
||||
await delEmisTmsSiteBatch(this.ids[i]);
|
||||
}
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.getList();
|
||||
},
|
||||
handleDown(){
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate() {
|
||||
// let id = this.ids[0]
|
||||
this.$emit("onUpdate",this.ids);
|
||||
},
|
||||
handleShowBatchInfo(row){
|
||||
this.$emit("onView",row.id);
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
},
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
if(this.selectionList&&this.selectionList.length>0){
|
||||
this.exportData(this.selectionList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
let qExportParam=this.initQueryParams();
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
|
||||
listEmisTmsSiteBatch(qExportParam).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.exportData(response.rows,loadingInstance);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
exportData(selData,loadingInstance){
|
||||
const curList =selData
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam=this.$refs.refTable.getExportParam();
|
||||
const tHeader = exportParam.header;
|
||||
const filterVal = exportParam.filter;
|
||||
const data = this.formatJson(filterVal, curList, selData)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '批次列表',
|
||||
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 === 'kjlx') {
|
||||
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
|
||||
}
|
||||
if (j === 'fjr') {
|
||||
return v['sendName']+'--'+v['receiveName'];
|
||||
}
|
||||
if (j === 'custName') {
|
||||
let paymentType=v['paymentType'];
|
||||
if(paymentType==2 || paymentType==4 || paymentType==5 ){
|
||||
return v['custName'];
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'sendMobile') {
|
||||
return "";
|
||||
}
|
||||
if (j === 'paymentStatus') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
|
||||
}
|
||||
|
||||
if (j === 'pickupMethod') {
|
||||
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
|
||||
}
|
||||
if (j === 'customsEclaration') {
|
||||
return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
|
||||
}
|
||||
if (j === 'customsClear') {
|
||||
return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
|
||||
}
|
||||
if (j === 'packType') {
|
||||
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
|
||||
}
|
||||
|
||||
if (j === 'dispatchMethod') {
|
||||
if(v[j] == 1){
|
||||
return '派送';
|
||||
}else{
|
||||
return '自提';
|
||||
}
|
||||
}
|
||||
if (j === 'blMessage') {
|
||||
if(v[j] == 1){
|
||||
return '发送';
|
||||
}else{
|
||||
return '不发送';
|
||||
}
|
||||
}
|
||||
if (j === 'blAcceptMessage') {
|
||||
if(v[j] == 1){
|
||||
return '发送';
|
||||
}else{
|
||||
return '不发送';
|
||||
}
|
||||
}
|
||||
if (j === 'blSign') {
|
||||
if(v[j] == 1){
|
||||
return '已签收';
|
||||
}else{
|
||||
return '未签收';
|
||||
}
|
||||
}
|
||||
if (j === 'paymentType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
|
||||
}
|
||||
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>
|
||||
1332
src/views/emis/emisTmsSiteBatch/panel/BigBatchViewOnly.vue
Normal file
1332
src/views/emis/emisTmsSiteBatch/panel/BigBatchViewOnly.vue
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user