Commit 9f93e038 by cen

feat: 新增签约信息

1 parent 593e926d
...@@ -2,6 +2,7 @@ import commonApi from './common' ...@@ -2,6 +2,7 @@ import commonApi from './common'
import systemApi from './systemApi' import systemApi from './systemApi'
import userApi from './userApi' import userApi from './userApi'
import boutiqueApi from './boutique' import boutiqueApi from './boutique'
import evaluationApi from './evaluation'
import customerApi from './customerApi' import customerApi from './customerApi'
import pointApi from './point' import pointApi from './point'
import receptionApi from './receptionApi' import receptionApi from './receptionApi'
...@@ -18,5 +19,6 @@ module.exports = { ...@@ -18,5 +19,6 @@ module.exports = {
receptionApi, receptionApi,
sceneMarketApi, sceneMarketApi,
interceptionApi, interceptionApi,
popupApi popupApi,
evaluationApi
} }
No preview for this file type
...@@ -144,6 +144,9 @@ ...@@ -144,6 +144,9 @@
.mt-24 { .mt-24 {
margin-top: toRpx(24); margin-top: toRpx(24);
} }
.mt-28 {
margin-top: toRpx(28);
}
.mt-32 { .mt-32 {
margin-top: toRpx(32); margin-top: toRpx(32);
} }
......

2.76 MB | W: | H:

