Quellcode durchsuchen

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 vor 2 Jahren
Ursprung
Commit
6e708bdd6a

+ 2 - 2
src/api/business/purchase/contract.js

@@ -1,6 +1,6 @@
 import request from "@/utils/request";
 
-export function list(params) {
+export function LIST(params) {
   return request({
     url: "/pu/contract/list",
     method: "GET",
@@ -24,7 +24,7 @@ export function edit(data) {
   });
 }
 
-export function remove(data) {
+export function REMOVE(data) {
   return request({
     url: `/pu/contract/${data}`,
     method: "delete",

+ 6 - 2
src/components/popover-select/components/index.vue

@@ -91,7 +91,9 @@ export default {
     },
     // click select row data
     handleSelect(row) {
-      this.multipleSelection = [row];
+      [row].forEach((row) => {
+        this.$refs.multipleTable.toggleRowSelection(row);
+      });
     },
     // double click select row data and confirm
     handleDoubleClickSelect(row) {
@@ -116,8 +118,9 @@ export default {
 <template>
   <el-dialog
     :title="title"
-    :visible.sync="visible"
     :width="width"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
     append-to-body
     @open="beforeOpen"
   >
@@ -135,6 +138,7 @@ export default {
       </el-form-item>
     </el-form>
     <el-table
+      ref="multipleTable"
       v-loading="loading"
       :data="data"
       :size="size"

+ 19 - 24
src/components/popover-select/index.vue

@@ -70,13 +70,15 @@ export default {
     return {
       // popover宽度
       width: "",
-      // 显示value
-      showValue: "",
       // 选中data
       data: [],
     };
   },
-  computed: {},
+  computed: {
+    showValue() {
+      return this.data.length === 1 ? this.data[0][this.$props.valueKey] : "";
+    },
+  },
   watch: {
     "$props.value": {
       handler: function (newProp, oldProp) {
@@ -91,7 +93,7 @@ export default {
     // 打开弹窗
     handleAsyncOpenDialog() {
       this.$nextTick(() => {
-        const { setVisible } = this.$refs.TableDialogFef;
+        const { setVisible } = this.$refs.TableDialog;
         setVisible(true);
       });
     },
@@ -99,7 +101,6 @@ export default {
     handleAdd(prop) {
       this.data = prop;
       this.handleUpdate(this.data);
-      this.$emit("hide", prop);
     },
     // 删除操作
     handleDelete(prop) {
@@ -111,16 +112,13 @@ export default {
       const { source, multiple, valueKey, dataMapping } = this.$props;
       // 多选
       if (multiple) {
-        this.showValue = "";
-        this.$emit(
-          "input",
-          prop.map((item) => item[valueKey])
-        );
+        const updateData = prop.map((item) => item[valueKey]);
+        this.$emit("input", updateData);
       }
       // 单选
       if (!multiple) {
-        this.showValue = prop[0].name;
-        this.$emit("input", prop[0][valueKey]);
+        const updateData = prop[0][valueKey];
+        this.$emit("input", updateData);
         // 更新映射数据
         for (let key in dataMapping) {
           source[key] = prop[0][dataMapping[key]];
@@ -167,10 +165,7 @@ export default {
         overflow: hidden;
       "
     >
-      <el-tag v-if="!multiple && data.length" :size="size">
-        {{ data[0].name }}
-      </el-tag>
-      <div v-if="multiple && data.length">
+      <div v-if="multiple && data.length > 1">
         <el-popover
           :offset="-10"
           :width="width"
@@ -188,22 +183,22 @@ export default {
             :size="size"
             hit
             closable
-            style="
-              display: flex;
-              justify-content: space-between;
-              align-items: center;
-              margin: 0 0 5px 0;
-            "
+            :style="{
+              display: 'flex',
+              justifyContent: 'space-between',
+              alignItems: 'center',
+              margin: data.length - 1 === index ? '0' : '0 0 5px 0',
+            }"
             @close="handleDelete(index)"
           >
-            {{ item.name }}
+            {{ item[valueKey] }}
           </el-tag>
         </el-popover>
       </div>
     </div>
     <table-dialog
       v-model="data"
-      ref="TableDialogFef"
+      ref="TableDialog"
       :type="type"
       :title="title"
       :multiple="multiple"

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

@@ -108,8 +108,9 @@ export default {
 <template>
   <el-dialog
     :title="title"
-    :visible.sync="visible"
     :width="width"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
     append-to-body
     destroy-on-close
     @open="beforeOpen"

+ 20 - 21
src/components/popover-tree-select/index.vue

@@ -73,7 +73,11 @@ export default {
       data: [],
     };
   },
-  computed: {},
+  computed: {
+    showValue() {
+      return this.data.length === 1 ? this.data[0][this.$props.valueKey] : "";
+    },
+  },
   watch: {
     "$props.value": {
       handler: function (newProp, oldProp) {
@@ -88,7 +92,7 @@ export default {
     // 打开弹窗
     handleAsyncOpenDialog() {
       this.$nextTick(() => {
-        const { setVisible } = this.$refs.TableDialogFef;
+        const { setVisible } = this.$refs.TableDialog;
         setVisible(true);
       });
     },
@@ -107,16 +111,13 @@ export default {
       const { source, multiple, valueKey, dataMapping } = this.$props;
       // 多选
       if (multiple) {
-        this.showValue = "";
-        this.$emit(
-          "input",
-          prop.map((item) => item[valueKey])
-        );
+        const updateData = prop.map((item) => item[valueKey]);
+        this.$emit("input", updateData);
       }
       // 单选
       if (!multiple) {
-        this.showValue = prop[0].name;
-        this.$emit("input", prop[0][valueKey]);
+        const updateData = prop[0][valueKey];
+        this.$emit("input", updateData);
         // 更新映射数据
         for (let key in dataMapping) {
           source[key] = prop[0][dataMapping[key]];
@@ -129,7 +130,7 @@ export default {
   },
   created() {
     this.$nextTick(() => {
-      const { clientWidth } = this.$refs.PopoverSelect;
+      const { clientWidth } = this.$refs.PopoverTreeSelect;
       this.width = clientWidth;
     });
   },
@@ -138,8 +139,9 @@ export default {
 };
 </script>
 <template>
-  <div ref="PopoverSelect" style="position: relative">
+  <div ref="PopoverTreeSelect" style="position: relative">
     <el-input
+      v-model="showValue"
       :size="size"
       :disabled="disabled"
       :clearable="clearable"
@@ -162,9 +164,6 @@ export default {
         overflow: hidden;
       "
     >
-      <el-tag v-if="!multiple && data.length" :size="size">
-        {{ data[0].name }}
-      </el-tag>
       <div v-if="multiple && data.length">
         <el-popover
           :offset="-10"
@@ -183,12 +182,12 @@ export default {
             :size="size"
             hit
             closable
-            style="
-              display: flex;
-              justify-content: space-between;
-              align-items: center;
-              margin: 0 0 5px 0;
-            "
+            :style="{
+              display: 'flex',
+              justifyContent: 'space-between',
+              alignItems: 'center',
+              margin: data.length - 1 === index ? '0' : '0 0 5px 0',
+            }"
             @close="handleDelete(index)"
           >
             {{ item.name }}
@@ -197,7 +196,7 @@ export default {
       </div>
     </div>
     <table-dialog
-      ref="TableDialogFef"
+      ref="TableDialog"
       :type="type"
       :title="title"
       :multiple="multiple"

+ 58 - 34
src/layout/components/Sidebar/SidebarItem.vue

@@ -1,16 +1,40 @@
 <template>
   <div v-if="!item.hidden">
-    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
-      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
-        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
-          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+    <template
+      v-if="
+        hasOneShowingChild(item.children, item) &&
+        (!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
+        !item.alwaysShow
+      "
+    >
+      <app-link
+        v-if="onlyOneChild.meta"
+        :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
+      >
+        <el-menu-item
+          :index="resolvePath(onlyOneChild.path)"
+          :class="{ 'submenu-title-noDropdown': !isNest }"
+        >
+          <item
+            :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
+            :title="onlyOneChild.meta.title"
+          />
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
+    <el-submenu
+      v-else
+      ref="subMenu"
+      :index="resolvePath(item.path)"
+      popper-append-to-body
+    >
       <template slot="title">
-        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
+        <item
+          v-if="item.meta"
+          :icon="item.meta && item.meta.icon"
+          :title="item.meta.title"
+        />
       </template>
       <sidebar-item
         v-for="child in item.children"
@@ -26,76 +50,76 @@
 </template>
 
 <script>
-import path from 'path'
-import { isExternal } from '@/utils/validate'
-import Item from './Item'
-import AppLink from './Link'
-import FixiOSBug from './FixiOSBug'
+import path from "path";
+import { isExternal } from "@/utils/validate";
+import Item from "./Item";
+import AppLink from "./Link";
+import FixiOSBug from "./FixiOSBug";
 
 export default {
-  name: 'SidebarItem',
+  name: "SidebarItem",
   components: { Item, AppLink },
   mixins: [FixiOSBug],
   props: {
     // route object
     item: {
       type: Object,
-      required: true
+      required: true,
     },
     isNest: {
       type: Boolean,
-      default: false
+      default: false,
     },
     basePath: {
       type: String,
-      default: ''
-    }
+      default: "",
+    },
   },
   data() {
-    this.onlyOneChild = null
-    return {}
+    this.onlyOneChild = null;
+    return {};
   },
   methods: {
     hasOneShowingChild(children = [], parent) {
       if (!children) {
         children = [];
       }
-      const showingChildren = children.filter(item => {
+      const showingChildren = children.filter((item) => {
         if (item.hidden) {
-          return false
+          return false;
         } else {
           // Temp set(will be used if only has one showing child)
-          this.onlyOneChild = item
-          return true
+          this.onlyOneChild = item;
+          return true;
         }
-      })
+      });
 
       // When there is only one child router, the child router is displayed by default
       if (showingChildren.length === 1) {
-        return true
+        return true;
       }
 
       // Show parent if there are no child router to display
       if (showingChildren.length === 0) {
-        this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
-        return true
+        this.onlyOneChild = { ...parent, path: "", noShowingChildren: true };
+        return true;
       }
 
-      return false
+      return false;
     },
     resolvePath(routePath, routeQuery) {
       if (isExternal(routePath)) {
-        return routePath
+        return routePath;
       }
       if (isExternal(this.basePath)) {
-        return this.basePath
+        return this.basePath;
       }
       if (routeQuery) {
         let query = JSON.parse(routeQuery);
-        return { path: path.resolve(this.basePath, routePath), query: query }
+        return { path: path.resolve(this.basePath, routePath), query: query };
       }
-      return path.resolve(this.basePath, routePath)
-    }
-  }
-}
+      return path.resolve(this.basePath, routePath);
+    },
+  },
+};
 </script>

+ 61 - 45
src/layout/components/Sidebar/index.vue

@@ -1,26 +1,42 @@
 <template>
-    <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
-        <logo v-if="showLogo" :collapse="isCollapse" />
-        <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
-            <el-menu
-                :default-active="activeMenu"
-                :collapse="isCollapse"
-                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
-                :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
-                :unique-opened="true"
-                :active-text-color="settings.theme"
-                :collapse-transition="false"
-                mode="vertical"
-            >
-                <sidebar-item
-                    v-for="(route, index) in sidebarRouters"
-                    :key="route.path  + index"
-                    :item="route"
-                    :base-path="route.path"
-                />
-            </el-menu>
-        </el-scrollbar>
-    </div>
+  <div
+    :class="{ 'has-logo': showLogo }"
+    :style="{
+      backgroundColor:
+        settings.sideTheme === 'theme-dark'
+          ? variables.menuBackground
+          : variables.menuLightBackground,
+    }"
+  >
+    <logo v-if="showLogo" :collapse="isCollapse" />
+    <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="
+          settings.sideTheme === 'theme-dark'
+            ? variables.menuBackground
+            : variables.menuLightBackground
+        "
+        :text-color="
+          settings.sideTheme === 'theme-dark'
+            ? variables.menuColor
+            : variables.menuLightColor
+        "
+        :unique-opened="true"
+        :active-text-color="settings.theme"
+        :collapse-transition="false"
+        mode="vertical"
+      >
+        <sidebar-item
+          v-for="(route, index) in sidebarRouters"
+          :key="route.path + index"
+          :item="route"
+          :base-path="route.path"
+        />
+      </el-menu>
+    </el-scrollbar>
+  </div>
 </template>
 
 <script>
@@ -30,28 +46,28 @@ import SidebarItem from "./SidebarItem";
 import variables from "@/assets/styles/variables.scss";
 
 export default {
-    components: { SidebarItem, Logo },
-    computed: {
-        ...mapState(["settings"]),
-        ...mapGetters(["sidebarRouters", "sidebar"]),
-        activeMenu() {
-            const route = this.$route;
-            const { meta, path } = route;
-            // if set path, the sidebar will highlight the path you set
-            if (meta.activeMenu) {
-                return meta.activeMenu;
-            }
-            return path;
-        },
-        showLogo() {
-            return this.$store.state.settings.sidebarLogo;
-        },
-        variables() {
-            return variables;
-        },
-        isCollapse() {
-            return !this.sidebar.opened;
-        }
-    }
+  components: { SidebarItem, Logo },
+  computed: {
+    ...mapState(["settings"]),
+    ...mapGetters(["sidebarRouters", "sidebar"]),
+    activeMenu() {
+      const route = this.$route;
+      const { meta, path } = route;
+      // if set path, the sidebar will highlight the path you set
+      if (meta.activeMenu) {
+        return meta.activeMenu;
+      }
+      return path;
+    },
+    showLogo() {
+      return this.$store.state.settings.sidebarLogo;
+    },
+    variables() {
+      return variables;
+    },
+    isCollapse() {
+      return !this.sidebar.opened;
+    },
+  },
 };
 </script>

+ 1 - 2
src/utils/init/index.js

@@ -12,7 +12,6 @@ export const initParams = (prop, key = "key", value = "value") =>
   Object.fromEntries(prop.map((item) => [item[key], item[value]]));
 // 初始化字典
 export const initDicts = (prop) =>
-
   prop.filter((column) => column.referName).map((column) => column.referName);
 // 初始化校验
 export const initRules = (prop) => {
@@ -38,4 +37,4 @@ export const initPageSizes = () => pageSizes;
 
 export const initLayout = () => layout;
 
-export const initPage = () => page;
+export const initPage = () => ({ pageNum: 1, pageSize: 25, total: 0 });

+ 0 - 1
src/utils/request.js

@@ -86,7 +86,6 @@ service.interceptors.request.use(
 // 响应拦截器
 service.interceptors.response.use(
   (res) => {
-    console.log("res", res);
     // 未设置状态码则默认成功状态
     const code = res.data.code || 200;
     // 获取错误信息

+ 4 - 2
src/views/purchase/contract/column.js

@@ -13,7 +13,7 @@ export const TableColumns = [
   { key: "puDept", title: "采购部门" },
   { key: "puDeptName", title: "采购部门名称" },
   { key: "supplierTier", title: "供应商层级" },
-  { key: "contractName", title: "合同名称", search: true, type: "Input" },
+  { key: "contractName", title: "合同名称" },
   { key: "grossRateAverage", title: "平均毛利率" },
   { key: "approveFlow", title: "审批流程" },
   { key: "consumableClass", title: "耗材类别" },
@@ -61,4 +61,6 @@ export const TableColumns = [
   { key: "delFlag", title: "删除标记" },
 ];
 
-export const SearchColumns = TableColumns.filter((element) => element.search);
+export const SearchColumns = [
+  { key: "contractName", title: "合同名称", search: true, inputType: "Input" },
+];

+ 31 - 49
src/views/purchase/contract/index.vue

@@ -1,13 +1,13 @@
 <script>
 import { TableColumns, SearchColumns } from "./column";
-import { list, remove } from "@/api/business/purchase/catalogue";
+import { LIST, REMOVE } from "@/api/business/purchase/contract";
 import { initPage, initLayout, initPageSizes, initParams } from "@/utils/init";
 export default {
   name: "PuchaseContract",
   components: {
-    AddDrawer: () => import("./add/index.vue"),
-    SeeDrawer: () => import("./see/index.vue"),
-    EditDrawer: () => import("./edit/index.vue"),
+    // AddDrawer: () => import("./add/index.vue"),
+    SeeDialog: () => import("./see/index.vue"),
+    // EditDrawer: () => import("./edit/index.vue"),
   },
   data() {
     return {
@@ -24,18 +24,19 @@ export default {
   },
   computed: {},
   created() {
-    this.handleQueryList();
+    this.handleQueryList(this.params, this.page);
   },
   methods: {
     //
-    async fetchList(params, page) {
+    async fetchList(prop, page) {
+      console.log(prop, page, LIST);
       try {
         this.loading = true;
         const { pageNum, pageSize } = page;
-        const { code, msg, rows, total } = await list({
+        const { code, msg, rows, total } = await LIST({
           pageNum,
           pageSize,
-          ...params,
+          ...prop,
         });
         if (code === 200) {
           this.tableData = rows;
@@ -51,28 +52,24 @@ export default {
       }
     },
     // 查询操作
-    handleQueryList() {
-      this.fetchList(this.params, this.page);
+    handleQueryList(prop, page) {
+      this.fetchList(prop, page);
     },
     // 重置操作
-    handleResetList() {
+    handleResetList(prop, page) {
       this.page = initPage();
       this.params = initParams(SearchColumns);
-      this.fetchList(this.params, this.page);
-    },
-    // 刷新操作
-    handleRefreshList() {
-      this.fetchList(this.params, this.page);
+      this.handleQueryList(prop, page);
     },
     // 删除操作
     async handleDeleteList(prop) {
       try {
         this.loading = true;
         const { id } = prop;
-        const { code, msg } = await remove(id);
+        const { code, msg } = await REMOVE(id);
         if (code === 200) {
           this.$notify.success({ title: msg });
-          this.fetchList(this.params, this.page);
+          this.handleQueryList(this.params, this.page);
         } else {
           this.$notify.warning({ title: msg });
         }
@@ -85,23 +82,22 @@ export default {
     // 页大小变
     handleSizeChange(prop) {
       this.page.pageSize = prop;
-      this.fetchList(this.params, this.page);
+      this.handleQueryList(this.params, this.page);
     },
     // 当前页变
     handleCurrentChange(prop) {
       this.page.pageNum = prop;
-      this.fetchList(this.params, this.page);
+      this.handleQueryList(this.params, this.page);
     },
     // 打开新增drawer
     handleOpenAddDrawer() {
-      console.log(this.$refs.AddDrawerFef);
       const { setVisible } = this.$refs.AddDrawerFef;
       setVisible(true);
     },
     // 打开查看drawer
-    async handleOpenSeeDrawer(prop) {
+    async handleOpenSeeDialog(prop) {
       const { id } = prop;
-      const { setVisible, fetchItem } = this.$refs.SeeDrawerFef;
+      const { setVisible, fetchItem } = this.$refs.SeeDialog;
       await setVisible(true);
       await fetchItem(id);
     },
@@ -122,20 +118,20 @@ export default {
     style="width: calc(100% - 24px); height: 100%; margin: 10px"
     :body-style="{ padding: 0 }"
   >
-    <see-drawer ref="SeeDrawerFef"></see-drawer>
-    <add-drawer ref="AddDrawerFef" @close="handleResetList"></add-drawer>
-    <edit-drawer ref="EditDrawerFef" @close="handleResetList"></edit-drawer>
+    <see-dialog ref="SeeDialog"></see-dialog>
+    <!-- <add-drawer ref="AddDrawerFef" @close="handleResetList"></add-drawer> -->
+    <!-- <edit-drawer ref="EditDrawerFef" @close="handleResetList"></edit-drawer> -->
     <el-form
       :size="size"
-      label-position="right"
-      label-width="85px"
       :model="params"
+      label-width="75px"
+      label-position="right"
     >
-      <el-row :gutter="24">
+      <el-row :gutter="24" style="padding: 20px 20px">
         <el-col
           v-for="column in searchColumns"
           :key="column.title"
-          :xl="6"
+          :xl="4"
           :lg="6"
           :md="8"
           :sm="12"
@@ -148,43 +144,29 @@ export default {
             ></el-input>
           </el-form-item>
         </el-col>
-        <el-col :xl="6" :lg="6" :md="8" :sm="12" :xs="24">
+        <el-col :xl="4" :lg="6" :md="8" :sm="12" :xs="24">
           <el-button
             circle
             :size="size"
             icon="el-icon-search"
-            @click="handleQueryList"
+            @click="handleQueryList(params, page)"
           ></el-button>
           <el-button
             circle
             :size="size"
             icon="el-icon-refresh"
-            @click="handleResetList"
+            @click="handleResetList(params, page)"
           ></el-button>
         </el-col>
       </el-row>
     </el-form>
     <el-row :gutter="24" style="padding: 0 20px">
       <el-col :span="6">
-        <el-button
-          :size="size"
-          type="danger"
-          icon="el-icon-plus"
-          @click="handleOpenAddDrawer"
-        >
-          新增
-        </el-button>
-        <el-button
-          :size="size"
-          icon="el-icon-refresh-right"
-          @click="handleRefreshList"
-        >
-          刷新
-        </el-button>
+        <el-button :size="size" @click="handleOpenAddDrawer"> 新 增 </el-button>
       </el-col>
     </el-row>
     <el-table
-      @row-dblclick="handleOpenSeeDrawer"
+      @row-dblclick="handleOpenSeeDialog"
       :data="tableData"
       :size="size"
       style="width: 100%; margin: 20px 0 0 0"

+ 7 - 26
src/views/purchase/contract/see/index.vue

@@ -13,7 +13,7 @@ const NewTabColumns = TabColumns.map((element) => ({
 }));
 
 export default {
-  name: "SeeDrawer",
+  name: "SeeDialog",
   dicts: initDicts(NewColumns),
   data() {
     return {
@@ -102,14 +102,13 @@ export default {
 };
 </script>
 <template>
-  <el-drawer
-    direction="btt"
-    size="100%"
-    :with-header="false"
+  <el-dialog
     :visible.sync="visible"
+    title="明细"
+    append-to-body
     destroy-on-close
   >
-    <el-form
+    <!-- <el-form
       v-loading="loading"
       size="mini"
       label-position="right"
@@ -290,28 +289,10 @@ export default {
                   </el-input>
                 </template>
               </el-table-column>
-              <!-- <el-table-column fixed="right" label="操作" width="120">
-                <template slot-scope="scope">
-                  <el-button
-                    @click.native.prevent="
-                      delTableRow(params[tabName], scope.$index)
-                    "
-                    type="text"
-                    size="small"
-                  >
-                    删行
-                  </el-button>
-                </template>
-              </el-table-column> -->
             </el-table>
           </el-tab-pane>
         </el-tabs>
-        <!-- <el-row style="position: absolute; top: 20px; right: 20px">
-          <el-button size="mini" @click="addTableRow(params[tabName])"
-            >增行</el-button
-          >
-        </el-row> -->
       </el-card>
-    </el-form>
-  </el-drawer>
+    </el-form> -->
+  </el-dialog>
 </template>

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

@@ -174,7 +174,7 @@ export const SearchColumns = [
     inputType: "PopoverSelect",
     multiple: true,
     valueKey: "id",
-    referName: "PSNLICENSE_PARAM",
+    referName: "CONTACTS_PARAM",
     readonly: true,
     dataMapping: {},
     queryParams: () => ({}),

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

@@ -49,7 +49,12 @@ export default {
 </script>
 
 <template>
-  <el-dialog title="请购退回" width="30%" :visible.sync="visible">
+  <el-dialog
+    :visible.sync="visible"
+    title="请购退回"
+    append-to-body
+    destroy-on-close
+  >
     <el-alert
       title="请填写退单原因"
       type="info"

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

@@ -67,16 +67,19 @@ export default {
       }
     },
   },
-  created() {
-    console.log("initColumns(TableColumns)", initColumns(TableColumns));
-  },
+  created() {},
   mounted() {},
   destroyed() {},
 };
 </script>
 
 <template>
-  <el-dialog :with-header="false" :visible.sync="visible">
+  <el-dialog
+    :visible.sync="visible"
+    append-to-body
+    destroy-on-close
+    title="首次协议直采"
+  >
     <div
       v-for="(item, index) in data"
       :key="index"

+ 24 - 15
src/views/purchase/task/index.vue

@@ -38,7 +38,7 @@ export default {
   computed: {},
   watch: {},
   created() {
-    this.handleQueryList();
+    this.handleQueryList(this.params, this.page);
   },
   methods: {
     //
@@ -64,17 +64,17 @@ export default {
       }
     },
     // 查询操作
-    handleQueryList() {
-      const { date } = this.params;
-      this.params.endDate = date[1];
-      this.params.startDate = date[0];
-      this.fetchList({ ...this.params }, this.page);
+    handleQueryList(prop, page) {
+      const { date } = prop;
+      prop.endDate = date[1];
+      prop.startDate = date[0];
+      this.fetchList({ ...prop, date: undefined }, page);
     },
     // 重置操作
-    handleResetList() {
+    handleResetList(prop, page) {
       this.page = initPage();
       this.params = initParams(SearchColumns);
-      this.handleQueryList(this.params, this.page);
+      this.handleQueryList(prop, page);
     },
     // 页大小变
     handleSizeChange(prop) {
@@ -234,6 +234,7 @@ export default {
               :title="column.title"
               :type="column.referName"
               :multiple="column.multiple"
+              :value-key="column.valueKey"
               :placeholder="column.placeholder"
               :data-mapping="column.dataMapping"
               :query-params="column.queryParams(params)"
@@ -259,11 +260,19 @@ export default {
             </dr-popover-tree-select>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
-          <el-button type="primary" :size="size" @click="handleQueryList">
-            搜 索
-          </el-button>
-          <el-button :size="size" @click="handleResetList"> 重 置 </el-button>
+        <el-col :xl="4" :lg="6" :md="8" :sm="12" :xs="24">
+          <el-button
+            circle
+            :size="size"
+            icon="el-icon-search"
+            @click="handleQueryList(params, page)"
+          ></el-button>
+          <el-button
+            circle
+            :size="size"
+            icon="el-icon-refresh"
+            @click="handleResetList(params, page)"
+          ></el-button>
         </el-col>
       </el-row>
     </el-form>
@@ -286,13 +295,13 @@ export default {
         >
           退回请购
         </el-button>
-        <el-button
+        <!-- <el-button
           :size="size"
           :disabled="selectData.length !== 1"
           @click="handleShutDown(selectData[0])"
         >
           行关闭
-        </el-button>
+        </el-button> -->
         <el-button
           :size="size"
           :disabled="!selectData.length"

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

@@ -44,7 +44,12 @@ export default {
 </script>
 
 <template>
-  <el-dialog title="转派" width="30%" :visible.sync="visible">
+  <el-dialog
+    :visible.sync="visible"
+    title="转派"
+    append-to-body
+    destroy-on-close
+  >
     <el-alert
       title="转派后,采购任务将会从您的采购任务清单中删除,转移到转派目标人员的已受理采购任务清单中,您确定要转派吗?"
       type="info"

+ 7 - 2
src/views/purchase/task/see/index.vue

@@ -46,8 +46,13 @@ export default {
 };
 </script>
 <template>
-  <el-dialog :visible.sync="visible">
-    <el-descriptions :column="2" title="明细" border>
+  <el-dialog
+    :visible.sync="visible"
+    title="明细"
+    append-to-body
+    destroy-on-close
+  >
+    <el-descriptions :column="2" border>
       <el-descriptions-item
         v-if="params[column.key]"
         v-for="(column, index) in columns"

+ 1 - 1
vue.config.js

@@ -45,7 +45,7 @@ module.exports = {
         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本地
+        target: `http://172.16.13.77:8000/drp-admin`, //TQ本地
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",