002201 2 年之前
父节点
当前提交
b08bef4ec5
共有 31 个文件被更改,包括 89 次插入76 次删除
  1. 9 0
      src/api/business/purchase/task.js
  2. 1 1
      src/components/popover-select/components/index.vue
  3. 5 7
      src/components/popover-select/index.vue
  4. 1 1
      src/components/popover-tree-select/components/index.vue
  5. 5 10
      src/components/popover-tree-select/index.vue
  6. 6 3
      src/utils/request.js
  7. 2 2
      src/views/purchase/apply/add/index.vue
  8. 3 3
      src/views/purchase/apply/edit/index.vue
  9. 2 2
      src/views/purchase/apply/index.vue
  10. 2 2
      src/views/purchase/apply/see/index.vue
  11. 2 2
      src/views/purchase/catalogue/add/index.vue
  12. 3 3
      src/views/purchase/catalogue/edit/index.vue
  13. 2 2
      src/views/purchase/catalogue/index.vue
  14. 2 2
      src/views/purchase/catalogue/see/index.vue
  15. 2 2
      src/views/purchase/contract/add/index.vue
  16. 3 3
      src/views/purchase/contract/edit/index.vue
  17. 2 2
      src/views/purchase/contract/index.vue
  18. 2 2
      src/views/purchase/contract/see/index.vue
  19. 1 1
      src/views/purchase/purchase-content/index.vue
  20. 1 1
      src/views/purchase/purchase-content/see-purchase-task.vue
  21. 2 2
      src/views/purchase/purchase-order/add/index.vue
  22. 2 2
      src/views/purchase/purchase-order/edit/index.vue
  23. 3 3
      src/views/purchase/purchase-order/index.vue
  24. 1 1
      src/views/purchase/purchase-order/see/index.vue
  25. 1 1
      src/views/purchase/task/column.js
  26. 1 1
      src/views/purchase/task/documents-return/index.vue
  27. 2 2
      src/views/purchase/task/first-direct/index.vue
  28. 17 9
      src/views/purchase/task/index.vue
  29. 1 1
      src/views/purchase/task/modify-buyer/index.vue
  30. 1 1
      src/views/purchase/task/see/index.vue
  31. 2 2
      vue.config.js

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

@@ -55,3 +55,12 @@ export function MODEIFYBUYER(data) {
     data: data,
   });
 }
+
+export function EXPORT(data, params) {
+  return request({
+    url: "/pu/order/generate/export",
+    method: "POST",
+    data: data,
+    params: params,
+  });
+}

+ 1 - 1
src/components/popover-select/components/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 5 - 7
src/components/popover-select/index.vue

