mo-bai 4 years ago
parent
commit
efa459b406
39 changed files with 1613 additions and 1647 deletions
  1. 2
      common/css/reset.scss
  2. 26
      components/bussiness-components/packingStationItem.vue
  3. 2
      components/qn-data-pickerview/qn-data-pickerview.vue
  4. 1830
      components/qn-datetime-picker/time-picker.vue
  5. 751
      components/qn-datetime-picker/util.js
  6. 54
      enums/index.js
  7. 38
      pages/client-credit/index.vue
  8. 4
      pages/client-detail/index.vue
  9. 8
      pages/client-list/index.vue
  10. 10
      pages/guarantee-agreement/index.vue
  11. 14
      pages/mall/index.vue
  12. 364
      pages/message/system-message.vue
  13. 45
      pages/mine/index.vue
  14. 2
      pages/month-credit/index.vue
  15. 4
      pages/order-detail/index.vue
  16. 11
      pages/page-view/index.vue
  17. 74
      pages/trade/quotationList.vue
  18. 19
      pages/vip-center/index.vue
  19. BIN
      static/imgs/client-list/contact-icon.png
  20. BIN
      static/imgs/client-list/phone-icon.png
  21. BIN
      static/logo.png
  22. 2
      store/index.js
  23. BIN
      unpackage/res/icons/1024x1024.png
  24. BIN
      unpackage/res/icons/120x120.png
  25. BIN
      unpackage/res/icons/144x144.png
  26. BIN
      unpackage/res/icons/152x152.png
  27. BIN
      unpackage/res/icons/167x167.png
  28. BIN
      unpackage/res/icons/180x180.png
  29. BIN
      unpackage/res/icons/192x192.png
  30. BIN
      unpackage/res/icons/20x20.png
  31. BIN
      unpackage/res/icons/29x29.png
  32. BIN
      unpackage/res/icons/40x40.png
  33. BIN
      unpackage/res/icons/58x58.png
  34. BIN
      unpackage/res/icons/60x60.png
  35. BIN
      unpackage/res/icons/72x72.png
  36. BIN
      unpackage/res/icons/76x76.png
  37. BIN
      unpackage/res/icons/80x80.png
  38. BIN
      unpackage/res/icons/87x87.png
  39. BIN
      unpackage/res/icons/96x96.png

2
common/css/reset.scss

@ -91,7 +91,7 @@ cover-view {
white-space: normal; white-space: normal;
} }
::webkit-scrollbar {
*::webkit-scrollbar {
display: none; display: none;
} }

26
components/bussiness-components/packingStationItem.vue

@ -62,7 +62,7 @@
</view> </view>
<view class="divide"></view> <view class="divide"></view>
<view class="box"> <view class="box">
<image class="icon" src="/static/imgs/client-list/phone-icon.png"></image>
<image class="icon" src="/static/imgs/client-list/contact-icon.png"></image>
<text class="text" style="width: 248rpx">{{ info.legalPerson + ' ' + transformPhoneNum(info.contactNumber) }}</text> <text class="text" style="width: 248rpx">{{ info.legalPerson + ' ' + transformPhoneNum(info.contactNumber) }}</text>
</view> </view>
</view> </view>
@ -93,14 +93,14 @@ export default {
}, },
methods: { methods: {
goDetail() { goDetail() {
// 使hook.jsloginGo2nvuestore == 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.jsloginGo2nvuestore == 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) { transformBusiness(business) {
let text = business?.trim() || '未知' let text = business?.trim() || '未知'
@ -123,7 +123,7 @@ export default {
return phoneNum.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') return phoneNum.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
} }
} }
return '--'
return ''
} }
}, },
computed: { computed: {
@ -237,8 +237,10 @@ export default {
.text { .text {
font-size: 24rpx; font-size: 24rpx;
color: #555555; color: #555555;
lines: 1;
text-overflow: ellipsis;
// text-overflow: ellipsis;
// word-break: none;
// overflow: hidden;
// white-space: nowrap;
} }
} }
} }

2
components/qn-data-pickerview/qn-data-pickerview.vue

