diff --git a/common/css/reset.scss b/common/css/reset.scss index 2178bac..b5da5f8 100644 --- a/common/css/reset.scss +++ b/common/css/reset.scss @@ -91,7 +91,7 @@ cover-view { white-space: normal; } -::webkit-scrollbar { +*::webkit-scrollbar { display: none; } diff --git a/components/bussiness-components/packingStationItem.vue b/components/bussiness-components/packingStationItem.vue index c5fc09c..437238c 100644 --- a/components/bussiness-components/packingStationItem.vue +++ b/components/bussiness-components/packingStationItem.vue @@ -62,7 +62,7 @@ - + {{ info.legalPerson + ' ' + transformPhoneNum(info.contactNumber) }} @@ -93,14 +93,14 @@ export default { }, methods: { goDetail() { - // 不能直接使用hook.js文件中的loginGo2,nvue编译生成的store !== this.$store - const token = this.$store.state.qnToken - if (token) { - go2('client-detail', { id: this.info.enterpriseId }, false) - } else { - this.$store.commit('setNextPage', { name: 'client-detail', data:{ id: this.info.enterpriseId }}) - go2('login') - } + // 不能直接使用hook.js文件中的loginGo2,nvue编译生成的store !== this.$store + const token = this.$store.state.qnToken + if (token) { + go2('client-detail', { id: this.info.enterpriseId }, false) + } else { + this.$store.commit('setNextPage', { name: 'client-detail', data: { id: this.info.enterpriseId } }) + go2('login') + } }, transformBusiness(business) { let text = business?.trim() || '未知' @@ -123,7 +123,7 @@ export default { return phoneNum.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') } } - return '--' + return '' } }, computed: { @@ -237,8 +237,10 @@ export default { .text { font-size: 24rpx; color: #555555; - lines: 1; - text-overflow: ellipsis; + // text-overflow: ellipsis; + // word-break: none; + // overflow: hidden; + // white-space: nowrap; } } } diff --git a/components/qn-data-pickerview/qn-data-pickerview.vue b/components/qn-data-pickerview/qn-data-pickerview.vue index ffbe9f9..85f5058 100644 --- a/components/qn-data-pickerview/qn-data-pickerview.vue +++ b/components/qn-data-pickerview/qn-data-pickerview.vue @@ -257,7 +257,6 @@ export default { /* fix nvue */ overflow: hidden; /* #ifndef APP-NVUE */ - width: 6em; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; @@ -311,7 +310,6 @@ export default { /* fix nvue */ overflow: hidden; /* #ifndef APP-NVUE */ - width: 20em; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; diff --git a/components/qn-datetime-picker/time-picker.vue b/components/qn-datetime-picker/time-picker.vue index 699aa63..d958154 100644 --- a/components/qn-datetime-picker/time-picker.vue +++ b/components/qn-datetime-picker/time-picker.vue @@ -1,927 +1,919 @@ diff --git a/components/qn-datetime-picker/util.js b/components/qn-datetime-picker/util.js index efa5773..0dec214 100644 --- a/components/qn-datetime-picker/util.js +++ b/components/qn-datetime-picker/util.js @@ -1,410 +1,393 @@ class Calendar { - constructor({ - date, - selected, - startDate, - endDate, - range, - // multipleStatus - } = {}) { - // 当前日期 - this.date = this.getDate(new Date()) // 当前初入日期 - // 打点信息 - this.selected = selected || []; - // 范围开始 - this.startDate = startDate - // 范围结束 - this.endDate = endDate - this.range = range - // 多选状态 - this.cleanMultipleStatus() - // 每周日期 - this.weeks = {} - // this._getWeek(this.date.fullDate) - // this.multipleStatus = multipleStatus - this.lastHover = false - } - /** - * 设置日期 - * @param {Object} date - */ - setDate(date) { - this.selectDate = this.getDate(date) - this._getWeek(this.selectDate.fullDate) - } + constructor({ + date, + selected, + startDate, + endDate, + range + // multipleStatus + } = {}) { + // 当前日期 + this.date = this.getDate(new Date()) // 当前初入日期 + // 打点信息 + this.selected = selected || [] + // 范围开始 + this.startDate = startDate + // 范围结束 + this.endDate = endDate + this.range = range + // 多选状态 + this.cleanMultipleStatus() + // 每周日期 + this.weeks = {} + // this._getWeek(this.date.fullDate) + // this.multipleStatus = multipleStatus + this.lastHover = false + } + /** + * 设置日期 + * @param {Object} date + */ + setDate(date) { + this.selectDate = this.getDate(date) + this._getWeek(this.selectDate.fullDate) + } - /** - * 清理多选状态 - */ - cleanMultipleStatus() { - this.multipleStatus = { - before: '', - after: '', - data: [] - } - } + /** + * 清理多选状态 + */ + cleanMultipleStatus() { + this.multipleStatus = { + before: '', + after: '', + data: [] + } + } - /** - * 重置开始日期 - */ - resetSatrtDate(startDate) { - // 范围开始 - this.startDate = startDate + /** + * 重置开始日期 + */ + resetSatrtDate(startDate) { + // 范围开始 + this.startDate = startDate + } - } + /** + * 重置结束日期 + */ + resetEndDate(endDate) { + // 范围结束 + this.endDate = endDate + } - /** - * 重置结束日期 - */ - resetEndDate(endDate) { - // 范围结束 - this.endDate = endDate - } + /** + * 获取任意时间 + */ + getDate(date, AddDayCount = 0, str = 'day') { + if (!date) { + date = new Date() + } + if (typeof date !== 'object') { + date = date.replace(/-/g, '/') + } + const dd = new Date(date) + switch (str) { + case 'day': + dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期 + break + case 'month': + if (dd.getDate() === 31) { + dd.setDate(dd.getDate() + AddDayCount) + } else { + dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期 + } + break + case 'year': + dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期 + break + } + const y = dd.getFullYear() + const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0 + const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0 + return { + fullDate: y + '-' + m + '-' + d, + year: y, + month: m, + date: d, + day: dd.getDay() + } + } - /** - * 获取任意时间 - */ - getDate(date, AddDayCount = 0, str = 'day') { - if (!date) { - date = new Date() - } - if (typeof date !== 'object') { - date = date.replace(/-/g, '/') - } - const dd = new Date(date) - switch (str) { - case 'day': - dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期 - break - case 'month': - if (dd.getDate() === 31) { - dd.setDate(dd.getDate() + AddDayCount) - } else { - dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期 - } - break - case 'year': - dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期 - break - } - const y = dd.getFullYear() - const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0 - const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0 - return { - fullDate: y + '-' + m + '-' + d, - year: y, - month: m, - date: d, - day: dd.getDay() - } - } + /** + * 获取上月剩余天数 + */ + _getLastMonthDays(firstDay, full) { + let dateArr = [] + for (let i = firstDay; i > 0; i--) { + const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate() + dateArr.push({ + date: beforeDate, + month: full.month - 1, + disable: true + }) + } + return dateArr + } + /** + * 获取本月天数 + */ + _currentMonthDys(dateData, full) { + let dateArr = [] + let fullDate = this.date.fullDate + for (let i = 1; i <= dateData; i++) { + let isinfo = false + let nowDate = full.year + '-' + full.month + '-' + (i < 10 ? '0' + i : i) + // 是否今天 + let isDay = fullDate === nowDate + // 获取打点信息 + let info = + this.selected && + this.selected.find((item) => { + if (this.dateEqual(nowDate, item.date)) { + return item + } + }) + // 日期禁用 + let disableBefore = true + let disableAfter = true + if (this.startDate) { + // let dateCompBefore = this.dateCompare(this.startDate, fullDate) + // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate) + disableBefore = this.dateCompare(this.startDate, nowDate) + } - /** - * 获取上月剩余天数 - */ - _getLastMonthDays(firstDay, full) { - let dateArr = [] - for (let i = firstDay; i > 0; i--) { - const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate() - dateArr.push({ - date: beforeDate, - month: full.month - 1, - disable: true - }) - } - return dateArr - } - /** - * 获取本月天数 - */ - _currentMonthDys(dateData, full) { - let dateArr = [] - let fullDate = this.date.fullDate - for (let i = 1; i <= dateData; i++) { - let isinfo = false - let nowDate = full.year + '-' + (full.month < 10 ? - full.month : full.month) + '-' + (i < 10 ? - '0' + i : i) - // 是否今天 - let isDay = fullDate === nowDate - // 获取打点信息 - let info = this.selected && this.selected.find((item) => { - if (this.dateEqual(nowDate, item.date)) { - return item - } - }) + if (this.endDate) { + // let dateCompAfter = this.dateCompare(fullDate, this.endDate) + // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate) + disableAfter = this.dateCompare(nowDate, this.endDate) + } + let multiples = this.multipleStatus.data + let checked = false + let multiplesStatus = -1 + if (this.range) { + if (multiples) { + multiplesStatus = multiples.findIndex((item) => { + return this.dateEqual(item, nowDate) + }) + } + if (multiplesStatus !== -1) { + checked = true + } + } + let data = { + fullDate: nowDate, + year: full.year, + date: i, + multiple: this.range ? checked : false, + beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after), + afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after), + month: full.month, + disable: !(disableBefore && disableAfter), + isDay, + userChecked: false + } + if (info) { + data.extraInfo = info + } - // 日期禁用 - let disableBefore = true - let disableAfter = true - if (this.startDate) { - // let dateCompBefore = this.dateCompare(this.startDate, fullDate) - // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate) - disableBefore = this.dateCompare(this.startDate, nowDate) - } + dateArr.push(data) + } + return dateArr + } + /** + * 获取下月天数 + */ + _getNextMonthDays(surplus, full) { + let dateArr = [] + for (let i = 1; i < surplus + 1; i++) { + dateArr.push({ + date: i, + month: Number(full.month) + 1, + disable: true + }) + } + return dateArr + } - if (this.endDate) { - // let dateCompAfter = this.dateCompare(fullDate, this.endDate) - // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate) - disableAfter = this.dateCompare(nowDate, this.endDate) - } - let multiples = this.multipleStatus.data - let checked = false - let multiplesStatus = -1 - if (this.range) { - if (multiples) { - multiplesStatus = multiples.findIndex((item) => { - return this.dateEqual(item, nowDate) - }) - } - if (multiplesStatus !== -1) { - checked = true - } - } - let data = { - fullDate: nowDate, - year: full.year, - date: i, - multiple: this.range ? checked : false, - beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after), - afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after), - month: full.month, - disable: !(disableBefore && disableAfter), - isDay, - userChecked: false - } - if (info) { - data.extraInfo = info - } + /** + * 获取当前日期详情 + * @param {Object} date + */ + getInfo(date) { + if (!date) { + date = new Date() + } + const dateInfo = this.canlender.find((item) => item.fullDate === this.getDate(date).fullDate) + return dateInfo + } - dateArr.push(data) - } - return dateArr - } - /** - * 获取下月天数 - */ - _getNextMonthDays(surplus, full) { - let dateArr = [] - for (let i = 1; i < surplus + 1; i++) { - dateArr.push({ - date: i, - month: Number(full.month) + 1, - disable: true - }) - } - return dateArr - } + /** + * 比较时间大小 + */ + dateCompare(startDate, endDate) { + // 计算截止时间 + startDate = new Date(startDate.replace('-', '/').replace('-', '/')) + // 计算详细项的截止时间 + endDate = new Date(endDate.replace('-', '/').replace('-', '/')) + if (startDate <= endDate) { + return true + } else { + return false + } + } - /** - * 获取当前日期详情 - * @param {Object} date - */ - getInfo(date) { - if (!date) { - date = new Date() - } - const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate) - return dateInfo - } + /** + * 比较时间是否相等 + */ + dateEqual(before, after) { + // 计算截止时间 + before = new Date(before.replace('-', '/').replace('-', '/')) + // 计算详细项的截止时间 + after = new Date(after.replace('-', '/').replace('-', '/')) + if (before.getTime() - after.getTime() === 0) { + return true + } else { + return false + } + } - /** - * 比较时间大小 - */ - dateCompare(startDate, endDate) { - // 计算截止时间 - startDate = new Date(startDate.replace('-', '/').replace('-', '/')) - // 计算详细项的截止时间 - endDate = new Date(endDate.replace('-', '/').replace('-', '/')) - if (startDate <= endDate) { - return true - } else { - return false - } - } + /** + * 比较真实起始日期 + */ - /** - * 比较时间是否相等 - */ - dateEqual(before, after) { - // 计算截止时间 - before = new Date(before.replace('-', '/').replace('-', '/')) - // 计算详细项的截止时间 - after = new Date(after.replace('-', '/').replace('-', '/')) - if (before.getTime() - after.getTime() === 0) { - return true - } else { - return false - } - } + isLogicBefore(currentDay, before, after) { + let logicBefore = before + if (before && after) { + logicBefore = this.dateCompare(before, after) ? before : after + } + return this.dateEqual(logicBefore, currentDay) + } - /** - * 比较真实起始日期 - */ + isLogicAfter(currentDay, before, after) { + let logicAfter = after + if (before && after) { + logicAfter = this.dateCompare(before, after) ? after : before + } + return this.dateEqual(logicAfter, currentDay) + } - isLogicBefore(currentDay, before, after) { - let logicBefore = before - if (before && after) { - logicBefore = this.dateCompare(before, after) ? before : after - } - return this.dateEqual(logicBefore, currentDay) - } + /** + * 获取日期范围内所有日期 + * @param {Object} begin + * @param {Object} end + */ + geDateAll(begin, end) { + var arr = [] + var ab = begin.split('-') + var ae = end.split('-') + var db = new Date() + db.setFullYear(ab[0], ab[1] - 1, ab[2]) + var de = new Date() + de.setFullYear(ae[0], ae[1] - 1, ae[2]) + var unixDb = db.getTime() - 24 * 60 * 60 * 1000 + var unixDe = de.getTime() - 24 * 60 * 60 * 1000 + for (var k = unixDb; k <= unixDe; ) { + k = k + 24 * 60 * 60 * 1000 + arr.push(this.getDate(new Date(parseInt(k))).fullDate) + } + return arr + } - isLogicAfter(currentDay, before, after) { - let logicAfter = after - if (before && after) { - logicAfter = this.dateCompare(before, after) ? after : before - } - return this.dateEqual(logicAfter, currentDay) - } + /** + * 获取多选状态 + */ + setMultiple(fullDate) { + let { before, after } = this.multipleStatus + if (!this.range) return + if (before && after) { + if (!this.lastHover) { + this.lastHover = true + return + } + this.multipleStatus.before = fullDate + this.multipleStatus.after = '' + this.multipleStatus.data = [] + this.multipleStatus.fulldate = '' + this.lastHover = false + } else { + if (!before) { + this.multipleStatus.before = fullDate + this.lastHover = false + } else { + this.multipleStatus.after = fullDate + if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after) + } else { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before) + } + this.lastHover = true + } + } + this._getWeek(fullDate) + } - /** - * 获取日期范围内所有日期 - * @param {Object} begin - * @param {Object} end - */ - geDateAll(begin, end) { - var arr = [] - var ab = begin.split('-') - var ae = end.split('-') - var db = new Date() - db.setFullYear(ab[0], ab[1] - 1, ab[2]) - var de = new Date() - de.setFullYear(ae[0], ae[1] - 1, ae[2]) - var unixDb = db.getTime() - 24 * 60 * 60 * 1000 - var unixDe = de.getTime() - 24 * 60 * 60 * 1000 - for (var k = unixDb; k <= unixDe;) { - k = k + 24 * 60 * 60 * 1000 - arr.push(this.getDate(new Date(parseInt(k))).fullDate) - } - return arr - } + /** + * 鼠标 hover 更新多选状态 + */ + setHoverMultiple(fullDate) { + let { before, after } = this.multipleStatus - /** - * 获取多选状态 - */ - setMultiple(fullDate) { - let { - before, - after - } = this.multipleStatus - if (!this.range) return - if (before && after) { - if (!this.lastHover) { - this.lastHover = true - return - } - this.multipleStatus.before = fullDate - this.multipleStatus.after = '' - this.multipleStatus.data = [] - this.multipleStatus.fulldate = '' - this.lastHover = false - } else { - if (!before) { - this.multipleStatus.before = fullDate - this.lastHover = false - } else { - this.multipleStatus.after = fullDate - if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { - this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus - .after); - } else { - this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus - .before); - } - this.lastHover = true - } - } - this._getWeek(fullDate) - } + if (!this.range) return + if (this.lastHover) return - /** - * 鼠标 hover 更新多选状态 - */ - setHoverMultiple(fullDate) { - let { - before, - after - } = this.multipleStatus + if (!before) { + this.multipleStatus.before = fullDate + } else { + this.multipleStatus.after = fullDate + if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after) + } else { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before) + } + } + this._getWeek(fullDate) + } - if (!this.range) return - if (this.lastHover) return + /** + * 更新默认值多选状态 + */ + setDefaultMultiple(before, after) { + this.multipleStatus.before = before + this.multipleStatus.after = after + if (before && after) { + if (this.dateCompare(before, after)) { + this.multipleStatus.data = this.geDateAll(before, after) + this._getWeek(after) + } else { + this.multipleStatus.data = this.geDateAll(after, before) + this._getWeek(before) + } + } + } - if (!before) { - this.multipleStatus.before = fullDate - } else { - this.multipleStatus.after = fullDate - if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { - this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); - } else { - this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); - } - } - this._getWeek(fullDate) - } + /** + * 获取每周数据 + * @param {Object} dateData + */ + _getWeek(dateData) { + const { fullDate, year, month, date, day } = this.getDate(dateData) + let firstDay = new Date(year, month - 1, 1).getDay() + let currentDay = new Date(year, month, 0).getDate() + let dates = { + lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天 + currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数 + nextMonthDays: [], // 下个月开始几天 + weeks: [] + } + let canlender = [] + const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length) + dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)) + canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays) + let weeks = {} + // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天 + for (let i = 0; i < canlender.length; i++) { + if (i % 7 === 0) { + weeks[parseInt(i / 7)] = new Array(7) + } + weeks[parseInt(i / 7)][i % 7] = canlender[i] + } + this.canlender = canlender + this.weeks = weeks + } - /** - * 更新默认值多选状态 - */ - setDefaultMultiple(before, after) { - this.multipleStatus.before = before - this.multipleStatus.after = after - if (before && after) { - if (this.dateCompare(before, after)) { - this.multipleStatus.data = this.geDateAll(before, after); - this._getWeek(after) - } else { - this.multipleStatus.data = this.geDateAll(after, before); - this._getWeek(before) - } - } - } - - /** - * 获取每周数据 - * @param {Object} dateData - */ - _getWeek(dateData) { - const { - fullDate, - year, - month, - date, - day - } = this.getDate(dateData) - let firstDay = new Date(year, month - 1, 1).getDay() - let currentDay = new Date(year, month, 0).getDate() - let dates = { - lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天 - currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数 - nextMonthDays: [], // 下个月开始几天 - weeks: [] - } - let canlender = [] - const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length) - dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)) - canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays) - let weeks = {} - // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天 - for (let i = 0; i < canlender.length; i++) { - if (i % 7 === 0) { - weeks[parseInt(i / 7)] = new Array(7) - } - weeks[parseInt(i / 7)][i % 7] = canlender[i] - } - this.canlender = canlender - this.weeks = weeks - } - - //静态方法 - // static init(date) { - // if (!this.instance) { - // this.instance = new Calendar(date); - // } - // return this.instance; - // } + //静态方法 + // static init(date) { + // if (!this.instance) { + // this.instance = new Calendar(date); + // } + // return this.instance; + // } } - export default Calendar diff --git a/enums/index.js b/enums/index.js index 639811b..53e509c 100644 --- a/enums/index.js +++ b/enums/index.js @@ -3,7 +3,7 @@ const urlEnv = env === 'production' ? '' : `-${env}` export const XAPPID = '503258978847966403' -export const H5_URL = `http://shopkeeper${env === 'production' ? '' : '.' + env}.qniao.cn` +export const H5_URL = `https://shopkeeper${urlEnv}.qniao.cn` export const H5_URL_STORE = `${H5_URL}/#/pages/store/index?share=true&` export const H5_URL_PAPER = `${H5_URL}/#/pages/paper-details/index?share=true&` @@ -19,7 +19,7 @@ export const accountType = { PHONE: 2, EMAIL: 3, APPLEID: 4, - CUSTOM: 5, + CUSTOM: 5 } /** @@ -30,7 +30,7 @@ export const codePurpose = { RESET_LOGIN_PASSWORD: 2, RESET_PHONE: 3, BIND_BANK_CARD: 4, - RESET_CREDIT_PASSWORD: 5, + RESET_CREDIT_PASSWORD: 5 } /** @@ -38,7 +38,7 @@ export const codePurpose = { */ export const verificationType = { PHONE: 1, - EMAIL: 2, + EMAIL: 2 } /** * 法大大企业认证状态 1:未认证 2:认证中 3:已认证 4:认证失败 @@ -47,14 +47,14 @@ export const fddEnterpriseStatus = { UNCERTIFIED: 1, CERTIFIED_ING: 2, CERTIFIED_SUCCESS: 3, - CERTIFIED_FAIL: 4, + CERTIFIED_FAIL: 4 } /** * 上传地址 */ export const uploadUrl = { image: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/image`, - file: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/file`, + file: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/file` } /** * 结算周期:1:月结30(飞算1期),2:月结45,3:月结60(飞算2期),4:月结75,5:月结90(飞算3期) @@ -62,24 +62,24 @@ export const uploadUrl = { export const settlementPeriodEnum = [ { value: 1, - label: '月结30', + label: '月结30' }, { value: 2, - label: '月结45', + label: '月结45' }, { value: 3, - label: '月结60', + label: '月结60' }, { value: 4, - label: '月结75', + label: '月结75' }, { value: 5, - label: '月结90', - }, + label: '月结90' + } ] /** * 结算周期:1:1期,2:2期,3:3期 @@ -87,16 +87,16 @@ export const settlementPeriodEnum = [ export const fsSettlementPeriodEnum = [ { value: 1, - label: '1期', + label: '1期' }, { value: 2, - label: '2期', + label: '2期' }, { value: 3, - label: '3期', - }, + label: '3期' + } ] /** * 飞算结算方式: 1: 先息后本 @@ -104,8 +104,8 @@ export const fsSettlementPeriodEnum = [ export const fsSettlementMethodEnum = [ { value: 1, - label: '先息后本', - }, + label: '先息后本' + } ] /** @@ -115,7 +115,7 @@ export const fsAuditStatus = { WAIT_APPLY: 0, AUDITING: 1, PASS: 2, - REJECT: 3, + REJECT: 3 } /** @@ -133,7 +133,7 @@ export const supplierOrderStatusEnum = { FINISHED: 30213, WAIT_CLIENT_REPAY: 30217, REPAYING: 30216, - CANCELED: 30212, + CANCELED: 30212 } /** * 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216 @@ -150,7 +150,7 @@ export const supplierOrderStatusMap = { [supplierOrderStatusEnum.FINISHED]: '已完成', [supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待客户还款', [supplierOrderStatusEnum.REPAYING]: '还款中', - [supplierOrderStatusEnum.CANCELED]: '已取消', + [supplierOrderStatusEnum.CANCELED]: '已取消' } /** @@ -159,13 +159,13 @@ export const supplierOrderStatusMap = { export const paymentMethodEnum = { WECHAT_PAY: 1, MONTHLY_PAY: 2, - FLY_PAY: 4, + FLY_PAY: 4 } export const paymentMethodMap = { [paymentMethodEnum.WECHAT_PAY]: '微信支付', [paymentMethodEnum.MONTHLY_PAY]: '月结支付', - [paymentMethodEnum.FLY_PAY]: '飞算支付', + [paymentMethodEnum.FLY_PAY]: '飞算支付' } /** @@ -175,7 +175,7 @@ export const financeStatusEnum = { WAIT_CLIENT_LOAN: 30181, WAIT_FINANCE: 30182, FINISHED: 30183, - FAILED: 30184, + FAILED: 30184 } /** @@ -185,7 +185,7 @@ export const financeStatusMap = { [financeStatusEnum.WAIT_CLIENT_LOAN]: '待客户借款', [financeStatusEnum.WAIT_FINANCE]: '待融资', [financeStatusEnum.FINISHED]: '已融资', - [financeStatusEnum.FAILED]: '融资失败', + [financeStatusEnum.FAILED]: '融资失败' } /** @@ -193,10 +193,10 @@ export const financeStatusMap = { */ export const contractTypeEnum = { ORDER_CONTRACT: 1, - GUARANTEE_CONTRACT: 2, + GUARANTEE_CONTRACT: 2 } export const contractTypeMap = { [contractTypeEnum.ORDER_CONTRACT]: '订单合同', - [contractTypeEnum.GUARANTEE_CONTRACT]: '担保合同', + [contractTypeEnum.GUARANTEE_CONTRACT]: '担保合同' } diff --git a/pages/client-credit/index.vue b/pages/client-credit/index.vue index 5b5b6f4..422f8ab 100644 --- a/pages/client-credit/index.vue +++ b/pages/client-credit/index.vue @@ -89,7 +89,8 @@ export default { searchList: [], supplierList: [], hasCreditList: [], - isFinishedContract: false // 是否该账户与企业签署过担保协议 + isFinishedContract: false, // 是否该账户与企业签署过担保协议 + timer: null } }, onLoad(option) { @@ -105,6 +106,12 @@ export default { } } }, + onShow() { + if (this.form.enterpriseId && this.form.supplierId) { + console.log('onshow 获取授信信息') + this.getCreditList({ mallSupplierId: this.form.supplierId, customerEnterpriseId: this.form.enterpriseId }) + } + }, methods: { back, showCompany(e) { @@ -192,17 +199,23 @@ export default { this.creditType = creditType }, getCreditList(data) { - getCustomerCreditInfo(data).then((res) => { - if (res) { - this.hasCreditList = [] - res.hasCredit && this.hasCreditList.push('month') - res.hasFeisuanCredit && this.hasCreditList.push('fs') - this.isFinishedContract = res.isFinishedContract - } else { - this.hasCreditList = [] - this.isFinishedContract = false - } - }) + if (this.timer) { + clearTimeout(this.timer) + this.timer = null + } + this.timer = setTimeout(() => { + getCustomerCreditInfo(data).then((res) => { + if (res) { + this.hasCreditList = [] + res.hasCredit && this.hasCreditList.push('month') + res.hasFeisuanCredit && this.hasCreditList.push('fs') + this.isFinishedContract = res.isFinishedContract + } else { + this.hasCreditList = [] + this.isFinishedContract = false + } + }) + }, 500) } }, created() { @@ -227,7 +240,6 @@ export default { } }, ['form.enterpriseId']() { - console.log('form.enterpriseId', this.form) if (this.form.enterpriseId && this.form.supplierId) { this.getCreditList({ mallSupplierId: this.form.supplierId, customerEnterpriseId: this.form.enterpriseId }) } diff --git a/pages/client-detail/index.vue b/pages/client-detail/index.vue index f4fdfc9..7097a8e 100644 --- a/pages/client-detail/index.vue +++ b/pages/client-detail/index.vue @@ -134,7 +134,9 @@ export default { go2('page-view', { title: '实名认证', url: encodeURIComponent(res) }) // #endif // #ifdef H5 - window ? (window.location.href = res) : '' + if (window) { + window.location.href = res + } // #endif } }) diff --git a/pages/client-list/index.vue b/pages/client-list/index.vue index 9e8aa37..c695b49 100644 --- a/pages/client-list/index.vue +++ b/pages/client-list/index.vue @@ -147,20 +147,12 @@ export default { return this.$store.state.qnToken != '' } }, - mounted() { - // getArea().then((res) => { - // if (res) { - // this.items = res - // } - // }) - }, onLoad(option) { if (option) { option.latitude && (this.params.latitude = option.latitude) option.longitude && (this.params.longitude = option.longitude) option.km && (this.params.km = option.km) } - // this.getList() } } diff --git a/pages/guarantee-agreement/index.vue b/pages/guarantee-agreement/index.vue index f1262a9..3a8c216 100644 --- a/pages/guarantee-agreement/index.vue +++ b/pages/guarantee-agreement/index.vue @@ -180,10 +180,12 @@ export default { getGuaranteeContract({ mallSupplierId: this.params.mallSupplierId, customerEnterpriseId: this.params.enterpriseId }).then((res) => { if (res) { // #ifdef APP-PLUS - go2('page-view', { title: '签约担保协议', url: encodeURIComponent(res), params: this.params }) + go2('page-view', { title: '签约担保协议', url: encodeURIComponent(res), params: JSON.stringify(this.params) }, true) // #endif // #ifdef H5 - window ? (window.location.href = res) : '' + if (window) { + window.location.href = res + } // #endif } }) @@ -200,7 +202,9 @@ export default { go2('page-view', { title: '实名认证', url: encodeURIComponent(res) }) // #endif // #ifdef H5 - window ? (window.location.href = res) : '' + if (window) { + window.location.href = res + } // #endif } }) diff --git a/pages/mall/index.vue b/pages/mall/index.vue index 3dc4048..515072d 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -6,7 +6,7 @@ 分享 - + {{ storeInformation.name }} 全部商品 {{ storeInformation.productNumber }}   |  上新 {{ storeInformation.currentProductNumber }} @@ -28,10 +28,10 @@ :src="item.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" mode="" > - + - {{ item.name }} - + {{ item.name }} + {{ item.updateTime | timeFilter }} - 编辑 + 编辑 - {{ item.status === 30111 ? '下架' : '上架' }} + {{ item.status === 30111 ? '下架' : '上架' }} @@ -71,7 +71,7 @@ 请先完善企业基本信息 - + diff --git a/pages/message/system-message.vue b/pages/message/system-message.vue index ce79c13..8f44a9d 100644 --- a/pages/message/system-message.vue +++ b/pages/message/system-message.vue @@ -1,195 +1,195 @@ diff --git a/pages/mine/index.vue b/pages/mine/index.vue index f56056b..c623a99 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -166,23 +166,23 @@ export default { tradeRange: [ { text: '本月', - value: currentMonth.join('~'), + value: currentMonth.join('~') }, { text: '上月', - value: lastMonth.join('~'), + value: lastMonth.join('~') }, { text: '总计', - value: '', - }, + value: '' + } ], tradeDate: currentMonth.join('~'), tradeData: { tradingVolume: 0, volumeOfBusiness: 0, - orderQuantity: 0, - }, + orderQuantity: 0 + } } }, @@ -195,7 +195,7 @@ export default { if (!this.hasCompany) { uni.showToast({ title: '您还没有企业信息,请先完善企业信息', - icon: 'none', + icon: 'none' }) return } @@ -210,7 +210,9 @@ export default { go2('page-view', { title: '实名认证', url: encodeURIComponent(res) }) // #endif // #ifdef H5 - window ? (window.location.href = res) : '' + if (window) { + window.location.href = res + } // #endif } }) @@ -222,7 +224,7 @@ export default { if (!this.hasCompany) { uni.showToast({ title: '您还没有企业,请先加入企业', - icon: 'none', + icon: 'none' }) return } @@ -234,7 +236,7 @@ export default { } else { uni.showToast({ title: '请先完善企业信息', - icon: 'none', + icon: 'none' }) } }, @@ -246,9 +248,9 @@ export default { uni.showToast({ title: '复制成功', icon: 'none', - duration: 2000, + duration: 2000 }) - }, + } }) }, // 获取纸盘商订单统计 @@ -263,19 +265,16 @@ export default { getOrderStatistics({ beginDate, endDate, - currentSupplier, + currentSupplier }).then((res) => { console.log('res', res) if (res) { this.tradeData = res } }) - }, + } }, watch: { - tradeDate(val) { - console.log('val:', val) - }, '$store.state.supplierInfo.supplierId': { handler(val) { console.log('切换了供应商:', val) @@ -283,7 +282,7 @@ export default { this.getStatistics() } }, - immediate: true, + immediate: true }, tradeDate() { this.getStatistics() @@ -294,10 +293,10 @@ export default { this.tradeData = { tradingVolume: 0, volumeOfBusiness: 0, - orderQuantity: 0, + orderQuantity: 0 } } - }, + } }, computed: { vipExpireTime() { @@ -330,9 +329,9 @@ export default { avatar: this.$store.state.userInfo.avatar || '', name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '', supplierName: this.$store.state.supplierInfo.name || '', - fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus || 1, + fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus || 1 } - }, + } }, onLoad() {}, onShow() { @@ -343,7 +342,7 @@ export default { } }) this.hasLogin && this.getStatistics() - }, + } } diff --git a/pages/month-credit/index.vue b/pages/month-credit/index.vue index 95dca62..3edd92e 100644 --- a/pages/month-credit/index.vue +++ b/pages/month-credit/index.vue @@ -70,7 +70,7 @@ export default { duration: 2000, success: () => { setTimeout(() => { - go2('client-credit', {}, true) + go2('client-credit', { enterpriseId: this.form.enterpriseId, name: this.form.enterpriseName }, true) }, 2000) } }) diff --git a/pages/order-detail/index.vue b/pages/order-detail/index.vue index 6216992..c0e32fa 100644 --- a/pages/order-detail/index.vue +++ b/pages/order-detail/index.vue @@ -396,7 +396,9 @@ export default { go2('page-view', { title: '供应商订单签约', url: encodeURIComponent(res.signUrl), params: this.params }) // #endif // #ifdef H5 - window ? (window.location.href = res.signUrl) : '' + if (window) { + window.location.href = res.signUrl + } // #endif } } diff --git a/pages/page-view/index.vue b/pages/page-view/index.vue index 5a92738..2c61354 100644 --- a/pages/page-view/index.vue +++ b/pages/page-view/index.vue @@ -11,13 +11,15 @@ export default { data() { return { url: '', - socket: null + socket: null, + params: null } }, onLoad(option) { if (option) { this.url = decodeURIComponent(option.url) - console.log(this.url, option) + this.params = JSON.parse(option.params) + console.log('params', option.params) } else { uni.showToast({ title: '参数错误', @@ -41,6 +43,11 @@ export default { * @param {Object} data {data:{},type:''} */ getMessage(data) { + // 供应商担保协议回调 + if (data.type === 'guaranteeSuccess') { + go2('fs-credit', { ...this.params }, true) + } + // 订单合同签署成功 if (data.type == 'zzgSupplierTCSignSuccess') { go2('order-detail', { orderId: data.data.orderId }, true) } diff --git a/pages/trade/quotationList.vue b/pages/trade/quotationList.vue index b4cecb5..bbd0955 100644 --- a/pages/trade/quotationList.vue +++ b/pages/trade/quotationList.vue @@ -1,50 +1,30 @@ diff --git a/static/imgs/client-list/contact-icon.png b/static/imgs/client-list/contact-icon.png new file mode 100644 index 0000000..33e054c Binary files /dev/null and b/static/imgs/client-list/contact-icon.png differ diff --git a/static/imgs/client-list/phone-icon.png b/static/imgs/client-list/phone-icon.png deleted file mode 100644 index 605ca7d..0000000 Binary files a/static/imgs/client-list/phone-icon.png and /dev/null differ diff --git a/static/logo.png b/static/logo.png index 2b6d783..3d0c130 100644 Binary files a/static/logo.png and b/static/logo.png differ diff --git a/store/index.js b/store/index.js index c3cbdef..e50491a 100644 --- a/store/index.js +++ b/store/index.js @@ -236,7 +236,7 @@ if (!store) { commit('removeSupplierInfo') }, addSearchHistory({ commit, state }, searchHistory) { - const arr = [...state.searchHistory] // 单层数组直接解构 + let arr = [...state.searchHistory] // 单层数组直接解构 let index = arr.findIndex((item) => item === searchHistory) if (index > -1) { arr.splice(index, 1) diff --git a/unpackage/res/icons/1024x1024.png b/unpackage/res/icons/1024x1024.png index a8b682a..ea54033 100644 Binary files a/unpackage/res/icons/1024x1024.png and b/unpackage/res/icons/1024x1024.png differ diff --git a/unpackage/res/icons/120x120.png b/unpackage/res/icons/120x120.png index 4730ff9..aa2f05c 100644 Binary files a/unpackage/res/icons/120x120.png and b/unpackage/res/icons/120x120.png differ diff --git a/unpackage/res/icons/144x144.png b/unpackage/res/icons/144x144.png index 09aa081..cceb9cc 100644 Binary files a/unpackage/res/icons/144x144.png and b/unpackage/res/icons/144x144.png differ diff --git a/unpackage/res/icons/152x152.png b/unpackage/res/icons/152x152.png index 199c736..59ecf3b 100644 Binary files a/unpackage/res/icons/152x152.png and b/unpackage/res/icons/152x152.png differ diff --git a/unpackage/res/icons/167x167.png b/unpackage/res/icons/167x167.png index 4f5f569..4a0a20c 100644 Binary files a/unpackage/res/icons/167x167.png and b/unpackage/res/icons/167x167.png differ diff --git a/unpackage/res/icons/180x180.png b/unpackage/res/icons/180x180.png index 057aaa1..553159b 100644 Binary files a/unpackage/res/icons/180x180.png and b/unpackage/res/icons/180x180.png differ diff --git a/unpackage/res/icons/192x192.png b/unpackage/res/icons/192x192.png index e0e1da5..7f43e19 100644 Binary files a/unpackage/res/icons/192x192.png and b/unpackage/res/icons/192x192.png differ diff --git a/unpackage/res/icons/20x20.png b/unpackage/res/icons/20x20.png index 700f06a..5208544 100644 Binary files a/unpackage/res/icons/20x20.png and b/unpackage/res/icons/20x20.png differ diff --git a/unpackage/res/icons/29x29.png b/unpackage/res/icons/29x29.png index 6075302..677dee3 100644 Binary files a/unpackage/res/icons/29x29.png and b/unpackage/res/icons/29x29.png differ diff --git a/unpackage/res/icons/40x40.png b/unpackage/res/icons/40x40.png index 2d52bd4..c91bd57 100644 Binary files a/unpackage/res/icons/40x40.png and b/unpackage/res/icons/40x40.png differ diff --git a/unpackage/res/icons/58x58.png b/unpackage/res/icons/58x58.png index 5658a55..2b4e52f 100644 Binary files a/unpackage/res/icons/58x58.png and b/unpackage/res/icons/58x58.png differ diff --git a/unpackage/res/icons/60x60.png b/unpackage/res/icons/60x60.png index 94b3f6f..afaeebd 100644 Binary files a/unpackage/res/icons/60x60.png and b/unpackage/res/icons/60x60.png differ diff --git a/unpackage/res/icons/72x72.png b/unpackage/res/icons/72x72.png index 2529b24..17e6aea 100644 Binary files a/unpackage/res/icons/72x72.png and b/unpackage/res/icons/72x72.png differ diff --git a/unpackage/res/icons/76x76.png b/unpackage/res/icons/76x76.png index edae3ec..a964f29 100644 Binary files a/unpackage/res/icons/76x76.png and b/unpackage/res/icons/76x76.png differ diff --git a/unpackage/res/icons/80x80.png b/unpackage/res/icons/80x80.png index 83dfe79..6b44e94 100644 Binary files a/unpackage/res/icons/80x80.png and b/unpackage/res/icons/80x80.png differ diff --git a/unpackage/res/icons/87x87.png b/unpackage/res/icons/87x87.png index a0f337c..54ecc38 100644 Binary files a/unpackage/res/icons/87x87.png and b/unpackage/res/icons/87x87.png differ diff --git a/unpackage/res/icons/96x96.png b/unpackage/res/icons/96x96.png index 55f6c1c..1e143a5 100644 Binary files a/unpackage/res/icons/96x96.png and b/unpackage/res/icons/96x96.png differ