chenrui 6 hónapja
szülő
commit
eff7c71a65

+ 10 - 20
src/views/numsGoodsShelves/withdrawalManagementNew/applyWithdrawal.vue

@@ -47,7 +47,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { saveMerchantCashOut, merchantCashOutDetail } from '@/api/merchantNew'
+import { saveMerchantCashOut } from '@/api/merchantNew'
 export default {
   mixins: [commonMixin],
   props: {
@@ -55,9 +55,11 @@ export default {
       type: Boolean,
       default: false
     },
-    activeAmount: {
-      type: [Number, String],
-      default: 0
+    pageInfo: {
+      type: Object,
+      default: () => {
+        return null
+      }
     }
   },
   // computed: {
@@ -74,7 +76,7 @@ export default {
       form: {
         amount: '' // 金额
       },
-      pageInfo: null,
+      activeAmount: null,
       opened: this.isOpenModal, // 提现弹框
       title: '申请提现',
       confirmLoading: false, // 确认按钮loading
@@ -86,18 +88,6 @@ export default {
     handleAmount () {
       this.form.amount = this.activeAmount - 0.5
     },
-    // 获取详情信息
-    getPageInfo () {
-      this.spinning = true
-      merchantCashOutDetail({}).then(res => {
-        if (res.status == 200) {
-          this.pageInfo = res.data
-        } else {
-          this.pageInfo = null
-        }
-        this.spinning = false
-      })
-    },
     // 保存
     handleSubmit () {
       const _this = this
@@ -141,11 +131,11 @@ export default {
       this.opened = nVal
     },
     opened (nVal, oVal) {
-      if (nVal) {
-        this.getPageInfo()
-      } else {
+      if (!nVal) {
         this.form.amount = ''
         this.$emit('close')
+      } else {
+        this.activeAmount = this.pageInfo && (this.pageInfo.activeAmount || this.pageInfo.activeAmount == 0) ? this.pageInfo.activeAmount : null
       }
     }
   }

+ 14 - 3
src/views/numsGoodsShelves/withdrawalManagementNew/list.vue

@@ -22,7 +22,12 @@
           账户总金额:{{ pageInfo&&pageInfo.totalAmount?toThousands(pageInfo.totalAmount):'--' }}(包含可提现金额:<span>{{ pageInfo&&pageInfo.activeAmount?toThousands(pageInfo.activeAmount):'--' }}</span>,在途金额:{{ pageInfo&&pageInfo.floatAmount?toThousands(pageInfo.floatAmount):'--' }})
           <p style="margin-top:10px;">(提示:①提现手续费为0.5元/笔;②资金到账周期为工作日+1天;③线上支付订单需审核通过后才能提现;④订单被审核不通过或修理厂取消订单后将会在1-3个工作日原路返回到修理厂)</p>
         </div>
-        <a-button id="withdrawal-tixian" v-if="$hasPermissions('B_withdrawalAudit')" type="primary" class="button-primary" @click="handleTX">申请提现</a-button>
+        <a-button
+          id="withdrawal-tixian"
+          v-if="$hasPermissions('B_withdrawalAudit')"
+          type="primary"
+          class="button-primary"
+          @click="handleTX">申请提现</a-button>
         <a-button id="withdrawal-zhangdan" class="button-info" v-if="$hasPermissions('B_billFlow')" @click="showBillFlowModal=true">账单流水</a-button>
       </div>
       <s-table
@@ -39,7 +44,7 @@
       </s-table>
     </a-spin>
     <!-- 申请提现 -->
-    <applyWithdrawal :activeAmount="pageInfo&&pageInfo.activeAmount" :isOpenModal="showModal" @close="showModal=false" @refresh="getPageInfo"></applyWithdrawal>
+    <applyWithdrawal :pageInfo="pageInfo" :isOpenModal="showModal" @close="showModal=false" @refresh="getPageInfo"></applyWithdrawal>
     <!-- 交易流水 -->
     <billFlowModal :openModal="showBillFlowModal" @close="showBillFlowModal=false"></billFlowModal>
   </a-card>
@@ -67,6 +72,7 @@ export default {
       showBillFlowModal: false, // 打开交易流水 弹窗
       time: [], // 提现时间
       pageInfo: null, // 详情信息
+      errorFlag: false, // 经销商未设置结算账户时,申请提现按钮不能点击
       queryParam: {
         beginDate: '', // 开始时间
         endDate: '' // 结束时间
@@ -118,9 +124,10 @@ export default {
       merchantCashOutDetail({}).then(res => {
         if (res.status == 200) {
           this.pageInfo = res.data
-          this.$refs.table.refresh(true)
+          this.errorFlag = false
         } else {
           this.pageInfo = null
+          this.errorFlag = true
         }
       })
     },
@@ -132,6 +139,10 @@ export default {
     },
     // 申请提现
     handleTX () {
+      if (this.errorFlag) {
+        this.$message.warning('请先设置结算账户!')
+        return
+      }
       this.showModal = true
     },
     // 计算表格高度

+ 0 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -238,7 +238,6 @@
             v-if="((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' ) && record.billStatus != 'FINISH')||(record.sourceType == 'TEMPORARY_DISPATCHING'&&record.billStatus != 'FINISH'&&record.billStatus != 'WAIT_OUT_WAREHOUSE') && $hasPermissions('B_salesDel')"
             @click="handleDel(record)"
           >
-            <!--  -->
             删除
           </a-button>
           <a-button