002201 1 year ago
parent
commit
6e5ede3602

+ 6 - 2
src/assets/styles/index.scss

@@ -211,10 +211,14 @@ aside {
 }
 }
 /*表格*/
 /*表格*/
 .el-table__body-wrapper::-webkit-scrollbar {
 .el-table__body-wrapper::-webkit-scrollbar {
-  width: 10px;
-  height: 10px;
+  width: 8px;
+  height: 8px;
 }
 }
 .el-table__body-wrapper::-webkit-scrollbar-thumb {
 .el-table__body-wrapper::-webkit-scrollbar-thumb {
   background-color: #a1a3a9;
   background-color: #a1a3a9;
   border-radius: 3px;
   border-radius: 3px;
 }
 }
+.el-input__suffix {
+  display: flex;
+  align-items: center;
+}

+ 1 - 1
src/components/Pagination/index.vue

@@ -36,7 +36,7 @@ export default {
     pageSizes: {
     pageSizes: {
       type: Array,
       type: Array,
       default() {
       default() {
-        return [1, 10, 20, 30, 50];
+        return [1, 10, 20, 50, 100];
       },
       },
     },
     },
     // 移动端页码按钮的数量端默认值5
     // 移动端页码按钮的数量端默认值5

+ 56 - 0
src/components/popover-select-v2/fetch/index.js

@@ -0,0 +1,56 @@
+import { REFER } from "@/components/popover-select/api";
+
+// 币种
+export const currency = async (prop) => {
+  try {
+    // try
+    const { code, rows } = await REFER({
+      search: prop,
+      type: "CURRENCY_PARAM",
+    });
+    if (code === 200) {
+      return rows[0] || {};
+    }
+  } catch (err) {
+    // catch
+    console.error(err);
+  } finally {
+    // finally
+  }
+};
+// 税率
+export const tax = async (prop) => {
+  try {
+    // try
+    const { code, rows } = await REFER({
+      search: prop,
+      type: "TAX_RATE_PARAM",
+    });
+    if (code === 200) {
+      return rows[0] || {};
+    }
+  } catch (err) {
+    // catch
+    console.error(err);
+  } finally {
+    // finally
+  }
+};
+// 单位
+export const unit = async (prop) => {
+  try {
+    // try
+    const { code, rows } = await REFER({
+      search: prop,
+      type: "UNIT_PARAM",
+    });
+    if (code === 200) {
+      return rows[0] || {};
+    }
+  } catch (err) {
+    // catch
+    console.error(err);
+  } finally {
+    // finally
+  }
+};

+ 5 - 12
src/components/super-search/index.vue

@@ -28,15 +28,13 @@ export default {
   },
   },
   data() {
   data() {
     const { columns } = this.$props;
     const { columns } = this.$props;
-    const stroageKey = (
-      this.$parent.$parent.$options.name + "_search"
-    ).toUpperCase();
-    const loaclColumns = JSON.parse(localStorage.getItem(stroageKey));
-    const innerColumns = !!loaclColumns ? loaclColumns : columns;
+    const innerColumns = columns.map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+    }));
     return {
     return {
       drawer: false,
       drawer: false,
       visible: false,
       visible: false,
-      stroageKey: stroageKey,
       innerColumns: innerColumns,
       innerColumns: innerColumns,
     };
     };
   },
   },
@@ -51,18 +49,13 @@ export default {
     },
     },
     showColumns: {
     showColumns: {
       get() {
       get() {
-        const columns = this.innerColumns.filter(({ item }) => item.hidden);
-        return this.visible ? columns : columns.slice(0, 4);
+        return this.innerColumns.filter(({ item }) => item.hidden);
       },
       },
       set() {},
       set() {},
     },
     },
   },
   },
   watch: {},
   watch: {},
   methods: {
   methods: {
-    changeColumns() {
-      const { stroageKey, innerColumns } = this;
-      localStorage.setItem(stroageKey, JSON.stringify(innerColumns));
-    },
     onVisible() {
     onVisible() {
       this.visible = !this.visible;
       this.visible = !this.visible;
     },
     },

+ 19 - 40
src/components/super-table/index.vue

@@ -47,20 +47,16 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false,
       default: false,
     },
     },
+    // 是否列过滤
+    filterColumns: {
+      type: Boolean,
+      default: false,
+    },
     // 是否禁止选择
     // 是否禁止选择
     selectable: {
     selectable: {
       type: Function,
       type: Function,
       default: () => {},
       default: () => {},
     },
     },
