Browse Source

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

DongZ 1 year ago
parent
commit
f6ca52461b
63 changed files with 1469 additions and 941 deletions
  1. 1 1
      src/components/Pagination/index.vue
  2. 80 72
      src/components/popover-select-v2/index.vue
  3. 10 26
      src/components/popover-select/components/ADDRESS_PARAM.js
  4. 4 15
      src/components/popover-select/components/ALLOCATION_PARAM.js
  5. 5 15
      src/components/popover-select/components/BALATYPE_PARAM.js
  6. 4 8
      src/components/popover-select/components/CONTACTS_PARAM.js
  7. 13 16
      src/components/popover-select/components/CURRENCY_PARAM.js
  8. 4 8
      src/components/popover-select/components/CUSTOMERDEPT_PARAM.js
  9. 4 14
      src/components/popover-select/components/CUSTOMER_PARAM.js
  10. 4 8
      src/components/popover-select/components/CUSTOMER_PARAM_ZT.js
  11. 4 8
      src/components/popover-select/components/DEPT_PARAM.js
  12. 2 4
      src/components/popover-select/components/LINKMAN_PARAM.js
  13. 4 8
      src/components/popover-select/components/MANUFACTURER_PARAM.js
  14. 54 60
      src/components/popover-select/components/MATERIAL_PARAM.js
  15. 4 8
      src/components/popover-select/components/MK_SALESAREA_PARAM.js
  16. 2 4
      src/components/popover-select/components/MK_TARGET_CYCLE_PARAM.js
  17. 2 4
      src/components/popover-select/components/MK_TARGET_INDEX_PARAM.js
  18. 2 4
      src/components/popover-select/components/MK_TARGET_TEMPLATE_PARAM.js
  19. 4 14
      src/components/popover-select/components/OPERATING_PARAM.js
  20. 9 13
      src/components/popover-select/components/ORG_PARAM.js
  21. 4 8
      src/components/popover-select/components/PAYAGREEMENT_PARAM.js
  22. 5 15
      src/components/popover-select/components/PROCESSTYPE_PARAM.js
  23. 5 15
      src/components/popover-select/components/PROJECT_PARAM.js
  24. 5 15
      src/components/popover-select/components/PSNLICENSE_PARAM.js
  25. 5 15
      src/components/popover-select/components/RETREASON_PARAM.js
  26. 6 21
      src/components/popover-select/components/SUPPLIERCONTACTS_PARAM.js
  27. 5 8
      src/components/popover-select/components/SUPPLIER_PARAM.js
  28. 10 15
      src/components/popover-select/components/TAX_RATE_PARAM.js
  29. 5 16
      src/components/popover-select/components/UNIT_PARAM.js
  30. 8 18
      src/components/popover-select/components/WAREHOUSE_PARAM.js
  31. 16 12
      src/components/popover-tree-select/index.vue
  32. 1 3
      src/components/super-table/index.vue
  33. 4 1
      src/utils/request.js
  34. 33 5
      src/views/business/spd/fillin/dailysale_quantity_assess/detail.vue
  35. 1 1
      src/views/business/spd/fillin/dailysale_quantity_assess/index.vue
  36. 30 1
      src/views/business/spd/target/targetMk/index.vue
  37. 2 2
      src/views/business/spd/target/targetMk/item.vue
  38. 34 40
      src/views/business/spd/target/targetTemplate/detail.vue
  39. 1 1
      src/views/business/spd/target/targetTemplate/index.vue
  40. 40 0
      src/views/material/basicFile/columns.js
  41. 7 2
      src/views/material/basicFile/details.vue
  42. 2 2
      src/views/material/basicFile/index.vue
  43. 1 1
      src/views/material/basicFile/style/index.scss
  44. 22 17
      src/views/material/requisition/add.vue
  45. 72 0
      src/views/material/requisition/columns.js
  46. 411 0
      src/views/material/requisition/index copy.vue
  47. 113 121
      src/views/material/requisition/index.vue
  48. 60 5
      src/views/purchase/PurchaseDemandList/add.vue
  49. 18 3
      src/views/purchase/PurchaseDemandList/index.vue
  50. 62 43
      src/views/purchase/apply/add/columns.js
  51. 80 83
      src/views/purchase/apply/add/index.vue
  52. 0 1
      src/views/purchase/apply/columns.js
  53. 2 4
      src/views/purchase/apply/copy/columns.js
  54. 2 4
      src/views/purchase/apply/edit/columns.js
  55. 3 6
      src/views/purchase/apply/edit/index.vue
  56. 106 86
      src/views/purchase/apply/see/columns.js
  57. 15 15
      src/views/purchase/purchase-order/add/column.js
  58. 10 3
      src/views/purchase/purchase-order/index.vue
  59. 4 2
      src/views/purchase/task/xie-yi-zhi-cai/column.js
  60. 9 5
      src/views/purchase/task/xie-yi-zhi-cai/index.vue
  61. 2 2
      src/views/purchase/transferOrder/add.vue
  62. 31 13
      src/views/purchase/transferOrder/index.vue
  63. 1 1
      vue.config.js

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

@@ -42,7 +42,7 @@ export default {
     // 移动端页码按钮的数量端默认值5
     pagerCount: {
       type: Number,
-      default: document.body.clientWidth < 992 ? 5 : 7,
+      default: 5,
     },
     layout: {
       type: String,

+ 80 - 72
src/components/popover-select-v2/index.vue

@@ -36,8 +36,15 @@ export default {
       type: Object,
       default: () => ({}),
     },
+    // 多选
+    multiple: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  components: {
+    ElSuperTable: () => import("@/components/super-table/index.vue"),
   },
-  components: {},
   data() {
     return {
       size: "mini",
@@ -64,9 +71,7 @@ export default {
     },
     TableColumns() {
       const { referName } = this.$props;
-      return require(`../popover-select/components/${referName}`).default.filter(
-        (document) => document.key
-      );
+      return require(`../popover-select/components/${referName}`).default;
     },
   },
   watch: {
@@ -149,20 +154,34 @@ export default {
     },
     // select
     useSelect(prop) {
-      this.selectData = prop[0];
+      this.selectData = prop;
+      console.log(" this.selectData ", this.selectData);
     },
     // confirm
     useConfirm(prop) {
       this.hide();
       const {
-        $props: { source, valueKey, dataMapping },
+        $props: { source, multiple, valueKey, dataMapping },
       } = this;
-      for (let key in dataMapping) {
-        source[key] = prop[dataMapping[key]];
+      if (multiple) {
+        this.$emit(
+          "change",
+          this.selectData.map((item) => {
+            for (let key in dataMapping) {
+              item[key] = item[dataMapping[key]];
+            }
+            return item;
+          }),
+          this.$props
+        );
+      } else {
+        for (let key in dataMapping) {
+          source[key] = prop[0][dataMapping[key]];
+        }
+        this.innerValue = prop[0][valueKey];
+        this.$emit("update:source", source);
+        this.$emit("change", prop[0], this.$props);
       }
-      this.innerValue = prop[valueKey];
-      this.$emit("update:source", source);
-      this.$emit("change", prop, this.$props);
     },
   },
   created() {},
@@ -178,7 +197,7 @@ export default {
       v-model="innerValue"
       :value-key="valueKey"
       :fetch-suggestions="useAutocomplete"
-      @select="useConfirm"
+      @select="useConfirm([$event])"
       style="width: 100%"
     >
       <i class="el-icon-search" slot="suffix" @click="open"> </i>
@@ -208,77 +227,66 @@ export default {
     <el-dialog
       :width="width"
       :visible.sync="visible"
+      :show-close="false"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body
     >
-      <div slot="footer">
-        <el-button
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useConfirm(selectData)"
-          >确 认</el-button
-        >
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
+      <div slot="title" style="display: flex; justify-content: space-between">
+        <el-form
+          :size="size"
+          :inline="true"
+          :model="model"
+          @submit.native.prevent
+          style="display: flex; flex-direction: column"
         >
+          <div>
+            <el-form-item prop="search">
+              <el-input
+                v-model="model.search"
+                @change="useQuery"
+                @keydown.enter="useQuery"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button icon="el-icon-refresh" @click="useReset"></el-button>
+            </el-form-item>
+          </div>
+        </el-form>
+        <div>
+          <el-button
+            type="primary"
+            :size="$attrs.size"
+            :loading="loading"
+            @click="useConfirm(selectData)"
+          >
+            确认
+          </el-button>
+          <el-button :size="$attrs.size" :loading="loading" @click="hide">
+            取消
+          </el-button>
+        </div>
       </div>
-      <el-form
+      <div
         v-loading="loading"
-        :size="size"
-        :inline="true"
-        :model="model"
-        @submit.native.prevent
+        style="height: 40vh; display: flex; margin-top: -30px"
       >
-        <el-form-item prop="search">
-          <el-input
-            v-model="model.search"
-            @change="useQuery"
-            @keydown.enter="useQuery"
-          >
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button icon="el-icon-refresh" @click="useReset"></el-button>
-        </el-form-item>
-        <el-table
-          :data="data"
+        <el-super-table
+          v-model="data"
           :size="size"
-          height="45vh"
+          :page="page"
+          :columns="TableColumns"
+          :radio="!multiple"
+          :checkbox="multiple"
+          pagination
           highlight-current-row
-          @row-dblclick="useConfirm"
-          @row-click="useSelect([$event])"
-        >
-          <el-table-column
-            v-for="(column, index) in TableColumns"
-            :key="index"
-            :prop="column.key"
-            :label="column.title"
-            :width="column.width || 'auto'"
-            show-overflow-tooltip
-          >
-            <template slot-scope="scope">
-              <dr-computed-input
-                v-if="column.type === 'ComputedInput'"
-                v-model="scope.row[column.key]"
-                :source="scope.row"
-                :formatter="column.formatter"
-                :placeholder="column.placeholder"
-                style="width: 100%"
-              ></dr-computed-input>
-              <span v-else> {{ scope.row[column.key] }}</span>
-            </template>
-          </el-table-column>
-        </el-table>
-        <pagination
-          v-show="!loading"
-          :total="page.total"
-          :page.sync="page.pageNum"
-          :limit.sync="page.pageSize"
           @pagination="useQuery"
-        />
-      </el-form>
+          @row-select="useSelect"
+          @row-dblclick="useConfirm([$event])"
+        >
+        </el-super-table>
+      </div>
     </el-dialog>
   </div>
 </template>

+ 10 - 26
src/components/popover-select/components/ADDRESS_PARAM.js

@@ -1,39 +1,23 @@
 // 收货地址
 export default [
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "仓库",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "仓库", width: "auto" },
+    attr: {},
   },
   {
-    key: "address",
-    title: "地址",
-    type: "Input",
-    search: true,
+    item: { key: "address", title: "地址", width: "auto" },
+    attr: {},
   },
   {
-    key: "contactsName",
-    title: "联系人",
-    type: "Input",
-    search: true,
+    item: { key: "contactsName", title: "联系人", width: "auto" },
+    attr: {},
   },
   {
-    key: "contactsPhone",
-    title: "电话",
-    type: "Input",
-    search: true,
+    item: { key: "contactsPhone", title: "电话", width: "auto" },
+    attr: {},
   },
 ];

+ 4 - 15
src/components/popover-select/components/ALLOCATION_PARAM.js

@@ -1,22 +1,11 @@
 // 货位
 export default [
-  // 树
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "货位",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "货位" , width: "auto"},
+    attr: {},
   },
 ];

+ 5 - 15
src/components/popover-select/components/BALATYPE_PARAM.js

@@ -1,21 +1,11 @@
 // 结算方式
 export default [
-  // {
-  //   key: "id",
-  //   title: "结算方式ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "结算方式",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "结算方式" , width: "auto"},
+    attr: {},
   },
-];
+];

+ 4 - 8
src/components/popover-select/components/CONTACTS_PARAM.js

@@ -1,15 +1,11 @@
 // 客户部门
 export default [
   {
-    key: "code",
-    title: "人员编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "人员名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 13 - 16
src/components/popover-select/components/CURRENCY_PARAM.js

@@ -1,30 +1,27 @@
+// 币种
 export default [
   {
-    key: "name",
-    title: "币种",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "币种", width: "auto" },
+    attr: {},
   },
   {
-    key: "code",
-    title: "币种简称",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "币种简称" , width: "auto"},
+    attr: {},
   },
   {
-    key: "",
-    title: "单价精度",
+    item: { key: "", title: "单价精度" , width: "auto"},
+    attr: {},
   },
   {
-    key: "",
-    title: "单价舍入规则",
+    item: { key: "", title: "单价舍入规则" , width: "auto"},
+    attr: {},
   },
   {
-    key: "",
-    title: "金额精度",
+    item: { key: "", title: "金额精度" , width: "auto"},
+    attr: {},
   },
   {
-    key: "",
-    title: "金额舍入规则",
+    item: { key: "", title: "金额舍入规则", width: "auto" },
+    attr: {},
   },
 ];

