This commit is contained in:
linfso 2024-07-07 17:17:38 +08:00
parent 836d903e0c
commit ddc1d7b7b2
6 changed files with 150 additions and 75 deletions

View File

@ -128,7 +128,7 @@
<ul class="el-dropdown-menu el-popper el-dropdown-menu--medium"
style="transform-origin: center top; z-index: 2009;width: 180px;"
x-placement="bottom-end">
<li class="el-dropdown-menu__item" @click.stop="handleCopySelect(null,$event)" > <span >复制</span></li>
<li class="el-dropdown-menu__item" @click.stop="handleCopySelect($event)" > <span >复制</span></li>
<!-- <li class="el-dropdown-menu__item" > <span @click="handleCopySelect(null,$event)">复制选中数据</span></li> -->
<!-- <li class="el-dropdown-menu__item" > <span @click="handleCopySelect(null,$event)">复制行</span></li> -->
<!-- <li class="el-dropdown-menu__item" > <span @click="handleCopySelect(null,$event)">复制列</span></li> -->
@ -188,7 +188,7 @@
<script>
import { listSysCustomizeTpl, getSysCustomizeTpl, delSysCustomizeTpl, addSysCustomizeTpl, updateSysCustomizeTpl } from "@/api/system/sysCustomizeTpl";
import { parseTime,genJsSeqNo } from "@/utils/custom";
import handleClipboard from '@/utils/clipboard'
import clip from '@/utils/clipboard'
import Sortable from 'sortablejs'
import draggable from 'vuedraggable'
import origTable from './table.jsx'
@ -413,12 +413,14 @@ export default {
};
function showContextMenu(event){
const tableDom=vnode.context.$refs.table.$refs.elTable.$el;
// const tableDom=vnode.context.$refs.table.$refs.elTable.$el;
// document.oncontextmenu = new Function("event.returnValue=false");
tableDom.addEventListener("contextmenu", function(event) {
var xdTableObj = document.getElementById(vnode.context.tableId);
// tableDom
xdTableObj.addEventListener("contextmenu", function(event) {
var menu = document.querySelector("#contextMenu");
let tbPosRect=getTablePosition(tableDom);
let tbPosRect=getTablePosition(xdTableObj);
menu.style.left = (event.clientX-tbPosRect.left+10) + "px";
menu.style.top = (event.clientY-tbPosRect.top) + "px";
menu.style.display = "block";
@ -432,10 +434,13 @@ export default {
}
function cancelContextMenu() {
document.oncontextmenu = new Function("event.returnValue=true");
}
// 获取el-table元素的位置信息
function getTablePosition(tbDom) {
const tableRect = tbDom.getBoundingClientRect();
@ -503,6 +508,8 @@ export default {
// cancelContextMenu();
};
};
}
},
dragColumn: {
@ -605,6 +612,7 @@ export default {
this.initStorage()
this.updateTable()
this.initSort();
this.initKeyDown();
this.tableDom=this.getTableDom();
},
methods: {
@ -612,6 +620,17 @@ export default {
getUUID() {
return Math.random().toString(36).substring(3,10);
},
initKeyDown(){
let that=this;
document.addEventListener('keydown', function(e) {
e = e||window.event;
if(e.ctrlKey&&e.code=="KeyC"){
that.handleCopySelect(e);
return false;
}
});
},
onTplSelectInputBlur(e) {
if (e.target.value.trim()!== '') {
//e.target.value就是录入的内容
@ -830,11 +849,18 @@ export default {
getTablePosition() {
return this.tableDom.getBoundingClientRect();
},
handleCopy(text, event) {
clip(text, event)
},
handleCopySelect(data,event) {
// console.log("===>handleCopySelect===>",event);
handleClipboard(this.currentSelectStr, event)
handleCopySelect(event) {
this.contextVisible=false;
if(this.currentSelectStr){
navigator.clipboard.writeText(this.currentSelectStr).then(() => {
this.$message({message: '复制成功', type:'success'})//提示
this.currentSelectStr=null;
});
}
},
handleSelectCurrentRow(){
@ -1012,6 +1038,14 @@ export default {
}))
this.storageList = list
},
keyDown(e) {
if(e.ctrlKey && e.keyCode==13) { //用户点击了ctrl+enter触发
}
// this.textarea += '\n';
// }else { //用户点击了enter触发
// this.sendMessage();
},
// 根据缓存的数组进行渲染表格
updateTable() {
// 特殊类型
@ -1026,6 +1060,7 @@ export default {
}
})
this.$listeners['']
this.config.children = childrenNodes
this.config.attrs = this.$attrs
this.config.listeners = this.$listeners;

View File

@ -124,6 +124,8 @@
},
queryData() {
console.log("=====>this.value===",this.value);
if(!this.transLineCode ){
if(this.isFistInit && !this.value){

View File

@ -269,7 +269,7 @@
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleClick">
<el-tab-pane label="全部" name="all" />
<el-tab-pane label="待确认" name="waitConfirm" />
<el-tab-pane label="未确认" name="waitConfirm" />
<el-tab-pane label="已确认" name="hasConfirm" />
<el-tab-pane label="确认不出账" name="confirmNotBill" />
<el-tab-pane label="账单异常" name="billError" />
@ -284,7 +284,7 @@
</div> -->
<XdTable v-loading="loading"
border stripe
border
size="mini"
ref="refTable"
@ -299,11 +299,15 @@
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:row-style="tableRowClassName"
highlight-current-row
>
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
@ -313,7 +317,7 @@
v-hasPermi="['emis:emisSettleSubBill:confirmBillByCenter']"
>批量确认</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
@ -323,7 +327,7 @@
v-hasPermi="['emis:emisSettleSubBill:confirmNoBillByCenter']"
>确认不出账</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
@ -333,7 +337,7 @@
v-hasPermi="['emis:emisSettleSubBill:setBillErrorByCenter']"
>置账单异常</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-if="activeTab!='waitConfirm'">
<el-button
type="danger"
plain
@ -376,18 +380,24 @@
<template slot-scope="scope">
<span v-if="scope.row.blConfirm=='0'" >未确认</span>
<el-tag v-if="scope.row.blConfirm=='1'" type="success">已确认</el-tag>
<el-tag v-if="scope.row.blConfirm=='2'" type="error">确认不出账</el-tag>
<el-tag v-if="scope.row.blConfirm=='3'" type="error">账单异常</el-tag>
</template>
</el-table-column>
<!-- <el-table-column :label="$t('确认人')" align="center" prop="confirmManName" min-width="100" /> -->
<el-table-column :label="$t('确认人')" align="center" prop="confirmManCode" min-width="100" />
<el-table-column :label="$t('财务备注')" align="center" prop="confirmNote" min-width="100" />
<el-table-column :label="$t('财务确认人')" align="center" prop="confirmManName" min-width="100" />
<el-table-column :label="$t('财务确认时间')" align="center" prop="confirmDate" min-width="170" />
<!-- <el-table-column :label="$t('业务确认状态')" align="center" prop="blSiteConfirm" min-width="120" >
<el-table-column :label="$t('业务确认状态')" align="center" prop="blSiteConfirm" min-width="120" >
<template slot-scope="scope">
<span v-if="scope.row.blSiteConfirm=='0'" >未确认</span>
<span v-if="scope.row.blSiteConfirm=='1'" >已确认</span>
<el-tag v-if="scope.row.blSiteConfirm=='1'" type="success">已确认</el-tag>
<el-tag v-if="scope.row.blSiteConfirm=='2'" type="error">确认不出账</el-tag>
<el-tag v-if="scope.row.blSiteConfirm=='3'" type="error">账单异常</el-tag>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column :label="$t('业务备注')" align="center" prop="siteConfirmNote" min-width="100" />
<el-table-column :label="$t('业务确认时间')" align="center" prop="siteConfirmDate" min-width="170" />
<el-table-column :label="$t('结算类型')" align="center" prop="settleType" min-width="100" >
<template slot-scope="scope">
@ -441,7 +451,7 @@
<span>{{ scope.row.waybillDetail.sendSiteName }}--{{ scope.row.waybillDetail.dispatchUnderlingSiteName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('预计送达时间')" align="center" prop="estimateDate" min-width="100" >
<el-table-column :label="$t('预计送达时间')" align="center" prop="estimateDate" min-width="170" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.waybillDetail.estimateDate, '{y}-{m}-{d}') }}</span>
</template>
@ -488,17 +498,17 @@
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="100" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="100" />
<el-table-column :label="$t('是否问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="80" >
<el-table-column :label="$t('是否问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="150" >
<template slot-scope="scope">
<el-tag v-if="scope.row.waybillDetail.blIsQuestion==1" type="danger">是</el-tag>
<el-tag v-else type="info">否</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('问题件类型')" align="center" prop="waybillDetail.problemTypeName" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('问题件原因')" align="center" prop="waybillDetail.problemCause" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('问题件类型')" align="center" prop="waybillDetail.problemTypeName" width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('问题件原因')" align="center" prop="waybillDetail.problemCause" width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件网点')" align="center" prop="waybillDetail.sendSiteName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件财务中心')" align="center" prop="waybillDetail.sendSiteFincailName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件网点')" align="center" prop="waybillDetail.sendSiteName" min-width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件财务中心')" align="center" prop="waybillDetail.sendSiteFincailName" min-width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件人')" align="center" prop="waybillDetail.sendName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件手机')" align="center" prop="waybillDetail.sendMobile" min-width="80" :show-overflow-tooltip="true"/>
@ -566,10 +576,9 @@
</el-table-column>
<el-table-column :label="$t('运费')" align="center" prop="waybillDetail.freight" min-width="80" />
<el-table-column :label="$t('保价金额')" align="center" prop="waybillDetail.insureValue" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('保费')" align="center" prop="waybillDetail.insureFee" min-width="80" :show-overflow-tooltip="true"/>
<!-- <el-table-column :label="$t('保费')" align="center" prop="waybillDetail.insureFee" min-width="80" :show-overflow-tooltip="true"/> -->
<el-table-column :label="$t('费用备注')" align="center" prop="waybillDetail.feeRemark" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('签收状态')" align="center" prop="waybillDetail.blSign" width="80" >
<template slot-scope="scope">
<el-tag v-if="scope.row.waybillDetail.blSign=='1'" type="success">已签收</el-tag>
@ -577,22 +586,21 @@
</template>
</el-table-column>
<el-table-column :label="$t('签收时间')" align="center" prop="waybillDetail.signDate" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('签收人')" align="center" prop="waybillDetail.signMan" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('派件人')" align="center" prop="waybillDetail.dispatchManName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('派件员')" align="center" prop="waybillDetail.dispatchManName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('派件网点')" align="center" prop="waybillDetail.dispatchSiteName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('录单网点')" align="center" prop="waybillDetail.registerSiteName" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('录单备注')" align="center" prop="waybillDetail.remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('数据来源')" align="center" prop="waybillDetail.dataFrom" min-width="80" />
<!-- <el-table-column :label="$t('数据来源')" align="center" prop="waybillDetail.dataFrom" min-width="80" /> -->
<el-table-column label="创建人" align="center" prop="waybillDetail.createByName" width="80" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="创建人" align="center" prop="waybillDetail.createByName" width="80" :show-overflow-tooltip="true"/>
<el-table-column label="创建网点" align="center" prop="waybillDetail.createSiteName" width="80" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="waybillDetail.createTime" width="170"/>
<el-table-column label="修改人" align="center" prop="waybillDetail.updateByName" width="80" :show-overflow-tooltip="true"/>
<el-table-column label="修改网点" align="center" prop="waybillDetail.updateSiteName" width="80" :show-overflow-tooltip="true"/>
<el-table-column label="修改时间" align="center" prop="waybillDetail.updateTime" width="170"/>
<el-table-column label="修改时间" align="center" prop="waybillDetail.updateTime" width="170"/> -->
</XdTable>
@ -752,7 +760,7 @@ export default {
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
// console.log(tab, event);
if (tab.name == 'all') {
this.queryParams.blConfirm=null;
}
@ -771,6 +779,28 @@ export default {
this.getList();
},
//标红table指定行
// <span v-if="scope.row.blConfirm=='0'" >未确认</span>
// <el-tag v-if="scope.row.blConfirm=='1'" type="success">已确认</el-tag>
// <el-tag v-if="scope.row.blConfirm=='2'" type="error">确认不出账</el-tag>
// <el-tag v-if="scope.row.blConfirm=='3'" type="error">账单异常</el-tag>
tableRowClassName({row, rowIndex}) {
if (row.blConfirm=='0') {
return {"color": "blue !important"}
}
else if (row.blConfirm=='1') {
return {};
}
else if (row.blConfirm=='2') {
return {"color": "red !important"}
}
else if (row.blConfirm=='3') {
return {"color": "red !important"}
}
return '';
},
/** 查询结算子账单列表 */
getList() {
this.loading = true;
@ -808,15 +838,7 @@ export default {
this.queryParams.isAsc = column.order;
this.getList();
},
/** 新增按钮操作 */
handleAdd(row) {
this.currentId=null;
this.openForm= true;
this.titleForm = "新增";
},
handleShowMoreInput(){
this.moreInputVisible = !this.moreInputVisible;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.currentId= row.id;
@ -843,20 +865,32 @@ export default {
},
handleConfirmNoBillByCenter(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认不出账').then(function() {
return confirmNoBillByCenter(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
this.$prompt('请输入不出账原因', "操作确认", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^.{1,30}$/,
inputErrorMessage: "原因长度必须介于 1 和 30 之间"
}).then(({ value }) => {
confirmNoBillByCenter(ids,value).then(response => {
this.$modal.msgSuccess("操作成功" );
this.getList();
});
}).catch(() => {});
},
handleSetBillErrorByCenter(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否设置账单异常').then(function() {
return setBillErrorByCenter(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
this.$prompt('请输入账单异常原因', "操作确认", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^.{1,30}$/,
inputErrorMessage: "原因长度必须介于 1 和 30 之间"
}).then(({ value }) => {
setBillErrorByCenter(ids,value).then(response => {
this.$modal.msgSuccess("操作成功" );
this.getList();
});
}).catch(() => {});
},
handleView(row) {
@ -872,16 +906,7 @@ export default {
cancelForm(){
this.openForm = false;
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除').then(function() {
return delEmisSettleSubBill(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisSettleSubBill/export', {

View File

@ -68,10 +68,9 @@
<!-- </SearchForm> -->
</el-form>
<div slot="pageContent"
slot-scope="slotProps"
:style="'height:'+(slotProps.contentHeight)+'px'"
>
<div slot="pageContent">
<!-- slot-scope="slotProps"
:style="'height:'+(slotProps.contentHeight)+'px'" -->
<div>
<el-button style="margin-right: 5px;"
type="primary"
@ -108,10 +107,11 @@
>删除</el-button> -->
</div>
<!-- :height="(slotProps.contentHeight-200)+'px'" -->
<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
size="small"
:data="emisTmsWaitPackList"
@ -270,9 +270,10 @@
</el-table-column>
</XdTable>
</el-tab-pane> -->
<!-- :height="(slotProps.contentHeight-200)+'px'" -->
<el-tab-pane label="合包列表" name="third">
<XdTable v-loading="loading"
:height="(slotProps.contentHeight-200)+'px'"
<el-table
v-loading="loading"
border
size="small"
ref="table"
@ -289,11 +290,10 @@
@sort-change="handleSortChange"
@expand-change="expandChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column type="expand">
<template slot-scope="props">
<el-table v-loading="loadingDone"
height="200px"
<XdTable v-loading="loadingDone"
style="width:100%;"
border
size="mini"
@ -304,6 +304,11 @@
@queryTable="handleQueryDone"
@selection-change="handleDoneSelectionChange"
@sort-change="handleSortChange"
:showRightButton="false"
:showOperateButton="false"
:showPagination="false"
:showCustomizeTpl="false"
>
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
<el-table-column :label="$t('所属主单号')" align="center" prop="mainBillCode" min-width="170" />
@ -372,7 +377,7 @@
<span class="ellipsis">{{ scope.row.remark }}</span>
</template>
</el-table-column>
</el-table>
</XdTable>
</template>
</el-table-column>
<el-table-column :label="$t('合包号')" align="center" prop="packNo" min-width="170" />
@ -403,7 +408,7 @@
>查看</el-button>
</template>
</el-table-column> -->
</XdTable>
</el-table>
</el-tab-pane>
</el-tabs>
</div>
@ -1041,6 +1046,8 @@ export default {
this.queryParams.params["beginSendDate"] = dateToStr(new Date(this.dateTimeRange[0]));
this.queryParams.params["endSendDate"] = dateToStr(new Date(this.dateTimeRange[1]));
}
this.queryParams.packStatus='1';
this.queryParams.destCountry = this.queryParams.receiveCountry;
listEmisTmsPack(this.queryParams).then(response => {
this.emisTmsPackList = response.rows;

View File

@ -1892,6 +1892,9 @@ methods: {
// this.form.dispatchSiteCode= item.siteCode;
this.form.dispatchUnderlingSiteName= item.siteName;
// this.form.dispatchSite= item.siteName;
// 需要触发重新计算费用
this.calcBillFee();
},
onGoodsChange(goodsList,selNameStr){
this.form.goodsInfo = selNameStr;

View File

@ -1892,6 +1892,9 @@ methods: {
// this.form.dispatchSiteCode= item.siteCode;
this.form.dispatchUnderlingSiteName= item.siteName;
// this.form.dispatchSite= item.siteName;
// 需要触发重新计算费用
this.calcBillFee();
},
onGoodsChange(goodsList,selNameStr){
this.form.goodsInfo = selNameStr;