@ -257,7 +257,6 @@ export default {
/* fix nvue */ /* fix nvue */
overflow: hidden; overflow: hidden;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
width: 6em;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
@ -311,7 +310,6 @@ export default {
/* fix nvue */ /* fix nvue */
overflow: hidden; overflow: hidden;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
width: 20em;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;

1830
components/qn-datetime-picker/time-picker.vue
File diff suppressed because it is too large
View File

751
components/qn-datetime-picker/util.js

@ -1,410 +1,393 @@
class Calendar { 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 export default Calendar

54
enums/index.js

@ -3,7 +3,7 @@ const urlEnv = env === 'production' ? '' : `-${env}`
export const XAPPID = '503258978847966403' 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_STORE = `${H5_URL}/#/pages/store/index?share=true&`
export const H5_URL_PAPER = `${H5_URL}/#/pages/paper-details/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, PHONE: 2,
EMAIL: 3, EMAIL: 3,
APPLEID: 4, APPLEID: 4,
CUSTOM: 5,
CUSTOM: 5
} }
/** /**
@ -30,7 +30,7 @@ export const codePurpose = {
RESET_LOGIN_PASSWORD: 2, RESET_LOGIN_PASSWORD: 2,
RESET_PHONE: 3, RESET_PHONE: 3,
BIND_BANK_CARD: 4, BIND_BANK_CARD: 4,
RESET_CREDIT_PASSWORD: 5,
RESET_CREDIT_PASSWORD: 5
} }
/** /**
@ -38,7 +38,7 @@ export const codePurpose = {
*/ */
export const verificationType = { export const verificationType = {
PHONE: 1, PHONE: 1,
EMAIL: 2,
EMAIL: 2
} }
/** /**
* 法大大企业认证状态 1:未认证 2:认证中 3:已认证 4:认证失败 * 法大大企业认证状态 1:未认证 2:认证中 3:已认证 4:认证失败
@ -47,14 +47,14 @@ export const fddEnterpriseStatus = {
UNCERTIFIED: 1, UNCERTIFIED: 1,
CERTIFIED_ING: 2, CERTIFIED_ING: 2,
CERTIFIED_SUCCESS: 3, CERTIFIED_SUCCESS: 3,
CERTIFIED_FAIL: 4,
CERTIFIED_FAIL: 4
} }
/** /**
* 上传地址 * 上传地址
*/ */
export const uploadUrl = { export const uploadUrl = {
image: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/image`, 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月结453月结60飞算2期4月结755月结90飞算3期 * 结算周期1月结30飞算1期2月结453月结60飞算2期4月结755月结90飞算3期
@ -62,24 +62,24 @@ export const uploadUrl = {
export const settlementPeriodEnum = [ export const settlementPeriodEnum = [
{ {
value: 1, value: 1,
label: '月结30',
label: '月结30'
}, },
{ {
value: 2, value: 2,
label: '月结45',
label: '月结45'
}, },
{ {
value: 3, value: 3,
label: '月结60',
label: '月结60'
}, },
{ {
value: 4, value: 4,
label: '月结75',
label: '月结75'
}, },
{ {
value: 5, value: 5,
label: '月结90',
},
label: '月结90'
}
] ]
/** /**
* 结算周期112233 * 结算周期112233
@ -87,16 +87,16 @@ export const settlementPeriodEnum = [
export const fsSettlementPeriodEnum = [ export const fsSettlementPeriodEnum = [
{ {
value: 1, value: 1,
label: '1期',
label: '1期'
}, },
{ {
value: 2, value: 2,
label: '2期',
label: '2期'
}, },
{ {
value: 3, value: 3,
label: '3期',
},
label: '3期'
}
] ]
/** /**
* 飞算结算方式 1: 先息后本 * 飞算结算方式 1: 先息后本
@ -104,8 +104,8 @@ export const fsSettlementPeriodEnum = [
export const fsSettlementMethodEnum = [ export const fsSettlementMethodEnum = [
{ {
value: 1, value: 1,
label: '先息后本',
},
label: '先息后本'
}
] ]
/** /**
@ -115,7 +115,7 @@ export const fsAuditStatus = {
WAIT_APPLY: 0, WAIT_APPLY: 0,
AUDITING: 1, AUDITING: 1,
PASS: 2, PASS: 2,
REJECT: 3,
REJECT: 3
} }
/** /**
@ -133,7 +133,7 @@ export const supplierOrderStatusEnum = {
FINISHED: 30213, FINISHED: 30213,
WAIT_CLIENT_REPAY: 30217, WAIT_CLIENT_REPAY: 30217,
REPAYING: 30216, REPAYING: 30216,
CANCELED: 30212,
CANCELED: 30212
} }
/** /**
* 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216 * 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216
@ -150,7 +150,7 @@ export const supplierOrderStatusMap = {
[supplierOrderStatusEnum.FINISHED]: '已完成', [supplierOrderStatusEnum.FINISHED]: '已完成',
[supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待客户还款', [supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待客户还款',
[supplierOrderStatusEnum.REPAYING]: '还款中', [supplierOrderStatusEnum.REPAYING]: '还款中',
[supplierOrderStatusEnum.CANCELED]: '已取消',
[supplierOrderStatusEnum.CANCELED]: '已取消'
} }
/** /**
@ -159,13 +159,13 @@ export const supplierOrderStatusMap = {
export const paymentMethodEnum = { export const paymentMethodEnum = {
WECHAT_PAY: 1, WECHAT_PAY: 1,
MONTHLY_PAY: 2, MONTHLY_PAY: 2,
FLY_PAY: 4,
FLY_PAY: 4
} }
export const paymentMethodMap = { export const paymentMethodMap = {
[paymentMethodEnum.WECHAT_PAY]: '微信支付', [paymentMethodEnum.WECHAT_PAY]: '微信支付',
[paymentMethodEnum.MONTHLY_PAY]: '月结支付', [paymentMethodEnum.MONTHLY_PAY]: '月结支付',
[paymentMethodEnum.FLY_PAY]: '飞算支付',
[paymentMethodEnum.FLY_PAY]: '飞算支付'
} }
/** /**
@ -175,7 +175,7 @@ export const financeStatusEnum = {
WAIT_CLIENT_LOAN: 30181, WAIT_CLIENT_LOAN: 30181,
WAIT_FINANCE: 30182, WAIT_FINANCE: 30182,
FINISHED: 30183, FINISHED: 30183,
FAILED: 30184,
FAILED: 30184
} }
/** /**
@ -185,7 +185,7 @@ export const financeStatusMap = {
[financeStatusEnum.WAIT_CLIENT_LOAN]: '待客户借款', [financeStatusEnum.WAIT_CLIENT_LOAN]: '待客户借款',
[financeStatusEnum.WAIT_FINANCE]: '待融资', [financeStatusEnum.WAIT_FINANCE]: '待融资',
[financeStatusEnum.FINISHED]: '已融资', [financeStatusEnum.FINISHED]: '已融资',
[financeStatusEnum.FAILED]: '融资失败',
[financeStatusEnum.FAILED]: '融资失败'
} }
/** /**
@ -193,10 +193,10 @@ export const financeStatusMap = {
*/ */
export const contractTypeEnum = { export const contractTypeEnum = {
ORDER_CONTRACT: 1, ORDER_CONTRACT: 1,
GUARANTEE_CONTRACT: 2,
GUARANTEE_CONTRACT: 2
} }
export const contractTypeMap = { export const contractTypeMap = {
[contractTypeEnum.ORDER_CONTRACT]: '订单合同', [contractTypeEnum.ORDER_CONTRACT]: '订单合同',
[contractTypeEnum.GUARANTEE_CONTRACT]: '担保合同',
[contractTypeEnum.GUARANTEE_CONTRACT]: '担保合同'
} }

38
pages/client-credit/index.vue

@ -89,7 +89,8 @@ export default {
searchList: [], searchList: [],
supplierList: [], supplierList: [],
hasCreditList: [], hasCreditList: [],
isFinishedContract: false //
isFinishedContract: false, //
timer: null
} }
}, },
onLoad(option) { 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: { methods: {
back, back,
showCompany(e) { showCompany(e) {
@ -192,17 +199,23 @@ export default {
this.creditType = creditType this.creditType = creditType
}, },
getCreditList(data) { 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() { created() {
@ -227,7 +240,6 @@ export default {
} }
}, },
['form.enterpriseId']() { ['form.enterpriseId']() {
console.log('form.enterpriseId', this.form)
if (this.form.enterpriseId && this.form.supplierId) { if (this.form.enterpriseId && this.form.supplierId) {
this.getCreditList({ mallSupplierId: this.form.supplierId, customerEnterpriseId: this.form.enterpriseId }) this.getCreditList({ mallSupplierId: this.form.supplierId, customerEnterpriseId: this.form.enterpriseId })
} }

4
pages/client-detail/index.vue

@ -134,7 +134,9 @@ export default {
go2('page-view', { title: '实名认证', url: encodeURIComponent(res) }) go2('page-view', { title: '实名认证', url: encodeURIComponent(res) })
// #endif // #endif
// #ifdef H5 // #ifdef H5
window ? (window.location.href = res) : ''
if (window) {
window.location.href = res
}
// #endif // #endif
} }
}) })

8
pages/client-list/index.vue

@ -147,20 +147,12 @@ export default {
return this.$store.state.qnToken != '' return this.$store.state.qnToken != ''
} }
}, },
mounted() {
// getArea().then((res) => {
// if (res) {
// this.items = res
// }
// })
},
onLoad(option) { onLoad(option) {
if (option) { if (option) {
option.latitude && (this.params.latitude = option.latitude) option.latitude && (this.params.latitude = option.latitude)
option.longitude && (this.params.longitude = option.longitude) option.longitude && (this.params.longitude = option.longitude)
option.km && (this.params.km = option.km) option.km && (this.params.km = option.km)
} }
// this.getList()
} }
} }
</script> </script>

