diff --git a/app.json b/app.json
index 466c04f..3fdba94 100644
--- a/app.json
+++ b/app.json
@@ -16,7 +16,7 @@
"pages/mine/mineAccount/mineContact/mineContact",
"pages/treaty/rule/rule",
"pages/mine/mineAccount/minePayRecord/minePayRecord",
- "pages/mine/mineAccount/mineInvoice/mineInvoice",
+ "pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage",
"pages/mine/mineAccount/invoiceInfo/invoiceInfo",
"pages/mine/mineAccount/makeInvoice/makeInvoice",
"pages/mine/mineAccount/invoiceOrder/invoiceOrder",
diff --git a/components/down-progress/down-progress.js b/components/down-progress/down-progress.js
index 47d6ae1..995d72d 100644
--- a/components/down-progress/down-progress.js
+++ b/components/down-progress/down-progress.js
@@ -21,7 +21,7 @@ Component({
* 组件的初始数据
*/
data: {
- progress: 0
+ progressNum: 0
},
/**
diff --git a/components/down-progress/down-progress.wxml b/components/down-progress/down-progress.wxml
index 0f6bb8c..89fcc48 100644
--- a/components/down-progress/down-progress.wxml
+++ b/components/down-progress/down-progress.wxml
@@ -2,6 +2,6 @@
\ No newline at end of file
diff --git a/pages/copyright/applyRefund/applyRefund.js b/pages/copyright/applyRefund/applyRefund.js
index dc67264..ca84382 100644
--- a/pages/copyright/applyRefund/applyRefund.js
+++ b/pages/copyright/applyRefund/applyRefund.js
@@ -299,7 +299,9 @@ Page({
const _self = this
let pages = getCurrentPages();
let beforePage = pages[pages.length - 2];
- beforePage.doRefreshList()
+ beforePage.setData({
+ needRefresh: true
+ })
wx.navigateBack()
}
})
\ No newline at end of file
diff --git a/pages/copyright/applyRepair/applyRepair.js b/pages/copyright/applyRepair/applyRepair.js
index 46abd67..d46b33f 100644
--- a/pages/copyright/applyRepair/applyRepair.js
+++ b/pages/copyright/applyRepair/applyRepair.js
@@ -309,7 +309,9 @@ Page({
const _self = this
let pages = getCurrentPages();
let beforePage = pages[pages.length - 2];
- beforePage.doRefreshList()
+ beforePage.setData({
+ needRefresh: true
+ })
wx.navigateBack()
}
})
\ No newline at end of file
diff --git a/pages/copyright/refund/refund.js b/pages/copyright/refund/refund.js
index a5ec6ee..aae9866 100644
--- a/pages/copyright/refund/refund.js
+++ b/pages/copyright/refund/refund.js
@@ -36,7 +36,8 @@ Page({
text: '关闭'
}],
tempItem: null,
- isShowOptions: false
+ isShowOptions: false,
+ needRefresh: false, //是否需要刷新
},
/**
@@ -56,6 +57,15 @@ Page({
})
this.getRefundList(true)
},
+ onShow() {
+ const _self = this
+ if (_self.data.needRefresh) {
+ _self.setData({
+ needRefresh: false
+ })
+ _self.doRefreshList()
+ }
+ },
chooseOptions() {
this.setData({
isShowOptions: !this.data.isShowOptions,
diff --git a/pages/copyright/repair/repair.js b/pages/copyright/repair/repair.js
index 7360f97..e70ff20 100644
--- a/pages/copyright/repair/repair.js
+++ b/pages/copyright/repair/repair.js
@@ -56,7 +56,8 @@ Page({
tempDownloadPro: null, //下载的item
approveReason: '', //补正原因
isShowOptions: false,
- curOptions: 'state'
+ curOptions: 'state',
+ needRefresh: false, //是否需要刷新
},
/**
@@ -76,6 +77,15 @@ Page({
})
this.doRefreshList()
},
+ onShow() {
+ const _self = this
+ if (_self.data.needRefresh) {
+ _self.setData({
+ needRefresh: false
+ })
+ _self.doRefreshList()
+ }
+ },
chooseLeft(e) {
this.setData({
curOptions: e.currentTarget.dataset.value
diff --git a/pages/index/index.js b/pages/index/index.js
index c75a289..96fab3e 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -83,7 +83,7 @@ Page({
isLoadMore: false, //是否正在加载更多中
hasMore: true, //是否有更多数据
showAd: false, //显示优惠卷广告
- tempCoupons: null, //优惠卷
+ tempCoupons: [], //优惠卷
isNoShowToday: false, //今日不再显示
tabList: [{
"pagePath": "pages/index/index",
@@ -129,7 +129,7 @@ Page({
menuRight: rect.width + 5
})
//获取消息通知
- this.getMsgNotice()
+ // this.getMsgNotice()
},
//消息通知
getMsgNotice() {
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 55859df..e3b7d9a 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -114,7 +114,7 @@
项目预览链接
- {{sysPreviewUrl}}
+ {{sysPreviewUrl}}
diff --git a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
index a6b3e44..5a33837 100644
--- a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
+++ b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
@@ -1,4 +1,5 @@
// pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
+//可以开具发票的充值订单列表页面
import InvoiceApi from '../../../../net/api/invoiceApi'
const app = getApp()
Page({
@@ -161,14 +162,4 @@ Page({
})
}
},
- show(e) {
-
- },
- hide(e) {
-
- },
- slideButtonTap(e) {
- const item = e.currentTarget.dataset.value
- const btn = e.detail.index
- }
})
\ No newline at end of file
diff --git a/pages/mine/mineAccount/makeInvoice/makeInvoice.js b/pages/mine/mineAccount/makeInvoice/makeInvoice.js
index e5a7258..bc8ed14 100644
--- a/pages/mine/mineAccount/makeInvoice/makeInvoice.js
+++ b/pages/mine/mineAccount/makeInvoice/makeInvoice.js
@@ -220,7 +220,7 @@ Page({
})
setTimeout(() => {
_self.backPageRefresh()
- }, 1800);
+ }, 1000);
} else {
this.setData({
msgType: 'error',
@@ -277,10 +277,10 @@ Page({
},
//提交
confirmSubmit() {
- if (this.data.bean != null && this.data.bean.invoiceRechargeId != '') {
- this.doSaveInfo()
- } else {
+ if (this.data.editBean != null && this.data.editBean.invoiceRechargeId != '') {
this.doEditInfo()
+ } else {
+ this.doSaveInfo()
}
},
//编辑
@@ -303,7 +303,7 @@ Page({
})
setTimeout(() => {
_self.backPageRefresh()
- }, 1800);
+ }, 1000);
} else {
this.setData({
msgType: 'error',
@@ -326,7 +326,9 @@ Page({
const _self = this
let pages = getCurrentPages();
let beforePage = pages[pages.length - 2];
- beforePage.doRefreshList()
+ beforePage.setData({
+ needRefresh: true
+ })
wx.navigateBack()
},
closeDialog(e) {
diff --git a/pages/mine/mineAccount/mineInvoice/mineInvoice.js b/pages/mine/mineAccount/mineInvoice/mineInvoice.js
index 232f388..06b7939 100644
--- a/pages/mine/mineAccount/mineInvoice/mineInvoice.js
+++ b/pages/mine/mineAccount/mineInvoice/mineInvoice.js
@@ -1,227 +1,66 @@
// pages/mine/mineAccount/mineInvoice/mineInvoice.js
-// 发票管理首页
-import InvoiceApi from '../../../../net/api/invoiceApi'
-const app = getApp()
Page({
- /**
- * 页面的初始数据
- */
- data: {
- keywords: '',
- pageData: {
- page: 1,
- rows: 10,
- keywords: ''
- },
- msgShow: false,
- msgHint: '',
- msgType: 'error',
- loadingState: 'loading',
- listRefreshTrig: false,
- isLoadMore: false,
- hasMore: true,
- recordList: [], //开票记录
- slideBtns: [{
- text: '删除',
- src: app.globalData.localAssets + "/ic_delete_red.png" // icon的路径
- }]
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- wx.setNavigationBarTitle({
- title: '发票管理',
- })
- wx.setNavigationBarColor({
- frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000
- backgroundColor: '#F0F0F0', // 传递的颜色值,仅支持十六进制颜色
- animation: { // 可选项
- duration: 500,
- timingFunc: 'easeIn'
- }
- })
- this.doRefreshList()
- },
- openInvoiceInfo() {
- wx.navigateTo({
- url: '/pages/mine/mineAccount/invoiceInfo/invoiceInfo',
- })
- },
- inputKeywords(e) {
- this.setData({
- keywords: e.detail.value
- })
- },
- //清除搜索内容
- clearSearch() {
- const _self = this
- _self.setData({
- keywords: ''
- })
- _self.doRefreshList()
- },
- //发起搜索
- doSearchKeyWord() {
- const _self = this
- _self.doRefreshList()
- },
- doRefreshList() {
- console.log('正在刷新...')
- const _self = this
- _self.setData({
- listRefreshTrig: true,
- loadingState: 'loading',
- hasMore: true,
- 'pageData.page': 1,
- 'pageData.keywords': _self.data.keywords,
- isLoadMore: false
- })
- _self.doGetInvoiceRecordList(true)
- },
- doLoadMore() {
- //判断是否正在加载中 与是否存在更多数据
- const _self = this
- if (_self.data.isLoadMore || !_self.data.hasMore) {
- return
- }
- _self.setData({
- isLoadMore: true,
- 'pageData.page': ++_self.data.pageData.page,
- 'pageData.keywords': _self.data.keywords
- })
- _self.doGetInvoiceRecordList(false)
- },
- doGetInvoiceRecordList(isRefresh) {
- const _self = this
- _self.setData({
- recordList: isRefresh ? [] : _self.data.recordList,
- loadingState: isRefresh ? 'loading' : ''
- })
- InvoiceApi.doGetInvoiceRecordList(_self.data.pageData)
- .then(res => {
- console.log(res)
- var status = 'success'
- status = res.rows && res.rows.length > 0 ? 'success' : 'empty'
- _self.setData({
- loadingState: isRefresh ? status : '',
- recordList: _self.data.recordList.concat(res.rows),
- listRefreshTrig: false,
- isLoadMore: false
- })
- _self.setData({
- hasMore: _self.data.recordList.length < res.total
- })
- }, err => {
- _self.setData({
- loadingState: 'error',
- listRefreshTrig: false,
- isLoadMore: false,
- hasMore: true
- })
- })
- },
- //跳转可以开具发票订单列表
- openMake() {
- wx.navigateTo({
- url: '/pages/mine/mineAccount/invoiceOrder/invoiceOrder',
- })
- },
- //取消开票
- cancelRecord(e) {
- const item = e.currentTarget.dataset.value
- const _self = this
- wx.showModal({
- title: '警告',
- content: '请问您是否真的想要取消此次开票操作?',
- complete: (res) => {
- if (res.confirm) {
- _self.doCancelInvoiceRecord(item)
- }
- }
- })
- },
- //取消开票
- doCancelInvoiceRecord(item) {
- const _self = this
- wx.showLoading({
- title: '取消中...',
- })
- InvoiceApi.doCancelInvoiceRecord(item.invoiceRechargeId)
- .then(res => {
- wx.hideLoading()
- console.log(res)
- _self.setData({
- msgHint: '取消成功',
- msgType: 'success',
- msgShow: true
- })
- _self.doRefreshList()
- })
- .catch(err => {
- wx.hideLoading()
- _self.setData({
- msgHint: err.msg ? err.msg : '取消出错了,请稍后重试',
- msgShow: true,
- msgType: 'error'
- })
- })
- },
- //去修改
- doUpdate(e) {
- const item = e.currentTarget.dataset.value
- const params = JSON.stringify(item)
- const _self = this
- wx.navigateTo({
- url: '/pages/mine/mineAccount/makeInvoice/makeInvoice?bean=' + params,
- events: {
- refreshData: function (data) {
- console.log('刷新')
- _self.doRefreshList()
- }
- }
- })
- },
- openDetail(e) {
- const item = e.currentTarget.dataset.value
- const params = JSON.stringify(item)
- wx.navigateTo({
- url: '/pages/mine/mineAccount/invoiceRecordDetail/invoiceRecordDetail?bean=' + params,
- })
- },
- slideButtonTap(e) {
- const item = e.currentTarget.dataset.value
- const btn = e.detail.index
- console.log(item)
- if (btn == 0) {
- //删除,先判断状态 用户取消-1,开票失败:0,开票中:1,开票完成:2
- if (item.invoiceStatus != '1') {
- this.showDelDialog(item)
- } else {
- this.setData({
- msgHint: '当前发票处于开具流程中,暂不支持删除',
- msgType: 'error',
- msgShow: true
- })
- }
- }
- },
- showDelDialog(item) {
- const _self = this
- wx.showModal({
- title: '警告',
- content: '该开票记录删除后不可恢复,是否确认执行删除操作?请谨慎抉择',
- complete: (res) => {
- if (res.confirm) {
- _self.doDelRecord(item)
- }
- }
- })
- },
- //删除记录
- doDelRecord(item) {
-
- }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
})
\ No newline at end of file
diff --git a/pages/mine/mineAccount/mineInvoice/mineInvoice.wxml b/pages/mine/mineAccount/mineInvoice/mineInvoice.wxml
index 6e79b37..eb7bcb1 100644
--- a/pages/mine/mineAccount/mineInvoice/mineInvoice.wxml
+++ b/pages/mine/mineAccount/mineInvoice/mineInvoice.wxml
@@ -1,45 +1,2 @@
-
-
-
-
-
-
- 开票信息
-
-
-
-
-
-
-
-
-
- {{tools.invoiceStatus(item.invoiceStatus)}}
- {{item.invoiceName}}
-
- 修改
- 取消
-
-
- 纳税人识别号: {{item.invoiceNumber}}
-
- {{item.gmtCreate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+pages/mine/mineAccount/mineInvoice/mineInvoice.wxml
\ No newline at end of file
diff --git a/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.js b/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.js
new file mode 100644
index 0000000..0c24575
--- /dev/null
+++ b/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.js
@@ -0,0 +1,226 @@
+// 发票管理首页
+import InvoiceApi from '../../../../net/api/invoiceApi'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ keywords: '',
+ pageData: {
+ page: 1,
+ rows: 10,
+ keywords: ''
+ },
+ msgShow: false,
+ msgHint: '',
+ msgType: 'error',
+ loadingState: 'loading',
+ listRefreshTrig: false,
+ isLoadMore: false,
+ hasMore: true,
+ recordList: [], //开票记录
+ needRefresh: false,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ wx.setNavigationBarTitle({
+ title: '发票管理',
+ })
+ wx.setNavigationBarColor({
+ frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000
+ backgroundColor: '#F0F0F0', // 传递的颜色值,仅支持十六进制颜色
+ animation: { // 可选项
+ duration: 500,
+ timingFunc: 'easeIn'
+ }
+ })
+ this.doRefreshList()
+ },
+ onShow() {
+ const _self = this
+ console.log('是否需要刷新', _self.data.needRefresh)
+ if (_self.data.needRefresh) {
+ _self.setData({
+ needRefresh: false
+ })
+ _self.doRefreshList()
+ }
+ },
+ openInvoiceInfo() {
+ wx.navigateTo({
+ url: '/pages/mine/mineAccount/invoiceInfo/invoiceInfo',
+ })
+ },
+ inputKeywords(e) {
+ this.setData({
+ keywords: e.detail.value
+ })
+ },
+ //清除搜索内容
+ clearSearch() {
+ const _self = this
+ _self.setData({
+ keywords: ''
+ })
+ _self.doRefreshList()
+ },
+ //发起搜索
+ doSearchKeyWord() {
+ const _self = this
+ _self.doRefreshList()
+ },
+ doRefreshList() {
+ console.log('正在刷新...')
+ const _self = this
+ _self.setData({
+ listRefreshTrig: true,
+ loadingState: 'loading',
+ hasMore: true,
+ 'pageData.page': 1,
+ 'pageData.keywords': _self.data.keywords,
+ isLoadMore: false
+ })
+ _self.doGetInvoiceRecordList(true)
+ },
+ doLoadMore() {
+ //判断是否正在加载中 与是否存在更多数据
+ const _self = this
+ if (_self.data.isLoadMore || !_self.data.hasMore) {
+ return
+ }
+ _self.setData({
+ isLoadMore: true,
+ 'pageData.page': ++_self.data.pageData.page,
+ 'pageData.keywords': _self.data.keywords
+ })
+ _self.doGetInvoiceRecordList(false)
+ },
+ doGetInvoiceRecordList(isRefresh) {
+ const _self = this
+ _self.setData({
+ recordList: isRefresh ? [] : _self.data.recordList,
+ loadingState: isRefresh ? 'loading' : ''
+ })
+ InvoiceApi.doGetInvoiceRecordList(_self.data.pageData)
+ .then(res => {
+ console.log(res)
+ var status = 'success'
+ status = res.rows && res.rows.length > 0 ? 'success' : 'empty'
+ _self.setData({
+ loadingState: isRefresh ? status : '',
+ recordList: _self.data.recordList.concat(res.rows),
+ listRefreshTrig: false,
+ isLoadMore: false
+ })
+ _self.setData({
+ hasMore: _self.data.recordList.length < res.total
+ })
+ }, err => {
+ _self.setData({
+ loadingState: 'error',
+ listRefreshTrig: false,
+ isLoadMore: false,
+ hasMore: true
+ })
+ })
+ },
+ //跳转可以开具发票订单列表
+ openMake() {
+ wx.navigateTo({
+ url: '/pages/mine/mineAccount/invoiceOrder/invoiceOrder',
+ })
+ },
+ //取消开票
+ cancelRecord(e) {
+ const item = e.currentTarget.dataset.value
+ const _self = this
+ wx.showModal({
+ title: '警告',
+ content: '请问您是否真的想要取消此次开票操作?',
+ complete: (res) => {
+ if (res.confirm) {
+ _self.doCancelInvoiceRecord(item)
+ }
+ }
+ })
+ },
+ //取消开票
+ doCancelInvoiceRecord(item) {
+ const _self = this
+ wx.showLoading({
+ title: '取消中...',
+ })
+ InvoiceApi.doCancelInvoiceRecord(item.invoiceRechargeId)
+ .then(res => {
+ wx.hideLoading()
+ console.log(res)
+ _self.setData({
+ msgHint: '取消成功',
+ msgType: 'success',
+ msgShow: true
+ })
+ _self.doRefreshList()
+ })
+ .catch(err => {
+ wx.hideLoading()
+ _self.setData({
+ msgHint: err.msg ? err.msg : '取消出错了,请稍后重试',
+ msgShow: true,
+ msgType: 'error'
+ })
+ })
+ },
+ //去修改
+ doUpdate(e) {
+ const item = e.currentTarget.dataset.value
+ const params = JSON.stringify(item)
+ wx.navigateTo({
+ url: '/pages/mine/mineAccount/makeInvoice/makeInvoice?bean=' + params,
+ })
+ },
+ openDetail(e) {
+ const item = e.currentTarget.dataset.value
+ const params = JSON.stringify(item)
+ wx.navigateTo({
+ url: '/pages/mine/mineAccount/invoiceRecordDetail/invoiceRecordDetail?bean=' + params,
+ })
+ },
+ slideButtonTap(e) {
+ const item = e.currentTarget.dataset.value
+ const btn = e.detail.index
+ console.log(item)
+ if (btn == 0) {
+ //删除,先判断状态 用户取消-1,开票失败:0,开票中:1,开票完成:2
+ if (item.invoiceStatus != '1') {
+ this.showDelDialog(item)
+ } else {
+ this.setData({
+ msgHint: '当前发票处于开具流程中,暂不支持删除',
+ msgType: 'error',
+ msgShow: true
+ })
+ }
+ }
+ },
+ showDelDialog(item) {
+ const _self = this
+ wx.showModal({
+ title: '警告',
+ content: '该开票记录删除后不可恢复,是否确认执行删除操作?请谨慎抉择',
+ complete: (res) => {
+ if (res.confirm) {
+ _self.doDelRecord(item)
+ }
+ }
+ })
+ },
+ //删除记录
+ doDelRecord(item) {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/mine/mineAccount/mineInvoice/mineInvoice.json b/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.json
similarity index 100%
rename from pages/mine/mineAccount/mineInvoice/mineInvoice.json
rename to pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.json
diff --git a/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.wxml b/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.wxml
new file mode 100644
index 0000000..088371b
--- /dev/null
+++ b/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.wxml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+ 开票信息
+
+
+
+
+
+
+
+
+ {{tools.invoiceStatus(item.invoiceStatus)}}
+ {{item.invoiceName}}
+
+ 修改
+ 取消
+
+
+ 纳税人识别号: {{item.invoiceNumber}}
+
+ {{item.gmtCreate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/mine/mineAccount/mineInvoice/mineInvoice.wxss b/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.wxss
similarity index 100%
rename from pages/mine/mineAccount/mineInvoice/mineInvoice.wxss
rename to pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage.wxss
diff --git a/pages/mine/mineIndex/mine.js b/pages/mine/mineIndex/mine.js
index 1fcbadf..6bd05b3 100644
--- a/pages/mine/mineIndex/mine.js
+++ b/pages/mine/mineIndex/mine.js
@@ -64,7 +64,7 @@ Page({
}, {
icon: "ic-invoice",
title: "发票管理",
- path: "/pages/mine/mineAccount/mineInvoice/mineInvoice"
+ path: "/pages/mine/mineAccount/mineInvoiceManage/mineInvoiceManage"
}, {
icon: "ic-contact",
title: "产权联系人",