From 41e6159cfa12416155adcd6747e48fab28ffc534 Mon Sep 17 00:00:00 2001 From: cyy <cuiqian2004@163.com> Date: 星期一, 26 八月 2024 22:45:17 +0800 Subject: [PATCH] test --- pages/modal/5600.vue | 75 +++++++++++++++++++++++++++++++------ 1 files changed, 63 insertions(+), 12 deletions(-) diff --git a/pages/modal/5600.vue b/pages/modal/5600.vue index b16d955..df1fcee 100644 --- a/pages/modal/5600.vue +++ b/pages/modal/5600.vue @@ -94,7 +94,8 @@ <view class="view-bottom" v-if="param.Sub_Page[0].OK_Button==true"> <button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button> - <button type="primary" @tap="ok" class="btn_add">{{translateSys('ok')}}</button> + <button type="primary" @tap="ok" class="btn_add" :class="okLoading?'btn_disabled':''" + :disabled="okLoading">{{translateSys('ok')}}</button> </view> </view> </swiper-item> @@ -143,7 +144,8 @@ <view class="view-bottom" v-if="param.Sub_Page[1].OK_Button==true"> <!-- --> <button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button> - <button type="primary" @tap="ok2" class="btn_add">{{translateSys('ok')}}</button> + <button type="primary" @tap="ok2" class="btn_add" :class="ok2Loading?'btn_disabled':''" + :disabled="ok2Loading">{{translateSys('ok')}}</button> </view> </view> </swiper-item> @@ -206,6 +208,8 @@ active_id: '', activelist: [], selectAttrObj: {}, + okLoading: false, + ok2Loading: false, }; }, onLoad(options) { @@ -539,6 +543,36 @@ }) }, + getUIStyleInfo(info) { //Mobox3鏁版嵁绫荤晫闈㈡牱寮�+ const loginInfo = this.$store.getters.loginid + const dataSApi = this.$store.getters.getDataSApi + return new Promise((resolve, reject) => { + uni.request({ + url: dataSApi + 'api/class/uistyle/GetInfo?sessionid=' + loginInfo.result + .session_id, + data: info, + method: 'POST', + dataType: "json", + success: (_res) => { + // console.log(_res); + const ret = _res.data + if (ret.err_code == 0) { + resolve(ret); + } else { + reject({ + "errMsg": ret.err_msg + }); + } + }, + fail: (err) => { + // console.log(err); + reject(err); + } + }) + + }) + + }, onClick(item) { this.focusFieldId = item.fieldId @@ -571,7 +605,7 @@ // .exec(); // } //console.log(item); - if (item.oldvalue != item.value) { + if (item.oldvalue != item.value && item.value.trim() != "") { item.oldvalue = item.value; var attr = item.fieldId; this.head_styledef.form.model[attr] = item.value; @@ -653,7 +687,7 @@ }, onEnterChange(item) { //鍥炶溅锛岀偣鍑绘寜閽紝鍙栨秷鑺傜偣浜嬩欢 // console.log(item); - if (item.oldvalue != item.value) { + if (item.oldvalue != item.value && item.value.trim() != "") { item.oldvalue = item.value; var attr = item.fieldId; this.head_styledef.form.model[attr] = item.value; @@ -843,7 +877,7 @@ this.translateSys( "quotation_mark_left") + value .page_name + this.translateSys( - "sys.quotation_mark_right") + + "quotation_mark_right") + this.translate( "are_you_sure_clear_last"), success: function(res) { @@ -1552,17 +1586,18 @@ uni.showModal({ title: this.translateSys("tip"), content: this.translate( - "page.tip_no_data_first") + + "tip_no_data_first") + this.translateSys( "quotation_mark_left") + this.param.Sub_Page[0].Name + this.translateSys( - "sys.quotation_mark_right") + + "quotation_mark_right") + this.translate( - "page.tip_no_data_last"), + "tip_no_data_last"), showCancel: false, confirmText: this.translateSys("cancel") }); return false; } + this.okLoading = true //鑾峰彇琛ㄥご灞炴� var head_attr = {}; this.$data.head_styledef.form.items.forEach(item => { @@ -1629,6 +1664,7 @@ }); const list = [] if (jsonlist.length == 0) { + //this.okLoading = false uni.showModal({ title: this.translateSys("tip"), content: this.translate("tip_no_select_data"), @@ -1665,17 +1701,18 @@ uni.showModal({ title: this.translateSys("tip"), content: this.translate( - "page.tip_no_data_first") + + "tip_no_data_first") + this.translateSys( "quotation_mark_left") + this.param.Sub_Page[1].Name + this.translateSys( - "sys.quotation_mark_right") + + "quotation_mark_right") + this.translate( - "page.tip_no_data_last"), + "tip_no_data_last"), showCancel: false, confirmText: this.translateSys("cancel") }); return false; } + this.ok2Loading = true //鑾峰彇琛ㄥご灞炴� var head_attr = {}; this.$data.head_styledef.form.items.forEach(item => { @@ -1741,6 +1778,7 @@ }); }); if (jsonlist.length == 0) { + this.ok2Loading = false uni.showModal({ title: this.translateSys("tip"), content: this.translate("tip_no_select_data"), @@ -1965,8 +2003,16 @@ confirmText: this.translateSys("cancel") }); } + if (type == "1") + this.okLoading = false + else if (type == "2") + this.ok2Loading = false }).catch(ex => { var tip = typeof ex == "string" ? ex : ex.errMsg; + if (type == "1") + this.okLoading = false + else if (type == "2") + this.ok2Loading = false uni.showModal({ title: this.translateSys("error") + "8.1", content: this.translate("execute_after_ok_event_failed") + this.translateSys( @@ -2209,16 +2255,21 @@ button.btn_add { width: 49.5%; - padding: 20rpx; line-height: 1.5; border: none; font-size: 38rpx; font-weight: bold; float: right; + color: #fff; display: inline-block; } + button.btn_disabled { + background-color: #ddd; + color: #888; + } + .logo { height: 100rpx; width: 460rpx; -- Gitblit v1.9.1