10
pages/guarantee-agreement/index.vue

@ -180,10 +180,12 @@ export default {
getGuaranteeContract({ mallSupplierId: this.params.mallSupplierId, customerEnterpriseId: this.params.enterpriseId }).then((res) => { getGuaranteeContract({ mallSupplierId: this.params.mallSupplierId, customerEnterpriseId: this.params.enterpriseId }).then((res) => {
if (res) { if (res) {
// #ifdef APP-PLUS // #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 // #endif
// #ifdef H5 // #ifdef H5
window ? (window.location.href = res) : ''
if (window) {
window.location.href = res
}
// #endif // #endif
} }
}) })
@ -200,7 +202,9 @@ export default {
go2('page-view', { title: '实名认证', url: encodeURIComponent(res) }) go2('page-view', { title: '实名认证', url: encodeURIComponent(res) })
// #endif // #endif
// #ifdef H5 // #ifdef H5
window ? (window.location.href = res) : ''
if (window) {
window.location.href = res
}
// #endif // #endif
} }
}) })

14
pages/mall/index.vue

@ -6,7 +6,7 @@
<view slot="right" class="right-title" @tap="shareTap">分享</view> <view slot="right" class="right-title" @tap="shareTap">分享</view>
</uni-nav-bar> </uni-nav-bar>
<view class="top-box" :style="backgroundStyle"> <view class="top-box" :style="backgroundStyle">
<view class=""><image class="image" :src="logo" mode=""></image></view>
<view><image class="image" :src="logo" mode=""></image></view>
<view class="center"> <view class="center">
<view class="title">{{ storeInformation.name }}</view> <view class="title">{{ storeInformation.name }}</view>
<view class="desc">全部商品 {{ storeInformation.productNumber }} &nbsp; | &nbsp;上新 {{ storeInformation.currentProductNumber }}</view> <view class="desc">全部商品 {{ storeInformation.productNumber }} &nbsp; | &nbsp;上新 {{ storeInformation.currentProductNumber }}</view>
@ -28,10 +28,10 @@
:src="item.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" :src="item.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode="" mode=""
></image> ></image>
<view class="" style="width: 100%">
<view style="flex: 1 1 auto">
<view class="title"> <view class="title">
<view class="">{{ item.name }}</view>
<view class="">
<view>{{ item.name }}</view>
<view>
<image <image
class="icon" class="icon"
:src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" :src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'"
@ -49,9 +49,9 @@
<view class="other"> <view class="other">
<view class="time">{{ item.updateTime | timeFilter }}</view> <view class="time">{{ item.updateTime | timeFilter }}</view>
<view class="btn"> <view class="btn">
<view class="" @click="editPaper(item)" v-if="item.status === 30112">编辑</view>
<view @click="editPaper(item)" v-if="item.status === 30112">编辑</view>
<view class="divide"></view> <view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view>
<view @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -71,7 +71,7 @@
<view v-show="hasLogin && !hasCompany" class="flex-col-center-center" style="margin-top: 100rpx"> <view v-show="hasLogin && !hasCompany" class="flex-col-center-center" style="margin-top: 100rpx">
<text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text> <text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text>
</view> </view>
<view class="" v-show="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view>
<view v-show="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view>
</view> </view>
<view class="flex-col section_4" v-show="visible"> <view class="flex-col section_4" v-show="visible">
<image src="/static/imgs/mall/close-icon.png" class="image_9" @click="closeShare" /> <image src="/static/imgs/mall/close-icon.png" class="image_9" @click="closeShare" />

