Explorar o código

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

DongZ hai 1 ano
pai
achega
937f93e0bf

+ 20 - 3
src/api/purchase/workMonitor.js

@@ -1,9 +1,26 @@
 import request from '@/utils/request'
 
 // 流程监控列表
-export function getMonitorList(params) {
+export function getMonitorList(data) {
   return request({
-    url: `/oaMonitor/list?currentPage=${params.pageNum}&rows=${params.pageSize}`,
-    method: 'get',
+    url: `/oaMonitor/list?currentPage=${data.pageNum}&rows=${data.pageSize}`,
+    method: 'post',
+    data: data
+  })
+}
+// 流程监控审批-物料
+export function wlSubmit(data) {
+  return request({
+    url: `/oaMonitor/approval1`,
+    method: 'post',
+    data: data
+  })
+}
+// 流程监控审批-采购
+export function cgSubmit(data) {
+  return request({
+    url: `/oaMonitor/approval2`,
+    method: 'post',
+    data: data
   })
 }

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

@@ -264,13 +264,15 @@ export default {
       }
     },
     async useAutocomplete(prop, cb) {
+      const { type, source, queryParams } = this.$props;
       if (prop) {
         this.page.pageSize = 10;
 
         this.model = {
           ...this.model,
           search:prop,
-          type:this.type,
+          type:type,
+          ...queryParams(source),
         }
         // 
         await this.fetchList(this.model, this.page);

+ 0 - 585
src/components/super-table/index_copy.vue

@@ -1,585 +0,0 @@
-<script>
-export default {
-  name: "SuperTable",
-  props: {
-    // 数据
-    value: {
-      type: [Array],
-      require: true,
-    },
-    // 字典
-    dict: {
-      type: [Object],
-      require: true,
-    },
-    // 分页
-    page: {
-      type: [Object],
-      require: false,
-    },
-    // 模板
-    columns: {
-      type: [Array],
-      require: true,
-    },
-    // 是否显示序号
-    index: {
-      type: Boolean,
-      default: false,
-    },
-    // 是否显示单选
-    radio: {
-      type: Boolean,
-      default: false,
-    },
-    // 是否显示多选
-    checkbox: {
-      type: Boolean,
-      default: false,
-    },
-    // 是否显示分页
-    pagination: {
-      type: Boolean,
-      default: false,
-    },
-    // 是否列操作
-    convenitentOperation: {
-      type: Boolean,
-      default: false,
-    },
-    // 是否禁止选择
-    selectable: {
-      type: Function,
-      default: () => {},
-    },
-    //
-    storageKey: {
-      type: String,
-    },
-    showSummary:{
-      type:Boolean,
-      default:false,
-    },
-
-  },
-  components: {
-    ElDictTag: () => import("@/components/DictTag/index.vue"),
-    ElDraggable: () => import("@/components/draggable/index.vue"),
-    ElFilePreview: () => import("@/components/file-preview/index.vue"),
-    ElComputedInput: () => import("@/components/computed-input/index.vue"),
-    ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue"),
-    ElPopoverMultipleSelectV2: () =>
-      import("@/components/popover-select-v2/multiple.vue"),
-    ElComputedInputV2: () => import("@/components/computed-input-v2/index.vue"),
-    ElPopoverTreeSelect: () =>
-      import("@/components/popover-tree-select/index.vue"),
-    ButtonHide: () => import("./hide.vue"),
-    ButtonFreeze: () => import("./freeze.vue"),
-    IconHide: () => import("./once/hide.vue"),
-    IconSort: () => import("./once/sort.vue"),
-    IconFreeze: () => import("./once/freeze.vue"),
-    IconFilter: () => import("./once/filters.vue"),
-  },
-  data() {
-    const { columns, storageKey } = this.$props;
-    const localColumns = localStorage.getItem(storageKey);
-    const innerColumns =
-      storageKey && localColumns
-        ? JSON.parse(localColumns)
-        : columns.map(({ item, attr }) => ({
-            attr,
-            item: { hidden: true, ...item },
-          }));
-    return {
-      innerColumns: innerColumns,
-      rowKey: "id",
-      // 选择
-      selectData: [],
-      selectState: false,
-      // 过滤
-      filterData: [],
-      filterState: false,
-    };
-  },
-  computed: {
-    innerValue: {
-      get() {
-        if (this.filterState) {
-          return this.filterData;
-        } else if (this.selectState) {
-          return this.selectData;
-        } else {
-          return this.$props.value;
-        }
-      },
-      set(value) {
-        this.$emit("input", value);
-      },
-    },
-    showColumns: {
-      get() {
-        return this.innerColumns.filter(({ item }) => item.hidden);
-      },
-      set() {},
-    },
-    filterRules: {
-      get() {
-        return Object.fromEntries(
-          this.innerColumns
-            .filter(({ item }) => item.filter && !!item.filter.length)
-            .map(({ item }) => [item.key, item.filter])
-        );
-      },
-      set() {},
-    },
-  },
-  watch: {
-    filterRules: {
-      handler: function (newValue) {
-        function multiFilter(array, filters) {
-          const filterKeys = Object.keys(filters);
-          // filters all elements passing the criteria
-          return array.filter((item) => {
-            // dynamically validate all filter criteria
-            return filterKeys.every((key) => {
-              //ignore when the filter is empty Anne
-              if (!filters[key].length) return true;
-              return !!~filters[key].indexOf(item[key]);
-            });
-          });
-        }
-        this.filterState = JSON.stringify(newValue) !== "{}";
-        this.filterData = multiFilter(this.$props.value, newValue);
-      },
-    },
-    value:{
-      handler: function (newValue) {
-        if(this.value.length > 0){
-          this.$refs.superTable&& this.$refs.superTable.clearSelection();
-        }
-      },
-      immediate: true,
-      deep:true
-    }
-  },
-  methods: {
-    //
-    onSelectionChange(value) {
-      this.selectData = value;
-      this.$emit("row-select", this.selectData);
-    },
-    //
-    onRowClick(row, column, event) {
-      const { radio, checkbox } = this.$props;
-      // 单选
-      if (radio) {
-        this.$emit("row-select", [row]);
-      }
-      // 多选
-      if (checkbox) {
-        this.$refs.superTable.toggleRowSelection(
-          this.innerValue.find((item) => item.id === row.id)
-        );
-      }
-    },
-    // 宽度
-    onWidth(newProp, oldProp, column) {
-      this.innerColumns = this.innerColumns.map(({ item, attr }) => ({
-        attr,
-        item: {
-          ...item,
-          width: item.key === column.property ? newProp : item.width,
-        },
-      }));
-      if (this.$props.storageKey) {
-        localStorage.setItem(
-          this.$props.storageKey,
-          JSON.stringify(this.innerColumns)
-        );
-      }
-    },
-    // 冻结
-    onHide(prop) {
-      this.$nextTick(() => {
-        this.$refs.superTable.doLayout();
-        if (this.$props.storageKey) {
-          localStorage.setItem(
-            this.$props.storageKey,
-            JSON.stringify(this.innerColumns)
-          );
-        }
-      });
-    },
-    // 排序
-    onSort(prop) {
-      const { key, sort } = prop;
-      this.$nextTick(() => {
-        this.$refs.superTable.sort(key, sort);
-        this.$refs.superTable.doLayout();
-        if (this.$props.storageKey) {
-          localStorage.setItem(
-            this.$props.storageKey,
-            JSON.stringify(this.innerColumns)
-          );
-        }
-      });
-    },
-    // 冻结
-    onFreeze() {
-      this.$nextTick(() => {
-        this.$refs.superTable.doLayout();
-        if (this.$props.storageKey) {
-          localStorage.setItem(
-            this.$props.storageKey,
-            JSON.stringify(this.innerColumns)
-          );
-        }
-      });
-    },
-    // 过滤
-    onFilter() {
-      this.$nextTick(() => {
-        this.$refs.superTable.doLayout();
-        if (this.$props.storageKey) {
-          localStorage.setItem(
-            this.$props.storageKey,
-            JSON.stringify(this.innerColumns)
-          );
-        }
-      });
-    },
-    onFilters(value) {
-      const {
-        item: { key },
-        attr: { dictName },
-      } = value;
-      let dataList = [];
-      const dict = this.dict.type[dictName];
-      dataList = Array.from(
-        new Set(this.innerValue.map((item) => item[key]).filter((item) => item))
-      ).map((item) => ({
-        text: dictName
-          ? (dict.find((dictItem) => dictItem.value == item) || {}).label
-          : item,
-        value: item,
-      }));
-      return dataList;
-    },
-    // 继承el-table的Method
-    extendMethod() {
-      const refMethod = Object.entries(this.$refs["superTable"]);
-      for (const [key, value] of refMethod) {
-        if (!(key.includes("$") || key.includes("_"))) {
-          this[key] = value;
-        }
-      }
-    },
-    getSummaries({ columns, data }){
-      
-      const means = [] // 合计
-      columns.forEach((column, columnIndex) => {
-          if (columnIndex === 0) {
-              means.push('合计')
-          } else {
-              const values = data.map(item => Number(item[column.property]));
-              
-              let sumColumn = this.showColumns.filter(({item,attr}) => attr.isSummary && item.key === column.property);
-
-              // 合计
-              // if (!values.every(value => isNaN(value))) {
-              if (sumColumn.length) {
-                  means[columnIndex] = values.reduce((prev, curr) => {
-                      const value = Number(curr);
-                      if (!isNaN(value)) {
-                          return prev + curr;
-                      } else {
-                          return prev;
-                      }
-                  }, 0);
-                  means[columnIndex] = means[columnIndex].toFixed(2); 
-              } else {
-                  means[columnIndex] = '';
-              }
-            }
-      })
-      // sums[index] = sums[index] && sums[index].toFixed(2); // 保留2位小数,解决小数合计列
-      return [means]
-			
-    }
-  },
-  created() {},
-  mounted() {
-    this.extendMethod();
-  },
-  updated() {
-    this.$nextTick(()=>{
-      this.$refs.superTable.doLayout();
-    })
-  },
-  destroyed() {},
-};
-</script>
-
-<template>
-  <div class="el-super-table">
-    <ux-grid 
-      border
-      row-key
-      use-virtual
-      show-overflow
-      keep-source
-      height="auto"
-      ref="superTable"
-      v-bind="$attrs"
-      v-on="$listeners"
-      :data="innerValue"
-      :show-summary="showSummary"
-      :summary-method="getSummaries"
-      :highlight-current-row="radio"
-      @row-click="onRowClick"
-      @header-dragend="onWidth"
-      @selection-change="onSelectionChange"
-      style="flex: 1"
-    >
-    <!-- <el-table
-      border
-      height="auto"
-      ref="superTable"
-      v-bind="$attrs"
-      v-on="$listeners"
-      :row-key="rowKey"
-      :data="innerValue"
-      :show-summary="showSummary"
-      :summary-method="getSummaries"
-      :highlight-current-row="radio"
-      @row-click="onRowClick"
-      @header-dragend="onWidth"
-      @selection-change="onSelectionChange"
-      style="flex: 1"
-    > -->
-      <!-- 多选 -->
-      <ux-table-column
-        v-if="checkbox"
-        :column-key="rowKey"
-        fixed
-        width="60"
-        align="center"
-        type="checkbox"
-        reserve-selection
-      >
-      </ux-table-column>
-      <!-- 序号 -->
-      <ux-table-column
-        v-if="index"
-        :resizable="false"
-        fixed
-        width="50"
-        title="序号"
-        align="center"
-        class="is-index"
-        type="index"
-      >
-        <!-- <template slot-scope="scope">
-          {{ scope.$index + 1 }}
-        </template> -->
-      </ux-table-column>
-      <ux-table-column
-        v-for="({ item, attr }, index) in showColumns"
-        :key="item.key + index"
-        :field="item.key"
-        :title="item.title"
-        :fixed="item.fixed"
-        :width="item.width || 200"
-        show-overflow-tooltip
-      >
-        <template slot="header" slot-scope="scope">
-          <template>
-            <span v-if="item.require" style="color: #ff4949">*</span>
-            <span
-              :style="{
-                color:
-                  item.sort ||
-                  item.fixed ||
-                  (item.filter && !!item.filter.length)
-                    ? '#1890ff'
-                    : '',
-              }"
-            >
-              {{ item.title }}
-            </span>
-            <template>
-              <icon-sort
-                v-if="item.sortabled"
-                v-model="item.sort"
-                @sort="onSort(item)"
-              ></icon-sort>
-              <icon-freeze
-                v-if="item.fixedabled"
-                v-model="item.fixed"
-                @freeze="onFreeze"
-              ></icon-freeze>
-              <icon-filter
-                v-if="item.filterabled"
-                v-model="item.filter"
-                :filters="onFilters({ item, attr })"
-                @filter="onFilter"
-              ></icon-filter>
-              <icon-hide
-                v-if="item.hiddenabled"
-                v-model="item.hidden"
-                @hide="onHide"
-              ></icon-hide>
-            </template>
-          </template>
-        </template>
-        <template slot-scope="scope">
-          <slot :name="item.key" v-bind="scope" :item="item" :attr="attr">
-            <template v-if="attr.is">
-              <component
-                v-if="attr.is === 'el-dict-tag'"
-                v-bind="attr"
-                :size="$attrs.size"
-                :value="scope.row[item.key]"
-                :options="dict.type[attr.dictName]"
-              ></component>
-              <component
-                v-else-if="attr.is === 'el-popover-select-v2'"
-                v-bind="attr"
-                v-model="scope.row[item.key]"
-                :title="item.title"
-                :size="$attrs.size"
-                :source.sync="scope.row"
-              >
-              </component>
-              <component
-                v-else-if="attr.is === 'el-popover-multiple-select-v2'"
-                v-bind="attr"
-                v-model="scope.row[item.key]"
-                :title="item.title"
-                :size="$attrs.size"
-                :source.sync="scope.row"
-              >
-              </component>
-              <component
-                v-else-if="attr.is === 'el-select'"
-                v-bind="attr"
-                v-model="scope.row[item.key]"
-                :size="$attrs.size"
-              >
-                <template>
-                  <el-option
-                    v-for="item in dict.type[attr.dictName]"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </template>
-              </component>
-              <component
-                v-else
-                v-bind="attr"
-                v-model="scope.row[item.key]"
-                :size="$attrs.size"
-                style="width: 100%"
-              >
-              </component
-            ></template>
-            <template v-else>
-              <component v-if="attr.formatter" is="span">{{
-                attr.formatter(scope.row)
-              }}</component>
-              <component v-else is="span">{{
-                scope.row[item.key] || "--"
-              }}</component>
-            </template>
-          </slot>
-        </template>
-      </ux-table-column>
-      <slot></slot>
-    <!-- </el-table> -->
-    </ux-grid>
-    <div
-      style="
-        height: 50px;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-      "
-      :style="{
-        height: checkbox || pagination ? '50px' : '0px',
-      }"
-    >
-      <div class="mr-4">
-        <!-- <template v-if="checkbox">
-          <el-button
-            v-if="selectState"
-            size="mini"
-            @click="selectState = !selectState"
-          >
-            所有列
-          </el-button>
-          <el-button
-            v-else
-            :disabled="!selectData.length"
-            size="mini"
-            @click="selectState = !selectState"
-          >
-            选择列
-            {{ selectData.length ? ` :${selectData.length}` : "" }}
-          </el-button>
-        </template> -->
-        <template v-if="convenitentOperation">
-          <button-hide v-model="innerColumns" @change="onHide"></button-hide>
-        </template>
-      </div>
-      <pagination
-        v-if="pagination"
-        v-show="!selectState"
-        :total="page.total"
-        :page.sync="page.pageNum"
-        :limit.sync="page.pageSize"
-        @pagination="$emit('pagination', { ...$event })"
-        style="height: 32px; padding: 0 !important; flex: 1; overflow-x: auto"
-      />
-    </div>
-  </div>
-</template>
-
-<style lang="scss" scoped>
-.el-super-table {
-  position: relative;
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-  overflow: auto;
-}
-::v-deep.el-super-table .el-table__header .cell {
-  word-break: keep-all;
-  white-space: nowrap;
-  .icon-sort {
-    display: none;
-  }
-  &:hover .icon-sort {
-    display: inline-block;
-  }
-  .icon-freeze {
-    display: none;
-  }
-  &:hover .icon-freeze {
-    display: inline-block;
-  }
-  .icon-filter {
-    display: none;
-  }
-  &:hover .icon-filter {
-    display: inline-block;
-  }
-  .icon-hide {
-    display: none;
-  }
-  &:hover .icon-hide {
-    display: inline-block;
-  }
-}
-</style>

