发票支持钱包
parent
7da0ee2e53
commit
3b163497e8
|
|
@ -3,7 +3,7 @@
|
|||
<!-- 简洁的数据,一般列表展示使用 -->
|
||||
<view v-if="propIsTerse" class="content margin-top cp">
|
||||
<block v-if="data != null && data_field.length > 0">
|
||||
<view v-for="(item, index) in data_field" :key="index">
|
||||
<block v-for="(item, index) in data_field" :key="index">
|
||||
<view v-if="(item.is_hide || 0) == 0 " class="single-text margin-top-xs">
|
||||
<text class="cr-grey margin-right-xl">{{ item.name }}</text>
|
||||
<text class="cr-base">
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
<iconfont name="icon-copy" size="28rpx" class="cr-grey"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="propIsItemShowMax > 0 && propIsItemShowMax < data_field.length" @tap="item_more_event" class="margin-top-sm tc">
|
||||
</block>
|
||||
<view v-if="propIsItemShowMax > 0 && propIsItemShowMax < data_field.length" @tap.stop="item_more_event" class="margin-top-sm tc">
|
||||
<text class="cr-grey-c margin-right-sm">{{$t('common.view_more')}}</text>
|
||||
<iconfont :name="'icon-arrow-'+(more_status ? 'top' : 'bottom')" size="28rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
|
|
@ -30,8 +30,8 @@
|
|||
<view v-if="(propTitle || null) != null" class="br-b padding-bottom-main fw-b text-size">{{propTitle}}</view>
|
||||
<view class="panel-content oh">
|
||||
<block v-if="data != null && data_field.length > 0">
|
||||
<view v-for="(item, index) in data_field" :key="index">
|
||||
<view v-if="(item.is_hide || 0) == 0 " class="item br-b-dashed oh padding-vertical-main">
|
||||
<block v-for="(item, index) in data_field" :key="index">
|
||||
<view v-if="(item.is_hide || 0) == 0 " class="item br-b-f5 oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">
|
||||
<block v-if="item.type == 'images'">
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-if="propIsItemShowMax > 0 && propIsItemShowMax < data_field.length" @tap="item_more_event" class="margin-top-sm tc">
|
||||
<text class="cr-grey-c margin-right-sm">{{$t('common.view_more')}}</text>
|
||||
<iconfont :name="'icon-arrow-'+(more_status ? 'top' : 'bottom')" size="28rpx" color="#ccc"></iconfont>
|
||||
|
|
@ -91,6 +91,16 @@
|
|||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
// 指定字段
|
||||
propAppointField: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 排除字段
|
||||
propExcludeField: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 无数据提示状态
|
||||
propNoDataStatus: {
|
||||
type: [Number, String],
|
||||
|
|
@ -129,9 +139,16 @@
|
|||
methods: {
|
||||
// 数据字段处理
|
||||
data_field_handle(data) {
|
||||
var temp_data = data;
|
||||
for(var i in temp_data) {
|
||||
temp_data[i]['is_hide'] = (temp_data[i]['is_hide'] || 0) == 0 ? ((i >= this.propIsItemShowMax && this.propIsItemShowMax > 0) ? 1 : 0) : 0;
|
||||
var appoint = (this.propAppointField || null) == null ? [] : this.propAppointField.split(',');
|
||||
var exclude = (this.propExcludeField || null) == null ? [] : this.propExcludeField.split(',');
|
||||
var temp_data = [];
|
||||
var index = 0;
|
||||
for(var i in data) {
|
||||
if((exclude.length == 0 && appoint.length > 0 && appoint.indexOf(data[i]['field']) != -1) || (appoint.length == 0 && (exclude.length == 0 || exclude.indexOf(data[i]['field']) == -1))) {
|
||||
data[i]['is_hide'] = (data[i]['is_hide'] || 0) == 0 ? ((index >= this.propIsItemShowMax && this.propIsItemShowMax > 0) ? 1 : 0) : 0;
|
||||
temp_data.push(data[i]);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_field: temp_data
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@
|
|||
"plugins-invoice-invoice-detail": "Invoice details",
|
||||
"plugins-invoice-invoice-saveinfo": "Invoice editing",
|
||||
"plugins-invoice-order": "Order invoicing",
|
||||
"plugins-invoice-recharge": "Recharge invoice",
|
||||
"plugins-signin-user": "Sign in",
|
||||
"plugins-signin-detail": "Sign in",
|
||||
"plugins-signin-user-qrcode-detail": "Sign in code details",
|
||||
|
|
@ -865,7 +866,6 @@
|
|||
"330m76": "Source terminal",
|
||||
"p3scy0": "The avatar address is incorrect",
|
||||
"o411h6": "Merge invoicing",
|
||||
"i52cw1": "Total order amount",
|
||||
"15k32o": "Please select data first",
|
||||
"3fr155": "The element parameter ID is incorrect",
|
||||
"1i873j": "pay",
|
||||
|
|
@ -1126,6 +1126,7 @@
|
|||
"invoice": {
|
||||
"invoice": {
|
||||
"p3dmd2": "Order invoicing",
|
||||
"bh8yt3": "Recharge invoice",
|
||||
"l3832z": "Business type",
|
||||
"hoenw8": "Application type",
|
||||
"j04kjc": "Invoice type",
|
||||
|
|
@ -1140,7 +1141,6 @@
|
|||
"4tu3v3": "You can click on the invoice name and copy it, then go to the browser to open the address and download the invoice.",
|
||||
"rrfex6": "state",
|
||||
"p73963": "Invoice content",
|
||||
"e5n838": "Tax identification number",
|
||||
"41qbu6": "Name of the bank where the enterprise opens the account",
|
||||
"3a9459": "Enterprise account opening",
|
||||
"2g7t23": "Enterprise contact phone number",
|
||||
|
|
@ -1149,7 +1149,6 @@
|
|||
"f2222p": "Recipient's phone number",
|
||||
"q8l3zj": "Recipient address",
|
||||
"rpdwd3": "Reason for rejection",
|
||||
"dt77rq": "User notes",
|
||||
"2000a0": "Express name"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@
|
|||
"plugins-invoice-invoice-detail": "发票详情",
|
||||
"plugins-invoice-invoice-saveinfo": "开票编辑",
|
||||
"plugins-invoice-order": "订单开票",
|
||||
"plugins-invoice-recharge": "充值开票",
|
||||
"plugins-signin-user": "签到",
|
||||
"plugins-signin-detail": "签到",
|
||||
"plugins-signin-user-qrcode-detail": "签到码详情",
|
||||
|
|
@ -855,7 +856,6 @@
|
|||
"330m76": "来源终端",
|
||||
"p3scy0": "头像地址有误",
|
||||
"o411h6": "合并开票",
|
||||
"i52cw1": "订单总额",
|
||||
"15k32o": "请先选择数据",
|
||||
"3fr155": "元素参数id有误",
|
||||
"1i873j": "支付",
|
||||
|
|
@ -1114,6 +1114,7 @@
|
|||
"invoice": {
|
||||
"invoice": {
|
||||
"p3dmd2": "订单开票",
|
||||
"bh8yt3": "充值开票",
|
||||
"l3832z": "业务类型",
|
||||
"hoenw8": "申请类型",
|
||||
"j04kjc": "发票类型",
|
||||
|
|
@ -1128,7 +1129,6 @@
|
|||
"4tu3v3": "可点击发票名称复制后、到浏览器打开地址下载发票。",
|
||||
"rrfex6": "状态",
|
||||
"p73963": "发票内容",
|
||||
"e5n838": "纳税识别号",
|
||||
"41qbu6": "企业开户行名称",
|
||||
"3a9459": "企业开户帐号",
|
||||
"2g7t23": "企业联系电话",
|
||||
|
|
@ -1137,7 +1137,6 @@
|
|||
"f2222p": "收件人电话",
|
||||
"q8l3zj": "收件人地址",
|
||||
"rpdwd3": "拒绝原因",
|
||||
"dt77rq": "用户备注",
|
||||
"2000a0": "快递名称"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -973,6 +973,13 @@
|
|||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "recharge/recharge",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<text class="fr cr-main">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<component-panel-content :propData="item" :propDataField="content_field_list" :propIsTerse="true"></component-panel-content>
|
||||
<component-panel-content :propData="item" :propDataField="field_list" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view v-if="item.status == 0" class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white cr-green br-green" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/givegift/receive/receive?code='+item.code" hover-class="none">{{$t('common.link')}}</button>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
content_field_list: [],
|
||||
field_list: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
var data = res.data.data;
|
||||
this.setData({
|
||||
nav_status_list: data.nav_status_list || [],
|
||||
content_field_list: data.content_field_list || [],
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_page: 1,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<image :src="item.goods.images" mode="aspectFill" class="radius goods-images fl"></image>
|
||||
<view class="goods-title multi-text fr">{{item.goods.title}}</view>
|
||||
</view>
|
||||
<component-panel-content :propData="item" :propDataField="content_field_list" propIsItemShowMax="6" :propIsTerse="true"></component-panel-content>
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propIsItemShowMax="6" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<button class="round bg-white cr-base br-grey" type="default" size="mini" @tap="popup_edit_open_event" :data-index="index" hover-class="none">{{$t('common.edit')}}</button>
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
form_submit_disabled_status: false,
|
||||
nav_status_list: [],
|
||||
nav_status_index: 0,
|
||||
content_field_list: [],
|
||||
field_list: [],
|
||||
// 支付弹窗参数
|
||||
pay_url: '',
|
||||
qrcode_url: '',
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
payment_list: data.payment_list || [],
|
||||
default_payment_id: data.default_payment_id || 0,
|
||||
nav_status_list: data.nav_status_list || [],
|
||||
content_field_list: data.content_field_list || [],
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_page: 1,
|
||||
|
|
|
|||
|
|
@ -1,39 +1,23 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="detail != null">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<view v-if="detail_list.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{$t('invoice-detail.invoice-detail.s70kj4')}}</view>
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail_list" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="detail != null">
|
||||
<!-- 申请信息 -->
|
||||
<component-panel-content :propData="detail" :propDataField="field_list" propExcludeField="express_name,express_number" :propTitle="$t('invoice-detail.invoice-detail.s70kj4')"></component-panel-content>
|
||||
|
||||
<!-- 快递信息 -->
|
||||
<view v-if="detail.status == 2 && detail.invoice_type != 0 && express_data.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{$t('user-order-detail.user-order-detail.0876xf')}}</view>
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in express_data" :key="index" class="item br-b oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 快递信息 -->
|
||||
<block v-if="detail.status == 2 && detail.invoice_type != 0">
|
||||
<component-panel-content :propData="detail" :propDataField="field_list" propAppointField="express_name,express_number" :propTitle="$t('user-order-detail.user-order-detail.0876xf')"></component-panel-content>
|
||||
</block>
|
||||
|
||||
<!-- 电子发票 -->
|
||||
<view v-if="detail.status == 2 && detail.invoice_type == 0 && (detail.electronic_invoice || null) != null" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{$t('invoice-detail.invoice-detail.1s2f0g')}}</view>
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail.electronic_invoice" :key="index" class="item br-b oh padding-vertical-main">
|
||||
<view class="content fl" @tap="electronic_invoice_event" :data-value="item.url">{{ item.title }}</view>
|
||||
</view>
|
||||
<!-- 电子发票 -->
|
||||
<block v-if="detail.status == 2 && detail.invoice_type == 0 && (detail.electronic_invoice || null) != null" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<component-panel-content :propTitle="$t('invoice-detail.invoice-detail.1s2f0g')">
|
||||
<view v-for="(item, index) in detail.electronic_invoice" :key="index" class="item br-b-f5 oh padding-vertical-main">
|
||||
<view class="content fl" @tap="electronic_invoice_event" :data-value="item.url">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="br-t cr-red padding-top-main margin-top-main">{{$t('invoice-detail.invoice-detail.4tu3v3')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cr-red padding-top-main">{{$t('invoice-detail.invoice-detail.4tu3v3')}}</view>
|
||||
</component-panel-content>
|
||||
</block>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
|
@ -51,25 +35,26 @@
|
|||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
detail_list: [],
|
||||
express_data: [],
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
field_list: [],
|
||||
detail: null
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentBottomLine,
|
||||
componentPanelContent
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -118,33 +103,8 @@
|
|||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
detail: data.data,
|
||||
detail_list: [
|
||||
{ name: this.$t('invoice.invoice.l3832z'), value: data.data.business_type_name || "" },
|
||||
{ name: this.$t('invoice.invoice.hoenw8'), value: data.data.apply_type_name || "" },
|
||||
{ name: this.$t('invoice.invoice.j04kjc'), value: data.data.invoice_type_name || "" },
|
||||
{ name: this.$t('invoice.invoice.fvuc4p'), value: data.data.total_price || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.rrfex6'), value: data.data.status_name || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.p73963'), value: data.data.invoice_content || "" },
|
||||
{ name: this.$t('invoice.invoice.y724c7'), value: data.data.invoice_title || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.e5n838'), value: data.data.invoice_code || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.41qbu6'), value: data.data.invoice_bank || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.3a9459'), value: data.data.invoice_account || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.2g7t23'), value: data.data.invoice_tel || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.6k6sov'), value: data.data.invoice_address || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.7159m0'), value: data.data.name || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.f2222p'), value: data.data.tel || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.q8l3zj'), value: data.data.address || "" },
|
||||
{ name: this.$t('login.login.db1rf4'), value: data.data.email || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.rpdwd3'), value: data.data.refuse_reason || "" },
|
||||
{ name: this.$t('invoice-detail.invoice-detail.dt77rq'), value: data.data.user_note || "" },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.h2c78h'), value: data.data.add_time || "" },
|
||||
{ name: this.$t('common.upd_time'), value: data.data.upd_time || "" },
|
||||
],
|
||||
express_data: [
|
||||
{ name: this.$t('invoice-detail.invoice-detail.2000a0'), value: data.data.express_name || "" },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.2byl8l'), value: data.data.express_number || "" },
|
||||
],
|
||||
detail: data.data,
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: "",
|
||||
|
|
|
|||
|
|
@ -19,14 +19,8 @@
|
|||
<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>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/invoice/invoice-detail/invoice-detail?id=' + item.id" @tap="url_event" class="content margin-top-main cp">
|
||||
<view v-for="(fv, fi) in content_list" :key="fi">
|
||||
<view class="single-text margin-top-xs">
|
||||
<text class="cr-grey-9 margin-right-main">{{ fv.name }}:</text>
|
||||
<text class="cr-black">{{ item[fv.field] }}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="cr-grey">{{ fv.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/invoice/invoice-detail/invoice-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">
|
||||
|
|
@ -44,9 +38,10 @@
|
|||
</view>
|
||||
|
||||
<!-- 添加发票 -->
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<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/invoice/order/order" @tap="url_event">{{$t('invoice.invoice.p3dmd2')}}</button>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -60,12 +55,14 @@
|
|||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
field_list: [],
|
||||
data_base: null,
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
|
|
@ -79,20 +76,14 @@
|
|||
params: null,
|
||||
nav_status_list: [],
|
||||
nav_status_index: 0,
|
||||
content_list: [
|
||||
{ name: this.$t('invoice.invoice.l3832z'), field: 'business_type_name' },
|
||||
{ name: this.$t('invoice.invoice.hoenw8'), field: 'apply_type_name' },
|
||||
{ name: this.$t('invoice.invoice.j04kjc'), field: 'invoice_type_name' },
|
||||
{ name: this.$t('invoice.invoice.fvuc4p'), field: 'total_price' },
|
||||
{ name: this.$t('invoice.invoice.y724c7'), field: 'invoice_title' },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentBottomLine,
|
||||
componentPanelContent
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -250,6 +241,7 @@
|
|||
}
|
||||
|
||||
this.setData({
|
||||
field_list: data.field_list || [],
|
||||
data_list: temp_data_list,
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
|
|
|
|||
|
|
@ -7,22 +7,17 @@
|
|||
<view class="base oh br-b-dashed padding-bottom-main">
|
||||
<view class="dis-inline-block va-m" data-type="node":data-value="item.id" @tap="selected_event">
|
||||
<iconfont
|
||||
propClass="margin-right-sm pr top-md"
|
||||
propClass="margin-right-sm pr top-xs"
|
||||
:name="select_ids.indexOf(item.id) != -1 ? 'icon-zhifu-yixuan' : 'icon-zhifu-weixuan'"
|
||||
size="34rpx"
|
||||
:color="select_ids.indexOf(item.id) != -1 ? '#E22C08' : '#999'"
|
||||
></iconfont>
|
||||
</view>
|
||||
<text class="cr-grey-9 va-m">{{ item.add_time }}</text>
|
||||
</view>
|
||||
<text class="va-m">{{ item.order_no }}</text>
|
||||
<text class="fr">{{ item.pay_price }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/user-order-detail/user-order-detail?id=' + item.id" @tap="url_event" class="content margin-top cp">
|
||||
<view v-for="(fv, fi) in content_list" :key="fi">
|
||||
<view class="single-text margin-top-xs">
|
||||
<text class="cr-grey-9 margin-right-main">{{ fv.name }}:</text>
|
||||
<text class="fw-b">{{ item[fv.field] }}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="fw-b">{{ fv.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propExcludeField="order_no,pay_price" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view class="item-operation tr margin-top-main">
|
||||
<button class="round bg-white br-grey-9 text-size-md" type="default" size="mini" hover-class="none" :data-ids="item.id" data-type="item" @tap="invoice_event">{{$t('invoice-saveinfo.invoice-saveinfo.89815t')}}</button>
|
||||
|
|
@ -52,13 +47,15 @@
|
|||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_base: null,
|
||||
data_base: null,
|
||||
field_list: [],
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
|
|
@ -69,19 +66,14 @@
|
|||
bottom_fixed_style: '',
|
||||
params: null,
|
||||
select_ids: [],
|
||||
content_list: [
|
||||
{ name: this.$t('user-order-detail.user-order-detail.n18sd2'), field: 'order_no' },
|
||||
{ name: this.$t('order.order.i52cw1'), field: 'total_price' },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.516tlr'), field: 'pay_price' },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.vg4jb1'), field: 'price' },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentBottomLine,
|
||||
componentPanelContent
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -171,24 +163,26 @@
|
|||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data_list.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data_list;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data_list;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_base: res.data.data.base || null,
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
var data = res.data.data;
|
||||
if (data.data_list.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data_list;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = data.data_list;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
field_list: data.field_list || [],
|
||||
data_list: temp_data_list,
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
|
|
@ -263,7 +257,7 @@
|
|||
return false;
|
||||
}
|
||||
}
|
||||
app.globalData.url_open('/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids=' + ids + '&type=order&is_redirect=1');
|
||||
app.globalData.url_open('/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids=' + ids + '&type=0&is_redirect=1');
|
||||
},
|
||||
|
||||
// url事件
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* 列表
|
||||
*/
|
||||
.select-scroll-box {
|
||||
height: calc(100vh - 186rpx);
|
||||
}
|
||||
|
||||
.data-list .item .select-icon {
|
||||
width: 35rpx;
|
||||
height: 35rpx !important;
|
||||
}
|
||||
|
|
@ -0,0 +1,272 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="data_list.length > 0" class="data-list">
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view class="padding-horizontal-main padding-top-main" :class="select_ids.length > 0 ? 'page-bottom-fixed' : ''">
|
||||
<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">
|
||||
<view class="dis-inline-block va-m" data-type="node":data-value="item.id" @tap="selected_event">
|
||||
<iconfont
|
||||
propClass="margin-right-sm pr top-xs"
|
||||
:name="select_ids.indexOf(item.id) != -1 ? 'icon-zhifu-yixuan' : 'icon-zhifu-weixuan'"
|
||||
size="34rpx"
|
||||
:color="select_ids.indexOf(item.id) != -1 ? '#E22C08' : '#999'"
|
||||
></iconfont>
|
||||
</view>
|
||||
<text class="va-m">{{ item.recharge_no }}</text>
|
||||
<text class="fr">{{ item.pay_money }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/wallet/user-recharge-detail/user-recharge-detail?id=' + item.id" @tap="url_event" class="content margin-top cp">
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propExcludeField="recharge_no,pay_money" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view class="item-operation tr margin-top-main">
|
||||
<button class="round bg-white br-grey-9 text-size-md" type="default" size="mini" hover-class="none" :data-ids="item.id" data-type="item" @tap="invoice_event">{{$t('invoice-saveinfo.invoice-saveinfo.89815t')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 合并开票 -->
|
||||
<view v-if="select_ids.length > 0" class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<button class="item bg-white cr-main br-main round wh-auto" type="default" hover-class="none" data-type="all" @tap="invoice_event">{{$t('order.order.o411h6')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<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';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_base: null,
|
||||
field_list: [],
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
bottom_fixed_style: '',
|
||||
params: null,
|
||||
select_ids: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentPanelContent
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 是否加载中
|
||||
if (this.data_is_loading == 1) {
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
data_is_loading: 1,
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'recharge', 'invoice'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
if (data.data_list.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data_list;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = data.data_list;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
field_list: data.field_list || [],
|
||||
data_list: temp_data_list,
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: this.data_page > 1 && this.data_page > this.data_page_total,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 选择
|
||||
selected_event(e) {
|
||||
var value = e.currentTarget.dataset.value;
|
||||
var temp_select_ids = this.select_ids;
|
||||
var index = temp_select_ids.indexOf(value);
|
||||
if (index == -1) {
|
||||
temp_select_ids.push(value);
|
||||
} else {
|
||||
temp_select_ids.splice(index, 1);
|
||||
}
|
||||
this.setData({
|
||||
select_ids: temp_select_ids,
|
||||
});
|
||||
},
|
||||
|
||||
// 合并开票
|
||||
invoice_event(e) {
|
||||
var type = e.currentTarget.dataset.type || 'all';
|
||||
var ids = e.currentTarget.dataset.ids || null;
|
||||
if (type == 'all') {
|
||||
if (this.select_ids.length <= 0) {
|
||||
app.globalData.showToast(this.$t('order.order.15k32o'));
|
||||
return false;
|
||||
} else {
|
||||
ids = this.select_ids.join(',');
|
||||
}
|
||||
} else {
|
||||
if (ids === null) {
|
||||
app.globalData.showToast(this.$t('order.order.3fr155'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
app.globalData.url_open('/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids=' + ids + '&type=1&is_redirect=1');
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
@import './recharge.css';
|
||||
</style>
|
||||
Loading…
Reference in New Issue