cuiqian2004
2025-03-03 b0041cf10ba3ddf74b9edcfd340a7d1c9179d878
pages/modal/3037_2.vue
@@ -26,7 +26,7 @@
                  :type="item.name=='Input'?'text':item.name=='InputNumber'?'number':'text'" v-model="item.value"
                  :disabled="item.disabled" :placeholder="item.placeholder"
                  :style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}"
                  :focus="focusMateria" @focus="ontap(item)" @blur="onevent(item)" />
                  :focus="focusMateria" @focus="ontap(item)" @blur="onevent(item)" :maxlength="-1" />
               <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]"
                  @click="onchange(item)">&#xe568;</text>
            </view>
@@ -39,16 +39,17 @@
            </view>
            <!-- 复选框 -->
            <checkbox-group class="check_rememberPwd" v-if="item.name=='Checkbox'"
               :class="item.disabled?'input-disabled':''" @change="onModelValue(item)" :disabled="item.disabled"
               :data-ischeck="item.value" :style="{'margin-left':'10rpx'}">
               <label>
                  <checkbox :value="item.value" :checked="item.value" />
                  <text>{{item.label}}</text>
               :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onCheckBoxValue"
               :data-attr="item.fieldId">
               <label v-for="(item2) in item.selections" :key="item2.value">
                  <checkbox :value="item2.value" :checked="item.value.includes(item2.value)" />
                  <text>{{item2.label}}</text>
               </label>
            </checkbox-group>
            <!-- 单选框 -->
            <radio-group class="check_rememberPwd" v-if="item.name=='Radio'"
               :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onModelValue(item)">
               :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onRadioBoxValue"
               :data-attr="item.fieldId">
               <label v-for="(item2) in item.selections" :key="item2.value">
                  <radio :value="item2.value" :checked="item2.value === item.value" />
                  <text>{{item2.label}}</text>
@@ -78,7 +79,8 @@
               <!-- 左右布局 -->
               <p class="tx_title2">{{param.Scan_Code.Name}}:</p>
               <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent"
                  :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'">
                  :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"
                  :maxlength="-1">
               <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true">
                  <a @tap="scan_classAttr_extButton()"><i class="ace-icon fa"
                        :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a>
@@ -110,7 +112,7 @@
                           :type="item.name=='Input'?'text':item.name=='InputNumber'?'number':'text'"
                           v-model="item.value" :disabled="item.disabled" :placeholder="item.placeholder"
                           :style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}"
                           :focus="focusMateria" @focus="ontap(item)" @blur="onevent(item)" />
                           :focus="focusMateria" @focus="ontap(item)" @blur="onevent(item)" :maxlength="-1" />
                        <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]"
                           @click="onchange(item)">&#xe568;</text>
                     </view>
@@ -127,17 +129,17 @@
                     </view>
                     <!-- 复选框 -->
                     <checkbox-group class="check_rememberPwd" v-if="item.name=='Checkbox'"
                        :class="item.disabled?'input-disabled':''" @change="onModelValue(item)"
                        :data-ischeck="item.value" :disabled="item.disabled" :style="{'margin-left':'10rpx'}">
                        <label>
                           <checkbox :value="item.value" :checked="item.value" />
                           <text>{{item.label}}</text>
                        :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onCheckBoxValue"
                        :data-attr="item.fieldId">
                        <label v-for="(item2) in item.selections" :key="item2.value">
                           <checkbox :value="item2.value" :checked="item.value.includes(item2.value)" />
                           <text>{{item2.label}}</text>
                        </label>
                     </checkbox-group>
                     <!-- 单选框 -->
                     <radio-group class="check_rememberPwd" v-if="item.name=='Radio'"
                        :class="item.disabled?'input-disabled':''" :disabled="item.disabled"
                        :style="{'margin-left':'10rpx'}" @change="onModelValue(item)">
                        :style="{'margin-left':'10rpx'}" @change="onRadioBoxValue" :data-attr="cols.fieldId">
                        <label v-for="(item2) in item.selections" :key="item2.value">
                           <radio :value="item2.value" :checked="item2.value === item.value" />
                           <text>{{item2.label}}</text>
@@ -173,7 +175,8 @@
                                 v-model="cols.value" :disabled="cols.disabled"
                                 :placeholder="cols.placeholder"
                                 :style="{'width':cols.setting.prefix && cols.setting.suffix?'78%':cols.setting.prefix || cols.setting.suffix?'87%':'96%'}"
                                 :focus="focusMateria" @focus="ontap(cols)" @blur="onevent(cols)" />
                                 :focus="focusMateria" @focus="ontap(cols)" @blur="onevent(cols)"
                                 :maxlength="-1" />
                              <text v-if="cols.setting.suffix" class="uni-icon" :class="[cols.setting.suffix]"
                                 @click="onchange(cols)">&#xe568;</text>
                           </view>
