Commit 52c48eb0 by cen

feat: 确认交车

1 parent 0498f384
...@@ -7,5 +7,126 @@ module.exports = { ...@@ -7,5 +7,126 @@ module.exports = {
return http.post(`/evalOrder/page`, { return http.post(`/evalOrder/page`, {
...data ...data
}) })
},
/** 评估单详情 */
evalOrderDetail(data) {
return http.post(`/evalOrder/detail`, {
...data
})
},
/** 评估单创建 */
evalOrderCreate(data) {
return http.post(`/evalOrder/create`, {
...data
})
},
/** 评估单分页状态数量 */
evalOrderPageCount(data) {
return http.post(`/evalOrder/pageCount`, {
...data
})
},
/** 评估单更新 */
evalOrderUpdate(data) {
return http.post(`/evalOrder/edit`, {
...data
})
},
/** 评估单重新报价 */
evalOrderOwnerReQuote(data) {
return http.post(`/evalOrder/ownerReQuote`, {
...data
})
},
/** 签订买卖合同 */
evalOrderSignContract(data) {
return http.post(`/evalOrder/signingSaleContract`, {
...data
})
},
/** 评估单取消合同 */
evalOrderCancelContract(data) {
return http.post(`/evalOrder/cancelSaleContract`, {
...data
})
},
/** 评估单重新提交 */
evalOrderConfirmVehicleDelivery(data) {
return http.post(`/confirmVehicleDelivery/reSubmit`, {
...data
})
},
/** 确认交车 */
confirmDelivery(data) {
return http.post(`/confirmVehicleDelivery/confirmVehicleDelivery`, {
...data
})
},
/** 支付定金 */
payDepositApplication(data) {
return http.post(`/applyPayment/payDepositApplication`, {
...data
})
},
/** 发起代保管协议签署 */
signAgreement(data) {
return http.post(`/applyPayment/signAgreement`, {
...data
})
},
/** 检查代保管协议签署状态 */
checkSignAgreement(data) {
return http.post(`/applyPayment/checkSignAgreement`, {
...data
})
},
/** 检查车辆是否存在重复评估单 */
checkRepeat(data) {
return http.post(`/evalOrder/checkRepeat`, {
...data
})
},
/** 车辆ocr识别 */
vinOcr(data) {
return http.post(`/evalOrder/vinOcr`, {
...data
})
},
/** 行驶证ocr识别 */
carLicenseOcr(data) {
return http.post(`/evalOrder/carLicenseOcr`, {
...data
})
},
/** 获取合同详情 */
getContractDetail(data) {
return http.post(`/evalElectronicContract/getDetail`, {
...data
})
},
/** 获取保管人列表 */
getCustodyAgreementList(data) {
return http.post(`/custodyAgreement/custodyAgreementList`, {
...data
})
},
/** 新增保管人 */
addCustodyAgreement(data) {
return http.post(`/custodyAgreement/addCustodyAgreement`, {
...data
})
},
/** 发送代保管人协议 */
sendCustodyAgreement(data) {
return http.post(`/custodyAgreement/sendCustodyAgreement`, {
...data
})
},
/** 销售协议预览 */
salesAgreementPreview(data) {
return http.post(`/evalOrder/salesAgreementPreview`, {
...data
})
} }
} }
...@@ -9,22 +9,21 @@ const HOST = { ...@@ -9,22 +9,21 @@ const HOST = {
ip: 'http://192.168.1.169:8292' ip: 'http://192.168.1.169:8292'
} }
function createRequestInstance() { const request = new Request({
const { sessionId } = uni.$storage?.get() || {}
console.log('创建request实例,当前sessionId:', sessionId)
return new Request({
baseURL: `${HOST['eva']}`, baseURL: `${HOST['eva']}`,
timeout: 300000,
appId: signSecretKey.appKey, appId: signSecretKey.appKey,
appSecret: signSecretKey.secret, appSecret: signSecretKey.secret,
params: { session: {
sessionId requiresSession: true,
sessionParamName: 'sessionId',
sessionId: async () => await getSid()
}, },
response: { response: {
code_key: 'code', code_key: 'code',
code_success_value: '0', code_success_value: '0',
data_key: 'data', data_key: 'data',
errId: 'errId', errId: 'code',
errId_logout_value: '21' errId_logout_value: '21'
}, },
events: { events: {
...@@ -48,27 +47,12 @@ function createRequestInstance() { ...@@ -48,27 +47,12 @@ function createRequestInstance() {
}) })
} }
} }
}) })
}
const requestProxy = {
get: function (target, prop, receiver) {
const instance = createRequestInstance()
if (instance && typeof instance[prop] === 'function') { async function getSid() {
return function (...args) {
if (['get', 'post', 'request', 'fetch'].includes(prop)) {
if (args[0] && typeof args[0] === 'object') {
const { sessionId } = uni.$storage?.get() || {} const { sessionId } = uni.$storage?.get() || {}
args[0].sessionId = sessionId console.log('sessionId3333322', sessionId)
} return sessionId
}
return instance[prop].apply(instance, args)
}
}
return instance ? instance[prop] : undefined
}
} }
export default new Proxy({}, requestProxy) export default request
...@@ -104,7 +104,9 @@ ...@@ -104,7 +104,9 @@
.fs-13 { .fs-13 {
font-size: toRpx(13); font-size: toRpx(13);
} }
.mr-16 {
margin-right: toRpx(16);
}
.mr-12 { .mr-12 {
margin-right: toRpx(12); margin-right: toRpx(12);
} }
...@@ -168,6 +170,9 @@ ...@@ -168,6 +170,9 @@
.mb-30 { .mb-30 {
margin-bottom: toRpx(30); margin-bottom: toRpx(30);
} }
.mb-32 {
margin-bottom: toRpx(32);
}
.mb-40 { .mb-40 {
margin-bottom: toRpx(40); margin-bottom: toRpx(40);
} }
......

