Browse Source

2024.09.20
- 工厂分类页增加对操作按钮的显示判断;
- 用户提现申请页增加出账和入账记录表格;

zweiqin 6 months ago
parent
commit
3659a1c8a5

+ 22 - 15
src/views/brandFactory/factoryClass/index.vue

@@ -3,8 +3,10 @@
     <div class="toolbar">
       <el-button type="success" @click="addBar">添加一级类别</el-button>
     </div>
-    <el-table :data="tableData" style="width: 100%" border row-key="id"
-      :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" :tree-props="{ children: 'childs' }">
+    <el-table
+      :data="tableData" style="width: 100%" border row-key="id"
+      :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" :tree-props="{ children: 'childs' }"
+    >
       <el-table-column prop="storeName" label="分类名称" />
       <el-table-column prop="picUrl" label="分类图片">
         <template slot-scope="scope">
@@ -14,19 +16,23 @@
       </el-table-column>
       <el-table-column prop="status" label="操作">
         <template slot-scope="scope">
-          <el-button type="text" @click.native.prevent="checkRow(scope.row)">查看</el-button>
-          <el-button type="text" @click.native.prevent="updateRow(scope.row)">编辑</el-button>
+          <el-button v-if="scope.row.level === '1'" type="text" @click.native.prevent="checkRow(scope.row)">查看</el-button>
+          <el-button v-if="scope.row.level === '1'" type="text" @click.native.prevent="updateRow(scope.row)">编辑</el-button>
           <el-button type="text" @click.native.prevent="deleteRow(scope.row)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
     <div class="fenye">
-      <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="10"
+      <el-pagination
+        :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="10"
         layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
-        @current-change="handleCurrentChange" />
+        @current-change="handleCurrentChange"
+      />
     </div>
-    <EditDialog ref="edit" :dialog-visible="dialog.isVisible" :type="dialog.type" @close="editClose"
-      @success="getProductCategory" />
+    <EditDialog
+      ref="edit" :dialog-visible="dialog.isVisible" :type="dialog.type" @close="editClose"
+      @success="getProductCategory"
+    />
   </div>
 </template>
 
