From d0fab39db8c50fb72d7311b0d4c80e475af47c76 Mon Sep 17 00:00:00 2001 From: zhangyanpeng <bob.zhang@highdatas.com> Date: 星期日, 04 八月 2024 00:34:02 +0800 Subject: [PATCH] 调整 --- module/md/page/terminal/page/hospital_list_warehouse.html | 185 +++++++++++++++++++++++++++++++--------------- 1 files changed, 124 insertions(+), 61 deletions(-) diff --git a/module/md/page/terminal/page/hospital_list_warehouse.html b/module/md/page/terminal/page/hospital_list_warehouse.html index 7763ddb..be11c40 100644 --- a/module/md/page/terminal/page/hospital_list_warehouse.html +++ b/module/md/page/terminal/page/hospital_list_warehouse.html @@ -165,33 +165,6 @@ //琛ㄦ牸瀛楁浜嬩欢璁剧疆 tablefieldClick = { - state_name: {//鐘舵�� - val: {//鏈夊�兼椂鐨勭偣鍑讳簨浠� - notclick_val: ["鑽夌","鑽夌"], - notclick_bindfield: [], - onclick: function(obj) { - var config = { - totab: false, - width: "1100px", - height: "520px", - icon: "icon-product", - text: "娴佺▼姝ラ", - id: "popup_workflow_step_user" + obj.row.id, - url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", - data: obj.row, - delta: {}, - sceneCode: "browse", - callback: function(obj, callback) { - if (callback) { - callback(); - } - } - }; - me.doPopupByPublic(config); - }, - }, - }, - terminal_code: {//瀛楁浜嬩欢璁剧疆 val: {//鏈夊�兼椂鐨勭偣鍑讳簨浠� onclick: function(obj) {//鏁版嵁鍊肩偣鍑讳簨浠� @@ -202,32 +175,6 @@ }; tablefieldClickOpen = { - state_name: {//鐘舵�� - val: {//鏈夊�兼椂鐨勭偣鍑讳簨浠� - notclick_val: ["鑽夌","鑽夌"], - notclick_bindfield: [], - onclick: function(obj) { - var config = { - totab: false, - width: "1100px", - height: "520px", - icon: "icon-product", - text: "娴佺▼姝ラ", - id: "popup_workflow_step_user" + obj.row.id, - url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", - data: obj.row, - delta: {}, - sceneCode: "browse", - callback: function(obj, callback) { - if (callback) { - callback(); - } - } - }; - me.doPopupByPublic(config); - }, - }, - }, code: {//瀛楁浜嬩欢璁剧疆 val: {//鏈夊�兼椂鐨勭偣鍑讳簨浠� onclick: function(obj) {//鏁版嵁鍊肩偣鍑讳簨浠� @@ -275,11 +222,18 @@ }, tableButtonClick() { var me = this; - var tablebuttonclick = []; - tablebuttonclick = [ - { + var tablebuttonclick = {}; + tablebuttonclick.Open = [ + { + isbuttonshow: true, type: "primary", + code: "add", isselected: false, classname:"", + onclick: function(obj) { + me.onEditData("add", {}) + } + }, + { isbuttonshow: me.cbuttons_r.edit, type: "primary", - code: "edit", isselected: true, classname:"", + code: "change", isselected: true, classname:"", disabled: function(selectRowList) { var bo_ = true; if (selectRowList[0]) { @@ -310,10 +264,55 @@ me.onEditData("edit",obj.selectedList[0]) } }, - ] - me.selectTabObj.tablebuttonClick = tablebuttonclick + tablebuttonclick.alias = [ + { + isbuttonshow: true, type:"primary", + code: "add",isselected: false,classname: "", + onclick: function(obj) { + me.openCustomer('add') + } + }, + { + // name: "鍒犻櫎", // type: "primary", // icon: "el-icon-edit", + isbuttonshow: true, type: "danger", + code: "delete", isselected: true, classname: "", + disabled: function(selectRowList) { + var bo_ = true ; + if (selectRowList[0]) { + bo_ = false + } + return bo_; + }, + onclick: function(obj) { + me.delData() + } + }, + ] + tablebuttonclick.uploadlog = [ + { // 璇︽儏 + isbuttonshow: true, type: "primary", + code: "formdetail", isselected: true, classname:"", + disabled: function(selectRowList) { + var bo_ = true; + if (selectRowList[0]) { + bo_ = false; + } + return bo_ + }, + onclick: function(obj) { + me.onChangeLog("browse",obj.selectedList[0]) + } + }, + ] + + if (tablebuttonclick[this.activeTabName]) { + this.selectTabObj.tablebuttonClick = tablebuttonclick[this.activeTabName]; + } + else { + this.selectTabObj.tablebuttonClick = [] + } }, showInfo(obj, sceneCode) { @@ -339,7 +338,47 @@ }; me.doPopupByPublic(config); }, - + + delData: function(scope) { + let me = this; + var row = me.selectTabObj.selectedrow; + let name_ = "璇ユ暟鎹�"; + + if (!row.id) { + Root.message({ + type: 'warning', + message: '璇ヤ簨浠堕渶瀛樺湪鏁版嵁ID' + }); + return + } + if (row.name) { + name_ = "_" + row.name + "_"; + } + + Root.confirm('纭畾鍒犻櫎' + name_ + '鍚楋紵', '鍒犻櫎鎻愮ず', { + confirmButtonText: '鍒犻櫎', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + let param = { + id: row.id, + dataname: me.selectTabObj.dataname, + } + Server.call("root/data/deleteEntity", param, function(result) { + Root.message({ + type: 'success', + message: '鍒犻櫎鎴愬姛!' + }); + me.onQuery(); + }); + }).catch(() => { + Root.message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + commitData(obj) { var me = this; Root.confirm('纭畾鎻愪氦' + obj.name + '鐨勫彉鏇寸敵璇峰悧锛�', '鎻愪氦鎻愮ず', { @@ -401,6 +440,30 @@ me.onQuery(); // } + if (callback) { + callback(); + } + }, + }; + me.doPopupByPublic(config); + }, + + onChangeLog(sceneCode,row) { + var me = this; + + //3. popup + config = { + totab: false, + icon: "icon-product", + text: "缁堢鏇存敼淇℃伅", + width: "900px", + height: "400px", + id: "popup_hospital_log" + sceneCode, + url: "module/md/page/terminal/page/popup/popup_hospital_log.html", + sceneCode: sceneCode, + data: row, + delta: {}, + callback: function(obj, callback) { if (callback) { callback(); } @@ -684,7 +747,7 @@ --> <el-button v-show="cbuttons_r.export && selectTabObj.code == 'Open'" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> - <el-button v-show= "cbuttons_r.synchronous ? cbuttons_r.synchronous : false" type="primary" @click="getOA" :loading="loading_oa" icon="el-icon-refresh-right">鍚屾OA鍖婚櫌</el-button> + <!-- <el-button v-show= "cbuttons_r.synchronous ? cbuttons_r.synchronous : false" type="primary" @click="getOA" :loading="loading_oa" icon="el-icon-refresh-right">鍚屾OA鍖婚櫌</el-button> --> </el-button-group> <!-- <el-button-group v-show="selectTabObj.code == 'Open'" style="margin-left: 3px"> <el-button v-show="cbuttons_r.Import" @click="DownloadTemplate">妯℃澘涓嬭浇</el-button> -- Gitblit v1.8.0