fix: 修复详情页消审显示并跳转编辑
This commit is contained in:
@@ -18,6 +18,13 @@ export const AUDIT_STATUS = {
|
||||
export const DRAFT_AUDIT_STATUS = 0;
|
||||
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
|
||||
|
||||
/** 将接口状态统一为数字,避免字符串导致按钮判断失效 */
|
||||
export function toAuditStatus(status) {
|
||||
const n = Number(status);
|
||||
return Number.isFinite(n) ? n : DRAFT_AUDIT_STATUS;
|
||||
}
|
||||
|
||||
|
||||
export const AUDIT_STATUS_MAP = {
|
||||
1: '待审核',
|
||||
2: '已审核',
|
||||
@@ -117,8 +124,8 @@ export function normalizeOrder(order) {
|
||||
return {
|
||||
id: order.id,
|
||||
order_no: order.order_no || '',
|
||||
audit_status: order.audit_status,
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
|
||||
audit_status: toAuditStatus(order.audit_status),
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[toAuditStatus(order.audit_status)] || '',
|
||||
// 表头
|
||||
sale_system_id: order.sale_system_id || '',
|
||||
sale_system_name: order.sale_system_name || '',
|
||||
@@ -470,11 +477,13 @@ export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
|
||||
}
|
||||
|
||||
export function canScanAtStatus(status) {
|
||||
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED;
|
||||
}
|
||||
|
||||
export function isLockedOrderStatus(status) {
|
||||
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.APPROVED || s === AUDIT_STATUS.VOIDED;
|
||||
}
|
||||
|
||||
/** 分页拉取全部列表(直至末页) */
|
||||
@@ -491,7 +500,12 @@ export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE
|
||||
|
||||
/** 新增/编辑页底部:审核、作废 */
|
||||
export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
|
||||
if (!headerSaved || !orderId) return [];
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
if (!canScanAtStatus(s)) return [];
|
||||
return [
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
@@ -500,14 +514,15 @@ export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
|
||||
/** 查看页底部:编辑、审核、作废 / 消审 */
|
||||
export function getViewStatusActionButtons(status) {
|
||||
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED) {
|
||||
return [
|
||||
{ label: '编辑', action: 'edit' },
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
];
|
||||
}
|
||||
if (status === AUDIT_STATUS.APPROVED) {
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
return [];
|
||||
|
||||
@@ -15,6 +15,13 @@ export const AUDIT_STATUS = {
|
||||
export const DRAFT_AUDIT_STATUS = 0;
|
||||
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
|
||||
|
||||
/** 将接口状态统一为数字,避免字符串导致按钮判断失效 */
|
||||
export function toAuditStatus(status) {
|
||||
const n = Number(status);
|
||||
return Number.isFinite(n) ? n : DRAFT_AUDIT_STATUS;
|
||||
}
|
||||
|
||||
|
||||
export const AUDIT_STATUS_MAP = {
|
||||
1: '待审核',
|
||||
2: '已审核',
|
||||
@@ -98,8 +105,8 @@ export function normalizeOrder(order) {
|
||||
return {
|
||||
id: order.id,
|
||||
order_no: order.order_no || '',
|
||||
audit_status: order.audit_status,
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
|
||||
audit_status: toAuditStatus(order.audit_status),
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[toAuditStatus(order.audit_status)] || '',
|
||||
process_unit_id: order.process_unit_id || '',
|
||||
process_name: order.process_name || '',
|
||||
warehouse_id: order.warehouse_id || '',
|
||||
@@ -333,11 +340,13 @@ export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
|
||||
}
|
||||
|
||||
export function canScanAtStatus(status) {
|
||||
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED;
|
||||
}
|
||||
|
||||
export function isLockedOrderStatus(status) {
|
||||
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.APPROVED || s === AUDIT_STATUS.VOIDED;
|
||||
}
|
||||
|
||||
export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE) {
|
||||
@@ -372,7 +381,12 @@ export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE
|
||||
}
|
||||
|
||||
export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
|
||||
if (!headerSaved || !orderId) return [];
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
if (!canScanAtStatus(s)) return [];
|
||||
return [
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
@@ -380,14 +394,15 @@ export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
}
|
||||
|
||||
export function getViewStatusActionButtons(status) {
|
||||
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED) {
|
||||
return [
|
||||
{ label: '编辑', action: 'edit' },
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
];
|
||||
}
|
||||
if (status === AUDIT_STATUS.APPROVED) {
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
return [];
|
||||
|
||||
@@ -15,6 +15,13 @@ export const AUDIT_STATUS = {
|
||||
export const DRAFT_AUDIT_STATUS = 0;
|
||||
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
|
||||
|
||||
/** 将接口状态统一为数字,避免字符串导致按钮判断失效 */
|
||||
export function toAuditStatus(status) {
|
||||
const n = Number(status);
|
||||
return Number.isFinite(n) ? n : DRAFT_AUDIT_STATUS;
|
||||
}
|
||||
|
||||
|
||||
export const AUDIT_STATUS_MAP = {
|
||||
1: '待审核',
|
||||
2: '已审核',
|
||||
@@ -78,8 +85,8 @@ export function normalizeOrder(order) {
|
||||
return {
|
||||
id: order.id,
|
||||
order_no: order.order_no || '',
|
||||
audit_status: order.audit_status,
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
|
||||
audit_status: toAuditStatus(order.audit_status),
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[toAuditStatus(order.audit_status)] || '',
|
||||
process_unit_id: order.process_unit_id || '',
|
||||
process_name: order.process_name || '',
|
||||
warehouse_id: order.warehouse_id || '',
|
||||
@@ -275,11 +282,13 @@ export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
|
||||
}
|
||||
|
||||
export function canScanAtStatus(status) {
|
||||
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED;
|
||||
}
|
||||
|
||||
export function isLockedOrderStatus(status) {
|
||||
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.APPROVED || s === AUDIT_STATUS.VOIDED;
|
||||
}
|
||||
|
||||
export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE) {
|
||||
@@ -314,7 +323,12 @@ export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE
|
||||
}
|
||||
|
||||
export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
|
||||
if (!headerSaved || !orderId) return [];
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
if (!canScanAtStatus(s)) return [];
|
||||
return [
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
@@ -322,14 +336,15 @@ export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
}
|
||||
|
||||
export function getViewStatusActionButtons(status) {
|
||||
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED) {
|
||||
return [
|
||||
{ label: '编辑', action: 'edit' },
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
];
|
||||
}
|
||||
if (status === AUDIT_STATUS.APPROVED) {
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
return [];
|
||||
|
||||
@@ -15,6 +15,13 @@ export const AUDIT_STATUS = {
|
||||
export const DRAFT_AUDIT_STATUS = 0;
|
||||
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
|
||||
|
||||
/** 将接口状态统一为数字,避免字符串导致按钮判断失效 */
|
||||
export function toAuditStatus(status) {
|
||||
const n = Number(status);
|
||||
return Number.isFinite(n) ? n : DRAFT_AUDIT_STATUS;
|
||||
}
|
||||
|
||||
|
||||
export const AUDIT_STATUS_MAP = {
|
||||
1: '待审核',
|
||||
2: '已审核',
|
||||
@@ -74,8 +81,8 @@ export function normalizeOrder(order) {
|
||||
return {
|
||||
id: order.id,
|
||||
order_no: order.order_no || '',
|
||||
audit_status: order.audit_status,
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
|
||||
audit_status: toAuditStatus(order.audit_status),
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[toAuditStatus(order.audit_status)] || '',
|
||||
process_unit_id: order.process_unit_id || order.biz_unit_id || '',
|
||||
process_name: order.process_name || order.biz_unit_name || '',
|
||||
warehouse_id: order.warehouse_id || '',
|
||||
@@ -271,11 +278,13 @@ export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
|
||||
}
|
||||
|
||||
export function canScanAtStatus(status) {
|
||||
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED;
|
||||
}
|
||||
|
||||
export function isLockedOrderStatus(status) {
|
||||
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.APPROVED || s === AUDIT_STATUS.VOIDED;
|
||||
}
|
||||
|
||||
export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE) {
|
||||
@@ -310,7 +319,12 @@ export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE
|
||||
}
|
||||
|
||||
export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
|
||||
if (!headerSaved || !orderId) return [];
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
if (!canScanAtStatus(s)) return [];
|
||||
return [
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
@@ -318,14 +332,15 @@ export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
}
|
||||
|
||||
export function getViewStatusActionButtons(status) {
|
||||
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED) {
|
||||
return [
|
||||
{ label: '编辑', action: 'edit' },
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
];
|
||||
}
|
||||
if (status === AUDIT_STATUS.APPROVED) {
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
return [];
|
||||
|
||||
@@ -15,6 +15,13 @@ export const AUDIT_STATUS = {
|
||||
export const DRAFT_AUDIT_STATUS = 0;
|
||||
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
|
||||
|
||||
/** 将接口状态统一为数字,避免字符串导致按钮判断失效 */
|
||||
export function toAuditStatus(status) {
|
||||
const n = Number(status);
|
||||
return Number.isFinite(n) ? n : DRAFT_AUDIT_STATUS;
|
||||
}
|
||||
|
||||
|
||||
export const AUDIT_STATUS_MAP = {
|
||||
1: '待审核',
|
||||
2: '已审核',
|
||||
@@ -111,8 +118,8 @@ export function normalizeOrder(order) {
|
||||
return {
|
||||
id: order.id,
|
||||
order_no: order.order_no || '',
|
||||
audit_status: order.audit_status,
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
|
||||
audit_status: toAuditStatus(order.audit_status),
|
||||
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[toAuditStatus(order.audit_status)] || '',
|
||||
biz_unit_id: order.biz_unit_id || '',
|
||||
biz_unit_name: order.biz_unit_name || '',
|
||||
warehouse_id: order.warehouse_id || '',
|
||||
@@ -349,11 +356,13 @@ export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
|
||||
}
|
||||
|
||||
export function canScanAtStatus(status) {
|
||||
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED;
|
||||
}
|
||||
|
||||
export function isLockedOrderStatus(status) {
|
||||
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
|
||||
const s = toAuditStatus(status);
|
||||
return s === AUDIT_STATUS.APPROVED || s === AUDIT_STATUS.VOIDED;
|
||||
}
|
||||
|
||||
export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE) {
|
||||
@@ -388,7 +397,12 @@ export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE
|
||||
}
|
||||
|
||||
export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
|
||||
if (!headerSaved || !orderId) return [];
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
if (!canScanAtStatus(s)) return [];
|
||||
return [
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
@@ -396,14 +410,15 @@ export function getFormStatusActionButtons(headerSaved, orderId, status) {
|
||||
}
|
||||
|
||||
export function getViewStatusActionButtons(status) {
|
||||
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
|
||||
const s = toAuditStatus(status);
|
||||
if (s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED) {
|
||||
return [
|
||||
{ label: '编辑', action: 'edit' },
|
||||
{ label: '审核', action: 'approve' },
|
||||
{ label: '作废', action: 'void' },
|
||||
];
|
||||
}
|
||||
if (status === AUDIT_STATUS.APPROVED) {
|
||||
if (s === AUDIT_STATUS.APPROVED) {
|
||||
return [{ label: '消审', action: 'unapprove' }];
|
||||
}
|
||||
return [];
|
||||
|
||||
@@ -122,15 +122,21 @@ export default {
|
||||
confirmOrderStatusAction(this, {
|
||||
orderId: this.orderId,
|
||||
action,
|
||||
onSuccess: () => this.$u.api.gfmOtherDeliveryOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
}),
|
||||
onSuccess: () => {
|
||||
uni.hideLoading();
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
if (action === 'unapprove') {
|
||||
uni.redirectTo({ url: `./storeFabricBusinessOutEdit?id=${this.orderId}` });
|
||||
return;
|
||||
}
|
||||
return this.$u.api.gfmOtherDeliveryOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
showError(message) {
|
||||
|
||||
@@ -121,15 +121,21 @@ export default {
|
||||
confirmOrderStatusAction(this, {
|
||||
orderId: this.orderId,
|
||||
action,
|
||||
onSuccess: () => this.$u.api.fpmProcessInOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
}),
|
||||
onSuccess: () => {
|
||||
uni.hideLoading();
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
if (action === 'unapprove') {
|
||||
uni.redirectTo({ url: `./storeGoodsProcessInEdit?id=${this.orderId}` });
|
||||
return;
|
||||
}
|
||||
return this.$u.api.fpmProcessInOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
showError(message) {
|
||||
|
||||
@@ -106,15 +106,21 @@ export default {
|
||||
confirmOrderStatusAction(this, {
|
||||
orderId: this.orderId,
|
||||
action,
|
||||
onSuccess: () => this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
}),
|
||||
onSuccess: () => {
|
||||
uni.hideLoading();
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
if (action === 'unapprove') {
|
||||
uni.redirectTo({ url: `./storeGoodsProcessOutEdit?id=${this.orderId}` });
|
||||
return;
|
||||
}
|
||||
return this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
showError(message) {
|
||||
|
||||
@@ -106,15 +106,21 @@ export default {
|
||||
confirmOrderStatusAction(this, {
|
||||
orderId: this.orderId,
|
||||
action,
|
||||
onSuccess: () => this.$u.api.fpmProcessReturnInOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
}),
|
||||
onSuccess: () => {
|
||||
uni.hideLoading();
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
if (action === 'unapprove') {
|
||||
uni.redirectTo({ url: `./storeGoodsProcessReturnInEdit?id=${this.orderId}` });
|
||||
return;
|
||||
}
|
||||
return this.$u.api.fpmProcessReturnInOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
showError(message) {
|
||||
|
||||
@@ -121,15 +121,21 @@ export default {
|
||||
confirmOrderStatusAction(this, {
|
||||
orderId: this.orderId,
|
||||
action,
|
||||
onSuccess: () => this.$u.api.fpmPrcInOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
}),
|
||||
onSuccess: () => {
|
||||
uni.hideLoading();
|
||||
const voice = util.statusSuccessVoice(action);
|
||||
util.playSuccessAudio(voice);
|
||||
uni.showToast({ title: voice, icon: 'success' });
|
||||
if (action === 'unapprove') {
|
||||
uni.redirectTo({ url: `./storeGoodsPurchaseInEdit?id=${this.orderId}` });
|
||||
return;
|
||||
}
|
||||
return this.$u.api.fpmPrcInOrder.detail({ id: this.orderId })
|
||||
.then((res) => {
|
||||
const order = normalizeOrder(res);
|
||||
if (order) this.order = order;
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
showError(message) {
|
||||
|
||||
Reference in New Issue
Block a user