From a8961c1d00c17a5aa2658884df9479ed6fba94c3 Mon Sep 17 00:00:00 2001
From: zhangyanpeng <bob.zhang@highdatas.com>
Date: 星期二, 27 八月 2024 12:40:32 +0800
Subject: [PATCH] 调整

---
 module/config/page/sys_menu_edit.html |    8 ++++----
 module/model/page/table_simple.html   |   41 +++++++++++++++++------------------------
 2 files changed, 21 insertions(+), 28 deletions(-)

diff --git a/module/config/page/sys_menu_edit.html b/module/config/page/sys_menu_edit.html
index 4ee0a66..8f12764 100644
--- a/module/config/page/sys_menu_edit.html
+++ b/module/config/page/sys_menu_edit.html
@@ -509,7 +509,7 @@
 								width: "900px",
 								height: "340px",
 								icon: "icon-product",
-								text: "鑿滃崟鏂板",
+								text: "鏂板椤甸潰",
 								id: "sys_menu_add",//totab: true鏃堕渶璁剧疆锛岀敤浜庡垽鏂槸鍚﹀凡鎵撳紑姝ら〉闈�
 								url: "module/config/page/sys_menu_add.html",
 								data: data,
@@ -808,7 +808,7 @@
 								width: "900px",
 								height: "340px",
 								icon: "icon-product",
-								text: "鑿滃崟鏂板",
+								text: "鏂板鑿滃崟",
 								id: "sys_menu_add",//totab: true鏃堕渶璁剧疆锛岀敤浜庡垽鏂槸鍚﹀凡鎵撳紑姝ら〉闈�
 								url: "module/config/page/sys_menu_add.html",
 								data: data,
@@ -1145,7 +1145,7 @@
 								<!-- 宸ュ叿鏍� -->
 								<div style="float: right; margin-right: 18px">
 									<el-button-group style="margin-left: 3px">
-										<el-button @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button>
+										<el-button @click="saveRowTable":icon="buttonsconfig.save.icon" :disabled="!formData.page_id">{{buttonsconfig.save.name}}</el-button>
 									</el-button-group>
 								</div>
 							</div>
@@ -1161,7 +1161,7 @@
 								</h-form>
 								
 								<h-table
-									v-if="isRefresh && tableFields.length"
+									v-if="isRefresh && tableFields.length && formData.page_id"
 									ref="table1"
 									:table-fields="tableFields" 
 									:table-data="tableData" 
diff --git a/module/model/page/table_simple.html b/module/model/page/table_simple.html
index 2a061fb..760154b 100644
--- a/module/model/page/table_simple.html
+++ b/module/model/page/table_simple.html
@@ -308,31 +308,29 @@
 						},
 						
 						DownloadTemplate() {
-							var pathurl = "";
-							if (this.selectTabObj.code == "amt_detail") {
-								pathurl = "template/1.瀵煎叆妯℃澘/鎶樻墸鏄庣粏瀵煎叆-鎶樻墸.xlsx"; 
+							var me = this;
+							let param_ = {
+								dataname: "sys_io",
+								filter: "task_name='import_" + this.dataname + "'",
 							}
-							else if (this.selectTabObj.code == "qty_detail") {
-								pathurl = "template/1.瀵煎叆妯℃澘/鎶樻墸鏄庣粏瀵煎叆-涔拌禒 .xlsx";
-							}
-							handleDownload(pathurl);
+							Server.call("root/data/getEntitySet", param_, function(result){
+								if (result.data && result.data.entityset && result.data.entityset.length) {
+									var io_ = result.data.entityset[0];
+									var pathurl = "template" + io_.template_name;
+									handleDownload(pathurl);
+								}
+							});
 						},
 						
 						onPopupByUploadFile() {
 							var me = this;
-							var ioname_ = ""
-							if (this.selectTabObj.code == 'amt_detail') {
-								ioname_ = "import_rebate_amt";
-							}
-							else if (this.selectTabObj.code == "qty_detail") {
-								ioname_ = "import_rebate_qty";
-							}
+							var ioname_ = "import_" + me.dataname
+							
 							var delta_ = {
 								filetypelist: [], 
 								isToDB: true,
-								dataname: this.selectTabObj.dataname,
-								tableFields: this.selectTabObj.tableFields,
-								otherSave: "salesBizLogic/saveDealerTargetByImport",
+								dataname: this.dataname,
+								tableFields: this.tableFields,
 							}
 							var config = {
 								totab: false,
@@ -342,12 +340,7 @@
 								id: "popup_uploadFileToDB",
 								url: "module/tool/page/popup_uploadFileToDB.html",
 								data: {
-									uploadType: "dealertarget",
-									tempTable: "temp_target_dealer",
-									operate_type: "dealertarget",
-									userid: me.userid,
-									ioname:ioname_,
-									// position_id: me.position_id,
+									ioname: ioname_,
 								},
 								delta: delta_,
 								callback: function(obj, callback) {
@@ -364,9 +357,9 @@
 							};
 							this.doPopupByPublic(config);
 						},
+						// 鏁版嵁瀵煎嚭
 						onDownload() {
 							let me = this;
-							// var filename = '鎶樻墸鏄庣粏瀵煎嚭' + String(new Date().getTime());
 							var filter_ = "1 = 1";
 							filter_ = this.getFilterData(filter_);
 							let param = {

--
Gitblit v1.8.0