Commit 2660af3f by liimin

fix(ReceptionCenter): 修复接待记录显示和保存问题

- 移除订单接口中的调试console.log
- 修复接待结果保存字段从status改为result
- 优化记录列表显示,处理空值情况
- 修改记录列表格式化逻辑,避免创建新对象
1 parent 91a135b0
...@@ -444,7 +444,6 @@ module.exports = { ...@@ -444,7 +444,6 @@ module.exports = {
}, },
// 获取订单分页列表 // 获取订单分页列表
getOrderPage(data) { getOrderPage(data) {
console.log(data)
return http.shukeRequest('linkwe-gateway/open/weSubstitute/customer/order/pad', data, 'GET', true) return http.shukeRequest('linkwe-gateway/open/weSubstitute/customer/order/pad', data, 'GET', true)
}, },
// 新增订单 // 新增订单
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
</template> --> </template> -->
</view> </view>
<view class="name"> <view class="name">
{{ item.customerName }} {{ item.customerName || '未填写姓名' }}
</view> </view>
<view class="goods-name">{{ item.carType }}</view> <view class="goods-name">{{ item.carType || '未填写车型' }}</view>
<template> <template>
<view v-for="(k, ind) in itemObject" class="info flex" :key="ind"> <view v-for="(k, ind) in itemObject" class="info flex" :key="ind">
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
...@@ -299,18 +299,19 @@ export default { ...@@ -299,18 +299,19 @@ export default {
// endTime: '' }] // endTime: '' }]
}, },
formatRecordList(list) { formatRecordList(list) {
return list.map(record => { list.forEach(record => {
return { // return {
result: record.result, // result: record.result,
customerPhone: record.customerPhone, // customerPhone: record.customerPhone,
customerType: record.customerType, // customerType: record.customerType,
customerName: record.customerName || '未填写姓名', // customerName: record.customerName || '未填写姓名',
carType: record.carType || '未选择车型', // carType: record.carType || '未选择车型',
duration: this.formatSeconds(new Date(record.endTime).getTime() - new Date(record.startTime).getTime()), record.duration=this.formatSeconds(new Date(record.endTime).getTime() - new Date(record.startTime).getTime())
startTime: record.startTime, // startTime: record.startTime,
endTime: record.endTime // endTime: record.endTime
} // }
}) })
return list
}, },
getRecordFail () { getRecordFail () {
this.getRecordNum() this.getRecordNum()
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<view class="btn cancel" @click="$emit('cancel')">取消</view> <view class="btn cancel" @click="$emit('cancel')">取消</view>
<view class="btn submit" @click="handleSave">保存提交</view> <view class="btn submit" @click="handleSave">保存提交</view>
</view> </view>
<ResultSelect ref="receptionStatusVisible" :value="customerInfo.status" @change="selectReception" maskBackgroundColor="rgba(0,0,0,0)" /> <ResultSelect ref="receptionStatusVisible" :value="customerInfo.result" @change="selectReception" maskBackgroundColor="rgba(0,0,0,0)" />
</view> </view>
</template> </template>
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
}, },
{ {
label: "接待结果", label: "接待结果",
key: "status", key: "result",
type: "select", type: "select",
popKey: "receptionStatusVisible", popKey: "receptionStatusVisible",
placeholder: '请选择', placeholder: '请选择',
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
}, },
methods: { methods: {
selectReception(value) { selectReception(value) {
this.customerInfo.status = value this.customerInfo.result = value
this.$refs.receptionStatusVisible.close() this.$refs.receptionStatusVisible.close()
this.resetFocusIndex() this.resetFocusIndex()
}, },
......
...@@ -376,7 +376,7 @@ export default { ...@@ -376,7 +376,7 @@ export default {
_tryDecrypt(str, label) { _tryDecrypt(str, label) {
try { try {
if (str && (str.includes('=') || str.length > 50)) { if (str && (str.includes('=') || str.length > 50)) {
const decrypted = decryptAES(str) let decrypted = decryptAES(str)
if (decrypted) { if (decrypted) {
if (label == 'Region' && decrypted.includes('.')) { if (label == 'Region' && decrypted.includes('.')) {
decrypted = decrypted.split('.')[0] decrypted = decrypted.split('.')[0]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!