This commit is contained in:
2025-05-21 15:45:10 +08:00
parent f6ed5b04de
commit 5d96054c0c
44 changed files with 2460 additions and 2126 deletions

View File

@@ -1,48 +1,104 @@
<script setup>
import {reactive} from 'vue';
import {reactive, ref} from 'vue';
import XForm from "../../../components/XForm.vue";
import XFormItem from "../../../components/XFormItem.vue";
import XInput from "../../../components/XInput.vue";
import {toPage} from "../../../utils/uils.js";
import {backPage, showToast, toPage} from "../../../utils/uils.js";
import Api from "../../../api/index.js";
import XTY from "../../../components/XTY.vue";
const rules = {
name: {
reg: /.+/,
msg: '姓名不能为空',
const {id} = defineProps({
id: {
type: Number,
default: null,
}
});
const formRef = ref();
const TY = ref(false);
const rules = {
realname: {
reg: /^[\u4e00-\u9fa5]{1}(?:·?[\u4e00-\u9fa5]){1,24}$|^[\u4e00-\u9fa5]{2,25}$/,
msg: '姓名不符合规则',
},
id_card: {
reg: /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/,
msg: '身份证号错误',
},
account: {
reg: /^(?!\s*$).+/,
msg: '支付宝不符合规则',
},
mobile: {
reg: /^1[3-9]\d{9}$/,
msg: '手机号错误',
},
};
const form = reactive({
name: null,
type: 1,
realname: null,
id_card: null,
account: null,
mobile: null,
});
if (id) {
Api.system.getWithdrawalInfo(id).then(({data}) => {
Object.assign(form, data);
})
}
const success = async () => {
if (!TY.value) {
showToast({
icon: 'error',
mask: true,
title: '请同意服务协议',
});
return;
}
formRef.value.verify();
if (id) {
const {msg} = await Api.system.editWithdrawal(form);
showToast(msg);
} else {
const {msg} = await Api.system.addWithdrawal(form);
showToast(msg);
}
setTimeout(() => {
backPage();
}, 2000)
}
</script>
<template>
<view>
<x-form :model="form" :rules="rules">
<x-form :model="form" :rules="rules" ref="formRef">
<x-form-item label="真实姓名">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入真实姓名"></x-input>
<x-input v-model:model-value="form.realname" height="96rpx" placeholder="请输入真实姓名"></x-input>
</x-form-item>
<x-form-item label="身份证号码">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入身份证号码"></x-input>
<x-input v-model:model-value="form.id_card" height="96rpx" placeholder="请输入身份证号码"></x-input>
</x-form-item>
<x-form-item label="支付宝账号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入支付宝账号"></x-input>
<x-input v-model:model-value="form.account" height="96rpx" placeholder="请输入支付宝账号"></x-input>
</x-form-item>
<x-form-item label="手机号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入手机号"></x-input>
<x-input v-model:model-value="form.mobile" height="96rpx" placeholder="请输入手机号"></x-input>
</x-form-item>
<x-form-item>
<view class="items-center test-24r xy">
<radio></radio>
本人承诺已阅读并同意
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index')">
灵活用工平台综合服务协议
</text>
本人按照协议内容向贵司提供相应的服务
<x-t-y v-model:model-value="TY">
本人承诺已阅读并同意
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index?id=3')">
灵活用工平台综合服务协议
</text>
本人按照协议内容向贵司提供相应的服务
</x-t-y>
</view>
</x-form-item>
<x-form-item>
<view
@click="success"
class="bg-[var(--primary-color)] py-[26rpx] w-full text-[#fff] rounded-[12rpx] !flex justify-center items-center !mt-[40rpx]">
提交
</view>

View File

@@ -1,48 +1,104 @@
<script setup>
import {reactive} from "vue";
import {toPage} from "../../../utils/uils.js";
import XInput from "../../../components/XInput.vue";
import XFormItem from "../../../components/XFormItem.vue";
import {reactive, ref} from 'vue';
import XForm from "../../../components/XForm.vue";
import XFormItem from "../../../components/XFormItem.vue";
import XInput from "../../../components/XInput.vue";
import {backPage, showToast, toPage} from "../../../utils/uils.js";
import Api from "../../../api/index.js";
import XTY from "../../../components/XTY.vue";
const rules = {
name: {
reg: /.+/,
msg: '姓名不能为空',
const {id} = defineProps({
id: {
type: Number,
default: null,
}
});
const formRef = ref();
const TY = ref(false);
const rules = {
realname: {
reg: /^[\u4e00-\u9fa5]{1}(?:·?[\u4e00-\u9fa5]){1,24}$|^[\u4e00-\u9fa5]{2,25}$/,
msg: '姓名不符合规则',
},
id_card: {
reg: /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/,
msg: '身份证号错误',
},
account: {
reg: /^(?!\s*$).+/,
msg: '支付宝不符合规则',
},
mobile: {
reg: /^1[3-9]\d{9}$/,
msg: '手机号错误',
},
};
const form = reactive({
name: null,
type: 2,
realname: null,
id_card: null,
account: null,
mobile: null,
});
if (id) {
Api.system.getWithdrawalInfo(id).then(({data}) => {
Object.assign(form, data);
})
}
const success = async () => {
if (!TY.value) {
showToast({
icon: 'error',
mask: true,
title: '请同意服务协议',
});
return;
}
formRef.value.verify();
if (id) {
const {msg} = await Api.system.editWithdrawal(form);
showToast(msg);
} else {
const {msg} = await Api.system.addWithdrawal(form);
showToast(msg);
}
setTimeout(() => {
backPage();
}, 2000)
}
</script>
<template>
<view>
<x-form :model="form" :rules="rules">
<x-form :model="form" :rules="rules" ref="formRef">
<x-form-item label="真实姓名">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入真实姓名"></x-input>
<x-input v-model:model-value="form.realname" height="96rpx" placeholder="请输入真实姓名"></x-input>
</x-form-item>
<x-form-item label="身份证号码">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入身份证号码"></x-input>
<x-input v-model:model-value="form.id_card" height="96rpx" placeholder="请输入身份证号码"></x-input>
</x-form-item>
<x-form-item label="银行卡号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入银行卡号"></x-input>
<x-input v-model:model-value="form.account" height="96rpx" placeholder="请输入银行卡号"></x-input>
</x-form-item>
<x-form-item label="手机号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入手机号"></x-input>
<x-input v-model:model-value="form.mobile" height="96rpx" placeholder="请输入手机号"></x-input>
</x-form-item>
<x-form-item>
<view class="items-center test-24r xy">
<radio></radio>
本人承诺已阅读并同意
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index')">
灵活用工平台综合服务协议
</text>
本人按照协议内容向贵司提供相应的服务
<x-t-y v-model:model-value="TY">
本人承诺已阅读并同意
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index?id=3')">
灵活用工平台综合服务协议
</text>
本人按照协议内容向贵司提供相应的服务
</x-t-y>
</view>
</x-form-item>
<x-form-item>
<view
@click="success"
class="bg-[var(--primary-color)] py-[26rpx] w-full text-[#fff] rounded-[12rpx] !flex justify-center items-center !mt-[40rpx]">
提交
</view>

View File

@@ -2,6 +2,9 @@
import {defineAsyncComponent, ref} from "vue";
import XNav from "../../components/XNav.vue";
import XNoticeBar from "../../components/XNoticeBar.vue";
import {onLoad} from "@dcloudio/uni-app";
import Api from "../../api/index.js";
import {showToast} from "../../utils/uils.js";
// #ifdef APP-PLUS
import AliPay from "./components/AliPay.vue";
@@ -13,6 +16,7 @@ const AliPay = defineAsyncComponent(() => import('./components/AliPay.vue'));
const BankPay = defineAsyncComponent(() => import('./components/BankPay.vue'));
// #endif
const id = ref(null);
const currentTab = ref(0);
const tabs = [
{
@@ -26,8 +30,22 @@ const tabs = [
];
const change = (e) => {
if (id.value) {
showToast('无法修改类型');
return;
}
currentTab.value = e.index;
}
onLoad((options) => {
const {id: _id} = options;
if (_id) {
id.value = _id;
Api.system.getWithdrawalInfo(id.value).then(({data}) => {
currentTab.value = data.type - 1;
});
}
});
</script>
<template>
@@ -37,6 +55,7 @@ const change = (e) => {
<x-notice-bar
status="success"
:tile="true"
text-color="var(--primary-color)"
text="平台承诺:所有信息仅用于打款,不会用作其他用途。为了您的资金安全,大额提现会通过第三方支付代发,请填写实名信息和银行卡进行验证。">
</x-notice-bar>
@@ -51,7 +70,7 @@ const change = (e) => {
<Suspense>
<template #default>
<view class="px-[34rpx] !mt-[40rpx]">
<component :is="tabs[currentTab].component"></component>
<component :is="tabs[currentTab].component" :id="id"></component>
</view>
</template>