This commit is contained in:
linfso 2024-06-24 13:29:39 +08:00
parent ce4107da45
commit 29d79b76f1
8 changed files with 59 additions and 35 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="xd-table"> <div class="xd-table" :id="tableId">
<div class="table-operate-btn-content" v-show="showOperateButton"> <div class="table-operate-btn-content" v-show="showOperateButton">
<!-- toolbar --> <!-- toolbar -->
@ -168,8 +168,6 @@
<el-button size="mini" @click="openTbShowTplDlg = false">关 闭</el-button> <el-button size="mini" @click="openTbShowTplDlg = false">关 闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -256,10 +254,11 @@ export default {
// 增加图层 // 增加图层
var tbBody1=document.getElementsByClassName("el-table__body-wrapper")[0]; var xdTableObj = document.getElementById(vnode.context.tableId);
var tbBody1=xdTableObj.getElementsByClassName("el-table__body-wrapper")[0];
var selDiv = document.createElement("div"); 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;"; 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;";
selDiv.id = "selectDiv"; selDiv.id = "selectDiv-"+vnode.context.tableId;
tbBody1.appendChild(selDiv); tbBody1.appendChild(selDiv);
// 表格对象 // 表格对象
@ -315,7 +314,8 @@ export default {
//重置选中css //重置选中css
for (var i = 0; i < fileNodes.length; i++) { for (var i = 0; i < fileNodes.length; i++) {
if (fileNodes[i].className.indexOf("el-table__cell") != -1) { if (fileNodes[i].className.indexOf("el-table__cell") != -1) {
fileNodes[i].className = "el-table__cell"; // fileNodes[i].className = "el-table__cell";
fileNodes[i].classList.remove("seled");
selList.push(fileNodes[i]); selList.push(fileNodes[i]);
} }
} }
@ -360,8 +360,6 @@ export default {
if (sl > _l && st > _t && selList[i].offsetLeft < _l + _w && selList[i].offsetTop < _t + _h) { if (sl > _l && st > _t && selList[i].offsetLeft < _l + _w && selList[i].offsetTop < _t + _h) {
if (selList[i].className.indexOf("seled") == -1) { if (selList[i].className.indexOf("seled") == -1) {
selList[i].className = selList[i].className + " seled"; selList[i].className = selList[i].className + " seled";
// console.log("===>tst==i>",i);
const cellInfo=getCellPosition(selList[i]); const cellInfo=getCellPosition(selList[i]);
vnode.context.multipleSelection.push(cellInfo); vnode.context.multipleSelection.push(cellInfo);
@ -375,7 +373,9 @@ export default {
} }
} else { } else {
if (selList[i].className.indexOf("seled") != -1 ) { if (selList[i].className.indexOf("seled") != -1 ) {
selList[i].className = "el-table__cell"; // selList[i].className = "el-table__cell";
selList[i].classList.remove("seled");
} }
} }
} }
@ -469,9 +469,10 @@ export default {
document.onmouseup = function () { document.onmouseup = function () {
//把鼠标移动事初始化 //把鼠标移动事初始化
document.onmousemove=null; document.onmousemove=null;
var selDiv=document.getElementById("selectDiv"); var xdTableObj = document.getElementById(vnode.context.tableId);
var selDiv=document.getElementById("selectDiv-"+vnode.context.tableId);
if (selDiv) { if (selDiv) {
document.getElementsByClassName("el-table__body-wrapper")[0].removeChild(selDiv); xdTableObj.getElementsByClassName("el-table__body-wrapper")[0].removeChild(selDiv);
} }
selList = null, _x = null, _y = null, selDiv = null, startX = null, startY = null, evt = null; selList = null, _x = null, _y = null, selDiv = null, startX = null, startY = null, evt = null;
vnode.context.mouseflag = false; vnode.context.mouseflag = false;
@ -484,6 +485,7 @@ export default {
}, },
data() { data() {
return { return {
tableId:"XdTable"+Math.random().toString(36).substring(3,10),
// 弹出层标题 // 弹出层标题
title: "显示/隐藏", title: "显示/隐藏",
// 是否显示弹出层 // 是否显示弹出层
@ -528,7 +530,6 @@ export default {
currentCellInfo:null, currentCellInfo:null,
currentSelectStr:null, currentSelectStr:null,
// 表格个性化记忆配置 // 表格个性化记忆配置
isNeedDbSaveTpl:false, isNeedDbSaveTpl:false,
fullUrl:null, fullUrl:null,
@ -571,6 +572,9 @@ export default {
this.tableDom=this.getTableDom(); this.tableDom=this.getTableDom();
}, },
methods: { methods: {
getUUID() {
return Math.random().toString(36).substring(3,10);
},
setTbShowTpl(){ setTbShowTpl(){
this.openTbShowTplDlg=true; this.openTbShowTplDlg=true;
}, },
@ -978,10 +982,9 @@ export default {
:deep .seled{ :deep .seled{
// background-color: #f3f3f3; background-color: #d9ecff7d !important;
// background-color: #d0d0d0; color: black;
background-color: #dcdcdc!important; font-weight: 600;
// background-color: #f00202!important;
} }

View File

@ -287,6 +287,12 @@ export default {
ownerSiteCode: [ ownerSiteCode: [
{ required: true, message: "所属网点不能为空", trigger: "blur" } { required: true, message: "所属网点不能为空", trigger: "blur" }
], ],
ownerSiteCode: [
{ required: true, message: "部门不能为空", trigger: "blur" }
],
ownerSiteCode: [
{ required: true, message: "角色不能为空", trigger: "blur" }
],
password: [ password: [
{ required: true, message: "员工密码不能为空", trigger: "blur" }, { required: true, message: "员工密码不能为空", trigger: "blur" },
{ min: 5, max: 20, message: '员工密码长度必须介于 5 和 20 之间', trigger: 'blur' } { min: 5, max: 20, message: '员工密码长度必须介于 5 和 20 之间', trigger: 'blur' }
@ -316,12 +322,12 @@ export default {
}, },
created() { created() {
this.initData(); this.initData();
// this.getConfigKey("sys.user.initPassword").then(response => { this.getConfigKey("sys.user.initPassword").then(response => {
// if(this.userId == null) { if(this.userId == null) {
// this.initPassword = response.msg; this.initPassword = response.msg;
// this.form.password = this.initPassword; // this.form.password = this.initPassword;
// } }
// }); });
}, },
methods: { methods: {
@ -335,7 +341,7 @@ export default {
this.roleOptions = response.roles; this.roleOptions = response.roles;
this.open = true; this.open = true;
this.title = "添加用户"; this.title = "添加用户";
// this.form.password = this.initPassword; this.form.password = this.initPassword;
}); });
}else{ }else{
getUser(this.userId).then(response => { getUser(this.userId).then(response => {

View File

@ -57,7 +57,7 @@
<el-tag v-if="scope.row.uploadStatus==-1" type="danger">下单异常</el-tag> <el-tag v-if="scope.row.uploadStatus==-1" type="danger">下单异常</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('异常信息')" align="left" prop="errorInfo" min-width="120" :show-overflow-tooltip="true" > <el-table-column :label="$t('异常信息')" align="center" prop="errorInfo" min-width="300" :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.uploadStatus==-1" style="color:red">{{ scope.row.errorInfo }}</span> <span v-if="scope.row.uploadStatus==-1" style="color:red">{{ scope.row.errorInfo }}</span>
<span v-if="scope.row.uploadStatus==1">下单成功</span> <span v-if="scope.row.uploadStatus==1">下单成功</span>
@ -71,7 +71,7 @@
<el-table-column :label="$t('产品类型')" align="center" prop="productType" min-width="80" :show-overflow-tooltip="true"/> <el-table-column :label="$t('产品类型')" align="center" prop="productType" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" width="100" /> <el-table-column :label="$t('取件方式')" align="center" prop="pickupMethod" width="100" />
<el-table-column :label="$t('快递员')" align="center" prop="operateEmployeeCode" min-width="100"/> <el-table-column :label="$t('取件员/操作员')" align="center" prop="operateEmployeeCode" min-width="100"/>
<el-table-column :label="$t('报关方式')" align="center" prop="customsEclaration" min-width="80" /> <el-table-column :label="$t('报关方式')" align="center" prop="customsEclaration" min-width="80" />
<el-table-column :label="$t('清关方式')" align="center" prop="customsClear" min-width="80" /> <el-table-column :label="$t('清关方式')" align="center" prop="customsClear" min-width="80" />
<el-table-column :label="$t('回款联系人')" align="center" prop="payee" min-width="100" /> <el-table-column :label="$t('回款联系人')" align="center" prop="payee" min-width="100" />
@ -95,6 +95,9 @@
<el-table-column :label="$t('寄件区')" align="center" prop="sendCounty" min-width="80" :show-overflow-tooltip="true"/> <el-table-column :label="$t('寄件区')" align="center" prop="sendCounty" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件地址')" align="center" prop="sendAddress" min-width="80" :show-overflow-tooltip="true"/> <el-table-column :label="$t('寄件地址')" align="center" prop="sendAddress" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('月结客户')" align="center" prop="custNo" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件/签收短信')" align="center" prop="blMessage" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('货物名称')" align="center" prop="goodsInfo" min-width="80" :show-overflow-tooltip="true"/> <el-table-column :label="$t('货物名称')" align="center" prop="goodsInfo" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('包装类型')" align="center" prop="packType" min-width="80" /> <el-table-column :label="$t('包装类型')" align="center" prop="packType" min-width="80" />
<el-table-column :label="$t('件数')" align="center" prop="parcelQty" min-width="80" /> <el-table-column :label="$t('件数')" align="center" prop="parcelQty" min-width="80" />
@ -456,12 +459,14 @@ export default {
// 运单号 收件人 收件电话 收件国 收件省 收件市 收件区 收件公司 收件地址 // 运单号 收件人 收件电话 收件国 收件省 收件市 收件区 收件公司 收件地址
// 寄件人 寄件电话 寄件国 寄件省 寄件市 寄件区 寄件公司 寄件地址 // 寄件人 寄件电话 寄件国 寄件省 寄件市 寄件区 寄件公司 寄件地址
// 线路 产品类型 报关方式 清关方式 快递员 货物名称 包装类型 件数 实际重量 体积 // 线路 产品类型 报关方式 清关方式 快递员 货物名称 包装类型 件数 实际重量 体积
// 取件方式 派送方式 运费 支付方式 月结账号 回款联系人 销售联系人 费用备注 // 取件方式 派送方式 运费 支付方式 月结客户 回款联系人 销售联系人 费用备注
// 取件员/操作员
// 寄件/签收短信
let rowIndex=element['__rowNum__'] let rowIndex=element['__rowNum__']
let orderData={ let orderData={
billCode: element['运单号'], billCode: element['运单号'],
sendDate: parseTime(new Date()), sendDate: parseTime(new Date()),
custNo: element['月结账号'], custNo: element['月结客户'],
receiveName: element['收件人'], receiveName: element['收件人'],
receiveCompany:element['收件公司'], receiveCompany:element['收件公司'],
receiveMobile:element['收件电话'], receiveMobile:element['收件电话'],
@ -495,8 +500,10 @@ export default {
feeRemark:element['费用备注'], feeRemark:element['费用备注'],
payee: element['回款联系人'], payee: element['回款联系人'],
salesmen: element['销售联系人'], salesmen: element['销售联系人'],
operateEmployeeCode: element['快递员'], operateEmployeeCode: element['取件员/操作员'],
remark: element['录单备注'], remark: element['录单备注'],
blMessage: element['寄件/签收短信'],
uploadStatus: 0, uploadStatus: 0,
errorInfo:'', errorInfo:'',
} }

View File

@ -665,6 +665,7 @@ export default {
billCode:null, billCode:null,
openTraceInfo:false, openTraceInfo:false,
currentTraceBillItem:null,
currentTraceBillCode:null, currentTraceBillCode:null,
dateRange:[], dateRange:[],
@ -891,8 +892,10 @@ export default {
return ''; return '';
}, },
handleShowTraceInfo(row){ handleShowTraceInfo(row){
this.currentTraceBillCode=row.billCode; this.currentTraceBillCode=row.billCode;
this.currentTraceBillItem=row;
this.openTraceInfo=true; this.openTraceInfo=true;
}, },
/** 查询运单列表列表 */ /** 查询运单列表列表 */

View File

@ -665,6 +665,7 @@ export default {
billCode:null, billCode:null,
openTraceInfo:false, openTraceInfo:false,
currentTraceBillItem:null,
currentTraceBillCode:null, currentTraceBillCode:null,
dateRange:[], dateRange:[],

View File

@ -1720,9 +1720,11 @@ methods: {
} }
let totalFee=0; let totalFee=0;
if(this.form.feeItems&&this.form.feeItems.length>0){
this.form.feeItems.forEach(item=>{ this.form.feeItems.forEach(item=>{
totalFee=totalFee+parseInt(item.realFee); totalFee=totalFee+parseInt(item.realFee);
}); });
}
this.form.freight = totalFee; this.form.freight = totalFee;
}, },
// 计算体积重量 // 计算体积重量

View File

@ -1720,9 +1720,11 @@ methods: {
} }
let totalFee=0; let totalFee=0;
if(this.form.feeItems&&this.form.feeItems.length>0){
this.form.feeItems.forEach(item=>{ this.form.feeItems.forEach(item=>{
totalFee=totalFee+parseInt(item.realFee); totalFee=totalFee+parseInt(item.realFee);
}); });
}
this.form.freight = totalFee; this.form.freight = totalFee;
}, },
// 计算体积重量 // 计算体积重量