364
pages/message/system-message.vue

@ -1,195 +1,195 @@
<template> <template>
<view class="system-message">
<scroll-list ref="messageRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item, index) in list" :key="index">
<view class="system-message-main">
<view class="system-message-main-top">
<view class="system-message-title">
<view class="">{{ item.messageType | meesageTypeFilter }}</view>
<view class="dian" v-if="item.readOrNot === 0"></view>
</view>
<view class="system-message-subtitle">{{ item.createTime }}</view>
</view>
<view class="system-message-contant">{{ item.content }}</view>
</view>
</view>
</scroll-list>
</view>
<view class="system-message">
<scroll-list ref="messageRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item, index) in list" :key="index">
<view class="system-message-main">
<view class="system-message-main-top">
<view class="system-message-title">
<view class="">{{ item.messageType | meesageTypeFilter }}</view>
<view class="dian" v-if="item.readOrNot === 0"></view>
</view>
<view class="system-message-subtitle">{{ item.createTime }}</view>
</view>
<view class="system-message-contant">{{ item.content }}</view>
</view>
</view>
</scroll-list>
</view>
</template> </template>
<script> <script>
import { systemMessageList, systemRead } from '@/apis/trade' import { systemMessageList, systemRead } from '@/apis/trade'
export default { export default {
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无消息~',
background: '#F7F8FA',
fontSize: '40rpx'
},
pagination: {
pageNum: 0, //
pageSize: 10
},
list: []
}
},
filters: {
meesageTypeFilter(value) {
var mes = ''
if (value) {
switch (value) {
case 1:
mes = '客户下单'
break
case 2:
mes = '客户付款'
break
case 3:
mes = '客户收货'
break
case 4:
mes = '客户询价'
break
case 4:
mes = '取消订单'
bre
default:
break
}
}
return mes
// 1- 2- 3- 4- 5-
}
},
onLoad(option) {
this.queryData()
},
methods: {
queryData() {
return new Promise((resolve, reject) => {
systemMessageList({ ...this.pagination })
.then(res => {
if (res) {
var data = res.records
var count = 0
for (let i = 0; i < data.length; i++) {
if (data[i].readOrNot === 0) {
count = count + 1
}
}
this.$emit('systemCount', count)
if (this.pagination.pageNum === 0) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch(err => {
reject(err)
})
})
},
//
quotationUp(page) {
this.pagination.pageNum++
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.loadFail()
})
},
//
quotationDown() {
this.pagination.pageNum = 0
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.refreshFail()
})
},
allread() {
return new Promise((resolve, reject) => {
var meesage = this.list.map(item => {
return item.id
})
var params = {
messageIds:meesage
}
systemRead(params)
.then(res => {
if (res) {
uni.showToast({
title: '操作成功',
icon: 'success'
})
this.pagination.pageNum = 0
this.queryData()
this.$emit('systemCount', 0)
} else {
reject()
}
})
.catch(err => {
reject(err)
})
})
}
}
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无消息~',
background: '#F7F8FA',
fontSize: '40rpx'
},
pagination: {
pageNum: 0, //
pageSize: 10
},
list: []
}
},
filters: {
meesageTypeFilter(value) {
var mes = ''
if (value) {
switch (value) {
case 1:
mes = '客户下单'
break
case 2:
mes = '客户付款'
break
case 3:
mes = '客户收货'
break
case 4:
mes = '客户询价'
break
case 4:
mes = '取消订单'
break
default:
break
}
}
return mes
// 1- 2- 3- 4- 5-
}
},
onLoad(option) {
this.queryData()
},
methods: {
queryData() {
return new Promise((resolve, reject) => {
systemMessageList({ ...this.pagination })
.then((res) => {
if (res) {
var data = res.records
var count = 0
for (let i = 0; i < data.length; i++) {
if (data[i].readOrNot === 0) {
count = count + 1
}
}
this.$emit('systemCount', count)
if (this.pagination.pageNum === 0) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch((err) => {
reject(err)
})
})
},
//
quotationUp(page) {
this.pagination.pageNum++
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.loadFail()
})
},
//
quotationDown() {
this.pagination.pageNum = 0
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.refreshFail()
})
},
allread() {
return new Promise((resolve, reject) => {
var meesage = this.list.map((item) => {
return item.id
})
var params = {
messageIds: meesage
}
systemRead(params)
.then((res) => {
if (res) {
uni.showToast({
title: '操作成功',
icon: 'success'
})
this.pagination.pageNum = 0
this.queryData()
this.$emit('systemCount', 0)
} else {
reject()
}
})
.catch((err) => {
reject(err)
})
})
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.system-message { .system-message {
.system-message-main {
background-color: #ffffff;
margin: 20rpx 32rpx;
border-radius: 20rpx;
}
.system-message-main-top {
display: flex;
justify-content: space-between;
padding: 24rpx 32rpx;
}
.system-message-title {
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
font-weight: 600;
display: flex;
}
.system-message-subtitle {
font-size: 24rpx;
color: #333333;
font-weight: 400;
}
.system-message-contant {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
padding: 0rpx 32rpx;
line-height: 40rpx;
overflow: auto;
max-height: 100rpx;
height: 100rpx;
}
.dian {
background: #ff0000;
height: 14rpx;
width: 14rpx;
border-radius: 20rpx;
margin-left: 10rpx;
}
.system-message-main {
background-color: #ffffff;
margin: 20rpx 32rpx;
border-radius: 20rpx;
}
.system-message-main-top {
display: flex;
justify-content: space-between;
padding: 24rpx 32rpx;
}
.system-message-title {
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
font-weight: 600;
display: flex;
}
.system-message-subtitle {
font-size: 24rpx;
color: #333333;
font-weight: 400;
}
.system-message-contant {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
padding: 0rpx 32rpx;
line-height: 40rpx;
overflow: auto;
max-height: 100rpx;
height: 100rpx;
}
.dian {
background: #ff0000;
height: 14rpx;
width: 14rpx;
border-radius: 20rpx;
margin-left: 10rpx;
}
} }
</style> </style>

45
pages/mine/index.vue

@ -166,23 +166,23 @@ export default {
tradeRange: [ tradeRange: [
{ {
text: '本月', text: '本月',
value: currentMonth.join('~'),
value: currentMonth.join('~')
}, },
{ {
text: '上月', text: '上月',
value: lastMonth.join('~'),
value: lastMonth.join('~')
}, },
{ {
text: '总计', text: '总计',
value: '',
},
value: ''
}
], ],
tradeDate: currentMonth.join('~'), tradeDate: currentMonth.join('~'),
tradeData: { tradeData: {
tradingVolume: 0, tradingVolume: 0,
volumeOfBusiness: 0, volumeOfBusiness: 0,
orderQuantity: 0,
},
orderQuantity: 0
}
} }
}, },
@ -195,7 +195,7 @@ export default {
if (!this.hasCompany) { if (!this.hasCompany) {
uni.showToast({ uni.showToast({
title: '您还没有企业信息,请先完善企业信息', title: '您还没有企业信息,请先完善企业信息',
icon: 'none',
icon: 'none'
}) })
return return
} }
@ -210,7 +210,9 @@ export default {
go2('page-view', { title: '实名认证', url: encodeURIComponent(res) }) go2('page-view', { title: '实名认证', url: encodeURIComponent(res) })
// #endif // #endif
// #ifdef H5 // #ifdef H5
window ? (window.location.href = res) : ''
if (window) {
window.location.href = res
}
// #endif // #endif
} }
}) })
@ -222,7 +224,7 @@ export default {
if (!this.hasCompany) { if (!this.hasCompany) {
uni.showToast({ uni.showToast({
title: '您还没有企业,请先加入企业', title: '您还没有企业,请先加入企业',
icon: 'none',
icon: 'none'
}) })
return return
} }
@ -234,7 +236,7 @@ export default {
} else { } else {
uni.showToast({ uni.showToast({
title: '请先完善企业信息', title: '请先完善企业信息',
icon: 'none',
icon: 'none'
}) })
} }
}, },
@ -246,9 +248,9 @@ export default {
uni.showToast({ uni.showToast({
title: '复制成功', title: '复制成功',
icon: 'none', icon: 'none',
duration: 2000,
duration: 2000
}) })
},
}
}) })
}, },
// //
@ -263,19 +265,16 @@ export default {
getOrderStatistics({ getOrderStatistics({
beginDate, beginDate,
endDate, endDate,
currentSupplier,
currentSupplier
}).then((res) => { }).then((res) => {
console.log('res', res) console.log('res', res)
if (res) { if (res) {
this.tradeData = res this.tradeData = res
} }
}) })
},
}
}, },
watch: { watch: {
tradeDate(val) {
console.log('val:', val)
},
'$store.state.supplierInfo.supplierId': { '$store.state.supplierInfo.supplierId': {
handler(val) { handler(val) {
console.log('切换了供应商:', val) console.log('切换了供应商:', val)
@ -283,7 +282,7 @@ export default {
this.getStatistics() this.getStatistics()
} }
}, },
immediate: true,
immediate: true
}, },
tradeDate() { tradeDate() {
this.getStatistics() this.getStatistics()
@ -294,10 +293,10 @@ export default {
this.tradeData = { this.tradeData = {
tradingVolume: 0, tradingVolume: 0,
volumeOfBusiness: 0, volumeOfBusiness: 0,
orderQuantity: 0,
orderQuantity: 0
} }
} }
},
}
}, },
computed: { computed: {
vipExpireTime() { vipExpireTime() {
@ -330,9 +329,9 @@ export default {
avatar: this.$store.state.userInfo.avatar || '', avatar: this.$store.state.userInfo.avatar || '',
name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '', name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '',
supplierName: this.$store.state.supplierInfo.name || '', supplierName: this.$store.state.supplierInfo.name || '',
fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus || 1,
fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus || 1
} }
},
}
}, },
onLoad() {}, onLoad() {},
onShow() { onShow() {
@ -343,7 +342,7 @@ export default {
} }
}) })
this.hasLogin && this.getStatistics() this.hasLogin && this.getStatistics()
},
}
} }
</script> </script>

