Commit f092741e by zhangxw

二手车

1 parent 9f556bfe
Showing 56 changed files with 2514 additions and 136 deletions
...@@ -454,5 +454,9 @@ module.exports = { ...@@ -454,5 +454,9 @@ module.exports = {
// 学习中心-短课程详情 // 学习中心-短课程详情
getShortCourseDetail(data) { getShortCourseDetail(data) {
return api.post('dj.pad.api.staff.study.short.course.detail', data, [], '/rop-dj-pad/router') return api.post('dj.pad.api.staff.study.short.course.detail', data, [], '/rop-dj-pad/router')
},
// 上传视频文件返回封面
uploadFileWithCover(data) {
return api.post('dj.api.smartcarlife.common.uploadVideo.returnWithCover', data, ['file'])
} }
} }
let modalQueue = []
import api from '~/api/api.js'
import {
checkUsedCarStaffIsNew,
checkUsedCarStaffDailyReportValid
} from '~/packageUsedCar/secondHandApi'
let eventRequest = []
const initModal = () => {
if (getCurrentPages().length > 0) {
const currentPage = getCurrentPages()[getCurrentPages().length - 1]
let customModal = currentPage.selectComponent('#customModal')
return customModal
}
}
const checkDailyReport = async sceneType => {
let userInfo = wx.$util.getUserInfo()
// debugger
// 判读是否要填写日报
if (
!(
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo?.loginRole == 6
)
) {
// 非二手车业务场景 判断员工是否已打卡上班
if (sceneType != 7) eventRequest.push(clockedIntoWork())
eventRequest.push(
sceneType
? sceneType == 7
? usedCarStaffDailyReport(userInfo)
: equityStaffDailyReport(userInfo)
: staffDailyReport(userInfo)
)
}
return new Promise(resolve => {
Promise.all(eventRequest).then(results => {
// const [reportStatus] = results;
results = results.slice(-2)
// console.log(reportStatus, results, results.length, results[results.length - 1], 'reportStatus');
let resultFlag = results.some(item => item)
showNextModal()
console.log(resultFlag, 'resultFlag')
resolve(resultFlag)
})
})
}
const showNextModal = () => {
let _this = this
if (modalQueue.length > 0) {
const modalInfo = modalQueue.pop()
if (wx.__HAS_SHOW_MODAL) return
wx.__HAS_SHOW_MODAL = true
wx.showModal({
title: modalInfo.title,
content: modalInfo.content,
showCancel: modalInfo.showCancel,
cancelColor: '#292D33',
confirmText: modalInfo.confirmText,
confirmColor: '#347BFF',
success: function (res) {
wx.__HAS_SHOW_MODAL = false
// if (res.cancel) _this.showNextModal();
if (res.cancel) showNextModal()
modalInfo.eventCallback(res)
}
})
}
}
const staffDailyReport = userInfo => {
return new Promise((resolve, reject) => {
api
.staffDailyReportMerchantValid({
merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid,
sceneType: 1
})
.then(res => {
if (res.data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
if (wx.__HAS_NOTLOGIN_MODAL) return false
addModalToQueue(
'日报提醒',
'您有未填写的日报,请点击前往。',
'前往填写',
false,
2,
res => {
if (res.confirm) {
wx.$router.go('tabWorkOrder.upgradeStaffDaily', {
reportDate: formattedDate
})
}
}
)
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve()
console.log(err)
})
})
}
const equityStaffDailyReport = userInfo => {
return new Promise((resolve, reject) => {
api
.staffDailyReportMerchantValid({
merchantId: userInfo?.shopMerchantId,
yqMerchantId: userInfo?.merchantId,
staffUuid: userInfo?.uuid,
sceneType: 0
})
.then(res => {
if (res.data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
console.log(previousDate, 'previousDate')
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
console.log('formattedDate', formattedDate)
if (
wx.__HAS_NOTLOGIN_MODAL ||
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo?.loginRole == 6
)
return false
addModalToQueue(
'日报提醒',
'您有未填写的日报,请点击前往。',
'前往填写',
false,
4,
res => {
if (res.confirm) {
wx.$router.go('tabWorkOrder.staffDaily', {
reportDate: formattedDate
})
}
}
)
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve(false)
})
})
}
const usedCarStaffDailyReport = userInfo => {
return new Promise(async (resolve, reject) => {
const res = await checkUsedCarStaffIsNew({
merchantId: userInfo?.shopMerchantId,
yqMerchantId: userInfo?.merchantId,
staffUuid: userInfo?.uuid,
staffPhone: userInfo?.phone,
sceneType: 7
})
if (!res?.data) {
resolve(false)
} else {
const _data = await checkUsedCarStaffDailyReportValid({
sellerMerchantId: userInfo?.shopMerchantId
}) //true 已填写 false 未填写
if (!_data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
addModalToQueue(
'日报提醒',
'您有未填写的日报,请点击前往。',
'前往填写',
false,
4,
res => {
if (res.confirm) {
wx.navigateTo({
url: `/packageUsedCar/pages/indexPage/dailyReport/dailyReport?currentDate=${formattedDate}`
})
}
}
)
resolve(true)
} else resolve(false)
}
})
}
const clockedIntoWork = userInfo => {
return new Promise((resolve, reject) => {
api
.clockInConfigPhone({})
.then(res => {
let { need, clockIn } = res.data
// console.log(res, need == 0 && clockIn == 0, "clockInConfigPhone");
// 已配置未打卡
if (need == 1 && clockIn == 0) {
// 有配置并且没有打卡就提示
addModalToQueue(
'打卡提醒',
'您当前企微未打卡,无法录单,请前往企微打卡后再试,如有异议请联系管理员。',
'知道了',
false,
4,
res => {
if (res.confirm) {
// wx.$router.go("tabWorkOrder.staffDaily", {
// // reportDate: formattedDate,
// });
}
}
)
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve(false)
})
})
}
const addModalToQueue = (
title,
content,
confirmText,
showCancel,
priority,
eventCallback
) => {
if (modalQueue.findIndex(val => val.content == content) < 0)
modalQueue.push({
title,
content,
confirmText,
showCancel,
priority,
eventCallback
})
modalQueue.sort((a, b) => a.priority - b.priority)
}
// 学习中心 开单限制
const checkStudyTask = () => {
return new Promise((resolve, reject) => {
wx.showLoading()
api.checkStudyTaskAPI().then(res => {
wx.hideLoading()
const modal = initModal()
if (modal && res.data.lockOrder) {
modal.open({
title: '未完成学习任务,暂不能开单',
type: 'permission',
btnText: '去往学习中心',
customContent:
res.data?.lockReason == '0' ? '我的课程-待学习' : '我的任务'
})
}
resolve(res.data.lockOrder)
})
})
}
export {
checkDailyReport,
staffDailyReport,
addModalToQueue,
usedCarStaffDailyReport,
checkStudyTask
}
// export { checkDailyReport, staffDailyReport, addModalToQueue, checkStudyTask };
import { newApi } from "~/api/secondHandApi"; import { newApi } from "~/packageUsedCar/secondHandApi";
module.exports = { module.exports = {
/** 获取首页统计数据 */ /** 获取首页统计数据 */
getdataBoard(data) { getdataBoard(data) {
...@@ -285,7 +285,7 @@ module.exports = { ...@@ -285,7 +285,7 @@ module.exports = {
/** /**
* 客户确认提车 * 客户确认提车
*/ */
confirmDelivery(data) { deliveryConfirmDelivery(data) {
return newApi.post("/deliveryOrderManage/confirmDelivery", data, { return newApi.post("/deliveryOrderManage/confirmDelivery", data, {
returnAll: true, returnAll: true,
}); });
...@@ -320,4 +320,8 @@ module.exports = { ...@@ -320,4 +320,8 @@ module.exports = {
carLicenseOcr(data) { carLicenseOcr(data) {
return newApi.post(`/evalOrder/carLicenseOcr`, data, { returnAll: true }); return newApi.post(`/evalOrder/carLicenseOcr`, data, { returnAll: true });
}, },
// 撤回合同
revokeSaleContract (data) {
return newApi.post('/evalOrder/revokeSaleContract', data, { returnAll: true })
}
}; };
// packageUsedCar/pages/deliveryNote/components/DeliverySteps/DeliverySteps.js
Component({
/**
* 组件的属性列表
*/
properties: {
detail: {
type: Object,
observer: function(v) {
this.setData({
step: Number(v.orderStatus) + 1
})
}
}
},
/**
* 组件的初始数据
*/
data: {
step: -1,
stepList: [
'待交付',
'交付中',
'交付完成'
],
},
/**
* 组件的方法列表
*/
methods: {
onConfirm(e) {
let { detail } = this.data
this.setData({
step: e.detail + 1
})
if (e.detail + 1 == 3) {
this.triggerEvent('confirm', {id: detail?.id})
}
},
onRefreshlog() {
this.triggerEvent('refreshlog')
},
openError(e) {
this.triggerEvent('openError', {message: e.detail})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"steps": "../steps/steps",
"step1": "../step1/step1",
"step2": "../step2/step2",
"step3": "../step3/step3"
}
}
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/DeliverySteps/DeliverySteps.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/deliveryNote/components/DeliverySteps/DeliverySteps.wxml-->
<view class="delivery-steps">
<steps step="{{step}}" list="{{stepList}}" />
<block wx:if="{{step == 1}}">
<step1 detail="{{detail}}" bindconfirm="onConfirm" bindrefreshlog="onRefreshlog" bindopenError="openError"></step1>
</block>
<block wx:if="{{step == 2}}">
<step2 detail="{{detail}}" bindconfirm="onConfirm" bindrefreshlog="onRefreshlog" bindopenError="openError"></step2>
</block>
<block wx:if="{{step == 3}}">
<step3 detail="{{detail}}"></step3>
</block>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
} }
.line { .line {
margin-top: 28rpx; margin: 28rpx 0;
width: 100%; width: 100%;
height: 2rpx; height: 2rpx;
background: #f7f7f6; background: #f7f7f6;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="value {{detail.paymentStatus == 1 ? 'success' : 'await'}}">{{PAYMENT_STATUS[detail.paymentStatus]}}</view> <view class="value {{detail.paymentStatus == 1 ? 'success' : 'await'}}">{{PAYMENT_STATUS[detail.paymentStatus]}}</view>
</view> </view>
<view wx:if="{{detail.paymentStatus != 1}}" class="tips"> <view wx:if="{{detail.paymentStatus != 1}}" class="tips">
<image src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/> <image class="icon" src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/>
中拍人现场看车后支付,请门店人员确认客户完成车款支付。 中拍人现场看车后支付,请门店人员确认客户完成车款支付。
</view> </view>
</view> </view>
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
<view wx:if="{{item.hasLine}}" class="line"></view> <view wx:if="{{item.hasLine}}" class="line"></view>
</view> </view>
<view wx:if="{{detail.paymentStatus != 1}}" class="tips"> <view wx:if="{{detail.paymentStatus != 1}}" class="tips">
<view class="icon"> <image class="icon" src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/>
<view class="icon-info">!</view>
</view>
交付专员需确认交付车辆信息,与买家信息无误后才可交付。 交付专员需确认交付车辆信息,与买家信息无误后才可交付。
</view> </view>
</view> </view>
......
// packageUsedCar/pages/deliveryNote/components/step1/step1.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import newApi from '~/packageUsedCar/api'
Component({
/**
* 组件的属性列表
*/
properties: {
// 当前步骤
step: {
type: [String, Number],
value: 1
},
// 详情数据
detail: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
isLoading: false, // 加载状态
deliveryTips: [
'核实车款: 引导客户现场完成尾款支付,并确认款项到账。',
'核验人车: 核对客户身份信息,并与客户共同确认车辆信息及实际车况。',
'交接资料: 清点并交付车辆登记证、行驶证、车钥匙等重要物品。',
'签署确认: 引导客户签署《车辆交付确认书》,完成交付流程。'
]
},
/**
* 组件生命周期
*/
lifetimes: {
attached: function() {
// 组件实例进入页面节点树时执行
console.log('delivery-step组件已加载')
}
},
/**
* 组件的方法列表
*/
methods: {
/**
* 确认到店按钮点击事件
*/
confirmArrive: async function() {
let { detail, step } = this.data
// 如果正在加载或禁用,直接返回
if (this.data.isLoading) {
return
}
// 埋点
wx.$track.setTrackData(0, 'delivery_arrive_shop', {}, '', 7)
wx.showLoading({
title: '加载中',
mask: true
})
// 设置加载状态
this.setData({
isLoading: true
})
try {
const result = await newApi.confirmArrive({deliveryOrderId: detail.deliveryOrderId})
console.log(result)
if (result.data.code == 0) {
// 成功回调
this.triggerEvent('confirm', step)
this.triggerEvent('refreshlog')
} else {
throw result.data.msg
}
} catch (error) {
this.triggerEvent('openError', error)
} finally {
wx.hideLoading()
this.setData({
isLoading: false
})
}
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/step1/step1.wxss */
.step-1 {
margin: 0 20rpx;
box-sizing: border-box;
}
/* 主信息区域 */
.item {
height: 144rpx;
border-radius: 16rpx;
background: #ffffff;
box-sizing: border-box;
padding: 0 32rpx;
display: flex;
align-items: center;
}
/* 图标样式 */
.icon-delivery-step-1 {
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.step-icon {
width: 80rpx;
height: 80rpx;
}
/* 信息区域 */
.info {
margin-left: 24rpx;
flex: 1;
.title {
color: #333333;
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
}
.des {
color: #666666;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
margin-top: 4rpx;
}
}
/* 按钮样式 */
.btn {
width: 192rpx;
height: 64rpx;
border-radius: 48rpx;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
font-size: 28rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
.btn:active {
opacity: 0.8;
}
.btn.loading {
opacity: 0.7;
}
.loading-text {
font-size: 26rpx;
}
/* 提示区域 */
.tips {
min-height: 272rpx;
border-radius: 16rpx;
background: #fef4e8;
box-sizing: border-box;
padding: 16rpx 16rpx 16rpx 56rpx;
color: #f59619;
font-size: 26rpx;
line-height: 44rpx;
position: relative;
.title {
font-weight: 700;
line-height: 36rpx;
margin-bottom: 12rpx;
display: flex;
align-items: center;
}
.icon {
position: absolute;
left: 16rpx;
top: 22rpx;
width: 32rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.text {
display: flex;
margin-bottom: 8rpx;
margin-left: -40rpx;
&:last-child {
margin-bottom: 0;
}
.label{
flex-shrink: 0;
width: 132rpx;
}
}
}
/* 公共样式 */
.flex {
display: flex;
align-items: center;
}
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/deliveryNote/components/step1/step1.wxml-->
<view class="step-1">
<!-- 主信息区域 -->
<view class="item flex">
<!-- 图标区域 - 替换为小程序图片或icon -->
<view class="icon-delivery-step-1">
<!-- 可以使用图片或icon -->
<image
src="{{IMG_URL}}usedCar/delivery-step-1.png"
class="step-icon"
mode="widthFix"
></image>
</view>
<!-- 信息区域 -->
<view class="info">
<text class="title">客户到店确认</text>
<view class="des">等待客户到店后操作</view>
</view>
<!-- 操作按钮 -->
<view
class="btn flex"
bind:tap="confirmArrive"
>
确认到店
</view>
</view>
<!-- 提示信息区域 -->
<view class="tips">
<view class="title flex">
<view class="icon">
<image src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/>
</view>
交付要点
</view>
<view class="text"><text class="label">核实车款:</text><text>引导客户现场完成尾款支付,并确认款项到账。</text></view>
<view class="text"><text class="label">核验人车:</text><text>核对客户身份信息,并与客户共同确认车辆信息及实际车况。</text></view>
<view class="text"><text class="label">交接资料:</text><text>清点并交付车辆登记证、行驶证、车钥匙等重要物品。</text></view>
<view class="text"><text class="label">签署确认:</text><text>引导客户签署《车辆交付确认书》,完成交付流程。</text></view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageUsedCar/pages/deliveryNote/components/step2/step2.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import newApi from '~/packageUsedCar/api'
import api from "~/api/api"
Component({
/**
* 组件的属性列表
*/
properties: {
// 当前步骤
step: {
type: [String, Number],
value: 2
},
// 详情数据
detail: {
type: Object,
value: {}
},
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
imgList: [], // 图片列表
remark: '', // 备注
MAX_IMG_COUNT: 10, // 最大图片数量
MAX_IMAGE_SIZE: 10 * 1024 * 1024 // 图片最大10MB
},
/**
* 组件的方法列表
*/
methods: {
/**
* 删除图片
*/
delImage: function(e) {
const index = e.currentTarget.dataset.index
let imgList = this.data.imgList
imgList.splice(index, 1)
this.setData({
imgList: imgList
})
},
/**
* 选择图片
*/
chooseImage: function() {
let _this = this
const { imgList, MAX_IMG_COUNT, MAX_IMAGE_SIZE } = _this.data
const count = MAX_IMG_COUNT - imgList.length
if (count <= 0) {
wx.showToast({
title: '最多只能上传10张图片',
icon: 'none'
})
return
}
wx.chooseMedia({
count: count,
sizeType: ['original'], // 选择图片为原图
mediaType: ['image'],
success(res) {
for (const file of res.tempFiles) {
if (file.size > MAX_IMAGE_SIZE) {
return wx.showToast({
title: '图片上传最大10MB',
icon: 'none'
})
}
}
_this.setData({
loadingFlag: true
})
wx.showLoading({
title: '上传中',
mask: true
})
const uploadImages = async (tempFiles) => {
try {
for (const item of tempFiles) {
const val = item.tempFilePath
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) {
imgList.push(data)
if (imgList?.length >= tempFiles.length) wx.hideLoading()
_this.setData({
imgList
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
_this.setData({
loadingFlag: false
})
}
}
uploadImages(res?.tempFiles)
}
})
},
/**
* 确认提车
*/
async comfirm() {
try {
const { imgList, step, remark, detail } = this.data
// 检查是否有图片
if (imgList.length === 0) {
wx.showToast({
title: '请上传交付照片',
icon: 'none'
})
return
}
// 拼接图片URL(用逗号分隔)
const confirmImages = imgList.join(',')
// 埋点
wx.$track.setTrackData(0, 'delivery_arrive_shop', {}, '', 7)
// 显示加载
wx.showLoading({
title: '提交中...',
mask: true
})
const res = await newApi.deliveryConfirmDelivery({
confirmImages,
deliveryOrderId: detail?.deliveryOrderId,
remark
})
console.log(res)
wx.hideLoading()
let { code, msg } = res.data
if (code == 0) {
this.triggerEvent('confirm', step)
this.triggerEvent('refreshlog')
} else {
throw msg
}
} catch (error) {
this.triggerEvent('openError', error)
}
},
/**
* 预览媒体
*/
previewMedia: function(e) {
const url = e.currentTarget.dataset.url
const type = e.currentTarget.dataset.type
// 预览图片
wx.previewImage({
current: url,
urls: this.data.imgList
})
},
/**
* 备注输入事件
*/
onRemarkInput: function(e) {
this.setData({
remark: e.detail.value
})
},
/**
* 重置组件数据(供外部调用)
*/
resetData: function() {
this.setData({
imgList: [],
remark: ''
})
},
/**
* 获取组件数据(供外部调用)
*/
getFormData: function() {
return {
imgList: this.data.imgList,
remark: this.data.remark
}
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/step2/step2.wxss */
.step-2 {
position: relative;
z-index: 2;
margin: 0 20rpx;
box-sizing: border-box;
}
/* 公共box样式 */
.box {
border-radius: 16rpx;
background: #ffffff;
margin-bottom: 24rpx;
padding: 0 32rpx;
box-sizing: border-box;
}
/* 标题样式 */
.box .title {
color: #292D33;
font-size: 28rpx;
font-weight: 500;
display: flex;
line-height: 40rpx;
padding-top: 28rpx;
}
.box .title .required {
color: #f24724;
font-size: 28rpx;
margin-left: 8rpx;
}
/* 上传区域 */
.upload-box .tips {
margin: 4rpx 0 28rpx;
color: #999EA8;
font-size: 26rpx;
line-height: 36rpx;
}
/* 图片列表 */
.img-list {
display: flex;
flex-wrap: wrap;
gap: 28rpx;
}
/* 上传按钮 */
.img-item.upload {
width: 196rpx;
height: 196rpx;
border-radius: 12rpx;
background: #F5F5F7;
flex-direction: column;
justify-content: center;
align-items: center;
color: #999EA8;
font-size: 24rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
}
.upload .icon {
font-weight: 700;
margin-bottom: 22rpx;
}
/* 图片项 */
.img-item {
width: 196rpx;
height: 196rpx;
border-radius: 12rpx;
position: relative;
overflow: hidden;
}
.img-item .img {
width: 100%;
height: 100%;
}
/* 删除按钮 */
.img-item .del {
position: absolute;
width: 32rpx;
height: 32rpx;
background: rgba(0, 0, 0, 0.5);
border-radius: 50%;
top: 8rpx;
right: 4rpx;
display: flex;
justify-content: center;
align-items: center;
}
/* 图片提示 */
.img-tips {
color: #999EA8;
font-size: 24rpx;
padding: 16rpx 0 28rpx;
line-height: 36rpx;
}
/* 备注区域 */
.remark-box {
padding-bottom: 28rpx;
}
.remark-box .title {
padding-bottom: 24rpx;
}
.remark {
height: 200rpx;
border-radius: 16rpx;
background: #FAFAFA;
box-sizing: border-box;
padding: 16rpx 24rpx;
position: relative;
}
.remark .textarea {
height: 132rpx;
width: 100%;
color: #333333;
font-size: 28rpx;
line-height: 40rpx;
}
.remark .limit {
position: absolute;
bottom: 8rpx;
right: 8rpx;
color: #999EA8;
font-size: 28rpx;
line-height: 44rpx;
}
.placeholder {
color: #999EA8;
font-size: 28rpx;
}
/* 按钮区域 */
.btn-box {
box-sizing: border-box;
padding: 24rpx 32rpx;
display: flex;
align-items: center;
}
/* 图标 */
.icon-delivery-step-2 {
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.step-icon {
flex-shrink: 0;
width: 96rpx;
height: 96rpx;
}
/* 信息区域 */
.btn-box .info {
margin-left: 24rpx;
flex: 1;
}
.btn-box .info {
color: #292D33;
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
}
.btn-box .info .des {
color: #5A5E66;
font-size: 24rpx;
font-weight: 400;
line-height: 36rpx;
margin-top: 4rpx;
}
/* 按钮 */
.btn-box .btn {
width: 168rpx;
height: 64rpx;
border-radius: 48rpx;
background: #347BFF;
color: #ffffff;
font-size: 28rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
.btn-box .btn.disabled {
background: #347bff80;
}
/* 底部间距 */
.block {
width: 100%;
height: 24rpx;
}
/* 公共flex类 */
.flex {
display: flex;
align-items: center;
}
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/deliveryNote/components/step2/step2.wxml-->
<view class="step-2">
<!-- 上传图片区域 -->
<view class="upload-box box">
<view class="title">
交付照片
<view class="required">*</view>
</view>
<view class="tips">完成交付图片上传,拍摄需包含车辆图片(铭牌、45%角)、提车人照片,及提车人身份证照片。</view>
<!-- 图片列表 -->
<view class="img-list flex">
<!-- 上传按钮 -->
<block wx:if="{{imgList.length < 10}}">
<view class="img-item upload flex" bind:tap="chooseImage">
<image class="icon" src="{{IMG_URL}}zy-upload_icon.png" mode=""/>
{{ imgList.length }}/10
</view>
</block>
<!-- 图片展示 -->
<block wx:for="{{imgList}}" wx:key="index">
<view class="img-item">
<image
src="{{item}}"
class="img"
mode="aspectFill"
bind:tap="previewMedia"
data-url="{{item}}"
data-type="1"
></image>
<view class="del flex" bind:tap="delImage" data-index="{{index}}">
<image src="{{IMG_URL}}zy_paf_del_icon.png" mode=""/>
</view>
</view>
</block>
</view>
<view class="img-tips">*单个文件不超过10M,最多可上传10张。</view>
</view>
<!-- 备注区域 -->
<view class="remark-box box">
<view class="title">交付备注</view>
<view class="remark">
<textarea
placeholder="请描述交付过程备注信息"
placeholder-class="placeholder"
value="{{remark}}"
bind:input="onRemarkInput"
maxlength="200"
class="textarea"
></textarea>
<view class="limit">{{ remark.length }}/200</view>
</view>
</view>
<!-- 按钮区域 -->
<view class="btn-box box flex">
<!-- 图标区域 -->
<view class="icon-delivery-step-2">
<image
src="{{IMG_URL}}usedCar/delivery-step-2.png"
class="step-icon"
mode="widthFix"
></image>
</view>
<view class="info">
客户提车确认
<view class="des">请让客户在拍卖小程序完成交割单签署,签署完成后才可点击确认提车。</view>
</view>
<view
class="btn flex {{imgList.length === 0 ? 'disabled' : ''}}"
bind:tap="comfirm"
>
确认提车
</view>
</view>
<view class="block"></view>
</view>
\ No newline at end of file \ No newline at end of file
// packageUsedCar/pages/deliveryNote/components/step3/step3.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
// 当前步骤
step: {
type: [String, Number],
value: 3
},
// 详情数据
detail: {
type: Object,
value: {},
observer: function(newVal) {
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL
},
/**
* 组件生命周期
*/
lifetimes: {
attached: function() {
},
ready: function() {
// 组件布局完成后执行
this._initData()
}
},
/**
* 组件的方法列表
*/
methods: {
/**
* 初始化数据
*/
_initData: function() {
const detail = this.properties.detail
// 确保有默认值
const defaultDetail = {
imgList: [],
remark: '-',
pickUpTime: '--',
...detail
}
// 如果detail没有这些属性,设置默认值
if (!detail.imgList) {
this.setData({
'detail.imgList': defaultDetail.imgList
})
}
if (!detail.remark) {
this.setData({
'detail.remark': defaultDetail.remark
})
}
},
/**
* 预览图片
*/
previewMedia: function(e) {
const url = e.currentTarget.dataset.url
const imgList = this.data.detail.imgList || []
if (url && imgList.length > 0) {
// 预览图片
wx.previewImage({
current: url, // 当前显示图片的http链接
urls: imgList // 需要预览的图片http链接列表
})
}
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/step3/step3.wxss */
.step-3 {
margin: 0 20rpx;
box-sizing: border-box;
}
/* 公共box样式 */
.box {
border-radius: 16rpx;
background: #ffffff;
margin-bottom: 24rpx;
padding: 0 32rpx;
box-sizing: border-box;
}
/* 标题样式 */
.box .title {
color: #333333;
font-size: 28rpx;
font-weight: 500;
display: flex;
line-height: 40rpx;
padding-top: 28rpx;
}
/* 上传区域 */
.upload-box {
padding-bottom: 28rpx;
}
.upload-box .title {
margin-bottom: 28rpx;
}
/* 图片列表 */
.img-list {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.img-item {
width: 224rpx;
height: 224rpx;
border-radius: 12rpx;
position: relative;
overflow: hidden;
}
.img-item .img {
width: 100%;
height: 100%;
}
/* 备注区域 */
.remark-box {
padding-bottom: 28rpx;
}
.remark-box .remark {
margin-top: 24rpx;
max-height: 220rpx;
box-sizing: border-box;
color: #333333;
font-size: 28rpx;
overflow-y: auto;
line-height: 44rpx;
word-break: break-all;
}
.placeholder {
color: #999999;
font-size: 28rpx;
}
/* 按钮区域 */
.btn-box {
box-sizing: border-box;
height: 144rpx;
margin-bottom: 0;
display: flex;
align-items: center;
}
/* 图标 */
.icon-delivery-step-2 {
flex-shrink: 0;
width: 96rpx;
height: 96rpx;
display: flex;
align-items: center;
justify-content: center;
}
.step-icon {
flex-shrink: 0;
width: 96rpx;
height: 96rpx;
}
/* 信息区域 */
.btn-box .info {
margin-left: 24rpx;
flex: 1;
}
.btn-box .info {
color: #333333;
font-size: 28rpx;
font-weight: 500;
line-height: 40rpx;
}
.btn-box .info .des {
color: #666666;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
margin-top: 4rpx;
}
/* 按钮 */
.btn-box .btn {
width: 168rpx;
height: 64rpx;
border-radius: 48rpx;
color: #999ea8;
background: #f0f1f5;
font-size: 28rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
/* 公共flex类 */
.flex {
display: flex;
align-items: center;
}
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/deliveryNote/components/step3/step3.wxml-->
<view class="step-3">
<!-- 图片展示区域 -->
<view class="upload-box box">
<view class="title">交付照片</view>
<view class="img-list flex">
<block wx:for="{{detail.imgList}}" wx:key="index">
<view class="img-item">
<image
src="{{item}}"
class="img"
mode="aspectFill"
bind:tap="previewMedia"
data-url="{{item}}"
data-type="1"
></image>
</view>
</block>
</view>
</view>
<!-- 备注区域 -->
<view class="remark-box box">
<view class="title">交付备注</view>
<view class="remark">
<rich-text nodes="{{detail.remark || '-'}}"></rich-text>
</view>
</view>
<!-- 按钮区域 -->
<view class="btn-box box flex">
<!-- 图标 -->
<view class="icon-delivery-step-2">
<image
src="{{IMG_URL}}usedCar/delivery-step-2.png"
class="step-icon"
mode="widthFix"
></image>
</view>
<view class="info">
客户提车确认
<view class="des">提车时间:{{detail.pickUpTime || '--'}}</view>
</view>
<view class="btn flex">已提车</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageUsedCar/pages/deliveryNote/components/steps/steps.js
Component({
/**
* 组件的属性列表
*/
properties: {
list: Array,
step: {
type: Number,
observer: function(v) {
this.setData({
stepNum: v - 1
})
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"van-icon": "@vant/weapp/icon/index"
}
}
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/steps/steps.wxss */
.steps-box {
padding: 20rpx 0 24rpx 54rpx;
margin-bottom: 8rpx;
display: flex;
.step-item {
color: #999;
font-size: 28rpx;
font-weight: 500;
height: 56rpx;
display: flex;
align-items: center;
.serial-num {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
border-radius: 50%;
box-sizing: border-box;
margin-right: 12rpx;
position: relative;
border: 4rpx solid #b1b1b1;
display: flex;
justify-content: center;
align-items: center;
.num {
flex-shrink: 0;
width: 100%;
height: 100%;
border: 3rpx solid #fff;
background: #b1b1b1;
color: #fff;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-weight: 700;
}
}
.line {
width: 32rpx;
border-top: 2rpx dashed #d6d6d6;
border-bottom: 2rpx dashed #d6d6d6;
margin: 0 16rpx;
height: 0;
}
&.active-item {
color: #347BFF;
.serial-num {
border-color: #347BFF;
box-shadow: 4rpx 4rpx 4rpx #d7e3ff;
.num {
background: #347BFF;
}
}
.line {
border-color: #347BFF;
}
}
}
}
/* flex 工具类 */
.flex {
display: flex;
align-items: center;
}
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/deliveryNote/components/steps/steps.wxml-->
<view class="steps-box flex common-title">
<block wx:for="{{list}}" wx:key="index">
<view
class="step-item flex {{index <= stepNum ? 'active-item' : ''}}"
>
<!-- 连接线(不是第一个元素时显示) -->
<block wx:if="{{index != 0}}">
<view class="line"></view>
</block>
<!-- 序号圆圈 -->
<view class="serial-num flex">
<view class="num flex">
<block wx:if="{{index >= stepNum}}">
{{index + 1}}
</block>
<block wx:if="{{index < stepNum}}">
<van-icon name="success" color="#FFFFFF" size="12"></van-icon>
</block>
</view>
</view>
<!-- 步骤文字 -->
{{item}}
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -70,8 +70,44 @@ Page({ ...@@ -70,8 +70,44 @@ Page({
} }
}, },
handleConfirm(e) {
this.getDeliveryOrderDetail(e.detail?.id)
},
handleRefreshlog() {
this.selectComponent('#detailInfo') && this.selectComponent('#detailInfo').getDeliveryOrderOpLog()
},
handleOpenError(e) {
let { message } = e.detail
wx.showModal({
title: '提示',
content: message,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF',
complete: (res) => {
}
})
},
back() { back() {
wx.navigateBack() let { detail } = this.data
if (detail.orderStatus != 2) {
wx.showModal({
title: '提示',
content: '当前交付未完成,退出将不保留当前信息。',
confirmText: '确认退出',
confirmColor: '#347BFF',
complete: (res) => {
if (res.confirm) {
wx.navigateBack()
}
}
})
} else {
wx.navigateBack()
}
}, },
/** /**
......
{ {
"usingComponents": { "usingComponents": {
"detail-info": "../components/DetailInfo/DetailInfo" "detail-info": "../components/DetailInfo/DetailInfo",
"delivery-steps": "../components/DeliverySteps/DeliverySteps"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="changeTab" data-index="{{index}}">{{item}}</view> <view class="tab-item {{tabIndex == index ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="changeTab" data-index="{{index}}">{{item}}</view>
</view> </view>
<scroll-view scroll-y class="content-box"> <scroll-view scroll-y class="content-box">
<block wx:if="{{tabIndex == 0}}"> <view hidden="{{tabIndex != 0}}">
<detail-info detail="{{detail}}"></detail-info> <detail-info id="detailInfo" detail="{{detail}}"></detail-info>
</block> </view>
<block wx:else> <view hidden="{{tabIndex == 0}}">
<delivery-steps detail="{{detail}}" bindconfirm="handleConfirm" bindrefreshlog="handleRefreshlog" bindopenError="handleOpenError" />
</block> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -54,7 +54,7 @@ Component({ ...@@ -54,7 +54,7 @@ Component({
// 搜索清空 // 搜索清空
handleReset() { handleReset() {
this.setData({ this.setData({
keyword: '' searchText: ''
}, () => { }, () => {
this.search() this.search()
}) })
...@@ -64,7 +64,6 @@ Component({ ...@@ -64,7 +64,6 @@ Component({
searchText: '' searchText: ''
}, () => { }, () => {
this.searchConfirm() this.searchConfirm()
this.getStatByStatus()
}) })
}, },
async getStatByStatus() { async getStatByStatus() {
...@@ -98,6 +97,7 @@ Component({ ...@@ -98,6 +97,7 @@ Component({
flag: false, flag: false,
}, () => { }, () => {
this.getList(true) this.getList(true)
this.getStatByStatus()
}) })
}, },
searchScreen(e) { searchScreen(e) {
......
...@@ -60,25 +60,25 @@ ...@@ -60,25 +60,25 @@
} }
} }
.search { .search {
width: calc(96 / 750 * 100%); width: calc(98 / 750 * 100%);
height: 100%; height: 100%;
color: #666; color: #666;
margin-left: auto; margin-left: var(--fontSize22);
flex-shrink: 0; flex-shrink: 0;
.text-center { .text-center {
font-size: var(--fontSize28); font-size: var(--fontSize28);
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
width: 100%; width: 100%;
height: var(--fontSize50); height: var(--fontSize50);
color: #888; color: #292D33;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.search-filter { .search-filter {
margin-left: var(--fontSize6); margin-left: var(--fontSize4);
width: var(--fontSize24); width: var(--fontSize32);
height: var(--fontSize24); height: var(--fontSize32);
} }
} }
} }
......
...@@ -3,19 +3,19 @@ ...@@ -3,19 +3,19 @@
<view class="bg"></view> <view class="bg"></view>
<view class="to-box"> <view class="to-box">
<view class="search-box"> <view class="search-box">
<view class="search-input" style="width:{{ staffUuid?'100%':'' }}"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="请输入车型/客户姓名/联系方式" class="input" confirm-type="search" value="{{ searchText }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" /> <input type="text" placeholder="请输入车型/客户姓名/联系方式" class="input" confirm-type="search" value="{{ searchText }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ customerName }}"> <block wx:if="{{ searchText }}">
<view bindtap="handleReset" class="clearBtn"> <view bindtap="handleReset" class="clearBtn">
<image src="/images/clear.png" class="search-clear" /> <image src="/images/clear.png" class="search-clear" />
</view> </view>
</block> </block>
</view> </view>
<view class="search text-center" bindtap="showConfirm" wx:if="{{ !staffUuid }}"> <view class="search text-center" bindtap="showConfirm">
<view class="text-center"> <view class="text-center">
筛选 筛选
<image class="search-filter" src="/images/filter.png" /> <image class="search-filter" src="{{IMG_URL}}usedCar/filter.png" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -7,7 +7,17 @@ Component({ ...@@ -7,7 +7,17 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
selectedId: Number selectedObj: {
type: Object,
observer: function(v) {
console.log(v)
if (v) {
this.setData({
selected: v
})
}
}
}
}, },
/** /**
...@@ -16,7 +26,9 @@ Component({ ...@@ -16,7 +26,9 @@ Component({
data: { data: {
IMG_URL, IMG_URL,
listData: [], listData: [],
show: false copyListData: [],
show: false,
selected: {}
}, },
/** /**
...@@ -28,13 +40,72 @@ Component({ ...@@ -28,13 +40,72 @@ Component({
searchValue: '', searchValue: '',
show: true show: true
}) })
let { selected } = this.data
let res = await newApi.getCustodyAgreementList() let res = await newApi.getCustodyAgreementList()
console.log(res)
if (res.data.code == 0) { if (res.data.code == 0) {
res.data.data?.forEach(val => {
val.active = false
if (val.id == selected.id) val.active = true
})
this.setData({ this.setData({
listData: res.data.data || [] listData: res.data.data || [],
copyListData: res.data.data || []
}) })
} }
},
handleSearch(e) {
let { value } = e.detail
this.setData({
searchValue: value
})
let { copyListData } = wx.$util.deepClone(this.data)
let { selected } = this.data
if (!value) {
copyListData.map(i => {
i.active = false
if (selected.id == i.id) i.active = true
return i
})
this.setData({
listData: copyListData
})
} else {
let arr = []
copyListData.map(i => {
i.active = false
if (selected.id == i.id) i.active = true
if (i.name.indexOf(value) != -1 || i.phone == value) {
arr.push(i)
}
})
this.setData({
listData: arr
})
}
},
choose(e) {
let { item } = e.currentTarget.dataset
console.log(item)
let { listData } = this.data
listData?.forEach(val => {
val.active = false
if (val.id == item.id) val.active = true
})
this.setData({
listData,
selected: item
})
},
confirm() {
let { selected } = this.data
if (!selected.id) return wx.$util.showToast('请选择代保管人员')
this.setData({show: false})
this.triggerEvent('confirm', selected)
},
cancel() {
this.setData({
show: false
})
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/evaluationForm/components/AgreementListPopup/AgreementListPopup.wxss */ /* packageUsedCar/pages/evaluationForm/components/AgreementListPopup/AgreementListPopup.wxss */
.container { .container {
height: 100%; height: 100%;
margin: 0 -32rpx;
.list { .list {
padding: 0 var(--fontSize32); margin: 0 32rpx;
height: calc(100% - 104rpx); height: calc(100% - 104rpx);
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: calc(100% - 64rpx);
.box { .box {
} }
...@@ -17,6 +18,28 @@ ...@@ -17,6 +18,28 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-top: var(--fontSize2) solid #EFF0F2; border-top: var(--fontSize2) solid #EFF0F2;
&.active {
color: #347BFF;
}
.active-icon {
width: 32rpx;
height: 32rpx;
}
.split {
margin: 0 8rpx;
}
}
}
.nothing {
height: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
.empty-icon {
width: 228rpx;
height: 158rpx;
margin-bottom: 16rpx;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/evaluationForm/components/AgreementListPopup/AgreementListPopup.wxml--> <!--packageUsedCar/pages/evaluationForm/components/AgreementListPopup/AgreementListPopup.wxml-->
<popup show="{{show}}" title="代保管人员" bindconfirm="confirm" bindcancel="cancel"> <popup show="{{show}}" title="代保管人员" bindconfirm="confirm" bindcancel="cancel">
<view class="container"> <view class="container">
<search-input bindsearch="handleSearch" value="{{searchValue}}"></search-input> <search-input bindsearch="handleSearch" value="{{searchValue}}" placeholder="搜索"></search-input>
<scroll-view class="list" scroll-y enhanced="{{true}}" show-scrollbar="false"> <scroll-view class="list" scroll-y enhanced="{{true}}" show-scrollbar="false">
<block wx:if="{{listData.length > 0}}"> <block wx:if="{{listData.length > 0}}">
<block wx:for="{{listData}}" wx:key="index"> <block wx:for="{{listData}}" wx:key="index">
<view class="box"> <view class="box">
<view class="item {{i.active?'active':''}}" bindtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}"> <view class="item {{item.active?'active':''}}" bindtap="choose" data-index="{{index}}" data-item="{{item}}">
<view class="text-hide"> <view class="text-hide">
{{item.name}}<text wx:if="{{item.name && item.phone}}" class="split">|</text>{{item.phone}} {{item.name}}<text wx:if="{{item.name && item.phone}}" class="split">|</text>{{item.phone}}
</view> </view>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</block> </block>
<block wx:else> <block wx:else>
<view class="nothing"> <view class="nothing">
<image src="{{IMG_URL}}usedCar/add-btn.png" mode=""/> <image class="empty-icon" src="{{IMG_URL}}usedCar/empty-icon.png" mode=""/>
暂无数据</view> 暂无数据</view>
</block> </block>
</scroll-view> </scroll-view>
......
...@@ -13,6 +13,9 @@ Component({ ...@@ -13,6 +13,9 @@ Component({
}, },
paymentType: { paymentType: {
type: Number type: Number
},
previousStatus: {
type: Number
} }
}, },
...@@ -31,9 +34,9 @@ Component({ ...@@ -31,9 +34,9 @@ Component({
let { type, setTrack } = e.currentTarget.dataset let { type, setTrack } = e.currentTarget.dataset
this.triggerEvent('buttonClick', {type}) this.triggerEvent('buttonClick', {type})
// 埋点 // 埋点
// if (setTrack) { if (setTrack) {
// wx.$track.setTrackData(0, setTrack, {}, '', 7) wx.$track.setTrackData(0, setTrack, {}, '', 7)
// } }
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -2,14 +2,16 @@ ...@@ -2,14 +2,16 @@
<view class="button-module flex"> <view class="button-module flex">
<view class="common-btn" catch:tap="handleClick" data-type="details">详情</view> <view class="common-btn" catch:tap="handleClick" data-type="details">详情</view>
<view wx:if="{{!subStatus && status != 100 && status != '-1'}}" class="common-btn ml-24" catch:tap="handleClick" data-type="edit">编辑</view> <view wx:if="{{!subStatus && status != 100 && status != '-1'}}" class="common-btn ml-24" catch:tap="handleClick" data-type="edit">编辑</view>
<view wx:if="{{status == 20 && !subStatus}}" class="common-btn ml-24" catch:tap="handleClick" data-type="requote">重新报价</view> <view wx:if="{{status == 20 && !subStatus}}" class="common-btn ml-24" catch:tap="handleClick" data-type="requote" data-setTrack="evaluate_requote">重新报价</view>
<view wx:if="{{status == 20 && !subStatus}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="requote" data-setTrack="evalute_sign">客户签约</view> <view wx:if="{{status == 20 && !subStatus}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="sign" data-setTrack="evalute_sign">客户签约</view>
<view wx:if="{{status == 20 && subStatus == 1}}" class="common-btn gray-btn ml-24" catch:tap="handleClick" data-type="signing">签约中</view> <view wx:if="{{status == 20 && subStatus == 1}}" class="common-btn ml-24" catch:tap="handleClick" data-type="contract">撤回合同</view>
<view wx:if="{{subStatus == 1}}" class="common-btn gray-btn ml-24" catch:tap="handleClick" data-type="signing">签约中</view>
<view wx:if="{{subStatus == 2 || subStatus == 3}}" class="common-btn gray-btn ml-24" catch:tap="handleClick" data-type="paying" >支付中</view>
<view wx:if="{{status == 30 && !subStatus}}" class="common-btn ml-24" catch:tap="handleClick" data-type="cancelSign" data-setTrack="evaluate_cancel_sign">取消签约</view> <view wx:if="{{status == 30 && !subStatus}}" class="common-btn ml-24" catch:tap="handleClick" data-type="cancelSign" data-setTrack="evaluate_cancel_sign">取消签约</view>
<view wx:if="{{status == 31 && !subStatus}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="signAgreement">确认代保管</view>
<view wx:if="{{status == 30 && !subStatus && paymentType == 1}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="payDeposit" data-setTrack="evaluate_pay_deposit">支付定金</view> <view wx:if="{{status == 30 && !subStatus && paymentType == 1}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="payDeposit" data-setTrack="evaluate_pay_deposit">支付定金</view>
<view wx:if="{{status == 30 && !subStatus && paymentType == 2}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="payFull" data-setTrack="evaluate_pay_full">支付全款</view> <view wx:if="{{(status == 30 && !subStatus && paymentType == 2 && previousStatus == '-1') || (status == 32 && !subStatus && paymentType == 2 && previousStatus == 31)}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="payFull" data-setTrack="evaluate_pay_full">支付全款</view>
<view wx:if="{{subStatus == 2 || subStatus == 3 || ((status == 30 || status == 40) && subStatus == 1)}}" class="common-btn gray-btn ml-24" catch:tap="handleClick" data-type="paying">支付中</view> <view wx:if="{{status == 32 && !subStatus && paymentType == 1}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="payFull" data-setTrack="evaluate_pay_final">支付尾款</view>
<view wx:if="{{status == 40 && !subStatus && paymentType == 1}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="payFull" data-setTrack="evaluate_pay_final">支付尾款</view> <view wx:if="{{(status == 30 && !subStatus && paymentType == 2 && previousStatus == 20) || (status == 40 && !subStatus && previousStatus == 30 && paymentType == 1)}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="confirmDelivery" data-setTrack="evaluate_confirm_delivery">确认交车</view>
<view wx:if="{{status == 50 && !subStatus}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="confirmDelivery" data-setTrack="evaluate_confirm_delivery">确认交车</view>
<view wx:if="{{status == '-1'}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="reSubmit" data-setTrack="evaluate_re_submit">重新提交</view> <view wx:if="{{status == '-1'}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="reSubmit" data-setTrack="evaluate_re_submit">重新提交</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -66,7 +66,16 @@ Component({ ...@@ -66,7 +66,16 @@ Component({
this.triggerEvent('close') this.triggerEvent('close')
}, },
confirm() { confirm() {
if (this.data.confirmIng) return
this.setData({
confirmIng: true
})
this.triggerEvent('confirm') this.triggerEvent('confirm')
setTimeout(() => {
this.setData({
confirmIng: false
})
}, 1500)
}, },
open() { open() {
this.setData({ show: true }) this.setData({ show: true })
......
// packageUsedCar/pages/evaluationForm/components/evaluationCard/evaluationCard.js // packageUsedCar/pages/evaluationForm/components/evaluationCard/evaluationCard.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({ Component({
/** /**
...@@ -14,6 +15,7 @@ Component({ ...@@ -14,6 +15,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMG_URL,
statusMap: { statusMap: {
10: { 10: {
name: '评估中', name: '评估中',
...@@ -27,6 +29,14 @@ Component({ ...@@ -27,6 +29,14 @@ Component({
name: '已签约', name: '已签约',
type: 'primary' type: 'primary'
}, },
31: {
name: '已签署确认单',
type: 'primary'
},
32: {
name: '已签署协议',
type: 'primary'
},
40: { 40: {
name: '已支付-定金', name: '已支付-定金',
type: 'primary' type: 'primary'
...@@ -64,6 +74,12 @@ Component({ ...@@ -64,6 +74,12 @@ Component({
methods: { methods: {
handleBtnClick(e) { handleBtnClick(e) {
this.triggerEvent('btnClick', {type: e.detail.type}) this.triggerEvent('btnClick', {type: e.detail.type})
},
handleView() {
this.setData({showPreview: true})
},
handleClose () {
this.setData({showPreview: false})
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
color: #2cca74; color: #2cca74;
background: #e9f9f1; background: #e9f9f1;
} }
.status-31 {
color: #5842eb;
background: #eeecfd;
}
.status-32 {
color: #5842eb;
background: #eeecfd;
}
.status-40 { .status-40 {
color: #5842eb; color: #5842eb;
background: #eeecfd; background: #eeecfd;
...@@ -82,15 +90,22 @@ ...@@ -82,15 +90,22 @@
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
} }
.car-box {
flex-wrap: wrap;
}
.car-number { .car-number {
font-size: var(--fontSize20); font-size: var(--fontSize20);
color: #9398A3; color: #9398A3;
border-radius: var(--fontSize4); border-radius: var(--fontSize4);
border: var(--fontSize2) solid #e8ecf0; border: var(--fontSize2) solid #e8ecf0;
padding: 4rpx;
} }
.mr-4{ .mr-4{
margin-right: var(--fontSize4); margin-right: var(--fontSize4);
} }
.mb-4 {
margin-bottom: var(--fontSize4);
}
.common-label { .common-label {
color: #999EA8; color: #999EA8;
font-size: var(--fontSize24); font-size: var(--fontSize24);
...@@ -103,4 +118,70 @@ ...@@ -103,4 +118,70 @@
} }
} }
} }
}
\ No newline at end of file \ No newline at end of file
.tips {
margin-top: 16rpx;
height: 56rpx;
border-radius: 12rpx;
opacity: 1;
background: #fef5ea;
display: flex;
align-items: center;
justify-content: space-between;
color: #FF9D0A;
font-size: 24rpx;
padding: 0 20rpx;
.left {
flex: 1;
width: calc(100% - 60rpx);
}
.flex-1 {
width: calc(50% - 10rpx);
.sprite-icon {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.flex-2 {
width: calc(100% - 60rpx);
}
.view-btn {
color: #347BFF;
}
}
}
.custpopup-container {
width: 622rpx;
.title {
font-size: 34rpx;
color: #292D33;
font-weight: 600;
margin: 48rpx 0 32rpx;
text-align: center;
}
.content {
box-sizing: border-box;
max-height: 1000rpx;
padding: 0 48rpx;
margin-bottom: 48rpx;
font-size: 32rpx;
color: #5A5E66;
.label {
color: #292D33;
font-weight: 500;
}
}
.footer {
border-top: 1rpx solid #EBEDF0;
height: 96rpx;
text-align: center;
line-height: 96rpx;
color: #347BFF;
font-weight: 600;
}
}
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
{{ carInfo.carSeriesName + ' ' + carInfo.carTypeName }} {{ carInfo.carSeriesName + ' ' + carInfo.carTypeName }}
<!-- <view class="common-label ml-20">{{ carInfo.previousOwnerName }} {{ carInfo.previousOwnerPhone }}</view> --> <!-- <view class="common-label ml-20">{{ carInfo.previousOwnerName }} {{ carInfo.previousOwnerPhone }}</view> -->
</view> </view>
<view class="flex mb-20"> <view class="flex car-box mb-20">
<view class="car-number mr-4">{{ carInfo.licensePlate }}</view> <view class="car-number mr-4 mb-4">{{ carInfo.licensePlate }}</view>
<view class="car-number mr-4">{{ carInfo.registrationDateStr }}</view> <view class="car-number mr-4 mb-4">{{ carInfo.registrationDateStr }}</view>
<view class="car-number mr-4">{{ carInfo.mileageStr }}</view> <view class="car-number mr-4 mb-4">{{ carInfo.mileageStr }}</view>
<view class="car-number">{{ carInfo.transferCountStr }}</view> <view class="car-number">{{ carInfo.transferCountStr }}</view>
</view> </view>
<view> <view>
...@@ -30,20 +30,38 @@ ...@@ -30,20 +30,38 @@
<view wx:if="{{carInfo.paymentType == 1 && carInfo.status != 10}}" class="text-gray ml-16">定金: {{ carInfo.depositPrice }}元 | 尾款: {{ carInfo.finalPrice }}元</view> <view wx:if="{{carInfo.paymentType == 1 && carInfo.status != 10}}" class="text-gray ml-16">定金: {{ carInfo.depositPrice }}元 | 尾款: {{ carInfo.finalPrice }}元</view>
<view wx:if="{{carInfo.paymentType == 2 && carInfo.status != 10}}" class="text-gray ml-16">全款: {{ carInfo.evalPrice }}元 </view> <view wx:if="{{carInfo.paymentType == 2 && carInfo.status != 10}}" class="text-gray ml-16">全款: {{ carInfo.evalPrice }}元 </view>
</view> </view>
</view>
<!-- <view v-if="carInfo.status == -1"> </view>
<view class="text-ellipsis tips px-20 justify-between"> <ButtonModule bindbuttonClick="handleBtnClick" status="{{carInfo.status}}" subStatus="{{carInfo.subStatus}}" paymentType="{{carInfo.paymentType}}" previousStatus="{{carInfo.previousStatus}}"></ButtonModule>
<view class="flex-1 flex align-center"> <block wx:if="{{carInfo.status == -1}}">
<view class="sprite-icon icon-study-tips"></view> <view class="text-ellipsis tips px-20 justify-between">
<view class="text-ellipsis">驳回原因:{{ carInfo.rejectReason || '-' }}</view> <view class="flex left">
</view> <view class="flex-1 flex align-center {{!(carInfo.previousStatus == 10 && carInfo.status == -1) ? 'flex-2' : ''}}">
<view class="flex-1 flex align-center" v-if="carInfo.previousStatus == 10 && carInfo.status == -1"> <image class="sprite-icon" src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/>
<view class="sprite-icon icon-feedbackIcon"></view> <view class="text-ellipsis">驳回原因:{{ carInfo.rejectReason || '-' }}</view>
<view class="text-ellipsis">驳回意见:{{ carInfo.rejectSuggestion || '-' }}</view>
</view>
</view> </view>
</view> --> <view class="flex-1 flex align-center" wx:if="{{carInfo.previousStatus == 10 && carInfo.status == -1}}">
<image class="sprite-icon" src="{{IMG_URL}}usedCar/opinion-icon.png" mode=""/>
<view class="text-ellipsis">驳回意见:{{ carInfo.rejectSuggestion || '-' }}</view>
</view>
</view>
<view class="view-btn" bindtap="handleView">查看</view>
</view> </view>
</block>
</view>
<van-popup show="{{ showPreview }}" root-portal="{{true}}" round close-on-click-overlay="{{false}}" bind:close="handleClose">
<view class="custpopup-container">
<view class="title">提示</view>
<scroll-view scroll-y enhanced="{{ true }}" show-scrollbar="{{ false }}" class="content">
<view class="content-text">
<text class="label">驳回原因:</text>
<text>{{carInfo.rejectReason || '-'}}</text>
</view>
<view class="content-text" wx:if="{{carInfo.previousStatus == 10 && carInfo.status == -1}}">
<text class="label">驳回意见:</text>
<text>{{carInfo.rejectSuggestion || '-'}}</text>
</view>
</scroll-view>
<view class="footer" bindtap="handleClose">好的</view>
</view> </view>
<ButtonModule bindbuttonClick="handleBtnClick" status="{{carInfo.status}}" subStatus="{{carInfo.subStatus}}" paymentType="{{carInfo.paymentType}}"></ButtonModule>
</view>
\ No newline at end of file \ No newline at end of file
</van-popup>
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": {} "usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
},
"navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.wxss */
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.wxss */
page {
background: #F7F8FA;
}
.bg {
width: 100%;
height: var(--fontSize400);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/evaluationForm-bg.png') no-repeat;
background-size: 100% var(--fontSize400);
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.flex {
display: flex;
}
.flex-col {
flex-flow: column;
}
.align-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.container {
box-sizing: border-box;
.content {
height: 100%;
overflow: auto;
.box-radius {
background: #FFFFFF;
border-radius: 16rpx;
margin: 16rpx 20rpx 8rpx;
padding: 28rpx 32rpx;
font-size: 26rpx;
color: #5A5E66;
.section-title {
font-size: 28rpx;
color: #292D33;
}
.upload-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24rpx;
}
.upload-item-container {
&.full-width {
grid-column: 1 / -1;
}
&.helf-width {
grid-column: 2 / 4;
}
.upload-label {
margin: 16rpx 0;
.requiredLabel {
color: #F24724;
margin-left: 4rpx;
}
}
.inputBox {
width: 100%;
height: 72rpx;
border-radius: 8rpx;
border: 2rpx solid #eff0f2;
background: #f4f5f7;
padding: 0 20rpx;
box-sizing: border-box;
margin-bottom: 16rpx;
.input {
width: calc(100% - 30rpx);
}
.full-input {
width: 100%;
}
}
.upload-images-wrapper {
display: flex;
gap: 28rpx;
&.line-block {
display: inline-block;
}
.uploaded-image-container {
position: relative;
border-radius: 12rpx;
overflow: hidden;
.uploaded-image {
background: #F5F5F7;
width: 196rpx;
height: 196rpx;
}
.video-container {
width: 196rpx;
height: 196rpx;
.icon-upload-play {
position: absolute;
left: 12rpx;
bottom: 16rpx;
width: 40rpx;
height: 40rpx;
}
}
.delete-icon {
position: absolute;
top: 12rpx;
right: 12rpx;
width: 40rpx;
height: 40rpx;
}
}
}
.upload-item {
width: 196rpx;
height: 196rpx;
border-radius: 12rpx;
background: #f5f5f7;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
.icon-uploadAdd {
width: 40rpx;
height: 40rpx;
&.custom-icon-uploadAdd {
width: 100%;
height: 100%;
}
}
.upload-text {
margin-top: 16rpx;
color: #999EA8;
font-size: 24rpx;
}
}
}
}
.formBox {
padding: 1rpx 32rpx;
.form-item-container {
padding: 28rpx 0;
border-bottom: 2rpx solid #F7F7F6;
&:last-child {
border-bottom: none;
}
.form-item {
display: flex;
align-items: center;
justify-content: space-between;
.form-label {
color: #292D33;
.requiredLabel {
color: #F24724;
}
}
.form-value {
width: 400rpx;
display: flex;
align-items: content;
justify-content: flex-end;
.form-input {
width: 400rpx;
text-align: right;
&.location-input {
width: calc(400rpx - 36rpx);
}
}
.placeholder {
color: #999EA8;
}
.arrow-icon {
width: 32rpx;
height: 32rpx;
}
}
}
}
.pdf-box {
height: 80rpx;
border-radius: 8rpx;
background: #f4f5f7;
padding: 0 24rpx;
margin-bottom: 28rpx;
.icon {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
}
.btn {
color: #4673FF;
margin-right: 32rpx;
&:last-child {
margin-right: 0;
}
}
}
}
.block {
width: 100%;
height: 200rpx;
}
}
}
.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: 333rpx;
height: 76rpx;
border-radius: 12rpx;
text-align: center;
line-height: 76rpx;
font-size: 28rpx;
}
.cancle {
color: #3b73ff;
border: 2rpx solid #347BFF;
font-weight: 500;
}
.next {
color: #ffffff;
font-weight: 500;
height: 80rpx;
line-height: 80rpx;
background: #347BFF;
}
}
.repeal-modal{
background: rgba(0, 0, 0, 0.6);
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 999;
.repeal-wrap{
width: var(--fontSize622);
background: #FFFFFF;
border-radius: var(--fontSize20);
transform: translate(-50%, -50%);
position: absolute;
top: 50%;
left: 50%;
box-sizing: border-box;
.title{
font-weight: 700;
font-size: var(--fontSize34);
color: #292D33;
text-align: center;
padding: 48rpx 0 32rpx 0;
}
.label {
padding: 0 48rpx;
color: #292D33;
font-size: 28rpx;
.requiredLabel {
color: #F24724;
margin-left: 4rpx;
}
}
.textarea-wrap{
margin: 16rpx 0 48rpx;
padding: 0 var(--fontSize48);
width: 100%;
box-sizing: border-box;
.textarea{
background: #F4F5F7;
width: 100%;
font-size: var(--fontSize28);
height: var(--fontSize500);
padding: var(--fontSize24);
box-sizing: border-box;
border: var(--fontSize2) solid #EFF0F2;
border-radius: var(--fontSize12);
}
}
.footer{
height: var(--fontSize100);
border-top: var(--fontSize2) solid #EBEDF0;
display: flex;
align-items: center;
.btn{
flex: 1;
height: 100%;
line-height: var(--fontSize100);
text-align: center;
font-size: var(--fontSize32);
font-weight: 500;
color: #347BFF;
}
.cancel_btn{
color: #333333;
font-weight: 400;
border-right: var(--fontSize2) solid #EBEDF0;
}
}
}
}
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.wxml--> <!--packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.wxml-->
<text>packageUsedCar/pages/evaluationForm/confirmCar/confirmCar.wxml</text>
\ No newline at end of file \ No newline at end of file
<view class="confirm-car">
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back">
<view class="title-text">{{pageTitle}}</view>
</navigation-bar>
<view class="bg"></view>
<view class="container" style="padding-top:{{ navBarHeight }}px;height: 100vh;">
<view class="content">
<view class="box-radius">
<view class="section-title">交接清单</view>
<view class="upload-grid">
<view class="upload-item-container {{item.fullWidth ? 'full-width' : ''}} {{item.helfWidth ? 'helf-width' : ''}}" wx:for="{{uploadFieldsWithImages}}" wx:key="index">
<view class="upload-label">
<text>{{ item.label }}</text>
<text class="requiredLabel" wx:if="{{item.required}}">*</text>
</view>
<view>
<view class="flex align-center inputBox" wx:if="{{item.key === 'carKeyUrl'}}">
<input type="number" value="{{formData[item.inputKey]}}" placeholder="请输入" bindinput="handleInput" data-key="{{item.inputKey}}" class="input" maxlength="1" />
<text>套</text>
</view>
<view class="flex align-center inputBox" wx:if="{{item.key === 'otherUrl'}}">
<input type="text" class="full-input" bindinput="handleInput" data-key="{{item.inputKey}}" value="{{formData[item.inputKey]}}" placeholder="请输入" maxlength="28" />
</view>
<view class="upload-images-wrapper">
<!-- 已上传的图片/视频列表 -->
<block wx:for="{{item.uploadImages}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<view class="uploaded-image-container">
<!-- 视频 -->
<view wx:if="{{subItem.isVideo}}" class="video-container"
bindtap="previewMedia" data-media="{{item.uploadImages}}">
<image src="{{subItem.coverUrl}}" mode="aspectFit"></image>
<view class="video-play-icon">
<image src="{{IMG_URL}}usedCar/upload-play.png" class="icon-upload-play"></image>
</view>
</view>
<!-- 图片 -->
<image wx:else src="{{subItem.url}}" mode="aspectFit"
class="uploaded-image"
bindtap="previewMedia" data-media="{{item.uploadImages}}" data-index="{{subIndex}}"></image>
<view class="delete-icon" bindtap="deleteImage"
data-key="{{item.key}}" data-index="{{subIndex}}" data-isvideo="{{subItem.isVideo}}" data-type="uploadFieldsWithImages">
<image src="{{IMG_URL}}zy_paf_del_icon.png" class="icon-icon-circle-error"></image>
</view>
</view>
</block>
<!-- 上传按钮 -->
<view wx:if="{{item.uploadImages.length < item.maxCount}}" class="upload-item"
bindtap="handleImageUpload" data-field="{{item}}" data-type="uploadFieldsWithImages">
<image src="{{IMG_URL}}{{item.uploadIcon || 'zy-upload_icon.png'}}" class="icon-uploadAdd {{item.uploadIcon ? 'custom-icon-uploadAdd' : ''}}"></image>
<view class="upload-text" wx:if="{{!item.uploadIcon}}">
{{item.maxCount > 1 ? item.uploadImages.length + '/' + item.maxCount : item.video ? '图片/视频' : '上传图片'}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box-radius">
<view class="section-title">交车确认照片</view>
<view class="upload-grid">
<view class="upload-item-container {{item.fullWidth ? 'full-width' : ''}} {{item.helfWidth ? 'helf-width' : ''}}" wx:for="{{confirmCarFieldsWithImages}}" wx:key="index">
<view class="upload-label">
<text>{{ item.label }}</text>
<text class="requiredLabel" wx:if="{{item.required}}">*</text>
</view>
<view>
<view class="upload-images-wrapper">
<!-- 已上传的图片/视频列表 -->
<block wx:for="{{item.uploadImages}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<view class="uploaded-image-container">
<!-- 图片 -->
<image src="{{subItem.url}}" mode="aspectFit"
class="uploaded-image"
bindtap="previewMedia" data-media="{{item.uploadImages}}"></image>
<view class="delete-icon" bindtap="deleteImage"
data-key="{{item.key}}" data-index="{{subIndex}}" data-isvideo="{{subItem.isVideo}}" data-type="confirmCarFieldsWithImages">
<image src="{{IMG_URL}}zy_paf_del_icon.png" class="icon-icon-circle-error"></image>
</view>
</view>
</block>
<!-- 上传按钮 -->
<view wx:if="{{item.uploadImages.length < item.maxCount}}" class="upload-item"
bindtap="handleImageUpload" data-field="{{item}}" data-type="confirmCarFieldsWithImages">
<image src="{{IMG_URL}}{{item.uploadIcon || 'zy-upload_icon.png'}}" class="icon-uploadAdd {{item.uploadIcon ? 'custom-icon-uploadAdd' : ''}}"></image>
<view class="upload-text" wx:if="{{!item.uploadIcon}}">
{{item.maxCount > 1 ? item.uploadImages.length + '/' + item.maxCount : item.video ? '图片/视频' : '上传图片'}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box-radius formBox">
<view wx:for="{{formFields}}" wx:key="key" class="form-item-container mb-24">
<view class="form-item flex align-center justify-between">
<view class="form-label">
{{item.label}}
<text wx:if="{{item.required}}" class="requiredLabel">*</text>
</view>
<view class="form-value">
<view wx:if="{{item.type === 'calendar'}}"
class="datetime-picker flex align-center"
bindtap="openDateTimePicker">
<text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text>
<text wx:else class="placeholder">请选择</text>
<image src="/components/images/arrow-x.png" class="arrow-icon"></image>
</view>
<input wx:if="{{item.type === 'input'}}"
value="{{formData[item.key]}}"
placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder"
maxlength="{{item.maxlength}}"
bindinput="handleInput"
data-key="{{item.key}}"
class="form-input {{item.loaction? 'location-input' : ''}}" />
<image wx:if="{{item.location}}" class="location-icon" src="{{IMG_URL}}usedCar/loaction-icon.png" mode=""/>
<view class="flex align-center" style="width: 100%;justify-content: flex-end;" wx:if="{{item.type === 'pdf'}}" bindtap="handlePdf">
<view class="placeholder">{{isShowPreview ? '点击编辑' : '点击添加'}}</view>
<image src="/components/images/arrow-x.png" class="arrow-icon"></image>
</view>
</view>
</view>
</view>
<view class="pdf-box flex align-center justify-between" wx:if="{{isShowPreview}}">
<view class="flex align-center">
<image class="icon" src="{{IMG_URL}}usedCar/pdf-icon.png" mode=""/>
<text>二手车补充协议</text>
</view>
<view class="flex align-center">
<view class="btn" bindtap="previewPdf">预览</view>
<view class="btn" bindtap="deletePdf">删除</view>
</view>
</view>
</view>
<view class="block"></view>
</view>
</view>
<view class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn cancle" bindtap="back">取消</view>
<view class="btn next" bindtap="handleConfirm">确认交车</view>
</view>
</view>
<!-- 日期时间选择器 -->
<van-popup
show="{{ timeShow }}"
position="bottom"
bind:close="calcelDate"
close-on-click-overlay="{{ true }}"
z-index="10000"
round
catchtouchmove="preventTouchMove"
>
<van-datetime-picker
type="datetime"
bind:cancel="calcelDate"
value="{{ currentDate }}"
bind:confirm="bindDateChange"
/>
</van-popup>
<!-- 补充协议弹窗 -->
<view class="repeal-modal" wx:if="{{ repealVisible }}">
<view class="repeal-wrap">
<view class="title">补充协议条款</view>
<view class="label">协议内容<text class="requiredLabel">*</text></view>
<view class="textarea-wrap">
<textarea class="textarea" maxlength="{{ 200 }}" value="{{ formData.supplementaryClauseText }}" bindinput="textareaInput" focus="{{ true }}" placeholder-style="color: #B6B6B8; font-size: var(--fontSize28);" placeholder="请输入" ></textarea>
</view>
<view class="footer">
<view class="btn cancel_btn" bindtap="cancelRepeal">取消</view>
<view class="btn" bindtap="confirmRepeal">保存</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -113,10 +113,12 @@ ...@@ -113,10 +113,12 @@
margin-left: var(--fontSize4); margin-left: var(--fontSize4);
} }
} }
.intention-input-cell { .intention-input {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: var(--fontSize526);
box-sizing: border-box;
background: #F7F8FA; background: #F7F8FA;
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
height: var(--fontSize72); height: var(--fontSize72);
...@@ -127,6 +129,24 @@ ...@@ -127,6 +129,24 @@
flex: 1; flex: 1;
} }
} }
.intention-input-cell {
display: flex;
align-items: center;
justify-content: space-between;
.flex-1 {
width: calc(100% - 36rpx);
box-sizing: border-box;
padding: 0 24rpx;
height: 72rpx;
border-radius: 8rpx;
background: #f7f8fa;
}
}
.intention-textarea {
height: var(--fontSize192);
padding: var(--fontSize16) var(--fontSize24);
align-items: flex-start;
}
.feedback-textarea { .feedback-textarea {
width: var(--fontSize526); width: var(--fontSize526);
box-sizing: border-box; box-sizing: border-box;
...@@ -186,6 +206,21 @@ ...@@ -186,6 +206,21 @@
color: #347BFF; color: #347BFF;
font-weight: 700; font-weight: 700;
} }
&.flex {
display: flex;
align: center;
gap: 48rpx;
.value-item {
display: flex;
align-items: center;
gap: 8rpx;
.icon {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
}
}
}
} }
} }
} }
......
...@@ -77,8 +77,8 @@ ...@@ -77,8 +77,8 @@
<GeneralPopup show="{{showAmountRequestedPopup}}" title="{{amountRequestedPopupTitle}}" isFooterBtn="{{true}}" isShowCancel confirmText="款项申请" bindclose="cancelAmountRequested" bindconfirm="confirmAmountRequested"> <GeneralPopup show="{{showAmountRequestedPopup}}" title="{{amountRequestedPopupTitle}}" isFooterBtn="{{true}}" isShowCancel confirmText="款项申请" bindclose="cancelAmountRequested" bindconfirm="confirmAmountRequested">
<view class="amount-requested-content"> <view class="amount-requested-content">
<view class="amount-box"> <view class="amount-box">
<text class="amount-title">{{ payPopupObj.paymentType == 1 && payPopupObj.status != 40 ? '定金' : payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? '尾款' : '全款' }}金额</text> <text class="amount-title">{{ payPopupObj.paymentType == 2 ? '全款' : payPopupObj.paymentType == 1 && payPopupObj.status == 30 ? '定金' : '尾款' }}金额</text>
<text class="amount-value">{{ payPopupObj.paymentType == 1 && payPopupObj.status != 40 ? payPopupObj.depositPrice : payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? payPopupObj.finalPrice : payPopupObj.evalPrice }}元</text> <text class="amount-value">{{ payPopupObj.paymentType == 2 ? payPopupObj.evalPrice : payPopupObj.paymentType == 1 && payPopupObj.status == 30 ? payPopupObj.depositPrice : payPopupObj.finalPrice }}元</text>
</view> </view>
<view class="align-center mt-28 mb-16" wx:if="{{payPopupObj.paymentType == 1}}"> <view class="align-center mt-28 mb-16" wx:if="{{payPopupObj.paymentType == 1}}">
<text class="popup-cell-title light-title">{{ payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? '已支付定金' : '待支付尾款' }}</text> <text class="popup-cell-title light-title">{{ payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? '已支付定金' : '待支付尾款' }}</text>
...@@ -96,10 +96,23 @@ ...@@ -96,10 +96,23 @@
<text class="popup-cell-title">银行账号</text> <text class="popup-cell-title">银行账号</text>
<text class="popup-cell-value">{{ payPopupObj.bankCardNumber }}</text> <text class="popup-cell-value">{{ payPopupObj.bankCardNumber }}</text>
</view> </view>
<view class="align-center"> <view class="align-center mb-16">
<text class="popup-cell-title">开户行</text> <text class="popup-cell-title">开户行</text>
<text class="popup-cell-value">{{ payPopupObj.bankOfDeposit }}</text> <text class="popup-cell-value">{{ payPopupObj.bankOfDeposit }}</text>
</view> </view>
<view class="flex align-center">
<text class="popup-cell-title">付款方式</text>
<view class="popup-cell-value flex">
<view class="value-item" bindtap="radioChange" data-value="1">
<image class="icon" src="{{IMG_URL}}usedCar/{{payPopupObj.paymentMethod == 1 ? 'radio-checked.png' : 'radio.png'}}" mode=""/>
<text>银行转账</text>
</view>
<view class="value-item" bindtap="radioChange" data-value="2">
<image class="icon" src="{{IMG_URL}}usedCar/{{payPopupObj.paymentMethod == 2 ? 'radio-checked.png' : 'radio.png'}}" mode=""/>
<text>冲账</text>
</view>
</view>
</view>
</view> </view>
</GeneralPopup> </GeneralPopup>
<GeneralPopup show="{{showSignAgreementPopup}}" title="代保管协议" isFooterBtn="{{true}}" isShowCancel confirmText="发送" bindclose="cancelSignAgreement" bindconfirm="confirmSignAgreement"> <GeneralPopup show="{{showSignAgreementPopup}}" title="代保管协议" isFooterBtn="{{true}}" isShowCancel confirmText="发送" bindclose="cancelSignAgreement" bindconfirm="confirmSignAgreement">
...@@ -113,12 +126,12 @@ ...@@ -113,12 +126,12 @@
<block wx:if="{{signAgreementObj.custodianName}}"> <block wx:if="{{signAgreementObj.custodianName}}">
{{ signAgreementObj.custodianName + ' | ' + signAgreementObj.custodianPhone }} {{ signAgreementObj.custodianName + ' | ' + signAgreementObj.custodianPhone }}
</block> </block>
<block v-else> <block wx:else>
<text class="placeholder">请选择</text> <text class="placeholder">请选择</text>
</block> </block>
<image class="icon" src="/components/images/arrow-x.png" mode=""/> <image class="icon" src="/components/images/arrow-x.png" mode=""/>
</view> </view>
<view class="btn" bindtap="addSignAgreement"><image class="add-icon" src="{{IMG_URL}}zy-upload_icon.png" />新增</view> <view class="btn" bindtap="addSignAgreement"><image class="add-icon" src="{{IMG_URL}}zy-upload_icon.png" />新增保管人</view>
</view> </view>
</view> </view>
</GeneralPopup> </GeneralPopup>
...@@ -128,25 +141,25 @@ ...@@ -128,25 +141,25 @@
签约保管人 签约保管人
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" placeholder="请输入" value="{{addSignAgreementObj.custodianName}}" maxlength="20" /> <input class="intention-input mb-48" placeholder="请输入" bindinput="handleInput" data-key="custodianName" value="{{addSignAgreementObj.custodianName}}" maxlength="20" />
<view class="requote-label mb-24"> <view class="requote-label mb-24">
身份证号 身份证号
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" placeholder="请输入18位身份证号" value="{{addSignAgreementObj.custodianIdentityCode}}" maxlength="18" bindinput="validateIdCard" type="text" /> <input class="intention-input mb-48" placeholder="请输入18位身份证号" bindinput="handleInput" data-key="custodianIdentityCode" value="{{addSignAgreementObj.custodianIdentityCode}}" maxlength="18" type="text" />
<view class="requote-label mb-24"> <view class="requote-label mb-24">
手机号 手机号
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" type="number" maxlength="11" placeholder="请输入" value="{{addSignAgreementObj.custodianPhone}}" /> <input class="intention-input mb-48" type="number" maxlength="11" bindinput="handleInput" data-key="custodianPhone" placeholder="请输入" value="{{addSignAgreementObj.custodianPhone}}" />
<view class="requote-label mb-24"> <view class="requote-label mb-24">
地址 地址
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" placeholder="请输入" maxlength="52" value="{{addSignAgreementObj.custodianAddress}}" /> <textarea class="intention-input intention-textarea mb-48" bindinput="handleInput" data-key="custodianAddress" placeholder="请输入" maxlength="52" value="{{addSignAgreementObj.custodianAddress}}" />
</view> </view>
</GeneralPopup> </GeneralPopup>
<AgreementListPopup id="AgreementListPopup" /> <AgreementListPopup id="AgreementListPopup" selectedObj="{{signAgreementObj}}" bindconfirm="agreementConfirm" />
{ {
"usingComponents": {} "usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
},
"navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
/* packageUsedCar/pages/evaluationForm/signInfo/signInfo.wxss */
\ No newline at end of file \ No newline at end of file
import newApi from '~/utils/request/newRequest' import newApi from '~/packageUsedCar/newRequest'
import api from '~/utils/request/request' import api from '~/utils/request/request'
/** /**
* 二手车查询员工昨天是否新入职或调店 * 二手车查询员工昨天是否新入职或调店
......
let modalQueue = [] let modalQueue = []
import api from '~/api/api.js' import api from '~/api/api.js'
import { // import {
checkUsedCarStaffIsNew, // checkUsedCarStaffIsNew,
checkUsedCarStaffDailyReportValid // checkUsedCarStaffDailyReportValid
} from '~/api/secondHandApi' // } from '~/api/secondHandApi'
let eventRequest = [] let eventRequest = []
const initModal = () => { const initModal = () => {
if (getCurrentPages().length > 0) { if (getCurrentPages().length > 0) {
...@@ -28,9 +28,11 @@ const checkDailyReport = async sceneType => { ...@@ -28,9 +28,11 @@ const checkDailyReport = async sceneType => {
if (sceneType != 7) eventRequest.push(clockedIntoWork()) if (sceneType != 7) eventRequest.push(clockedIntoWork())
eventRequest.push( eventRequest.push(
sceneType sceneType
? sceneType == 7 ?
? usedCarStaffDailyReport(userInfo) // sceneType == 7
: equityStaffDailyReport(userInfo) // ? usedCarStaffDailyReport(userInfo)
// :
equityStaffDailyReport(userInfo)
: staffDailyReport(userInfo) : staffDailyReport(userInfo)
) )
} }
...@@ -172,51 +174,51 @@ const equityStaffDailyReport = userInfo => { ...@@ -172,51 +174,51 @@ const equityStaffDailyReport = userInfo => {
}) })
}) })
} }
const usedCarStaffDailyReport = userInfo => { // const usedCarStaffDailyReport = userInfo => {
return new Promise(async (resolve, reject) => { // return new Promise(async (resolve, reject) => {
const res = await checkUsedCarStaffIsNew({ // const res = await checkUsedCarStaffIsNew({
merchantId: userInfo?.shopMerchantId, // merchantId: userInfo?.shopMerchantId,
yqMerchantId: userInfo?.merchantId, // yqMerchantId: userInfo?.merchantId,
staffUuid: userInfo?.uuid, // staffUuid: userInfo?.uuid,
staffPhone: userInfo?.phone, // staffPhone: userInfo?.phone,
sceneType: 7 // sceneType: 7
}) // })
if (!res?.data) { // if (!res?.data) {
resolve(false) // resolve(false)
} else { // } else {
const _data = await checkUsedCarStaffDailyReportValid({ // const _data = await checkUsedCarStaffDailyReportValid({
sellerMerchantId: userInfo?.shopMerchantId // sellerMerchantId: userInfo?.shopMerchantId
}) //true 已填写 false 未填写 // }) //true 已填写 false 未填写
if (!_data) { // if (!_data) {
// 获取当前日期 // // 获取当前日期
let currentDate = new Date() // let currentDate = new Date()
// 获取上一天的日期 // // 获取上一天的日期
let previousDate = new Date(currentDate) // let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1) // previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时 // // toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8 // let hour = previousDate.getHours() + 8
previousDate.setHours(hour) // previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd" // // 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0] // let formattedDate = previousDate.toISOString().split('T')[0]
addModalToQueue( // addModalToQueue(
'日报提醒', // '日报提醒',
'您有未填写的日报,请点击前往。', // '您有未填写的日报,请点击前往。',
'前往填写', // '前往填写',
false, // false,
4, // 4,
res => { // res => {
if (res.confirm) { // if (res.confirm) {
wx.navigateTo({ // wx.navigateTo({
url: `/packageUsedCar/pages/indexPage/dailyReport/dailyReport?currentDate=${formattedDate}` // url: `/packageUsedCar/pages/indexPage/dailyReport/dailyReport?currentDate=${formattedDate}`
}) // })
} // }
} // }
) // )
resolve(true) // resolve(true)
} else resolve(false) // } else resolve(false)
} // }
}) // })
} // }
const clockedIntoWork = userInfo => { const clockedIntoWork = userInfo => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
api api
...@@ -295,7 +297,7 @@ export { ...@@ -295,7 +297,7 @@ export {
checkDailyReport, checkDailyReport,
staffDailyReport, staffDailyReport,
addModalToQueue, addModalToQueue,
usedCarStaffDailyReport, // usedCarStaffDailyReport,
checkStudyTask checkStudyTask
} }
// export { checkDailyReport, staffDailyReport, addModalToQueue, checkStudyTask }; // export { checkDailyReport, staffDailyReport, addModalToQueue, checkStudyTask };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!