+ 9 - 19
src/views/business/spd/target/AnnualSaleGoal.vue

@@ -139,13 +139,6 @@
           <div v-if="scope.row.status == '1'">
             <el-button size="mini" type="text" @click="handleReback(scope.row)">收回</el-button>
           </div>
-          <!-- <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-document-copy"
-            @click="handleCopy(scope.row.id)"
-          >复制
-          </el-button> -->
         </template>
       </el-table-column>
     </el-table>
@@ -154,7 +147,7 @@
       :page-sizes="[10, 20, 50, 100]" @pagination="getList" />
 
     <el-drawer :title="title" :visible.sync="open" direction="rtl" :before-close="handleClose" size="100%"
-      v-horizontal-scroll>
+      v-horizontal-scroll disabled>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row :gutter="20">
           <el-col :span="6">
@@ -231,7 +224,7 @@
         </el-row>
       </el-form>
       <div id="addDetails">
-        <el-row :gutter="10" class="mb8" style="margin-left: 80%">
+        <el-row :gutter="10" class="mb8" style="margin-left: 80%" disabled>
           <el-col :span="1.5">
             <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleTemplateDownload">模板下载
             </el-button>
@@ -467,7 +460,7 @@
     delAnnualSaleGoal,
     addAnnualSaleGoal,
     updateAnnualSaleGoal,
