Commit c6faeabb by 李伟康

commit 4.18需求

1 parent 48e771a2
...@@ -118,7 +118,8 @@ ...@@ -118,7 +118,8 @@
"pages/aiInspectionDetail/aiInspectionDetail", "pages/aiInspectionDetail/aiInspectionDetail",
"pages/aiInspectionReception/aiInspectionReception", "pages/aiInspectionReception/aiInspectionReception",
"pages/trainingMaterials/trainingMaterials", "pages/trainingMaterials/trainingMaterials",
"pages/trainingMaterials/pages/playVideo/index" "pages/trainingMaterials/pages/playVideo/index",
"pages/carQuotation/reception/reception"
] ]
}, },
{ {
......
...@@ -175,5 +175,10 @@ module.exports = { ...@@ -175,5 +175,10 @@ module.exports = {
orderStaffValid(data) { orderStaffValid(data) {
return api.post('dj.api.smartcarlife.order.staff.valid', data) return api.post('dj.api.smartcarlife.order.staff.valid', data)
}, },
/**
* 根据客户手机号查询录音批次
*/
getCustomerRecepitonFindBatchByPhone(data) {
return api.post('dj.api.smartcarlife.recepiton.customer.findBatchByPhone', data)
},
} }
...@@ -5,7 +5,8 @@ Component({ ...@@ -5,7 +5,8 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
item: Object item: Object,
type:Number
}, },
/** /**
......
...@@ -29,7 +29,14 @@ ...@@ -29,7 +29,14 @@
} }
} }
.space-between{
.sub{
flex: auto;
}
.score{
justify-content: flex-end;
}
}
.content { .content {
padding: var(--fontSize16) var(--fontSize32); padding: var(--fontSize16) var(--fontSize32);
height: calc(100% - var(--fontSize86)); height: calc(100% - var(--fontSize86));
......
<view class="item"> <view class="item">
<view class="title"> <view class="title {{type == 2?'space-between':''}}">
<block wx:if="{{type == 2}}">
<view class="sub">
接待日期:
<view class="num">{{item.receptionDate}}</view>
</view>
</block>
<block wx:else>
<view class="sub"> <view class="sub">
接待批次 接待批次
<view class="num">{{item.num}}</view> <view class="num">{{item.num}}</view>
</view> </view>
<view class="sub"> </block>
<view class="sub score">
得分 得分
<view class="num">{{item.score || 0}}</view> <view class="num">{{item.score || 0}}</view>
</view> </view>
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
updateOrderStatus, updateOrderStatus,
merchantMode, merchantMode,
orderStatistics, orderStatistics,
cancelOrderById cancelOrderById,
} from '../../../api' } from '../../../api'
import data from '../constant/data' import data from '../constant/data'
import constantData from '../constant/data' import constantData from '../constant/data'
...@@ -585,7 +585,9 @@ Component({ ...@@ -585,7 +585,9 @@ Component({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI) return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
}, },
toConfirmReturanOrder(e) { toConfirmReturanOrder(e) {
const { id } = e.currentTarget.dataset const {
id
} = e.currentTarget.dataset
let _this = this let _this = this
wx.showModal({ wx.showModal({
title: '', title: '',
...@@ -602,7 +604,9 @@ Component({ ...@@ -602,7 +604,9 @@ Component({
}) })
}, },
toCopyNumber(e) { toCopyNumber(e) {
let { ordernum } = e.currentTarget.dataset let {
ordernum
} = e.currentTarget.dataset
ordernum = ordernum.replace(/,$/, "") ordernum = ordernum.replace(/,$/, "")
wx.setClipboardData({ wx.setClipboardData({
data: ordernum.toString(), data: ordernum.toString(),
...@@ -613,7 +617,9 @@ Component({ ...@@ -613,7 +617,9 @@ Component({
}, },
repeal(id) { repeal(id) {
let _this = this let _this = this
cancelOrderById({ id }).then(_res_ => { cancelOrderById({
id
}).then(_res_ => {
let { let {
code, code,
message message
...@@ -632,7 +638,9 @@ Component({ ...@@ -632,7 +638,9 @@ Component({
}) })
}, },
toshowErrorOrder(e) { toshowErrorOrder(e) {
const { item } = e.currentTarget.dataset const {
item
} = e.currentTarget.dataset
this.setData({ this.setData({
showErrorId: item.payId showErrorId: item.payId
}, () => { }, () => {
...@@ -652,5 +660,12 @@ Component({ ...@@ -652,5 +660,12 @@ Component({
}) })
}) })
}, },
jumpReception(e) {
const {
item
} = e.currentTarget.dataset
wx.$router.go('reception', item)
}
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -127,6 +127,20 @@ ...@@ -127,6 +127,20 @@
</view> </view>
</view> </view>
</block> </block>
<view class="order pricePay" wx:if="{{item.orderStatus != '-1' && item.quotedPriceUpdate}}">
<view class="order-label">支付金额</view>
<view class="header-price"><text class="unit">¥</text> {{item.quotedPriceUpdate || ''}}</view>
<!-- 已录单未签名 -->
<!-- <view wx:if="{{(item.orderStatus == '3' && item.equityOrderStatus == '0') || (item.orderStatus == '5' && item.equityOrderStatus == '0')}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,未录入权益合同
</view>
<view wx:elif="{{item.orderStatus == '3' && item.equityOrderStatus == '2'}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,尚未签名确认
</view> -->
<!-- <view wx:else>创建时间:{{item.createdTime}}</view> -->
</view>
</view> </view>
<!-- 非融合不显示 --> <!-- 非融合不显示 -->
<view class="order-detail" wx:if="{{(item.orderStatus != 0|| item.orderStatus != -1 )&&(item.mode!=1)}}"> <view class="order-detail" wx:if="{{(item.orderStatus != 0|| item.orderStatus != -1 )&&(item.mode!=1)}}">
...@@ -146,23 +160,12 @@ ...@@ -146,23 +160,12 @@
</view> </view>
<!-- footer --> <!-- footer -->
<view class="item-footer"> <view class="item-footer">
<view class="pricePay" wx:if="{{item.orderStatus != '-1' && item.quotedPriceUpdate}}">
<view class="order-label">支付金额</view>
<view class="header-price"><text class="unit">¥</text> {{item.quotedPriceUpdate || ''}}</view>
<!-- 已录单未签名 -->
<!-- <view wx:if="{{(item.orderStatus == '3' && item.equityOrderStatus == '0') || (item.orderStatus == '5' && item.equityOrderStatus == '0')}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,未录入权益合同
</view>
<view wx:elif="{{item.orderStatus == '3' && item.equityOrderStatus == '2'}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,尚未签名确认
</view> -->
<!-- <view wx:else>创建时间:{{item.createdTime}}</view> -->
</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}">
<view wx:if="{{item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9}}" class="btn_class"> <view wx:if="{{item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9}}" class="btn_class">
<block wx:if="{{item.orderStatus != '0'}}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{item}}">接待记录</view>
</block>
<view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}"> <view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}} {{btnTxt[item.orderStatus]}}
</view> </view>
......
...@@ -280,7 +280,6 @@ ...@@ -280,7 +280,6 @@
.header-price { .header-price {
color: #222222; color: #222222;
margin-left: var(--fontSize12);
} }
.green-txt { .green-txt {
...@@ -473,6 +472,7 @@ ...@@ -473,6 +472,7 @@
.pricePay { .pricePay {
display: flex; display: flex;
align-items: center; align-items: center;
flex-shrink: 0;
} }
.pricePay .unit { .pricePay .unit {
...@@ -519,6 +519,7 @@ ...@@ -519,6 +519,7 @@
background: #347BFF; background: #347BFF;
border-radius: var(--fontSize32); border-radius: var(--fontSize32);
padding: var(--fontSize8) var(--fontSize40); padding: var(--fontSize8) var(--fontSize40);
flex-shrink: 0;
} }
.order-btn.default-btn { .order-btn.default-btn {
......
// packageEquity/pages/carQuotation/reception/reception.js
import {
getCustomerRecepitonFindBatchByPhone
} from '../../../api'
Page({
/**
* 页面的初始数据
*/
data: {
list: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$router.getData(res => {
console.log(res)
if (res.customerPhone) this.getCustomerRecepitonFindBatchByPhone(res.customerPhone)
else wx.$util.showToast('数据异常:客户手机号为空')
})
},
async getCustomerRecepitonFindBatchByPhone(customerPhone) {
try {
wx.$util.showLoading()
const {
code,
data,
message
} = await getCustomerRecepitonFindBatchByPhone({
customerPhone
})
wx.hideLoading()
if (data && code == 0) {
const rex = /\b\d{2}:\d{2}:\d{2}\b/
data?.map(e => {
if (e.startTime && e.endTime) {
e.receptionDate = e.startTime.split(' ')[0]
e.time = `${e.startTime.match(rex)[0]}-${e.endTime.match(rex)[0]}`
}
if (e.duration) e._duration = this.formatTime(e.duration)
if (!e.estimatedResult) {
e.estimatedResult = '未知'
e.estimatedStatus = -1
} else e.estimatedStatus = e.estimatedResult == '成交' ? 1 : 0
})
this.setData({
list: data,
flag: true
})
} else throw message
} catch (error) {
wx.hideLoading()
this.setData({
flag: true
})
console.log(error)
if (error) wx.$util.showToast(error)
}
},
formatTime(seconds) {
seconds = Math.floor(seconds / 1000)
let formattedTime = ''
if (seconds < 60) return seconds + 's'
else {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60),
remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + 'h'
if (minutes > 0 || hours > 0) formattedTime += minutes + 'min'
if (remainingSeconds > 0) formattedTime += remainingSeconds + 's'
return formattedTime
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "接待记录",
"usingComponents": {
"content-item":"../../aiInspection/components/contentItem/contentItem"
}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carQuotation/reception/reception.wxss */
.content-box {
padding: var(--fontSize20) 0;
}
.padding-box {
font-weight: 500;
font-size: var(--fontSize28);
color: #BEC1C7;
width: 100%;
text-align: center;
margin-top: var(--fontSize284);
}
\ No newline at end of file \ No newline at end of file
<view class="content-box">
<block wx:if="{{flag}}">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index">
<content-item item="{{item}}" type="2"></content-item>
</block>
</block>
<block wx:else>
<view class="padding-box">
质检分析中,请耐心等待
</view>
</block>
</block>
</view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!