jt
2023-02-15 d8bf63634b1a59b306a487344a5904d9ec9bb5f4
pages/modal/classAttr.vue
@@ -96,10 +96,10 @@
       width: 100%;
   }
   .tx_title{
      font-size: 36rpx;
      font-size: 32rpx;
   }
   .tx_title2{
      font-size: 36rpx;
      font-size: 32rpx;
      text-align: right;
      display: inline-block;
      vertical-align: -2px;
@@ -146,12 +146,30 @@
      transition-duration: 0.1s;
   }
   button.btn_add {
      width:49.5%;
      margin-top: 50rpx;
      padding: 20rpx;
      line-height: 1.5;
      background: #27A6E1;
      border: none;
      color: #fff;
       font-size: 38rpx;
      font-weight: bold;
      float: right;
      display: inline-block;
   }
   button.btn_cancel {
      width:49.5%;
      margin-top: 50rpx;
      padding: 20rpx;
      line-height: 1.5;
      background: #27A6E1;
      border: none;
      color: #fff;
       font-size: 38rpx;
      font-weight: bold;
      float: left;
      display: inline-block;
   }
   .i_tishi{
      color: red;
@@ -357,9 +375,9 @@
            </div>
         </div>
         
         <button type="default" @tap="sava" class="btn_add">{{title}}</button>
      </view>
      <button type="default" @tap="cancel" class="btn_cancel">取消</button>
      <button type="default" @tap="sava" class="btn_add">{{title}}</button>
   </view>
</template> 
@@ -430,6 +448,11 @@
         
      },
      methods: {
         cancel(e){
            uni.navigateBack({
               delta:1 //返回层数,2则上上页
            });
         },
         async classGridStyleInfo(){
            var $this = this;
            var gridstyleInfo = {
@@ -466,6 +489,7 @@
            getApp().onScan((result)=>{
               //console.log(result.decodedata);
               this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata;
               uni.hideKeyboard();
            })
         },
         onarrow(index,open){
@@ -844,8 +868,8 @@
               not_trigger_sys_event: ''
            };
            
            // return
            console.log(dataInfo);
            // return
            this.$store.dispatch('addclassattr',dataInfo).then(success=>{
               console.log(success);
               uni.hideLoading();
@@ -899,15 +923,17 @@
                                        ca.select = attrs[j].select==undefined?false:attrs[j].select;
                                 ca.Value ="";
                                 if(ca.dictitem){
                                    var dictitemlist=[];
                                    for (var d = 0; d < ca.dictitem.length; d++) {
                                       ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME;
                                       ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME;
                                    }
                                    if(ca.select == true)
                                       ca.Value = [];//ca.dictitem[0].CN_S_NAME;
                                    else 
                                       ca.Value = '请选择';//ca.dictitem[0].CN_S_NAME;
                                    var dictitemlist=[];
                                    for (var d = 0; d < ca.dictitem.length; d++) {
                                       ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME;
                                       ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME;
                                       if(ca.dictitem[d].CN_C_IS_DEFAULT=='1')
                                          ca.Value=ca.dictitem[d].CN_S_NAME;
                                    }
                                 }
                                 if(ca.Type=='日期' || ca.Type=='时间'){
                                    var nowDate = new Date();