| | |
| | | <view 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> |
| | |
| | | <view 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> |
| | |
| | | data() { |
| | | return { |
| | | title: this.translateSys("sorting"), |
| | | ClsID: "Sorting_Detail", |
| | | ClsID2: "Sorting_Result", |
| | | ClsID: "Distribution_CNTR_Detail", |
| | | ClsID2: "Picking_Result", |
| | | param: {}, |
| | | focusFieldId: "", |
| | | focusOldFieldId: "", |
| | |
| | | items: [], |
| | | active_id: '', |
| | | activelist: [], |
| | | okLoading: false, |
| | | ok2Loading: false, |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | let that = this; |
| | | let keys = []; |
| | | let val, data; |
| | | |
| | | |
| | | Object.keys(obj).forEach(function(key) { |
| | | keys = key.split("."); |
| | | val = obj[key]; |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | async loadData(paramValue) { |
| | | //获取数据类的自定义表单参数 |
| | | await this.Head_UIStyleGetInfo(this.$data.ClsID, this.$data.param.Input_UI_Style.ID); |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //加载初始界面 |
| | | if (this.$data.param.Show_Welcom_Page) { |
| | | this.$data.param.Welcome_Page.Img = this.$data.param.Welcome_Page.Img.replace(/ /g, '+'); |
| | |
| | | await this.Detail1_UIstyleGetInfo(this.ClsID, this.$data.param.Sub_Page[0].UI_Style.ID); |
| | | await this.Detail2_UIstyleGetInfo(this.ClsID2, this.$data.param.Sub_Page[1].UI_Style.ID); |
| | | |
| | | |
| | | console.log(this.$data.param); |
| | | |
| | | console.log(this.$data.param); |
| | | }, |
| | | changeSwiper(evt) { |
| | | let index = evt.target.current || evt.detail.current; |
| | |
| | | dict_name: dict.name |
| | | }; |
| | | // console.log(dataInfo); |
| | | this.$store.dispatch('DictGetInfo', dataInfo).then(async (success) => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | var list = []; |
| | | var itemName = ''; |
| | | success.result.dict_item_list.forEach((item) => { |
| | | if (item.is_default == '1') |
| | | itemName = item.name; |
| | | list.push({ |
| | | text: item.value, |
| | | value: item.name, |
| | | }); |
| | | try { |
| | | const res = await this.getDictInfo(dataInfo) |
| | | var list = []; |
| | | var itemName = ''; |
| | | res.result.dict_item_list.forEach((item) => { |
| | | if (item.is_default == '1') |
| | | itemName = item.name; |
| | | list.push({ |
| | | text: item.value, |
| | | value: item.name, |
| | | }); |
| | | |
| | | if (type == 'mast') { //有默认值,显示默认值 |
| | | if (itemName) { |
| | | $this.head_styledef.form.items[index].value = itemName; |
| | | var attr = $this.head_styledef.form.items[index].fieldId; |
| | | $this.head_styledef.form.model[attr] = itemName; |
| | | } |
| | | $this.head_styledef.form.items[index].dict = list; |
| | | var head_styledef = JSON.parse(JSON.stringify($this.head_styledef)); |
| | | $this.head_styledef = []; |
| | | $this.head_styledef = head_styledef; |
| | | // console.log($this.$data.detail1StyleDefList); |
| | | } else { |
| | | if (itemName) { |
| | | $this.detail1_styledef.form.items[index].value = itemName; |
| | | var attr = $this.detail1_styledef.form.items[index].fieldId; |
| | | $this.detail1_styledef.form.model[attr] = itemName; |
| | | } |
| | | $this.detail1_styledef.form.items[index].dict = list; |
| | | var detail1_styledef = JSON.parse(JSON.stringify($this.detail1_styledef)); |
| | | $this.detail1_styledef = []; |
| | | $this.detail1_styledef = detail1_styledef; |
| | | // console.log($this.$data.detail1_styledef); |
| | | }); |
| | | //有默认值,显示默认值 |
| | | if (type == 'mast') { //有默认值,显示默认值 |
| | | if (itemName) { |
| | | $this.head_styledef.form.items[index].value = itemName; |
| | | var attr = $this.head_styledef.form.items[index].fieldId; |
| | | $this.head_styledef.form.model[attr] = itemName; |
| | | } |
| | | |
| | | $this.head_styledef.form.items[index].dict = list; |
| | | var head_styledef = JSON.parse(JSON.stringify($this.head_styledef)); |
| | | $this.head_styledef = []; |
| | | $this.head_styledef = head_styledef; |
| | | // console.log($this.head_styledef); |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "9.1", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | if (itemName) { |
| | | $this.detail1_styledef.form.items[index].value = itemName; |
| | | var attr = $this.detail1_styledef.form.items[index].fieldId; |
| | | $this.detail1_styledef.form.model[attr] = itemName; |
| | | } |
| | | $this.detail1_styledef.form.items[index].dict = list; |
| | | var detail1_styledef = JSON.parse(JSON.stringify($this.detail1_styledef)); |
| | | $this.detail1_styledef = []; |
| | | $this.detail1_styledef = detail1_styledef; |
| | | // console.log($this.$data.detail1_styledef); |
| | | } |
| | | }).catch(ex => { |
| | | |
| | | |
| | | // $this.head_styledef.form.items[index].dictitem=success.result; |
| | | // this.$store.commit("classAttrList", $this.$data.classAttrList); |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "9", |
| | |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | getDictInfo(info) { //Mobox3得到得到字典信息字典项列表 |
| | | const loginInfo = this.$store.getters.loginid |
| | | const mobxoSApi = this.$store.getters.getMobxoSApi |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: mobxoSApi + 'api/dict/GetInfo2?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 |
| | | }, |
| | |
| | | var $this = this; |
| | | |
| | | 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; |
| | |
| | | }, |
| | | 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; |
| | |
| | | this.translateSys( |
| | | "quotation_mark_left") + value |
| | | .page_name + this.translateSys( |
| | | "sys.quotation_mark_right") + |
| | | "quotation_mark_right") + |
| | | this.translate( |
| | | "are_you_sure_clear_last"), |
| | | |
| | |
| | | data.forEach(async (ele2, index) => { |
| | | if (ele.fieldId == ele2 |
| | | .attr) { |
| | | if (ele.name == |
| | | 'Select' && |
| | | ele2 |
| | | .choice_list) { |
| | | const |
| | | dictItemList = []; |
| | | const |
| | | choiceList = |
| | | ele2 |
| | | .choice_list || |
| | | []; |
| | | for (let d in |
| | | choiceList) { |
| | | const val = |
| | | choiceList[ |
| | | d]; |
| | | dictItemList |
| | | .push({ |
| | | text: val, |
| | | value: val |
| | | }); |
| | | } |
| | | ele.dict = |
| | | dictItemList; |
| | | } |
| | | ele.value = ele2 |
| | | .value; |
| | | |
| | | } |
| | | }); |
| | | }); |
| | |
| | | }, |
| | | sava(event) { |
| | | var $this = this; |
| | | |
| | | if (this.$data.detail1StyleDefList.length == 0) { |
| | | 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 => { |
| | |
| | | }); |
| | | }); |
| | | if (jsonlist.length == 0) { |
| | | this.okLoading = false |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: this.translate("tip_no_select_data"), |
| | |
| | | }, |
| | | sava2(event) { |
| | | var $this = this; |
| | | |
| | | if (this.$data.detail1StyleDefList.length == 0) { |
| | | 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 => { |
| | |
| | | }); |
| | | }); |
| | | if (jsonlist.length == 0) { |
| | | this.ok2Loading = false |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: this.translate("tip_no_select_data"), |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | |
| | | return; |
| | | } |
| | | const list = [] |
| | |
| | | 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) { |
| | |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | } |
| | | if (type == "1") |
| | | this.okLoading = false |
| | | else if (type == "2") |
| | | this.ok2Loading = false |
| | | }).catch(ex => { |
| | | if (type == "1") |
| | | this.okLoading = false |
| | | else if (type == "2") |
| | | this.ok2Loading = false |
| | | var tip = typeof ex == "string" ? ex : ex.errMsg; |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "8.1", |
| | |
| | | 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; |