2
pages/month-credit/index.vue

@ -70,7 +70,7 @@ export default {
duration: 2000, duration: 2000,
success: () => { success: () => {
setTimeout(() => { setTimeout(() => {
go2('client-credit', {}, true)
go2('client-credit', { enterpriseId: this.form.enterpriseId, name: this.form.enterpriseName }, true)
}, 2000) }, 2000)
} }
}) })

4
pages/order-detail/index.vue

@ -396,7 +396,9 @@ export default {
go2('page-view', { title: '供应商订单签约', url: encodeURIComponent(res.signUrl), params: this.params }) go2('page-view', { title: '供应商订单签约', url: encodeURIComponent(res.signUrl), params: this.params })
// #endif // #endif
// #ifdef H5 // #ifdef H5
window ? (window.location.href = res.signUrl) : ''
if (window) {
window.location.href = res.signUrl
}
// #endif // #endif
} }
} }

11
pages/page-view/index.vue

@ -11,13 +11,15 @@ export default {
data() { data() {
return { return {
url: '', url: '',
socket: null
socket: null,
params: null
} }
}, },
onLoad(option) { onLoad(option) {
if (option) { if (option) {
this.url = decodeURIComponent(option.url) this.url = decodeURIComponent(option.url)
console.log(this.url, option)
this.params = JSON.parse(option.params)
console.log('params', option.params)
} else { } else {
uni.showToast({ uni.showToast({
title: '参数错误', title: '参数错误',
@ -41,6 +43,11 @@ export default {
* @param {Object} data {data:{},type:''} * @param {Object} data {data:{},type:''}
*/ */
getMessage(data) { getMessage(data) {
//
if (data.type === 'guaranteeSuccess') {
go2('fs-credit', { ...this.params }, true)
}
//
if (data.type == 'zzgSupplierTCSignSuccess') { if (data.type == 'zzgSupplierTCSignSuccess') {
go2('order-detail', { orderId: data.data.orderId }, true) go2('order-detail', { orderId: data.data.orderId }, true)
} }

74
pages/trade/quotationList.vue

@ -1,50 +1,30 @@
<template> <template>
<view class="quotation-list"> <view class="quotation-list">
<scroll-list
ref="quotationRef"
:option="option"
@load="quotationUp"
@refresh="quotationDown"
>
<view
v-for="(item, index) in list"
:key="index"
style="margin-bottom: 20rpx"
>
<scroll-list ref="quotationRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item, index) in list" :key="index" style="margin-bottom: 20rpx">
<view class="list-border list-title-line"> <view class="list-border list-title-line">
<text class="list-title">{{ item.belongEnterpriseName }}</text> <text class="list-title">{{ item.belongEnterpriseName }}</text>
<text class="list-title-Subtitle">{{
item.replyStatus | replyStatusName
}}</text>
<text class="list-title-Subtitle">{{ item.replyStatus | replyStatusName }}</text>
</view> </view>
<view class="" @click="offerClick(item)"> <view class="" @click="offerClick(item)">
<view class="list-border list-info-line"> <view class="list-border list-info-line">
<view <view
class="list-info" class="list-info"
:class="
subIndex + 1 === item.itemList.length ? '' : 'list-border'
"
:class="subIndex + 1 === item.itemList.length ? '' : 'list-border'"
v-for="(subItem, subIndex) in item.itemList" v-for="(subItem, subIndex) in item.itemList"
:key="subIndex" :key="subIndex"
> >
<view class=""> <view class="">
<image <image
class="list-image" class="list-image"
:src="
subItem.productImg ||
'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'
"
:src="subItem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode="" mode=""
></image> ></image>
</view> </view>
<view class="list-info-contant"> <view class="list-info-contant">
<view class="list-info-title">{{ subItem.paperName }}</view> <view class="list-info-title">{{ subItem.paperName }}</view>
<view class="list-info-text"> <view class="list-info-text">
{{ subItem.brandName }}/{{ subItem.categoryName }}/{{
subItem.gramWeight
}}g/{{ subItem.width }}*{{ subItem.length }}/{{
subItem.quantity
}}
{{ subItem.brandName }}/{{ subItem.categoryName }}/{{ subItem.gramWeight }}g/{{ subItem.width }}*{{ subItem.length }}/{{ subItem.quantity }}
</view> </view>
</view> </view>
</view> </view>
@ -63,9 +43,7 @@
<text>报价截止</text> <text>报价截止</text>
<text>{{ item.enquiryValidTime }}</text> <text>{{ item.enquiryValidTime }}</text>
</view> </view>
<view
><button type="primary" class="offer-btn">报价</button></view
>
<view><button type="primary" class="offer-btn">报价</button></view>
</view> </view>
</view> </view>
</view> </view>
@ -73,11 +51,7 @@
</scroll-list> </scroll-list>
<view> <view>
<view class="offer-prices" @click="nativeTo()"> <view class="offer-prices" @click="nativeTo()">
<image
class="my-image"
src="../../static/imgs/trade/myPrice.png"
mode=""
></image>
<image class="my-image" src="../../static/imgs/trade/myPrice.png" mode=""></image>
<view class="my-price">我的报价</view> <view class="my-price">我的报价</view>
</view> </view>
</view> </view>
@ -92,17 +66,15 @@ export default {
props: { props: {
queryData: { queryData: {
type: Object, type: Object,
default: () => {},
default: () => {}
}, },
},
components: {
uGap,
},
props: {
refresh: { refresh: {
type: Boolean, type: Boolean,
default: false,
},
default: false
}
},
components: {
uGap
}, },
data() { data() {
return { return {
@ -111,25 +83,25 @@ export default {
auto: true, auto: true,
emptyText: '暂无报价信息~', emptyText: '暂无报价信息~',
fontSize: '40rpx', fontSize: '40rpx',
emptyImage: '/static/imgs/client-detail/no-data-icon.png',
emptyImage: '/static/imgs/client-detail/no-data-icon.png'
}, },
params: { params: {
asc: '', asc: '',
desc: '', desc: '',
mallSupplierIds: [this.$store.state.supplierInfo.supplierId], // ID
mallSupplierIds: [this.$store.state.supplierInfo.supplierId] // ID
// mallSupplierIds: ['553703427180466176'] // ID // mallSupplierIds: ['553703427180466176'] // ID
}, },
pagination: { pagination: {
pageNum: 0, // pageNum: 0, //
pageSize: 20,
pageSize: 20
}, },
list: [],
list: []
} }
}, },
watch: { watch: {
refresh() { refresh() {
this.quotationDown() this.quotationDown()
},
}
}, },
filters: { filters: {
replyStatusName(status) { replyStatusName(status) {
@ -152,7 +124,7 @@ export default {
break break
} }
return name return name
},
}
}, },
methods: { methods: {
// //
@ -205,15 +177,15 @@ export default {
offerClick(item) { offerClick(item) {
var params = { var params = {
...item, ...item,
title: '提交报价',
title: '提交报价'
} }
go2('submit-quotation', params) go2('submit-quotation', params)
}, },
// //
nativeTo() { nativeTo() {
go2('my-offer') go2('my-offer')
},
},
}
}
} }
</script> </script>

19
pages/vip-center/index.vue

@ -57,12 +57,12 @@
</view> </view>
</template> </template>
<script> <script>
import { back } from '@/utils/hook.js'
import { back, go2 } from '@/utils/hook.js'
import { openVip, openVipPay } from '@/apis/commonApi.js' import { openVip, openVipPay } from '@/apis/commonApi.js'
export default { export default {
data() { data() {
return { return {
money: 10000,
money: 10000
} }
}, },
methods: { methods: {
@ -70,12 +70,12 @@ export default {
payForVip() { payForVip() {
openVip({ openVip({
mallSupplierId: this.$store.state.supplierInfo.supplierId, mallSupplierId: this.$store.state.supplierInfo.supplierId,
type: 1, //
type: 1 //
}).then((res) => { }).then((res) => {
if (res) { if (res) {
openVipPay({ openVipPay({
tradeOrderId: res.orderId, tradeOrderId: res.orderId,
channelId: res.channelId,
channelId: res.channelId
}).then((info) => { }).then((info) => {
if (info) { if (info) {
console.log('info', info) console.log('info', info)
@ -86,26 +86,27 @@ export default {
uni.showToast({ uni.showToast({
title: '支付成功', title: '支付成功',
icon: 'none', icon: 'none',
duration: 1500,
duration: 1500
}) })
setTimeout(() => { setTimeout(() => {
go2('mine', {}, true) go2('mine', {}, true)
}, 1500) }, 1500)
}, },
fail: (err) => { fail: (err) => {
console.log('err', err)
uni.showToast({ uni.showToast({
title: '支付失败', title: '支付失败',
icon: 'none', icon: 'none',
duration: 1500,
duration: 1500
}) })
},
}
}) })
} }
}) })
} }
}) })
},
},
}
}
} }
</script> </script>

BIN
static/imgs/client-list/contact-icon.png

Before After
Width: 52  |  Height: 52  |  Size: 1.8 KiB

BIN
static/imgs/client-list/phone-icon.png

Before After
Width: 52  |  Height: 52  |  Size: 1.6 KiB

BIN
static/logo.png

Before After
Width: 72  |  Height: 72  |  Size: 6.6 KiB Width: 100  |  Height: 100  |  Size: 10 KiB

2
store/index.js

@ -236,7 +236,7 @@ if (!store) {
commit('removeSupplierInfo') commit('removeSupplierInfo')
}, },
addSearchHistory({ commit, state }, searchHistory) { addSearchHistory({ commit, state }, searchHistory) {
const arr = [...state.searchHistory] // 单层数组直接解构
let arr = [...state.searchHistory] // 单层数组直接解构
let index = arr.findIndex((item) => item === searchHistory) let index = arr.findIndex((item) => item === searchHistory)
if (index > -1) { if (index > -1) {
arr.splice(index, 1) arr.splice(index, 1)

BIN
unpackage/res/icons/1024x1024.png

Before After
Width: 1024  |  Height: 1024  |  Size: 96 KiB Width: 1024  |  Height: 1024  |  Size: 109 KiB

BIN
unpackage/res/icons/120x120.png

Before After
Width: 120  |  Height: 120  |  Size: 6.4 KiB Width: 120  |  Height: 120  |  Size: 6.9 KiB

BIN
unpackage/res/icons/144x144.png

Before After
Width: 144  |  Height: 144  |  Size: 7.8 KiB Width: 144  |  Height: 144  |  Size: 8.4 KiB

BIN
unpackage/res/icons/152x152.png

Before After
Width: 152  |  Height: 152  |  Size: 8.2 KiB Width: 152  |  Height: 152  |  Size: 9.1 KiB

BIN
unpackage/res/icons/167x167.png

Before After
Width: 167  |  Height: 167  |  Size: 9.2 KiB Width: 167  |  Height: 167  |  Size: 11 KiB

BIN
unpackage/res/icons/180x180.png

Before After
Width: 180  |  Height: 180  |  Size: 9.8 KiB Width: 180  |  Height: 180  |  Size: 12 KiB

BIN
unpackage/res/icons/192x192.png

Before After
Width: 192  |  Height: 192  |  Size: 11 KiB Width: 192  |  Height: 192  |  Size: 12 KiB

BIN
unpackage/res/icons/20x20.png

Before After
Width: 20  |  Height: 20  |  Size: 879 B Width: 20  |  Height: 20  |  Size: 734 B

BIN
unpackage/res/icons/29x29.png

Before After
Width: 29  |  Height: 29  |  Size: 1.3 KiB Width: 29  |  Height: 29  |  Size: 1.1 KiB

BIN
unpackage/res/icons/40x40.png

Before After
Width: 40  |  Height: 40  |  Size: 1.9 KiB Width: 40  |  Height: 40  |  Size: 1.8 KiB

BIN
unpackage/res/icons/58x58.png

Before After
Width: 58  |  Height: 58  |  Size: 2.8 KiB Width: 58  |  Height: 58  |  Size: 2.9 KiB

BIN
unpackage/res/icons/60x60.png

Before After
Width: 60  |  Height: 60  |  Size: 3.0 KiB Width: 60  |  Height: 60  |  Size: 3.2 KiB

BIN
unpackage/res/icons/72x72.png

Before After
Width: 72  |  Height: 72  |  Size: 3.7 KiB Width: 72  |  Height: 72  |  Size: 3.9 KiB

BIN
unpackage/res/icons/76x76.png

Before After
Width: 76  |  Height: 76  |  Size: 3.9 KiB Width: 76  |  Height: 76  |  Size: 4.2 KiB

BIN
unpackage/res/icons/80x80.png

Before After
Width: 80  |  Height: 80  |  Size: 4.0 KiB Width: 80  |  Height: 80  |  Size: 4.4 KiB

BIN
unpackage/res/icons/87x87.png

Before After
Width: 87  |  Height: 87  |  Size: 4.2 KiB Width: 87  |  Height: 87  |  Size: 4.8 KiB

BIN
unpackage/res/icons/96x96.png

Before After
Width: 96  |  Height: 96  |  Size: 5.1 KiB Width: 96  |  Height: 96  |  Size: 5.3 KiB
Loading…
Cancel
Save