shish 1 год назад
Родитель
Сommit
e5b65ef311

+ 107 - 27
hdApp/src/admin/custom/rechargeChange.vue

@@ -1,33 +1,34 @@
 <template>
     <view class="app-content">
             <block v-if="!$util.isEmpty(list.data)">
-                <t-table :headerBackgroundColor="'#F0F2F6'">
-                    <t-tr header>
-                        <t-th>日期</t-th>
-                        <t-th>场景</t-th>
-                        <t-th>人员</t-th>
-                        <t-th>状态</t-th>
-                        <t-th>金额</t-th>
-                        <t-th>赠送</t-th>
-                    </t-tr>
-                    <view v-for="(item, index) in list.data" :key="index">
-                        <t-tr>
-                            <t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
-                            <t-td align="center" color="info"><view >{{ item.onlinePay == 2 ? '线上' : '线下'}}<view>{{ item.payWay==0?'微信':item.payWay == 1 ?'支付宝':''}}</view></view></t-td>
-                            <t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
-                            <t-td align="center" color="info"><view >{{ item.payStatus == 1 ? '已付款' : '待付款' }}</view></t-td>
-                            <t-td align="center" color="info"><view >{{ item.amount }}</view></t-td>
-                            <t-td align="center" color="info"><view >{{ item.giveAmount>0 ? parseFloat(item.giveAmount) : '-' }}</view></t-td>
-                        </t-tr>
-                        <block v-if="!$util.isEmpty(item.remark)">
-                        <t-tr>
-                            <t-td align="center" color="info">
-                                <view style="text-align: left;color:red;">备注:{{ item.remark }}</view>
-                            </t-td>
-                        </t-tr>
-                        </block>
+                <view class="recharge-table">
+                    <view class="table-header table-row">
+                        <view class="table-cell cell-date">日期</view>
+                        <view class="table-cell cell-scene">场景</view>
+                        <view class="table-cell cell-staff">人员</view>
+                        <view class="table-cell cell-status">状态</view>
+                        <view class="table-cell cell-amount">充值</view>
+                        <view class="table-cell cell-give">赠送</view>
                     </view>
-                </t-table>
+                    <view v-for="(item, index) in list.data" :key="index" class="table-body">
+                        <view class="table-row table-row-data">
+                            <view class="table-cell cell-date">{{ item.addTime.substr(5,11) }}</view>
+                            <view class="table-cell cell-scene">
+                                <view>{{ item.onlinePay == 2 ? '线上' : '线下'}}</view>
+                                <view>{{ item.payWay==0?'微信':item.payWay == 1 ?'支付宝':''}}</view>
+                            </view>
+                            <view class="table-cell cell-staff">{{ item.staffName }}</view>
+                            <view class="table-cell cell-status">{{ item.payStatus == 1 ? '已付款' : '待付款' }}</view>
+                            <view class="table-cell cell-amount">{{ item.amount }}</view>
+                            <view class="table-cell cell-give">{{ item.giveAmount>0 ? parseFloat(item.giveAmount) : '-' }}</view>
+                        </view>
+                        <view class="table-row table-row-extra" v-if="!$util.isEmpty(item.remark)">
+                            <view class="table-cell cell-extra">
+                                <view style="color:red;">{{ item.remark }}</view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
             </block>
             <block v-else>
                 <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
@@ -79,4 +80,83 @@
         }
     };
     </script>
-    <style lang="scss" scoped></style>
+    <style lang="scss" scoped>
+    .recharge-table {
+        width: 100%;
+        border-radius: 16upx;
+        overflow: hidden;
+        background: #fff;
+        box-shadow: 0 4upx 24upx rgba(0,0,0,0.06);
+        margin: 20upx 0;
+        .table-row {
+            display: flex;
+            align-items: center;
+            min-height: 72upx;
+            border-bottom: 1px solid #f0f0f0;
+            &.table-header {
+                background: #f5f7fa;
+                font-weight: bold;
+                font-size: 30upx;
+                color: #333;
+            }
+            &.table-row-data {
+                font-size: 26upx;
+                color: #222;
+                transition: background 0.2s;
+                &:hover {
+                    background: #f0f9ff;
+                }
+            }
+            &.table-row-extra {
+                background: #f8f8f8;
+                color: #989494;
+                font-size: 24upx;
+                .cell-extra {
+                    padding: 16upx 20upx;
+                    display: flex;
+                    flex-direction: column;
+                    gap: 2upx;
+                }
+            }
+        }
+        .table-cell {
+            flex: 1;
+            padding: 18upx 8upx 18upx 8upx;
+            &.cell-date {
+                text-align: center;
+                min-width: 100upx;
+                flex: 1.2;
+            }
+            &.cell-scene {
+                text-align: center;
+                min-width: 120upx;
+                flex: 1.5;
+                view {
+                    font-size: 24upx;
+                    line-height: 1.2;
+                }
+            }
+            &.cell-staff {
+                text-align: center;
+                min-width: 80upx;
+                flex: 1;
+            }
+            &.cell-status {
+                text-align: center;
+                min-width: 80upx;
+                flex: 1;
+            }
+            &.cell-amount {
+                text-align: right;
+                min-width: 100upx;
+                flex: 1;
+            }
+            &.cell-give {
+                text-align: right;
+                min-width: 80upx;
+                padding-right: 32upx;
+                flex: 1;
+            }
+        }
+    }
+    </style>