-    submit
+    submit,
   } from "@/api/business/spd/goal_management/annualSaleGoal";
   import {
     delAnnualSaleGoalDetails,
@@ -480,9 +473,6 @@
   import {
     getSummary
   } from "@/api/business/spd/goal_management/commonWays";
-  import {
-    rollBack
-  } from "@/api/business/spd/goal_management/publicInterface";
 
   // 树形参照
   import TreeRefers from '@/components/Refers/treeRefer.vue'
@@ -490,7 +480,7 @@
 
   export default {
     name: "AnnualSaleGoal",
-    dicts: ["sys_status", "oa_templete_id"],
+    dicts: ["sys_status"],
     components: {
       TreeRefers,
       ElPopoverSelectV2
@@ -1122,7 +1112,7 @@
       //模板下载
       handleTemplateDownload() {
         this.download('/goal_management/annualSaleGoalDetails/importTemplate', {},
-          `AnnualSaleGoal_${new Date().getTime()}.xlsx`)
+          `年销售目标填报明细导入模板_${new Date().getTime()}.xlsx`)
       },
       //导入
       handleImport(file) {
@@ -1132,7 +1122,8 @@
         importData(formData).then((res) => {
           console.log('res', res);
           if (res.code == '200') {
-            this.annualSaleGoalDetailsList.push.apply(this.annualSaleGoalDetailsList, res.data);
+            // this.form.annualGoalMergeDetails.push.apply(this.form.annualGoalMergeDetails,res.data);
+            this.form.annualGoalMergeDetails.concat(res.data);
             this.$message.success(res.msg);
           } else {
             this.$message.success(res.msg);
@@ -1142,11 +1133,10 @@
           this.$message.error(e.message)
         }).finally((e) => {
           this.$refs['upload'].clearFiles();
-          this.resetList();
           this.loading = false;
         })
       },
-    }
-  };
+    },
+  }
 
 </script>

+ 1 - 1
src/views/business/spd/target/MonthReturnGoal.vue

@@ -1034,7 +1034,7 @@
       },
       //模板下载
       handleTemplateDownload() {
-        this.download('/mk/monthReturnGoalDetails/importTemplate', {}, `MonthReturnGoal_${new Date().getTime()}.xlsx`)
+        this.download('/mk/monthReturnGoalDetails/importTemplate', {}, `月回款目标填报明细导入模板_${new Date().getTime()}.xlsx`)
       },
       //导入
       handleImport(file) {

+ 2 - 29
src/views/business/spd/target/MonthSaleGoal.vue

@@ -1060,6 +1060,7 @@
         this.dialogUpdateMore.updateName = null
         this.dialogUpdateMore.updateData = null
       },
+      //提交
       async handleSubmit(row) {
         this.$modal.loading("提交中...");
         try {
@@ -1103,35 +1104,7 @@
       //模板下载
       handleTemplateDownload() {
         this.download('/goal_management/annualSaleGoalDetails/importTemplate', {},
-          `AnnualSaleGoal_${new Date().getTime()}.xlsx`)
-      },
-      //导入
-      handleImport(file) {
-        this.loading = true;
-        let formData = new FormData()
-        formData.append('file', file.file)
-        importData(formData).then((res) => {
-          console.log('res', res);
-          if (res.code == '200') {
-            // this.form.annualGoalMergeDetails.push.apply(this.form.annualGoalMergeDetails, res.data);
-            this.monthSaleGoalDetailsList.push.apply(this.monthSaleGoalDetailsList, res.data);
-            this.$message.success(res.msg);
-          } else {
-            this.$message.success(res.msg);
-          }
-          this.loading = false;
-        }).catch((e) => {
-          this.$message.error(e.message)
-        }).finally((e) => {
-          this.$refs['upload'].clearFiles();
-          this.resetList();
-          this.loading = false;
-        })
-      },
-      //模板下载
-      handleTemplateDownload() {
-        this.download('/goal_management/monthSaleGoalDetails/importTemplate', {},
-          `MonthSaleGoal_${new Date().getTime()}.xlsx`)
+          `月销售目标填报明细导入模板_${new Date().getTime()}.xlsx`)
       },
       //导入
       handleImport(file) {

+ 5 - 4
src/views/business/spd/target/targetMk/add.vue

@@ -99,7 +99,7 @@
 import Item from './item.vue'
 import { getTargetTemplate,getHeaderData } from "@/api/business/spd/starget/targetTemplate";
 import { getTarget,addTarget,updateTarget } from "@/api/business/spd/starget/target";
-  
+
 export default {
   name: 'add',
   dicts: ['sys_yes_no','mk_periodic_unit','mk_dimensionality','mk_index_type','mk_expansion_mode'],
@@ -139,7 +139,8 @@ export default {
   },
   async created() {
     if(this.pageStu == 'add'){
-      this.form.date = new Date();
+      // this.form.date = new Date();
+      this.form.status = '0';
     }
     if(this.pageStu == 'edit' || this.pageStu == 'see') {
       await this.fetchTarget(this.row);
@@ -249,5 +250,5 @@ export default {
   margin: 20px 0;
   display: flex;
   justify-content: right;
-} 
-</style>
+}
+</style>

+ 1 - 0
src/views/purchase/purchase-order/add/index.vue

@@ -1041,6 +1041,7 @@ export default {
                   :title="cColumn.title"
                   :width="cColumn.width || 80"
                   :field="cColumn.key"
+                  resizable
                   >
                   <!-- :edit-render="!cColumn.disabled" -->
                   <template slot="header" slot-scope="scope">

+ 5 - 2
src/views/purchase/purchase-order/edit/index.vue

@@ -132,7 +132,7 @@ export default {
         });
     },
     // 判断属性是否禁用
-   async handleIsForbidden(status,source) {
+    async handleIsForbidden(status,source) {
         let { updateColumns, updateTabColumns } = await forbidden(status != '2',source);
         this.columns = updateColumns;
         this.tabColumns = updateTabColumns;
@@ -141,7 +141,9 @@ export default {
             const { code, rows} = await orderApi.REFER(
               {
                 type:'WAREHOUSE_PARAM',
-                search:  this.params.warehouseName,
+                // search:  this.params.warehouseName,
+                search:'',
+                id: this.params.warehouse,
                 isPage: true,
               }, {pageNum: 1 , pageSize: 10} );
 
@@ -983,6 +985,7 @@ export default {
                     :field="cColumn.key"
                     :title="cColumn.title" 
                     :width="cColumn.width || 80"
+                    resizable
                     >
                     <template slot="header" slot-scope="scope">
                       <span v-if="cColumn.require" style="color: #ff4949">*</span>

+ 1 - 0
src/views/purchase/purchase-order/see/index.vue

@@ -403,6 +403,7 @@ export default {
                     :field="cColumn.key"
                     :title="cColumn.title" 
                     :width="cColumn.width || 80"
+                    resizable
                   >
                     <template slot="header" slot-scope="scope">
                       <span v-if="cColumn.require" style="color: #ff4949">*</span>

+ 32 - 7
src/views/purchase/workMonitor/index.vue

@@ -16,8 +16,8 @@
 
           <el-col :span="1.5">
               <el-form-item label="单据类型">
-                <el-select multiple v-model="queryParams.modelIds" size="mini" style="width: 200px" clearable>
-                  <el-option v-for="dict in dict.type.oa_templete_id" :key="dict.value" :label="dict.label" :value="dict.value">
+                <el-select multiple v-model="queryParams.typeList" size="mini" style="width: 200px" clearable>
+                  <el-option v-for="dict in dict.type.oa_templete_id" :key="dict.value" :label="dict.label" :value="dict.label">
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -57,7 +57,7 @@
           width="180"
           >
           <template slot-scope="scope">
-            <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
+            <!-- <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button> -->
             <el-button type="text" size="mini" @click="audit(scope.row)">审批</el-button>
           </template>
         </el-table-column>
@@ -79,14 +79,14 @@
 </template>
 
 <script>
-import { getMonitorList } from '@/api/purchase/workMonitor.js'
+import { getMonitorList, wlSubmit, cgSubmit } from '@/api/purchase/workMonitor.js'
 export default {
   name: 'monitor',
   dicts: ['oa_templete_id'],
   data() {
     return {
       queryParams: {
-        modelIds:[],
+        typeList:[],
         docSubject: '',
         pageNum: 1,
         pageSize: 20
@@ -106,7 +106,7 @@ export default {
     },
     resetList() {
       this.queryParams = {
-        modelIds:[],
+        typeList:[],
         docSubject: '',
         pageNum: 1,
         pageSize: 20
@@ -136,7 +136,32 @@ export default {
     },
     rowSelect(row, column, event) {},
     check(row) {},
-    audit(row) {},
+    audit(row) {
+      this.$modal.loading("审批中...");
+      if (row.type == '物料申请单' || row.type == '物料变更单') {
+        wlSubmit(row).then(res => {
+          if(res.code === 200) {
+            this.$modal.closeLoading();
+            this.$modal.notifySuccess("审批成功");
+            this.searchList()
+          }
+        }).catch(() => {
+          this.$modal.closeLoading();
+          this.searchList()
+        })
+      } else {
+        cgSubmit(row).then(res => {
+          if(res.code === 200) {
+            this.$modal.closeLoading();
+            this.$modal.notifySuccess("审批成功");
+            this.searchList()
+          }
+        }).catch(() => {
+          this.$modal.closeLoading();
+          this.searchList()
+        })
+      }
+    },
     handleSizeChange(val) {
       this.queryParams.pageSize = val
       this.getList(this.queryParams)