Browse Source

审批流

qinbai 3 years ago
parent
commit
0c94578597

+ 8 - 0
src/api/approval/processConfig.js

@@ -49,3 +49,11 @@ export function businModify(data) {
     data: data,
   })
 }
+
+export function getUserList(params) {
+  return request({
+    url: '/api/blade-user/list',
+    method: 'get',
+    params:{params}
+  })
+}

+ 22 - 0
src/api/approveData/main.js

@@ -0,0 +1,22 @@
+import request from '@/router/axios';
+
+export function getList(current, size, params) {
+  return request({
+    url: '/api/blade-check/auditproecess/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    },
+  })
+}
+
+export function approvePass(data) {
+  return request({
+    url: '/api/blade-check/auditproecess/operationFinanceProcess',
+    method: 'post',
+    data: data,
+  })
+}
+

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

@@ -35,7 +35,7 @@
     <template slot="title">
       <span class="el-dialog__title">
         <span style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
-        导入客户
+        导入商品
       </span>
       <div style="float: right" class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
         <i class="el-icon-full-screen"></i>

+ 1 - 1
src/views/approval/processConfig/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "120",
+  "menuWidth": 180,
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,

+ 27 - 13
src/views/approval/processConfig/index.vue

@@ -130,20 +130,18 @@
           </el-select>
         </template>
         <template slot="auditUserId" slot-scope="{row,index}">
-          <el-input
+          <el-select
             v-model="row.auditUserId"
+            filterable
+            collapse-tags
+            placeholder="审核人"
           >
-          </el-input>
-<!--          <el-select-->
-<!--            v-model="row.auditUserId"-->
-<!--            filterable-->
-<!--            multiple-->
-<!--            collapse-tags-->
-<!--            placeholder="审核人"-->
-<!--          >-->
-<!--            <el-option>-->
-<!--            </el-option>-->
-<!--          </el-select>-->
+            <el-option v-for="(item,index) in auditUserIdDic"
+                       :key="index"
+                       :label="item.realName"
+                       :value="item.id"
+            ></el-option>
+          </el-select>
         </template>
         <template slot="menuLeft">
           <el-button
@@ -173,7 +171,8 @@
 <script>
 import option from "./config/mainList.json";
 import detailOption from "./config/detail.json";
-import { getList, modify, removeList, detailData } from "@/api/approval/processConfig";
+import { getList, modify, removeList, detailData ,getUserList} from "@/api/approval/processConfig";
+import _ from "lodash";
 
 export default {
   name: "index",
@@ -189,6 +188,7 @@ export default {
         pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       detailData: [],
+      auditUserIdDic:[],
       loading: false,
       search: {},
       visible: false,
@@ -213,6 +213,11 @@ export default {
   created() {
     this.option = option
     this.detailOption = detailOption
+
+    getUserList().then(res =>{
+      this.auditUserIdDic = res.data.data.records
+    })
+
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -240,6 +245,8 @@ export default {
     addHandle() {
       this.title = '新增';
       this.visible = !this.visible
+      this.dataForm = {}
+      this.detailData = []
     },
     // 编辑
     editOpen(row) {
@@ -324,10 +331,17 @@ export default {
           }
         }
       };
+
+      this.detailData.map(item=>{
+        item.levelId = _.add(item.$index,1)
+        delete item.id
+      })
+
       const params ={
         ...this.dataForm,
         auditPathsLevels : this.detailData
       }
+
       modify(params).then(res =>{
         if(res.data.success){
           this.$message.success("操作成功!")

+ 83 - 0
src/views/approveData/configuration/mainList.json

@@ -0,0 +1,83 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 24,
+  "dialogWidth": "60%",
+  "align": "center",
+  "searchSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 180,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
+  "column": [
+    {
+      "label": "供应商",
+      "prop": "corpsId",
+      "search": false,
+      "hide": true,
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "label": "供应商",
+      "prop": "corpsName",
+      "overHidden": true,
+      "width": 200,
+      "index": 1
+    },
+    {
+      "label": "采购合同号",
+      "prop": "orderNo",
+      "search": false,
+      "overHidden": true,
+      "width": 180,
+      "index": 2
+    },
+    {
+      "label": "订单日期",
+      "prop": "orderDate",
+      "type": "date",
+      "search": false,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 180,
+      "index": 3
+    },
+    {
+      "label": "金额",
+      "prop": "corpName",
+      "overHidden": true,
+      "width": 120,
+      "index": 4
+    },
+    {
+      "label": "申请人",
+      "prop": "sendName",
+      "overHidden": true,
+      "index": 5,
+      "width": 150
+    },
+    {
+      "label": "申请日期",
+      "prop": "sendTime",
+      "overHidden": true,
+      "width": 180,
+      "index": 6
+    }
+  ]
+}

+ 163 - 0
src/views/approveData/index.vue

@@ -0,0 +1,163 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               :search.sync="search"
+               :table-loading="loading"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="corpsIdSearch">
+        <select-component
+          v-model="search.corpsId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          size="small"
+          :disabled="scope.row.operate"
+          @click.stop="pass(scope.row, 1)"
+        >审批通过
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          :disabled="scope.row.operate"
+          @click.stop="pass(scope.row, 2)"
+        >审批驳回
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+  import { getList,approvePass } from "@/api/approveData/main";
+  import _ from "lodash";
+
+  export default {
+    data() {
+      return {
+        loading : false,
+        form: {},
+        search:{},
+        show:true,
+        detailData:{},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      // option.height = window.innerHeight - 200 ;
+    },
+    methods: {
+      //审批通过
+      pass(row,operate){
+        row.operate =  operate
+        this.loading = true;
+        approvePass(row).then(res=>{
+          this.$message.success("操作成功!")
+          this.refreshChange()
+        }).finally(()=>{
+          this.loading = false
+        })
+      },
+      //新单打开
+      addReceipt(row){
+
+      },
+      //编辑打开
+      editOpen(row, status){
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
+      },
+      rowDel(row, index, done) {
+        if(row.id){
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
+            })
+          });
+        }
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        this.onLoad(this.page);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize,params).then(res=>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false;
+        })
+      },
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 3
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -11,13 +11,14 @@
                      :loading="buttonLoading"
                      :disabled="checkDisabled"
                      class="el-button--small-yh"
-                     @click.stop="paymentCheck">请核
+                     @click.stop="paymentCheck">
+            {{form.checkStatus == '审核中'?'审核中':'申请'}}
           </el-button>
           <el-button type="warning"
                      size="small"
                      :loading="buttonLoading"
                      class="el-button--small-yh"
-                     :disabled="!checkDisabled"
+                     :disabled="!checkDisabled || form.checkStatus == '审核中'"
                      @click.stop="settlement">结算
           </el-button>
           <el-button type="primary"
@@ -388,7 +389,7 @@
             this.buttonLoading = true
             paymentCheck(params).then(res =>{
               if(res.data.success){
-                this.$message.success("请成功!");
+                this.$message.success("请成功!");
                 this.afterEcho(res.data.data)
               }
             }).finally(()=>{