Procházet zdrojové kódy

提交window代码

RuHu.Xu před 4 měsíci
rodič
revize
67deaa22d1

+ 40 - 33
src/components/ZxTemplate/Points/Points.vue

@@ -13,38 +13,40 @@
           {{ pointsToPoint(scope.row.afterAmount || 0) }}
         </template>
       </el-table-column>
-
-      <el-table-column label="待确权" align="center" prop="freezeAmount">
-        <template #default="scope">
-          {{ pointsToPoint(scope.row.freezeAmount || 0) }}
-        </template>
-      </el-table-column>
-      <el-table-column label="冻结余额" align="center" prop="afterFreezeAmount">
-        <template #default="scope">
-          {{ pointsToPoint(scope.row.afterFreezeAmount || 0) }}
-        </template>
-      </el-table-column>
-      <el-table-column label="最大可用佣金额度变化值" align="center" prop="maxAvailablePointsAmount">
-        <template #default="scope">
-          {{ pointsToPoint(scope.row.maxAvailablePointsAmount || 0) }}
-        </template>
-      </el-table-column>
-      <el-table-column label="最大可用佣金额度" align="center" prop="afterMaxAvailablePointsAmount">
-        <template #default="scope">
-          {{ pointsToPoint(scope.row.afterMaxAvailablePointsAmount || 0) }}
-        </template>
-      </el-table-column>
-      <el-table-column label="合赢奖超出值" align="center" prop="accumulatedQuotaAmount">
-        <template #default="scope">
-          {{ pointsToPoint(scope.row.accumulatedQuotaAmount || 0) }}
-        </template>
-      </el-table-column>
-      <el-table-column label="直推奖超出值" align="center" prop="ancestorQuotaAmount">
-        <template #default="scope">
-          {{ pointsToPoint(scope.row.ancestorQuotaAmount || 0) }}
-        </template>
-      </el-table-column>
-      <el-table-column label="类别" align="center" prop="profitStatusName" width="180">
+     
+      <template v-if="!queryParams.visitor">
+        <el-table-column label="待确权" align="center" prop="freezeAmount">
+          <template #default="scope">
+            {{ pointsToPoint(scope.row.freezeAmount || 0) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="冻结余额" align="center" prop="afterFreezeAmount">
+          <template #default="scope">
+            {{ pointsToPoint(scope.row.afterFreezeAmount || 0) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="最大可用佣金额度变化值" align="center" prop="maxAvailablePointsAmount">
+          <template #default="scope">
+            {{ pointsToPoint(scope.row.maxAvailablePointsAmount || 0) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="最大可用佣金额度" align="center" prop="afterMaxAvailablePointsAmount">
+          <template #default="scope">
+            {{ pointsToPoint(scope.row.afterMaxAvailablePointsAmount || 0) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="合赢奖超出值" align="center" prop="accumulatedQuotaAmount">
+          <template #default="scope">
+            {{ pointsToPoint(scope.row.accumulatedQuotaAmount || 0) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="直推奖超出值" align="center" prop="ancestorQuotaAmount">
+          <template #default="scope">
+            {{ pointsToPoint(scope.row.ancestorQuotaAmount || 0) }}
+          </template>
+        </el-table-column>
+      </template>
+      <el-table-column label="类别" align="center" prop="profitStatusName" width="200">
         <template #default="scope">
          {{ scope.row.profitStatusName  }} {{ scope.row.username ? '(' + scope.row.username + ')' : '' }}
         </template>
@@ -94,7 +96,12 @@
   };
   onMounted(() => {
     // props.userId
-    queryParams.userId = props.userId;
+
+    if (props.userId) {
+      queryParams.userId = props.userId;
+    }else {
+      queryParams.visitor = true
+    }
     getUserInfo();
   });
 

+ 15 - 4
src/views/mall/product/spu/components/SpuTableSelect.vue

@@ -1,6 +1,6 @@
 <template>
   <Dialog v-model="dialogVisible" :appendToBody="true" title="选择商品" width="70%">
-    <ContentWrap style="border:none;">
+    <ContentWrap style="border:none;padding: 10px;">
       <el-form
         ref="queryFormRef"
         :inline="true"
@@ -116,7 +116,8 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
 import * as ProductSpuApi from '@/api/mall/product/spu'
 import { propTypes } from '@/utils/propTypes'
 import { CHANGE_EVENT } from 'element-plus'
-
+const shopId = inject('shopId') as Ref;
+const merchantId = inject('merchantId') as Ref;
 type Spu = Required<ProductSpuApi.Spu>
 
 /**
@@ -154,7 +155,9 @@ const queryParams = ref({
   name: '',
   categoryId: null,
   createTime: [],
-  checkStatus:1
+  checkStatus:1,
+  shopId:undefined,
+  merchantId:undefined
 })
 
 /** 打开弹窗 */
@@ -212,7 +215,15 @@ const resetQuery = () => {
     name: '',
     categoryId: null,
     createTime: [],
-    checkStatus:1
+    checkStatus:1,
+    shopId:undefined,
+    merchantId:undefined
+  }
+  console.log(shopId)
+  if (shopId.value != '0' && merchantId.value != '0') {
+    console.log(1123)
+    queryParams.value.shopId = shopId.value
+    queryParams.value.merchantId = merchantId.value
   }
   getList()
 }

+ 6 - 0
src/views/mall/promotion/diy/template/decorate.vue

@@ -57,6 +57,7 @@ if (isAdmin.value) {
     { name: '首页', icon: 'ep:home-filled' }
   ]
 }
+
 const message = useMessage() // 消息弹窗
 
 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
@@ -176,6 +177,11 @@ const recoverPageIndex = () => {
 /** 初始化 **/
 const { currentRoute } = useRouter() // 路由
 const { delView } = useTagsViewStore() // 视图操作
+const shopId = ref(currentRoute.value.params.shopId);
+const merchantId = ref(currentRoute.value.params.merchantId);
+provide('shopId', shopId);
+provide('merchantId', merchantId);
+
 onMounted(async () => {
   resetForm()
   if (!currentRoute.value.params.id) {

+ 4 - 23
src/views/system/distri/ptprofit/PtProfitForm.vue

@@ -1,31 +1,12 @@
 <template>
-  <Dialog :title="dialogTitle" v-model="dialogVisible">
-    <el-form
-      ref="formRef"
-      :model="formData"
-      :rules="formRules"
-      label-width="100px"
-      v-loading="formLoading"
-    >
-      <el-form-item label="平台服务费(毛利下的百分比收益)" prop="ptAdd">
-        <el-input v-model="formData.ptAdd" placeholder="请输入平台服务费(毛利下的百分比收益)" />
-      </el-form-item>
-      <el-form-item label="平台收益(0.3888 之外的收益)" prop="ptGrossAdd">
-        <el-input v-model="formData.ptGrossAdd" placeholder="请输入平台收益(0.3888 之外的收益)" />
-      </el-form-item>
-      <el-form-item label="平台总收益" prop="ptTotalAdd">
-        <el-input v-model="formData.ptTotalAdd" placeholder="请输入平台总收益" />
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
-      <el-button @click="dialogVisible = false">取 消</el-button>
-    </template>
+  <Dialog title="游客收益" v-model="dialogVisible" width="900px" style="height: 580px;">
+    <Points  openSource="PtProfit" />
+
   </Dialog>
 </template>
 <script setup lang="ts">
 import { PtProfitApi, PtProfitVO } from '@/api/system/distri/ptprofit'
-
+import Points from '@/components/ZxTemplate/Points/Points.vue'
 /** 平台利润 表单 */
 defineOptions({ name: 'PtProfitForm' })
 

+ 6 - 1
src/views/system/distri/ptprofit/index.vue

@@ -61,7 +61,7 @@
 
   <!-- 列表 -->
   <ContentWrap style="margin-top:10px;padding: 10px;">
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
+    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="openForm($event)" row-class-name="row">
       <el-table-column label="编号" align="center" prop="id" />
       <el-table-column label="平台服务费" align="center" prop="ptAdd" >
         <template #default="scope">
@@ -214,3 +214,8 @@ onMounted(() => {
 })
 </script>
 <style src="@/styles/SearchIndex.css"  lang="scss" scoped></style>
+<style>
+  .row{
+    cursor: pointer;
+  }
+</style>