feat(financial): 充值不能输入负数
This commit is contained in:
parent
ec3435b678
commit
daf38b19fa
|
@ -31,10 +31,7 @@
|
||||||
<u-row gutter="10">
|
<u-row gutter="10">
|
||||||
<u-col span="12">
|
<u-col span="12">
|
||||||
<u-form-item :label="'充值方式'">
|
<u-form-item :label="'充值方式'">
|
||||||
<u-radio-group
|
<u-radio-group v-model="rechargeMethod" placement="row">
|
||||||
v-model="rechargeMethod"
|
|
||||||
placement="row"
|
|
||||||
>
|
|
||||||
<u-radio
|
<u-radio
|
||||||
:customStyle="{ marginLeft: '20rpx' }"
|
:customStyle="{ marginLeft: '20rpx' }"
|
||||||
v-for="(item, index) in czWayList"
|
v-for="(item, index) in czWayList"
|
||||||
|
@ -91,14 +88,19 @@
|
||||||
<u-col span="12">
|
<u-col span="12">
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:label="
|
:label="
|
||||||
item.pkTransactionKeyVal +
|
item.pkTransactionKeyVal + `${'变更'}(${isLocalSymbol()})`
|
||||||
`${'变更'}(${isLocalSymbol()})`
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<u--input
|
<u-number-box
|
||||||
fontSize="24rpx"
|
:style="{
|
||||||
|
width: '100%',
|
||||||
|
}"
|
||||||
|
inputWidth="100%"
|
||||||
|
:min="0"
|
||||||
|
:showMinus="false"
|
||||||
|
:showPlus="false"
|
||||||
v-model="tableData[0].rechargeDetailMap[`${item.pkId}`]"
|
v-model="tableData[0].rechargeDetailMap[`${item.pkId}`]"
|
||||||
></u--input>
|
></u-number-box>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-col>
|
</u-col>
|
||||||
</u-row>
|
</u-row>
|
||||||
|
@ -130,7 +132,6 @@
|
||||||
@click="saveDate"
|
@click="saveDate"
|
||||||
color="#C8161D"
|
color="#C8161D"
|
||||||
text="充值"
|
text="充值"
|
||||||
|
|
||||||
v-hasButtons="['ChongzhiConfirm']"
|
v-hasButtons="['ChongzhiConfirm']"
|
||||||
class="btnn"
|
class="btnn"
|
||||||
></u-button>
|
></u-button>
|
||||||
|
@ -140,15 +141,15 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import * as api from "@/api/financial";
|
import * as api from '@/api/financial';
|
||||||
import { isLocals, isLocalSymbol } from "@/util/numberToCurrency";
|
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
select: {
|
select: {
|
||||||
memberCode: "",
|
memberCode: '',
|
||||||
},
|
},
|
||||||
rechargeMethod: 1,
|
rechargeMethod: 1,
|
||||||
czWayList: [], // 充值方式
|
czWayList: [], // 充值方式
|
||||||
|
@ -166,7 +167,6 @@ export default {
|
||||||
isLocalSymbol,
|
isLocalSymbol,
|
||||||
// 充值
|
// 充值
|
||||||
saveDate() {
|
saveDate() {
|
||||||
|
|
||||||
let shouldTerminate = false;
|
let shouldTerminate = false;
|
||||||
|
|
||||||
this.tableData.forEach((ele) => {
|
this.tableData.forEach((ele) => {
|
||||||
|
@ -174,18 +174,17 @@ export default {
|
||||||
shouldTerminate = true;
|
shouldTerminate = true;
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '交款方式不能为空',
|
title: '交款方式不能为空',
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!shouldTerminate) {
|
if (!shouldTerminate) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
"/pages/financial/czzxqc?czlx=1&rechargeMethod=" +
|
'/pages/financial/czzxqc?czlx=1&rechargeMethod=' +
|
||||||
this.rechargeMethod +
|
this.rechargeMethod +
|
||||||
"&detailParams=" +
|
'&detailParams=' +
|
||||||
JSON.stringify(this.tableData),
|
JSON.stringify(this.tableData),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -193,12 +192,12 @@ export default {
|
||||||
bindPickerChange1(e) {
|
bindPickerChange1(e) {
|
||||||
this.$set(
|
this.$set(
|
||||||
this.tableData[0],
|
this.tableData[0],
|
||||||
"paymentMethodName",
|
'paymentMethodName',
|
||||||
this.paymentTypeList[e.detail.value].label
|
this.paymentTypeList[e.detail.value].label
|
||||||
);
|
);
|
||||||
this.$set(
|
this.$set(
|
||||||
this.tableData[0],
|
this.tableData[0],
|
||||||
"paymentMethod",
|
'paymentMethod',
|
||||||
this.paymentTypeList[e.detail.value].value
|
this.paymentTypeList[e.detail.value].value
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -222,8 +221,10 @@ export default {
|
||||||
},
|
},
|
||||||
// 根据会员编号查询会员姓名
|
// 根据会员编号查询会员姓名
|
||||||
changeName() {
|
changeName() {
|
||||||
api.getMemberName({ memberCode: this.select.memberCode }).then((res) => {
|
api
|
||||||
this.$set(this.select, "memberName", res.memberName);
|
.getMemberName({ memberCode: this.select.memberCode })
|
||||||
|
.then((res) => {
|
||||||
|
this.$set(this.select, 'memberName', res.memberName);
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue