|
@@ -8,8 +8,7 @@
|
|
|
</view>
|
|
|
<view class="list_2">
|
|
|
<view class="l">
|
|
|
- <image class="image"
|
|
|
- :src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''" mode="">
|
|
|
+ <image class="image" :src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''" mode="">
|
|
|
</image>
|
|
|
</view>
|
|
|
<view class="c">
|
|
@@ -35,10 +34,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="two">
|
|
|
- <uni-forms ref="form" :modelValue="form" :rules="rules" label-width="auto">
|
|
|
+ <uni-forms ref="form" :rules="rules" :model="form" label-width="auto">
|
|
|
<uni-forms-item label="退款商品" name="goods_id">
|
|
|
- <picker class="picker" mode="selector" :range="goodsList" @change="goodsChange"
|
|
|
- range-key="name">
|
|
|
+ <picker class="picker" mode="selector" :range="goodsList" @change="goodsChange" range-key="name">
|
|
|
<view>{{form.goods_name||'请选择退款商品'}}</view>
|
|
|
</picker>
|
|
|
</uni-forms-item>
|
|
@@ -48,15 +46,13 @@
|
|
|
</picker>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="退款金额" name="money" v-if="form.type=='0'||form.type=='2'">
|
|
|
- <view class="money">
|
|
|
+ <uni-easyinput type="digit" v-model="form.money" @input="toMoney" placeholder="请输入退款金额" />
|
|
|
+ <view>
|
|
|
最大退款金额不能超过{{moneyInfo.payTotal||'暂无'}}
|
|
|
</view>
|
|
|
- <uni-easyinput type="digit" v-model="form.money" @input="toMoney" aceholder="请输入退款金额">
|
|
|
- </uni-easyinput>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="申请理由" name="reason">
|
|
|
- <picker class="picker" mode="selector" :range="reasonList" @change="reasonChange"
|
|
|
- range-key="label">
|
|
|
+ <picker class="picker" mode="selector" :range="reasonList" @change="reasonChange" range-key="label">
|
|
|
<view>{{form.reason_name||'请选择申请理由'}}</view>
|
|
|
</picker>
|
|
|
</uni-forms-item>
|
|
@@ -66,10 +62,10 @@
|
|
|
<uni-forms-item label="附件" name="icon">
|
|
|
<upload :list="icon" name="icon" :count="1" @uplSuc="uplSuc" @uplDel="uplDel"></upload>
|
|
|
</uni-forms-item>
|
|
|
+ <view class="btn">
|
|
|
+ <button type="primary" size="mini" @click="onSubmit('form')">提交保存</button>
|
|
|
+ </view>
|
|
|
</uni-forms>
|
|
|
- <view class="btn">
|
|
|
- <button type="primary" size="mini" @click="onSubmit('form')">提交保存</button>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</mobile-frame>
|
|
@@ -128,17 +124,13 @@
|
|
|
},
|
|
|
methods: {
|
|
|
// 退款金额
|
|
|
- toMoney(e) {
|
|
|
+ toMoney(value) {
|
|
|
const that = this;
|
|
|
- let input = e.detail.value
|
|
|
- let money = that.moneyInfo.payTotal
|
|
|
- if (input < money) {
|
|
|
- uni.showToast({
|
|
|
- title: '可以'
|
|
|
- })
|
|
|
- } else {
|
|
|
+ let money = that.moneyInfo.payTotal;
|
|
|
+ if (parseFloat(value) > parseFloat(money)) {
|
|
|
uni.showToast({
|
|
|
- title: '不可以'
|
|
|
+ title: '输入金额不能超过实际支付金额',
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
},
|