lilei 11 maanden geleden
bovenliggende
commit
fc771297ef

+ 5 - 8
src/views/numsGoodsShelves/withdrawalManagement/applyWithdrawal.vue

@@ -24,7 +24,7 @@
             :min="0.1"
             style="width: 100%;"
             :precision="2"
-            id="applyWithdrawal"
+            id="applyWithdrawal-amount"
             placeholder="请输入正数(最多两位小数)"
             allowClear />
         </a-form-model-item>
@@ -73,21 +73,21 @@ export default {
         wrapperCol: { span: 15 }
       },
       form: {
-        amount: ''
+        amount: '' // 金额
       },
       pageInfo: null,
-      opened: this.isOpenModal,
+      opened: this.isOpenModal, // 提现弹框
       title: '申请提现',
-      confirmLoading: false,
+      confirmLoading: false, // 确认按钮loading
       spinning: false,
       rules: { amount: [{ required: true, message: '请输入提现金额', trigger: 'blur' }] }
     }
   },
   methods: {
+    // 获取详情信息
     getPageInfo () {
       this.spinning = true
       merchantCashOutDetail({}).then(res => {
-        console.log(res, '===========')
         if (res.status == 200) {
           this.pageInfo = res.data
         } else {
@@ -105,7 +105,6 @@ export default {
           form.serviceCharge = this.serviceCharge
           form.merchantType = 'DEALER'
           form.merchantSn = _this.pageInfo ? _this.pageInfo.merchantSn : ''
-          // form.shelfSn = _this.nowData && _this.nowData.shelfSn
           _this.spinning = true
           saveMerchantCashOut(form).then(res => {
             if (res.status == 200) {
@@ -120,7 +119,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -135,7 +133,6 @@ export default {
   watch: {
     isOpenModal (nVal, oVal) {
       this.opened = nVal
-      // this.getPageInfo()
     },
     opened (nVal, oVal) {
       if (nVal) {

+ 16 - 14
src/views/numsGoodsShelves/withdrawalManagement/list.vue

@@ -7,12 +7,12 @@
           <a-row :gutter="15">
             <a-col :xl="6" :lg="6" :md="12" :sm="24">
               <a-form-item label="交易时间">
-                <rangeDate ref="rangeDate" v-model="time" @change="dateChange" />
+                <rangeDate id="withdrawa-time" ref="rangeDate" v-model="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="6" :md="6" :sm="6">
-              <a-button type="primary" @click="getRefresh" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
+              <a-button type="primary" @click="getRefresh" :disabled="disabled" id="withdrawa-refresh" >查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="withdrawa-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form>
@@ -21,7 +21,7 @@
         <div style="display: flex;align-items: center;padding: 2px 0;">
           <div style="display: flex;align-items: center;">
             可提现金额:<span>{{ pageInfo&&pageInfo.activeAmount?toThousands(pageInfo.activeAmount):'--' }}</span>
-            <a-button size="small" type="primary" class="button-primary" @click="handleTX">申请提现</a-button>
+            <a-button id="withdrawa-tixian" size="small" type="primary" class="button-primary" @click="handleTX">申请提现</a-button>
             <span>(提示:① 提现手续费为0.5元/笔;② 资金到账周期为工作日+1天)</span>
           </div>
         </div>
@@ -46,7 +46,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import moment from 'moment'
 import { STable } from '@/components'
 import applyWithdrawal from './applyWithdrawal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -59,20 +58,20 @@ export default {
     return {
       spinning: false,
       disabled: false,
-      tableHeight: 0,
-      showModal: false,
-      currentData: null,
-      time: [],
-      pageInfo: null,
+      tableHeight: 0, // 表格高度
+      showModal: false, // 是否显示申请提现弹窗
+      currentData: null, // 当前行数据
+      time: [], // 提现时间
+      pageInfo: null, // 详情信息
       queryParam: {
-        beginDate: '',
-        endDate: ''
+        beginDate: '', // 开始时间
+        endDate: '' // 结束时间
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '提现单号', dataIndex: 'cashOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '提现时间', dataIndex: 'cashOutDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '申请提现金额', dataIndex: 'amount', width: '10%', align: 'right', customRender: function (text) {  return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '申请提现金额', dataIndex: 'amount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '开户名', dataIndex: 'bankAccount', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '银行卡号', dataIndex: 'bankCard', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '提现人', dataIndex: 'operName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -109,9 +108,9 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 获取详情信息
     getPageInfo () {
       merchantCashOutDetail({}).then(res => {
-        console.log(res, '===========')
         if (res.status == 200) {
           this.pageInfo = res.data
           this.$refs.table.refresh(true)
@@ -120,6 +119,7 @@ export default {
         }
       })
     },
+    // 刷新页面
     getRefresh () {
       this.getPageInfo()
       this.$refs.table.refresh(true)
@@ -134,10 +134,12 @@ export default {
     handleTX () {
       this.showModal = true
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 265
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调