@@ -80,12 +80,8 @@ export default {
   watch: {
     "$props.value": {
       handler: function (newProp, oldProp) {
-        if (newProp) {
-          const { multiple } = this.$props;
-          this.showValue = multiple ? "" : newProp;
-        } else {
+        if (!newProp) {
           this.data = [];
-          this.showValue = "";
         }
       },
       immediate: true,
@@ -162,7 +158,6 @@ export default {
       </template>
     </el-input>
     <div
-      v-if="multiple && data.length"
       style="
         position: absolute;
         left: 10px;
@@ -172,7 +167,10 @@ export default {
         overflow: hidden;
       "
     >
-      <div style="width: 150px; display: flex">
+      <el-tag v-if="!multiple && data.length" :size="size">
+        {{ data[0].name }}
+      </el-tag>
+      <div v-if="multiple && data.length">
         <el-popover
           :offset="-10"
           :width="width"

+ 1 - 1
src/components/popover-tree-select/components/index.vue

@@ -60,7 +60,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 5 - 10
src/components/popover-tree-select/index.vue

@@ -69,8 +69,6 @@ export default {
     return {
       // popover宽度
       width: "",
-      // 显示value
-      showValue: "",
       // 选中data
       data: [],
     };
@@ -79,12 +77,8 @@ export default {
   watch: {
     "$props.value": {
       handler: function (newProp, oldProp) {
-        if (newProp) {
-          const { multiple } = this.$props;
-          this.showValue = multiple ? "" : newProp;
-        } else {
+        if (!newProp) {
           this.data = [];
-          this.showValue = "";
         }
       },
       immediate: true,
@@ -146,7 +140,6 @@ export default {
 <template>
   <div ref="PopoverSelect" style="position: relative">
     <el-input
-      v-model="showValue"
       :size="size"
       :disabled="disabled"
       :clearable="clearable"
@@ -160,7 +153,6 @@ export default {
       </template>
     </el-input>
     <div
-      v-if="multiple && data.length"
       style="
         position: absolute;
         left: 10px;
@@ -170,7 +162,10 @@ export default {
         overflow: hidden;
       "
     >
-      <div style="width: 150px; display: flex">
+      <el-tag v-if="!multiple && data.length" :size="size">
+        {{ data[0].name }}
+      </el-tag>
+      <div v-if="multiple && data.length">
         <el-popover
           :offset="-10"
           :width="width"

+ 6 - 3
src/utils/request.js

@@ -86,6 +86,7 @@ service.interceptors.request.use(
 // 响应拦截器
 service.interceptors.response.use(
   (res) => {
+    console.log("res", res);
     // 未设置状态码则默认成功状态
     const code = res.data.code || 200;
     // 获取错误信息
@@ -121,10 +122,12 @@ service.interceptors.response.use(
       }
       return Promise.reject("无效的会话,或者会话已过期,请重新登录。");
     } else if (code === 500) {
-      Message({ message: msg, type: "error" });
+      Notification.error({ title: "error", message: msg });
+      // Message({ message: msg, type: "error" });
       return Promise.reject(new Error(msg));
     } else if (code === 601) {
-      Message({ message: msg, type: "warning" });
+      Notification.warning({ title: "error", message: msg });
+      // Message({ message: msg, type: "warning" });
       return Promise.reject("error");
     } else if (code !== 200) {
       Notification.error({ title: msg });
@@ -153,7 +156,7 @@ export function download(url, params, filename, config) {
   downloadLoadingInstance = Loading.service({
     text: "正在下载数据,请稍候",
     spinner: "el-icon-loading",
-    background: "rgba(0, 0, 0, 0.7)",
+    background: "rgba(255, 255, 255, 0.7)",
   });
   return service
     .post(url, params, {

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

@@ -64,7 +64,7 @@ export default {
         this.loading = true;
         this.params.code = await generateCode();
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -109,7 +109,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 3 - 3
src/views/purchase/apply/edit/index.vue

@@ -68,7 +68,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -85,7 +85,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -131,7 +131,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/apply/index.vue

@@ -45,7 +45,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -73,7 +73,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/apply/see/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -80,7 +80,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

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

@@ -64,7 +64,7 @@ export default {
         this.loading = true;
         this.params.code = await generateCode();
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -109,7 +109,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 3 - 3
src/views/purchase/catalogue/edit/index.vue

@@ -68,7 +68,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -85,7 +85,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -131,7 +131,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/catalogue/index.vue

@@ -45,7 +45,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -73,7 +73,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/catalogue/see/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -80,7 +80,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

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

@@ -63,7 +63,7 @@ export default {
         this.loading = true;
         this.params.code = await generateCode();
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -108,7 +108,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 3 - 3
src/views/purchase/contract/edit/index.vue

@@ -68,7 +68,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -85,7 +85,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -131,7 +131,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 2 - 2
src/views/purchase/contract/index.vue

@@ -45,7 +45,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -77,7 +77,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/contract/see/index.vue

@@ -63,7 +63,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -80,7 +80,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/purchase-content/index.vue

@@ -196,7 +196,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/purchase-content/see-purchase-task.vue

@@ -99,7 +99,7 @@ export default {
       try {
         // do something
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

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

@@ -130,7 +130,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }
@@ -163,7 +163,7 @@ export default {
               this.$notify.warning({ title: msg });
             }
           } catch (err) {
-            this.$notify.error({ title: "error", message: err });
+            //
           } finally {
             // this.setVisible(false);
           }

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

@@ -91,7 +91,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -153,7 +153,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

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

@@ -167,7 +167,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -238,7 +238,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.loading = false;
       }
@@ -257,7 +257,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/purchase-order/see/index.vue

@@ -56,7 +56,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/task/column.js

@@ -124,7 +124,7 @@ export const SearchColumns = [
     key: "classIds",
     title: "物料分类",
     inputType: "PopoverTreeSelect",
-    multiple: false,
+    multiple: true,
     valueKey: "id",
     referName: "MATERIALCLASSIFY_PARAM",
     readonly: true,

+ 1 - 1
src/views/purchase/task/documents-return/index.vue

@@ -36,7 +36,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
src/views/purchase/task/first-direct/index.vue

@@ -33,7 +33,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -61,7 +61,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         // this.setVisible(false);
       }

+ 17 - 9
src/views/purchase/task/index.vue

@@ -1,6 +1,6 @@
 <script>
 import { TableColumns, SearchColumns } from "./column";
-import { LIST, SHUTDOWN } from "@/api/business/purchase/task";
+import { LIST, SHUTDOWN, EXPORT } from "@/api/business/purchase/task";
 import {
   initPage,
   initLayout,
@@ -42,12 +42,12 @@ export default {
   },
   methods: {
     //
-    async fetchList(params, page) {
+    async fetchList(prop, page) {
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
         const { code, msg, rows, total } = await LIST(
-          { ...params },
+          { ...prop },
           { pageNum, pageSize, isAsc: "desc", orderByColumn: "createTime" }
         );
         if (code === 200) {
@@ -58,7 +58,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -103,7 +103,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }
@@ -121,6 +121,15 @@ export default {
       await setVisible(true);
       await beforeOpenDoSome(id);
     },
+    // 导出
+    async handleExport(prop, page) {
+      const { pageNum, pageSize } = page;
+      this.download(
+        "pu/order/generate/export",
+        { ...prop, pageNum, pageSize },
+        `KONG_${new Date().getTime()}.xlsx`
+      );
+    },
     // 打开查看drawer
     async handleOpenSeeDrawer(prop) {
       const { id } = prop;
@@ -134,9 +143,6 @@ export default {
       await setVisible(true);
       await beforeOpenDoSome(prop);
     },
-    handleCCCC(prop, source) {
-      console.log("CCCCCC", prop, source);
-    },
   },
 };
 </script>
@@ -231,7 +237,6 @@ export default {
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
               :query-params="column.queryParams(params)"
-              @change="handleCCCC"
             >
             </dr-popover-select>
           </el-form-item>
@@ -264,6 +269,9 @@ export default {
     </el-form>
     <el-row :gutter="24" style="padding: 0 20px">
       <el-col :span="24">
+        <el-button :size="size" @click="handleExport(params, page)">
+          导 出
+        </el-button>
         <el-button
           :size="size"
           :disabled="selectData.length !== 1"

+ 1 - 1
src/views/purchase/task/modify-buyer/index.vue

@@ -31,7 +31,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 1 - 1
src/views/purchase/task/see/index.vue

@@ -34,7 +34,7 @@ export default {
           this.$notify.warning({ title: msg });
         }
       } catch (err) {
-        this.$notify.error({ title: "error", message: err });
+        //
       } finally {
         this.loading = false;
       }

+ 2 - 2
vue.config.js

@@ -37,12 +37,12 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-        target: `http://test-sy.derom.com/drp-admin`, //测试
+        // target: `http://test-sy.derom.com/drp-admin`, //测试
         // target: `http://release-sy.derom.com/drp-admin`, //预发
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
-        // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
+        target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
         // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地