|
@@ -516,17 +516,19 @@ const config = computed(() => {
|
|
|
},
|
|
|
}
|
|
|
: {},
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "作废",
|
|
|
- type: "primary",
|
|
|
- text: true,
|
|
|
- },
|
|
|
- el: "button",
|
|
|
- click() {
|
|
|
- handleEdit(row, 88);
|
|
|
- },
|
|
|
- },
|
|
|
+ row.purchaseStatus != 88
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "作废",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ handleEditOne(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "终止",
|
|
@@ -680,6 +682,25 @@ const handleEdit = (row, status) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const handleEditOne = (row) => {
|
|
|
+ const data = { id: row.id, purchaseStatus: 88 };
|
|
|
+ // 弹窗提示是否删除
|
|
|
+ ElMessageBox.confirm(`此操作将作废该数据, 是否继续?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ // 删除
|
|
|
+ proxy.post("/sale/purchase/cancellation", data).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: `作废成功`,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
const supplierData = ref([]);
|
|
|
const productUnit = ref([]);
|
|
|
const getDict = async (req) => {
|