md
This commit is contained in:
parent
527af0c160
commit
1db40a7ef1
@ -9,10 +9,9 @@ VUE_APP_VERSION = '20240516'
|
||||
#VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_PDOMAIN = 'tanex56'
|
||||
VUE_APP_DATA_FROM = 'pc'
|
||||
VUE_APP_BASE_API = 'http://47.102.220.189:58089/api/bizsvr'
|
||||
# VUE_APP_BASE_API = 'https://api.emis.tanex56.com/api/bizsvr'
|
||||
VUE_APP_BASE_API = 'http://tst-api.emis.tanex56.com/api/bizsvr'
|
||||
|
||||
VUE_APP_WS_HOST = 'ws://47.102.220.189:58089/api/bizsvr'
|
||||
VUE_APP_WS_HOST = 'ws://tst-api.emis.tanex56.com/api/bizsvr'
|
||||
|
||||
VUE_APP_PRINTER_HOST = '192.168.88.100:17080'
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@ VUE_APP_VERSION = '20240516'
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
VUE_APP_PDOMAIN = 'tanex56'
|
||||
VUE_APP_DATA_FROM = 'pc'
|
||||
VUE_APP_BASE_API = 'http://api.emis.tanex56.com/api/bizsvr'
|
||||
VUE_APP_BASE_API = 'http://tst-api.emis.tanex56.com/api/bizsvr'
|
||||
|
||||
VUE_APP_WS_HOST = 'api.emis.tanex56.com/api/bizsvr'
|
||||
VUE_APP_WS_HOST = 'tst-api.emis.tanex56.com/api/bizsvr'
|
||||
|
||||
VUE_APP_PRINTER_HOST = '127.0.0.1:17080'
|
||||
|
||||
@ -270,6 +270,7 @@ export default {
|
||||
// vnode.context.currentOdiv=tbBodyDiv;
|
||||
vnode.context.currentCell=evt.target;
|
||||
showContextMenu(evt);
|
||||
|
||||
const currentCellInfo=getCellPosition(evt.target);
|
||||
vnode.context.currentCellInfo=currentCellInfo;
|
||||
|
||||
@ -281,6 +282,8 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
// addCtrlCKeyDown(oDiv,evt)
|
||||
|
||||
vnode.context.multipleSelection=[];
|
||||
//初始化不显示
|
||||
vnode.context.contextVisible=false;
|
||||
@ -388,6 +391,7 @@ export default {
|
||||
function showContextMenu(event){
|
||||
var xdTableObj = document.getElementById(vnode.context.tableId);
|
||||
xdTableObj.addEventListener("contextmenu", function(event) {
|
||||
|
||||
vnode.context.clearEventBubble(event)
|
||||
|
||||
var menu = xdTableObj.querySelector("#contextMenu");
|
||||
@ -405,12 +409,21 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
// function addCtrlCKeyDown(oDiv,event){
|
||||
// let that=this;
|
||||
// vnode.context.clearEventBubble(event)
|
||||
// oDiv.addEventListener('keydown', function(e) {
|
||||
// e = e||window.event;
|
||||
// if(e.ctrlKey&&e.code=="KeyC"){
|
||||
// vnode.context.handleCopySelect(e);
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
function cancelContextMenu() {
|
||||
document.oncontextmenu = new Function("event.returnValue=true");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取el-table元素的位置信息
|
||||
function getTablePosition(tbDom) {
|
||||
const tableRect = tbDom.getBoundingClientRect();
|
||||
@ -516,8 +529,6 @@ export default {
|
||||
isMouseDown: true, // 是否需要(允许)处理鼠标的移动事件
|
||||
tbSize:"",
|
||||
|
||||
|
||||
|
||||
name: '',
|
||||
config: {
|
||||
children: [],
|
||||
@ -588,6 +599,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
if(this.saveStorageName&&this.saveStorageName!=undefined&&this.saveStorageName!=''){
|
||||
this.isNeedDbSaveTpl=true;
|
||||
}else{
|
||||
@ -606,11 +618,15 @@ export default {
|
||||
this.updateTable()
|
||||
|
||||
this.initSort();
|
||||
// this.initKeyDown();
|
||||
this.initKeyDown();
|
||||
this.tableDom=this.getTableDom();
|
||||
},
|
||||
methods: {
|
||||
|
||||
getInstance() {
|
||||
// const ref = this.$children.find(i => i.$options._componentTag === 'el-table')
|
||||
// return ref
|
||||
return this.$refs.table.$refs?.elTable
|
||||
},
|
||||
getUUID() {
|
||||
return Math.random().toString(36).substring(3,10);
|
||||
},
|
||||
@ -669,11 +685,24 @@ export default {
|
||||
if(val){
|
||||
if(this.storeTplList&&this.storeTplList.length>0){
|
||||
const tplItem = this.storeTplList.find(d => d.tplCode === val)
|
||||
// console.log("===>tplItem==>",tplItem);
|
||||
console.log("===>changeTbShowTpl==111->",tplItem);
|
||||
this.form=Object.assign({},tplItem);
|
||||
if(this.form.tplData){
|
||||
this.storageList=JSON.parse(this.form.tplData);
|
||||
|
||||
// 必须在节点数组存在的才有意义
|
||||
let list = this.storageList.filter(item => this.$vnode.componentOptions.children.find(n => {
|
||||
return n.componentOptions && item.prop === n.componentOptions.propsData.prop
|
||||
}))
|
||||
|
||||
console.log("===>changeTbShowTpl==222->",tplItem);
|
||||
this.storageList = list;
|
||||
// 保存模版数据到本地
|
||||
this.storeTplToLocal();
|
||||
console.log("===>changeTbShowTpl==444->",tplItem);
|
||||
|
||||
this.updateTable()
|
||||
console.log("===>changeTbShowTpl==555->",tplItem);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@ -708,12 +737,21 @@ export default {
|
||||
if(selTplItem){
|
||||
this.form=selTplItem;
|
||||
this.curentTbShowTpl=selTplItem.tplCode;
|
||||
this.storageList=JSON.parse(this.form.tplData);
|
||||
|
||||
// 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
|
||||
}))
|
||||
|
||||
this.storageList = list;
|
||||
// 保存模版数据到本地
|
||||
this.storeTplToLocal();
|
||||
|
||||
this.initStorage();
|
||||
this.updateTable();
|
||||
}
|
||||
// 检查字段描述
|
||||
// console.log("===>initTbShowlList=2222=>",this.storeTplList);
|
||||
// console.log("===>this.curentTbShowTpl=2222=>",this.curentTbShowTpl);
|
||||
|
||||
}
|
||||
});
|
||||
@ -722,9 +760,9 @@ export default {
|
||||
|
||||
savaTbShowTpl(){
|
||||
if(!this.form.tplName){
|
||||
this.form.tplName='默认'
|
||||
// this.$modal.msgError("模版名称必填");
|
||||
// return;
|
||||
// this.form.tplName='默认'
|
||||
this.$modal.msgError("模版名称必填");
|
||||
return;
|
||||
}
|
||||
|
||||
// 判断模版是否存在,若存在则覆盖
|
||||
@ -968,7 +1006,6 @@ export default {
|
||||
that.updateTable();
|
||||
// this.refreshKeyId=Math.random().toString(36).substring(3,10);
|
||||
|
||||
|
||||
// const currCol = vnode.context.storageList.splice(oldIndex-1, 1)[0];
|
||||
// vnode.context.storageList.splice(newIndex-1, 0, currCol);
|
||||
// vnode.context.updateTable();
|
||||
@ -1143,7 +1180,6 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
this.$listeners['']
|
||||
this.config.children = childrenNodes
|
||||
this.config.attrs = this.$attrs
|
||||
this.config.listeners = this.$listeners;
|
||||
@ -1153,14 +1189,17 @@ export default {
|
||||
// 控制下表格重新刷新
|
||||
// this.getInstance()?.doLayout()
|
||||
if(this.showCustomizeTpl){
|
||||
const storage = window.localStorage.getItem('tableStorage') ? JSON.parse(window.localStorage.getItem('tableStorage')) : {}
|
||||
storage[this.saveStorageName] = this.storageList
|
||||
window.localStorage.setItem('tableStorage', JSON.stringify(storage))
|
||||
this.storeTplToLocal();
|
||||
}else{
|
||||
// 清除本地缓存
|
||||
window.localStorage.removeItem('tableStorage')
|
||||
}
|
||||
},
|
||||
storeTplToLocal(){
|
||||
const storage = window.localStorage.getItem('tableStorage') ? JSON.parse(window.localStorage.getItem('tableStorage')) : {}
|
||||
storage[this.saveStorageName] = this.storageList
|
||||
window.localStorage.setItem('tableStorage', JSON.stringify(storage))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,24 +136,6 @@
|
||||
<el-table-column :label="$t('账单已收金额')" align="center" prop="recedMoney" min-width="150" />
|
||||
<el-table-column :label="$t('账单退款金额')" align="center" prop="refundMoney" min-width="150" />
|
||||
|
||||
<el-table-column :label="$t('收款状态')" align="center" prop="paymentStatus" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='1'" type="success">已收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column :label="$t('开票状态')" align="center" prop="paymentStatus" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='1'" type="success">已收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column :label="$t('收款状态')" align="center" prop="paymentStatus" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user