lilei 2 سال پیش
والد
کامیت
053b0be450

+ 2 - 2
src/views/Home.vue

@@ -2,7 +2,7 @@
   <div class="home">
     <div class="home-body">
       <h1>{{ message }}</h1>
-      <div class="navBox">
+      <!-- <div class="navBox">
         <div class="navTitle">大屏数据</div>
         <div class="navList">
           <div @click="topage('realTimeSalesReport')">
@@ -14,7 +14,7 @@
             <div>加盟商/产品分析</div>
           </div>
         </div>
-      </div>
+      </div> -->
     </div>
     <!-- 重置密码 -->
     <a-modal

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

@@ -11,14 +11,14 @@
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
           <a-button
-            :disabled="detailData==null"
+            :disabled="!printContent"
             key="1"
             type="default"
             v-if="$hasPermissions('B_eRPrint')"
             id="expenseManagementDetail-print-btn"
             @click="handlePrint('preview')">打印预览</a-button>
           <a-button
-            :disabled="detailData==null"
+            :disabled="!printContent"
             key="2"
             type="primary"
             class="button-error"
@@ -98,7 +98,7 @@
       </a-card>
     </a-spin>
     <!-- 打印预览 -->
-    <previewModal :showModal="showModal" @close="showModal=false" :detailSn="$route.params.sn" :detailData="detailData"></previewModal>
+    <previewModal :showModal="showModal" @close="showModal=false" @loaded="printLoaded" :detailSn="$route.params.sn" :detailData="detailData"></previewModal>
     <iframe id="printfsqd" name="printfsqd" hidden></iframe>
   </div>
 </template>
@@ -118,6 +118,7 @@ export default {
       spinning: false,
       disabled: false,
       showModal: false, // 打印弹窗初始状态
+      printContent: false,
       baseData: null,
       count: 0,
       // 加载数据方法 必须为 Promise 对象
@@ -179,6 +180,9 @@ export default {
           this.detailData = null
         }
       })
+    },
+    printLoaded (val) {
+      this.printContent = val
     }
   },
   mounted () {

+ 8 - 3
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -146,16 +146,19 @@ export default {
   methods: {
     pageInfo () {
       this.getFyList()
-      if (this.expenseInfo.state != 'WAIT_SUBMIT') {
-        this.getSpList()
-      }
     },
     getFyList () {
       expenseAcctDetailFindList({ expenseAccountSn: this.detailSn }).then(res => {
         if (res.status == 200) {
           this.fyListData = res.data
+          if (this.expenseInfo.state != 'WAIT_SUBMIT') {
+            this.getSpList()
+          } else {
+            this.$emit('loaded', true)
+          }
         } else {
           this.fyListData = []
+          this.$emit('loaded', false)
         }
       })
     },
@@ -163,8 +166,10 @@ export default {
       getProcessInstance({ businessType: 'EXPENSES', businessSn: this.detailSn }).then(res => {
         if (res.status == 200) {
           this.spListData = res.data
+          this.$emit('loaded', true)
         } else {
           this.spListData = []
+          this.$emit('loaded', false)
         }
       })
     }

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.215/ocs-admin',
+        // target: 'http://192.168.0.215/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: {