Jelajahi Sumber

修改钉钉审批

chenrui 7 bulan lalu
induk
melakukan
f2b60cb970

+ 58 - 48
src/api/expenseManagement.js

@@ -6,7 +6,7 @@ export const departmentQueryList = (params) => {
     url: `/department/queryList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('申请部门查询')
     }
   })
@@ -17,7 +17,7 @@ export const employeeQueryList = (params) => {
     url: `/employee/queryList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('申请人查询')
     }
   })
@@ -27,7 +27,7 @@ export const otherOrgQuery = (params) => {
   return axios({
     url: `/otherorg/queryAll`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('其它往来人员')
     }
   })
@@ -42,7 +42,7 @@ export const expenseAccountList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -54,7 +54,7 @@ export const expenseAccountUpdateBatch = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('批量更新打印状态')
     }
   })
@@ -66,7 +66,7 @@ export const expenseAccountAgainEdit = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('再次编辑')
     }
   })
@@ -85,7 +85,7 @@ export const expenseAccountSave = (params) => {
     url: `/expenseAccount/save`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('新增')
     }
   })
@@ -96,7 +96,7 @@ export const expenseAccountDelete = (params) => {
     url: `/expenseAccount/deleteBySn/${params.expenseAccountSn}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -107,7 +107,7 @@ export const expenseAccountSubmit = (params) => {
     url: `/expenseAccount/submit`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('提交')
     }
   })
@@ -118,7 +118,7 @@ export const expenseAcctDetailDelete = (params) => {
   return axios({
     url: `/expenseAcctDetail/deleteDetail/${params.detailSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -129,7 +129,7 @@ export const expenseAcctDetailFindBySn = (params) => {
   return axios({
     url: `/expenseAcctDetail/findBySn/${params.detailSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用明细')
     }
   })
@@ -140,7 +140,7 @@ export const expenseAcctDetailFindProductsBySn = (params) => {
   return axios({
     url: `/expenseAcctDetail/findDetailProductsBySn/${params.detailSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用明细产品')
     }
   })
@@ -152,7 +152,7 @@ export const expenseAcctDetailFindList = (params) => {
     url: `/expenseAcctDetail/findList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用明细列表')
     }
   })
@@ -164,7 +164,7 @@ export const expenseAcctDetailSave = (params) => {
     url: `/expenseAcctDetail/saveDetail`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('保存费用明细')
     }
   })
@@ -175,7 +175,7 @@ export const updateBatchExpenseAcctDetail = (params) => {
     url: `/expenseAcctDetail/updateDetailByAccount`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('批量修改记账名称')
     }
   })
@@ -194,7 +194,7 @@ export const expenseImportDetail = (params) => {
     url: '/expenseAcctDetail/importDetail',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导入费用报销明细')
     }
   })
@@ -205,7 +205,7 @@ export const expenseInsertImport = (params) => {
     url: '/expenseAcctDetail/insertImport',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导入明细')
     }
   })
@@ -217,7 +217,7 @@ export const expenseFailExcel = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出报销明细错误项')
     }
   })
@@ -229,7 +229,7 @@ export const expenseAcctDetailSaveProducts = (params) => {
     url: `/expenseAcctDetail/saveDetailProducts`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('保存费用明细产品')
     }
   })
@@ -244,7 +244,7 @@ export const expenseAccountDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用报销明细列表查询')
     }
   })
@@ -266,19 +266,29 @@ export const expenseAcctDetailReport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用报销明细导出')
     }
   })
 }
 
 // 费用报销单审批进度
+// export const getProcessInstance = (params) => {
+//   return axios({
+//     url: `/dingTalk/getProcessInstance/${params.businessType}/${params.businessSn}`,
+//     data: params,
+//     method: 'post',
+//     headers:{
+//       'module': encodeURIComponent('审核进度')
+//     }
+//   })
+// }
 export const getProcessInstance = (params) => {
   return axios({
-    url: `/dingTalk/getProcessInstance/${params.businessType}/${params.businessSn}`,
+    url: `/dingTalk/queryList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核进度')
     }
   })
@@ -288,7 +298,7 @@ export const getProcessInstanceList = (params) => {
   return axios({
     url: `/dingTalk/getProcessInstanceList/${params.businessType}/${params.businessSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核进度列表')
     }
   })
@@ -299,7 +309,7 @@ export const getDingTalkDepartmentList = (params) => {
     url: `/dingTalk/getDingTalkDepartmentList/${params.deptId}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('钉钉部门列表')
     }
   })
@@ -310,32 +320,32 @@ export const queryDingTalkDeptUser = (params) => {
     url: `/dingTalk/queryDingTalkDeptUser/${params.deptId}/${params.pageNo}/${params.pageSize}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('钉钉人员列表')
     }
   })
 }
 
- // 同步钉钉部门人员
- export const refashDingTalkAllDeptUser = (params) => {
-   return axios({
-     url: `/dingTalk/syncAllDeptUser `,
-     data: params,
-     method: 'post',
-     headers:{
-       'module': encodeURIComponent('刷新部门人员数据')
-     }
-   })
- }
- 
+// 同步钉钉部门人员
+export const refashDingTalkAllDeptUser = (params) => {
+  return axios({
+    url: `/dingTalk/syncAllDeptUser `,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('刷新部门人员数据')
+    }
+  })
+}
+
 // 获取所以部门人员
- export const getDingTalkAllDeptUser = (params) => {
-   return axios({
-     url: `/dingTalk/getAllDeptUser`,
-     data: params,
-     method: 'post',
-     headers:{
-       'module': encodeURIComponent('部门人员数据')
-     }
-   })
- }
+export const getDingTalkAllDeptUser = (params) => {
+  return axios({
+    url: `/dingTalk/getAllDeptUser`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('部门人员数据')
+    }
+  })
+}

+ 0 - 89
src/views/common/auditDetail.vue

@@ -1,89 +0,0 @@
-<template>
-  <div>
-    <p>说明:以下信息来自钉钉</p>
-    <a-spin :spinning="spinning" tip="Loading...">
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: 500 }"
-        :showPagination="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </div>
-</template>
-
-<script>
-import { STable } from '@/components'
-import { getProcessInstance } from '@/api/expenseManagement'
-export default {
-  name: 'AuditDetail',
-  components: { STable },
-  props: {
-    openModal: {
-      type: Boolean,
-      default: false
-    },
-    itemSn: {
-      type: [Number, String],
-      default: ''
-    },
-    businessType: {
-      type: [Number, String],
-      default: ''
-    }
-  },
-  data () {
-    return {
-      spinning: false,
-      columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.spinning = true
-        delete parameter.tableId
-        delete parameter.index
-        return getProcessInstance({ businessType: this.businessType, businessSn: this.itemSn }).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = 0
-            for (var i = 0; i < data.length; i++) {
-              data[i].no = no + i + 1
-            }
-            this.spinning = false
-            return data
-          } else {
-            this.spinning = false
-            this.$emit('loadError')
-            return {
-              list: [],
-              count: 0
-            }
-          }
-        })
-      }
-    }
-  },
-  methods: {
-    clearTable () {
-      this.$refs.table.clearTable()
-    },
-    refresh () {
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-
-<style>
-</style>

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -192,7 +192,7 @@ export default {
       // 费用明细
       const fyListData = await expenseAcctDetailFindList({ expenseAccountSn: this.$route.params.sn }).then(res => res.data)
       // 审核明细,待提交状态不获取
-      const spListData = this.detailData.state != 'WAIT_SUBMIT' ? await getProcessInstance({ businessType: 'EXPENSES', businessSn: this.$route.params.sn }).then(res => res.data) : null
+      const spListData = this.detailData.state != 'WAIT_SUBMIT' ? await getProcessInstance({ businessType: 'EXPENSES', businessSn: this.$route.params.sn, processInstanceId: this.$route.params.itemId }).then(res => res.data) : null
       // 打印预览弹框
       if (type == 'preview') {
         this.showTipModal = true

+ 5 - 2
src/views/expenseManagement/expenseReimbursement/list.vue

@@ -183,7 +183,7 @@
         </s-table>
       </a-spin>
       <!-- 审核进度 -->
-      <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" @close="openModal=false"></verifyModal>
+      <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" :itemId="itemId" @close="openModal=false"></verifyModal>
       <!-- 新增 -->
       <baseDataModal :show="openBaseModal" @close="openBaseModal=false"></baseDataModal>
       <!-- 打印预览 -->
@@ -230,6 +230,7 @@ export default {
       openBaseModal: false, // 基础信息新建
       showTipModal: false, // 打印预览组件
       itemSn: '', // 费用单sn
+      itemId: '', // 费用单id
       tableHeight: 0, // 表格高度
       expenseTypes: [], // 费用类型
       // 查询参数
@@ -378,7 +379,7 @@ export default {
     },
     // 详情页面
     handleDetail (row) {
-      this.$router.push({ name: 'expenseReimbursementListDetail', params: { sn: row.expenseAccountSn } })
+      this.$router.push({ name: 'expenseReimbursementListDetail', params: { sn: row.expenseAccountSn, itemId: row.id } })
     },
     // 新增、编辑
     handleEdit (row) {
@@ -411,8 +412,10 @@ export default {
     },
     // 审核进度弹框
     handleSH (row) {
+      // debugger
       this.openModal = true
       this.itemSn = row.expenseAccountSn
+      this.itemId = row.id
     },
     // 再次编辑
     againEdit (row) {

+ 7 - 2
src/views/expenseManagement/expenseReimbursement/verifyModal.vue

@@ -18,7 +18,7 @@
         :data="loadData"
         :scroll="{ y: 500 }"
         :showPagination="false"
-        :defaultLoadData="true"
+        :defaultLoadData="false"
         bordered>
       </s-table>
     </a-spin>
@@ -39,6 +39,10 @@ export default {
     itemSn: { // 费用单sn
       type: [Number, String],
       default: ''
+    },
+    itemId: {// 费用单id
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -57,7 +61,8 @@ export default {
         this.spinning = true
         delete parameter.tableId
         delete parameter.index
-        return getProcessInstance({ businessType: 'EXPENSES', businessSn: this.itemSn }).then(res => {
+        // 当有多次重复审批时,传 businessSn;否则使用processInstanceId
+        return getProcessInstance({ businessType: 'EXPENSES', businessSn: this.itemSn, processInstanceId: this.itemId }).then(res => {
           let data
           if (res.status == 200) {
             data = res.data

+ 3 - 1
src/views/financialManagement/financialCollection/list.vue

@@ -163,7 +163,7 @@
         </s-table>
       </a-spin>
       <!-- 审核进度 -->
-      <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" @close="openModal=false"></verifyModal>
+      <verifyModal v-drag :openModal="openModal" :itemId="itemId" :itemSn="itemSn" @close="openModal=false"></verifyModal>
       <!-- 基础信息 -->
       <baseModal v-drag :show="baseModal" @cancel="baseModal=false"></baseModal>
       <!-- 关联备货单 -->
@@ -212,6 +212,7 @@ export default {
       auditDate: [], // 审核时间
       advanced: true,
       itemSn: null,
+      itemId: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -346,6 +347,7 @@ export default {
     handleSH (row) {
       this.openModal = true
       this.itemSn = row.bookSn
+      this.itemId = row.id
     },
     // 再次编辑
     againEdit (row) {

+ 5 - 1
src/views/financialManagement/financialCollection/verifyModal.vue

@@ -39,6 +39,10 @@ export default {
     itemSn: {
       type: [Number, String],
       default: ''
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -57,7 +61,7 @@ export default {
         this.spinning = true
         delete parameter.tableId
         delete parameter.index
-        return getProcessInstance({ businessType: 'FINANCE_BOOK', businessSn: this.itemSn }).then(res => {
+        return getProcessInstance({ businessType: 'FINANCE_BOOK', businessSn: this.itemSn, processInstanceId: this.itemId }).then(res => {
           let data
           if (res.status == 200) {
             data = res.data

+ 9 - 1
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -142,7 +142,13 @@
       <!-- 导出提示框 -->
       <reportModal :visible="showExport" @close="showExport=false"></reportModal>
       <!-- 审核进度弹窗 -->
-      <reviewProgressModal v-drag :itemSn="itemSnSh" :auditTime="auditTime" :openModal="openReviewModal" @close="openReviewModal=false"></reviewProgressModal>
+      <reviewProgressModal
+        v-drag
+        :itemSn="itemSnSh"
+        :itemId="itemIdSh"
+        :auditTime="auditTime"
+        :openModal="openReviewModal"
+        @close="openReviewModal=false"></reviewProgressModal>
     </a-card>
   </div>
 </template>
@@ -204,6 +210,7 @@ export default {
         })
       },
       itemSnSh: null,
+      itemIdSh: null, // 采购退货审核进度ID
       itemSn: null, // 采购退货SN
       auditTime: null// 审核时间
     }
@@ -269,6 +276,7 @@ export default {
     // 审核进度
     handleSH (row) {
       this.itemSnSh = row.sparePartsReturnSn
+      this.itemIdSh = row.id
       this.auditTime = row.submitDate
       const _this = this
       _this.$nextTick(() => {

+ 5 - 1
src/views/purchasingManagement/purchaseReturn/reviewProgressModal.vue

@@ -41,6 +41,10 @@ export default {
       type: [Number, String],
       default: ''
     },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    },
     auditTime: {
       type: String,
       default: ''
@@ -62,7 +66,7 @@ export default {
         this.spinning = true
         delete parameter.tableId
         delete parameter.index
-        return getProcessInstance({ businessType: 'SPARE_PARTS_RETURN', businessSn: this.itemSn }).then(res => {
+        return getProcessInstance({ businessType: 'SPARE_PARTS_RETURN', businessSn: this.itemSn, processInstanceId: this.itemId }).then(res => {
           let data
           if (res.status == 200) {
             data = res.data

+ 1 - 1
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -222,7 +222,7 @@ export default {
         this.spinning = true
         delete parameter.tableId
         delete parameter.index
-        return getProcessInstance({ businessType: 'PICK_UP', businessSn: this.$route.params.sn }).then(res => {
+        return getProcessInstance({ businessType: 'PICK_UP', businessSn: this.$route.params.sn, processInstanceId: this.$route.params.itemId }).then(res => {
           let data
           if (res.status == 200) {
             data = res.data

+ 3 - 3
src/views/salesReturnManagement/billOfLading/list.vue

@@ -96,7 +96,7 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
-          <!-- 单号 -->
+          <!-- 提货单号 -->
           <template slot="pickUpNo" slot-scope="text, record">
             <div v-if="$hasPermissions('M_detailPickUp')">
               <span class="link-bule" @click="handleDetail(record)">{{ record.pickUpNo }}</span>
@@ -144,7 +144,7 @@
         </s-table>
       </a-spin>
       <!-- 审核进度 -->
-      <verifyModal :openModal="visibleAudit" :itemSn="auditInfo&&auditInfo.pickUpSn" @close="visibleAudit=false"></verifyModal>
+      <verifyModal :openModal="visibleAudit" :itemSn="auditInfo&&auditInfo.pickUpSn" :itemId="auditInfo&&auditInfo.id" @close="visibleAudit=false"></verifyModal>
     </a-card>
   </div>
 </template>
@@ -265,7 +265,7 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.pickUpSn } })
+      this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.pickUpSn, itemId: row.id } })
     },
     // 删除
     handleDel (row) {

+ 5 - 1
src/views/salesReturnManagement/billOfLading/verifyModal.vue

@@ -39,6 +39,10 @@ export default {
     itemSn: {
       type: [Number, String],
       default: ''
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -57,7 +61,7 @@ export default {
         this.spinning = true
         delete parameter.tableId
         delete parameter.index
-        return getProcessInstance({ businessType: 'PICK_UP', businessSn: this.itemSn }).then(res => {
+        return getProcessInstance({ businessType: 'PICK_UP', businessSn: this.itemSn, processInstanceId: this.itemId }).then(res => {
           let data
           if (res.status == 200) {
             data = res.data