|
|
@@ -46,14 +46,15 @@
|
|
|
<text class="summary-unit">支</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="card-foot">
|
|
|
- <text class="time">{{ item.time }}</text>
|
|
|
- <view class="btns">
|
|
|
- <view class="btn-audit" v-if="item.status > 0" @click.stop="showAuditHistory(item)">审核记录</view>
|
|
|
- <view class="btn-cancel" v-if="item.status === 0" @click.stop="onCancel(item)">撤销</view>
|
|
|
- <view class="btn-view primary" @click.stop="goDetail(item)">订单详情</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="card-foot">
|
|
|
+ <text class="time">{{ item.time }}</text>
|
|
|
+ <view class="btns">
|
|
|
+ <view class="btn-audit" v-if="item.status > 0" @click.stop="showAuditHistory(item)">审核记录
|
|
|
+ </view>
|
|
|
+ <view class="btn-cancel" v-if="item.status === 0" @click.stop="onCancel(item)">撤销</view>
|
|
|
+ <view class="btn-view primary" @click.stop="goDetail(item)">订单详情</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 加载提示区 -->
|
|
|
@@ -93,7 +94,8 @@
|
|
|
<view class="audit-dot" :class="item.auditResult === 1 ? 'pass' : 'reject'"></view>
|
|
|
<view class="audit-content">
|
|
|
<view class="audit-row">
|
|
|
- <text class="audit-result" :class="item.auditResult === 1 ? 'pass' : 'reject'">{{ item.auditResult === 1 ? '通过' : '驳回' }}</text>
|
|
|
+ <text class="audit-result" :class="item.auditResult === 1 ? 'pass' : 'reject'">{{
|
|
|
+ item.auditResult === 1 ? '通过' : '驳回' }}</text>
|
|
|
<text class="audit-auditor">{{ item.auditorName || '未知' }}</text>
|
|
|
</view>
|
|
|
<text class="audit-reason" v-if="item.rejectReason">驳回理由:{{ item.rejectReason }}</text>
|
|
|
@@ -165,17 +167,17 @@ export default {
|
|
|
}
|
|
|
const res = await listOrder(params);
|
|
|
const rows = res.rows || [];
|
|
|
-
|
|
|
+
|
|
|
const formattedRows = rows.map(item => {
|
|
|
// 状态展示映射(与 ErpOrderStatus 枚举对齐)
|
|
|
- const statusMap = {
|
|
|
- '-1': { name: '已撤销', type: 'cancelled' },
|
|
|
- 0: { name: '待审核', type: 'pending' },
|
|
|
- 1: { name: '已驳回', type: 'expired' },
|
|
|
- 2: { name: '待签批', type: 'process' },
|
|
|
- 3: { name: '生产中', type: 'making' },
|
|
|
- 4: { name: '已完成', type: 'finish' }
|
|
|
- };
|
|
|
+ const statusMap = {
|
|
|
+ '-1': { name: '已撤销', type: 'cancelled' },
|
|
|
+ 0: { name: '待审核', type: 'pending' },
|
|
|
+ 1: { name: '已驳回', type: 'expired' },
|
|
|
+ 2: { name: '待签批', type: 'process' },
|
|
|
+ 3: { name: '生产中', type: 'making' },
|
|
|
+ 4: { name: '已完成', type: 'finish' }
|
|
|
+ };
|
|
|
const s = statusMap[item.status] || { name: '未知', type: 'expired' };
|
|
|
|
|
|
return {
|
|
|
@@ -199,6 +201,7 @@ export default {
|
|
|
this.noMore = this.displayList.length >= (res.total || 0);
|
|
|
} catch (e) {
|
|
|
console.error('加载订单列表失败', e);
|
|
|
+ uni.showToast({ title: e || '加载订单列表失败', icon: 'none' });
|
|
|
} finally {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
@@ -218,7 +221,7 @@ export default {
|
|
|
this.refresh();
|
|
|
} catch (e) {
|
|
|
uni.hideLoading();
|
|
|
- uni.showToast({ title: '撤销失败', icon: 'none' });
|
|
|
+ uni.showToast({ title: e || '撤销失败', icon: 'none' });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -230,6 +233,7 @@ export default {
|
|
|
const res = await getAuditHistory(item.rowId);
|
|
|
this.auditHistoryList = res.data || [];
|
|
|
} catch (e) {
|
|
|
+ uni.showToast({ title: e || '加载审核记录失败', icon: 'none' });
|
|
|
this.auditHistoryList = [];
|
|
|
} finally {
|
|
|
uni.hideLoading();
|