| | |
| | | import { reactive, ref, toRefs, computed, getCurrentInstance, nextTick, onMounted } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import FormDia from "./components/formDia.vue"; |
| | | import { returnManagementList, returnManagementDel } from "@/api/salesManagement/returnOrder.js"; |
| | | import { returnManagementList, returnManagementDel, returnManagementHandle } from "@/api/salesManagement/returnOrder.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const formDia = ref(); |
| | |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | returnManagementDel({ ids: String(row.id) }).then(() => { |
| | | returnManagementDel({ ids: [row.id] }).then(() => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getList(); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | const handleRowHandle = (row) => { |
| | | if (!row?.id) return; |
| | | ElMessageBox.confirm("是否处理该退货单?处理后将无法修改", "处理提示", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | returnManagementHandle({ returnManagementId: String(row.id) }).then(() => { |
| | | proxy.$modal.msgSuccess("处理成功"); |
| | | getList(); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | |
| | | { label: "销售单号", prop: "salesContractNo", minWidth: 160 }, |
| | | { label: "业务员", prop: "salesman", minWidth: 120 }, |
| | | { label: "关联出库单号", prop: "shippingNo", minWidth: 170 }, |
| | | { label: "项目名称", prop: "projectName", minWidth: 180 }, |
| | | { label: "项目阶段", prop: "projectStage", minWidth: 120 }, |
| | | { label: "制单人", prop: "maker", minWidth: 120 }, |
| | | { label: "结算人", prop: "settler", minWidth: 120 }, |
| | | { |
| | |
| | | dataType: "action", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 140, |
| | | width: 160, |
| | | operation: [ |
| | | { name: "编辑", type: "text", clickFun: (row) => openForm("edit", row) }, |
| | | { name: "删除", type: "text", clickFun: (row) => handleRowDelete(row) }, |
| | | { name: "编辑", disabled: (row) => row.status !== 0, type: "text", clickFun: (row) => openForm("edit", row) }, |
| | | { name: "处理", disabled: (row) => row.status !== 0, type: "text", clickFun: (row) => handleRowHandle(row) }, |
| | | { name: "删除", disabled: (row) => row.status !== 0, type: "text", clickFun: (row) => handleRowDelete(row) }, |
| | | ], |
| | | }, |
| | | ]; |
| | |
| | | return; |
| | | } |
| | | ids = selectedRows.value.map(i => i.id); |
| | | console.log(ids); |
| | | ElMessageBox.confirm("选中的内容将被删除,是否确认删除?", "删除提示", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | returnManagementDel({ ids: ids.join(",") }).then(() => { |
| | | returnManagementDel( ids ).then(() => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getList(); |
| | | }); |