Commit b01dbdf7 by 前端

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

上线合并

See merge request !462
2 parents 4a8431d0 1ef636f1
Showing 213 changed files with 4284 additions and 219 deletions
......@@ -454,5 +454,9 @@ module.exports = {
// 学习中心-短课程详情
getShortCourseDetail(data) {
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'])
}
}
......@@ -238,6 +238,20 @@
]
},
{
"root": "packageUsedCar",
"name": "packageUsedCar",
"pages": [
"pages/TabBar/usedCarPage",
"pages/evaluationForm/addEvaluationForm/addEvaluationForm",
"pages/evaluationForm/evaluationFormDetails/evaluationFormDetails",
"pages/evaluationForm/confirmCar/confirmCar",
"pages/evaluationForm/signInfo/signInfo",
"pages/indexPage/dailyReport/dailyReport",
"pages/deliveryNote/deliveryDetail/deliveryDetail",
"pages/ocrUsedCarModules/ocrUsedCarModules"
]
},
{
"root": "packageStudyCenter",
"name": "packageStudyCenter",
"pages": [
......@@ -297,6 +311,9 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents",
"resizable": true
}
......@@ -176,10 +176,12 @@ Component({
value = number
}
}
const diffValue = value.toString()
const trimValue = value.toString().trim()
if (diffValue != trimValue) {
value = trimValue
if(!item.isAgreeTrim) {
const diffValue = value.toString()
const trimValue = value.toString().trim()
if (diffValue != trimValue) {
value = trimValue
}
}
thisPage.setData({
......
......@@ -5,7 +5,7 @@
left: 0;
bottom: 0;
right: 0;
z-index: 998;
z-index: 99999 !important;
transform: translateZ(2px);
}
......
......@@ -21,7 +21,7 @@ Component({
value: 'var(--fontSize980)'
},
sceneObj: {
observer: function(v) {
observer: function (v) {
// 是否是扫码核销或再次下单,是的话不显示补录入口
if (Object.keys(v)?.length) {
let { payTypeList } = this.data
......@@ -57,9 +57,9 @@ Component({
value: '5',
tips: '适用于已有交易收款流水需补录订单时'
}, {
label: '收款方为嘀加二维码收款',
label: '特殊收款',
value: '6',
tips: '适用于多笔订单一笔流水付款'
tips: '仅用于无法关联流水或混合支付场景,请谨慎选择。'
}]
},
......
......@@ -4,10 +4,10 @@
*/
// 配置预发布的小程序aapId
export const preReleaseAppId = 'wx96c8f2a3e76907cb'
export const preReleaseAppId = "wx96c8f2a3e76907cb";
// 小程序id
export const appId = 'wx570d9331f9ace0bd'
export const appId = "wx570d9331f9ace0bd";
/**
* 环境指定
......@@ -18,99 +18,99 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 2
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
//手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false
const release = false
const manual = false;
const release = false;
// 判断小程序环境
// develop:开发版 trial:体验版 release:正式版
if (systemInfo.platform != 'devtools') {
if (systemInfo.platform != "devtools") {
if (accountInfo.miniProgram.appId == preReleaseAppId) {
index = 4
index = 4;
} else {
switch (envName) {
case 'develop':
break
case 'trial':
index = manual ? index : 2
break
case 'release':
index = release ? index : 3
break
case "develop":
break;
case "trial":
index = manual ? index : 2;
break;
case "release":
index = release ? index : 3;
break;
default:
index = 3
break
index = 3;
break;
}
}
}
export const env = envName
export const envIndex = index
export const env = envName;
export const envIndex = index;
const createQuotedUrl = {
develop: `http://192.168.1.178:9528/dj-scrm-wx-work-main-zhangls/#/equityPoster?id=`,
trial: `http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/equityPoster?id=`,
release: `https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/equityPoster?id=`,
preRelease: `https://dj.beta.glsx.com.cn/dj-car-boutique-work-wechat/#/equityPoster?id=`
}
preRelease: `https://dj.beta.glsx.com.cn/dj-car-boutique-work-wechat/#/equityPoster?id=`,
};
const scoketURL = {
develop: `ws://192.168.3.191:7865`,
trial: `ws://salesgpt.test.glsx.com.cn`,
release: `wss://salesgpt.glsx.com.cn`,
preRelease: `ws://salesgpt.test.glsx.com.cn`
}
const target = ['ip', 'develop', 'trial', 'release', 'preRelease']
preRelease: `ws://salesgpt.test.glsx.com.cn`,
};
const target = ["ip", "develop", "trial", "release", "preRelease"];
const ALIYUN_LIST = [
{
AKID: 'LTAI5tJday6R4sng1jgrgH3N', //个人
AKKEY: 'TWvwaQqwjxw7Tj7RlnTxyEXjOjQgFh',
APPKEY: 'a1HmjrmQNv6yT8zb',
URL: 'wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1'
AKID: "LTAI5tJday6R4sng1jgrgH3N", //个人
AKKEY: "TWvwaQqwjxw7Tj7RlnTxyEXjOjQgFh",
APPKEY: "a1HmjrmQNv6yT8zb",
URL: "wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1",
},
{
AKID: 'LTAI5tCSaRbXmWhF7cR6k626', //公司
AKKEY: 'jYHkk6rR6UoaZWikxDTuAUNwJycJwb',
APPKEY: 'Pm7teJgylXGPnPvO',
URL: 'wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1'
AKID: "LTAI5tCSaRbXmWhF7cR6k626", //公司
AKKEY: "jYHkk6rR6UoaZWikxDTuAUNwJycJwb",
APPKEY: "Pm7teJgylXGPnPvO",
URL: "wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1",
},
{
AKID: 'LTAI5tCv6tv55tZVyV4uQKd6', //个人
AKKEY: 'K3eko04dQ88KWltUEbY3A7h5twdjJk',
APPKEY: 'xKQ7JCyBsyNFjUdL',
URL: 'wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1'
}
]
export const ALIYUN = ALIYUN_LIST[1]
AKID: "LTAI5tCv6tv55tZVyV4uQKd6", //个人
AKKEY: "K3eko04dQ88KWltUEbY3A7h5twdjJk",
APPKEY: "xKQ7JCyBsyNFjUdL",
URL: "wss://nls-gateway-cn-shanghai.aliyuncs.com/ws/v1",
},
];
export const ALIYUN = ALIYUN_LIST[1];
// 报价单图片地址
export const quotedImgUrl = createQuotedUrl[target[envIndex]]
export const scoket_url = scoketURL[target[envIndex]]
export const quotedImgUrl = createQuotedUrl[target[envIndex]];
export const scoket_url = scoketURL[target[envIndex]];
// sentry Dsn 地址
export const dsnUrl =
'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
"https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23";
// 图片基地址
export const ImgUrl =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat'
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat";
export const ossConfig = {
// 请求域名 格式:https://xxx.xxx.com
HTTP_REQUEST_URL: 'http://127.0.0.1:8000/api',
HTTP_REQUEST_URL: "http://127.0.0.1:8000/api",
// 阿里云oss域名 格式:https://xxx.oss-cn-xxx.aliyuncs.com
OSS_DOMAIN: 'https://glsk-oss.oss-cn-shenzhen.aliyuncs.com',
OSS_DOMAIN: "https://glsk-oss.oss-cn-shenzhen.aliyuncs.com",
// 文件直传到阿里云oss时需用到
ACCESSKEYID: 'LTAI5tCRcCUgd7bt1J7JY596',
ACCESSKEYSECRET: 'kJos9mgylkR5ztosnDt8Asrc3ulgqy',
BUKET_NAME: 'glsk-oss',
FOLDER: 'quality/',
ACCESSKEYID: "LTAI5tCRcCUgd7bt1J7JY596",
ACCESSKEYSECRET: "kJos9mgylkR5ztosnDt8Asrc3ulgqy",
BUKET_NAME: "glsk-oss",
FOLDER: "quality/",
// 与后端约定的token字段名
TOKEN_NAME: 'glsk-oss'
}
TOKEN_NAME: "glsk-oss",
};
export const bytedanceConfig = {
url: 'https://openspeech.bytedance.com/api/v1/tts'
}
url: "https://openspeech.bytedance.com/api/v1/tts",
};
{
"requires": true,
<<<<<<< HEAD
"lockfileVersion": 1,
"dependencies": {
"@qiun/ucharts": {
"version": "2.5.0-20230101",
"resolved": "https://registry.npmjs.org/@qiun/ucharts/-/ucharts-2.5.0-20230101.tgz",
"integrity": "sha512-C7ccBgfPuGF6dxTRuMW0NPPMSCf1k/kh3I9zkRVBc5PaivudX/rPL+jd2Wty6gn5ya5L3Ob+YmYe09V5xw66Cw=="
=======
"packages": {
"": {
"dependencies": {
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24",
"dayjs": "^1.11.11",
"glsk-applet-component": "^1.0.0",
"glsk-map-jssdk": "^0.1.1",
"glsx-applet-component": "^1.1.29",
"glsx-common-sdk": "^0.2.8",
"number-precision": "^1.6.0",
"rfdc": "^1.3.0"
}
},
"node_modules/@vant/area-data": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.2.tgz",
"integrity": "sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA=="
},
"node_modules/@vant/weapp": {
"version": "1.11.7",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.7.tgz",
"integrity": "sha512-Rwn9BBnb4kHSV4XmvBicwtd42J+amEUfnFDcXJsGNPNX4a9c/DoT6YLsm4X1wB2+sQbdiQsbFBLAvGRBxCkD8g=="
},
"node_modules/dayjs": {
"version": "1.11.19",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="
},
"node_modules/glsk-applet-component": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz",
"integrity": "sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g=="
},
"node_modules/glsk-map-jssdk": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/glsk-map-jssdk/-/glsk-map-jssdk-0.1.1.tgz",
"integrity": "sha512-kwCyU8A1t7Q7V2hlzC03nc9VNNW9HPXQ5YhHsGGnrEtPxykGDG7AEyT5O7LY1zZk/8adkkk6FHgCM53r6p/4yw=="
},
"node_modules/glsx-applet-component": {
"version": "1.1.29",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz",
"integrity": "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw=="
},
"node_modules/glsx-common-sdk": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"node_modules/number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"node_modules/rfdc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
}
},
>>>>>>> 4340aad6b2e6502b96c9dc940c65939223743072
"dependencies": {
"@vant/area-data": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz",
"integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww=="
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.2.tgz",
"integrity": "sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA=="
},
"@vant/weapp": {
"version": "1.10.24",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz",
"integrity": "sha512-oovAaaJq3mlB+wto5bHVCn/rov8IgRDg+gJXy6hPX0A3c9WF1GqLqSmoXyaktgidJ9IaV1RADd3PAFlw4lUsnQ=="
"version": "1.11.7",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.7.tgz",
"integrity": "sha512-Rwn9BBnb4kHSV4XmvBicwtd42J+amEUfnFDcXJsGNPNX4a9c/DoT6YLsm4X1wB2+sQbdiQsbFBLAvGRBxCkD8g=="
},
"dayjs": {
"version": "1.11.11",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz",
"integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
"version": "1.11.19",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="
},
"glsk-applet-component": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz",
"integrity": "sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g=="
},
"glsk-map-jssdk": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/glsk-map-jssdk/-/glsk-map-jssdk-0.1.1.tgz",
"integrity": "sha512-kwCyU8A1t7Q7V2hlzC03nc9VNNW9HPXQ5YhHsGGnrEtPxykGDG7AEyT5O7LY1zZk/8adkkk6FHgCM53r6p/4yw=="
},
"glsx-applet-component": {
"version": "1.1.29",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz",
......@@ -43,9 +106,9 @@
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"rfdc": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz",
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA=="
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
}
}
}
{
"dependencies": {
"@qiun/ucharts": "^2.5.0-20230101",
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24",
"dayjs": "^1.11.11",
......@@ -8,6 +7,7 @@
"glsx-applet-component": "^1.1.29",
"glsx-common-sdk": "^0.2.8",
"number-precision": "^1.6.0",
"rfdc": "^1.3.0"
"rfdc": "^1.3.0",
"glsk-map-jssdk": "^0.1.1"
}
}
<!-- packageEquity/pages/carEquity/components/GLForm/GLForm.wxml -->
<wxs src="./GLForm.wxs" module="filterUtils" />
<view wx:for="{{formDataList}}" wx:key="index" class="custom-class gl-form">
<gl-cell
wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot'}}"
border="{{!item.noBorder}}"
class="{{item.name}}"
haveArrow="{{item.haveArrow || false}}"
valueAlign="right"
label="{{item.label}}"
labelWidth="{{item.labelWidth || labelWidth}}"
placeholder="{{item.placeholder || ''}}"
bindclick="handleCellClick"
data-target="{{item}}"
data-idx="{{index}}"
background="{{background}}"
required="{{item.required}}"
requiredAfter="{{item.requiredAfter}}"
cellHeight="{{!item.noCellHeight}}"
cellStyle="{{item.cellStyle||''}}"
labelStyle="{{item.labelStyle}}"
cellBoxStyle="{{item.cellBoxStyle||''}}">
<!-- slot -->
<slot wx:if="{{item.type == 'slot'}}" name="{{item.name}}" />
<!-- input / textarea -->
<view wx:if="{{item.type == 'input'}}" class="input-box">
<!-- rows="1" -->
<van-field
class="textarea"
custom-style="padding: var(--fontSize30) 0; font-size: var(--fontSize28); background: {{background}};"
border="{{ false}}"
value="{{formData[item.name]}}"
input-align="{{itme.inputAlign || 'right'}}"
autosize
hold-keyboard
type="{{item.fieldType || 'text'}}"
placeholder="{{item.placeholder || '请输入'}}"
maxlength="{{item.maxlength || 140}}"
disabled="{{item.disabled||disable}}"
readonly="{{item.readonly}}"
data-attr="{{item.name}}"
data-item="{{item}}"
bindinput="handleInput" />
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
</view>
<!-- picker -->
<picker
wx:if="{{item.type == 'select'}}"
bindchange="handlePickerChange"
data-target="{{item}}"
value="{{index}}"
disabled="{{item.disabled||disable}}"
range="{{item.optionList}}"
range-key="{{item.optionLabel}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 省市区 -->
<block wx:if="{{item.type == 'region'}}">
<view class="picker" bindtap="showAreaFun">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
<van-popup
show="{{ showArea }}"
position="bottom"
bind:close="showAreaFun"
>
<van-area area-list="{{ areaList }}" columns-num="{{ item.columnsNum }}" title="{{item.label}}" bind:confirm="bindRegionChange" bind:cancel="showAreaFun" />
</van-popup>
</block>
<!-- <picker
<gl-cell wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot'}}" border="{{!item.noBorder}}" class="{{item.name}}" haveArrow="{{item.haveArrow || false}}" valueAlign="right" label="{{item.label}}" labelWidth="{{item.labelWidth || labelWidth}}" placeholder="{{item.placeholder || ''}}" bindclick="handleCellClick" data-target="{{item}}" data-idx="{{index}}" background="{{background}}" required="{{item.required}}" requiredAfter="{{item.requiredAfter}}" cellHeight="{{!item.noCellHeight}}" cellStyle="{{item.cellStyle||''}}" labelStyle="{{item.labelStyle}}" cellBoxStyle="{{item.cellBoxStyle||''}}">
<!-- slot -->
<slot wx:if="{{item.type == 'slot'}}" name="{{item.name}}" />
<!-- input / textarea -->
<view wx:if="{{item.type == 'input'}}" class="input-box">
<!-- rows="1" -->
<van-field class="textarea" custom-style="padding: var(--fontSize30) 0; font-size: var(--fontSize28); background: {{background}};" border="{{ false}}" value="{{formData[item.name]}}" input-align="{{itme.inputAlign || 'right'}}" autosize hold-keyboard type="{{item.fieldType || 'text'}}" placeholder="{{item.placeholder || '请输入'}}" maxlength="{{item.maxlength || 140}}" disabled="{{item.disabled||disable}}" readonly="{{item.readonly}}" data-attr="{{item.name}}" data-item="{{item}}" bindinput="handleInput" />
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
</view>
<!-- picker -->
<picker wx:if="{{item.type == 'select'}}" bindchange="handlePickerChange" data-target="{{item}}" value="{{filterUtils.getPickerIndex(formData, item)}}" disabled="{{item.disabled||disable}}" range="{{item.optionList}}" range-key="{{item.optionLabel}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 省市区 -->
<block wx:if="{{item.type == 'region'}}">
<view class="picker" bindtap="showAreaFun">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
<van-popup show="{{ showArea }}" position="bottom" bind:close="showAreaFun">
<van-area area-list="{{ areaList }}" columns-num="{{ item.columnsNum }}" title="{{item.label}}" bind:confirm="bindRegionChange" bind:cancel="showAreaFun" />
</van-popup>
</block>
<!-- <picker
mode="region"
bindchange="bindRegionChange"
......@@ -93,28 +49,22 @@
<text class="placeholder" wx:else>请选择</text>
</view>
</picker> -->
<!-- 时间选择器 -->
<picker
wx:if="{{item.type == 'pickerTime'}}"
mode="date"
value="{{formData[name] || formData[item.name]}}"
start="{{item.start || ''}}"
end="{{item.end || ''}}"
bindchange="handleTimeChange"
data-target="{{item}}">
<view class="picker">
<view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 品牌车型 -->
<view wx:if="{{item.type == 'brand'}}" class="brand">
<view wx:if="{{formData.vehicleBrandId}}">
{{formData.vehicleBrandName || ''}}/{{formData.vehicleSubBrandName || ''}}/{{formData.vehicleSeriesName || ''}}/{{formData.vehicleShapeName || ''}}
</view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view>
</gl-cell>
<slot wx:if="{{item.type == 'otherSlot'}}" name="{{item.name}}" />
</view>
<!-- 时间选择器 -->
<picker wx:if="{{item.type == 'pickerTime'}}" mode="date" value="{{formData[name] || formData[item.name]}}" start="{{item.start || ''}}" end="{{item.end || ''}}" bindchange="handleTimeChange" data-target="{{item}}">
<view class="picker">
<view class="text-hide" wx:if="{{formData[item.name]}}">
{{formData[item.name]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 品牌车型 -->
<view wx:if="{{item.type == 'brand'}}" class="brand">
<view wx:if="{{formData.vehicleBrandId}}">
{{formData.vehicleBrandName || ''}}/{{formData.vehicleSubBrandName || ''}}/{{formData.vehicleSeriesName || ''}}/{{formData.vehicleShapeName || ''}}
</view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view>
</gl-cell>
<slot wx:if="{{item.type == 'otherSlot'}}" name="{{item.name}}" />
</view>
\ No newline at end of file
var isShowFn = function (formData, targetItem) {
var flag = false
var flag = false;
if (targetItem.isShowObj && formData) {
for (var i = 0; i <= targetItem.isShowObj.list.length; i++) {
var item = targetItem.isShowObj.list[i]
var item = targetItem.isShowObj.list[i];
if (item == formData[targetItem.isShowObj.attr]) {
flag = true
break
flag = true;
break;
}
}
} else {
flag = true
flag = true;
}
return flag
}
return flag;
};
// 根据 formData 的值和 optionList 计算 picker 的选中索引
var getPickerIndex = function (formData, item) {
if (!formData || !item || !item.optionList || !item.optionId || !item.name) {
return 0;
}
var currentValue = formData[item.name];
if (
currentValue === null ||
currentValue === undefined ||
currentValue === ""
) {
return 0;
}
var optionList = item.optionList;
var optionId = item.optionId;
for (var i = 0; i < optionList.length; i++) {
if (String(optionList[i][optionId]) === String(currentValue)) {
return i;
}
}
return 0;
};
module.exports = {
isShowFn: isShowFn
}
\ No newline at end of file
isShowFn: isShowFn,
getPickerIndex: getPickerIndex,
};
......@@ -90,7 +90,8 @@ Component({
textNameObj: {
confirmName: '下一步(1/4)',
cancelName: '存草稿'
}
},
vinValid:true
},
lifetimes: {
......@@ -131,7 +132,6 @@ Component({
// })
// },
inputEvent(e) {
console.log(e, 'inputEvent');
let {
attr
} = e.detail
......
// packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.js
import { validateVin } from '~/utils/vinVaildate'
Component({
/**
* 组件的属性列表
......@@ -19,24 +20,64 @@ Component({
disable: true,
that: this,
beforeClose: null,
vinValid:true
},
lifetimes: {
attached() {
let { carVin } = this.data.secFormData
const vinValue = carVin || ''
this.setData({
'formData.carVin': carVin || '',
vinFormat: carVin.replace(/(.{4})/g, "$1 ")
'formData.carVin': vinValue,
vinFormat: vinValue ? vinValue.replace(/(.{4})/g, "$1 ") : ''
})
}
},
/**
* 数据监听器
*/
observers: {
'formData.carVin': function(carVin) {
// 当 carVin 值发生变化时,会触发这个函数
console.log('carVin 值变化了:', carVin)
if (carVin.length === 17) {
validateVin(carVin).then(res => {
let { valid } = res.data.data
console.log("upperVinRes", valid)
// 保存 valid 值到组件 data 中
this.setData({
vinValid: valid
})
}).catch(() => {
console.log("upperVinErr", carVin)
// 校验失败时,设置为 false
this.setData({
vinValid: false
})
})
}
// 在这里可以执行你需要的逻辑
// 例如:格式化显示、验证、触发事件等
// 如果需要格式化显示,可以更新 vinFormat
// this.setData({
// vinFormat: carVin ? carVin.replace(/(.{4})/g, "$1 ") : ''
// })
// 你可以在这里添加其他监听逻辑,例如:
// - 实时验证车架号格式
// - 触发自定义事件通知父组件
// - 更新其他相关的数据状态
}
},
/**
* 组件的方法列表
*/
methods: {
handleInput(e) {
let inputValue = e.detail
let inputValue = e.detail.toUpperCase()
this.setData({
'formData.carVin': inputValue
})
......@@ -66,16 +107,20 @@ Component({
},
onConfirm(e) {
let { carVin } = this.data.formData
if (!carVin) {
wx.$util.showToast('车架号不能为空')
return this.dialogClost(false) // 表单校验不通过
let { vinValid } = this.data
console.log("onConfirm",vinValid);
console.log("onConfirm",carVin);
if (!carVin || !(/^[a-zA-Z0-9]{17}$/.test(carVin))) {
wx.$util.showToast('请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)')
return this.dialogClost(false)
}
if (!(/^[a-zA-Z0-9]{17}$/.test(carVin))) {
wx.$util.showToast('车架号请输入17位数字和字母')
if(!vinValid) {
console.log("表单校验不通过");
return this.dialogClost(false) // 表单校验不通过
} else {
this.triggerEvent('onConfirm', { carVin: carVin })
this.dialogClost(true) // 表单校验通过
}
this.triggerEvent('onConfirm', { carVin: carVin })
this.dialogClost(true) // 表单校验通过
}
}
})
......@@ -175,7 +175,18 @@ Component({
unit: true,
},
],
menuList: [],
menuList: [
{
menuText: '轻改区域日报',
icon: 'lightDaily',
path: 'tabWorkOrder.supervisorDaily',
params: {
templateCode: 'qinggai-temp-001'
},
recordId: 18,
noCheckdailyReport: true
}
],
newMenuList: [{
menuText: "培训资料",
icon: "peixun_icon",
......@@ -603,11 +614,11 @@ 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({
menuText: "工作日报",
menuText: "延保区域日报",
path: "tabWorkOrder.supervisorDaily",
icon: "supervisorDaily",
icon: "supervisorDailyNew",
})
}
// 超管/区域运营/广联销售/飞行督导
......@@ -1111,13 +1122,13 @@ Component({
message
} = res
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 (data && menuList.every((item) => item.menuText != "工作日报")) {
if (data && menuList.every((item) => item.menuText != "延保区域日报")) {
menuList.push({
menuText: "工作日报",
menuText: "延保区域日报",
path: "tabWorkOrder.supervisorDaily",
icon: "supervisorDaily"
icon: "supervisorDailyNew"
});
}
this.setData({
......@@ -1305,7 +1316,7 @@ Component({
if (item.path == 'tabWorkOrder.mentorshipManage' && userInfo?.loginRole == 6) {
wx.$track.setTrackData(0, 'mentorship_page', {}, '', 0)
}
// 飞行督导/导师点击工作日报入口埋点
// 飞行督导/导师点击延保区域日报入口埋点
if (item.path == 'tabWorkOrder.supervisorDaily' && (userInfo?.loginRole == 6 || mentorFlag)) {
wx.$track.setTrackData(0, 'supervisor_daily_page', {}, '', 0)
}
......
......@@ -62,6 +62,7 @@ Page({
* 页面的初始数据
*/
data: {
reasonMaxLen: 37,
recruitment: [],
statisticsList: [],
onboardingPlans: [],
......@@ -161,6 +162,18 @@ Page({
})
},
/**
* 推荐理由
*/
handleShowReason(e) {
let { index } = e.currentTarget.dataset
const obj = this.data.recruitmentPlans[index]
const { reasonMaxLen } = this.data
this.setData({
[`recruitmentPlans[${index}].recommendedReasonTxt`]: obj.isShowReasonAll ? (obj.recommendedReason.slice(0, reasonMaxLen) + '...') : obj.recommendedReason,
[`recruitmentPlans[${index}].isShowReasonAll`]: !obj.isShowReasonAll
})
},
/**
* 取消选择时间
*/
calcelDate() {
......@@ -209,9 +222,18 @@ Page({
let { url } = e.currentTarget.dataset
let _this = this
if (!url) {
wx.$util.showToast('没有合同')
wx.$util.showToast('暂无简历信息')
return
}
const resumeType = url.split(".")[url.split(".").length - 1]
if (resumeType == 'png') {
wx.previewImage({
urls: [url], // 图片地址数组
current: url // 当前显示图片的链接
})
wx.hideLoading()
return true
}
wx.downloadFile({
// 示例 url,并非真实存在
url: url,
......@@ -257,12 +279,14 @@ Page({
})
.then(res => {
let { stat, onboardingPlans, recruitmentPlans, recruitment } = res.data
const { reasonMaxLen } = this.data
// 格式化 recruitmentPlans 中的 createdDate
if (recruitmentPlans && recruitmentPlans.length > 0) {
recruitmentPlans = recruitmentPlans.map(item => ({
...item,
createdDate: this.formatDate(item.createdDate)
createdDate: this.formatDate(item.createdDate),
recommendedReasonTxt: item.recommendedReason ? (item.recommendedReason.length > reasonMaxLen ? (item.recommendedReason.slice(0, reasonMaxLen) + '...') : item.recommendedReason) : '-',
isShowReasonAll: false
}))
}
// 格式化 onboardingPlans 中的 onboardingDate
......
......@@ -215,6 +215,40 @@ page {
}
}
.card_middle {
margin-bottom: var(--fontSize20);
font-size: var(--fontSize24);
.label, .tips {
color: #999ea8;
}
.label {
width: var(--fontSize120);
flex-shrink: 0;
}
.value {
position: relative;
width: 100%;
color: #292d33;
word-wrap: break-word;
word-break: break-all;
}
.show {
display: inline-block;
}
.btn-reason-all {
position: absolute;
bottom: 0;
right: 0;
text-align: right;
width: var(--fontSize144);
background-color: #FFFFFF;
background: linear-gradient(90deg, #ffffff80 0%, #ffffff 100%);
}
.reason-box {
display: flex;
}
}
// 入职计划模块
.entry_plan {
.card_content {
......@@ -247,7 +281,7 @@ page {
// 招聘计划模块
.recruit_plan {
.card {
height: var(--fontSize228);
min-height: var(--fontSize282);
}
.btn_group {
......
......@@ -82,6 +82,18 @@
</view>
</view>
</view>
<view class="card_middle">
<view class="reason-box">
<view class="label">推荐理由:</view>
<view class="value">
{{item.recommendedReasonTxt}}
<view wx:if="{{ item.recommendedReason && item.recommendedReason.length > reasonMaxLen }}" class="{{['tips', item.isShowReasonAll ? 'show' : '']}}" bind:tap="handleShowReason" data-index="{{ index }}">
<text wx:if="{{item.isShowReasonAll}}">收起</text>
<view wx:else class="btn-reason-all">查看全部</view>
</view>
</view>
</view>
</view>
<view class="card_content">
<view class="btn_group">
<view class="btn btn_outline" bindtap="handleViewResume" data-url="{{ item.resumeUrl }}">查看简历</view>
......
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 "~/packageUsedCar/secondHandApi";
module.exports = {
/** 获取首页统计数据 */
getdataBoard(data) {
return newApi.post("/dataBoard/index", { ...data }, { returnAll: true });
},
/** 评估单列表 */
evalOrderList(data) {
return newApi.post(
`/evalOrder/page`,
{
...data,
},
{ returnAll: true }
);
},
/** 评估单分页状态数量 */
evalOrderPageCount(data) {
return newApi.post(
`/evalOrder/pageCount`,
{
...data,
},
{ returnAll: true }
);
},
/** 评估单重新报价 */
evalOrderOwnerReQuote(data) {
return newApi.post(
`/evalOrder/ownerReQuote`,
{
...data,
},
{ returnAll: true }
);
},
/** 签订买卖合同 */
evalOrderSignContract(data) {
return newApi.post(
`/evalOrder/signingSaleContract`,
{
...data,
},
{ returnAll: true }
);
},
/** 评估单取消合同 */
evalOrderCancelContract(data) {
return newApi.post(
`/evalOrder/cancelSaleContract`,
{
...data,
},
{ returnAll: true }
);
},
/** 评估单重新提交 */
evalOrderConfirmVehicleDelivery(data) {
return newApi.post(
`/confirmVehicleDelivery/reSubmit`,
{
...data,
},
{ returnAll: true }
);
},
/** 确认交车 */
confirmDelivery(data) {
return newApi.post(
`/confirmVehicleDelivery/confirmVehicleDelivery`,
{
...data,
},
{ returnAll: true }
);
},
/** 支付定金 */
payDepositApplication(data) {
return newApi.post(
`/applyPayment/payDepositApplication`,
{
...data,
},
{ returnAll: true }
);
},
/** 发起代保管协议签署 */
signAgreement(data) {
return newApi.post(
`/applyPayment/payFinal`,
{
...data,
},
{ returnAll: true }
);
},
/** 检查代保管协议签署状态 */
checkSignAgreement(data) {
return newApi.post(
`/applyPayment/checkSignAgreement`,
{
...data,
},
{ returnAll: true }
);
},
/** 检查车辆是否存在重复评估单 */
checkRepeat(data) {
return newApi.post(
`/evalOrder/checkRepeat`,
{
...data,
},
{ returnAll: true }
);
},
/** 车辆ocr识别 */
vinOcr(data) {
return newApi.post(
`/evalOrder/vinOcr`,
{
...data,
},
{ returnAll: true }
);
},
/** 行驶证ocr识别 */
carLicenseOcr(data) {
return newApi.post(
`/evalOrder/carLicenseOcr`,
{
...data,
},
{ returnAll: true }
);
},
/** 获取合同详情 */
getContractDetail(data) {
return newApi.post(
`/evalElectronicContract/getDetail`,
{
...data,
},
{ returnAll: true }
);
},
/** 获取保管人列表 */
getCustodyAgreementList(data) {
return newApi.post(
`/custodyAgreement/custodyAgreementList`,
{
...data,
},
{ returnAll: true }
);
},
/** 新增保管人 */
addCustodyAgreement(data) {
return newApi.post(
`/custodyAgreement/addCustodyAgreement`,
{
...data,
},
{ returnAll: true }
);
},
/** 发送代保管人协议 */
sendCustodyAgreement(data) {
return newApi.post(
`/custodyAgreement/sendCustodyAgreement`,
{
...data,
},
{ returnAll: true }
);
},
/** 销售协议预览 */
salesAgreementPreview(data) {
return newApi.post(
`/evalOrder/salesAgreementPreview`,
{
...data,
},
{ returnAll: true }
);
},
/** 线上合同预览 */
viewOnlineContract(data) {
return newApi.post(
`/evalOrder/viewOnlineContract`,
{
...data,
},
{ returnAll: true }
);
},
/** 评估单简单详情 */
evalOrderSimpleDetail(data) {
return newApi.post(
`/evalOrder/simpleDetail`,
{
...data,
},
{ returnAll: true }
);
},
/**省市区 */
apiRegion(data) {
const queryString = Object.keys(data)
.map(
(key) => `${encodeURIComponent(key)}=${encodeURIComponent(data[key])}`
)
.join("&");
return newApi.post(
`/evalOrder/apiRegion/search${queryString ? "?" + queryString : ""}`,
{ ...data },
{ returnAll: true }
);
},
/** 二手车驻店日报列表 */
getCarDailyReportList(data) {
return newApi.post("/carDailyReport/list", {
...data,
});
},
/**
* 新增二手车驻店日报
*/
addCarDailyReport(data) {
return newApi.post("/carDailyReport/add", {
...data,
});
},
/**
* 二手车驻店日报详情
*/
getCarDailyReportDetail(data) {
return newApi.post("/carDailyReport/detail", {
...data,
});
},
/**
* 修改二手车驻店日报
*/
editCarDailyReport(data) {
return newApi.post("/carDailyReport/edit", {
...data,
});
},
/**
* 交付单列表
*/
getDeliveryOrderPageList(data) {
return newApi.post("/deliveryOrderManage/getDeliveryOrderPageList", data, {
returnAll: true,
});
},
/**
* 交付单列表按照支付状态统计数量
*/
getDeliveryOrderListCount(data) {
return newApi.post("/deliveryOrderManage/getDeliveryOrderListCount", data);
},
/**
* 交付单详情
*/
getDeliveryOrderDetail(data) {
return newApi.post("/deliveryOrderManage/getDeliveryOrderDetail", data);
},
/**
* 交付单操作日志
*/
getDeliveryOrderOpLog(data) {
return newApi.post("/deliveryOrderManage/getDeliveryOrderOpLog", data);
},
/**
* 客户确认到店
*/
confirmArrive(data) {
return newApi.post("/deliveryOrderManage/confirmArrive", data, {
returnAll: true,
});
},
/**
* 客户确认提车
*/
deliveryConfirmDelivery(data) {
return newApi.post("/deliveryOrderManage/confirmDelivery", data, {
returnAll: true,
});
},
/** 检查车辆是否存在重复评估单 */
checkRepeat(data) {
return newApi.post(`/evalOrder/checkRepeat`, data, { returnAll: true });
},
/** 评估单创建 */
evalOrderCreate(data) {
return newApi.post(`/evalOrder/create`, data, {
returnAll: true,
duplicatePrevention: true,
});
},
/** 评估单更新 */
evalOrderUpdate(data) {
return newApi.post(`/evalOrder/edit`, data, {
returnAll: true,
duplicatePrevention: true,
});
},
/** 评估单详情 */
evalOrderDetail(data) {
return newApi.post(`/evalOrder/detail`, data, { returnAll: true });
},
/** 车辆ocr识别 */
vinOcr(data) {
return newApi.post(`/evalOrder/vinOcr`, data, { returnAll: true });
},
/** 行驶证ocr识别 */
carLicenseOcr(data) {
return newApi.post(`/evalOrder/carLicenseOcr`, data, { returnAll: true });
},
// 撤回合同
revokeSaleContract(data) {
return newApi.post("/evalOrder/revokeSaleContract", data, {
returnAll: true,
});
},
/** 线上合同预览 */
viewOnlineContract(data) {
return newApi.post(`/evalOrder/viewOnlineContract`, data, {
returnAll: true,
});
},
};
{
"component": true,
"usingComponents": {
"van-area": "@vant/weapp/area/index",
"van-popup": "@vant/weapp/popup/index"
}
}
<!-- packageEquity/pages/carEquity/components/GLForm/GLForm.wxml -->
<wxs src="./GLForm.wxs" module="filterUtils" />
<view wx:for="{{ formDataList }}" wx:key="index" class="custom-class gl-form">
<gl-cell
wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot'}}"
border="{{ !item.noBorder }}"
class="{{ item.name }}"
haveArrow="{{ item.haveArrow || false }}"
valueAlign="right"
label="{{ item.label }}"
labelWidth="{{ item.labelWidth || labelWidth }}"
placeholder="{{ item.placeholder || '' }}"
bindclick="handleCellClick"
data-target="{{ item }}"
data-idx="{{ index }}"
background="{{ background }}"
required="{{ item.required }}"
requiredAfter="{{ item.requiredAfter }}"
cellHeight="{{ !item.noCellHeight }}"
cellStyle="{{ item.cellStyle || '' }}"
labelStyle="{{ item.labelStyle }}"
cellBoxStyle="{{ item.cellBoxStyle || '' }}"
>
<!-- slot -->
<slot wx:if="{{ item.type == 'slot' }}" name="{{ item.name }}" />
<!-- input / textarea -->
<view wx:if="{{ item.type == 'input' }}" class="input-box">
<!-- rows="1" -->
<van-field
class="textarea"
custom-style="padding: var(--fontSize30) 0; font-size: var(--fontSize28); background: {{background}};"
border="{{ false }}"
value="{{ formData[item.name] }}"
input-align="{{ itme.inputAlign || 'right' }}"
autosize
hold-keyboard
type="{{ item.fieldType || 'text' }}"
placeholder="{{ item.placeholder || '请输入' }}"
maxlength="{{ item.maxlength || 140 }}"
disabled="{{ item.disabled || disable }}"
readonly="{{ item.readonly }}"
data-attr="{{ item.name }}"
data-item="{{ item }}"
bindinput="handleInput"
bindblur="handleBlur"
/>
<view class="scan-box" wx:if="{{ item.scan }}" data-type="vin" bindtap="navOcr">
<image src="/images/scan.png" class="scan-icon" />
</view>
<text wx:if="{{ item.suffix }}" class="input-suffix">{{
item.suffix
}}</text>
</view>
<!-- picker -->
<picker
wx:if="{{ item.type == 'select' }}"
bindchange="handlePickerChange"
data-target="{{ item }}"
value="{{ pickerIndexMap[item.name] !== undefined ? pickerIndexMap[item.name] : filterUtils.getPickerIndex(formData, item) }}"
disabled="{{ item.disabled || disable }}"
range="{{ item.optionList }}"
range-key="{{ item.optionLabel }}"
>
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{ formData[item.labelName] }}">
{{ formData[item.labelName] }}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 省市区 -->
<block wx:if="{{ item.type == 'region' }}">
<view class="picker" bindtap="showAreaFun" data-target="{{ item }}">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{ formData[item.labelName] }}">
{{ formData[item.labelName] }}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
<van-popup
show="{{ showArea }}"
position="bottom"
z-index="99999"
root-portal="{{true}}"
bind:close="showAreaFun"
>
<van-area
root-portal="true"
area-list="{{ areaList }}"
columns-num="{{ item.columnsNum }}"
title="{{ areaTitle || '' }}"
bind:confirm="bindRegionChange"
bind:cancel="showAreaFun"
data-target="{{ item }}"
/>
</van-popup>
</block>
<!-- <picker
mode="region"
bindchange="bindRegionChange"
data-target="{{item}}"
value="{{index}}"
level="{{item.level}}"
disabled="{{item.disabled||disable}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker> -->
<!-- 时间选择器 -->
<picker
wx:if="{{ item.type == 'pickerTime' }}"
mode="date"
value="{{ formData[name] || formData[item.name] }}"
start="{{ item.start || '' }}"
end="{{ (item.name === 'registrationDate' || item.name === 'productionDate') ? currentDate : (item.end || '') }}"
bindchange="handleTimeChange"
data-target="{{ item }}"
>
<view class="picker">
<view class="text-hide" wx:if="{{ formData[item.name] }}">
{{ formData[item.name] }}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 品牌车型 -->
<view wx:if="{{ item.type == 'brand' }}" class="brand">
<view wx:if="{{ formData.carSeriesName }}">
{{ formData.carSeriesName || "" }} {{ formData.carTypeName || "" }}
</view>
<view wx:else class="placeholder-class">{{
item.placeholder || "请选择"
}}</view>
</view>
</gl-cell>
<slot wx:if="{{ item.type == 'otherSlot' }}" name="{{ item.name }}" />
</view>
var isShowFn = function (formData, targetItem) {
var flag = false;
if (targetItem.isShowObj && formData) {
for (var i = 0; i <= targetItem.isShowObj.list.length; i++) {
var item = targetItem.isShowObj.list[i];
if (item == formData[targetItem.isShowObj.attr]) {
flag = true;
break;
}
}
} else {
flag = true;
}
return flag;
};
// 根据 formData 的值和 optionList 计算 picker 的选中索引
var getPickerIndex = function (formData, item) {
if (!formData || !item) {
return 0;
}
var optionList = item.optionList;
var optionId = item.optionId;
var fieldName = item.name;
if (!optionList || optionList.length === 0 || !optionId || !fieldName) {
return 0;
}
var currentValue = formData[fieldName];
if (
currentValue === null ||
currentValue === undefined ||
currentValue === ""
) {
return 0;
}
// WXS 不支持 String(),使用 "" + value 的方式转换为字符串
var currentValueStr = "" + currentValue;
for (var i = 0; i < optionList.length; i++) {
var option = optionList[i];
if (!option) continue;
// 在 WXS 中,需要使用字符串键名访问对象属性
var optionValue = null;
if (optionId === "value") {
optionValue = option.value;
} else if (optionId === "name") {
optionValue = option.name;
} else {
optionValue = option[optionId];
}
if (optionValue === null || optionValue === undefined) continue;
// WXS 不支持 String(),使用 "" + value 的方式转换为字符串
var optionValueStr = "" + optionValue;
// 比较字符串值(已确保数据类型一致,直接字符串比较即可)
if (optionValueStr === currentValueStr) {
return i;
}
}
return 0;
};
module.exports = {
isShowFn: isShowFn,
getPickerIndex: getPickerIndex,
};
/* packageEquity/pages/carEquity/components/GLForm/GLForm.wxss */
.input-box {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
--cell-line-height: calc(28vmin / 7.5) !important;
min-width: 0; /* 防止 flex 子元素溢出 */
}
.textarea {
text-align: right;
font-size: var(--fontSize28) !important;
flex: 1;
min-width: 0; /* 允许 flex 子元素收缩 */
overflow: hidden; /* 防止内容溢出 */
}
.input-suffix {
/* height: var(--fontSize88);
line-height: var(--fontSize88); */
/* height: var(--fontSize132);
line-height: var(--fontSize132); */
margin-left: var(--fontSize12);
flex-shrink: 0; /* 防止被压缩 */
white-space: nowrap; /* 防止换行 */
}
.placeholder-class {
color: #c3c3c3;
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #b6b6b8;
}
.gl-form .arrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.brand {
text-align: right;
padding: var(--fontSize40) 0;
}
.gl-form .van-field__control--disabled {
color: #666666;
-webkit-text-fill-color: #666666;
}
.input-box .textarea input {
height: var(--fontSize72);
}
.gl-form .van-cell--borderless {
padding: var(--fontSize10) 0 !important;
}
.between .van-cell--borderless {
padding: var(--fontSize30) 0 !important;
}
.gl-form .scan-box {
width: var(--fontSize60);
height: var(--fontSize40);
border-radius: var(--fontSize32);
opacity: 1;
background: #f2f2f2;
align-items: center;
justify-content: center;
display: flex;
margin-left: var(--fontSize16);
flex-shrink: 0; /* 防止被压缩 */
}
.gl-form .scan-box .scan-icon {
width: var(--fontSize28);
height: var(--fontSize28);
}
/* @media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
} */
// packageUsedCar/components/NoticePopup/NoticePopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
options: {
addGlobalClass: true
},
properties: {
show: {
type: Boolean,
value: false
},
type: {
type: String,
value: 'success' // 'success' | 'fail'
},
title: {
type: String,
value: '提交成功'
},
description: {
type: String,
value: ''
},
okText: {
type: String,
value: '我知道了'
},
maskClosable: {
type: Boolean,
value: false
},
useSlot: {
type: Boolean,
value: false
}
},
data: {
IMG_URL,
cardAnimation: ''
},
observers: {
show(n) {
if (n) {
this.startAnim()
}
}
},
methods: {
open(opts = {}) {
const { type, title, description, okText, useSlot } = opts
this.setData({
type: type ?? this.data.type,
title: title ?? this.data.title,
description: description ?? this.data.description,
okText: okText ?? this.data.okText,
useSlot: useSlot ?? this.data.useSlot,
show: true
})
this.startAnim()
},
close() {
this.setData({ show: false })
this.triggerEvent('close')
},
onOk() {
this.close()
this.triggerEvent('ok')
},
onMaskTap() {
if (this.data.maskClosable) this.close()
},
startAnim() {
const animation = wx.createAnimation({
duration: 200,
timingFunction: 'ease'
})
animation.scale(1).opacity(1).step()
this.setData({ cardAnimation: animation.export() })
},
noop() {}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageUsedCar/components/NoticePopup/NoticePopup.wxss */
.result-dialog {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.dialog-card {
width: 620rpx;
background: #fff;
border-radius: 16rpx;
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.12);
overflow: hidden;
color: #292D33;
}
.icon-wrap {
display: flex;
justify-content: center;
align-items: center;
padding: 52rpx 0 0;
}
.icon {
width: 96rpx;
height: 96rpx;
}
.content {
padding: 36rpx 48rpx 48rpx;
text-align: center;
font-size: 32rpx;
}
.title {
font-size: 32rpx;
color: #323233;
line-height: 46rpx;
}
.desc {
margin-top: 12rpx;
font-size: 26rpx;
color: #646566;
}
.footer {
height: 96rpx;
border-top: 1rpx solid #EBEDF0;
}
.ok-btn {
width: 100%;
height: 80rpx;
border-radius: 12rpx;
color: #292D33;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file
<!--packageUsedCar/components/NoticePopup/NoticePopup.wxml-->
<view class="result-dialog {{show ? 'show' : ''}}" catchtouchmove="noop" wx:if="{{show}}" bindtap="onMaskTap">
<view class="dialog-card" animation="{{cardAnimation}}" catchtap="noop">
<view class="icon-wrap">
<image class="icon" src="{{IMG_URL}}usedCar/success-icon.png" mode="aspectFit" />
</view>
<view class="content">
<slot wx:if="{{useSlot}}"></slot>
<block wx:else>
<view class="title">{{title}}</view>
<view wx:if="{{description}}" class="desc">{{description}}</view>
</block>
</view>
<view class="footer">
<view class="ok-btn" bindtap="onOk">{{okText}}</view>
</view>
</view>
</view>
\ No newline at end of file
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
Component({
externalClasses: ["popup-slot-class"],
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false,
observer: function (n, o) {
n && wx.hideKeyboard();
this.setData({
showPopup: n,
});
},
},
title: String,
height: {
type: String,
value: "85%",
},
slotStyle: String,
cancelText: 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",
});
}
},
},
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
noScroll() {},
hidePopup() {
this.setData({
show: false,
});
this.triggerEvent("cancel");
},
confirm() {
this.triggerEvent("confirm");
},
},
attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({
isFullSucreen: wx.$util.isFullSucreen(true),
});
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg"></view>
<view class="popup-content" style="height:{{ height }}">
<block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot popup-slot-class {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}" style="{{slotStyle}}">
<slot></slot>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }} {{ singleButton ? 'single-button' : '' }}">
<view wx:if="{{singleButton !== true}}" class="cancel btn text-center" bindtap="hidePopup" style="{{cancelStyle}}">
{{cancelText || '取消'}}
</view>
<view class="confirm btn text-center {{ singleButton ? 'single-btn' : '' }}" bindtap="confirm" style="{{confirmStyle}}">
{{confirmText || '确认'}}
</view>
</view>
</view>
</view>
\ No newline at end of file
/* tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.wxss */
.popup {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 9999;
/* 确保不会被父元素的 transform、overflow 等属性影响 */
transform: translateZ(0);
}
.popup-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.7);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.popup-content {
position: absolute;
left: 0;
width: 100%;
background: #ffffff;
border-radius: var(--fontSize20) var(--fontSize20) 0 0;
animation: show-popup 0.5s forwards;
box-sizing: border-box;
padding: 0 var(--fontSize32);
}
.popup-title {
height: var(--fontSize98);
font-size: var(--fontSize32);
color: #333333;
border-bottom: var(--fontSize2) solid #ebedf0;
}
.popup-slot {
height: calc(100% - var(--fontSize214));
}
.popup-slot.isFullSucreen {
height: calc(100% - var(--fontSize282));
}
.popup-slot.isFullSucreen-notitle {
height: calc(100% - var(--fontSize184));
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--fontSize20) 0;
}
.popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
.popup-footer .btn {
width: var(--fontSize330);
height: var(--fontSize80);
box-sizing: border-box;
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
}
.popup-footer .cancel {
/* color: #323233;
border: var(--fontSize2) solid #DCDEE0; */
color: #292d33;
background: #f7f8fa;
}
.popup-footer .confirm {
background: #347bff;
color: #fff;
}
.popup-footer.single-button {
justify-content: center;
}
.popup-footer .confirm.single-btn {
width: 100%;
}
@keyframes show-popup {
0% {
bottom: -100%;
}
100% {
bottom: 0;
}
}
// components/TabBar/TabBar.js
Component({
/**
* 组件的属性列表
*/
properties: {
tabList: Array,
activeIndex: {
type: Number,
observer: function (n) {
if (this.data.tabIndex != n) {
this.setData({
tabIndex: this.data.activeIndex
})
this.setTab(this.data.tabIndex, true)
}
}
},
scroll: Boolean
},
/**
* 组件的初始数据
*/
data: {
tabIndex: 0
},
lifetimes: {
ready() {
this.setTab(this.data.tabIndex, true)
let that = this
wx.$eventbus.on('page_show', n => {
!that.data.width && that.setTab(that.data.tabIndex, true)
})
}
},
/**
* 组件的方法列表
*/
methods: {
change(e) {
let {
index
} = e.currentTarget.dataset
this.setTab(index)
},
setTab(index = 0, notInitialLoading = false) {
let {
tabIndex,
tabList
} = this.data
wx.$util.getViewInfo(`#tab-${tabIndex}`, old => {
let oldLeft = old.left
let oldWidth = old.width
wx.$util.getViewInfo(`#tab-${index}`, res => {
let {
left,
width
} = res
if (tabIndex != index) {
let readyLeft = oldLeft > left ? left : oldLeft
let readyWidth = oldLeft > left ? oldLeft - left : left - oldLeft
this.setData({
activeStyle: `width: var(--fontSize64);background-color:#347BFF;border-radius:3rpx;left:${readyLeft + readyWidth / 2}px;transition: all .1s;`
})
}
setTimeout(() => {
this.setData({
activeStyle: `width: var(--fontSize64);left:${left + (width - 32) / 2}px;background-color:#347BFF;`,
tabIndex: index,
to: `to-${index}`,
width
})
if (!notInitialLoading) this.triggerEvent('click', tabList[index].key)
}, 100)
}, this)
}, this)
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<block wx:if="{{scroll}}">
<scroll-view class=" scroll" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}" id="to-{{index}}">
<view id="tab-{{index}}" class="text-item">
<view class="tab-item-text">{{item.text || item }}</view><view wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">{{item.count > 99 ? '99+' : item.count}}</view>
</view>
</view>
</block>
<!-- <view class="active-doc" style="{{activeStyle}}" /> -->
</scroll-view>
</block>
<block wx:else>
<view class="tab" style="grid-template-columns: repeat({{tabList.length}}, 1fr);font-size:{{tabList.length>5?'var(--fontSize24)':''}} ;">
<block wx:for="{{tabList}}" wx:key="index">
<!-- style="color:{{tabIndex==index?'#347BFF':''}};" -->
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<view id="tab-{{index}}" class="text-item"><view class="tab-item-text">{{item.text || item }}</view><view wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">{{item.count > 99 ? '99+' : item.count}}</view></view>
</view>
</block>
<view class="active-doc" style="{{activeStyle}}" />
</view>
</block>
\ No newline at end of file
/* components/TabBar/TabBar.wxss */
.tab {
height: var(--fontSize88);
margin-top: var(--fontSize14);
line-height: var(--fontSize88);
box-sizing: border-box;
display: grid;
align-items: center;
font-size: var(--fontSize28);
color: #5A5E66;
border-bottom: var(--fontSize1) solid #F2F3F5;
}
.scroll {
height: var(--fontSize88);
margin-top: var(--fontSize14);
box-sizing: border-box;
color: #5A5E66;
border-bottom: var(--fontSize1) solid #F2F3F5;
width: 100%;
display: flex;
line-height: var(--fontSize88);
font-size: 0;
}
.active {
/* font-size: var(--fontSize32); */
font-weight: 600;
color: #347BFF;
}
.active-doc {
position: absolute;
bottom: var(--fontSize1);
height: var(--fontSize4);
border-radius: var(--fontSize2) var(--fontSize2) 0 0;
transition: all .25s;
}
.tab .tab-item {
text-align: center;
}
.tab-item .text-item {
height: 38rpx;
display: flex;
align-items: center;
justify-content: center;
}
.scroll .tab-item {
width: fit-content;
height: 100%;
flex-shrink: 0;
font-size: var(--fontSize28);
text-align: center;
position: relative;
padding: 0 var(--fontSize24);
}
.scroll .tab-item .text-item {
margin-top: 20rpx;
}
.scroll .active::after {
position: absolute;
bottom: 1rpx;
left: 50%;
transform: translateX(-50%);
width: 64rpx;
height: var(--fontSize4);
background-color: #347BFF;
content: '';
}
\ No newline at end of file
// packageEquity/components/storePicker/storePicker.js
Component({
options: {
// 在组件定义时的选项中启用多slot支持
multipleSlots: true,
},
/**
* 组件的属性列表
*/
properties: {
title: String,
pickerListAll: {
type: Array,
value: [],
observer: function (n) {
if (n) {
this.init();
}
},
},
type: Number, //1.销售顾问/推荐人,2.交付专员
orderObj: {
type: Object,
observer: function (n) {
if (n) {
let { pickerList, type, pickerListAll } = this.data;
let value = type == 1 ? n.referrerId : n.deliveryId;
// 如果 pickerList 还没有初始化,使用 pickerListAll
const listToSearch =
pickerList && pickerList.length > 0
? pickerList
: pickerListAll || [];
if (value && listToSearch.length > 0) {
let defaultSelectStoreIndex = listToSearch.findIndex((v) => {
return v.uuid == value;
});
if (defaultSelectStoreIndex >= 0) {
this.setData({
defaultSelectStoreIndex: [defaultSelectStoreIndex],
selectStoreIndex: defaultSelectStoreIndex,
});
}
}
}
},
},
referrerId: {
type: String,
value: "",
observer: function (n) {
if (n) {
let { pickerList, pickerListAll } = this.data;
// 如果 pickerList 还没有初始化,使用 pickerListAll
const listToSearch =
pickerList && pickerList.length > 0
? pickerList
: pickerListAll || [];
if (listToSearch.length > 0) {
let defaultSelectStoreIndex = listToSearch.findIndex((v) => {
return v.uuid == n;
});
if (defaultSelectStoreIndex >= 0) {
this.setData({
defaultSelectStoreIndex: [defaultSelectStoreIndex],
selectStoreIndex: defaultSelectStoreIndex,
});
}
}
}
},
},
show: {
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,
});
}
}
}
});
}
},
},
},
/**
* 组件的初始数据
*/
data: {
searchValue: "",
selectStoreIndex: 0,
edit: false,
pickerList: [],
defaultSelectStoreIndex: [],
},
/**
* 组件的方法列表
*/
methods: {
init() {
let { pickerListAll, orderObj, type, referrerId } = this.properties;
const clonedList = wx.$util.deepClone(pickerListAll || []);
this.setData({
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() {
if (this.data.disabled) return;
this.setData({
edit: true,
inputFocus: true,
});
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value);
}
this.setData({
searchValue: value,
});
},
input(e) {
let { value } = e.detail;
let { pickerListAll } = this.data;
this.setValue(value);
if (value) {
const pickerList = pickerListAll.filter((v) => {
return v.staffName.includes(value);
});
this.setData({
pickerList,
});
} else {
this.init();
}
this.setData({
selectStoreIndex: 0,
defaultSelectStoreIndex: [0],
});
},
inputBlur(e) {
this.emit(e);
},
inputConfifm(e) {
this.emit(e);
},
emit(e) {
let {
detail: { value },
type,
} = e;
this.setData({
edit: false,
});
this.setValue(value);
// console.log('123')
this.triggerEvent(type == "confirm" ? "search" : "blur", { value });
},
confirm() {
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];
// 安全检查:确保 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) => {
return v.uuid == referrerItem.uuid;
});
if (pickerIndex == -1) {
wx.$util.showToast("请选择员工");
return;
}
this.triggerEvent("confirm", { value: pickerIndex });
this.setData({
show: false,
});
},
changeStore(e) {
this.setData({
selectStoreIndex: e.detail.value[0],
});
},
},
});
{
"component": true,
"usingComponents": {
"popup": "/packageUsedCar/components/Popup/Popup"
}
}
<popup class="date-background" show="{{show}}" bindconfirm="confirm" title="{{title}}" height="80%">
<view class='date-container'>
<view class='date-confirm'>
<view class="search-box">
<view class="search-input">
<block wx:if="{{!edit}}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open">
<block wx:if="{{searchValue}}">{{searchValue}}</block>
<block wx:else>
<image src="./images/search.png" class="icon" />
{{'请输入名字'}}
</block>
</view>
</block>
<block wx:else>
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm" />
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view class="picker" value="{{defaultSelectStoreIndex}}" immediate-change="true" indicator-class="indicator" bindchange="changeStore">
<picker-view-column>
<block wx:for="{{pickerList}}" wx:key="merchantId">
<view class="view pickViewColumn">{{item.staffName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
\ No newline at end of file
/* packageEquity/components/storePicker/storePicker.wxss */
.search-box {
height: var(--fontSize104);
display: flex;
align-items: center;
justify-content: center;
margin: 0 var(--fontSize32);
font-size: var(--fontSize28);
width: 100%;
}
.search-box .search-input {
/* width: var(--fontSize686); */
width: 100%;
height: var(--fontSize72);
background: #F7F8FA;
border-radius: var(--fontSize38);
color: #333;
}
.search-input .input {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
}
.search-input .icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize10);
}
.search-input .placeholder {
color: #C8C9CC;
}
.date-container {
height: 100%;
}
.date-confirm {
display: flex;
justify-content: center;
align-items: center;
padding: 0 var(--fontSize20);
font-size: var(--fontSize34);
line-height: var(--fontSize70);
}
.picker-box {
/* height: var(--fontSize450); */
height: calc(100% - var(--fontSize200));
display: flex;
}
.picker-box .picker {
width: 100%;
}
.tbn_class {
font-size: var(--fontSize26);
color: #333;
}
.pickViewColumn {
text-align: center;
line-height: 34px;
font-size: var(--fontSize32);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
import { Request } from '~/packageUsedCar/newRequestIndex';
import {
envIndex
} from "~/config";
import util from '~/utils/util.js'
// let target = 'prod'
// let target = 'test'
const target = ['', "dev", "test", "prod", "preRelease", "cdptest"];
const requestObj = {
dev: 'http://gsc.dev.glsx.com.cn/gsc-vcp-pad-facade',
test: 'https://gsc.test.glsx.com.cn/gsc-vcp-pad-facade',
preRelease: 'https://gsc.beta.glsx.com.cn/gsc-vcp-pad-facade',
prod: 'https://gsc.glsx.com.cn/gsc-vcp-pad-facade',
}
const getRequestConfig = () => ({
baseURL: requestObj[target[envIndex]],
// baseURL: 'https://gsc.test.glsx.com.cn/gsc-vcp-miniapp-facade',
// baseURL: 'http://192.168.1.117:9898/gsc-vcp-miniapp-facade',
// baseURL: 'http://192.168.1.114:9898/gsc-vcp-miniapp-facade',
appId: 'App_PromoteBusiness',
appSecret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: () => util.getSessionId() || ''
},
// params: {sessionId},
response: { // 响应处理配置(推荐使用)
code_key: 'code', // 状态码字段名,可以是字符串或字符串数组
code_success_value: '0', // 成功状态码值
data_key: 'data', // 数据字段名
errId: 'errId', // 错误ID字段名
errId_logout_value: '21' // 登出错误ID值
},
// 事件配置
events: {
// 请求发送前触发
request: (requestData, config) => {
// console.log('request事件触发', requestData, config);
},
// 收到响应时触发(无论成功或失败)
response: (responseData, config) => {
// console.log('response事件触发', responseData, config);
},
// 请求成功时触发(业务状态码为成功值)
success: (data, config) => {
console.log('success事件触发', data, config);
},
// 请求失败时触发(业务状态码为失败值)
error: (errorData, config) => {
console.log('error事件触发', errorData, config);
wx.$api.showToast(errorData.msg)
},
// 需要登出时触发(业务状态码为登出值)
logout: (data, config) => {
console.log('logout事件触发', data, config);
// 可以在这里处理登出逻辑
let thisPage = wx.$router.getPageInstance()
// console.log(thisPage);
wx.hideLoading()
if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true, '')
}
},
// 重复请求被阻止时触发
duplicate: (duplicateData, config) => {
console.log('duplicate事件触发', duplicateData, config);
// 可以在这里处理重复请求的逻辑,如显示提示信息
}
},
})
export const newRequest = {
get(url, params, config) {
const requestInstance = new Request(getRequestConfig());
return requestInstance.get(url, params, config);
},
post(url, data, config) {
const requestInstance = new Request(getRequestConfig());
return requestInstance.post(url, data, config);
},
}
export default newRequest
This diff could not be displayed because it is too large.
// packageUsedCar/pages/TabBar/usedCarPage.js
import { get4SStoreList } from '~/store/index'
Page({
/**
* 页面的初始数据
*/
data: {
tabBarList: [
{
name: '首页',
iconPath: '/images/tab-home.png',
selectedIconPath: '/images/tab-home-active.png'
},
{
name: '评估单管理',
iconPath: '/images/tab-order.png',
selectedIconPath: '/images/tab-order-active.png'
},
{
name: '交付单管理',
iconPath: '/images/tab-delivery-note.png',
selectedIconPath: '/images/tab-delivery-note-active.png'
},
{
name: '个人中心',
iconPath: '/images/tab-mine.png',
selectedIconPath: '/images/tab-mine-active.png'
}
],
tabIndex: 0,
pageShow: [true, false, false],
navBarHeight: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.initList()
},
// 从日报返回固定选中首页
navToIndex() {
this.setData({
tabIndex: 0
}, () => {
this.initList()
})
},
// 筛选页面返回
containerBack() {
let { tabIndex } = this.data;
this.selectComponent(`#page-${tabIndex}`)?.back &&
this.selectComponent(`#page-${tabIndex}`).back()
},
showMenuPopup() {
this.setData({
shopSideSelectPopup: true
})
},
init(userInfo) {
this.setData({ userInfo })
this.get4SStoreList()
},
get4SStoreList() {
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid,
scene: 7
}
get4SStoreList(params, userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo.loginRole == 6).then(result => {
if (!result?.length) {
userInfo.shopMerchantId = null
userInfo.default4SStoreInfo_usedCar = {}
userInfo.shopMerchantName = null
userInfo.sceneType = null
wx.$util.setUserInfo(userInfo)
return wx.$router.reLaunch('pages.accountItems')
}
if (result?.length && userInfo?.isSuper) {
let obj = {
...userInfo,
default4SStoreInfo_usedCar: {
merchantId: result[0]?.merchantId,
merchantName: result[0]?.merchantName
}
}
if (!userInfo?.default4SStoreInfo_crowdFunding || !Object.keys(userInfo?.default4SStoreInfo_crowdFunding).length) {
wx.$util.setUserInfo(obj)
this.setData({
userInfo: obj
})
}
}
this.setData({
storeRange: result || [],
showPage: true
})
})
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
onRoute(options) {
// console.log(options,'options');
if (options&&options.tabIndex) {
this.changeTabBar({detail:options.tabIndex})
}
},
changeTabBar(e) {
let tabIndex = e.detail
wx.$eventbus.emit('page_show')
this.setData({
[`pageShow[${tabIndex}]`]: true,
tabIndex
})
this.initList()
},
initList() {
let { tabIndex } = this.data
this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"custom-tabBar": "/components/CustomTabBar/CustomTabBar",
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"index-page": "../indexPage/index/index",
"evaluation-form-page": "../evaluationForm/evaluationList/evaluationList",
"delivery-page": "../deliveryNote/deliveryList/deliveryList",
"tab-mine": "/components/TabMine/TabMine"
},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageUsedCar/pages/TabBar/usedCarPage.wxss */
.navigation-header .navigation-bar {
background-color: transparent;
box-shadow: none;
}
.title-text {
font-weight: 500;
}
.bg {
width: 100%;
height: var(--fontSize400);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/nav-bg.png') no-repeat;
background-size: 100% var(--fontSize400);
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.hide {
display: none;
}
.show {
display: block;
}
.navigation-title {
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title-text {
text-align: center;
max-width: calc(100% - var(--fontSize24));
font-weight: 500;
font-size: var(--fontSize32);
color: #FFFFFF;
}
.navigation-title .arrow {
flex-shrink: 0;
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: var(--fontSize4);
transform: rotate(180deg);
transition: all 0.5s;
}
.navigation-title .move {
transform: rotate(270deg);
}
.layout {
box-sizing: border-box;
position: relative;
font-size: var(--fontSize24);
color: #8A8C90;
display: flex;
flex-direction: column;
height: calc(100vh - var(--fontSize100) - var(--constantSafeAreaInsetBottom));
height: calc(100vh - var(--fontSize100) - var(--envSafeAreaInsetBottom));
overflow: hidden;
}
.layout .pagedetail {
height: 100%;
}
.van-tabs__line{
border-radius: 2rpx 2rpx 0 0 !important;
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.layout{
height: calc(100vh - var(--fontSize70) - var(--constantSafeAreaInsetBottom));
height: calc(100vh - var(--fontSize70) - var(--envSafeAreaInsetBottom));
}
}
\ No newline at end of file
<!--packageUsedCar/pages/TabBar/usedCarPage.wxml-->
<block wx:if="{{showScreen}}">
<navigation-bar showBack class="navigation-header" showWhiteMenu bindback="containerBack" navStyle="background-color:#fff;box-shadow:none;">筛选</navigation-bar>
</block>
<block wx:else>
<navigation-bar class="navigation-header" showWhiteMenu bindnavbarReady="navbarReady" showMenu="{{ tabIndex == 0 }}" showBack="{{staffUuid&&tabIndex == 1?true:false}}" navStyle="{{'background-color: rgba(0,0,0,0);box-shadow:none;' }}" bindback="back" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" wx:if="{{ tabIndex == 0 }}">
<view class="navigation-title-text text-hide">{{(userInfo && userInfo.shopMerchantName) || '全部'}}</view>
</view>
<block wx:elif="{{tabIndex == 1 || tabIndex == 2}}">
<view class="title-text">{{tabBarList[tabIndex].name}}</view>
</block>
<view class="title-text" wx:else>我的</view>
</navigation-bar>
</block>
<view class="bg" wx:if="{{tabIndex == 0}}"></view>
<view class="layout {{waitInputCount && mode == 1?'tipsHeigh':''}}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}">
<index-page id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}"> </index-page>
<evaluation-form-page id="page-1" class="pagedetail {{ tabIndex == 1?'':'hide' }}"> </evaluation-form-page>
<delivery-page id="page-2" class="pagedetail {{tabIndex == 2 ? '' : 'hide'}}" navBarHeight="{{navBarHeight}}"></delivery-page>
<tab-mine id="page-3" class="pagedetail {{ tabIndex == 3?'':'hide' }}"></tab-mine>
</block>
</view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#347BFF" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{storeRange}}"/>
\ No newline at end of file
// 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
{
"component": true,
"usingComponents": {
"steps": "../steps/steps",
"step1": "../step1/step1",
"step2": "../step2/step2",
"step3": "../step3/step3"
}
}
\ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/DeliverySteps/DeliverySteps.wxss */
\ 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
import newApi from '~/packageUsedCar/api'
// packageUsedCar/pages/deliveryNote/components/DetailInfo/DetailInfo.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
properties: {
detail: {
type: Object,
value: {},
observer: function(val) {
if (val.deliveryOrderId) this.getDeliveryOrderOpLog()
}
}
},
data: {
OP_TYPE: {
1: '创建交付工单',
2: '确认客户到店',
3: '确认客户提车'
},
PAYMENT_STATUS: {
0: '待支付',
1: '已结清'
},
logList: [],
carInfo: [
{ label: '车型名称', key: 'vehicleTitle' },
{ label: '车牌号', key: 'licensePlate' },
{ label: '车架号', key: 'vin' },
{ label: '当前位置', key: 'currentLocation', hasLine: true },
{ label: '客户姓名', key: 'buyerName' },
{ label: '联系方式', key: 'buyerContact' },
{ label: '提车地址', key: 'pickupAddress' },
{ label: '成交时间', key: 'transactionTime', hasLine: true },
{ label: '保管人姓名', key: 'custodianName' },
{ label: '车辆保管人电话', key: 'custodianPhone' },
{ label: '交付专员', key: 'handlerName' },
{ label: '交付专员电话', key: 'handlerPhone' }
],
IMG_URL
},
methods: {
async getDeliveryOrderOpLog() {
const { deliveryOrderId } = this.data.detail
try {
const data = await newApi.getDeliveryOrderOpLog({ deliveryOrderId })
this.setData({
logList: data
})
} catch (error) {
console.error('获取操作日志失败:', error)
}
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageUsedCar/pages/deliveryNote/components/DetailInfo/DetailInfo.wxss */
.detail-info-box {
padding: 0 var(--fontSize20);
.box {
border-radius: var(--fontSize16);
background: #ffffff;
margin-bottom: var(--fontSize24);
box-sizing: border-box;
padding: var(--fontSize24);
.title {
color: #292D33;
font-size: var(--fontSize32);
font-weight: 500;
margin-bottom: var(--fontSize24);
}
.item {
margin-bottom: var(--fontSize24);
display: flex;
font-size: 28rpx;
.label {
color: #999EA8;
width: var(--fontSize208);
}
.value {
width: calc(100% - var(--fontSize208));
color: #333333;
&.await {
color: #f59619;
}
&.success {
color: #2cca74;
}
}
}
.tips {
border-radius: var(--fontSize16);
background: #fef4e8;
box-sizing: border-box;
padding: var(--fontSize16) var(--fontSize16) var(--fontSize16) var(--fontSize56);
color: #f59619;
font-size: var(--fontSize26);
position: relative;
.icon {
position: absolute;
top: var(--fontSize16);
left: var(--fontSize16);
width: var(--fontSize32);
height: var(--fontSize32);
display: flex;
align-items: center;
justify-content: center;
}
}
}
.log-info {
margin-bottom: 0;
.log-box {
padding-top: var(--fontSize24);
}
}
}
.line {
margin: 28rpx 0;
width: 100%;
height: 2rpx;
background: #f7f7f6;
}
.log-item {
min-height: 188rpx;
position: relative;
padding-left: 60rpx;
}
.log-item .item {
margin-top: 16rpx;
}
.log-item .item .label {
width: 168rpx;
}
.log-item .item .value {
width: calc(100% - 168rpx);
word-break: break-all;
}
.item-mark {
position: absolute;
top: 0;
left: 0;
width: 32rpx;
}
.mark-line {
height: 180rpx;
width: 2rpx;
background: #d6e4ff;
position: absolute;
top: 8rpx;
left: 50%;
transform: translateX(-50%);
}
.circle {
position: relative;
width: 20rpx;
height: 20rpx;
background: #8eb2fb;
border-radius: 100%;
margin: 8rpx auto 0;
z-index: 2;
}
.circle.first {
width: 32rpx;
height: 32rpx;
background: #d6e4ff;
position: relative;
}
.circle.first::before,
.circle.first::after {
content: '';
position: absolute;
border-radius: 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.circle.first::before {
width: 20rpx;
height: 20rpx;
background: #2c66f7;
}
.circle.first::after {
width: 10rpx;
height: 10rpx;
background: #fff;
}
.log-title {
color: #333333;
font-size: 32rpx;
font-weight: 500;
line-height: 44rpx;
}
\ No newline at end of file
<!--packageUsedCar/pages/deliveryNote/components/DetailInfo/DetailInfo.wxml-->
<view class="detail-info-box">
<view wx:if="{{detail.id}}">
<view class="pay-info box">
<view class="title">财务信息</view>
<view class="item">
<view class="label">付款状态</view>
<view class="value {{detail.paymentStatus == 1 ? 'success' : 'await'}}">{{PAYMENT_STATUS[detail.paymentStatus]}}</view>
</view>
<view wx:if="{{detail.paymentStatus != 1}}" class="tips">
<image class="icon" src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/>
中拍人现场看车后支付,请门店人员确认客户完成车款支付。
</view>
</view>
<view class="car-info box">
<view class="title">车辆与客户信息</view>
<view wx:for="{{carInfo}}" wx:key="index" class="item-box">
<view class="item">
<view class="label">{{item.label}}</view>
<view class="value">{{detail[item.key] || '-'}}</view>
</view>
<view wx:if="{{item.hasLine}}" class="line"></view>
</view>
<view wx:if="{{detail.paymentStatus != 1}}" class="tips">
<image class="icon" src="{{IMG_URL}}usedCar/warning-icon.png" mode=""/>
交付专员需确认交付车辆信息,与买家信息无误后才可交付。
</view>
</view>
<view class="log-info box">
<view class="title">操作日志</view>
<view class="log-box">
<view wx:for="{{logList}}" wx:key="index" class="log-item">
<view class="log-title">{{OP_TYPE[item.opType]}}</view>
<view class="item">
<view class="label">操作人</view>
<view class="value">{{item.opUserName}}</view>
</view>
<view class="item">
<view class="label">时间</view>
<view class="value">{{item.createdDate}}</view>
</view>
<view class="item-mark">
<view class="circle {{index == 0 ? 'first' : ''}}"></view>
<view wx:if="{{index != logList.length - 1}}" class="mark-line"></view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
navBarHeight: String,
show: {
type: Boolean,
observer: function (n, o) {
if (n) {
this.setViewData()
} else {
this.setData({
x: this.data.windowWidth
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{
name: '全部',
active: true
}, {
name: '今日',
createdStartDate: new Date().format('yyyy-MM-dd'),
createdEndDate: new Date().format('yyyy-MM-dd')
}, {
name: '本月',
createdStartDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
createdEndDate: new Date().format('yyyy-MM-dd')
}, {
createdStartDate: '',
createdEndDate: '',
type: 'custom'
}]
},
/**
* 组件的方法列表
*/
methods: {
setViewData() {
let {
navBarHeight
} = this.data
wx.$util.getViewInfo(
'.btn-box',
res => {
console.log(res)
this.setData({
height: navBarHeight,
btnHeight: res.height
})
},
this
)
},
init() {
let {
orderTimeList
} = this.data
this.setData({
['form.orderTimeList']: wx.$util.deepClone(orderTimeList)
})
},
showMore(e) {
let {
type
} = e.currentTarget.dataset
let {
employShowMore,
salesmanShowMore
} = this.data
let prop = type == 1 ? 'employShowMore' : 'salesmanShowMore'
this.setData({
[prop]: type == 1 ? !employShowMore : !salesmanShowMore
})
},
rangeSelect(e) {
let {
index,
name
} = e.currentTarget.dataset
let data = this.data.form[name]
let {
date: {
start,
end
}
} = e.detail
data?.map(i => (i.active = false))
let obj = name == 'orderTimeList' ? {
active: true,
createdStartDate: start,
createdEndDate: end,
type: 'custom'
} : {
active: true,
payStartDate: start,
payEndDate: end,
type: 'custom'
}
data[index] = obj
this.setData({
[`form.${name}`]: data,
isReset: false
})
},
// 日期组件
showCalendar(e) {
let {
target
} = e.currentTarget.dataset
let calendarModule = target == 'showOrder' ? this.selectComponent('#orderCalendar') : this.selectComponent('#payCalendar')
calendarModule.showCalendar && calendarModule.showCalendar(e)
},
choose(e) {
let {
index,
listName
} = e.currentTarget.dataset
let target = this.data.form[listName]
if (target[index].disabled) return
target.forEach(i => {
i.active = false
})
target[index].active = true
this.setData({
[`form.${listName}`]: target,
isReset: false
})
},
reset() {
this.init()
},
confirm() {
let {
form,
userInfo,
isReset
} = this.data
let obj = {}
Object.keys(form).forEach(e => {
form[e]?.map(i => {
if (i.active) {
let {
createdStartDate,
createdEndDate,
} = i
if (createdStartDate && createdEndDate) {
obj.createdStartDate = `${createdStartDate} 00:00:00`
obj.createdEndDate = `${createdEndDate} 23:59:59`
}
}
})
})
if (isReset) obj = {}
this.triggerEvent('confirm', obj)
}
},
attached() {
wx.$util.getSystemInfo(info => {
let {
windowWidth
} = info
this.setData({
x: windowWidth,
windowWidth,
isFullSucreen: wx.$util.isFullSucreen(true)
})
})
this.init()
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"store-select-popup": "/components/StoreSelectPopup/StoreSelectPopup"
}
}
\ No newline at end of file
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight }}px + 1px);margin-top:calc({{navBarHeight }}px - 1px);" hidden="{{!show}}">
<view class="main" style="height: calc(100% - var(--fontSize160));">
<view class="box">
<view class="title">
工单创建时间
</view>
<view class="list-box">
<block wx:for="{{form.orderTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="orderTimeList" dateType='range' calenderColor='#347BFF' vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
</calendar>
<view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.createdStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.createdStartDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.createdEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.createdEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderTimeList" data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<!-- 占位空间 防止底部按钮未置在底部 -->
<view style="width: 100vw;height: calc(100% - var(--fontSize280));"></view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">重置</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
\ No newline at end of file
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #F2F3F7;
animation: show-confirm-box .5s forwards;
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.main {
box-sizing: border-box;
}
.box {
padding: 0 var(--fontSize32);
background: #FFFFFF;
}
.box .title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
color: #292D33;
padding: var(--fontSize34) 0 var(--fontSize30);
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
}
.box .title .title-left{
display: flex;
align-items: flex-end;
}
.box .title .title-tips{
font-size: var(--fontSize22);
font-weight: 400;
color: #757980;
margin-left: var(--fontSize8);
}
.box .title .collapse-btn{
width: var(--fontSize48);
height: var(--fontSize48);
}
.box .title .collapse-btn.rotate-180{
transform: rotate(180deg);
}
.box .list-box {
display: flex;
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
}
.box .list-box .item {
/* width: var(--fontSize214); */
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
border-radius: var(--fontSize4);
box-sizing: border-box;
border: var(--fontSize2) solid transparent;
padding: var(--fontSize16) var(--fontSize33);
flex-wrap: wrap;
font-size: var(--fontSize24);
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
}
.box .list-box .item .text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.box .list-box .item.flex-1{
width: 100%;
text-align: left;
margin-right: 0;
line-height: 100%;
display: flex;
align-items: center;
}
.box .list-box .item.grey{
color: #999EA8;
}
.box .list-box .item.custom-time{
/* width: var(--fontSize316); */
width: calc(316 / 750 * 100%);
margin-bottom: 0;
}
.box .list-box .item.custom-time:last-child{
margin-right: 0;
margin-left: var(--fontSize20);
}
.box .list-box .item:nth-of-type(3n+3) {
margin-right: 0;
}
.box .list-box .calendar .item {
margin-right: 0;
}
.box .list-box .item.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
.box .list-box .item.disabled {
opacity: .4;
}
.box .list-box .item .inline-block{
display: inline-block;
}
.box .list-box .item .merchant-name{
max-width: calc(100% - var(--fontSize140));
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btn-box {
position: sticky;
padding: var(--fontSize10) var(--fontSize32);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize28);
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
}
.btn-box .btn {
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9;
box-sizing: border-box;
height: var(--fontSize80);
}
.btn-box .btn.clear {
border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186);
color: #292D33;
}
.btn-box .btn.done {
background: #347BFF;
color: #fff;
width: var(--fontSize480);
}
.isFullSucreen-btn {
padding-bottom: var(--fontSize68);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
// 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.$util.showLoading('加载中')
// 设置加载状态
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
{
"component": true,
"usingComponents": {}
}
\ 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
<!--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
// 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
let sysInfo = wx.getSystemInfoSync()
if (count <= 0) {
wx.showToast({
title: '最多只能上传10张图片',
icon: 'none'
})
return
}
wx.chooseImage({
count: count,
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
})
const uploadImages = async (tempFiles) => {
wx.$util.showLoading('上传中')
try {
for (const item of tempFiles) {
const val = item.path
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadImg({
file: `${type}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
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 confirm() {
try {
const { imgList, step, remark, detail } = this.data
if (imgList.length === 0) return
// 拼接图片URL(用逗号分隔)
const confirmImages = imgList.join(',')
// 埋点
wx.$track.setTrackData(0, 'delivery_arrive_shop', {}, '', 7)
// 显示加载
wx.$util.showLoading('提交中...')
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
{
"component": true,
"usingComponents": {}
}
\ 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
<!--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="confirm"
>
确认提车
</view>
</view>
<view class="block"></view>
</view>
\ 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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!