+ 4 - 8
src/components/popover-select/components/CUSTOMERDEPT_PARAM.js

@@ -1,15 +1,11 @@
 // 客户部门
 export default [
-  // {
-  //   key: "id",
-  //   title: "客户ID",
-  // },
   {
-    key: "code",
-    title: "客户编码",
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "客户名称",
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 4 - 14
src/components/popover-select/components/CUSTOMER_PARAM.js

@@ -1,21 +1,11 @@
 // 收货客户
 export default [
-  // {
-  //   key: "id",
-  //   title: "收货客户ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "收货客户编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "收货客户名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 4 - 8
src/components/popover-select/components/CUSTOMER_PARAM_ZT.js

@@ -1,15 +1,11 @@
 // 收货客户
 export default [
   {
-    key: "code",
-    title: "客户编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "客户名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 4 - 8
src/components/popover-select/components/DEPT_PARAM.js

@@ -1,14 +1,10 @@
 export default [
   {
-    key: "code",
-    title: "组织编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "组织名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 2 - 4
src/components/popover-select/components/LINKMAN_PARAM.js

@@ -1,9 +1,7 @@
 // 收货客户
 export default [
   {
-    key: "name",
-    title: "名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
 ];

+ 4 - 8
src/components/popover-select/components/MANUFACTURER_PARAM.js

@@ -1,15 +1,11 @@
 // 生产厂家
 export default [
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
 ];

+ 54 - 60
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -1,96 +1,90 @@
 export default [
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
   {
-    key: "specification",
-    title: "规格",
-    type: "Input",
-    search: true,
+    item: { key: "specification", title: "规格", width: "auto" },
+    attr: {},
   },
   {
-    key: "manufacturerIdName",
-    title: "生产厂家",
-    type: "Input",
-    search: true,
+    item: { key: "manufacturerIdName", title: "生产厂家", width: "auto" },
+    attr: {},
   },
   {
-    key: "unitIdName",
-    title: "单位",
-    type: "Input",
-    search: true,
+    item: { key: "unitIdName", title: "单位", width: "auto" },
+    attr: {},
   },
   {
-    key: "registrationNo",
-    title: "注册证号",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.registrationNo;
+    item: { key: "registrationNo", title: "注册证号", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.registrationNo;
+      },
     },
   },
   {
-    key: "isDrug",
-    title: "物料药品属性",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.isDrug == "0" ? "Y" : "N";
+    item: { key: "isDrug", title: "物料药品属性", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.isDrug == "0" ? "Y" : "N";
+      },
     },
   },
   {
-    key: "isDrugNumber",
-    title: "药品",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.isDrug;
+    item: { key: "isDrugNumber", title: "药品", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.isDrugNumber;
+      },
     },
   },
   {
-    key: "oriRegistrationNo",
-    title: "注册证号/备案凭证编号",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.oriRegistrationNo;
+    item: {
+      key: "oriRegistrationNo",
+      title: "注册证号/备案凭证编号",
+      width: "auto",
+    },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.oriRegistrationNo;
+      },
     },
   },
   {
-    key: "dosageFrom",
-    title: "剂型",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.dosageFrom;
+    item: { key: "dosageFrom", title: "剂型", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.dosageFrom;
+      },
     },
   },
   {
-    key: "dosageFromName",
-    title: "剂型名称",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.dosageFromName;
+    item: { key: "dosageFromName", title: "剂型名称", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.dosageFromName;
+      },
     },
   },
   {
-    key: "curingType",
-    title: "养护类型",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.curingType;
+    item: { key: "curingType", title: "养护类型", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.curingType;
+      },
     },
   },
   {
-    key: "medicalInstruments",
-    title: "医疗器械",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      return prop.materialMedcine.medicalInstruments;
+    item: { key: "medicalInstruments", title: "医疗器械", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return prop.materialMedcine.medicalInstruments;
+      },
     },
   },
 ];

+ 4 - 8
src/components/popover-select/components/MK_SALESAREA_PARAM.js

