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,33 +141,32 @@
|
||||||
</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: [], // 充值方式
|
||||||
enumsAccountList: [], //钱包类型
|
enumsAccountList: [], // 钱包类型
|
||||||
paymentTypeList: [], //交款方式
|
paymentTypeList: [], // 交款方式
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
//交款方式
|
// 交款方式
|
||||||
this.getpaymentType();
|
this.getpaymentType();
|
||||||
//充值方式
|
// 充值方式
|
||||||
this.getrechargeMethod();
|
this.getrechargeMethod();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
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,37 +192,39 @@ 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
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
//钱包类型
|
// 钱包类型
|
||||||
getenumsCzAccount() {
|
getenumsCzAccount() {
|
||||||
api.getenumsCzAccount({ accountProperty: 1 }).then((res) => {
|
api.getenumsCzAccount({ accountProperty: 1 }).then((res) => {
|
||||||
this.enumsAccountList = res.rows;
|
this.enumsAccountList = res.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//交款方式
|
// 交款方式
|
||||||
getpaymentType() {
|
getpaymentType() {
|
||||||
api.getpaymentType().then((res) => {
|
api.getpaymentType().then((res) => {
|
||||||
this.paymentTypeList = res.data;
|
this.paymentTypeList = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//充值方式
|
// 充值方式
|
||||||
getrechargeMethod() {
|
getrechargeMethod() {
|
||||||
api.getrechargeMethod().then((res) => {
|
api.getrechargeMethod().then((res) => {
|
||||||
this.czWayList = res.data;
|
this.czWayList = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//根据会员编号查询会员姓名
|
// 根据会员编号查询会员姓名
|
||||||
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();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -238,7 +239,7 @@ export default {
|
||||||
ele.rechargeDetailMap = {};
|
ele.rechargeDetailMap = {};
|
||||||
});
|
});
|
||||||
this.tableData = res.data;
|
this.tableData = res.data;
|
||||||
//钱包类型
|
// 钱包类型
|
||||||
this.getenumsCzAccount();
|
this.getenumsCzAccount();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -246,14 +247,14 @@ export default {
|
||||||
this.rechargeMethod = n;
|
this.rechargeMethod = n;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .u-form-item__body__left__content__label {
|
::v-deep .u-form-item__body__left__content__label {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
padding: 18rpx 24rpx 120rpx 24rpx;
|
padding: 18rpx 24rpx 120rpx 24rpx;
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
.footer {
|
.footer {
|
||||||
|
@ -292,5 +293,5 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue