From 310ab72840d7c7025273ac79363107a1f9e4bc8e Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 18 七月 2025 17:34:47 +0800
Subject: [PATCH] test
---
pages/modal/3037.vue | 2228 +++++++++++++++++++++++++++------------------------------
1 files changed, 1,058 insertions(+), 1,170 deletions(-)
diff --git a/pages/modal/3037.vue b/pages/modal/3037.vue
index 60422cc..b576fd2 100644
--- a/pages/modal/3037.vue
+++ b/pages/modal/3037.vue
@@ -1,5 +1,5 @@
<template>
- <view class="content">
+ <view class="content" :class="largeMode?'large-mode':''">
<!-- 涓绘暟鎹�-->
<view class="v-area" v-for="(classattr,index) in classAttrList">
<div class="class_attr_title" style="display: none;">
@@ -652,7 +652,7 @@
<script>
import {
Base64
- } from '@/js/Base64.js';
+ } from '@/js/Base64.js';
import pickerAddress from '../../js/pickerAddress/pickerAddress.vue'
import utils from "@/js/utils.js"
import {
@@ -679,6 +679,7 @@
},
data() {
return {
+ largeMode: getApp().globalData.largeMode || false,
title: '鏂板',
param: {},
classAttrList: [],
@@ -1054,8 +1055,8 @@
.Font : {},
Bk_Color: this.classGridStyle.StyleDef.Bk_Color ? this.classGridStyle
.StyleDef.Bk_Color : '#FFFFFF',
- Text_Color: this.classGridStyle.StyleDef.Text_Color ? this.$data
- .classGridStyle.StyleDef.Text_Color : '#000000'
+ Text_Color: this.classGridStyle.StyleDef.Text_Color ? this.classGridStyle.StyleDef
+ .Text_Color : '#000000'
});
// }
}
@@ -1207,10 +1208,10 @@
title_p_wdith: this.subClassGridStyle.StyleDef.title_p_wdith,
Font: this.subClassGridStyle.StyleDef.Font ? this.subClassGridStyle
.StyleDef.Font : {},
- Bk_Color: this.subClassGridStyle.StyleDef.Bk_Color ? this.$data
- .subClassGridStyle.StyleDef.Bk_Color : '#FFFFFF',
- Text_Color: this.subClassGridStyle.StyleDef.Text_Color ? this.$data
- .subClassGridStyle.StyleDef.Text_Color : '#000000'
+ Bk_Color: this.subClassGridStyle.StyleDef.Bk_Color ? this.subClassGridStyle
+ .StyleDef.Bk_Color : '#FFFFFF',
+ Text_Color: this.subClassGridStyle.StyleDef.Text_Color ? this.subClassGridStyle
+ .StyleDef.Text_Color : '#000000'
});
// }
}
@@ -1551,18 +1552,18 @@
ontap(e) { //鎵爜鍔熻兘
//console.log(e.target)
getApp().onScan((result) => {
- //console.log(result.decodedata);
+ //console.log(result);
var isVal = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
'iindex']].Value;
// if(!isVal){
- // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata;
+ // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result;
// var isVald =this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
// return;
// }
//涓绘暟鎹被鎵爜鏌ヨ鏁版嵁
- if (isVal != result.decodedata) {
+ if (isVal != result) {
this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
- 'iindex']].Value = result.decodedata;
+ 'iindex']].Value = result;
uni.hideKeyboard();
//瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈� var eventid = this.param.Scan_Code.Input_Change_Event.ID;
@@ -1589,7 +1590,7 @@
mast_attr: [],
inputParamter: [{
attr: 'mast_input_3037',
- value: result.decodedata
+ value: result
}]
}
@@ -1601,13 +1602,13 @@
subontap(e) { //鎵爜鍔熻兘
//console.log(e.target)
getApp().onScan((result) => {
- //console.log(result.decodedata);
+ //console.log(result);
var isVal = this.subClassAttrList[e.target.dataset['index']].Attr[e
.target.dataset['iindex']].Value;
//涓绘暟鎹被鎵爜鏌ヨ鏁版嵁
- if (isVal != result.decodedata) {
+ if (isVal != result) {
this.subClassAttrList[e.target.dataset['index']].Attr[e.target
- .dataset['iindex']].Value = result.decodedata;
+ .dataset['iindex']].Value = result;
uni.hideKeyboard();
//瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈� var eventid = this.param.Scan_Code.Input_Change_Event.ID;
@@ -1634,7 +1635,7 @@
mast_attr: [],
inputParamter: [{
attr: 'mast_input_3037',
- value: result.decodedata
+ value: result
}]
}
@@ -1646,16 +1647,16 @@
scan_ontap(e) { //鎵爜鍖烘壂鐮佸姛鑳� //console.log(e.target)
getApp().onScan((result) => {
- console.log(result.decodedata);
+ console.log(result);
var isflag = true;
for (var i in this.subPanelList) {
- if (this.subPanelList[i].scanCodeVal == result.decodedata)
+ if (this.subPanelList[i].scanCodeVal == result)
isflag = false;
}
//瀛愭暟鎹被鎵爜鏌ヨ鏁版嵁
if (isflag) {
uni.hideKeyboard();
- this.scanCodeVal = result.decodedata;
+ this.scanCodeVal = result;
var eventid = this.param.Scan_Code.Input_Change_Event.ID;
if (eventid) {
var mast_req = [];
@@ -1841,8 +1842,7 @@
for (var i in this.classAttrList) {
for (var j in this.classAttrList[i]
.Attr) {
- if (delvalue[0].attr == this.$data
- .classAttrList[i].Attr[j].Name) {
+ if (delvalue[0].attr == this.classAttrList[i].Attr[j].Name) {
this.classAttrList[i].Attr[j]
.Value = "";
}
@@ -1855,8 +1855,7 @@
for (var i in this.classAttrList) {
for (var j in this.classAttrList[i]
.Attr) {
- if (item[v].attr == this.$data
- .classAttrList[i].Attr[j].Name) {
+ if (item[v].attr == this.classAttrList[i].Attr[j].Name) {
index = i;
iindex = j;
}
@@ -1876,8 +1875,7 @@
if (eventid) {
// self.event_no_sub = 1;
var req = [];
- var attrlist = this.$data
- .classAttrList;
+ var attrlist = this.classAttrList;
for (var i = 0; i < attrlist
.length; i++) {
var attr = attrlist[i].Attr;
@@ -1942,9 +1940,8 @@
if (eventid) {
// self.event_no_sub = 1;
var req = [];
- var attrlist = this.$data
- .subPanelList[e.target.dataset[
- 'iiindex']].subClassAttr;
+ var attrlist = this.subPanelList[e.target.dataset[
+ 'iiindex']].subClassAttr;
for (var i = 0; i < attrlist
.length; i++) {
var attr = attrlist[i].Attr;
@@ -2093,8 +2090,7 @@
if (eventid) {
// self.event_no_sub = 1;
var req = [];
- var attrlist = this.$data
- .classAttrList; //涓绘暟鎹被灞炴�
+ var attrlist = this.classAttrList; //涓绘暟鎹被灞炴�
for (var i = 0; i < attrlist
.length; i++) {
var attr = attrlist[i].Attr;
@@ -2159,8 +2155,7 @@
if (eventid) {
// self.event_no_sub = 1;
var req = [];
- var attrlist = this.$data
- .classAttrList;
+ var attrlist = this.classAttrList;
for (var i = 0; i < attrlist
.length; i++) {
var attr = attrlist[i].Attr;
@@ -2199,11 +2194,9 @@
},
classAttr_extButton(index, iindex) {
var $this = this;
- var before_click_button = $this.$data
- .classAttrList[index].Attr[iindex]
+ var before_click_button = $this.classAttrList[index].Attr[iindex]
.before_click_button;
- var button_callback = $this.$data
- .classAttrList[index].Attr[iindex]
+ var button_callback = $this.classAttrList[index].Attr[iindex]
.button_callback;
if (!before_click_button) {
uni.showModal({
@@ -2242,23 +2235,19 @@
AddPer(data, param) {
// console.log(param);
console.log(data);
- $this.$data
- .classAttrList[
+ $this.classAttrList[
param.index]
.Attr[param.iindex]
.Value = data[0]
.Name;
- $this.$data
- .classAttrList[
+ $this.classAttrList[
param.index]
.Attr[param.iindex]
.ValID = data[0]
.Login + ';' +
data[0].Name;
- var eventid = $this
- .$data
- .classAttrList[
+ var eventid = $this.classAttrList[
param.index]
.Attr[param.iindex]
.action;
@@ -2276,9 +2265,7 @@
0
]
.Login,
- clsid: $this
- .$data
- .param
+ clsid: $this.param
.Master_Cls
.ID,
objid: "",
@@ -2319,23 +2306,19 @@
AddPer(data, param) {
// console.log(param);
// console.log(data);
- $this.$data
- .classAttrList[
+ $this.classAttrList[
param.index]
.Attr[param.iindex]
.Value = data[0]
.Name;
- $this.$data
- .classAttrList[
+ $this.classAttrList[
param.index]
.Attr[param.iindex]
.ValID = data[0]
.ID + ';' + data[0]
.Name;
- var eventid = $this
- .$data
- .classAttrList[
+ var eventid = $this.classAttrList[
param.index]
.Attr[param.iindex]
.action;
@@ -2353,9 +2336,7 @@
rclsid: "",
robjid: "",
userlogin: "",
- clsid: $this
- .$data
- .param
+ clsid: $this.param
.Master_Cls
.ID,
objid: "",
@@ -2383,12 +2364,10 @@
sava() {
if (this.param
.Before_OK_Event) //鍒ゆ柇鍔熻兘鐐瑰弬鏁版槸鍚︽湁纭畾鍓嶈剼鏈�- this.scan_OKDataObjRunCustomEvent(this
- .$data.param.Before_OK_Event.ID);
+ this.scan_OKDataObjRunCustomEvent(this.param.Before_OK_Event.ID);
else if (this.param
.After_OK_Event) //鍒ゆ柇鍔熻兘鐐瑰弬鏁版槸鍚︽湁纭畾鍚庤剼鏈�- this.scan_OKDataObjRunCustomEvent(this
- .$data.param.After_OK_Event.ID);
+ this.scan_OKDataObjRunCustomEvent(this.param.After_OK_Event.ID);
else
uni.navigateBack({
delta: 1
@@ -2527,13 +2506,10 @@
url: '../modal/3037?param=' +
JSON
.stringify(
- this
- .$data
- .param
+ this.param
) +
"&titlename=" +
- this.$data
- .title
+ this.title
});
// this.class_attr_init();
@@ -2699,26 +2675,20 @@
for (
var a =
0; a <
- this
- .$data
- .classAttrList
+ this.classAttrList
.length; a++
) {
for (
var l =
0; l <
- this
- .$data
- .classAttrList[
+ this.classAttrList[
a
]
.Attr
.length; l++
) {
var ca =
- this
- .$data
- .classAttrList[
+ this.classAttrList[
a
]
.Attr[
@@ -2946,15 +2916,11 @@
for (
var c =
0; c <
- $this
- .$data
- .classAttrList
+ $this.classAttrList
.length; c++
) {
var attr =
- $this
- .$data
- .classAttrList[
+ $this.classAttrList[
c
]
.Attr;
@@ -3012,15 +2978,11 @@
for (
var c =
0; c <
- $this
- .$data
- .classAttrList
+ $this.classAttrList
.length; c++
) {
var attr =
- $this
- .$data
- .classAttrList[
+ $this.classAttrList[
c
]
.Attr;
@@ -3061,14 +3023,73 @@
}
}
}
+ 0;
+ if (!
+ $this.refdatastore
+ .filter(
+ function(
+ s
+ ) {
+ return result[
+ i
+ ]
+ .attr ==
+ s
+ .attr
+ }
+ )
+ .length
+ ) {
+ length
+ =
+ 1;
+ $this
+ .refdatastore
+ .push(
+ result[
+ i
+ ]
+ );
+ }
+ if (length ==
+ 0
+ ) {
+ for (
+ var j =
+ 0; j <
+ $this
+ .refdatastore
+ .length; j++
+ ) {
+ if ($this
+ .refdatastore[
+ j
+ ]
+ .attr ==
+ result[
+ i
+ ]
+ .attr
+ ) {
+ $this
+ .refdatastore[
+ j
+ ]
+ .value =
+ result[
+ i
+ ]
+ .value;
+ }
+ }
+ }
}
} else if (data
.action[i]
.action_type ==
'set_global_attr'
) {
- $this.$data
- .global_attr =
+ $this.global_attr =
data
.action[
i]
@@ -3085,13 +3106,11 @@
.length; i++) {
for (var c =
0; c <
- $this.$data
- .classAttrList
+ $this.classAttrList
.length; c++
) {
var attr =
$this
- .$data
.classAttrList[
c]
.Attr;
@@ -3122,7 +3141,6 @@
var length = 0;
if (!$this
- .$data
.refdatastore
.filter(
function(
@@ -3137,8 +3155,7 @@
})
.length) {
length = 1;
- $this.$data
- .refdatastore
+ $this.refdatastore
.push(
result[
i
@@ -3150,12 +3167,10 @@
for (var j =
0; j <
$this
- .$data
.refdatastore
.length; j++
) {
if ($this
- .$data
.refdatastore[
j
]
@@ -3166,7 +3181,6 @@
.attr
) {
$this
- .$data
.refdatastore[
j
]
@@ -3223,21 +3237,17 @@
}
}
if (this.refdatastore.length > 0) {
- for (var i = 0; i < this.$data
- .refdatastore.length; i++) {
+ for (var i = 0; i < this.refdatastore.length; i++) {
if (!req.filter(function(s) {
- return this.$data
- .refdatastore[i]
+ return this.refdatastore[i]
.attr == s.name
}).length) {
length = 1;
req.push({
- 'attr': this.$data
- .refdatastore[
- i].attr,
- 'value': this.$data
- .refdatastore[
- i].value
+ 'attr': this.refdatastore[
+ i].attr,
+ 'value': this.refdatastore[
+ i].value
});
}
}
@@ -3342,8 +3352,7 @@
) {
// self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
var length = 0;
- if (!this.$data
- .refdatastore
+ if (!this.refdatastore
.filter(
function(
s) {
@@ -3356,21 +3365,18 @@
}).length
) {
length = 1;
- this.$data
- .refdatastore.push(
- result[
- i]
- );
+ this.refdatastore.push(
+ result[
+ i]
+ );
}
if (length == 0) {
for (var j =
0; j < this
- .$data
.refdatastore
.length; j++
) {
if (this
- .$data
.refdatastore[
j]
.attr ==
@@ -3378,8 +3384,7 @@
i]
.attr
) {
- this.$data
- .refdatastore[
+ this.refdatastore[
j
]
.value =
@@ -3432,21 +3437,17 @@
}
}
if (this.refdatastore.length > 0) {
- for (var i = 0; i < this.$data
- .refdatastore.length; i++) {
+ for (var i = 0; i < this.refdatastore.length; i++) {
if (!req.filter(function(s) {
- return this.$data
- .refdatastore[i]
+ return this.refdatastore[i]
.attr == s.name
}).length) {
length = 1;
req.push({
- 'attr': this.$data
- .refdatastore[
- i].attr,
- 'value': this.$data
- .refdatastore[
- i].value
+ 'attr': this.refdatastore[
+ i].attr,
+ 'value': this.refdatastore[
+ i].value
});
}
}
@@ -3637,7 +3638,6 @@
robjid: '',
userlogin: '',
clsid: $this
- .$data
.param
.Master_Cls
.ID,
@@ -3762,7 +3762,6 @@
param
) {
$this
- .$data
.classAttrList[
param
.index
@@ -3777,7 +3776,6 @@
]
.Name;
$this
- .$data
.classAttrList[
param
.index
@@ -3813,7 +3811,6 @@
robjid: "",
userlogin: "",
clsid: $this
- .$data
.param
.Master_Cls
.ID,
@@ -3926,117 +3923,83 @@
console.log(dataInfo);
// return;
runCustomEvent(dataInfo).then(data => {
- console.log(data);
- if (data.ret != 0) {
- var tip = data
- .err_info ?
- typeof data
- .err_info ==
- 'string' ? data
- .err_info : data
- .err_info.join(
- '<br/>') : '';
- if (data.ret == 801)
- uni.showModal({
+ console.log(data);
+ if (data.ret != 0) {
+ var tip = data
+ .err_info ?
+ typeof data
+ .err_info ==
+ 'string' ? data
+ .err_info : data
+ .err_info.join(
+ '<br/>') : '';
+ if (data.ret == 801)
+ uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
+ else uni.showModal({
title: this.translateSys('tip'),
- content: tip,
+ content: tip +
+ ',鎻愮ず:' +
+ data
+ .ret,
showCancel: false,
confirmText: this.translateSys('close')
});
- else uni.showModal({
- title: this.translateSys('tip'),
- content: tip +
- ',鎻愮ず:' +
- data
- .ret,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
- return false
- } else {
- var tip = data.info ?
- typeof data.info ==
- 'string' ? data
- .info : data.info
- .join('<br/>') :
- '';
- if (tip) uni
- .showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ return false
+ } else {
+ var tip = data.info ?
+ typeof data.info ==
+ 'string' ? data
+ .info : data.info
+ .join('<br/>') :
+ '';
+ if (tip) uni
+ .showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
- var actionlist = data
- .action;
- if (actionlist) {
- for (var j = 0; j <
- actionlist
- .length; j++) {
- var action =
- actionlist[
- j]
- var action_type =
- action
- .action_type;
- var value =
- action
- .value;
- if (action_type ==
- 'set_dlg_attr'
- ) {
- if (value) {
- var val = value;
- if (typeof value == 'string') {
- val = JSON.parse(value);
- }
- console.log(val);
- for (var i = 0; i < val.length; i++) {
- for (var a = 0; a < this.$data.subClassAttrList.length; a++) {
- for (
- var l =
- 0; l <
- this
- .$data
- .subClassAttrList[
- a
- ]
- .Attr
- .length; l++
- ) {
- var ca =
- this
- .$data
- .subClassAttrList[
- a
- ]
- .Attr[
- l
- ];
- if (val[
- i]
- .attr ==
- ca
- .Name
- ) {
- if (utils.classUtils.attrTypeIsDict(ca.Type)) {
- var
- dictItemList = [];
- for (
- var d in
- val[
- i]
- .choice_list
- ) {
- var val =
- val[
- i]
- .choice_list[
- d
- ];
- dictItemList
- .push({
+ var actionlist = data
+ .action;
+ if (actionlist) {
+ for (var j = 0; j <
+ actionlist
+ .length; j++) {
+ var action =
+ actionlist[
+ j]
+ var action_type =
+ action
+ .action_type;
+ var value =
+ action
+ .value;
+ if (action_type ==
+ 'set_dlg_attr'
+ ) {
+ if (value) {
+ var val = value;
+ if (typeof value == 'string') {
+ val = JSON.parse(value);
+ }
+ console.log(val);
+
+ for (var i = 0; i < val.length; i++) {
+ for (var a = 0; a < this.subClassAttrList.length; a++) {
+ for (var l = 0; l < this.subClassAttrList[a].Attr.length; l++) {
+ var ca = this.subClassAttrList[a].Attr[l];
+ if (val[i].attr == .Name) {
+ if (utils.classUtils.attrTypeIsDict(ca.Type)) {
+ var dictItemList = [];
+ for (var d in val[i].choice_list) {
+ var val = val[i].choice_list[d];
+ dictItemList.push({
"CN_S_NAME": val,
"CN_S_VALUE": val,
"Name": val,
@@ -4044,17 +4007,14 @@
"value": val
});
+ }
+ ca.dictitem = dictItemList;
}
- ca.dictitem =
- dictItemList;
- // attr[j].dictitem = val[i].choice_list;
- } else {
- // ca.value = val[i].value;
+
}
}
}
}
-
}
}
}
@@ -4073,263 +4033,168 @@
}
}).catch(ex => {
- // console.log(ex);
- uni.showModal({
- title: this.translateSys('error') + " 6.1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ // console.log(ex);
+ uni.showModal({
+ title: this.translateSys('error') + " 6.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: this.translateSys('close')
});
- },
- scan_DataObjRunCustomEvent(info, data_attr) {
- var $this = this;
- var obj_attr = {};
- info.attr.forEach(item => {
- obj_attr[item.attr] = item
- .value;
- });
- var enviroment = {};
- if (info.enviroment) {
- enviroment = info.enviroment;
- } else {
- enviroment = {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: 'MBOX', //this.param.Sub_Cls.ID, // 鍔熻兘鐐逛粠鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- edit_dlg: {
- type: 'small', //灏忕獥鍙�- class_id: 'MBOX', //this.param.Sub_Cls.ID,//褰撳墠鏁版嵁绫籭d
- },
- master: {
- cls_id: info
- .clsid, // button=bottom鏃�master鐨刢ls_id
- //obj_id: '' // button=bottom鏃�master鐨刼bj_id
- obj_attrs: obj_attr,
- }
- };
-
- }
- var global_attr = this.global_attr;
- if (info.global_attr) {
- global_attr = info.global_attr;
- }
-
- enviroment = Base64.encode(JSON.stringify(
- enviroment)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
- var inputParamter = info.inputParamter;
- if (info.inputParamter) {
- info.inputParamter = Base64.encode(JSON
- .stringify(info.inputParamter)
- ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
- }
- var global_attr = Base64.encode(JSON
- .stringify(this.global_attr)
- ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
-
- if (!info.eventid.includes('{')) info
- .eventid = '{' + info.eventid + '}';
- var dataInfo = {
- ed_type: info.edtype,
- start_transaction: '',
- class_id: info.clsid,
- class_name: '',
- event_id: info.eventid,
- event_name: '',
- data_obj_id: info.objid,
- obj_attr: obj_attr,
- prj_id: info.projectid.replace('{',
- '').replace('}', ''),
- ref_cls_id: info.rclsid,
- rel_obj_id: info.robjid,
- user_login: info.userlogin,
- data_json: '',
- compose_info: '',
- ext_info: enviroment,
- global_attr: global_attr,
- input_param: info.inputParamter,
+ });
+ },
+ scan_DataObjRunCustomEvent(info, data_attr) {
+ var $this = this;
+ var obj_attr = {};
+ info.attr.forEach(item => {
+ obj_attr[item.attr] = item
+ .value;
+ });
+ var enviroment = {};
+ if (info.enviroment) {
+ enviroment = info.enviroment;
+ } else {
+ enviroment = {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: 'MBOX', //this.param.Sub_Cls.ID, // 鍔熻兘鐐逛粠鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ edit_dlg: {
+ type: 'small', //灏忕獥鍙�+ class_id: 'MBOX', //this.param.Sub_Cls.ID,//褰撳墠鏁版嵁绫籭d
+ },
+ master: {
+ cls_id: info
+ .clsid, // button=bottom鏃�master鐨刢ls_id
+ //obj_id: '' // button=bottom鏃�master鐨刼bj_id
+ obj_attrs: obj_attr,
+ }
};
- console.log(dataInfo);
- // return;
- runCustomEvent(dataInfo).then(data => {
- console.log(data);
- if (data.ret != 0) {
- var tip = data
- .err_info ?
- typeof data
- .err_info ==
- 'string' ? data
- .err_info : data
- .err_info.join(
- '<br/>') : '';
- if (data.ret == 801)
- uni.showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
- else uni.showModal({
+
+ }
+ var global_attr = this.global_attr;
+ if (info.global_attr) {
+ global_attr = info.global_attr;
+ }
+
+ enviroment = Base64.encode(JSON.stringify(
+ enviroment)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var inputParamter = info.inputParamter;
+ if (info.inputParamter) {
+ info.inputParamter = Base64.encode(JSON
+ .stringify(info.inputParamter)
+ ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ }
+ var global_attr = Base64.encode(JSON
+ .stringify(this.global_attr)
+ ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+
+ if (!info.eventid.includes('{')) info
+ .eventid = '{' + info.eventid + '}';
+ var dataInfo = {
+ ed_type: info.edtype,
+ start_transaction: '',
+ class_id: info.clsid,
+ class_name: '',
+ event_id: info.eventid,
+ event_name: '',
+ data_obj_id: info.objid,
+ obj_attr: obj_attr,
+ prj_id: info.projectid.replace('{',
+ '').replace('}', ''),
+ ref_cls_id: info.rclsid,
+ rel_obj_id: info.robjid,
+ user_login: info.userlogin,
+ data_json: '',
+ compose_info: '',
+ ext_info: enviroment,
+ global_attr: global_attr,
+ input_param: info.inputParamter,
+ };
+ console.log(dataInfo);
+ // return;
+ runCustomEvent(dataInfo).then(data => {
+ console.log(data);
+ if (data.ret != 0) {
+ var tip = data
+ .err_info ?
+ typeof data
+ .err_info ==
+ 'string' ? data
+ .err_info : data
+ .err_info.join(
+ '<br/>') : '';
+ if (data.ret == 801)
+ uni.showModal({
title: this.translateSys('tip'),
- content: tip +
- ',鎻愮ず:' +
- data
- .ret,
+ content: tip,
showCancel: false,
confirmText: this.translateSys('close')
});
- return false
- } else {
- var tip = data.info ?
- typeof data.info ==
- 'string' ? data
- .info : data.info
- .join('<br/>') :
- '';
- if (tip) uni
- .showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ else uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip +
+ ',鎻愮ず:' +
+ data
+ .ret,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
+ return false
+ } else {
+ var tip = data.info ?
+ typeof data.info ==
+ 'string' ? data
+ .info : data.info
+ .join('<br/>') :
+ '';
+ if (tip) uni
+ .showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
- var actionlist = data
- .action;
- if (actionlist) {
- console.log(
- actionlist);
- for (var ii =
- 0; ii <
- actionlist
- .length; ii++
+ var actionlist = data
+ .action;
+ if (actionlist) {
+ console.log(
+ actionlist);
+ for (var ii =
+ 0; ii <
+ actionlist
+ .length; ii++
+ ) {
+ var action =
+ actionlist[
+ ii];
+ if (action
+ .action_type ==
+ 'set_dlg_attr'
) {
- var action =
- actionlist[
- ii];
- if (action
- .action_type ==
- 'set_dlg_attr'
+ var result =
+ action
+ .value;
+ for (var i =
+ 0; i <
+ result
+ .length; i++
) {
- var result =
- action
- .value;
- for (var i =
- 0; i <
- result
- .length; i++
+ if (result[
+ i
+ ]
+ .choice_list
) {
- if (result[
- i
- ]
- .choice_list
- ) {
- for (
- var s =
- 0; s <
- $this
- .$data
- .subPanelList
- .length; s++
- ) {
- for (
- var c =
- 0; c <
- $this
- .$data
- .subPanelList[
- s
- ]
- .subClassAttrList
- .length; c++
- ) {
- var attr =
- $this
- .$data
- .subPanelList[
- s
- ]
- .subClassAttrList[
- c
- ]
- .Attr;
- for (
- var j =
- 0; j <
- attr
- .length; j++
- ) {
- if (attr[
- j
- ]
- .Name ==
- result[
- i
- ]
- .attr
- ) {
- if (utils.classUtils.attrTypeIsDict(attr[j]
- .Type)) {
- var
- dictItemList = [];
- for (
- var d in
- result[
- i
- ]
- .choice_list
- ) {
- var val =
- result[
- i
- ]
- .choice_list[
- d
- ];
- dictItemList
- .push({
- "CN_S_NAME": val,
- "CN_S_VALUE": val,
- "Name": val,
- "label": val,
- "value": val
- });
- }
- attr[
- j]
- .dictitem =
- dictItemList;
- // attr[j].dictitem = result[i].choice_list;
- }
- }
- }
- }
- }
- }
for (
var s =
0; s <
- $this
- .$data
- .subPanelList
+ $this.subPanelList
.length; s++
) {
- for (
- var c =
- 0; c <
- $this
- .$data
- .subPanelList[
- s
- ]
- .subClassAttrList
- .length; c++
- ) {
+ for (var c = 0; c < $this.subPanelList[s].subClassAttrList
+ .length; c++) {
var attr =
- $this
- .$data
- .subPanelList[
+ $this.subPanelList[
s
]
.subClassAttrList[
@@ -4342,18 +4207,6 @@
attr
.length; j++
) {
- console
- .log(
- attr[
- j
- ]
- .Name +
- '==' +
- result[
- i
- ]
- .attr
- );
if (attr[
j
]
@@ -4363,399 +4216,67 @@
]
.attr
) {
- attr[
- j]
- .Value =
- result[
- i
- ]
- .value;
- }
- }
- }
- }
- }
- } else if (
- action
- .action_type ==
- 'set_global_attr'
- ) {
- $this
- .$actiontr =
- action
- .value || [];
- } else if (
- action
- .action_type ==
- 'open_common_dlg'
- ) { //鎵撳紑渚ф粦寮规
- var $this =
- this;
- if (action
- .value
- .common_dlg_id ==
- 'check_list'
- ) {
- $this
- .$data
- .check_list =
- action
- .value
- .config;
- if (action
- .value
- .config
- .appear_style ==
- 'sideslip'
- ) //鍒ゆ柇鏄惁鏄晶婊�- $this
- .$data
- .popupType =
- 'right';
- else
- $this
- .$data
- .popupType =
- 'center'
- // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
- $this
- .$refs
- .popup
- .open(
- $this
- .$data
- .popupType
- );
- }
- } else if (
- action
- .action_type ==
- 'add_subcls_panel'
- ) { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�- var result =
- action
- .value;
- var $this =
- this;
- var list_1 =
- JSON
- .parse(
- JSON
- .stringify(
- this
- .$data
- .subClassAttrList
- )
- );
- var scanCodeVal =
- $this
- .$data
- .scanCodeVal;
- var rand =
- '';
- for (var i =
- 0; i <
- 5; i++
- ) { //鐢熸垚5浣嶉殢鏈烘暟
- rand +=
- Math
- .floor(
- Math
- .random() *
- 10
- );
- }
- if (inputParamter[
- 0]
- .attr
- ) {
- if (inputParamter[
- 0
- ]
- .attr ==
- "mast_input_3037"
- ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�- scanCodeVal =
- "mast_input_3037-" +
- rand;
- }
- if (info
- .attr[
- 0]
- .attr
- ) {
- if (info
- .attr[
- 0
- ]
- .attr ==
- "mast_input_3037"
- ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�- scanCodeVal =
- "mast_input_3037-" +
- rand;
- }
- $this.$data
- .subPanelList
- .push({
- scanCodeVal: scanCodeVal,
- subClassAttr: list_1
- });
- for (var i =
- 0; i <
- result
- .length; i++
- ) {
- for (
- var s =
- 0; s <
- $this
- .$data
- .subPanelList
- .length; s++
- ) {
- if ($this
- .$data
- .subPanelList[
- s
- ]
- .scanCodeVal ==
- scanCodeVal
- ) {
- if (result[
- i
- ]
- .attr ==
- "S_ID"
- )
- $this
- .$data
- .subPanelList[
- s
- ]
- .ObjID =
- result[
- i
- ]
- .value;
- var _subClassAttr =
- $this
- .$data
- .subPanelList[
- s
- ]
- .subClassAttr;
- for (
- var c =
- 0; c <
- _subClassAttr
- .length; c++
- ) {
- var attr =
- _subClassAttr[
- c
- ]
- .Attr;
- for (
- var j =
- 0; j <
- attr
- .length; j++
- ) {
- // console.log(attr[j].Name+'=='+result[i].attr);
- if (attr[
- j
- ]
- .Name ==
- result[
- i
- ]
- .attr
- ) {
+ if (utils.classUtils.attrTypeIsDict(attr[j]
+ .Type)) {
+ var
+ dictItemList = [];
+ for (
+ var d in
+ result[
+ i
+ ]
+ .choice_list
+ ) {
+ var val =
+ result[
+ i
+ ]
+ .choice_list[
+ d
+ ];
+ dictItemList
+ .push({
+ "CN_S_NAME": val,
+ "CN_S_VALUE": val,
+ "Name": val,
+ "label": val,
+ "value": val
+ });
+ }
attr[
j]
- .Value =
- result[
- i
- ]
- .value;
+ .dictitem =
+ dictItemList;
+ // attr[j].dictitem = result[i].choice_list;
}
}
}
-
- // $this.subPanelList[s].subClassAttr=list_1;
- }
- }
-
- var length =
- 0;
- if (!
- $this
- .$data
- .refdatastore
- .filter(
- function(
- s
- ) {
- return result[
- i
- ]
- .attr ==
- s
- .attr
- }
- )
- .length
- ) {
- length
- =
- 1;
- $this
- .$data
- .refdatastore
- .push(
- result[
- i
- ]
- );
- }
- if (length ==
- 0
- ) {
- for (
- var j =
- 0; j <
- $this
- .$data
- .refdatastore
- .length; j++
- ) {
- if ($this
- .$data
- .refdatastore[
- j
- ]
- .attr ==
- result[
- i
- ]
- .attr
- ) {
- $this
- .$data
- .refdatastore[
- j
- ]
- .value =
- result[
- i
- ]
- .value;
- }
}
}
}
- }
- }
- }
-
- if (data.result) {
- var list_1 = JSON
- .parse(JSON
- .stringify(
- this
- .$data
- .subClassAttrList
- ));
- var scanCodeVal =
- $this.$data
- .scanCodeVal;
- var rand = '';
- for (var i = 0; i <
- 5; i++
- ) { //鐢熸垚5浣嶉殢鏈烘暟
- rand += Math
- .floor(Math
- .random() *
- 10);
- }
- if (inputParamter[
- 0].attr) {
- if (inputParamter[
- 0]
- .attr ==
- "mast_input_3037"
- ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�- scanCodeVal =
- "mast_input_3037-" +
- rand;
- }
- if (info.attr[0]
- .attr) {
- if (info.attr[
- 0]
- .attr ==
- "mast_input_3037"
- ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�- scanCodeVal =
- "mast_input_3037-" +
- rand;
- }
- $this.$data
- .subPanelList
- .push({
- scanCodeVal: scanCodeVal,
- subClassAttr: list_1
- });
- var result = data
- .result;
- for (var i = 0; i <
- result
- .length; i++) {
- for (var s =
- 0; s <
- $this.$data
- .subPanelList
- .length; s++
- ) {
- if ($this
- .$data
- .subPanelList[
- s]
- .scanCodeVal ==
- scanCodeVal
+ for (
+ var s =
+ 0; s <
+ $this
+ .subPanelList
+ .length; s++
) {
- if (result[
- i
- ]
- .attr ==
- "S_ID"
- )
- $this
- .$data
- .subPanelList[
- s
- ]
- .ObjID =
- result[
- i
- ]
- .value;
- var _subClassAttr =
- $this
- .$data
- .subPanelList[
- s
- ]
- .subClassAttr;
for (
var c =
0; c <
- _subClassAttr
+ $this
+ .subPanelList[
+ s
+ ]
+ .subClassAttrList
.length; c++
) {
var attr =
- _subClassAttr[
+ $this
+ .subPanelList[
+ s
+ ]
+ .subClassAttrList[
c
]
.Attr;
@@ -4765,7 +4286,18 @@
attr
.length; j++
) {
- // console.log(attr[j].Name+'=='+result[i].attr);
+ console
+ .log(
+ attr[
+ j
+ ]
+ .Name +
+ '==' +
+ result[
+ i
+ ]
+ .attr
+ );
if (attr[
j
]
@@ -4787,62 +4319,254 @@
}
}
}
-
- var length = 0;
- if (!$this
- .$data
- .refdatastore
- .filter(
- function(
- s
+ } else if (
+ action
+ .action_type ==
+ 'set_global_attr'
+ ) {
+ $this
+ .$actiontr =
+ action
+ .value || [];
+ } else if (
+ action
+ .action_type ==
+ 'open_common_dlg'
+ ) { //鎵撳紑渚ф粦寮规
+ var $this =
+ this;
+ if (action
+ .value
+ .common_dlg_id ==
+ 'check_list'
+ ) {
+ $this.check_list =
+ action
+ .value
+ .config;
+ if (action
+ .value
+ .config
+ .appear_style ==
+ 'sideslip'
+ ) //鍒ゆ柇鏄惁鏄晶婊�+ $this
+ .popupType =
+ 'right';
+ else
+ $this.popupType =
+ 'center'
+ // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
+ $this
+ .$refs
+ .popup
+ .open(
+ $this
+ .popupType
+ );
+ }
+ } else if (
+ action
+ .action_type ==
+ 'add_subcls_panel'
+ ) { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ var result =
+ action
+ .value;
+ var $this =
+ this;
+ var list_1 =
+ JSON
+ .parse(
+ JSON
+ .stringify(
+ this.subClassAttrList
+ )
+ );
+ var scanCodeVal =
+ $this.scanCodeVal;
+ var rand =
+ '';
+ for (var i =
+ 0; i <
+ 5; i++
+ ) { //鐢熸垚5浣嶉殢鏈烘暟
+ rand +=
+ Math
+ .floor(
+ Math
+ .random() *
+ 10
+ );
+ }
+ if (inputParamter[
+ 0]
+ .attr
+ ) {
+ if (inputParamter[
+ 0
+ ]
+ .attr ==
+ "mast_input_3037"
+ ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ scanCodeVal =
+ "mast_input_3037-" +
+ rand;
+ }
+ if (info
+ .attr[
+ 0]
+ .attr
+ ) {
+ if (info
+ .attr[
+ 0
+ ]
+ .attr ==
+ "mast_input_3037"
+ ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ scanCodeVal =
+ "mast_input_3037-" +
+ rand;
+ }
+ $this.subPanelList
+ .push({
+ scanCodeVal: scanCodeVal,
+ subClassAttr: list_1
+ });
+ for (var i =
+ 0; i <
+ result
+ .length; i++
+ ) {
+ for (
+ var s =
+ 0; s <
+ $this.subPanelList
+ .length; s++
+ ) {
+ if ($this.subPanelList[
+ s
+ ]
+ .scanCodeVal ==
+ scanCodeVal
) {
- return result[
+ if (result[
i
]
.attr ==
- s
- .attr
- })
- .length) {
- length = 1;
- $this.$data
- .refdatastore
- .push(
- result[
- i
- ]
- );
- }
- if (length ==
- 0) {
- for (var j =
- 0; j <
- $this
- .$data
- .refdatastore
- .length; j++
- ) {
- if ($this
- .$data
- .refdatastore[
- j
- ]
- .attr ==
- result[
- i
- ]
- .attr
- ) {
- $this
- .$data
- .refdatastore[
- j
+ "S_ID"
+ )
+ $this.subPanelList[
+ s
]
- .value =
+ .ObjID =
result[
i
]
.value;
+ var _subClassAttr =
+ $this.subPanelList[
+ s
+ ]
+ .subClassAttr;
+ for (
+ var c =
+ 0; c <
+ _subClassAttr
+ .length; c++
+ ) {
+ var attr =
+ _subClassAttr[
+ c
+ ]
+ .Attr;
+ for (
+ var j =
+ 0; j <
+ attr
+ .length; j++
+ ) {
+ // console.log(attr[j].Name+'=='+result[i].attr);
+ if (attr[
+ j
+ ]
+ .Name ==
+ result[
+ i
+ ]
+ .attr
+ ) {
+ attr[
+ j]
+ .Value =
+ result[
+ i
+ ]
+ .value;
+ }
+ }
+ }
+
+ // $this.subPanelList[s].subClassAttr=list_1;
+ }
+ }
+
+ var length =
+ 0;
+ if (!
+ $this.refdatastore
+ .filter(
+ function(
+ s
+ ) {
+ return result[
+ i
+ ]
+ .attr ==
+ s
+ .attr
+ }
+ )
+ .length
+ ) {
+ length
+ =
+ 1;
+ $this.refdatastore
+ .push(
+ result[
+ i
+ ]
+ );
+ }
+ if (length ==
+ 0
+ ) {
+ for (
+ var j =
+ 0; j <
+ $this.refdatastore
+ .length; j++
+ ) {
+ if ($this.refdatastore[
+ j
+ ]
+ .attr ==
+ result[
+ i
+ ]
+ .attr
+ ) {
+ $this.refdatastore[
+ j
+ ]
+ .value =
+ result[
+ i
+ ]
+ .value;
+ }
}
}
}
@@ -4850,51 +4574,281 @@
}
}
- }).catch(ex => {
- // console.log(ex);
- uni.showModal({
- title: this.translateSys('error') + " 7.1",
- content: ex.errMsg,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
+ if (data.result) {
+ var list_1 = JSON
+ .parse(JSON
+ .stringify(
+ this.subClassAttrList
+ ));
+ var scanCodeVal =
+ $this.scanCodeVal;
+ var rand = '';
+ for (var i = 0; i <
+ 5; i++
+ ) { //鐢熸垚5浣嶉殢鏈烘暟
+ rand += Math
+ .floor(Math
+ .random() *
+ 10);
+ }
+ if (inputParamter[
+ 0].attr) {
+ if (inputParamter[
+ 0]
+ .attr ==
+ "mast_input_3037"
+ ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ scanCodeVal =
+ "mast_input_3037-" +
+ rand;
+ }
+ if (info.attr[0]
+ .attr) {
+ if (info.attr[
+ 0]
+ .attr ==
+ "mast_input_3037"
+ ) //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ scanCodeVal =
+ "mast_input_3037-" +
+ rand;
+ }
+ $this.subPanelList
+ .push({
+ scanCodeVal: scanCodeVal,
+ subClassAttr: list_1
+ });
+ var result = data
+ .result;
+ for (var i = 0; i <
+ result
+ .length; i++) {
+ for (var s =
+ 0; s <
+ $this.subPanelList
+ .length; s++
+ ) {
+ if ($this.subPanelList[
+ s]
+ .scanCodeVal ==
+ scanCodeVal
+ ) {
+ if (result[
+ i
+ ]
+ .attr ==
+ "S_ID"
+ )
+ $this.subPanelList[
+ s
+ ]
+ .ObjID =
+ result[
+ i
+ ]
+ .value;
+ var _subClassAttr =
+ $this.subPanelList[
+ s
+ ]
+ .subClassAttr;
+ for (
+ var c =
+ 0; c <
+ _subClassAttr
+ .length; c++
+ ) {
+ var attr =
+ _subClassAttr[
+ c
+ ]
+ .Attr;
+ for (
+ var j =
+ 0; j <
+ attr
+ .length; j++
+ ) {
+ // console.log(attr[j].Name+'=='+result[i].attr);
+ if (attr[
+ j
+ ]
+ .Name ==
+ result[
+ i
+ ]
+ .attr
+ ) {
+ attr[
+ j]
+ .Value =
+ result[
+ i
+ ]
+ .value;
+ }
+ }
+ }
+ }
+ }
+
+ var length = 0;
+ if (!$this.refdatastore
+ .filter(
+ function(
+ s
+ ) {
+ return result[
+ i
+ ]
+ .attr ==
+ s
+ .attr
+ })
+ .length) {
+ length = 1;
+ $this.refdatastore
+ .push(
+ result[
+ i
+ ]
+ );
+ }
+ if (length ==
+ 0) {
+ for (var j =
+ 0; j <
+ $this
+ .refdatastore
+ .length; j++
+ ) {
+ if ($this
+ .refdatastore[
+ j
+ ]
+ .attr ==
+ result[
+ i
+ ]
+ .attr
+ ) {
+ $this
+ .refdatastore[
+ j
+ ]
+ .value =
+ result[
+ i
+ ]
+ .value;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: this.translateSys('error') + " 7.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: this.translateSys('close')
});
- },
- scan_OKDataObjRunCustomEvent(eventID) {
- uni.showLoading({
- title: "鍔犺浇涓�..",
- mask: true
- });
- var $this = this;
- var req = [];
- var attrlist = $this.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
+ });
+ },
+ scan_OKDataObjRunCustomEvent(eventID) {
+ uni.showLoading({
+ title: "鍔犺浇涓�..",
+ mask: true
+ });
+ var $this = this;
+ var req = [];
+ var attrlist = $this.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Value == '璇烽�鎷� || ar
+ .Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value =
+ '';
+ if (utils.classUtils.attrTypeIsDict(ar.Type)) {
+ if (ar.select ==
+ true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
+ var valStr = "";
+ for (var v in ar.Value) {
+ if (valStr)
+ valStr += ";";
+ valStr += ar.Value[v];
+ }
+ req.push({
+ attr: ar.Name,
+ value: valStr
+ });
+ } else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value
+ });
+ } else
+ req.push(this.formatAttr(ar));
+
+ if (ar.notempty == true && !ar
+ .Value) {
+ // if(ar.NotEmpty=='1'){
+ uni.hideLoading();
+ // uni.showToast({title:ar.DispName+'涓嶈兘涓虹┖锛�,icon:"success",duration:3000});
+ uni.showModal({
+ title: this.translateSys('tip') + "",
+ content: ar
+ .DispName +
+ '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
+ return;
+ }
+ }
+ }
+ var objects = [];
+ var subPanelList = $this.subPanelList;
+ for (var s = 0; s < subPanelList
+ .length; s++) {
+ var sub_req = [];
+ for (var i = 0; i < subPanelList[s]
+ .subClassAttr.length; i++) {
+ var attr = subPanelList[s]
+ .subClassAttr[i].Attr;
+ for (var j = 0; j < attr
+ .length; j++) {
var ar = attr[j];
if (ar.Value == '璇烽�鎷� || ar
- .Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value =
- '';
+ .Value == '鈥斺�璇烽�鎷┾�鈥�) ar
+ .Value = '';
if (utils.classUtils.attrTypeIsDict(ar.Type)) {
if (ar.select ==
true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
var valStr = "";
- for (var v in ar.Value) {
+ for (var v in ar
+ .Value) {
if (valStr)
valStr += ";";
- valStr += ar.Value[v];
+ valStr += ar.Value[
+ v];
}
- req.push({
- attr: ar.Name,
+ sub_req.push({
+ attr: ar
+ .Name,
value: valStr
});
} else
- req.push({
+ sub_req.push({
attr: ar.Name,
value: ar.Value
});
} else
- req.push(this.formatAttr(ar));
+ sub_req.push(this.formatAttr(ar));
if (ar.notempty == true && !ar
.Value) {
@@ -4913,233 +4867,167 @@
}
}
}
- var objects = [];
- var subPanelList = $this.$data
- .subPanelList;
- for (var s = 0; s < subPanelList
- .length; s++) {
- var sub_req = [];
- for (var i = 0; i < subPanelList[s]
- .subClassAttr.length; i++) {
- var attr = subPanelList[s]
- .subClassAttr[i].Attr;
- for (var j = 0; j < attr
- .length; j++) {
- var ar = attr[j];
- if (ar.Value == '璇烽�鎷� || ar
- .Value == '鈥斺�璇烽�鎷┾�鈥�) ar
- .Value = '';
- if (utils.classUtils.attrTypeIsDict(ar.Type)) {
- if (ar.select ==
- true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
- var valStr = "";
- for (var v in ar
- .Value) {
- if (valStr)
- valStr += ";";
- valStr += ar.Value[
- v];
- }
- sub_req.push({
- attr: ar
- .Name,
- value: valStr
- });
- } else
- sub_req.push({
- attr: ar.Name,
- value: ar.Value
- });
- } else
- sub_req.push(this.formatAttr(ar));
-
- if (ar.notempty == true && !ar
- .Value) {
- // if(ar.NotEmpty=='1'){
- uni.hideLoading();
- // uni.showToast({title:ar.DispName+'涓嶈兘涓虹┖锛�,icon:"success",duration:3000});
- uni.showModal({
- title: this.translateSys('tip') + "",
- content: ar
- .DispName +
- '涓嶈兘涓虹┖锛�,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
- return;
- }
- }
- }
- objects.push({
- obj_id: subPanelList[s]
- .scanCodeVal,
- obj_attrs: sub_req
- });
+ objects.push({
+ obj_id: subPanelList[s]
+ .scanCodeVal,
+ obj_attrs: sub_req
+ });
+ }
+ var dataJson = {
+ master_cls: {
+ cls_name: 'MBOX', //$this.param.Master_Cls.Name,
+ obj_attrs: req
+ },
+ input_3037: $this.scanCodeVal, //鎵爜鍐呭
+ op_type: $this.param
+ .OperationType, //浣滀笟绫诲瀷瀹氫箟
+ sub_cls: {
+ cls_name: 'MBOX', //$this.param.Sub_Cls.Name,
+ objects: objects
}
- var dataJson = {
- master_cls: {
- cls_name: 'MBOX', //$this.param.Master_Cls.Name,
- obj_attrs: req
- },
- input_3037: $this.$data
- .scanCodeVal, //鎵爜鍐呭
- op_type: $this.param
- .OperationType, //浣滀笟绫诲瀷瀹氫箟
- sub_cls: {
- cls_name: 'MBOX', //$this.param.Sub_Cls.Name,
- objects: objects
- }
- };
- // console.log(JSON.stringify(dataJson));
- // var dataInfo = {
- // edtype: "7", eventid: eventID, projectid: '',rclsid: '', robjid: '', userlogin: '',
- // clsid: 'MBOX', objid: '',attr: JSON.stringify([]), extinfo: JSON.stringify([]),
- // global_attr: JSON.stringify($this.global_attr),dataJson:JSON.stringify(dataJson)
- // }
- // console.log(JSON.stringify(dataInfo));
- var dataJson = Base64.encode(JSON
- .stringify(dataJson)
- ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
- var global_attr = Base64.encode(JSON
- .stringify(this.global_attr)
- ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
- if (!eventID.includes('{')) eventID = '{' +
- eventID + '}';
- var dataInfo = {
- ed_type: "7",
- start_transaction: '',
- class_id: 'MBOX',
- class_name: '',
- event_id: eventID,
- event_name: '',
- data_obj_id: '',
- obj_attr: '',
- prj_id: '',
- ref_cls_id: '',
- rel_obj_id: '',
- user_login: '',
- data_json: dataJson,
- compose_info: '',
- ext_info: '',
- global_attr: global_attr,
- input_param: '',
- };
- console.log(dataInfo);
- // return;
- runCustomEvent(dataInfo).then(data => {
- console.log(data);
- uni.hideLoading();
- if (data.ret != 0) {
- var tip = data
- .err_info ?
- typeof data
- .err_info ==
- 'string' ? data
- .err_info : data
- .err_info.join(
- '<br/>') : '';
- if (data.ret == 801)
- uni.showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
- else uni.showModal({
+ };
+ // console.log(JSON.stringify(dataJson));
+ // var dataInfo = {
+ // edtype: "7", eventid: eventID, projectid: '',rclsid: '', robjid: '', userlogin: '',
+ // clsid: 'MBOX', objid: '',attr: JSON.stringify([]), extinfo: JSON.stringify([]),
+ // global_attr: JSON.stringify($this.global_attr),dataJson:JSON.stringify(dataJson)
+ // }
+ // console.log(JSON.stringify(dataInfo));
+ var dataJson = Base64.encode(JSON
+ .stringify(dataJson)
+ ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var global_attr = Base64.encode(JSON
+ .stringify(this.global_attr)
+ ); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ if (!eventID.includes('{')) eventID = '{' +
+ eventID + '}';
+ var dataInfo = {
+ ed_type: "7",
+ start_transaction: '',
+ class_id: 'MBOX',
+ class_name: '',
+ event_id: eventID,
+ event_name: '',
+ data_obj_id: '',
+ obj_attr: '',
+ prj_id: '',
+ ref_cls_id: '',
+ rel_obj_id: '',
+ user_login: '',
+ data_json: dataJson,
+ compose_info: '',
+ ext_info: '',
+ global_attr: global_attr,
+ input_param: '',
+ };
+ console.log(dataInfo);
+ // return;
+ runCustomEvent(dataInfo).then(data => {
+ console.log(data);
+ uni.hideLoading();
+ if (data.ret != 0) {
+ var tip = data
+ .err_info ?
+ typeof data
+ .err_info ==
+ 'string' ? data
+ .err_info : data
+ .err_info.join(
+ '<br/>') : '';
+ if (data.ret == 801)
+ uni.showModal({
title: this.translateSys('tip'),
- content: tip +
- ',鎻愮ず:' +
- data
- .ret,
+ content: tip,
showCancel: false,
confirmText: this.translateSys('close')
});
- return false
- } else {
- var tip = data.info ?
- typeof data.info ==
- 'string' ? data
- .info : data.info
- .join('<br/>') :
- '';
- if (tip) uni
- .showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys('close')
- });
-
- var result = data
- .result;
- if (eventID != $this
- .$data.param
- .After_OK_Event.ID)
- $this
- .scan_OKDataObjRunCustomEvent(
- $this.$data
- .param
- .After_OK_Event
- .ID);
- else {
- //鍒锋柊
- uni.redirectTo({
- url: '../modal/3037?param=' +
- JSON
- .stringify(
- $this
- .$data
- .param
- ) +
- "&titlename=" +
- $this
- .$data
- .title
- });
- }
- }
-
- }).catch(ex => {
- // console.log(ex);
- uni.hideLoading();
- uni.showModal({
- title: this.translateSys('error') + " 8.1",
- content: ex.errMsg,
+ else uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip +
+ ',鎻愮ず:' +
+ data
+ .ret,
showCancel: false,
confirmText: this.translateSys('close')
});
- });
- },
+ return false
+ } else {
+ var tip = data.info ?
+ typeof data.info ==
+ 'string' ? data
+ .info : data.info
+ .join('<br/>') :
+ '';
+ if (tip) uni
+ .showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
- formatAttr(attr) {
- if (utils.classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if (attr.Value == '璇�) ar.Value = '';
- if (utils.classUtils.attrTypeIsUser(attr.Type) || utils.classUtils.attrTypeIsProject(attr
- .Type)) //if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- return {
- attr: attr.Name,
- value: attr.ValID ? attr.ValID : ''
- };
- else if (utils.classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='甯冨皵鍊�)
- return {
- attr: attr.Name,
- value: attr.Value ? '1' : '0'
- };
- else
- return {
- attr: attr.Name,
- value: attr.Value ? attr.Value : ''
- };
- },
- translate(t) {
- if (typeof this.$t == "function") return this.$t(`page.${t}`)
- else return t;
- },
- translateSys(t) {
- if (typeof this.$t == "function") return this.$t(`sys.${t}`)
- else return t;
- },
- }
+ var result = data
+ .result;
+ if (eventID != $this.param.After_OK_Event.ID)
+ $this.scan_OKDataObjRunCustomEvent(
+ $this.param
+ .After_OK_Event
+ .ID);
+ else {
+ //鍒锋柊
+ uni.redirectTo({
+ url: '../modal/3037?param=' +
+ JSON
+ .stringify(
+ $this.param
+ ) +
+ "&titlename=" +
+ $this.title
+ });
+ }
+ }
+
+ }).catch(ex => {
+ // console.log(ex);
+ uni.hideLoading();
+ uni.showModal({
+ title: this.translateSys('error') + " 8.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ });
+ });
+ },
+
+ formatAttr(attr) {
+ if (utils.classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
+ if (attr.Value == '璇�) ar.Value = '';
+ if (utils.classUtils.attrTypeIsUser(attr.Type) || utils.classUtils.attrTypeIsProject(attr
+ .Type)) //if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
+ return {
+ attr: attr.Name,
+ value: attr.ValID ? attr.ValID : ''
+ };
+ else if (utils.classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='甯冨皵鍊�)
+ return {
+ attr: attr.Name,
+ value: attr.Value ? '1' : '0'
+ };
+ else
+ return {
+ attr: attr.Name,
+ value: attr.Value ? attr.Value : ''
+ };
+ },
+ translate(t) {
+ if (typeof this.$t == "function") return this.$t(`page.${t}`)
+ else return t;
+ },
+ translateSys(t) {
+ if (typeof this.$t == "function") return this.$t(`sys.${t}`)
+ else return t;
+ },
+ }
}
</script>
<style>
--
Gitblit v1.9.1