Browse Source

bug 修复

lilei 3 years ago
parent
commit
223b2caf9e

+ 3 - 0
src/libs/tools.js

@@ -227,6 +227,9 @@ export const formatDecimal = function (num, decimal) {
 }
 // 处理数字千位分隔符  num 数值,decimal要保留的小数位数
 export const toThousands = (num, decimal) => {
+  if (num == undefined) {
+    return '--'
+  }
   if (decimal) {
     num = formatDecimal(num, decimal)
   }

+ 2 - 2
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -139,7 +139,6 @@ export default {
         _this.disabled = true
         _this.spinning = true
         const paramsPage = Object.assign(parameter, this.queryParam) //  有分页
-        paramsPage.payState = 'FINISH'
         if (this.checkValueRange()) {
           return queryShelfSettleRulePage(paramsPage).then(res => {
             let data
@@ -231,11 +230,12 @@ export default {
     },
     // 待结明细
     handleUndetail (row) {
+      sessionStorage.setItem('settlementDetail', JSON.stringify(row))
       this.$router.push({ name: 'unSettlementDetail', params: { shelfSn: row.shelfSn, settleType: row.settleType, shelfName: row.shelfName } })
-      // this.$router.push({ path: `/numsGoodsShelves/settlementManagement/warehouseDetail/${row.shelfPlaceSn}/${row.productSn}` })
     },
     // 结算历史
     handleDetail (row) {
+      sessionStorage.setItem('settlementDetail', JSON.stringify(row))
       this.$router.push({ name: 'settlementDetail', params: { shelfSn: row.shelfSn, shelfName: row.shelfName } })
     },
     setTableH () {

+ 9 - 6
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -23,16 +23,16 @@
             </template>
             <a-descriptions size="small" :column="4">
               <a-descriptions-item label="授信额度">
-                <span>{{ total && total.creditLimit? toThousands(total.creditLimit,2):'--' }}</span>
+                <span>{{ total && toThousands(total.creditLimit,2) }}</span>
               </a-descriptions-item>
               <a-descriptions-item label="待结金额">
-                <span>{{ total && total.waitSettleAmount? toThousands(total.waitSettleAmount,2):'--' }}</span>
+                <span>{{ total && toThousands(total.waitSettleAmount,2) }}</span>
               </a-descriptions-item>
               <a-descriptions-item label="冻结金额">
-                <span>{{ total && total.freezeAmount? toThousands(total.freezeAmount,2):'--' }}</span>
+                <span>{{ total && toThousands(total.freezeAmount,2) }}</span>
               </a-descriptions-item>
               <a-descriptions-item label="可用额度">
-                <span>{{ total && total.usableAmount?toThousands(total.usableAmount,2):'--' }}</span>
+                <span>{{ total && toThousands(total.activeAmount,2) }}</span>
               </a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
@@ -67,7 +67,7 @@
         <a-alert type="info" style="margin:10px 0">
           <div slot="message" style="display: flex;align-items: center;padding: 2px 0;">
             共<strong>{{ count }}</strong>条记录;
-            待结算金额合计¥<strong>{{ priceTotal?toThousands(priceTotal,2):'--' }}</strong>
+            待结算金额合计¥<strong>{{ toThousands(priceTotal,2) }}</strong>
           </div>
         </a-alert>
         <s-table
@@ -176,10 +176,13 @@ export default {
     },
     getPageInfo () {
       this.spinning = true
+      const info = JSON.parse(sessionStorage.getItem('settlementDetail'))
       merchantCashOutDetail({}).then(res => {
-        console.log(res, '===========')
+        console.log(res, info, '===========')
         if (res.status == 200) {
           this.total = res.data
+          this.total.creditLimit = info.creditLimit
+          this.total.waitSettleAmount = info.waitSettleAmount
         } else {
           this.total = null
         }

+ 2 - 2
vue.config.js

@@ -109,8 +109,8 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.188:8503/qpls-md',
-        target: 'http://frps.chelingzhu.com:7800/qpls-md',
-        // target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://frps.chelingzhu.com:7800/qpls-md',
+        target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,