Commit 72bb9b6d by liangjianmin

Refactor apply and approve pages for improved code readability by consolidating…

Refactor apply and approve pages for improved code readability by consolidating attributes in form components and action sheets, enhancing overall layout consistency.
parent e739c8f1
......@@ -2,10 +2,8 @@
<view class="apply-page">
<u-form :model="form" ref="formRef" labelWidth="180" labelPosition="left">
<view class="form-section">
<u-form-item label="申请类型" prop="applyType" required borderBottom
@click="showTypePicker = true">
<u--input v-model="form.applyTypeName" disabled disabledColor="#ffffff" placeholder="请选择"
border="none" inputAlign="right"></u--input>
<u-form-item label="申请类型" prop="applyType" required borderBottom @click="showTypePicker = true">
<u--input v-model="form.applyTypeName" disabled disabledColor="#ffffff" placeholder="请选择" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-down" color="#c0c4cc"></u-icon>
</u-form-item>
<u-form-item label="订单号" prop="orderNo" required borderBottom>
......@@ -21,24 +19,20 @@
<view class="form-section">
<view class="section-header">费用明细</view>
<u-form-item label="申请免收金额" prop="amount" required borderBottom>
<u--input v-model="form.amount" placeholder="请输入" border="none" inputAlign="right"
type="number"></u--input>
<u--input v-model="form.amount" placeholder="请输入" border="none" inputAlign="right" type="number"></u--input>
</u-form-item>
<view class="currency-hint">
<text>CNY-人民币元</text>
</view>
<u-form-item label="减免明细(单选)" prop="deductionType" required borderBottom
@click="showDeductionPicker = true">
<u--input v-model="form.deductionTypeName" disabled disabledColor="#ffffff" placeholder="请选择"
border="none" inputAlign="right"></u--input>
<u-form-item label="减免明细(单选)" prop="deductionType" required borderBottom @click="showDeductionPicker = true">
<u--input v-model="form.deductionTypeName" disabled disabledColor="#ffffff" placeholder="请选择" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-down" color="#c0c4cc"></u-icon>
</u-form-item>
</view>
<view class="form-section">
<u-form-item label="免收原因" prop="reason" required labelPosition="top">
<u--textarea v-model="form.reason" placeholder="请输入" count maxlength="200"
autoHeight border="surround"></u--textarea>
<u--textarea v-model="form.reason" placeholder="请输入" count maxlength="200" autoHeight border="surround"></u--textarea>
</u-form-item>
</view>
</u-form>
......@@ -49,16 +43,13 @@
</view>
<view class="bottom-btn">
<u-button type="primary" shape="circle" text="提交" @click="handleSubmit"
:customStyle="{ background: 'linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)', height: '88rpx' }">
<u-button type="primary" shape="circle" text="提交" @click="handleSubmit" :customStyle="{ background: 'linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)', height: '88rpx' }">
</u-button>
</view>
<u-action-sheet :show="showTypePicker" :actions="typeOptions" title="选择申请类型"
@close="showTypePicker = false" @select="onTypeSelect"></u-action-sheet>
<u-action-sheet :show="showTypePicker" :actions="typeOptions" title="选择申请类型" @close="showTypePicker = false" @select="onTypeSelect"></u-action-sheet>
<u-action-sheet :show="showDeductionPicker" :actions="deductionOptions" title="选择减免明细"
@close="showDeductionPicker = false" @select="onDeductionSelect"></u-action-sheet>
<u-action-sheet :show="showDeductionPicker" :actions="deductionOptions" title="选择减免明细" @close="showDeductionPicker = false" @select="onDeductionSelect"></u-action-sheet>
</view>
</template>
......
<template>
<view class="approve-page">
<view class="search-bar">
<u-search v-model="keyword" :placeholder="currentTab === 0 ? '客户名称' : '申请内容'" shape="round"
:showAction="false" bgColor="#f5f7fa"></u-search>
<u-search v-model="keyword" :placeholder="currentTab === 0 ? '客户名称' : '申请内容'" shape="round" :showAction="false" bgColor="#f5f7fa"></u-search>
</view>
<u-tabs :list="tabList" :current="currentTab" @click="onTabChange" lineColor="#3b82f6"
:activeStyle="{ color: '#3b82f6', fontWeight: '600' }"
:inactiveStyle="{ color: '#909399' }"></u-tabs>
<u-tabs :list="tabList" :current="currentTab" @click="onTabChange" lineColor="#3b82f6" :activeStyle="{ color: '#3b82f6', fontWeight: '600' }" :inactiveStyle="{ color: '#909399' }"></u-tabs>
<view class="filter-bar row verCenter">
<view class="filter-btn row verCenter" @click="showFilterPicker = true">
......@@ -85,8 +82,7 @@
<u-empty v-if="!doneList.length" mode="data" text="暂无已处理审批"></u-empty>
</view>
<u-action-sheet :show="showFilterPicker" :actions="filterOptions" title="筛选审批类型"
@close="showFilterPicker = false" @select="onFilterSelect"></u-action-sheet>
<u-action-sheet :show="showFilterPicker" :actions="filterOptions" title="筛选审批类型" @close="showFilterPicker = false" @select="onFilterSelect"></u-action-sheet>
</view>
</template>
......
......@@ -49,7 +49,7 @@
this.passwd = savedPasswd;
}
},
onShow() {},
onShow() { },
methods: {
/**
* 切换密码显示/隐藏
......@@ -93,7 +93,7 @@
uni.setStorageSync('oa_skey', res.data.skey);
uni.setStorageSync('oa_user_id', res.data.userId);
uni.switchTab({
url: '/pages/home/index'
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment