瀏覽代碼

调整显示的字体大小

shish 11 月之前
父節點
當前提交
fe01e96850

+ 3 - 3
hdApp/src/admin/billing/affirm.vue

@@ -260,13 +260,13 @@
         <view class="option-group">
           <view class="option-label">退货方式</view>
           <view class="button-group">
-            <button @tap="form.forwardStock = 0" class="admin-button-com big" :class="form.forwardStock == 0? 'blue' : 'default'">货退回来</button>
             <button @click="form.forwardStock = 1" class="admin-button-com big" :class="form.forwardStock == 1 ? 'blue' : 'default'">货不退回</button>
+            <button @tap="form.forwardStock = 0" class="admin-button-com big" :class="form.forwardStock == 0? 'blue' : 'default'">货退回来</button>
           </view>
         </view>
         
         <view class="option-group">
-           <view class="option-label">付款方式</view>
+           <view class="option-label">线下付款方式</view>
                        <view class="button-group">
               <button @tap="forwardPayWay = 0" class="admin-button-com middle" :class="forwardPayWay == 0? 'blue' : 'default'">微信</button>
               <button @click="forwardPayWay = 1" class="admin-button-com middle" :class="forwardPayWay == 1 ? 'blue' : 'default'">支付宝</button>
@@ -358,7 +358,7 @@ export default {
         getStaffName:'',
         dealPrice:0,
         forward:0,
-        forwardStock:0
+        forwardStock:1
       },
       showCustomer: false,
       customInfo:{discount:1,balance:0},

+ 25 - 13
hdApp/src/admin/refund/balanceCp.vue

@@ -7,12 +7,10 @@
         <view class="result-title">售后成功</view>
         <view style="font-size:36upx;margin-top:10upx;color:green;font-weight:bold;margin-bottom:20upx;">钱已退回到客户余额</view>
         <view class="textarea-container">
-          <textarea 
+          <view 
             class="result-textarea" 
-            v-model="copyText" 
-            readonly 
-            placeholder=""
-          ></textarea>
+            :style="{ height: textareaHeight + 'upx' }"
+          >{{ copyText }}</view>
         </view>
         <view style="font-size:34upx;color:#807d7d;">复制上面文字,发给客户</view>
         <view class="pay-confirm-content">
@@ -31,7 +29,8 @@ export default {
   data() {
     return {
       orderInfo:[],
-      copyText:""
+      copyText:"",
+      textareaHeight: 300
     }
   },
   onLoad(){
@@ -51,9 +50,25 @@ export default {
          let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
          let orderLink = res.data.orderLink?res.data.orderLink:''
          this.copyText = "售后金额¥"+amount+"元,已退回到你的余额,点击下面链接查看你的余额\n\n余额 "+rechargeAccountLink+"\n\n本单 "+orderLink+"\n\n链接30天后失效"
+         this.$nextTick(() => {
+           this.calculateHeight()
+         })
         }
       })
     },
+    calculateHeight(){
+      // 根据文本内容计算合适的高度
+      const lineHeight = 1.6
+      const fontSize = 28
+      const padding = 60 // 上下padding各30upx
+      const minHeight = 300
+      
+      // 计算行数(按换行符分割)
+      const lines = this.copyText.split('\n').length
+      const calculatedHeight = Math.max(minHeight, lines * fontSize * lineHeight + padding)
+      
+      this.textareaHeight = calculatedHeight
+    },
     copyBack(){
       uni.setClipboardData({
         data: this.copyText,
@@ -121,15 +136,12 @@ export default {
         background: #f8f9fa;
         border: 2upx solid #e9ecef;
         border-radius: 16upx;
-        font-size: 32upx;
+        font-size: 28upx;
         line-height: 1.6;
         color: #333;
-        resize: none;
-        
-        &:focus {
-          border-color: $mainColor1;
-          background: #fff;
-        }
+        word-wrap: break-word;
+        white-space: pre-wrap;
+        overflow-y: auto;
       }
     }
   }

+ 25 - 13
hdApp/src/admin/refund/debtResult.vue

@@ -6,12 +6,10 @@
         <view :class="['iconfont', 'iconchenggong']"></view>
         <view class="result-title">充值成功</view>
         <view class="textarea-container">
-          <textarea 
+          <view 
             class="result-textarea" 
-            v-model="copyText" 
-            readonly 
-            placeholder=""
-          ></textarea>
+            :style="{ height: textareaHeight + 'upx' }"
+          >{{ copyText }}</view>
         </view>
         <view style="font-size:34upx;color:#807d7d;">复制上面文字,发给客户</view>
         <view class="pay-confirm-content">
@@ -32,7 +30,8 @@ export default {
     return {
       orderInfo:[],
       copyText:"",
-      remainDebtPrice:0
+      remainDebtPrice:0,
+      textareaHeight: 300
     }
   },
   onLoad(){
@@ -56,10 +55,26 @@ export default {
           let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
           let orderLink = res.data.orderLink?res.data.orderLink:''
           that.copyText = "已售后,欠款减少"+amount+"元,本单剩余欠款"+that.remainDebtPrice+"元,点击下面链接查看详情\n\n余额 "+rechargeAccountLink+"\n\n本单 "+orderLink+"\n\n链接30天后失效"
+          that.$nextTick(() => {
+            that.calculateHeight()
+          })
           }
         })
       })
     },
