Prechádzať zdrojové kódy

采购订单删删除、以及其他参照

002390 2 rokov pred
rodič
commit
03942f8cae

+ 9 - 0
src/api/business/purchase/purchase-order.js

@@ -36,11 +36,20 @@ const edit = (data) => {
   });
 }
 
+// 采购订单删除
+const remove = (data) => {
+  return request({
+    url: `/pu/order/${data}`,
+    method: "delete",
+  });
+}
+
 
 export default {
   list,
   details,
   create,
   edit,
+  remove,
 
 }

+ 8 - 8
src/views/input-dialog/components/PROCESSTYPE_PARAM.js

@@ -1,20 +1,20 @@
 // 处理方式
 export default [
-  {
-    key: "id",
-    title: "处理方式ID",
-    type: "Input",
-    search: true,
-  },
+  // {
+  //   key: "id",
+  //   title: "ID",
+  //   type: "Input",
+  //   search: true,
+  // },
   {
     key: "code",
-    title: "处理方式编码",
+    title: "编码",
     type: "Input",
     search: true,
   },
   {
     key: "name",
-    title: "处理方式名称",
+    title: "处理方式",
     type: "Input",
     search: true,
   },

+ 8 - 2
src/views/input-dialog/components/WAREHOUSE_PARAM.js

@@ -1,13 +1,19 @@
 // 收货仓库
 export default [
   {
-    key: "warehouse",
+    key: "id",
     title: "仓库ID",
     type: "Input",
     search: true,
   },
   {
-    key: "warehouse_name",
+    key: "code",
+    title: "仓库编码",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "name",
     title: "仓库名称",
     type: "Input",
     search: true,

+ 2 - 2
src/views/purchase/purchase-order/add/index.vue

@@ -86,7 +86,7 @@ export default {
       } finally {
         // this.setVisible(false);
       }
-
+ 
 
 
     },
@@ -97,7 +97,7 @@ export default {
         const createByName = this.params.buyerName;
         const updateById = this.$store.state.user.id;
         const updateByName = this.$store.state.user.name;
-        const { code, msg } = await add({
+        const { code, msg } = await orderApi.create({
           createById,
           createByName,
           updateById,

+ 7 - 7
src/views/purchase/purchase-order/index.vue

@@ -252,13 +252,13 @@ export default {
         this.loading = true;
         const { id } = prop;
         console.log(id, 'id');
-        // const { code, msg } = await remove(id);
-        // if (code === 200) {
-        //   this.$notify.success({ title: msg });
-        //   this.fetchList(this.params, this.page);
-        // } else {
-        //   this.$notify.warning({ title: msg });
-        // }
+        const { code, msg } = await orderApi.remove(id);
+        if (code === 200) {
+          this.$notify.success({ title: msg });
+          this.fetchList(this.params, this.page);
+        } else {
+          this.$notify.warning({ title: msg });
+        }
       } catch (err) {
         this.$notify.error({ title: "error", message: err });
       } finally {