diff --git a/app.wxss b/app.wxss
index f1c4eb9..3754f3c 100644
--- a/app.wxss
+++ b/app.wxss
@@ -120,8 +120,8 @@
background-color: var(--btn-green-color);
color: white;
font-size: 16px;
- height: 70rpx;
- line-height: 70rpx;
+ height: 80rpx;
+ line-height: 80rpx;
border-radius: 5px;
text-align: center;
}
@@ -229,6 +229,13 @@
text-overflow: ellipsis;
}
+.single-line-front {
+ white-space: nowrap;
+ overflow: hidden;
+ direction: rtl;
+ text-overflow: ellipsis;
+}
+
.multiple-3-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
diff --git a/net/api/projectApi.js b/net/api/projectApi.js
index 5dec146..3a363c2 100644
--- a/net/api/projectApi.js
+++ b/net/api/projectApi.js
@@ -102,7 +102,7 @@ class ProjectService {
}
//获取可以补正的项目列表
static doGetCanProRepairList(data) {
- return request(apiPath.canProRepairList, 'GET', data)
+ return request(apiPath.canProRepairList, "GET", data)
}
}
diff --git a/pages/copyright/applyRepair/applyRepair.js b/pages/copyright/applyRepair/applyRepair.js
index 4c1e5e8..27658e4 100644
--- a/pages/copyright/applyRepair/applyRepair.js
+++ b/pages/copyright/applyRepair/applyRepair.js
@@ -24,7 +24,16 @@ Page({
showSelPro: false,
showSelType: false,
tempSelType: null,
- remark: ''
+ remark: '',
+ proKeywords: '',
+ proPageData: {
+ page: 1,
+ rows: 10,
+ keywords: ''
+ },
+ listRefreshTrig: false,
+ loadingState: 'loading',
+ hasMore: true,
},
/**
@@ -49,39 +58,74 @@ Page({
//获取可以申请补正的列表
this.getCanRepairList(false)
},
- //获取可以补正的项目列表
- getCanRepairList(isShow) {
- const _self = this
- wx.showLoading({
- title: '加载中...',
+ inputKeywords(e) {
+ this.setData({
+ proKeywords: e.detail.value
})
- const data = {
- page: 1,
- rows: 30
+ },
+ clearSearch() {
+ this.setData({
+ proKeywords: ''
+ })
+ this.doRefreshList()
+ },
+ //搜索项目
+ doSearchKeyWord() {
+ this.doRefreshList()
+ },
+ doRefreshList() {
+ const _self = this
+ _self.setData({
+ listRefreshTrig: true,
+ loadingState: 'loading',
+ hasMore: true,
+ isLoadMore: false,
+ 'proPageData.page': 1,
+ 'proPageData.keywords': _self.data.proKeywords
+ })
+ _self.getCanRepairList(true)
+ },
+ doLoadMore() {
+ //判断是否正在加载中 与是否存在更多数据
+ const _self = this
+ if (_self.data.isLoadMore || !_self.data.hasMore) {
+ return
}
- ProApi.doGetCanProRepairList(data)
+ _self.setData({
+ isLoadMore: true,
+ 'proPageData.page': ++_self.data.proPageData.page,
+ 'proPageData.keywords': _self.data.proKeywords
+ })
+ _self.getCanRepairList(false)
+ },
+ //获取可以补正的项目列表
+ getCanRepairList(isRefresh) {
+ const _self = this
+ _self.setData({
+ proList: isRefresh ? [] : _self.data.proList,
+ loadingState: isRefresh ? 'loading' : ''
+ })
+ ProApi.doGetCanProRepairList(_self.data.proPageData)
.then(res => {
- wx.hideLoading()
- if (res.rows && res.rows.length > 0) {
- _self.setData({
- proList: res.rows,
- showSelPro: isShow,
- tempSelPro: _self.data.selPro
- })
- } else {
- _self.setData({
- msgHint: '您暂无可以补正的软著',
- msgType: 'error',
- msgShow: true
- })
- }
+ console.log(res)
+ var status = 'success'
+ status = res.rows && res.rows.length > 0 ? 'success' : 'empty'
+ _self.setData({
+ loadingState: isRefresh ? status : '',
+ proList: _self.data.proList.concat(res.rows),
+ listRefreshTrig: false,
+ isLoadMore: false
+ })
+ _self.setData({
+ hasMore: _self.data.proList.length < res.total
+ })
})
.catch(err => {
- wx.hideLoading()
_self.setData({
- msgHint: err.msg ? err.msg : '网络错误,请稍后重试',
- msgType: 'error',
- msgShow: true
+ loadingState: 'error',
+ listRefreshTrig: false,
+ isLoadMore: false,
+ hasMore: true
})
})
},
diff --git a/pages/copyright/applyRepair/applyRepair.json b/pages/copyright/applyRepair/applyRepair.json
index 854c484..b4824a0 100644
--- a/pages/copyright/applyRepair/applyRepair.json
+++ b/pages/copyright/applyRepair/applyRepair.json
@@ -2,6 +2,8 @@
"usingComponents": {
"mp-toptips": "weui-miniprogram/toptips/toptips",
"mp-half-screen-dialog": "weui-miniprogram/half-screen-dialog/half-screen-dialog",
- "mp-uploader": "weui-miniprogram/uploader/uploader"
+ "mp-uploader": "weui-miniprogram/uploader/uploader",
+ "container-loading": "/components/container-loading/container-loading",
+ "mp-loading": "weui-miniprogram/loading/loading"
}
}
\ No newline at end of file
diff --git a/pages/copyright/applyRepair/applyRepair.wxml b/pages/copyright/applyRepair/applyRepair.wxml
index 9ab1172..d4c719c 100644
--- a/pages/copyright/applyRepair/applyRepair.wxml
+++ b/pages/copyright/applyRepair/applyRepair.wxml
@@ -11,14 +11,14 @@
补正信息
- 补正软著
+ 补正软著
{{selPro==null? '选择需要补正的软著' :selPro.projName}}
- 补正种类
+ 补正种类
{{selType==null?'选择种类':selType.title}}
@@ -45,30 +45,40 @@
- 补正软著
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- {{item.projName}}
-
+
+
+
+
+
+
+
+
+
+
+ {{item.projName}}
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
确定
diff --git a/pages/copyright/applyRepair/applyRepair.wxss b/pages/copyright/applyRepair/applyRepair.wxss
index 04f469e..c9912dc 100644
--- a/pages/copyright/applyRepair/applyRepair.wxss
+++ b/pages/copyright/applyRepair/applyRepair.wxss
@@ -27,6 +27,7 @@
.apply-title {
font-size: 28rpx;
color: var(--text-color);
+ flex: 0.3;
}
.apply-content {
@@ -34,6 +35,8 @@
display: flex;
flex-direction: row;
align-items: center;
+ justify-content: flex-end;
+ flex: 0.7;
}
.reason-content {
@@ -97,17 +100,59 @@
margin-top: 20rpx;
}
+.pro-list-item-left-count {
+ font-size: 24rpx;
+ color: var(--text-color);
+ flex-wrap: nowrap;
+ margin-top: 4rpx;
+}
+
.pro-list-item-left-tag {
font-size: 24rpx;
color: var(--text-color);
}
.pro-list-name {
- font-size: 28rpx;
+ font-size: 26rpx;
font-weight: bold;
+ flex: 1;
}
+.search-container {
+ position: relative;
+ align-self: center;
+ border-radius: 5px;
+ background-color: var(--bg-gray-color);
+ padding: 5px;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+}
+
+.search-input {
+ box-sizing: border-box;
+ color: var(--text-color);
+ font-size: 28rpx;
+ text-align: center;
+ flex: 1;
+}
+
+.search-input::after {
+ content: '';
+ position: absolute;
+ left: 10px;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 20px;
+ height: 20px;
+ margin-top: -1px;
+ background-size: cover;
+ background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSI2NCA2NCA4OTYgODk2IiB3aWR0aD0iMTQiIGhlaWdodD0iMTkiIHN0eWxlPSIiIGZpbHRlcj0ibm9uZSI+CiAgICAKICAgIDxnPgogICAgPHBhdGggZD0iTTkwOS42IDg1NC41TDY0OS45IDU5NC44QzY5MC4yIDU0Mi43IDcxMiA0NzkgNzEyIDQxMmMwLTgwLjItMzEuMy0xNTUuNC04Ny45LTIxMi4xLTU2LjYtNTYuNy0xMzItODcuOS0yMTIuMS04Ny45cy0xNTUuNSAzMS4zLTIxMi4xIDg3LjlDMTQzLjIgMjU2LjUgMTEyIDMzMS44IDExMiA0MTJjMCA4MC4xIDMxLjMgMTU1LjUgODcuOSAyMTIuMUMyNTYuNSA2ODAuOCAzMzEuOCA3MTIgNDEyIDcxMmM2NyAwIDEzMC42LTIxLjggMTgyLjctNjJsMjU5LjcgMjU5LjZhOC4yIDguMiAwIDAgMCAxMS42IDBsNDMuNi00My41YTguMiA4LjIgMCAwIDAgMC0xMS42ek01NzAuNCA1NzAuNEM1MjggNjEyLjcgNDcxLjggNjM2IDQxMiA2MzZzLTExNi0yMy4zLTE1OC40LTY1LjZDMjExLjMgNTI4IDE4OCA0NzEuOCAxODggNDEyczIzLjMtMTE2LjEgNjUuNi0xNTguNEMyOTYgMjExLjMgMzUyLjIgMTg4IDQxMiAxODhzMTE2LjEgMjMuMiAxNTguNCA2NS42UzYzNiAzNTIuMiA2MzYgNDEycy0yMy4zIDExNi4xLTY1LjYgMTU4LjR6IiBmaWxsPSJyZ2JhKDIwNCwyMDQsMjA0LDEpIj48L3BhdGg+CiAgICA8L2c+CiAgPC9zdmc+');
+}
+
/* 上传图片 */
@@ -184,4 +229,8 @@
.weui-half-screen-dialog__ft {
padding: 0rpx 0rpx 20rpx;
+}
+
+.weui-half-screen-dialog__hd__side+.weui-half-screen-dialog__hd__main {
+ padding: 0 46rpx;
}
\ No newline at end of file
diff --git a/pages/copyright/repair/repair.js b/pages/copyright/repair/repair.js
index 915c440..643c9a0 100644
--- a/pages/copyright/repair/repair.js
+++ b/pages/copyright/repair/repair.js
@@ -51,6 +51,7 @@ Page({
downloadProgress: 0, //下载文件进度
downloading: false, //下载文件中
tempDownloadPro: null, //下载的item
+ approveReason: '', //补正原因
},
/**
@@ -233,6 +234,7 @@ Page({
approveImgs: item.correctionVoucherFileKVs,
approveTime: item.gmtReview,
approveDesc: item.reviewReason,
+ approveReason: item.correctionReason,
approveStatus: item.applyStatus == 'APPROVED' ? false : true,
showHint: true
})
@@ -241,12 +243,76 @@ Page({
previewImg(e) {
const _self = this
const current = e.currentTarget.dataset.value
- const url = []
- _self.data.approveImgs.forEach(item => url.push(item.url))
- console.log(url)
- wx.previewImage({
- urls: url,
- current: current
+ //判断是pdf还是图片
+ if (current.value.toLowerCase().endsWith('.pdf')) {
+ //文件,下载文件
+ _self.doDownloadApprovePdf(current)
+ } else {
+ //图片
+ const urls = [current.url]
+ wx.previewImage({
+ urls: urls,
+ })
+ }
+ },
+ //下载凭证文件
+ doDownloadApprovePdf(item) {
+ const _self = this
+ _self.setData({
+ showHint: false
+ })
+ wx.showLoading({
+ title: '加载中...',
+ })
+ const token = Cache.get('token')
+ const header = {}
+ if (token) {
+ header.Auth = `Bearer ${token}`;
+ }
+ wx.downloadFile({
+ url: item.url,
+ header: header,
+ success: res => {
+ wx.hideLoading()
+ if (res.statusCode === 200) {
+ // 从响应头中获取文件名
+ let fileName = item.value;
+ if (fileName) {
+ // 保存文件时使用获取到的文件名
+ wx.getFileSystemManager().saveFile({
+ tempFilePath: res.tempFilePath,
+ filePath: wx.env.USER_DATA_PATH + '/' + fileName,
+ success: function (res) {
+ const savedFilePath = res.savedFilePath;
+ console.log('文件下载并保存成功', savedFilePath);
+ if (savedFilePath.endsWith(".txt")) {
+ wx.navigateTo({
+ url: '/pages/readTxt/readTxt?filePath=' + savedFilePath,
+ })
+ } else {
+ wx.openDocument({
+ filePath: savedFilePath,
+ showMenu: true
+ })
+ }
+ },
+ fail: function (err) {
+ console.error('文件保存失败', err);
+ _self.showErr('很抱歉,文件下载出现问题。建议您稍作等待,之后再尝试下载。')
+ }
+ })
+ } else {
+ console.error('未从响应头中获取到文件名');
+ _self.showErr('很抱歉,文件下载出现问题。建议您稍作等待,之后再尝试下载。')
+ }
+ } else {
+ _self.showErr('很抱歉,文件下载出现问题。建议您稍作等待,之后再尝试下载。')
+ }
+ },
+ fail: err => {
+ _self.showErr('很抱歉,文件下载出现问题。建议您稍作等待,之后再尝试下载。')
+ console.log(`下载失败${err}`)
+ }
})
},
closeDialog(e) {
diff --git a/pages/copyright/repair/repair.wxml b/pages/copyright/repair/repair.wxml
index facf4ab..919c93e 100644
--- a/pages/copyright/repair/repair.wxml
+++ b/pages/copyright/repair/repair.wxml
@@ -60,10 +60,15 @@
- 补正凭证
+
+ 补正原因
+ {{approveReason}}
+ 补正凭证
-
+
+ {{item.value}}
+
diff --git a/pages/copyright/repair/repair.wxss b/pages/copyright/repair/repair.wxss
index 5fd8cda..ed78651 100644
--- a/pages/copyright/repair/repair.wxss
+++ b/pages/copyright/repair/repair.wxss
@@ -301,16 +301,25 @@
.approve-img-box {
display: flex;
- flex-direction: row;
- flex-wrap: wrap;
+ flex-direction: column;
margin-top: 15rpx;
+ box-sizing: border-box;
+ width: 100%;
}
.approve-img-item {
- width: 120rpx;
- height: 120rpx;
+ font-size: 24rpx;
border-radius: 5rpx;
- margin: 5rpx;
+ padding: 10rpx;
+ text-align: left;
+ background-color: var(--gray-bg-color);
+ width: 100%;
+ margin: 10rpx;
+ box-sizing: border-box;
+}
+
+.approve-img-item:nth-of-type(n+2) {
+ margin-top: 10rpx;
}
.approve-content {
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index afac3bc..702087f 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -88,9 +88,12 @@
{{item.gmtCreate}}
- 下载
- 重新生成
生成
+
+ 下载
+ 重新生成
+ 生成
+
diff --git a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
index 1a7559a..a6b3e44 100644
--- a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
+++ b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.js
@@ -140,11 +140,9 @@ Page({
this.setData({
checkList: newCheckList,
orderList: newOrderList,
- money: newCheckList.length > 0 ? newCheckList.map(item => {
- let count = 0
- count += item.rechargeMoney
- return count
- }) : 0
+ money: newCheckList.length > 0 ? newCheckList.reduce((accumulator, item) => {
+ return accumulator + Number(item.rechargeMoney);
+ }, 0) : 0
});
},
//去开票
diff --git a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxml b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxml
index 3c304e8..c3fd098 100644
--- a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxml
+++ b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxml
@@ -15,9 +15,9 @@
-->
-
+
-
+
diff --git a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxss b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxss
index 6c26de2..caec28d 100644
--- a/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxss
+++ b/pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxss
@@ -67,6 +67,9 @@
align-items: center;
padding: 10rpx 20rpx;
}
+.order-list-item:nth-of-type(n+2){
+ margin-top: 20rpx;
+}
.order-list-item-content {
display: flex;
@@ -88,7 +91,7 @@
}
.pay-money {
- font-size: 45rpx;
+ font-size: 32rpx;
font-weight: bold;
}
diff --git a/pages/mine/mineAccount/mineContact/mineContact.wxss b/pages/mine/mineAccount/mineContact/mineContact.wxss
index 3d76eec..9131514 100644
--- a/pages/mine/mineAccount/mineContact/mineContact.wxss
+++ b/pages/mine/mineAccount/mineContact/mineContact.wxss
@@ -89,8 +89,8 @@
width: 94vw;
}
-.order-item:nth-of-type(n+2) {
- margin-top: 15px;
+#mp-slide:nth-of-type(n+2) {
+ margin-top: 20rpx;
}
.contact-desc {
diff --git a/pages/mine/mineAccount/mineMsgNotice/mineMsgNotice.wxml b/pages/mine/mineAccount/mineMsgNotice/mineMsgNotice.wxml
index 6fa82d2..91712bf 100644
--- a/pages/mine/mineAccount/mineMsgNotice/mineMsgNotice.wxml
+++ b/pages/mine/mineAccount/mineMsgNotice/mineMsgNotice.wxml
@@ -23,7 +23,7 @@
-
+
diff --git a/pages/mine/mineAccount/mineOrder/mineOrder.wxml b/pages/mine/mineAccount/mineOrder/mineOrder.wxml
index 5cf8d59..9fa3a10 100644
--- a/pages/mine/mineAccount/mineOrder/mineOrder.wxml
+++ b/pages/mine/mineAccount/mineOrder/mineOrder.wxml
@@ -20,8 +20,8 @@
{{tools.proType(detail.productType)}}
数量{{detail.quantity}}
- 单价{{detail.unitPrice/100}}
- 总金额{{item.totalAmount/100}}
+
+ 总金额{{detail.unitPrice/100}}