This commit is contained in:
邱贞招 2024-09-10 21:49:51 +08:00
parent 03df1795d4
commit 2700e12e44
4 changed files with 41 additions and 8 deletions

View File

@ -539,6 +539,17 @@ export default {
amount: [
{ required: true, message: "提现金额不能为空", trigger: "blur" },
{ pattern: /^\d+$/, message: '提现金额必须为正整数', trigger: 'blur' },
// 1
{
validator: (rule, value, callback) => {
if (value < 1) {
callback(new Error('提现金额不能小于1'));
} else {
callback();
}
},
trigger: 'blur',
},
// balance
{
validator: (rule, value, callback) => {

View File

@ -588,7 +588,7 @@
<el-input v-model="form.vehicleNum" placeholder="请输入车牌号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="8" v-if="userName == 'admin'">
<el-form-item label="运营商" prop="operator">
<el-select
v-model="form.deptId"
@ -645,7 +645,7 @@
<el-form-item
label="硬件版本"
prop="deviceName"
v-if="hardwareVersionOptions.length > 0"
v-if="hardwareVersionOptions.length > 0 && userName == 'admin'"
>
<el-select
v-model="form.hardwareVersionId"
@ -700,7 +700,7 @@
</el-form-item>
</el-col>
</div>
<el-col :span="24">
<el-col :span="24" v-if="userName == 'admin'">
<el-form-item label="硬件版本说明:" label-width="200">
<span style="color: red; font-weight: 600">
{{ versionDescription }}
@ -1033,10 +1033,6 @@ export default {
window.removeEventListener("scroll", this.handleScroll, true);
},
created() {
listHardwareVersionExcludeParent(this.queryParams).then((response) => {
this.hardwareVersionOptions = response.data;
this.loading2 = false;
});
console.log("当前用户信息:", this.$store.state.user.name);
const sn = this.$route.params && this.$route.params.sn;
const vehicleNum = this.$route.params && this.$route.params.vehicleNum;
@ -1063,6 +1059,10 @@ export default {
this.userName = this.$store.state.user.name;
this.getList();
if (this.userName === "admin") {
listHardwareVersionExcludeParent(this.queryParams).then((response) => {
this.hardwareVersionOptions = response.data;
this.loading2 = false;
});
listDept2({ status: "0", pageNum: 1, pageSize: 999 }).then((response) => {
this.deptOptions = response.rows;
});
@ -1088,7 +1088,7 @@ export default {
}
},
"form.hardwareVersionId": function (hardwareVersionId) {
if (hardwareVersionId) {
if (hardwareVersionId && this.username == 'admin') {
this.selectHardwareVersion(hardwareVersionId);
}
},

View File

@ -295,6 +295,17 @@ export default {
amount: [
{ required: true, message: "提现金额不能为空", trigger: "blur" },
{ pattern: /^\d+$/, message: '提现金额必须为正整数', trigger: 'blur' },
// 1
{
validator: (rule, value, callback) => {
if (value < 1) {
callback(new Error('提现金额不能小于1'));
} else {
callback();
}
},
trigger: 'blur',
},
// balance
{
validator: (rule, value, callback) => {

View File

@ -311,6 +311,17 @@ export default {
amount: [
{ required: true, message: "提现金额不能为空", trigger: "blur" },
{ pattern: /^\d+$/, message: '提现金额必须为正整数', trigger: 'blur' },
// 1
{
validator: (rule, value, callback) => {
if (value < 1) {
callback(new Error('提现金额不能小于1'));
} else {
callback();
}
},
trigger: 'blur',
},
// balance
{
validator: (rule, value, callback) => {