002201 2 anni fa
parent
commit
2721db695d

+ 5 - 5
src/views/purchase/apply/add/column.js

@@ -26,7 +26,7 @@ export const FormColumns = [
     require: true,
   },
   {
-    key: "supplierCode",
+    key: "supplier",
     title: "供应商编码",
     inputType: "Input",
     disabled: true,
@@ -46,7 +46,7 @@ export const FormColumns = [
     require: true,
   },
   {
-    key: "puOrgCode",
+    key: "puOrg",
     title: "采购组织编码",
     inputType: "Input",
     disabled: true,
@@ -65,7 +65,7 @@ export const FormColumns = [
     require: true,
   },
   {
-    key: "currencyCode",
+    key: "currency",
     title: "币种编码",
     inputType: "Input",
     disabled: true,
@@ -108,7 +108,7 @@ export const FormColumns = [
     require: true,
   },
   {
-    key: "puDeptCode",
+    key: "puDept",
     title: "采购部门编码",
     inputType: "Input",
     disabled: true,
@@ -411,7 +411,7 @@ export const TabColumns = [
           orgName: "name",
         },
       },
-      { title: "组织编码", key: "orgCode" },
+      { title: "组织编码", key: "org" },
       // { title: "组织ID", key: "org" },
       {
         title: "创建人名称",

+ 25 - 23
src/views/purchase/apply/delete/index.vue

@@ -11,30 +11,32 @@ export default {
   methods: {
     //
     open(prop) {
-      return this.$confirm("是否删除数据项?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "info",
-      })
-        .then(async () => {
-          try {
-            // try
-            const ids = prop.map((item) => item.id).join(",");
-            const { msg, code } = await REMOVE(ids);
-            if (code === 200) {
-              this.$emit("success");
-              this.$notify.success(msg);
-            }
-          } catch (err) {
-            // catch
-            console.error(err);
-          } finally {
-            // finally
-          }
+      return new Promise((resolve, reject) => {
+        this.$confirm("是否删除数据项?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info",
         })
-        .catch((err) => {
-          console.error(err);
-        });
+          .then(async () => {
+            try {
+              // try
+              const ids = prop.map((item) => item.id).join(",");
+              const { msg, code } = await REMOVE(ids);
+              if (code === 200) {
+                resolve(true);
+                this.$emit("success");
+                this.$notify.success(msg);
+              }
+            } catch (err) {
+              // catch
+              reject(false);
+              console.error(err);
+            } finally {
+              // finally
+            }
+          })
+          .catch(() => reject(false));
+      });
     },
   },
   created() {},

+ 0 - 1
src/views/purchase/apply/see/index.vue

@@ -2,7 +2,6 @@
 import Column from "../add/column";
 import useData from "../hooks/data";
 import useDicts from "../hooks/dicts";
-import useMethods from "../hooks/function";
 import { ITEM } from "@/api/business/purchase/apply";
 
 export default {

+ 25 - 23
src/views/purchase/apply/submit/index.vue

@@ -11,30 +11,32 @@ export default {
   methods: {
     //
     open(prop) {
-      return this.$confirm("是否提交审核数据项?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "info",
-      })
-        .then(async () => {
-          try {
-            // try
-            const ids = prop.map((item) => item.id).join(",");
-            const { msg, code } = await SUBMIT(ids);
-            if (code === 200) {
-              this.$emit("success");
-              this.$notify.success(msg);
-            }
-          } catch (err) {
-            // catch
-            console.error(err);
-          } finally {
-            // finally
-          }
+      return new Promise((resolve, reject) => {
+        this.$confirm("是否提交审核数据项?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info",
         })
-        .catch((err) => {
-          console.error(err);
-        });
+          .then(async () => {
+            try {
+              // try
+              const ids = prop.map((item) => item.id).join(",");
+              const { msg, code } = await SUBMIT(ids);
+              if (code === 200) {
+                resolve(true);
+                this.$emit("success");
+                this.$notify.success(msg);
+              }
+            } catch (err) {
+              // catch
+              reject(false);
+              console.error(err);
+            } finally {
+              // finally
+            }
+          })
+          .catch(() => reject(false));
+      });
     },
   },
   created() {},