@@ -1,15 +1,11 @@
 // 销售区域
 export default [
   {
-    key: "code",
-    title: "区域编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "区域名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 2 - 4
src/components/popover-select/components/MK_TARGET_CYCLE_PARAM.js

@@ -1,9 +1,7 @@
 // 目标周期
 export default [
   {
-    key: "name",
-    title: "周期名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 2 - 4
src/components/popover-select/components/MK_TARGET_INDEX_PARAM.js

@@ -1,9 +1,7 @@
 // 目标指标
 export default [
   {
-    key: "name",
-    title: "指标名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
 ];

+ 2 - 4
src/components/popover-select/components/MK_TARGET_TEMPLATE_PARAM.js

@@ -1,9 +1,7 @@
 // 目标摸吧
 export default [
   {
-    key: "name",
-    title: "模板名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 4 - 14
src/components/popover-select/components/OPERATING_PARAM.js

@@ -1,21 +1,11 @@
 // 经营性项目
 export default [
-  // {
-  //   key: "id",
-  //   title: "经营性项目ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "经营性项目编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "经营性项目名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 9 - 13
src/components/popover-select/components/ORG_PARAM.js

@@ -1,14 +1,10 @@
 export default [
-    {
-      key: "code",
-      title: "组织编码",
-      type: "Input",
-      search: true,
-    },
-    {
-      key: "name",
-      title: "组织名称",
-      type: "Input",
-      search: true,
-    },
-  ]
+  {
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
+  },
+  {
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
+  },
+];

+ 4 - 8
src/components/popover-select/components/PAYAGREEMENT_PARAM.js

@@ -1,14 +1,10 @@
 export default [
   {
-    key: "code",
-    title: "付款协议编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "付款协议名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 5 - 15
src/components/popover-select/components/PROCESSTYPE_PARAM.js

@@ -1,21 +1,11 @@
 // 处理方式
 export default [
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "处理方式",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
-];
+];

+ 5 - 15
src/components/popover-select/components/PROJECT_PARAM.js

@@ -1,21 +1,11 @@
 // 在建工程项目
 export default [
-  // {
-  //   key: "id",
-  //   title: "在建工程项目ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "在建工程项目编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "在建工程项目名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
-];
+];

+ 5 - 15
src/components/popover-select/components/PSNLICENSE_PARAM.js

@@ -1,21 +1,11 @@
 // 人员证照参照
 export default [
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
-];
+];

+ 5 - 15
src/components/popover-select/components/RETREASON_PARAM.js

@@ -1,21 +1,11 @@
 // 退换原因
 export default [
-  // {
-  //   key: "id",
-  //   title: "退换原因ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "退换原因编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "退换原因",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
-];
+];

+ 6 - 21
src/components/popover-select/components/SUPPLIERCONTACTS_PARAM.js

@@ -1,27 +1,12 @@
 // 供应商联系人
 export default [
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
-  // {
-  //   key: "code",
-  //   title: "编码",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "name",
-    title: "名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
   {
-    key: "cell",
-    title: "电话",
-    type: "Input",
-    search: true,
+    item: { key: "cell", title: "电话" , width: "auto"},
+    attr: {},
   },
-];
+
+];

+ 5 - 8
src/components/popover-select/components/SUPPLIER_PARAM.js

@@ -1,14 +1,11 @@
+// 供应商
 export default [
   {
-    key: "code",
-    title: "供应商编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "供应商名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
 ];

+ 10 - 15
src/components/popover-select/components/TAX_RATE_PARAM.js

@@ -1,24 +1,19 @@
+// 税率
 export default [
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
   {
-    key: "ntaxrate",
-    title: "税率",
-    type: "ComputedInput",
-    formatter: (prop) => {
-      const { ntaxrate } = prop;
-      // console.log(ntaxrate, ntaxrate.toFixed(6));
-      return ntaxrate === "0E-8" ? "0.000000" : (ntaxrate * 1).toFixed(6);
+    item: { key: "ntaxrate", title: "税率%", width: "auto" },
+    attr: {
+      formatter: (prop) => {
+        return Number(prop.ntaxrate === "0E-8" ? 0 : prop.ntaxrate).toFixed(6);
+      },
     },
   },
 ];

+ 5 - 16
src/components/popover-select/components/UNIT_PARAM.js

@@ -1,22 +1,11 @@
-// 
+// 
 export default [
-  // 树
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码" , width: "auto"},
+    attr: {},
   },
   {
-    key: "name",
-    title: "货位",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称" , width: "auto"},
+    attr: {},
   },
 ];

+ 8 - 18
src/components/popover-select/components/WAREHOUSE_PARAM.js

@@ -1,29 +1,19 @@
 // 收货仓库
 export default [
-  // {
-  //   key: "id",
-  //   title: "仓库ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "仓库编码",
-    type: "Input",
-    search: true,
+    item: { key: "code", title: "编码", width: "auto" },
+    attr: {},
   },
   {
-    key: "name",
-    title: "仓库名称",
-    type: "Input",
-    search: true,
+    item: { key: "name", title: "名称", width: "auto" },
+    attr: {},
   },
   {
-    key: "",
-    title: "备注",
+    item: { key: "", title: "备注", width: "auto" },
+    attr: {},
   },
   {
-    key: "",
-    title: "助记码",
+    item: { key: "", title: "助记码", width: "auto" },
+    attr: {},
   },
 ];

+ 16 - 12
src/components/popover-tree-select/index.vue

@@ -208,6 +208,7 @@ export default {
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body
+      style="padding: 10px;"
     >
       <div slot="footer">
         <el-button
@@ -235,19 +236,22 @@ export default {
         <el-form-item>
           <el-button icon="el-icon-refresh" @click="useReset"></el-button>
         </el-form-item>
-        <el-tree
-          v-loading="loading"
-          :data="data"
-          :props="defaultProps"
-          :filter-node-method="useTreeFilter"
-          ref="tree"
-          accordion
-          node-key="id"
-          @node-click="useSelect"
-        >
-        </el-tree>
+        <div style="height: 400px;overflow: auto;">
+          <el-tree          
+            v-loading="loading"
+            :data="data"
+            :props="defaultProps"
+            :filter-node-method="useTreeFilter"
+            ref="tree"
+            accordion
+            node-key="id"
+            @node-click="useSelect"
+          >
+          </el-tree>
+        </div>
       </el-form>
     </el-dialog>
   </div>
 </template>
-<style scoped></style>
+<style scoped>
+</style>

+ 1 - 3
src/components/super-table/index.vue

@@ -75,7 +75,7 @@ export default {
     const { columns } = this.$props;
     const innerColumns = columns.map(({ item, attr }) => ({
       attr,
-      item: { ...item, hidden: true },
+      item: { hidden: true, ...item },
     }));
     return {
       innerColumns: innerColumns,
@@ -162,8 +162,6 @@ export default {
     },
     // 冻结
     onHide(prop) {
-      console.log("new", prop[0].item.title);
-      console.log("old", this.innerColumns[0].item.title);
       this.$nextTick(() => {
         this.$refs.superTable.doLayout();
       });

+ 4 - 1
src/utils/request.js

@@ -31,6 +31,8 @@ service.interceptors.request.use(
     // 是否存在列表查询
     const isQueryList =
       config.url.includes("/list") || config.url.includes("/query");
+    //是否存在其他登录方式
+    const isSSO = config.url.includes("/login/sso");
     if (getToken() && !isToken) {
       config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
     }
@@ -44,6 +46,7 @@ service.interceptors.request.use(
     if (
       !isRepeatSubmit &&
       !isQueryList &&
+      !isSSO &&
       (config.method === "post" || config.method === "put")
     ) {
       const requestObj = {
@@ -114,7 +117,7 @@ service.interceptors.response.use(
             url: res.config.url,
             data: res.config.data,
             method: res.config.method,
-            params: { ...res.config.params, DName: "蒙奇·D·伟涛" },
+            params: { ...res.config.params},
           });
         }
       } catch (err) {

+ 33 - 5
src/views/business/spd/fillin/dailysale_quantity_assess/detail.vue

@@ -26,6 +26,7 @@
           <el-col :span="1.5">
             <el-form-item label="月份" prop="month">
               <el-date-picker
+                :readonly="this.openMode == 'edit' || this.openMode == 'see'"
                 v-model="form.month"
                 value-format="yyyy-MM"
                 type="month"
@@ -37,6 +38,7 @@
           <el-col :span="1.5">
             <el-form-item label="客户" prop="customer">
               <dr-popover-select
+                :readonly="this.openMode == 'edit' || this.openMode == 'see'"
                 size="mini"
                 v-model="form.customerName"
                 title="客户选择"
@@ -652,6 +654,20 @@
                     />
                   </template>
                 </el-table-column>
+                <el-table-column
+                  show-overflow-tooltip
+                  label="合计数量"
+                  align="center"
+                  width="100"
+                  prop="amount"
+                />
+                <el-table-column
+                  show-overflow-tooltip
+                  label="合计金额"
+                  align="center"
+                  width="100"
+                  prop="money"
+                />
               </el-table-column>
               <el-table-column
                 fixed="right"
@@ -727,11 +743,8 @@ export default {
   watch: {
     'form.month': {
       handler(newVal) {
-          console.log('newVal',newVal);
           let arr = newVal.split('-');
-          console.log('arr.[1]',arr[1]);
           this.numDay = this.getDays(arr[0],arr[1]);
-          console.log('this.numDay',this.numDay);
       },
       immediate:true,
     }
@@ -752,9 +765,12 @@ export default {
         break;
       case "edit":
         await this.fetchAssess(this.row.id);
+        this.total();
+        console.log('this.form.items',this.form.items);
         break;
       case "see":
         await this.fetchAssess(this.row.id);
+        this.total();
         break;
     }
   },
@@ -827,8 +843,6 @@ export default {
     },
     //删行
     async useRowRemove(index, row) {
-      console.log("index", index);
-      console.log("row", row);
       if (row.id) {
         this.form.items.forEach((e) => {
           if (e.id == row.id) {
@@ -876,6 +890,20 @@ export default {
       } else {
           return i;
       }
+    },
+    //计算合计
+    total(){
+      let num = ["first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth","eleventh","twelfth","thirteenth","fourteenth","fifteenth"
+				,"twentyFirst","seventeenth","eighteenth","nineteenth","twentieth","twentyFirst","twentySecond","twentyThird","twentyFourth","twentyFifth","twentySixth","twentySeventh","twentyEighth","twentyNinth","thirtieth","thirtyFirst"];
+      for(let i in this.form.items){
+        let c = 0;
+        for(let j in num){
+          c = (this.form.items[i][num[j]] || 0) - 0 + c;
+        }
+        console.log('c',c);
+        this.form.items[i].amount = c;
+        this.form.items[i].money = c * (this.form.items[i].price || 0);
+      }
     }
   },
 };

+ 1 - 1
src/views/business/spd/fillin/dailysale_quantity_assess/index.vue

@@ -18,7 +18,7 @@
                 <el-date-picker
                   v-model="queryParams.month"
                   type="month"
-                  format="yyyy-MM-dd"
+                  value-format="yyyy-MM"
                   clearable
                   >
                 </el-date-picker>

+ 30 - 1
src/views/business/spd/target/targetMk/index.vue

@@ -40,6 +40,30 @@
                 />
               </el-form-item>
             </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="单据日期">
+                <el-date-picker
+                  size="mini"
+                  v-model="dateRange"
+                  style="width: 240px"
+                  value-format="yyyy-MM-dd"
+                  type="daterange"
+                  range-separator="-"
+                  start-placeholder="开始"
+                  end-placeholder="结束"
+                ></el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="模板" prop="template">
+                <dr-popover-select size="mini" v-model="queryParams.templateName" title="模板" type="MK_TARGET_TEMPLATE_PARAM" :dataMapping="{
+                    template: 'id',
+                    templateName: 'name',
+                  }" :source.sync="queryParams"
+                >
+                </dr-popover-select>
+              </el-form-item>
+            </el-col>
             <!-- <el-col :span="1.5">
               <el-form-item label="模板">
                 <el-input
@@ -194,10 +218,13 @@ export default {
         code: '',
         name: '',
         template:'',
+        templateName:'',
         year:'',
         pageNum: 1,
         pageSize: 10
       },
+      // 查询日期范围
+      dateRange: [],
       //总条数
       total: 0,
       //列表数据
@@ -278,10 +305,12 @@ export default {
     },
     //重置
     useReset(){
+      this.dateRange = [];
       this.queryParams = {
         code: '',
         name: '',
         template:'',
+        templateName:'',
         year:'',
         pageNum: 1,
         pageSize: 10
@@ -290,7 +319,7 @@ export default {
     },
     //查询列表
     getList(params){
-      listTarget(params).then(res => {
+      listTarget(this.addDateRange(params, this.dateRange)).then(res => {
         if (res.code === 200) {
           this.tableList = res.rows
           this.total = res.total

+ 2 - 2
src/views/business/spd/target/targetMk/item.vue

@@ -91,8 +91,8 @@ export default {
   methods: {
     //增行
     useAdd(){
-      this.items.push(this.itemTemplate);
-      console.log('this.itemTemplate',this.itemTemplate);
+      let obj = JSON.parse(JSON.stringify(this.itemTemplate))
+      this.items.push(obj);
       console.log('this.items',this.items);
     },
     //删行

+ 34 - 40
src/views/business/spd/target/targetTemplate/detail.vue

@@ -96,7 +96,7 @@
                             </el-table-column>
                             <el-table-column fixed="right" label="操作" align="center" width="150">
                                 <template slot-scope="scope">
-                                    <el-button type="text" size="mini" @click="useRowRemove(scope.row)">删行</el-button>
+                                    <el-button type="text" size="mini" @click="useRowRemove(scope.$index,scope.row)">删行</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -118,7 +118,7 @@
                             </el-table-column>
                             <el-table-column fixed="right" label="操作" align="center" width="150">
                                 <template slot-scope="scope">
-                                <el-button type="text" size="mini" @click="useRowRemove(scope.row)">删行</el-button>
+                                <el-button type="text" size="mini" @click="useRowRemove(scope.$index,scope.row)">删行</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -264,6 +264,7 @@ export default {
                     }
                     this.loading = true;
                     let res = null;
+                    console.log("1111",1111);
                     if (this.openMode === "add") {
                         res = await addTargetTemplate(this.form);
                     }
@@ -293,7 +294,6 @@ export default {
                 return false;
             }
             arr = arr.filter(item => !item.target);
-            console.log("arr",arr);
             if(arr.length > 0){
                 this.$modal.msgError("指标页签不能存在空数据!");
                 return false;
@@ -327,6 +327,7 @@ export default {
             this.$modal.msgError("周期页签不能为空!");
             return false;
         }
+        return true;
     },
     //查询详情
     async fetchTemplate(id) {
@@ -369,7 +370,7 @@ export default {
         console.log("this.form[this.activeName]",this.form[this.activeName]);
     },
     //删行
-    async useRowRemove(row) {
+    async useRowRemove(index,row) {
       if (row.id) {
         this.form[this.activeName].forEach(e => {
           if(e.id == row.id){
@@ -377,7 +378,7 @@ export default {
           }
         });
       }else{
-        this.form[this.activeName] = form[this.activeName].filter(item => item.$index != row.$index);
+        this.form[this.activeName].splice(index, 1);
       }
       console.log("this.form[this.activeName]",this.form[this.activeName]);
     },
@@ -409,58 +410,48 @@ export default {
       if(this.form.cycle == 'period'){
         cycles.push({
           name:'目标期间',
-          startTime:start,
-          deadlineTime:deadline,
+          startTime:this.formatDateTime(start, 'yyyy-MM-dd'),
+          deadlineTime:this.formatDateTime(deadline, 'yyyy-MM-dd'),
         });
       }else{
         while(deadline >= start){
-          console.log(start);
           if(this.form.cycle == 'day'){
             var cy = {
               name:this.formatDateTime(start, 'yyyy-MM-dd'),
-              startTime:start,
-              deadlineTime:start,
+              startTime:this.formatDateTime(start, 'yyyy-MM-dd'),
+              deadlineTime:this.formatDateTime(start, 'yyyy-MM-dd'),
             }
-            console.log(cy);
             cycles.push(cy);
-            start = start.setDate(start.getDate()+1);
-            start = new Date(start);
+            start.setDate(start.getDate()+1);
           }
           if(this.form.cycle == 'week'){
-            var de = start;
-            var cy = {
-              name:this.formatDateTime(start, 'yyyy-MM-dd'),
-              startTime:start,
-              deadlineTime:de.setDate(de.getDate()+7),
-            }
-            console.log(cy);
+            var cy = {};
+            cy.name = this.formatDateTime(start, 'yyyy-MM-dd');
+            cy.startTime = this.formatDateTime(start, 'yyyy-MM-dd');
+            start.setDate(start.getDate()+6);
+            cy.deadlineTime = this.formatDateTime(start, 'yyyy-MM-dd');
             cycles.push(cy);
-            start = start.setDate(start.getDate()+7);
-            start = new Date(start);
+            start.setDate(start.getDate()+1);
           }
           if(this.form.cycle == 'month'){
-            var de = start;
-            var cy = {
-              name:this.formatDateTime(start, 'yyyy-MM-dd'),
-              startTime:start,
-              deadlineTime:de.setDate(de.getDate()+30),
-            }
-            console.log(cy);
+            var cy = {};
+            cy.name = this.formatDateTime(start, 'yyyy-MM');
+            cy.startTime = this.formatDateTime(start, 'yyyy-MM-dd');
+            let arr = cy.startTime.split('-');
+            start = this.getLastDay(arr[0],arr[1]);
+            console.log('start',start);
+            cy.deadlineTime = this.formatDateTime(start, 'yyyy-MM-dd');
             cycles.push(cy);
-            start = start.setDate(start.getDate()+30);
-            start = new Date(start);
+            start.setDate(start.getDate()+1);
           }
           if(this.form.cycle == 'season'){
-            var de = start;
-            var cy = {
-              name:this.formatDateTime(start, 'yyyy-MM-dd'),
-              startTime:start,
-              deadlineTime:de.setDate(de.getDate()+90),
-            }
-            console.log(cy);
+            var cy = {};
+            cy.name = this.formatDateTime(start, 'yyyy-MM');
+            cy.startTime = this.formatDateTime(start, 'yyyy-MM-dd');
+            start.setDate(start.getDate()+90);
+            cy.deadlineTime = this.formatDateTime(start, 'yyyy-MM-dd');
             cycles.push(cy);
-            start = start.setDate(start.getDate()+90);
-            start = new Date(start);
+            start.setDate(start.getDate()+1);
           }
         }
       }
@@ -493,6 +484,9 @@ export default {
         }
       }
       return format;
+    },
+    getLastDay(year, month) {
+      return new Date(new Date(`${month<12?year:++year}-${month==12?1:++month} 00:00`).getTime() - 1);
     }
   },
 };

+ 1 - 1
src/views/business/spd/target/targetTemplate/index.vue

@@ -187,7 +187,7 @@ export default {
         return;
       }
       this.$modal.confirm('确认删除选择数据').then(() => {
-        delTarget(row.id).then(res => {
+        delTargetTemplate(row.id).then(res => {
           if (res.code === 200) {
             this.$modal.msgSuccess("删除成功");
             this.getList(this.queryParams)

+ 40 - 0
src/views/material/basicFile/columns.js

@@ -25,6 +25,21 @@ export const SearchColumns = [
     },
   },
   {
+    item: {
+      key: "classifyIdName",
+      title: "物料分类",
+    },
+    attr: {
+      is: "el-popover-tree-select",
+      referName: "MATERIALCLASSIFY_PARAM",
+      valueKey: "name",
+      clearable:true,
+      dataMapping: {
+        classifyId: "id",
+      },
+    },
+  },
+  {
     item:{
       key: "isEnable",
       title: "启用状态",  
@@ -37,6 +52,31 @@ export const SearchColumns = [
   },
   {
     item:{
+      key: "puPersonnelIdName",
+      title: "采购员",
+    },
+    attr: {
+      clearable:true,
+      is: "el-popover-select-v2",
+      referName: "CONTACTS_PARAM",
+      valueKey: "name",
+      dataMapping: {
+        puPersonnelId: "code",
+      },
+    },
+  },
+  {
+    item:{
+      key: "registrant",
+      title: "注册人/上市许可持有人",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  {
+    item:{
       key: "isSync",
       title: "是否同步NC",  
     },

+ 7 - 2
src/views/material/basicFile/details.vue

@@ -517,8 +517,8 @@
     <el-dialog title="操作提示" :visible.sync="optionDialog.show" width="30%" center>
       <span>是否确认{{ optionDialog.op }}?</span>
       <span slot="footer">
-        <el-button @click="handleOptionCancal">取 消</el-button>
         <el-button type="primary" @click="handleComfirmOption('cancal')">确 定</el-button>
+        <el-button @click="handleOptionCancal">取 消</el-button>
       </span>
     </el-dialog>
 
@@ -696,6 +696,7 @@
             v-loading="MoreDataDialog.loading" 
             style="width: 100%"
             @row-click="handleCurentRow" 
+            @row-dblclick="handleDbClick"
             highlight-current-row
           >
             <el-table-column type="index" label="序号" width="55" align="center"/>
@@ -715,8 +716,8 @@
 
         <!-- 按钮 -->
         <el-row class="more-button">
-          <el-button round size="small" @click="handleConcalRefer">取消</el-button>
           <el-button round size="small" type="primary" @click="handleConfirmRefer">确认</el-button>
+          <el-button round size="small" @click="handleConcalRefer">取消</el-button>
         </el-row>
       </div>
     </el-dialog>
@@ -2064,6 +2065,10 @@
         console.log(row, '修改-更多数据表格——选择行');
         this.MoreDataDialog.value = row;
       },
+      handleDbClick(row){
+        this.MoreDataDialog.value = row;
+        this.handleConfirmRefer();
+      },
       // 参照弹窗确认
       handleConfirmRefer() {
 

+ 2 - 2
src/views/material/basicFile/index.vue

@@ -6,7 +6,6 @@
     <!-- 主体列表 -->
     <el-card class="material-list" v-loading="loading">
 
-      
     <div style="margin: 0 0 10px 0;">
       <!-- 查询条件 -->
       <el-super-search
@@ -606,7 +605,7 @@
           vm.queryForm = vm.$store.state.query.queryVlue;
           // 清空选中数据
           vm.checkedList = [];
-          vm.$refs.materialTable.clearSelection();
+          vm.$refs.materialTable &&vm.$refs.materialTable.clearSelection();
         }
         vm.getTagList('material');
         vm.getMaterialList('material');
@@ -634,6 +633,7 @@
     .el-card__body {
       height: 100%;
       box-sizing: border-box;
+      padding: 10px;
 
       .el-table {
         overflow: auto;

+ 1 - 1
src/views/material/basicFile/style/index.scss

@@ -9,7 +9,7 @@
   }
 
   .el-card{
-    overflow: auto;
+    // overflow: auto;
     box-sizing: border-box;
   }
 

+ 22 - 17
src/views/material/requisition/add.vue

@@ -1,5 +1,21 @@
 <template>
   <div class="requisition_add">
+
+    <el-row type="flex" justify="end" style="margin-bottom: 16px;">
+      <el-col :span="1.5">
+        <el-button type="primary" :size="size" plain @click="save"
+                   v-if="pageStu == 'add' || pageStu == 'edit' || pageStu ==='copy' ">保存
+        </el-button>
+      </el-col>
+      <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" :size="size" plain @click="submit"
+                   v-if="pageStu == 'check' && (row.status == '0' || row.status == '3')">提交
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="primary" :size="size" plain @click="back">返回</el-button>
+      </el-col>
+    </el-row>
     <el-tabs type="border-card" v-model="tabValue" @tab-click="handleClick">
       <el-tab-pane label="基本信息" name="first">
         <div style="width: 100%;height: 680px;overflow-y: auto; overflow-x: hidden;">
@@ -519,8 +535,8 @@
         <span>物料类别</span>
         </el-row> -->
         <el-row style="margin-bottom: 12px;">
-          <el-button :disabled="disable" type="primary" size="small" plain @click="addLine">新增</el-button>
-          <el-button :disabled="disable" type="primary" size="small" plain @click="handleDelete">删除</el-button>
+          <el-button :disabled="disable" type="primary" :size="size" plain @click="addLine">新增</el-button>
+          <el-button :disabled="disable" type="primary" :size="size" plain @click="handleDelete">删除</el-button>
           <!-- <el-button :disabled="disable || isControl" type="primary" size="small" plain @click="testsave">暂存</el-button> -->
         </el-row>
         <el-row>
@@ -611,21 +627,7 @@
       </el-tab-pane>
     </el-tabs>
 
-    <div class="btn_group">
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="save"
-                   v-if="pageStu == 'add' || pageStu == 'edit' || pageStu ==='copy' ">保存
-        </el-button>
-      </el-col>
-      <el-col :span="1.5" style="margin: 0 10px;">
-        <el-button type="primary" size="small" plain @click="submit"
-                   v-if="pageStu == 'check' && (row.status == '0' || row.status == '3')">提交
-        </el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="back">返回</el-button>
-      </el-col>
-    </div>
+    
 
     <factory ref="factory" @doSubmit="acceptFactory" :selectData="selectData2" :single="true"/>
 
@@ -708,6 +710,7 @@
     },
     data() {
       return {
+        size:'mini',
         testOptions: [],
         factoryOptions: [],
         unitOptions: [],
@@ -1241,6 +1244,8 @@
 
               this.basicForm.diCode = '';
 
+              this.basicForm.healthCode = '';
+
               this.basicForm.status = '0';
 
               this.basicForm.sysMaterialMedcineApply.id = '';

+ 72 - 0
src/views/material/requisition/columns.js

@@ -0,0 +1,72 @@
+
+
+ export const TableColumns = [
+    { item: { key: "orgName", title: "所属组织" ,width:150,}, attr: {} },
+    { item: { key: "billCode", title: "单据编码" }, attr: {} },
+   
+    { item: { key: "status", title: "单据状态",width:120, }, 
+      attr: {
+        
+        is: "el-dict-tag",
+        dictName: "documents_status", // 字典名
+      } 
+    },
+    {
+      item: { key: "createName", title: "申请人",width:150, },
+      attr: { },
+    },
+    { item: { key: "createTime", title: "申请时间",width:150, }, attr: {} },
+    { 
+      item: { key: "name", title: "物料名称" }, 
+      attr: {} 
+    },
+    // { 
+    //   item: { key: "materialCode", title: "物料编码" }, 
+    //   attr: {
+   
+    //   } 
+    // },
+    { item: { key: "createName", title: "创建人" ,width:150, }, attr: {} },
+    { item: { key: "createTime", title: "创建时间" ,width:150,}, attr: {} },
+    {
+      item: { key: "updateName", title: "最后修改人" ,width:150, },
+      attr: {  },
+    },
+    { item: { key: "updateTime", title: "最后修改时间" ,width:150,}, attr: {} },
+   
+  ].map(({ item, attr }) => ({
+    attr,
+    item: { ...item, hidden: true, fixed: false },
+  }));
+
+ export const SearchColumns = [
+    {
+      item: { key: "billCode", title: "单据编码" },
+      attr: {
+        is: "el-input",
+        clearable:true,
+      },
+    },
+    {
+      item: { key: "name", title: "物料名称" },
+      attr: {
+        is: "el-popover-select-v2",
+        referName: "MATERIAL_PARAM",
+        valueKey: "name",
+        clearable:true,
+      },
+    },
+    {
+      item: { key: "status", title: "单据状态" },
+      attr: {
+        is: "el-select",
+        dictName: "documents_status",
+        clearable: true,
+      },
+    },
+  
+  ].map(({ item, attr }) => ({
+    attr,
+    item: { ...item, hidden: true, span: item.span || 6 },
+  }));
+

+ 411 - 0
src/views/material/requisition/index copy.vue

@@ -0,0 +1,411 @@
+<template>
+  <div class="requisition" v-loading="failLoad">
+    <div class="applyList" v-if="isList">
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
+          <el-input
+            v-model="queryParams.billCode"
+            size="small"
+            placeholder="请输入单据编码查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
+
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
+          <el-input
+            v-model="queryParams.name"
+            size="small"
+            placeholder="请输入物料名称查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
+
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
+          <el-select
+            v-model="queryParams.status"
+            size="small"
+            placeholder="请选择单据状态"
+            clearable
+            style="width: 240px">
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-col>
+
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
+        </el-col>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>高级查询</el-button>
+        </el-col> -->
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="reset">重置</el-button>
+        </el-col>
+
+      </el-row>
+
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain
+                     @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" @click="handleImport">批量导入</el-button>
+        </el-col>
+        <!-- 导入弹窗 -->
+        <el-dialog 
+          title="批量导入" 
+          :visible.sync="importData.show" 
+          width="35%" 
+          center
+          :before-close="handlefileDialogColse"
+        >
+          <div class="mb-import">
+            <el-upload 
+              accept=".xls, .xlsx" 
+              ref="upload" 
+              action="#" 
+              :on-remove="handleFileRemove"
+              :file-list="importData.list" 
+              :auto-upload="false" 
+              :on-change="handleChangeFile" 
+              :limit="1"
+              style="text-align: center;"
+            >
+              <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+              <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
+            </el-upload>
+
+          </div>
+          <span slot="footer">
+        <el-button @click="handleImportData('cancal')">取 消</el-button>
+        <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
+      </span>
+        </el-dialog>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导入</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导出</el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量提交</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量删除</el-button>
+        </el-col> -->
+      </el-row>
+
+      <el-card>
+        <el-table
+          :data="tableList"
+          class="request-table"
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+          @select="handleSelect"
+        >
+          <el-table-column type="selection" width="45"></el-table-column>
+          <el-table-column label="序号" align="center" type="index" width="50"/>
+          <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
+          <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
+          <el-table-column label="申请人" align="center" prop="createName"/>
+          <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
+          <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
+          <el-table-column label="物料名称" align="center" width="150" prop="name"/>
+          <el-table-column label="创建人" align="center" prop="createName"/>
+          <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
+          <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="180"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+              <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
+                         size="small">编辑
+              </el-button>
+              <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
+              <el-button type="text" size="small" @click="deleteRow(scope.row)"
+                         v-if="scope.row.status == 0 || scope.row.status == 3">删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size=queryParams.pageSize
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          style="text-align: center;">
+        </el-pagination>
+      </el-card>
+    </div>
+
+    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
+               v-if="!isList"/>
+  </div>
+</template>
+
+<script>
+  import addReq from './add.vue';
+  import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
+  import {saveAs} from "file-saver";
+  import { blobValidate } from "@/utils/ruoyi";
+
+  export default {
+    name: 'requisition',
+    components: {
+      addReq
+    },
+    data() {
+      return {
+        failLoad: false,
+        tableList: [],
+        queryParams: {
+          billCode: '',
+          name: '',
+          status: '',
+          pageNum: 1,
+          pageSize: 10
+        },
+        options: [{
+          value: 0, label: '未提交'
+        }, {
+          value: 1, label: '审批中'
+        }, {
+          value: 2, label: '已完成'
+        }, {
+          value: 3, label: '已驳回'
+        },],
+        total: 0,
+        // isComponent
+        isComponent: 'addReq',
+        isList: true,
+        // 页面状态
+        page: '',
+        rowDetail: {},
+        disable: false,
+        checkedList: [],
+        importData: {
+          show: false,
+          list: []
+        },
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.getList(this.queryParams)
+    },
+    methods: {
+      reset() {
+        this.queryParams.billCode = ''
+        this.queryParams.name = ''
+        this.queryParams.status = ''
+        this.queryParams.pageNum = 1
+        this.getList(this.queryParams)
+      },
+      newAdd() {
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'add'
+        this.disable = false
+      },
+      // 复制
+      handleCopy() {
+        this.isList = false;
+        this.isComponent = 'addReq';
+        this.page = 'copy';
+        this.rowDetail = this.checkedList[0];
+        this.disable = false;
+      },
+      // 导入
+      handleImport() {
+        this.importData.show = true
+      },
+      // 删除文件
+      handleFileRemove(file, fileList) {
+        console.log('删除文件', file, 'file', fileList, 'fileList');
+        this.importData.list = fileList;
+      },
+      // 文件发生改变
+      handleChangeFile(file, fileList) {
+        this.importData.list = fileList;
+      },
+      // 导入弹窗操作
+      handleImportData(type) {
+        switch (type) {
+          // 取消
+          case 'cancal':
+            this.importData.list = [];
+            this.importData.show = false;
+            break;
+          // 确认
+          case 'confirm':
+            if (this.importData.list.length) {
+
+              let formData = new FormData();
+
+              formData.append('file', this.importData.list[0].raw);
+              importData(formData).then(res => {
+                if (res.code == 200) {
+                  this.importData.show = false;
+                  this.importData.list = [];
+                  if (res.data.flag) {
+                    this.failLoad = true;
+                    console.log(res.data.datas)
+                    let param = {failDatas: res.data.datas}
+                    if (null != param) {
+
+                      fileImport(param).then(res => {
+                        console.log('res',res)
+                        const isBlob = blobValidate(res);
+                        if (isBlob) {
+                          const blob = new Blob([res]);
+                          saveAs(blob, '导入失败的物料申请单数据.xlsx');
+                        }
+                        this.failLoad = false;
+                      })
+                    }
+                  }
+                  this.$message({
+                    message: res.data.msg,
+                    type: res.data.flag ? 'warning' : 'success'
+                  });
+                } else {
+                  this.$message({
+                    message: res.msg,
+                    type: res.code == 200 ? 'success' : 'warning'
+                  });
+                }
+              })
+            } else {
+              this.$message({
+                message: '请上传文件之后在确认!',
+                type: 'warning'
+              });
+            }
+            break;
+        }
+      },
+      handlefileDialogColse(done){
+        this.importData.list = [];
+        done();
+      },
+      // Select框
+      handleSelect(selection, row) {
+
+        this.checkedList = selection;
+
+        console.log(this.checkedList, 'this.checkedList');
+
+      },
+      getList(val) {
+        console.log('val', val)
+        getReqList(val).then(res => {
+          if (res.code === 200) {
+            this.tableList = res.rows
+            this.total = res.total
+          }
+        })
+        this.checkedList = [];
+      },
+      // 表格内状态栏判断值
+      statusJug(row) {
+        if (row.status == 0) {
+          return '未提交'
+        } else if (row.status == 1) {
+          return '审批中'
+        } else if (row.status == 2) {
+          return '已完成'
+        } else if (row.status == 3) {
+          return '已驳回'
+        }
+      },
+      //
+      handleSelectionChange() {
+
+      },
+      check(row) {
+        console.log('查看详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'check'
+        this.rowDetail = row
+        this.disable = true
+      },
+      edit(row) {
+        console.log('修改先加载详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'edit'
+        this.rowDetail = row
+        this.disable = false
+      },
+      commit(row) {
+        console.log('row', row)
+      },
+      deleteRow(row) {
+        this.$confirm('是否删除此条数据?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delReq(row.id).then(res => {
+            if (res.code === 200) {
+              this.$message({
+                message: res.msg,
+                type: 'success'
+              });
+              this.getList(this.queryParams)
+            }
+          })
+        }).catch(() => {
+        })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`);
+        this.queryParams.pageSize = val
+        this.getList(this.queryParams)
+      },
+      handleCurrentChange(val) {
+        console.log(`当前页: ${val}`);
+        this.queryParams.pageNum = val
+        this.getList(this.queryParams)
+      }
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .requisition {
+    height: calc(100vh - 84px);
+    padding: 12px;
+    box-sizing: border-box;
+  }
+</style>

+ 113 - 121
src/views/material/requisition/index.vue

@@ -1,82 +1,57 @@
 <template>
   <div class="requisition" v-loading="failLoad">
     <div class="applyList" v-if="isList">
-      <el-row :gutter="10" class="mb10">
-        <el-col :span="1.5">
-          <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
-          <el-input
-            v-model="queryParams.billCode"
-            size="small"
-            placeholder="请输入单据编码查询"
-            clearable
-            style="width: 240px"
-          />
-        </el-col>
-
-        <el-col :span="1.5">
-          <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
-          <el-input
-            v-model="queryParams.name"
-            size="small"
-            placeholder="请输入物料名称查询"
-            clearable
-            style="width: 240px"
-          />
-        </el-col>
-
-        <el-col :span="1.5">
-          <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
-          <el-select
-            v-model="queryParams.status"
-            size="small"
-            placeholder="请选择单据状态"
-            clearable
-            style="width: 240px">
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-col>
-
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
-        </el-col>
-        <!-- <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>高级查询</el-button>
-        </el-col> -->
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain @click="reset">重置</el-button>
-        </el-col>
+     
+      <el-card>
 
-      </el-row>
+        <el-super-search
+        v-model="params"
+        :size="size"
+        :dict="dict"
+        :columns="SearchColumns"
+        @reset="reset"
+        @submit="getList"
+      ></el-super-search>
 
-      <el-row :gutter="10" class="mb10">
+      <el-row :gutter="10" class="mb10" type="flex" justify="end" style="margin-top: 15px;">
         <el-col :span="1.5">
-          <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
+          <el-button type="primary" :size="size" plain @click="newAdd">新增</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
+          <el-button :size="size" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button type="primary" size="small" plain
+          <el-button type="primary" :size="size" plain
                      @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
           </el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button size="small" @click="handleImport">批量导入</el-button>
+          <el-button :size="size" @click="handleImport">批量导入</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <!-- <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button> -->
         </el-col>
         <!-- 导入弹窗 -->
-        <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center
-                   :before-close="handlefileDialogColse">
+        <el-dialog 
+          title="批量导入" 
+          :visible.sync="importData.show" 
+          width="35%" 
+          center
+          :before-close="handlefileDialogColse"
+        >
           <div class="mb-import">
-            <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
-                       :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">
+            <el-upload 
+              accept=".xls, .xlsx" 
+              ref="upload" 
+              action="#" 
+              :on-remove="handleFileRemove"
+              :file-list="importData.list" 
+              :auto-upload="false" 
+              :on-change="handleChangeFile" 
+              :limit="1"
+              style="text-align: center;"
+            >
               <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
-              <el-button style="margin-left: 10px;" size="small" type="success" @click="handleDownTemplate">下载模板
-              </el-button>
               <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
             </el-upload>
 
@@ -86,75 +61,56 @@
         <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
       </span>
         </el-dialog>
-        <!-- <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>导入</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>导出</el-button>
-        </el-col> -->
-        <!-- <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>批量提交</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>批量删除</el-button>
-        </el-col> -->
       </el-row>
 
-      <el-card>
-        <el-table
-          :data="tableList"
-          class="request-table"
-          fit
-          max-height="680"
+      <div style="height: 600px;display: flex;">
+        <el-super-table
+          v-model="tableList"
+          :dict="dict"
+          :columns="TableColumns"
+          :size="size"
+          pagination
+          index
+          checkbox
+          convenitentOperation
+          :page="pageStatus"
+          @pagination="getList"
+          @row-dblclick="check"
           @selection-change="handleSelectionChange"
           @select="handleSelect"
         >
-          <el-table-column type="selection" width="45"></el-table-column>
-          <el-table-column label="序号" align="center" type="index" width="50"/>
-          <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
-          <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
-          <el-table-column label="申请人" align="center" prop="createName"/>
-          <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
-          <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
-          <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
-          <el-table-column label="物料名称" align="center" width="150" prop="name"/>
-          <el-table-column label="创建人" align="center" prop="createName"/>
-          <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
-          <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
-          <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
           <el-table-column
             fixed="right"
             label="操作"
             align="center"
-            width="180"
+            width="120"
           >
             <template slot-scope="scope">
-              <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+              <el-button type="text" :size="size" @click="check(scope.row)">查看</el-button>
               <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
-                         size="small">编辑
+                        :size="size">编辑
               </el-button>
-              <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
-              <el-button type="text" size="small" @click="deleteRow(scope.row)"
-                         v-if="scope.row.status == 0 || scope.row.status == 3">删除
+              <el-button type="text" :size="size" @click="deleteRow(scope.row)"
+                        v-if="scope.row.status == 0 || scope.row.status == 3">删除
               </el-button>
             </template>
           </el-table-column>
-        </el-table>
+        </el-super-table>
+      </div>
+       
 
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :page-sizes="[5, 10, 15, 20]"
-          :page-size=queryParams.pageSize
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          style="text-align: center;">
-        </el-pagination>
       </el-card>
     </div>
 
-    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
-               v-if="!isList"/>
+    <component 
+      :is="isComponent" 
+      v-model="isList" 
+      :pageStu="page" 
+      :disable="disable" 
+      :row="rowDetail" 
+      @refresh="getList"
+      v-if="!isList
+    "/>
   </div>
 </template>
 
@@ -163,16 +119,28 @@
   import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
   import {saveAs} from "file-saver";
   import { blobValidate } from "@/utils/ruoyi";
+  import { SearchColumns, TableColumns } from './columns';
+  import { initDicts } from "@/utils/init.js";
+
 
   export default {
     name: 'requisition',
+    dicts:[...initDicts([...SearchColumns,...TableColumns])],
     components: {
-      addReq
+      addReq,
+      ElSuperTable: () => import("@/components/super-table/index.vue"),
+      ElSuperSearch: () => import("@/components/super-search/index.vue"),
     },
     data() {
+      const params = this.$init.params(SearchColumns);
       return {
         failLoad: false,
         tableList: [],
+        size:'mini',
+        params:params,
+        SearchColumns:SearchColumns,
+        TableColumns:TableColumns,
+        pageStatus: { pageNum: 1, pageSize: 10, total: 0 },
         queryParams: {
           billCode: '',
           name: '',
@@ -211,11 +179,29 @@
       this.getList(this.queryParams)
     },
     methods: {
+      // 批量提交
+      handleBatchSubmit(){
+        let filterList = this.checkedList.filter(item => (item.status ==='0' ||item.status ==='3') )
+        
+        console.log(filterList,'filterList');
+        if(filterList.length){  
+
+
+        }else{
+          this.$notify.warning({
+            title: '警告',
+            message: '存在不符合提交条件数据或未选择数据!',
+          });
+        }
+      },
       reset() {
-        this.queryParams.billCode = ''
-        this.queryParams.name = ''
-        this.queryParams.status = ''
-        this.queryParams.pageNum = 1
+        // this.queryParams.billCode = ''
+        // this.queryParams.name = ''
+        // this.queryParams.status = ''
+        // this.queryParams.pageNum = 1
+        this.pageStatus.pageNum = 1;
+        this.pageStatus.pageSize = 10;
+        this.params = this.$init.params(SearchColumns);
         this.getList(this.queryParams)
       },
       newAdd() {
@@ -301,6 +287,10 @@
             break;
         }
       },
+      handlefileDialogColse(done){
+        this.importData.list = [];
+        done();
+      },
       // Select框
       handleSelect(selection, row) {
 
@@ -311,10 +301,12 @@
       },
       getList(val) {
         console.log('val', val)
-        getReqList(val).then(res => {
+        
+        getReqList({...this.params,...this.pageStatus}).then(res => {
           if (res.code === 200) {
-            this.tableList = res.rows
-            this.total = res.total
+            this.tableList = res.rows;
+            // this.total = res.total;
+            this.pageStatus.total = res.total;
           }
         })
         this.checkedList = [];
@@ -332,8 +324,8 @@
         }
       },
       //
-      handleSelectionChange() {
-
+      handleSelectionChange(selection) {
+        this.checkedList = selection;
       },
       check(row) {
         console.log('查看详情', row)
@@ -388,7 +380,7 @@
 
 <style scoped lang="scss">
   .requisition {
-    height: calc(100vh - 84px);
+    // height: calc(100vh - 84px);
     padding: 12px;
     box-sizing: border-box;
   }

+ 60 - 5
src/views/purchase/PurchaseDemandList/add.vue

@@ -43,8 +43,8 @@
         </el-col>
 
         <el-col :span="1.5">
-          <el-form-item label="需求计划">
-            <el-select :disabled="sonDisable" v-model="basicForm.planType" size="mini" style="width: 200px">
+          <el-form-item label="需求计划" prop="planType" :rules="{ required: true, message: '请选择需求计划', trigger: 'blur' }">
+            <el-select :disabled="sonDisable" v-model="basicForm.planType" size="mini" style="width: 200px" @change="changeplanType()">
               <el-option v-for="dict in dict.type.sys_plan_type" :key="dict.value" :label="dict.label" :value="dict.value">
               </el-option>
             </el-select>
@@ -55,7 +55,7 @@
           <el-form-item label="需求日期" prop="demandDate" :rules="{ required: true, message: '请选择需求日期', trigger: 'blur' }">
             <el-date-picker
               v-model="basicForm.demandDate"
-              :disabled="sonDisable"
+              disabled
               clearable
               type="date"
               value-format="yyyy-MM-dd"
@@ -571,9 +571,8 @@ export default {
         demandPersonalName: '',
         demandDept: '',
         demandDeptName: '',
-        planType: '1',
+        planType: 'ZJH',
         demandDate: '',
-        createTime: '',
         source: '4',
         billType: 'ZQBH',
         isCustomerSpecified: 'N',
@@ -753,6 +752,8 @@ export default {
     } else if(this.pageStu == 'edit') {
       this.getDetails(this.row)
     } else if (this.pageStu == 'add') {
+      // 新增时判断需求日期
+      this.dafaultDate()
       this.loading = false
       this.basicForm.demandPersonal = this.$store.state.user.name
       this.basicForm.demandPersonalName = this.$store.state.user.nickName
@@ -763,6 +764,58 @@ export default {
     }
   },
   methods: {
+    // 默认需求日期根据当天星期几判断
+    dafaultDate() {
+      // 获取当前时间
+      let date = new Date()
+      //获取当前时间的年份转为字符串
+      let year = date.getFullYear().toString()  
+      //获取月份,由于月份从0开始,此处要加1,判断是否小于10,如果是在字符串前面拼接'0'
+      let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()  //'04'
+      //获取天,判断是否小于10,如果是在字符串前面拼接'0'
+      let da = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate().toString()  //'12'
+      let today = year + '-' + month + '-' + da
+      console.log('今天日期',today)
+      let weekDay = date.getDay()
+      console.log('今天星期几', weekDay)
+      // 改变需求计划的判断写这里面了
+      if (this.basicForm.planType == 'JJXQ') {
+        this.basicForm.demandDate = today
+      } else {
+        if (weekDay == 0) {this.basicForm.demandDate = this.getNextDate(today, 2)} 
+        else if (weekDay == 1) {this.basicForm.demandDate = this.getNextDate(today, 1)}
+        else if (weekDay == 2) {this.basicForm.demandDate = today}
+        else if (weekDay == 3) {this.basicForm.demandDate = this.getNextDate(today, 6)}
+        else if (weekDay == 4) {this.basicForm.demandDate = this.getNextDate(today, 5)}
+        else if (weekDay == 5) {this.basicForm.demandDate = this.getNextDate(today, 4)}
+        else if (weekDay == 6) {this.basicForm.demandDate = this.getNextDate(today, 3)}
+        // console.log(this.getNextDate(today, 2))
+      }
+    },
+    // 获取某天日期的下一天,默认为第二天 默认输出格式为yyyy-mm-dd
+    getNextDate(date, day = 1, format = '{y}-{m}-{d}') {
+      if (date) {
+        date = date.match(/\d+/g).join('-'); // 格式为2022年09月19日处理
+        const nDate = new Date(date);
+        nDate.setDate(nDate.getDate() + day);
+ 
+        const formatObj = {
+          y: nDate.getFullYear(),
+          m: nDate.getMonth() + 1,
+          d: nDate.getDate(),
+        };
+        return format.replace(/{([ymd])+}/g, (result, key) => {
+          const value = formatObj[key];
+          return value.toString().padStart(2, '0');
+        });
+      } else {
+        console.log('date格式不正确');
+      }
+    },
+    // 改变需求计划改变需求日期
+    changeplanType() {
+      this.dafaultDate()
+    },
     // 无限滚动加载配置
     load() {
       if (this.loadDisabled) return;
@@ -856,6 +909,8 @@ export default {
       this.basicForm.demandPersonalName = this.$store.state.user.nickName
       this.basicForm.demandDept = this.$store.state.user.deptId
       this.basicForm.demandDeptName = this.$store.state.user.deptName
+      // 复制时判断需求日期
+      this.dafaultDate()
       if (this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal, '需求人员') }
       if (this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
       this.basicForm.puDemandItemList.forEach(item => {

+ 18 - 3
src/views/purchase/PurchaseDemandList/index.vue

@@ -252,6 +252,13 @@
     <!-- 模板下载新增参数 -->
     <el-dialog title="需求模板下载" :visible.sync="download.open" @close="clearDownload" width="400px">
       <el-row style="margin-bottom: 20px;">
+        <span style="margin-right: 10px;">需求计划</span>
+        <el-select size="mini" v-model="download.planType">
+          <el-option v-for="dict in dict.type.sys_plan_type" :key="dict.value" :label="dict.label" :value="dict.value">
+          </el-option>
+        </el-select>
+      </el-row>
+      <el-row style="margin-bottom: 20px;">
         <span style="margin-right: 10px;">需求客户</span>
         <el-select clearable size="mini" v-model="download.customer" @clear="download.customer = ''" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')">
           <el-option v-for="item in mBcustomer" :key="item.id" :label="item.name" :value="item.code" />
@@ -310,7 +317,7 @@ export default {
     Refers,
     TreeRefers
   },
-  dicts: ['sys_processing_mode', 'sys_status', 'sys_bill_source', 'sys_business', 'sys_reserve_ratio', 'sys_period_unit', 'sys_price_type'],
+  dicts: ['sys_processing_mode', 'sys_status', 'sys_bill_source', 'sys_business', 'sys_reserve_ratio', 'sys_period_unit', 'sys_price_type', 'sys_plan_type'],
   data() {
     return {
       loading: true,
@@ -332,6 +339,7 @@ export default {
       // 模板下载参数
       download: {
         open: false,
+        planType: 'ZJH',
         customer: '',
         warehouse: '',
         warehouseId: '',
@@ -473,8 +481,9 @@ export default {
       console.log('选中数组', this.ids.join())
     },
     mbDownload() {
+      this.$modal.loading("正在下载模板,请稍后...");
       downLoadDemand(this.download).then(res => {
-        console.log('下载的文件流', res)
+        this.$modal.closeLoading();
         const blob = new Blob([res], {
           type: "application/vnd.ms-excel;charset=UTF-8",
         });// 创建一个类文件对象:Blob对象表示一个不可变的、原始数据的类文件对象
@@ -484,12 +493,14 @@ export default {
         // var fileName = decodeURIComponent(temp.split("filename=")[1]); // 中文需要转码 (前端乱码)
         // var name = fileName.split(";")[0]; //切割成文件名
         downloadElement.href = href;  //下载地址
-        downloadElement.download = '模板'; // 下载后文件名
+        downloadElement.download = '采购需求单模板'+ this.parseTime(new Date().getTime()) + ".xlsx"; // 下载后文件名
         document.body.appendChild(downloadElement);
         downloadElement.click(); // 点击下载
         document.body.removeChild(downloadElement); // 下载完成移除元素
         window.URL.revokeObjectURL(href); // 释放blob对象
         this.download.open = false
+      }).catch(err => {
+        this.$modal.closeLoading();
       })
     },
     // 关闭模板下载弹窗清空参数
@@ -497,6 +508,7 @@ export default {
       // 模板下载参数
       this.download =  {
         open: false,
+        planType: 'ZJH',
         customer: '',
         warehouse: '',
         warehouseId: '',
@@ -517,9 +529,11 @@ export default {
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;
+      this.$modal.loading("正在导入数据,请稍后...");
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
+      this.$modal.closeLoading();
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
@@ -527,6 +541,7 @@ export default {
       this.getList(this.queryParams);
     },
     errorFile(err) {
+      this.$modal.closeLoading();
       this.$modal.notifyError("文件已变动,请重新上传");
     },
     // 提交上传文件

+ 62 - 43
src/views/purchase/apply/add/columns.js

@@ -68,15 +68,12 @@ export default function useColumns() {
       attr: { is: "el-input", disabled: true, readonly: true },
     },
     {
-      item: { key: "source", title: "来源单据号" },
-      attr: { is: "el-input", disabled: true, readonly: true },
-    },
-    {
       item: { key: "isEffective", title: "是否已推价格" },
       attr: {
         is: "el-select",
         dictName: "is_effective",
         value: "N",
+        disabled: true,
       },
     },
     {
@@ -120,6 +117,7 @@ export default function useColumns() {
           item: { key: "materialName", title: "物料名称", require: true },
           attr: {
             is: "el-popover-select-v2",
+            multiple: true,
             valueKey: "name",
             referName: "MATERIAL_PARAM",
             dataMapping: {
@@ -144,7 +142,7 @@ export default function useColumns() {
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位" },
+          item: { key: "unitName", title: "单位", hidden: false },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -153,7 +151,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "puUnitName", title: "采购单位" },
+          item: { key: "puUnitName", title: "采购单位", hidden: false },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -170,6 +168,8 @@ export default function useColumns() {
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
           },
         },
         {
@@ -179,6 +179,7 @@ export default function useColumns() {
             valueKey: "ntaxrate",
             referName: "TAX_RATE_PARAM",
             dataMapping: { tax: "ntaxrate" },
+            disabled: true,
           },
         },
         {
@@ -251,12 +252,20 @@ export default function useColumns() {
             },
           },
         },
-        { item: { key: "recentlyPrice", title: "最近价格" }, attr: {} },
+        {
+          item: { key: "recentlyPrice", title: "最近价格" },
+          attr: {
+            is: "el-input-number",
+            precision: CONFIG.precision,
+            disabled: true,
+          },
+        },
         {
           item: { key: "isApprovalFirst", title: "首次报批" },
           attr: {
             is: "el-select",
             dictName: "is_effective",
+            disabled: true,
           },
         },
         {
@@ -264,6 +273,7 @@ export default function useColumns() {
           attr: {
             is: "el-select",
             dictName: "is_effective",
+            disabled: true,
           },
         },
         {
@@ -284,7 +294,7 @@ export default function useColumns() {
         },
 
         {
-          item: { width:100,key: "isChannel", title: "是否渠道变更" },
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
           attr: {
             is: "el-select",
             dictName: "is_effective",
@@ -292,68 +302,72 @@ export default function useColumns() {
           },
         },
         {
-          item: { width:100,key: "brandReplacement", title: "是否品牌替换" },
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
           attr: {
             is: "el-select",
             dictName: "is_effective",
             value: "N",
           },
-        },{
-          item: { width:100,key: "priceDiffer", title: "单价差" },
+        },
+        {
+          item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "increase", title: "涨幅" },
+          item: { width: 100, key: "increase", title: "涨幅" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
         {
-          item: { width:100,key: "yAffectedAmount", title: "预计年影响量" },
+          item: { width: 100, key: "yAffectedAmount", title: "预计年影响量" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:150,key: "supplierName", title: "供应商名称" },
-          attr: {is: "el-input"},
-        },{
-          item: { width:150,key: "bidPrice", title: "中标价" },
+          item: { width: 150, key: "supplierName", title: "供应商名称" },
+          attr: { is: "el-input" },
+        },
+        {
+          item: { width: 150, key: "bidPrice", title: "中标价" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
-        },{
-          item: { width:150,key: "unitPrice", title: "单价" },
+        },
+        {
+          item: { width: 150, key: "unitPrice", title: "单价" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
-        },{
-          item: { width:150,key: "profit", title: "利润比" },
+        },
+        {
+          item: { width: 150, key: "profit", title: "利润比" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
@@ -361,22 +375,25 @@ export default function useColumns() {
         },
 
         {
-          item: { width:150,key: "supplierName1", title: "供应商名称1" },
-          attr: {is: "el-input"},
-        },{
-          item: { width:150,key: "bidPrice1", title: "中标价1" },
+          item: { width: 150, key: "supplierName1", title: "供应商名称1" },
+          attr: { is: "el-input" },
+        },
+        {
+          item: { width: 150, key: "bidPrice1", title: "中标价1" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
-        },{
-          item: { width:150,key: "unitPrice1", title: "单价1" },
+        },
+        {
+          item: { width: 150, key: "unitPrice1", title: "单价1" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
-        },{
-          item: { width:150,key: "profit1", title: "利润比1" },
+        },
+        {
+          item: { width: 150, key: "profit1", title: "利润比1" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
@@ -384,28 +401,30 @@ export default function useColumns() {
         },
 
         {
-          item: { width:150,key: "supplierName2", title: "供应商名称2" },
-          attr: {is: "el-input"},
-        },{
-          item: { width:150,key: "bidPrice2", title: "中标价2" },
+          item: { width: 150, key: "supplierName2", title: "供应商名称2" },
+          attr: { is: "el-input" },
+        },
+        {
+          item: { width: 150, key: "bidPrice2", title: "中标价2" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
-        },{
-          item: { width:150,key: "unitPrice2", title: "单价2" },
+        },
+        {
+          item: { width: 150, key: "unitPrice2", title: "单价2" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
-        },{
-          item: { width:150,key: "profit2", title: "利润比2" },
+        },
+        {
+          item: { width: 150, key: "profit2", title: "利润比2" },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
           },
         },
-
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
       ],

+ 80 - 83
src/views/purchase/apply/add/index.vue

@@ -57,43 +57,52 @@ export default {
   watch: {},
   methods: {
     //
-    changeMaterialName(prop) {
-      const { row } = prop;
-      const { puOrg, customer, supplier } = this.params;
-      const { tax: taxName, unitName, code: materialCode } = row;
-      // task 1
-      tax(taxName).then((res) => {
-        const { ntaxrate } = res;
-        row.tax = ntaxrate === "0E-8" ? "0.000000" : (ntaxrate * 1).toFixed(6);
-      });
-      // task 2
-      unit(unitName).then((res) => {
-        const { id, code, name } = res;
-        row.unit = id;
-        row.unitCode = code;
-        row.unitName = name;
-        row.puUnit = id;
-        row.puUnitCode = code;
-        row.puUnitName = name;
-      });
-      // task 3
-      currency("人民币").then((res) => {
-        const { id, code, name } = res;
-        row.currency = id;
-        row.currencyCode = code;
-        row.currencyName = name;
-      });
-      // task 4
-      fetchExist({ puOrg, customer, supplier, materialCode }).then((res) => {
-        const { recentlyPrice, isApprovalFirst, isPriceAdjustment } = res;
-        row.recentlyPrice = recentlyPrice;
-        if (isApprovalFirst) {
-          row.isApprovalFirst = isApprovalFirst == 0 ? "Y" : "N";
-        }
-        if (isPriceAdjustment) {
-          row.isPriceAdjustment = isPriceAdjustment == 0 ? "Y" : "N";
-        }
-      });
+    async changeMaterialName(prop) {
+      const { selectData } = prop;
+      const {
+        puOrg,
+        customer,
+        supplier,
+        currency,
+        currencyCode,
+        currencyName,
+      } = this.params;
+      if (selectData.length) {
+        this.params[this.tabName].splice(-1);
+      }
+      for (const item of selectData) {
+        const { tax: taxName, unitName, code: materialCode } = item;
+        // task 1
+        const { ntaxrate } = await tax(taxName);
+        // task 2
+        const {
+          id: puUnit,
+          code: puUnitCode,
+          name: puUnitName,
+        } = await unit(unitName);
+        // task 3
+        const {
+          recentlyPrice = "0",
+          isApprovalFirst = "N",
+          isPriceAdjustment = "N",
+        } = await fetchExist({ puOrg, customer, supplier, materialCode });
+        await this.onRowAdd(this.tabName, {
+          ...item,
+          currency: currency,
+          currencyCode: currencyCode,
+          currencyName: currencyName,
+          unit: puUnit,
+          unitCode: puUnitCode,
+          unitName: puUnitName,
+          puUnit: puUnit,
+          puUnitCode: puUnitCode,
+          puUnitName: puUnitName,
+          recentlyPrice,
+          isApprovalFirst,
+          isPriceAdjustment,
+          tax: Number(ntaxrate === "0E-8" ? 0 : ntaxrate).toFixed(6),
+        });
+      }
     },
     //
     async onOpen() {
@@ -103,15 +112,11 @@ export default {
         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;
@@ -124,7 +129,7 @@ export default {
       this.params = this.$init.params([...TabColumns, ...TableColumns]);
     },
     //
-    async onRowAdd(prop) {
+    async onRowAdd(prop, pushParams = {}) {
       const {
         $notify,
         TabColumns,
@@ -142,6 +147,7 @@ export default {
       this.params[prop].push({
         delFlag: "0",
         ...this.$init.params(TableColumns),
+        ...pushParams,
       });
     },
     //
@@ -216,16 +222,6 @@ export default {
         label-position="right"
         style="padding: 20px"
       >
-        <template slot="puOrgName" slot-scope="scope">
-          <component
-            v-bind="scope.attr"
-            v-model="scope.row[scope.item.key]"
-            :size="$attrs.size"
-            :source.sync="scope.row"
-            @change="changePuOrgName({ ...scope, select: $event })"
-          >
-          </component
-        ></template>
       </el-super-form>
       <el-tabs v-model="tabName" style="padding: 0 20px 20px">
         <el-tab-pane
@@ -235,40 +231,41 @@ export default {
           :name="item.key"
           lazy
         >
-          <el-super-table
-            v-model="params[item.key]"
-            :dict="dict"
-            :ref="tabName"
-            :columns="columns"
-            :size="$attrs.size"
-            style="padding: 20px 10px;height: 400px;"
-          >
-            <template slot="materialName" slot-scope="scope">
-              <component
-                v-bind="scope.attr"
-                v-model="scope.row[scope.item.key]"
-                :size="$attrs.size"
-                :source.sync="scope.row"
-                @change="changeMaterialName(scope)"
-              >
-              </component>
-            </template>
-            <el-table-column fixed="right" label="操作" width="100">
-              <template slot="header" slot-scope="scope">
-                <el-button :size="$attrs.size" @click="onRowAdd(tabName)">
-                  新增
-                </el-button>
-              </template>
-              <template slot-scope="scope">
-                <el-button
+          <div v-loading="loading" style="height: 600px; display: flex">
+            <el-super-table
+              v-model="params[item.key]"
+              :dict="dict"
+              :ref="tabName"
+              :columns="columns"
+              :size="$attrs.size"
+            >
+              <template slot="materialName" slot-scope="scope">
+                <component
+                  v-bind="scope.attr"
+                  v-model="scope.row[scope.item.key]"
                   :size="$attrs.size"
-                  @click.native.prevent="onRowRemove(tabName, scope)"
+                  :source.sync="scope.row"
+                  @change="changeMaterialName({ ...scope, selectData: $event })"
                 >
-                  删除
-                </el-button>
+                </component>
               </template>
-            </el-table-column>
-          </el-super-table>
+              <el-table-column fixed="right" label="操作" width="100">
+                <template slot="header" slot-scope="scope">
+                  <el-button :size="$attrs.size" @click="onRowAdd(tabName)">
+                    新增
+                  </el-button>
+                </template>
+                <template slot-scope="scope">
+                  <el-button
+                    :size="$attrs.size"
+                    @click.native.prevent="onRowRemove(tabName, scope)"
+                  >
+                    删除
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-super-table>
+          </div>
         </el-tab-pane>
       </el-tabs>
     </el-drawer>

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

@@ -28,7 +28,6 @@ export default function useColumns() {
       item: { key: "effectiveDate", title: "生效日期" ,  width:100},
       attr: {},
     },
-    { item: { key: "source", title: "来源单据号",  width:100 }, attr: {} },
     {
       item: { key: "sourceType", title: "来源单据类型" ,  width:100},
       attr: {},

+ 2 - 4
src/views/purchase/apply/copy/columns.js

@@ -68,15 +68,12 @@ export default function useColumns() {
       attr: { is: "el-input", disabled: true, readonly: true },
     },
     {
-      item: { key: "source", title: "来源单据号" },
-      attr: { is: "el-input", disabled: true, readonly: true },
-    },
-    {
       item: { key: "isEffective", title: "是否已推价格" },
       attr: {
         is: "el-select",
         dictName: "is_effective",
         value: "N",
+        disabled: true,
       },
     },
     {
@@ -132,6 +129,7 @@ export default function useColumns() {
               specification: "specification",
               manufacturer: "manufacturerId",
               manufacturerName: "manufacturerIdName",
+              tax: "materialRateName",
             },
           },
         },

+ 2 - 4
src/views/purchase/apply/edit/columns.js

@@ -68,15 +68,12 @@ export default function useColumns() {
       attr: { is: "el-input", disabled: true, readonly: true },
     },
     {
-      item: { key: "source", title: "来源单据号" },
-      attr: { is: "el-input", disabled: true, readonly: true },
-    },
-    {
       item: { key: "isEffective", title: "是否已推价格" },
       attr: {
         is: "el-select",
         dictName: "is_effective",
         value: "N",
+        disabled: true,
       },
     },
     {
@@ -132,6 +129,7 @@ export default function useColumns() {
               specification: "specification",
               manufacturer: "manufacturerId",
               manufacturerName: "manufacturerIdName",
+              tax: "materialRateName",
             },
           },
         },

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

@@ -97,6 +97,7 @@ export default {
   methods: {
     //
     changeMaterialName(prop) {
+      console.log(prop, "prop");
       const { row } = prop;
       const { puOrg, customer, supplier } = this.params;
       const { tax: taxName, unitName, code: materialCode } = row;
@@ -126,12 +127,8 @@ export default {
       fetchExist({ puOrg, customer, supplier, materialCode }).then((res) => {
         const { recentlyPrice, isApprovalFirst, isPriceAdjustment } = res;
         row.recentlyPrice = recentlyPrice;
-        if (isApprovalFirst) {
-          row.isApprovalFirst = isApprovalFirst == 0 ? "Y" : "N";
-        }
-        if (isPriceAdjustment) {
-          row.isPriceAdjustment = isPriceAdjustment == 0 ? "Y" : "N";
-        }
+        row.isApprovalFirst = isApprovalFirst;
+        row.isPriceAdjustment = isPriceAdjustment;
       });
     },
     //

+ 106 - 86
src/views/purchase/apply/see/columns.js

@@ -3,62 +3,58 @@ import CONFIG from "@/config";
 export default function useColumns() {
   const TableColumns = [
     {
-      item: { width:100,key: "priceCode", title: "价格编码" },
+      item: { width: 100, key: "priceCode", title: "价格编码" },
       attr: {},
     },
     {
-      item: { width:100,key: "supplierName", title: "供应商" },
+      item: { width: 100, key: "supplierName", title: "供应商" },
       attr: {},
     },
     {
-      item: { width:100,key: "puOrgName", title: "采购组织" },
+      item: { width: 100, key: "puOrgName", title: "采购组织" },
       attr: {},
     },
     {
-      item: { width:100,key: "currencyName", title: "币种" },
+      item: { width: 100, key: "currencyName", title: "币种" },
       attr: {},
     },
     {
-      item: { width:100,key: "explainStr", title: "价格合理性说明" },
+      item: { width: 100, key: "explainStr", title: "价格合理性说明" },
       attr: {},
     },
     {
-      item: { width:100,key: "buyerName", title: "采购员" },
+      item: { width: 100, key: "buyerName", title: "采购员" },
       attr: {},
     },
     {
-      item: { width:100,key: "puDeptName", title: "采购部门" },
+      item: { width: 100, key: "puDeptName", title: "采购部门" },
       attr: {},
     },
     {
-      item: { width:100,key: "createByName", title: "创建人" },
+      item: { width: 100, key: "createByName", title: "创建人" },
       attr: {},
     },
     {
-      item: { width:100,key: "source", title: "来源单据号" },
-      attr: {},
-    },
-    {
-      item: { width:100,key: "isEffective", title: "是否已推价格" },
+      item: { key: "isEffective", title: "是否已推价格" },
       attr: {
         is: "el-dict-tag",
         dictName: "is_effective",
       },
     },
     {
-      item: { width:100,key: "effectiveDate", title: "生效日期" },
+      item: { width: 100, key: "effectiveDate", title: "生效日期" },
       attr: {},
     },
     {
-      item: { width:100,key: "file", title: "附件" },
+      item: { width: 100, key: "file", title: "附件" },
       attr: { is: "el-file-preview" },
     },
     {
-      item: { width:100,key: "sourceType", title: "来源单据类型" },
+      item: { width: 100, key: "sourceType", title: "来源单据类型" },
       attr: {},
     },
     {
-      item: { width:100,key: "status", title: "单据状态" },
+      item: { width: 100, key: "status", title: "单据状态" },
       attr: {
         is: "el-dict-tag",
         dictName: "sys_status",
@@ -70,30 +66,37 @@ export default function useColumns() {
     {
       item: {
         title: "物料信息表",
-        width:100,key: "priceApplyItems",
+        width: 100,
+        key: "priceApplyItems",
       },
       attr: {
         value: [],
       },
       TableColumns: [
         {
-          item: { width:100,key: "materialName", title: "物料名称" },
+          item: { width: 100, key: "materialName", title: "物料名称" },
+          attr: {},
+        },
+        {
+          item: { width: 100, key: "materialCode", title: "物料编码" },
+          attr: {},
+        },
+        {
+          item: { width: 100, key: "manufacturerName", title: "生产厂家" },
           attr: {},
         },
-        { item: { width:100,key: "materialCode", title: "物料编码" }, attr: {} },
-        { item: { width:100,key: "manufacturerName", title: "生产厂家" }, attr: {} },
-        { item: { width:100,key: "specification", title: "规格" }, attr: {} },
-        { item: { width:100,key: "model", title: "型号" }, attr: {} },
+        { item: { width: 100, key: "specification", title: "规格" }, attr: {} },
+        { item: { width: 100, key: "model", title: "型号" }, attr: {} },
         {
-          item: { width:100,key: "unitName", title: "单位" },
+          item: { width: 100, key: "unitName", title: "单位" },
           attr: {},
         },
         {
-          item: { width:100,key: "puUnitName", title: "采购单位" },
+          item: { width: 100, key: "puUnitName", title: "采购单位" },
           attr: {},
         },
         {
-          item: { width:100,key: "conversionRate", title: "采购换算率" },
+          item: { width: 100, key: "conversionRate", title: "采购换算率" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
@@ -102,72 +105,75 @@ export default function useColumns() {
           },
         },
         {
-          item: { width:100,key: "tax", title: "税率%" },
+          item: { width: 100, key: "tax", title: "税率%" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
         {
-          item: { width:100,key: "taxPrice", title: "含税单价" },
+          item: { width: 100, key: "taxPrice", title: "含税单价" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
         {
-          item: { width:100,key: "price", title: "无税单价" },
+          item: { width: 100, key: "price", title: "无税单价" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
         {
-          item: { width:100,key: "currencyName", title: "币种" },
+          item: { width: 100, key: "currencyName", title: "币种" },
+          attr: {},
+        },
+        {
+          item: { width: 100, key: "periodBegin", title: "价格有效期(起)" },
           attr: {},
         },
         {
-          item: { width:100,key: "periodBegin", title: "价格有效期(起)" },
+          item: { width: 100, key: "periodEnd", title: "价格有效期(止)" },
           attr: {},
         },
         {
-          item: { width:100,key: "periodEnd", title: "价格有效期(止)" },
+          item: { width: 100, key: "customerName", title: "客户" },
           attr: {},
         },
         {
-          item: { width:100,key: "customerName", title: "客户" },
+          item: { width: 100, key: "recentlyPrice", title: "最近价格" },
           attr: {},
         },
-        { item: { width:100,key: "recentlyPrice", title: "最近价格" }, attr: {} },
         {
-          item: { width:100,key: "isApprovalFirst", title: "首次报批" },
+          item: { width: 100, key: "isApprovalFirst", title: "首次报批" },
           attr: {
             is: "el-dict-tag",
             dictName: "is_effective",
           },
         },
         {
-          item: { width:100,key: "isPriceAdjustment", title: "价格调整" },
+          item: { width: 100, key: "isPriceAdjustment", title: "价格调整" },
           attr: {
             is: "el-dict-tag",
             dictName: "is_effective",
           },
         },
         {
-          item: { width:100,key: "priceType", title: "价格类型" },
+          item: { width: 100, key: "priceType", title: "价格类型" },
           attr: {
             is: "el-dict-tag",
             dictName: "sys_price_type",
           },
         },
         {
-          item: { width:100,key: "isDistributionPrice", title: "配送价" },
+          item: { width: 100, key: "isDistributionPrice", title: "配送价" },
           attr: {
             is: "el-dict-tag",
             dictName: "is_effective",
@@ -175,148 +181,162 @@ export default function useColumns() {
         },
 
         {
-          item: { width:100,key: "isChannel", title: "是否渠道变更" },
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
           attr: {
             is: "el-dict-tag",
             dictName: "is_effective",
           },
         },
         {
-          item: { width:100,key: "brandReplacement", title: "是否品牌替换" },
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
           attr: {
             is: "el-dict-tag",
             dictName: "is_effective",
           },
-        },{
-          item: { width:100,key: "priceDiffer", title: "单价差" },
+        },
+        {
+          item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "increase", title: "涨幅" },
+          item: { width: 100, key: "increase", title: "涨幅" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "yPurchaseQuantity", title: "预计年采购量" },
+          item: { width: 100, key: "yPurchaseQuantity", title: "预计年采购量" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
         {
-          item: { width:100,key: "yAffectedAmount", title: "预计年影响量" },
+          item: { width: 100, key: "yAffectedAmount", title: "预计年影响量" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "supplierName", title: "供应商名称" },
+          item: { width: 100, key: "supplierName", title: "供应商名称" },
           attr: {},
-        },{
-          item: { width:100,key: "bidPrice", title: "中标价" },
+        },
+        {
+          item: { width: 100, key: "bidPrice", title: "中标价" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
-        },{
-          item: { width:100,key: "unitPrice", title: "单价" },
+        },
+        {
+          item: { width: 100, key: "unitPrice", title: "单价" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
-        },{
-          item: { width:100,key: "profit", title: "利润比" },
+        },
+        {
+          item: { width: 100, key: "profit", title: "利润比" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "supplierName1", title: "供应商名称1" },
+          item: { width: 100, key: "supplierName1", title: "供应商名称1" },
           attr: {},
-        },{
-          item: { width:100,key: "bidPrice1", title: "中标价1" },
+        },
+        {
+          item: { width: 100, key: "bidPrice1", title: "中标价1" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
-        },{
-          item: { width:100,key: "unitPrice1", title: "单价1" },
+        },
+        {
+          item: { width: 100, key: "unitPrice1", title: "单价1" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
-        },{
-          item: { width:100,key: "profit1", title: "利润比1" },
+        },
+        {
+          item: { width: 100, key: "profit1", title: "利润比1" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
         {
-          item: { width:100,key: "supplierName2", title: "供应商名称2" },
+          item: { width: 100, key: "supplierName2", title: "供应商名称2" },
           attr: {},
-        },{
-          item: { width:100,key: "bidPrice2", title: "中标价2" },
+        },
+        {
+          item: { width: 100, key: "bidPrice2", title: "中标价2" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
-        },{
-          item: { width:100,key: "unitPrice2", title: "单价2" },
+        },
+        {
+          item: { width: 100, key: "unitPrice2", title: "单价2" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
-        },{
-          item: { width:100,key: "profit2", title: "利润比2" },
+        },
+        {
+          item: { width: 100, key: "profit2", title: "利润比2" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
-              return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
+              return prop == null ? 0 : (prop * 1).toFixed(CONFIG.precision);
             },
           },
         },
 
-
-
-        { item: { width:100,key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { width:100,key: "updateByName", title: "更新人名称" }, attr: {} },
+        {
+          item: { width: 100, key: "createByName", title: "创建人名称" },
+          attr: {},
+        },
+        {
+          item: { width: 100, key: "updateByName", title: "更新人名称" },
+          attr: {},
+        },
       ],
     },
   ];

+ 15 - 15
src/views/purchase/purchase-order/add/column.js

@@ -156,7 +156,7 @@ export const Columns = [
     title: "价税合计", 
     inputType: "InputNumber",
     controlsPosition: "right", 
-    precision:2,
+    // precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -165,7 +165,7 @@ export const Columns = [
     title: "原始总金额", 
     inputType: "InputNumber",
     controlsPosition: "right", 
-    precision:2,
+    // precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -174,7 +174,7 @@ export const Columns = [
     title: "无税金额", 
     inputType: "InputNumber",  
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -236,7 +236,7 @@ export const Columns = [
     title: "订单使用返利金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true, 
     require: true,
   },
@@ -245,7 +245,7 @@ export const Columns = [
     title: "订单抵扣余款金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true, 
     require: true,
   },
@@ -371,7 +371,7 @@ export const Columns = [
     title: "累计付款申请金额", 
     inputType: "InputNumber", 
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true,
     disabled:true,
   },
@@ -380,7 +380,7 @@ export const Columns = [
     title: "累计付款金额", 
     inputType: "InputNumber", 
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true,
   },
   { 
@@ -388,7 +388,7 @@ export const Columns = [
     title: "发票金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true,
    },
   {
@@ -669,7 +669,7 @@ export const TabColumns = [
         title: "含税单价", 
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         require: true,
         disabled:true,
         width: 180,
@@ -679,7 +679,7 @@ export const TabColumns = [
         title: "价税合计", 
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
        },
@@ -689,7 +689,7 @@ export const TabColumns = [
         // inputType: "Input",
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },
@@ -698,7 +698,7 @@ export const TabColumns = [
         title: "折扣金额", 
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
        },
@@ -723,7 +723,7 @@ export const TabColumns = [
         title: "无税单价",
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },
@@ -732,7 +732,7 @@ export const TabColumns = [
         title: "无税金额", 
         inputType: "InputNumber", 
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },
@@ -835,7 +835,7 @@ export const TabColumns = [
         title: "原始金额", 
         inputType: "InputNumber", 
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },

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

@@ -308,6 +308,8 @@ export default {
 
         this.handleConfirmTips(async()=>{
 
+          this.loading = true;
+
           let { code } = await orderApi.submit({ puOrderIds});
 
           if (code == 200) {
@@ -318,6 +320,9 @@ export default {
 
         })
       } catch (error) {} 
+      finally{
+        this.loading = false;
+      }
     },
 
     // 判断“整单退回”按钮
@@ -662,7 +667,10 @@ export default {
           :disabled="judgeIsLineReturn()"
         >行退回</el-button>
       </el-row>
-      <el-tabs v-model="tabName" @tab-click="handleTabClick" style="width: 100%;padding: 20px 10px;height: 1000px;">
+      <el-tabs 
+        v-model="tabName" 
+        @tab-click="handleTabClick" 
+        style="width: 100%;padding: 20px 10px;">
         <el-tab-pane 
           v-for="(column, index) in tabColumns" 
           :key="index" 
@@ -670,10 +678,9 @@ export default {
           :name="column.key"
         >
           <el-super-table
-            style="padding: 20px 10px;height: 800px;"
+            style="height: 300px;"
             v-model="tabTableDatas[column.key]"
             :ref="column.key"
-            max-height="500"
             :dict="dict"
             :columns="column.tableColumns"
             :selectable="setTabSelectable"

+ 4 - 2
src/views/purchase/task/xie-yi-zhi-cai/column.js

@@ -18,8 +18,10 @@ export const TableColumns = [
     attr: {},
   },
   {
-    item: { key: "supplierName", title: "供应商" },
-    attr: {},
+    item: { key: "supplierName", title: "供应商", filterabled:true, },
+    attr: {
+     
+    },
   },
   {
     item: { key: "customerName", title: "客户" },

+ 9 - 5
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -57,6 +57,7 @@ export default {
             orderPriceVos: item.orderPriceVos.map((cItem) => ({
               ...item,
               ...cItem,
+              purchaseQuantity: item.orderPriceVos.length === 1 ? (item.puQty - item.executeQty) : undefined
             })),
           }));
           return true;
@@ -119,19 +120,21 @@ export default {
     >
       <template slot="title">
         <span>{{ title }}</span>
+
         <el-button
+          type="primary"
           :size="$attrs.size"
           :loading="loading"
-          @click="visible = false"
-          >取 消</el-button
+          @click="submit(data)"
+          >确 认</el-button
         >
         <el-button
-          type="primary"
           :size="$attrs.size"
           :loading="loading"
-          @click="submit(data)"
-          >确 认</el-button
+          @click="visible = false"
+          >取 消</el-button
         >
+        
       </template>
       <div v-for="(item, index) in data" :key="index" class="m-4">
         <h3 class="mb-4">
@@ -147,6 +150,7 @@ export default {
           :columns="tableColumns"
           :size="$attrs.size"
           :dict="dict"
+          
         >
           <template slot="purchaseQuantity" slot-scope="scope">
             <component

+ 2 - 2
src/views/purchase/transferOrder/add.vue

@@ -1302,7 +1302,7 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-form-item label="最后修改人">
               <el-input
                 v-model="basicForm.updateByName"
@@ -1323,7 +1323,7 @@
                 style="width: 200px"
               />
             </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
       </el-form>
 

+ 31 - 13
src/views/purchase/transferOrder/index.vue

@@ -14,13 +14,13 @@
             <el-col :span="1.5">
               <el-form-item label="单据日期">
                 <el-date-picker
-                style="width: 200px"
-                size="mini"
-                clearable
-                value-format="yyyy-MM-dd"
-                  v-model="queryParams.billDate"
-                  type="date">
-                </el-date-picker>
+                  size="mini"
+                  v-model="dateRange"
+                  style="width: 240px"
+                  value-format="yyyy-MM-dd"
+                  type="daterange"
+                  range-separator="-"
+                ></el-date-picker>
               </el-form-item>
             </el-col>
             <el-col :span="1.5">
@@ -57,6 +57,13 @@
                   />
                 </el-form-item>
               </el-col>
+              <el-col :span="1.5">
+              <el-form-item label="制单人">
+                <el-select clearable size="mini" v-model="queryParams.createBy"  @focus="chooseRefer('CONTACTS_PARAM', true, '制单人')" style="width: 200px">
+                  <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code"/>
+                </el-select>
+              </el-form-item>
+            </el-col>
             </el-row>
           </div>
           </CollapseTransition>
@@ -117,8 +124,8 @@
           <el-table-column show-overflow-tooltip label="制单日期" align="center" prop="createTime" width="150px"/>
           <!-- <el-table-column show-overflow-tooltip label="审批人" align="center" prop="code" width="150px"/> -->
           <!-- <el-table-column show-overflow-tooltip label="审批日期" align="center" prop="code" width="150px"/> -->
-          <el-table-column show-overflow-tooltip label="最后修改人" align="center" prop="updateByName" width="100px"/>
-          <el-table-column show-overflow-tooltip label="最后修改时间" align="center" prop="updateTime" width="150px"/>
+          <!-- <el-table-column show-overflow-tooltip label="最后修改人" align="center" prop="updateByName" width="100px"/>
+          <el-table-column show-overflow-tooltip label="最后修改时间" align="center" prop="updateTime" width="150px"/> -->
           <el-table-column
           fixed="right"
           label="操作"
@@ -346,13 +353,14 @@ export default {
       page: '',
       queryParams: {
         deliveryInventoryOrg: '',
-        billDate: '',
-        billType: '',
         storageInventoryOrg: '',
         code: '',
+        createBy:'',
         pageNum: 1,
         pageSize: 10
       },
+      //单据日期查询范围
+      dateRange:[],
       referCondition: {
         type: '',
         isPage: true,
@@ -365,6 +373,7 @@ export default {
       }],
       chuOrgOptions: [],
       ruOrgOptions: [],
+      manOptions: [],
       tableList: [],
       total: 0,
       materialInfo: [],
@@ -445,19 +454,20 @@ export default {
       this.getList(this.queryParams)
     },
     resetList() {
+      this.dateRange = [];
       this.queryParams = {
         deliveryInventoryOrg: '',
-        billDate: '',
         billType: '',
         storageInventoryOrg: '',
         code: '',
+        createBy:'',
         pageNum: 1,
         pageSize: 10
       }
       this.getList(this.queryParams)
     },
     getList(params){
-      getOrderList(params).then(res => {
+      getOrderList(this.addDateRange(params, this.dateRange)).then(res => {
         if (res.code === 200) {
           this.tableList = res.rows
           this.total = res.total
@@ -506,6 +516,10 @@ export default {
         this.$modal.closeLoading();
       })
     },
+    //查询条件单据日期改变后
+    billDateAfterChange(val){
+      console.log('val',val);
+    },
     // 选中某行
     select(row) {
       console.log('选中', row)
@@ -551,6 +565,10 @@ export default {
         this.ruOrgOptions = selection
         this.queryParams.storageInventoryOrg = selection[0].id
       }
+      if (this.referCondition.title == '制单人') {
+        this.manOptions = selection
+        this.queryParams.createBy = selection[0].code
+      }
     },
   }
 

+ 1 - 1
vue.config.js

@@ -47,7 +47,7 @@ module.exports = {
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.21:8000/drp-admin`, //CKF本地
         // target: `http://172.16.13.43:8000/drp-admin`, //lz's localhost
-        // target: `http://172.16.63.52:8000/drp-admin`, //董卓
+      //  target: `http://172.16.63.126:8000/drp-admin`, //wjie
          // target: `http://127.0.0.1:8000/drp-admin`,
         changeOrigin: true,
         pathRewrite: {