Commit fec45f90 by 前端

Merge branch 'SAAS+V5.6.1' into 'develop'

上线合并

See merge request !486
2 parents 3ac5dcf5 aa7351a1
Showing 129 changed files with 3046 additions and 524 deletions
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[wxml]": { "[wxml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "1251208555.wxml-pretty"
}, },
"[wxss]": { "[wxss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
...@@ -109,5 +109,7 @@ ...@@ -109,5 +109,7 @@
"gitlens.codeLens.recentChange.enabled": true, "gitlens.codeLens.recentChange.enabled": true,
"gitlens.currentLineBlame": true, "gitlens.currentLineBlame": true,
"gitlens.currentLineBlame.format": "${author}, ${date} - ${message}", "gitlens.currentLineBlame.format": "${author}, ${date} - ${message}",
"gitlens.blame.visibility": "on" "gitlens.blame.visibility": "on",
// 待团队讨论后再开启
"prettier.enable": false
} }
\ No newline at end of file \ No newline at end of file
...@@ -433,34 +433,98 @@ module.exports = { ...@@ -433,34 +433,98 @@ module.exports = {
}, },
// 获取北森token // 获取北森token
findBeiSenSSOToken(data) { findBeiSenSSOToken(data) {
return api.post('dj.pad.api.beisen.findBeiSenSSOToken', data, [], '/rop-dj-pad/router') return api.post(
'dj.pad.api.beisen.findBeiSenSSOToken',
data,
[],
'/rop-dj-pad/router'
)
}, },
// 获取学习中心权限 // 获取学习中心权限
getStudyCenterPermission(data) { getStudyCenterPermission(data) {
return api.post('dj.pad.api.staff.study.center.access.auth.verify', data, [], '/rop-dj-pad/router') return api.post(
'dj.pad.api.staff.study.center.access.auth.verify',
data,
[],
'/rop-dj-pad/router'
)
}, },
// 学习中心开单限制 // 学习中心开单限制
checkStudyTaskAPI(data) { checkStudyTaskAPI(data) {
return api.post('dj.api.pad.learning.center.study.permission', data, [], '/rop-dj-pad/router') return api.post(
'dj.api.pad.learning.center.study.permission',
data,
[],
'/rop-dj-pad/router'
)
}, },
// 学习中心开始测评弹窗 // 学习中心开始测评弹窗
learninglevelExam(data) { learninglevelExam(data) {
return api.post('dj.api.pad.learning.center.level.exam', data, [], '/rop-dj-pad/router') return api.post(
'dj.api.pad.learning.center.level.exam',
data,
[],
'/rop-dj-pad/router'
)
}, },
// 查询北森考试结果 // 查询北森考试结果
getBeisenExamResult(data) { getBeisenExamResult(data) {
return api.post('dj.api.pad.learning.center.beisen.exam.result', data, [], '/rop-dj-pad/router') return api.post(
'dj.api.pad.learning.center.beisen.exam.result',
data,
[],
'/rop-dj-pad/router'
)
}, },
// 学习中心-短课程详情 // 学习中心-短课程详情
getShortCourseDetail(data) { getShortCourseDetail(data) {
return api.post('dj.pad.api.staff.study.short.course.detail', data, [], '/rop-dj-pad/router') return api.post(
'dj.pad.api.staff.study.short.course.detail',
data,
[],
'/rop-dj-pad/router'
)
}, },
// 上传视频文件返回封面 // 上传视频文件返回封面
uploadFileWithCover(data) { uploadFileWithCover(data) {
return api.post('dj.api.smartcarlife.common.uploadVideo.returnWithCover', data, ['file']) return api.post(
'dj.api.smartcarlife.common.uploadVideo.returnWithCover',
data,
['file']
)
}, },
// 获取员工日报/周报/月报模版 // 获取员工日报/周报/月报模版
getStaffTemplate(data) { getStaffTemplate(data) {
return api.post('dj.api.carboutique.find.staff.good.news.template', data) return api.post('dj.api.carboutique.find.staff.good.news.template', data)
},
// 工资申述入口判断
hasPerformanceConfig(data) {
return api.post(
'dj.staff.api.has.performance.config.formerchant',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 接口名称:异常订单锁单信息查询
// 接口地址:dj.api.smartcarlife.goodsOrder.abnormalOrder.lock.select
abnormalOrderLock() {
return api.post(
'dj.api.smartcarlife.goodsOrder.abnormalOrder.lock.select',
{}
)
},
// http://localhost:8081/rop-dj-riskmanage/router//dj.api.staff.miniprogram.salaryapply.daily.report.fill.check/1.0.0
// 检查今天是否在T1-T5之间
salaryapplyFillCheck(data) {
return api.post(
'dj.api.staff.miniprogram.salaryapply.daily.report.fill.check',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
// return api.post(
// 'dj.api.staff.miniprogram.salaryapply.daily.report.fill.check'
// )
} }
} }
...@@ -67,7 +67,11 @@ ...@@ -67,7 +67,11 @@
{ {
"root": "tabDate", "root": "tabDate",
"name": "tabDate", "name": "tabDate",
"pages": ["pages/detail/detail", "pages/apprManage/apprManage", "pages/userPortrait/userPortrait"] "pages": [
"pages/detail/detail",
"pages/apprManage/apprManage",
"pages/userPortrait/userPortrait"
]
}, },
{ {
"root": "integration", "root": "integration",
...@@ -84,12 +88,19 @@ ...@@ -84,12 +88,19 @@
{ {
"root": "tabMine", "root": "tabMine",
"name": "tabMine", "name": "tabMine",
"pages": ["pages/technicianSetup/technicianSetup", "pages/completeBuild/completeBuild", "pages/collectCoupons/collectCoupons"] "pages": [
"pages/technicianSetup/technicianSetup",
"pages/completeBuild/completeBuild",
"pages/collectCoupons/collectCoupons"
]
}, },
{ {
"root": "tabRepairOrder", "root": "tabRepairOrder",
"name": "tabRepairOrder", "name": "tabRepairOrder",
"pages": ["pages/confirmWorkOrder/confirmWorkOrder", "pages/repairOrderDetail/repairOrderDetail"] "pages": [
"pages/confirmWorkOrder/confirmWorkOrder",
"pages/repairOrderDetail/repairOrderDetail"
]
}, },
{ {
"root": "tabWorkOrder", "root": "tabWorkOrder",
...@@ -189,13 +200,18 @@ ...@@ -189,13 +200,18 @@
"pages/recruitManage/recruitDetail/recruitDetail", "pages/recruitManage/recruitDetail/recruitDetail",
"pages/recruitManage/recruitInsert/recruitInsert", "pages/recruitManage/recruitInsert/recruitInsert",
"pages/recruitManage/recruitResult/recruitResult", "pages/recruitManage/recruitResult/recruitResult",
"pages/recruitManage/recruitManage/recruitManage" "pages/recruitManage/recruitManage/recruitManage",
"pages/salaryAppeal/salaryAppeal"
] ]
}, },
{ {
"root": "tabOperating", "root": "tabOperating",
"name": "tabOperating", "name": "tabOperating",
"pages": ["pages/4sOverview/4sOverview", "pages/index/index", "pages/operatingShow/operatingShow"] "pages": [
"pages/4sOverview/4sOverview",
"pages/index/index",
"pages/operatingShow/operatingShow"
]
}, },
{ {
"root": "packageCrowdFunding", "root": "packageCrowdFunding",
...@@ -301,7 +317,9 @@ ...@@ -301,7 +317,9 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示" "desc": "你的位置信息将用于小程序位置接口的效果展示"
} }
}, },
"requiredPrivateInfos": ["getLocation"], "requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"resizable": true "resizable": true
} }
...@@ -231,7 +231,8 @@ Component({ ...@@ -231,7 +231,8 @@ Component({
if (s.goods.goodsId == e.goods.goodsId) { if (s.goods.goodsId == e.goods.goodsId) {
e.active = true e.active = true
e.count = s.count e.count = s.count
e.goods.sellPrice = s.goods.sellPrice // e.goods.sellPrice = s.goods.sellPrice
Object.assign(e.goods, s.goods)
} }
} }
//初始化进来不显示标识 //初始化进来不显示标识
...@@ -246,6 +247,15 @@ Component({ ...@@ -246,6 +247,15 @@ Component({
e.multipleSpecificationsGoods.id e.multipleSpecificationsGoods.id
) { ) {
e.count = s.count e.count = s.count
if (
s.multipleSpecificationsGoods.goods &&
e.multipleSpecificationsGoods.goods
) {
Object.assign(
e.multipleSpecificationsGoods.goods,
s.multipleSpecificationsGoods.goods
)
}
// e.active=s.acitve // e.active=s.acitve
} }
} }
...@@ -283,17 +293,27 @@ Component({ ...@@ -283,17 +293,27 @@ Component({
console.log(arr, 'removeDuplicates') console.log(arr, 'removeDuplicates')
var uniqueArray = [] var uniqueArray = []
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
let goodsType = let goodsType = ''
arr[i].goodsFlag == 1 ? 'goods' : 'multipleSpecificationsGoods.goods' if (arr[i].goodsFlag == 1) {
goodsType = 'goods'
} else if (arr[i].goodsFlag == 2) {
goodsType = 'multipleSpecificationsGoods.goods'
} else if (arr[i].goodsFlag == 3) {
goodsType = 'packageGoods'
}
let value = this.circulation(arr[i], goodsType)[property] let value = this.circulation(arr[i], goodsType)[property]
// 兼容套餐 // 兼容套餐
let result = uniqueArray.some(item => { let result = uniqueArray.some(item => {
let key = let key = ''
item.goodsFlag == 1 if (item.goodsFlag == 1) {
? 'goods' key = 'goods'
: item.goodsFlag == 2 } else if (item.goodsFlag == 2) {
? 'multipleSpecificationsGoods.goods' key = 'multipleSpecificationsGoods.goods'
: '' } else if (item.goodsFlag == 3) {
key = 'packageGoods'
}
let deepValue = this.circulation(item, key) let deepValue = this.circulation(item, key)
return deepValue ? deepValue[property] === value : false return deepValue ? deepValue[property] === value : false
}) })
...@@ -354,7 +374,7 @@ Component({ ...@@ -354,7 +374,7 @@ Component({
if (chooseGoodsList.length > 0) { if (chooseGoodsList.length > 0) {
chooseGoodsList.map(x => { chooseGoodsList.map(x => {
if (x.goods && x.goods.goodsId == c.goods.goodsId) { if (x.goods && x.goods.goodsId == c.goods.goodsId) {
c.goods.price = x.goods.price || 0 Object.assign(c.goods, x.goods)
} }
}) })
} }
...@@ -373,14 +393,27 @@ Component({ ...@@ -373,14 +393,27 @@ Component({
x.multipleSpecificationsGoods.goods.goodsId == x.multipleSpecificationsGoods.goods.goodsId ==
c.multipleSpecificationsGoods.goods.goodsId c.multipleSpecificationsGoods.goods.goodsId
) { ) {
c.multipleSpecificationsGoods.goods.price = Object.assign(
x.multipleSpecificationsGoods.goods.price || 0 c.multipleSpecificationsGoods.goods,
x.multipleSpecificationsGoods.goods
)
} }
} }
}) })
} }
} }
} }
if (c.packageGoods) {
if (chooseGoodsList.length > 0) {
chooseGoodsList.map(x => {
if (x.goodsFlag == 3 && x.packageGoods) {
if (x.packageGoods.goodsId == c.packageGoods.goodsId) {
Object.assign(c.packageGoods, x.packageGoods)
}
}
})
}
}
} }
}) })
return arr return arr
......
...@@ -278,7 +278,6 @@ Component({ ...@@ -278,7 +278,6 @@ Component({
if (data) { if (data) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), subLoginUser: data.subLoginUser }) wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), subLoginUser: data.subLoginUser })
wx.$util.hideLoading() wx.$util.hideLoading()
// wx.$storage.rm('dateStaffPop')
this.eventCallback(item, userInfo?.sceneType, false, data) this.eventCallback(item, userInfo?.sceneType, false, data)
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
......
...@@ -6,42 +6,39 @@ Component({ ...@@ -6,42 +6,39 @@ Component({
properties: { properties: {
//1:精品升级 0 会员权益 //1:精品升级 0 会员权益
sceneType: { sceneType: {
type: String, type: String
}, },
show: { show: {
type: Boolean, type: Boolean,
observer: function (n) { } observer: function (n) {}
}, },
goodsData: { goodsData: {
type: Object, type: Object,
observer: function (n) { observer: function (n) {
console.log(n, '999', this.data.chooseGoodsList) console.log(n, '999', this.data.chooseGoodsList)
this.setGoodsActive(); this.setGoodsActive()
} }
}, },
chooseGoodsList: { chooseGoodsList: {
type: Array, type: Array,
observer: function (n) { observer: function (n) {
// this.setGoodsActive(); // this.setGoodsActive();
}, }
}, }
}, },
observers: { observers: {
'show': function (value, old) { show: function (value, old) {
console.log(value, old, 'show'); console.log(value, old, 'show')
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
thisPage.setData({ thisPage.setData({
scrollDisabled: value scrollDisabled: value
}) })
} }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {},
},
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -49,25 +46,30 @@ Component({ ...@@ -49,25 +46,30 @@ Component({
methods: { methods: {
setGoodsActive() { setGoodsActive() {
//同步数量 //同步数量
let { let { chooseGoodsList, goodsData } = this.data
chooseGoodsList, if (
goodsData goodsData &&
} = this.data; goodsData.multipleSpecificationsGoods &&
goodsData.multipleSpecificationsGoods.skuGoodsList
) {
goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(c => { goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(c => {
if (chooseGoodsList.length > 0) { if (chooseGoodsList && chooseGoodsList.length > 0) {
chooseGoodsList.map(x => { chooseGoodsList.map(x => {
if (x.goodsFlag == 2) { if (x.goodsFlag == 2) {
if (x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.goodsId) { if (
x.multipleSpecificationsGoods.goods &&
x.multipleSpecificationsGoods.goods.goodsId == c.goodsId
) {
c.count = x.count || 0 c.count = x.count || 0
} }
} }
}) })
} }
}) })
this.setData({ this.setData({
goodsData goodsData
}) })
}
}, },
hidePopup() { hidePopup() {
this.setData({ this.setData({
...@@ -76,34 +78,23 @@ Component({ ...@@ -76,34 +78,23 @@ Component({
this.triggerEvent('cancel') this.triggerEvent('cancel')
}, },
choose(e) { choose(e) {
let { let { item, index } = e.currentTarget.dataset
item, let { goodsData } = this.data
index let { active } = item
} = e.currentTarget.dataset
let {
goodsData
} = this.data
let {
active
} = item
//全部取消选择 //全部取消选择
goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(item => item.active = false) goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(
item => (item.active = false)
)
goodsData.multipleSpecificationsGoods.skuGoodsList[index].active = !active goodsData.multipleSpecificationsGoods.skuGoodsList[index].active = !active
this.setData({ this.setData({
goodsData goodsData
}) })
}, },
input(e) { input(e) {
let { let { index } = e.currentTarget.dataset
index let { goodsData } = this.data
} = e.currentTarget.dataset
let {
goodsData
} = this.data
console.log(e) console.log(e)
let { let { value } = e.detail
value
} = e.detail
if (value < 1) value = 1 if (value < 1) value = 1
if (value > 999) value = 999 if (value > 999) value = 999
goodsData.multipleSpecificationsGoods.skuGoodsList[index].count = value goodsData.multipleSpecificationsGoods.skuGoodsList[index].count = value
...@@ -117,10 +108,7 @@ Component({ ...@@ -117,10 +108,7 @@ Component({
}) })
}, },
getChooseList() { getChooseList() {
let { let { chooseGoodsList, goodsData } = this.data
chooseGoodsList,
goodsData
} = this.data;
console.log(chooseGoodsList, goodsData) console.log(chooseGoodsList, goodsData)
let chooseList = [], let chooseList = [],
selectList = [] selectList = []
...@@ -134,10 +122,13 @@ Component({ ...@@ -134,10 +122,13 @@ Component({
goodsFlag: 2, goodsFlag: 2,
isFlag: true, isFlag: true,
multipleSpecificationsGoods: { multipleSpecificationsGoods: {
baseGoodsName: goodsData.multipleSpecificationsGoods.baseGoodsName, baseGoodsName:
goodsData.multipleSpecificationsGoods.baseGoodsName,
id: goodsData.multipleSpecificationsGoods.id, id: goodsData.multipleSpecificationsGoods.id,
specificationGoodsMap: goodsData.multipleSpecificationsGoods.specificationGoodsMap, specificationGoodsMap:
specificationList: goodsData.multipleSpecificationsGoods.specificationList, goodsData.multipleSpecificationsGoods.specificationGoodsMap,
specificationList:
goodsData.multipleSpecificationsGoods.specificationList,
goods: c goods: c
} }
}) })
...@@ -148,43 +139,61 @@ Component({ ...@@ -148,43 +139,61 @@ Component({
if (selectList.length) { if (selectList.length) {
selectList.forEach(c => { selectList.forEach(c => {
if (!c.count) c.count = 1 if (!c.count) c.count = 1
c.multipleSpecificationsGoods.goods.price = c.multipleSpecificationsGoods.goods.sellPrice || 0 let price = c.multipleSpecificationsGoods.goods.sellPrice || 0
// 会员权益
if (this.data.sceneType == '0') {
price = Math.round(price * 100)
}
c.multipleSpecificationsGoods.goods.price = price
if (chooseGoodsList.length > 0) { if (chooseGoodsList.length > 0) {
chooseGoodsList.map(x => { chooseGoodsList.map(x => {
if (x.goodsFlag == 2 && x.multipleSpecificationsGoods) { if (x.goodsFlag == 2 && x.multipleSpecificationsGoods) {
console.log(x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId, 'x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId') console.log(
if (x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId) { x.multipleSpecificationsGoods.goods &&
x.multipleSpecificationsGoods.goods.goodsId ==
c.multipleSpecificationsGoods.goods.goodsId,
'x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId'
)
if (
x.multipleSpecificationsGoods.goods &&
x.multipleSpecificationsGoods.goods.goodsId ==
c.multipleSpecificationsGoods.goods.goodsId
) {
console.log(c) console.log(c)
//精品升级需要处理数量,会员权益不需要 //精品升级需要处理数量,会员权益不需要
x.count = c.multipleSpecificationsGoods.goods.count || 0 x.count = c.multipleSpecificationsGoods.goods.count || 0
} }
} }
}) })
let arr = chooseGoodsList.filter(item => item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) let arr = chooseGoodsList.filter(
item =>
item.multipleSpecificationsGoods &&
item.multipleSpecificationsGoods.goods
)
console.log(arr) console.log(arr)
selectList.forEach(oldval => { selectList.forEach(oldval => {
if (oldval.multipleSpecificationsGoods) { if (oldval.multipleSpecificationsGoods) {
if (!arr.some(newVal => newVal.multipleSpecificationsGoods.goods.goodsId == oldval.multipleSpecificationsGoods.goods.goodsId)) { if (
!arr.some(
newVal =>
newVal.multipleSpecificationsGoods.goods.goodsId ==
oldval.multipleSpecificationsGoods.goods.goodsId
)
) {
chooseList.push(oldval) chooseList.push(oldval)
} }
} }
}) })
} else { } else {
chooseList = selectList chooseList = selectList
} }
}) })
} }
console.log(chooseList, 'chooseList') console.log(chooseList, 'chooseList')
chooseList = chooseList.concat(chooseGoodsList) chooseList = chooseList.concat(chooseGoodsList)
console.log(chooseList, 'chooseList') console.log(chooseList, 'chooseList')
return [selectList, chooseList] return [selectList, chooseList]
}, },
confirm() { confirm() {
let [selectList, chooseList] = this.getChooseList() let [selectList, chooseList] = this.getChooseList()
...@@ -194,22 +203,25 @@ Component({ ...@@ -194,22 +203,25 @@ Component({
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
if (this.data.sceneType == 1) { if (this.data.sceneType == 1) {
thisPage.setData({ thisPage.setData({
goodsList: chooseList, goodsList: chooseList
}); })
thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList); thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList)
} else { } else {
thisPage.setData({ thisPage.setData(
{
['orderInfo.vdQuotationGoodsList']: chooseList ['orderInfo.vdQuotationGoodsList']: chooseList
}, () => { },
() => {
//会员权益 //会员权益
thisPage.totalFee() thisPage.totalFee()
}) }
)
} }
this.setData({ this.setData({
show: false show: false
}) })
}, }
}, },
lifetimes: { lifetimes: {
attached() { attached() {
...@@ -219,5 +231,4 @@ Component({ ...@@ -219,5 +231,4 @@ Component({
}) })
} }
} }
}) })
// components/orderPromptPop/orderPromptPop.js // components/orderPromptPop/orderPromptPop.js
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -18,7 +17,7 @@ Component({ ...@@ -18,7 +17,7 @@ Component({
}, },
includesChildHeight: { includesChildHeight: {
type: String, type: String,
value: 'var(--fontSize980)' value: 'var(--fontSize1020)'
}, },
sceneObj: { sceneObj: {
observer: function (v) { observer: function (v) {
...@@ -46,21 +45,26 @@ Component({ ...@@ -46,21 +45,26 @@ Component({
*/ */
data: { data: {
infoData: {}, infoData: {},
payTypeList: [{ payTypeList: [
{
label: '收款方为门店收款', label: '收款方为门店收款',
value: '3' value: '3'
}, { },
{
label: '收款方为嘀加且属于对公转账收款', label: '收款方为嘀加且属于对公转账收款',
value: '4' value: '4'
}, { },
{
label: '收款方为嘀加二维码收款', label: '收款方为嘀加二维码收款',
value: '5', value: '5',
tips: '适用于已有交易收款流水需补录订单时' tips: '适用于已有交易收款流水需补录订单时'
}, { },
{
label: '特殊收款', label: '特殊收款',
value: '6', value: '6',
tips: '仅用于无法关联流水或混合支付场景,请谨慎选择。' tips: '仅用于无法关联流水或混合支付场景,请谨慎选择。'
}] }
]
}, },
/** /**
......
...@@ -18,12 +18,12 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,12 +18,12 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 4; let index = 2;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
//手动控制体验版环境的请求 true就依据下面index false就默认2 //手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = true; const manual = false;
const release = false; const release = false;
// 判断小程序环境 // 判断小程序环境
...@@ -88,10 +88,12 @@ export const ALIYUN = ALIYUN_LIST[1]; ...@@ -88,10 +88,12 @@ export const ALIYUN = ALIYUN_LIST[1];
export const quotedImgUrl = createQuotedUrl[target[envIndex]]; export const quotedImgUrl = createQuotedUrl[target[envIndex]];
export const scoket_url = scoketURL[target[envIndex]]; export const scoket_url = scoketURL[target[envIndex]];
// sentry Dsn 地址 // sentry Dsn 地址
export const dsnUrl = "https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23"; export const dsnUrl =
"https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23";
// 图片基地址 // 图片基地址
export const ImgUrl = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat"; export const ImgUrl =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat";
export const ossConfig = { export const ossConfig = {
// 请求域名 格式:https://xxx.xxx.com // 请求域名 格式:https://xxx.xxx.com
......
<!--packageCrowdFunding/pages/paymentSuccess/paymentSuccess.wxml--> <!--packageCrowdFunding/pages/paymentSuccess/paymentSuccess.wxml-->
<view class="successPay"> <view class="successPay">
<view class="tips">支付成功</view> <view class="tips">支付成功</view>
<view class="sum">订单支付成功,实付{{orderDetail.totalPrice}}元</view> <view class="sum">订单支付成功,实付{{orderDetail.finalPrice}}元</view>
</view> </view>
<view class="orderInfo"> <view class="orderInfo">
<activity-info OderType="pay" orderInfo="{{orderDetail}}" /> <activity-info OderType="pay" orderInfo="{{orderDetail}}" />
......
...@@ -241,5 +241,9 @@ module.exports = { ...@@ -241,5 +241,9 @@ module.exports = {
// 查询订单可展示按钮类型 // 查询订单可展示按钮类型
getMoreBtnAPI(data) { getMoreBtnAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.button.select', data) return api.post('dj.api.smartcarlife.refundApplyRecord.button.select', data)
},
// 工资申述入口判断
hasPerformanceConfig(data) {
return api.post('dj.staff.api.has.performance.config.formerchant', data, [], '/rop-dj-staff-miniprogram/router')
} }
} }
...@@ -44,7 +44,7 @@ Component({ ...@@ -44,7 +44,7 @@ Component({
{ {
labelName: '实际支付', labelName: '实际支付',
orderType: 'success', orderType: 'success',
key: 'totalPrice' key: 'finalPrice'
}, },
{ {
labelName: '订单状态', labelName: '订单状态',
......
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
</view> </view>
<record-list model:showPopup="{{showPopup}}" deviceOrientation="{{deviceOrientation}}" mode="{{mode}}"></record-list> <record-list model:showPopup="{{showPopup}}" deviceOrientation="{{deviceOrientation}}" mode="{{mode}}"></record-list>
<order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindconfirm="promptHandleConfirm" bindcancel="promptCancel" popupSlotStyle="height: calc(100% - var(--fontSize160));" height="var(--fontSize540);" includesChildHeight="var(--fontSize1020);"></order-prompt-popup> <order-prompt-popup wx:if="{{ showPromptDialog }}" show="{{ showPromptDialog }}" bindconfirm="promptHandleConfirm" bindcancel="promptCancel" popupSlotStyle="height: calc(100% - var(--fontSize160));" height="var(--fontSize540);" includesChildHeight="var(--fontSize1060);"></order-prompt-popup>
<order-no-popup wx:if="{{ tipsProps }}" show="{{ tipsProps }}" title="请选择交易参考号" bind:success="navigator" orderNoList="{{ orderNoList }}" /> <order-no-popup wx:if="{{ tipsProps }}" show="{{ tipsProps }}" title="请选择交易参考号" bind:success="navigator" orderNoList="{{ orderNoList }}" />
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/carEquity/components/EquityList/EquityList.js // packageEquity/pages/carEquity/components/EquityList/EquityList.js
import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl"; import {
checkDailyReport,
checkStudyTask,
checkAbnormalOrder
} from '~/store/ModalToQueueControl'
import carLifeApi from '../../../../carEquityApi' import carLifeApi from '../../../../carEquityApi'
import constantData from '../constant/data' import constantData from '../constant/data'
const TABLIST = ['全部', '待补单', '提单失败', '已完成'] const TABLIST = ['全部', '待补单', '提单失败', '已完成']
...@@ -17,9 +21,7 @@ Component({ ...@@ -17,9 +21,7 @@ Component({
observer(val) { observer(val) {
console.log(val) console.log(val)
if (val == 1) { if (val == 1) {
let { let { list } = this.data
list
} = this.data
setTimeout(() => { setTimeout(() => {
// 解决商品内容提早请求,导致不计算问题 // 解决商品内容提早请求,导致不计算问题
this.setData({ this.setData({
...@@ -38,7 +40,8 @@ Component({ ...@@ -38,7 +40,8 @@ Component({
*/ */
data: { data: {
storeInfo: {}, storeInfo: {},
orderObj: [{ orderObj: [
{
label: '车架号', label: '车架号',
key: 'vin' key: 'vin'
}, },
...@@ -105,12 +108,17 @@ Component({ ...@@ -105,12 +108,17 @@ Component({
*/ */
methods: { methods: {
onLoad(noGetList) { onLoad(noGetList) {
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {}
this.setData({ this.setData({
nothing: false, nothing: false,
pageNum: 1, pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) isOrder: !(
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo?.loginRole == 6
)
}) })
this.getTotal() this.getTotal()
if (!noGetList) this.getList(true) if (!noGetList) this.getList(true)
...@@ -124,9 +132,7 @@ Component({ ...@@ -124,9 +132,7 @@ Component({
}) })
}, },
getTotal() { getTotal() {
let { let { storeInfo } = this.data
storeInfo
} = this.data
carLifeApi carLifeApi
.equityStatistics({ .equityStatistics({
merchantId: storeInfo?.merchantId merchantId: storeInfo?.merchantId
...@@ -134,9 +140,7 @@ Component({ ...@@ -134,9 +140,7 @@ Component({
.then(res => { .then(res => {
// console.log(res, '统计---') // console.log(res, '统计---')
if (res.code == '0') { if (res.code == '0') {
let { let { data } = res
data
} = res
this.setData({ this.setData({
statisticsObj: data || {} statisticsObj: data || {}
}) })
...@@ -152,14 +156,8 @@ Component({ ...@@ -152,14 +156,8 @@ Component({
}) })
}, },
getList(isReset = false) { getList(isReset = false) {
let { let { pageSize, pageNum, tabList, tabIndex, customerName, storeInfo } =
pageSize, this.data
pageNum,
tabList,
tabIndex,
customerName,
storeInfo
} = this.data
if (this.data.nothing) { if (this.data.nothing) {
return return
} }
...@@ -168,16 +166,18 @@ Component({ ...@@ -168,16 +166,18 @@ Component({
pageNum, pageNum,
customerName, customerName,
// item.confName == // item.confName ==
orderStatus: constantData.equityStatusList.find(item => tabList[tabIndex].text == item.confName)?.confId || '', orderStatus:
constantData.equityStatusList.find(
item => tabList[tabIndex].text == item.confName
)?.confId || '',
merchantId: storeInfo?.merchantId merchantId: storeInfo?.merchantId
} }
carLifeApi.equityPage(params).then(res => { carLifeApi.equityPage(params).then(res => {
if (res.code == '0') { if (res.code == '0') {
let { let { data, count } = res.data
data, let tempList = isReset
count ? data || []
} = res.data : this.data.list.concat(data || [])
let tempList = isReset ? data || [] : this.data.list.concat(data || [])
this.setData({ this.setData({
list: tempList, list: tempList,
pageNum: pageNum + 1, pageNum: pageNum + 1,
...@@ -216,18 +216,14 @@ Component({ ...@@ -216,18 +216,14 @@ Component({
this.search() this.search()
}, },
input(e) { input(e) {
let { let { value } = e.detail
value
} = e.detail
this.setData({ this.setData({
customerName: value customerName: value
}) })
}, },
// 首次进入会触发该方法,因此不需要在attached调getList // 首次进入会触发该方法,因此不需要在attached调getList
tabClick(e) { tabClick(e) {
let { let { searchObj } = this.data
searchObj
} = this.data
delete searchObj.statusList delete searchObj.statusList
this.setData({ this.setData({
tabIndex: e.detail, tabIndex: e.detail,
...@@ -238,14 +234,15 @@ Component({ ...@@ -238,14 +234,15 @@ Component({
// 录单/重新录单 // 录单/重新录单
async handleRecordOrder(e) { async handleRecordOrder(e) {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true)
if (staffCheck) return false; if (staffCheck) return false
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
let { // 校验异常订单
target let abnormalOrderCheck = await checkAbnormalOrder()
} = e.currentTarget.dataset if (abnormalOrderCheck) return false
let { target } = e.currentTarget.dataset
console.log(target) console.log(target)
wx.$router.go('serviceInfo', { wx.$router.go('serviceInfo', {
contractNo: target.contractNo, contractNo: target.contractNo,
...@@ -254,10 +251,7 @@ Component({ ...@@ -254,10 +251,7 @@ Component({
}, },
// 查看/下载合同 // 查看/下载合同
async handlePreviewContract(e) { async handlePreviewContract(e) {
let { let { target, type } = e.currentTarget.dataset
target,
type
} = e.currentTarget.dataset
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
let params = { let params = {
contractNo: target.contractNo contractNo: target.contractNo
...@@ -266,10 +260,7 @@ Component({ ...@@ -266,10 +260,7 @@ Component({
let result = await carLifeApi.equityOrderList({ let result = await carLifeApi.equityOrderList({
orderId: target.orderId orderId: target.orderId
}) })
let { let { code, data } = result
code,
data
} = result
if (code == 0) { if (code == 0) {
if (data.length == 1) { if (data.length == 1) {
carLifeApi.printContract(params).then(res => { carLifeApi.printContract(params).then(res => {
...@@ -301,16 +292,19 @@ Component({ ...@@ -301,16 +292,19 @@ Component({
// 签名 // 签名
async handleSignature(e) { async handleSignature(e) {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true)
if (staffCheck) return false; if (staffCheck) return false
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
// 校验异常订单
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
wx.$router.go("signature", { wx.$router.go('signature', {
orderId: target.orderId, orderId: target.orderId,
tabIndex: 2 tabIndex: 2
}); })
}, },
// 复制链接 // 复制链接
...@@ -321,7 +315,8 @@ Component({ ...@@ -321,7 +315,8 @@ Component({
} }
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
content: '如需下载PDF报告单,请复制下载地址后到手机浏览器中打开。下载地址5分钟内有效', content:
'如需下载PDF报告单,请复制下载地址后到手机浏览器中打开。下载地址5分钟内有效',
confirmText: '复制地址', confirmText: '复制地址',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) { success(res) {
...@@ -335,9 +330,7 @@ Component({ ...@@ -335,9 +330,7 @@ Component({
}, },
handleDownload() { handleDownload() {
let { let { url } = this.data
url
} = this.data
let _this = this let _this = this
if (!url) { if (!url) {
wx.$util.showToast('没有合同') wx.$util.showToast('没有合同')
......
...@@ -24,10 +24,12 @@ Page({ ...@@ -24,10 +24,12 @@ Page({
timer = setInterval(() => { timer = setInterval(() => {
let objNameStr = 'textNameObj.confirmName' let objNameStr = 'textNameObj.confirmName'
// const str = '前往提单(10s)' // const str = '前往提单(10s)'
if (zyFlag) {
that.setData({ that.setData({
[objNameStr]: `${zyFlag ? '下一步·上传协议(4/4)' : '下一步·去签名(4/4)'}(${sec}s)`, [objNameStr]: `下一步·上传协议(4/4)(${sec}s)`,
showBtnFlag: true showBtnFlag: true
}) })
}
sec-- sec--
if (sec == -1) { if (sec == -1) {
clearInterval(timer) // 清除定时器 clearInterval(timer) // 清除定时器
...@@ -36,8 +38,8 @@ Page({ ...@@ -36,8 +38,8 @@ Page({
if (zyFlag) { // 需要上传合同协议 if (zyFlag) { // 需要上传合同协议
return this.setData({ showZyPopup: true }) // 上传合同协议弹窗 return this.setData({ showZyPopup: true }) // 上传合同协议弹窗
} }
// 跳转签名页面 // 跳转列表页面
wx.$router.redirectTo('signature', { id, orderId }) wx.$router.reLaunch("packageEquity.equityPage?tabIndex=1");
} }
}, 1000) }, 1000)
this.setData({timer}) this.setData({timer})
...@@ -74,9 +76,7 @@ Page({ ...@@ -74,9 +76,7 @@ Page({
}) })
if (code == 0) { if (code == 0) {
// 返回到报价单列表 // 返回到报价单列表
wx.$router.reLaunch("packageEquity.equityPage", { wx.$router.reLaunch("packageEquity.equityPage?tabIndex=1");
tabIndex: 1,
})
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="payInfo"> <view class="payInfo">
<view class="payCom"> <view class="payCom">
<view class="title">支付成功</view> <view class="title">支付成功</view>
<view class="payPrice">订单支付成功,实付 {{orderDetail.totalPrice}} 元</view> <view class="payPrice">订单支付成功,实付 {{orderDetail.finalPrice}} 元</view>
</view> </view>
<view class="tips"> <view class="tips">
<view class="title">温馨提示</view> <view class="title">温馨提示</view>
...@@ -27,4 +27,3 @@ ...@@ -27,4 +27,3 @@
</view> </view>
<!-- 上传合同协议 --> <!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" onlinePaymentFlag="{{true}}" bindconfirm="zyPayConfirm"></zy-pay-popup> <zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" onlinePaymentFlag="{{true}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
\ No newline at end of file \ No newline at end of file
<!-- packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.wxml --> <!-- packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.wxml -->
<navigation-bar showBack navStyle="{{navStyle}}" bindback="back">订单支付</navigation-bar> <navigation-bar showBack navStyle="{{ navStyle }}" bindback="back">订单支付</navigation-bar>
<view class="big-img page-box isFullSucreen"> <view class="big-img page-box isFullSucreen">
<!-- <view class="titleBox"> <!-- <view class="titleBox">
<view class="imgBox" bind:tap="back"> <view class="imgBox" bind:tap="back">
...@@ -7,39 +7,35 @@ ...@@ -7,39 +7,35 @@
</view> </view>
<view class="navigation-title-text">订单支付</view> <view class="navigation-title-text">订单支付</view>
</view> --> </view> -->
<view class="money">总保费{{orderDetail.totalPrice}}元/年</view> <view class="money">总保费{{orderDetail.finalPrice}}元/年</view>
</view> </view>
<view class="OrderInfoPay"> <view class="OrderInfoPay">
<view class=" box"> <view class="box">
<view class="tab-head"> <view class="tab-head">
<view <view
class="tab-item {{selectPayType === item.id?'active':'' }}" class="tab-item {{ selectPayType === item.id?'active':'' }}"
wx:for="{{payItems}}" wx:for="{{ payItems }}"
wx:key="index" wx:key="index"
data-item="{{item}}" data-item="{{ item }}"
data-value="{{item.id}}" data-value="{{ item.id }}"
catchtap="changePayType"> catchtap="changePayType"
<gl-image >
class="btn_icon" <gl-image class="btn_icon" data-item="{{ item }}" webp src="/miniProgram/{{ item.icon }}.png"></gl-image>
data-item="{{item}}"
webp
src="/miniProgram/{{item.icon}}.png"></gl-image>
{{item.name}} {{item.name}}
</view> </view>
</view> </view>
<!-- 微信/pos机支付 --> <!-- 微信/pos机支付 -->
<block wx:if="{{selectPayType == 1 || selectPayType == 3}}"> <block wx:if="{{ selectPayType == 1 || selectPayType == 3 }}">
<view class="pay-box"> <view class="pay-box">
<view class="tab-title">{{orderDetail.merchantName}}</view> <view class="tab-title">{{orderDetail.merchantName}}</view>
<view class="tab-qrcode"> <view class="tab-qrcode">
<image src="{{selectPayType==1?wxqrcode:posqrcode}}" mode="widthFix" /> <image src="{{ selectPayType==1?wxqrcode:posqrcode }}" mode="widthFix" />
</view> </view>
<view class="tab-desc" hidden="{{selectPayType==3}}">请让客户打开微信扫描上方付款码进行支付</view> <view class="tab-desc" hidden="{{ selectPayType==3 }}">请让客户打开微信扫描上方付款码进行支付</view>
<view class="tab-desc" hidden="{{selectPayType==1}}">请使用POS机扫描此码,再向客户收款</view> <view class="tab-desc" hidden="{{ selectPayType==1 }}">请使用POS机扫描此码,再向客户收款</view>
</view> </view>
</block> </block>
</view> </view>
<!-- <view class="qrCodeCom"> <!-- <view class="qrCodeCom">
<view class="title"> <view class="title">
<image <image
...@@ -76,7 +72,7 @@ ...@@ -76,7 +72,7 @@
<view class="bg" /> <view class="bg" />
</view> --> </view> -->
<view class="orderInfo"> <view class="orderInfo">
<order-detail OderType="pay" orderInfo="{{orderDetail}}" /> <order-detail OderType="pay" orderInfo="{{ orderDetail }}" />
</view> </view>
<view class="tips"> <view class="tips">
<view class="title">费用说明</view> <view class="title">费用说明</view>
...@@ -86,11 +82,7 @@ ...@@ -86,11 +82,7 @@
<view class="title">适用门店</view> <view class="title">适用门店</view>
<view class="storeComBox"> <view class="storeComBox">
<!-- mode="widthFix" --> <!-- mode="widthFix" -->
<image <image class="storeIcon" src="../../../images/storeIcon.png" binderror="" bindload="" />
class="storeIcon"
src="../../../images/storeIcon.png"
binderror=""
bindload="" />
<view class="store"> <view class="store">
<view class="name">{{merchantName4s}}</view> <view class="name">{{merchantName4s}}</view>
<!-- <view class="address">深圳市宝安区西乡大道与金湾大道交汇处(大铲湾世界名车博览中心内)</view> --> <!-- <view class="address">深圳市宝安区西乡大道与金湾大道交汇处(大铲湾世界名车博览中心内)</view> -->
...@@ -100,4 +92,3 @@ ...@@ -100,4 +92,3 @@
</view> </view>
</view> </view>
<!-- <popup-select-pay show="{{popPayShow}}" bindconfirm="changePayType" /> --> <!-- <popup-select-pay show="{{popPayShow}}" bindconfirm="changePayType" /> -->
\ No newline at end of file \ No newline at end of file
...@@ -256,6 +256,19 @@ ...@@ -256,6 +256,19 @@
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title">异常标记</view>
<view class="list-box">
<block wx:for="{{ form.abnormalFlag }}" wx:key="index">
<view
class="item text-center {{ item.active?'active':''}} {{item.disabled ?'disabled':'' }}"
bindtap="choose"
data-list-name="abnormalFlag"
data-index="{{ index }}"
>{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">支付方式</view> <view class="title">支付方式</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{ form.payType }}" wx:key="index"> <block wx:for="{{ form.payType }}" wx:key="index">
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"popup-input": "../PopupInput/PopupInput", "popup-input": "../PopupInput/PopupInput",
"goods": "../GoodsPackage/Goods", "goods": "../GoodsPackage/Goods",
"sku-goods": "/components/SkuGoods/Goods", "sku-goods": "/components/SkuGoods/Goods",
"date-select":"/components/DateSelect/dateSelect" "date-select":"/components/DateSelect/dateSelect",
"van-picker": "@vant/weapp/picker/index"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -265,63 +265,129 @@ ...@@ -265,63 +265,129 @@
} }
.goods-box .goods { .goods-box .goods {
min-height: var(--fontSize118); // background: #F7F8FA;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3); background: #f7f8fa;
border-radius: var(--fontSize16);
margin: var(--fontSize16) var(--fontSize0);
display: flex; display: flex;
align-items: center; // flex-direction: column;
padding: 20rpx var(--fontSize28) 20rpx var(--fontSize90); padding: var(--fontSize24);
justify-content: space-between; justify-content: space-between;
font-size: var(--fontSize28); font-size: var(--fontSize28);
background: #F5F5F7;
position: relative; position: relative;
color: #222222; /* align-items: center; */
} }
.goods-box .goods { .goods-box .goods+.goods {
margin-top: 16rpx;
}
.goods-box .goods .icon {
width: var(--fontSize40);
height: var(--fontSize40);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
min-height: var(--fontSize118); margin-right: var(--fontSize20);
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3); flex-shrink: 0;
padding: 20rpx var(--fontSize28) 20rpx var(--fontSize90);
font-size: var(--fontSize28);
background: #F5F5F7;
position: relative;
color: #222222;
} }
.goods .package { .goods-box .goods .icon image {
background: #fff; width: 100%;
height: 100%;
} }
.goods.total-box { .goods-box .goods .goods-content {
background: #fff; flex: 1;
} display: flex;
flex-direction: column;
overflow: hidden;
.goods .icon { .alias {
position: absolute; font-size: 12px;
top: 50%; color: #222222 !important;
left: var(--fontSize40); margin-bottom: 8rpx;
width: var(--fontSize40); }
height: var(--fontSize40);
transform: translateY(-50%);
} }
.goods-box .goods .name { .goods-box .goods .name {
color: #FF6601; color: #FF6601;
max-width: var(--fontSize450); width: 100%;
// margin-bottom: var(--fontSize8);
word-break: break-all;
}
.goods-box .goods .bottom_box {
display: flex;
align-items: center;
justify-content: space-between;
}
.goods-box .goods .bottom_box .left {
display: flex;
flex-direction: column;
flex: 1;
margin-right: var(--fontSize20);
}
.goods-box .goods .bottom_box .right {
display: flex;
align-items: center;
justify-content: flex-start;
}
.goods-box .goods .package {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.goods-box .goods .package .name {
width: auto;
margin-bottom: 0;
flex: 1;
padding-right: var(--fontSize20);
}
.goods-box .goods .package .package-price {
font-weight: 600;
color: #333333;
}
.goods-box .goods .packageBox {
width: 100%;
margin-top: var(--fontSize20);
}
.goods-box .goods .packageBox .itemSty {
margin-bottom: var(--fontSize24);
padding-bottom: var(--fontSize24);
border-bottom: 1px dashed #eeeeee;
}
.goods-box .goods .packageBox .itemSty:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
} }
.goods-box .goods .price-box { .goods-box .goods .price-box {
width: var(--fontSize240); // width: var(--fontSize240);
height: var(--fontSize64); height: var(--fontSize64);
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize2) solid #E6E6E6; border: var(--fontSize2) solid #E6E6E6;
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
position: relative; position: relative;
margin-right: var(--fontSize32); margin-right: var(--fontSize32);
margin-left: auto; max-width: 160rpx;
min-width: 160rpx; }
.serveName {
width: 100%;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
} }
.price-box-Modify { .price-box-Modify {
...@@ -331,8 +397,8 @@ ...@@ -331,8 +397,8 @@
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
width: var(--fontSize240); // width: var(--fontSize240);
min-width: 160rpx; min-width: 140rpx;
height: var(--fontSize64); height: var(--fontSize64);
margin-right: var(--fontSize32); margin-right: var(--fontSize32);
} }
...@@ -347,12 +413,13 @@ ...@@ -347,12 +413,13 @@
.goods-box .goods .price input { .goods-box .goods .price input {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 160rpx;
height: var(--fontSize64); height: var(--fontSize64);
min-height: 100%; min-height: 100%;
font-size: var(--fontSize28); font-size: var(--fontSize28);
padding: 0 var(--fontSize16) 0 var(--fontSize50); padding: 0 var(--fontSize16) 0 var(--fontSize50);
color: #333333; color: #333333;
text-align: end;
} }
.goods-box .goods .price input.error { .goods-box .goods .price input.error {
...@@ -366,11 +433,17 @@ ...@@ -366,11 +433,17 @@
} }
.goods-box .total-box { .goods-box .total-box {
padding: 0 var(--fontSize40); color: #222222;
font-size: 28rpx;
background-color: #fff;
// padding: 0 var(--fontSize40);
} }
.goods-box .goods .total { .goods-box .goods .total {
color: #F24724; // color: #F24724;
color: #eb4e4e;
font-size: 28rpx;
font-weight: 600;
} }
.switch-box { .switch-box {
...@@ -436,6 +509,117 @@ ...@@ -436,6 +509,117 @@
} }
} }
/* Strategy Box Styles */
.strategy-box {
margin-top: 10rpx;
padding-top: 10rpx;
border-top: 1rpx solid #eee;
.discount-types {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
.discount-tabs {
display: flex;
align-items: center;
background: #e9e9e9;
padding: 6rpx;
border-radius: 8rpx;
.type-item {
padding: 10rpx 12rpx;
background: transparent;
border-radius: 6rpx;
margin-right: 0;
font-size: 24rpx;
color: #222;
border: none;
&.active {
background: #fff;
color: #333;
font-weight: 500;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}
}
}
.discount-input {
box-sizing: border-box;
width: 160rpx;
display: flex;
align-items: center;
margin-left: 10rpx;
background: #fff;
padding: 0 10rpx;
height: 64rpx;
border-radius: 8rpx;
border: 2rpx solid #eff0f2;
input {
width: 160rpx;
border-radius: 0;
padding: 0;
font-size: 24rpx;
height: 100%;
margin-right: 6rpx;
background: transparent;
color: #333333;
// text-align: left;
text-align: end;
}
text {
font-size: 24rpx;
color: #333;
line-height: 0rpx;
}
}
}
.gift-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
font-size: 28rpx;
color: #222222;
.gift-radios {
display: flex;
align-items: center;
.radio-label {
margin-left: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
radio {
transform: scale(0.6);
}
}
}
}
.final-price {
font-size: 28rpx;
color: #222222;
display: flex;
align-items: center;
justify-content: space-between;
.orange {
color: #FF6601;
font-weight: bold;
font-size: 30rpx;
margin-left: 10rpx;
}
}
}
.van-cell:after { .van-cell:after {
border: none !important; border: none !important;
} }
...@@ -452,28 +636,20 @@ ...@@ -452,28 +636,20 @@
position: relative; position: relative;
} }
.deleteicon {
// position: absolute;
// top: 50%;
// left: 40rpx;
// transform: translateY(-50%);
width: var(--fontSize40);
height: var(--fontSize40);
margin-right: 10rpx;
}
.goods-box .packageList { .goods-box .packageList {
height: auto; height: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0; padding: 0;
padding-bottom: var(--fontSize24);
.package { .package {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
min-height: 104rpx; min-height: 104rpx;
padding: 20rpx 0; padding: 20rpx var(--fontSize24);
box-sizing: border-box;
.package-price { .package-price {
margin-left: auto; margin-left: auto;
...@@ -484,7 +660,6 @@ ...@@ -484,7 +660,6 @@
.packageBox { .packageBox {
box-sizing: border-box; box-sizing: border-box;
width: 630rpx; width: 630rpx;
// height: 104rpx;
background: #F5F5F7; background: #F5F5F7;
.itemSty { .itemSty {
...@@ -508,7 +683,7 @@ ...@@ -508,7 +683,7 @@
.payType-box { .payType-box {
display: flex; display: flex;
align-items: center; align-items: center;
// flex-wrap: wrap; /* flex-wrap: wrap; */
padding-top: var(--fontSize20); padding-top: var(--fontSize20);
justify-content: flex-end; justify-content: flex-end;
margin-right: calc(-1 * var(--fontSize40)); margin-right: calc(-1 * var(--fontSize40));
...@@ -532,7 +707,7 @@ ...@@ -532,7 +707,7 @@
margin-right: 0; margin-right: 0;
} }
.box .item-disabled { .item-disabled {
opacity: .4; opacity: .4;
} }
...@@ -593,6 +768,101 @@ ...@@ -593,6 +768,101 @@
justify-content: space-between; justify-content: space-between;
} }
.payment-text{ .discount-box {
color: #666666; margin-top: var(--fontSize16);
padding-top: var(--fontSize16);
border-top: 1rpx solid #eee;
.discount-type {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--fontSize16);
.type-tabs {
display: flex;
align-items: center;
background: #F0F1F5;
padding: var(--fontSize6);
border-radius: var(--fontSize8);
.type-item {
padding: var(--fontSize10) var(--fontSize12);
background: transparent;
border-radius: var(--fontSize6);
font-size: var(--fontSize24);
color: #222;
transition: all 0.3s;
&.active {
background: #fff;
color: #333;
font-weight: 500;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}
}
}
.discount-input {
display: flex;
align-items: center;
margin-left: var(--fontSize10);
background: #fff;
padding: 0 var(--fontSize10);
height: var(--fontSize64);
border-radius: var(--fontSize8);
border: 2rpx solid #eff0f2;
input {
width: 140rpx;
font-size: var(--fontSize24);
height: 100%;
text-align: left;
}
text {
font-size: var(--fontSize24);
color: #333;
}
}
}
.final-price {
font-size: var(--fontSize28);
color: #222222;
display: flex;
align-items: center;
justify-content: space-between;
.price-val {
color: #FF6601;
font-weight: bold;
font-size: var(--fontSize30);
}
}
}
.gift-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--fontSize16);
font-size: var(--fontSize28);
color: #222222;
.gift-radios {
display: flex;
align-items: center;
.radio-label {
margin-left: var(--fontSize20);
display: flex;
align-items: center;
font-size: var(--fontSize24);
radio {
transform: scale(0.6);
}
}
}
} }
...@@ -7,9 +7,28 @@ var replaceItemText = function (name, item) { ...@@ -7,9 +7,28 @@ var replaceItemText = function (name, item) {
return name ? name + item : '' return name ? name + item : ''
} }
var divideByHundred = function (str) {
var floatVal = parseFloat(str)
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str) / 100
var strVal = floatVal.toString()
var searchVal = strVal.indexOf('.')
if (searchVal < 0) {
searchVal = strVal.length
strVal += '.'
}
while (strVal.length <= searchVal + 2) {
strVal += '0'
}
return parseFloat(strVal)
}
/* /*
* 导出 * 导出
*/ */
module.exports = { module.exports = {
replaceItemText: replaceItemText replaceItemText: replaceItemText,
divideByHundred: divideByHundred
} }
// 0待报价、1待确认、2待支付、3已支付、4已支付 5(已完成)、-1战败 // 0待报价、1待确认、2待支付、3已支付、4已支付 5(已完成)、-1战败
const orderStatusObj = { const orderStatusObj = {
'0': '待报价', 0: '待报价',
'1': '待确认', 1: '待确认',
'2': '待支付', 2: '待支付',
'3': '已支付', 3: '已支付',
'4': '已支付', 4: '已支付',
'5': '已完成', 5: '已完成',
'-1': '战败', '-1': '战败',
'9': '已撤销', 9: '已撤销',
'11': '已失效', 11: '已失效',
'6': '已退款' 6: '已退款',
14: '审批中'
} }
const orderStatusList = [{ const orderStatusList = [
{
confName: '待报价', confName: '待报价',
confId: '0' confId: '0'
}, { },
{
confName: '待确认', confName: '待确认',
confId: '1' confId: '1'
}, { },
{
confName: '待支付', confName: '待支付',
confId: '2' confId: '2'
}, { },
{
confName: '已支付', confName: '已支付',
confId: '3' confId: '3'
}, { },
{
confName: '已完成', confName: '已完成',
confId: '5' confId: '5'
}, { },
{
confName: '已退款', confName: '已退款',
confId: '6' confId: '6'
}, },
...@@ -37,7 +44,8 @@ const orderStatusList = [{ ...@@ -37,7 +44,8 @@ const orderStatusList = [{
{ {
confName: '错误订单', confName: '错误订单',
confId: '11' confId: '11'
}, { },
{
confName: '战败', confName: '战败',
confId: '-1' confId: '-1'
} }
......
...@@ -3,19 +3,36 @@ ...@@ -3,19 +3,36 @@
<!-- <scroll-view class="container" scroll-y style="height:{{windowHeight}}px"> --> <!-- <scroll-view class="container" scroll-y style="height:{{windowHeight}}px"> -->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{ true }}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{ true }}" bindback="back">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">车险信息</view>
车险信息
</view>
</view> </view>
</navigation-bar> </navigation-bar>
<!-- {{scrollDisabled? "": height:{{windowHeight}}px}} --> <!-- {{scrollDisabled? "": height:{{windowHeight}}px}} -->
<view class="layout {{(showTips||waitInputCount)?'fullSucreen-tips':'' }} {{scrollDisabled?'scroll-disabled':''}}" style="padding-top:{{ navBarHeight }}px; "> <view
<first-step id="FirstStep" serviceInfo="{{ owner }}" dataAttrName="{{ dataAttrName }}" orderInfo="{{ orderInfo }}" subBtnShow="{{ false }}" mode="{{mode}}" /> class="layout {{ (showTips||waitInputCount)?'fullSucreen-tips':'' }} {{scrollDisabled?'scroll-disabled':'' }}"
<second-step id="SecondStep" orderInfo="{{ orderInfo }}" quotationGoodsList="{{ quotationGoodsList }}" bindconfirm="handleSecondConfirm" bindeditSave="handleEditSave" paymentMethod="{{paymentMethod}}" /> style="padding-top:{{ navBarHeight }}px;"
>
<first-step
id="FirstStep"
serviceInfo="{{ owner }}"
dataAttrName="{{ dataAttrName }}"
orderInfo="{{ orderInfo }}"
subBtnShow="{{ false }}"
mode="{{ mode }}"
/>
<second-step
id="SecondStep"
orderInfo="{{ orderInfo }}"
quotationGoodsList="{{ quotationGoodsList }}"
bindconfirm="handleSecondConfirm"
bindeditSave="handleEditSave"
paymentMethod="{{ paymentMethod }}"
totalFee="{{ totalFee }}"
bind:showTips="tipsEvent"
/>
</view> </view>
<view wx:if="{{showTips}}" class="btns {{isFullSucreen?'isFullSucreen-btn':''}}"> <view wx:if="{{ showTips && !orderInfo.resetOrder }}" class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="tips"> <view class="tips">
<image class=" tipsIcon" src="../../../images/tips.png" /> <image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText"> <view class="contentText">
<view class="tradeNoCon"> <view class="tradeNoCon">
<view>交易参考号:</view> <view>交易参考号:</view>
...@@ -36,10 +53,35 @@ ...@@ -36,10 +53,35 @@
<!-- <view class="waitOrderCon {{ showTips? 'showTips':'' }}" wx:if="{{ waitInputCount && !orderInfo.resetOrder && !isErrorOrder&&!outTradeNo }}"> <!-- <view class="waitOrderCon {{ showTips? 'showTips':'' }}" wx:if="{{ waitInputCount && !orderInfo.resetOrder && !isErrorOrder&&!outTradeNo }}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" /> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view> --> </view> -->
<order-no-popup wx:if="{{ showOrderpop && !(isErrorOrder) }}" outTradeNo="{{ selectOutTradeNoArr }}" switchValuerec="{{switchValue}}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" /> <order-no-popup
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" orderInfo="{{orderInfo}}" wx:if="{{showPopup}}" show="{{showPopup}}" /> wx:if="{{ showOrderpop }}"
outTradeNo="{{ selectOutTradeNoArr }}"
switchValuerec="{{ switchValue }}"
show="{{ showOrderpop }}"
bind:success="navigator"
title="请选择交易参考号"
/>
<order-popup
orderType="{{ orderInfo.payType }}"
resetTransNo="{{ orderInfo.transactionNo || orderInfo.outTradeNo }}"
resetOrder="{{ orderInfo.resetOrder }}"
orderInfo="{{ orderInfo }}"
wx:if="{{ showPopup }}"
show="{{ showPopup }}"
/>
<!-- vin二次复核 --> <!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog> <vin-sec-dialog
wx:if="{{ showVinDialog }}"
showVinDialog="{{ showVinDialog }}"
secFormData="{{ secFormData }}"
bindonClose="handleSecClose"
bindonConfirm="handleSecConfirm"
></vin-sec-dialog>
<!-- 上传合同协议 --> <!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" supplementaryFlag="{{supplementaryFlag}}" bindconfirm="zyPayConfirm"></zy-pay-popup> <zy-pay-popup
show="{{ showZyPopup }}"
wx:if="{{ showZyPopup }}"
supplementaryFlag="{{ supplementaryFlag }}"
bindconfirm="zyPayConfirm"
></zy-pay-popup>
<study-permission-modal id="customModal" /> <study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -324,6 +324,14 @@ ...@@ -324,6 +324,14 @@
background: #FFF5E6; background: #FFF5E6;
padding: var(--fontSize4) var(--fontSize8); padding: var(--fontSize4) var(--fontSize8);
border-radius: var(--fontSize4); border-radius: var(--fontSize4);
font-size: var(--fontSize24);
}
.approving-txt {
color: #FF9D0A;
background: #ff9d0a1a;
padding: var(--fontSize4) var(--fontSize8);
border-radius: var(--fontSize4);
} }
.list .content { .list .content {
...@@ -503,7 +511,7 @@ ...@@ -503,7 +511,7 @@
color: #347BFF; color: #347BFF;
} }
.refund-box{ .refund-box {
margin-left: var(--fontSize16); margin-left: var(--fontSize16);
background: #FFF2E0; background: #FFF2E0;
padding: var(--fontSize4) var(--fontSize8); padding: var(--fontSize4) var(--fontSize8);
...@@ -835,6 +843,7 @@ ...@@ -835,6 +843,7 @@
padding-left: var(--fontSize24); padding-left: var(--fontSize24);
margin: 0 auto; margin: 0 auto;
} }
.modalbox:last-child { .modalbox:last-child {
margin-top: var(--fontSize16); margin-top: var(--fontSize16);
} }
...@@ -865,7 +874,7 @@ ...@@ -865,7 +874,7 @@
width: calc(100% - 36rpx); width: calc(100% - 36rpx);
} }
.repeal-modal{ .repeal-modal {
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -874,7 +883,8 @@ ...@@ -874,7 +883,8 @@
bottom: 0; bottom: 0;
z-index: 999; z-index: 999;
} }
.repeal-wrap{
.repeal-wrap {
width: 622rpx; width: 622rpx;
height: 496rpx; height: 496rpx;
background: #FFFFFF; background: #FFFFFF;
...@@ -886,20 +896,23 @@ ...@@ -886,20 +896,23 @@
padding: 40rpx 0 0; padding: 40rpx 0 0;
box-sizing: border-box; box-sizing: border-box;
} }
.repeal-wrap .title{
.repeal-wrap .title {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #222222; color: #222222;
text-align: center; text-align: center;
line-height: 48rpx; line-height: 48rpx;
} }
.repeal-wrap .textarea-wrap{
.repeal-wrap .textarea-wrap {
margin: 40rpx 0; margin: 40rpx 0;
padding: 0 40rpx ; padding: 0 40rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
.repeal-wrap .textarea{
.repeal-wrap .textarea {
background: #F4F5F7; background: #F4F5F7;
width: 100%; width: 100%;
height: 224rpx; height: 224rpx;
...@@ -907,14 +920,16 @@ ...@@ -907,14 +920,16 @@
box-sizing: border-box; box-sizing: border-box;
border-radius: 12rpx; border-radius: 12rpx;
} }
.repeal-wrap .footer{
.repeal-wrap .footer {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
border-top: 2rpx solid #EBEDF0; border-top: 2rpx solid #EBEDF0;
display: flex; display: flex;
width: 100%; width: 100%;
} }
.repeal-wrap .footer .btn{
.repeal-wrap .footer .btn {
height: 96rpx; height: 96rpx;
line-height: 96rpx; line-height: 96rpx;
flex: 1; flex: 1;
...@@ -923,7 +938,48 @@ ...@@ -923,7 +938,48 @@
color: #333333; color: #333333;
text-align: center; text-align: center;
} }
.repeal-wrap .footer .btn:last-child{
.repeal-wrap .footer .btn:last-child {
color: #3582EE; color: #3582EE;
border-left: 2rpx solid #EBEDF0; border-left: 2rpx solid #EBEDF0;
} }
.error-order-box {
box-sizing: border-box;
padding: 16rpx;
border-radius: 8rpx;
// opacity: 1;
// border: 2rpx solid #181a1f1a;
background: #f7f8fa;
margin-bottom: 16rpx;
.label {
color: #999EA8;
margin-right: 30rpx;
}
.value {
color: #5A5E66;
}
.row+.row {
margin-top: 6rpx;
}
}
.abnormal-tag {
display: flex;
.text {
margin-left: 15rpx;
}
}
.error-icon {
display: inline-block;
width: 28rpx;
height: 24rpx;
margin-left: 9rpx;
// margin-right: 6rpx;
margin-top: 3rpx;
}
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueList/components/EquityItem/EquityItem.js // packageEquity/pages/clueList/components/EquityItem/EquityItem.js
import itemMixin from "../itemMixins"; import itemMixin from '../itemMixins'
import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl"; import {
checkDailyReport,
checkStudyTask,
checkAbnormalOrder
} from '~/store/ModalToQueueControl'
Component({ Component({
behaviors: [itemMixin], behaviors: [itemMixin],
...@@ -8,7 +12,7 @@ Component({ ...@@ -8,7 +12,7 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
data: Object, data: Object
}, },
/** /**
...@@ -17,37 +21,37 @@ Component({ ...@@ -17,37 +21,37 @@ Component({
data: { data: {
sceneTypeStatusMap: [ sceneTypeStatusMap: [
{ {
label: "精品加装", label: '精品加装',
key: "1", key: '1'
}, },
{ {
label: "权益服务", label: '权益服务',
key: "0", key: '0'
}, }
], ],
orderObj: [ orderObj: [
{ {
label: "升级价格", label: '升级价格',
key: "quotedPriceUpdate", key: 'quotedPriceUpdate',
unit: "¥", unit: '¥'
}, },
{ {
label: "支付时间", label: '支付时间',
key: "payTime", key: 'payTime'
}, }
], ],
orderStatusEnum: { orderStatusEnum: {
0: "待报价", 0: '待报价',
1: "待确认", 1: '待确认',
2: "待支付", 2: '待支付',
3: "已支付", 3: '已支付',
4: "权益提单已完成", 4: '权益提单已完成',
5: "完成", 5: '完成',
"-1": "战败", '-1': '战败',
9: "已撤销", 9: '已撤销',
11: "错误订单", 11: '错误订单'
}, },
selectType: 1, selectType: 1
}, },
/** /**
...@@ -56,15 +60,15 @@ Component({ ...@@ -56,15 +60,15 @@ Component({
methods: { methods: {
showAllFun() { showAllFun() {
this.setData({ this.setData({
showAll: !this.data.showAll, showAll: !this.data.showAll
}); })
}, },
selectType(e) { selectType(e) {
let { type } = e.currentTarget.dataset; let { type } = e.currentTarget.dataset
console.log(e, e.currentTarget.dataset, type); console.log(e, e.currentTarget.dataset, type)
this.setData({ this.setData({
selectType: type, selectType: type
}); })
}, },
// 确定是否要显示 // 确定是否要显示
showSelectType({ item = {} }) { showSelectType({ item = {} }) {
...@@ -72,40 +76,43 @@ Component({ ...@@ -72,40 +76,43 @@ Component({
this, this,
{ {
show: true, show: true,
title: "请选择录单入口", title: '请选择录单入口',
tabTitleShow: false, tabTitleShow: false,
success: (res) => { success: res => {
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { orderInfo, selectType } = this.data; let { orderInfo, selectType } = this.data
console.log(item, "showSelectType"); console.log(item, 'showSelectType')
if (selectType == 1) { if (selectType == 1) {
wx.$router.go("tabWorkOrder.createOrder", { wx.$router.go('tabWorkOrder.createOrder', {
...item, ...item
}); })
} else { } else {
wx.$router.go("tabWorkOrder.defeatOrder", { wx.$router.go('tabWorkOrder.defeatOrder', {
...item, ...item
}); })
} }
}, },
error: () => { }, error: () => {}
}, },
"#modal2" '#modal2'
); )
}, },
async jump() { async jump() {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(); let staffCheck = await checkDailyReport()
if (staffCheck) return false;; if (staffCheck) return false
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
const { data } = this.data; // 校验异常订单
let params = {}; let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
const { data } = this.data
let params = {}
if (data.boutiqueOrders && data.boutiqueOrders.length) if (data.boutiqueOrders && data.boutiqueOrders.length)
params = data.boutiqueOrders[0]; params = data.boutiqueOrders[0]
// wx.$router.go('tabWorkOrder.createOrder', params) // wx.$router.go('tabWorkOrder.createOrder', params)
this.showSelectType({ item: params }); this.showSelectType({ item: params })
}, }
}, }
}); })
// packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js // packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
import itemMixin from '../itemMixins' import itemMixin from '../itemMixins'
import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl"; import {
checkDailyReport,
checkStudyTask,
checkAbnormalOrder
} from '~/store/ModalToQueueControl'
Component({ Component({
behaviors: [itemMixin], behaviors: [itemMixin],
/** /**
...@@ -14,16 +18,18 @@ Component({ ...@@ -14,16 +18,18 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
sceneTypeStatusMap: [{ sceneTypeStatusMap: [
{
label: '权益服务', label: '权益服务',
key: '0' key: '0'
}, },
{ {
label: '精品加装', label: '精品加装',
key: '1' key: '1'
}, }
], ],
orderObj: [{ orderObj: [
{
label: '升级价格', label: '升级价格',
key: 'totalPrice', key: 'totalPrice',
unit: '¥' unit: '¥'
...@@ -42,7 +48,7 @@ Component({ ...@@ -42,7 +48,7 @@ Component({
9: '已撤销', 9: '已撤销',
10: '已关闭', 10: '已关闭',
11: '已失效', 11: '已失效',
12: '已退款', 12: '已退款'
} }
}, },
...@@ -52,14 +58,15 @@ Component({ ...@@ -52,14 +58,15 @@ Component({
methods: { methods: {
async jump() { async jump() {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true)
if (staffCheck) return false;; if (staffCheck) return false
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
const { // 校验异常订单
data let abnormalOrderCheck = await checkAbnormalOrder()
} = this.data if (abnormalOrderCheck) return false
const { data } = this.data
let params = { let params = {
isClue: true isClue: true
} }
......
// packageCrowdFunding/pages/homePage/index/index.js // packageCrowdFunding/pages/homePage/index/index.js
import { setConfigInfo } from "~/store/index"; import { setConfigInfo } from "~/store/index";
import { checkDailyReport, checkStudyTask } from "~/store/ModalToQueueControl"; import { checkDailyReport, checkStudyTask,checkAbnormalOrder } from "~/store/ModalToQueueControl";
import { getReceptionRecordList, getRecordDetailList, checkMissingReception, checkMerchantDirect } from "../../receptionRecordsApi"; import { getReceptionRecordList, getRecordDetailList, checkMissingReception, checkMerchantDirect } from "../../receptionRecordsApi";
import aiApi from "../../aiApi"; import aiApi from "../../aiApi";
import { getWaitAuditCountAPI, waitstaffstateAPI, getStaffTemplate } from "~/api/api"; import { getWaitAuditCountAPI, waitstaffstateAPI, getStaffTemplate } from "~/api/api";
...@@ -972,68 +972,6 @@ Component({ ...@@ -972,68 +972,6 @@ Component({
} }
}); });
}, },
checkStaffOrderStatus() {
let userInfo = wx.$util.getUserInfo();
let dateStaffPop = wx.$storage.get("dateStaffPop");
let nowDate = new Date().format("yyyy-MM-dd");
let {
sceneType,
default4SStoreInfo: { merchantId },
} = userInfo;
let dayBoolean = dateStaffPop?.date && nowDate == dateStaffPop?.date;
let flag = dateStaffPop?.[sceneType]?.[merchantId];
console.log(flag, "flag", dateStaffPop?.[sceneType], dateStaffPop?.[sceneType]?.[merchantId]);
// let num = 0
// 当天已查询过
if (dayBoolean && flag) {
// num = dateStaffPop?.num || 0
// num = num + 1
// num = 1
return;
}
orderStaffValid({
sceneType: userInfo.sceneType,
})
.then((result) => {
console.log(result, "orderStaffValid");
if (result.data) {
if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false;
wx.__HAS_NOREPORT_MODAL = true;
wx.showModal({
title: "开单预警",
content: "您已超过三天未开单",
showCancel: false,
// cancelText: '取消', // '取消
cancelColor: "#292D33",
confirmText: "确定",
confirmColor: "#347BFF",
success(res) {
// if (res.confirm) {
// wx.$router.go('tabWorkOrder.staffDaily', {
// reportDate: hasNeedReport.date
// })
// }
},
complete: () => {
// 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout(() => {
wx.__HAS_NOREPORT_MODAL = false;
}, 2000);
},
});
wx.$storage.set("dateStaffPop", {
date: new Date().format("yyyy-MM-dd"),
0: {
[userInfo.default4SStoreInfo.merchantId]: true,
...dateStaffPop[0],
},
});
}
})
.catch((err) => {});
},
getStaffTargetTask() { getStaffTargetTask() {
return new Promise((resolve) => { return new Promise((resolve) => {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
...@@ -1238,110 +1176,131 @@ Component({ ...@@ -1238,110 +1176,131 @@ Component({
navGo: throttle(async function (e) { navGo: throttle(async function (e) {
// debugger // debugger
// wx.$util.showLoading('跳转中...') // wx.$util.showLoading('跳转中...')
let { mode, taskId, merchantBrand, mentorFlag } = this.data; let { mode, taskId, merchantBrand, mentorFlag } = this.data
let { item } = e.currentTarget.dataset; let { item } = e.currentTarget.dataset
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo()
// 如果 item.path 相同,则不执行后续跳转 // 如果 item.path 相同,则不执行后续跳转
if (item.path === lastPath) { if (item.path === lastPath) {
console.log("路径一样"); console.log('路径一样')
return; // 直接返回,不执行后续逻辑 return // 直接返回,不执行后续逻辑
} }
// 解决路径不清空问题 // 解决路径不清空问题
setTimeout(() => { setTimeout(() => {
lastPath = null; lastPath = null
}, 2000); }, 2000)
lastPath = item.path; // 更新上一次的路径 lastPath = item.path // 更新上一次的路径
if (item.path == "tabWorkOrder.supervisorDaily") { if (item.path == 'tabWorkOrder.supervisorDaily') {
this.openWorkReportTemp(item); this.openWorkReportTemp(item)
return; return
} }
if (item.path) { if (item.path) {
if (item.menuText == "驻店目标") { if (item.menuText == '驻店目标') {
return wx.$router.go(item.path, { return wx.$router.go(item.path, {
id: taskId, id: taskId
}); })
} else { } else {
if (item.menuText === "培训资料") { if (item.menuText === '培训资料') {
let params = { let params = {
merchantId: userInfo?.default4SStoreInfo?.merchantId, merchantId: userInfo?.default4SStoreInfo?.merchantId,
staffUuid: userInfo?.uuid, staffUuid: userInfo?.uuid,
scene: 0, scene: 0,
taskId: 5, taskId: 5
}; }
commonApi.shutDownTaskApi(params); commonApi.shutDownTaskApi(params)
} }
// console.log(merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) == -1); // console.log(merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) == -1);
// debugger // debugger
if (item.menuText == "战败下单" && merchantBrand.findIndex((i) => ["鸿蒙智行"].includes(i.name)) == -1) { if (
item.path = "packageEquity.createDeafeatOrder"; item.menuText == '战败下单' &&
merchantBrand.findIndex(i => ['鸿蒙智行'].includes(i.name)) == -1
) {
item.path = 'packageEquity.createDeafeatOrder'
} }
if (item.menuText == "战败下单") { if (item.menuText == '战败下单') {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true)
if (staffCheck) return false; if (staffCheck) return false
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask(); let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false; if (staffStudyTask) return false
// 校验异常订单
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
} }
if (item.path == "packageEquity.start") { if (item.path == 'packageEquity.start') {
wx.$track.setTrackData(0, "aiCheck_page", {}, "", 0); wx.$track.setTrackData(0, 'aiCheck_page', {}, '', 0)
} }
if (item.path == "packageEquity.clueList") { if (item.path == 'packageEquity.clueList') {
wx.$track.setTrackData(0, "leads_page", {}, "", 0); wx.$track.setTrackData(0, 'leads_page', {}, '', 0)
} }
// 飞行督导点击带教管理入口埋点 // 飞行督导点击带教管理入口埋点
if (item.path == "tabWorkOrder.mentorshipManage" && userInfo?.loginRole == 6) { if (
wx.$track.setTrackData(0, "mentorship_page", {}, "", 0); item.path == 'tabWorkOrder.mentorshipManage' &&
userInfo?.loginRole == 6
) {
wx.$track.setTrackData(0, 'mentorship_page', {}, '', 0)
} }
// 飞行督导/导师点击延保区域日报入口埋点 // 飞行督导/导师点击延保区域日报入口埋点
if (item.path == "tabWorkOrder.supervisorDaily" && (userInfo?.loginRole == 6 || mentorFlag)) { if (
wx.$track.setTrackData(0, "supervisor_daily_page", {}, "", 0); item.path == 'tabWorkOrder.supervisorDaily' &&
(userInfo?.loginRole == 6 || mentorFlag)
) {
wx.$track.setTrackData(0, 'supervisor_daily_page', {}, '', 0)
} }
// 接待记录埋点 // 接待记录埋点
if (item.path == "packageEquity.receptionRecords") { if (item.path == 'packageEquity.receptionRecords') {
wx.$track.setTrackData(0, "reception_records", {}, "", 0); wx.$track.setTrackData(0, 'reception_records', {}, '', 0)
} }
return wx.$router.go(item.path, { return wx.$router.go(item.path, {
scene: 0, scene: 0,
params: item.params || {}, params: item.params || {}
}); })
} }
} else { } else {
// 场景集市添加埋点 // 场景集市添加埋点
if (item.menuText == "场景集市") { if (item.menuText == '场景集市') {
wx.$track.setTrackData(0, "scenario_marketplace", {}, "", 0); wx.$track.setTrackData(0, 'scenario_marketplace', {}, '', 0)
} }
if (item.navigateToUrl) { if (item.navigateToUrl) {
wx.navigateTo({ wx.navigateTo({
url: item.navigateToUrl, url: item.navigateToUrl
}); })
return; return
} }
// 工资绩效特殊处理 // 工资绩效特殊处理
if (item.menuText == "工资绩效") { if (item.menuText == '工资绩效') {
return wx.$router.go("packageEquity.collegeScene", { return wx.$router.go('packageEquity.collegeScene', {
reLaunchPath: "packageEquity.equityPage", reLaunchPath: 'packageEquity.equityPage',
tabIndex: 0, tabIndex: 0
}); })
} }
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true); let staffCheck = await checkDailyReport(true)
console.log(staffCheck, "staffCheck"); console.log(staffCheck, 'staffCheck')
if (staffCheck) return false; if (staffCheck) return false
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask(); let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false; if (staffStudyTask) return false
// 校验异常订单
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
/**禁止提单 */ /**禁止提单 */
if (item.beforeClick && (await wx.$globalDataFunction[item.beforeClick]())) return; if (
if (merchantBrand?.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1) { item.beforeClick &&
wx.$router.go("beforeCreate", { (await wx.$globalDataFunction[item.beforeClick]())
mode, )
}); return
if (
merchantBrand?.findIndex(i => ['鸿蒙智行'].includes(i.name)) != -1
) {
wx.$router.go('beforeCreate', {
mode
})
} else { } else {
this.setData({ this.setData({
showPromptDialog: true, showPromptDialog: true
}); })
} }
} }
}, 2000), }, 2000),
......
...@@ -314,7 +314,7 @@ Page({ ...@@ -314,7 +314,7 @@ Page({
}) })
getRecruitDetailAPI({ getRecruitDetailAPI({
id: id id
}) })
.then(res => { .then(res => {
let { let {
......
// const api = wx.$request
import api from '~/utils/request/request.js'
// const api = wx.$request
module.exports = {
/** 工资申诉概览信息查询:
* appealMonth-申诉月份(YYYY-MM)
*/
getSummaryInfo(data) {
return api.post(
'dj.api.staff.miniprogram.salaryapply.summary',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 工资申诉订单统计查询
* appealMonth-申诉月份(YYYY-MM)
* sceneType-(0-会员权益/升级;1-精品升级;2-次新车转化;3-售后众筹;4-积分商城)
* merchantId- 4S店ID
*/
getStatistics(data) {
return api.post(
'dj.api.staff.miniprogram.salaryapply.order.statistics',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 工资申诉复议记录查询
* appealMonth-申诉月份(YYYY-MM)
*/
getReplyList(data) {
return api.post(
'dj.api.staff.miniprogram.salaryapply.reply.list',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 新增平板录音申诉
* appealType-申诉类型(1:考勤,2:平板录音)
* appealMonth-sceneType-merchantId-padRecordNum
*/
createSalaryapply(data) {
return api.post(
'dj.api.staff.miniprogram.salaryapply.pad.create',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 工资申诉最新记录查询
* appealMonth-申诉月份(YYYY-MM)
* appealType-申诉类型(1:考勤,2:平板录音)
*/
getApplyLatest(data) {
return api.post(
'dj.api.staff.miniprogram.salaryapply.latest',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 4s店查询对应的园区店 */
querySceneRefByShop(data) {
return api.post('dj.api.scenemerchantref.querySceneRefByShop', data)
},
/** 获取所有销售列表 */
getEmployeeAllList(data) {
return api.post('dj.api.smartcarlife.employee.getAll', data)
},
}
{
"component": true,
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-uploader": "@vant/weapp/uploader/index"
}
}
.popup-content {
height: 100%;
display: flex;
flex-direction: column;
background: #fff;
}
.van-popup--bottom {
border-radius: var(--fontSize20) var(--fontSize20) 0 0 !important;
}
.popup-fixed-top {
flex: 0 0 auto;
}
.popup-fixed-bottom {
flex: 0 0 auto;
padding: var(--fontSize20) var(--fontSize40);
border-top: var(--fontSize2) solid #E8E8EA;
}
.popup-scroll-area {
flex: 1;
overflow-y: auto;
box-sizing:border-box;
padding: var(--fontSize30) var(--fontSize32);
}
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
background: transparent;
}
.popup-title {
height: var(--fontSize110);
line-height: var(--fontSize110);
font-size: var(--fontSize32);
font-weight: 500;
text-align: center;
border-bottom: var(--fontSize2) solid #E8E8EA;
color: #292d33;
}
.notice-text {
font-size: var(--fontSize24);
color: #292d33;
line-height: 1.67;
padding:var(--fontSize24) 0;
.notice-date {
font-weight: 600;
color: #292D33;
}
}
.form-item {
padding: var(--fontSize28) 0;
&:last-child {
margin-bottom: 0;
}
&.form-item-row {
display: flex;
align-items: center;
justify-content: space-between;
.form-label {
margin-bottom: 0;
flex-shrink: 0;
margin-right: var(--fontSize20);
}
}
}
.form-label {
font-size: var(--fontSize28);
color: #292D33;
margin-bottom: var(--fontSize20);
}
.form-value {
font-size: var(--fontSize28);
color: #292D33;
font-weight: 500;
flex-shrink: 0;
text {
color: #2A82E4;
}
}
.form-input-wrapper {
display: flex;
align-items: center;
height: var(--fontSize80);
flex: 1;
max-width: var(--fontSize280);
}
.form-input {
flex: 1;
font-size: var(--fontSize28);
color: #333;
height: 100%;
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #eff0f2;
padding: 0 var(--fontSize20);
box-sizing: border-box;
text-align: right;
}
.form-unit {
font-size: var(--fontSize28);
color: #666;
margin-left: var(--fontSize12);
}
.upload-wrapper {
margin-top: var(--fontSize10);
position: relative;
}
.upload-count-badge {
position: absolute;
bottom: var(--fontSize20);
left: 50%;
transform: translateX(-50%);
font-size: var(--fontSize24);
color: #999;
z-index: 2;
}
.plus {
::v-deep .van-uploader__wrapper {
display: flex;
flex-wrap: wrap;
gap: var(--fontSize20);
}
::v-deep .van-uploader__upload {
width: var(--fontSize160);
height: var(--fontSize160);
background: #f5f5f5;
border: var(--fontSize2) dashed #eff0f2;
border-radius: var(--fontSize8);
}
::v-deep .van-uploader__preview {
width: var(--fontSize160);
height: var(--fontSize160);
border-radius: var(--fontSize8);
overflow: hidden;
}
::v-deep .van-uploader__upload-text {
font-size: var(--fontSize24);
color: #999999;
}
::v-deep .van-icon-photograph:before {
content: '' !important;
width: var(--fontSize32) !important;
height: var(--fontSize32) !important;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/icon-plus.png') !important;
background-size: 100% 100% !important;
}
}
.upload-wrapper .plus .van-icon-photograph:before {
content: '' !important;
width: var(--fontSize32) !important;
height: var(--fontSize32) !important;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/icon-plus.png') !important;
background-size: 100% 100% !important;
}
.form-textarea {
width: 100%;
box-sizing: border-box;
height: var(--fontSize192);
padding: var(--fontSize24);
font-size: var(--fontSize28);
color: #333;
background: #f5f5f5;
border-radius: var(--fontSize16);
line-height: 1.6;
}
.char-count {
text-align: right;
font-size: var(--fontSize24);
color: #999;
margin-top: var(--fontSize10);
}
.popup-buttons {
display: flex;
gap: var(--fontSize24);
}
.cancel-btn, .confirm-btn {
flex: 1;
height: var(--fontSize80);
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
line-height: var(--fontSize80);
text-align: center;
}
.cancel-btn {
background: #F4F5F7;
color: #323233;
border: var(--fontSize2) solid #E8E8EA;
}
.confirm-btn {
background: #347BFF;
color: #fff;
&.disabled {
background:rgba(52, 123, 255, 0.37);
color: #F4F5F7;
cursor: not-allowed;
}
}
<wxs module="utils">
// 计算upload-text(适配数组结构)
var getUploadText = function(imageList, maxCount, defaultText) {
var currentCount = 0;
if (imageList && imageList.length != null) {
// 获取已完成文件的数量(status === 'done' 或没有 status 字段,说明是编辑回显的数据)
for (var i = 0; i < imageList.length; i++) {
var file = imageList[i];
if (file) {
// 如果 status 是 'done' 或者没有 status 字段(编辑回显的数据),都计算在内
if (!file.status || file.status === 'done') {
currentCount = currentCount + 1;
}
}
}
}
var max = maxCount ? (maxCount - 0) : 1;
if (max > 1) {
return '('+currentCount+'/'+max+')';
}
return defaultText || '(' + max + ')';
};
module.exports = {
getUploadText: getUploadText
};
</wxs>
<van-popup show="{{ show }}" position="bottom"custom-style="height: 90%; border-radius: 12px 12px 0 0;" bind:close="onClose">
<view class="popup-content">
<view class="popup-fixed-top">
<view class="popup-title">{{ title }}</view>
</view>
<scroll-view class="popup-scroll-area" scroll-y="{{ true }}" scroll-top="{{ scrollTop }}" scroll-with-animation="{{ false }}" show-scrollbar="{{ false }}">
<view class="notice-text">
规定申诉时间为 <text class="notice-date">{{ dateRange }}</text>,支持提交修订异议处理,总部流转审批,请在规定时间内完成,逾期不再受理。
</view>
<view class="form-item form-item-row">
<view class="form-label">{{ currentLabel }}</view>
<view class="form-value"> <text>{{ form.actualAttendanceDays || form.padRecordNum }}</text> {{ unit }}</view>
</view>
<view class="form-item form-item-row">
<view class="form-label">{{ appealLabel }}</view>
<view class="form-input-wrapper">
<input class="form-input" placeholder="{{ appealType === 'recording' ? '输入正确条数' : '输入正确数字' }}" value="{{ appealType === 'recording' ? form.applyPadRecordNum : form.applyActualAttendanceDays }}" bindinput="onAppealNumInput" />
<text class="form-unit">{{ unit }}</text>
</view>
</view>
<view class="form-item">
<view class="form-label">上传截图说明</view>
<view class="upload-wrapper">
<van-uploader class="plus" file-list="{{ form.attachmentList }}" upload-text="{{ utils.getUploadText(form.attachmentList, 9, '上传照片') }}" max-count="9" multiple="{{ true }}" deletable preview-size="var(--fontSize160)" bind:after-read="onImageAfterRead" bind:delete="onImageDelete"></van-uploader>
</view>
</view>
<view class="form-item">
<view class="form-label">备注说明</view>
<textarea class="form-textarea" placeholder="请输入(500字以内)" value="{{ form.remark }}" bindinput="onRemarkInput" maxlength="500"></textarea>
<view class="char-count">{{ form.remark.length }}/500</view>
</view>
<view class="form-item">
<view class="form-label">其他异常问题留言</view>
<textarea class="form-textarea" placeholder="请输入(500字以内)" value="{{ form.otherAbnormalMessage }}" bindinput="onOtherIssuesInput" maxlength="500"></textarea>
<view class="char-count">{{ form.otherAbnormalMessage.length }}/500</view>
</view>
</scroll-view>
<view class="popup-fixed-bottom">
<view class="popup-buttons">
<view class="cancel-btn" bindtap="onClose">取消</view>
<view class="confirm-btn {{ isFormValid ? '' : 'disabled' }}" bindtap="onConfirm">确认</view>
</view>
</view>
</view>
</van-popup>
// compoents/monthCalendar/monthCalendar.js
Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/** * 组件的属性列表 * 用于组件自定义设置 */
properties: {
index: {
type: Number
}
},
/**
* 组件的初始数据
*/
data: {
selectMonth: -1, // 默认显示上个月,0代表本月,-1代表上个月,1代表下个月
timeBean: {}
},
/**
* 组件生命周期函数--在组件实例刚刚被创建时执行
*/
lifetimes: {
attached: function() {
// 初始化时间数据,默认显示上个月
const timeBean = this.getMonthData(-1)
this.setData({
timeBean
})
// 通知父组件初始月份
this.triggerEvent('monthChange', {
timeBean: timeBean,
selectMonth: -1
})
}
},
/**
* 组件的方法列表
*/
methods: {
/**
* 获取月份数据
* selectMonth: 0代表本月,-1代表上个月,1代表下个月
*/
getMonthData: function(selectMonth) {
const now = new Date()
const currentYear = now.getFullYear()
const currentMonth = now.getMonth() + 1 // 当前月份(1-12)
// 计算目标月份
let targetYear = currentYear
let targetMonth = currentMonth + selectMonth
// 处理跨年
while (targetMonth < 1) {
targetMonth += 12
targetYear -= 1
}
while (targetMonth > 12) {
targetMonth -= 12
targetYear += 1
}
// 检查是否在一年范围内(从当前月份往前推12个月,即从去年当前月到今年当前月)
// 例如:当前是2024年3月,可查看范围是2023年3月到2024年3月
const minYear = currentYear - 1
const minMonth = currentMonth
const maxYear = currentYear
const maxMonth = currentMonth
// 判断是否在范围内:不能超过当前月,不能早于一年前
const isAfterCurrentMonth = (targetYear > maxYear) || (targetYear === maxYear && targetMonth > maxMonth)
const isBeforeOneYear = (targetYear < minYear) || (targetYear === minYear && targetMonth < minMonth)
const isWithinRange = !isAfterCurrentMonth && !isBeforeOneYear
// 格式化月份显示
const yearMonth = targetYear + '-' + (targetMonth < 10 ? '0' + targetMonth : targetMonth)
const yearMonthLabel = targetYear + '-' + targetMonth + ''
// 判断是否应该显示"下个月"按钮
const shouldShowNextMonth = selectMonth < -1 // 只有selectMonth < -1时才显示下个月按钮
// 判断是否应该显示"上个月"按钮:如果往前一个月还在范围内,则显示
const nextSelectMonth = selectMonth - 1
let nextTargetYear = currentYear
let nextTargetMonth = currentMonth + nextSelectMonth
// 处理跨年
while (nextTargetMonth < 1) {
nextTargetMonth += 12
nextTargetYear -= 1
}
while (nextTargetMonth > 12) {
nextTargetMonth -= 12
nextTargetYear += 1
}
const nextIsAfterCurrentMonth = (nextTargetYear > maxYear) || (nextTargetYear === maxYear && nextTargetMonth > maxMonth)
const nextIsBeforeOneYear = (nextTargetYear < minYear) || (nextTargetYear === minYear && nextTargetMonth < minMonth)
const nextIsWithinRange = !nextIsAfterCurrentMonth && !nextIsBeforeOneYear
const shouldShowLastMonth = nextIsWithinRange
return {
yearMonth: yearMonthLabel,
formatYearMonth: yearMonth,
selectMonth: selectMonth,
isCurrentMonth: selectMonth === 0,
isWithinRange: isWithinRange,
targetYear: targetYear,
targetMonth: targetMonth,
shouldShowNextMonth: shouldShowNextMonth,
shouldShowLastMonth: shouldShowLastMonth
}
},
/**
* 点击了上一月,选择月份数字减一
*/
lastMonth: function (e) {
// 触发短震动反馈
wx.vibrateShort()
var selectMonth = this.data.selectMonth - 1
var timeBean = this.getMonthData(selectMonth)
// 检查是否超出一年范围
if (!timeBean.isWithinRange) {
// wx.showToast({
// title: '仅支持查看一年内的月份',
// icon: 'none'
// })
return
}
this.setData({
timeBean,
selectMonth
})
// 触发月份切换事件,通知父组件
this.triggerEvent('monthChange', {
timeBean: timeBean,
selectMonth: selectMonth
})
},
/**
* 点击了下一月,选择月份数字加一
*/
nextMonth: function (e) {
// 触发短震动反馈
wx.vibrateShort()
var selectMonth = this.data.selectMonth + 1
// 检查是否超出范围:只能选择当前月的上一月或更早的月份(selectMonth <= -1)
// 如果selectMonth >= 0,说明下个月是当前月或未来月份,不应该可选
if (selectMonth >= 0) {
// wx.showToast({
// title: '只能选择当前月的上一月',
// icon: 'none'
// })
return
}
var timeBean = this.getMonthData(selectMonth)
// 检查是否超出一年范围
if (!timeBean.isWithinRange) {
// wx.showToast({
// title: '仅支持查看一年内的月份',
// icon: 'none'
// })
return
}
this.setData({
timeBean,
selectMonth
})
// 触发月份切换事件,通知父组件
this.triggerEvent('monthChange', {
timeBean: timeBean,
selectMonth: selectMonth
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/staffDaily/weekCalendar/weekCalendar.wxss */
/* compoents/weekCalendar/weekCalendar.wxss */
.row {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
background: #fff;
.week_box {
height: var(--fontSize60);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 var(--fontSize4) var(--fontSize8) 0 #cdcdd159;
}
.date_box {
height: var(--fontSize128);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
.left {
margin-left: 10rpx;
}
.right {
margin-right: 20rpx;
}
}
.weekselect {
height: var(--fontSize80);
flex-direction: row;
justify-content: space-between;
}
.column {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
flex: 1;
}
.nextWeek {
font-family: PingFangSC-Regular;
font-weight: 400;
flex-direction: row;
color: #181A1F;
width: var(--fontSize200);
font-size: 28rpx;
}
.dateType {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
color: #292D33;
border-radius: 50%;
width: var(--fontSize64);
height: var(--fontSize64);
.empty {
box-sizing: border-box;
position: absolute;
width: var(--fontSize38);
text-align: center;
height: var(--fontSize32);
background: #F24724;
border-radius: var(--fontSize16);
bottom: var(--fontSize40);
left: var(--fontSize40);
font-size: var(--fontSize22);
z-index: 2;
padding: 0 var(--fontSize4);
color: #fff;
}
}
.dateType.dateType_disabled {
color: #BEC1C7;
}
.weekType {
font-size: var(--fontSize28);
color: #292D33;
}
.select-column {
.dateType {
background: #347BFF;
color: #fff;
}
}
.disabled {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: var(--fontSize5);
padding-top: var(--fontSize5);
margin-left: var(--fontSize5);
margin-right: var(--fontSize5);
margin-top: var(--fontSize10);
flex: 1;
border-top-left-radius: var(--fontSize20);
border-top-right-radius: var(--fontSize20);
background: #F6FCFE;
color: #292D33;
}
.timeType {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize28);
color: #181A1F;
width: 280rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
border-radius: 20px;
background: #f2f3f5;
}
.line {
height: var(--fontSize1);
width: 100%;
background-color: gainsboro;
}
.lastweek {
width: var(--fontSize200);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: var(--fontSize28);
flex-direction: row;
color: #181A1F;
}
.line-shadow {
height: var(--fontSize3);
width: 100%;
background-color: gainsboro;
box-shadow: 5px 0px 5px 0px gainsboro;
}
@font-face {
font-family: "iconfont";
src: url('iconfont.eot?t=1533031583450');
/* IE9*/
src: url('iconfont.eot?t=1533031583450#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAZsAAsAAAAACRQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW70iqY21hcAAAAYAAAAB4AAABwJvIBhZnbHlmAAAB+AAAAkwAAAKQdkD3EWhlYWQAAAREAAAAMQAAADYSKu8/aGhlYQAABHgAAAAgAAAAJAfdA4hobXR4AAAEmAAAABgAAAAYF+r//2xvY2EAAASwAAAADgAAAA4CUAFWbWF4cAAABMAAAAAfAAAAIAEVAF1uYW1lAAAE4AAAAUUAAAJtPlT+fXBvc3QAAAYoAAAAQgAAAFjpq2VXeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDzbztzwv4EhhrmVoREozAiSAwAyfQ0teJzFkcENhDAMBMcEIoQo5T60cG9q4cWDyqAjt8GtYz5XAWtNZK8cOXKAASjiI3qwHSO0ybXmF6bm93xVT4x0isOrL37dt7zMz5anTH0ZkQ+628UUq7wme2/0v+Z2rk8V+z8e9ESvSfi+JPEvfibaI34llB8XahpqeJxlUTtoFGEQ/uf/s8/s43b39pm7vdtdb1cTvXCbuz0f5ILGQo+gEYOoVQQbidEqpFE8CAE1IQg2KbQRwdIuAUmTWNtaCBZBC1GwujK355/a4ZsPZoaBb75BDELDQ7JHHGSgk6iBLqN5hICdgFDBZQiSZh1PgBkwpl1USBIlAReFdTINdsgWrTRrxjbLsSoo4MNUkGZJHSfQanbwBUitMoA75t3UayWdvALRSfz1vIvfgVmJSmrnTH719EwxrRr8qqTrrq5v8izD8BiPqAos25bACCKbv2dUz9yrnMIVkNzEm7sjV8f0e8+bj8o1WwDo9cAYqyofZjRPo3jiWYbucgWZdzw5OlGE1Z+jjiGV4x+IBhwT7uO/CCMkgAYS/IJe/hp/+3+G+7kDPVgexAiR4XD4bASRdSQgGwUIufRam9FqMVvjNAVUqHWgrdWB0FRBa3cAQhc+5jfckBxsg2+vwKwX0uZ38K2dHcsn84NKqSFuk/vbvKNdGvilc4X5FaFRwocl9+g35YL64ujNS/X8sawR+qMB2SAsStA0mkVdKrcZJ1ErTurAUSjAsccUKWBSZWbRovZn09CBWmanWTvO2pll+0CF2ZYdZBC1aEGXk0ABsiGLqtbyUq3w4Nbc7cLFcd1hbVHGa8u63Fe0h2uDpeAsL2OYWegusEQVSaMcyoO3Imx9nXrcXNr6LOFP8gH8ESXA3UDloXEdc9cSPG5M2iCJT/cnFxXDUBYn978EROC4u6NwJRZHCUDBTINcmKUWVsnu5uYu+gfDb3VreJxjYGRgYADi/KUVefH8Nl8ZuFkYQOB6W+h8GP3///96FgbmViCXg4EJJAoATnwMXwAAAHicY2BkYGBu+N/AEMPC+P8/AwMLAwNQBAWwAQB19gRuBAAAAAPpAAAEAAAABAAAAAQB//8EAAAAAAAAAAB2AIQAkgDSAUgAAHicY2BkYGBgYwhkYGUAASYg5gJCBob/YD4DABFIAXMAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAjZGJkZmRhZGVkY2RnYGxgrs4MS8rMzE/JzWthAfKLspMzyhhTcrPzzZkzc1MS8xjYAAAPg4OSAAA') format('woff'),
url('iconfont.ttf?t=1533031583450') format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1533031583450#iconfont') format('svg');
/* iOS 4.1- */
}
.icon {
width: 36rpx;
height: 36rpx;
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/**
*字体图标,左右箭头,书,米饭,可以修改界面对图标进行修改替换
*/
.icon-sanjiaoleft:before {
content: "\e6b6";
}
.icon-sanjiaoright:before {
content: "\e6b7";
}
.icon-book1:before {
content: "\e631";
}
.icon-mifan:before {
content: "\e606";
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/staffDaily/weekCalendar/weekCalendar.wxml-->
<!--compoents/weekCalendar/weekCalendar.wxml-->
<view class="line"></view>
<view class="row weekselect">
<view class="row lastweek" bindtap="lastMonth">
<block wx:if="{{ timeBean.shouldShowLastMonth }}">
<!-- <text class="iconfont icon-sanjiaoleft" style="padding:var(--fontSize15);color: #bec1c7;"></text> -->
<gl-image class="icon left" src="{{ '/miniProgram/arrow-left.png' }}" webp></gl-image>
<view style="">上个月</view>
</block>
</view>
<view class="timeType">{{timeBean.yearMonth}}</view>
<view class="row nextWeek" bindtap="nextMonth">
<block wx:if="{{ timeBean.shouldShowNextMonth }}">
<view style=" ">下个月</view>
<gl-image class="icon right" src="{{ '/miniProgram/arrow-right.png' }}" webp></gl-image>
<!-- <text class="iconfont icon-sanjiaoright" style="padding:var(--fontSize15);color: #bec1c7;"></text> -->
</block>
</view>
</view>
<!-- <view class="line-shadow"></view> -->
<view class="suspension" bindtap="addMenuClick">
<text class="iconfont icon-tianjia" style="font-size:var(--fontSize60); color:#fff;"></text>
</view>
\ No newline at end of file \ No newline at end of file
// components/staffSelector/staffSelector.js
Component({
/**
* 组件的属性列表
*/
properties: {
// 控制弹框显示/隐藏
show: {
type: Boolean,
value: false
},
// 员工选项列表,格式:[{text: '姓名', value: 'id'}, ...]
options: {
type: Array,
value: []
},
// 当前选中的值(整个对象)
selectedValue: {
type: Object,
value: {
staffPhone: "13132112120",
text: "晨星1号",
value: "173690cbda6d4e8bbccdb3ab485858f8"
}
}
},
/**
* 组件的初始数据
*/
data: {
keyWord: '',
filteredOptions: [],
selectedOptions: [],
searchTimer: null
},
/**
* 组件生命周期函数
*/
lifetimes: {
attached: function() {
// 组件初始化时,如果弹框已显示且有数据,进行初始化
const { show, options, selectedValue } = this.properties
if (show && options && options.length > 0) {
this.initPopup()
}
}
},
/**
* 组件的方法列表
*/
methods: {
/**
* 关闭弹框
*/
onClose: function() {
this.setData({
show: false,
keyWord: ''
})
// 清除防抖定时器
if (this.data.searchTimer) {
clearTimeout(this.data.searchTimer)
this.setData({ searchTimer: null })
}
// 触发关闭事件
this.triggerEvent('close')
},
/**
* 初始化弹框数据
*/
initPopup: function() {
const { options, selectedValue } = this.properties
// 兼容处理:支持多种数据格式
let selectedValueObj = null
let selectedValueId = null
if (selectedValue) {
if (typeof selectedValue === 'string') {
// 字符串格式:直接是 value
selectedValueId = selectedValue
const foundOption = options.find(opt => opt.value === selectedValue)
if (foundOption) {
selectedValueObj = foundOption
}
} else if (typeof selectedValue === 'object') {
// 对象格式
if (selectedValue.value) {
// 格式1:{ staffPhone, text, value }
selectedValueId = selectedValue.value
selectedValueObj = selectedValue
} else if (selectedValue.staffId) {
// 格式2:{ staffName, staffId, staffPhone }
selectedValueId = selectedValue.staffId
// 从 options 中查找对应的对象
const foundOption = options.find(opt => opt.value === selectedValue.staffId)
if (foundOption) {
selectedValueObj = {
staffPhone: selectedValue.staffPhone || foundOption.staffPhone,
text: selectedValue.staffName || foundOption.text,
value: selectedValue.staffId || foundOption.value
}
}
}
}
}
// 处理选项列表,标记选中状态
let processedOptions = options.map(option => ({
...option,
checked: selectedValueId && option.value === selectedValueId
}))
// 设置选中的选项ID数组(用于单选模式)
let selectedOptions = []
if (selectedValueId) {
const selectedOption = processedOptions.find(opt => opt.value === selectedValueId)
if (selectedOption) {
selectedOptions = [selectedValueId]
}
}
this.setData({
filteredOptions: processedOptions,
selectedOptions: selectedOptions,
keyWord: ''
})
},
/**
* 搜索输入
*/
onSearchInput: function(e) {
const value = e.detail.value || ''
this.setData({
keyWord: value
})
// 清除之前的定时器
if (this.data.searchTimer) {
clearTimeout(this.data.searchTimer)
}
// 设置防抖:500ms 后执行搜索
const timer = setTimeout(() => {
this.performSearch(value)
}, 500)
this.setData({
searchTimer: timer
})
},
/**
* 搜索确认
*/
onSearch: function(e) {
const keyword = e.detail.value || ''
this.setData({
keyWord: keyword
})
this.performSearch(keyword)
},
/**
* 执行搜索
*/
performSearch: function(keyword) {
const { options } = this.properties
const { selectedOptions } = this.data
let filteredOptions = options
if (keyword) {
filteredOptions = options.filter(option =>
option.text && option.text.includes(keyword)
)
}
// 保持选中状态
if (selectedOptions.length > 0) {
const selectedValue = selectedOptions[0]
filteredOptions = filteredOptions.map(option => ({
...option,
checked: option.value === selectedValue
}))
} else {
filteredOptions = filteredOptions.map(option => ({
...option,
checked: false
}))
}
this.setData({
filteredOptions: filteredOptions
})
},
/**
* 重置搜索
*/
handleSearchReset: function() {
this.setData({
keyWord: ''
})
this.performSearch('')
},
/**
* 切换选项选中状态(单选模式)
*/
toggleOption: function(e) {
const value = e.currentTarget.dataset.value
const { options } = this.properties
const { filteredOptions } = this.data
// 先取消所有选中状态
filteredOptions.forEach(option => {
option.checked = false
})
// 找到点击的选项并设置选中状态
const filteredIndex = filteredOptions.findIndex(option => option.value === value)
if (filteredIndex >= 0) {
filteredOptions[filteredIndex].checked = true
}
this.setData({
filteredOptions,
selectedOptions: [value]
})
},
/**
* 确认选择
*/
onConfirm: function() {
const { selectedOptions } = this.data
if (selectedOptions.length > 0) {
const selectedValue = selectedOptions[0]
const { options } = this.properties
const selectedOption = options.find(option => option.value === selectedValue)
if (selectedOption) {
// 触发确认事件,传递选中的整个对象
this.triggerEvent('confirm', {
value: selectedValue,
option: selectedOption
})
}
}
// 关闭弹框
this.onClose()
}
},
/**
* 属性观察器
*/
observers: {
// 监听弹框显示、选项列表和选中值的变化
'show, options, selectedValue': function(show, options, selectedValue) {
// 当弹框显示且有选项数据时,初始化数据(包括选中回显)
if (show && options && options.length > 0) {
this.initPopup()
}
}
}
})
{
"component": true,
"usingComponents": {
"van-popup": "@vant/weapp/popup/index"
}
}
/* components/staffSelector/staffSelector.sass */
/* 员工选择弹出层样式 */
.popup-content {
height: 100%;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}
/* 设置popup顶部圆角 */
.van-popup--bottom {
border-radius: var(--fontSize20) var(--fontSize20) 0 0 !important;
overflow: hidden;
}
.popup-fixed-top {
flex: 0 0 auto;
}
.popup-fixed-bottom {
flex: 0 0 auto;
padding: 0 var(--fontSize40);
background: #fff;
}
.popup-scroll-area {
flex: 1;
overflow-y: auto;
padding: 0 var(--fontSize40);
}
.popup-title {
height: var(--fontSize110);
line-height: var(--fontSize110);
font-size: var(--fontSize32);
font-weight: 500;
text-align: center;
border-bottom: var(--fontSize2) solid #E8E8EA;
}
.search-box {
width: var(--fontSize686);
padding: var(--fontSize16) 0;
margin: 0 var(--fontSize40);
.search-input {
width: 100%;
display: flex;
align-items: center;
height: var(--fontSize72);
background-color: #f5f5f5;
border-radius: var(--fontSize36);
padding: 0 var(--fontSize30);
font-size: var(--fontSize28);
box-sizing: border-box;
position: relative;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
position: absolute;
left: 45%;
top: 50%;
transform: translate(-100%, -50%);
z-index: 1;
margin-left: calc(var(--fontSize-14) - var(--fontSize28));
}
.input {
flex: 1;
height: 100%;
text-align: center;
background-color: transparent;
color: #292d33;
font-size: var(--fontSize28);
}
.input-placeholder {
color: #BEC1C7;
text-align: center;
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
position: absolute;
right: var(--fontSize30);
top: 50%;
z-index: 999;
transform: translateY(-50%);
}
}
}
.popup-options {
padding: var(--fontSize10) 0;
}
.option-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--fontSize24) 0;
border-bottom: var(--fontSize2) solid #eee;
font-size: var(--fontSize28);
}
.option-item:active {
background-color: #f2f3f5;
}
.option-name {
flex: 1;
}
.option-item.checked .option-name {
color: #347BFF;
}
.option-check {
width: var(--fontSize40);
height: var(--fontSize40);
display: flex;
align-items: center;
justify-content: center;
}
.option-check.checked {
color: #347BFF;
}
.check-icon {
width:var(--fontSize32);
height:var(--fontSize32);
}
.empty-tip {
padding: var(--fontSize60) 0;
text-align: center;
color: #999;
font-size: var(--fontSize28);
}
.popup-buttons {
display: flex;
justify-content: space-between;
padding: var(--fontSize20) 0;
}
.cancel-btn, .confirm-btn {
width: var(--fontSize331);
height: var(--fontSize80);
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
line-height: var(--fontSize80);
display: flex;
align-items: center;
justify-content: center;
}
.cancel-btn {
background-color: #F4F5F7;
color: #323233;
margin-right: var(--fontSize24);
}
.confirm-btn {
background-color: #347BFF;
color: #fff;
}
<!-- 员工选择弹出层 -->
<van-popup show="{{ show }}" position="bottom" custom-style="height: 70%; border-radius: 12px 12px 0 0;" bind:close="onClose">
<view class="popup-content">
<!-- 固定顶部区域 -->
<view class="popup-fixed-top">
<view class="popup-title">选择员工</view>
<!-- 搜索框 -->
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !keyWord }}">
<image src="/images/search.png" class="search-icon" />
</block>
<input
type="text"
placeholder="搜索"
class="input"
confirm-type="search"
value="{{ keyWord }}"
placeholder-class="input-placeholder"
bindinput="onSearchInput"
bindconfirm="onSearch"
/>
<block wx:if="{{ keyWord }}">
<image src="/images/clear.png" class="search-clear" bindtap="handleSearchReset" />
</block>
</view>
</view>
</view>
<!-- 可滚动的中间区域 -->
<view class="popup-scroll-area">
<!-- 选项列表 -->
<view class="popup-options" wx:if="{{ options.length > 0 }}">
<view
class="option-item {{ item.checked ? 'checked' : '' }}"
wx:for="{{ filteredOptions }}"
wx:key="value"
bindtap="toggleOption"
data-value="{{ item.value }}"
>
<view class="option-name">{{item.text}}</view>
<view class="option-check {{ item.checked ? 'checked' : '' }}">
<!-- <text class="check-icon" wx:if="{{ item.checked }}">✓</text> -->
<image src="/images/icon-strategy-checked.png" class="check-icon" wx:if="{{ item.checked }}" />
</view>
</view>
<view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}">
<text>无匹配结果</text>
</view>
</view>
</view>
<!-- 固定底部区域 -->
<view class="popup-fixed-bottom">
<view class="popup-buttons">
<view class="cancel-btn" bindtap="onClose">取消</view>
<view class="confirm-btn" bindtap="onConfirm">确定</view>
</view>
</view>
</view>
</van-popup>
/**
* 工资申诉常量数据映射
* 将API返回的数据映射到 salaryItems 数据结构
*/
// 工资项基础配置
const SALARY_ITEM_CONFIG = [
{
id: 'attendance',
title: '实际出勤天数',
centerLeft: '根据打卡数据产生',
btnText: '申诉考勤',
unit: '天',
defaultValue: 0
},
{
id: 'daily',
title: '日报完成天数',
centerLeft: '填写驻店日报天数',
btnText: '去补日报',
unit: '天',
defaultValue: 0,
hasMissingDates: true
},
{
id: 'recording',
title: '平板录音总数',
centerLeft: '触客总数为',
btnText: '申诉平板',
unit: '条',
defaultValue: 0
}
]
// API字段映射配置
const API_FIELD_MAP = {
attendance: {
value: 'actualAttendanceDays',
deduction: 'attendanceDeductionAmount',
appealable: 'attendanceAppealable'
},
daily: {
value: 'dailyReportDays',
deduction: 'dailyReportDeductionAmount',
appealable: 'dailyReportable',
missingDates: 'missingDailyReportDates'
},
recording: {
value: 'padRecordNum',
deduction: 'padDeductionAmount',
appealable: 'padAppealable'
}
}
/**
* 格式化扣款金额显示
*/
const formatDeductionAmount = (amount) => {
if (!amount || amount === 0) return ''
return amount > 0 ? `-${amount}元` : `${amount}元`
}
/**
* 格式化缺失日期显示
*/
const formatMissingDates = (dates) => {
if (!dates || !Array.isArray(dates) || dates.length === 0) return ''
return dates.map(date => {
if (date.includes('-')) {
const day = date.split('-')[2]
return day.replace(/^0+/, '')
}
return date
}).join('、') + '号'
}
/**
* 格式化数值显示
*/
const formatValue = (value, unit, defaultValue = 0) => {
const num = value !== undefined && value !== null ? value : defaultValue
return `${num}${unit}`
}
/**
* 创建单个工资项数据
*/
const createSalaryItem = (config, apiData) => {
const fieldMap = API_FIELD_MAP[config.id]
const value = apiData[fieldMap.value]
const deductionAmount = apiData[fieldMap.deduction]
const appealable = apiData[fieldMap.appealable] || false
const missingDates = config.hasMissingDates ? apiData[fieldMap.missingDates] : null
return {
id: config.id,
title: config.title,
value: formatValue(value, config.unit, config.defaultValue),
centerLeft: config.centerLeft,
centerLeftNum: '',
centerRight: deductionAmount ? '扣款' : '',
centerRightPrice: formatDeductionAmount(deductionAmount),
bottomText: missingDates && missingDates.length > 0 ? '缺失天数为' : '',
bottomDays: config.hasMissingDates ? formatMissingDates(missingDates) : '',
btnText: appealable ? config.btnText : '',
btnType: config.id,
appealable
}
}
/**
* 将API数据映射到工资项数据结构
* @param {Object} apiData - API返回的数据对象
* @returns {Array} salaryItems 数组
*/
export function mapApiDataToSalaryItems(apiData = {}) {
return SALARY_ITEM_CONFIG.map(config => createSalaryItem(config, apiData))
}
/**
* 默认的工资项数据结构(用于初始化或兜底)
*/
export const defaultSalaryItems = mapApiDataToSalaryItems({})
{
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"usingComponents": {
"monthCalendar": "/packageEquity/pages/salaryAppeal/components/monthCalendar/monthCalendar",
"staffSelector": "/packageEquity/pages/salaryAppeal/components/staffSelector/staffSelector",
"appealSelector": "/packageEquity/pages/salaryAppeal/components/appealSelector/appealSelector"
}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/salaryAppeal/salaryAppeal.wxss */
page {
background: #F7F8FA;
height: 100%;
}
.container_page {
height: 100%;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: var(--fontSize214);
}
.content {
padding:0 var(--fontSize20);
}
.header {
display: flex;
justify-content: space-between;
height:var(--fontSize88);
line-height:var(--fontSize88);
padding:0 var(--fontSize32);
.header-title {
color: #292d33;
font-size: var(--fontSize28);
font-weight: 500;
.sub-title{
color: #999ea8;
font-size: var(--fontSize24);
font-weight: 400;
margin-left: var(--fontSize8);
}
}
.header-right {
display: flex;
align-items: center;
color: #347bff;
font-size: var(--fontSize28);
.icon-select {
width: var(--fontSize40);
height: var(--fontSize40);
margin-left: var(--fontSize16);
}
}
}
.header-56 {
height: var(--fontSize112);
line-height: var(--fontSize112);
}
// 当月基本工资统计
.salary-list {
.salary-item {
width: var(--fontSize710);
min-height: var(--fontSize140);
border-radius: var(--fontSize16);
box-sizing: border-box;
background: #ffffff;
margin-bottom: var(--fontSize24);
padding: var(--fontSize24) var(--fontSize32);
.top {
display: flex;
justify-content: space-between;
color: #292d33;
font-size: var(--fontSize28);
font-weight: 500;
}
.center {
display: flex;
justify-content: space-between;
color: #757980;
font-size: var(--fontSize24);
font-weight: 400;
margin: var(--fontSize14) 0 var(--fontSize16) 0;
.price {
color: #ea6612;
font-size: var(--fontSize28);
font-weight: 400;
}
.num {
color: #2A82E4;
margin-left: var(--fontSize8);
}
}
.bottom {
color: #757980;
font-size: var(--fontSize24);
font-weight: 400;
.days {
color: #2A82E4;
margin-left: var(--fontSize8);
}
}
.btn {
width: 84px;
height: 28px;
border-radius: 16px;
opacity: 1;
border: 1px solid #347bff;
background: #ffffff;
color: #347bff;
font-size: 14px;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
margin-top: var(--fontSize16);
margin-left: auto;
}
}
}
.order-card {
box-sizing: border-box;
width: var(--fontSize710);
border-radius: var(--fontSize16);
background: #ffffff;
padding: var(--fontSize24) var(--fontSize32);
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 0 auto;
&-item {
width: calc(50% - var(--fontSize8));
margin-bottom: var(--fontSize24);
display: flex;
flex-direction: column;
&:nth-last-child(1),
&:nth-last-child(2) {
margin-bottom: 0;
}
&-label {
color: #999ea8;
font-size: var(--fontSize24);
margin-bottom: var(--fontSize8);
}
&-value {
color: #292D33;
font-size: var(--fontSize28);
font-weight:500;
line-height: 1.2;
}
}
}
.reply-record {
box-sizing: border-box;
width: var(--fontSize710);
background: #ffffff;
padding: var(--fontSize24) var(--fontSize32);
.record-card {
border-radius: var(--fontSize16);
padding: var(--fontSize24) var(--fontSize32);
background: #f2f2f2;
margin-bottom: var(--fontSize24);
&:last-child {
margin-bottom: 0;
}
.text {
color: #292d33;
font-size: var(--fontSize28);
font-weight: 400;
}
.type-date {
color: #757b85;
font-size: var(--fontSize24);
font-weight: 400;
margin-top: var(--fontSize44);
text-align:right;
.date {
margin-left:4px;
}
}
}
.empty-data {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: var(--fontSize80) 0;
.empty-icon {
width: var(--fontSize200);
height: auto;
}
.empty-text {
color: #999ea8;
font-size: var(--fontSize28);
font-weight: 400;
margin-top: var(--fontSize24);
}
}
}
\ No newline at end of file \ No newline at end of file
<glsx-privacy appletName="工作申诉" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="container_page">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<view class="navigation-title">
<!-- <view class="navigation-title-text text-hide">{{orderObj.merchantName || '全部'}}</view> -->
<view class="navigation-title-text text-hide">工资申诉</view>
</view>
</navigation-bar>
<view style="margin-top:{{ navBarHeight }}px">
<monthCalendar bind:monthChange="onMonthChange"></monthCalendar>
</view>
<view class="content">
<view class="header">
<view class="header-title">
<text>当月基本工资统计</text>
</view>
<view class="header-right" bindtap="showStaffPopup">
<p>{{filters.staffName}}</p>
<image wx:if="{{staffAbled}}" class="icon-select" src="/packageEquity/pages/image/icon-salary-arrow-d.png" mode="widthFix"></image>
</view>
</view>
<view class="salary-list">
<view
class="salary-item"
wx:for="{{salaryItems}}"
wx:key="id"
data-type="{{item.btnType}}"
data-index="{{index}}"
>
<view class="top">
<p>{{item.title}}</p>
<p>{{item.value}}</p>
</view>
<view class="center">
<p>
<text wx:if="{{item.id === 'recording' ? item.centerLeftNum : true}}">{{item.centerLeft}}</text>
<text class="num" wx:if="{{item.centerLeftNum}}">{{item.centerLeftNum}}</text>
</p>
<p>
<text wx:if="{{item.centerRightPrice}}">{{item.centerRight}} </text>
<text class="price" wx:if="{{item.centerRightPrice}}">{{item.centerRightPrice}}</text>
<text class="price" style="color: #757980;" wx:if="{{!item.centerRightPrice && item.btnType != 'attendance'}}">扣款 -</text>
</p>
</view>
<view class="bottom" wx:if="{{item.bottomText || item.bottomDays}}">
<text wx:if="{{item.bottomText && item.bottomDays}}">{{item.bottomText}} </text>
<text class="days" wx:if="{{item.bottomDays}}">{{item.bottomDays}}</text>
</view>
<view class="btn" wx:if="{{item.btnAble}}" bindtap="onSalaryItemClick" data-type="{{item.btnType}}" data-index="{{index}}">
{{item.btnText}}
</view>
</view>
</view>
<!-- 订单数统计卡片 -->
<view class="header header-56">
<view class="header-title">
<text>订单数统计</text> <text class="sub-title">订单数若有异常请跟总部联系</text>
</view>
</view>
<view class="order-card">
<view
class="order-card-item"
wx:for="{{orderList}}"
wx:key="index"
wx:if="{{item.value != '0' && item.value != 0}}"
data-index="{{index}}"
>
<view class="order-card-item-label">{{item.label}}</view>
<view class="order-card-item-value">{{item.value}}</view>
</view>
</view>
<!-- 申诉答复记录 -->
<view class="header header-56">
<view class="header-title">
<text>申诉答复记录</text>
</view>
</view>
<view class="reply-record">
<block wx:if="{{appealRecords && appealRecords.length > 0}}">
<view
class="record-card"
wx:for="{{appealRecords}}"
wx:key="index"
>
<view class="text">
{{item.text}}
</view>
<view class="type-date">
申诉类型:<text class="type">{{item.type}}</text> <text class="date">{{item.date}}</text>
</view>
</view>
</block>
<view class="empty-data" wx:else>
<image class="empty-icon" src="/packageEquity/pages/image/icon-emepty.png" mode="widthFix"></image>
<view class="empty-text">暂无数据</view>
</view>
</view>
</view>
</view>
<!-- 员工选择弹出层 -->
<staffSelector
show="{{ showStaffPopup }}"
options="{{ staffOptions }}"
selected-value="{{ filters }}"
bind:close="onCloseStaffPopup"
bind:confirm="onStaffSelectConfirm"
></staffSelector>
<!-- 申诉弹出层 -->
<appealSelector
show="{{ showAppealPopup }}"
actual-days="{{ actualDays }}"
appeal-type="{{ appealType }}"
title="{{ appealTitle }}"
current-label="{{ appealCurrentLabel }}"
appeal-label="{{ appealLabel }}"
unit="{{ appealUnit }}"
max-value="{{ appealMaxValue }}"
default-form="{{ appealDefaultForm }}"
date-range="{{ dateRange }}"
bind:close="onCloseAppealPopup"
bind:confirm="onAppealConfirm"
></appealSelector>
...@@ -484,6 +484,12 @@ Page({ ...@@ -484,6 +484,12 @@ Page({
// 转换每个图片/视频 // 转换每个图片/视频
images.forEach((image) => { images.forEach((image) => {
// 跳过没有 URL 或状态不是 done 的文件
if (!image.url || (image.status && image.status !== "done")) {
console.warn("跳过无效或未完成的文件:", image);
return;
}
const fileItem = { const fileItem = {
fileType, fileType,
fileSubtype, fileSubtype,
...@@ -494,6 +500,10 @@ Page({ ...@@ -494,6 +500,10 @@ Page({
if (fileType === 3) { if (fileType === 3) {
fileItem.fileFormat = "mp4"; fileItem.fileFormat = "mp4";
fileItem.fileName = image.name || this.getImageNameByKey(keyNum); fileItem.fileName = image.name || this.getImageNameByKey(keyNum);
// 如果有封面图,也添加到提交数据中
if (image.coverUrl) {
fileItem.coverUrl = image.coverUrl;
}
} }
// 如果是检测报告,添加额外字段 // 如果是检测报告,添加额外字段
...@@ -869,7 +879,11 @@ Page({ ...@@ -869,7 +879,11 @@ Page({
// 处理详情数据 // 处理详情数据
handleDetailData(data, evalOrderNo) { handleDetailData(data, evalOrderNo) {
const { basic = {}, carInfo = {}, carLicense = {}, images = [] } = data; const { basic = {}, carInfo = {}, carLicense = {}, images } = data;
// 确保 images 是数组,如果为 null 或 undefined,设置为空数组
const imageList = Array.isArray(images) ? images : [];
console.log("handleDetailData - 原始 images:", images, "处理后:", imageList);
// 处理地区显示格式:确保是 "省份 城市" 格式 // 处理地区显示格式:确保是 "省份 城市" 格式
// 车辆所在地 // 车辆所在地
...@@ -1072,10 +1086,16 @@ Page({ ...@@ -1072,10 +1086,16 @@ Page({
}; };
// 处理图片数据 // 处理图片数据
const imageList = {}; const processedImageList = {};
images.forEach((image) => { imageList.forEach((image) => {
const { fileType, fileSubtype, fileUrl } = image; const { fileType, fileSubtype, fileUrl, coverUrl } = image;
// 检查 fileUrl 是否为空
if (!fileUrl) {
console.warn("图片数据中 fileUrl 为空,跳过:", image);
return;
}
// 根据 fileType 和 fileSubtype 映射到对应的 key // 根据 fileType 和 fileSubtype 映射到对应的 key
// fileType: 1-车辆图片, 2-证件资料, 3-车辆视频, 4-其他图片, 5-车辆检测报告 // fileType: 1-车辆图片, 2-证件资料, 3-车辆视频, 4-其他图片, 5-车辆检测报告
...@@ -1103,18 +1123,36 @@ Page({ ...@@ -1103,18 +1123,36 @@ Page({
} }
if (key) { if (key) {
if (!imageList[key]) { if (!processedImageList[key]) {
imageList[key] = []; processedImageList[key] = [];
} }
imageList[key].push({
// 根据 fileType 构造不同的数据结构
if (fileType === 3) {
// 视频文件:需要 videoUrl、coverUrl 和 isVideo 标识
processedImageList[key].push({
url: fileUrl, // 视频 URL
thumb: coverUrl || "", // 封面图(van-uploader 使用 thumb 作为预览图)
coverUrl: coverUrl || "", // 保存封面图 URL,用于预览
isVideo: true,
name: this.getImageNameByKey(key),
key: key,
status: "done",
});
} else {
// 普通图片
processedImageList[key].push({
url: fileUrl, url: fileUrl,
isVideo: false,
name: this.getImageNameByKey(key), name: this.getImageNameByKey(key),
key: key, key: key,
status: "done",
}); });
} }
}
}); });
updateData["formData.imageList"] = imageList; updateData["formData.imageList"] = processedImageList;
// 一次性更新所有数据 // 一次性更新所有数据
console.log( console.log(
......
...@@ -29,7 +29,15 @@ Component({ ...@@ -29,7 +29,15 @@ Component({
imageData: function (newImageData) { imageData: function (newImageData) {
// 监听 imageData 变化,重新初始化图片列表 // 监听 imageData 变化,重新初始化图片列表
console.log("imageData 变化:", newImageData); console.log("imageData 变化:", newImageData);
if (newImageData && Object.keys(newImageData).length > 0) {
// 如果 newImageData 为 null 或 undefined,设置为空对象
if (!newImageData) {
this.setData({
imageList: {},
});
return;
}
// 处理回显数据:确保所有文件都有 status 字段和 isVideo 字段 // 处理回显数据:确保所有文件都有 status 字段和 isVideo 字段
const processedImageList = {}; const processedImageList = {};
const { uploadVideoFields } = this.data; const { uploadVideoFields } = this.data;
...@@ -40,8 +48,18 @@ Component({ ...@@ -40,8 +48,18 @@ Component({
for (const key in newImageData) { for (const key in newImageData) {
const fileList = newImageData[key]; const fileList = newImageData[key];
if (Array.isArray(fileList)) { if (Array.isArray(fileList) && fileList.length > 0) {
processedImageList[key] = fileList.map((file) => { // 过滤掉 url 为空的文件,并处理每个文件
processedImageList[key] = fileList
.filter((file) => {
// 过滤掉没有 url 的文件
if (!file || !file.url) {
console.warn("过滤掉无效文件(url 为空):", file);
return false;
}
return true;
})
.map((file) => {
const processedFile = { ...file }; const processedFile = { ...file };
// 如果文件没有 status 字段,说明是编辑回显的数据,设置为 'done' // 如果文件没有 status 字段,说明是编辑回显的数据,设置为 'done'
if (!processedFile.status) { if (!processedFile.status) {
...@@ -71,15 +89,18 @@ Component({ ...@@ -71,15 +89,18 @@ Component({
} }
return processedFile; return processedFile;
}); });
} else {
processedImageList[key] = fileList; // 如果过滤后数组为空,不添加到 processedImageList
if (processedImageList[key].length === 0) {
delete processedImageList[key];
}
} }
} }
this.setData({ this.setData({
imageList: processedImageList, imageList: processedImageList,
}); });
console.log("已更新 imageList:", this.data.imageList); console.log("已更新 imageList:", this.data.imageList);
}
}, },
}, },
...@@ -170,7 +191,15 @@ Component({ ...@@ -170,7 +191,15 @@ Component({
// 初始化图片列表 // 初始化图片列表
initImageList() { initImageList() {
const { imageData, uploadVideoFields } = this.data; const { imageData, uploadVideoFields } = this.data;
if (imageData && Object.keys(imageData).length > 0) {
// 如果 imageData 为空,设置为空对象
if (!imageData || Object.keys(imageData).length === 0) {
this.setData({
imageList: {},
});
return;
}
// 处理回显数据:确保所有文件都有 status 字段和 isVideo 字段 // 处理回显数据:确保所有文件都有 status 字段和 isVideo 字段
const processedImageList = {}; const processedImageList = {};
// 获取所有视频字段的 key 集合 // 获取所有视频字段的 key 集合
...@@ -180,8 +209,18 @@ Component({ ...@@ -180,8 +209,18 @@ Component({
for (const key in imageData) { for (const key in imageData) {
const fileList = imageData[key]; const fileList = imageData[key];
if (Array.isArray(fileList)) { if (Array.isArray(fileList) && fileList.length > 0) {
processedImageList[key] = fileList.map((file) => { // 过滤掉 url 为空的文件,并处理每个文件
processedImageList[key] = fileList
.filter((file) => {
// 过滤掉没有 url 的文件
if (!file || !file.url) {
console.warn("initImageList - 过滤掉无效文件(url 为空):", file);
return false;
}
return true;
})
.map((file) => {
const processedFile = { ...file }; const processedFile = { ...file };
// 如果文件没有 status 字段,说明是编辑回显的数据,设置为 'done' // 如果文件没有 status 字段,说明是编辑回显的数据,设置为 'done'
if (!processedFile.status) { if (!processedFile.status) {
...@@ -211,14 +250,17 @@ Component({ ...@@ -211,14 +250,17 @@ Component({
} }
return processedFile; return processedFile;
}); });
} else {
processedImageList[key] = fileList; // 如果过滤后数组为空,不添加到 processedImageList
if (processedImageList[key].length === 0) {
delete processedImageList[key];
} }
} }
}
this.setData({ this.setData({
imageList: processedImageList, imageList: processedImageList,
}); });
}
}, },
// 处理上传 // 处理上传
...@@ -836,13 +878,36 @@ Component({ ...@@ -836,13 +878,36 @@ Component({
// 校验必填项 // 校验必填项
validate() { validate() {
const { imageList, uploadFields } = this.data; const { imageList, uploadFields, uploadCertificateFields, uploadVideoFields, uploadReportFields, uploadOtherFields } = this.data;
// 合并所有字段
const allFields = [
...uploadFields,
...uploadCertificateFields,
...uploadVideoFields,
...uploadReportFields,
...uploadOtherFields,
];
// 1. 检查是否有正在上传的文件
for (let field of allFields) {
const list = imageList[field.key] || [];
const uploadingFiles = list.filter(file => file.status === 'uploading');
if (uploadingFiles.length > 0) {
return {
message: `${field.label}正在上传中,请稍候...`,
};
}
}
// 检查必填的车辆图片 // 2. 检查必填的车辆图片(只检查状态为 done 的文件)
for (let field of uploadFields) { for (let field of uploadFields) {
if (field.required) { if (field.required) {
console.log(imageList[field.key], 'imageList[field.key]');
const list = imageList[field.key] || []; const list = imageList[field.key] || [];
if (list.length === 0) { // 只统计上传完成的文件
const doneFiles = list.filter(file => !file.status || file.status === 'done');
if (doneFiles.length === 0) {
return { return {
message: `请上传${field.label}`, message: `请上传${field.label}`,
}; };
......
...@@ -121,6 +121,7 @@ Page({ ...@@ -121,6 +121,7 @@ Page({
} }
}) })
wx.$storage.rm('dateStaffPop') wx.$storage.rm('dateStaffPop')
wx.$storage.rm('abnormalOrderPop')
if (selectIndex == 0) { // 搜门店 if (selectIndex == 0) { // 搜门店
wx.$router.go('pages.sceneIndex') wx.$router.go('pages.sceneIndex')
this.setData({ jumpPageFlag: false }) this.setData({ jumpPageFlag: false })
......
...@@ -106,6 +106,14 @@ Component({ ...@@ -106,6 +106,14 @@ Component({
{ {
name: '已退款', name: '已退款',
value: [5, 12] value: [5, 12]
},
{
name: '错误订单',
value: [11]
},
{
name: '审批中',
value: [14]
} }
], ],
constructionStatusList: [ constructionStatusList: [
...@@ -127,6 +135,21 @@ Component({ ...@@ -127,6 +135,21 @@ Component({
value: 'Z' value: 'Z'
} }
], ],
abnormalList: [
{
name: '全部',
active: true,
value: ''
},
{
name: '无异常',
value: 'N'
},
{
name: '异常',
value: 'Y'
}
],
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [ orderTimeList: [
{ {
...@@ -247,8 +270,13 @@ Component({ ...@@ -247,8 +270,13 @@ Component({
this.getsellerUserIdList(userInfo?.shopMerchantId, 1) this.getsellerUserIdList(userInfo?.shopMerchantId, 1)
}, },
init() { init() {
let { orderTimeList, payTimeList, userInfo, constructionStatusList } = let {
this.data orderTimeList,
payTimeList,
userInfo,
constructionStatusList,
abnormalList
} = this.data
// 非超管 // 非超管
if ( if (
!( !(
...@@ -318,7 +346,8 @@ Component({ ...@@ -318,7 +346,8 @@ Component({
this.setData({ this.setData({
['form.orderTimeList']: wx.$util.deepClone(orderTimeList), ['form.orderTimeList']: wx.$util.deepClone(orderTimeList),
['form.payTimeList']: wx.$util.deepClone(payTimeList), ['form.payTimeList']: wx.$util.deepClone(payTimeList),
['form.constructionFlag']: wx.$util.deepClone(constructionStatusList) ['form.constructionFlag']: wx.$util.deepClone(constructionStatusList),
['form.abnormalFlag']: wx.$util.deepClone(abnormalList)
}) })
}, },
showMore(e) { showMore(e) {
......
...@@ -256,6 +256,19 @@ ...@@ -256,6 +256,19 @@
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class="title">异常标记</view>
<view class="list-box">
<block wx:for="{{ form.abnormalFlag }}" wx:key="index">
<view
class="item text-center {{ item.active?'active':''}} {{item.disabled ?'disabled':'' }}"
bindtap="choose"
data-list-name="abnormalFlag"
data-index="{{ index }}"
>{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">施工状态</view> <view class="title">施工状态</view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{ form.constructionFlag }}" wx:key="index"> <block wx:for="{{ form.constructionFlag }}" wx:key="index">
......
...@@ -4,7 +4,11 @@ import order_mixins from '../order_mixins.js' ...@@ -4,7 +4,11 @@ import order_mixins from '../order_mixins.js'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
let timeoutId let timeoutId
import { checkDailyReport, checkStudyTask } from '~/store/ModalToQueueControl' import {
checkDailyReport,
checkStudyTask,
checkAbnormalOrder
} from '~/store/ModalToQueueControl'
import commonApi from '~/api/api' import commonApi from '~/api/api'
Page({ Page({
/** /**
...@@ -19,6 +23,15 @@ Page({ ...@@ -19,6 +23,15 @@ Page({
//分润 //分润
pointsMultiObj: [ pointsMultiObj: [
{ {
label: '订单类型',
key: 'djOrderTypeText'
},
{
label: '审批状态',
key: 'goodsOrderApplyStatusText',
hideIfEmpty: true
},
{
label: '销售顾问 /录单员', label: '销售顾问 /录单员',
arr: ['merchantName', 'employeeName'] arr: ['merchantName', 'employeeName']
}, },
...@@ -41,6 +54,14 @@ Page({ ...@@ -41,6 +54,14 @@ Page({
], ],
orderObj: [ orderObj: [
{ {
label: '订单类型',
key: 'djOrderTypeText'
},
{
label: '审批状态',
key: 'goodsOrderApplyStatusText'
},
{
label: '销售顾问', label: '销售顾问',
arr: ['merchantName', 'employeeName'] arr: ['merchantName', 'employeeName']
}, },
...@@ -152,7 +173,7 @@ Page({ ...@@ -152,7 +173,7 @@ Page({
}) })
} }
}, },
error: () => {} error: () => { }
}, },
'#modal2' '#modal2'
) )
...@@ -247,6 +268,8 @@ Page({ ...@@ -247,6 +268,8 @@ Page({
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
if ( if (
name == 'createOrder' && name == 'createOrder' &&
(await wx.$globalDataFunction.inspectionOfProhibitionBill()) (await wx.$globalDataFunction.inspectionOfProhibitionBill())
...@@ -321,6 +344,8 @@ Page({ ...@@ -321,6 +344,8 @@ Page({
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
let { selectOutTradeNoArr } = e.detail let { selectOutTradeNoArr } = e.detail
let { paymentMethod } = this.data let { paymentMethod } = this.data
this.closeSwitchPopup() this.closeSwitchPopup()
...@@ -342,6 +367,8 @@ Page({ ...@@ -342,6 +367,8 @@ Page({
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return if (await wx.$globalDataFunction.inspectionOfProhibitionBill()) return
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
...@@ -383,6 +410,8 @@ Page({ ...@@ -383,6 +410,8 @@ Page({
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
let _this = this let _this = this
// let { list } = this.data // let { list } = this.data
// index, ind // index, ind
...@@ -430,6 +459,8 @@ Page({ ...@@ -430,6 +459,8 @@ Page({
// 校验学习中心开单限制 // 校验学习中心开单限制
let staffStudyTask = await checkStudyTask() let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false if (staffStudyTask) return false
let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false
let _this = this let _this = this
api api
.revokeOrder({ .revokeOrder({
...@@ -576,7 +607,7 @@ Page({ ...@@ -576,7 +607,7 @@ Page({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI) return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
}, },
init(userInfo) {}, init(userInfo) { },
search() { search() {
wx.$orderListRefresh = false wx.$orderListRefresh = false
let { searchObj, userInfo } = this.data let { searchObj, userInfo } = this.data
...@@ -647,6 +678,26 @@ Page({ ...@@ -647,6 +678,26 @@ Page({
// let userType = true // let userType = true
data.list.map(e => { data.list.map(e => {
// Mapping for djOrderType
const djOrderTypeMap = {
1: '正常订单',
2: '打折策略',
3: '买赠策略',
4: '冲量活动',
5: '组合付款'
}
e.djOrderTypeText = djOrderTypeMap[e.djOrderType] || ''
// Mapping for goodsOrderApplyStatus
const goodsOrderApplyStatusMap = {
1: '审批中',
2: '审批中',
3: '审批通过',
4: '审批驳回'
}
e.goodsOrderApplyStatusText =
goodsOrderApplyStatusMap[e.goodsOrderApplyStatus] || ''
if (e.orderTime) if (e.orderTime)
e.orderTime = new Date(e.orderTime).format('yyyy-MM-dd hh:mm:ss') e.orderTime = new Date(e.orderTime).format('yyyy-MM-dd hh:mm:ss')
// 判断一下是否所有子订单都已经施工,是就跳转 施工完成 // 判断一下是否所有子订单都已经施工,是就跳转 施工完成
...@@ -656,17 +707,19 @@ Page({ ...@@ -656,17 +707,19 @@ Page({
if (![1, 2].includes(i.constructionStatus)) { if (![1, 2].includes(i.constructionStatus)) {
e.allConstructionFlag = false e.allConstructionFlag = false
} }
i.totalPrice = Number(wx.$util.decimal(i.totalPrice, 2)).toFixed(2) i.finalPrice = Number(wx.$util.decimal(i.finalPrice, 2)).toFixed(2)
}) })
e.total_price = e.totalPrice e.total_price = e.finalPrice
e.totalPrice = Number(wx.$util.decimal(e.totalPrice, 2)).toFixed(2) e.finalPrice = Number(wx.$util.decimal(e.finalPrice, 2)).toFixed(2)
// 开票按钮 // 开票按钮
e.invoiceName = e.invoiceStatus == 2 ? '查看发票' : '申请开票' e.invoiceName = e.invoiceStatus == 2 ? '查看发票' : '申请开票'
// && e.status != 1 待跟进现在也能撤销 // && e.status != 1 待跟进现在也能撤销
let orderType = let orderType =
(userInfo.userType == 1 || userInfo.userType == 2) && (userInfo.userType == 1 || userInfo.userType == 2) &&
e.status != 9 && e.status != 9 &&e.status != 14 &&
![1, 3, 4].includes(e.selectPayType) ![1, 3, 4].includes(e.selectPayType)
// &&
// e.approveStatus != 0
// let orderType = userInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1 // let orderType = userInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
// console.log(userType); // console.log(userType);
// console.log(orderType); // console.log(orderType);
...@@ -676,8 +729,8 @@ Page({ ...@@ -676,8 +729,8 @@ Page({
e.packageGoodsList?.forEach(item => { e.packageGoodsList?.forEach(item => {
item.packageGoodsOrderList.forEach(g => { item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice g.price = g.finalPrice
? Number(g.totalPrice) / Number(g.number) ? Number(g.finalPrice) / Number(g.number)
: g.upgradePrice : g.upgradePrice
// 判断一下是否所有子订单都已经施工 // 判断一下是否所有子订单都已经施工
if (![1, 2].includes(g.constructionStatus)) { if (![1, 2].includes(g.constructionStatus)) {
...@@ -686,11 +739,11 @@ Page({ ...@@ -686,11 +739,11 @@ Page({
}) })
item.goodsList = item.packageGoodsOrderList item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number) return prev + Number(cur.finalPrice) / Number(cur.number)
}, 0) }, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1 item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count let total = item.price * item.count
item.totalPrice = wx.$util.decimal(total, 2) item.finalPrice = wx.$util.decimal(total, 2)
}) })
if (e.packageGoodsList && e.packageGoodsList.length) { if (e.packageGoodsList && e.packageGoodsList.length) {
e.subOrderList = e.subOrderList.concat(e.packageGoodsList) e.subOrderList = e.subOrderList.concat(e.packageGoodsList)
...@@ -890,7 +943,7 @@ Page({ ...@@ -890,7 +943,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -902,22 +955,22 @@ Page({ ...@@ -902,22 +955,22 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
scrollonReachBottom() { scrollonReachBottom() {
let { total, pageNum } = this.data let { total, pageNum } = this.data
wx.$util.onReachBottom( wx.$util.onReachBottom(
...@@ -940,5 +993,5 @@ Page({ ...@@ -940,5 +993,5 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {} onShareAppMessage: function () { }
}) })
...@@ -688,3 +688,48 @@ page { ...@@ -688,3 +688,48 @@ page {
padding: 16rpx; padding: 16rpx;
color: #5A5E66; color: #5A5E66;
} }
.error-order-info {
background: #F7F8FA;
border-radius: 8rpx;
padding: 16rpx 24rpx;
margin: 20rpx 0;
}
.error-order-info .info-row {
display: flex;
font-size: 24rpx;
margin-bottom: 12rpx;
}
.error-order-info .info-row:last-child {
margin-bottom: 0;
}
.error-order-info .info-label {
color: #999EA8;
// width: 220rpx;
margin-right: 30rpx;
}
.error-order-info .info-value {
color: #5A5E66;
flex: 1;
}
.abnormal-tag {
display: flex;
.text {
margin-left: 15rpx;
}
}
.error-icon {
display: inline-block;
width: 28rpx;
height: 24rpx;
margin-left: 9rpx;
// margin-right: 6rpx;
margin-top: 3rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</view> </view>
<view class="goods-price"> <view class="goods-price">
¥ ¥
<text>{{i.totalPrice || 0}}</text> <text>{{i.finalPrice || 0}}</text>
</view> </view>
</view> </view>
<!-- 显示套餐子商品 --> <!-- 显示套餐子商品 -->
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</view> </view>
<view class="goods-price"> <view class="goods-price">
¥ ¥
<text>{{packchild.totalPrice || 0}}</text> <text>{{packchild.finalPrice || 0}}</text>
</view> </view>
</view> </view>
</block> </block>
...@@ -85,9 +85,21 @@ ...@@ -85,9 +85,21 @@
</block> </block>
</block> </block>
</view> </view>
<!-- 错误订单修复显示这个两个字段 -->
<!-- <view>{{li.associatedOrderCode != 11}}{{li.associatedOrderCode}}</view> -->
<view class="error-order-info" wx:if="{{ li.associatedOrderCode && li.status!=11 }}">
<view class="info-row">
<view class="info-label">原错误订单编号</view>
<view class="info-value">{{li.associatedOrderCode}}</view>
</view>
<view class="info-row">
<view class="info-label">原错误订单总价</view>
<view class="info-value">¥{{li.associatedOrderCodeFinalPrice}}</view>
</view>
</view>
<view class="order-list"> <view class="order-list">
<block wx:for="{{ li.deliveryUserId? pointsMultiObj:orderObj }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i"> <block wx:for="{{ li.deliveryUserId? pointsMultiObj:orderObj }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="order"> <view class="order" wx:if="{{ !i.hideIfEmpty || li[i.key] }}">
<view class="order-label">{{i.label}}</view> <view class="order-label">{{i.label}}</view>
<view class="order-value"> <view class="order-value">
<block wx:if="{{ i.arr }}"> <block wx:if="{{ i.arr }}">
...@@ -102,7 +114,14 @@ ...@@ -102,7 +114,14 @@
</block> </block>
</block> </block>
</block> </block>
<block wx:else>{{li[i.key] || ''}}</block> <block wx:else>
{{li[i.key] || ''}}
<view wx:if="{{ i.key == 'djOrderTypeText' && li.abnormalFlag == 'Y' }}" class="abnormal-tag">
<gl-image class="error-icon" src="/miniProgram/error-icon.png"></gl-image>
<view class="text" style="color: #EB4E4E;">异常</view>
</view>
<!-- <text wx:if="{{ i.key == 'djOrderTypeText' && li.abnormalFlag == 'Y' }}" style="color: #EB4E4E; margin-left: 10rpx;">异常</text> -->
</block>
</view> </view>
</view> </view>
</block> </block>
...@@ -127,7 +146,7 @@ ...@@ -127,7 +146,7 @@
<view class="order-price-label">实付金额</view> <view class="order-price-label">实付金额</view>
<view class="price"> <view class="price">
<text class="unit">¥</text> <text class="unit">¥</text>
{{li.totalPrice}} {{li.finalPrice}}
</view> </view>
</view> </view>
</block> </block>
......
...@@ -107,9 +107,14 @@ module.exports = { ...@@ -107,9 +107,14 @@ module.exports = {
color: '#8F959E' color: '#8F959E'
}, },
11: { 11: {
text: '已失效', text: '错误订单',
color: '#8F959E', color: '#EB4E4E',
background: ' #F3F4F5' background: '#fdeded'
},
14: {
text: '审批中',
color: '#FF9D0A',
background: '#fff5e6'
}, },
10: { 10: {
text: '已关闭', text: '已关闭',
...@@ -176,7 +181,11 @@ module.exports = { ...@@ -176,7 +181,11 @@ module.exports = {
value: [10] value: [10]
}, },
{ {
name: '已失效', name: '审批中',
value: [14]
},
{
name: '错误订单',
value: [11] value: [11]
} }
], ],
......
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!