From 03705eecb0b8eef044ba72fc9bcb3b18054ba8b9 Mon Sep 17 00:00:00 2001 From: wang1 <844966816@qq.com> Date: 星期五, 04 八月 2023 20:11:03 +0800 Subject: [PATCH] mdm主数据查询流程阶段数据 --- Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 88 +++++++++++++++++++++++++++++--------------- 1 files changed, 58 insertions(+), 30 deletions(-) diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index c839623..6d4c5a1 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -66,8 +66,8 @@ <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'宸插彂甯冩暟鎹洿鏀�'" - :type="edit" - :visible.sync="DataVisible"></FormTemplateDialog> + type="edit" + :visible.sync="DataVisible" @submit="updataSumbit"></FormTemplateDialog> <!-- 鍙戝竷--> <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" @onLoad="onLoad"></set-personnel> @@ -116,7 +116,7 @@ </basic-container> </template> <script> -import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode} from "@/api/GetItem"; +import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode} from "@/api/GetItem"; import {processTS, changeStatus} from "@/api/template/setPersonnel" import {listCodeAttributeByClassId} from "@/api/integration/integration.js"; import integrationTransfer from "@/views/integration/integrationTransfer"; @@ -125,6 +125,7 @@ import BatchImport from '@/components/BatchImport' import {validatenull} from "@/util/validate"; import fileInHtml from "@/components/file/inHtml.vue"; +import {getUserInfo} from "@/api/system/user"; export default { components: { @@ -174,6 +175,9 @@ tableHeadBtnData: { type: Array, }, + Treedata:{ + type:Array + } }, data() { return { @@ -189,6 +193,7 @@ //鍙戝竷 parameter: { ids: [], + btmtype:'', code: "", type: '', // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC' @@ -265,8 +270,12 @@ }, computed: {}, created() { - const index = this.$route.query.id.indexOf('@name=') + '@name='.length; - this.result = this.$route.query.id.substring(index); + // const index = this.$route.query.id.indexOf('@name=') + '@name='.length; + // this.result = this.$route.query.id.substring(index); + getUserInfo().then(res=>{ + console.log(res.data.data) + this.result=res.data.data.realName + }) }, mounted() { }, @@ -291,8 +300,6 @@ }, tableDataArray: { handler(newval, oldval) { - this.keyWordFind=''; - this.WupinFindValue='' this.tableData = newval; this.searchResults = newval this.doLayout() @@ -314,8 +321,13 @@ } } } + + if(_index==0){ + this.keyWordFind=record.field + } }) this.tableHeadFindDatas = newval; + this.WupinFindValue='' }, }, total: { @@ -338,7 +350,7 @@ } }, deep: true - } + }, }, methods: { //鐘舵�佹悳绱� @@ -422,6 +434,7 @@ }, // 鍙戝竷 setHandler() { + console.log('Treedata',this.Treedata) if (this.selectRow.length > 0) { let hasEditing = this.selectRow.some(item => item.lcstatus !== 'Editing'); let showMessage = true; @@ -435,10 +448,10 @@ } else if (showMessage) { processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { if (res.data.data.records && res.data.data.records.length != 0) { - this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + '-鐢宠[' + this.result + '-' + this.selectRow[0].name + ']'; + this.parameter.processName = this.result + '-鐢宠[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; this.parameter.type = 'PUBLIC'; - this.parameter.code = this.templateOid + this.parameter.code = this.templateOid; + this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; this.title = '娴佺▼瀹℃壒' this.visibleFlow = true; } else { @@ -448,7 +461,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { + changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Released'}).then(res => { if (res.data.code == 200) { this.$message.success('鍙戝竷鎴愬姛') this.onLoad() @@ -479,16 +492,16 @@ if (this.selectRow.length === 1 && item.lcstatus === "Disabled" && showMessage) { this.$message.warning('閫夋嫨鐨勬暟鎹腑鐘舵�佹棤闇�鍐嶆墽琛屽綋鍓嶆搷浣�'); showMessage = false; - } else if (this.selectRow.length >= 1 && !hasEditing && showMessage) { + } else if (this.selectRow.length > 1 && !hasEditing && showMessage) { this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹叏閮ㄤ负銆愬彂甯冪姸鎬併�戞墠鍙互鍙戣捣娴佺▼'); showMessage = false; - } else if (this.selectRow.length > 1 && hasEditing && showMessage) { - processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { + } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { + processTS({templateId: this.templateOid, buttonTypeKey: 'DISABLE'}).then(res => { if (res.data.records != [] && res.data.data.records.length != 0) { - this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + '-鍋滅敤[' + this.result + '-' + this.selectRow[0].name + ']'; + this.parameter.processName = this.result + '-鍋滅敤[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; this.parameter.type = 'DISABLE'; this.parameter.code = this.templateOid + this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; this.title = '鍋滅敤锛堝喕缁擄級缂栫爜鏁版嵁' this.visibleDeactivate = true; } else { @@ -500,7 +513,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({oid: oid, btmname: this.result, lcStatus: 'Disabled'}).then(res => { + changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Disabled'}).then(res => { if (res.data.code == 200) { this.$message.success('鍋滅敤鎴愬姛') this.onLoad() @@ -515,7 +528,7 @@ } } }); - } else { + } else if(this.selectRow.length == 1 && !hasEditing && showMessage ) { this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹负銆愬彂甯冪姸鎬併�戞墠鍙互鍙戣捣娴佺▼') } }); @@ -533,13 +546,13 @@ this.$message.warning('閫夋嫨鐨勬暟鎹腑鐘舵�佹棤闇�鍐嶆墽琛屽綋鍓嶆搷浣�'); showMessage = false; } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { - processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { + processTS({templateId: this.templateOid, buttonTypeKey: 'ENABLE'}).then(res => { if (res.data.data.records && res.data.data.records.length != 0) { this.parameter = res.data.data.records[0] - this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + '-鍚敤[' + this.result + '-' + this.selectRow[0].name + ']'; + this.parameter.processName = this.result + '-鍚敤[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; this.parameter.type = 'Released'; this.parameter.code = this.templateOid + this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; this.title = '鍚敤缂栫爜鏁版嵁' this.visibleDeactivate = true; } else { @@ -551,7 +564,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { + changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Released'}).then(res => { if (res.data.code == 200) { this.$message.success('鍚敤鎴愬姛') this.onLoad() @@ -591,12 +604,12 @@ showMessage = false; } else if (this.selectRow.length >= 1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { //disabledCount 鍜� releasedCount 涓换鎰忎竴涓瓑浜� this.selectRow 鏁扮粍鐨勯暱搴﹀垯琛ㄧず鍏ㄩ儴鏄悓涓�绉嶇姸鎬侊紝杩斿洖 true 濡傛灉disabledCount 鍜� releasedCount 閮藉ぇ浜�0锛屽垯琛ㄧず鏃㈡湁Disabled涔熸湁Released杩斿洖 true - processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { + processTS({templateId: this.templateOid, buttonTypeKey: 'ROLLBACK'}).then(res => { if (res.data.records != [] && res.data.data.records.length != 0) { - this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + '-鍥炴敹[' + this.result + '-' + this.selectRow[0].name + ']'; + this.parameter.processName = this.result + '-鍥炴敹[' + this.selectRow[0].btmname + '-' + this.selectRow[0].name + ']'; this.parameter.type = 'TakeBack'; this.parameter.code = this.templateOid + this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; this.title = '鍥炴敹缂栫爜鏁版嵁' this.visibleDeactivate = true; } else { @@ -608,7 +621,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({oid: oid, btmname: this.result, lcStatus: 'TakeBack'}).then(res => { + changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'TakeBack'}).then(res => { if (res.data.code == 200) { this.$message.success('鍥炴敹鎴愬姛') this.onLoad() @@ -774,6 +787,7 @@ //澶氶�� handleSelectionChange(list) { this.selectRow = list; + console.log(this.selectRow) this.parameter.ids = []; list.forEach((item) => { this.parameter.ids.push(item.oid); @@ -838,6 +852,7 @@ this.$message.warning("鍙湁鐘舵�佷负宸插彂甯冪殑鏁版嵁鎵嶈兘杩涜鏁版嵁鏇存敼"); } else { this.DataVisible = true; + this.rowOid = this.selectRow[0]['oid'] } }, //澧炲姞淇濆瓨 @@ -849,9 +864,23 @@ }) }) }, + //淇敼鍥炶皟 EditSumbit(val) { this.editvisible = false; editSaveCode(val).then(res => { + this.$nextTick(() => { + this.onLoad() + }) + }) + }, + //鏁版嵁鏇存敼鍥炶皟 + updataSumbit(val){ + this.DataVisible = false; + val.copyFromVersion = this.rowOid; + val.oid='' + console.log(val) + upSaveCode(val).then(res=>{ + console.log(res) this.$nextTick(() => { this.onLoad() }) @@ -864,10 +893,10 @@ }, //杈撳叆鍥炶溅鎼滅储 tableFindInp() { - if (this.WupinFindValue.trim() === '') { + /*if (this.WupinFindValue.trim() === '') { this.$message.warning('杈撳叆鍊间笉鑳戒负绌�') return; - } + }*/ TableData({ templateOid: this.templateOid, codeClassifyOid: this.codeClassifyOid, @@ -875,7 +904,6 @@ limit: this.page.pageSize, [ 'conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*' }).then(res => { - console.log(res) this.tableData = res.data.data }) } -- Gitblit v1.9.3