This commit is contained in:
linfso 2024-08-05 09:14:17 +08:00
parent c7c48f0a5d
commit 2239e47134
7 changed files with 163 additions and 114 deletions

View File

@ -43,6 +43,7 @@ export default {
let h2 = this.$refs.pageHeader.offsetHeight;
let contentHeight = h1 - h2-190;
this.contentHeight = contentHeight;
console.log("====this.contentHeight==>",this.contentHeight);
}, 500),
},
};

View File

@ -2,7 +2,6 @@
<div class="xd-table" :id="tableId">
<div class="table-operate-btn-content" v-show="showOperateButton">
<!-- toolbar -->
<slot name="operateBtnContent">
<div class="operate-btn-content">
<slot name="toolbar">
@ -117,11 +116,10 @@
</div>
<div v-else >
<!-- :pagerCount="3" -->
<pagination
v-show="total>0 && showPagination"
:total="total"
:page-sizes="[10,20,50,100,300,500,1000,2000,5000]"
:page-sizes="[5,10,20,50,100,300,500,1000,2000,5000]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:page-size="queryParams.pageSize"
@ -227,7 +225,7 @@ export default {
},
queryParams:{
type: Object,
default: {},
default: null,
},
total:{
type: Number,
@ -288,9 +286,12 @@ export default {
//初始化不显示
vnode.context.contextVisible=false;
const refTableObj=vnode.context.getInstance();
// 增加图层
var xdTableObj = document.getElementById(vnode.context.tableId);
var tbBody1=xdTableObj.getElementsByClassName("el-table__body-wrapper")[0];
var selDiv = document.createElement("div");
selDiv.style.cssText = "position:absolute;width:0px;height:0px;font-size:0px;margin:0px;padding:0px;border:2px solid #409eff;background-color:#d9ecff;z-index:1000;filter:alpha(opacity:60);opacity:0.6;display:none;";
@ -300,8 +301,9 @@ export default {
// 表格对象
const tableDom=vnode.context.$refs.table.$refs.elTable.$el;
//用来存储列表
//用来存储列表 单元格和行
var selList = [];
var selRowList = [];
//获得指令下的dom对应的表格
var fileNodes = oDiv.getElementsByTagName("td");
var countI = 0;
@ -309,7 +311,7 @@ export default {
var startX = (evt.x || evt.clientX);
var startY = (evt.y || evt.clientY);
//重置选中css
//重置选中单元格css
for (var i = 0; i < fileNodes.length; i++) {
if (fileNodes[i].className.indexOf("el-table__cell") != -1) {
fileNodes[i].classList.remove("seled");
@ -317,7 +319,17 @@ export default {
}
}
setMouseCellSelect(evt.target);
var fileRowNodes = oDiv.getElementsByTagName("tr");
for (var i = 0; i < fileRowNodes.length; i++) {
if (fileRowNodes[i].className.indexOf("el-table__row") != -1) {
fileRowNodes[i].className = "el-table__row";
selRowList.push(fileRowNodes[i]);
}
}
setMouseCellSelect(evt.target,selRowList);
// setMouseRowSelect(evt.target);
var _x = null;
var _y = null;
@ -367,6 +379,7 @@ export default {
// tbBody2.scrollBy(0, 0-60);
// }
// 单元格
for (var i = 0; i < selList.length; i++) {
var sl = selList[i].offsetWidth + selList[i].offsetLeft;
var st = selList[i].offsetHeight + selList[i].offsetTop;
@ -384,6 +397,34 @@ export default {
}
}
}
// 行
for (var i = 0; i < selRowList.length; i++) {
var sl = selRowList[i].offsetWidth + selRowList[i].offsetLeft;
var st = selRowList[i].offsetHeight + selRowList[i].offsetTop;
if (sl > _l && st > _t && selRowList[i].offsetLeft < _l + _w && selRowList[i].offsetTop < _t + _h) {
if (selRowList[i].className.indexOf("rowSeled") == -1) {
selRowList[i].className = selRowList[i].className + " rowSeled";
refTableObj.toggleRowSelection(vnode.context.tableData[i],true)
//把选中的都存入到table标签中的已选中
// if(vnode.context.tableData[i]){
// vnode.context.multipleRowSelection.push(vnode.context.tableData[i]);
// }
}
} else {
if (selRowList[i].className.indexOf("rowSeled") != -1 ) {
selRowList[i].className = "el-table__row";
refTableObj.toggleRowSelection(vnode.context.tableData[i],false);
// vnode.context.multipleSelection.forEach((ele,i)=>{
// //这里没用对象是否相等用的是传入table中的唯一的myKey字段
// if(ele[vnode.context.myKey]==vnode.context.tableData[i][vnode.context.myKey] ){
// vnode.context.multipleSelection.splice(i,1);
// }
// })
}
}
}
}
// vnode.context.clearEventBubble(evt);
};
@ -395,8 +436,8 @@ export default {
vnode.context.clearEventBubble(event)
var menu = xdTableObj.querySelector("#contextMenu");
console.log("====>xdTableObj====>",xdTableObj);
console.log("====>menu====>",menu);
// console.log("====>xdTableObj====>",xdTableObj);
// console.log("====>menu====>",menu);
let tbPosRect=getTablePosition(xdTableObj);
menu.style.left = (event.clientX-tbPosRect.left+5) + "px";
@ -436,7 +477,7 @@ export default {
while(cell.tagName !== 'TD'){
cell = cell.parentElement;
}
// console.log("xdtable==>",cell);
// // console.log("xdtable==>",cell);
const cellRect = cell.getBoundingClientRect();
return { x:cellRect.x,y:cellRect.y,width:cellRect.width,height:cellRect.height};
}catch(e){
@ -444,7 +485,7 @@ export default {
}
}
function setMouseCellSelect(cell) {
function setMouseCellSelect(cell,selRowList) {
try{
while(cell.tagName !== 'TD'){
cell = cell.parentElement;
@ -454,7 +495,6 @@ export default {
return;
}
// 选中和取消选中
if(cell.className.indexOf("seled") != -1 ){
// cell.classList.remove("seled");
@ -467,10 +507,18 @@ export default {
vnode.context.multipleSelection=[];
vnode.context.multipleSelection.push(cellInfo);
// 行样式设置
// const refTableObj=vnode.context.getInstance();
// let rowIndex = cell.rowIndex;
// // selRowList[i].className = selRowList[i].className + " rowSeled";
// refTableObj.toggleRowSelection(vnode.context.tableData[rowIndex],true)
}catch(e){
}
}
// 获取鼠标位置的单元格
function getCellPosition(cell) {
try{
@ -549,6 +597,8 @@ export default {
mouseflag: false,
//选中的数组
multipleSelection: [],
multipleRowSelection:[],
//控制右键菜单弹出显示
contextVisible:false,
@ -599,14 +649,14 @@ export default {
},
},
mounted() {
console.log("===>xdtabe mounted==111->");
// // console.log("===>xdtabe mounted==111->");
if(this.saveStorageName&&this.saveStorageName!=undefined&&this.saveStorageName!=''){
this.isNeedDbSaveTpl=true;
}else{
this.fullUrl=window.location.origin + window.location.pathname + window.location.search + window.location.hash;
this.pageId=this.MD5(this.fullUrl);
this.saveStorageName=this.pageId;
// console.log("===> this.fullUrl==>", this.fullUrl,this.saveStorageName)
// // console.log("===> this.fullUrl==>", this.fullUrl,this.saveStorageName)
this.isNeedDbSaveTpl=false;
}
@ -686,7 +736,7 @@ export default {
if(val){
if(this.storeTplList&&this.storeTplList.length>0){
const tplItem = this.storeTplList.find(d => d.tplCode === val)
console.log("===>changeTbShowTpl==111->",tplItem);
// // console.log("===>changeTbShowTpl==111->",tplItem);
this.form=Object.assign({},tplItem);
if(this.form.tplData){
this.storageList=JSON.parse(this.form.tplData);
@ -696,14 +746,14 @@ export default {
return n.componentOptions && item.prop === n.componentOptions.propsData.prop
}))
console.log("===>changeTbShowTpl==222->",tplItem);
// // console.log("===>changeTbShowTpl==222->",tplItem);
this.storageList = list;
// 保存模版数据到本地
this.storeTplToLocal();
console.log("===>changeTbShowTpl==444->",tplItem);
// // console.log("===>changeTbShowTpl==444->",tplItem);
this.updateTable()
console.log("===>changeTbShowTpl==555->",tplItem);
// // console.log("===>changeTbShowTpl==555->",tplItem);
}
}
}else{
@ -728,7 +778,7 @@ export default {
tagId:this.saveStorageName
};
// console.log("===>initTbShowlList=1111=>");
// // console.log("===>initTbShowlList=1111=>");
this.storeTplList=[];
listSysCustomizeTpl(queryParams).then(response => {
if(response.rows&&response.rows.length>0){
@ -740,7 +790,7 @@ export default {
this.curentTbShowTpl=selTplItem.tplCode;
this.storageList=JSON.parse(this.form.tplData);
// console.log("===>initTbShowlList=111=>",this.storageList);
// // console.log("===>initTbShowlList=111=>",this.storageList);
// 必须在节点数组存在的才有意义
let list = this.storageList.filter(item => this.$vnode.componentOptions.children.find(n => {
return n.componentOptions && item.prop === n.componentOptions.propsData.prop
@ -859,7 +909,7 @@ export default {
});
selStr=this.trimTabChar(selStr,'\t','');
// console.log("=selStr==>",selStr);
// // console.log("=selStr==>",selStr);
this.currentSelectStr=selStr;
}
@ -980,7 +1030,7 @@ export default {
let that=this;
this.$nextTick(function () {
const wrapperTr = document.querySelector('#'+that.tableId+' .el-table__header-wrapper > table > thead > tr');
// console.log("===>wrapperTr==>",wrapperTr);
// // console.log("===>wrapperTr==>",wrapperTr);
if(wrapperTr){
Sortable.create(wrapperTr, {
animation: 100,
@ -1111,7 +1161,7 @@ export default {
// 更多操作触发
handleAdjustTableSize(command) {
//size:mini/small/medium;
// console.log(this.config);
// // console.log(this.config);
switch (command) {
case "small":
this.config.attrs.size='small';
@ -1163,7 +1213,7 @@ export default {
// 根据缓存的数组进行渲染表格
updateTable() {
console.log("===>updateTable==>");
// // console.log("===>updateTable==>");
// 特殊类型
const childrenNodes = this.$vnode.componentOptions.children.filter(node => node.componentOptions && node.componentOptions.propsData.type)
this.storageList.forEach(item => {
@ -1291,6 +1341,17 @@ export default {
font-weight: 600;
}
:deep .rowSeled{
// background-color: #d9ecff7d !important;
background-color: #ffa5a55e !important;
color: black;
font-weight: 600;
}
.xd-tb-wrapper :deep .el-table__body tr:hover > td {
background-color: #ffa5a55e !important;
}
.xd-tb-wrapper{
-webkit-user-select: none; /* Safari */
@ -1299,6 +1360,8 @@ export default {
user-select: none;
}
// :deep .el-table__body tr.current-row>td {
// background: none !important;
// }

View File

@ -1,20 +1,11 @@
<template>
<div>
<!-- <div style="font-weight: 600;">运单号:{{ billCode }}</div> -->
<div style="display: inline-flex; width: 100%; margin-top: 15px;">
<!-- <div style="width:20%">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;font-size: 12px;border: 1px solid #bcbcbc;border-radius: 3px;">
<el-col :span="24">线路:{{ billDetail.transLineTypeName }}</el-col>
<el-col :span="24">产品:{{ billDetail.productTypeName }}</el-col>
<el-col :span="24">寄件网点:{{ billDetail.sendSiteName }}</el-col>
<el-col :span="24">目的网点:{{ billDetail.dispatchUnderlingSiteName }}</el-col>
</el-row>
</div> -->
<div v-if="billDetail" style="display: inline-flex; width: 100%; margin-top: 15px;">
<div style="width:80%">
<el-steps :active="active" align-center finish-status="finish">
<el-step >
<template slot="title">
揽收(<span >{{billDetail?(billDetail.sender.countryName):''}}</span>)
揽收(<span >{{billDetail.sender.countryName}}</span>)
</template>
<span class="icon iconfont" slot="icon">&#xe7b0;</span>
</el-step>
@ -29,7 +20,7 @@
</el-step>
<el-step >
<template slot="title">
签收(<span >{{billDetail?(billDetail.reciever.countryName):''}}</span>)
签收(<span >{{billDetail.reciever.countryName}}</span>)
</template>
<span class="icon iconfont" slot="icon">&#xe819;</span>
</el-step>
@ -45,7 +36,8 @@
<div>
<div style="text-align: center;">
<ImagePreview height="50px" v-for="pic in (billDetail?billDetail.billPicDispatchRmk:'').split(',')" :key="pic" :src="pic" ></ImagePreview>
<ImagePreview height="50px" v-for="pic in (billDetail.billPicDispatchRmk.split(',') )" :key="pic" :src="pic" >
</ImagePreview>
</div>
<div style="text-align: center;">
签收底单
@ -80,6 +72,7 @@ import BillPicList from './billPicList.vue';
import WaybillDetailReadOnly from '@/views/emis/emisWaybill/waybillDetailReadOnly.vue';
import { getWaybillDetail } from "@/api/emis/emisWaybill";
import { getTraceListByBillCode } from "@/api/emis/emisTmsScanRecord";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
@ -107,6 +100,7 @@ export default {
loading: true,
billDetail:{},
traceInfoList: [],
scanRecordList:[],
canViewDetail:false,
};
@ -162,8 +156,38 @@ export default {
this.active=2;
}
});
// 查看扫描记录是否包含该网点,如果包含则允许查看
let qParamTmp={
pageNum:1,
pageSize:1000,
billCode:this.scanBillCode
}
getTraceListByBillCode(qParamTmp).then(response => {
this.scanRecordList = response.rows;
if(this.scanRecordList&&this.scanRecordList.length>0){
let i=0;
let len=this.scanRecordList.length;
for(i=0;i<len;i++){
let item=this.scanRecordList[i]
console.log("====>item===>",item);
if(item.scanSiteCode==ownerSiteCode){
this.canViewDetail=true;
break;
}
}
}
// this.loading = false;
});
},
showGotRmk(){
},
calcDeliveryTime(startData,endDate){

View File

@ -1,12 +1,9 @@
<template>
<XdPageContainer class="dashboard-container" >
<!-- class="app-container" -->
<SearchForm style="background: white; padding: 10px;" slot="pageHeader" class="queryForm" :model="queryParams" ref="queryForm" size="mini" :maxShow="9" label-width="100px" @search="handleQuery" @reset="resetQuery">
<!-- label-width="100px" -->
<SearchForm style="background: white; padding: 10px;" class="queryForm" :model="queryParams" ref="queryForm" size="mini" :maxShow="9" label-width="100px" @search="handleQuery" @reset="resetQuery">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<!-- :span="6" -->
<el-col :span="6">
<el-col :span="14">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="24">
<el-form-item label="按运单号查询" prop="billCode">
@ -26,19 +23,19 @@
</el-row>
</el-col>
<el-col :span="18">
<el-col :span="10">
</el-col>
</el-row>
</SearchForm>
<div style="display:inline-flex;width: 100%;border-bottom: 1px solid #d9d9d9;margin-bottom: 20px;">
<div class="form-group-title"><span class="title">{{ $t('跟踪信息') }}</span></div>
</div>
<div style="padding: 0px 10px 5px 0px;">
<div style="min-height: 100%;padding: 0px 10px 5px 0px;">
<!-- <el-scrollbar style="height: 1000px"> -->
<div style="display:inline-flex;width: 100%;border-bottom: 1px solid #d9d9d9;margin-bottom: 20px;">
<div class="form-group-title"><span class="title">{{ $t('跟踪信息') }}</span></div>
</div>
<!-- <el-scrollbar style="height: 100%"> -->
<!-- 如果显示子单勾选则循环显示子单 -->
<div v-for="(item,index) in emisWaybillList" :key="resetRefreshId+'.'+index">
<CardWithHeader :header="'运单号:'+item.billCode" >

View File

@ -54,6 +54,7 @@
storageName="emisTmsPackList_main1_240702"
border
ref="table"
size="small"
@ -253,6 +254,7 @@ export default {
},
// 选择表格数据
handleSelectionChange(selection){
this.selectionList=selection;
// let destCountry = "";
this.canSelectList = [];
for(let i = 0; i < selection.length; i++){
@ -361,19 +363,12 @@ export default {
handleDoneSelectionChange(){
},
/** 查询TMS合包列表 */
getList() {
this.loading = true;
this.emisTmsPackList = [];
// if (null != this.dateTimeRange && '' != this.dateTimeRange) {
// this.queryParams.params["beginSendDate"] = dateToStr(new Date(this.dateTimeRange[0]));
// this.queryParams.params["endSendDate"] = dateToStr(new Date(this.dateTimeRange[1]));
// }
// this.queryParams.params["beginSendDate"] = null;
// this.queryParams.params["endSendDate"] = null;
// this.queryParams.params["isNeedPack"] = null;
// this.queryParams.destCountry = this.queryParams.receiveCountry;
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"createTime");
listEmisTmsPack(this.queryParams).then(response => {
this.emisTmsPackList = response.rows;
@ -389,7 +384,6 @@ export default {
if(this.selectionList&&this.selectionList.length>0){
this.exportData(this.selectionList,loadingInstance);
// this.$refs.refTable.exportData('寄件运单查询',this.selectionList,this.formatJson,loadingInstance)
}
else{
@ -408,7 +402,7 @@ export default {
exportData(selData,loadingInstance){
const curList =selData
import('@/vendor/Export2Excel').then(excel => {
const exportParam=this.$refs.refTable.getExportParam();
const exportParam=this.$refs.table.getExportParam();
const tHeader = exportParam.header;
const filterVal = exportParam.filter;
const data = this.formatJson(filterVal, curList, selData)
@ -428,63 +422,17 @@ export default {
if (j === 'index') {
return ++index
}
if (j === 'kjlx') {
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
if (j === 'packStatus') {
return this.selectDictLabel(this.dict.type.emis_pack_status,v[j]);
}
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 === 'blUnpack') {
if(v[j] == 1){
return '是';
}else{
return '否';
}
}
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]
}))
},

View File

@ -555,7 +555,7 @@ export default {
this.$refs.tanexPrinter.downPDF(orderList,false,null,this.currentSelection);
},
initQueryParams(){
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate");
let qParam=null;
if(this.queryParams.billCode){
qParam={
@ -564,7 +564,7 @@ export default {
billCode:this.queryParams.billCode,
}
}else{
qParam=this.queryParams
qParam={...this.queryParams}
}
return qParam;

View File

@ -115,6 +115,22 @@
</el-row>
</el-col>
<el-col :span="24" v-if="applyType&&applyTypeArr.includes('39')" >
<el-row :gutter="0" class="md-row">
<el-col :span="3" class="md-title">
<span>附加信息</span>
</el-col>
<el-col :span="7" class="md-value">
<span >{{billDetail.extInfo}}</span>
</el-col>
<el-col :span="14">
<el-form-item :label="$t('附加信息')" prop="extInfo" >
<el-input v-model="form.extInfo" placeholder=""/>
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="24" v-if="applyType&&applyTypeArr.includes('15')" >
<el-row :gutter="0" class="md-row">
<el-col :span="3" class="md-title">