Commit 31c9c8cb by 张立顺

Merge branch 'SAAS+V5.5.1' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into SAAS+V5.5.1
2 parents 41276c3e c4a3f09b
Showing 38 changed files with 706 additions and 135 deletions
...@@ -611,9 +611,9 @@ Component({ ...@@ -611,9 +611,9 @@ Component({
}) })
} }
// 区域运营/飞行督导 // 区域运营/飞行督导
if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 6) && menuList.every((item) => item.menuText != '工作日报')) { if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 6) && menuList.every((item) => item.menuText != '延保日报')) {
menuList.push({ menuList.push({
menuText: "工作日报", menuText: "延保日报",
path: "tabWorkOrder.supervisorDaily", path: "tabWorkOrder.supervisorDaily",
icon: "supervisorDaily", icon: "supervisorDaily",
}) })
...@@ -1119,11 +1119,11 @@ Component({ ...@@ -1119,11 +1119,11 @@ Component({
message message
} = res } = res
if (code == 0) { if (code == 0) {
let index = menuList.findIndex((v) => v.menuText == "工作日报"); let index = menuList.findIndex((v) => v.menuText == "延保日报");
if (index > -1) menuList.splice(index, 1); if (index > -1) menuList.splice(index, 1);
if (data && menuList.every((item) => item.menuText != "工作日报")) { if (data && menuList.every((item) => item.menuText != "延保日报")) {
menuList.push({ menuList.push({
menuText: "工作日报", menuText: "延保日报",
path: "tabWorkOrder.supervisorDaily", path: "tabWorkOrder.supervisorDaily",
icon: "supervisorDaily" icon: "supervisorDaily"
}); });
...@@ -1313,7 +1313,7 @@ Component({ ...@@ -1313,7 +1313,7 @@ Component({
if (item.path == 'tabWorkOrder.mentorshipManage' && userInfo?.loginRole == 6) { if (item.path == 'tabWorkOrder.mentorshipManage' && userInfo?.loginRole == 6) {
wx.$track.setTrackData(0, 'mentorship_page', {}, '', 0) wx.$track.setTrackData(0, 'mentorship_page', {}, '', 0)
} }
// 飞行督导/导师点击工作日报入口埋点 // 飞行督导/导师点击延保日报入口埋点
if (item.path == 'tabWorkOrder.supervisorDaily' && (userInfo?.loginRole == 6 || mentorFlag)) { if (item.path == 'tabWorkOrder.supervisorDaily' && (userInfo?.loginRole == 6 || mentorFlag)) {
wx.$track.setTrackData(0, 'supervisor_daily_page', {}, '', 0) wx.$track.setTrackData(0, 'supervisor_daily_page', {}, '', 0)
} }
......
...@@ -321,7 +321,15 @@ module.exports = { ...@@ -321,7 +321,15 @@ module.exports = {
return newApi.post(`/evalOrder/carLicenseOcr`, data, { returnAll: true }); return newApi.post(`/evalOrder/carLicenseOcr`, data, { returnAll: true });
}, },
// 撤回合同 // 撤回合同
revokeSaleContract (data) { revokeSaleContract(data) {
return newApi.post('/evalOrder/revokeSaleContract', data, { returnAll: true }) return newApi.post("/evalOrder/revokeSaleContract", data, {
} returnAll: true,
});
},
/** 线上合同预览 */
viewOnlineContract(data) {
return newApi.post(`/evalOrder/viewOnlineContract`, data, {
returnAll: true,
});
},
}; };
...@@ -25,7 +25,7 @@ Component({ ...@@ -25,7 +25,7 @@ Component({
}, },
labelWidth: { labelWidth: {
type: String, type: String,
value: "var(--fontSize140)", value: "var(--fontSize200)",
}, },
// 页面存放表单对象的对象名,用于直接变更page的值 // 页面存放表单对象的对象名,用于直接变更page的值
dataAttrName: { dataAttrName: {
...@@ -54,10 +54,20 @@ Component({ ...@@ -54,10 +54,20 @@ Component({
targetIdx: -1, targetIdx: -1,
areaList: [], areaList: [],
currentRegionTarget: null, // 当前选择地区的字段配置 currentRegionTarget: null, // 当前选择地区的字段配置
currentDate: "", // 当前日期,格式:YYYY-MM-DD
}, },
lifetimes: { lifetimes: {
attached() { attached() {
// 获取当前日期(格式:YYYY-MM-DD)
const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, "0");
const day = String(today.getDate()).padStart(2, "0");
const currentDate = `${year}-${month}-${day}`;
this.setData({
currentDate: currentDate,
});
let thisPage = wx.$router.getPageInstance(); let thisPage = wx.$router.getPageInstance();
wx.$eventbus.on("set_car_info", (n) => { wx.$eventbus.on("set_car_info", (n) => {
let { targetIdx, dataAttrName, formDataList } = this.data; let { targetIdx, dataAttrName, formDataList } = this.data;
...@@ -144,6 +154,26 @@ Component({ ...@@ -144,6 +154,26 @@ Component({
// 必填校验 // 必填校验
if (rule.required && !value) { if (rule.required && !value) {
// 特殊处理:对于地区ID字段,如果有对应的名称字段,则认为有效
if (
field === "registrationCityId" &&
formData.registrationCityName
) {
continue; // 跳过验证
}
if (field === "carCityId" && formData.carCityName) {
continue; // 跳过验证
}
if (
field === "registrationProvinceId" &&
formData.registrationProvinceName
) {
continue; // 跳过验证
}
if (field === "carProvinceId" && formData.carProvinceName) {
continue; // 跳过验证
}
return { return {
field, field,
message: rule.message, message: rule.message,
...@@ -204,6 +234,10 @@ Component({ ...@@ -204,6 +234,10 @@ Component({
value = value =
value <= item.inputLimit.minVal ? item.inputLimit.minVal : value; value <= item.inputLimit.minVal ? item.inputLimit.minVal : value;
} }
// 处理数字类型输入,过滤掉所有非数字字符
if (item.inputLimit && item.inputLimit.type == "number") {
value = value.toString().replace(/[^\d]/g, "");
}
if (item.inputLimit && item.inputLimit.type == "digit") { if (item.inputLimit && item.inputLimit.type == "digit") {
let [number, decimal] = value.toString().split("."); let [number, decimal] = value.toString().split(".");
if (decimal != undefined) { if (decimal != undefined) {
...@@ -286,6 +320,11 @@ Component({ ...@@ -286,6 +320,11 @@ Component({
// 如果是打开弹窗,记录当前点击的字段 // 如果是打开弹窗,记录当前点击的字段
const target = e?.currentTarget?.dataset?.target; const target = e?.currentTarget?.dataset?.target;
// 如果是打开弹窗(showArea 为 false),先隐藏键盘
if (!showArea) {
wx.hideKeyboard();
}
this.setData({ this.setData({
showArea: !showArea, showArea: !showArea,
areaList, areaList,
...@@ -332,7 +371,7 @@ Component({ ...@@ -332,7 +371,7 @@ Component({
cityCode = values[1]?.code || ""; cityCode = values[1]?.code || "";
} }
const displayText = provinceName + "/" + cityName; const displayText = provinceName + " " + cityName;
// 更新页面数据 // 更新页面数据
// 根据 target.name 判断是上牌城市还是车辆所在地 // 根据 target.name 判断是上牌城市还是车辆所在地
......
...@@ -83,9 +83,11 @@ ...@@ -83,9 +83,11 @@
show="{{ showArea }}" show="{{ showArea }}"
position="bottom" position="bottom"
z-index="99999" z-index="99999"
root-portal="{{true}}"
bind:close="showAreaFun" bind:close="showAreaFun"
> >
<van-area <van-area
root-portal="true"
area-list="{{ areaList }}" area-list="{{ areaList }}"
columns-num="{{ item.columnsNum }}" columns-num="{{ item.columnsNum }}"
title="{{ areaTitle || '' }}" title="{{ areaTitle || '' }}"
...@@ -117,7 +119,7 @@ ...@@ -117,7 +119,7 @@
mode="date" mode="date"
value="{{ formData[name] || formData[item.name] }}" value="{{ formData[name] || formData[item.name] }}"
start="{{ item.start || '' }}" start="{{ item.start || '' }}"
end="{{ item.end || '' }}" end="{{ (item.name === 'registrationDate' || item.name === 'productionDate') ? currentDate : (item.end || '') }}"
bindchange="handleTimeChange" bindchange="handleTimeChange"
data-target="{{ item }}" data-target="{{ item }}"
> >
......
...@@ -5,12 +5,15 @@ ...@@ -5,12 +5,15 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
--cell-line-height: calc(28vmin / 7.5) !important; --cell-line-height: calc(28vmin / 7.5) !important;
min-width: 0; /* 防止 flex 子元素溢出 */
} }
.textarea { .textarea {
text-align: right; text-align: right;
font-size: var(--fontSize28) !important; font-size: var(--fontSize28) !important;
flex-grow: 1; flex: 1;
min-width: 0; /* 允许 flex 子元素收缩 */
overflow: hidden; /* 防止内容溢出 */
} }
.input-suffix { .input-suffix {
...@@ -19,6 +22,8 @@ ...@@ -19,6 +22,8 @@
/* height: var(--fontSize132); /* height: var(--fontSize132);
line-height: var(--fontSize132); */ line-height: var(--fontSize132); */
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
flex-shrink: 0; /* 防止被压缩 */
white-space: nowrap; /* 防止换行 */
} }
.placeholder-class { .placeholder-class {
...@@ -83,6 +88,7 @@ ...@@ -83,6 +88,7 @@
justify-content: center; justify-content: center;
display: flex; display: flex;
margin-left: var(--fontSize16); margin-left: var(--fontSize16);
flex-shrink: 0; /* 防止被压缩 */
} }
.gl-form .scan-box .scan-icon { .gl-form .scan-box .scan-icon {
width: var(--fontSize28); width: var(--fontSize28);
......
...@@ -23,6 +23,23 @@ Component({ ...@@ -23,6 +23,23 @@ Component({
slotStyle: String, slotStyle: String,
cancelText: String, cancelText: String,
cancelStyle: String, cancelStyle: String,
confirmText: {
type: String,
value: "确认",
},
confirmStyle: String,
singleButton: {
type: Boolean,
value: false,
observer: function (newVal) {
// 确保 singleButton 是布尔值
if (typeof newVal !== "boolean") {
this.setData({
singleButton: newVal === true || newVal === "true",
});
}
},
},
}, },
/** /**
......
<view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll"> <view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg"></view> <view class="popup-bg"></view>
<view class="popup-content" style="height:{{ height }}"> <view class="popup-content" style="height:{{ height }}">
<block wx:if="{{ title }}"> <block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view> <view class="popup-title text-center">{{title}}</view>
</block> </block>
<view class="popup-slot popup-slot-class {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}" style="{{slotStyle}}"> <view class="popup-slot popup-slot-class {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}" style="{{slotStyle}}">
<slot></slot> <slot></slot>
</view> </view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}"> <view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }} {{ singleButton ? 'single-button' : '' }}">
<view class="cancel btn text-center" bindtap="hidePopup" style="{{cancelStyle}}">{{cancelText || '取消'}}</view> <view wx:if="{{singleButton !== true}}" class="cancel btn text-center" bindtap="hidePopup" style="{{cancelStyle}}">
<view class="confirm btn text-center" bindtap="confirm">确认</view> {{cancelText || '取消'}}
</view> </view>
</view> <view class="confirm btn text-center {{ singleButton ? 'single-btn' : '' }}" bindtap="confirm" style="{{confirmStyle}}">
{{confirmText || '确认'}}
</view>
</view>
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
z-index: 998; z-index: 9999;
/* 确保不会被父元素的 transform、overflow 等属性影响 */
transform: translateZ(0);
} }
.popup-bg { .popup-bg {
...@@ -14,7 +16,7 @@ ...@@ -14,7 +16,7 @@
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
background-color: rgba(0, 0, 0, .7); background-color: rgba(0, 0, 0, 0.7);
} }
.text-center { .text-center {
...@@ -27,9 +29,9 @@ ...@@ -27,9 +29,9 @@
position: absolute; position: absolute;
left: 0; left: 0;
width: 100%; width: 100%;
background: #FFFFFF; background: #ffffff;
border-radius: var(--fontSize20) var(--fontSize20) 0 0; border-radius: var(--fontSize20) var(--fontSize20) 0 0;
animation: show-popup .5s forwards; animation: show-popup 0.5s forwards;
box-sizing: border-box; box-sizing: border-box;
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
} }
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
height: var(--fontSize98); height: var(--fontSize98);
font-size: var(--fontSize32); font-size: var(--fontSize32);
color: #333333; color: #333333;
border-bottom: var(--fontSize2) solid #EBEDF0; border-bottom: var(--fontSize2) solid #ebedf0;
} }
.popup-slot { .popup-slot {
...@@ -75,15 +77,23 @@ ...@@ -75,15 +77,23 @@
.popup-footer .cancel { .popup-footer .cancel {
/* color: #323233; /* color: #323233;
border: var(--fontSize2) solid #DCDEE0; */ border: var(--fontSize2) solid #DCDEE0; */
color: #292D33; color: #292d33;
background: #F7F8FA; background: #f7f8fa;
} }
.popup-footer .confirm { .popup-footer .confirm {
background: #347BFF; background: #347bff;
color: #fff; color: #fff;
} }
.popup-footer.single-button {
justify-content: center;
}
.popup-footer .confirm.single-btn {
width: 100%;
}
@keyframes show-popup { @keyframes show-popup {
0% { 0% {
bottom: -100%; bottom: -100%;
...@@ -92,4 +102,4 @@ ...@@ -92,4 +102,4 @@
100% { 100% {
bottom: 0; bottom: 0;
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -23,16 +23,24 @@ Component({ ...@@ -23,16 +23,24 @@ Component({
type: Object, type: Object,
observer: function (n) { observer: function (n) {
if (n) { if (n) {
let { pickerList, type } = this.data, let { pickerList, type, pickerListAll } = this.data;
value; let value = type == 1 ? n.referrerId : n.deliveryId;
value = type == 1 ? n.referrerId : n.deliveryId; // 如果 pickerList 还没有初始化,使用 pickerListAll
let defaultSelectStoreIndex = pickerList?.findIndex((v) => { const listToSearch =
return v.uuid == n; pickerList && pickerList.length > 0
}); ? pickerList
this.setData({ : pickerListAll || [];
defaultSelectStoreIndex: [defaultSelectStoreIndex], if (value && listToSearch.length > 0) {
selectStoreIndex: defaultSelectStoreIndex, let defaultSelectStoreIndex = listToSearch.findIndex((v) => {
}); return v.uuid == value;
});
if (defaultSelectStoreIndex >= 0) {
this.setData({
defaultSelectStoreIndex: [defaultSelectStoreIndex],
selectStoreIndex: defaultSelectStoreIndex,
});
}
}
} }
}, },
}, },
...@@ -41,19 +49,59 @@ Component({ ...@@ -41,19 +49,59 @@ Component({
value: "", value: "",
observer: function (n) { observer: function (n) {
if (n) { if (n) {
let { pickerList } = this.data; let { pickerList, pickerListAll } = this.data;
let defaultSelectStoreIndex = pickerList?.findIndex((v) => { // 如果 pickerList 还没有初始化,使用 pickerListAll
return v.uuid == n; const listToSearch =
}); pickerList && pickerList.length > 0
this.setData({ ? pickerList
defaultSelectStoreIndex: [defaultSelectStoreIndex], : pickerListAll || [];
selectStoreIndex: defaultSelectStoreIndex, if (listToSearch.length > 0) {
}); let defaultSelectStoreIndex = listToSearch.findIndex((v) => {
return v.uuid == n;
});
if (defaultSelectStoreIndex >= 0) {
this.setData({
defaultSelectStoreIndex: [defaultSelectStoreIndex],
selectStoreIndex: defaultSelectStoreIndex,
});
}
}
} }
}, },
}, },
show: { show: {
type: Boolean, type: Boolean,
observer: function (n) {
// 当 picker 打开时,重新设置默认选中项
if (n) {
wx.nextTick(() => {
const { orderObj, type, referrerId, pickerListAll } =
this.properties;
const pickerList = this.data.pickerList || pickerListAll || [];
if (pickerList.length > 0) {
let value =
referrerId ||
(orderObj
? type == 1
? orderObj.referrerId
: orderObj.deliveryId
: null);
if (value) {
let defaultSelectStoreIndex = pickerList.findIndex((v) => {
return v.uuid == value;
});
if (defaultSelectStoreIndex >= 0) {
this.setData({
defaultSelectStoreIndex: [defaultSelectStoreIndex],
selectStoreIndex: defaultSelectStoreIndex,
});
}
}
}
});
}
},
}, },
}, },
/** /**
...@@ -71,10 +119,33 @@ Component({ ...@@ -71,10 +119,33 @@ Component({
*/ */
methods: { methods: {
init() { init() {
let { pickerListAll } = this.properties; let { pickerListAll, orderObj, type, referrerId } = this.properties;
const clonedList = wx.$util.deepClone(pickerListAll || []);
this.setData({ this.setData({
pickerList: wx.$util.deepClone(pickerListAll), pickerList: clonedList,
}); });
// 设置默认选中项(如果存在)
if (clonedList.length > 0) {
let value =
referrerId ||
(orderObj
? type == 1
? orderObj.referrerId
: orderObj.deliveryId
: null);
if (value) {
let defaultSelectStoreIndex = clonedList.findIndex((v) => {
return v.uuid == value;
});
if (defaultSelectStoreIndex >= 0) {
this.setData({
defaultSelectStoreIndex: [defaultSelectStoreIndex],
selectStoreIndex: defaultSelectStoreIndex,
});
}
}
}
}, },
open() { open() {
...@@ -132,14 +203,58 @@ Component({ ...@@ -132,14 +203,58 @@ Component({
}, },
confirm() { confirm() {
let { selectStoreIndex, pickerListAll, pickerList } = this.data; let { selectStoreIndex, pickerListAll, pickerList } = this.data;
// 安全检查:确保 selectStoreIndex 有效
if (
selectStoreIndex === undefined ||
selectStoreIndex === null ||
isNaN(selectStoreIndex)
) {
selectStoreIndex = 0;
}
// 安全检查:确保 pickerList 存在且有数据
if (
!pickerList ||
!Array.isArray(pickerList) ||
pickerList.length === 0
) {
wx.$util.showToast("员工列表为空");
return;
}
// 确保索引在有效范围内
if (selectStoreIndex < 0 || selectStoreIndex >= pickerList.length) {
selectStoreIndex = 0;
}
const referrerItem = pickerList[selectStoreIndex]; const referrerItem = pickerList[selectStoreIndex];
// 安全检查:确保 referrerItem 存在
if (!referrerItem || !referrerItem.uuid) {
wx.$util.showToast("员工信息无效");
return;
}
// 安全检查:确保 pickerListAll 存在
if (
!pickerListAll ||
!Array.isArray(pickerListAll) ||
pickerListAll.length === 0
) {
wx.$util.showToast("员工列表数据异常");
return;
}
const pickerIndex = pickerListAll.findIndex((v) => { const pickerIndex = pickerListAll.findIndex((v) => {
return v.uuid == referrerItem.uuid; return v.uuid == referrerItem.uuid;
}); });
// console.log(referrerItem)
// console.log(pickerIndex) if (pickerIndex == -1) {
// return wx.$util.showToast("请选择员工");
if (pickerIndex == -1) return wx.$util.showToast("请选择员工"); return;
}
this.triggerEvent("confirm", { value: pickerIndex }); this.triggerEvent("confirm", { value: pickerIndex });
this.setData({ this.setData({
show: false, show: false,
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
"first-step": "../components/FirstStep/FirstStep", "first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStep/SecondStep", "second-step": "../components/SecondStep/SecondStep",
"third-step": "../components/ThirdStep/ThirdStep", "third-step": "../components/ThirdStep/ThirdStep",
"van-dialog": "@vant/weapp/dialog/index" "van-dialog": "@vant/weapp/dialog/index",
"store-referrer-picker": "/packageUsedCar/components/storeReferrerPicker/storeReferrerPicker",
"customerInfo": "/components/CustomerInfo/CustomerInfo"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -6,13 +6,32 @@ ...@@ -6,13 +6,32 @@
bindnavbarReady="navbarReady" bindnavbarReady="navbarReady"
showBack="{{ true }}" showBack="{{ true }}"
bindback="back" bindback="back"
style="margin-bottom:{{ navBarHeight }}px;"
> >
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide">{{title}}</view> <view class="navigation-title-text text-hide">{{title}}</view>
</view> </view>
</navigation-bar> </navigation-bar>
<!-- 状态内容(仅在编辑模式显示) -->
<view wx:if="{{isEdit && detailsInfo && detailsInfo.basic}}" class="status-content">
<view class="flex align-center">
<view class="status mr-24 status-{{detailsInfo.basic.status > 0 ? detailsInfo.basic.status : 0}}">
{{ statusMap[detailsInfo.basic.status] ? statusMap[detailsInfo.basic.status].name : '-' }}
</view>
<view>
<view class="status-box">
<text class="label">工单编号</text>
<text class="value ml-12">{{ detailsInfo.basic.evalOrderNo || '-' }}</text>
</view>
<view class="status-box">
<text class="label">工单时间</text>
<text class="value ml-12">{{ detailsInfo.basic.createdDate || '-' }}</text>
</view>
</view>
</view>
</view>
<!-- 固定在顶部的区域 --> <!-- 固定在顶部的区域 -->
<view class="fixed-header" style="top:{{ navBarHeight }}px;"> <view class="fixed-header" >
<view class="stepper-container flex flex-1"> <view class="stepper-container flex flex-1">
<view class="flex items-center"> <view class="flex items-center">
<view class="step-number-circle {{currentStep >= 1 ? 'active' : ''}}"> <view class="step-number-circle {{currentStep >= 1 ? 'active' : ''}}">
...@@ -47,7 +66,6 @@ ...@@ -47,7 +66,6 @@
<scroll-view <scroll-view
class="scroll-content" class="scroll-content"
scroll-y scroll-y
style="top:calc({{ navBarHeight }}px + {{ fixedHeaderHeight }}px + {{16}}px);"
> >
<!-- 第一步:车辆信息 --> <!-- 第一步:车辆信息 -->
<first-step <first-step
...@@ -59,6 +77,8 @@ ...@@ -59,6 +77,8 @@
isEdit="{{ isEdit }}" isEdit="{{ isEdit }}"
bindconfirm="handleFirstConfirm" bindconfirm="handleFirstConfirm"
bindeditSave="handleEditSave" bindeditSave="handleEditSave"
bindshowReferrerPicker="handleFirstStepReferrerPicker"
bindshowDeliveryPicker="handleFirstStepDeliveryPicker"
mode="{{ 0 }}" mode="{{ 0 }}"
/> />
...@@ -79,8 +99,7 @@ ...@@ -79,8 +99,7 @@
imageData="{{ formData.imageList }}" imageData="{{ formData.imageList }}"
dataAttrName="formData.imageList" dataAttrName="formData.imageList"
/> />
</scroll-view> <view class="btns" >
<view class="btns {{ isFullSucreen ? 'isFullSucreen-btn' : '' }}" >
<view class="btns-con"> <view class="btns-con">
<view class="save text-center" bindtap="cancel" data-save> <view class="save text-center" bindtap="cancel" data-save>
{{ step == "first" ? "取消" : "上一步" }} {{ step == "first" ? "取消" : "上一步" }}
...@@ -90,5 +109,34 @@ ...@@ -90,5 +109,34 @@
}}</view> }}</view>
</view> </view>
</view> </view>
</scroll-view>
<!-- 将 popup 和 picker 组件移到页面级别,避免被 scroll-view 遮挡 -->
<!-- FirstStep 的 picker 组件 -->
<store-referrer-picker
wx:if="{{step === 'first'}}"
bindconfirm="handleFirstStepSalesChange"
show="{{firstStepReferrerPicker}}"
title="{{firstStepPointsMultiRole=='N'?'推荐人':'销售顾问'}}"
type="1"
orderObj="{{ firstStepOrderObj }}"
pickerListAll="{{firstStepEmployeeList}}"
/>
<store-referrer-picker
wx:if="{{step === 'first'}}"
bindconfirm="handleFirstStepDeliveryChange"
show="{{firstStepDeliveryPicker}}"
title="交付专员"
type="2"
orderObj="{{ firstStepOrderObj }}"
pickerListAll="{{firstStepEmployeeList}}"
/>
<customerInfo
wx:if="{{step === 'first'}}"
show="{{firstStepCustomerInfoBox}}"
bindconfirm="handleFirstStepCustomerInfo"
apiType="2"
/>
<van-dialog id="van-dialog" custom-class="addEvaluationForm-dialog" confirm-button-color="#347BFF" z-index="99999" /> <van-dialog id="van-dialog" custom-class="addEvaluationForm-dialog" confirm-button-color="#347BFF" z-index="99999" />
</view> </view>
...@@ -199,11 +199,17 @@ Component({ ...@@ -199,11 +199,17 @@ Component({
}); });
}, },
handleReferrerPicker() { handleReferrerPicker() {
// 通知页面显示 picker(移到页面级别避免被 scroll-view 遮挡)
this.triggerEvent("showReferrerPicker");
// 保留原有逻辑,以防页面没有处理事件
this.setData({ this.setData({
referrerPicker: true, referrerPicker: true,
}); });
}, },
handleDeliveryPicker() { handleDeliveryPicker() {
// 通知页面显示 picker(移到页面级别避免被 scroll-view 遮挡)
this.triggerEvent("showDeliveryPicker");
// 保留原有逻辑,以防页面没有处理事件
this.setData({ this.setData({
deliveryPicker: true, deliveryPicker: true,
}); });
...@@ -228,13 +234,59 @@ Component({ ...@@ -228,13 +234,59 @@ Component({
}); });
}, },
handleSalesChange(e) { handleSalesChange(e) {
let { userInfo } = this.data;
let idx = e.detail.value || 0; let idx = e.detail.value || 0;
let { employeeList } = this.data; let { employeeList } = this.data;
// 安全检查
if (
!employeeList ||
!Array.isArray(employeeList) ||
employeeList.length === 0
) {
console.error("handleSalesChange: employeeList is empty or invalid");
wx.showToast({
title: "员工列表为空",
icon: "none",
});
return;
}
if (idx < 0 || idx >= employeeList.length) {
console.error(
"handleSalesChange: invalid index",
idx,
employeeList.length
);
wx.showToast({
title: "选择无效",
icon: "none",
});
return;
}
const selectedEmployee = employeeList[idx];
if (!selectedEmployee || !selectedEmployee.uuid) {
console.error(
"handleSalesChange: selectedEmployee is invalid",
selectedEmployee
);
wx.showToast({
title: "员工信息无效",
icon: "none",
});
return;
}
let thisPage = wx.$router.getPageInstance(); let thisPage = wx.$router.getPageInstance();
thisPage.setData({ thisPage.setData({
["formData.evalOrderBasicReqDTO.sellerUserId"]: employeeList[idx].uuid, ["formData.evalOrderBasicReqDTO.sellerUserId"]: selectedEmployee.uuid,
["formData.evalOrderBasicReqDTO.sellerName"]: ["formData.evalOrderBasicReqDTO.sellerName"]:
employeeList[idx].staffName, selectedEmployee.staffName || "",
["formData.evalOrderBasicReqDTO.sellerMerchantId"]:
userInfo?.shopMerchantId || "",
["formData.evalOrderBasicReqDTO.sellerMerchantName"]:
userInfo?.shopMerchantName || "",
}); });
this.setData({ this.setData({
referrerPicker: false, referrerPicker: false,
...@@ -243,11 +295,52 @@ Component({ ...@@ -243,11 +295,52 @@ Component({
handleDeliveryChange(e) { handleDeliveryChange(e) {
let idx = e.detail.value || 0; let idx = e.detail.value || 0;
let { employeeList } = this.data; let { employeeList } = this.data;
// 安全检查
if (
!employeeList ||
!Array.isArray(employeeList) ||
employeeList.length === 0
) {
console.error("handleDeliveryChange: employeeList is empty or invalid");
wx.showToast({
title: "员工列表为空",
icon: "none",
});
return;
}
if (idx < 0 || idx >= employeeList.length) {
console.error(
"handleDeliveryChange: invalid index",
idx,
employeeList.length
);
wx.showToast({
title: "选择无效",
icon: "none",
});
return;
}
const selectedEmployee = employeeList[idx];
if (!selectedEmployee || !selectedEmployee.uuid) {
console.error(
"handleDeliveryChange: selectedEmployee is invalid",
selectedEmployee
);
wx.showToast({
title: "员工信息无效",
icon: "none",
});
return;
}
let thisPage = wx.$router.getPageInstance(); let thisPage = wx.$router.getPageInstance();
thisPage.setData({ thisPage.setData({
["formData.evalOrderBasicReqDTO.deliveryId"]: employeeList[idx].uuid, ["formData.evalOrderBasicReqDTO.deliveryId"]: selectedEmployee.uuid,
["formData.evalOrderBasicReqDTO.deliveryName"]: ["formData.evalOrderBasicReqDTO.deliveryName"]:
employeeList[idx].staffName, selectedEmployee.staffName || "",
}); });
this.setData({ this.setData({
deliveryPicker: false, deliveryPicker: false,
...@@ -280,6 +373,7 @@ Component({ ...@@ -280,6 +373,7 @@ Component({
}, },
// 表单输入事件处理 // 表单输入事件处理
inputEvent(e) { inputEvent(e) {
console.log(e, "inputEvent");
let { attr } = e.detail; let { attr } = e.detail;
// 车架号输入处理:实时转大写 + 实时校验 // 车架号输入处理:实时转大写 + 实时校验
if (attr == "vin") { if (attr == "vin") {
......
/* packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxss */ /* packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxss */
.firstStep { .firstStep {
padding: 0 var(--fontSize20);
.box { .box {
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
</gl-form> </gl-form>
</view> </view>
</view> </view>
<store-referrer-picker bindconfirm="handleSalesChange" show="{{referrerPicker}}" title="{{pointsMultiRole=='N'?'推荐人':'销售顾问/录单员'}}" type="1" orderObj="{{ orderObj }}" pickerListAll="{{employeeList}}" /> <!-- popup 和 picker 组件已移到页面级别(addEvaluationForm.wxml),避免被 scroll-view 遮挡 -->
<store-referrer-picker bindconfirm="handleDeliveryChange" show="{{deliveryPicker}}" title="交付专员" type="2" orderObj="{{ orderObj }}" pickerListAll="{{employeeList}}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" apiType="2" />
<!-- van-dialog 组件(必须在 wxml 中引入) --> <!-- van-dialog 组件(必须在 wxml 中引入) -->
<van-dialog id="van-dialog" custom-class="firstStep-dialog" confirm-button-color="#347BFF" z-index="99999" /> <van-dialog id="van-dialog" custom-class="firstStep-dialog" confirm-button-color="#347BFF" z-index="99999" />
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxss */ /* packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxss */
.secondStep { .secondStep {
padding: 0 var(--fontSize20);
.box { .box {
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 var(--fontSize6) var(--fontSize16) 0 #cdcdd159; box-shadow: 0 var(--fontSize6) var(--fontSize16) 0 #cdcdd159;
border-radius: var(--fontSize16); border-radius: var(--fontSize16);
/* margin: var(--fontSize20); */ /* margin: var(--fontSize20); */
padding: var(--fontSize32) 0; padding: 0 0 var(--fontSize32) 0;
margin-bottom: var(--fontSize20); margin-bottom: var(--fontSize20);
/* margin-top: var(--fontSize50); */ /* margin-top: var(--fontSize50); */
color: #222222; color: #222222;
......
/* packageUsedCar/pages/evaluationForm/components/ThirdStep/ThirdStep.wxss */ /* packageUsedCar/pages/evaluationForm/components/ThirdStep/ThirdStep.wxss */
.thirdStep { .thirdStep {
padding: 0 var(--fontSize20);
.box { .box {
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
...@@ -32,6 +31,84 @@ ...@@ -32,6 +31,84 @@
justify-content: space-between; justify-content: space-between;
} }
.upload-images-wrapper {
display: flex;
gap: 28rpx;
flex-wrap: wrap;
.uploaded-image-container {
position: relative;
border-radius: 12rpx;
overflow: hidden;
.uploaded-image {
background: #F5F5F7;
width: 196rpx;
height: 196rpx;
}
.video-container {
position: relative;
width: 196rpx;
height: 196rpx;
background: #F5F5F7;
image {
width: 100%;
height: 100%;
}
.video-play-icon {
position: absolute;
left: 12rpx;
bottom: 16rpx;
width: 40rpx;
height: 40rpx;
.icon-upload-play {
width: 100%;
height: 100%;
}
}
}
.delete-icon {
position: absolute;
top: 12rpx;
right: 12rpx;
width: 40rpx;
height: 40rpx;
.icon-icon-circle-error {
width: 100%;
height: 100%;
}
}
}
.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;
}
.upload-text {
margin-top: 16rpx;
color: #999EA8;
font-size: 24rpx;
}
}
}
.upload-item { .upload-item {
margin-bottom: var(--fontSize32); margin-bottom: var(--fontSize32);
......
<!-- packageUsedCar/pages/evaluationForm/components/ThirdStep/ThirdStep.wxml --> <!-- packageUsedCar/pages/evaluationForm/components/ThirdStep/ThirdStep.wxml -->
<wxs module="utils"> <wxs module="utils">
// 判断 coverUrl 是否有效(不能是视频文件 URL)
var hasValidCoverUrl = function(coverUrl) {
if (!coverUrl || coverUrl === '' || coverUrl === 'undefined' || coverUrl === 'null') {
return false;
}
// 如果 coverUrl 是视频文件(.mp4, .mov, .avi 等),则认为是无效的封面图
var videoExtensions = ['.mp4', '.mov', '.avi', '.m4v', '.3gp', '.flv', '.wmv'];
var lowerUrl = coverUrl.toLowerCase();
for (var i = 0; i < videoExtensions.length; i++) {
if (lowerUrl.indexOf(videoExtensions[i]) !== -1) {
return false;
}
}
return true;
};
// 计算upload-text // 计算upload-text
var getUploadText = function(imageList, key, maxCount, defaultText) { var getUploadText = function(imageList, key, maxCount, defaultText) {
var currentCount = 0; var currentCount = 0;
...@@ -17,9 +33,17 @@ ...@@ -17,9 +33,17 @@
fileList = imageList[key]; fileList = imageList[key];
} }
// 获取数组长度 // 获取已完成文件的数量(status === 'done' 或没有 status 字段,说明是编辑回显的数据)
if (fileList && fileList.length != null) { if (fileList && fileList.length != null) {
currentCount = fileList.length; for (var i = 0; i < fileList.length; i++) {
var file = fileList[i];
if (file) {
// 如果 status 是 'done' 或者没有 status 字段(编辑回显的数据),都计算在内
if (!file.status || file.status === 'done') {
currentCount = currentCount + 1;
}
}
}
} }
} }
...@@ -30,8 +54,43 @@ ...@@ -30,8 +54,43 @@
return defaultText || '上传照片'; return defaultText || '上传照片';
}; };
// 获取已完成文件的数量
var getDoneCount = function(imageList, key) {
var count = 0;
if (imageList && key != null) {
var fileList = null;
var keyStr = '' + key;
var keyNum = key - 0;
// 按优先级尝试:数字 -> 字符串 -> 原始值
if (imageList[keyNum] != null) {
fileList = imageList[keyNum];
} else if (imageList[keyStr] != null) {
fileList = imageList[keyStr];
} else if (imageList[key] != null) {
fileList = imageList[key];
}
// 计算已完成文件的数量(status === 'done' 或没有 status 字段,说明是编辑回显的数据)
if (fileList && fileList.length != null) {
for (var i = 0; i < fileList.length; i++) {
var file = fileList[i];
if (file) {
// 如果 status 是 'done' 或者没有 status 字段(编辑回显的数据),都计算在内
if (!file.status || file.status === 'done') {
count = count + 1;
}
}
}
}
}
return count;
};
module.exports = { module.exports = {
getUploadText: getUploadText getUploadText: getUploadText,
getDoneCount: getDoneCount,
hasValidCoverUrl: hasValidCoverUrl
}; };
</wxs> </wxs>
<view class="thirdStep"> <view class="thirdStep">
...@@ -91,7 +150,33 @@ ...@@ -91,7 +150,33 @@
{{ item.label }} {{ item.label }}
<text wx:if="{{ item.required }}" class="required">*</text> <text wx:if="{{ item.required }}" class="required">*</text>
</view> </view>
<van-uploader class="plus" file-list="{{ imageList[item.key] || [] }}" upload-text="{{ utils.getUploadText(imageList, item.key, item.maxCount || 1, '上传视频') }}" max-count="{{ item.maxCount || 1 }}" deletable preview-size="var(--fontSize192)" accept="video" bind:after-read="handleUpload" bind:delete="handleDelete" data-key="{{ item.key }}" data-label="{{ item.label }}" /> <view class="upload-images-wrapper">
<!-- 已上传的图片/视频列表 -->
<block wx:for="{{ imageList[item.key] || [] }}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<view wx:if="{{ !subItem.status || subItem.status === 'done' }}" class="uploaded-image-container">
<!-- 视频 -->
<view wx:if="{{ subItem.isVideo }}" class="video-container" bindtap="previewVideoMedia" data-key="{{ item.key }}" data-file-url="{{ subItem.url }}">
<image wx:if="{{ utils.hasValidCoverUrl(subItem.coverUrl) }}" src="{{ subItem.coverUrl }}" mode="aspectFit"></image>
<image wx:else src="{{ IMG_URL }}usedCar/video_default.png" 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="previewVideoMedia" data-key="{{ item.key }}" data-file-url="{{ subItem.url }}"></image>
<view class="delete-icon" bindtap="handleDelete" data-key="{{ item.key }}" data-index="{{ subIndex }}">
<image src="{{ IMG_URL }}zy_paf_del_icon.png" class="icon-icon-circle-error"></image>
</view>
</view>
</block>
<!-- 上传按钮 -->
<view wx:if="{{ utils.getDoneCount(imageList, item.key) < (item.maxCount || 1) }}" class="upload-item" bindtap="handleVideoUpload" data-field="{{ item }}">
<image src="{{ IMG_URL }}zy-upload_icon.png" class="icon-uploadAdd"></image>
<view class="upload-text">
{{ utils.getUploadText(imageList, item.key, item.maxCount || 1, '上传视频') }}
</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
......
const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
Component({ Component({
properties: { properties: {
show: { show: {
...@@ -16,9 +19,18 @@ Component({ ...@@ -16,9 +19,18 @@ Component({
type: Array, type: Array,
value: [], value: [],
}, },
singleButton: {
type: Boolean,
value: false,
},
confirmText: {
type: String,
value: "确认",
},
}, },
data: { data: {
IMG_URL,
videoProcess: "?x-oss-process=video/snapshot,t_0,f_jpg", videoProcess: "?x-oss-process=video/snapshot,t_0,f_jpg",
}, },
......
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {
"popup": "../../../../components/Popup/Popup"
}
} }
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
splitUrls: splitUrls splitUrls: splitUrls
}; };
</wxs> </wxs>
<popup show="{{show}}" title="{{title }}" height="{{height}}" bindconfirm="onConfirm" bindcancel="onCancel"> <popup show="{{show}}" title="{{title }}" height="{{height}}" bindconfirm="onConfirm" bindcancel="onCancel" singleButton="{{singleButton}}" confirmText="{{confirmText}}">
<scroll-view scroll-y class="change-popup"> <scroll-view scroll-y class="change-popup">
<block wx:for="{{changes}}" wx:key="idx" wx:for-item="item" wx:for-index="idx"> <block wx:for="{{changes}}" wx:key="idx" wx:for-item="item" wx:for-index="idx">
<view class="change-card"> <view class="change-card">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<view wx:if="{{utils.isMedia(item.fieldBeforeValue)}}" class="media-list"> <view wx:if="{{utils.isMedia(item.fieldBeforeValue)}}" class="media-list">
<block wx:for="{{utils.splitUrls(item.fieldBeforeValue)}}" wx:key="*this" wx:for-item="url" wx:for-index="urlIdx"> <block wx:for="{{utils.splitUrls(item.fieldBeforeValue)}}" wx:key="*this" wx:for-item="url" wx:for-index="urlIdx">
<view wx:if="{{utils.isVideo(url)}}" class="media-box video" bindtap="onPreview" data-url="{{url}}" data-type="video"> <view wx:if="{{utils.isVideo(url)}}" class="media-box video" bindtap="onPreview" data-url="{{url}}" data-type="video">
<image class="media-img" src="{{url + videoProcess}}" mode="aspectFill" /> <image class="media-img" src="{{ IMG_URL }}usedCar/video_default.png" mode="aspectFill" />
<view class="play-icon"></view> <view class="play-icon"></view>
</view> </view>
<view wx:else class="media-box" bindtap="onPreview" data-url="{{url}}" data-type="image"> <view wx:else class="media-box" bindtap="onPreview" data-url="{{url}}" data-type="image">
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<view wx:if="{{utils.isMedia(item.fieldAfterValue)}}" class="media-list"> <view wx:if="{{utils.isMedia(item.fieldAfterValue)}}" class="media-list">
<block wx:for="{{utils.splitUrls(item.fieldAfterValue)}}" wx:key="*this" wx:for-item="url" wx:for-index="urlIdx"> <block wx:for="{{utils.splitUrls(item.fieldAfterValue)}}" wx:key="*this" wx:for-item="url" wx:for-index="urlIdx">
<view wx:if="{{utils.isVideo(url)}}" class="media-box video" bindtap="onPreview" data-url="{{url}}" data-type="video"> <view wx:if="{{utils.isVideo(url)}}" class="media-box video" bindtap="onPreview" data-url="{{url}}" data-type="video">
<image class="media-img" src="{{url + videoProcess}}" mode="aspectFill" /> <image class="media-img" src="{{ IMG_URL }}usedCar/video_default.png" mode="aspectFill" />
<view class="play-icon"></view> <view class="play-icon"></view>
</view> </view>
<view wx:else class="media-box" bindtap="onPreview" data-url="{{url}}" data-type="image"> <view wx:else class="media-box" bindtap="onPreview" data-url="{{url}}" data-type="image">
......
...@@ -165,7 +165,7 @@ const formRule = { ...@@ -165,7 +165,7 @@ const formRule = {
const firstObj = { const firstObj = {
customerFormList: [ customerFormList: [
{ {
label: "销售顾问/录单员", label: "销售顾问",
name: "referrerId", name: "referrerId",
type: "slot", type: "slot",
required: true, required: true,
...@@ -415,6 +415,7 @@ const licenseObj = { ...@@ -415,6 +415,7 @@ const licenseObj = {
type: "input", type: "input",
maxlength: "1", maxlength: "1",
fieldType: "number", fieldType: "number",
inputType: "number",
inputLimit: { inputLimit: {
type: "number", type: "number",
minVal: 0, minVal: 0,
...@@ -429,6 +430,7 @@ const licenseObj = { ...@@ -429,6 +430,7 @@ const licenseObj = {
type: "input", type: "input",
maxlength: "1", maxlength: "1",
fieldType: "number", fieldType: "number",
inputType: "number",
inputLimit: { inputLimit: {
type: "number", type: "number",
minVal: 0, minVal: 0,
...@@ -478,6 +480,10 @@ const licenseObj = { ...@@ -478,6 +480,10 @@ const licenseObj = {
type: "input", type: "input",
maxlength: "11", maxlength: "11",
fieldType: "number", fieldType: "number",
inputType: "number",
inputLimit: {
type: "number",
},
required: true, required: true,
requiredAfter: true, requiredAfter: true,
}, },
......
...@@ -89,6 +89,8 @@ ...@@ -89,6 +89,8 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
color: #292D33;
font-weight: 500;
} }
.car-box { .car-box {
flex-wrap: wrap; flex-wrap: wrap;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view> <view>
<view class="flex align-center"> <view class="flex align-center">
<view class="common-label">评估价:</view> <view class="common-label">评估价:</view>
<view class="price {{carInfo.evalPriceDisplay && carInfo.status != 10 ? 'text-blue' : ''}}"> <view class="price text-blue">
{{ carInfo.status == 10 || (carInfo.previousStatus == 10 && carInfo.status == -1) ? '评估中' : carInfo.evalPriceDisplay }} {{ carInfo.status == 10 || (carInfo.previousStatus == 10 && carInfo.status == -1) ? '评估中' : carInfo.evalPriceDisplay }}
</view> </view>
</view> </view>
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
margin-right: var(--fontSize24); margin-right: var(--fontSize24);
.timeline-dot { .timeline-dot {
width: var(--fontSize32); width: var(--fontSize30);
height: var(--fontSize32); height: var(--fontSize30);
border-radius: 50%; border-radius: 50%;
background: #8eb2fb; background: #8eb2fb;
opacity: 1; opacity: 1;
......
...@@ -103,8 +103,8 @@ Page({ ...@@ -103,8 +103,8 @@ Page({
confirmCarUploadFields: [ confirmCarUploadFields: [
{ key: 'handoverPhotoFrontFourFive', label: '正面45度', required: true, maxCount: 1 }, { key: 'handoverPhotoFrontFourFive', label: '正面45度', required: true, maxCount: 1 },
{ key: 'handoverPhotoFront', label: '正面', required: false, maxCount: 1 }, { key: 'handoverPhotoFront', label: '正面', required: false, maxCount: 1 },
{ key: 'handoverPhotoLeftSide', label: '左侧面', required: false, maxCount: 1 },
{ key: 'handoverPhotoBack', label: '后面', required: false, maxCount: 1 }, { key: 'handoverPhotoBack', label: '后面', required: false, maxCount: 1 },
{ key: 'handoverPhotoLeftSide', label: '左侧面', required: false, maxCount: 1 },
{ key: 'handoverPhotoRightSide', label: '右侧面', required: false, maxCount: 1, helfWidth: true }, { key: 'handoverPhotoRightSide', label: '右侧面', required: false, maxCount: 1, helfWidth: true },
{ key: 'handoverPhotoMore', label: '其他', required: false, maxCount: 5, fullwidth: true } { key: 'handoverPhotoMore', label: '其他', required: false, maxCount: 5, fullwidth: true }
], ],
......
...@@ -54,7 +54,7 @@ Page({ ...@@ -54,7 +54,7 @@ Page({
{ {
label: "品牌车型", label: "品牌车型",
key: "carInfo.carSeriesName", key: "carInfo.carSeriesName",
formatter: (val, data) => `${val} ${data.carInfo.carTypeName}`, formatter: true, // 标识需要特殊格式化,WXS 中通过 key 判断处理
}, },
{ label: "车架号", key: "carInfo.vin" }, { label: "车架号", key: "carInfo.vin" },
{ label: "车牌号", key: "carInfo.licensePlate" }, { label: "车牌号", key: "carInfo.licensePlate" },
...@@ -63,12 +63,12 @@ Page({ ...@@ -63,12 +63,12 @@ Page({
{ {
label: "上牌城市", label: "上牌城市",
key: "carInfo.registrationProvinceName", key: "carInfo.registrationProvinceName",
formatter: (val, data) => `${val}-${data.carInfo.registrationCityName}`, formatter: true, // 标识需要特殊格式化,WXS 中通过 key 判断处理
}, },
{ {
label: "车辆所在地", label: "车辆所在地",
key: "carInfo.carProvinceName", key: "carInfo.carProvinceName",
formatter: (val, data) => `${val}-${data.carInfo.carCityName}`, formatter: true, // 标识需要特殊格式化,WXS 中通过 key 判断处理
}, },
{ label: "表显里程", key: "carInfo.mileage", cell: "公里" }, { label: "表显里程", key: "carInfo.mileage", cell: "公里" },
{ label: "使用性质", key: "carInfo.usageType", map: "usageTypeMap" }, { label: "使用性质", key: "carInfo.usageType", map: "usageTypeMap" },
...@@ -202,7 +202,7 @@ Page({ ...@@ -202,7 +202,7 @@ Page({
{ label: "手机号码", key: "signingInfo.custodyContract.custodianPhone" }, { label: "手机号码", key: "signingInfo.custodyContract.custodianPhone" },
{ {
label: "查阅合同", label: "查阅合同",
key: "signingInfo.custodyContract.docTemplateName", key: "signingInfo.custodyContract.contractUrl",
type: "link", type: "link",
}, },
], ],
...@@ -614,40 +614,79 @@ Page({ ...@@ -614,40 +614,79 @@ Page({
// PDF预览 // PDF预览
pdfPreview(e) { pdfPreview(e) {
const { url } = e.currentTarget.dataset; const { contractNo } = e.currentTarget.dataset;
if (!url) return; if (!contractNo) {
wx.showToast({
wx.downloadFile({ title: "合同编号不存在",
url: url, icon: "none",
success: (res) => { });
const filePath = res.tempFilePath; return;
wx.openDocument({ }
filePath: filePath,
fileType: "pdf", // 显示加载提示
success: () => { wx.showLoading({
console.log("打开文档成功"); title: "加载中...",
});
// 先通过合同编号获取线上链接
newApi
.viewOnlineContract({
contractNo: contractNo,
})
.then((res) => {
wx.hideLoading();
const url = res?.data?.data.contractUrl;
if (!url) {
wx.showToast({
title: "获取合同链接失败",
icon: "none",
});
return;
}
// 下载文件
wx.downloadFile({
url: url,
success: (downloadRes) => {
const filePath = downloadRes.tempFilePath;
// 打开文档
wx.openDocument({
filePath: filePath,
fileType: "pdf",
success: () => {
console.log("打开文档成功");
},
fail: (err) => {
console.error("打开文档失败", err);
wx.showToast({
title: "打开文档失败",
icon: "none",
});
},
});
}, },
fail: (err) => { fail: (err) => {
console.error("打开文档失败", err); console.error("下载文件失败", err);
wx.showToast({ wx.showToast({
title: "打开文档失败", title: "下载文件失败",
icon: "none", icon: "none",
}); });
}, },
}); });
}, })
fail: (err) => { .catch((err) => {
console.error("下载文件失败", err); wx.hideLoading();
console.error("获取合同链接失败", err);
wx.showToast({ wx.showToast({
title: "下载文件失败", title: "获取合同链接失败",
icon: "none", icon: "none",
}); });
}, });
});
}, },
// 切换Tab // 切换Tab
switchTabByKey(e) { switchTabByKey(e) {
wx.$track.setTrackData(0, "mini_evaluation_tabChange", {}, "", 7);
const key = e.currentTarget.dataset.key; const key = e.currentTarget.dataset.key;
this.setData({ this.setData({
activeTabKey: key, activeTabKey: key,
...@@ -728,6 +767,7 @@ Page({ ...@@ -728,6 +767,7 @@ Page({
}, },
getDetail(evalOrderNo) { getDetail(evalOrderNo) {
wx.$track.setTrackData(0, "mini_evaluation_from_details", {}, "", 7);
const that = this; const that = this;
wx.showLoading({ wx.showLoading({
title: "加载中...", title: "加载中...",
......
...@@ -172,7 +172,7 @@ page { ...@@ -172,7 +172,7 @@ page {
font-size: var(--fontSize20); font-size: var(--fontSize20);
color: #9398a3; color: #9398a3;
border-radius: var(--fontSize4); border-radius: var(--fontSize4);
padding: var(--fontSize4) var(--fontSize12); padding: var(--fontSize4) 0;
border: var(--fontSize2) solid #e8ecf0; border: var(--fontSize2) solid #e8ecf0;
display: inline-block; display: inline-block;
} }
...@@ -189,8 +189,8 @@ page { ...@@ -189,8 +189,8 @@ page {
margin-left: var(--fontSize16); margin-left: var(--fontSize16);
} }
.common-label { .common-label {
color: #666666; color: #999ea8;
font-size: var(--fontSize26); font-size: var(--fontSize24);
} }
.price { .price {
font-size: var(--fontSize32); font-size: var(--fontSize32);
...@@ -199,7 +199,7 @@ page { ...@@ -199,7 +199,7 @@ page {
font-weight: 600; font-weight: 600;
} }
.text-blue { .text-blue {
color: #ff6b00 !important; color: #3b73ff;
font-weight: 700; font-weight: 700;
font-size: var(--fontSize36) !important; font-size: var(--fontSize36) !important;
} }
...@@ -231,7 +231,8 @@ page { ...@@ -231,7 +231,8 @@ page {
transition: all 0.3s; transition: all 0.3s;
background: #ffffff; background: #ffffff;
flex-shrink: 0; flex-shrink: 0;
padding: var(--fontSize16) var(--fontSize18); line-height: var(--fontSize60);
padding: 0 var(--fontSize18);
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
......
...@@ -29,8 +29,8 @@ Component({ ...@@ -29,8 +29,8 @@ Component({
{ text: '已报价', count: 0, keyNum: 'quotedNum', key: '20' }, { text: '已报价', count: 0, keyNum: 'quotedNum', key: '20' },
{ text: '已签约', count: 0, keyNum: 'signedNum', key: '30' }, { text: '已签约', count: 0, keyNum: 'signedNum', key: '30' },
{ text: '已支付(定金)', count: 0, keyNum: 'depositPaidNum', key: '40' }, { text: '已支付(定金)', count: 0, keyNum: 'depositPaidNum', key: '40' },
{ text: '已签署确认单', count: 0, keyNum: 'signedDeliveryConfirmNum', key: '31' }, { text: '已签署(确认单)', count: 0, keyNum: 'signedDeliveryConfirmNum', key: '31' },
{ text: '已签署协议', count: 0, keyNum: 'signedCustodyAgreementNum', key: '32' }, { text: '已签署(协议)', count: 0, keyNum: 'signedCustodyAgreementNum', key: '32' },
{ text: '已完成', count: 0, keyNum: 'completedNum', key: '100' }, { text: '已完成', count: 0, keyNum: 'completedNum', key: '100' },
{ text: '已驳回', count: 0, keyNum: 'rejectedNum', key: '-1' } { text: '已驳回', count: 0, keyNum: 'rejectedNum', key: '-1' }
], ],
...@@ -333,7 +333,7 @@ Component({ ...@@ -333,7 +333,7 @@ Component({
return; return;
} }
wx.showModal({ wx.showModal({
title: "重要提示", title: "提示",
content: "是否确定取消签约?", content: "是否确定取消签约?",
confirmColor: "#347BFF", confirmColor: "#347BFF",
complete: async (res) => { complete: async (res) => {
......
...@@ -117,7 +117,7 @@ page { ...@@ -117,7 +117,7 @@ page {
width: 344rpx; width: 344rpx;
height: 208rpx; height: 208rpx;
} }
color: #999999; color: #999EA8;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
width: 100%; width: 100%;
...@@ -437,6 +437,9 @@ page { ...@@ -437,6 +437,9 @@ page {
background: #347BFF; background: #347BFF;
} }
} }
.font-s28 {
font-size: 28rpx;
}
.flex { .flex {
display: flex; display: flex;
} }
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<!-- 身份证上传 --> <!-- 身份证上传 -->
<view class="upload-container mb-24"> <view class="upload-container mb-24">
<view class="form-item"> <view class="form-item">
<view class="from-label"> <view class="from-label font-s28">
身份证 身份证
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<!-- 三方/委托交易凭证 --> <!-- 三方/委托交易凭证 -->
<view class="upload-container"> <view class="upload-container">
<view class="form-item"> <view class="form-item">
<view class="from-label">三方/委托交易凭证</view> <view class="from-label font-s28">三方/委托交易凭证</view>
<view wx:if="{{formData.thirdPartyTransactionVoucher}}" class="uploaded-item"> <view wx:if="{{formData.thirdPartyTransactionVoucher}}" class="uploaded-item">
<block wx:if="{{thirdPartyTransactionType == 'video'}}"> <block wx:if="{{thirdPartyTransactionType == 'video'}}">
<view style="width: 100%;height: 100%;" bindtap="previewMedia" data-coverurl="{{thirdPartyTransactionCoverUrl}}" data-media="{{formData.thirdPartyTransactionVoucher}}"> <view style="width: 100%;height: 100%;" bindtap="previewMedia" data-coverurl="{{thirdPartyTransactionCoverUrl}}" data-media="{{formData.thirdPartyTransactionVoucher}}">
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
<!-- 收款人证件上传 --> <!-- 收款人证件上传 -->
<view class="upload-container"> <view class="upload-container">
<view class="form-item"> <view class="form-item">
<view class="from-label">身份证</view> <view class="from-label font-s28">身份证</view>
<view class="flex align-start justify-between"> <view class="flex align-start justify-between">
<block> <block>
<view wx:if="{{formData.payerIdCardFrontUrl}}" class="uploaded-item icard"> <view wx:if="{{formData.payerIdCardFrontUrl}}" class="uploaded-item icard">
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<!-- 银行卡上传 --> <!-- 银行卡上传 -->
<view class="upload-container"> <view class="upload-container">
<view class="form-item"> <view class="form-item">
<view class="from-label">银行卡(卡号面)</view> <view class="from-label font-s28">银行卡(卡号面)</view>
<view wx:if="{{formData.payerBankCardUrl}}" class="uploaded-item"> <view wx:if="{{formData.payerBankCardUrl}}" class="uploaded-item">
<image src="{{formData.payerBankCardUrl}}" bindtap="previewImage" data-field="payerBankCardUrl" mode="aspectFit"></image> <image src="{{formData.payerBankCardUrl}}" bindtap="previewImage" data-field="payerBankCardUrl" mode="aspectFit"></image>
<view class="delete-icon" bindtap="removeMedia" data-field="payerBankCardUrl"> <view class="delete-icon" bindtap="removeMedia" data-field="payerBankCardUrl">
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
<!-- 随车材料 --> <!-- 随车材料 -->
<view class="upload-container"> <view class="upload-container">
<view class="form-item" > <view class="form-item" >
<view class="from-label mb-28"> <view class="from-label font-s28 mb-28">
随车材料 随车材料
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
......
<!--packageUsedCar/pages/indexPage/dailyReport/dailyReport.wxml--> <!--packageUsedCar/pages/indexPage/dailyReport/dailyReport.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" navStyle="{{'box-shadow:none;' }}" showBack bindback="back">
<view class="title-text">驻店日报</view> <view class="title-text">驻店日报</view>
</navigation-bar> </navigation-bar>
<wxs src="./index.wxs" module="filter" /> <wxs src="./index.wxs" module="filter" />
......
...@@ -29,7 +29,7 @@ const sceneList = [ ...@@ -29,7 +29,7 @@ const sceneList = [
}, },
{ {
sceneName: '二手车', sceneName: '二手车',
sceneDesc: '门店二手车置换或报废业务', sceneDesc: '二手车业务',
sceneType: 7, sceneType: 7,
actived: false, actived: false,
recordId:5, recordId:5,
......
...@@ -531,7 +531,7 @@ Page({ ...@@ -531,7 +531,7 @@ Page({
) { ) {
wx.$track.setTrackData(0, 'mentorship_page', {}, '', 1) wx.$track.setTrackData(0, 'mentorship_page', {}, '', 1)
} }
// 飞行督导/导师点击工作日报入口埋点 // 飞行督导/导师点击延保日报入口埋点
if ( if (
item.url == 'tabWorkOrder.supervisorDaily' && item.url == 'tabWorkOrder.supervisorDaily' &&
(userInfo?.loginRole == 6 || mentorFlag) (userInfo?.loginRole == 6 || mentorFlag)
...@@ -1324,11 +1324,11 @@ Page({ ...@@ -1324,11 +1324,11 @@ Page({
.then(res => { .then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
let index = menu.findIndex(v => v.name == '工作日报') let index = menu.findIndex(v => v.name == '延保日报')
if (index > -1) menu.splice(index, 1) if (index > -1) menu.splice(index, 1)
if (data && menu.every(item => item.name != '工作日报')) { if (data && menu.every(item => item.name != '延保日报')) {
menu.push({ menu.push({
name: '工作日报', name: '延保日报',
url: 'tabWorkOrder.supervisorDaily', url: 'tabWorkOrder.supervisorDaily',
icon: 'supervisorDaily', icon: 'supervisorDaily',
recordId: 15 recordId: 15
...@@ -1499,10 +1499,10 @@ Page({ ...@@ -1499,10 +1499,10 @@ Page({
// 区域运营/飞行督导 // 区域运营/飞行督导
if ( if (
(userInfo?.loginRole == 3 || userInfo?.loginRole == 6) && (userInfo?.loginRole == 3 || userInfo?.loginRole == 6) &&
menu.every(item => item.name != '工作日报') menu.every(item => item.name != '延保日报')
) { ) {
menu.push({ menu.push({
name: '工作日报', name: '延保日报',
url: 'tabWorkOrder.supervisorDaily', url: 'tabWorkOrder.supervisorDaily',
icon: 'supervisorDaily', icon: 'supervisorDaily',
recordId: 15 recordId: 15
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="layout {{ flag ? 'opacity' : '' }}" v-loading="true"> <view class="layout {{ flag ? 'opacity' : '' }}" v-loading="true">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="true"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="true">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide">工作日报</view> <view class="navigation-title-text text-hide">延保日报</view>
</view> </view>
</navigation-bar> </navigation-bar>
<view style="margin-top:{{ navBarHeight }}px"> <view style="margin-top:{{ navBarHeight }}px">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!