Commit 2660af3f by liimin

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

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