lilei 2 lat temu
rodzic
commit
ac037d497a

+ 17 - 7
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -105,7 +105,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
-import { expenseAccountDetail, expenseAcctDetailFindList, getProcessInstance } from '@/api/expenseManagement'
+import { expenseAccountDetail, expenseAcctDetailFindList, getProcessInstance, expenseAccountUpdateBatch } from '@/api/expenseManagement'
 import previewModal from './previewModal.vue'
 
 export default {
@@ -167,16 +167,26 @@ 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
-      this.$refs.previewModal.setData([
-      {
+      this.$refs.previewModal.setData([{
         expenseInfo: this.detailData,
         fyListData,
         spListData
-      }
-      ])
+      }])
     },
-    printOk(res){
-      this.spinning = false
+    printOk(data){
+      if(data&&data.status == 200){
+        expenseAccountUpdateBatch([{
+            id: this.detailData.id,
+            printStatus:"PRINT"
+          }]).then(res => {
+          if(res.status == 200){
+             this.getDetail()
+          }
+          this.spinning = false
+        })
+      }else{
+        this.spinning = false
+      }
     },
     //  详情
     getDetail () {

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.113:8602/ocs-admin',
+        target: 'http://192.168.2.113:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {