| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if ((ar.NotEmpty == '1' || ar.notempty == true) && !ar.Value) { |
| | | // if(ar.notEmpty=='1'){ |
| | | uni.hideLoading(); |
| | | uni.showModal({title:"提示",content:ar.DispName+'不能为空!',showCancel:false,confirmText:"取消"}); |
| | | return; |
| | | } |
| | | if(ar.Value=='请选择') ar.Value=''; |
| | | if(ar.Value=='请选择' || ar.Value=='——请选择——') ar.Value=''; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | |
| | | req.push({ name: ar.Name, value: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ name: ar.Name, value: ar.Value ?ar.Value :''}); |
| | | |
| | | if ((ar.NotEmpty == '1' || ar.notempty == true) && !ar.Value) { |
| | | // if(ar.notEmpty=='1'){ |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({title:"提示",content:ar.DispName+'不能为空!',showCancel:false,confirmText:"取消"}); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var enviroment = { |
| | |
| | | var action = JSON.parse(success.data.Action); |
| | | if(action.ret=='0'){ |
| | | if(action.result_type=='0'){ |
| | | uni.showModal({title:"提示",content:action.result,showCancel:false,confirmText:"取消"}); |
| | | uni.showToast({title:action.result,icon:"success",duration:3000}); |
| | | } |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | } |
| | | this.class_attr_init(); |
| | | }else{ |
| | | uni.hideLoading(); |
| | | uni.showModal({title:"错误",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | } |
| | | }).catch(ex=>{ |
| | |
| | | // dictitemlist.push(dictitem[d].CN_S_NAME); |
| | | // } |
| | | // ca.dictitemlist = dictitemlist; |
| | | ca.Value = ca.dictitem[0].CN_S_NAME; |
| | | ca.Value = '请选择';//ca.dictitem[0].CN_S_NAME; |
| | | } |
| | | if(ca.Type=='日期' || ca.Type=='时间'){ |
| | | var nowDate = new Date(); |
| | |
| | | if (val[i].attr == ca.Name) { |
| | | if(ca.Type=='字典' || ca.Type=='字典-字符串'){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | for(var d in val[i].choice_list){ |
| | | var val =val[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"Name":val}); |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | }else{ |
| | | ca.value = val[i].value; |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Value=='请选择') ar.Value=''; |
| | | if(ar.Value=='请选择' || ar.Value=='——请选择——') ar.Value=''; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Value=='请选择') ar.Value=''; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |