002201 2 лет назад
Родитель
Сommit
b6a89cc951

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

@@ -148,7 +148,9 @@ export default {
       this.$emit("change", prop, this.$props);
     },
   },
-  created() {},
+  created() {
+    console.log("this", this);
+  },
   mounted() {},
   destroyed() {},
 };

+ 12 - 8
src/views/purchase/apply/column.js

@@ -29,7 +29,7 @@ export const SearchColumns = [
   {
     item: { key: "supplierName", title: "供应商" },
     attr: {
-      component: "el-popover-select-v2",
+      is: "el-popover-select-v2",
       referName: "SUPPLIER_PARAM",
       valueKey: "name",
       dataMapping: { supplier: "id", supplierName: "name" },
@@ -38,16 +38,20 @@ export const SearchColumns = [
   {
     item: { key: "puOrgName", title: "采购组织" },
     attr: {
-      component: "el-popover-select-v2",
+      is: "el-popover-select-v2",
       referName: "ORG_PARAM",
       valueKey: "name",
       dataMapping: { puOrg: "id", puOrgName: "name" },
     },
+    on: {
+      change: true,
+      "keyup.enter.native": true,
+    },
   },
   {
     item: { key: "buyerName", title: "采购员" },
     attr: {
-      component: "el-popover-select-v2",
+      is: "el-popover-select-v2",
       referName: "CONTACTS_PARAM",
       valueKey: "name",
       dataMapping: { buyer: "id", buyerName: "name" },
@@ -56,7 +60,7 @@ export const SearchColumns = [
   {
     item: { key: "currencyName", title: "币种" },
     attr: {
-      component: "el-popover-select-v2",
+      is: "el-popover-select-v2",
       referName: "CURRENCY_PARAM",
       valueKey: "name",
       dataMapping: { currency: "id", currencyName: "name" },
@@ -65,7 +69,7 @@ export const SearchColumns = [
   {
     item: { key: "puDeptName", title: "采购部门" },
     attr: {
-      component: "el-popover-select-v2",
+      is: "el-popover-select-v2",
       referName: "DEPT_PARAM",
       valueKey: "name",
       dataMapping: { puDept: "id", puDeptName: "name" },
@@ -74,7 +78,7 @@ export const SearchColumns = [
   {
     item: { key: "isEffective", title: "是否推价" },
     attr: {
-      component: "el-select",
+      is: "el-select",
       dictName: "is_effective",
       clearable: true,
     },
@@ -82,9 +86,9 @@ export const SearchColumns = [
   {
     item: { key: "status", title: "状态" },
     attr: {
-      component: "el-select",
+      is: "el-select",
       dictName: "sys_status",
       clearable: true,
     },
   },
-];
+];

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

@@ -198,9 +198,6 @@ export default {
               v-bind="column.attr"
               v-model="params[column.item.key]"
               :source.sync="params"
-              :is="column.attr.component"
-              @change="useQuery(params, page)"
-              @keyup.enter.native="useQuery(params, page)"
               style="width: 100%"
             >
               <template v-if="column.attr.dictName">

+ 29 - 20
src/views/purchase/apply/see/index.vue

@@ -40,10 +40,10 @@ export default {
         this.loading = true;
         const { params } = this.$father;
         const {
-          code,
           total,
-          rows: [data],
+          rows: [{ id }],
         } = await LIST({ ...params }, { pageNum: prop, pageSize: 1 });
+        const { code, data } = await ITEM(id);
         if (code === 200) {
           this.params = data;
           this.params.$index = prop;
@@ -99,27 +99,36 @@ export default {
     :show-close="false"
     :visible.sync="visible"
   >
+    <div
+      style="
+        position: fixed;
+        right: 20px;
+        top: 50%;
+        transform: translateY(-50%);
+        display: flex;
+        flex-direction: column;
+      "
+    >
+      <el-button
+        :size="size"
+        :disabled="params.$index === 1"
+        circle
+        icon="el-icon-top"
+        @click="fetchItem(params.$index - 1)"
+        style="margin: 0 0 10px 0"
+      ></el-button>
+      <el-button
+        :size="size"
+        :disabled="params.$index === params.$total"
+        circle
+        icon="el-icon-bottom"
+        @click="fetchItem(params.$index + 1)"
+        style="margin: 0"
+      ></el-button>
+    </div>
     <template slot="title">
       <span>{{ title }}</span>
       <span>
-        <el-tooltip effect="dark" content="上一页" placement="bottom-end">
-          <el-button
-            :size="size"
-            :disabled="params.$index === 1"
-            circle
-            icon="el-icon-top"
-            @click="fetchItem(params.$index - 1)"
-          ></el-button>
-        </el-tooltip>
-        <el-tooltip effect="dark" content="下一页" placement="bottom-end">
-          <el-button
-            :size="size"
-            :disabled="params.$index === params.$total"
-            circle
-            icon="el-icon-bottom"
-            @click="fetchItem(params.$index + 1)"
-          ></el-button>
-        </el-tooltip>
         <el-tooltip effect="dark" content="删 除" placement="bottom-end">
           <el-button
             :size="size"