@@ -192,17 +195,17 @@
                           <!-- 复选框 -->
                           <checkbox-group class="check_rememberPwd" v-if="cols.name=='Checkbox'"
                              :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled"
                              @change="onModelValue(cols)" :data-ischeck="cols.value"
                              :style="{'margin-left':'10rpx'}">
                              <label>
                                 <checkbox :value="cols.value" :checked="cols.value" />
                                 <text>{{cols.label}}</text>
                              @change="onCheckBoxValue" :data-attr="cols.fieldId">
                              <label v-for="(cols2) in cols.selections" :key="cols2.value">
                                 <checkbox :value="cols2.value"
                                    :checked="cols.value.includes(cols2.value)" />
                                 <text>{{cols2.label}}</text>
                              </label>
                           </checkbox-group>
                           <!-- 单选框 -->
                           <radio-group class="check_rememberPwd" v-if="cols.name=='Radio'"
                              :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled"
                              @change="onModelValue(cols)">
                              @change="onRadioBoxValue " :data-attr="cols.fieldId">
                              <label v-for="(cols2) in cols.selections" :key="cols2.value">
                                 <radio :value="cols2.value" :checked="cols2.value === cols.value" />
                                 <text>{{cols2.label}}</text>
@@ -249,8 +252,8 @@
         <uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange">
            <view class="popup-header">{{check_list.title}}</view>
            <view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }"
               :style="{'width':check_list.width?check_list.width+'px':'200px','height':check_list.height?check_list.height+'px':'88%'}">
               <view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':'415px'}">
            :style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}">
            <view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}">
                  <view class="view_popup_CheckList" v-for="(item,index) in check_list.items">
                     <checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check"
                        :data-index="index" :style="{'margin-left': '10rpx'}">
@@ -409,6 +412,23 @@
                     ele.show = true;
                     if (ele.useDict == true) { //判断useDict是否使用字典
                        await this.DictGetInfo(ele.bind.dict, index, 'mast');
                     } else {
                        if (ele?.name === "Select") {
                           const selections = ele?.selections || []
                           //有默认值,显示默认值
                           let itemName = ele.value || "";
                           if (itemName) {
                              $this.head_styledef.form
                                 .model[ele.fieldId] = itemName;
                           }
                           $this.head_styledef.form.items[index].dict = selections.map((a) => {
                              return {
                                 value: a.value,
                                 text: a.label
                              }
                           })
                        }
                     }
                  });
               }
@@ -453,6 +473,21 @@
                  $this.detail1_styledef.form.items.forEach(async (ele, index) => {
                     if (ele.useDict == true) { //判断useDict是否使用字典
                        await this.DictGetInfo(ele.bind.dict, index, 'sub');
                     } else {
                        if (ele?.name === "Select") {
                           const selections = ele?.selections || []
                           //有默认值,显示默认值
                           let itemName = ele.value || "";
                           if (itemName) {
                              $this.detail1_styledef.form.items[ele.fieldId] = itemName;
                           }
                           $this.detail1_styledef.form.items[index].dict = selections.map((a) => {
                              return {
                                 value: a.value,
                                 text: a.label
                              }
                           })
                        }
                     }
                  });
               }
@@ -489,10 +524,10 @@
               var itemName = '';
               (result.dict_item_list || []).forEach((item) => {
                  if (item.is_default == '1')
                     itemName = item.name;
                     itemName = item.name
                  list.push({
                     text: item.name,
                     value: item.id,
                     text: item.value ? item.value : item.name,
                     value: item.name,
                  });
               });
@@ -963,6 +998,17 @@
               }
            }
         },
         onCheckBoxValue(e) { //绑定Model值
            let values = e.detail.value || []
            let attr = e.currentTarget?.dataset?.attr || ""
            this.head_styledef.form.model[attr] = values;
         },
         onRadioBoxValue(e) { //绑定Model值
            let value = e.detail.value || ""
            let attr = e.currentTarget?.dataset?.attr || ""
            this.head_styledef.form.model[attr] = value;
         },
         onModelValue(item) { //绑定Model值
            //console.log(e.target)
            var attr = item.fieldId;
@@ -1395,17 +1441,8 @@
                           // console.log($this.$data.head_styledef);
                        } else if (action.action_type == 'set_global_attr') {
                           $this.$data.global_attr = action.value || [];
                        } else {
                           uni.showModal({
                              title: this.translateSys("tip"),
                              content: this.translateSys("quotation_mark_left") + action
                                 .action_type + this.translateSys(
                                    "quotation_mark_right") + this.translate(
                                    "tip_action_unprocessed"),
                              showCancel: false,
                              confirmText: this.translateSys("cancel")
                           });
                        }
                     }
                  }
@@ -1962,7 +1999,6 @@
<style>
   .popup-content {
      @include flex;
   }
   .popup-height {