From 8b390bdcf43c04a32d11443b95e0f08bead7c78d Mon Sep 17 00:00:00 2001 From: cclu <1106109051@qq.com> Date: Mon, 29 Jul 2024 20:10:36 +0800 Subject: [PATCH] update --- common/utils.js | 26 + components/uni-popup.vue | 210 +- main.js | 4 +- package.json | 4 + pages.json | 34 + pages/businessApproval/newDetail.vue | 18 +- pages/commodity_temp/index.vue | 8 +- pages/everdayRenven/index.vue | 4 +- pages/index/index.vue | 2 +- pages/settlementApproval/detail.vue | 2430 +++++++++++++++++++ pages/settlementApproval/index.vue | 609 +++++ pages/settlementApproval/monthDetail.vue | 1242 ++++++++++ pages/settlementApproval/yearSettlement.vue | 1177 +++++++++ static/images/projectWarning/bg.png | Bin 178360 -> 0 bytes util/dateTime/index.js | 103 + yarn.lock | 268 ++ 16 files changed, 6025 insertions(+), 114 deletions(-) create mode 100644 pages/settlementApproval/detail.vue create mode 100644 pages/settlementApproval/index.vue create mode 100644 pages/settlementApproval/monthDetail.vue create mode 100644 pages/settlementApproval/yearSettlement.vue delete mode 100644 static/images/projectWarning/bg.png create mode 100644 util/dateTime/index.js create mode 100644 yarn.lock diff --git a/common/utils.js b/common/utils.js index a65cf76..eea7465 100644 --- a/common/utils.js +++ b/common/utils.js @@ -225,6 +225,31 @@ async function getFieldEnumByField(params) { } +// 不四舍五入 保留两位小数的金额化方法 +function getMoney(money){ + if (!money || isNaN(money)) return "0.00"; + let num = parseFloat(money + '') + ''; + num = parseInt(money * 100 + '') / 100 + '' + + let reg = /(-?\d+)(\d{3})/; + while (reg.test(num)) { + num = num.replace(reg, "$1,$2"); + } + + let idx = num.indexOf('.') + if (idx === -1) { + num = num + '.00' + } + + if (idx > 0) { + let num_per = num.substring(0, idx) + '.' + let num_next = num.substring(idx + 1).padEnd(2, '0') + num = num_per + num_next + } + + return num; +} + // 视频播放 const EZUIPlayer = require('./ezuikit.js'); @@ -240,6 +265,7 @@ export default { toNextRoute, addUserBehavior, addUserBehaviorNew, + getMoney, getFieldEnumByField, // 获取枚举参数 // calculateDistance, // bMapToQQMap, diff --git a/components/uni-popup.vue b/components/uni-popup.vue index 3f07cbf..09afaa4 100644 --- a/components/uni-popup.vue +++ b/components/uni-popup.vue @@ -1,112 +1,116 @@ diff --git a/main.js b/main.js index a05d9cb..16cfc04 100644 --- a/main.js +++ b/main.js @@ -1,6 +1,7 @@ import Vue from 'vue' import App from './App' import Vuex from 'vuex' +import moment from "moment"; import Store from './store/store' import request from './util/index.js' @@ -13,8 +14,9 @@ Vue.config.productionTip = false Vue.prototype.$store = Store Vue.prototype.$util = utils Vue.prototype.$request = request +Vue.prototype.$moment = moment -Vue.prototype.$eventHub = new Vue() +Vue.prototype.$eventHub = new Vue() Vue.component('noFound', warnImage) diff --git a/package.json b/package.json index a3af5c4..0c309f2 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "dependencies": { "@qiun/ucharts": "^2.5.0-20230101", "@qiun/wx-ucharts": "^2.5.0-20230101", + "moment": "^2.30.1", + "numeral": "^2.0.6", + "sass": "^1.45.1", + "sass-loader": "^10.3.1", "vuex-persistedstate": "^4.1.0" } } diff --git a/pages.json b/pages.json index 1129dc5..c83c15d 100644 --- a/pages.json +++ b/pages.json @@ -80,6 +80,40 @@ } ] }, + { + "root": "pages/settlementApproval", + "pages": [ + { + "path": "index", + "style": + { + "enablePullDownRefresh": true, + "navigationBarTitleText": "结算审批" + } + }, + { + "path": "detail", + "style": + { + "navigationBarTitleText": "结算审批" + } + }, + { + "path": "yearSettlement", + "style": + { + "navigationBarTitleText": "年度结算" + } + }, + { + "path": "monthDetail", + "style": + { + "navigationBarTitleText": "月度详情" + } + } + ] + }, { "root": "pages/operatingStatements", "pages": [ diff --git a/pages/businessApproval/newDetail.vue b/pages/businessApproval/newDetail.vue index b7c6d54..ba73db3 100644 --- a/pages/businessApproval/newDetail.vue +++ b/pages/businessApproval/newDetail.vue @@ -38,7 +38,7 @@ - +
驳回意见 @@ -145,7 +145,7 @@ -
+
{{item.COMMODITYTYPE_NAME}} @@ -178,6 +178,9 @@
+ + {{'点击加载更多'}} + @@ -277,7 +280,8 @@ export default { approveMessageList:[], showOptionBox:false, isback:'', - PURCHASEDESC:'' + PURCHASEDESC:'', + showPage:1,// 显示页数 } }, methods: { @@ -288,6 +292,9 @@ export default { getYes(val) { return val === 1 ? '是 ' : '否' }, + handleGetMore(){ + this.showPage = this.showPage+1 + }, handleChangeCardShow(){ this.cardShow = !this.cardShow }, @@ -400,10 +407,13 @@ export default { // this.$util.toNextRoute('navigateTo', url) }, handleChangeManager(){ + console.log('1') this.showManager = !this.showManager }, handleChangeShowService(){ - this.showService = !this.showService + console.log('2',this.serverShopList.DetailList) + this.showService = !this.showService + console.log('this.showService',this.showService) }, getDetail(id) { let _this = this diff --git a/pages/commodity_temp/index.vue b/pages/commodity_temp/index.vue index e2c7197..b066613 100644 --- a/pages/commodity_temp/index.vue +++ b/pages/commodity_temp/index.vue @@ -177,9 +177,9 @@ // this.$forceUpdate() }, - /** + /** * 日期缓存刷新 - * @param {Object} e + * @param {Object} e * @param {Object} index */ bindDateChange(e, index) { @@ -209,7 +209,7 @@ }, /** * 调用接口获取 - * + * * Api接口地址:EShangApiMain/BusinessMan/Getcommodity_tempList */ getList() { @@ -304,7 +304,7 @@ //服务区列表 getSeverpart() { const _this = this - this.$request.$webGet('EShangApiMain/Logging/GetPassportInfoById', { + this.$request.$webGet('EShangApiMain/Logging/GetPassportInfoById', { UserIdEncrypted: this.user.UserIdEncrypted }).then(res => { if (!res.Result_Code || res.Result_Code != '100') { diff --git a/pages/everdayRenven/index.vue b/pages/everdayRenven/index.vue index 5d9c90c..ec36d87 100644 --- a/pages/everdayRenven/index.vue +++ b/pages/everdayRenven/index.vue @@ -1170,6 +1170,7 @@ defaultMsg() { let option = null let _this = this + console.log('this.PushAuthority',this.PushAuthority); if (this.PushAuthority && this.PushAuthority.length > 1) { option = this.PushAuthority.find(n => n.ProvinceCode === _this.ProvinceCode) @@ -1212,6 +1213,7 @@ this.getTender() } else { // 默认 if (this.PushAuthority.length > 0) { + console.log(1); this.theRequest = this.defaultMsg() || {} if (toSnhuiPageProvinceCode.indexOf(this.theRequest.ProvinceCode)>-1) { uni.redirectTo({ @@ -1242,7 +1244,7 @@ } }, onShow() { - if (this.theRequest.ProvinceCode != 340000 && this.theRequest.ProvinceCode != 520000 && this.theRequest + if (this.theRequest && this.theRequest.ProvinceCode != 340000 && this.theRequest.ProvinceCode != 520000 && this.theRequest .ProvinceCode != 451200 && this.theRequest.ProvinceCode != 510000 && this.theRequest.ProvinceCode != 620000 && this.theRequest.ProvinceCode != 630000 && this.theRequest.ProvinceCode != 330200) { uni.setNavigationBarColor({ diff --git a/pages/index/index.vue b/pages/index/index.vue index c90e911..494b0b8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -8,7 +8,7 @@ :item ="item" :doCout="toDoMsg ? toDoMsg[item.id] : 0" :active="item.id=='d5a9e3ef-3699-448f-abcc-819179df60bd' || menus[item.id]==1 || this.membershipType === 9999" - @handleClick="toPage" + @handleClick="toPage" > diff --git a/pages/settlementApproval/detail.vue b/pages/settlementApproval/detail.vue new file mode 100644 index 0000000..5d97caa --- /dev/null +++ b/pages/settlementApproval/detail.vue @@ -0,0 +1,2430 @@ +