shish 6 ماه پیش
والد
کامیت
c9240e4714
1فایلهای تغییر یافته به همراه28 افزوده شده و 1 حذف شده
  1. 28 1
      ghsPad/src/pages/home/components/selectFlowerGrid.vue

+ 28 - 1
ghsPad/src/pages/home/components/selectFlowerGrid.vue

@@ -44,7 +44,7 @@
 
         <!-- 底部按钮栏 -->
         <view class="popup-footer">
-            <view class="footer-btn cancel-btn" @tap="confirmClearXj">
+            <view class="footer-btn cancel-btn" @tap="handleClearClick">
                 <text>清除全部</text>
             </view>
             <view class="footer-btn cancel-btn" @tap="handleCancel">
@@ -54,6 +54,18 @@
                 <text>确认</text>
             </view>
         </view>
+
+        <!-- 清除确认对话框 -->
+        <uni-popup ref="clearConfirmRef" type="dialog">
+            <view style="width:60vw;height:70vh;background-color: white;padding:70upx 20upx 0 20upx;">
+                <view style="margin-bottom:40upx;text-align: center;font-size:24upx;">确认清除全部?</view>
+                <view style="text-align:center;">
+                    <button class="admin-button-com mini-btn default" @click="cancelClear">取消</button>
+                    <button class="admin-button-com mini-btn default" @click="confirmClearXj" style="margin-left:30upx;">确认</button>
+                </view>
+            </view>
+        </uni-popup>
+
     </view>
 </template>
 
@@ -121,7 +133,20 @@ export default {
                 item.selectedQty = qty
             }
         },
+        // 处理清除点击 - 显示确认对话框
+        handleClearClick() {
+            this.$util.hitVoice()
+            this.$refs.clearConfirmRef.open()
+        },
+        // 取消清除
+        cancelClear() {
+            this.$util.hitVoice()
+            this.$refs.clearConfirmRef.close()
+        },
+        // 确认清除全部
         confirmClearXj() {
+            this.$util.hitVoice()
+            this.$refs.clearConfirmRef.close()
             if (!this.$util.isEmpty(this.flowerList)) {
                 this.flowerList.forEach(item => {
                     item.selectedQty = 0
@@ -130,9 +155,11 @@ export default {
             this.$emit('globalClearXj', this.customData)
         },
         handleCancel() {
+            this.$util.hitVoice()
             this.$emit('globalCloseXjPop')
         },
         handleConfirm() {
+            this.$util.hitVoice()
             // 收集选中的花材
             let arr = []
             this.flowerList.forEach(item => {