| | |
| | | name: "", |
| | | pwd: "" |
| | | }, |
| | | sessionId: "" |
| | | sessionId: "", |
| | | bindClasses: false, |
| | | classes: "" |
| | | }, |
| | | onLaunch: function() { |
| | | console.log('App Launch'); |
| | |
| | | 2025.05.20 |
| | | 1.添加登陆时绑定班次 |
| | | 2025.05.15 |
| | | 1.mobox3功能点3202 |
| | | 2025.03.20 |
| | | 1.升级到vue3 |
| | | App 平台:在 App 平台上,Vue 3 的性能和功能表现良好,但需要注意一些特定的配置,例如在 nvue 中使用 Vuex。 |
| | |
| | | "page.server": "Server", |
| | | "page.mobox3_app_type": "Mobox3 PDA application types", |
| | | "page.mobox3_port": "Mobox3 service port", |
| | | "page.mobox3_bind_classes_when_logging_in": "Bind classes when logging in to mobox3", |
| | | "page.bind_class": "Bind classes", |
| | | "page.classes": "Classes", |
| | | "page.input_server": "Please enter the server", |
| | | "page.set_server": "Set up services", |
| | | "page.tip_app_update": "Is there a new version of the system that needs to be updated?", |
| | |
| | | "page.tip_get_file_fail_last": "file", |
| | | "page.update_success": "Update success", |
| | | "page.update_fail": "Update failed", |
| | | "page.get_classes_fail": "Failed to obtain shift information", |
| | | "page.please_login_after_admin_add_classes": "The shift list is empty. Please contact the administrator to add a shift before logging in!", |
| | | |
| | | "page.tip_no_app_param": "No parameters have been configured for this feature; please reconfigure them.", |
| | | "page.select_user": "Select personnel", |
| | |
| | | "page.server": "Servidor", |
| | | "page.mobox3_app_type": "Tipo de aplicación PDA mobox3", |
| | | "page.mobox3_port": "Puerto de servicio mobox3", |
| | | "mobox3_bind_classes_when_logging_in": "Mobox3 se une a los turnos al iniciar sesión", |
| | | "page.bind_classes": "Turnos vinculados", |
| | | "page.classes": "Turnos", |
| | | "page.input_server": "Por favor, introduzca el servidor", |
| | | "page.set_server": "Establecer servicio", |
| | | "page.tip_app_update": "¿El sistema tiene una nueva versión, ¿ necesita actualizarse?", |
| | |
| | | "page.tip_get_file_fail_last": "", |
| | | "page.update_success": "Actualización exitosa", |
| | | "page.update_fail": "Actualización fallida", |
| | | "page.get_classes_fail": "Falló la adquisición del turno", |
| | | "page.please_login_after_admin_add_classes": "¡La lista de turnos está vacía, ¡ Póngase en contacto con el Administrador para agregar turnos antes de iniciar sesión!", |
| | | |
| | | "page.tip_no_app_param": "El punto de función no está configurado con parámetros, por favor reconfigurar los parámetros", |
| | | "page.select_user": "Selección de personas", |
| | |
| | | "page.server": "服务地址", |
| | | "page.mobox3_app_type": "mobox3 pda应用类型", |
| | | "page.mobox3_port": "mobox3服务端口", |
| | | |
| | | "page.mobox3_bind_classes_when_logging_in": "mobox3 登录时绑定班次", |
| | | "page.bind_classes": "绑定班次", |
| | | "page.classes": "班次", |
| | | "page.input_server": "请输入服务地址", |
| | | "page.set_server": "设置服务", |
| | | "page.tip_app_update": "系统有新版本,是否需要更新?", |
| | |
| | | "page.tip_get_file_fail_last": "文件失败", |
| | | "page.update_success": "更新成功", |
| | | "page.update_fail": "更新失败", |
| | | "page.get_classes_fail": "获取班次失败", |
| | | "page.please_login_after_admin_add_classes": "班次列表为空,请联系管理员添加班次后再登录!", |
| | | |
| | | |
| | | |
| | | "page.tip_no_app_param": "该功能点未配置参数,请重新配置参数", |
| | |
| | | "page.server": "服務地址", |
| | | "page.mobox3_app_type": "mobox3 pda應用類型", |
| | | "page.mobox3_port": "mobox3服務埠", |
| | | "page.mobox3_bind_classes_when_logging_in": "mobox3登入時綁定班次", |
| | | "page.bind_classes": "綁定班次", |
| | | "page.classes": "班次", |
| | | "page.input_server": "請輸入服務地址", |
| | | "page.set_server": "設定服務", |
| | | "page.tip_app_update": "系統有新版本,是否需要更新?", |
| | |
| | | "page.tip_get_file_fail_last": "檔案失敗", |
| | | "page.update_success": "更新成功", |
| | | "page.update_fail": "更新失敗", |
| | | "page.get_classes_fail": "獲取班次失敗", |
| | | "page.please_login_after_admin_add_classes": "班次清單為空,請聯系管理員添加班次後再登入!", |
| | | |
| | | "page.tip_no_app_param": "該功能點未配寘參數,請重新配寘參數", |
| | | "page.select_user": "選擇人員", |
| | |
| | | </view> |
| | | </uni-popup> |
| | | <!-- 版本升级弹窗结束 --> |
| | | <uni-popup ref="refClassDialog" type="dialog"> |
| | | <uni-popup-dialog mode="info" :title="$t('page.bind_classes')" @confirm="dialogClassConfirm"> |
| | | <view class="popup-class"> |
| | | <view class="popup-class-item" :style="{color:item.text == selectedClasses ? '#27A6E1' :''}" |
| | | v-for="(item,index) in classesLst" :key="index" @click="clickSelectClass(item)"> |
| | | <view class="ico"><uni-icons v-if="item.text == selectedClasses" type="checkmarkempty" |
| | | :color="item.text == selectedClasses ? '#27A6E1' :''" size="24"></uni-icons></view> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | </uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- <button @click="onClickWms">登录wms</button> |
| | | <view class="webview"> |
| | |
| | | getApkVersionInfo |
| | | } from "@/api/index.js" |
| | | import buttonClickMixin from '@/mixins/button-click.js'; |
| | | |
| | | import { |
| | | dictGetInfo |
| | | } from "@/api/mobox.js" |
| | | import utils from "@/js/utils.js" |
| | | export default { |
| | | mixins: [buttonClickMixin], |
| | |
| | | downloadUrl: "", //安卓app下载链接 |
| | | percentage: 0, //下载进度 |
| | | showBtns: true, |
| | | selectedClasses: "", |
| | | classesLst: [], |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | // }, 3000) |
| | | // }, 3000) |
| | | }, |
| | | |
| | | rememberPwd(e) { //记住密码 |
| | | console.log(e.target); |
| | | utils.session.setValue('account', ''); |
| | |
| | | pwd: this.userPwd |
| | | } |
| | | hideLoading() |
| | | const bindInfo = utils.session.getValue('bind_classes') |
| | | app.globalData.bindClasses = bindInfo?.checked || false |
| | | if (app.globalData.bindClasses) { |
| | | this.selectedClasses = bindInfo?.classes || "" |
| | | await this.loadClassesList() |
| | | if (this.classesLst.length > 0) { |
| | | this.$refs.refClassDialog.open() |
| | | |
| | | } |
| | | return |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../index/index?args=9999999999' |
| | | }) |
| | | |
| | | |
| | | |
| | | } catch (ex) { |
| | | hideLoading() |
| | |
| | | plus.runtime.openURL(otherAppSchemeURL, function(error) { |
| | | console.error('打开应用失败: ', error); |
| | | }, "uni.TeatApp"); |
| | | }, |
| | | async loadClassesList() { |
| | | try { |
| | | var $this = this; |
| | | var dataInfo = { |
| | | dict_id: "", |
| | | dict_name: "WMS_CLASSES" |
| | | }; |
| | | const res = await dictGetInfo(dataInfo) |
| | | var list = []; |
| | | (res.dict_item_list || []).forEach((item) => { |
| | | list.push({ |
| | | text: item.value ? item.value : item.name, |
| | | value: item.name, |
| | | }); |
| | | }); |
| | | |
| | | if (list.length == 0) { |
| | | uni.showModal({ |
| | | title: this.translate("get_classes_fail"), |
| | | content: this.translate("page.please_login_after_admin_add_classes"), |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | this.selectedClasses = "" |
| | | } else { |
| | | if (this.selectedClasses) { |
| | | const curIndex = list.findIndex((a) => { |
| | | return a.text == this.selectedClasses |
| | | }) |
| | | if (curIndex < 0) { |
| | | this.selectedClasses = list[0].text |
| | | } |
| | | } else { |
| | | this.selectedClasses = list[0].text |
| | | } |
| | | } |
| | | this.classesLst = list |
| | | |
| | | |
| | | } catch (ex) { |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translate("get_classes_fail"), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | this.selectedClasses = "" |
| | | this.classesLst = [] |
| | | // { |
| | | // text: "测试", |
| | | // value: "test" |
| | | // }, { |
| | | // text: "测试3", |
| | | // value: "test3" |
| | | // } |
| | | } |
| | | }, |
| | | dialogClassConfirm() { |
| | | |
| | | utils.session.setValue('bind_classes', { |
| | | checked: true, |
| | | classes: this.selectedClasses |
| | | }) |
| | | getApp().globalData.classes = this.selectedClasses |
| | | uni.navigateTo({ |
| | | url: '../index/index?args=9999999999' |
| | | }) |
| | | }, |
| | | clickSelectClass(item) { |
| | | this.selectedClasses = item.text |
| | | }, |
| | | translate(t) { |
| | | if (typeof this.$t == "function") return this.$t(`page.${t}`) |
| | |
| | | border: none; |
| | | color: #fff; |
| | | } |
| | | |
| | | .popup-class { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | |
| | | .popup-class-item { |
| | | padding: 20rpx 0; |
| | | border-bottom: 1px solid #eee; |
| | | display: flex; |
| | | flex-direction: row; |
| | | |
| | | .ico { |
| | | width: 20px; |
| | | margin: 0 20rpx; |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <input type="number" class="input-wrapper" v-model="form.mongodbSPort"> |
| | | </uni-forms-item> |
| | | </uni-section> |
| | | <view> {{translateSys('page.mobox3_bind_classes_when_logging_in')}} |
| | | <switch :checked="form.bindClasses" style="transform:scale(0.7)" @change="switchBindClasses" /> |
| | | </view> |
| | | </uni-forms> |
| | | <button id='ok' type="default" @tap="onOk" class="btn_ok">{{translateSys("sys.ok")}}</button> |
| | | |
| | |
| | | moboxSPort: "", |
| | | dataSPort: "", |
| | | mongodbSPort: "", |
| | | } |
| | | bindClasses: false |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | |
| | | utils.session.setValue('server', this.form.server); |
| | | utils.session.setValue('app_type', this.form.appType); |
| | | let bindInfo = utils.session.getValue('bind_classes') |
| | | utils.session.setValue('bind_classes', { |
| | | checked: this.form.bindClasses, |
| | | classes: bindInfo?.classes ||"" |
| | | }); |
| | | utils.session.setValue('mobox3_port', { |
| | | org: this.form.orgSPort, |
| | | mobox: this.form.moboxSPort, |
| | | data: this.form.dataSPort, |
| | | mongodb: this.form.mongodbSPort |
| | | }); |
| | | |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('exitSetEvent', this.form.server); |
| | | |
| | |
| | | |
| | | // }); |
| | | }, |
| | | switchBindClasses(e) { |
| | | this.form.bindClasses = e.detail.value |
| | | }, |
| | | translateSys(t) { |
| | | if (typeof this.$t == "function") return this.$t(`${t}`) |
| | | else return t; |
| | |
| | | }, |
| | | onLoad() { |
| | | |
| | | |
| | | this.form.server = utils.session.getValue('server') || ""; |
| | | this.form.appType = utils.session.getValue('app_type') || "MES"; |
| | | this.form.bindClasses = utils.session.getValue('bind_classes')?.checked || false |
| | | const mobox3Port = utils.session.getValue('mobox3_port'); |
| | | this.form.orgSPort = mobox3Port?.org || 5101 |
| | | this.form.moboxSPort = mobox3Port?.mobox || 5102 |
| | |
| | | flex-direction: column !important; |
| | | |
| | | .form { |
| | | padding: 20rpx; |
| | | padding: 10rpx 20rpx; |
| | | |
| | | } |
| | | |
| | |
| | | padding: 12rpx 8rpx; |
| | | } |
| | | |
| | | .uni-forms-item { |
| | | margin: 20rpx; |
| | | } |
| | | |
| | | button.btn_ok { |
| | | margin-top: 50rpx; |
| | | width: 100%; |
| | | margin-top: 10rpx 25rpx; |
| | | width: calc(100% - 50rpx); |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #27A6E1; |
| | |
| | | } |
| | | } |
| | | } |
| | | const app = getApp() |
| | | if (app.globalData.bindClasses) { |
| | | styledefHead.form.items.push({ |
| | | name: "Input", |
| | | label: this.translate("classes"), |
| | | labelWidth: 100, |
| | | disabled: true, |
| | | value: app.globalData.classes, |
| | | setting: { |
| | | width: 100, |
| | | height: 50, |
| | | }, |
| | | bind: { |
| | | attr: "", |
| | | }, |
| | | fieldId: "S_CLASSES", |
| | | }) |
| | | styledefHead.form.model["S_CLASSES"] = app.globalData.classes |
| | | } |
| | | |
| | | } |
| | | $this.setData({ |
| | |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | this.$refs.popup.open(this.popupType); |
| | | |
| | | this.dataObjRunCustomEvent_Return(onSuffixClickEvent.id, '', onSuffixClickCallbackEvent.id, |
| | | this.dataObjRunCustomEvent_Return(onSuffixClickEvent.id, '', onSuffixClickCallbackEvent |
| | | .id, |
| | | item); |
| | | }, |
| | | popupChange(e) { |
| | |
| | | // } |
| | | enviroment = Base64.encode(JSON.stringify(enviroment)); //将字符串转换为base64编码 |
| | | var input_param = Base64.encode(JSON.stringify(info.attr)); //将字符串转换为base64编码 |
| | | var global_attr = Base64.encode(JSON.stringify(this.global_attr)); //将字符串转换为base64编码 |
| | | var global_attr = Base64.encode(JSON.stringify(this |
| | | .global_attr)); //将字符串转换为base64编码 |
| | | if (info.dataJson) |
| | | info.dataJson = Base64.encode(JSON.stringify(info.dataJson)); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | |
| | | }); |
| | | } else uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip + ',' + this.translateSys('tip') + ':' + data |
| | | content: tip + ',' + this.translateSys('tip') + ':' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : |
| | | data |
| | | .info |
| | | .join( |
| | | '<br/>') : ''; |
| | |
| | | class_id: $this.param.DataCls.id, //当前数据类id |
| | | } |
| | | extinfo = Base64.encode(JSON.stringify(extinfo)); //将字符串转换为base64编码 |
| | | var global_attr = Base64.encode(JSON.stringify($this.global_attr)); //将字符串转换为base64编码 |
| | | var global_attr = Base64.encode(JSON.stringify($this |
| | | .global_attr)); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | | req.forEach(item2 => { |
| | | obj_attr[item2.attr] = item2.value; |
| | |
| | | }); |
| | | } else uni.showModal({ |
| | | title: $this.translateSys("tip"), |
| | | content: tip + ',' + $this.translateSys('tip') + ':' + data |
| | | content: tip + ',' + $this.translateSys('tip') + ':' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: $this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : |
| | | data |
| | | .info |
| | | .join( |
| | | '<br/>') : ''; |
| | |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | $this.translateSys("tip"), |
| | | content: $this.translateSys("quotation_mark_left") + |
| | | action.action_type + $this.translateSys( |
| | | content: $this.translateSys( |
| | | "quotation_mark_left") + |
| | | action.action_type + $this |
| | | .translateSys( |
| | | "quotation_mark_right") + |
| | | $this.translate("tip_action_unprocessed") |
| | | $this.translate( |
| | | "tip_action_unprocessed") |
| | | }); |
| | | d.show(); |
| | | } else if (action.action_type == 'open_select_userdlg') { |
| | | } else if (action.action_type == |
| | | 'open_select_userdlg') { |
| | | var style = val.style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var param = { |
| | |
| | | inputparameter: data, |
| | | dataJson: [], |
| | | } |
| | | $this.DataObjRunCustomEvent(info, |
| | | $this.DataObjRunCustomEvent( |
| | | info, |
| | | param |
| | | .data_attr); |
| | | } |
| | | } |
| | | }); |
| | | } else if (action.action_type == 'open_data_query_dlg') { |
| | | } else if (action.action_type == |
| | | 'open_data_query_dlg') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | $this.translateSys("tip"), |
| | |
| | | $this.setData({ |
| | | check_list: val.config |
| | | }) |
| | | if (val.config.appear_style == 'sideslip') //判断是否是侧滑 |
| | | if (val.config.appear_style == |
| | | 'sideslip') //判断是否是侧滑 |
| | | $this.setData({ |
| | | popupType: "right" |
| | | }) |
| | |
| | | popupParam: popupParam |
| | | }) |
| | | } |
| | | } else if (action.action_type == 'open_project_query_dlg') { |
| | | } else if (action.action_type == |
| | | 'open_project_query_dlg') { |
| | | //console.log(action.value.select_range); |
| | | //console.log(action.value.mulit_select); |
| | | var priRel = '-1'; |
| | |
| | | priRel = '1'; |
| | | else if (action.value.select_range == '我创建的') |
| | | priRel = '2'; |
| | | else if (action.value.select_range == '我参与的' || action |
| | | else if (action.value.select_range == '我参与的' || |
| | | action |
| | | .value |
| | | .select_range == '我参加的') |
| | | priRel = '3'; |
| | |
| | | req: req |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selPrj/index?relation=' + priRel + |
| | | url: '../selPrj/index?relation=' + |
| | | priRel + |
| | | '¶m=' + |
| | | JSON.stringify(param_), |
| | | events: { |
| | |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "2", |
| | | projectid: data[0].ID, |
| | | projectid: data[0] |
| | | .ID, |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: "", |
| | |
| | | dataJson: [], |
| | | } |
| | | |
| | | $this.DataObjRunCustomEvent( |
| | | $this |
| | | .DataObjRunCustomEvent( |
| | | info); |
| | | } |
| | | } |
| | |
| | | title: $this.translateSys("tip"), |
| | | content: $this.translateSys( |
| | | "quotation_mark_left") + |
| | | action.action_type + $this.translateSys( |
| | | action.action_type + $this |
| | | .translateSys( |
| | | "quotation_mark_right") + $this |
| | | .translate( |
| | | "tip_action_unprocessed"), |
| | | showCancel: false, |
| | | confirmText: $this.translateSys('close') |
| | | confirmText: $this.translateSys( |
| | | 'close') |
| | | }); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | uni.showModal({ |
| | | title: $this.translateSys('tip') + "5.2", |
| | | content: $this.translateSys("quotation_mark_left") + |
| | | content: $this.translateSys( |
| | | "quotation_mark_left") + |
| | | "before_click_button" + $this.translateSys( |
| | | "quotation_mark_right") + $this.translateSys( |
| | | "quotation_mark_right") + $this |
| | | .translateSys( |
| | | "comma") + 'event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: $this.translateSys('close') |
| | |
| | | }); |
| | | } else uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip + ',' + this.translateSys('tip') + ':' + data |
| | | content: tip + ',' + this.translateSys('tip') + ':' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | |
| | | this.saving = false |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : |
| | | data |
| | | .info |
| | | .join( |
| | | '<br/>') : ''; |
| | |
| | | if (!this.param.After_Btn_Not_Refresh) { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this.$data |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this |
| | | .$data |
| | | .param) + |
| | | "&titlename=" + this.title |
| | | }); |
| | |
| | | value: obj_attr[a], |
| | | })), |
| | | }; |
| | | if (!this.after_ok.id.includes('{')) this.after_ok.id = '{' + this.after_ok.id + '}'; |
| | | if (!this.after_ok.id.includes('{')) this.after_ok.id = '{' + this.after_ok.id + |
| | | '}'; |
| | | var dataInfo = { |
| | | ed_type: "0", |
| | | start_transaction: true, |
| | |
| | | }); |
| | | } else uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip + ',' + this.translateSys('tip') + ':' + data |
| | | content: tip + ',' + this.translateSys('tip') + ':' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | |
| | | this.saving = false |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : |
| | | data |
| | | .info |
| | | .join( |
| | | '<br/>') : ''; |
| | |
| | | if (!this.param.After_Btn_Not_Refresh) { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this.$data |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this |
| | | .$data |
| | | .param) + |
| | | "&titlename=" + this.title |
| | | }); |
| | |
| | | }); |
| | | } else uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip + ',' + this.translateSys('tip') + ':' + data |
| | | content: tip + ',' + this.translateSys('tip') + ':' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : |
| | | data |
| | | .info |
| | | .join( |
| | | '<br/>') : ''; |
| | |
| | | if (!this.param.After_Btn_Not_Refresh) { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this.$data |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this |
| | | .$data |
| | | .param) + |
| | | "&titlename=" + this.title |
| | | }); |
| | |
| | | cls_name: btn.Cls_Name, |
| | | Edit_dlg: btn.Edit_dlg |
| | | }; |
| | | const url = '../modal/3018?param=' + JSON.stringify(data) + "&titlename=" + btn.Edit_dlg |
| | | const url = '../modal/3018?param=' + JSON.stringify(data) + "&titlename=" + btn |
| | | .Edit_dlg |
| | | .Name + |
| | | "&type=addDataObj" |
| | | var $this = this; |
| | |
| | | console.log(resData); |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this |
| | | url: '../modal/3018_2?param=' + JSON.stringify( |
| | | this |
| | | .$data.param) + |
| | | "&titlename=" + this.title |
| | | }); |
| | |
| | | $this.head_styledef.form |
| | | .model[ele.fieldId] = itemName; |
| | | } |
| | | $this.head_styledef.form.items[index].selections = selections.map((a) => { |
| | | $this.head_styledef.form.items[index].selections = selections.map(( |
| | | a) => { |
| | | return { |
| | | value: a.value, |
| | | text: a.label |
| | |
| | | |
| | | } |
| | | }); |
| | | const app = getApp() |
| | | if (app.globalData.bindClasses) { |
| | | $this.head_styledef.form.items.push({ |
| | | name: "Input", |
| | | label: this.translate("classes"), |
| | | labelWidth: 100, |
| | | disabled: true, |
| | | value: app.globalData.classes, |
| | | setting: { |
| | | width: 100, |
| | | height: 50, |
| | | }, |
| | | bind: { |
| | | attr: "", |
| | | }, |
| | | fieldId: "S_CLASSES", |
| | | }) |
| | | $this.head_styledef.form.model["S_CLASSES"] = app.globalData.classes |
| | | } |
| | | } |
| | | if ($this.head_styledef.event?.length > 0) { |
| | | $this.head_styledef.event.forEach(async (a) => { //判断是否是初始化事件 |
| | |
| | | if (itemName) { |
| | | $this.detail1_styledef.form.items[ele.fieldId] = itemName; |
| | | } |
| | | $this.detail1_styledef.form.items[index].selections = selections.map((a) => { |
| | | $this.detail1_styledef.form.items[index].selections = selections.map(( |
| | | a) => { |
| | | return { |
| | | value: a.value, |
| | | text: a.label |
| | |
| | | $this.head_styledef.form |
| | | .model[ele.fieldId] = itemName; |
| | | } |
| | | $this.head_styledef.form.items[index].selections = selections.map((a) => { |
| | | $this.head_styledef.form.items[index].selections = selections.map(( |
| | | a) => { |
| | | return { |
| | | value: a.value, |
| | | text: a.label |
| | |
| | | } |
| | | |
| | | }); |
| | | const app = getApp() |
| | | if (app.globalData.bindClasses) { |
| | | $this.head_styledef.form.items.push({ |
| | | name: "Input", |
| | | label: this.translate("classes"), |
| | | labelWidth: 100, |
| | | disabled: true, |
| | | value: app.globalData.classes, |
| | | setting: { |
| | | width: 100, |
| | | height: 50, |
| | | }, |
| | | bind: { |
| | | attr: "", |
| | | }, |
| | | fieldId: "S_CLASSES", |
| | | }) |
| | | $this.head_styledef.form.model["S_CLASSES"] = app.globalData.classes |
| | | } |
| | | |
| | | } |
| | | } catch (ex) { |
| | |
| | | } |
| | | |
| | | }); |
| | | const app = getApp() |
| | | if (app.globalData.bindClasses) { |
| | | $this.head_styledef.form.items.push({ |
| | | name: "Input", |
| | | label: this.translate("classes"), |
| | | labelWidth: 100, |
| | | disabled: true, |
| | | value: app.globalData.classes, |
| | | setting: { |
| | | width: 100, |
| | | height: 50, |
| | | }, |
| | | bind: { |
| | | attr: "", |
| | | }, |
| | | fieldId: "S_CLASSES", |
| | | }) |
| | | $this.head_styledef.form.model["S_CLASSES"] = app.globalData.classes |
| | | } |
| | | |
| | | } |
| | | } catch (ex) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const app = getApp() |
| | | if (app.globalData.bindClasses) { |
| | | styledefHead.form.items.push({ |
| | | name: "Input", |
| | | label: this.translate("classes"), |
| | | labelWidth: 100, |
| | | disabled: true, |
| | | value: app.globalData.classes, |
| | | setting: { |
| | | width: 100, |
| | | height: 50, |
| | | }, |
| | | bind: { |
| | | attr: "", |
| | | }, |
| | | fieldId: "S_CLASSES", |
| | | }) |
| | | styledefHead.form.model["S_CLASSES"] = app.globalData.classes |
| | | } |
| | | } |
| | | this.setData({ |
| | | head_styledef: styledefHead |
| | |
| | | } |
| | | } |
| | | } |
| | | const app = getApp() |
| | | if (app.globalData.bindClasses) { |
| | | styledefHead.form.items.push({ |
| | | name: "Input", |
| | | label: this.translate("classes"), |
| | | labelWidth: 100, |
| | | disabled: true, |
| | | value: app.globalData.classes, |
| | | setting: { |
| | | width: 100, |
| | | height: 50, |
| | | }, |
| | | bind: { |
| | | attr: "", |
| | | }, |
| | | fieldId: "S_CLASSES", |
| | | }) |
| | | styledefHead.form.model["S_CLASSES"] = app.globalData.classes |
| | | } |
| | | |
| | | } |
| | | this.setData({ |
| | |
| | | |
| | | //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 |
| | | }) |
| | | console.log(head_styledef) |
| | | this.setData({ |
| | | head_styledef: head_styledef |
| | | }) |