@@ -35,6 +41,7 @@ import { fullPicUrl } from '@/utils'
 import { factoryClassList, deleteFactoryClass } from '@/api/business'
 import EditDialog from './Edit'
 export default {
+  name: 'FactoryClass',
   components: {
     EditDialog
   },
@@ -97,8 +104,8 @@ export default {
     },
     // 查看
     checkRow(row) {
-      console.log("你怎么回事");
-      console.log(row);
+      console.log('你怎么回事')
+      console.log(row)
       const id = row.id
       this.dialog = {
         type: 'check',
@@ -150,11 +157,11 @@ export default {
 @import url("../../../styles/elDialog.scss");
 
 .classification-page {
-  padding: 15px 20px;
+	padding: 15px 20px;
 
-  .toolbar {
-    margin-bottom: 15px;
-    text-align: right;
-  }
+	.toolbar {
+		margin-bottom: 15px;
+		text-align: right;
+	}
 }
 </style>

+ 46 - 39
src/views/finance/application/components/DetailModal.vue

@@ -45,35 +45,40 @@
       </el-descriptions>
     </div>
 
-    <el-tabs value="relatedSettlement">
-      <el-tab-pane label="金流水记录列表" name="relatedSettlement">
-        <div v-if="recordList && recordList.length" style="margin-top: 32px;">
+    <el-tabs value="outgoingRecord">
+      <el-tab-pane label="出账记录列表" name="outgoingRecord">
+        <div v-if="outgoingRecordList && outgoingRecordList.length" style="margin-top: 32px;">
           <el-table
-            v-loading="!recordList.length" height="60vh" element-loading-text="暂无金流水记录数据" :data="recordList"
+            v-loading="!outgoingRecordList.length" height="60vh" element-loading-text="暂无出账记录数据" :data="outgoingRecordList"
             v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
           >
-            <!-- <el-table-column align="center" min-width="80" prop="price" label="支付金额" show-overflow-tooltip></el-table-column>
-              <el-table-column align="center" width="150" prop="paymentTime" label="支付时间" show-overflow-tooltip />
-              <el-table-column prop="customerName" label="支付名称" width="120" />
-              <el-table-column prop="customerPhone" label="支付电话" />
-              <el-table-column prop="transactionId" label="通联流水号" />
-              <el-table-column label="来源类型">
-              <template slot-scope="{ row }">
-              <span v-if="row.type == 1">关系链</span>
-              <span v-if="row.type == 2">商城</span>
-              <span v-if="row.type == 3">本地</span>
-              <span v-if="row.type == 4">服务</span>
-              </template>
-              </el-table-column>
-              <el-table-column label="状态">
+            <el-table-column align="center" min-width="80" prop="id" label="ID" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" min-width="80" prop="buyerUserId" label="出账用户Id" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" width="150" prop="orderFormid" label="购买订单编号" show-overflow-tooltip />
+            <el-table-column align="center" width="150" prop="commissionNumber" label="出账数量" show-overflow-tooltip />
+            <el-table-column align="center" label="出账类型" prop="waterType">
               <template slot-scope="{ row }">
-              <span v-if="row.isTo == 0">订单</span>
-              <span v-if="row.isTo == 1">确认收货</span>
+                <el-tag v-if="row.waterType === 1" effect="plain" type="info">商城购买</el-tag>
+                <el-tag v-else-if="row.waterType === 2" effect="plain" type="success">商圈购买</el-tag>
+                <el-tag v-else-if="row.waterType === 3" effect="plain" type="success">社区购买</el-tag>
+                <el-tag v-else-if="row.waterType === 4" effect="plain" type="success">提现</el-tag>
+                <el-tag v-else-if="row.waterType === 5" effect="plain" type="success">退款扣除</el-tag>
+                <el-tag v-else-if="row.waterType === 6" effect="plain" type="success">代金券购买</el-tag>
+                <span v-else>--</span>
               </template>
-              </el-table-column>
-              <el-table-column prop="proportion" label="佣金比例" />
-              <el-table-column prop="amount" label="分配的佣金" />
-              <el-table-column prop="totalAmount" label="佣金总金额" /> -->
+            </el-table-column>
+            <el-table-column align="center" min-width="80" prop="destinationId" label="去向Id" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" width="150" prop="createTime" label="创建时间" show-overflow-tooltip />
+          </el-table>
+        </div>
+        <div v-else style="font-size: 16px;font-weight: bold;">无出账记录数据</div>
+      </el-tab-pane>
+      <el-tab-pane label="入账记录列表" name="entryRecord">
+        <div v-if="entryRecordList && entryRecordList.length" style="margin-top: 32px;">
+          <el-table
+            v-loading="!entryRecordList.length" height="60vh" element-loading-text="暂无入账记录数据" :data="entryRecordList"
+            v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+          >
             <el-table-column align="center" min-width="80" prop="id" label="ID" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" min-width="80" prop="buyerUserId" label="入账用户Id" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="来源类型" prop="sourceType">
@@ -88,42 +93,42 @@
             </el-table-column>
             <el-table-column align="center" min-width="80" prop="sourceId" label="来源Id" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" width="150" prop="orderFormid" label="来源订单编号" show-overflow-tooltip />
-            <el-table-column align="center" width="150" prop="transactionId" label="支付单号" show-overflow-tooltip />
             <el-table-column align="center" width="150" prop="commissionNumber" label="入账数量" show-overflow-tooltip />
             <el-table-column align="center" label="活动配置类型" prop="waterType">
               <template slot-scope="{ row }">
                 <el-tag v-if="row.waterType === -1" effect="plain" type="info">退款退回</el-tag>
-                <el-tag v-else-if="row.waterType === 1" effect="plain" type="success">升级活动</el-tag>
+                <el-tag v-else-if="row.waterType === 1" effect="plain" type="info">升级活动</el-tag>
                 <el-tag v-else-if="row.waterType === 2" effect="plain" type="success">分佣活动</el-tag>
                 <el-tag v-else-if="row.waterType === 3" effect="plain" type="success">社区活动</el-tag>
                 <el-tag v-else-if="row.waterType === 4" effect="plain" type="success">赠券活动</el-tag>
                 <el-tag v-else-if="row.waterType === 5" effect="plain" type="success">赠金活动</el-tag>
                 <el-tag v-else-if="row.waterType === 6" effect="plain" type="success">商圈订单</el-tag>
-                <el-tag v-else-if="row.waterType === 7" effect="plain" type="success">爆家具</el-tag>
+                <el-tag v-else-if="row.waterType === 7" effect="plain" type="success">爆家具</el-tag>
                 <el-tag v-else-if="row.waterType === 8" effect="plain" type="success">社区订单</el-tag>
                 <el-tag v-else-if="row.waterType === 9" effect="plain" type="success">用户代金券转赠</el-tag>
-                <el-tag v-else-if="row.waterType === 0" effect="plain" type="success">商家代金券转赠</el-tag>
+                <el-tag v-else-if="row.waterType === 10" effect="plain" type="success">商家代金券转赠</el-tag>
                 <el-tag v-else-if="row.waterType === 11" effect="plain" type="success">同城联盟卡</el-tag>
                 <span v-else>--</span>
               </template>
             </el-table-column>
             <el-table-column align="center" width="150" prop="effectiveTime" label="有效时间" show-overflow-tooltip />
-            <el-table-column align="center" min-width="80" prop="isProportion" label="佣金比例" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" min-width="120" prop="commissionTotal" label="佣金总额" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" width="150" prop="isProportion" label="佣金比例" show-overflow-tooltip />
+            <el-table-column align="center" width="150" prop="commissionTotal" label="佣金总额" show-overflow-tooltip />
             <el-table-column align="center" label="受益用户类型" prop="buyerUserType">
               <template slot-scope="{ row }">
-                <el-tag v-if="row.buyerUserType == 100" effect="plain" type="info">代理商</el-tag>
-                <el-tag v-else-if="row.buyerUserType == 200" effect="plain" type="success">加盟商</el-tag>
-                <el-tag v-else-if="row.buyerUserType == 300" effect="plain" type="success">小区店</el-tag>
-                <el-tag v-else-if="row.buyerUserType == 400" effect="plain" type="success">本系统</el-tag>
-                <span v-else>{{ row.buyerUserType }}</span>
+                <el-tag v-if="row.buyerUserType === 100" effect="plain" type="info">代理商</el-tag>
+                <el-tag v-else-if="row.buyerUserType === 200" effect="plain" type="success">加盟商</el-tag>
+                <el-tag v-else-if="row.buyerUserType === 300" effect="plain" type="success">小区店</el-tag>
+                <el-tag v-else-if="row.buyerUserType === 400" effect="plain" type="success">团长</el-tag>
+                <el-tag v-else-if="row.buyerUserType === 500" effect="plain" type="success">合伙人</el-tag>
+                <span v-else>--</span>
               </template>
             </el-table-column>
-            <el-table-column align="center" min-width="120" prop="withdrawalId" label="提现Id" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" min-width="80" prop="withdrawalId" label="提现Id" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" width="150" prop="createTime" label="创建时间" show-overflow-tooltip />
           </el-table>
         </div>
-        <div v-else style="font-size: 16px;font-weight: bold;">无佣金流水记录数据</div>
+        <div v-else style="font-size: 16px;font-weight: bold;">无入账记录数据</div>
       </el-tab-pane>
     </el-tabs>
   </el-dialog>
@@ -172,7 +177,8 @@ export default {
         // acquirerId: '',
         withdrawalId: ''
       },
-      recordList: []
+      outgoingRecordList: [],
+      entryRecordList: []
     }
   },
   methods: {
@@ -185,7 +191,8 @@ export default {
       const res2 = await getUserWater({ userId: this.withdrawalInfo.buyerUserId })
       this.watherInfo = res2.data
       const res3 = await getCommissionAll({ ...this.recordQuery, withdrawalId: this.withdrawalInfo.withdrawalId })
-      this.recordList = res3.data
+      this.outgoingRecordList = res3.data.outgoing
+      this.entryRecordList = res3.data.entry
     },
     handleOpen(params = {}) {
       this.formData = Object.assign(this.$options.data().formData, params)