| | |
| | | <!-- 页签 --> |
| | | <view class="dv-tab"> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" |
| | | styvarype="button"> |
| | | styvarype="text"> |
| | | </uni-segmented-control> |
| | | </view> |
| | | <swiper class="view-tabpage" :current="current" @change="changeSwiper"> |
| | |
| | | <script> |
| | | import { |
| | | Base64 |
| | | } from '@/js/Base64.js'; |
| | | } from '@/js/Base64.js'; |
| | | import { |
| | | appGetInfo, |
| | | dictGetInfo |
| | |
| | | dataObjCreate, |
| | | dataObjDel |
| | | } from "@/api/data.js" |
| | | |
| | | import {showInfo, |
| | | showError} from "@/js/Page.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | largeMode: getApp().globalData.largeMode || false, |
| | | largeMode: getApp().globalData.largeMode || false, |
| | | title: this.translateSys("sorting"), |
| | | ClsID: "Distribution_CNTR_Detail", |
| | | ClsID2: "Picking_Result", |
| | |
| | | popupParam: {}, |
| | | }; |
| | | }, |
| | | onReady() { |
| | | uni.setNavigationBarTitle({ |
| | | title: this.title |
| | | }); //设置顶部标题 |
| | | }, |
| | | onLoad(options) { |
| | | // console.log(options); |
| | | uni.setNavigationBarTitle({ |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | this.title = options.titlename; |
| | | this.param = JSON.parse(options.param); |
| | | // console.log(this.param); |
| | | this.loadData(options.paramValue) |
| | | const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined |
| | | this.loadData(paramValue) |
| | | }, |
| | | methods: { |
| | | setData: function(obj) { |
| | |
| | | await this.Head_UIStyleGetInfo(this.ClsID, this.param.Input_UI_Style.ID); |
| | | //传入参数值 |
| | | if (paramValue) { |
| | | const attrs = paramValue.attrs || []; |
| | | (this.head_styledef?.form?.items || []).forEach(async (ele, index) => { |
| | | if (ele.name != "Layout") { |
| | | attrs.forEach(async (ele2, index2) => { |
| | | if (ele.fieldId == ele2.name) { |
| | | ele.value = ele2.value; |
| | | } |
| | | }); |
| | | } else { |
| | | ele.setting.colList.forEach(async (col) => { |
| | | if (col) { |
| | | attrs.forEach(async (ele2, |
| | | index2) => { |
| | | if (col.fieldId == ele2.name) { |
| | | col.value = ele2.value; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | this.setFormValues(paramValue) |
| | | } |
| | | |
| | | //加载初始界面 |
| | |
| | | // var $ele = e; |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | console.log(result); |
| | | item.value = result; |
| | | //uni.hideKeyboard(); |
| | | var $this = this; |
| | | |
| | |
| | | } else { |
| | | var tip = result.info ? typeof result.info == 'string' ? result.info : |
| | | result.info.join('<br/>') : ''; |
| | | tip = tip || result.err_info |
| | | |
| | | if (tip) uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip, |
| | |
| | | }, |
| | | setFormValues(attrs) { |
| | | const head_styledef = this.head_styledef |
| | | if (JSON.stringify(attrs) == '{}') { |
| | | return; |
| | | if (!Array.isArray(attrs)) { |
| | | return |
| | | } |
| | | console.log(attrs) |
| | | attrs.forEach(async (attr, key) => { |
| | |
| | | } else { |
| | | var tip = result.info ? typeof result.info == 'string' ? result.info : result.info |
| | | .join('<br/>') : ''; |
| | | tip = tip || result.err_info |
| | | if (tip) uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: tip, |
| | |
| | | this.okLoading = false |
| | | else if (type == "2") |
| | | this.ok2Loading = false |
| | | |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : ex |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "8.1", |