cuiqian2004
4 天以前 07925905f1a596e20e980de6d42db217abb753b0
pages/modal/3018_2.vue
@@ -116,7 +116,7 @@
            uni.scanCode({
               scanType: ["qrCode", 'barCode'],
               success: function(res) {
                  console.log(res)
                  if ($this.focusFieldId) {
                     const items = $this.head_styledef.form.items || []
                     for (let i in items) {
@@ -177,14 +177,16 @@
            this.loadData()
         }
      },
      onReady() {
         uni.setNavigationBarTitle({
            title: this.title
         }); //设置顶部标题
      },
      onLoad(options) {
         // console.log(options);
         uni.setNavigationBarTitle({
            title: options.titlename
         }); //设置顶部标题
         this.param = JSON.parse(options.param);
         this.title = this.param.Add_BtnName ? this.param.Add_BtnName : options
            .titlename; //设置按钮文字
         this.title = options.titlename; //设置按钮文字 this.param.Add_BtnName ? this.param.Add_BtnName :
         this.btnName = this.param.Add_BtnName || ""
         const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
         this.loadData(paramValue)
@@ -521,16 +523,16 @@
                                 })
                              });
                           } else {
                              showInfo(this.translate(
                              showInfo($this.translate(
                                    'execute_init_event_failed') +
                                 this.translateSys("full_stop") +
                                 this.translate('reason') + this
                                 $this.translateSys("full_stop") +
                                 $this.translate('reason') + $this
                                 .translateSys(
                                    "colon") +
                                 this.translateSys("quotation_mark_left") +
                                 $this.translateSys("quotation_mark_left") +
                                 action
                                 .action_type + this.translateSys(
                                    "quotation_mark_right") + this
                                 .action_type + $this.translateSys(
                                    "quotation_mark_right") + $this
                                 .translate('tip_action_unprocessed'))
                           }
@@ -563,7 +565,7 @@
         },
         onScanValue(item, value) {
            const $this = this;
            //console.log("onScanValue", item);
            console.log("onScanValue", value);
            item.value = value
            let newVal = item.value
            if (typeof item.value == "string") {
@@ -720,7 +722,7 @@
            }
         },
         async onFormEventResult(data, callbackEventId, item) {
         async onFormEventResult( data, callbackEventId, item,req) {
            try {
               const $this = this
               var enviroment = {
@@ -1071,7 +1073,7 @@
               userlogin: '',
               clsid: $this.param.DataCls.id,
               objid: "",
               attr: $this.popupParam.req,
               attr: $this.popupParam.req || [],
               dataJson: data
            }
            $this.DataObjRunCustomEvent(info, $this.popupParam.data_attr);
@@ -1112,13 +1114,13 @@
                  }
               }
               enviroment = Base64.encode(JSON.stringify(enviroment)); //将字符串转换为base64编码
               var input_param = Base64.encode(JSON.stringify(info.attr)); //将字符串转换为base64编码
               var input_param = info.attr ? Base64.encode(JSON.stringify(info.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 = {};
               info.attr.forEach(item => {
               (info.attr || []).forEach(item => {
                  obj_attr[item.attr] = item.value;
               });
               if (!info.eventid.includes('{')) info.eventid = '{' + info.eventid + '}';
@@ -1223,7 +1225,7 @@
            // return;
            runCustomEvent(dataInfo).then(data => {
               hideLoading()
               $this.onFormEventResult(data, button_callback, item)
               $this.onFormEventResult( data, button_callback,item,req)
            }).catch(ex => {
               // console.log(ex);