+    calculateHeight(){
+      // 根据文本内容计算合适的高度
+      const lineHeight = 1.6
+      const fontSize = 28
+      const padding = 60 // 上下padding各30upx
+      const minHeight = 300
+      
+      // 计算行数(按换行符分割)
+      const lines = this.copyText.split('\n').length
+      const calculatedHeight = Math.max(minHeight, lines * fontSize * lineHeight + padding)
+      
+      this.textareaHeight = calculatedHeight
+    },
     copyBack(){
       uni.setClipboardData({
         data: this.copyText,
@@ -127,15 +142,12 @@ export default {
         background: #f8f9fa;
         border: 2upx solid #e9ecef;
         border-radius: 16upx;
-        font-size: 32upx;
+        font-size: 28upx;
         line-height: 1.6;
         color: #333;
-        resize: none;
-        
-        &:focus {
-          border-color: $mainColor1;
-          background: #fff;
-        }
+        word-wrap: break-word;
+        white-space: pre-wrap;
+        overflow-y: auto;
       }
     }
   }

+ 25 - 13
hdApp/src/admin/refund/offlineCp.vue

@@ -6,12 +6,10 @@
         <view :class="['iconfont', 'iconchenggong']"></view>
         <view class="result-title">充值成功</view>
         <view class="textarea-container">
-          <textarea 
+          <view 
             class="result-textarea" 
-            v-model="copyText" 
-            readonly 
-            placeholder=""
-          ></textarea>
+            :style="{ height: textareaHeight + 'upx' }"
+          >{{ copyText }}</view>
         </view>
         <view style="font-size:34upx;color:#807d7d;">复制上面文字,发给客户</view>
         <view class="pay-confirm-content">
@@ -30,7 +28,8 @@ export default {
   data() {
     return {
       orderInfo:[],
-      copyText:""
+      copyText:"",
+      textareaHeight: 300
     }
   },
   onLoad(){
@@ -52,9 +51,25 @@ export default {
          let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
          let orderLink = res.data.orderLink?res.data.orderLink:''
          this.copyText = "售后金额¥"+amount+"元,已充值到你的账户,点击下面链接查看你的账户余额\n\n余额 "+rechargeAccountLink+"\n\n本单 "+orderLink+"\n\n链接30天后失效"
+         this.$nextTick(() => {
+           this.calculateHeight()
+         })
         }
       })
     },
+    calculateHeight(){
+      // 根据文本内容计算合适的高度
+      const lineHeight = 1.6
+      const fontSize = 28
+      const padding = 60 // 上下padding各30upx
+      const minHeight = 300
+      
+      // 计算行数(按换行符分割)
+      const lines = this.copyText.split('\n').length
+      const calculatedHeight = Math.max(minHeight, lines * fontSize * lineHeight + padding)
+      
+      this.textareaHeight = calculatedHeight
+    },
     copyBack(){
       uni.setClipboardData({
         data: this.copyText,
@@ -122,15 +137,12 @@ export default {
         background: #f8f9fa;
         border: 2upx solid #e9ecef;
         border-radius: 16upx;
-        font-size: 32upx;
+        font-size: 28upx;
         line-height: 1.6;
         color: #333;
-        resize: none;
-        
-        &:focus {
-          border-color: $mainColor1;
-          background: #fff;
-        }
+        word-wrap: break-word;
+        white-space: pre-wrap;
+        overflow-y: auto;
       }
     }
   }

+ 25 - 13
hdApp/src/admin/refund/shPayCp.vue

@@ -6,12 +6,10 @@
         <view :class="['iconfont', 'iconchenggong']"></view>
         <view class="result-title">充值成功</view>
         <view class="textarea-container">
-          <textarea 
+          <view 
             class="result-textarea" 
-            v-model="copyText" 
-            readonly 
-            placeholder=""
-          ></textarea>
+            :style="{ height: textareaHeight + 'upx' }"
+          >{{ copyText }}</view>
         </view>
         <view style="font-size:34upx;color:#807d7d;">复制上面文字,发给客户</view>
         <view class="pay-confirm-content">
@@ -30,7 +28,8 @@ export default {
   data() {
     return {
       orderInfo:[],
-      copyText:""
+      copyText:"",
+      textareaHeight: 300
     }
   },
   onLoad(){
@@ -50,9 +49,25 @@ export default {
          let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
          let orderLink = res.data.orderLink?res.data.orderLink:''
          this.copyText = "售后金额¥"+amount+"元,已充值到你的账户,点击下面链接查看你的账户余额\n\n余额 "+rechargeAccountLink+"\n\n本单 "+orderLink+"\n\n链接30天后失效"
+         this.$nextTick(() => {
+           this.calculateHeight()
+         })
         }
       })
     },
+    calculateHeight(){
+      // 根据文本内容计算合适的高度
+      const lineHeight = 1.6
+      const fontSize = 28
+      const padding = 60 // 上下padding各30upx
+      const minHeight = 300
+      
+      // 计算行数(按换行符分割)
+      const lines = this.copyText.split('\n').length
+      const calculatedHeight = Math.max(minHeight, lines * fontSize * lineHeight + padding)
+      
+      this.textareaHeight = calculatedHeight
+    },
     copyBack(){
       uni.setClipboardData({
         data: this.copyText,
@@ -120,15 +135,12 @@ export default {
         background: #f8f9fa;
         border: 2upx solid #e9ecef;
         border-radius: 16upx;
-        font-size: 32upx;
+        font-size: 28upx;
         line-height: 1.6;
         color: #333;
-        resize: none;
-        
-        &:focus {
-          border-color: $mainColor1;
-          background: #fff;
-        }
+        word-wrap: break-word;
+        white-space: pre-wrap;
+        overflow-y: auto;
       }
     }
   }