jt
2022-08-15 34187dc1b0ffa83511a55e35e14f2e10afee6bf7
pages/modal/classAttr.vue
@@ -688,13 +688,7 @@
               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=='引用项目')
@@ -703,6 +697,14 @@
                     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 = {
@@ -729,13 +731,12 @@
                  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=>{
@@ -777,7 +778,7 @@
                                    //    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();
@@ -923,14 +924,14 @@
                                       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;
                                          }
                                       }
                                    }
@@ -1118,7 +1119,7 @@
               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=='引用项目')
@@ -1206,7 +1207,6 @@
               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=='引用项目')