Commit 300a2193 by 李伟康

feat(api): 新增交付单相关接口

新增交付单列表、详情、操作日志等接口,支持客户确认到店和提车功能。
1 parent d1c4d558
...@@ -31,4 +31,42 @@ module.exports = { ...@@ -31,4 +31,42 @@ module.exports = {
...data ...data
}) })
}, },
/**
* 交付单列表
*/
getDeliveryOrderPageList (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderPageList', data ,{
returnAll: true
})
},
/**
* 交付单列表按照支付状态统计数量
*/
getDeliveryOrderListCount (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderListCount', data)
},
/**
* 交付单详情
*/
getDeliveryOrderDetail (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderDetail', data)
},
/**
* 交付单操作日志
*/
getDeliveryOrderOpLog (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderOpLog', data)
},
/**
* 客户确认到店
*/
confirmArrive (data) {
return gscPost('/deliveryOrderManage/confirmArrive', data, { returnAll: true })
},
/**
* 客户确认提车
*/
confirmDelivery (data) {
return gscPost('/deliveryOrderManage/confirmDelivery', data, { returnAll: true })
},
} }

2.79 MB | W: | H:

2.82 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
{ {
icon: 'daily-report', icon: 'daily-report',
label: '驻店日报', label: '驻店日报',
name: 'DailyReport' name: 'DailyReport',
}, },
{ {
icon: 'create-order', icon: 'create-order',
...@@ -63,15 +63,19 @@ export default { ...@@ -63,15 +63,19 @@ export default {
icon: 'evaluation-management', icon: 'evaluation-management',
label: '评估单管理', label: '评估单管理',
name: 'EvaluationFormList' name: 'EvaluationFormList'
}, {
icon: 'delivery-management',
label: '交付管理',
name: 'DeliveryManagement',
page: '/pages/usedCar/deliveryManagement/index'
} }
] ]
if (sceneType == 0) return [] if (sceneType == 0) return []
else if (sceneType === 7) { else if (sceneType === 7) {
return entranceList.filter(e => ['DailyReport', 'EvaluationFormList'].includes(e.name)); return entranceList.filter(e => ['DailyReport', 'EvaluationFormList', 'DeliveryManagement'].includes(e.name));
} }
if (sceneType === 1) { if (sceneType === 1) {
return entranceList.filter(e => e.name !== 'EvaluationFormList'); return entranceList.filter(e => !['EvaluationFormList', 'DeliveryManagement'].includes(e.name));
} }
} }
}, },
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
:imgKey="bannerKey" :imgKey="bannerKey"
:loadComplete="loadComplete" :loadComplete="loadComplete"
:noDataObject="swiperNoDataObject" :noDataObject="swiperNoDataObject"
> >
</swiper-component> </swiper-component>
</template> </template>
</view> </view>
...@@ -409,7 +409,7 @@ export default { ...@@ -409,7 +409,7 @@ export default {
async entranceClick (item) { async entranceClick (item) {
// 清除评估单的图片视频资源缓存 // 清除评估单的图片视频资源缓存
const noInterceptPage = ['DailyReport'], const noInterceptPage = ['DailyReport', 'DeliveryManagement'],
{ sceneType } = this { sceneType } = this
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport(sceneType != 7)))) return if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport(sceneType != 7)))) return
if (sceneType != 7 && await this.inspectionOfProhibitionBill()) return if (sceneType != 7 && await this.inspectionOfProhibitionBill()) return
...@@ -420,6 +420,9 @@ export default { ...@@ -420,6 +420,9 @@ export default {
}) })
return return
} }
if (item.page) return uni.navigateTo({
url: item.page
})
let pageName = { let pageName = {
1: 'boutique', 1: 'boutique',
7: 'usedCar' 7: 'usedCar'
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
</uni-popup> </uni-popup>
</template> </template>
<script> <script>
import utils from '@/utils/utils'
export default { export default {
props: { props: {
// 弹窗类型:success, error, warning, info // 弹窗类型:success, error, warning, info
...@@ -84,9 +86,10 @@ export default { ...@@ -84,9 +86,10 @@ export default {
watch: { watch: {
buttons: { buttons: {
immediate: true, immediate: true,
deep: true,
handler(newVal) { handler(newVal) {
if (newVal) { if (newVal) {
this.buttonsList = JSON.parse(JSON.stringify(newVal)) this.buttonsList = utils.deepClone(newVal)
} }
} }
} }
...@@ -94,7 +97,7 @@ export default { ...@@ -94,7 +97,7 @@ export default {
created() { created() {
// 初始化时将buttons赋值给buttonsList // 初始化时将buttons赋值给buttonsList
this.buttonsList = JSON.parse(JSON.stringify(this.buttons)) this.buttonsList = utils.deepClone(this.buttons)
} }
} }
</script> </script>
...@@ -104,7 +107,7 @@ export default { ...@@ -104,7 +107,7 @@ export default {
background-color: #fff; background-color: #fff;
border-radius: toRpx(38); border-radius: toRpx(38);
width: toRpx(848); width: toRpx(848);
height: toRpx(660); min-height: toRpx(660);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
...@@ -124,10 +127,10 @@ export default { ...@@ -124,10 +127,10 @@ export default {
} }
.popup-title { .popup-title {
font-size: toRpx(40); font-size: toRpx(48);
font-weight: 500; font-weight: 500;
color: #333; color: #333;
margin-bottom: toRpx(16); margin-bottom: toRpx(24);
text-align: center; text-align: center;
} }
...@@ -135,7 +138,7 @@ export default { ...@@ -135,7 +138,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
text-align: center; text-align: center;
margin-bottom: 32rpx; margin:0 64rpx 32rpx;
line-height: 1.5; line-height: 1.5;
} }
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
:endDate="endDate" :endDate="endDate"
@confirm="confirmCalendar" @confirm="confirmCalendar"
:rangeValue="rangeValue" :rangeValue="rangeValue"
hideMask
/> />
</view> </view>
</template> </template>
......
<template>
<view class="page-box" :style="pageStyle">
<view
class="nav-bar"
:style="{ 'z-index': backProp.zindex || 9 }"
>
<template v-if="backProp.show">
<view
class="back"
@click="backProp.click"
>
<uni-icons
:type="backProp.iconType || 'left'"
:size="backProp.size || 20"
:color="backProp.color || '#000'"
></uni-icons>
</view>
</template>
{{ title }}
</view>
<slot></slot>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
pageStyle:{
type: String,
default: ''
},
backProp: {
type: Object,
default: () => {
return {
show: true,
click: () => {
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100
})
}
}
}
},
title: {
type: String,
default: ''
}
},
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.page-box {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%;
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
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;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -16,12 +16,14 @@ import wnCanvas from './components/Canvas/wn-canvas' ...@@ -16,12 +16,14 @@ import wnCanvas from './components/Canvas/wn-canvas'
import UpdateBox from './components/UpdateBox' import UpdateBox from './components/UpdateBox'
import webView from './components/WebView' import webView from './components/WebView'
import uView from 'uview-ui' import uView from 'uview-ui'
import PageComponent from './components/PageComponent'
Vue.use(uView) Vue.use(uView)
Vue.use(webView) Vue.use(webView)
Vue.component('GlsxImage', GlsxImage) Vue.component('GlsxImage', GlsxImage)
Vue.component('MessageBox', MessageBox) Vue.component('MessageBox', MessageBox)
Vue.component('wnCanvas', wnCanvas) Vue.component('wnCanvas', wnCanvas)
Vue.component('UpdateBox', UpdateBox) Vue.component('UpdateBox', UpdateBox)
Vue.component('PageComponent', PageComponent)
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
// Vue.prototype.$ossDomain = config.OSS_DOMAIN // Vue.prototype.$ossDomain = config.OSS_DOMAIN
......
...@@ -238,6 +238,18 @@ ...@@ -238,6 +238,18 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/usedCar/deliveryManagement/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/usedCar/deliveryManagement/detail",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
...@@ -253,4 +265,4 @@ ...@@ -253,4 +265,4 @@
"rpxCalcBaseDeviceWidth": 375, "rpxCalcBaseDeviceWidth": 375,
"rpxCalcIncludeWidth": 750 "rpxCalcIncludeWidth": 750
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -181,8 +181,8 @@ export default { ...@@ -181,8 +181,8 @@ export default {
width: toRpx(36); width: toRpx(36);
height: toRpx(36); height: toRpx(36);
position: absolute; position: absolute;
top: - toRpx(12); top: toMinusRpx(12);
right: - toRpx(12); right: toMinusRpx(12);
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
......
...@@ -133,15 +133,15 @@ export default { ...@@ -133,15 +133,15 @@ export default {
position: absolute; position: absolute;
} }
.tab-first-right { .tab-first-right {
right: - toRpx(64); right: toMinusRpx(64);
position: absolute; position: absolute;
} }
.tab-second-right { .tab-second-right {
right: - toRpx(64); right: toMinusRpx(64);
position: absolute; position: absolute;
} }
.tab-second-left { .tab-second-left {
left: - toRpx(64); left: toMinusRpx(64);
position: absolute; position: absolute;
} }
} }
......
<template>
<view class="step-1">
<view class="item flex">
<view class="sprite-icon icon-delivery-step-1"></view>
<view class="info">
客户到店确认
<view class="des">等待客户到店后操作</view>
</view>
<view
class="btn flex"
@click="confirmArrive"
>确认到店</view>
</view>
<view class="tips">
<view class="title flex">
<view class="icon">
<uni-icons
type="info"
:size="16"
color="#F59619"
></uni-icons>
</view>交付要点
</view>
<view class="text">核实车款: 引导客户现场完成尾款支付,并确认款项到账。</view>
<view class="text">核验人车: 核对客户身份信息,并与客户共同确认车辆信息及实际车况。</view>
<view class="text">交接资料: 清点并交付车辆登记证、行驶证、车钥匙等重要物品。</view>
<view class="text">签署确认: 引导客户签署《车辆交付确认书》,完成交付流程。 </view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
step: [String, Number],
detail: {
type: Object,
default: () => {
return {}
}
}
},
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
async confirmArrive () {
try {
uni.$track.add({
eventCode: 'app_delivery_arrive_shop'
})
uni.showLoading({ title: '确定中...', mask: true })
const { step, detail } = this,
{ deliveryOrderId } = detail,
{ data: { code, msg } } = await uni.$api.usedCarApi.confirmArrive({
deliveryOrderId
})
uni.hideLoading()
if (code == 0) this.$emit('comfirm', step)
else throw msg
} catch (error) {
uni.hideLoading()
if (error) this.$emit('openError', error)
}
}
}
}
</script>
<style scoped lang='scss'>
.step-1 {
margin: 0 toRpx(48);
.item {
height: toRpx(144);
border-radius: toRpx(16);
background: #ffffff;
margin-bottom: toRpx(24);
box-sizing: border-box;
padding: 0 toRpx(32);
.sprite-icon {
zoom: 2;
}
.info {
margin-left: toRpx(24);
color: #333333;
font-size: toRpx(28);
font-weight: 500;
line-height: toRpx(40);
.des {
color: #666666;
font-size: toRpx(26);
font-weight: 400;
line-height: toRpx(36);
margin-top: toRpx(4);
}
}
.btn {
margin-left: auto;
width: toRpx(192);
height: toRpx(64);
border-radius: toRpx(48);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
font-size: toRpx(28);
font-weight: 500;
justify-content: center;
}
}
.tips {
height: toRpx(272);
border-radius: toRpx(16);
background: #fef4e8;
box-sizing: border-box;
padding: toRpx(24) toRpx(32) toRpx(24) toRpx(72);
color: #f59619;
font-size: toRpx(26);
line-height: toRpx(44);
.title {
font-weight: 500;
line-height: toRpx(36);
margin-bottom: toRpx(12);
position: relative;
}
.icon {
position: absolute;
right: calc(100% + toRpx(8));
top: 50%;
transform: translateY(-50%);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<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">
<template v-if="imgList.length < 10">
<view
class="img-item upload flex"
@click="chooseImage"
>
<uni-icons
type="plusempty"
:size="24"
color="#347BFF"
class="icon"
></uni-icons>
{{ imgList.length }}/10
</view>
</template>
<template v-for="(i, index) in imgList">
<view
class="img-item"
:key="index"
>
<image
:src="i"
class="img"
mode="aspectFill"
@click="previewMedia(i, 1)"
/>
<view class="del flex">
<uni-icons
type="closeempty"
:size="10"
color="#fff"
@click="delImage(index)"
></uni-icons>
</view>
</view>
</template>
</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"
@input="remark = $event.detail.value"
:maxlength="200"
class="textarea"
></textarea>
<view class="limit">{{ remark.length }}/200</view>
</view>
</view>
<view class="btn-box box flex">
<view class="sprite-icon icon-delivery-step-2"></view>
<view class="info">
客户提车确认
<view class="des">请让客户在拍卖小程序完成交割单签署,签署完成后才可点击确认提车。</view>
</view>
<view
:class="['btn flex', { disabled: !imgList.length }]"
@click="comfirm"
>确认提车</view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import { uploadFile } from '@/utils/ossUpload.js'
import permision from '@/js_sdk/wa-permission/permission.js'
export default {
name: '',
props: {
step: [String, Number],
detail: {
type: Object,
default: () => {
return {}
}
}
},
data () {
return {
imgList: [],
remark: ''
}
},
mounted () {
},
methods: {
delImage (index) {
this.imgList.splice(index, 1)
},
async chooseImage () {
const MAX_IMAGE_SIZE = 10 * 1024 * 1024, // 10MB
maxImageCount = 10,
{ imgList } = this,
_this = this
try {
// #ifdef APP-PLUS
const photoLibrary = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE')
const camera = await permision.requestAndroidPermission('android.permission.CAMERA')
const isOnline = await uni.$isNetWork()
if (photoLibrary != 1) throw '您的设备不支持相册功能或未授权访问,请前往设置中开启相册权限'
if (camera != 1) throw '您的设备不支持摄像头功能或未授权访问,请前往设置中开启摄像头权限'
if (!isOnline) throw '当前无网络连接,请连接网络后重试'
// #endif
uni.chooseImage({
count: maxImageCount - imgList.length,
async success (res) {
for (const file of res.tempFiles) {
if (file.size > MAX_IMAGE_SIZE) {
throw '图片上传最大10MB'
}
}
for (let i = 0; i < res.tempFilePaths.length; i++) {
uni.showLoading({ title: '上传中...', mask: true })
const url = await uploadFile(res.tempFiles[i], res.tempFilePaths[i])
_this.imgList.push(url)
}
if (_this.imgList.length >= res.tempFilePaths.length) uni.hideLoading()
}
})
} catch (error) {
return uni.showToast({
title: error,
icon: 'none'
})
}
},
async comfirm () {
try {
let { imgList, step, remark, detail } = this,
{ deliveryOrderId } = detail,
confirmImages = ''
if (!imgList.length) return
confirmImages = imgList.join(',')
uni.showLoading({ title: '提交中...', mask: true })
uni.$track.add({
eventCode: 'app_delivery_submit_detail'
})
const { data: { code, msg } } = await uni.$api.usedCarApi.confirmDelivery({
deliveryOrderId,
confirmImages,
remark
})
uni.hideLoading()
if (code == 0) this.$emit('comfirm', step)
else throw msg
} catch (error) {
console.log(error)
uni.hideLoading()
if (error) this.$emit('openError', error)
}
},
previewMedia (media, type) {
const url = `/pages/boutique/preview?tabName=预览&sourceType=${type}&detailUrl=${media}`
uni.navigateTo({
url: `${url}`
})
}
}
}
</script>
<style scoped lang="scss">
.step-2 {
margin: 0 toRpx(48);
.box {
border-radius: toRpx(16);
background: #ffffff;
margin-bottom: toRpx(24);
padding: 0 toRpx(32);
.title {
color: #333333;
font-size: toRpx(28);
font-weight: 500;
display: flex;
line-height: toRpx(40);
padding-top: toRpx(28);
.required {
color: #f24724;
font-size: toRpx(28);
margin-left: toRpx(8);
}
}
}
.upload-box {
.tips {
margin: toRpx(4) 0 toRpx(28);
color: #999999;
font-size: toRpx(26);
}
.img-list {
flex-wrap: wrap;
gap: toRpx(24);
.upload {
background: #f5f8ff;
flex-direction: column;
justify-content: center;
color: #999999;
font-size: toRpx(26);
.icon {
margin-bottom: toRpx(22);
}
}
.img-item {
width: toRpx(224);
height: toRpx(224);
border-radius: toRpx(12);
position: relative;
overflow: hidden;
.img {
width: 100%;
height: 100%;
}
.del {
position: absolute;
width: toRpx(32);
height: toRpx(32);
background: #00000080;
border-radius: 100%;
top: toRpx(8);
right: toRpx(4);
justify-content: center;
}
}
}
.img-tips {
color: #999999;
font-size: toRpx(24);
padding: toRpx(16) 0 toRpx(28);
line-height: toRpx(36);
}
}
.remark-box {
padding-bottom: toRpx(28);
.remark {
height: toRpx(200);
border-radius: toRpx(16);
background: #fafafa;
box-sizing: border-box;
padding: toRpx(24) 0 toRpx(24) toRpx(24);
position: relative;
.textarea {
height: toRpx(132);
width: 100%;
color: #333333;
font-size: toRpx(28);
}
.limit {
position: absolute;
bottom: toRpx(8);
right: toRpx(8);
color: #999999;
font-size: toRpx(28);
line-height: toRpx(44);
}
}
.placeholder {
color: #999999;
font-size: toRpx(28);
}
}
.btn-box {
box-sizing: border-box;
height: toRpx(144);
.info {
margin-left: toRpx(24);
color: #333333;
font-size: toRpx(28);
font-weight: 500;
line-height: toRpx(40);
.des {
color: #666666;
font-size: toRpx(26);
font-weight: 400;
line-height: toRpx(36);
margin-top: toRpx(4);
}
}
.btn {
margin-left: auto;
width: toRpx(192);
height: toRpx(64);
border-radius: toRpx(48);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
font-size: toRpx(28);
font-weight: 500;
justify-content: center;
}
.disabled {
opacity: 0.5;
}
}
}
</style>
<template>
<view class="step-2">
<view class="upload-box box">
<view class="title">
交付照片
</view>
<view class="img-list flex">
<template v-for="(i, index) in detail.imgList">
<view
class="img-item"
:key="index"
>
<image
:src="i"
class="img"
mode="aspectFill"
@click="previewMedia(i, 1)"
/>
</view>
</template>
</view>
</view>
<view class="remark-box box">
<view class="title">交付备注</view>
<view class="remark">
<rich-text :nodes="detail.remark"></rich-text>
</view>
</view>
<view class="btn-box box flex">
<view class="sprite-icon icon-delivery-step-2"></view>
<view class="info">
客户提车确认
<view class="des">提车时间:{{detail.scheduledTime}}</view>
</view>
<view class="btn flex">已提车</view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: '',
props: {
step: [String, Number],
detail: {
type: Object,
default: () => {
return {}
}
}
},
data () {
return {
}
},
mounted () {
},
methods: {
previewMedia (media, type) {
const url = `/pages/boutique/preview?tabName=预览&sourceType=${type}&detailUrl=${media}`
uni.navigateTo({
url: `${url}`
})
}
}
}
</script>
<style scoped lang="scss">
.step-2 {
margin: 0 toRpx(48);
.box {
border-radius: toRpx(16);
background: #ffffff;
margin-bottom: toRpx(24);
padding: 0 toRpx(32);
.title {
color: #333333;
font-size: toRpx(28);
font-weight: 500;
display: flex;
line-height: toRpx(40);
padding-top: toRpx(28);
}
}
.upload-box {
padding-bottom: toRpx(28);
.title {
margin-bottom: toRpx(28);
}
.img-list {
flex-wrap: wrap;
gap: toRpx(24);
.img-item {
width: toRpx(224);
height: toRpx(224);
border-radius: toRpx(12);
position: relative;
overflow: hidden;
.img {
width: 100%;
height: 100%;
}
.del {
position: absolute;
width: toRpx(32);
height: toRpx(32);
background: #00000080;
border-radius: 100%;
top: toRpx(8);
right: toRpx(4);
justify-content: center;
}
}
}
.img-tips {
color: #999999;
font-size: toRpx(24);
padding: toRpx(16) 0 toRpx(28);
line-height: toRpx(36);
}
}
.remark-box {
padding-bottom: toRpx(28);
.remark {
margin-top: toRpx(24);
max-height: toRpx(220);
box-sizing: border-box;
color: #333333;
font-size: toRpx(28);
overflow-y: auto;
line-height: toRpx(44);
word-break: break-all;
}
.placeholder {
color: #999999;
font-size: toRpx(28);
}
}
.btn-box {
box-sizing: border-box;
height: toRpx(144);
.info {
margin-left: toRpx(24);
color: #333333;
font-size: toRpx(28);
font-weight: 500;
line-height: toRpx(40);
.des {
color: #666666;
font-size: toRpx(26);
font-weight: 400;
line-height: toRpx(36);
margin-top: toRpx(4);
}
}
.btn {
margin-left: auto;
width: toRpx(192);
height: toRpx(64);
border-radius: toRpx(48);
color: #999ea8;
background: #f0f1f5;
font-size: toRpx(28);
font-weight: 500;
justify-content: center;
}
.disabled {
opacity: 0.5;
}
}
}
</style>
<template>
<view class="steps-box flex common-title">
<template v-for="(item, index) in list">
<view
:class="['step-item flex',{
'active-item': index <= stepNum
}]"
:key="index"
>
<template v-if="index != 0">
<view class="line"></view>
</template>
<view class="serial-num">
<view class="num flex">
<template v-if="index >= stepNum">
{{index + 1}}
</template>
<template v-if="index < stepNum">
<uni-icons
type="checkmarkempty"
:size="12"
color="#fff"
></uni-icons>
</template>
</view>
</view>
{{item}}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
step: [String, Number],
list: Array
},
name: '',
data () {
return {
}
},
computed: {
stepNum () {
return this.step - 1
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.steps-box {
padding: toRpx(40) 0 toRpx(24) toRpx(54);
margin-bottom: toRpx(8);
.step-item {
color: #999;
font-size: toRpx(32);
font-weight: 500;
height: toRpx(56);
.serial-num {
width: toRpx(46);
height: toRpx(46);
border-radius: 50%;
border: toRpx(2) solid #979797;
box-sizing: border-box;
padding: toRpx(2);
margin-right: toRpx(12);
.num {
width: 100%;
height: 100%;
background: #b1b1b1;
color: #fff;
border-radius: 50%;
justify-content: center;
font-size: toRpx(28);
font-weight: 700;
}
}
.line {
width: toRpx(64);
border-top: toRpx(2) dashed #d6d6d6;
border-bottom: toRpx(2) dashed #d6d6d6;
margin: 0 toRpx(32);
}
}
.active-item {
color: #4673ff;
.serial-num {
border-color: #4673ff;
box-shadow: toRpx(2) toRpx(2) toRpx(2) #d7e3ff;
.num {
background: #4673ff;
}
}
.line{
border-color: #4673ff;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="delivery-steps-box">
<steps
:step="step"
:list="stepList"
/>
<view class="step-component">
<template v-for="(i,index) in stepList">
<view
:class="['step-view',{showView: index + 1 == step}]"
:key="index"
>
<component
:is="'Step' + (index + 1)"
:step="step"
@comfirm="comfirm"
@openError="$emit('openError',$event)"
:detail="detail"
></component>
</view>
</template>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import Steps from './Steps.vue'
import Step1 from './Step1'
import Step2 from './Step2'
import Step3 from './Step3'
export default {
components: {
Steps,
Step1,
Step2,
Step3
},
props:{
detail:{
type: Object,
default: () => {
return {}
}
},
},
watch:{
detail:{
handler (val) {
this.step = Number(val.orderStatus) + 1
},
deep: true
}
},
name: '',
data () {
return {
step: -1,
stepList: [
'待交付',
'交付中',
'交付完成'
],
}
},
mounted () {
},
methods: {
comfirm (step) {
const {id} = this.detail
this.step = step + 1
if(this.step ==3) this.$emit('refresh',id)
}
}
}
</script>
<style scoped lang='scss'>
.delivery-steps-box {
height: 100%;
.step-component {
height: calc(100% - #{toRpx(128)});
overflow-y: scroll;
position: relative;
.step-view {
position: absolute; //验证
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
visibility: hidden;
}
.showView {
position: absolute;
z-index: 1;
visibility: visible;
animation: to-right 0.25s forwards;
}
@keyframes to-right {
0% {
left: 100%;
}
100% {
left: 0;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="detail-info-box">
<view class="pay-info box">
<view class="title">财务信息</view>
<view class="item">
<view class="label">付款状态</view>
<view :class="['value await',{'success':detail.paymentStatus == 1}]">{{PAYMENT_STATUS[detail.paymentStatus]}}</view>
</view>
<template v-if="detail.paymentStatus != 1">
<view class="tips">
<view class="icon">
<uni-icons
type="info"
:size="16"
color="#F59619"
></uni-icons>
</view>
中拍人现场看车后支付,请门店人员确认客户完成车款支付。
</view>
</template>
</view>
<view class="car-info box">
<view class="title">车辆与客户信息</view>
<template v-for="(i,index) in carInfo">
<view
class="item-box"
:key="index"
>
<view class="item">
<view class="label">{{i.label}}</view>
<view class="value">{{detail[i.key] || '-'}}</view>
</view>
<template v-if="i.hasLine">
<view class="line"></view>
</template>
</view>
</template>
<template v-if="detail.paymentStatus != 1">
<view class="tips">
<view class="icon">
<uni-icons
type="info"
:size="16"
color="#F59619"
></uni-icons>
</view>
交付专员需确认交付车辆信息,与买家信息无误后才可交付。
</view>
</template>
</view>
<view class="log-info box">
<view class="title">操作日志</view>
<view class="log-box">
<template v-for="(i,index) in logList">
<view
class="log-item"
:key="index"
>
<view class="log-title">{{OP_TYPE[i.opType]}}</view>
<view class="item">
<view class="label">操作人</view>
<view class="value">{{i.opUserName}}</view>
</view>
<view class="item">
<view class="label">时间</view>
<view class="value">{{i.createdDate}}</view>
</view>
<view class="item-mark">
<view :class="['circle',{first:index == 0}]"></view>
<template v-if="index != logList.length - 1">
<view class="mark-line"></view>
</template>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import { PAYMENT_STATUS, OP_TYPE } from '../contant'
export default {
name: '',
props: {
detail: {
type: Object,
default: () => {
return {}
}
}
},
data () {
return {
OP_TYPE,
PAYMENT_STATUS,
logList: [],
carInfo: Object.freeze([
{
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',
},
])
}
},
watch: {
detail: {
handler (val) {
if (val.deliveryOrderId) this.getDeliveryOrderOpLog()
},
deep: true
}
},
mounted () {
},
methods: {
async getDeliveryOrderOpLog () {
const { deliveryOrderId } = this.detail,
data = await uni.$api.usedCarApi.getDeliveryOrderOpLog({
deliveryOrderId
})
this.logList = data
console.log(data)
},
}
}
</script>
<style scoped lang='scss'>
.detail-info-box {
padding: toRpx(48);
.box {
border-radius: toRpx(16);
background: #ffffff;
margin-bottom: toRpx(24);
box-sizing: border-box;
padding: 0 toRpx(24) toRpx(24);
.tips {
margin-top: toRpx(28);
border-radius: toRpx(16);
background: #fef4e8;
box-sizing: border-box;
padding: toRpx(16) toRpx(16) toRpx(16) toRpx(56);
color: #f59619;
font-size: toRpx(26);
line-height: toRpx(36);
position: relative;
.icon {
position: absolute;
top: toRpx(16);
left: toRpx(16);
}
}
.item {
margin-top: toRpx(28);
line-height: toRpx(40);
display: flex;
font-size: toRpx(28);
.label {
color: #999999;
width: toRpx(208);
}
.value {
width: calc(100% - #{toRpx(208)});
color: #333333;
}
.await {
color: #f59619;
}
.success {
color: #2cca74;
}
}
.line {
margin-top: toRpx(28);
width: 100%;
height: toRpx(2);
background: #f7f7f6;
}
.title {
padding-top: toRpx(24);
color: #333333;
font-size: toRpx(32);
font-weight: 500;
line-height: toRpx(48);
}
}
.log-info {
margin-bottom: 0;
.log-box {
padding-top: toRpx(32);
.log-item {
height: toRpx(188);
position: relative;
padding-left: toRpx(60);
.item {
margin-top: toRpx(16);
.label {
width: toRpx(168);
}
.value {
width: calc(100% - #{toRpx(168)});
}
}
.item-mark {
position: absolute;
top: 0;
left: 0;
width: toRpx(32);
.mark-line {
height: toRpx(180);
width: toRpx(2);
background: #d6e4ff;
position: absolute;
top: toRpx(8);
left: 50%;
transform: translateX(-50%);
}
.circle {
position: relative;
width: toRpx(20);
height: toRpx(20);
background: #8eb2fb;
border-radius: 100%;
margin: toRpx(8) auto 0;
z-index: 2;
}
.first {
width: toRpx(32);
height: toRpx(32);
background: #d6e4ff;
position: relative;
&::before,
&::after {
content: '';
position: absolute;
border-radius: 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
&::before {
width: toRpx(20);
height: toRpx(20);
background: #2c66f7;
}
&::after {
width: toRpx(10);
height: toRpx(10);
background: #fff;
}
}
}
}
.log-title {
color: #333333;
font-size: toRpx(32);
font-weight: 500;
line-height: toRpx(44);
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="type-tab">
<view class="type-box">
<view
class="tab-item"
v-for="(i, index) in typeList"
:key="index"
@click="tabClick(index)"
>
<view
:class="['sprite-icon',tabClass(index)]"
:style="{
left:blockLeft
}"
></view>
<view
class="text flex"
:class="[tabIndex == index ? `active` : '']"
>
{{ i[nameKey] }}
<template v-if="hasNum">
<view class="num"> {{formatNum(i[numKey] || 0)}}</view>
</template>
</view>
</view>
</view>
<view
class="mask-box"
:style="[{height:maskHeight}]"
></view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
typeList: Array,
tabIndex: {
type: Number,
default: 0
},
nameKey: {
type: String,
default: 'tabName'
},
maskHeight: {
type: String,
default: '100vh'
},
hasNum: {
type: Boolean,
default: false
},
numKey: {
type: String,
default: 'tabNum'
}
},
name: '',
data () {
return {
firstClass: Object.freeze(['first-nav', 'second-nav']),
}
},
computed: {
blockLeft () {
let { tabIndex } = this
return `${(tabIndex * 248) - (tabIndex == 0 ? 0 : 36)}rpx`
}
},
mounted () {
},
methods: {
tabClass (index) {
let className = ''
if (this.tabIndex == index) {
className = 'active icon-'
if (index == 0) className += 'first-nav'
else className += 'second-nav'
}
return className
},
tabClick (index) {
this.$emit('update:tabIndex', index)
this.$emit('tabClick', index)
},
formatNum(num){
if(num > 99) return '99+'
else return num
}
}
}
</script>
<style scoped lang='scss'>
.type-tab {
position: relative;
height: 96rpx;
overflow: hidden;
.type-box {
position: relative;
display: flex;
width: 100%;
background-color: #eef4fe;
height: toRpx(120);
line-height: toRpx(96);
border-radius: toRpx(48) toRpx(48) 0 0;
overflow: hidden;
z-index: 0;
.tab-item {
width: toRpx(248);
text-align: center;
font-weight: 500;
font-size: toRpx(32);
color: #1f2133;
.text {
position: relative;
justify-content: center;
width: toRpx(248);
.num {
font-size: 24rpx;
margin-left: 8rpx;
}
}
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 700;
font-size: toRpx(32);
color: #2c66f7;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #2c66f7;
border-radius: toRpx(16);
}
}
.sprite-icon {
transform: scale(.65, .73);
transform-origin: 0 0;
transition: left 0.15s;
}
}
}
.mask-box {
position: absolute;
width: 100%;
background: #fff;
left: 0;
top: toRpx(96);
border-radius: toRpx(48);
overflow: hidden;
}
}
</style>
\ No newline at end of file \ No newline at end of file
const ORDER_STATUS = {
0: '待交付',
1: '交付中',
2: '交付完成'
}
const PAYMENT_STATUS = {
0: '待支付',
1: '已结清'
}
const OP_TYPE = {
1: '创建交付工单',
2: '确认客户到店',
3: '确认客户提车'
}
module.exports = {
ORDER_STATUS,
PAYMENT_STATUS,
OP_TYPE
}
\ No newline at end of file \ No newline at end of file
<template>
<page-component
title="交付详情"
:backProp="{
show: true,
click: this.backPage
}"
>
<view class="content flex">
<view class="left">
<detail-info :detail="detail"></detail-info>
</view>
<view class="right">
<delivery-steps
:detail="detail"
@openError="openError"
@refresh="getDeliveryOrderDetail"
></delivery-steps>
</view>
<NoticePopup
ref="errNotice"
title="提示"
:text="errorMessage"
type="warning"
:buttons="errButtons"
></NoticePopup>
<NoticePopup
ref="backNotice"
title="提示"
text="当前交付未完成,退出将不保留当前信息。"
type="warning"
:buttons="backButtons"
></NoticePopup>
</view>
</page-component>
</template>
<script type='text/ecmascript-6'>
import DetailInfo from './components/DetailInfo.vue'
import deliverySteps from './components/DeliverySteps/index.vue'
import NoticePopup from '@/components/NoticePopup.vue'
export default {
components: {
DetailInfo,
deliverySteps,
NoticePopup
},
name: '',
data () {
return {
detail: {},
errorMessage: '',
errButtons: Object.freeze([
{
text: '知道了',
type: 'primary'
}
]),
backButtons: Object.freeze([
{
text: '关闭',
type: 'default'
},
{
text: '确定退出',
type: 'primary',
callback: _ => {
uni.navigateBack()
}
}
])
}
},
onLoad (options) {
this.getDeliveryOrderDetail(options.id)
uni.$track.add({
eventCode: 'app_delivery_detail'
})
},
onBackPress (options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.backPage()
return true
}
// 其他情况允许正常返回
return false
},
methods: {
async getDeliveryOrderDetail (id) {
try {
uni.showLoading({
title: '加载中',
mask: true
})
const data = await uni.$api.usedCarApi.getDeliveryOrderDetail({
id: Number(id)
})
uni.hideLoading()
if (data.orderStatus == 2) {
if (data.remark) data.remark = data.remark.replace(/<\/?br\s*\/?>|\n/g, '<br>')
if (data.confirmImages) data.imgList = data.confirmImages.split(',')
}
this.detail = data
} catch (error) {
uni.hideLoading()
this.openError(error || '请求失败')
}
},
openError (message) {
this.errorMessage = message
this.$refs.errNotice.open()
},
backPage () {
if (this.detail.orderStatus != 2) this.$refs.backNotice.open()
else uni.navigateBack()
},
}
}
</script>
<style scoped lang='scss'>
.content {
width: 100vw;
height: 100vh;
box-sizing: border-box;
padding: toRpx(160) toRpx(64) toRpx(64);
box-sizing: border-box;
.left,
.right {
height: 100%;
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
overflow-y: auto;
}
.left {
width: 34.1vw;
}
.right {
width: 59.08vw;
margin-left: auto;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -197,7 +197,8 @@ $uni-primary: #4673ff !default; ...@@ -197,7 +197,8 @@ $uni-primary: #4673ff !default;
.uni-calendar-item--multiple { .uni-calendar-item--multiple {
// background-color: rgba($color: $uni-primary, $alpha: 0.8); // background-color: rgba($color: $uni-primary, $alpha: 0.8);
background-color: #ecf1ff; background-color: #ecf1ff;
color: #37393D; // color: #37393D;
color: #4673FF;
.uni-calendar-item--multiple{ .uni-calendar-item--multiple{
background: none; background: none;
} }
...@@ -206,10 +207,12 @@ $uni-primary: #4673ff !default; ...@@ -206,10 +207,12 @@ $uni-primary: #4673ff !default;
.uni-calendar-item--before-checked { .uni-calendar-item--before-checked {
background-color: #4673FF; background-color: #4673FF;
color: #fff; color: #fff;
border-radius: 16rpx;
} }
.uni-calendar-item--after-checked { .uni-calendar-item--after-checked {
background-color: #4673FF; background-color: #4673FF;
color: #fff; color: #fff;
border-radius: inherit; border-radius: inherit;
border-radius: 16rpx;
} }
</style> </style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view <view
v-if="!insert&&show" v-if="!insert&&show"
class="uni-calendar__mask" class="uni-calendar__mask"
:class="{'uni-calendar--mask-show':aniMaskShow}" :class="[{'uni-calendar--mask-show':aniMaskShow},{'uni-calendar--mask-bg-hide':hideMask}]"
@click="clean" @click="clean"
></view> ></view>
<view <view
...@@ -16,19 +16,34 @@ ...@@ -16,19 +16,34 @@
v-if="!insert" v-if="!insert"
class="uni-calendar__header uni-calendar--fixed-top" class="uni-calendar__header uni-calendar--fixed-top"
> >
<view <template v-if="!showBottomBtn">
class="uni-calendar__header-btn-box" <view
@click="close" class="uni-calendar__header-btn-box"
> @click="close"
<text class="uni-calendar__header-text uni-calendar--fixed-width">{{cancelText}}</text> >
</view> <text class="uni-calendar__header-text uni-calendar--fixed-width">{{cancelText}}</text>
<viw class="uni-calendar__header-title">{{title}}</viw> </view>
<view </template>
class="uni-calendar__header-btn-box" <viw :class="['uni-calendar__header-title',{'header-title-center':showBottomBtn}]">{{title}}</viw>
@click="confirm" <template v-if="!showBottomBtn">
> <view
<text class="uni-calendar__header-text uni-calendar--fixed-width">{{okText}}</text> class="uni-calendar__header-btn-box"
</view> @click="confirm"
>
<text class="uni-calendar__header-text uni-calendar--fixed-width">{{okText}}</text>
</view>
</template>
<template v-if="showBottomBtn">
<view
class="popup-close"
@click="close"
>
<uni-icons
type="closeempty"
size="18"
></uni-icons>
</view>
</template>
</view> </view>
<view class="uni-calendar__header"> <view class="uni-calendar__header">
<view <view
...@@ -110,6 +125,18 @@ ...@@ -110,6 +125,18 @@
</view> </view>
</view> </view>
</view> </view>
<template v-if="showBottomBtn">
<view class="uni-calendar__footer_btns">
<view
class="uni-calendar__footer_btn"
@click="close"
>取消</view>
<view
class="uni-calendar__footer_btn uni-calendar__footer_btn-primary"
@click="confirm"
>确定</view>
</view>
</template>
</view> </view>
</view> </view>
</template> </template>
...@@ -205,6 +232,14 @@ export default { ...@@ -205,6 +232,14 @@ export default {
openBeforeChange: { openBeforeChange: {
type: Boolean, type: Boolean,
default: false default: false
},
showBottomBtn: {
type: Boolean,
default: true
},
hideMask:{
type: Boolean,
default: false
} }
}, },
data () { data () {
...@@ -523,7 +558,9 @@ $uni-text-color-grey: #999; ...@@ -523,7 +558,9 @@ $uni-text-color-grey: #999;
.uni-calendar--mask-show { .uni-calendar--mask-show {
opacity: 1; opacity: 1;
} }
.uni-calendar--mask-bg-hide{
opacity: 0;
}
.uni-calendar--fixed { .uni-calendar--fixed {
position: fixed; position: fixed;
/* #ifdef APP-NVUE */ /* #ifdef APP-NVUE */
...@@ -538,6 +575,7 @@ $uni-text-color-grey: #999; ...@@ -538,6 +575,7 @@ $uni-text-color-grey: #999;
bottom: calc(var(--window-bottom)); bottom: calc(var(--window-bottom));
z-index: 99; z-index: 99;
/* #endif */ /* #endif */
border-radius: 32rpx 32rpx 0 0;
} }
.uni-calendar--ani-show { .uni-calendar--ani-show {
...@@ -557,9 +595,9 @@ $uni-text-color-grey: #999; ...@@ -557,9 +595,9 @@ $uni-text-color-grey: #999;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 50px; height: 50px;
border-bottom-color: $uni-border-color; // border-bottom-color: $uni-border-color;
border-bottom-style: solid; // border-bottom-style: solid;
border-bottom-width: 1px; // border-bottom-width: 1px;
} }
.uni-calendar--fixed-top { .uni-calendar--fixed-top {
...@@ -568,9 +606,9 @@ $uni-text-color-grey: #999; ...@@ -568,9 +606,9 @@ $uni-text-color-grey: #999;
/* #endif */ /* #endif */
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
border-top-color: $uni-border-color; // border-top-color: $uni-border-color;
border-top-style: solid; // border-top-style: solid;
border-top-width: 1px; // border-top-width: 1px;
} }
.uni-calendar--fixed-width { .uni-calendar--fixed-width {
...@@ -691,4 +729,39 @@ $uni-text-color-grey: #999; ...@@ -691,4 +729,39 @@ $uni-text-color-grey: #999;
line-height: 1; line-height: 1;
/* #endif */ /* #endif */
} }
.header-title-center {
margin: 0 auto;
}
.uni-calendar__footer_btns {
height: 176rpx;
display: flex;
justify-content: center;
align-items: center;
gap: 32rpx;
.uni-calendar__footer_btn {
width: 720rpx;
height: 80rpx;
border-radius: 64rpx;
background: #f0f1f5;
display: flex;
align-items: center;
justify-content: center;
color: #333333;
font-size: 32rpx;
font-weight: 500;
}
.uni-calendar__footer_btn-primary {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
}
}
.popup-close{
padding: 0 48rpx;
position: absolute;
right: 0;
top: 0;
height: 100%;
display: flex;
align-items: center;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!