+ 8 - 2
hdApp/src/admin/member/discount.vue

@@ -20,7 +20,7 @@
                             </t-td>
                             <t-td align="center" color="info">
                                 <view>
-                                <input v-model="item.discount" type="digit" style="border:1upx solid #cccccc;color:black;font-size:30upx;" @focus="item.discount=''" placeholder="9折写0.9,85折写0.85" />
+                                <input v-model="item.discount" type="digit" style="border:1upx solid #cccccc;color:black;font-size:30upx;" @focus="() => clearDiscount(inIndex)" placeholder="9折写0.9,85折写0.85" />
                                 </view>
                             </t-td>
                         </t-tr>
@@ -29,7 +29,7 @@
 			</t-table>
 			<view style="font-size:36upx;font-weight:bold;height:50upx;margin-top:50upx;display: flex;align-items: center;justify-content: center;">
 				超过
-				<input v-model="reduceDay" type="number" @focus="reduceDay=''" placeholder="填0则不自动降级" style="border:1upx solid #cccccc;color:black;font-size:28upx;width:200upx;display: inline-block;text-align:center;margin:0 10upx 0 10upx;" />
+				<input v-model="reduceDay" type="number" @focus="() => clearReduceDay()" placeholder="填0不自动降级" style="border:1upx solid #cccccc;color:black;font-size:28upx;width:220upx;display: inline-block;text-align:center;margin:0 10upx 0 10upx;" />
 				天未消费降一级
 			</view>
 
@@ -69,6 +69,12 @@ export default {
 				}
 			})
         },
+		clearDiscount(index){
+			this.$set(this.map[index], 'discount', '')
+		},
+		clearReduceDay(){
+			this.reduceDay = ''
+		},
 		goBack(){
 			uni.navigateBack()
 		},

+ 8 - 2
hdApp/src/admin/recharge/discount.vue

@@ -14,7 +14,7 @@
 						<t-tr>
 							<t-td align="center" color="info">
 							<view style="font-size:30upx;display: flex;align-items: center;">
-								充值<input v-model="item.recharge" type="digit" style="border:1upx solid #cccccc;color:black;display:inline-block;width:130upx;margin-left:8upx;" @focus="item.recharge=''" placeholder="" />
+								充值<input v-model="item.recharge" type="digit" style="border:1upx solid #cccccc;color:black;display:inline-block;width:130upx;margin-left:8upx;" @focus="() => clearRecharge(inIndex)" placeholder="" />
 							</view>
 							</t-td>
 							<t-td align="center" color="info">
@@ -24,7 +24,7 @@
 									<text v-else>(无折扣)</text>
 								</view>
 								<view style="font-size:30upx;display: flex;align-items: center;" v-if="rechargeWeal == 2">
-									送<input v-model="item.give" type="digit" style="border:1upx solid #cccccc;color:black;display:inline-block;width:100upx;margin-left:8upx;" @focus="item.give=''" placeholder="" />
+									送<input v-model="item.give" type="digit" style="border:1upx solid #cccccc;color:black;display:inline-block;width:100upx;margin-left:8upx;" @focus="() => clearGive(inIndex)" placeholder="" />
 								</view>
 							</t-td>
 						</t-tr>
@@ -80,6 +80,12 @@ export default {
 		setMemberDiscount(){
 			this.$util.pageTo({url: "/admin/member/discount",type:2})
 		},
+		clearRecharge(index){
+			this.$set(this.map[index], 'recharge', '')
+		},
+		clearGive(index){
+			this.$set(this.map[index], 'give', '')
+		},
 		saveData(){
 			this.$util.confirmModal({content:'只能设置一次,提交后将不能再次修改,确认提交?'},() => {
 				modifyRecharge({data:this.map,rechargeWeal:this.rechargeWeal}).then(res=>{