2.76 MB | W: | H:

2.78 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<view class="employee-list">
<template v-for="(i, index) in list">
<view :key="index" @click="choose(i)" :class="['item flex', { active: currentId ? i.id == currentId : i.id == data[params.idKey] }]">
<view class="sprite-icon icon-tag-checked"></view>
{{ i.name }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'AgreementList',
inject: ['userInfo'],
data () {
return {
}
},
mounted () {
},
methods: {
async getList (searchValue, search) {
const { userInfo, params } = this
const data = await uni.$api.evaluationApi.getCustodyAgreementList()
this.updateParams(params, data || [])
},
initData (data) {
this.list = data
this.$emit('onComplete')
},
handleSearch (searchValue) {
this.list = []
this.getList(searchValue, true)
},
choose (i) {
console.log('choose', i)
let { params: { idKey }, data } = this,
value = {
userId: data.deliveryUserId,
deliveryUserId: data.userId
}[idKey]
if ((idKey == 'userId' || idKey == 'deliveryUserId') && value == i.uuid) return uni.showToast({
title: '销售顾问/录单员与交付专员不能选取同一人',
icon: 'none',
mask: true
})
this.currentId = i.id
this.$emit('choose', i)
}
}
}
</script>
<style scoped lang="scss">
.employee-list {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
...@@ -83,7 +83,7 @@ const componentConfig = { ...@@ -83,7 +83,7 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [1],//前档 goodsType: [1], //前档
cacheData: [], cacheData: [],
loadComplete: false, loadComplete: false,
searchValue: '', searchValue: '',
...@@ -119,7 +119,7 @@ const componentConfig = { ...@@ -119,7 +119,7 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [4],// 后档 goodsType: [4], // 后档
cacheData: [], cacheData: [],
loadComplete: false, loadComplete: false,
searchValue: '', searchValue: '',
...@@ -131,7 +131,7 @@ const componentConfig = { ...@@ -131,7 +131,7 @@ const componentConfig = {
placeholder: '请输入名称', placeholder: '请输入名称',
idKey: 'goodsId', idKey: 'goodsId',
nullTips: '请勾选商品', nullTips: '请勾选商品',
goodsType: [5, 6, 7],// 天窗 goodsType: [5, 6, 7], // 天窗
cacheData: [], cacheData: [],
loadComplete: false, loadComplete: false,
searchValue: '', searchValue: '',
...@@ -163,6 +163,16 @@ const componentConfig = { ...@@ -163,6 +163,16 @@ const componentConfig = {
title: '选择时间', title: '选择时间',
hideSearch: true, hideSearch: true,
loadComplete: false loadComplete: false
},
14: {
name: 'AgreementList',
title: '代保管人员',
placeholder: '请输入姓名',
idKey: 'id',
cacheData: [],
loadComplete: false,
hideSearch: true,
noData: false
} }
} }
export default { componentConfig } export default { componentConfig }
<template> <template>
<view class="order-popup"> <view class="order-popup">
<popup <popup :position="position" :animation="animation" ref="popup" @onConfirm="confirm" @onCancel="cancel">
:position="position"
:animation="animation"
ref="popup"
@onConfirm="confirm"
@onCancel="cancel"
>
<view class="popup-title flex"> <view class="popup-title flex">
{{title}} {{ title }}
<view <view class="popup-close flex" @click="close">
class="popup-close flex" <uni-icons type="closeempty" size="16"></uni-icons>
@click="close"
>
<uni-icons
type="closeempty"
size="16"
></uni-icons>
</view> </view>
</view> </view>
<template v-if="!componentObject[popupType].hideSearch"> <template v-if="!componentObject[popupType].hideSearch">
<view class="popup-search"> <view class="popup-search">
<input <input class="input" type="text" :placeholder="componentObject[popupType].placeholder || '请输入'" placeholder-class="placeholder" v-model="componentObject[popupType].searchValue" confirm-type="search" @confirm="handleSearch" />
class="input" <view class="clear flex" @click="clear">
type="text" <uni-icons type="closeempty" size="16" v-if="componentObject[popupType].searchValue"></uni-icons>
:placeholder="componentObject[popupType].placeholder || '请输入'"
placeholder-class="placeholder"
v-model="componentObject[popupType].searchValue"
confirm-type="search"
@confirm="handleSearch"
>
<view
class="clear flex"
@click="clear"
>
<uni-icons
type="closeempty"
size="16"
v-if="componentObject[popupType].searchValue"
></uni-icons>
</view> </view>
</view> </view>
</template> </template>
<view :class="['popup-body',{ 'hide-search' :componentObject[popupType].hideSearch}]"> <view :class="['popup-body', { 'hide-search': componentObject[popupType].hideSearch }]">
<scroll-view <scroll-view scroll-y :class="['popup-scroll-view', { show: componentObject[popupType].loadComplete }]">
scroll-y <component :is="componentObject[popupType].name" :params.sync="componentObject[popupType]" :data="data" :dataKey="dataKey" :isDefeatOrder="isDefeatOrder" :positionTypeList="positionTypeList" ref="componentRef" @choose="chooseContent = $event" @openSkuPopup="openSkuPopup" @onComplete="componentObject[popupType].loadComplete = true"></component>
:class="['popup-scroll-view',{show:componentObject[popupType].loadComplete}]"
>
<component
:is="componentObject[popupType].name"
:params.sync="componentObject[popupType]"
:data="data"
:dataKey="dataKey"
:isDefeatOrder="isDefeatOrder"
:positionTypeList="positionTypeList"
ref="componentRef"
@choose="chooseContent = $event"
@openSkuPopup="openSkuPopup"
@onComplete="componentObject[popupType].loadComplete = true"
></component>
<template v-if="componentObject[popupType].noData"> <template v-if="componentObject[popupType].noData">
<view class="nothing flex">暂无数据</view> <view class="nothing flex">暂无数据</view>
</template> </template>
</scroll-view> </scroll-view>
<image <image v-if="!componentObject[popupType].loadComplete" class="loading" src="../../assets/images/common/loadding.gif" />
v-if="!componentObject[popupType].loadComplete"
class="loading"
src="../../assets/images/common/loadding.gif"
/>
</view> </view>
</popup> </popup>
<sku-popup <sku-popup ref="skuPopupRef" @onConfirm="skuConfirm"></sku-popup>
ref="skuPopupRef"
@onConfirm="skuConfirm"
></sku-popup>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import Popup from '@/components/Popup.vue' import Popup from '@/components/Popup.vue'
import config from './config' import config from './config'
import EmployeeList from './components/EmployeeList.vue' import EmployeeList from './components/EmployeeList.vue'
...@@ -89,6 +41,7 @@ import PackageList from './components/PackageList.vue' ...@@ -89,6 +41,7 @@ import PackageList from './components/PackageList.vue'
import SkuGoodsList from './components/SkuGoodsList.vue' import SkuGoodsList from './components/SkuGoodsList.vue'
import SkuPopup from './components/SkuPopup.vue' import SkuPopup from './components/SkuPopup.vue'
import DateTime from './components/DateTime.vue' import DateTime from './components/DateTime.vue'
import AgreementList from './components/AgreementList.vue'
export default { export default {
components: { components: {
Popup, Popup,
...@@ -100,7 +53,8 @@ export default { ...@@ -100,7 +53,8 @@ export default {
PackageList, PackageList,
SkuGoodsList, SkuGoodsList,
SkuPopup, SkuPopup,
DateTime DateTime,
AgreementList
}, },
name: '', name: '',
props: { props: {
...@@ -252,7 +206,7 @@ export default { ...@@ -252,7 +206,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.popup-box { .popup-box {
border-radius: toRpx(32) toRpx(32) 0 0; border-radius: toRpx(32) toRpx(32) 0 0;
background: #ffffff; background: #ffffff;
......
...@@ -59,7 +59,7 @@ const djDomain = { ...@@ -59,7 +59,7 @@ const djDomain = {
}[target[index]] }[target[index]]
const evaluationDomain = { const evaluationDomain = {
ip: 'http://192.168.1.221:5003', ip: 'http://192.168.1.103:5003',
// ip: 'http://192.168.2.80:8558', // ip: 'http://192.168.2.80:8558',
dev: 'http://gsc.dev.glsx.com.cn', dev: 'http://gsc.dev.glsx.com.cn',
beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425 beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"dayjs": "^1.11.11", "dayjs": "^1.11.11",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"glsk-toolkit": "^1.0.3", "glsk-toolkit": "1.0.4",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"number-precision": "^1.6.0", "number-precision": "^1.6.0",
......
...@@ -226,6 +226,18 @@ ...@@ -226,6 +226,18 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/evaluationForm/evaluationFormDetails",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/evaluationForm/components/pdfPreView",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
<template> <template>
<div> <view class="details-page">
<MediaInfo :imageData="imageDatas" /> <view class="nav-bar">
</div> <view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">评估单详情</view>
</view>
<view class="flex justify-between align-center mb-24">
<view class="flex align-center justify-between">
<view :class="['status', statusClass(detailsInfo.basic.status)]">{{ statusMap[detailsInfo.basic.status].name }}</view>
<view class="status-box">
<text class="label">工单编号:</text>
<text class="value">{{ detailsInfo.basic.evalOrderNo }}</text>
</view>
</view>
<view class="status-box">
<text class="label">工单编号:</text>
<text class="value">{{ detailsInfo.basic.evalOrderNo }}</text>
</view>
</view>
<view class="detail-content">
<view class="box-class mt-16">
<view class="tab-container">
<scroll-view scroll-x enable-flex class="tab-scroll">
<view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { active: activeTab === index }]" @click="switchTab(index)">
{{ tab.name }}
</view>
</scroll-view>
</view>
<view class="tab-panel">
<view class="tab-panel-title">交接清单</view>
<view class="gridBox mb-32">
<view class="flex align-center">
<view class="title-label-see mr-16">合同模版</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">品牌车型</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">车架号</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">车牌号</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">发动机号</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">上牌时间</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">上牌城市</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">车辆所在地</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">表显里程</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">使用性质</view>
<view>777</view>
</view>
<view class="flex align-center">
<view class="title-label-see mr-16">所有人性质</view>
<view>777</view>
</view>
</view>
</view>
<!-- <MediaInfo :imageData="imageDatas" /> -->
</view>
</view>
</view>
</template> </template>
<script> <script>
import MediaInfo from '../../components/MediaInfo' import { method } from 'lodash'
import { fileSuibtype } from '@/pages/boutique/evaluationFormMap' import MediaInfo from './components/MediaInfo'
import { fileSuibtype } from './evaluationFormMap'
import { statusMap } from './evaluationFormMap.js'
export default { export default {
components: { components: {
MediaInfo MediaInfo
...@@ -38,8 +119,208 @@ export default { ...@@ -38,8 +119,208 @@ export default {
alt: fileSuibtype[32].name alt: fileSuibtype[32].name
} }
] ]
},
detailsInfo: {},
statusMap,
activeTab: 0,
tabs: [
{ name: '车辆信息', key: 'carInfo' },
{ name: '牌证信息', key: 'carLicense' },
{ name: '图像信息', key: 'images' },
{ name: '评估信息', key: 'evaluation' },
{ name: '签约信息', key: 'contract' },
{ name: '支付信息', key: 'payment' },
{ name: '交车确认', key: 'delivery' },
{ name: '编辑记录', key: 'editRecords' }
]
} }
},
mounted() {
this.getDetail(this.$route.query.evalOrderNo)
},
methods: {
backPage() {
uni.navigateBack({
delta: 1
})
},
statusClass(status) {
return status > 0 ? `status-${status}` : 'status-0'
},
getDetail(evalOrderNo) {
const that = this
uni.$api.evaluationApi
.evalOrderDetail({
evalOrderNo
})
.then(res => {
console.log('res:', res)
const { basic = {}, carInfo = {}, carLicense = {}, images = {} } = res
that.detailsInfo = res
})
},
switchTab(index) {
this.activeTab = index
// 滚动到顶部
uni.pageScrollTo({
scrollTop: 0,
duration: 0
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped>
.details-page {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%;
padding: toRpx(160) toRpx(64) toRpx(48);
box-sizing: border-box;
.detail-content {
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: auto;
.box-class {
height: calc(100% - #{toRpx(110)});
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
overflow: auto;
padding: toRpx(32) toRpx(48) toRpx(42);
box-sizing: border-box;
.tab-container {
margin-bottom: toRpx(32);
.tab-scroll {
width: 100%;
display: flex;
white-space: nowrap;
.tab-item {
width: toRpx(208);
height: toRpx(72);
border-radius: toRpx(16);
background: #ffffff;
backdrop-filter: blur(12px);
display: inline-block;
padding: toRpx(16) toRpx(32);
color: #666666;
position: relative;
cursor: pointer;
transition: color 0.3s;
margin-right: toRpx(16);
&.active {
color: #fff;
background: linear-gradient(180deg, #6795ff 0%, #4a84f9 100%);
box-shadow: toRpx(4) toRpx(8) toRpx(16) 0 #81a3d659;
}
.tab-active-line {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(6);
background-color: #347bff;
border-radius: toRpx(3);
opacity: 0;
transition: opacity 0.3s;
&.show {
opacity: 1;
}
}
}
}
}
.tab-panel {
border-radius: toRpx(16);
background: #ffffff;
padding: toRpx(24) toRpx(32);
.tab-panel-title {
font-size: toRpx(32);
font-weight: 600;
color: #333333;
margin-bottom: toRpx(24);
}
.gridBox {
display: grid;
grid-template-columns: 1fr 1fr;
gap: toRpx(24);
border-radius: toRpx(16);
background: #ffffff;
padding: toRpx(28) toRpx(32);
box-sizing: border-box;
.title-label-see {
width: toRpx(168);
color: #999999;
font-size: toRpx(28);
font-weight: 400;
}
image {
width: toRpx(240);
height: toRpx(240);
border-radius: toRpx(12);
background: #f4f5f7;
}
.full-width {
grid-column: 1 / -1;
}
}
}
}
}
.status-box {
.label {
color: #999ea8;
font-size: toRpx(24);
font-weight: 400;
}
.value {
color: #666666;
font-size: toRpx(24);
font-weight: 400;
}
}
.status {
border-radius: toRpx(4);
background: #fef4e8;
padding: toRpx(4) toRpx(20);
font-size: toRpx(24);
font-weight: 500;
}
// 状态颜色
.status-10 {
color: #f59619;
background: #fef4e8;
}
.status-20 {
color: #6a56f0;
background: #f0eefd;
}
.status-30 {
color: #2cca74;
background: #e9f9f1;
}
.status-40 {
color: #5842eb;
background: #eeecfd;
}
.status-50 {
color: #5842eb;
background: #eeecfd;
}
.status-100 {
color: #2cca74;
background: #e9f9f1;
}
// 驳回
.status-0 {
color: #eb4e4e;
background: #fdeded;
}
}
</style>
<template> <template>
<div class="button-module flex"> <div class="button-module flex">
<view class="common-btn" @click="handleClick('details')">详情</view> <view class="common-btn" @click="handleClick('details')">详情</view>
<view v-if="subStatus == '' && previousStatus != 100" class="common-btn ml-24" @click="handleClick('edit')">编辑</view> <view v-if="subStatus == '' && status != 100" class="common-btn ml-24" @click="handleClick('edit')">编辑</view>
<view v-if="previousStatus == 20 && subStatus == ''" class="common-btn ml-24" @click="handleClick('requote')">重新报价</view> <view v-if="status == 20 && !subStatus" class="common-btn ml-24" @click="handleClick('requote')">重新报价</view>
<view v-if="previousStatus == 20 && subStatus == ''" class="common-btn blue-btn ml-24" @click="handleClick('sign')">客户签约</view> <view v-if="status == 20 && !subStatus" class="common-btn blue-btn ml-24" @click="handleClick('sign')">客户签约</view>
<view v-if="previousStatus == 20 && subStatus == 1" class="common-btn gray-btn ml-24" @click="handleClick('signing')">签约中</view> <view v-if="status == 20 && subStatus == 1" class="common-btn gray-btn ml-24" @click="handleClick('signing')">签约中</view>
<view v-if="previousStatus == 30 && subStatus == ''" class="common-btn ml-24" @click="handleClick('cancelSign')">取消签约</view> <view v-if="status == 30 && !subStatus" class="common-btn ml-24" @click="handleClick('cancelSign')">取消签约</view>
<view v-if="previousStatus == 30 && subStatus == '' && paymentType == 1" class="common-btn blue-btn ml-24" @click="handleClick('payDeposit')">支付定金</view> <view v-if="status == 30 && !subStatus && paymentType == 1" class="common-btn blue-btn ml-24" @click="handleClick('payDeposit')">支付定金</view>
<view v-if="previousStatus == 30 && subStatus == '' && paymentType == 2" class="common-btn blue-btn ml-24" @click="handleClick('payFull')">支付全款</view> <view v-if="status == 30 && !subStatus && paymentType == 2" class="common-btn blue-btn ml-24" @click="handleClick('payFull')">支付全款</view>
<view v-if="subStatus == 2 || subStatus == 3" class="common-btn gray-btn ml-24" @click="handleClick('paying')">支付中</view> <view v-if="subStatus == 2 || subStatus == 3" class="common-btn gray-btn ml-24" @click="handleClick('paying')">支付中</view>
<view v-if="previousStatus == 40 && subStatus == '' && paymentType == 1" class="common-btn blue-btn ml-24" @click="handleClick('payTail')">支付尾款</view> <view v-if="status == 40 && !subStatus && paymentType == 1" class="common-btn blue-btn ml-24" @click="handleClick('payFull')">支付尾款</view>
<view v-if="previousStatus == 50 && subStatus == ''" class="common-btn blue-btn ml-24" @click="handleClick('confirmDelivery')">确认交车</view> <view v-if="status == 50 && !subStatus" class="common-btn blue-btn ml-24" @click="handleClick('confirmDelivery')">确认交车</view>
<view v-if="previousStatus == 1" class="common-btn blue-btn ml-24" @click="handleClick('reSubmit')">重新提交</view> <view v-if="status == 1" class="common-btn blue-btn ml-24" @click="handleClick('reSubmit')">重新提交</view>
</div> </div>
</template> </template>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
export default { export default {
name: 'ButtonModule', name: 'ButtonModule',
props: { props: {
previousStatus: { status: {
type: String, type: String,
default: '10' default: '10'
}, },
......
...@@ -6,8 +6,11 @@ ...@@ -6,8 +6,11 @@
<text class="requiredLabel" v-if="field.required">*</text> <text class="requiredLabel" v-if="field.required">*</text>
</view> </view>
<template v-if="field.type === 'input'"> <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-if="field.targetObj" :disabled="field.disabled" type="text" :placeholder="'请输入'" v-model="formData[field.targetObj][field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input v-else type="text" :placeholder="'请输入' + field.label" v-model="formData[field.targetKey]" /> <input v-else type="text" :disabled="field.disabled" :placeholder="'请输入'" v-model="formData[field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" />
<view v-if="field.isScan" class="flex align-center scanBtn justify-center" @click.stop="scan('vinOcr')">
<view class="sprite-icon icon-scanIconX"></view>
</view>
</template> </template>
<template v-if="field.type === 'select'"> <template v-if="field.type === 'select'">
<view class="flex align-center from-value"> <view class="flex align-center from-value">
...@@ -81,8 +84,8 @@ ...@@ -81,8 +84,8 @@
<text>二手车买卖补充协议</text> <text>二手车买卖补充协议</text>
</view> </view>
<view class="flex align-center"> <view class="flex align-center">
<view class="btn">预览</view> <view class="btn" @click="previewPdf(field)">预览</view>
<view class="btn">删除</view> <view class="btn" @click="deletePdf(field)">删除</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -137,6 +140,46 @@ export default { ...@@ -137,6 +140,46 @@ export default {
}, },
updateFormData(data) { updateFormData(data) {
this.$emit('update:formData', data) this.$emit('update:formData', data)
},
handleInput(e, field) {
const value = e.detail.value
// 如果有正则验证规则,执行验证
if (field.pattern) {
const reg = new RegExp(field.pattern)
if (!reg.test(value) && value !== '') {
// 验证失败,阻止输入
if (field.targetObj) {
// 回滚到原始值
this.$emit('inputInvalid', field, this.formData[field.targetObj][field.targetKey])
} else {
this.$emit('inputInvalid', field, this.formData[field.targetKey])
}
return
}
}
// 验证通过,触发输入事件
this.$emit('inputChange', e, field)
},
handleBlur(e, field) {
let value = e.detail.value.trim()
if (field.targetObj) {
if (this.formData[field.targetObj]) {
this.formData[field.targetObj][field.targetKey] = value
this.$emit('blurChange', value, field)
}
} else {
this.formData[field.targetKey] = value
this.$emit('blurChange', value, field)
}
},
scan(type) {
this.$emit('scan', type)
},
previewPdf(field) {
this.$emit('previewPdf', field)
},
deletePdf(field) {
this.$emit('deletePdf', field)
} }
}, },
watch: { watch: {
...@@ -256,5 +299,8 @@ export default { ...@@ -256,5 +299,8 @@ export default {
margin-left: toRpx(32); margin-left: toRpx(32);
} }
} }
.scanBtn {
margin-left: toRpx(16);
}
} }
</style> </style>
...@@ -73,6 +73,10 @@ export default { ...@@ -73,6 +73,10 @@ export default {
isShowCancel: { isShowCancel: {
type: Boolean, type: Boolean,
default: true default: true
},
autoClose: {
type: Boolean,
default: true
} }
}, },
data() { data() {
...@@ -105,7 +109,10 @@ export default { ...@@ -105,7 +109,10 @@ export default {
}, },
confirm() { confirm() {
if (this.resolve) { if (this.resolve) {
if (this.autoClose) {
this.$refs.publishPopup.close() this.$refs.publishPopup.close()
}
this.resolve() this.resolve()
} }
this.$emit('confirm') this.$emit('confirm')
......
<template> <template>
<view class="type-tab"> <view class="type-tab">
<view class="type-box"> <view class="type-box">
<view class="tab-item" :class="[tabClass(index)]" v-for="(i, index) in typeList" :key="index" @click="tabClick(index)"> <view class="tab-item" :class="[tabClass(index)]" v-for="(i, index) in typeList" :key="index" @click="tabClick(index, i)">
<view v-if="tabIndex == index && index == 0" class="sprite-icon tab-first-left icon-first-left"></view> <view v-if="tabIndex == index && index == 0" class="sprite-icon tab-first-left icon-first-left"></view>
<view v-if="tabIndex == index && index == 0" class="sprite-icon tab-first-right icon-first-right"></view> <view v-if="tabIndex == index && index == 0" class="sprite-icon tab-first-right icon-first-right"></view>
<view v-if="tabIndex == index && index != 0" class="sprite-icon tab-second-right icon-second-right"></view> <view v-if="tabIndex == index && index != 0" class="sprite-icon tab-second-right icon-second-right"></view>
...@@ -56,9 +56,9 @@ export default { ...@@ -56,9 +56,9 @@ export default {
} }
return className return className
}, },
tabClick (index) { tabClick (index,i) {
this.$emit('update:tabIndex', index) this.$emit('update:tabIndex', index)
this.$emit('tabClick',index) this.$emit('tabClick',index,i)
} }
} }
} }
......
...@@ -4,50 +4,53 @@ ...@@ -4,50 +4,53 @@
<view class="flex align-center justify-between mb-24"> <view class="flex align-center justify-between mb-24">
<view class="status-box"> <view class="status-box">
<text class="label">工单编号:</text> <text class="label">工单编号:</text>
<text class="value">2323232323232323</text> <text class="value">{{ carInfo.evalOrderNo }}</text>
</view> </view>
<view :class="['status', statusClass(carInfo.previousStatus)]">{{ statusMap[carInfo.previousStatus].name }}</view> <view :class="['status', statusClass(carInfo.status)]">{{ statusMap[carInfo.status].name }}</view>
</view> </view>
<view class="car-info-box flex align-start"> <view class="car-info-box flex align-start">
<image src="https://img.58tg.com/up/allimg/4k/s/03/2309201256325P4-0-lp.jpg" alt="" /> <image :src="carInfo.coverImage" alt="" />
<view class="ml-32 flex-1"> <view class="ml-32 flex-1">
<view class="flex align-center car-type-name mb-16"> <view class="flex align-center car-type-name mb-16">
奥迪A4L A4L 2021款 40 TFSI 豪华动感型 {{ carInfo.carSeriesName + ' ' + carInfo.carTypeName }}
<view class="common-label ml-20">李女士 13912345678</view> <view class="common-label ml-20">{{ carInfo.previousOwnerName }} {{ carInfo.previousOwnerPhone }}</view>
</view> </view>
<view class="flex mb-16"> <view class="flex mb-16">
<view class="car-number mr-12">粤B12345</view> <view class="car-number mr-12">{{ carInfo.licensePlate }}</view>
<view class="car-number mr-12">2020年上牌</view> <view class="car-number mr-12">{{ carInfo.registrationDateStr }}</view>
<view class="car-number mr-12">1.8万公里</view> <view class="car-number mr-12">{{ carInfo.mileageStr }}</view>
<view class="car-number mr-12">二手车</view> <view class="car-number mr-12">{{ carInfo.transferCountStr }}</view>
<view class="car-number">置换车</view> <view class="car-number">{{ vehicleCategoryMap[1] }}</view>
</view> </view>
<view class="info-row flex mb-30"> <view class="info-row flex mb-30">
<view class="info-item flex align-center"> <view class="info-item flex align-center">
<text class="common-label flex-shrink-0">销售顾问</text> <text class="common-label flex-shrink-0">销售顾问</text>
<view class="common-value text-ellipsis ml-16">豪华车专家豪华车专家豪华车专家豪华车专家豪华车专家豪华车专家豪华车专家豪华车专家豪华车专家 | 张经理</view> <view class="common-value text-ellipsis ml-16">{{ carInfo.sellerMerchantName }} | {{ carInfo.sellerName }}</view>
</view> </view>
<view class="info-item flex align-center"> <view class="info-item flex align-center">
<text class="common-label flex-shrink-0">转化人员</text> <text class="common-label flex-shrink-0">转化人员</text>
<view class="common-value text-ellipsis ml-16">深圳嘀嘀虎园区店 | 方可</view> <view class="common-value text-ellipsis ml-16">{{ carInfo.conversionMerchantName }} | {{ carInfo.conversionName }}</view>
</view> </view>
<view class="info-item flex align-center"> <view class="info-item flex align-center">
<text class="common-label flex-shrink-0">工单时间</text> <text class="common-label flex-shrink-0">工单时间</text>
<view class="common-value text-ellipsis ml-16">2025-07-30 16:00:00</view> <view class="common-value text-ellipsis ml-16">{{ carInfo.createdDate }}</view>
</view> </view>
<view class="info-item flex align-center"> <view class="info-item flex align-center" v-if="carInfo.status != 10 && carInfo.status != 20">
<text class="common-label flex-shrink-0">签约时间</text> <text class="common-label flex-shrink-0">签约时间</text>
<view class="common-value text-ellipsis ml-16">2025-07-30 16:00:00</view> <view class="common-value text-ellipsis ml-16">{{ carInfo.signingSaleDate }}</view>
</view> </view>
</view> </view>
<view class="flex justify-between align-center"> <view class="flex justify-between align-center">
<view class="flex"> <view class="flex">
<text class="common-label">评估价格</text> <text class="common-label">评估价格</text>
<view class="price ml-16">评估中</view> <view class="price ml-16" :class="{ 'text-blue': carInfo.evalPriceDisplay && carInfo.status != 10 }">
{{ carInfo.status == 10 ? '评估中' : carInfo.evalPriceDisplay }}
<text v-if="carInfo.evalPriceDisplay && carInfo.status != 10" class="text-gray">(定金: {{ carInfo.depositPrice }}元 | 尾款: {{ carInfo.finalPrice }}元)</text>
</view>
</view> </view>
<ButtonModule @button-click="$emit('button-click', { ...$event, ...carInfo })" :previousStatus="carInfo.previousStatus" :subStatus="carInfo.subStatus" :paymentType="carInfo.paymentType"></ButtonModule> <ButtonModule @button-click="$emit('button-click', { ...$event, ...carInfo })" :status="carInfo.status" :subStatus="carInfo.subStatus" :paymentType="carInfo.paymentType"></ButtonModule>
</view> </view>
<view v-if="carInfo.previousStatus == -1"> <view v-if="carInfo.status == -1">
<view class="tips px-20"> <view class="tips px-20">
<view class="sprite-icon icon-study-tips"></view> <view class="sprite-icon icon-study-tips"></view>
<view class="text-ellipsis">驳回原因:车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车</view> <view class="text-ellipsis">驳回原因:车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车况不符合收车标准车</view>
...@@ -59,7 +62,7 @@ ...@@ -59,7 +62,7 @@
</template> </template>
<script> <script>
import ButtonModule from './ButtonModule.vue' import ButtonModule from './ButtonModule.vue'
import { statusMap } from '../evaluationFormMap.js' import { statusMap, vehicleCategoryMap } from '../evaluationFormMap.js'
export default { export default {
components: { components: {
...@@ -73,7 +76,8 @@ export default { ...@@ -73,7 +76,8 @@ export default {
}, },
data() { data() {
return { return {
statusMap statusMap,
vehicleCategoryMap
} }
}, },
methods: { methods: {
...@@ -195,12 +199,21 @@ export default { ...@@ -195,12 +199,21 @@ export default {
.flex-shrink-0 { .flex-shrink-0 {
flex-shrink: 0; flex-shrink: 0;
} }
}
.price { .price {
color: #666666; color: #666666;
font-size: toRpx(32); font-size: toRpx(32);
font-weight: 400; font-weight: 400;
} }
.text-blue {
color: #3b73ff;
font-size: toRpx(32);
font-weight: 700;
}
.text-gray {
color: #999ea8;
font-size: toRpx(24);
font-weight: 400;
} }
.tips { .tips {
display: flex; display: flex;
......
<template>
<view class="material-detail">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
{{ title }}
</view>
<!-- <web-view :src="url"></web-view> -->
<view>
<lk-preview-office :url="url"></lk-preview-office>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import { report } from '@/mixin/index.js'
export default {
name: '',
mixins: [report],
data () {
return {
url: '',
title: ''
}
},
onLoad (options) {
console.log(options)
this.url = options.fileUrl + '&OSSAccessKeyId'+ options.OSSAccessKeyId + '&Signature' + options.Signature
this.title = options.fileName
console.log(this.url)
// else this.setWv()
},
mounted () {
},
methods: {
back () {
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100
})
},
setWebviewStyle () {
const setWebviewStyleWithRetry = () => {
const currentWebview = this.$scope.$getAppWebview()
let [wv] = currentWebview.children(),
wvFlag = false
if (wv) {
wv.setStyle({
left: '71.9%',
top: '17.18%',
height: '82.82%',
width: '28.3%'
})
wvFlag = true;
}
return wvFlag
}
const retrySetWebviewStyle = () => {
if (!setWebviewStyleWithRetry()) {
// 如果未成功,继续重试
setTimeout(retrySetWebviewStyle, 50);
} else {
// 成功设置样式,结束循环
console.log('Webview样式设置成功');
}
};
setTimeout(retrySetWebviewStyle, 100);
}
}
}
</script>
<style scoped lang="scss">
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
z-index: 9;
text-align: center;
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
line-height: toRpx(96);
.back {
position: absolute;
left: 0;
top: 0;
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
}
.file-box {
position: fixed;
top: 5.2vh;
height: 94.8vh;
left: 0;
width: 100vw;
}
.has-ai {
width: 71.36vw;
}
.AI-window {
width: 28.3vw;
height: 90.63vh;
position: fixed;
top: 9.37vh;
right: 0;
background: #f5f9ff;
.AI-title {
height: 5.73vh;
padding-top: 2.08vh;
font-size: toRpx(34);
font-weight: 500;
justify-content: center;
color: #333333;
}
}
</style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view :class="['form-item', { active: focusIndex == index }]" :key="index"> <view :class="['form-item', { active: focusIndex == index }]" :key="index">
<view class="form-item-box"> <view class="form-item-box">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
<input :type="i.inputType" :maxlength="i.maxlength" v-model="customerInfo[i.key]" class="input" :placeholder="i.placeholder" @focus="focusIndex = index" @blur="resetFocusIndex" /> <input :type="i.inputType" :maxlength="i.maxlength" v-model="customerInfo[i.popKey]" class="input" :placeholder="i.placeholder" @focus="focusIndex = index" @blur="resetFocusIndex" />
</template> </template>
<template v-else> <template v-else>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)"> <view :class="['select flex', { placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</template> </template>
<template> <template>
<view class="form-btn flex align-center"> <view class="form-btn flex align-center">
<view class="btn search mr-12">搜索</view> <view class="btn search mr-12" @click="search">搜索</view>
<view class="btn">重置</view> <view class="btn" @click="$emit('reset')">重置</view>
</view> </view>
</template> </template>
</view> </view>
...@@ -36,28 +36,33 @@ export default { ...@@ -36,28 +36,33 @@ export default {
placeholder: '车主姓名', placeholder: '车主姓名',
key: 'carModel', key: 'carModel',
type: 'input', type: 'input',
popKey: 'carBrandListVisible' popKey: 'previousOwnerName'
}, },
{ {
placeholder: '车主电话', placeholder: '车主电话',
key: 'carModel', key: 'carModel',
type: 'input', type: 'input',
popKey: 'carBrandListVisible' popKey: 'previousOwnerPhone'
}, },
{ {
placeholder: '车架号', placeholder: '车架号',
key: 'carModel', key: 'carModel',
type: 'input', type: 'input',
popKey: 'carBrandListVisible' popKey: 'vin'
}, },
{ {
placeholder: '评估单号', placeholder: '评估单号',
key: 'carModel', key: 'carModel',
type: 'input', type: 'input',
popKey: 'carBrandListVisible' popKey: 'evalOrderNo'
} }
], ],
customerInfo: {} customerInfo: {
previousOwnerName: '',
previousOwnerPhone: '',
vin: '',
evalOrderNo: ''
}
} }
}, },
methods: { methods: {
...@@ -69,6 +74,10 @@ export default { ...@@ -69,6 +74,10 @@ export default {
showPopup(e, index) { showPopup(e, index) {
this.focusIndex = index this.focusIndex = index
}, },
search() {
this.$emit('update:searchValue', this.customerInfo)
this.$emit('search')
},
resetFocusIndex() { resetFocusIndex() {
this.focusIndex = -1 this.focusIndex = -1
this.errorTip = false this.errorTip = false
......
...@@ -104,3 +104,8 @@ export const statusMap = { ...@@ -104,3 +104,8 @@ export const statusMap = {
type: 'primary' type: 'primary'
} }
} }
export const vehicleCategoryMap = {
1: '置换车',
2: '报废车'
}
...@@ -412,10 +412,10 @@ globule@^1.0.0: ...@@ -412,10 +412,10 @@ globule@^1.0.0:
lodash "^4.17.21" lodash "^4.17.21"
minimatch "~3.0.2" minimatch "~3.0.2"
glsk-toolkit@^1.0.3: glsk-toolkit@1.0.4:
version "1.0.3" version "1.0.4"
resolved "https://registry.npmmirror.com/glsk-toolkit/-/glsk-toolkit-1.0.3.tgz#df102884275e01633f6d7a80efef8c59e7237277" resolved "https://registry.npmmirror.com/glsk-toolkit/-/glsk-toolkit-1.0.4.tgz#59627499c1a500f8a0ddfcfe51f5359cd3040991"
integrity sha512-h1rRmLIIFvVh/CNcF5KqAbhCLStPgUAKS4Jx2awAYnURS1l2e1MAhzk9OSbL4hKyn5Tvz6vdLhT5CwWQASu+HA== integrity sha512-43g3qaYtSfxzSG4dVjr0gDmD/tvVnCZuQ+ONK2mkmuqzhclsTsuSLfn6enjQZELmvWQGj45YhEU7XdQ8sTKroA==
dependencies: dependencies:
"@sentry/browser" "^7.101.1" "@sentry/browser" "^7.101.1"
crypto-js "^4.2.0" crypto-js "^4.2.0"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!