用户认证
parent
95d64b5718
commit
d38df4d3aa
|
|
@ -266,7 +266,8 @@
|
|||
"plugins-hospital-patient-list": "Patient List",
|
||||
"plugins-hospital-prescription": "Consultation and prescription",
|
||||
"plugins-certificate-userauth": "User auth",
|
||||
"plugins-certificate-userauth-form": "User auth editor"
|
||||
"plugins-certificate-userauth-saveinfo": "User auth editor",
|
||||
"plugins-certificate-userauth-detail": "User auth detail"
|
||||
},
|
||||
"login": {
|
||||
"login": {
|
||||
|
|
@ -1935,5 +1936,10 @@
|
|||
"rtyu33": "Message prompt, maximum format of 200 characters",
|
||||
"34rrr3": "Leave a message for Ta to express gratitude!"
|
||||
}
|
||||
},
|
||||
"certificate-userauth": {
|
||||
"certificate-userauth": {
|
||||
"tgtwes": "Go authenticate"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -264,7 +264,8 @@
|
|||
"plugins-hospital-patient-list": "就诊人列表",
|
||||
"plugins-hospital-prescription": "问诊开方",
|
||||
"plugins-certificate-userauth": "用户认证",
|
||||
"plugins-certificate-userauth-form": "用户认证编辑"
|
||||
"plugins-certificate-userauth-saveinfo": "用户认证编辑",
|
||||
"plugins-certificate-userauth-detail": "用户认证详情"
|
||||
},
|
||||
"login": {
|
||||
"login": {
|
||||
|
|
@ -1917,5 +1918,10 @@
|
|||
"rtyu33": "留言提示,格式最多200个字符",
|
||||
"34rrr3": "给Ta留言表示感谢!"
|
||||
}
|
||||
},
|
||||
"certificate-userauth": {
|
||||
"certificate-userauth": {
|
||||
"tgtwes": "去认证"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1767,7 +1767,14 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "userauth-form/userauth-form",
|
||||
"path": "userauth-saveinfo/userauth-saveinfo",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "userauth-detail/userauth-detail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
|
|
|
|||
|
|
@ -0,0 +1,341 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="page-bottom-fixed">
|
||||
<view v-if="(data || null) != null">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="padding-main oh">
|
||||
<view class="border-radius-main bg-white oh spacing-mb">
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('invoice.invoice.y724c7')}}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="text" name="invoice_title" placeholder-class="cr-grey" class="cr-base" :placeholder="$t('invoice-saveinfo.invoice-saveinfo.x461e0')" maxlength="200" :value="data.invoice_title || ''" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed">
|
||||
<view class="bottom-line-exclude">
|
||||
<button class="item bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :loading="form_submit_loading" :disabled="form_submit_loading">{{$t('form.form.4yd066')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: {},
|
||||
form_submit_loading: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
data_base: null,
|
||||
apply_type_list: [],
|
||||
can_invoice_type_list: [],
|
||||
invoice_content_list: [],
|
||||
save_base_data: null,
|
||||
data: {},
|
||||
form_invoice_type_index: 0,
|
||||
form_apply_type_index: 0,
|
||||
form_invoice_content_index: 0,
|
||||
form_apply_type_disabled: false,
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params || {},
|
||||
});
|
||||
|
||||
// 标题设置
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('invoice-saveinfo.invoice-saveinfo.89815t') + ((this.params.id || null) == null ? this.$t('invoice-saveinfo.invoice-saveinfo.004t56') : this.$t('common.edit')),
|
||||
});
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('saveinfo', 'userauth', 'certificate'),
|
||||
method: 'POST',
|
||||
data: {...this.params, ...{lang_can_key: 'apply_type_list,can_invoice_type_list'}},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var default_data = ((data.data || null) == null || data.data.length == 0) ? null : data.data;
|
||||
var upd_data = {
|
||||
data_base: data.base || null,
|
||||
apply_type_list: data.apply_type_list || [],
|
||||
can_invoice_type_list: data.can_invoice_type_list || [],
|
||||
invoice_content_list: data.invoice_content_list || [],
|
||||
save_base_data: data.save_base_data,
|
||||
data: default_data || {},
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: data.save_base_data.total_price <= 0 ? this.$t('invoice-saveinfo.invoice-saveinfo.dl11n1') : '',
|
||||
};
|
||||
// 类型数据处理
|
||||
if (default_data != null) {
|
||||
var invoice_content_index = upd_data.invoice_content_list.indexOf(default_data.invoice_content);
|
||||
upd_data['form_invoice_type_index'] = default_data.invoice_type;
|
||||
upd_data['form_apply_type_index'] = default_data.apply_type;
|
||||
upd_data['form_invoice_content_index'] = invoice_content_index == -1 ? 0 : invoice_content_index;
|
||||
upd_data['form_apply_type_disabled'] = default_data.apply_type == 1;
|
||||
}
|
||||
this.setData(upd_data);
|
||||
|
||||
// 数据容器处理
|
||||
this.invoice_container_handle();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'init')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 发票类型事件
|
||||
form_invoice_type_event(e) {
|
||||
this.setData({
|
||||
form_invoice_type_index: e.detail.value,
|
||||
});
|
||||
this.invoice_container_handle();
|
||||
},
|
||||
|
||||
// 发票类型事件
|
||||
form_apply_type_event(e) {
|
||||
this.setData({
|
||||
form_apply_type_index: e.detail.value,
|
||||
});
|
||||
this.invoice_container_handle();
|
||||
},
|
||||
|
||||
// 发票内容事件
|
||||
form_invoice_content_event(e) {
|
||||
this.setData({
|
||||
form_invoice_content_index: e.detail.value,
|
||||
});
|
||||
},
|
||||
|
||||
// 容器显隐处理
|
||||
invoice_container_handle() {
|
||||
// 发票类型
|
||||
var invoice_type = this.can_invoice_type_list[this.form_invoice_type_index]['id'];
|
||||
if (invoice_type == 2 || invoice_type == 3) {
|
||||
// 选择专票的时候申请类型必须是企业
|
||||
this.setData({
|
||||
form_apply_type_index: 1,
|
||||
form_apply_type_disabled: true,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
form_apply_type_disabled: false,
|
||||
});
|
||||
}
|
||||
|
||||
// 申请类型
|
||||
switch (invoice_type) {
|
||||
// 增值税普通电子发票
|
||||
case 0:
|
||||
this.setData({
|
||||
company_special_container: false,
|
||||
addressee_container: false,
|
||||
email_container: true,
|
||||
});
|
||||
break;
|
||||
// 增值税普通纸质发票
|
||||
case 1:
|
||||
this.setData({
|
||||
company_special_container: false,
|
||||
addressee_container: true,
|
||||
email_container: false,
|
||||
});
|
||||
break;
|
||||
// 增值税专用纸质发票
|
||||
case 2:
|
||||
this.setData({
|
||||
company_container: true,
|
||||
company_special_container: true,
|
||||
addressee_container: true,
|
||||
email_container: false,
|
||||
});
|
||||
break;
|
||||
|
||||
// 增值税专用纸质发票
|
||||
case 3:
|
||||
this.setData({
|
||||
company_container: true,
|
||||
company_special_container: true,
|
||||
addressee_container: false,
|
||||
email_container: true,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
// 增值税专用纸质发票情况下个人类型处理
|
||||
if (invoice_type == 0 || invoice_type == 1) {
|
||||
var apply_type = this.apply_type_list[this.form_apply_type_index]['id'];
|
||||
this.setData({
|
||||
company_container: apply_type != 0,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 表单提交
|
||||
form_submit(e) {
|
||||
var data = e.detail.value;
|
||||
if ((this.data || null) == null || (this.data.id || null) == null) {
|
||||
data['ids'] = this.params.ids || '';
|
||||
data['type'] = this.params.type || '';
|
||||
} else {
|
||||
data['id'] = this.data.id;
|
||||
}
|
||||
|
||||
// 数据验证
|
||||
var validation = [
|
||||
{ fields: 'invoice_type', msg: this.$t('invoice-saveinfo.invoice-saveinfo.t3i3e3'), is_can_zero: 1 },
|
||||
{ fields: 'apply_type', msg: this.$t('invoice-saveinfo.invoice-saveinfo.k31t2s'), is_can_zero: 1 },
|
||||
{ fields: 'invoice_title', msg: this.$t('invoice-saveinfo.invoice-saveinfo.r13p43') },
|
||||
];
|
||||
if (app.globalData.fields_check(data, validation)) {
|
||||
var invoice_type = this.can_invoice_type_list[this.form_invoice_type_index]['id'];
|
||||
var apply_type = this.apply_type_list[this.form_apply_type_index]['id'];
|
||||
if (apply_type == 1) {
|
||||
validation.push({ fields: 'invoice_code', msg: this.$t('invoice-saveinfo.invoice-saveinfo.ws4wbb') });
|
||||
}
|
||||
if (invoice_type == 2) {
|
||||
validation.push({ fields: 'invoice_bank', msg: this.$t('invoice-saveinfo.invoice-saveinfo.87itn8') });
|
||||
validation.push({ fields: 'invoice_account', msg: this.$t('invoice-saveinfo.invoice-saveinfo.01lw93') });
|
||||
validation.push({ fields: 'invoice_tel', msg: this.$t('invoice-saveinfo.invoice-saveinfo.414ihr') });
|
||||
validation.push({ fields: 'invoice_address', msg: this.$t('invoice-saveinfo.invoice-saveinfo.g3yh32') });
|
||||
}
|
||||
|
||||
if (invoice_type == 1 || invoice_type == 2) {
|
||||
validation.push({ fields: 'name', msg: this.$t('invoice-saveinfo.invoice-saveinfo.4xy6xi') });
|
||||
validation.push({ fields: 'tel', msg: this.$t('invoice-saveinfo.invoice-saveinfo.quhnk0') });
|
||||
validation.push({ fields: 'address', msg: this.$t('invoice-saveinfo.invoice-saveinfo.kq77u3') });
|
||||
}
|
||||
|
||||
if (app.globalData.fields_check(data, validation)) {
|
||||
// 发票类型
|
||||
data['invoice_type'] = this.can_invoice_type_list[this.form_invoice_type_index]['id'];
|
||||
|
||||
// 发票内容
|
||||
if (this.invoice_content_list.length > 0 && this.invoice_content_list[this.form_invoice_content_index] != undefined) {
|
||||
data['invoice_content'] = this.invoice_content_list[this.form_invoice_content_index];
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
});
|
||||
|
||||
// 网络请求
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('save', 'userauth', 'certificate'),
|
||||
method: 'POST',
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
var is_to = (this.params || null) != null && (this.params.is_redirect || 0) == 1;
|
||||
setTimeout(function () {
|
||||
// 是否关闭页面进入我的发票、适合从订单开票中过来提交成功直接进入我的发票列表
|
||||
if (is_to) {
|
||||
app.globalData.url_open('/pages/plugins/invoice/invoice/invoice', true);
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}, 2000);
|
||||
} else {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
|
|
@ -1,9 +1,5 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 公告 -->
|
||||
<view v-if="(data_base || null) != null && (data_base.invoice_desc || null) != null && data_base.invoice_desc.length > 0" class="padding-horizontal-main padding-vertical-sm bg-white">
|
||||
<uni-notice-bar class="padding-0 margin-0" show-icon scrollable :text="data_base.invoice_desc.join('')" background-color="transparent" color="#666" />
|
||||
</view>
|
||||
<!-- 导航 -->
|
||||
<view v-if="nav_status_list.length > 0" class="nav-base bg-white flex-row jc-sa align-c">
|
||||
<block v-for="(item, index) in nav_status_list" :key="index">
|
||||
|
|
@ -11,21 +7,20 @@
|
|||
</block>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" :class="'scroll-box-ece-nav '+((data_base || null) != null && (data_base.invoice_desc || null) != null && data_base.invoice_desc.length > 0 ? 'top-notice' : '')" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<scroll-view :scroll-y="true" :class="'scroll-box-ece-nav '+((data_base || null) != null && (data_base.certificate_desc || null) != null && data_base.certificate_desc.length > 0 ? 'top-notice' : '')" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view class="page-bottom-fixed">
|
||||
<view v-if="data_list.length > 0" class="data-list padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b-dashed padding-bottom-main flex-row jc-sb align-c">
|
||||
<text class="cr-grey-9">{{ item.add_time }}</text>
|
||||
<text class="cr-black" :class="item.status == 0 || item.status == 1 ? 'cr-black' : item.status == 2 ? 'cr-grey-c' : 'cr-red'">{{ item.status_name }}</text>
|
||||
<text class="cr-black" :class="item.status == 1 ? 'cr-green' : 'cr-red'">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/invoice/invoice-detail/invoice-detail?id=' + item.id" @tap="url_event" class="content margin-top-main cp">
|
||||
<view :data-value="'/pages/plugins/certificate/userauth-detail/userauth-detail?id=' + item.id" @tap="url_event" class="content margin-top-main cp">
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propIsItemShowMax="6" propExcludeField="add_time,status_name" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<!-- 0待审核、1待开票、2已开票、3已拒绝, 4已关闭) -->
|
||||
<view v-if="item.status == 0 || item.status == 3 || item.status == 4" class="item-operation tr margin-top-main">
|
||||
<!-- 资质认证状态(0待审核, 1已审核, 2已拒绝, 3已过期) -->
|
||||
<view v-if="item.status != 1" class="item-operation tr margin-top-main">
|
||||
<button class="btn round br-grey-9 bg-white text-size-md" type="default" size="mini" @tap="delete_event" :data-value="item.id" :data-index="index" hover-class="none">{{$t('common.del')}}</button>
|
||||
<button v-if="item.status == 0 || item.status == 3" class="btn round cr-main br-main bg-white text-size-md" type="default" size="mini" :data-value="'/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?id='+item.id" @tap="url_event" hover-class="none">{{$t('common.edit')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -37,11 +32,10 @@
|
|||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 添加发票 -->
|
||||
<view v-if="(data_base.is_invoice_order || 0) == 1 || (data_base.is_invoice_recharge || 0) == 1" class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude flex-row gap-10">
|
||||
<button v-if="(data_base.is_invoice_order || 0) == 1" class="item round cr-main bg-white br-main text-size wh-auto" type="default" hover-class="none" data-value="/pages/plugins/invoice/order/order" @tap="url_event">{{$t('invoice.invoice.p3dmd2')}}</button>
|
||||
<button v-if="(data_base.is_invoice_recharge || 0) == 1" class="item round cr-main bg-white br-main text-size wh-auto" type="default" hover-class="none" data-value="/pages/plugins/invoice/recharge/recharge" @tap="url_event">{{$t('invoice.invoice.bh8yt3')}}</button>
|
||||
<!-- 去认证 -->
|
||||
<view class="bottom-fixed">
|
||||
<view class="bottom-line-exclude">
|
||||
<button class="item round cr-main bg-white br-main text-size wh-auto" type="default" hover-class="none" data-value="/pages/plugins/certificate/userauth-saveinfo/userauth-saveinfo" @tap="url_event">{{$t('certificate-userauth.certificate-userauth.tgtwes')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -72,7 +66,6 @@
|
|||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
bottom_fixed_style: '',
|
||||
params: null,
|
||||
nav_status_list: [],
|
||||
nav_status_index: 0,
|
||||
|
|
@ -294,7 +287,7 @@
|
|||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('delete', 'user', 'invoice'),
|
||||
url: app.globalData.get_request_url('delete', 'userauth', 'certificate'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
ids: value,
|
||||
|
|
|
|||
Loading…
Reference in New Issue