Commit cd3e3209 by Jaxon

Merge remote-tracking branch 'origin/SAAS+V5.6.0' into dev/service-center

# Conflicts:
#	README.md
#	app.json
#	package-lock.json
#	packageEquity/pages/index/index.js
#	packageEquity/pages/index/index.wxml
2 parents 61146e07 3137e594
Showing 77 changed files with 2853 additions and 727 deletions
......@@ -13,6 +13,7 @@
区域督导:187750352053
销售: 15626599743(开发)
技师: 18925261040 19982726211(开发)
运营管理: 17608426680(开发)
# 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管
......
......@@ -458,5 +458,9 @@ module.exports = {
// 上传视频文件返回封面
uploadFileWithCover(data) {
return api.post('dj.api.smartcarlife.common.uploadVideo.returnWithCover', data, ['file'])
},
// 获取员工日报/周报/月报模版
getStaffTemplate(data) {
return api.post('dj.api.carboutique.find.staff.good.news.template', data)
}
}
......@@ -67,7 +67,11 @@
{
"root": "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",
......@@ -84,17 +88,27 @@
{
"root": "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",
"name": "tabRepairOrder",
"pages": ["pages/confirmWorkOrder/confirmWorkOrder", "pages/repairOrderDetail/repairOrderDetail"]
"pages": [
"pages/confirmWorkOrder/confirmWorkOrder",
"pages/repairOrderDetail/repairOrderDetail"
]
},
{
"root": "tabWorkOrder",
"name": "tabWorkOrder",
"pages": [
"pages/serviceCenter/pages/caseDetail/caseDetail",
"pages/serviceCenter/pages/companyNoticeDetail/companyNoticeDetail",
"pages/serviceCenter/pages/serviceNoticeList/serviceNoticeList",
"pages/createOrder/createOrder",
"pages/additionRecordOrder/additionRecordOrder",
"pages/orderDetail/orderDetail",
......@@ -105,9 +119,6 @@
"pages/orderSignature/orderSignature",
"pages/fullSignture/fullSignture",
"pages/ocr/ocr",
"pages/serviceCenter/pages/caseDetail/caseDetail",
"pages/serviceCenter/pages/companyNoticeDetail/companyNoticeDetail",
"pages/serviceCenter/pages/serviceNoticeList/serviceNoticeList",
"pages/premiumUpgrade/premiumUpgrade",
"pages/defeatOrder/defeatOrder",
"pages/staffDaily/staffDaily",
......@@ -195,7 +206,11 @@
{
"root": "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",
......@@ -236,7 +251,9 @@
"pages/evaluationForm/signInfo/signInfo",
"pages/indexPage/dailyReport/dailyReport",
"pages/deliveryNote/deliveryDetail/deliveryDetail",
"pages/ocrUsedCarModules/ocrUsedCarModules"
"pages/ocrUsedCarModules/ocrUsedCarModules",
"pages/indexPage/reportManage/reportList/reportList",
"pages/indexPage/reportManage/addReport/addReport"
]
},
{
......@@ -299,7 +316,9 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos": ["getLocation"],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents",
"resizable": true
}
......@@ -228,7 +228,10 @@ Component({
// 品牌车型
handleJumpBrand(e) {
wx.$router.go('packageEquity.carBrands')
const thisPage = wx.$router.getPageInstance()
const carTips = thisPage?.data?.carTips || ''
const url = carTips ? `packageEquity.carBrands?cartips=${encodeURIComponent(carTips)}` : 'packageEquity.carBrands'
wx.$router.go(url)
},
handleCellClick(e) {
......
Component({
properties: {
show: {
type: Boolean,
value: false
},
templateList: {
type: Array,
value: []
}
},
methods: {
onModalBtn(e) {
// modal button click: 0 is Cancel
this.triggerEvent('cancel');
},
onSelect(e) {
const item = e.currentTarget.dataset.item;
this.triggerEvent('select', item);
}
}
})
{
"component": true,
"usingComponents": {
"modal": "/components/modal/modal",
"gl-image": "/components/GlImage/index"
}
}
<modal show="{{show}}" custom="{{true}}" tapTitle="选择模板" title="" btns="{{[]}}" binddidClickBtn="onModalBtn">
<view class="template-list">
<block wx:for="{{templateList}}" wx:key="index">
<view class="template-item" bindtap="onSelect" data-item="{{item}}">
<view class="item-name">{{item.name}}</view>
<view class="arrow-right">
<image src="/images/arrow-right.png" class="arrow-img" />
</view>
</view>
</block>
</view>
<view class="cancel-btn-box" bindtap="onModalBtn">
<view class="cancel-btn">取消</view>
</view>
</modal>
.template-list {
max-height: 900rpx;
overflow-y: scroll;
padding: 0 30rpx;
margin-top: 40rpx;
}
.template-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
margin-bottom: 24rpx;
background-color: #F7F8FA;
border-radius: 16rpx;
}
.item-name {
flex: 1;
color: #292d33;
font-size: 28rpx;
font-weight: 500;
}
.arrow-right {
width: 32rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.arrow-img {
width: 13.2rpx;
height: 24rpx;
}
.cancel-btn-box {
padding: 0 32rpx 0;
border-top: 1px solid #ebedf0;
}
.cancel-btn {
height: 96rpx;
line-height: 96rpx;
text-align: center;
background-color: #fff;
color: #333333;
font-size: 32rpx;
font-weight: 500;
}
......@@ -2,223 +2,49 @@
"name": "dj-car-boutique-work-wechat",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24",
"dayjs": "^1.11.11",
"glsk-applet-component": "^1.0.0",
"glsk-map-jssdk": "^0.1.1",
"glsx-applet-component": "^1.1.29",
"glsx-common-sdk": "^0.2.8",
"number-precision": "^1.6.0",
"rfdc": "^1.3.0"
},
"devDependencies": {
"@babel/generator": "^7.28.5",
"@babel/parser": "^7.28.5",
"prettier": "^3.7.4",
"prettier-plugin-mp": "^2.5.0"
}
},
"node_modules/@babel/generator": {
"version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz",
"integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.28.5",
"@babel/types": "^7.28.5",
"@jridgewell/gen-mapping": "^0.3.12",
"@jridgewell/trace-mapping": "^0.3.28",
"jsesc": "^3.0.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
"integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/parser": {
"version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz",
"integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.28.5"
},
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@babel/types": {
"version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz",
"integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
"@babel/helper-validator-identifier": "^7.28.5"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
"integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0",
"@jridgewell/trace-mapping": "^0.3.24"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
"dev": true,
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.31",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
"integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@vant/area-data": {
"lockfileVersion": 1,
"dependencies": {
"@vant/area-data": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.2.tgz",
"integrity": "sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA=="
},
"node_modules/@vant/weapp": {
"@vant/weapp": {
"version": "1.11.7",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.7.tgz",
"integrity": "sha512-Rwn9BBnb4kHSV4XmvBicwtd42J+amEUfnFDcXJsGNPNX4a9c/DoT6YLsm4X1wB2+sQbdiQsbFBLAvGRBxCkD8g=="
},
"node_modules/@wxml/parser": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@wxml/parser/-/parser-0.4.0.tgz",
"integrity": "sha512-pS0OPyKzCOhCPGlcfO9IDLZbqH4485bPdGDqaa+hYnI+cY/OW+GN4J88XpfdzM8wXJcJShFZy5F6MTUr2rysXg==",
"dev": true,
"license": "MIT"
},
"node_modules/dayjs": {
"dayjs": {
"version": "1.11.19",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="
},
"node_modules/glsk-applet-component": {
"glsk-applet-component": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz",
"integrity": "sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g=="
},
"node_modules/glsk-map-jssdk": {
"glsk-map-jssdk": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/glsk-map-jssdk/-/glsk-map-jssdk-0.1.1.tgz",
"integrity": "sha512-kwCyU8A1t7Q7V2hlzC03nc9VNNW9HPXQ5YhHsGGnrEtPxykGDG7AEyT5O7LY1zZk/8adkkk6FHgCM53r6p/4yw=="
},
"node_modules/glsx-applet-component": {
"glsx-applet-component": {
"version": "1.1.29",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz",
"integrity": "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw=="
},
"node_modules/glsx-common-sdk": {
"glsx-common-sdk": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"node_modules/jsesc": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
"integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
"dev": true,
"license": "MIT",
"bin": {
"jsesc": "bin/jsesc"
},
"engines": {
"node": ">=6"
}
},
"node_modules/number-precision": {
"number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"node_modules/prettier": {
"version": "3.7.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz",
"integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prettier-plugin-mp": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/prettier-plugin-mp/-/prettier-plugin-mp-2.5.0.tgz",
"integrity": "sha512-xOACEwH19w211V8kkQEcrZnVQsP+g7/wepcJ2VM0ajLJdhQgcW4qJpD827vl28BYUuhkQ6dnyAAkeybJ3lzvzQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@wxml/parser": "^0.4.0"
},
"peerDependencies": {
"prettier": "^3.0.0"
}
},
"node_modules/rfdc": {
"rfdc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
......
// packageEquity/pages/carEquity/carBrands/carBrands.js
import carLifeApi from '../../../carEquityApi'
import carLifeApi from "../../../carEquityApi";
Page({
/**
* 页面的初始数据
*/
data: {
inputHeight: 0,
searchValue: '',
scrollTop: 0
searchValue: "",
scrollTop: 0,
cartips: "",
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$util.getViewInfo('#search-input', res => {
console.log("[carBrands onLoad] options:", options);
wx.$util.getViewInfo("#search-input", (res) => {
this.setData({
inputHeight: res.height
})
})
if (options.level == 2) this.level = 2
carLifeApi.getCarBrandList().then(res => {
inputHeight: res.height,
});
});
if (options.level == 2) this.level = 2;
// 接收 carTips 参数
if (options.cartips) {
const cartips = decodeURIComponent(options.cartips);
console.log("[carBrands onLoad] cartips:", cartips);
this.setData({
cartips: cartips,
});
}
carLifeApi.getCarBrandList().then((res) => {
// this.setLocalStorage('wx_scrm_car_brand_list', carInfo)
const carInfo = res.data
this.formatData(carInfo)
})
const carInfo = res.data;
this.formatData(carInfo);
});
},
formatData(data) {
let letterList = Array.from(new Set([...data.map(e => e.letter)])),
brandList = letterList.map(e => {
let list = []
data.map(i => {
let letterList = Array.from(new Set([...data.map((e) => e.letter)])),
brandList = letterList.map((e) => {
let list = [];
data.map((i) => {
if (e === i.letter) {
list.push(i)
list.push(i);
}
})
});
return {
letter: e,
list
}
})
this.setCarData(brandList)
list,
};
});
this.setCarData(brandList);
},
setCarData(brandList) {
wx.$util.showLoading('加载中...')
let count = 0
wx.$util.showLoading("加载中...");
let count = 0;
let settime = setInterval(() => {
if (null != brandList[count].list && brandList[count].list.length > 0)
this.setData({
[`brandList[${count}]`]: brandList[count]
})
count++
[`brandList[${count}]`]: brandList[count],
});
count++;
if (count >= brandList.length) {
wx.hideLoading()
clearInterval(settime)
this.getLetter()
wx.hideLoading();
clearInterval(settime);
this.getLetter();
}
}, 10)
}, 10);
},
getLetter() {
wx.hideLoading()
let {
brandList,
letter
} = this.data
let arr = []
wx.hideLoading();
let { brandList, letter } = this.data;
let arr = [];
if (brandList.length > 0) {
brandList.forEach(e => {
arr.push(e.letter)
})
brandList.forEach((e) => {
arr.push(e.letter);
});
this.setData({
arr,
letter,
flag: true
})
flag: true,
});
}
setTimeout(() => {
this.getSideBarInfo()
}, 500)
this.getSideBarInfo();
}, 500);
},
getSideBarInfo() {
let _this = this
wx.$util.getViewInfo('#letter-A', res => {
wx.$util.getViewInfo('#side-bar', _res => {
let _this = this;
wx.$util.getViewInfo("#letter-A", (res) => {
wx.$util.getViewInfo("#side-bar", (_res) => {
_this.setData({
letterHeight: res.height,
toTop: res.height + _res.top,
height: _res.bottom
})
})
})
height: _res.bottom,
});
});
});
},
start(e) {
let {
letter
} = e.target.dataset
let { letter } = e.target.dataset;
this.setData({
showTip: true,
letter
})
letter,
});
},
move(e) {
let {
letterHeight,
showTip,
height,
toTop,
arr
} = this.data
let {
y,
num,
isNum
} = this
let { letterHeight, showTip, height, toTop, arr } = this.data;
let { y, num, isNum } = this;
if (showTip) {
y = e.touches[0].clientY
num = Math.ceil((y - toTop) / letterHeight)
if (num < 0) num = 0
y = e.touches[0].clientY;
num = Math.ceil((y - toTop) / letterHeight);
if (num < 0) num = 0;
if (y < height && isNum != num) {
clearTimeout(this.time)
isNum = num
clearTimeout(this.time);
isNum = num;
this.time = setTimeout(() => {
this.setData({
letter: arr[num]
})
}, 1000 / 60)
letter: arr[num],
});
}, 1000 / 60);
}
}
},
end(e) {
clearTimeout(this.time)
clearTimeout(this.time);
this.setData({
showTip: false
})
showTip: false,
});
},
showCarSeries(e) {
const {
level
} = this
let {
item
} = e.currentTarget.dataset,
const { level } = this;
let { item } = e.currentTarget.dataset,
brandInfo = {
vehicleBrandId: item.id,
vehicleBrandName: item.name
}
vehicleBrandName: item.name,
};
if (item.childs && item.childs.length) {
if (level) {
this.setData({
carSeriesList: item.childs
})
return
carSeriesList: item.childs,
});
return;
}
wx.$router.go('carSeries', {
const params = {
brandInfo,
list: item.childs,
})
} else this.showToast('暂无该品牌车系')
};
// 如果有 cartips 参数,也传递给下一页
if (this.data.cartips) {
params.cartips = this.data.cartips;
}
wx.$router.go("carSeries", params);
} else this.showToast("暂无该品牌车系");
},
cancel() {
this.setData({
carSeriesList: []
})
carSeriesList: [],
});
},
choose(e) {
const {
item
} = e.currentTarget.dataset
wx.$router.back(page => {
page.changeCarBrand && page.changeCarBrand(item)
})
const { item } = e.currentTarget.dataset;
wx.$router.back((page) => {
page.changeCarBrand && page.changeCarBrand(item);
});
},
scroll(e) {
this.setData({
scrollTop: e.detail.scrollTop
})
scrollTop: e.detail.scrollTop,
});
},
search(e) {
try {
let {
value
} = e.detail, {
brandList
} = this.data
brandList.map(i => {
i.list.map(k => {
if (k.name.includes(value)) throw k.id
})
})
let { value } = e.detail,
{ brandList } = this.data;
brandList.map((i) => {
i.list.map((k) => {
if (k.name.includes(value)) throw k.id;
});
});
} catch (id) {
this.setData({
letter: `brand-${id}`,
})
});
setTimeout(() => {
let {
scrollTop
} = this.data
let { scrollTop } = this.data;
this.setData({
scrollTopNum: scrollTop - 32
})
}, 200)
scrollTopNum: scrollTop - 32,
});
}, 200);
}
},
/**
......@@ -210,7 +199,19 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
onShow() {
// 检查是否有 cartips 参数(处理页面缓存情况)
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const options = currentPage.options || {};
if (options.cartips && !this.data.cartips) {
const cartips = decodeURIComponent(options.cartips);
console.log("[carBrands onShow] cartips:", cartips);
this.setData({
cartips: cartips,
});
}
},
/**
* 生命周期函数--监听页面隐藏
......@@ -236,4 +237,4 @@ Page({
* 用户点击右上角分享
*/
// onShareAppMessage() {}
})
\ No newline at end of file
});
<!--packageEquity/pages/carEquity/carBrands/carBrands.wxml-->
<!-- packageEquity/pages/carEquity/carBrands/carBrands.wxml -->
<view class="car-brands-box">
<view class="car-brands">
<view wx-if="{{cartips}}" class="cartips">{{cartips}}</view>
<search-input bindsearch="search" value="{{searchValue}}" id="search-input" />
<scroll-view style="height:calc(100vh - {{inputHeight}}px);" scroll-y scroll-into-view="{{letter}}" scroll-top="{{scrollTopNum}}" bindscroll="scroll">
<block wx:if="{{flag}}">
......@@ -25,27 +26,25 @@
<view class="nothing">暂无数据</view>
</block>
</block>
</scroll-view>
<view class="side-bar" id="side-bar">
<block wx:for="{{brandList}}" wx:key="index">
<view data-letter="{{item.letter}}" class="view {{item.active?'active':''}}" capture-catch:touchstart="start" id="letter-{{item.letter}}" data-index="{{index}}" capture-catch:touchmove="move" capture-catch:touchend="end">{{item.letter}}
<view data-letter="{{item.letter}}" class="view {{item.active?'active':''}}" capture-catch:touchstart="start" id="letter-{{item.letter}}" data-index="{{index}}" capture-catch:touchmove="move" capture-catch:touchend="end">
{{item.letter}}
</view>
</block>
</view>
<!-- 提示 -->
<view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
</view>
<block wx:if="{{carSeriesList.length}}">
<view class="car-type-box">
<view class="bg" bindtap="cancel" ></view>
<view class="bg" bindtap="cancel"></view>
<view class="brands-box">
<block wx:for="{{carSeriesList}}" wx:key="index">
<view class="title" bindtap="choose" data-item="{{item}}">{{item.name}}
</view>
<view class="title" bindtap="choose" data-item="{{item}}">{{item.name}}</view>
</block>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
......@@ -4,6 +4,15 @@
align-items: center;
transform: translateY(0);
}
.cartips {
border-radius: var(--fontSize16);
background: #fef4e8;
color: #ff9d0a;
font-size: var(--fontSize26);
font-weight: 400;
padding: var(--fontSize8) var(--fontSize16);
margin: var(--fontSize16) var(--fontSize32) 0 var(--fontSize32);
}
.car-brands-box {
width: 100%;
......@@ -15,12 +24,11 @@
position: relative;
}
.car-brands .title {
position: sticky;
top: 0;
z-index: 2;
background: #F7F8FA;
background: #f7f8fa;
font-size: var(--fontSize24);
color: #323233;
padding-left: var(--fontSize32);
......@@ -38,17 +46,17 @@
.list::after {
position: absolute;
box-sizing: border-box;
content: ' ';
content: " ";
pointer-events: none;
right: var(--fontSize32);
bottom: 0;
left: var(--fontSize32);
border-bottom: var(--fontSize1) solid #ebedf0;
}
.list .icon{
width: var(--fontSize68);
height: var(--fontSize68);
margin-right: var(--fontSize8);
.list .icon {
width: var(--fontSize68);
height: var(--fontSize68);
margin-right: var(--fontSize8);
}
.side-bar {
......@@ -59,7 +67,7 @@
color: #4c4c4c;
width: 10%;
opacity: 0;
animation: show-side-bar .5s forwards;
animation: show-side-bar 0.5s forwards;
}
@keyframes show-side-bar {
......@@ -114,7 +122,7 @@
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.side-bar{
.side-bar {
font-size: var(--fontSize18);
}
}
......@@ -160,7 +168,7 @@
box-sizing: border-box;
padding-left: 32rpx;
color: #969799;
background: #F7F8FA;
background: #f7f8fa;
}
.car-type-box .brands-box .brands-list {
......@@ -168,15 +176,15 @@
box-sizing: border-box;
padding-left: 32rpx;
border-bottom: 1rpx solid #e9e9e9;
animation: show-car-type .25s forwards;
animation: show-car-type 0.25s forwards;
}
@keyframes show-car-type{
0%{
@keyframes show-car-type {
0% {
min-height: 0;
opacity: 0;
}
100%{
100% {
min-height: 100rpx;
opacity: 1;
}
}
\ No newline at end of file
}
// packageEquity/pages/carEquity/carSeries/carSeries.js
import carLifeApi from '../../../carEquityApi'
import carLifeApi from "../../../carEquityApi";
Page({
/**
* 页面的初始数据
*/
data: {},
data: {
cartips: "",
cartipsHeight: 0, // cartips 的高度
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$router.getData(res => {
this.setData(res)
// 接收 cartips 参数
if (options.cartips) {
const cartips = decodeURIComponent(options.cartips);
console.log("[carSeries onLoad] cartips:", cartips);
this.setData(
{
cartips: cartips,
},
() => {
// 设置完 cartips 后获取高度
this.getCartipsHeight();
}
);
}
wx.$router.getData((res) => {
// 如果路由数据中也有 cartips,使用路由数据中的
if (res.cartips) {
this.setData(
{
cartips: res.cartips,
},
() => {
// 设置完 cartips 后获取高度
this.getCartipsHeight();
}
);
}
this.setData(res);
wx.setNavigationBarTitle({
title: res.brandInfo.vehicleBrandName || ''
})
title: res.brandInfo.vehicleBrandName || "",
});
res.list.map((e, index) => {
this.getCarSeriesList(e, {
index,
brandId: res.brandInfo.vehicleBrandId
})
})
})
brandId: res.brandInfo.vehicleBrandId,
});
});
});
},
// 获取 cartips 高度
getCartipsHeight() {
if (!this.data.cartips) return;
wx.nextTick(() => {
const query = wx.createSelectorQuery().in(this);
query.select(".cartips").boundingClientRect();
query.exec((res) => {
if (res && res[0]) {
console.log("[carSeries] 获取到的 cartips 高度:", res[0].height);
this.setData({
cartipsHeight: res[0].height || 0,
});
} else {
console.log("[carSeries] 未找到 .cartips 元素");
}
});
});
},
getCarSeriesList(e, { index, brandId }) {
carLifeApi
.getCarSeriesList({
brandId,
childBrandId: e.id
childBrandId: e.id,
})
.then(res => {
let { data } = res
if (!data) data = []
.then((res) => {
let { data } = res;
if (!data) data = [];
this.setData({
[`list[${index}].done`]: true,
[`list[${index}].childs`]: data
})
})
[`list[${index}].childs`]: data,
});
});
},
showCarType(e) {
console.log(e)
console.log(e);
let { i, item } = e.currentTarget.dataset,
{ brandInfo, carTypeList } = this.data
if (brandInfo.vehicleSeriesId == i.id && carTypeList && carTypeList.length) {
{ brandInfo, carTypeList } = this.data;
if (
brandInfo.vehicleSeriesId == i.id &&
carTypeList &&
carTypeList.length
) {
this.setData({
showType: true
})
return
showType: true,
});
return;
}
brandInfo = {
...brandInfo,
vehicleSubBrandId: item.id,
vehicleSubBrandName: item.name,
vehicleSeriesId: i.id,
vehicleSeriesName: i.name
}
carTypeList = []
wx.$util.showLoading()
carLifeApi.getCarTypeList(i.id).then(res => {
let { data } = res
wx.hideLoading()
if (!data || !data.length) wx.$util.showToast('暂无该车型')
else carTypeList = data || []
vehicleSeriesName: i.name,
};
carTypeList = [];
wx.$util.showLoading();
carLifeApi.getCarTypeList(i.id).then((res) => {
let { data } = res;
wx.hideLoading();
if (!data || !data.length) wx.$util.showToast("暂无该车型");
else carTypeList = data || [];
this.setData({
brandInfo,
carTypeList,
showType: data && data.length
})
})
showType: data && data.length,
});
});
},
cancel() {
this.setData({
showType: false
})
showType: false,
});
},
go(e) {
let { index } = e.currentTarget.dataset
let { index } = e.currentTarget.dataset;
this.setData({
letter: `series-${index}`
})
letter: `series-${index}`,
});
},
choose(e) {
this.setData({
showType: false
})
const prePage = wx.$router.getPageInstance(2)
showType: false,
});
const prePage = wx.$router.getPageInstance(2);
let { brandInfo } = this.data,
{ i } = e.currentTarget.dataset,
carInfo = {
...brandInfo,
vehicleShapeId: i.id,
vehicleShapeName: i.name
}
wx.$eventbus.emit('set_car_info', carInfo)
console.log(carInfo, '?????')
vehicleShapeName: i.name,
};
wx.$eventbus.emit("set_car_info", carInfo);
console.log(carInfo, "?????");
wx.$router.back(
pre => {
console.log(pre)
(pre) => {
console.log(pre);
},
prePage.route == 'packageEquity/pages/carEquity/carBrands/carBrands' ? 2 : 1
)
prePage.route == "packageEquity/pages/carEquity/carBrands/carBrands"
? 2
: 1
);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady() {
// 在 onReady 时也尝试获取一次高度(兜底)
this.getCartipsHeight();
},
/**
* 生命周期函数--监听页面显示
......@@ -135,4 +195,4 @@ Page({
* 用户点击右上角分享
*/
// onShareAppMessage() {}
})
});
<!--packageEquity/pages/carEquity/carSeries/carSeries.wxml-->
<!-- packageEquity/pages/carEquity/carSeries/carSeries.wxml -->
<view class="car-brands-box">
<view class="car-brands">
<scroll-view style="height:100%;" scroll-y scroll-into-view="{{letter}}">
<view wx:if="{{cartips}}" class="cartips">{{cartips}}</view>
<scroll-view style="height:calc(100% - {{cartipsHeight}}px);" scroll-y scroll-into-view="{{letter}}">
<block wx:for="{{list}}" wx:key="index">
<view id="series-{{index}}">
<view class="title car-y-center">{{item.name}}</view>
......@@ -9,9 +10,7 @@
<block wx:if="{{item.done}}">
<block wx:for="{{item.childs}}" wx:for-item="i" wx:key="ind" wx:for-index="ind">
<view class="brands" catchtap="showCarType" data-item="{{item}}" data-i="{{i}}">
<view class="list car-y-center">
{{i.name}}
</view>
<view class="list car-y-center">{{i.name}}</view>
</view>
</block>
</block>
......@@ -24,21 +23,17 @@
</scroll-view>
<view class="side-bar" id="side-bar">
<block wx:for="{{list}}" wx:key="index">
<view class="view" data-index="{{index}}" bindtap="go">{{item.name}}
</view>
<view class="view" data-index="{{index}}" bindtap="go">{{item.name}}</view>
</block>
</view>
</view>
</view>
<block wx:if="{{showType}}">
<view class="car-type-box">
<view class="bg" bindtap="cancel" catchtouchmove="noScroll"></view>
<view class="car-view">
<block wx:for="{{carTypeList}}" wx:key="index">
<view class="flex item" bindtap="choose" data-i="{{item}}">
{{item.name}}
</view>
<view class="flex item" bindtap="choose" data-i="{{item}}">{{item.name}}</view>
</block>
</view>
</view>
......
/* packageEquity/pages/carEquity/carSeries/carSeries.wxss */
@import "../carBrands/carBrands.wxss";
.car-y-center{
display: flex;
align-items: center;
transform: translateY(0);
.cartips {
border-radius: var(--fontSize16);
background: #fef4e8;
color: #ff9d0a;
font-size: var(--fontSize26);
font-weight: 400;
padding: var(--fontSize8) var(--fontSize16);
margin: var(--fontSize16) var(--fontSize32) var(--fontSize16)
var(--fontSize32);
}
.car-y-center {
display: flex;
align-items: center;
transform: translateY(0);
}
.side-bar {
width: auto;
}
.side-bar .view{
padding:0 var(--fontSize16) 0 var(--fontSize32);
.side-bar .view {
padding: 0 var(--fontSize16) 0 var(--fontSize32);
font-size: var(--fontSize20);
width: auto;
}
......@@ -47,9 +58,8 @@
animation: move 0.4s;
box-sizing: border-box;
overflow-y: scroll;
}
.car-view .item {
.car-view .item {
padding: var(--fontSize20) var(--fontSize32);
border-bottom: var(--fontSize2) solid #e9e9e9;
}
\ No newline at end of file
}
......@@ -1663,6 +1663,7 @@ Page({
['owner.carSeriesName']: res.vehicleSeriesName
})
})
wx.$track.setTrackData(0, 'submit_order', {}, '', 0)
},
/**
* 生命周期函数--监听页面初次渲染完成
......
This diff could not be displayed because it is too large.
......@@ -4,6 +4,7 @@
"task-dialog": "/components/TaskDialog/TaskDialog",
"record-item": "./components/record-item/recordItem",
"record-tab": "./components/recordTab/recordTab",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop"
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"report-template-popup": "/components/report-template-popup/report-template-popup"
}
}
\ No newline at end of file
......@@ -291,3 +291,9 @@
height="var(--fontSize540);"
includesChildHeight="var(--fontSize1020);"
></order-prompt-popup>
<report-template-popup
show="{{showReportPopup}}"
templateList="{{reportTemplateList}}"
bind:cancel="onReportPopupCancel"
bind:select="onReportPopupSelect"
/>
......@@ -162,7 +162,8 @@ Page({
} = this.data, {
uuid,
merchantId,
shopMerchantId
shopMerchantId,
sceneType
} = userInfo
const {
code,
......@@ -172,7 +173,7 @@ Page({
merchantId: shopMerchantId,
yqMerchantId: merchantId,
staffUuid: uuid,
sceneType: 0,
sceneType: sceneType,
reportStartDate: timeBean.reportStartDate,
reportEndDate: timeBean.reportEndDate,
})
......@@ -216,7 +217,8 @@ Page({
} = this.data, {
uuid,
shopMerchantName,
shopMerchantId
shopMerchantId,
sceneType
} = this.data.userInfo, {
code,
data,
......@@ -225,7 +227,8 @@ Page({
staffUuid: uuid,
merchantId: shopMerchantId,
merchantName: shopMerchantName,
reportDate: currentDate
reportDate: currentDate,
sceneType: sceneType
})
wx.hideLoading()
let total = 0
......@@ -316,7 +319,8 @@ Page({
shopMerchantId,
phone,
uuid,
name
name,
sceneType
} = userInfo
list.map((e, index) => {
if (!e.reasonCode) this.setData({
......@@ -353,7 +357,7 @@ Page({
staffUuid: uuid,
staffName: name,
staffPhone: phone,
sceneType: 0
sceneType: sceneType
})
if (code != 0) throw message
}
......
......@@ -24,7 +24,7 @@ page {
padding: 0 var(--fontSize23);
.statistic_item {
width: var(--fontSize176);
width: var(--fontSize150);
height: var(--fontSize90);
opacity: 1;
position: relative;
......@@ -218,13 +218,17 @@ page {
.card_middle {
margin-bottom: var(--fontSize20);
font-size: var(--fontSize24);
.label, .tips {
.label,
.tips {
color: #999ea8;
}
.label {
width: var(--fontSize120);
flex-shrink: 0;
}
.value {
position: relative;
width: 100%;
......@@ -232,9 +236,11 @@ page {
word-wrap: break-word;
word-break: break-all;
}
.show {
display: inline-block;
}
.btn-reason-all {
position: absolute;
bottom: 0;
......@@ -244,6 +250,7 @@ page {
background-color: #FFFFFF;
background: linear-gradient(90deg, #ffffff80 0%, #ffffff 100%);
}
.reason-box {
display: flex;
}
......@@ -326,6 +333,7 @@ page {
justify-content: space-between;
align-items: flex-start;
padding: var(--fontSize16) 0;
// align-items: center;
&:last-child {
border-bottom: none;
......@@ -347,6 +355,23 @@ page {
margin-left: var(--fontSize20);
line-height: 1.5;
}
.ji {
display: inline-block;
width: 32rpx;
height: 32rpx;
// margin-right: 10rpx;
margin-top: 5rpx;
margin-left: 10rpx;
}
.phone_icon {
display: inline-block;
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
vertical-align: middle;
}
}
}
}
......
......@@ -7,17 +7,22 @@ import {
// 表单字段配置
const FORM_FIELDS = {
MERCHANT: 0, // 门店
BUSINESS_TYPE: 1, // 业务类型
QUANTITY: 2, // 招聘数量
DESCRIPTION: 4, // 需求描述
RECRUIT_TYPE: 3, // 招聘类型
BUSINESS_TYPE: 1 // 业务类型
URGENT: 4, // 是否急招
DESCRIPTION: 5 // 需求描述
}
// 表单验证配置
const VALIDATION_CONFIG = {
[FORM_FIELDS.MERCHANT]: { tip: '请选择招聘门店', required: true },
[FORM_FIELDS.BUSINESS_TYPE]: { tip: '请选择业务类型', required: true },
[FORM_FIELDS.QUANTITY]: { tip: '请输入招聘数量', required: true },
[FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true }
[FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true },
[FORM_FIELDS.DESCRIPTION]: {
tip: '请简单描述用人要求等信息',
required: false
}
}
Page({
......@@ -27,13 +32,15 @@ Page({
{ id: 1, label: '业务类型', placeholder: '请选择业务类型', options: [] },
{ id: 2, label: '招聘数量', placeholder: '请输入招聘数量' },
{ id: 3, label: '招聘类型', placeholder: '请选择招聘类型', options: [] },
{ id: 4, label: '是否急招', value: 0 },
{
id: 4,
id: 5,
label: '需求描述',
placeholder: '请简单描述用人要求等信息',
textCount: 0
}
],
switch1Checked: false,
showPopup: false,
currentItem: {},
currentIndex: -1,
......@@ -45,6 +52,14 @@ Page({
searchTimer: null, // 防抖定时器
isDialogShowing: false // Dialog显示状态
},
onFormItemTap(e) {
const index = e.currentTarget.dataset.index
const item = this.data.formList && this.data.formList[index]
const label = item && item.label
if (label === '需求描述' || label === '招聘数量' || label === '是否急招')
return
return this.showPopup(e)
},
// 显示popup
async showPopup(e) {
const index = e.currentTarget.dataset.index
......@@ -368,20 +383,56 @@ Page({
recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value,
recruitmentType: formList[FORM_FIELDS.RECRUIT_TYPE].value,
recruitmentTypeName: formList[FORM_FIELDS.RECRUIT_TYPE].displayValue,
requirementDescription: formList[FORM_FIELDS.DESCRIPTION].value || ''
requirementDescription: formList[FORM_FIELDS.DESCRIPTION].value || '',
urgent: formList[FORM_FIELDS.URGENT].value
}
},
switch1Change(e) {
const checked = !!(e && e.detail && e.detail.value)
if (checked) {
// 如果是开启急招,需要弹窗确认
Dialog.confirm({
title: '提示',
message:
'申请急招,在招聘负责人推送简历后,需在24小时内完成简历跟进处理,否则将自动上报总部,请知悉!',
confirmButtonText: '确定'
})
.then(() => {
// 确认开启
this.updateUrgentStatus(true)
})
.catch(() => {
// 取消开启,需要重置开关状态
this.setData({
switch1Checked: false
})
})
} else {
// 关闭急招直接执行
this.updateUrgentStatus(false)
}
},
// 辅助方法:更新急招状态数据
updateUrgentStatus(isUrgent) {
const urgent = isUrgent ? 1 : 0
const { formList } = this.data
if (Array.isArray(formList) && formList[FORM_FIELDS.URGENT]) {
formList[FORM_FIELDS.URGENT].value = urgent
}
this.setData({
formList,
switch1Checked: isUrgent
})
},
// 提交表单
submit() {
// 验证表单
if (!this.validateForm()) return
// 设置Dialog显示状态为true
this.setData({
isDialogShowing: true
})
// 显示确认对话框
Dialog.confirm({
title: '提示',
......
......@@ -2,5 +2,7 @@
"disableScroll": true,
"navigationBarTitleText": "添加招聘需求",
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index"
}
}
\ No newline at end of file
}
......@@ -4,21 +4,25 @@ page {
display: flex;
background: #f7f8fa;
}
.scrollarea {
flex: 1;
overflow-y: auto;
}
.container {
padding: 0 var(--fontSize20);
.title {
color: #292d33;
height: var(--fontSize80);
height: var(--fontSize80);
font-size: var(--fontSize28);
text-align: left;
padding: var(--fontSize10);
font-weight: 600;
line-height: var(--fontSize80);
}
.form {
box-sizing: border-box;
min-height: var(--fontSize976);
......@@ -27,12 +31,14 @@ page {
background: #ffffff;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
padding: 0 var(--fontSize44);
.form-item {
display: flex;
justify-content: space-between;
height: var(--fontSize104);
align-items: center;
font-size: var(--fontSize28);
.required {
color: #f24724;
text-align: left;
......@@ -42,6 +48,7 @@ page {
top: var(--fontSize4);
box-sizing: border-box;
}
.placeholder {
width: var(--fontSize280);
height: var(--fontSize36);
......@@ -51,6 +58,7 @@ page {
text-align: right;
line-height: var(--fontSize36);
}
.display_value {
width: var(--fontSize320);
height: var(--fontSize36);
......@@ -63,20 +71,65 @@ page {
text-overflow: ellipsis;
white-space: nowrap;
}
.value {
display: flex;
align-items: center;
switch {
transform: scale(0.67);
transform-origin: 100% 50%;
}
.wx-switch-input {
width: 140rpx !important;
height: 60rpx !important;
background: #dcdfe6 !important;
border-color: #dcdfe6 !important;
border-radius: 30rpx !important;
}
.wx-switch-input::before {
width: 136rpx !important;
height: 56rpx !important;
background: #dcdfe6 !important;
border-radius: 28rpx !important;
}
.wx-switch-input::after {
width: 56rpx !important;
height: 56rpx !important;
border-radius: 28rpx !important;
top: 2rpx !important;
left: 2rpx !important;
}
.wx-switch-input-checked {
background: #347BFF !important;
border-color: #347BFF !important;
}
.wx-switch-input-checked::before {
background: #347BFF !important;
}
.wx-switch-input-checked::after {
transform: translateX(80rpx) !important;
}
}
.arrow_right {
width: var(--fontSize12);
height: var(--fontSize21);
margin-left: var(--fontSize8);
margin-left: var(--fontSize8);
}
.unit {
color: #646566;
font-size: var(--fontSize24);
margin-left: var(--fontSize8);
margin-left: var(--fontSize8);
}
.number-input {
flex: 1;
height: var(--fontSize36);
......@@ -87,19 +140,23 @@ page {
background: transparent;
}
}
.form-item-textarea {
height: auto;
min-height: var(--fontSize104);
flex-direction: column;
align-items: flex-start;
padding: var(--fontSize24) 0;
.label {
margin-bottom: var(--fontSize20);
}
.textarea-wrapper {
width: 100%;
position: relative;
}
.textarea-input {
width: 100%;
height: var(--fontSize440);
......@@ -115,12 +172,14 @@ page {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
&::-webkit-scrollbar {
width: 0;
height: 0;
display: none;
}
}
.textarea-count {
position: absolute;
right: var(--fontSize16);
......@@ -130,12 +189,14 @@ page {
}
}
}
.footer {
margin-top:var(--fontSize200);
margin-top: var(--fontSize150);
.btn {
margin:0 auto;
margin: 0 auto;
width: var(--fontSize622);
height:var(--fontSize88);
height: var(--fontSize88);
border-radius: var(--fontSize12);
opacity: 1;
background: #347bff;
......@@ -146,6 +207,7 @@ page {
}
}
}
/* popup样式 */
.popup-content {
height: 100%;
......@@ -154,18 +216,22 @@ page {
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;
padding-top: var(--fontSize20);
}
.popup-scroll-area {
......@@ -184,10 +250,11 @@ page {
}
.search-box {
width: var(--fontSize686);
width: var(--fontSize686);
padding: var(--fontSize16) 0;
border-bottom: var(--fontSize2) solid #eff0f2;
margin: 0 var(--fontSize40);
.search-input {
width: 100%;
display: flex;
......@@ -199,7 +266,7 @@ page {
font-size: var(--fontSize28);
box-sizing: border-box;
position: relative;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
......@@ -210,7 +277,7 @@ page {
z-index: 1;
margin-left: calc(var(--fontSize-14) - var(--fontSize28));
}
.input {
flex: 1;
height: 100%;
......@@ -219,12 +286,12 @@ page {
color: #333;
font-size: var(--fontSize28);
}
.input-placeholder {
color: #999;
text-align: center;
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
......@@ -233,12 +300,14 @@ page {
top: 50%;
z-index: 999;
transform: translateY(-50%);
}
}
}
}
.popup-options {
padding: var(--fontSize10) 0;
}
.option-item {
display: flex;
justify-content: space-between;
......@@ -248,15 +317,19 @@ page {
font-size: var(--fontSize28);
}
.option-item:active {
background-color: #f2f3f5;
}
.option-name {
flex: 1;
}
.option-item.checked .option-name {
color: #1989fa;
}
.option-check {
width: var(--fontSize40);
height: var(--fontSize40);
......@@ -264,6 +337,7 @@ page {
align-items: center;
justify-content: center;
}
.option-check.checked {
color: #1989fa;
}
......@@ -296,10 +370,15 @@ page {
.popup-buttons {
display: flex;
justify-content: space-between;
padding: var(--fontSize20) 0;
padding-top: var(--fontSize20);
}
.cancel-btn, .confirm-btn {
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.cancel-btn,
.confirm-btn {
width: var(--fontSize331);
height: var(--fontSize80);
border-radius: var(--fontSize12);
......@@ -319,4 +398,4 @@ page {
.confirm-btn {
background-color: #1989fa;
color: #fff;
}
}
\ No newline at end of file
<!--index.wxml-->
<view class="scrollarea">
<view class="container">
<view class="title">请完善您的用人需求</view>
<view class="form">
<block wx:for="{{ formList }}" wx:key="{{ index}}">
<view
class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}"
bindtap="{{item.label === '需求描述' || item.label === '招聘数量' ? '' : 'showPopup'}}"
data-index="{{ index }}"
>
<view class="label">
{{item.label}}
<text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view>
<view class="value" wx:if="{{ item.label !== '需求描述' && item.label !== '招聘数量' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
</view>
<view class="value" wx:if="{{ item.label === '招聘数量' }}">
<input
class="number-input"
type="number"
placeholder="{{ item.placeholder }}"
placeholder-style="color: #DEE0E3;font-size:var(--fontSize28)"
value="{{ item.displayValue }}"
bindinput="onNumberInput"
data-index="{{ index }}"
/>
<text class="unit">人</text>
</view>
<block wx:if="{{ !showPopup }}">
<view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
<textarea
class="textarea-input"
placeholder="{{ item.placeholder }}"
placeholder-style="color: #DEE0E3;"
value="{{ item.displayValue }}"
bindinput="onTextareaInput"
data-index="{{ index }}"
maxlength="200"
disabled="{{ isDialogShowing }}"
/>
<view class="textarea-count">{{item.textCount || 0}}/200</view>
</view>
</block>
</view>
</block>
</view>
<view class="footer">
<view class="btn" bind:tap="submit">提交</view>
</view>
</view>
<view class="container">
<view class="title">请完善您的用人需求</view>
<view class="form">
<block wx:for="{{ formList }}" wx:key="index">
<view class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}">
<view class="label">
{{item.label}}
<text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view>
<view class="value" wx:if="{{ item.label === '是否急招' }}">
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view>
<view class="value" wx:if="{{ item.label !== '需求描述' && item.label !== '招聘数量' && item.label !== '是否急招' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
</view>
<view class="value" wx:if="{{ item.label === '招聘数量' }}">
<input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #DEE0E3;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onNumberInput" data-index="{{ index }}" />
<text class="unit">人</text>
</view>
<block wx:if="{{ !showPopup }}">
<view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
<textarea class="textarea-input" placeholder="{{ item.placeholder }}" placeholder-style="color: #DEE0E3;" value="{{ item.displayValue }}" bindinput="onTextareaInput" data-index="{{ index }}" maxlength="200" disabled="{{ isDialogShowing }}" />
<view class="textarea-count">{{item.textCount || 0}}/200</view>
</view>
</block>
</view>
</block>
</view>
<view class="footer">
<view class="btn" bind:tap="submit">提交</view>
</view>
</view>
</view>
<!-- Vant Popup 组件 -->
<van-popup show="{{ showPopup }}" position="bottom" custom-style="height: 70%" bind:close="onClose">
<view class="popup-content">
<!-- 固定顶部区域 -->
<view class="popup-fixed-top">
<view class="popup-title">选择{{currentItem.label}}</view>
<!-- 搜索框 -->
<view class="search-box" wx:if="{{ currentIndex === 0 }}">
<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="input"
bindconfirm="search"
/>
<block wx:if="{{ keyWord }}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</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="index"
bindtap="toggleOption"
data-index="{{ index }}"
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>
</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="confirmSelect">确定</view>
</view>
</view>
</view>
<view class="popup-content">
<!-- 固定顶部区域 -->
<view class="popup-fixed-top">
<view class="popup-title">选择{{currentItem.label}}</view>
<!-- 搜索框 -->
<view class="search-box" wx:if="{{ currentIndex === 0 }}">
<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="input" bindconfirm="search" />
<block wx:if="{{ keyWord }}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</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="index" bindtap="toggleOption" data-index="{{ index }}" 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>
</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="confirmSelect">确定</view>
</view>
</view>
</view>
</van-popup>
<van-dialog id="van-dialog" width="var(--fontSize622)" custom-style="height: 364px;" confirm-button-color="#347BFF" />
\ No newline at end of file
......@@ -28,6 +28,10 @@ export const statusList = [
{
confId: 3,
confName: '已驳回'
},
{
confId: 4,
confName: '待督导确认'
}
]
export const mentorshipFormData = [
......@@ -101,46 +105,27 @@ export const getStatusName = function (status) {
return found?.confName || '-'
}
// 状态提示文本配置
export const statusTipConfig = {
0: {
show: false, // 待人事确认状态不显示提示
text: ''
},
1: {
show: true,
text: item =>
item.waitProcessResumeCount > 0
? `您有${item.waitProcessResumeCount}份简历待处理,请及时跟进`
: '',
showCondition: item => item.waitProcessResumeCount > 0
},
2: {
show: true,
text: '您的招聘需求已完成,请及时查看'
},
3: {
show: true,
text: '您的招聘需求已拒绝,请及时查看'
}
}
// 获取状态提示文本
export const getStatusTipText = function (item) {
const config = statusTipConfig[item.status]
if (!config || !config.show) {
return null
}
const {
status,
waitProcessResumeCount,
confirmFlag,
trialWaitConfirmCount,
onboardingWaitConfirmCount
} = item
// 如果有显示条件,先判断条件
if (config.showCondition && !config.showCondition(item)) {
return null
// 待处理提示文案显示逻辑
if (status == 1 && waitProcessResumeCount > 0) {
return `您有${waitProcessResumeCount}份简历待处理,请及时跟进`
} else if (status == 1 && trialWaitConfirmCount > 0) {
return '您有新的试岗记录,请及时查看'
} else if (status == 1 && onboardingWaitConfirmCount > 0) {
return '您有新的入职记录,请及时查看'
} else if (status == 2 && confirmFlag == 'N') {
return '您的招聘需求已完成,请及时查看'
} else if (status == 3 && confirmFlag == 'N') {
return '您的招聘需求已拒绝,请及时查看'
}
// 如果 text 是函数,执行函数获取文本
if (typeof config.text === 'function') {
return config.text(item)
}
return config.text
return null
}
......@@ -33,8 +33,6 @@ Page({
onLoad(options) {
let { mentorshipFormData } = this.data
let userInfo = wx.$util.getUserInfo()
this.getWaitstaffstate()
this.search()
// 非区域运营登录,打回到首页
//ll if (userInfo?.loginRole != 3) wx.reLaunch({ url: "/pages/loading/loading" })
if (userInfo?.isSuper) {
......@@ -50,7 +48,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady() { },
/**
* 生命周期函数--监听页面显示
......@@ -81,12 +79,14 @@ Page({
// 标签切换
tabClick(e) {
if (this.data.tabIndex === e.detail) return
this.setData(
{
tabIndex: e.detail,
list: []
},
() => {
console.log('tabClick')
this.search()
this.getWaitstaffstate()
}
......@@ -162,12 +162,15 @@ Page({
}
)
//仅已完成/以驳回可以调用flag接口
if (item.status == 0 || item.status == 1) return
if (
item.status == 0
)
return
confiremStaffFlagAPI({ id: item.id }).then(res => {
let { code } = res
if (code == 0) {
this.getWaitstaffstate()
this.search()
// this.getWaitstaffstate()
// this.search()
}
})
},
......@@ -238,7 +241,7 @@ Page({
},
// 生命周期函数--监听页面隐藏
onHide() {},
onHide() { },
/**
* 生命周期函数--监听页面卸载
*/
......@@ -251,13 +254,13 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
onPullDownRefresh() { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
onReachBottom() { },
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
onShareAppMessage() { }
})
......@@ -97,6 +97,13 @@ page {
margin-bottom: var(--fontSize4);
justify-content: space-between;
.ji {
display: inline-block;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.merchant-name {
flex: 1;
min-width: 0;
......@@ -121,6 +128,11 @@ page {
background: #eaf1ff;
}
&.status-4 {
color: #2C66F7;
background: #eaf1ff;
}
// 招聘中 status = 1
&.status-1 {
color: #ff9d0a;
......
......@@ -32,8 +32,9 @@
bind:tap="handleDetail"
data-item="{{ item }}"
>
<view class="item_header">
<text class="merchant-name">{{item.merchantName}}</text>
<view class="item_header">
<image wx:if="{{ item.urgent == 1 }}" class="ji" src="{{ IMG_URL }}miniProgram/ji.png" mode="aspectFill"></image>
<text class="merchant-name">{{item.merchantName}}</text>
<text class="status-tag status-{{ item.status }}">{{item.statusName}}</text>
</view>
<view class="item_content" wx:for="{{ mentorshipFormData }}" wx:for-item="it" wx:for-index="subInd" wx:key="subInd">
......@@ -46,7 +47,7 @@
</block>
</view>
<!-- 提示消息 -->
<view class="item_footer" wx:if="{{ tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0 }}">
<view class="item_footer" wx:if="{{ tabIndex == 0 && item.showTip }}">
<view class="msg_tips">
<text>{{item.tipText}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
......
......@@ -332,4 +332,26 @@ module.exports = {
returnAll: true,
});
},
/** 根据VIN查询查博士数据 */
queryByVin(data) {
return newApi.post(`/chaboshi/queryByVin`, data, {
returnAll: true,
});
},
/** 报告管理列表数据 */
getReportListData(data) {
return newApi.post('/checkReport/pageList', data, {returnAll: true})
},
/** 报告管理列表tab项统计数据 */
getReportStaticsData(data) {
return newApi.post('/checkReport/numCount', data, {returnAll: true})
},
/** 新增报告 */
addReportAPI(data) {
return newApi.post('/checkReport/create', data, {returnAll: true})
},
/** 校验是否有进入权限 */
checkPermissionsAPI(data) {
return newApi.post('/permissionAccess/checkVisitButton', data, {returnAll: true})
}
};
......@@ -382,7 +382,14 @@ Component({
// 品牌车型
handleJumpBrand(e) {
wx.$router.go("packageEquity.carBrands");
const thisPage = wx.$router.getPageInstance();
const carTips = thisPage?.data?.carTips || "";
console.log("[GLForm handleJumpBrand] carTips:", carTips);
const url = carTips
? `packageEquity.carBrands?cartips=${encodeURIComponent(carTips)}`
: "packageEquity.carBrands";
console.log("[GLForm handleJumpBrand] url:", url);
wx.$router.go(url);
},
handleCellClick(e) {
......
......@@ -16,7 +16,6 @@
margin-top: var(--fontSize14);
box-sizing: border-box;
color: #5A5E66;
border-bottom: var(--fontSize1) solid #F2F3F5;
width: 100%;
display: flex;
line-height: var(--fontSize88);
......
......@@ -27,6 +27,7 @@ Page({
isEdit: false, // 是否为编辑模式
detailsInfo: null, // 详情数据(编辑模式使用)
statusMap, // 状态映射
carTips: "", // 车辆提示信息(从车架号识别获取)
// FirstStep 的 picker 状态(移到页面级别避免被 scroll-view 遮挡)
firstStepReferrerPicker: false,
firstStepDeliveryPicker: false,
......@@ -517,7 +518,7 @@ Page({
reWrite(type, data) {
let { formData } = this.data;
console.log("ASCSAC",type);
console.log("ASCSAC", type);
if (type === "licensePlate") {
// 行驶证识别
// 根据返回数据结构映射到表单字段
......@@ -588,68 +589,82 @@ Page({
this.checkLicensePlateRepeat(licensePlate);
}
});
const upperVin = formatVinInput(vin);
// 先验证车架号
validateVin(upperVin)
.then((result) => {
// validateVin 返回 { success, message, data, vin }
// data 中包含后端接口返回的完整数据
let { valid } = result.data.data || {};
// 将 valid 值赋值到 FirstStep 组件的 vinValid 属性
const firstStepComponent = this.selectComponent("#FirstStep");
if (firstStepComponent) {
firstStepComponent.setData({
vinValid: valid,
});
}
if (valid) {
// 验证通过,赋值到表单
this.setData(
{
"formData.carBaseReqDTO.vin": upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成并已自动填写到表单中",
icon: "none",
duration: 2000,
});
}
);
// 如果行驶证识别结果中包含 vin,则同时走 vin 相关逻辑(校验 + 获取 carTips)
if (vin) {
const upperVin = formatVinInput(vin);
// 根据 vin 查询车辆信息,获取 carTips
newApi.queryByVin({ vin: upperVin }).then((res) => {
if (res.data.code == 0) {
const carTips = res.data.data.base.commonName || "";
this.setData({ carTips });
} else {
// 验证未通过,仍然赋值但提示用户
this.setData({ carTips: "" });
}
});
// 先验证车架号
validateVin(upperVin)
.then((result) => {
// validateVin 返回 { success, message, data, vin }
// data 中包含后端接口返回的完整数据
let { valid } = result.data.data || {};
// 将 valid 值赋值到 FirstStep 组件的 vinValid 属性
const firstStepComponent = this.selectComponent("#FirstStep");
if (firstStepComponent) {
firstStepComponent.setData({
vinValid: valid,
});
}
if (valid) {
// 验证通过,赋值到表单
this.setData(
{
"formData.carBaseReqDTO.vin": upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成并已自动填写到表单中",
icon: "none",
duration: 2000,
});
}
);
} else {
// 验证未通过,仍然赋值但提示用户
this.setData(
{
"formData.carBaseReqDTO.vin": upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成,但校验未通过,请检查",
icon: "none",
duration: 2000,
});
}
);
}
})
.catch((error) => {
// 验证失败(接口异常等),仍然赋值但提示用户
this.setData(
{
"formData.carBaseReqDTO.vin": upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成,但校验未通过,请检查",
title: "车架号识别完成,但校验异常,请检查",
icon: "none",
duration: 2000,
});
}
);
}
})
.catch((error) => {
// 验证失败(接口异常等),仍然赋值但提示用户
this.setData(
{
"formData.carBaseReqDTO.vin": upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成,但校验异常,请检查",
icon: "none",
duration: 2000,
});
}
);
});
});
}
} else if (type === "vin") {
// 车架号识别
// vinOcr API 返回的数据结构中包含 vin 字段
......@@ -658,21 +673,29 @@ Page({
if (vin) {
// 转换为大写
const upperVin = formatVinInput(vin);
newApi.queryByVin({ vin: upperVin }).then((res) => {
console.log(res, "res");
if (res.data.code == 0) {
const carTips = res.data.data.base.commonName || "";
this.setData({ carTips });
} else {
this.setData({ carTips: "" });
}
});
// 先验证车架号
validateVin(upperVin)
.then((result) => {
// validateVin 返回 { success, message, data, vin }
// data 中包含后端接口返回的完整数据
let { valid } = result.data.data || {};
// 将 valid 值赋值到 FirstStep 组件的 vinValid 属性
const firstStepComponent = this.selectComponent("#FirstStep");
if (firstStepComponent) {
firstStepComponent.setData({
vinValid: valid,
});
}
// 将 valid 值赋值到 FirstStep 组件的 vinValid 属性
const firstStepComponent = this.selectComponent("#FirstStep");
if (firstStepComponent) {
firstStepComponent.setData({
vinValid: valid,
});
}
if (valid) {
// 验证通过,赋值到表单
......
......@@ -229,6 +229,7 @@ Page({
_this.closeChangeUploadType()
wx.chooseImage({
count: count,
sizeType: ['original'],
success(res) {
for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) {
......@@ -337,6 +338,7 @@ Page({
wx.chooseMedia({
count: count,
mediaType: field.video ? ['image', 'video'] : ['image'],
sizeType: field.video ? ['original', 'compressed'] : ['original'],
maxDuration: 60,
success(res) {
const ext = res.tempFiles?.length == 1 && res.tempFiles[0].tempFilePath && res.tempFiles[0].tempFilePath.split('.').pop().toLowerCase()
......
......@@ -159,9 +159,12 @@ Page({
key: "signingInfo.saleContract.fullPrice",
cell: "元",
},
{ label: "签署人类型", key: "signingInfo.saleContract.signerTypeStr" },
{ label: "签约车主", key: "signingInfo.saleContract.partAName" },
{ label: "手机号码", key: "signingInfo.saleContract.phone" },
{ label: "经办人", key: "signingInfo.saleContract.handler" },
{ label: "身份证号", key: "signingInfo.saleContract.idCard" },
{ label: "营业执照号", key: "signingInfo.saleContract.orgLicenseNumber" },
{
label: "合同模版名称",
key: "signingInfo.saleContract.docTemplateName",
......@@ -177,6 +180,11 @@ Page({
type: "images",
},
{
label: "营业执照图片",
key: "signingInfo.saleContract.orgLicenseUrl",
type: "imageArr"
},
{
label: "三方/委托交易凭证",
key: "signingInfo.saleContract.thirdPartyTransactionVoucher",
type: "image",
......@@ -538,7 +546,7 @@ Page({
return;
}
const { url, type } = e.currentTarget.dataset;
const { url, type, index } = e.currentTarget.dataset;
// 设置正在预览标志
this.setData({
......@@ -548,8 +556,8 @@ Page({
if (type === 1 || type === "1") {
// 图片预览
wx.previewImage({
current: url,
urls: [url],
current: !((index ?? '') === '') ? url[index] : url,
urls: !((index ?? '') === '') ? url : [url],
success: () => {
// 预览成功后,延迟重置标志位(给用户时间关闭预览)
setTimeout(() => {
......@@ -1038,6 +1046,7 @@ Page({
tabs.find((i) => i.key === "payment").hidden = false;
}
if (detailsInfo.signingInfo.saleContract) {
detailsInfo.signingInfo.saleContract.signerTypeStr = detailsInfo.signingInfo.saleContract.signerType == 0 ? '个人' : detailsInfo.signingInfo.saleContract.signerType == 1 ? '企业委托' : '企业'
// 判断签约信息
tabs.find((i) => i.key === "contract").hidden = false;
}
......
<!-- packageUsedCar/pages/evaluationForm/evaluationFormDetails/evaluationFormDetails.wxml -->
<wxs module="utils">
// 根据路径获取对象值
var getValueByPath = function(obj, path) {
var getValueByPath = function(obj, path, arrFlag) {
if (!obj || !path) return '-';
var keys = path.split('.');
var value = obj;
......@@ -13,6 +13,7 @@
return '-';
}
}
if (arrFlag) return value.split(',')
return value !== '' && value !== null && value !== undefined ? value : '-';
};
......@@ -222,6 +223,27 @@
return false;
}
}
var signerType = getValueByPath(data, 'signingInfo.saleContract.signerType')
// 如果签署人类型是个人/企业委托,隐藏经办人字段
if (signerType == 0 || signerType == 1) {
if (item.key == 'signingInfo.saleContract.handler') return false
}
// 如果签署人类型是个人,隐藏营业执照号/营业执照图片字段
if (signerType == 0) {
if (item.key == 'signingInfo.saleContract.orgLicenseNumber' || item.key == 'signingInfo.saleContract.orgLicenseUrl') return false
}
// 如果签署人类型是企业, 隐藏身份证号/身份证图片
if (signerType == 2) {
if (item.key == 'signingInfo.saleContract.idCard') return false
var keys = item.keys
if (keys && keys.length > 0) {
for (var i = 0; i < keys.length; i++) {
if (keys[i] == 'signingInfo.saleContract.idCardFrontUrl') {
return false
}
}
}
}
return true;
};
......@@ -556,6 +578,12 @@
<image wx:if="{{!utils.isValueEmpty(detailsInfo, imgKey)}}" src="{{ utils.getValueByPath(detailsInfo, imgKey) }}" mode="aspectFill" class="cert-image mr-16" catchtap="previewMedia" data-url="{{ utils.getValueByPath(detailsInfo, imgKey) }}" data-type="1" />
</block>
</view>
<!-- 单字段多图片 -->
<view wx:elif="{{item.type == 'imageArr'}}" class="flex flex-wrap">
<block wx:for="{{utils.getValueByPath(detailsInfo, item.key, true)}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<image wx:if="{{subItem}}" src="{{subItem}}" mode="aspectFill" class="cert-image mr-16" catchtap="previewMedia" data-url="{{ utils.getValueByPath(detailsInfo, item.key, true)}}" data-index="{{subIndex}}" data-type="1"/>
</block>
</view>
<!-- 单张图片或视频(根据文件类型判断) -->
<block wx:elif="{{item.type == 'image'}}">
<!-- 判断是否是视频 -->
......
......@@ -543,6 +543,9 @@ Component({
);
setTimeout(() => {
this.cancelAmountRequested();
this.setData({ currentPage: 1 }, () => {
this.search();
});
});
} else {
wx.hideLoading();
......
......@@ -189,6 +189,18 @@ page {
height: 32rpx;
margin-left: 8rpx;
}
.radio-item {
display: flex;
align-items: center;
&.mr-20 {
margin-right: 20rpx;
}
.radio-icon {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
}
.form-textarea {
margin-top: 16rpx;
......@@ -367,9 +379,9 @@ page {
}
.title-label-see {
flex-shrink: 0;
width: 180rpx;
width: 168rpx;
color: #999EA8;
margin-right: 4rpx;
margin-right: 16rpx;
}
.image-box {
width: 196rpx;
......
// packageUsedCar/pages/indexPage/index/index.js
import newApi from '~/packageUsedCar/api'
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
function throttle(func, delay) {
let timeoutId;
let lastExecTime = 0;
return function (...args) {
const currentTime = Date.now();
// Calculate the time elapsed since the last execution
const timeSinceLastExec = currentTime - lastExecTime;
// If the elapsed time is greater than the delay, execute the function immediately
if (timeSinceLastExec >= delay) {
func.apply(this, args);
lastExecTime = currentTime;
} else {
// If there is a pending timeout, cancel it
if (timeoutId) {
clearTimeout(timeoutId);
}
// Schedule the function execution after the remaining delay
timeoutId = setTimeout(() => {
func.apply(this, args);
lastExecTime = Date.now();
}, delay - timeSinceLastExec);
}
};
}
Component({
/**
......@@ -44,7 +72,14 @@ Component({
userInfo: {},
menuList: [{
menuText: "驻店日报",
icon: "supplementary_order"
icon: "crowdFunding/supplementary_order",
path: "dailyReport"
}, {
menuText: "报告管理",
icon: "usedCar/report_manage",
path: "reportList",
parentPath: "reportManage",
buttonCode: 'quotation'
}],
current: 0,
itemDataList: [{
......@@ -111,11 +146,17 @@ Component({
this.getStatic()
})
},
// 驻店日报
navGo() {
navGo: throttle(async function (e) {
let { item } = e.currentTarget.dataset
if (item.buttonCode) { // 校验是否有进入权限
wx.$util.showLoading('加载中')
const res = await newApi.checkPermissionsAPI({buttonCode: item.buttonCode})
wx.$util.hideLoading()
if (!res.data.data) return wx.$util.showToast('功能暂未开放')
}
wx.navigateTo({
url: '/packageUsedCar/pages/indexPage/dailyReport/dailyReport',
url: item.parentPath ? `/packageUsedCar/pages/indexPage/${item.parentPath}/${item.path}/${item.path}` : `/packageUsedCar/pages/indexPage/${item.path}/${item.path}`
})
}
})
}
})
\ No newline at end of file
......@@ -48,7 +48,7 @@
<block wx:for="{{ menuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon">
<image src="{{ IMG_URL}}crowdFunding/{{item.icon }}.png" mode="widthFix" />
<image src="{{ IMG_URL}}/{{item.icon }}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
<view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view>
......
// packageUsedCar/pages/indexPage/reportManage/addReport/addReport.js
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
import api from '~/api/api.js'
import { validateVin, formatVinInput } from "~/utils/vinVaildate"
import newApi from '~/packageUsedCar/api'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 0,
btns: [{
label: '事故报告',
icon: 'accident_icon',
tips: '含出险、理赔记录',
active: true,
activeColor: '#797AFC',
activeBorder: '2rpx solid #797afc',
activeBackground: '#F5F5FF'
}, {
label: '维保报告',
icon: 'maintenance_icon',
tips: '含维修、保养记录',
active: false,
activeColor: '#3785FF',
activeBorder: '2rpx solid #3785FF',
activeBackground: '#EFF6FF'
}],
agreeChecked: false,
vin: '',
motorRegistrationCertificateUrl: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
back() {
wx.navigateBack()
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
changeTabBtn(e) {
let { index } = e.currentTarget.dataset
let { btns } = this.data
btns.forEach((val, idx) => {
val.active = false
if (index == idx) val.active = true
})
this.setData({
btns,
vin: '',
motorRegistrationCertificateUrl: '',
agreeChecked: false
})
},
handleOCR() {
wx.navigateTo({
url: '/packageUsedCar/pages/ocrUsedCarModules/ocrUsedCarModules?type=vin',
})
},
handleVinInput(e) {
let { value } = e.detail
let filteredValue = value.replace(/[^A-Za-z0-9]/g, '')
// 将小写转为大写
const upperVin = formatVinInput(filteredValue)
this.setData({
vin: upperVin
})
// 当输入满17位时,进行实时校验(防抖500ms)
if (upperVin.length === 17) {
validateVin(upperVin)
.then((res) => {
let { valid } = res.data.data
this.setData({
vinValid: valid,
})
})
.catch(() => {
// 校验失败时,设置为 false
this.setData({
vinValid: false,
})
})
} else {
// 长度不足17位时,重置校验状态
this.setData({
vinValid: null,
})
}
},
reWrite(type, data) {
// 车架号识别
// vinOcr API 返回的数据结构中包含 vin 字段
const vin = data?.vin || data || ""
if (vin) {
// 转换为大写
const upperVin = formatVinInput(vin)
// 先验证车架号
validateVin(upperVin)
.then((result) => {
// validateVin 返回 { success, message, data, vin }
// data 中包含后端接口返回的完整数据
let { valid } = result.data.data || {}
this.setData({
vinValid: valid
})
if (valid) {
// 验证通过,赋值到表单
this.setData(
{
vin: upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成并已自动填写到表单中",
icon: "none",
duration: 2000,
})
}
)
} else {
// 验证未通过,仍然赋值但提示用户
this.setData(
{
vin: upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成,但校验未通过,请检查",
icon: "none",
duration: 2000,
})
}
)
}
})
.catch((error) => {
// 验证失败(接口异常等),仍然赋值但提示用户
this.setData(
{
vin: upperVin,
},
() => {
wx.showToast({
title: "车架号识别完成,但校验异常,请检查",
icon: "none",
duration: 2000,
})
}
)
})
}
},
// 上传图片
handleImageUpload(e) {
let _this = this
wx.chooseImage({
count: 1,
success(res) {
for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) {
return wx.showToast({
title: '图片上传最大10MB',
icon: 'none'
})
}
}
const upload = async (tempFiles) => {
wx.$util.showLoading('上传中')
try {
for (const item of tempFiles) {
const val = item.path
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadImg({
file: `${type}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
wx.$util.showToast('图片上传成功')
_this.setData({
motorRegistrationCertificateUrl: data
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
wx.hideLoading()
}
}
upload(res?.tempFiles)
}
})
},
// 删除图片
removeMedia(e) {
wx.showModal({
title: '确认删除',
content: `确定要删除此图片吗?`,
complete: (res) => {
if (res.confirm) {
this.setData({
motorRegistrationCertificateUrl: ''
})
}
}
})
},
// 预览图片
previewImage(e) {
let { motorRegistrationCertificateUrl } = this.data
wx.previewImage({
urls: [motorRegistrationCertificateUrl],
current: motorRegistrationCertificateUrl
})
},
agree() {
this.setData({
agreeChecked: !this.data.agreeChecked
})
},
confirm() {
let { vin, vinValid, motorRegistrationCertificateUrl, agreeChecked, btns } = this.data
if (!vin || !motorRegistrationCertificateUrl || !agreeChecked) return
if (!vin) return wx.$util.showToast('请填写车架号(VIN)')
if (!vinValid) return wx.$util.showToast('车架号校验未通过,请重新输入')
if (!motorRegistrationCertificateUrl) return wx.$util.showToast('请上传行驶证照片')
if (!agreeChecked) return wx.$util.showToast('请确认信息真实有效')
wx.$util.showLoading('加载中')
if (this.data.confirmFlag) return
this.setData({confirmFlag: true})
newApi.addReportAPI({
reportType: btns?.findIndex(val => val.active),
vin: vin,
licenseUrl: motorRegistrationCertificateUrl
}).then(res => {
this.setData({confirmFlag: false})
wx.$util.hideLoading()
if (res.data.code == 0) {
wx.$util.showToast('提交成功')
setTimeout(() => {
wx.navigateBack()
}, 500)
} else {
wx.$util.showToast(res.data.msg || '请求失败')
}
}).catch(error => {
this.setData({confirmFlag: false})
wx.$util.hideLoading()
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageUsedCar/pages/indexPage/reportManage/addReport/addReport.wxss */
.title-text {
font-weight: 500;
}
.bg {
width: 100%;
height: var(--fontSize800);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/evaluationForm-bg.png');
background-size: 100% 100%;
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.container {
box-sizing: border-box;
padding: 0 28rpx;
.flex {
display: flex;
align-items: center;
}
.content-title {
margin: 24rpx 0;
color: #999EA8;
font-size: 24rpx;
image {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
.tab-btn {
gap: 16rpx;
padding-bottom: 8rpx;
}
.btn-item {
flex: 1;
padding: 24rpx 28rpx;
border-radius: 24rpx;
background: #FFFFFF;
font-size: 28rpx;
font-width: 500;
image {
width: 36rpx;
height: 36rpx;
margin-right: 24rpx;
flex-shrink: 0;
}
.tips {
font-size: 26rpx;
color: #666666 !important;
margin: 8rpx 0 0 60rpx;
font-weight: 400;
}
}
.form-box {
.form-item {
font-size: 28rpx;
.label {
color: #333333;
.requiredLabel {
color: #F24724;
margin-left: 8rpx;
}
}
.value-input {
margin: 24rpx 0 28rpx 0;
width: 100%;
height: 84rpx;
background: #F7F7F7;
border-radius: 16rpx;
.input {
width: calc(100% - 120rpx);
height: 100%;
padding: 0 24rpx;
}
.ocr-btn {
flex-shrink: 0;
width: var(--fontSize108);
height: var(--fontSize72);
position: relative;
.ocr-icon {
position: absolute;
left: var(--fontSize24);
top: var(--fontSize18);
width: var(--fontSize60);
height: var(--fontSize40);
}
}
}
.upload-container {
.form-item {
background: #ffffff;
padding: 24rpx 0;
box-sizing: border-box;
.upload-item {
width: 192rpx;
height: 192rpx;
border-radius: 16rpx;
background: #F5F8FF;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
.upload-icon {
width: 192rpx;
height: 192rpx;
}
}
}
// 已上传图片样式
.uploaded-item {
margin-top: 16rpx;
position: relative;
width: 196rpx;
height: 196rpx;
border-radius: 16rpx;
overflow: hidden;
background: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
image {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.delete-icon {
position: absolute;
top: 12rpx;
right: 12rpx;
.delete-img {
width: 40rpx;
height: 40rpx;
}
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footerBtn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: var(--fontSize100);
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
z-index: 99;
padding: 20rpx 32rpx;
.btn {
width: 320rpx;
height: 80rpx;
border-radius: 12rpx;
text-align: center;
line-height: 80rpx;
font-size: 32rpx;
}
.btn-check {
font-size: 24rpx;
font-weight: 400;
color: #333333;
.check-icon {
width: 24rpx;
height: 24rpx;
flex-shrink: 0;
margin-right: 12rpx;
}
}
.confirm {
color: #ffffff;
font-weight: 500;
height: 80rpx;
line-height: 80rpx;
background: #347BFF;
&.disabled {
background: #347bff80;
}
}
}
}
\ No newline at end of file
<!--packageUsedCar/pages/indexPage/reportManage/addReport/addReport.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back">
<view class="title-text">新增报告</view>
</navigation-bar>
<view class="bg"></view>
<view class="container" style="padding-top: {{navBarHeight}}px;">
<view class="content-title flex">
<image src="{{IMG_URL}}usedCar/report_type_icon.png" mode=""/>
<view>报告类型</view>
</view>
<view class="tab-btn flex">
<view class="btn-item" bindtap="changeTabBtn" data-index="{{index}}" style="border: {{item.active ? item.activeBorder : '2rpx solid #FFFFFF'}};color: {{item.active ? item.activeColor : '#292D33'}};background: {{item.active ? item.activeBackground : '#FFFFFF'}};" wx:for="{{btns}}" wx:key="index">
<view class="flex">
<image src="{{IMG_URL}}usedCar/{{item.icon}}.png" mode=""/>
<view>{{item.label}}</view>
</view>
<view class="tips">{{item.tips}}</view>
</view>
</view>
<view class="content-title flex">
<image src="{{IMG_URL}}usedCar/vehicle _report_icon.png" mode=""/>
<view>车辆资料</view>
</view>
<view class="form-box">
<view class="form-item">
<view class="label">
车架号(VIN)
<text class="requiredLabel">*</text>
</view>
<view class="value-input flex">
<input value="{{vin}}" class="input" placeholder="请输入17位VIN" bindinput="handleVinInput" maxlength="17"/>
<view bindtap="handleOCR" class="ocr-btn">
<image src="{{IMG_URL}}usedCar/vin_icon.png" class="ocr-icon" />
</view>
</view>
</view>
<view class="form-item">
<view class="label">
行驶证照片
<text class="requiredLabel">*</text>
</view>
<view class="upload-container">
<view class="form-item">
<view wx:if="{{motorRegistrationCertificateUrl}}" class="uploaded-item">
<image src="{{motorRegistrationCertificateUrl}}" bindtap="previewImage" mode="aspectFit"></image>
<view class="delete-icon" bindtap="removeMedia">
<image src="{{IMG_URL}}zy_paf_del_icon.png" class="delete-img"></image>
</view>
</view>
<view wx:else class="upload-item" bindtap="handleImageUpload">
<view class="upload-placeholder flex align-center justify-center flex-col">
<image src="{{IMG_URL}}usedCar/upload-icon.png" class="upload-icon"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn-check flex" bindtap="agree">
<image class="check-icon" wx:if="{{agreeChecked}}" src="{{IMG_URL}}check.png" mode=""/>
<image class="check-icon" wx:else src="{{IMG_URL}}no-check.png" mode=""/>
<view>确认信息真实有效</view>
</view>
<view class="btn confirm {{vin && motorRegistrationCertificateUrl && agreeChecked ? '' : 'disabled'}}" bindtap="confirm">提交申请</view>
</view>
</view>
\ No newline at end of file
// packageUsedCar/pages/indexPage/reportManage/reportList/reportList.js
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
import newApi from '~/packageUsedCar/api'
let timeoutId
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 0,
tabList: [
{ text: "全部", count: 0, keyNum: "allCount", key: "" },
{ text: "事故报告", count: 0, keyNum: "accidentCount", key: "0" },
{ text: "维保报告", count: 0, keyNum: "maintainCount", key: "1" }
],
tabIndex: 0,
flag: true,
list: [],
showIcon1: true,
statusMap: {
0: {
text: '生成中'
},
1: {
text: '生成成功'
},
2: {
text: '生成失败'
}
},
formItems: [{
label: '车架号',
key: 'vin'
}, {
label: '报告时间',
key: 'acquireTime'
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.search()
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() {
wx.navigateBack()
},
onScroll: function (e) {
const { scrollTop } = e.detail
// 滚动时隐藏第一个图标,显示第二个图标
this.setData({
showIcon1: false
})
// 清除之前的定时器
if (timeoutId) {
clearTimeout(timeoutId)
}
// 设置一个定时器,在滚动停止后一定时间后恢复两个图标的显示状态
timeoutId = setTimeout(() => {
this.setData({
showIcon1: true
})
}, 1000) // 在这里设置等待的时间,单位是毫秒
},
searchInput(e) {
let { value } = e.detail
let filteredValue = value.replace(/[^A-Za-z0-9]/g, '')
// 将小写转为大写
filteredValue = filteredValue.toUpperCase()
this.setData({
keyWord: filteredValue
})
},
handleOCR() {
wx.navigateTo({
url: '/packageUsedCar/pages/ocrUsedCarModules/ocrUsedCarModules?type=vin',
})
},
reWrite(type, data) {
// 车架号识别
// vinOcr API 返回的数据结构中包含 vin 字段
const vin = data?.vin || data || ""
if (vin) {
// 转换为大写
const upperVin = vin.toUpperCase(vin)
// 赋值到输入框内
this.setData({
keyWord: upperVin
})
}
},
// 获取状态数据
getStatByStatus() {
let { keyWord, tabList } = this.data
const userInfo = wx.$util.getUserInfo()
newApi
.getReportStaticsData({
t: { vin: keyWord}
})
.then((res) => {
if (res.data.code == 0) {
tabList.forEach((item) => {
item.count = res.data.data[item.keyNum] || 0
})
this.setData({
tabList,
})
} else {
wx.$util.showToast(res.data.msg || "请求失败")
}
})
},
searchConfirm() {
this.search()
},
// 搜索清空
handleReset() {
this.setData(
{
keyWord: "",
},
() => {
this.search()
}
)
},
tabClick(e) {
this.setData(
{
reportType: e?.detail || "",
},
() => {
this.search()
}
)
},
search() {
this.setData(
{
currentPage: 1,
list: [],
nothing: false,
flag: false,
},
() => {
this.getList(true)
this.getStatByStatus()
}
)
},
async getList(isReset = false) {
let { keyWord, reportType, currentPage, nothing } = this.data
if (nothing) return
wx.$util.showLoading("加载中")
const res = await newApi.getReportListData({
t: { vin: keyWord, reportType},
currentPage: currentPage,
pageSize: 10,
})
wx.hideLoading()
if (res.data.code == 0) {
this.setData({
[`list[${currentPage - 1}]`]: res.data.data.records,
currentPage: currentPage + 1,
nothing: currentPage == res.data.data.pages,
triggered: false,
flag: true,
})
if (isReset) {
this.setData({
scrollTop: 0,
})
}
} else {
this.setData({
list: [],
nothing: false,
flag: true,
})
wx.$util.showToast(res.data.msg || "请求失败")
}
},
onBottomRefresh() {
this.getList();
},
handleDetail(e) {
let { value } = e.currentTarget.dataset
if (value.reportUrl && value.status == 1) {
wx.$router.jumpH5(value.reportUrl)
}
},
addReport() {
wx.navigateTo({
url: '/packageUsedCar/pages/indexPage/reportManage/addReport/addReport'
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"tab-bar": "/packageUsedCar/components/TabBar/TabBar"
},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageUsedCar/pages/indexPage/reportManage/reportList/reportList.wxss */
.title-text {
font-weight: 500;
}
.bg {
width: 100%;
height: var(--fontSize800);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/evaluationForm-bg.png');
background-size: 100% 100%;
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.container {
height: calc(100vh - 10rpx);
box-sizing: border-box;
.search-box {
width: 100%;
padding: var(--fontSize18) var(--fontSize20) 0;
display: flex;
align-items: center;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
.search-input {
background: #FFFFFF;
border-radius: var(--fontSize38);
width: calc(100vw - var(--fontSize40));
height: var(--fontSize72);
display: flex;
align-items: center;
.input {
font-size: var(--fontSize28);
width: calc(100% - var(--fontSize236));
height: var(--fontSize38);
line-height: var(--fontSize38);
}
.input-placeholder {
color: #BEC1C7;
}
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.clearBtn {
width: var(--fontSize60);
height: var(--fontSize72);
position: relative;
.search-clear {
position: absolute;
left: var(--fontSize20);
top: 50%;
transform: translateY(-50%);
width: var(--fontSize36);
height: var(--fontSize36);
}
}
.ocr-btn {
flex-shrink: 0;
width: var(--fontSize108);
height: var(--fontSize72);
position: relative;
position: absolute;
top: var(--fontSize18);
right: var(--fontSize20);
}
.ocr-icon {
position: absolute;
left: var(--fontSize24);
top: 50%;
transform: translateY(-50%);
width: var(--fontSize60);
height: var(--fontSize40);
}
}
}
.order-box {
height: calc(100% - var(--fontSize190));
.list {
box-sizing: border-box;
width: 100%;
padding-bottom: 0;
height: 100%;
.list-item {
margin: 0 20rpx 24rpx 20rpx;
border-radius: 24rpx;
background: #ffffff;
box-shadow: 0 6rpx 24rpx 0 #2a61eb1a;
padding: 28rpx;
.flex {
display: flex;
align-items: center;
}
.top {
justify-content: space-between;
margin-bottom: 28rpx;
.type-icon {
width: 36rpx;
height: 36rpx;
flex-shrink: 0;
margin-right: 16rpx;
}
.type-title {
font-size: 30rpx;
font-weight: 500;
color: #292D33;
}
.status-box {
border-radius: 12rpx;
padding: 4rpx 16rpx;
font-size: 24rpx;
font-weight: 500;
}
.status-0 {
background: #FEF4E8;
color: #F59619;
}
.status-1 {
background: #E9F9F1;
color: #2CCA74;
}
.status-2 {
background: #FDEDED;
color: #EB4E4E;
}
}
.form-item {
display: flex;
align-items: center;
font-size: 28rpx;
margin-bottom: 24rpx;
&:last-child {
margin-bottom: 0;
}
.label {
flex-shrink: 0;
width: 128rpx;
color: #999EA8;
margin-right: 16rpx;
}
.value {
color: #666666;
}
}
}
.list-nothing {
text-align: center;
padding: 0 0 var(--fontSize20);
}
.no-data {
text-align: center;
padding-top: var(--fontSize220);
.no-data-img {
width: var(--fontSize226);
height: var(--fontSize156);
}
.list-not {
margin-top: var(--fontSize24);
color: #BEC1C7;
}
}
.top-empty {
height: var(--fontSize20);
width: 100%;
}
}
}
.add-btn-box {
width: 144rpx;
height: 144rpx;
border-radius: 24rpx;
opacity: 1;
border: 4rpx solid #ffffff;
background: #ffffff;
box-shadow: 0 6rpx 24rpx 0 #2a61eb1a;
position: fixed;
bottom: var(--fontSize220);
right: var(--fontSize4);
font-size: 24rpx;
font-weight: 500;
color: #4673FF;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}
.addBtn {
width: 144rpx;
height: 144rpx;
border-radius: 24rpx;
opacity: 1;
border: 4rpx solid #ffffff;
background: #ffffff;
background: linear-gradient(180deg, #4673ff1a 0%, #4673ff00 100%);
box-shadow: 0 6rpx 24rpx 0 #2a61eb1a;
position: fixed;
bottom: var(--fontSize220);
right: var(--fontSize4);
font-size: 24rpx;
font-weight: 500;
color: #4673FF;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
image {
width: 56rpx;
height: 56rpx;
margin-bottom: 12rpx;
}
}
.arrowIcon {
width: var(--fontSize36);
height: var(--fontSize144);
opacity: 1;
position: fixed;
bottom: var(--fontSize220);
right: 0;
border-radius: 16rpx 0 0 16rpx;
border: 2rpx solid #eff0f2;
background: #ffffff;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
display: flex;
align-items: center;
justify-content: center;
.image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
}
\ No newline at end of file
<!--packageUsedCar/pages/indexPage/reportManage/reportList/reportList.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back">
<view class="title-text">报告管理</view>
</navigation-bar>
<view class="bg"></view>
<view class="container" style="padding-top: {{navBarHeight}}px;">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="请输入车架号" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" maxlength="17" bindinput="searchInput" bindconfirm="searchConfirm" />
<block wx:if="{{ keyWord }}">
<view bindtap="handleReset" class="clearBtn">
<image src="/images/clear.png" class="search-clear" />
</view>
</block>
<view bindtap="handleOCR" class="ocr-btn">
<image src="{{IMG_URL}}usedCar/vin_icon.png" class="ocr-icon" />
</view>
</view>
</view>
<view>
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" scroll activeIndex="{{ tabIndex }}" />
</view>
<view wx:if="{{ flag }}" class="order-box">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscroll="onScroll" bindscrolltolower="onBottomRefresh" class="list" scroll-top="{{ scrollTop }}" lower-threshold="400" refresher-threshold="104" refresher-triggered="{{ triggered }}">
<block wx:if="{{ list.length && list[0].length }}">
<view class="top-empty"></view>
<block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:for="{{ i }}" wx:key="index">
<view class="list-item" bindtap="handleDetail" data-value="{{item}}">
<view class="top flex">
<view class="flex">
<image class="type-icon" src="{{IMG_URL}}usedCar/{{item.reportType == 1 ? 'maintenance_icon' : 'accident_icon'}}.png" mode=""/>
<view class="type-title">{{item.reportTypeName}}</view>
</view>
<view class="status-box status-{{item.status}}">{{item.statusName}}</view>
</view>
<view class="form-item" wx:for="{{formItems}}" wx:for-item="subI" wx:for-index="subIdx" wx:key="subIdx">
<view class="label">{{subI.label}}</view>
<view class="value">{{item[subI.key] || '-'}}</view>
</view>
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<view class="no-data" wx:else>
<image class="no-data-img" src="{{IMG_URL}}usedCar/empty-icon.png" />
<view class="list-not">暂无数据</view>
</view>
</scroll-view>
</view>
<block wx:if="{{showIcon1}}">
<view class="add-btn-box" bindtap="addReport">
<view class="addBtn">
<image src="{{IMG_URL}}usedCar/add_report.png" mode=""/>
<view>新增报告</view>
</view>
</view>
</block>
<block wx:else>
<view class="arrowIcon">
<image class="image" src="{{ IMG_URL }}usedCar/arrow-right.png" />
</view>
</block>
</view>
\ No newline at end of file
......@@ -27,6 +27,7 @@ Page({
plateNumber: "请扫描车辆前后方车牌拍照,拍照识别",
},
typeClass: "standNo",
isPageActive: true
},
takePhoto: function () {
var that = this;
......@@ -55,7 +56,7 @@ Page({
let { canvas, ctx, windowWidth, windowHeight, iPath } = this.data;
windowWidth = windowWidth;
windowHeight = windowHeight;
wx.$util.showLoading("生成中...");
console.log(windowWidth, windowHeight);
canvas.width = windowWidth;
......@@ -89,6 +90,7 @@ Page({
fileType: "jpg",
quality: 1, // 图片质量
success: (res) => {
wx.$util.hideLoading();
//将图片保存到本地相册
wx.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
......@@ -103,6 +105,7 @@ Page({
that.uploadImg(res.tempFilePath, "png");
},
fail: (res) => {
wx.$util.hideLoading();
console.log(res);
},
});
......@@ -145,8 +148,8 @@ Page({
orcRecogintion(url) {
let { typeClass } = this.data;
// 根据类型选择不同的 API
wx.$util.showLoading("识别中...");
const apiCall =
typeClass === "vin"
? newApi.vinOcr({ imageUrl: url })
......@@ -154,33 +157,36 @@ Page({
apiCall
.then((result) => {
wx.hideLoading();
wx.$util.hideLoading();
console.log("ocr", result);
let { code, data } = result.data;
console.log(data && data.status == 0, "data");
if (code == 0 && data && data.status == 1) {
wx.$router.back((page) => {
page.reWrite && page.reWrite(typeClass, data);
});
} else {
console.log("识别失败");
setTimeout(() => {
wx.$util.showToast(
{
title: "识别失败请重试",
icon: "fail",
// duration: 2000,//提示的延迟时间,单位毫秒,默认:1500
},
500
);
});
if (this.data.isPageActive) { // 添加页面存活标识符, 防止识别接口未返回前,操作了返回页面,出现返回后接口调用成功再次触发返回
if (code == 0 && data && data.status == 1) {
wx.$router.back((page) => {
page.reWrite && page.reWrite(typeClass, data);
});
} else {
console.log("识别失败");
setTimeout(() => {
wx.$util.showToast(
{
title: "识别失败请重试",
icon: "fail",
// duration: 2000,//提示的延迟时间,单位毫秒,默认:1500
},
500
);
});
}
}
})
.catch((err) => {
console.log(err);
wx.$util.hideLoading();
})
.finally((res) => {
wx.hideLoading();
wx.$util.hideLoading();
});
},
......@@ -357,7 +363,7 @@ Page({
// console.log('调用权限')
// console.log(data)
console.log("实例化");
this.setData({ isPageActive: true })
if (data) {
this.setData({
typeClass: data.type,
......@@ -405,4 +411,7 @@ Page({
},
// 在页面首次渲染实现生命周期获取操作canvas的上下文对象
onReady() {},
onUnload() {
this.setData({ isPageActive: false })
}
});
......@@ -101,7 +101,7 @@ Component({
.getMerchantRecordingSettings({
scene: 1,
merchantId: selectedMerchantList[0].merchantId,
merchantName: selectedMerchantList[0].merchantName
// merchantName: selectedMerchantList[0].merchantName
})
.then(merchantSettingInfo => {
let { code, data } = merchantSettingInfo
......
......@@ -124,7 +124,7 @@ export const getYQorderInfo = () => {
.getMerchantRecordingSettings({
scene: 1,
merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName
// merchantName: userInfo.shopMerchantName
})
.then(res => {
wx.$util.hideLoading()
......
......@@ -86,5 +86,18 @@ module.exports = {
'dj.api.smartcarlife.construction.count.technician.items',
data
)
},
/**
*
* 门店号是否是直营门店校验
*/
checkMerchantDirect(data) {
return api.post('dj.api.car.boutique.resident.direct.sale.merchant', data)
},
/**
* 查询给定日期如果填了日报是否缺失接待记录
*/
checkMissingReception(data) {
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.check', data)
}
}
......@@ -10,6 +10,7 @@
"task-dialog": "/components/TaskDialog/TaskDialog",
"side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal",
"report-template-popup": "/components/report-template-popup/report-template-popup"
}
}
......@@ -134,23 +134,35 @@
</view>
</view>
<view wx:if="{{ userInfo.loginRole != 7 }}">
<block wx:if="{{ isWait&&todoList.length>0 }}">
<block wx:if="{{ isWait&&(todoList.length>0 || missingRecordTodoList.length > 0) }}">
<view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view>
<view class="title">今日待办·{{todoList.length + missingRecordTodoList.length}}</view>
<view class="todo-items">
<view class="todo-item" wx:for="{{ ispopUp?todoList:stodoList }}" wx:for-index="idx" wx:key="idx">
<view class="todo-item-title">
<image src="{{ IMG_URL}}{{item.taskType=='1'?'warn':'task' }}.png" />
<text>{{todos[item.taskId]}}</text>
<block wx:if="{{todoList.length}}">
<view class="todo-item" wx:for="{{ ispopUp?todoList:stodoList }}" wx:for-index="idx" wx:key="idx">
<view class="todo-item-title">
<image src="{{ IMG_URL}}{{item.taskType=='1'?'warn':'task' }}.png" />
<text>{{todos[item.taskId]}}</text>
</view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{ item.taskId==2 }}" bindtap="goto" data-id="{{ item.taskId }}">去开单</view>
<view class="todo-item-btn" wx:elif="{{ item.taskId==4 }}" data-id="{{ item.taskId }}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{ item.taskId==1 }}" data-id="{{ item.taskId }}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{ item.taskId }}">关闭提醒</view>
</view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{ item.taskId==2 }}" bindtap="goto" data-id="{{ item.taskId }}">去开单</view>
<view class="todo-item-btn" wx:elif="{{ item.taskId==4 }}" data-id="{{ item.taskId }}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{ item.taskId==1 }}" data-id="{{ item.taskId }}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{ item.taskId }}">关闭提醒</view>
</view>
</block>
<block wx:if="{{missingRecordTodoList.length}}" wx:key="idx" wx:for-index="idx">
<view class="todo-item" wx:if="{{ispopUp || (!ispopUp && stodoList.length < 2)}}">
<view class="todo-item-title">
<image src="{{IMG_URL}}warn.png" />
<text>接待缺失报备</text>
</view>
<view class="todo-item-info">请报备缺失接待客户的原因</view>
<view class="todo-item-btn" bindtap="gotoMissingReception">去报备</view>
</view>
</block>
</view>
<view class="pack-up {{ !ispopUp?'pack-up-active':'' }}" wx:if="{{ todoList.length>2 }}" bindtap="packupList">
<view class="pack-up {{ !ispopUp?'pack-up-active':'' }}" wx:if="{{ (missingRecordTodoList.length + todoList.length)>2 }}" bindtap="packupList">
<image src="{{ IMG_URL }}pack-up.png" />
</view>
</view>
......@@ -465,4 +477,10 @@
bindconfirm="promptHandleConfirm"
sceneObj="{{ sceneObj }}"
></order-prompt-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file
<study-permission-modal id="customModal" />
<report-template-popup
show="{{showReportPopup}}"
templateList="{{reportTemplateList}}"
bind:cancel="onReportPopupCancel"
bind:select="onReportPopupSelect"
/>
\ No newline at end of file
......@@ -81,13 +81,36 @@ export default {
icon: 'icon-market'
},
{
name: '轻改区域日报',
name: '工作日报',
icon: 'supervisorDailyNew',
url: 'tabWorkOrder.supervisorDaily',
params: {
templateCode: 'qinggai-temp-001'
},
reportTypeAttr: 'daily',
reportTypeVal: '1',
recordId: 15,
noCheckdailyReport: true
},
{
name: '工作周报',
icon: 'weeklyReport',
url: 'tabWorkOrder.supervisorDaily',
reportTypeAttr: 'weekly',
reportTypeVal: '2',
// params: {
// templateCode: 'qinggai-temp-001'
// },
recordId: 18,
icon: 'lightDaily',
noCheckdailyReport: true
},
{
name: '工作月报',
icon: 'monthlyReport',
url: 'tabWorkOrder.supervisorDaily',
reportTypeAttr: 'monthly',
reportTypeVal: '3',
// params: {
// templateCode: 'qinggai-temp-001'
// },
recordId: 19,
noCheckdailyReport: true
}
],
......
......@@ -260,6 +260,30 @@ module.exports = {
)
},
/** 根据月份查询查询员工周报提交 */
getWeeklyRecordDetail(data) {
return api.post(
'dj.api.carboutique.assign.month.find.staff.weekly.report.submit',
data
)
},
/** 根据月份查询查询周 */
getMonthCalWeek(data) {
return api.post(
'dj.api.carboutique.assign.month.cal.week',
data
)
},
/** 根据年份查询查询员工月报提交 */
getMonthlyRecordDetail(data) {
return api.post(
'dj.api.carboutique.assign.year.find.staff.monthly.report.submit',
data
)
},
/** 用户提交日报 */
saveTempReport(data) {
return api.post('dj.api.mindworkplate.app.daily.report.save', data)
......@@ -384,5 +408,14 @@ module.exports = {
...params
}
)
}
},
/** 1.1 首页统计数据 - 日报/周报/月报默认值 */
userStat(data) {
return api.post('dj.api.smartcarlife.user.stat', data)
},
/** 2.1 会员权益产值统计 */
outputValueStatistics(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.outputValueStatistics', data)
},
}
......@@ -1170,6 +1170,8 @@ Page({
if (options.orderCode) {
this.onRoute(options);
}
// 添加埋点
wx.$track.setTrackData(0, 'submit_order', {}, '', 1)
},
init(userInfo) {
let {
......
Component({
properties: {
year: {
type: Number,
value: new Date().getFullYear()
},
selectedMonth: {
type: Number,
value: new Date().getMonth() + 1
},
monthList: {
type: Array,
value: [] // 数组结构:{ month: 1, disabled: false, hasSubmit: true }
}
},
data: {
showNextYear: true
},
observers: {
'year': function(year) {
const currentYear = new Date().getFullYear();
this.setData({
showNextYear: year < currentYear
});
}
},
methods: {
lastYear() {
this.triggerEvent('lastYear')
},
nextYear() {
this.triggerEvent('nextYear')
},
itemClick(e) {
const { index, disabled } = e.currentTarget.dataset
if (disabled) return
this.triggerEvent('monthClick', { month: index + 1 })
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="line"></view>
<view class="row year-select">
<view class="row last-year" bindtap="lastYear">
<gl-image class="icon left" src="{{ '/miniProgram/arrow-left.png' }}" webp></gl-image>
<view>上一年</view>
</view>
<view class="timeType">{{year}}年</view>
<view class="row next-year" bindtap="nextYear" style="visibility: {{showNextYear ? 'visible' : 'hidden'}}">
<!-- 下一年 -->
<view style="">下一年</view>
<gl-image class="icon right" src="{{ '/miniProgram/arrow-right.png' }}" webp></gl-image>
</view>
</view>
<scroll-view class="month-scroll" scroll-x="{{true}}" scroll-into-view="month-{{selectedMonth > 2 ? selectedMonth - 2 : 0}}">
<view class="month-container">
<block wx:for="{{monthList}}" wx:key="index">
<view
id="month-{{index}}"
class="month-item {{item.month == selectedMonth ? 'selected' : ''}} {{item.disabled ? 'disabled' : ''}}"
bindtap="itemClick"
data-index="{{index}}"
data-disabled="{{item.disabled}}"
>
<view class="month-text">{{item.month}}月</view>
<view class="empty-badge" wx:if="{{!item.hasSubmit && !item.disabled}}">空</view>
</view>
</block>
</view>
</scroll-view>
\ No newline at end of file
.row {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
background: #fff;
}
.year-select {
height: 80rpx;
flex-direction: row;
justify-content: space-between;
padding: 0 30rpx;
}
.last-year,
.next-year {
flex-direction: row;
font-size: 28rpx;
color: #666;
}
.icon {
width: 30rpx;
height: 30rpx;
}
.left {
margin-right: 10rpx;
}
.right {
margin-left: 10rpx;
}
.timeType {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.month-scroll {
width: 100%;
white-space: nowrap;
background: #fff;
}
.month-container {
display: flex;
padding: 40rpx 20rpx 20rpx 20rpx;
}
.month-item {
box-sizing: border-box;
padding: 20rpx 20rpx;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 111rpx;
height: 64rpx;
margin: 0 10rpx;
border-radius: 364rpx;
position: relative;
flex-shrink: 0;
}
.month-text {
font-size: 30rpx;
color: #333;
}
.month-item.selected {
background-color: #347BFF;
}
.month-item.selected .month-text {
color: #fff;
}
.month-item.disabled .month-text {
color: #ccc;
}
.empty-badge {
position: absolute;
top: 0;
right: 0;
background-color: #F24724;
color: #fff;
height: 32rpx;
line-height: 32rpx;
font-size: 22rpx;
padding: 2rpx 6rpx;
border-radius: 16rpx;
transform: translate(30%, -30%);
z-index: 10;
white-space: nowrap;
}
\ No newline at end of file
Component({
properties: {
year: {
type: Number,
value: new Date().getFullYear()
},
month: {
type: Number,
value: new Date().getMonth() + 1
},
selectedWeek: {
type: Number,
value: 1
},
weekList: {
type: Array,
value: [] // 数组结构:{ week: 1, label: '12月第1周', disabled: false, hasSubmit: true }
}
},
data: {
showNextMonth: true
},
observers: {
'year, month': function(year, month) {
const now = new Date();
const currentYear = now.getFullYear();
const currentMonth = now.getMonth() + 1;
let showNextMonth = true;
if (year > currentYear) {
showNextMonth = false;
} else if (year === currentYear && month >= currentMonth) {
showNextMonth = false;
}
this.setData({
showNextMonth
});
}
},
methods: {
lastMonth() {
this.triggerEvent('lastMonth')
},
nextMonth() {
this.triggerEvent('nextMonth')
},
itemClick(e) {
const { week, disabled } = e.currentTarget.dataset
if (disabled) return
this.triggerEvent('weekClick', { week: week })
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="line"></view>
<view class="row year-select">
<view class="row last-year" bindtap="lastMonth">
<gl-image class="icon left" src="{{ '/miniProgram/arrow-left.png' }}" webp></gl-image>
<view>上个月</view>
</view>
<view class="timeType">{{year}}-{{month < 10 ? '0' + month : month}}</view>
<view class="row next-year" bindtap="nextMonth" style="visibility: {{showNextMonth ? 'visible' : 'hidden'}}">
<!-- 下一个月 -->
<view style="">下个月</view>
<gl-image class="icon right" src="{{ '/miniProgram/arrow-right.png' }}" webp></gl-image>
</view>
</view>
<scroll-view class="month-scroll" scroll-x="{{true}}" scroll-into-view="week-{{selectedWeek > 1 ? selectedWeek - 1 : 0}}">
<view class="month-container">
<block wx:for="{{weekList}}" wx:key="index">
<view
id="week-{{index}}"
class="month-item {{item.week == selectedWeek ? 'selected' : ''}} {{item.disabled ? 'disabled' : ''}}"
bindtap="itemClick"
data-index="{{index}}"
data-week="{{item.week}}"
data-disabled="{{item.disabled}}"
>
<view class="month-text">{{item.label}}</view>
<view class="empty-badge" wx:if="{{!item.hasSubmit && !item.disabled}}">空</view>
</view>
</block>
</view>
</scroll-view>
\ No newline at end of file
.row {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
background: #fff;
}
.line {
height: 1rpx;
width: 100%;
background-color: gainsboro;
}
.year-select {
height: 80rpx;
flex-direction: row;
justify-content: space-between;
padding: 0 30rpx;
}
.last-year,
.next-year {
flex-direction: row;
font-size: 28rpx;
color: #181A1F;
align-items: center;
}
.icon {
width: 36rpx;
height: 36rpx;
}
.left {
margin-right: 10rpx;
}
.left {
margin-left: 10rpx;
}
.right {
margin-right: 10rpx;
}
.timeType {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #181A1F;
width: 280rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
border-radius: 20px;
background: #f2f3f5;
}
.month-scroll {
width: 100%;
white-space: nowrap;
background: #fff;
padding-top: 12rpx;
/* padding: 30rpx 0; */
}
.month-container {
display: flex;
padding: 15rpx 30rpx 30rpx 30rpx;
}
.month-item {
box-sizing: border-box;
padding: 10rpx 20rpx;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
/* width: 160rpx; */
min-width: 180rpx;
height: 64rpx;
margin: 0 10rpx;
border-radius: 364rpx;
position: relative;
flex-shrink: 0;
}
.month-text {
font-size: 28rpx;
color: #292D33;
}
.month-item.selected {
background-color: #347BFF;
}
.month-item.selected .month-text {
color: #fff;
}
.month-item.disabled .month-text {
color: #BEC1C7;
}
.empty-badge {
position: absolute;
top: 0;
right: 0;
background-color: #F24724;
color: #fff;
height: 32rpx;
line-height: 32rpx;
font-size: 22rpx;
padding: 2rpx 6rpx;
border-radius: 16rpx;
transform: translate(30%, -30%);
z-index: 10;
white-space: nowrap;
}
\ No newline at end of file
// 日报/周报/月报 首次填写,默认填入的字段数据结构
export const reportFirstAutoObj = {
/** 1.1轻改区域日报模版 */
'qinggai-temp-001': {
/** 精品升级 - 角色 userInfo.userType == 2 && !(userInfo.isSuper|| userInfo.loginRole ==3),取值valueObj
* 精品升级 - 其余角色,取值valueObj
* 权益 - 取值valueObj
* */
list: [{
attrName: 'todayRegionalTotalOutput',
// 今日产值
valueObj: 'staffTodayTotal',
ortherValueObj: 'merchantTodayTotal',
}, {
attrName: 'monthRegionalTotalOutput',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}],
},
/** 2.3延保区域日报模版 */
'uuid-temp-001': {
list: [{
attrName: 'dailyCumulativeAchievement',
// 今日产值
valueObj: 'staffTodayTotal',
ortherValueObj: 'merchantTodayTotal',
}, {
attrName: 'monthlyCumulativeAchievement',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.1权益区域日报模版 */
'uuid-temp-011': {
list: [{
attrName: 'dailyCumulativeAchievement',
// 今日产值
valueObj: 'staffTodayTotal',
ortherValueObj: 'merchantTodayTotal',
}, {
attrName: 'monthlyCumulativeAchievement',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.1区域经理周报模版 */
'uuid-temp-012': {
list: [{
attrName: 'monthlyStoreCumulativeAchievement012',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 1.1区域经理周报模版 */
'uuid-temp-013': {
list: [{
attrName: 'monthlyStoreCumulativeAchievement013',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.3区域经理周报模版 */
'uuid-temp-014': {
list: [{
attrName: 'monthlyStoreCumulativeAchievement014',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.1运营主管周报模版 */
'uuid-temp-015': {
list: [{
attrName: 'monthlyOutput015',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 1.1运营主管周报模版 */
'uuid-temp-016': {
list: [{
attrName: 'monthlyOutput016',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.3运营主管周报模版 */
'uuid-temp-017': {
list: [{
attrName: 'monthlyOutput017',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 1.1区域经理月报模版 */
'uuid-temp-018': {
list: [{
attrName: 'actualAchievement018',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.1区域经理月报模版 */
'uuid-temp-019': {
list: [{
attrName: 'actualAchievement019',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.3区域经理月报模版 */
'uuid-temp-020': {
list: [{
attrName: 'actualAchievement020',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.1运营主管月报模版 */
'uuid-temp-021': {
list: [{
attrName: 'monthlyOutput021',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 1.1运营主管月报模版 */
'uuid-temp-022': {
list: [{
attrName: 'monthlyOutput022',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
},
/** 2.3运营主管月报模版 */
'uuid-temp-023': {
list: [{
attrName: 'monthlyOutput023',
// 本月产值
valueObj: 'staffMonthTotal',
ortherValueObj: 'merchantMonthTotal',
}]
}
}
\ No newline at end of file
......@@ -3,6 +3,8 @@
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"weekCalendar": "../staffDaily/components/weekCalendar/weekCalendar",
"monthCalendar": "./components/monthCalendar/monthCalendar",
"weeklyCalendar": "./components/weeklyCalendar/weeklyCalendar",
"select-item-popup": "../staffDaily/components/selectItemPopup/selectItemPopup",
"select-popup": "./components/selectPopup/selectPopup"
}
......
......@@ -59,11 +59,11 @@ const scrmSecretKey_items = {
const domain_items = {
ip: {
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明
dj: 'http://192.168.1.117:8292', //叶立庆
// dj: "http://192.168.1.86:8594", //蔡远明
// dj: 'http://192.168.1.104:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭
dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!