563 lines
17 KiB
Vue
563 lines
17 KiB
Vue
<template>
|
||
<XdPageContainer >
|
||
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px"
|
||
v-show="showSearch"
|
||
@search="handleQuery"
|
||
@reset="resetQuery">
|
||
<el-form-item label="录单日期" prop="dateTimeRange">
|
||
<!-- @dateTimeChange="onDateSelect" -->
|
||
<elDateAdvPicker clearable v-model="dateTimeRange" ></elDateAdvPicker>
|
||
</el-form-item>
|
||
<!-- <el-form-item label="寄件财务中心" prop="sendCenterCode">
|
||
<EmisSiteSimplePicker1 v-model="queryParams.sendCenterCode" :siteType="2" ></EmisSiteSimplePicker1>
|
||
</el-form-item>
|
||
<el-form-item label="寄件网点" prop="sendSiteCode">
|
||
<EmisSiteSimplePicker2 v-model="queryParams.sendSiteCode" ></EmisSiteSimplePicker2>
|
||
</el-form-item> -->
|
||
|
||
<el-form-item label="目的财务中心" prop="productType">
|
||
<EmisSiteSimplePicker3 v-model="queryParams.destinationCenterCode" siteType="2" :disabled="$store.getters.ownerSiteCode !='88888'" ></EmisSiteSimplePicker3>
|
||
</el-form-item>
|
||
|
||
<el-form-item label="目的网点" prop="dispatchUnderlingSiteCode">
|
||
<EmisSiteSimplePicker4 v-model="queryParams.dispatchUnderlingSiteCode" :disabled="$store.getters.ownerSiteCode !='88888'" ></EmisSiteSimplePicker4>
|
||
</el-form-item>
|
||
|
||
</SearchForm>
|
||
|
||
<!-- 账单表 -->
|
||
<XdTable
|
||
|
||
slot="pageContent"
|
||
slot-scope="slotProps"
|
||
:height="(slotProps.contentHeight-60)+'px'"
|
||
|
||
v-loading="loading"
|
||
border
|
||
size="mini"
|
||
:data="sendStatList"
|
||
:showSearch.sync="showSearch"
|
||
:queryParams="queryParams"
|
||
:total="total"
|
||
|
||
ref="refTable"
|
||
|
||
storageName="getDestStatList_main_240702"
|
||
|
||
@queryTable="getDestStatList"
|
||
@selection-change="handleSelectionChange"
|
||
@sort-change="handleSortChange"
|
||
@row-dblclick="handleSendDbClick"
|
||
>
|
||
|
||
<div slot="toolbar">
|
||
<el-row :gutter="10" class="mb8">
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="warning"
|
||
plain
|
||
icon="el-icon-download"
|
||
size="mini"
|
||
@click="handleExport"
|
||
>导出</el-button>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
|
||
<el-table-column type="selection" width="55" align="center" />
|
||
|
||
<el-table-column :label="$t('录单日期')" align="center" prop="sendDate" width="100" :show-overflow-tooltip="true"/>
|
||
<el-table-column :label="$t('目的财务中心')" align="center" prop="destinationCenterName" width="120" :show-overflow-tooltip="true"/>
|
||
<el-table-column :label="$t('目的网点')" align="center" prop="dispatchUnderlingSiteName" width="150" :show-overflow-tooltip="true"/>
|
||
<el-table-column :label="$t('票数')" align="center" prop="totalNum" width="120" :sortable="true"/>
|
||
<el-table-column :label="$t('件数')" align="center" prop="totalParcelQty" width="120" :sortable="true"/>
|
||
<el-table-column :label="$t('结算重量')" align="center" prop="totalSettlementWeight" width="120" :sortable="true"/>
|
||
<el-table-column :label="$t('体积重量')" align="center" prop="totalVolumeWeight" width="120" :sortable="true"/>
|
||
</XdTable>
|
||
|
||
</XdPageContainer>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
getSiteSendStatInfoMap,
|
||
getSiteDestStatInfoMap,
|
||
queryScanStatInfoDtlList,
|
||
|
||
} from "@/api/emis/emisWaybill";
|
||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||
|
||
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||
import EmisSiteSimplePicker3 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||
import EmisSiteSimplePicker4 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
||
|
||
|
||
export default {
|
||
name: "WaybillIsPrinted",
|
||
components: {
|
||
elDateAdvPicker,
|
||
EmisSiteSimplePicker1,
|
||
EmisSiteSimplePicker2,
|
||
EmisSiteSimplePicker3,
|
||
EmisSiteSimplePicker4,
|
||
},
|
||
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
||
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
||
'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status','emis_tab_dispatch_mode'
|
||
],
|
||
data() {
|
||
return {
|
||
activeTab:'a1',
|
||
|
||
// 遮罩层
|
||
loading: false,
|
||
// 选中数组
|
||
ids: [],
|
||
// 非单个禁用
|
||
single: true,
|
||
// 非多个禁用
|
||
multiple: true,
|
||
// 显示搜索条件
|
||
showSearch: true,
|
||
// 创建时间搜索
|
||
dateTimeRange:[],
|
||
// 总条数
|
||
total: 0,
|
||
// 运单列表表格数据
|
||
sendStatList:[],
|
||
destStatList:[],
|
||
|
||
statDtlList:[],
|
||
|
||
selectionList:null,
|
||
|
||
|
||
// 弹出展示层
|
||
id:null,
|
||
titleView:"",
|
||
openView: false,
|
||
|
||
// 查询参数
|
||
queryParams: {
|
||
pageNum: 1,
|
||
pageSize: 20,
|
||
orderSn: null,
|
||
billCode: null,
|
||
billCodeSub: null,
|
||
orderStatus: null,
|
||
waybillStatus: null,
|
||
orderType: null,
|
||
orderDate: null,
|
||
customerCode: null,
|
||
customerName: null,
|
||
receiveCustomerCode: null,
|
||
receiveCustomerName: null,
|
||
thirdCustomerCode: null,
|
||
thirdCustomerName: null,
|
||
receiveName: null,
|
||
receiveCompany: null,
|
||
receiveMobile: null,
|
||
receiveTel: null,
|
||
receiveCountry: null,
|
||
receiveProvince: null,
|
||
receiveCity: null,
|
||
receiveCounty: null,
|
||
receiveTown: null,
|
||
receiveAddress: null,
|
||
receivePostcode: null,
|
||
receivePcd: null,
|
||
sendName: null,
|
||
sendCompany: null,
|
||
sendMobile: null,
|
||
sendTel: null,
|
||
sendCountry: null,
|
||
sendProvince: null,
|
||
sendCity: null,
|
||
sendCounty: null,
|
||
sendTown: null,
|
||
sendAddress: null,
|
||
sendPostcode: null,
|
||
sendPcd: null,
|
||
paymentType: null,
|
||
calcFeeType: null,
|
||
custNo: null,
|
||
transLineType: null,
|
||
productType: null,
|
||
timeType: null,
|
||
meterType: null,
|
||
customsClear: null,
|
||
customsEclaration: null,
|
||
estimateDate: null,
|
||
packType: null,
|
||
dispatchMethod: null,
|
||
pickupMethod: null,
|
||
pickStartDate: null,
|
||
pickFinishDate: null,
|
||
pickFailReason: null,
|
||
intoWarehouseCode: null,
|
||
intoWarehouseName: null,
|
||
intoWarehouseAddress: null,
|
||
intoWarehouseContact: null,
|
||
intoWarehousePhone: null,
|
||
intoWarehouseBillCode: null,
|
||
warehouseInNo: null,
|
||
customerDeliveryBeginTime: null,
|
||
customerDeliveryEndTime: null,
|
||
goodsType: null,
|
||
goodsInfo: null,
|
||
goodsPics: null,
|
||
blPrepareInFreight: null,
|
||
prepareInEstFee: null,
|
||
prepareInRealFee: null,
|
||
prepareInExpress: null,
|
||
prepareInBillCode: null,
|
||
prepareInRemark: null,
|
||
prepareInSupplier: null,
|
||
totalWeight: null,
|
||
totalVolume: null,
|
||
parcelQty: null,
|
||
billWeight: null,
|
||
volumeWeight: null,
|
||
currency: null,
|
||
settlementWeight: null,
|
||
feeWeight: null,
|
||
freight: null,
|
||
blOverLong: null,
|
||
blBill: null,
|
||
blOverWeight: null,
|
||
overWeightNumber: null,
|
||
feeRemark: null,
|
||
thirdCode: null,
|
||
realValue: null,
|
||
blInsure: null,
|
||
insureValue: null,
|
||
insureValueCurrency: null,
|
||
insureFeeCurrency: null,
|
||
insureFee: null,
|
||
insureRemark: null,
|
||
insureSiteCode: null,
|
||
insureDate: null,
|
||
blPrint: null,
|
||
printManCode: null,
|
||
printSite: null,
|
||
printDate: null,
|
||
printCount: null,
|
||
blDispFd: null,
|
||
transferCode: null,
|
||
transferBillcode: null,
|
||
dispFdDate: null,
|
||
dispFdReason: null,
|
||
currentSiteCode: null,
|
||
lastSiteCode: null,
|
||
registerSiteCode: null,
|
||
registerDate: null,
|
||
registerManCode: null,
|
||
takePieceEmployeeCode: null,
|
||
sendSiteCode: null,
|
||
sendCenterCode:null,
|
||
sendDate: null,
|
||
dispatchManCode: null,
|
||
dispatchDate: null,
|
||
dispatchSiteCode: null,
|
||
produceBillDate: null,
|
||
produceBillSiteCode: null,
|
||
produceBillManCode: null,
|
||
destinationCode: null,
|
||
destinationProvince: null,
|
||
destinationCity: null,
|
||
destinationCounty: null,
|
||
dispatchUnderlingSiteCode: null,
|
||
destinationCenterCode: null,
|
||
marketManCode: null,
|
||
payee: null,
|
||
salesmen: null,
|
||
operateEmployeeCode: null,
|
||
blIsQuestion: null,
|
||
problemType: null,
|
||
problemCause: null,
|
||
problemDelayDays: null,
|
||
blMessage: null,
|
||
blAcceptMessage: null,
|
||
blGenSubbill: null,
|
||
signMan: null,
|
||
signManCode: null,
|
||
signSiteCode: null,
|
||
signDate: null,
|
||
billPicSendRmk: null,
|
||
billPicDispatchRmk: null,
|
||
timezoneOffset: null,
|
||
delFlag: null,
|
||
remark: null,
|
||
params:{
|
||
|
||
}
|
||
},
|
||
};
|
||
},
|
||
created() {
|
||
const end = new Date()
|
||
const start = new Date()
|
||
start.setHours(0,0,0,0)
|
||
end.setHours(23,59,59,0)
|
||
this.dateTimeRange=[timeFormat(start), timeFormat(end)]
|
||
|
||
if(this.$store.getters.ownerSiteCode!='88888'){
|
||
this.queryParams.dispatchUnderlingSiteCode=this.$store.getters.ownerSiteCode;
|
||
}
|
||
|
||
},
|
||
methods: {
|
||
getSendStatList() {
|
||
this.loading = true;
|
||
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
|
||
getSiteSendStatInfoMap(this.queryParams).then(response => {
|
||
this.sendStatList = response.rows;
|
||
this.total = response.total;
|
||
this.loading = false;
|
||
});
|
||
},
|
||
|
||
getDestStatList() {
|
||
this.loading = true;
|
||
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
|
||
getSiteDestStatInfoMap(this.queryParams).then(response => {
|
||
this.sendStatList = response.rows;
|
||
this.total = response.total;
|
||
this.loading = false;
|
||
});
|
||
},
|
||
|
||
getScanDtlList() {
|
||
this.loading = true;
|
||
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
|
||
queryScanStatInfoDtlList(this.queryParams).then(response => {
|
||
this.scanStatDtlList = response.rows;
|
||
this.total = response.total;
|
||
this.loading = false;
|
||
});
|
||
},
|
||
|
||
onDateSelect(value){
|
||
this.dateTimeRange=value;
|
||
// scanDate
|
||
},
|
||
handleSendDbClick(row){
|
||
// this.seletRow
|
||
this.$emit("onSelect",row);
|
||
},
|
||
/** 搜索按钮操作 */
|
||
handleQuery() {
|
||
this.queryParams.pageNum = 1;
|
||
this.getDestStatList();
|
||
},
|
||
/** 重置按钮操作 */
|
||
resetQuery() {
|
||
this.resetForm("queryForm");
|
||
this.handleQuery();
|
||
},
|
||
// 多选框选中数据
|
||
handleSelectionChange(selection) {
|
||
this.selectionList=selection;
|
||
if(this.selectionList&&this.selectionList.length>0){
|
||
this.billCode=selection[0].billCode;
|
||
}
|
||
|
||
this.ids = selection.map(item => item.id)
|
||
this.single = selection.length!==1
|
||
this.multiple = !selection.length
|
||
},
|
||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||
|
||
getProperty(obj, str) {
|
||
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
|
||
let arr = str.split(".");
|
||
for (let i in arr) {
|
||
obj = obj[arr[i]] || "";
|
||
}
|
||
return obj;
|
||
},
|
||
sortFun: function (attr, rev) {
|
||
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
|
||
if (rev == undefined||rev==null) {
|
||
rev = 1;
|
||
} else {
|
||
rev = (rev) ? 1 : -1;
|
||
}
|
||
let that=this;
|
||
return function (a, b) {
|
||
a = that.getProperty(a,attr);
|
||
b = that.getProperty(b,attr);
|
||
if (a < b) {
|
||
return rev * -1;
|
||
}
|
||
if (a > b) {
|
||
return rev * 1;
|
||
}
|
||
return 0;
|
||
}
|
||
},
|
||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||
handleSortChange(column) {
|
||
this.sendStatList = this.sendStatList.sort(
|
||
this.sortFun(column.prop, column.order === 'ascending')
|
||
);
|
||
},
|
||
handleFormChanged(){
|
||
this.openForm = false;
|
||
this.getList();
|
||
},
|
||
cancelForm(){
|
||
this.openForm = false;
|
||
},
|
||
/** 删除按钮操作 */
|
||
handleDelete(row) {
|
||
const ids = row.id || this.ids;
|
||
this.$modal.confirm('是否确认删除').then(function() {
|
||
return delEmisWaybill(ids);
|
||
}).then(() => {
|
||
this.getList();
|
||
this.$modal.msgSuccess("删除成功");
|
||
}).catch(() => {});
|
||
},
|
||
/** 导出按钮操作 */
|
||
handleExport() {
|
||
const loadingInstance = this.$loading({
|
||
text: '正在导出...'
|
||
})
|
||
|
||
if(this.selectionList&&this.selectionList.length>0){
|
||
this.exportData(this.selectionList,loadingInstance);
|
||
}
|
||
else{
|
||
// this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
|
||
// this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
|
||
this.queryParams.pageNum=1;
|
||
this.queryParams.pageSize=5000;
|
||
getSiteSendStatInfoMap(this.queryParams).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 === '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 lang="scss" 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;
|
||
}
|
||
}
|
||
|
||
</style>
|