From 2cff35f53efc4d364f5dbab7356d3875d1e23dab Mon Sep 17 00:00:00 2001
From: tom <tom.he@highdatas.com>
Date: 星期日, 04 八月 2024 15:51:09 +0800
Subject: [PATCH] 调整

---
 module/md/page/terminal/page/hospital_list.html |  185 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 179 insertions(+), 6 deletions(-)

diff --git a/module/md/page/terminal/page/hospital_list.html b/module/md/page/terminal/page/hospital_list.html
index a94d4b8..b4981b4 100644
--- a/module/md/page/terminal/page/hospital_list.html
+++ b/module/md/page/terminal/page/hospital_list.html
@@ -2,7 +2,7 @@
 <html>
 	<head>
 		<meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
-		<title>鍖婚櫌绠$悊</title>
+		<title>杈栧尯缁堢</title>
 		
 		<script type="text/javascript">
 			var pageVue = null;
@@ -15,10 +15,11 @@
 				pageVue = new TabTableVue({
 					el: "#vbody",
 					data: {
-						title: "鍖婚櫌绠$悊",
+						title: "杈栧尯缁堢",
 						//Tab椤硅缃�
 						tabs_d: [
-							{code: "hospital", name: "杈栧尯鍖婚櫌", dataname: "md_position_hospital", filterTxt: "", orderby: "md_position_hospital.update_time desc"},
+							{code: "hospital", name: "杈栧尯缁堢", dataname: "md_position_hospital", filterTxt: "", orderby: "md_position_hospital.update_time desc"},
+							{code: "linkpharmacy", name: "鍏宠仈鑽簵", dataname: "md_position_hospital_pharmacy", filterTxt: "", orderby: "md_position_hospital_pharmacy.update_time desc"},
 							// {code: "hospital", name: "杈栧尯鍖婚櫌鐢宠", dataname: "md_position_hospital", filterTxt: " (md_position_hospital.state_code='Input' or md_position_hospital.state_code='OpeningApproval')", orderby: "update_time desc"},
 							// {code: "infoAll", name: "杈栧尯鍖婚櫌", dataname: "md_position_hospital", filterTxt: "md_position_hospital.state_code='Open'", orderby: "update_time desc"},
 						],
@@ -232,6 +233,34 @@
 									},
 								}
 							};
+							var tablefieldClick_linkpharmacy = {
+								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);
+										},
+									},	
+								},
+							};
 							//杈栧尯鍙樻洿
 							var tablefieldClick_info = {
 								//waiting
@@ -369,6 +398,10 @@
 							if (this.selectTabObj.code == "hospital") {
 								this.selectTabObj.tablefieldClick = tablefieldClick_hospital;
 							}
+							// 鍏宠仈鑽簵
+							else if (this.selectTabObj.code == "linkpharmacy") {
+								this.selectTabObj.tablefieldClick = tablefieldClick_linkpharmacy;
+							}
 							//杈栧尯鏂板/鍙樻洿-杈栧尯瀹℃壒涓�佸叏閮ㄨ緰鍖虹敵璇穞ab
 							else if (this.selectTabObj.code == "infoUnderApproval" || this.selectTabObj.code == "infoAll") {
 								this.selectTabObj.tablefieldClick = tablefieldClick_info;
@@ -441,7 +474,86 @@
 									}
 								}
 							];
-							
+							tablebuttonClick.linkpharmacy = [
+								{
+									// name: "鏂板", // type: "primary", // icon: "el-icon-edit",
+									isbuttonshow: me.cbuttons_r.add ? me.cbuttons_r.add : false,
+									code: "add", isselected: false, classname: "",
+									onclick: function(obj) {
+										// obj.selectedList
+										me.openLinkpharmacy('add', obj.selectedList[0]);
+									}
+								},
+								{
+									// name: "鎻愪氦", // type: "primary", // icon: "el-icon-edit",
+									isbuttonshow: me.cbuttons_r.submit ? me.cbuttons_r.submit : false,	type: "success",
+									code: "submit", isselected: true, classname: "",
+									disabled: function(selectRowList) {
+										var bo_ = true;
+										if (selectRowList[0] && selectRowList[0].state_code == "Input") {
+											bo_ = false;
+										}
+										return bo_
+									},
+									onclick: function(obj) {
+										
+										// obj.selectedList
+										// me.closeData('browse', obj.selectedList[0]);
+										// me.commitData(obj.selectedList[0]);
+										me.openLinkpharmacy('edit', obj.selectedList[0]);
+									}
+								},
+								{
+									// name: "璇︽儏", // type: "primary", // icon: "el-icon-edit",
+									isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false,	
+									code: "formdetail", isselected: true, classname: "",
+									disabled: function(selectRowList) {
+										var bo_ = true;
+										if (selectRowList[0]) {
+											bo_ = false;
+										}
+										return bo_
+									},
+									onclick: function(obj) {
+										// obj.selectedList
+										me.openLinkpharmacy('browse', obj.selectedList[0]);
+									}
+								},
+								{
+									// name: "缂栬緫", // type: "primary", // icon: "el-icon-edit",
+									isbuttonshow: me.cbuttons_r.edit ? me.cbuttons_r.edit : false,
+									code: "edit", isselected: true, classname: "",
+									disabled: function(selectRowList) {
+										var bo_ = true;
+										if (selectRowList[0] && selectRowList[0].state_code == "Input") {
+											bo_ = false;
+										}
+										return bo_
+									},
+									onclick: function(obj) {
+										// obj.selectedList
+										me.openLinkpharmacy('edit', obj.selectedList[0]);
+									}
+								},
+								{
+									// name: "鍒犻櫎", // type: "primary", // icon: "el-icon-edit",
+									isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false,	type: "danger",
+									code: "delete", isselected: true, classname: "",
+									disabled: function(selectRowList) {
+										var bo_ = true;
+										if (selectRowList[0] && selectRowList[0].state_code == "Input") {
+											bo_ = false;
+										}
+										return bo_
+									},
+									onclick: function(obj) {
+										me.delData()
+										// obj.selectedList
+										// me.closeData('browse', obj.selectedList[0]);
+										// me.closeData();
+									}
+								},
+							];
 							tablebuttonClick.infoUnderApproval = [
 								{
 									isbuttonshow:  me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false,type:"primary",
@@ -538,6 +650,41 @@
 									message: '宸插彇娑�'
 								});          
 							});
