cz 2 tahun lalu
induk
melakukan
4d632a1957

+ 167 - 153
src/page/index/tags.vue

@@ -1,186 +1,200 @@
 <template>
-  <div class="avue-tags"
-       v-if="showTag">
+  <div class="avue-tags" v-if="showTag">
     <!-- tag盒子 -->
-    <div v-if="contextmenuFlag"
-         class="avue-tags__contentmenu"
-         :style="{left:contentmenuX+'px',top:contentmenuY+'px'}">
-      <div class="item"
-           @click="clearCacheTags">{{$t('tagsView.clearCache')}}
+    <div
+      v-if="contextmenuFlag"
+      class="avue-tags__contentmenu"
+      :style="{ left: contentmenuX + 'px', top: contentmenuY + 'px' }"
+    >
+      <div class="item" @click="clearCacheTags">
+        {{ $t("tagsView.clearCache") }}
       </div>
-      <div class="item"
-           @click="closeOthersTags">{{$t('tagsView.closeOthers')}}
+      <div class="item" @click="closeOthersTags">
+        {{ $t("tagsView.closeOthers") }}
       </div>
-      <div class="item"
-           @click="closeAllTags">{{$t('tagsView.closeAll')}}
+      <div class="item" @click="closeAllTags">
+        {{ $t("tagsView.closeAll") }}
       </div>
     </div>
-    <div class="avue-tags__box"
-         :class="{'avue-tags__box--close':!website.isFirstPage}">
-      <el-tabs v-model="active"
-               type="card"
-               @contextmenu.native="handleContextmenu"
-               :closable="tagLen!==1"
-               @tab-click="openTag"
-               @edit="menuTag">
-        <el-tab-pane :key="item.value"
-                     v-for="item in tagList"
-                     :label="generateTitle(item)"
-                     :name="item.value">
+    <div
+      class="avue-tags__box"
+      :class="{ 'avue-tags__box--close': !website.isFirstPage }"
+    >
+      <el-tabs
+        v-model="active"
+        type="card"
+        @contextmenu.native="handleContextmenu"
+        :closable="tagLen !== 1"
+        @tab-click="openTag"
+        @edit="menuTag"
+      >
+        <el-tab-pane
+          :key="item.value"
+          v-for="item in tagList"
+          :label="generateTitle(item)"
+          :name="item.value"
+        >
         </el-tab-pane>
-
       </el-tabs>
       <el-dropdown class="avue-tags__menu">
-        <el-button type="primary"
-                   size="mini">
-          {{$t('tagsView.menu')}}
+        <el-button type="primary" size="mini">
+          {{ $t("tagsView.menu") }}
           <i class="el-icon-arrow-down el-icon--right"></i>
         </el-button>
         <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item @click.native="$parent.isSearch=true">{{$t('tagsView.search')}}</el-dropdown-item>
-          <el-dropdown-item @click.native="closeOthersTags">{{$t('tagsView.closeOthers')}}</el-dropdown-item>
-          <el-dropdown-item @click.native="closeAllTags">{{$t('tagsView.closeAll')}}</el-dropdown-item>
-          <el-dropdown-item @click.native="clearCacheTags">{{$t('tagsView.clearCache')}}</el-dropdown-item>
+          <!-- <el-dropdown-item @click.native="$parent.isSearch = true">{{
+            $t("tagsView.search")
+          }}</el-dropdown-item> -->
+          <el-dropdown-item @click.native="closeOthersTags">{{
+            $t("tagsView.closeOthers")
+          }}</el-dropdown-item>
+          <el-dropdown-item @click.native="closeAllTags">{{
+            $t("tagsView.closeAll")
+          }}</el-dropdown-item>
+          <el-dropdown-item @click.native="clearCacheTags">{{
+            $t("tagsView.clearCache")
+          }}</el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>
-
   </div>
 </template>
 <script>
-  import {mapGetters, mapState} from "vuex";
-  import {clearCache} from "@/api/user";
+import { mapGetters, mapState } from "vuex";
+import { clearCache } from "@/api/user";
 
