cuiqian2004
2025-03-05 e8b665122cf256caae4993534c696d029883f0d5
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,9 @@
         <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 +413,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
                              }
                           })
                        }
                     }
                  });
               }
@@ -426,7 +447,7 @@
                  title: this.translateSys("error") + "1.1",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -453,6 +474,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
                              }
                           })
                        }
                     }
                  });
               }
@@ -470,7 +506,7 @@
                  title: this.translateSys("error") + "2.1",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -489,10 +525,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,
                  });
               });
@@ -520,7 +556,7 @@
                  title: this.translateSys("error") + "1.3",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -552,13 +588,13 @@
                        title: this.translateSys("tip"),
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  } else uni.showModal({
                     title: this.translateSys("tip"),
                     content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  return false
               } else {
@@ -568,7 +604,7 @@
                     title: this.translateSys("tip"),
                     content: tip,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  var actionlist = data.action;
@@ -713,7 +749,7 @@
                                    "quotation_mark_right") + this
                                 .translate('tip_action_unprocessed'),
                              showCancel: false,
                              confirmText: this.translateSys("cancel")
                              confirmText: this.translateSys('close')
                           });
                        }
                     }
@@ -728,7 +764,7 @@
                     this.translateSys("full_stop") +
                     this.translate('reason') + this.translateSys("colon") + ex.errMsg,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            });
         },
@@ -963,6 +999,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;
@@ -995,7 +1042,7 @@
                     title: this.translateSys("tip"),
                     content: this.translate("delete_success"),
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
               }).catch(ex => {
@@ -1005,7 +1052,7 @@
                     title: this.translateSys('tip') + "9.1",
                     content: ex.errMsg,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
               });
            }
@@ -1018,7 +1065,7 @@
                  title: this.translateSys("tip"),
                  content: this.translate("before_select_event_empty"),
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
               return;
            }
@@ -1118,7 +1165,7 @@
                  title: this.translateSys("tip"),
                  content: this.translate("after_select_event_empty"),
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
               return;
            }
@@ -1141,7 +1188,7 @@
                  title: this.translateSys("tip"),
                  content: this.translate("tip_no_select_data"),
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
               return;
            }
@@ -1220,7 +1267,7 @@
               info.dataJson = Base64.encode(JSON.stringify(info.dataJson)); //将字符串转换为base64编码
            var obj_attr = {};
            info.attr.forEach(item => {
               obj_attr[item.attr] = item.val;
               obj_attr[item.attr] = item.value;
            });
            if (!info.eventid.includes('{')) info.eventid = '{' + info.eventid + '}';
            var dataInfo = {
@@ -1258,13 +1305,13 @@
                        title: this.translateSys("tip"),
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  } else uni.showModal({
                     title: this.translateSys("tip"),
                     content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  return false
               } else {
@@ -1274,7 +1321,7 @@
                     title: this.translateSys("tip"),
                     content: tip,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  var actionlist = data.action;
@@ -1395,17 +1442,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")
                           });
                        }
                     }
                  }
@@ -1463,7 +1501,7 @@
                  title: this.translateSys("error") + "3.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            });
         },
@@ -1543,14 +1581,14 @@
                        title: this.translateSys("tip"),
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  } else uni.showModal({
                     title: this.translateSys("tip"),
                     content: tip + this.translateSys('comma') + this.translate('result') + this
                        .translateSys('colon') + data.ret,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  return false
               } else {
@@ -1560,7 +1598,7 @@
                     title: this.translateSys("tip"),
                     content: tip,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  var actionlist = data.action;
@@ -1717,7 +1755,7 @@
                                    "quotation_mark_right") + this.translate(
                                    "tip_action_unprocessed"),
                              showCancel: false,
                              confirmText: this.translateSys("cancel")
                              confirmText: this.translateSys('close')
                           });
                        }
                     }
@@ -1790,7 +1828,7 @@
                  title: this.translateSys("error") + "7.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            });
         },
@@ -1896,13 +1934,13 @@
                        title: this.translateSys("tip"),
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  } else uni.showModal({
                     title: this.translateSys("tip"),
                     content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  this.saving = false
                  return false
@@ -1913,7 +1951,7 @@
                     title: this.translateSys("tip"),
                     content: tip,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  var result = data.result;
@@ -1937,7 +1975,7 @@
                  title: this.translateSys("error") + "8.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            });
         },
@@ -1962,7 +2000,6 @@
<style>
   .popup-content {
      @include flex;
   }
   .popup-height {
@@ -2110,30 +2147,6 @@
         /* border: 1rpx solid red; */
      }
      button.btn_cancel {
         width: 49.5%;
         margin-top: 50rpx;
         padding: 20rpx;
         line-height: 1.5;
         border: none;
         font-size: 38rpx;
         font-weight: bold;
         float: left;
         display: inline-block;
      }
      button.btn_add {
         width: 49.5%;
         margin-top: 50rpx;
         padding: 20rpx;
         line-height: 1.5;
         border: none;
         font-size: 38rpx;
         font-weight: bold;
         float: right;
         display: inline-block;
      }
      #dv_select {
         display: inline-block;
         width: 66%;
@@ -2209,9 +2222,11 @@
         margin-top: 50rpx;
         padding: 20rpx;
         line-height: 1.5;
         background: #27A6E1;
         border: none;
         color: #fff;
         // background: #27A6E1;
         // border: none;
         // color: #fff;
         background: #fff;
         color: #000;
         font-size: 38rpx;
         font-weight: bold;
         float: left;
@@ -2358,7 +2373,7 @@
      .popup-footer {
         float: right;
         position: absolute;
         bottom: 0;
         bottom: 10rpx;
         right: 20rpx;
      }
@@ -2382,9 +2397,11 @@
         margin-top: 50rpx;
         padding: 15rpx;
         line-height: 1.5;
         background: #27A6E1;
         border: none;
         color: #fff;
         // background: #27A6E1;
         // border: none;
         // color: #fff;
         background: #fff;
         color: #000;
         font-size: 38rpx;
         font-weight: bold;
         /* float: right; */