+						},
+						
+						openLinkpharmacy(sceneCode, obj) {
+							let me = this;
+							var row = {}
+							if (sceneCode == "edit" || sceneCode == "browse" || sceneCode == "change") {
+								row = me.selectTabObj.selectedrow;
+								if(!row){
+									Root.message({
+										type: 'warning',
+										message: '璇烽�夋嫨涓�鏉℃暟鎹�'
+									});
+									return;
+								}
+							}
+							
+							var config = {
+								totab: false, //true: 浠ab瀵艰埅鐨勬柟寮忔墦寮�
+								width: "900px",
+								height: "320px",
+								icon: "icon-product",
+								text: "鍏宠仈闄㈠搴�" + (row.pharmacy_name ? ("-" + row.pharmacy_name ) : ""),
+								id: "linkpharmacy_info" + row.id + sceneCode,//totab: true鏃堕渶璁剧疆锛岀敤浜庡垽鏂槸鍚﹀凡鎵撳紑姝ら〉闈�
+								url: "module/md/page/terminal/page/linkpharmacy_info.html",
+								data: row,
+								delta: {},
+								sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse",
+								callback: function(obj, callback) {
+									me.onQuery();
+									if (callback) {
+										callback();
+									}
+								}
+							};
+							me.doPopupByPublic(config);
 						},
 						
 						openPolicy(sceneCode, row) {
@@ -964,7 +1111,32 @@
 							};
 							this.doPopupByPublic(config);
 						},
-												
+						
+						onShowLinkPharmacy() {
+							var me = this;
+							var row = me.selectTabObj.selectedrow;
+						
+							var config = {
+								totab: false, //true: 浠ab瀵艰埅鐨勬柟寮忔墦寮�
+								width: "950px",
+								height: "300px",
+								icon: "icon-product",
+								text: row.hospital_name + "-鍏宠仈闄㈠搴�",
+								id: "popup_linkpharmacy_list" + row.id + "browse",//totab: true鏃堕渶璁剧疆锛岀敤浜庡垽鏂槸鍚﹀凡鎵撳紑姝ら〉闈�
+								url: "module/md/page/terminal/page/popup/popup_linkpharmacy_list.html",
+								data: row,
+								delta: {},
+								filter: "hospital_id='"+ row.hospital_id +"'",
+								sceneCode: 'browse',//"edit", //"add"//"browse",
+								callback: function(obj, callback) {
+									if (callback) {
+										callback();
+									}
+								}
+							};
+							me.doPopupByPublic(config);
+						},
+						
 					}
 				});
 			};
@@ -994,7 +1166,8 @@
 					<span>{{title}}</span>
 
 					<div style="float: right;">
-						<el-button-group style="margin-left: 3px">
+						<el-button-group v-if="selectTabObj && selectTabObj.code == 'hospital'" style="margin-left: 3px">
+							<el-button v-show="cbuttons_r.linkpharmacy" @click="onShowLinkPharmacy">鍏宠仈闄㈠搴�</el-button>
 							<el-button v-show="cbuttons_r.downloadTemplate" @click="DownloadTemplate">妯℃澘涓嬭浇</el-button>
 							<el-tooltip class="item" effect="dark" :content="buttonsconfig.clearandappend.tooltip" placement="top-start">
 								<el-button v-show="cbuttons_r.import" @click="onPopupByUploadFile":icon="buttonsconfig.clearandappend.icon">{{buttonsconfig.clearandappend.name}}</el-button>

--
Gitblit v1.8.0