2.76 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -214,6 +214,18 @@ ...@@ -214,6 +214,18 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/evaluationForm/signInfo",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/evaluationForm/confirmCar",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
</view> </view>
</view> </view>
<view class="flex align-center footer-box justify-center" v-if="isMake"> <view class="flex align-center footer-box justify-center" v-if="isMake && orderInfo.status !== 12">
<view class="edit btn flex-1" @click="repeal">撤销工单</view> <view class="edit btn flex-1" @click="repeal">撤销工单</view>
</view> </view>
<!-- <view class="flex align-center footer-box justify-center" v-if="orderInfo.constructionFlag == 'Y'"> <!-- <view class="flex align-center footer-box justify-center" v-if="orderInfo.constructionFlag == 'Y'">
......
...@@ -32,77 +32,14 @@ ...@@ -32,77 +32,14 @@
<view class="fromBox"> <view class="fromBox">
<!-- 车辆信息表单 --> <!-- 车辆信息表单 -->
<view v-if="currentStep === 1" class="form-container">
<view class="form-item flex align-center justify-between" :class="{ 'full-width': field.fullWidth }" v-for="field in formFields" :key="field.key" @click="handleCell(field)">
<view class="from-label">
{{ field.label }}
<text class="requiredLabel" v-if="field.required">*</text>
</view>
<template v-if="field.type === 'input'">
<input v-if="field.targetObj" type="text" :placeholder="'请输入' + field.label" v-model="formData[field.targetObj][field.targetKey]" />
<input v-else type="text" :placeholder="'请输入' + field.label" v-model="formData[field.targetKey]" />
</template>
<template v-if="field.type === 'select'">
<view class="flex align-center from-value">
<template v-if="field.targetObj ? formData[field.targetObj][field.targetKey] : formData[field.targetKey]">
<template v-if="field.showText && userInfo && userInfo[field.showText]">
{{ userInfo[field.showText] }}
<text>|</text>
</template>
{{ field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetNameKey] }}
</template>
<template v-else>
<span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</template>
<template v-if="field.type === 'radio'">
<radio-group class="radio-group flex align-center" @change="radioChange">
<label class="uni-list-cell uni-list-cell-pd align-center flex ml-48" v-for="(item, index) in field.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="index === current" />
<view class="radio-name">{{ item.name }}</view> <FormCell v-if="currentStep === 1" :formFields="formFields" :formData="formData" @handleCell="handleCell" />
</label>
</radio-group>
</template>
<template v-if="field.type === 'pricek'">
<picker @change="bindPickerChange" range-key="name" :value="index" :range="field.fieldPickerArray">
<view class="flex align-center from-value">
<template v-if="field.targetObj ? formData[field.targetObj][field.targetKey] : formData[field.targetKey]">
{{ field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetNameKey] }}
</template>
<template v-else>
<span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</picker>
</template>
</view>
<view class="form-item full-width">
<view class="from-label">车况描述</view>
<textarea placeholder="请输入 (1000字以内)" auto-height="true" v-model="formData.carCondition" maxlength="1000" />
</view>
</view>
<!-- 牌证信息表单 --> <!-- 牌证信息表单 -->
<view v-else-if="currentStep === 2" class="form-container"> <FormCell v-else-if="currentStep === 2" :formFields="licenseFormFields" :formData="formData" @handleCell="handleCell" />
<view class="form-item flex align-center" :class="{ 'full-width': field.fullWidth }" v-for="field in licenseFormFields" :key="field.key" @click="handleCell(field)">
<view class="from-label">
{{ field.label }}
<text class="requiredLabel" v-if="field.required">*</text>
</view>
<input type="text" :placeholder="'请输入' + field.label" v-model="formData[field.key]" />
</view>
<view class="form-item full-width">
<view class="from-label">原车主住址</view>
<textarea placeholder="请输入 (1000字以内)" v-model="formData.carCondition" maxlength="1000" />
</view>
</view>
<!-- 图像信息表单 --> <!-- 图像信息表单 -->
<view v-else-if="currentStep === 3" class="form-container"> <view v-else-if="currentStep === 3" class="form-container-upload">
<view class="upload-section"> <view class="upload-section">
<view class="section-title">车辆图片</view> <view class="section-title">车辆图片</view>
<view class="upload-grid"> <view class="upload-grid">
...@@ -195,12 +132,14 @@ ...@@ -195,12 +132,14 @@
import { popupTypeEnum } from '../boutique/tool/contant' import { popupTypeEnum } from '../boutique/tool/contant'
import OrderPopup from '@/components/OrderPopup/index.vue' import OrderPopup from '@/components/OrderPopup/index.vue'
import SelectCar from './components/SelectCar.vue' import SelectCar from './components/SelectCar.vue'
import FormCell from './components/FormCell.vue'
import { uploadFile } from '@/utils/ossUploadFile/uploadFile.js' import { uploadFile } from '@/utils/ossUploadFile/uploadFile.js'
export default { export default {
name: 'AddEvaluationFrom', name: 'AddEvaluationFrom',
components: { components: {
OrderPopup, OrderPopup,
SelectCar SelectCar,
FormCell
}, },
computed: { computed: {
displayData() { displayData() {
...@@ -230,7 +169,7 @@ export default { ...@@ -230,7 +169,7 @@ export default {
day: '10' day: '10'
} }
], ],
userInfo: {},
popupTypeEnum, popupTypeEnum,
formData: { evalOrderBasicReqDTO: {} }, formData: { evalOrderBasicReqDTO: {} },
currentStep: 1, // 当前步骤,默认为1 currentStep: 1, // 当前步骤,默认为1
...@@ -457,16 +396,40 @@ export default { ...@@ -457,16 +396,40 @@ export default {
{ name: '中', value: '3' }, { name: '中', value: '3' },
{ name: '差', value: '4' } { name: '差', value: '4' }
] ]
},
{
key: 'comprehensiveEvaluation',
label: '车况描述',
required: true,
fullWidth: true,
targetNameKey: 'sellerName',
sourceNameKey: 'staffName',
sourceKey: 'uuid',
targetKey: 'sellerUserId',
targetObj: 'evalOrderBasicReqDTO',
type: 'textarea'
} }
], ],
licenseFormFields: [ licenseFormFields: [
{ key: 'sales顾问', label: '钥匙数', required: true, fullWidth: false }, { key: 'sales顾问', label: '钥匙数', required: true, fullWidth: false, targetKey: 'sellerUserId', targetObj: 'evalOrderBasicReqDTO', type: 'input' },
{ key: 'brandModel', label: '过户次数', required: true, fullWidth: false }, { key: 'brandModel', label: '过户次数', required: true, fullWidth: false, targetKey: 'sellerUserId', targetObj: 'evalOrderBasicReqDTO', type: 'input' },
{ key: 'vin', label: '交强险到期', required: true, fullWidth: false }, { key: 'vin', label: '交强险到期', required: true, fullWidth: false, type: 'select' },
{ key: 'licensePlate', label: '年审到期', required: true, fullWidth: false }, { key: 'licensePlate', label: '年审到期', required: true, fullWidth: false, type: 'select' },
{ key: 'engineNo', label: '商业险到期', required: true, fullWidth: false }, { key: 'engineNo', label: '商业险到期', required: true, fullWidth: false, type: 'select' },
{ key: 'registrationCity', label: '原车主名称', required: true, fullWidth: false }, { key: 'registrationCity', label: '原车主名称', required: true, fullWidth: false, targetKey: 'sellerUserId', targetObj: 'evalOrderBasicReqDTO', type: 'input' },
{ key: 'registrationDate', label: '原车主电话', required: true, fullWidth: true } { key: 'registrationDate', label: '原车主电话', required: true, fullWidth: true, targetKey: 'sellerUserId', targetObj: 'evalOrderBasicReqDTO', type: 'input' },
{
key: 'comprehensiveEvaluation',
label: '原车主住址',
required: true,
fullWidth: true,
targetNameKey: 'sellerName',
sourceNameKey: 'staffName',
sourceKey: 'uuid',
targetKey: 'sellerUserId',
targetObj: 'evalOrderBasicReqDTO',
type: 'textarea'
}
], ],
uploadFields: [ uploadFields: [
{ key: 'exterior-front-left-45', label: '左前45度', required: true }, { key: 'exterior-front-left-45', label: '左前45度', required: true },
...@@ -904,82 +867,15 @@ export default { ...@@ -904,82 +867,15 @@ export default {
width: 100%; width: 100%;
height: calc(100% - #{toRpx(268)}); height: calc(100% - #{toRpx(268)});
} }
.form-container {
.form-container-upload {
width: 100%; width: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
gap: toRpx(24);
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
padding-right: toRpx(8); padding-right: toRpx(8);
} }
.form-item {
border-radius: toRpx(24);
background: #ffffff;
padding: toRpx(28) toRpx(32);
box-sizing: border-box;
}
.form-item.full-width {
grid-column: 1 / -1;
}
.from-label {
color: #333333;
font-size: toRpx(32);
font-weight: 400;
display: flex;
align-items: flex-start;
width: toRpx(240);
}
.from-value {
display: flex;
justify-content: flex-end;
align-items: center;
height: 100%;
.sprite-icon {
margin-bottom: toRpx(2);
}
}
.placeholder {
color: #999;
font-size: toRpx(28);
line-height: toRpx(32);
}
.radio-name {
display: inline-block;
color: #333333;
font-size: toRpx(28);
}
input {
flex: 1;
height: toRpx(40);
font-size: toRpx(28);
color: #333333;
padding: 0;
text-align: right;
}
textarea {
margin-top: toRpx(22);
border-radius: toRpx(16);
border: toRpx(2) solid #eff0f2;
background: #f4f5f7;
padding: toRpx(24);
width: 100%;
}
.textarea-placeholder {
color: #999999;
font-size: toRpx(28);
font-weight: 400;
}
.requiredLabel {
color: #f24724;
font-size: toRpx(28);
font-weight: 400;
margin-left: toRpx(8);
}
/* 上传按钮样式 */ /* 上传按钮样式 */
.upload-btn { .upload-btn {
width: toRpx(200); width: toRpx(200);
......
<template>
<view class="form-container formCell">
<view class="form-item flex align-center justify-between" :class="{ 'full-width': field.fullWidth, 'form-item-textarea': field.type === 'textarea' }" v-for="field in formFields" :key="field.key" @click.stop="handleCell(field)">
<view class="from-label" v-if="field.type !== 'pdf'">
{{ field.label }}
<text class="requiredLabel" v-if="field.required">*</text>
</view>
<template v-if="field.type === 'input'">
<input v-if="field.targetObj" type="text" :placeholder="'请输入' + field.label" v-model="formData[field.targetObj][field.targetKey]" />
<input v-else type="text" :placeholder="'请输入' + field.label" v-model="formData[field.targetKey]" />
</template>
<template v-if="field.type === 'select'">
<view class="flex align-center from-value">
<template v-if="field.targetObj ? formData[field.targetObj][field.targetKey] : formData[field.targetKey]">
<template v-if="field.showText && userInfo && userInfo[field.showText]">
{{ userInfo[field.showText] }}
<text>|</text>
</template>
{{ field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetNameKey] }}
</template>
<template v-else>
<span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</template>
<template v-if="field.type === 'radio'">
<radio-group class="radio-group flex align-center" @change="radioChange">
<label class="uni-list-cell uni-list-cell-pd align-center flex ml-48" v-for="(item, index) in field.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="index === current" />
<view class="radio-name">{{ item.name }}</view>
</label>
</radio-group>
</template>
<template v-if="field.type === 'pricek'">
<picker @change="bindPickerChange" range-key="name" :value="index" :range="field.fieldPickerArray">
<view class="flex align-center from-value">
<template v-if="field.targetObj ? formData[field.targetObj][field.targetKey] : formData[field.targetKey]">
{{ field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetNameKey] }}
</template>
<template v-else>
<span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</picker>
</template>
<template v-if="field.type === 'textarea'">
<textarea placeholder="请输入 (1000字以内)" v-model="formData.carCondition" maxlength="1000" />
</template>
<template v-if="field.type === 'pdf'">
<view class="flex-1">
<view class="flex flex-1 align-center justify-between">
<view class="from-label">
{{ field.label }}
<text class="requiredLabel" v-if="field.required">*</text>
</view>
<view class="flex align-center from-value">
<template>
<span class="placeholder">点击编辑</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</view>
<view class="pdf-box flex align-center justify-between">
<view>
<!-- <view class="sprite-icon icon-icon-select"></view> -->
<text>二手车买卖补充协议</text>
</view>
<view class="flex align-center">
<view class="btn">预览</view>
<view class="btn">删除</view>
</view>
</view>
</view>
</template>
</view>
</view>
</template>
<script>
export default {
name: 'FormCell',
props: {
formFields: {
type: Array,
default: () => []
},
formData: {
type: Object,
default: () => ({})
},
userInfo: {
type: Object,
default: () => ({})
}
},
data() {
return {
userInfo: {},
current: 0,
index: 0
}
},
computed: {},
methods: {
handleCell(field) {
this.$emit('handleCell', field)
},
radioChange(e) {
const value = e.detail.value
this.$emit('radioChange', value)
},
bindPickerChange(e) {
const index = e.detail.value
this.index = index
this.$emit('pickerChange', index)
},
updateFormData(data) {
this.$emit('update:formData', data)
}
},
watch: {
formData: {
deep: true,
handler(newData) {
this.$emit('formDataChange', newData)
}
}
},
mounted() {
// 组件挂载时的初始化逻辑
this.userInfo = uni.$storage.get('userInfo') || {}
console.log('userInfo', this.userInfo)
}
}
</script>
<style scoped lang="scss">
.formCell {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
gap: toRpx(24);
max-height: 100%;
overflow-y: auto;
padding-right: toRpx(8);
align-items: start;
.form-item {
border-radius: toRpx(24);
background: #ffffff;
padding: toRpx(28) toRpx(32);
box-sizing: border-box;
}
.form-item.full-width {
grid-column: 1 / -1;
height: auto;
uni-textarea {
height: toRpx(192);
}
}
.from-label {
color: #333333;
font-size: toRpx(32);
font-weight: 400;
display: flex;
align-items: flex-start;
width: toRpx(240);
}
.from-value {
display: flex;
justify-content: flex-end;
align-items: center;
height: 100%;
.sprite-icon {
margin-bottom: toRpx(2);
}
}
.placeholder {
color: #999;
font-size: toRpx(28);
line-height: toRpx(32);
}
.radio-name {
display: inline-block;
color: #333333;
font-size: toRpx(28);
}
input {
flex: 1;
height: toRpx(40);
font-size: toRpx(28);
color: #333333;
padding: 0;
text-align: right;
}
.form-item-textarea {
flex-direction: column;
align-items: start;
textarea {
margin-top: toRpx(22);
border-radius: toRpx(16);
border: toRpx(2) solid #eff0f2;
background: #f4f5f7;
padding: toRpx(24);
width: 100%;
.textarea-placeholder {
color: #999999;
font-size: toRpx(28);
font-weight: 400;
}
}
}
.requiredLabel {
color: #f24724;
font-size: toRpx(28);
font-weight: 400;
margin-left: toRpx(8);
}
.pdf-box {
padding: toRpx(20) toRpx(24);
box-sizing: border-box;
height: toRpx(80);
border-radius: toRpx(8);
background: #f4f5f7;
margin-top: toRpx(36);
color: #333333;
font-size: toRpx(28);
font-weight: 400;
.sprite-icon {
margin-right: toRpx(16);
}
.btn {
color: #4673ff;
margin-left: toRpx(32);
}
}
}
</style>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<slot name="footer"> <slot name="footer">
<view class="footer-box flex justify-center" v-if="isShowFooter"> <view class="footer-box flex justify-center" v-if="isShowFooter">
<view class="cancle-btn btn" v-if="isShowCancel" @click.stop="closePopup">{{ cancelText }}</view> <view class="cancle-btn btn" v-if="isShowCancel" @click.stop="closePopup">{{ cancelText }}</view>
<view class="sure-btn btn" @click.stop="confirm">{{ confirmText }}</view> <view class="sure-btn btn" :class="{ 'single-btn': isShowCancel }" @click.stop="confirm">{{ confirmText }}</view>
</view> </view>
</slot> </slot>
</uni-popup> </uni-popup>
...@@ -114,44 +114,59 @@ export default { ...@@ -114,44 +114,59 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// 大弹窗
::v-deep .customPopup .uni-popup__wrapper.bottom { ::v-deep .customPopup .uni-popup__wrapper.bottom {
overflow: hidden; overflow: hidden;
border-radius: toRpx(32) toRpx(32) 0 0; border-radius: toRpx(32) toRpx(32) 0 0;
.popup-top-box { .popup-top-box {
padding: toRpx(32) toRpx(48); padding: 0 toRpx(32);
height: toRpx(68);
}
.footer-box {
width: 100%;
height: toRpx(164);
background-color: #fff;
} }
} }
::v-deep .customPopup .center { //小弹窗
::v-deep .customPopup .uni-popup__wrapper.center {
width: toRpx(848); width: toRpx(848);
border-radius: toRpx(36); border-radius: toRpx(36);
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%); background-color: #fff !important;
padding: 0 toRpx(64) toRpx(48);
overflow: hidden; overflow: hidden;
.content { .content {
min-height: 32vh; min-height: 32vh;
max-height: 80vh; max-height: 80vh;
padding: 0 toRpx(64); overflow-y: auto;
} padding-bottom: toRpx(96);
.footer-box { box-sizing: border-box;
width: calc(100% - #{toRpx(128)}); background-color: #fff;
left: toRpx(64);
border-radius: 0 0 toRpx(42) toRpx(42);
} }
} .popup-top-box {
.popup-top-box { color: #1a1a1a;
color: #1a1a1a; font-size: toRpx(40);
font-size: toRpx(40); font-weight: 500;
font-weight: 500;
text-align: center;
padding: toRpx(48) toRpx(64);
background-color: #fff;
.popup-top-box-title {
flex: 1;
text-align: center; text-align: center;
background-color: #fff;
height: toRpx(136);
.popup-top-box-title {
flex: 1;
text-align: center;
}
.icon-close {
text-align: end;
}
} }
.icon-close { .footer-box {
text-align: end; width: 100%;
margin-top: toRpx(16);
border-radius: toRpx(42);
} }
} }
.justify-between { .justify-between {
-webkit-box-pack: justify; -webkit-box-pack: justify;
-ms-flex-pack: justify; -ms-flex-pack: justify;
...@@ -166,28 +181,25 @@ export default { ...@@ -166,28 +181,25 @@ export default {
font-size: toRpx(24); font-size: toRpx(24);
font-weight: 600; font-weight: 600;
} }
.footer-box { .single-btn {
width: 100%; width: 100%;
height: toRpx(164); }
background-color: #fff; .btn {
flex: 1;
.btn { height: toRpx(76);
flex: 1; border-radius: toRpx(48);
height: toRpx(80); opacity: 1;
border-radius: toRpx(48); line-height: toRpx(80);
opacity: 1; text-align: center;
line-height: toRpx(80); color: rgba(26, 26, 26, 0.6);
text-align: center; font-size: toRpx(32);
color: rgba(26, 26, 26, 0.6); font-weight: 500;
font-size: toRpx(32); }
font-weight: 500; .cancle-btn {
} background: #f0f1f5;
.cancle-btn { }
background: #f0f1f5; .sure-btn {
} color: #fff;
.sure-btn { background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
}
} }
</style> </style>
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<GeneralPopup ref="carPopup" popupClass="carPopup" :list="list" :title="title"> <GeneralPopup ref="carPopup" popupClass="carPopup" :list="list" :title="title">
<template v-slot:content> <template v-slot:content>
<StepTab :steps="steps" :currentStep="currentStep" :clickable="true" @step-change="onStepChange" :isShowStepNumber="false"></StepTab> <StepTab :steps="steps" :currentStep="currentStep" :clickable="true" @step-change="onStepChange" :isShowStepNumber="false"></StepTab>
<SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'id'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" /> <view class="list-component">
<SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'id'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" />
</view>
</template> </template>
</GeneralPopup> </GeneralPopup>
</template> </template>
...@@ -42,7 +44,8 @@ export default { ...@@ -42,7 +44,8 @@ export default {
selectedBrand: null, selectedBrand: null,
selectedSeries: null, selectedSeries: null,
selectedModel: null, selectedModel: null,
selectedYear: null selectedYear: null,
loadingYearData: false // 添加加载状态标记
} }
}, },
created() { created() {
...@@ -74,104 +77,89 @@ export default { ...@@ -74,104 +77,89 @@ export default {
}, },
methods: { methods: {
loadCarData() { loadCarData() {
let that = this
const params = { const params = {
username: 'test', app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
timestamp: '1234567890', timestamp: '1234567890',
nonce: 'abcdefg' source: 'dev_author',
method: 'glsx.accounts.base.car.brand.complete',
format: 'json'
} }
const secret = 'your_secret_key' const secret = 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const signature = sign(params, secret) const signature = sign(params, secret)
console.log('签名结果:', signature) console.log('签名结果:', signature)
// uni.$api.evaluationApi uni.request({
// .carBandList({ url: 'http://qcdidicb.glsx.com.cn/router?method=glsx.accounts.base.car.brand.complete',
// content: element.cardCode method: 'GET',
// }) dataType: 'json',
// .then(data => {}) data: {
// 使用Promise模拟API请求 sign: signature,
new Promise((resolve, reject) => { ...params
try { },
const jsonData = require('./carData.json') success(result) {
resolve(jsonData) console.log('请求结果:', result)
} catch (error) { if (result.data && result.data.code === '0' && result.data.data && result.data.data.carinfos) {
console.error('Failed to load carData.json:', error) // 不再预先添加所有车型的年份数据
reject(error) that.carBrandData = result.data.data.carinfos
}
})
.then(result => {
console.log('Loaded car data successfully')
if (result && result.code === '0' && result.data && result.data.carinfos) {
const carDataWithYears = this.addMockYearsToModels(result.data.carinfos)
this.carBrandData = carDataWithYears
} else { } else {
console.error('Invalid car data format:', result) console.error('Invalid car data format:', result)
} }
}) },
.catch(error => { fail(error) {
console.error('Error loading car data:', error) console.log(error, 'error')
this.carBrandData = this.getDefaultCarData() }
}) })
}, },
addMockYearsToModels(carinfos) { // 加载指定车型的年份数据
const carinfosCopy = JSON.parse(JSON.stringify(carinfos)) loadYearDataForModel(model) {
console.log('loadYearDataForModel', model)
const addYearsToModelsRecursive = items => { // 如果已经加载过数据,则不再重复加载
if (!Array.isArray(items)) return items if (model.childs && model.childs.length > 0) {
return Promise.resolve(model.childs)
return items.map(item => { }
if (!item.childs || !Array.isArray(item.childs) || item.childs.length === 0) {
const yearsCount = Math.floor(Math.random() * 2) + 2
const currentYear = new Date().getFullYear()
item.childs = [] this.loadingYearData = true
for (let i = 0; i < yearsCount; i++) { let that = this
const year = currentYear - i const params = {
item.childs.push({ app_key: '48e5e13229b82c1b4e6e8c96151f0637',
letter: String(year).charAt(0), v: '1.0.0',
name: `${year}款`, timestamp: '1234567890',
id: item.id * 1000 + i + 1 source: 'dev_author',
}) method: 'glsx.accounts.base.car.types',
format: 'json',
csId: model.id
}
const secret = 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const signature = sign(params, secret)
console.log('签名结果:', signature)
return new Promise((resolve, reject) => {
uni.request({
url: 'http://qcdidicb.glsx.com.cn/router?method=glsx.accounts.base.car.types',
method: 'GET',
dataType: 'json',
data: {
sign: signature,
csId: model.id,
...params
},
success(result) {
console.log('请求结果:', result)
if (result.data && result.data.code === '0' && result.data.data && result.data.data.carinfos) {
model.childs = result.data.data.carinfos
this.loadingYearData = false
resolve(model.childs)
} else {
reject(new Error('Invalid car data format'))
} }
} else { },
item.childs = addYearsToModelsRecursive(item.childs) fail(error) {
console.log(error, 'error')
} }
return item
}) })
} })
return addYearsToModelsRecursive(carinfosCopy)
},
// 默认的备用数据,当JSON加载失败时使用
getDefaultCarData() {
return [
{
letter: '2',
name: '212',
id: 3256,
childs: [
{
letter: 'B',
name: '北京汽车制造厂',
id: 3257,
childs: [
{
letter: 'J',
name: '狙击手',
id: 1150349,
childs: [
{ letter: '2', name: '2023款', id: 1001 },
{ letter: '2', name: '2022款', id: 1002 },
{ letter: '2', name: '2021款', id: 1003 }
]
}
]
}
],
logoUrl: 'https://qcwx.glsx.com.cn/upload/carbrand/2e1210f1-32d4-4e82-abf3-c38e9754b12c.png'
}
]
}, },
open() { open() {
...@@ -189,7 +177,14 @@ export default { ...@@ -189,7 +177,14 @@ export default {
} else if (index === 2 && this.selectedSeries) { } else if (index === 2 && this.selectedSeries) {
this.currentStep = 2 this.currentStep = 2
} else if (index === 3 && this.selectedModel) { } else if (index === 3 && this.selectedModel) {
this.currentStep = 3 // 如果还没有年份数据,则加载
if (!this.selectedModel.childs || this.selectedModel.childs.length === 0) {
this.loadYearDataForModel(this.selectedModel).then(() => {
this.currentStep = 3
})
} else {
this.currentStep = 3
}
} }
// 重置当前步骤的选中ID // 重置当前步骤的选中ID
...@@ -218,11 +213,13 @@ export default { ...@@ -218,11 +213,13 @@ export default {
this.selectedModel = item this.selectedModel = item
this.selectedYear = null this.selectedYear = null
if (item.childs && item.childs.length > 0) { // 当点击第三层车型选择时,才去请求第四级数据
this.currentStep = 3 this.loadYearDataForModel(item).then(years => {
} if (years && years.length > 0) {
this.currentStep = 3
this.$emit('model-selected', item) }
this.$emit('model-selected', item)
})
} else if (this.currentStep === 3) { } else if (this.currentStep === 3) {
this.selectedYear = item this.selectedYear = item
...@@ -248,6 +245,10 @@ export default { ...@@ -248,6 +245,10 @@ export default {
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
.list-component {
width: 100%;
height: calc(100% - #{toRpx(100)});
}
} }
} }
</style> </style>
...@@ -58,7 +58,8 @@ export default { ...@@ -58,7 +58,8 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
padding: toRpx(12) toRpx(32); height: toRpx(64);
padding: 0 toRpx(32);
border-radius: toRpx(12); border-radius: toRpx(12);
background: #f2f2f2; background: #f2f2f2;
z-index: 1; z-index: 1;
......
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
transition: left 0.15s; transition: left 0.15s;
} }
.tab-first-left { .tab-first-left {
left: - toRpx(64); left: 0;
position: absolute; position: absolute;
} }
.tab-first-right { .tab-first-right {
......
This diff could not be displayed because it is too large.
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
<GeneralPopup ref="requotePopup" popupClass="requotePopup" title="重新报价" confirmText="重新报价" type="center" :showClose="true" :isShowCancel="false"> <GeneralPopup ref="requotePopup" popupClass="requotePopup" title="重新报价" confirmText="重新报价" type="center" :showClose="true" :isShowCancel="false">
<template #content> <template #content>
<view class="requote-content"> <view class="requote-content">
<view class="requote-label mb-20"> <view class="requote-label mb-24">
客户意向报价 客户意向报价
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" type="idcard" placeholder="身份证输入键盘" /> <input class="intention-input mb-48" type="idcard" placeholder="身份证输入键盘" />
<view class="requote-label mb-20"> <view class="requote-label mb-24">
客户意向报价 客户意向报价
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<GeneralPopup ref="cancleSignPopup" popupClass="cancleSignPopup" title="取消签约" confirmText="取消签约" type="center" :showClose="true" :isShowCancel="false"> <GeneralPopup ref="cancleSignPopup" popupClass="cancleSignPopup" title="取消签约" confirmText="取消签约" type="center" :showClose="true" :isShowCancel="false">
<template #content> <template #content>
<view class="requote-content"> <view class="requote-content">
<view class="requote-label mb-20"> <view class="requote-label mb-24">
取消签约原因 取消签约原因
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
...@@ -49,6 +49,36 @@ ...@@ -49,6 +49,36 @@
</view> </view>
</template> </template>
</GeneralPopup> </GeneralPopup>
<GeneralPopup ref="amountRequestedPopup" popupClass="amountRequested" title="申请尾款" confirmText="款项申请" type="center" :showClose="true" :isShowCancel="false">
<template #content>
<view class="amount-requested-content">
<view class="amount-box flex align-center">
<text class="amount-title">定金金额</text>
<text class="amount-value">5,000.00元</text>
</view>
<view class="flex align-center mt-28 mb-16">
<text class="popup-cell-title light-title">待支付尾款</text>
<text class="popup-cell-value light-value">233,600.00元</text>
</view>
<view class="flex align-center mb-40">
<text class="popup-cell-title">评估价</text>
<text class="popup-cell-value">233,600.00元</text>
</view>
<view class="flex align-center mb-16">
<text class="popup-cell-title">收款人姓名</text>
<text class="popup-cell-value">石小东</text>
</view>
<view class="flex align-center mb-16">
<text class="popup-cell-title">银行账号</text>
<text class="popup-cell-value">2698 4894 7299 5675</text>
</view>
<view class="flex align-center">
<text class="popup-cell-title">开户行</text>
<text class="popup-cell-value">招商银行广州科学城支行</text>
</view>
</view>
</template>
</GeneralPopup>
</view> </view>
</template> </template>
...@@ -103,10 +133,10 @@ export default { ...@@ -103,10 +133,10 @@ export default {
queryList() { queryList() {
this.$refs.paging.complete(this.dataList) this.$refs.paging.complete(this.dataList)
}, },
addEvaluationForm() { addEvaluationForm(type) {
console.log('addEvaluationForm') console.log('addEvaluationForm', type)
uni.navigateTo({ uni.navigateTo({
url: '/pages/evaluationForm/addEvaluationFrom' url: '/pages/evaluationForm/addEvaluationFrom?type=' + type
}) })
}, },
handleButtonClick(e) { handleButtonClick(e) {
...@@ -114,8 +144,38 @@ export default { ...@@ -114,8 +144,38 @@ export default {
this.requote() this.requote()
} else if (e.type === 'cancelSign') { } else if (e.type === 'cancelSign') {
this.cancelSign() this.cancelSign()
} else if (e.type === 'sign') {
this.sign()
} else if (e.type === 'confirmDelivery') {
this.confirmDelivery()
} else if (e.type === 'edit') {
this.addEvaluationForm('edit')
} else if (e.type === 'add') {
this.addEvaluationForm('add')
} else if (e.type === 'payDeposit') {
this.amountRequested()
} }
}, },
amountRequested() {
this.$refs.amountRequestedPopup
.open()
.then(() => {
console.log('申请尾款成功')
})
.catch(() => {
console.log('申请尾款取消')
})
},
confirmDelivery() {
uni.navigateTo({
url: '/pages/evaluationForm/confirmCar'
})
},
sign() {
uni.navigateTo({
url: '/pages/evaluationForm/signInfo'
})
},
requote() { requote() {
this.$refs.requotePopup this.$refs.requotePopup
.open() .open()
...@@ -149,34 +209,6 @@ export default { ...@@ -149,34 +209,6 @@ export default {
background-size: 100%; background-size: 100%;
padding: toRpx(160) toRpx(64) toRpx(48); padding: toRpx(160) toRpx(64) toRpx(48);
box-sizing: border-box; box-sizing: border-box;
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
z-index: 999;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
}
}
.detail-content { .detail-content {
width: 100%; width: 100%;
...@@ -229,14 +261,59 @@ export default { ...@@ -229,14 +261,59 @@ export default {
} }
} }
::v-deep .feedback-textarea { ::v-deep .feedback-textarea {
height: toRpx(216); height: toRpx(288);
border-radius: toRpx(16); border-radius: toRpx(16);
background: #f4f5f7;
width: 100%;
padding: toRpx(24);
box-sizing: border-box;
.uni-input-wrapper { .uni-input-wrapper {
background: #f4f5f7; background: #f4f5f7;
} }
} }
} }
.amount-requested-content {
.amount-box {
width: 100%;
height: toRpx(128);
border-radius: toRpx(20);
background: #f1f7fe;
padding-left: toRpx(32);
box-sizing: border-box;
.amount-title {
color: #333333;
font-size: toRpx(32);
font-weight: 400;
margin-right: toRpx(16);
width: toRpx(168);
}
.amount-value {
color: #3b73ff;
font-size: toRpx(36);
font-weight: 700;
}
}
.popup-cell-title {
color: #999;
font-size: toRpx(28);
font-weight: 400;
margin-right: toRpx(16);
width: toRpx(168);
}
.popup-cell-value {
color: #222;
font-size: toRpx(28);
font-weight: 400;
}
.light-title {
color: #333333;
}
.light-value {
color: #4673ff;
}
}
.addBtn { .addBtn {
width: toRpx(128); width: toRpx(128);
height: toRpx(128); height: toRpx(128);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!