-  export default {
-    name: "tags",
-    data() {
-      return {
-        active: "",
-        contentmenuX: "",
-        contentmenuY: "",
-        contextmenuFlag: false
-      };
+export default {
+  name: "tags",
+  data() {
+    return {
+      active: "",
+      contentmenuX: "",
+      contentmenuY: "",
+      contextmenuFlag: false,
+    };
+  },
+  created() {},
+  mounted() {
+    this.setActive();
+  },
+  watch: {
+    tag() {
+      this.setActive();
     },
-    created() {
+    contextmenuFlag() {
+      window.addEventListener("mousedown", this.watchContextmenu);
     },
-    mounted() {
-      this.setActive();
+  },
+  computed: {
+    ...mapGetters(["tagWel", "tagList", "tag", "website"]),
+    ...mapState({
+      showTag: (state) => state.common.showTag,
+    }),
+    tagLen() {
+      return this.tagList.length || 0;
     },
-    watch: {
-      tag() {
-        this.setActive();
-      },
-      contextmenuFlag() {
-        window.addEventListener("mousedown", this.watchContextmenu);
+  },
+  methods: {
+    generateTitle(item) {
+      return this.$router.$avueRouter.generateTitle(
+        item.label,
+        (item.meta || {}).i18n
+      );
+    },
+    watchContextmenu(event) {
+      if (!this.$el.contains(event.target) || event.button !== 0) {
+        this.contextmenuFlag = false;
       }
+      window.removeEventListener("mousedown", this.watchContextmenu);
     },
-    computed: {
-      ...mapGetters(["tagWel", "tagList", "tag", "website"]),
-      ...mapState({
-        showTag: state => state.common.showTag
-      }),
-      tagLen() {
-        return this.tagList.length || 0;
+    handleContextmenu(event) {
+      let target = event.target;
+      // 解决 https://github.com/d2-projects/d2-admin/issues/54
+      let flag = false;
+      if (target.className.indexOf("el-tabs__item") > -1) flag = true;
+      else if (target.parentNode.className.indexOf("el-tabs__item") > -1) {
+        target = target.parentNode;
+        flag = true;
+      }
+      if (flag) {
+        event.preventDefault();
+        event.stopPropagation();
+        this.contentmenuX = event.clientX;
+        this.contentmenuY = event.clientY;
+        this.tagName = target.getAttribute("aria-controls").slice(5);
+        this.contextmenuFlag = true;
       }
     },
-    methods: {
-      generateTitle(item) {
-        return this.$router.$avueRouter.generateTitle(
-          item.label,
-          (item.meta || {}).i18n
-        );
-      },
-      watchContextmenu(event) {
-        if (!this.$el.contains(event.target) || event.button !== 0) {
-          this.contextmenuFlag = false;
-        }
-        window.removeEventListener("mousedown", this.watchContextmenu);
-      },
-      handleContextmenu(event) {
-        let target = event.target;
-        // 解决 https://github.com/d2-projects/d2-admin/issues/54
-        let flag = false;
-        if (target.className.indexOf("el-tabs__item") > -1) flag = true;
-        else if (target.parentNode.className.indexOf("el-tabs__item") > -1) {
-          target = target.parentNode;
-          flag = true;
-        }
-        if (flag) {
-          event.preventDefault();
-          event.stopPropagation();
-          this.contentmenuX = event.clientX;
-          this.contentmenuY = event.clientY;
-          this.tagName = target.getAttribute("aria-controls").slice(5);
-          this.contextmenuFlag = true;
-        }
-      },
-      //激活当前选项
-      setActive() {
-        this.active = this.tag.value;
-      },
-      menuTag(value, action) {
-        if (action === "remove") {
-          let {tag, key} = this.findTag(value);
-          this.$store.commit("DEL_TAG", tag);
-          if (tag.value === this.tag.value) {
-            tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个
-            this.openTag(tag);
-          }
+    //激活当前选项
+    setActive() {
+      this.active = this.tag.value;
+    },
+    menuTag(value, action) {
+      if (action === "remove") {
+        let { tag, key } = this.findTag(value);
+        this.$store.commit("DEL_TAG", tag);
+        if (tag.value === this.tag.value) {
+          tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个
+          this.openTag(tag);
         }
-      },
-      openTag(item) {
-        let tag;
-        if (item.name) {
-          tag = this.findTag(item.name).tag;
-        } else {
+      }
+    },
+    openTag(item) {
+      let tag;
+      if (item.name) {
+        tag = this.findTag(item.name).tag;
+      } else {
+        tag = item;
+      }
+      this.$router.push({
+        path: this.$router.$avueRouter.getPath(
+          {
+            name: tag.label,
+            src: tag.value,
+          },
+          tag.meta
+        ),
+        query: tag.query,
+      });
+    },
+    closeOthersTags() {
+      this.contextmenuFlag = false;
+      this.$store.commit("DEL_TAG_OTHER");
+    },
+    findTag(value) {
+      let tag, key;
+      this.tagList.map((item, index) => {
+        if (item.value === value) {
           tag = item;
+          key = index;
         }
-        this.$router.push({
-          path: this.$router.$avueRouter.getPath({
-            name: tag.label,
-            src: tag.value
-          }, tag.meta),
-          query: tag.query
-        });
-      },
-      closeOthersTags() {
-        this.contextmenuFlag = false;
-        this.$store.commit("DEL_TAG_OTHER");
-      },
-      findTag(value) {
-        let tag, key;
-        this.tagList.map((item, index) => {
-          if (item.value === value) {
-            tag = item;
-            key = index;
-          }
-        });
-        return {tag: tag, key: key};
-      },
-      closeAllTags() {
-        this.contextmenuFlag = false;
-        this.$store.commit("DEL_ALL_TAG");
-        this.$router.push({
-          path: this.$router.$avueRouter.getPath({
-            src: this.tagWel.value
-          }),
-          query: this.tagWel.query
-        });
-      },
-      clearCacheTags() {
-        this.$confirm("是否需要清除缓存?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          clearCache().then(() => {
-            this.contextmenuFlag = false;
-            this.$message.success('清除完毕');
-          })
+      });
+      return { tag: tag, key: key };
+    },
+    closeAllTags() {
+      this.contextmenuFlag = false;
+      this.$store.commit("DEL_ALL_TAG");
+      this.$router.push({
+        path: this.$router.$avueRouter.getPath({
+          src: this.tagWel.value,
+        }),
+        query: this.tagWel.query,
+      });
+    },
+    clearCacheTags() {
+      this.$confirm("是否需要清除缓存?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        clearCache().then(() => {
+          this.contextmenuFlag = false;
+          this.$message.success("清除完毕");
         });
-      }
-    }
-  };
+      });
+    },
+  },
+};
 </script>
 
 

+ 135 - 118
src/page/index/top/index.vue

@@ -1,95 +1,113 @@
 <template>
   <div class="avue-top">
     <div class="top-bar__left">
-      <div class="avue-breadcrumb"
-           :class="[{ 'avue-breadcrumb--active': isCollapse }]"
-           v-if="showCollapse">
-        <i class="icon-navicon"
-           @click="setCollapse"></i>
+      <div
+        class="avue-breadcrumb"
+        :class="[{ 'avue-breadcrumb--active': isCollapse }]"
+        v-if="showCollapse"
+      >
+        <i class="icon-navicon" @click="setCollapse"></i>
       </div>
     </div>
     <div class="top-bar__title">
-      <div class="top-bar__item top-bar__item--show"
-           v-if="showMenu">
+      <div class="top-bar__item top-bar__item--show" v-if="showMenu">
         <top-menu ref="topMenu"></top-menu>
       </div>
-      <span class="top-bar__item"
-            v-if="showSearch">
+      <span class="top-bar__item" v-if="showSearch">
         <top-search></top-search>
       </span>
     </div>
     <div class="top-bar__right">
-      <el-tooltip v-if="showColor"
-                  effect="dark"
-                  :content="$t('navbar.color')"
-                  placement="bottom">
+      <el-tooltip
+        v-if="showColor"
+        effect="dark"
+        :content="$t('navbar.color')"
+        placement="bottom"
+      >
         <div class="top-bar__item">
           <top-color></top-color>
         </div>
       </el-tooltip>
-      <el-tooltip v-if="showDebug"
-                  effect="dark"
-                  :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"
-                  placement="bottom">
+      <el-tooltip
+        v-if="showDebug"
+        effect="dark"
+        :content="logsFlag ? $t('navbar.bug') : logsLen + $t('navbar.bugs')"
+        placement="bottom"
+      >
         <div class="top-bar__item">
           <top-logs></top-logs>
         </div>
       </el-tooltip>
-      <el-tooltip v-if="showLock"
-                  effect="dark"
-                  :content="$t('navbar.lock')"
-                  placement="bottom">
+      <el-tooltip
+        v-if="showLock"
+        effect="dark"
+        :content="$t('navbar.lock')"
+        placement="bottom"
+      >
         <div class="top-bar__item">
           <top-lock></top-lock>
         </div>
       </el-tooltip>
-      <el-tooltip v-if="showTheme"
-                  effect="dark"
-                  :content="$t('navbar.theme')"
-                  placement="bottom">
+      <el-tooltip
+        v-if="showTheme"
+        effect="dark"
+        :content="$t('navbar.theme')"
+        placement="bottom"
+      >
         <div class="top-bar__item top-bar__item--show">
           <top-theme></top-theme>
         </div>
       </el-tooltip>
-      <el-tooltip effect="dark"
-                  :content="$t('navbar.notice')"
-                  placement="bottom">
+      <el-tooltip
+        effect="dark"
+        :content="$t('navbar.notice')"
+        placement="bottom"
+      >
         <div class="top-bar__item top-bar__item--show">
           <top-notice></top-notice>
         </div>
       </el-tooltip>
-      <el-tooltip effect="dark"
-                  :content="$t('navbar.language')"
-                  placement="bottom">
+      <el-tooltip
+        effect="dark"
+        :content="$t('navbar.language')"
+        placement="bottom"
+      >
         <div class="top-bar__item top-bar__item--show">
           <top-lang></top-lang>
         </div>
       </el-tooltip>
-      <el-tooltip v-if="showFullScren"
-                  effect="dark"
-                  :content="isFullScren?$t('navbar.screenfullF'):$t('navbar.screenfull')"
-                  placement="bottom">
+      <el-tooltip
+        v-if="showFullScren"
+        effect="dark"
+        :content="
+          isFullScren ? $t('navbar.screenfullF') : $t('navbar.screenfull')
+        "
+        placement="bottom"
+      >
         <div class="top-bar__item">
-          <i :class="isFullScren?'icon-tuichuquanping':'icon-quanping'"
-             @click="handleScreen"></i>
+          <i
+            :class="isFullScren ? 'icon-tuichuquanping' : 'icon-quanping'"
+            @click="handleScreen"
+          ></i>
         </div>
       </el-tooltip>
-      <img class="top-bar__img"
-           :src="userInfo.avatar">
+      <img class="top-bar__img" :src="userInfo.avatar" />
       <el-dropdown>
         <span class="el-dropdown-link">
-          {{userInfo.userName}}
+          {{ userInfo.userName }}
           <i class="el-icon-arrow-down el-icon--right"></i>
         </span>
         <el-dropdown-menu slot="dropdown">
           <el-dropdown-item>
-            <router-link to="/">{{$t('navbar.dashboard')}}</router-link>
+            <router-link to="/">{{ $t("navbar.dashboard") }}</router-link>
           </el-dropdown-item>
           <el-dropdown-item>
-            <router-link to="/info/index">{{$t('navbar.userinfo')}}</router-link>
+            <router-link to="/info/index">{{
+              $t("navbar.userinfo")
+            }}</router-link>
           </el-dropdown-item>
-          <el-dropdown-item @click.native="logout"
-                            divided>{{$t('navbar.logOut')}}
+          <el-dropdown-item @click.native="logout" divided
+            >{{ $t("navbar.logOut") }}
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
@@ -97,85 +115,84 @@
   </div>
 </template>
 <script>
-  import {resetRouter} from '@/router/router'
-  import {mapGetters, mapState} from "vuex";
-  import {fullscreenToggel, listenfullscreen} from "@/util/util";
-  import topLock from "./top-lock";
-  import topMenu from "./top-menu";
-  import topSearch from "./top-search";
-  import topTheme from "./top-theme";
-  import topLogs from "./top-logs";
-  import topColor from "./top-color";
-  import topNotice from './top-notice'
-  import topLang from "./top-lang";
+import { resetRouter } from "@/router/router";
+import { mapGetters, mapState } from "vuex";
+import { fullscreenToggel, listenfullscreen } from "@/util/util";
+import topLock from "./top-lock";
+import topMenu from "./top-menu";
+import topSearch from "./top-search";
+import topTheme from "./top-theme";
+import topLogs from "./top-logs";
+import topColor from "./top-color";
+import topNotice from "./top-notice";
+import topLang from "./top-lang";
 
-  export default {
-    components: {
-      topLock,
-      topMenu,
-      topSearch,
-      topTheme,
-      topLogs,
-      topColor,
-      topNotice,
-      topLang
+export default {
+  components: {
+    topLock,
+    topMenu,
+    topSearch,
+    topTheme,
+    topLogs,
+    topColor,
+    topNotice,
+    topLang,
+  },
+  name: "top",
+  data() {
+    return {};
+  },
+  filters: {},
+  created() {},
+  mounted() {
+    listenfullscreen(this.setScreen);
+  },
+  computed: {
+    ...mapState({
+      showDebug: (state) => state.common.showDebug,
+      showTheme: (state) => state.common.showTheme,
+      showLock: (state) => state.common.showLock,
+      showFullScren: (state) => state.common.showFullScren,
+      showCollapse: (state) => state.common.showCollapse,
+      showSearch: (state) => state.common.showSearch,
+      showMenu: (state) => state.common.showMenu,
+      showColor: (state) => state.common.showColor,
+    }),
+    ...mapGetters([
+      "userInfo",
+      "isFullScren",
+      "tagWel",
+      "tagList",
+      "isCollapse",
+      "tag",
+      "logsLen",
+      "logsFlag",
+    ]),
+  },
+  methods: {
+    handleScreen() {
+      fullscreenToggel();
     },
-    name: "top",
-    data() {
-      return {};
+    setCollapse() {
+      this.$store.commit("SET_COLLAPSE");
     },
-    filters: {},
-    created() {
+    setScreen() {
+      this.$store.commit("SET_FULLSCREN");
     },
-    mounted() {
-      listenfullscreen(this.setScreen);
-    },
-    computed: {
-      ...mapState({
-        showDebug: state => state.common.showDebug,
-        showTheme: state => state.common.showTheme,
-        showLock: state => state.common.showLock,
-        showFullScren: state => state.common.showFullScren,
-        showCollapse: state => state.common.showCollapse,
-        showSearch: state => state.common.showSearch,
-        showMenu: state => state.common.showMenu,
-        showColor: state => state.common.showColor
-      }),
-      ...mapGetters([
-        "userInfo",
-        "isFullScren",
-        "tagWel",
-        "tagList",
-        "isCollapse",
-        "tag",
-        "logsLen",
-        "logsFlag"
-      ])
-    },
-    methods: {
-      handleScreen() {
-        fullscreenToggel();
-      },
-      setCollapse() {
-        this.$store.commit("SET_COLLAPSE");
-      },
-      setScreen() {
-        this.$store.commit("SET_FULLSCREN");
-      },
-      logout() {
-        this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
-          confirmButtonText: this.$t("submitText"),
-          cancelButtonText: this.$t("cancelText"),
-          type: "warning"
-        }).then(() => {
-          this.$store.dispatch("LogOut").then(() => {
-            resetRouter();
-            this.$router.push({path: "/login"});
-          });
+    logout() {
+      this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        this.$store.dispatch("LogOut").then(() => {
+          resetRouter();
+          this.$router.push({ path: "/login" });
         });
-      }
-    }
-  };
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/views/purchase-management/deliver-goods/sendGoods.vue

@@ -47,7 +47,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label=" " prop="code">
+            <el-form-item label="物流/快递单" prop="code">
               <el-input
                 v-model="form.code"
                 placeholder="物流/快递单号"

+ 31 - 4
src/views/purchase-management/purchase/addPurchase.vue

@@ -10,11 +10,12 @@
       >
         <el-row>
           <el-col :span="8">
-            <el-form-item label="供应商" prop="supplieId">
+            <el-form-item label="供应商" prop="supplierId">
               <el-select
-                v-model="form.supplieId"
+                v-model="form.supplierId"
                 placeholder="请选择"
                 style="width: 100%"
+                @change="handleChangeSupply"
               >
                 <el-option
                   v-for="item in supplySelectList"
@@ -113,6 +114,8 @@
 <script>
 import labelTitle from "@/components/label-title/index.vue";
 import * as API from "@/api/purchase-management/purchase/index.js";
+import { supplyPriceList } from "@/api/product-material/supply/priceMaintenance.js";
+
 import { getToken } from "@/util/auth";
 
 export default {
@@ -145,7 +148,7 @@ export default {
 
       loading: false,
       formRules: {
-        supplieId: [
+        supplierId: [
           {
             required: true,
             message: "请选择供应商",
@@ -160,9 +163,30 @@ export default {
           },
         ],
       },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        supplierId: "",
+        materialId: "",
+        supplierName: "",
+        materialName: "",
+        materialCode: "",
+        materialType: "",
+      },
+      tableList: [],
     };
   },
-  created() {},
+  created() {
+    supplyPriceList(this.queryParams).then(
+      (res) => {
+        this.tableList = res.data.data.records;
+      },
+      (err) => {
+        console.log("supplyPriceList: " + err);
+      }
+    );
+  },
   methods: {
     handleSubmit() {
       this.$refs.form.validate((valid) => {
@@ -180,6 +204,9 @@ export default {
         x.sum = (x.quantity * (Number(x.unitPrice) * 100)) / 100;
       });
     },
+    handleChangeSupply(val) {
+      // const current = this.tableList.find((x) => x.supplierId === val);
+    },
   },
 };
 </script>

+ 14 - 3
src/views/purchase-management/purchase/index.vue

@@ -94,6 +94,7 @@ export default {
     this.purchaseStatusList = businessDictData.find(
       (item) => item.code === "purchaseStatus"
     ).children;
+    console.log(this.purchaseStatusList, "aaa");
     this.selectConfig[0].data = this.purchaseStatusList.map((item) => ({
       label: item.dictValue,
       value: item.dictKey,
@@ -144,7 +145,7 @@ export default {
         flowRemark: "",
         id: "",
         code: "",
-        supplieId: "",
+        supplierId: "",
         goodsList: goodsList,
       };
       this.titleText = "add";
@@ -159,7 +160,7 @@ export default {
         flowRemark: "",
         id: "",
         code: "",
-        supplieId: "",
+        supplierId: "",
         goodsList: goodsList,
       };
       this.titleText = "add";
@@ -318,6 +319,11 @@ export default {
           align="left"
           prop="planArrivalTime"
           width="160"
+          :formatter="
+            (row) => {
+              return row.planArrivalTime.slice(0, 10);
+            }
+          "
         />
 
         <el-table-column
@@ -336,8 +342,13 @@ export default {
         <el-table-column
           label="申购时间"
           align="left"
-          prop="planArrivalTime"
+          prop="createTime"
           width="160"
+          :formatter="
+            (row) => {
+              return row.createTime.slice(0, 10);
+            }
+          "
         />
 
         <el-table-column label="操作" align="center" width="120">

+ 20 - 1
src/views/purchase-management/subscribe/index.vue

@@ -59,6 +59,7 @@ export default {
         },
       ],
       tableList: [],
+      total: 0,
       loading: false,
       titleText: "",
       open: false,
@@ -81,7 +82,7 @@ export default {
     this.subscribeStatusList = businessDictData.find(
       (item) => item.code === "purchaseStatus"
     ).children;
-    console.log(this.subscribeStatusList)
+    console.log(this.subscribeStatusList);
     this.warehouseTypeList = businessDictData.find(
       (item) => item.code === "warehouseType"
     ).children;
@@ -287,12 +288,22 @@ export default {
           align="left"
           prop="createTime"
           width="160"
+          :formatter="
+            (row) => {
+              return row.createTime.slice(0, 10);
+            }
+          "
         />
         <el-table-column
           label="要求到货时间"
           align="left"
           prop="planArrivalTime"
           width="160"
+          :formatter="
+            (row) => {
+              return row.planArrivalTime.slice(0, 10);
+            }
+          "
         />
 
         <!-- <el-table-column
@@ -331,6 +342,13 @@ export default {
           </template>
         </el-table-column> -->
       </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
     </el-card>
 
     <el-dialog
@@ -372,6 +390,7 @@ export default {
   }
   .body-main {
     flex: 1;
+    overflow-y: auto;
   }
 }
 </style>

+ 8 - 2
src/views/purchase-management/subscribe/sendSubscribe.vue

@@ -39,7 +39,7 @@
             <el-form-item label="要求到货时间" prop="planArrivalTime">
               <el-date-picker
                 v-model="form.planArrivalTime"
-                type="datetime"
+                type="date"
                 placeholder="请选择"
                 value-format="yyyy-MM-dd HH:mm:ss"
                 style="width: 100%"
@@ -213,6 +213,12 @@ export default {
       this.$emit("cancel");
     },
     handleSelect(row) {
+      const flag = this.form.goodsId.some((x) => {
+        return x.goodsId === row.id;
+      });
+      if (flag) {
+        return this.msgInfo("该物品已选择!");
+      }
       this.form.goodsId.push({
         goodsId: row.id,
         quantity: "",
@@ -220,7 +226,7 @@ export default {
         name: row.name,
         type: row.type,
         unit: row.unit,
-        stock: row.stockQuantity,
+        stock: row.stockQuantity || 0,
       });
       this.msgSuccess("添加成功");
     },