diff --git a/sourcecode/alipay/default/pages/plugins/distribution/poster/poster.js b/sourcecode/alipay/default/pages/plugins/distribution/poster/poster.js
index 5b4807dad4e0ecb1fdc47c4b257caa5ecfc8ead4..8034e92811afb8b5381d56ee788c8c7e47bc0636 100644
--- a/sourcecode/alipay/default/pages/plugins/distribution/poster/poster.js
+++ b/sourcecode/alipay/default/pages/plugins/distribution/poster/poster.js
@@ -147,7 +147,7 @@ Page({
success(res) {
app.showToast('复制成功', 'success');
}
- })
+ });
} else {
app.showToast('链接地址有误');
}
diff --git a/sourcecode/alipay/default/pages/plugins/membershiplevelvip/poster/poster.js b/sourcecode/alipay/default/pages/plugins/membershiplevelvip/poster/poster.js
index fe71bcf754c226fb87a60915230ff57ac5e996ac..864522f986d2cf34ab12094106a034d5955f6d97 100644
--- a/sourcecode/alipay/default/pages/plugins/membershiplevelvip/poster/poster.js
+++ b/sourcecode/alipay/default/pages/plugins/membershiplevelvip/poster/poster.js
@@ -114,7 +114,7 @@ Page({
success(res) {
app.showToast('复制成功', 'success');
}
- })
+ });
} else {
app.showToast('链接地址有误');
}
diff --git a/sourcecode/qq/default/app.json b/sourcecode/qq/default/app.json
index 0a49bfd34e54c8c6425a26d42fd05b861cfe1dab..2370c5996535bb1e6831deebacb47408048d5cca 100755
--- a/sourcecode/qq/default/app.json
+++ b/sourcecode/qq/default/app.json
@@ -41,7 +41,12 @@
"pages/plugins/wallet/user-cash-detail/user-cash-detail",
"pages/plugins/excellentbuyreturntocash/profit/profit",
"pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail",
- "pages/plugins/exchangerate/currency/currency"
+ "pages/plugins/exchangerate/currency/currency",
+ "pages/plugins/invoice/user/user",
+ "pages/plugins/invoice/invoice/invoice",
+ "pages/plugins/invoice/invoice-detail/invoice-detail",
+ "pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo",
+ "pages/plugins/invoice/order/order"
],
"window": {
"navigationBarTitleText": "{{application_title}}",
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.js b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
new file mode 100644
index 0000000000000000000000000000000000000000..7c67b53b5a254d25bebe2ea8cdca4c25f34c5bfc
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
@@ -0,0 +1,117 @@
+const app = getApp();
+Page({
+ data: {
+ params: null,
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ data_bottom_line_status: false,
+ detail: null,
+ detail_list: [],
+ express_data: [],
+ },
+
+ onLoad(params) {
+ //params['id'] = 1;
+ this.setData({ params: params });
+ this.init();
+ },
+
+ onShow() {},
+
+ init() {
+ var self = this;
+ qq.showLoading({ title: "加载中..." });
+ this.setData({
+ data_list_loding_status: 1
+ });
+
+ qq.request({
+ url: app.get_request_url("detail", "user", "invoice"),
+ method: "POST",
+ data: {
+ id: this.data.params.id
+ },
+ dataType: "json",
+ success: res => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ self.setData({
+ detail: data.data,
+ detail_list: [
+ { name: "业务类型", value: data.data.business_type_name || '' },
+ { name: "申请类型", value: data.data.apply_type_name || '' },
+ { name: "发票类型", value: data.data.invoice_type_name || '' },
+ { name: "发票金额", value: data.data.total_price || '' },
+ { name: "状态", value: data.data.status_name || '' },
+ { name: "发票内容", value: data.data.invoice_content || '' },
+ { name: "发票抬头", value: data.data.invoice_title || '' },
+ { name: "纳税识别号", value: data.data.invoice_code || '' },
+ { name: "企业开户行名称", value: data.data.invoice_bank || '' },
+ { name: "企业开户帐号", value: data.data.invoice_account || '' },
+ { name: "企业联系电话", value: data.data.invoice_tel || '' },
+ { name: "企业注册地址", value: data.data.invoice_address || '' },
+ { name: "收件人姓名", value: data.data.name || '' },
+ { name: "收件人电话", value: data.data.tel || '' },
+ { name: "收件人地址", value: data.data.address || '' },
+ { name: "电子邮箱", value: data.data.email || '' },
+ { name: "拒绝原因", value: data.data.refuse_reason || '' },
+ { name: "用户备注", value: data.data.user_note || '' },
+ { name: "创建时间", value: data.data.add_time || '' },
+ { name: "更新时间", value: data.data.upd_time || '' },
+ ],
+ express_data: [
+ { name: "快递名称", value: data.data.express_name || '' },
+ { name: "快递单号", value: data.data.express_number || '' },
+ ],
+
+ data_list_loding_status: 3,
+ data_bottom_line_status: true,
+ data_list_loding_msg: '',
+ });
+ } else {
+ self.setData({
+ data_list_loding_status: 2,
+ data_bottom_line_status: false,
+ data_list_loding_msg: res.data.msg,
+ });
+ if (app.is_login_check(res.data, self, 'init')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ self.setData({
+ data_list_loding_status: 2,
+ data_bottom_line_status: false,
+ data_list_loding_msg: '服务器请求出错',
+ });
+
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.init();
+ },
+
+ // 电子发票复制
+ electronic_invoice_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ if (value != null) {
+ qq.setClipboardData({
+ data: value,
+ success(res) {
+ app.showToast('复制成功', 'success');
+ }
+ });
+ } else {
+ app.showToast('链接地址有误');
+ }
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.json b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.json
new file mode 100644
index 0000000000000000000000000000000000000000..7e909a850070454f165399fc76f57969878d6d3a
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "发票详情"
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.qml b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.qml
new file mode 100644
index 0000000000000000000000000000000000000000..8321efaecbdc98d9fd616fc71da8de827630fdce
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.qml
@@ -0,0 +1,47 @@
+
+
+ 申请信息
+
+
+ {{item.name}}
+ {{item.value}}
+
+
+
+
+
+
+ 快递信息
+
+
+ {{item.name}}
+ {{item.value}}
+
+
+
+
+
+
+ 电子发票
+
+
+ {{item.title}}
+
+
+ 可点击发票名称复制后、到浏览器打开地址下载发票。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.qss b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.qss
new file mode 100644
index 0000000000000000000000000000000000000000..bf22478b7b3135f9d48ecb3d10faf449583087b2
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-detail/invoice-detail.qss
@@ -0,0 +1,27 @@
+.panel-item .panel-title {
+ background: #fff;
+ font-weight: bold;
+ padding: 15rpx;
+ border-bottom: 2px solid #eee;
+ font-size: 34rpx;
+}
+.panel-item .panel-content .item {
+ padding: 20rpx 0;
+}
+.panel-item .panel-content .item:last-child {
+ border: 0;
+}
+.panel-item .panel-content .item .title {
+ width: 25%;
+ padding-left: 20rpx;
+}
+.panel-item .panel-content .item .content {
+ width: calc(75% - 50rpx);
+ padding-left: 20rpx;
+ min-height: 46rpx;
+ word-wrap: break-word;
+ word-break: normal;
+}
+.panel-item .panel-content .item view {
+ line-height: 46rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
new file mode 100644
index 0000000000000000000000000000000000000000..744eb6435959ed98c930b6ef640b5be69ff032ac
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
@@ -0,0 +1,280 @@
+const app = getApp();
+Page({
+ data: {
+ params: null,
+ 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: null,
+
+ form_invoice_type_index: 0,
+ form_apply_type_index: 0,
+ form_invoice_content_index: 0,
+ form_apply_type_disabled: false,
+ company_container: false,
+ company_special_container: false,
+ addressee_container: false,
+ email_container: true,
+ },
+
+ onLoad(params) {
+ this.setData({ params: params });
+ this.init();
+ },
+
+ onShow() {},
+
+ init() {
+ var self = this;
+ qq.showLoading({ title: "加载中..." });
+ this.setData({
+ data_list_loding_status: 1
+ });
+
+ qq.request({
+ url: app.get_request_url("saveinfo", "user", "invoice"),
+ method: "POST",
+ data: this.data.params,
+ dataType: "json",
+ success: res => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ self.setData({
+ 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: ((data.data || null) == null || data.data.length == 0) ? null : data.data,
+ data_list_loding_status: 0,
+ data_bottom_line_status: true,
+ data_list_loding_msg: (data.save_base_data.total_price <= 0) ? '发票金额必须大于0' : '',
+ });
+
+ // 数据容器处理
+ this.invoice_container_handle();
+ } else {
+ self.setData({
+ data_list_loding_status: 2,
+ data_bottom_line_status: false,
+ data_list_loding_msg: res.data.msg,
+ });
+ if (app.is_login_check(res.data, self, 'init')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ self.setData({
+ data_list_loding_status: 2,
+ data_bottom_line_status: false,
+ data_list_loding_msg: '服务器请求出错',
+ });
+
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.init();
+ },
+
+ // 发票类型事件
+ 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.data.can_invoice_type_list[this.data.form_invoice_type_index]['id'];
+ if(invoice_type == 2)
+ {
+ // 选择专票的时候申请类型必须是企业
+ 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;
+ }
+
+ // 增值税专业纸质发票情况下个人类型处理
+ if(invoice_type != 2)
+ {
+ var apply_type = this.data.apply_type_list[this.data.form_apply_type_index]['id'];
+ if(apply_type == 0)
+ {
+ this.setData({
+ company_container: false,
+ });
+ } else {
+ this.setData({
+ company_container: true,
+ });
+ }
+ }
+ },
+
+ // 表单提交
+ formSubmit(e)
+ {
+ var data = e.detail.value;
+ if((this.data.data || null) == null)
+ {
+ data['ids'] = this.data.params.ids || '';
+ data['type'] = this.data.params.type || '';
+ } else {
+ data['id'] = this.data.data.id;
+ }
+
+ // 数据验证
+ var validation = [
+ {fields: 'invoice_type', msg: '请选择发票类型', is_can_zero: 1},
+ {fields: 'apply_type', msg: '请选择申请类型', is_can_zero: 1},
+ {fields: 'invoice_title', msg: '请填写发票抬头、最多200个字符'}
+ ];
+ if(app.fields_check(data, validation))
+ {
+ var invoice_type = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id'];
+ var apply_type = this.data.apply_type_list[this.data.form_apply_type_index]['id'];
+ if(apply_type == 1)
+ {
+ validation.push({fields: 'invoice_code', msg: '请填写企业统一社会信用代码或纳税识别号、最多160个字符'});
+ }
+ if(invoice_type == 2)
+ {
+ validation.push({fields: 'invoice_bank', msg: '请填写企业开户行名称、最多200个字符'});
+ validation.push({fields: 'invoice_account', msg: '请填写企业开户帐号、最多160个字符'});
+ validation.push({fields: 'invoice_tel', msg: '请填写企业联系电话 6~15 个字符'});
+ validation.push({fields: 'invoice_address', msg: '请填写企业注册地址、最多230个字符'});
+ }
+ if(invoice_type != 0)
+ {
+ validation.push({fields: 'name', msg: '请填写收件人姓名格式 2~30 个字符之间'});
+ validation.push({fields: 'tel', msg: '请填写收件人电话 6~15 个字符'});
+ validation.push({fields: 'address', msg: '请填写收件人地址、最多230个字符'});
+ }
+ if(app.fields_check(data, validation))
+ {
+ // 发票类型
+ data['invoice_type'] = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id'];
+
+ // 发票内容
+ if(this.data.invoice_content_list.length > 0 && this.data.invoice_content_list[this.data.form_invoice_content_index] != undefined)
+ {
+ data['invoice_content'] = this.data.invoice_content_list[this.data.form_invoice_content_index];
+ }
+
+ qq.showLoading({title: '提交中...'});
+ this.setData({form_submit_loading: true});
+
+ // 网络请求
+ var self = this;
+ qq.request({
+ url: app.get_request_url("save", "user", "invoice"),
+ method: 'POST',
+ data: data,
+ dataType: 'json',
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: (res) => {
+ qq.hideLoading();
+
+ if(res.data.code == 0)
+ {
+ app.showToast(res.data.msg, "success");
+ setTimeout(function()
+ {
+ // 是否关闭页面进入我的发票、适合从订单开票中过来提交成功直接进入我的发票列表
+ if((self.data.params || null) != null && (self.data.params.is_redirect || 0) == 1)
+ {
+ qq.redirectTo({
+ url: "/pages/plugins/invoice/invoice/invoice"
+ });
+ } else {
+ qq.navigateBack();
+ }
+ }, 2000);
+ } else {
+ this.setData({form_submit_loading: false});
+ if (app.is_login_check(res.data)) {
+ app.showToast(res.data.msg);
+ } else {
+ app.showToast('提交失败,请重试!');
+ }
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ this.setData({form_submit_loading: false});
+ app.showToast('服务器请求出错');
+ }
+ });
+ }
+ }
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
new file mode 100644
index 0000000000000000000000000000000000000000..2f2feff85b0921496724448db8d458d506a83f60
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "开票"
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.qml b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.qml
new file mode 100644
index 0000000000000000000000000000000000000000..e26e4c7465ae671db005553afe126b46dfb44e40
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.qml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.qss b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.qss
new file mode 100644
index 0000000000000000000000000000000000000000..3122fa5c277d411f687b5c562ee3a191cc8cdbc5
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.qss
@@ -0,0 +1,7 @@
+.content-top {
+ padding: 30rpx 10rpx;
+}
+.content-top text {
+ font-size: 38rpx;
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.js b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.js
new file mode 100644
index 0000000000000000000000000000000000000000..1d33ad710fa63e77f735445e12c7380dd4b91189
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.js
@@ -0,0 +1,230 @@
+const app = getApp();
+Page({
+ data: {
+ data_base: null,
+ data_list: [],
+ data_page_total: 0,
+ data_page: 1,
+ data_list_loding_status: 1,
+ data_bottom_line_status: false,
+ params: null,
+ nav_status_list: [
+ { name: "全部", value: "-1" },
+ { name: "待审核", value: "0" },
+ { name: "待开票", value: "1" },
+ { name: "已开票", value: "2" },
+ { name: "已拒绝", value: "3" },
+ ],
+ nav_status_index: 0,
+ },
+
+ onLoad(params) {
+ // 是否指定状态
+ var nav_status_index = 0;
+ if ((params.status || null) != null) {
+ for (var i in this.data.nav_status_list) {
+ if (this.data.nav_status_list[i]['value'] == params.status) {
+ nav_status_index = i;
+ break;
+ }
+ }
+ }
+
+ this.setData({
+ params: params,
+ nav_status_index: nav_status_index,
+ });
+ },
+
+ onShow() {
+ this.init();
+ },
+
+ init() {
+ var user = app.get_user_info(this, 'init');
+ if (user != false) {
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ qq.redirectTo({
+ url: "/pages/login/login?event_callback=init"
+ });
+ return false;
+ } else {
+ // 获取数据
+ 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.data_bottom_line_status == true) {
+ return false;
+ }
+ }
+
+ // 加载loding
+ qq.showLoading({ title: "加载中..." });
+ this.setData({
+ data_list_loding_status: 1
+ });
+
+ // 请求数据
+ var data = {
+ page: this.data.data_page
+ };
+
+ // 参数
+ var status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
+ if(status != -1)
+ {
+ data['status'] = status;
+ }
+
+ // 获取数据
+ qq.request({
+ url: app.get_request_url("index", "user", "invoice"),
+ method: "POST",
+ data: data,
+ dataType: "json",
+ success: res => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ if (res.data.data.data.length > 0) {
+ if (this.data.data_page <= 1) {
+ var temp_data_list = res.data.data.data;
+ } else {
+ var temp_data_list = this.data.data_list;
+ var temp_data = res.data.data.data;
+ 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.data_page + 1,
+ });
+
+ // 是否还有数据
+ if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
+ this.setData({ data_bottom_line_status: true });
+ } else {
+ this.setData({ data_bottom_line_status: false });
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ data_list: [],
+ data_bottom_line_status: false,
+ });
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ });
+ if (app.is_login_check(res.data, this, 'get_data_list')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+
+ this.setData({
+ data_list_loding_status: 2,
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.setData({
+ data_page: 1
+ });
+ this.get_data_list(1);
+ },
+
+ // 滚动加载
+ scroll_lower(e) {
+ this.get_data_list();
+ },
+
+ // 导航事件
+ nav_event(e) {
+ this.setData({
+ nav_status_index: e.currentTarget.dataset.index || 0,
+ data_page: 1,
+ });
+ this.get_data_list(1);
+ },
+
+ // 编辑事件
+ edit_event(e) {
+ qq.navigateTo({
+ url: '/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?id='+e.currentTarget.dataset.value,
+ });
+ },
+
+ // 删除
+ delete_event(e) {
+ qq.showModal({
+ title: "温馨提示",
+ content: "删除后不可恢复,确定继续吗?",
+ confirmText: "确认",
+ cancelText: "不了",
+ success: result => {
+ if (result.confirm) {
+ // 参数
+ var value = e.currentTarget.dataset.value;
+ var index = e.currentTarget.dataset.index;
+
+ // 加载loding
+ qq.showLoading({ title: "处理中..." });
+
+ qq.request({
+ url: app.get_request_url("delete", "user", "invoice"),
+ method: "POST",
+ data: { ids: value },
+ dataType: "json",
+ success: res => {
+ qq.hideLoading();
+ if (res.data.code == 0) {
+ var temp_data_list = this.data.data_list;
+ temp_data_list.splice(index, 1);
+ this.setData({ data_list: temp_data_list });
+ if (temp_data_list.length == 0) {
+ this.setData({
+ data_list_loding_status: 0,
+ data_bottom_line_status: false,
+ });
+ }
+ app.showToast(res.data.msg, "success");
+ } else {
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ app.showToast("服务器请求出错");
+ }
+ });
+ }
+ }
+ });
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.json b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.json
new file mode 100644
index 0000000000000000000000000000000000000000..557e8cfc0757b6ba2482e5f797e2c963b914f641
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "我的发票"
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.qml b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.qml
new file mode 100644
index 0000000000000000000000000000000000000000..23cb2cd78f9ae90834ad4b2de72a5154245689cf
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.qml
@@ -0,0 +1,56 @@
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ {{item.add_time}}
+ {{item.status_name}}
+
+
+
+
+ 业务类型
+ {{item.business_type_name}}
+
+
+ 申请类型
+ {{item.apply_type_name}}
+
+
+ 发票类型
+ {{item.invoice_type_name}}
+
+
+ 发票金额
+ {{item.total_price}}
+ 元
+
+
+ 发票抬头
+ {{item.invoice_title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.qss b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.qss
new file mode 100644
index 0000000000000000000000000000000000000000..a282c04c71eac3fcbb709099f053b03efe86ca7e
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/invoice/invoice.qss
@@ -0,0 +1,47 @@
+/*
+ * 导航
+ */
+ .nav {
+ background: #eee;
+ height: 80rpx;
+ line-height: 80rpx;
+}
+.nav .item {
+ width: 20%;
+}
+.nav .active {
+ color: #d2364c;
+}
+
+/*
+ * 列表
+ */
+.scroll-box {
+ height: calc(100vh - 80rpx);
+}
+.data-list .item .base,
+.data-list .item .content {
+ padding: 20rpx 10rpx;
+}
+.data-list .item .content .multi-text {
+ line-height: 50rpx;
+}
+.data-list .item .content .multi-text .title {
+ margin-right: 30rpx;
+}
+.data-list .item .content .multi-text .value {
+ font-weight: 500;
+}
+.data-list .item .content .multi-text .unit {
+ margin-left: 10rpx;
+}
+.data-list .item .operation {
+ padding: 20rpx 10rpx;
+}
+.data-list .item .operation button:not(:first-child) {
+ margin-left: 30rpx;
+}
+.data-list .item .submit-delete {
+ border: 1px solid #dc7f7f;
+ color: #dc7f7f !important;
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/order/order.js b/sourcecode/qq/default/pages/plugins/invoice/order/order.js
new file mode 100644
index 0000000000000000000000000000000000000000..b7149de46122622d5a038e110dc74a2b7ccfd13f
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/order/order.js
@@ -0,0 +1,166 @@
+const app = getApp();
+Page({
+ data: {
+ data_base: null,
+ data_list: [],
+ data_page_total: 0,
+ data_page: 1,
+ data_list_loding_status: 1,
+ data_bottom_line_status: false,
+ params: null,
+ select_ids: [],
+ },
+
+ onLoad(params) {
+ this.setData({
+ params: params,
+ });
+ },
+
+ onShow() {
+ this.init();
+ },
+
+ init() {
+ var user = app.get_user_info(this, 'init');
+ if (user != false) {
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ qq.redirectTo({
+ url: "/pages/login/login?event_callback=init"
+ });
+ return false;
+ } else {
+ // 获取数据
+ 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.data_bottom_line_status == true) {
+ return false;
+ }
+ }
+
+ // 加载loding
+ qq.showLoading({ title: "加载中..." });
+ this.setData({
+ data_list_loding_status: 1
+ });
+
+ // 请求数据
+ var data = {
+ page: this.data.data_page
+ };
+
+ // 获取数据
+ qq.request({
+ url: app.get_request_url("index", "order", "invoice"),
+ method: "POST",
+ data: data,
+ dataType: "json",
+ success: res => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ if (res.data.data.data.length > 0) {
+ if (this.data.data_page <= 1) {
+ var temp_data_list = res.data.data.data;
+ } else {
+ var temp_data_list = this.data.data_list;
+ var temp_data = res.data.data.data;
+ 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.data_page + 1,
+ });
+
+ // 是否还有数据
+ if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
+ this.setData({ data_bottom_line_status: true });
+ } else {
+ this.setData({ data_bottom_line_status: false });
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ data_list: [],
+ data_bottom_line_status: false,
+ });
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ });
+ if (app.is_login_check(res.data, this, 'get_data_list')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+
+ this.setData({
+ data_list_loding_status: 2,
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.setData({
+ data_page: 1
+ });
+ this.get_data_list(1);
+ },
+
+ // 滚动加载
+ scroll_lower(e) {
+ this.get_data_list();
+ },
+
+ // 选择
+ selected_event(e) {
+ var value = e.currentTarget.dataset.value;
+ var temp_select_ids = this.data.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_merge_event(e) {
+ if(this.data.select_ids.length <= 0)
+ {
+ app.showToast('请先选择数据');
+ return false;
+ }
+ qq.navigateTo({
+ url: '/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids='+this.data.select_ids.join(',')+'&type=order&is_redirect=1',
+ });
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/order/order.json b/sourcecode/qq/default/pages/plugins/invoice/order/order.json
new file mode 100644
index 0000000000000000000000000000000000000000..f2c1b95c8f2a1ca0d7c4e42315f5e1ed71b541f5
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/order/order.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "订单开票"
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/order/order.qml b/sourcecode/qq/default/pages/plugins/invoice/order/order.qml
new file mode 100644
index 0000000000000000000000000000000000000000..bc0fe5cb03b504afd0abb43dda1c4d5d27aee78c
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/order/order.qml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+ {{item.add_time}}
+
+
+
+
+ 订单编号
+ {{item.order_no}}
+
+
+ 订单总价
+ {{item.total_price}}
+ 元
+
+
+ 支付金额
+ {{item.pay_price}}
+ 元
+
+
+ 订单单价
+ {{item.price}}
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/order/order.qss b/sourcecode/qq/default/pages/plugins/invoice/order/order.qss
new file mode 100644
index 0000000000000000000000000000000000000000..003737d6fda927eb73621f633f1df9c3b64c85d4
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/order/order.qss
@@ -0,0 +1,43 @@
+/*
+ * 列表
+ */
+.data-list .item .base,
+.data-list .item .content {
+ padding: 20rpx 10rpx;
+}
+.data-list .item .content .multi-text {
+ line-height: 50rpx;
+}
+.data-list .item .content .multi-text .title {
+ margin-right: 30rpx;
+}
+.data-list .item .content .multi-text .value {
+ font-weight: 500;
+}
+.data-list .item .content .multi-text .unit {
+ margin-left: 10rpx;
+}
+.data-list .item .operation {
+ padding: 20rpx 10rpx;
+}
+.data-list .item .operation button:not(:first-child) {
+ margin-left: 30rpx;
+}
+
+/*
+ * 选择
+ */
+ .selected .icon {
+ width: 40rpx;
+ height: 40rpx !important;
+ margin-left: 10rpx;
+ margin-right: 20rpx;
+ vertical-align: middle;
+}
+ .invoice-merge-submit {
+ width: 220rpx;
+ height: 70rpx !important;
+ line-height: 35rpx !important;
+ left: calc(50% - 110rpx);
+ bottom: 50rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/user/user.js b/sourcecode/qq/default/pages/plugins/invoice/user/user.js
new file mode 100644
index 0000000000000000000000000000000000000000..c1650077a8c1ebd6ea4d6e973265bdef400c64bf
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/user/user.js
@@ -0,0 +1,99 @@
+const app = getApp();
+Page({
+ data: {
+ data_bottom_line_status: false,
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ data_base: null,
+ nav_list: [
+ {
+ icon: "/images/plugins/invoice/user-center-invoice-icon.png",
+ title: "我的发票",
+ url: "/pages/plugins/invoice/invoice/invoice",
+ },
+ {
+ icon: "/images/plugins/invoice/user-center-order-icon.png",
+ title: "订单开票",
+ url: "/pages/plugins/invoice/order/order",
+ }
+ ],
+ },
+
+ onLoad(params) {},
+
+ onShow() {
+ this.init();
+ },
+
+ init(e) {
+ var user = app.get_user_info(this, "init"),
+ self = this;
+ if (user != false) {
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ qq.showModal({
+ title: '温馨提示',
+ content: '绑定手机号码',
+ confirmText: '确认',
+ cancelText: '暂不',
+ success: (result) => {
+ qq.stopPullDownRefresh();
+ if (result.confirm) {
+ qq.navigateTo({
+ url: "/pages/login/login?event_callback=init"
+ });
+ }
+ },
+ });
+ } else {
+ self.get_data();
+ }
+ }
+ },
+
+ // 获取数据
+ get_data() {
+ var self = this;
+ qq.request({
+ url: app.get_request_url("center", "user", "invoice"),
+ method: "POST",
+ data: {},
+ dataType: "json",
+ success: res => {
+ qq.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ self.setData({
+ data_base: data.base || null,
+ data_list_loding_msg: '',
+ data_list_loding_status: 0,
+ data_bottom_line_status: false,
+ });
+ } else {
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: res.data.msg,
+ });
+ if (app.is_login_check(res.data, self, 'get_data')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ qq.stopPullDownRefresh();
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: '服务器请求出错',
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.get_data();
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/user/user.json b/sourcecode/qq/default/pages/plugins/invoice/user/user.json
new file mode 100644
index 0000000000000000000000000000000000000000..557e8cfc0757b6ba2482e5f797e2c963b914f641
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/user/user.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "我的发票"
+}
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/user/user.qml b/sourcecode/qq/default/pages/plugins/invoice/user/user.qml
new file mode 100644
index 0000000000000000000000000000000000000000..fa00d4682314e437a93d169534586222839aa572
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/user/user.qml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
+ {{item}}
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/default/pages/plugins/invoice/user/user.qss b/sourcecode/qq/default/pages/plugins/invoice/user/user.qss
new file mode 100644
index 0000000000000000000000000000000000000000..c3245db62293b3ddc9946c1aff5ebb8c3cc39980
--- /dev/null
+++ b/sourcecode/qq/default/pages/plugins/invoice/user/user.qss
@@ -0,0 +1,29 @@
+/*
+ * 导航
+ */
+.nav {
+ border-top: 1px solid #eee;
+}
+.nav .item {
+ padding: 30rpx 0;
+ width: calc(50% - 1px);
+ border-bottom: 1px solid #eee;
+}
+.nav .item:nth-child(odd) {
+ border-right: 1px solid #eee;
+}
+.nav .item image {
+ width: 100rpx;
+ height: 100rpx;
+ margin: 0 auto;
+}
+.nav .item .title {
+ margin-top: 20rpx;
+}
+
+/*
+ * 提示信息
+ */
+.tips-container {
+ padding: 0 10rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
index c54bb99ddd4a0342d9b6b403a711d953834357bb..1b7bfd5082f61a26eb3c3af46ea77ccdc9c85a24 100644
--- a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
+++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
@@ -256,7 +256,7 @@ Page({
url: "/pages/plugins/invoice/invoice/invoice"
});
} else {
- tt:tt.navigateBack();
+ tt.navigateBack();
}
}, 2000);
} else {
diff --git a/sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js b/sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
index 1c69c6e02945001c796a84b54cfafac5dbb3e84c..9f561a50723d1b01b15ef8c96bcd9d20bccfafb1 100644
--- a/sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
+++ b/sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
@@ -256,7 +256,7 @@ Page({
url: "/pages/plugins/invoice/invoice/invoice"
});
} else {
- wx:wx.navigateBack();
+ wx.navigateBack();
}
}, 2000);
} else {