feat(financial): 充值不能输入负数

This commit is contained in:
woody 2025-06-05 11:15:48 +08:00
parent ec3435b678
commit daf38b19fa
1 changed files with 160 additions and 159 deletions

View File

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