feat(crm): 新增订单操作记录、异议和收款组件

refactor(crm): 重构订单操作使用actions统一处理
style(crm): 清理无用代码和注释
fix(crm): 修复订单记录排序问题
This commit is contained in:
砂糖
2025-12-26 14:45:11 +08:00
parent 2033d39243
commit 96b6e844d9
12 changed files with 1190 additions and 48 deletions

View File

@@ -168,6 +168,7 @@ import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/crm/
import { listCustomer } from "@/api/crm/customer";
import OrderDetailList from '@/views/crm/components/OrderDetail.vue'
import { ORDER_TYPE } from "../js/enum";
import { ORDER_ACTIONS, actions } from "../js/actions";
export default {
name: "Order",
@@ -259,7 +260,7 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(() => {
updateOrder({
actions[ORDER_ACTIONS.approvePreOrder].handler({
...row,
orderType: ORDER_TYPE['正式订单'],
}).then(response => {
@@ -335,7 +336,7 @@ export default {
if (valid) {
this.buttonLoading = true;
if (this.form.orderId != null) {
updateOrder(this.form).then(response => {
actions[ORDER_ACTIONS.updatePreOrder].handler(this.form).then(() => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
@@ -343,7 +344,7 @@ export default {
this.buttonLoading = false;
});
} else {
addOrder(this.form).then(response => {
actions[ORDER_ACTIONS.createPreOrder].handler(this.form).then(() => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();