-
-    // stroage: {
-    //   type: Boolean,
-    //   default: false,
-    // },
-    // hideOperationColumns: {
-    //   type: Boolean,
-    //   default: false,
-    // },
   },
   },
   components: {
   components: {
     ElDictTag: () => import("@/components/DictTag/index.vue"),
     ElDictTag: () => import("@/components/DictTag/index.vue"),
@@ -78,7 +74,10 @@ export default {
   },
   },
   data() {
   data() {
     const { columns } = this.$props;
     const { columns } = this.$props;
-    const innerColumns = columns;
+    const innerColumns = columns.map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true },
+    }));
     return {
     return {
       innerColumns: innerColumns,
       innerColumns: innerColumns,
       rowKey: "id",
       rowKey: "id",
@@ -148,30 +147,10 @@ export default {
       this.selectData = value;
       this.selectData = value;
     },
     },
     //
     //
-    onCellStyle({ row, column }) {
-      const { selectable } = this.$props;
-      // 禁止状态
-      if (!selectable(row)) {
-        return {
-          cursor: "no-drop",
-        };
-      }
-      // 选中状态
-      // if (
-      //   column.label === "#" &&
-      //   this.selectData.find((item) => item.id === row.id)
-      // ) {
-      //   return {
-      //     color: "#fff",
-      //     backgroundColor: "#409EFF",
-      //   };
-      // }
-    },
-    //
     onRowClick(row, column, event) {
     onRowClick(row, column, event) {
-      const { radio, checkbox, selectable } = this.$props;
+      const { radio, checkbox } = this.$props;
       // 单选
       // 单选
-      if (radio && selectable(row)) {
+      if (radio) {
         this.selectData = [row];
         this.selectData = [row];
         this.innerValue = this.innerValue.map((item) => ({
         this.innerValue = this.innerValue.map((item) => ({
           ...item,
           ...item,
@@ -180,7 +159,7 @@ export default {
         this.$emit("row-select", this.selectData);
         this.$emit("row-select", this.selectData);
       }
       }
       // 多选
       // 多选
-      if (checkbox && selectable(row)) {
+      if (checkbox) {
         this.$refs.superTable.toggleRowSelection(
         this.$refs.superTable.toggleRowSelection(
           this.innerValue.find((item) => item.id === row.id)
           this.innerValue.find((item) => item.id === row.id)
         );
         );
@@ -240,16 +219,14 @@ export default {
 <template>
 <template>
   <div class="el-super-table">
   <div class="el-super-table">
     <el-table
     <el-table
-      v-bind="$attrs"
-      v-on="$listeners"
       ref="superTable"
       ref="superTable"
       border
       border
       :row-key="rowKey"
       :row-key="rowKey"
       :data="innerValue"
       :data="innerValue"
-      :cell-style="onCellStyle"
-      :row-style="{ height: '50px' }"
       @row-click="onRowClick"
       @row-click="onRowClick"
       @selection-change="onSelectionChange"
       @selection-change="onSelectionChange"
+      v-bind="$attrs"
+      v-on="$listeners"
     >
     >
       <!-- 序号 -->
       <!-- 序号 -->
       <el-table-column
       <el-table-column
@@ -269,7 +246,6 @@ export default {
       <el-table-column
       <el-table-column
         v-if="checkbox"
         v-if="checkbox"
         :column-key="rowKey"
         :column-key="rowKey"
-        :selectable="selectable"
         fixed
         fixed
         width="50"
         width="50"
         align="center"
         align="center"
@@ -283,11 +259,12 @@ export default {
         :prop="item.key"
         :prop="item.key"
         :label="item.title"
         :label="item.title"
         :fixed="item.fixed"
         :fixed="item.fixed"
-        :width="item.width"
+        :width="item.width || 200"
         show-overflow-tooltip
         show-overflow-tooltip
       >
       >
         <template slot="header" slot-scope="scope">
         <template slot="header" slot-scope="scope">
           <template>
           <template>
+            <span v-if="item.require" style="color: #ff4949">*</span>
             <span
             <span
               :style="{
               :style="{
                 color:
                 color:
@@ -319,6 +296,7 @@ export default {
               }"
               }"
             ></icon-freeze>
             ></icon-freeze>
             <icon-filter
             <icon-filter
+              v-if="filterColumns"
               v-model="item.filter"
               v-model="item.filter"
               class="icon-filter"
               class="icon-filter"
               :filters="onFilters({ item, attr })"
               :filters="onFilters({ item, attr })"
@@ -336,7 +314,6 @@ export default {
               @hide="onHide"
               @hide="onHide"
             ></icon-hide>
             ></icon-hide>
           </template>
           </template>
-          <!-- <template v-else>{{ item.title }}</template> -->
         </template>
         </template>
         <template slot-scope="scope">
         <template slot-scope="scope">
           <slot :name="item.key" v-bind="scope" :item="item" :attr="attr">
           <slot :name="item.key" v-bind="scope" :item="item" :attr="attr">
@@ -377,6 +354,7 @@ export default {
                 v-bind="attr"
                 v-bind="attr"
                 v-model="scope.row[item.key]"
                 v-model="scope.row[item.key]"
                 :size="$attrs.size"
                 :size="$attrs.size"
+                style="width: 100%"
               >
               >
               </component
               </component
             ></template>
             ></template>
@@ -429,6 +407,7 @@ export default {
         </template>
         </template>
       </div>
       </div>
       <pagination
       <pagination
+        v-if="page"
         v-show="!selectState"
         v-show="!selectState"
         :total="page.total"
         :total="page.total"
         :page.sync="page.pageNum"
         :page.sync="page.pageNum"

+ 2 - 1
src/main.js

@@ -29,7 +29,7 @@ import {
   selectDictLabels,
   selectDictLabels,
   handleTree,
   handleTree,
 } from "@/utils/ruoyi";
 } from "@/utils/ruoyi";
-import { initParams, initRules, initDicts } from "@/utils/init.js";
+import { initParams, initRules, initDicts, initPage } from "@/utils/init.js";
 // 分页组件
 // 分页组件
 import Pagination from "@/components/Pagination";
 import Pagination from "@/components/Pagination";
 // 自定义表格工具组件
 // 自定义表格工具组件
@@ -73,6 +73,7 @@ Vue.prototype.$init = {
   params: initParams,
   params: initParams,
   dicts: initDicts,
   dicts: initDicts,
   rules: initRules,
   rules: initRules,
+  page: initPage,
 };
 };
 
 
 // 全局组件挂载
 // 全局组件挂载

+ 4 - 0
src/utils/init.js

@@ -48,3 +48,7 @@ export const initDicts = (prop) => {
     )
     )
   );
   );
 };
 };
+
+export const initPage = () => {
+  return { pageNum: 1, pageSize: 20, total: 0 };
+};

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

@@ -33,4 +33,6 @@ export const initRules = (prop) => {
   return rules;
   return rules;
 };
 };
 
 
-export const initPage = () => ({ pageNum: 1, pageSize: 10, total: 0, });
+export const initPage = () => {
+  return { pageNum: 1, pageSize: 20, total: 0 };
+};

+ 8 - 38
src/views/purchase/apply/add/columns.js

@@ -3,10 +3,6 @@ import CONFIG from "@/config";
 export default function useColumns() {
 export default function useColumns() {
   const TableColumns = [
   const TableColumns = [
     {
     {
-      item: { key: "priceName", title: "价格名称" },
-      attr: { is: "el-input", value: "价格申报单" },
-    },
-    {
       item: { key: "priceCode", title: "价格编码" },
       item: { key: "priceCode", title: "价格编码" },
       attr: { is: "el-input", disabled: true, readonly: true },
       attr: { is: "el-input", disabled: true, readonly: true },
     },
     },
@@ -80,6 +76,7 @@ export default function useColumns() {
       attr: {
       attr: {
         is: "el-select",
         is: "el-select",
         dictName: "is_effective",
         dictName: "is_effective",
+        value: "N",
       },
       },
     },
     },
     {
     {
@@ -138,7 +135,10 @@ export default function useColumns() {
             },
             },
           },
           },
         },
         },
-        { item: { key: "materialCode", title: "物料编码" }, attr: {} },
+        {
+          item: { key: "materialCode", title: "物料编码", require: true },
+          attr: {},
+        },
         { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
@@ -267,10 +267,11 @@ export default function useColumns() {
           },
           },
         },
         },
         {
         {
-          item: { key: "priceType", title: "价格类型" },
+          item: { key: "priceType", title: "价格类型", require: true },
           attr: {
           attr: {
             is: "el-select",
             is: "el-select",
             dictName: "sys_price_type",
             dictName: "sys_price_type",
+            value: "order",
           },
           },
         },
         },
         {
         {
@@ -278,44 +279,13 @@ export default function useColumns() {
           attr: {
           attr: {
             is: "el-select",
             is: "el-select",
             dictName: "is_effective",
             dictName: "is_effective",
+            value: "N",
           },
           },
         },
         },
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
       ],
       ],
     },
     },
-    {
-      item: {
-        title: "合同执行组织范围",
-        key: "priceApplyOrgs",
-      },
-      attr: {
-        value: [],
-      },
-      TableColumns: [
-        {
-          item: { key: "orgName", title: "组织", require: true, width: "auto" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "ORG_PARAM",
-            dataMapping: {
-              org: "id",
-              orgCode: "code",
-              orgName: "name",
-            },
-          },
-        },
-        {
-          item: { key: "createByName", title: "创建人名称", width: "auto" },
-          attr: {},
-        },
-        {
-          item: { key: "updateByName", title: "更新人名称", width: "auto" },
-          attr: {},
-        },
-      ],
-    },
   ];
   ];
 
 
   return { TableColumns, TabColumns };
   return { TableColumns, TabColumns };

+ 57 - 119
src/views/purchase/apply/add/index.vue

@@ -1,44 +1,8 @@
 <script>
 <script>
 import useColumns from "./columns";
 import useColumns from "./columns";
-import { REFER } from "@/components/popover-select/api";
 import { EXIST } from "@/api/business/purchase/catalogue";
 import { EXIST } from "@/api/business/purchase/catalogue";
 import { ITEM, SAVE } from "@/api/business/purchase/apply";
 import { ITEM, SAVE } from "@/api/business/purchase/apply";
-
-const fetchTax = async (prop) => {
-  try {
-    // try
-    const { code, rows } = await REFER({
-      search: prop,
-      type: "TAX_RATE_PARAM",
-    });
-    if (code === 200) {
-      return rows[0] || {};
-    }
-  } catch (err) {
-    // catch
-    console.error(err);
-  } finally {
-    // finally
-  }
-};
-
-const fetchUnit = async (prop) => {
-  try {
-    // try
-    const { code, rows } = await REFER({
-      search: prop,
-      type: "UNIT_PARAM",
-    });
-    if (code === 200) {
-      return rows[0] || {};
-    }
-  } catch (err) {
-    // catch
-    console.error(err);
-  } finally {
-    // finally
-  }
-};
+import { tax, unit, currency } from "@/components/popover-select-v2/fetch";
 
 
 const fetchExist = async (prop) => {
 const fetchExist = async (prop) => {
   try {
   try {
@@ -143,21 +107,13 @@ export default {
     },
     },
     priceApply: {
     priceApply: {
       get() {
       get() {
-        const {
-          params: { priceApplyOrgs, priceApplyItems },
-        } = this;
-        this.params.priceApplyOrgs = priceApplyOrgs.map((item, index) => ({
-          ...item,
-          $index: index,
-        }));
-        this.params.priceApplyItems = priceApplyItems.map((item, index) => ({
-          ...item,
-          $index: index,
-        }));
+        this.params.priceApplyItems = this.params.priceApplyItems.map(
+          (item, index) => ({
+            ...item,
+            $index: index,
+          })
+        );
         return {
         return {
-          priceApplyOrgs: this.params.priceApplyOrgs.filter(
-            ({ delFlag }) => delFlag !== "2"
-          ),
           priceApplyItems: this.params.priceApplyItems.filter(
           priceApplyItems: this.params.priceApplyItems.filter(
             ({ delFlag }) => delFlag !== "2"
             ({ delFlag }) => delFlag !== "2"
           ),
           ),
@@ -169,35 +125,17 @@ export default {
   watch: {},
   watch: {},
   methods: {
   methods: {
     //
     //
-    changePuOrgName(prop) {
-      const {
-        select: { id: org, code: orgCode, name: orgName },
-      } = prop;
-      const index = this.params.priceApplyOrgs.findIndex(
-        (item) => item.org === org
-      );
-      if (index === -1) {
-        this.params.priceApplyOrgs.push({
-          org,
-          orgCode,
-          orgName,
-          createByName: undefined,
-          updateByName: undefined,
-        });
-      }
-    },
-    //
     changeMaterialName(prop) {
     changeMaterialName(prop) {
       const { row } = prop;
       const { row } = prop;
       const { puOrg, customer, supplier } = this.params;
       const { puOrg, customer, supplier } = this.params;
       const { rateCode, unitIdName, code: materialCode } = row;
       const { rateCode, unitIdName, code: materialCode } = row;
       // task 1
       // task 1
-      fetchTax(rateCode).then((res) => {
+      tax(rateCode).then((res) => {
         const { ntaxrate } = res;
         const { ntaxrate } = res;
         row.tax = ntaxrate === "0E-8" ? "0.000000" : (ntaxrate * 1).toFixed(6);
         row.tax = ntaxrate === "0E-8" ? "0.000000" : (ntaxrate * 1).toFixed(6);
       });
       });
       // task 2
       // task 2
-      fetchUnit(unitIdName).then((res) => {
+      unit(unitIdName).then((res) => {
         const { id, code, name } = res;
         const { id, code, name } = res;
         row.unit = id;
         row.unit = id;
         row.unitCode = code;
         row.unitCode = code;
@@ -236,10 +174,28 @@ export default {
       }
       }
     },
     },
     //
     //
-    async open() {
+    async onOpen() {
       const { addType, selectData } = this.$props;
       const { addType, selectData } = this.$props;
       if (addType === "add") {
       if (addType === "add") {
         this.visible = true;
         this.visible = true;
+        const {
+          deptId: puDept,
+          deptName: puDeptName,
+          name: buyer,
+          nickName: buyerName,
+          orgId: puOrg,
+          orgName: puOrgName,
+        } = this.$store.state.user;
+        const { id, code, name } = await currency("人民币");
+        this.params.currency = id;
+        this.params.currencyCode = code;
+        this.params.currencyName = name;
+        this.params.puOrg = puOrg;
+        this.params.puOrgName = puOrgName;
+        this.params.buyer = buyer;
+        this.params.buyerName = buyerName;
+        this.params.puDept = puDept;
+        this.params.puDeptName = puDeptName;
       }
       }
       if (addType === "copy") {
       if (addType === "copy") {
         const [{ id }] = selectData;
         const [{ id }] = selectData;
@@ -258,13 +214,6 @@ export default {
             updateByName: null,
             updateByName: null,
           })
           })
         );
         );
-        this.params.priceApplyOrgs = this.params.priceApplyOrgs.map((item) => ({
-          ...item,
-          id: null,
-          applyId: null,
-          createByName: null,
-          updateByName: null,
-        }));
       }
       }
       if (addType === "edit") {
       if (addType === "edit") {
         const [{ id }] = selectData;
         const [{ id }] = selectData;
@@ -274,13 +223,10 @@ export default {
             ...item,
             ...item,
           })
           })
         );
         );
-        this.params.priceApplyOrgs = this.params.priceApplyOrgs.map((item) => ({
-          ...item,
-        }));
       }
       }
     },
     },
     //
     //
-    async hide() {
+    async onHide() {
       const {
       const {
         TabColumns,
         TabColumns,
         TableColumns,
         TableColumns,
@@ -295,7 +241,7 @@ export default {
       this.params = this.$init.params([...TabColumns, ...TableColumns]);
       this.params = this.$init.params([...TabColumns, ...TableColumns]);
     },
     },
     //
     //
-    async useRowAdd(prop) {
+    async onRowAdd(prop) {
       const {
       const {
         $notify,
         $notify,
         TabColumns,
         TabColumns,
@@ -316,7 +262,7 @@ export default {
       });
       });
     },
     },
     //
     //
-    async useRowRemove(prop, scope) {
+    async onRowRemove(prop, scope) {
       const { addType } = this.$props;
       const { addType } = this.$props;
       const {
       const {
         row: { $index },
         row: { $index },
@@ -338,24 +284,18 @@ export default {
     //
     //
     async useSubmit(prop) {
     async useSubmit(prop) {
       this.$refs[prop].$refs[prop].validate(async (valid) => {
       this.$refs[prop].$refs[prop].validate(async (valid) => {
+        console.log(this.params);
         if (valid) {
         if (valid) {
           try {
           try {
             this.loading = true;
             this.loading = true;
-            const {
-              params,
-              params: { priceApplyOrgs, priceApplyItems },
-            } = this;
             if (this.addType === "edit") {
             if (this.addType === "edit") {
-              params.priceApplyOrgs = priceApplyOrgs.filter(
-                (item) => item.orgName
-              );
-              params.priceApplyItems = priceApplyItems.filter(
+              this.params.priceApplyItems = this.params.priceApplyItems.filter(
                 (item) => item.materialName
                 (item) => item.materialName
               );
               );
             }
             }
-            const { msg, code } = await SAVE(params);
+            const { msg, code } = await SAVE(this.params);
             if (code === 200) {
             if (code === 200) {
-              this.hide();
+              this.onHide();
               this.$emit("success");
               this.$emit("success");
               this.$notify.success(msg);
               this.$notify.success(msg);
             }
             }
@@ -382,17 +322,32 @@ export default {
     v-bind="$attrs"
     v-bind="$attrs"
     v-on="$listeners"
     v-on="$listeners"
     :disabled="disabled"
     :disabled="disabled"
-    @click="open"
+    @click="onOpen"
   >
   >
     {{ title }}
     {{ title }}
     <el-drawer
     <el-drawer
+      :show-close="false"
       :size="width"
       :size="width"
       :title="title"
       :title="title"
       :visible.sync="visible"
       :visible.sync="visible"
       append-to-body
       append-to-body
       destroy-on-close
       destroy-on-close
-      @close="hide"
+      @close="onHide"
     >
     >
+      <template slot="title">
+        <span>{{ title }}</span>
+        <el-button
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="useSubmit('superForm')"
+        >
+          确 认
+        </el-button>
+        <el-button :size="$attrs.size" :loading="loading" @click="onHide">
+          取 消
+        </el-button>
+      </template>
       <el-super-form
       <el-super-form
         v-model="params"
         v-model="params"
         :dict="dict"
         :dict="dict"
@@ -440,41 +395,24 @@ export default {
               >
               >
               </component>
               </component>
             </template>
             </template>
-            <el-table-column fixed="right" label="操作" width="75">
+            <el-table-column fixed="right" label="操作" width="100">
               <template slot="header" slot-scope="scope">
               <template slot="header" slot-scope="scope">
-                <el-button
-                  circle
-                  icon="el-icon-plus"
-                  :size="$attrs.size"
-                  @click="useRowAdd(tabName)"
-                >
+                <el-button :size="$attrs.size" @click="onRowAdd(tabName)">
+                  新增
                 </el-button>
                 </el-button>
               </template>
               </template>
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <el-button
                 <el-button
-                  circle
-                  icon="el-icon-minus"
                   :size="$attrs.size"
                   :size="$attrs.size"
-                  @click.native.prevent="useRowRemove(tabName, scope)"
+                  @click.native.prevent="onRowRemove(tabName, scope)"
                 >
                 >
+                  删除
                 </el-button>
                 </el-button>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
           </el-super-table>
           </el-super-table>
         </el-tab-pane>
         </el-tab-pane>
       </el-tabs>
       </el-tabs>
-      <div style="padding: 20px; text-align: right">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useSubmit('superForm')"
-          >确 认</el-button
-        >
-      </div>
     </el-drawer>
     </el-drawer>
   </el-button>
   </el-button>
 </template>
 </template>

+ 1 - 5
src/views/purchase/apply/columns.js

@@ -2,7 +2,6 @@ import CONFIG from "@/config";
 
 
 export default function useColumns() {
 export default function useColumns() {
   const TableColumns = [
   const TableColumns = [
-    { item: { key: "priceName", title: "价格名称" }, attr: {} },
     { item: { key: "priceCode", title: "价格编码" }, attr: {} },
     { item: { key: "priceCode", title: "价格编码" }, attr: {} },
     {
     {
       item: { key: "status", title: "状态" },
       item: { key: "status", title: "状态" },
@@ -100,10 +99,7 @@ export default function useColumns() {
         clearable: true,
         clearable: true,
       },
       },
     },
     },
-  ].map(({ item, attr }) => ({
-    attr,
-    item: { ...item, hidden: true, span: item.span || 6 },
-  }));
+  ];
 
 
   return { TableColumns, SearchColumns };
   return { TableColumns, SearchColumns };
 }
 }

+ 19 - 24
src/views/purchase/apply/index.vue

@@ -16,16 +16,17 @@ export default {
   },
   },
   data() {
   data() {
     const { TableColumns, SearchColumns } = useColumns();
     const { TableColumns, SearchColumns } = useColumns();
+    const page = this.$init.page();
     const params = this.$init.params(SearchColumns);
     const params = this.$init.params(SearchColumns);
     return {
     return {
       size: "mini",
       size: "mini",
       loading: false,
       loading: false,
       params: params,
       params: params,
+      page: page,
       tableData: [],
       tableData: [],
       selectData: [],
       selectData: [],
       SearchColumns: SearchColumns,
       SearchColumns: SearchColumns,
       TableColumns: TableColumns,
       TableColumns: TableColumns,
-      page: { pageNum: 1, pageSize: 10, total: 0 },
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -64,13 +65,13 @@ export default {
     },
     },
     // 重 置
     // 重 置
     useReset() {
     useReset() {
-      this.page.pageNum = 1;
-      this.page.pageSize = 10;
+      this.page = this.$init.page();
       this.params = this.$init.params(this.SearchColumns);
       this.params = this.$init.params(this.SearchColumns);
       this.useQuery(this.params, this.page);
       this.useQuery(this.params, this.page);
     },
     },
     // 选 择
     // 选 择
     useSelect(prop) {
     useSelect(prop) {
+      console.log("prop", prop);
       this.selectData = prop;
       this.selectData = prop;
     },
     },
     // 明 细
     // 明 细
@@ -92,7 +93,7 @@ export default {
       @reset="useReset"
       @reset="useReset"
       @submit="useQuery(params, page)"
       @submit="useQuery(params, page)"
     ></el-super-search>
     ></el-super-search>
-    <div style="margin: 0 0 20px 0; text-align: right">
+    <el-row class="my-4" style="text-align: right">
       <el-button-group>
       <el-button-group>
         <add-button
         <add-button
           :size="size"
           :size="size"
@@ -140,39 +141,33 @@ export default {
           @success="useQuery(params, page)"
           @success="useQuery(params, page)"
         ></subm-button>
         ></subm-button>
       </el-button-group>
       </el-button-group>
-    </div>
+    </el-row>
     <el-super-table
     <el-super-table
       v-model="tableData"
       v-model="tableData"
       :size="size"
       :size="size"
       :dict="dict"
       :dict="dict"
+      :page="page"
       :columns="TableColumns"
       :columns="TableColumns"
-      stroage
-      hideOperationColumns
+      index
+      checkbox
+      hiddenColumns
+      filterColumns
+      height="600"
       @row-dblclick="useSee"
       @row-dblclick="useSee"
-      @selection-change="useSelect"
+      @row-select="useSelect"
+      @pagination="useQuery(params, page)"
     >
     >
-      <el-table-column fixed width="55" align="center" label="#" prop="$index">
-      </el-table-column>
-      <el-table-column fixed width="55" align="center" type="selection">
-      </el-table-column>
     </el-super-table>
     </el-super-table>
-    <pagination
-      :total="page.total"
-      :page.sync="page.pageNum"
-      :limit.sync="page.pageSize"
-      @pagination="useQuery(params, page)"
-      style="height: 32px; margin: 20px 0 0 0; padding: 0 !important"
-    />
   </el-card>
   </el-card>
 </template>
 </template>
 <style scoped lang="scss">
 <style scoped lang="scss">
 .el-card {
 .el-card {
-  width: calc(100% - 20px);
-  height: 100%;
-  margin: 10px;
-  padding: 20px;
+  width: calc(100% - 32px);
+  margin: 16px;
+  padding: 16px;
+  border-radius: 8px;
 }
 }
 .el-button-group + .el-button-group {
 .el-button-group + .el-button-group {
-  margin: 0 0 0 10px;
+  margin: 0 0 0 8px;
 }
 }
 </style>
 </style>

+ 0 - 27
src/views/purchase/apply/see/columns.js

@@ -3,10 +3,6 @@ import CONFIG from "@/config";
 export default function useColumns() {
 export default function useColumns() {
   const TableColumns = [
   const TableColumns = [
     {
     {
-      item: { key: "priceName", title: "价格名称" },
-      attr: {},
-    },
-    {
       item: { key: "priceCode", title: "价格编码" },
       item: { key: "priceCode", title: "价格编码" },
       attr: {},
       attr: {},
     },
     },
@@ -181,29 +177,6 @@ export default function useColumns() {
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
       ],
       ],
     },
     },
-    {
-      item: {
-        title: "合同执行组织范围",
-        key: "priceApplyOrgs",
-      },
-      attr: {
-        value: [],
-      },
-      TableColumns: [
-        {
-          item: { key: "orgName", title: "组织", width: "auto" },
-          attr: {},
-        },
-        {
-          item: { key: "createByName", title: "创建人名称", width: "auto" },
-          attr: {},
-        },
-        {
-          item: { key: "updateByName", title: "更新人名称", width: "auto" },
-          attr: {},
-        },
-      ],
-    },
   ];
   ];
 
 
   return { TableColumns, TabColumns };
   return { TableColumns, TabColumns };

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

@@ -20,8 +20,8 @@ export default {
       ],
       ],
     } = useColumns();
     } = useColumns();
     return {
     return {
-      width: "50%",
-      column: 2,
+      width: "100%",
+      column: 3,
       title: "明 细",
       title: "明 细",
       visible: false,
       visible: false,
       loading: false,
       loading: false,
@@ -115,12 +115,19 @@ export default {
   >
   >
     {{ title }}
     {{ title }}
     <el-drawer
     <el-drawer
+      :show-close="false"
       :size="width"
       :size="width"
       :title="title"
       :title="title"
       :visible.sync="visible"
       :visible.sync="visible"
       append-to-body
       append-to-body
       @close="hide(selectData)"
       @close="hide(selectData)"
     >
     >
+      <template slot="title">
+        <span>{{ title }}</span>
+        <el-button :size="$attrs.size" :loading="loading" @click="hide">
+          取 消
+        </el-button>
+      </template>
       <div
       <div
         style="
         style="
           z-index: 6666;
           z-index: 6666;
@@ -170,6 +177,7 @@ export default {
             :size="$attrs.size"
             :size="$attrs.size"
             :dict="dict"
             :dict="dict"
             :columns="columns"
             :columns="columns"
+            :cell-style="{ height: '30px' }"
           >
           >
           </el-super-table>
           </el-super-table>
         </el-tab-pane>
         </el-tab-pane>

+ 0 - 1
src/views/purchase/catalogue/columns.js

@@ -60,7 +60,6 @@ export default function useColumns() {
       item: { key: "priceType", title: "价格类型" },
       item: { key: "priceType", title: "价格类型" },
       attr: { is: "el-dict-tag", dictName: "sys_price_type" },
       attr: { is: "el-dict-tag", dictName: "sys_price_type" },
     },
     },
-    { item: { key: "demandCode", title: "采购需求单号" }, attr: {} },
     { item: { key: "expiryEarly", title: "效期预警" }, attr: {} },
     { item: { key: "expiryEarly", title: "效期预警" }, attr: {} },
     { item: { key: "priority", title: "含税/无税优先" }, attr: {} },
     { item: { key: "priority", title: "含税/无税优先" }, attr: {} },
     { item: { key: "createByName", title: "创建人" }, attr: {} },
     { item: { key: "createByName", title: "创建人" }, attr: {} },

+ 4 - 0
src/views/purchase/catalogue/index.vue

@@ -137,7 +137,11 @@ export default {
       :dict="dict"
       :dict="dict"
       :page="page"
       :page="page"
       :columns="TableColumns"
       :columns="TableColumns"
+      index
       checkbox
       checkbox
+      hiddenColumns
+      filterColumns
+      height="600"
       @row-dblclick="useSee"
       @row-dblclick="useSee"
       @selection-change="useSelect"
       @selection-change="useSelect"
       @pagination="useQuery(params, page)"
       @pagination="useQuery(params, page)"

+ 0 - 1
src/views/purchase/catalogue/see/columns.js

@@ -60,7 +60,6 @@ export default function useColumns() {
       item: { key: "priceType", title: "价格类型" },
       item: { key: "priceType", title: "价格类型" },
       attr: { is: "el-dict-tag", dictName: "sys_price_type" },
       attr: { is: "el-dict-tag", dictName: "sys_price_type" },
     },
     },
-    { item: { key: "demandCode", title: "采购需求单号" }, attr: {} },
     { item: { key: "expiryEarly", title: "效期预警" }, attr: {} },
     { item: { key: "expiryEarly", title: "效期预警" }, attr: {} },
     { item: { key: "priority", title: "含税/无税优先" }, attr: {} },
     { item: { key: "priority", title: "含税/无税优先" }, attr: {} },
     { item: { key: "createByName", title: "创建人" }, attr: {} },
     { item: { key: "createByName", title: "创建人" }, attr: {} },

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

@@ -11,9 +11,9 @@ export default {
   data() {
   data() {
     const { TableColumns } = useColumns();
     const { TableColumns } = useColumns();
     return {
     return {
-      column: 1,
+      column: 3,
       title: "明 细",
       title: "明 细",
-      width: "25%",
+      width: "100%",
       visible: false,
       visible: false,
       loading: false,
       loading: false,
       params: {},
       params: {},
@@ -93,11 +93,18 @@ export default {
   >
   >
     {{ title }}
     {{ title }}
     <el-drawer
     <el-drawer
+      :show-close="false"
       :size="width"
       :size="width"
       :title="title"
       :title="title"
       :visible.sync="visible"
       :visible.sync="visible"
       append-to-body
       append-to-body
     >
     >
+      <template slot="title">
+        <span>{{ title }}</span>
+        <el-button :size="$attrs.size" :loading="loading" @click="hide">
+          取 消
+        </el-button>
+      </template>
       <div
       <div
         style="
         style="
           z-index: 6666;
           z-index: 6666;

+ 0 - 2
src/views/purchase/task/index.vue

@@ -170,7 +170,6 @@ export default {
       </el-button-group>
       </el-button-group>
     </div>
     </div>
     <el-super-table
     <el-super-table
-      :key="key"
       v-model="tableData"
       v-model="tableData"
       :size="size"
       :size="size"
       :dict="dict"
       :dict="dict"
@@ -183,7 +182,6 @@ export default {
       height="600"
       height="600"
       @row-select="useSelect"
       @row-select="useSelect"
       @pagination="useQuery(params, page)"
       @pagination="useQuery(params, page)"
-      style="flex: 1"
     >
     >
     </el-super-table>
     </el-super-table>
   </el-card>
   </el-card>