From 220cbe282c7e3326bc00f2ab0886475c1054f666 Mon Sep 17 00:00:00 2001 From: tom <tom.he@highdatas.com> Date: 星期二, 30 七月 2024 23:58:50 +0800 Subject: [PATCH] 调整 --- module/md/page/customer/page/evaluation_management.html | 132 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 115 insertions(+), 17 deletions(-) diff --git a/module/md/page/customer/page/evaluation_management.html b/module/md/page/customer/page/evaluation_management.html index 9434ffa..518268d 100644 --- a/module/md/page/customer/page/evaluation_management.html +++ b/module/md/page/customer/page/evaluation_management.html @@ -25,8 +25,8 @@ // // {code: "Closed", name: "澶辨晥", dataname:"so_implant", filterTxt: "state_code='Open'",}, // {code: "All", name: "鍏ㄩ儴", dataname: "md_target_dealer", filterTxt: "1 = 1", orderby: "update_time desc"}, - {code: "Current", name: "褰撳墠璇勪及", dataname: "md_target_dealer", filterTxt: "", orderby: ""}, - {code: "History", name: "鍘嗗彶璇勪及", dataname: "md_target_dealer", filterTxt: "", orderby: ""}, + {code: "Current", name: "褰撳墠璇勪及", dataname: "md_org", filterTxt: "1=1", orderby: ""}, + {code: "History", name: "鍘嗗彶璇勪及", dataname: "md_org", filterTxt: "1=1", orderby: ""}, // {code: "Apply", name: "鎸囨爣鐢宠", dataname: "md_target_apply", filterTxt: "1 = 1", orderby: "update_time desc"}, ], tabs: [], @@ -40,29 +40,29 @@ {isshow: "T", field: "customer_name", name: "鎺ㄥ箍鍟嗗悕绉�", filterfield:"", filteroperator: "like"}, ], default_tableFields: [ + // {isshow: "F", field: "id", name: "id", width: "70"}, //{isshow: "T", field: "category_id", name: "鍗忚绫诲瀷-ID", width: "100"}, - {isshow: "T", field: "year", name: "骞翠唤", width: "70"}, + {isshow: "T", field: "date", name: "璇勪及鏃ユ湡", width: "100"}, //{isshow: "T", field: "template_id", name: "妯℃澘-ID", width: "100"}, - {isshow: "T", field: "month", name: "鏈堜唤", width: "70"}, - {isshow: "T", field: "customer_code", name: "鎺ㄥ箍鍟嗙紪鐮�", width: "100"}, - {isshow: "T", field: "customer_name", name: "鎺ㄥ箍鍟嗗悕绉�", width: "220"}, + {isshow: "T", field: "code", name: "鎺ㄥ箍鍟嗙紪鐮�", width: "100"}, + {isshow: "T", field: "name", name: "鎺ㄥ箍鍟嗗悕绉�", width: "220",align:'left',isminwidth:'T'}, {isshow: "T", field: "score", name: "缁煎悎寰楀垎", width: "100"}, {isshow: "T", field: "rank", name: "绛夌骇鍒掑垎", width: "100"}, {isshow: "T", field: "sale_employe", name: "褰掑睘浜哄憳", width: "100"}, //{isshow: "T", field: "state_code", name: "鍗忚鐘舵��-缂栫爜", width: "100"}, // {isshow: "T", field: "state_name", name: "瀹㈣璇勪及", type:"tag", tagtype: '{^鑽夌^:^info^,^鐢熸晥^:^success^,^鍏抽棴^:^danger^}', width: "80"}, - {isshow: "T", field: "", name: "瀹㈣璇勪及", headercolor: "#bdf1ff", children: [ - {isshow: "T", field: "completion_rate", name: "瀹屾垚鐜�", width: "100", headercolor: "#bdf1ff"}, - {isshow: "T", field: "exploitation_rate", name: "寮�鍙戠巼", width: "100", headercolor: "#bdf1ff"}, - {isshow: "T", field: "growth_rate", name: "澧為暱鐜�", width: "100", headercolor: "#bdf1ff"}, - {isshow: "T", field: "reach_rate", name: "杈炬爣鍗犳瘮", width: "100", headercolor: "#bdf1ff",formatter:"formatter_percent",align:"right",suffix:"%"}, - ]}, - {isshow: "T", field: "", name: "涓昏璇勪及", headercolor: "#e5ffab", children: [ - {isshow: "T", field: "customer_item", name: "瀹㈡埛璇勪及", width: "100", headercolor: "#e5ffab"}, - {isshow: "T", field: "hospital_item", name: "鍖婚櫌璇勪及", width: "100", headercolor: "#e5ffab"}, - {isshow: "T", field: "employee_item", name: "閿�鍞瘎浼�", width: "100", headercolor: "#e5ffab"}, + // {isshow: "T", field: "", name: "瀹㈣璇勪及", headercolor: "#bdf1ff", children: [ + // {isshow: "T", field: "completion_rate", name: "瀹屾垚鐜�", width: "100", headercolor: "#bdf1ff"}, + // {isshow: "T", field: "exploitation_rate", name: "寮�鍙戠巼", width: "100", headercolor: "#bdf1ff"}, + // {isshow: "T", field: "growth_rate", name: "澧為暱鐜�", width: "100", headercolor: "#bdf1ff"}, + // {isshow: "T", field: "reach_rate", name: "杈炬爣鍗犳瘮", width: "100", headercolor: "#bdf1ff",formatter:"formatter_percent",align:"right",suffix:"%"}, + // ]}, + // {isshow: "T", field: "", name: "涓昏璇勪及", headercolor: "#e5ffab", children: [ + // {isshow: "T", field: "customer_item", name: "瀹㈡埛璇勪及", width: "100", headercolor: "#e5ffab"}, + // {isshow: "T", field: "hospital_item", name: "鍖婚櫌璇勪及", width: "100", headercolor: "#e5ffab"}, + // {isshow: "T", field: "employee_item", name: "閿�鍞瘎浼�", width: "100", headercolor: "#e5ffab"}, - ]}, + // ]}, ], cbuttons_r: {}, ctabs_r: {}, @@ -143,6 +143,7 @@ initData() { var me = this; + me.tableButtonClick(); this.doQueryByTab(function(result, callback) {//鏌ヨ鍚庣殑鍥炶皟锛岀敤浜庤幏鍙栧瓧娈电殑 if (result.meta && result.meta[me.selectTabObj.dataname] && result.meta[me.selectTabObj.dataname].fields) { var metas = clone(result.meta[me.selectTabObj.dataname].fields); @@ -176,6 +177,102 @@ var me = this; var tablefieldClick = {}; this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; + }, + tableButtonClick() { + var me = this; + var tablebuttonClick = {}; + tablebuttonClick.Current = [ + { + isbuttonshow: true, + type:"primary", + code: "edit", + isselected: true, + classname: "", + disabled: function(selectRowList) { + var bo_ = true; + if (selectRowList[0]) { + bo_ = false; + } + return bo_ + }, + onclick: function(obj) { + me.openCustomer('edit',obj.selectedList[0]) + } + }, + { + // isbuttonshow: me.cbuttons_r.formdetail, + 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.openCustomer('browse',obj.selectedList[0]) + } + } + ]; + tablebuttonClick.History = [ + { + // isbuttonshow: me.cbuttons_r.formdetail, + 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.openCustomer('browse',obj.selectedList[0]) + } + } + ] + me.selectTabObj.tablebuttonClick = tablebuttonClick[this.activeTabName] + }, + openCustomer(sceneCode, obj) { + let me = this; + var row = {} + if (sceneCode == "edit" || sceneCode == "browse") { + row = me.selectTabObj.selectedrow; + if(!row){ + Root.message({ + type: 'warning', + message: '璇烽�夋嫨涓�鏉℃暟鎹�' + }); + return; + } + } + + var config = { + totab: true, //true: 浠ab瀵艰埅鐨勬柟寮忔墦寮� + width: "1100px", + height: "520px", + icon: "icon-product", + text: "鎺ㄥ箍鍟嗕俊鎭�" + (row.customer_code ? ("-" + row.customer_code) : ""), + id: "evaluation_management_edit" + row.id + sceneCode, + url: "module/md/page/customer/page/evaluation_management_edit.html", + data: row, + delta: {}, + sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", + callback: function(obj, callback) { + me.onQuery(); + if (callback) { + callback(); + } + } + }; + me.doPopupByPublic(config); }, } @@ -234,6 +331,7 @@ :is-highlight-row="selectTabObj.isHighlightRow" :isdraggableorder="cbuttons_r.Set" :filtersobj="selectTabObj.filterObj" + :table-buttons-click="selectTabObj.tablebuttonClick" v-on:get-data="getData" v-on:edit-data="editData" -- Gitblit v1.8.0