소스 검색

新增重要通知

zmq 1 년 전
부모
커밋
5273d28d51

+ 25 - 1
src/api/admin/Notice.ts

@@ -124,5 +124,29 @@ export class NoticeApi<SecurityDataType = unknown> extends HttpClient<SecurityDa
             query: query,
             secure: true,
             ...params,
-        })       
+        })  
+    /**
+     * No description
+     *
+     * @tags notice
+     * @name Get
+     * @summary 查询重要公告
+     * @request GET:/api/admin/notice/get-weight
+     * @secure
+     */
+    getWeight = (
+        query?: {
+            
+        },
+        params: RequestParams = {}
+    ) =>
+        this.request<ResultOutputNoticeGetOutput, any>({
+            path: `/api/admin/notice/get-weight`,
+            method: 'GET',
+            query: query,
+            secure: true,
+            format: 'json',
+            ...params,
+        })
 }
+

+ 2 - 2
src/api/admin/ProjectLink.ts

@@ -7,7 +7,7 @@ import {
 } from './data-contracts'
 import { ContentType, HttpClient, RequestParams } from './http-client'
 
-export class ProjectLinkApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType>{ 
+export class ProjectLinkApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType>{
     /**
    * No description
    *
@@ -17,7 +17,7 @@ export class ProjectLinkApi<SecurityDataType = unknown> extends HttpClient<Secur
    * @request POST:/api/admin/project-link/get-manage-page
    * @secure
    */
-    getPageManage = (data: pageInputProjectLinkManagePageInput, params: RequestParams = {}) =>  
+    getPageManage = (data: pageInputProjectLinkManagePageInput, params: RequestParams = {}) =>
         this.request<ResultOutputPageOutputProjectLinkManagePageOutput, any>({
             path: `/api/admin/project-link/get-manage-page`,
             method: 'Post',

+ 70 - 0
src/api/admin/ProjectPrice.ts

@@ -0,0 +1,70 @@
+import { AxiosResponse } from 'axios'
+import {
+    ResultOutputCompanyDrawOutput,
+    CompanyDrawInput,
+    pageInputProjectPriceSetPageInput,
+    ResultOutputPageOutputPriceGetPageOutput,
+} from './data-contracts'
+import { ContentType, HttpClient, RequestParams } from './http-client'
+
+export class ProjectPriceApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType>{
+    /**
+   * No description
+   *
+   * @tags role
+   * @name Get
+   * @summary 查询公司抽成信息
+   * @request GET:/api/admin/project-price/get-company-draw
+   * @secure
+   */
+    getCompanyDraw = (
+        query?: {            
+        },
+        params: RequestParams = {}
+    ) =>
+        this.request<ResultOutputCompanyDrawOutput, any>({
+            path: `/api/admin/project-price/get-company-draw`,
+            method: 'GET',
+            query: query,
+            secure: true,
+            format: 'json',
+            ...params,
+        })
+    /**
+   * No description
+   *
+   * @tags org
+   * @name Update
+   * @summary 修改公司抽成比例
+   * @request Post:/api/admin/project-price/edit-company-draw
+   * @secure
+   */
+    updateCompany = (data: CompanyDrawInput, params: RequestParams = {}) =>
+        this.request<AxiosResponse, any>({
+            path: `/api/admin/project-price/edit-company-draw`,
+            method: 'Post',
+            body: data,
+            secure: true,
+            type: ContentType.Json,
+            ...params,
+        })
+    /**
+   * No description
+   *
+   * @tags projectprice
+   * @name GetPage
+   * @summary 查询项目价格分页
+   * @request POST:/api/admin/project-price/get-page
+   * @secure
+   */
+    getPricePage = (data: pageInputProjectPriceSetPageInput, params: RequestParams = {}) =>
+        this.request<ResultOutputPageOutputPriceGetPageOutput, any>({
+            path: `/api/admin/project-price/get-page`,
+            method: 'Post',
+            body: data,
+            secure: true,
+            type: ContentType.Json,
+            format: 'json',
+            ...params,
+        })
+}

+ 87 - 1
src/api/admin/data-contracts.ts

@@ -5029,4 +5029,90 @@ export interface ProjectLinkListOutput {
   salesmanRemark: string
   //平台Id
   tenantId: number
-}
+}
+/** 项目价格设置分页信息输入 */
+export interface pageInputProjectPriceSetPageInput {
+  /**
+   * 当前页标
+   * @format int32
+   */
+  currentPage?: number
+  /**
+   * 每页大小
+   * @format int32
+   */
+  pageSize?: number
+  dynamicFilter?: DynamicFilterInfo
+  filter?: ProjectPriceSetPageInput
+}
+export interface ProjectPriceSetPageInput {  
+}
+/** 结果输出 */
+export interface ResultOutputPageOutputPriceGetPageOutput {
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 分页信息输出 */
+  data?: PageOutputProjectPriceSetPageOutput
+}
+export interface PageOutputProjectPriceSetPageOutput {
+  /**
+   * 数据总数
+   * @format int64
+   */
+  total?: number
+  /** 数据 */
+  list?: PriceGetPageOutput[] | null
+}
+export interface PriceGetPageOutput {
+  // 项目id
+  id?: number
+  // logo
+  logo?: string
+  // 名称
+  name?: string
+  // 价格
+  prices?: PriceGetPageOutput_Price[] | null 
+}
+export interface PriceGetPageOutput_Price {
+  // id
+  id?: number
+  // 标题
+  name?: string
+  // 价格
+  price?: number
+  // 设价方式
+  drawPriceWay?: number, 
+  //设价比率
+  DrawRatio?: number, 
+  //设价金额
+  DrawPrice?: number,                    
+}
+/** 公司抽成比例结果输出 */
+export interface ResultOutputCompanyDrawOutput {
+  /** 是否成功标记 */
+  success?: boolean
+  /** 编码 */
+  code?: string | null
+  /** 消息 */
+  msg?: string | null
+  /** 分页信息输出 */
+  data?: CompanyDrawOutput
+}
+export interface CompanyDrawOutput {
+  /** 当前比例 */
+  currentRatio?: number
+  /** 下次抽成比例 */
+  nextRatio?: number 
+  /** 下次抽成比例生效时间 */
+  nextEffectDate?: string | null    
+}
+export interface CompanyDrawInput {
+  /** 抽成比例 */
+  drawRatio?: number
+  /** 生效时间 */
+  effectDate?: string  
+}

+ 4 - 0
src/types/mitt.d.ts

@@ -24,6 +24,8 @@
  * @method refreshProject 刷新項目
  * @method refreshNotice 刷新公告
  * @method refreshProjectLink 刷新推广码
+ * @method refreshProjectPrice 刷新项目价格
+ * @method refreshCompanyDraw 刷新公司抽成
  */
 declare type MittType<T = any> = {
   openSetingsDrawer?: string
@@ -51,6 +53,8 @@ declare type MittType<T = any> = {
   refreshProject?: T
   refreshNotice?: T
   refreshProjectLink?: T
+  refreshProjectPrice?: T
+  refreshCompanyDraw?:T
 }
 
 // mitt 参数类型定义

+ 96 - 0
src/views/admin/notice/alternotice.vue

@@ -0,0 +1,96 @@
+<template>
+    <div class="my-layout">
+        <el-card class="my-fill mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
+            <el-form ref="formRef" :model="state.form" size="default" label-width="80px">
+                    <el-row :gutter="35">                      
+                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+                          <el-form-item label="内容" prop="content" :rules="[{ required: true, message: '请输入通知内容', trigger: ['blur', 'change'] }]">                
+                            <Editor v-model:get-html="state.editor.htmlVal" v-model:get-text="state.editor.textVal" :disable="state.editor.disable" />
+                          </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+                        <el-form-item size="large">
+                            <el-button type="primary" @click="onSure" size="default" :loading="state.sureLoading">确 定</el-button>
+                        </el-form-item>
+                    </el-col>                    
+                  </el-form> 
+        </el-card>        
+    </div>
+             
+</template>
+<script lang="ts" setup name="admin/notice/alternotice">
+
+// import { stat } from 'fs'
+import { reactive, getCurrentInstance, ref, defineAsyncComponent, onMounted } from 'vue'
+import { NoticeAddInput, NoticeUpdateInput } from '/@/api/admin/data-contracts'
+import { NoticeApi } from '/@/api/admin/Notice'
+
+// 引入组件
+const Editor = defineAsyncComponent(() => import('/@/components/editor/index.vue'))
+
+
+const { proxy } = getCurrentInstance() as any
+
+
+const formRef = ref()
+
+const state = reactive({    
+    sureLoading: false,
+    form: {} as NoticeAddInput & NoticeUpdateInput,
+    editor: {
+        htmlVal: '',
+        textVal: '',
+        disable: false,
+    },
+})
+
+onMounted(() => {
+    onQuery();    
+
+})
+
+// 查询重要通知
+const onQuery = async () => {    
+    const res = await new NoticeApi().getWeight({ }, { loading: true }).catch(() => {
+        proxy.$modal.closeLoading()
+    })
+    
+    if (res?.success) {
+        if (res.data != null) {
+            state.form = res.data as NoticeAddInput & NoticeUpdateInput;
+            state.editor.htmlVal = state.form.content;
+        } else { 
+            state.form = {} as NoticeAddInput & NoticeUpdateInput
+        }
+        
+    }    
+}
+
+// 确定
+const onSure = () => {
+    if (state.editor.textVal!="")
+        state.form.content = state.editor.htmlVal;    
+    formRef.value.validate(async (valid: boolean) => {        
+        if (!valid) return        
+        state.sureLoading = true
+        state.form.isAlter = 1;
+        state.form.rank = 0;
+        state.form.title='重要通知'
+        let res = {} as any
+        if (state.form.id != undefined && state.form.id > 0) {
+            res = await new NoticeApi().update(state.form, { showSuccessMessage: true }).catch(() => {                
+                state.sureLoading = false
+            })
+        } else {
+            res = await new NoticeApi().add(state.form, { showSuccessMessage: true }).catch(() => {                
+                state.sureLoading = false
+            })
+        }
+        if (res?.success) {
+            onQuery();
+            state.sureLoading = false
+        }
+    }) 
+}
+</script>

+ 2 - 1
src/views/admin/notice/components/notice-form.vue

@@ -90,7 +90,8 @@ const open = async (row: any = {}) => {
     })
 
     if (res?.success) {
-      state.form = res.data as NoticeAddInput & NoticeUpdateInput      
+      state.form = res.data as NoticeAddInput & NoticeUpdateInput        
+      state.editor.htmlVal = state.form.content;      
     }
   } else {
     state.form = {} as NoticeAddInput & NoticeUpdateInput

+ 18 - 28
src/views/admin/notice/index.vue

@@ -1,44 +1,34 @@
 <template>
   <div class="my-layout">
     <el-card class="mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
-      <el-form :inline="true" @submit.stop.prevent>        
-        <el-form-item>          
-          <el-button v-auth="'api:admin:notice:add'" type="primary" icon="ele-Plus" @click="onAdd"> 新增 </el-button>
+      <el-form :inline="true" @submit.stop.prevent>
+        <el-form-item>
+          <el-button v-auth="'api:admin:notice:add'" type="primary" icon="ele-Plus" @click="onAdd"> 新增
+          </el-button>
         </el-form-item>
       </el-form>
     </el-card>
 
     <el-card class="my-fill mt8" shadow="never">
-      <el-table v-loading="state.loading" :data="state.tenantListData" row-key="id" height="'100%'" style="width: 100%; height: 100%">
+      <el-table v-loading="state.loading" :data="state.tenantListData" row-key="id" height="'100%'"
+        style="width: 100%; height: 100%">
         <el-table-column prop="title" label="标题" min-width="120" show-overflow-tooltip />
-        <el-table-column prop="createdTime" label="添加时间" width="180" show-overflow-tooltip />        
-        <el-table-column prop="rank" label="排序" width="120" show-overflow-tooltip />                        
+        <el-table-column prop="createdTime" label="添加时间" width="180" show-overflow-tooltip />
+        <el-table-column prop="rank" label="排序" width="120" show-overflow-tooltip />
         <el-table-column label="操作" width="140" header-align="center" align="center" fixed="right">
           <template #default="{ row }">
-            <el-button v-auth="'api:admin:notice:update'" icon="ele-EditPen" size="small" text type="primary" @click="onEdit(row)">编辑</el-button>
-            <my-dropdown-more v-auths="['api:admin:notice:delete']">
-              <template #dropdown>
-                <el-dropdown-menu>
-                  <el-dropdown-item v-if="auth('api:admin:notice:delete')" @click="onDelete(row)">删除租户</el-dropdown-item>
-                </el-dropdown-menu>
-              </template>
-            </my-dropdown-more>
+            <el-button v-auth="'api:admin:notice:update'" icon="ele-EditPen" size="small" text type="primary"
+              @click="onEdit(row)">编辑</el-button>
+              <el-button v-auth="'api:admin:notice:soft-delete'" icon="ele-Delete" size="small" text type="danger"
+                @click="onDelete(row)">删除</el-button>            
           </template>
         </el-table-column>
       </el-table>
 
       <div class="my-flex my-flex-end" style="margin-top: 20px">
-        <el-pagination
-          v-model:currentPage="state.pageInput.currentPage"
-          v-model:page-size="state.pageInput.pageSize"
-          :total="state.total"
-          :page-sizes="[10, 20, 50, 100]"
-          small
-          background
-          @size-change="onSizeChange"
-          @current-change="onCurrentChange"
-          layout="total, sizes, prev, pager, next, jumper"
-        />
+        <el-pagination v-model:currentPage="state.pageInput.currentPage" v-model:page-size="state.pageInput.pageSize"
+          :total="state.total" :page-sizes="[10, 20, 50, 100]" small background @size-change="onSizeChange"
+          @current-change="onCurrentChange" layout="total, sizes, prev, pager, next, jumper" />
       </div>
     </el-card>
 
@@ -66,7 +56,7 @@ const state = reactive({
   noticeFormTitle: '',
   total: 0,
   filter: {
-    
+
   },
   pageInput: {
     currentPage: 1,
@@ -100,7 +90,7 @@ const onQuery = async () => {
 }
 
 const onAdd = () => {
-  state.noticeFormTitle = '新增公告'  
+  state.noticeFormTitle = '新增公告'
   noticeFormRef.value.open()
 }
 
@@ -116,7 +106,7 @@ const onDelete = (row: NoticeGetPageOutput) => {
       await new NoticeApi().softDelete({ id: row.id }, { loading: true, showSuccessMessage: true })
       onQuery()
     })
-    .catch(() => {})
+    .catch(() => { })
 }
 
 const onSizeChange = (val: number) => {

+ 1 - 1
src/views/admin/projectlink/index.vue

@@ -54,7 +54,7 @@
                 <el-table-column label="操作" width="180" header-align="center" align="center" fixed="right">
               <template #default="{ row }">                
                 <el-button size="small" text type="primary" @click="onDetail(row)">查看明细</el-button>                
-                <el-button size="small" text type="primary" @click="onEdit(row)">补充推广码</el-button>                
+                <!-- <el-button size="small" text type="primary" @click="onEdit(row)">补充推广码</el-button>                 -->
               </template>
             </el-table-column>
             </el-table>

+ 108 - 0
src/views/admin/projectprice/components/company-form.vue

@@ -0,0 +1,108 @@
+<template>
+    <div>
+        <el-dialog v-model="state.showDialog" destroy-on-close :title="title" draggable :close-on-click-modal="false"
+            :close-on-press-escape="false" width="30%">
+            <el-form ref="formRef" :model="form" size="default" label-width="80px">
+                <el-row :gutter="35">
+                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+                        <el-form-item label="分成比例" prop="drawRatio"
+                            :rules="[{ required: true, message: '请输入分成比例', trigger: ['blur', 'change'] }]">
+                            <el-input v-model="form.drawRatio" autocomplete="off" />
+                        </el-form-item>
+                    </el-col>                    
+                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">                        
+                        <el-form-item label="生效日期" prop="effectDate" :rules="[{ required: true, message: '请输入生效日期', trigger: ['blur', 'change'] }]">                            
+                            <el-date-picker type="date" v-model="form.effectDate" placeholder="选择日期" format="YYYY-MM-DD"
+                            class="w100">
+                            </el-date-picker>
+                        </el-form-item>
+                    </el-col>                    
+                </el-row>
+            </el-form>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button @click="onCancel" size="default">取 消</el-button>
+                    <el-button type="primary" @click="onSure" size="default" :loading="state.sureLoading">确 定</el-button>
+                </span>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script lang="ts" setup name="admin/projectprice/companyform">
+
+// import { stat } from 'fs'
+import { reactive, toRefs, ref } from 'vue'
+import { CompanyDrawInput } from '/@/api/admin/data-contracts'
+import { ProjectPriceApi } from '/@/api/admin/ProjectPrice'
+import eventBus from '/@/utils/mitt'
+// 引入组件
+
+
+
+defineProps({
+    title: {
+        type: String,
+        default: '',
+    },
+})
+
+const formRef = ref()
+const state = reactive({
+    value2:'',
+    showDialog: false,
+    sureLoading: false,
+    form: {} as CompanyDrawInput    
+})
+const { form } = toRefs(state)
+
+
+// 打开对话框
+const open = async () => {    
+    state.form = {} as CompanyDrawInput    
+    state.showDialog = true
+}
+
+
+// 取消
+const onCancel = () => {
+    state.showDialog = false
+}
+
+// 确定
+const onSure = () => {
+    formRef.value.validate(async (valid: boolean) => {
+        if (!valid) return          
+        let d = new Date(state.form.effectDate);
+        let years = d.getFullYear();
+        let month :any = d.getMonth() + 1;
+        if (month < 10)
+            month = '0' + month;
+        let date: any = d.getDate();
+        if (date < 10)
+            date = '0' + date;
+
+        
+        let dn :any= years +'-'+ month + '-' + date;        
+
+        state.form.effectDate=dn    
+
+        state.sureLoading = true
+        let res = {} as any        
+            res = await new ProjectPriceApi().updateCompany(state.form, { showSuccessMessage: true }).catch(() => {
+                state.sureLoading = false
+            })
+        
+        state.sureLoading = false
+
+        if (res?.success) {
+            eventBus.emit('refreshCompanyDraw')
+            state.showDialog = false
+        }
+    })
+}
+
+defineExpose({
+    open,
+})
+</script>

+ 113 - 0
src/views/admin/projectprice/components/tenantprice.vue

@@ -0,0 +1,113 @@
+<template>
+    <div>
+        <el-dialog v-model="state.showDialog" destroy-on-close :title="title" draggable :close-on-click-modal="false"
+            :close-on-press-escape="false" width="1000px">
+                <div>            
+                    <el-card class="mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
+                        <el-form :inline="true" @submit.stop.prevent>                            
+                            <el-form-item label="推广码来源">
+                            <el-input v-model="state.filter.keywords" placeholder="请输入推广码来源" />
+                            </el-form-item>
+                            <el-form-item>
+                            <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>          
+                            </el-form-item>
+                        </el-form>
+                    </el-card>
+                    <el-card class="my-fill mt8" shadow="never">
+                    <el-table v-loading="state.loading" :data="state.projectLinkListData" row-key="id" height="'100%'" style="width: 100%; height: 100%">
+                        <el-table-column label="推广码来源" prop="company" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="所属平台" prop="orgName" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="编号" prop="num" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="二维码" prop="qrcodeUrl" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="查单码" prop="company" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="口令" prop="shareCommand" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="申请时间" min-width="120" show-overflow-tooltip>
+                            <template #default="{ row }">                                
+                                {{row.isUse===1? row.useTime:'' }}
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="姓名" prop="salesman" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="手机号" prop="salesmanPhone" min-width="120" show-overflow-tooltip/>
+                        <el-table-column label="备注" prop="salesmanRemark" min-width="120" show-overflow-tooltip/>                        
+                    </el-table>
+                </el-card>
+            </div>        
+        </el-dialog>
+    </div>
+</template>
+
+<script lang="ts" setup name="admin/tenant/form">
+import { reactive, toRefs, getCurrentInstance, ref } from 'vue'
+import { PageInputProjectLinkGetPageDto, ProjectLinkListOutput } from '/@/api/admin/data-contracts'
+import { ProjectLinkApi } from '/@/api/admin/ProjectLink'
+
+import eventBus from '/@/utils/mitt'
+
+import QRCode from 'qrcodejs2-fixes'
+// 定义变量内容
+const qrcodeRef = ref()
+
+defineProps({
+    title: {
+        type: String,
+        default: '',
+    },
+})
+
+// const { proxy } = getCurrentInstance() as any
+
+// const formRef = ref()
+const state = reactive({
+    showDialog: false,
+    sureLoading: false, 
+    loading: false, 
+    filter: {
+        projectId: 0,
+        isUse: -1,
+        tenantId: 0,
+        keywords: ''
+    }, pageInput: {
+        currentPage: 1,
+        pageSize: 20,
+    } as PageInputProjectLinkGetPageDto,
+    total: 0, 
+    projectLinkListData: [] as Array<ProjectLinkListOutput>,
+})
+// const { form } = toRefs(state)
+
+
+
+// 打开对话框
+const open = async (row: any = {}) => {    
+    state.filter.projectId = row.projectId;
+    onQuery();
+    state.showDialog = true
+}
+
+//查询
+const onQuery = async () => {
+    state.loading = true
+
+    state.pageInput.filter = state.filter
+    const res = await new ProjectLinkApi().getPage(state.pageInput).catch(() => {
+        state.loading = false
+    })
+    state.projectLinkListData = res?.data?.list ?? []
+    state.total = res?.data?.total ?? 0
+    state.loading = false
+}
+// 初始化生成二维码
+const initQrcode = (text:string) => {
+    new QRCode(qrcodeRef.value, {
+        text: text,
+        width: 125,
+        height: 125,
+        colorDark: '#000000',
+        colorLight: '#ffffff',
+    })
+}
+
+defineExpose({
+    open,
+})
+</script>

+ 141 - 0
src/views/admin/projectprice/index.vue

@@ -0,0 +1,141 @@
+<template>
+    <div class="my-layout">
+        <el-card class="mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
+            <el-form :inline="true" @submit.stop.prevent>                
+                <el-form-item>                    
+                    <p>所有项目默认抽成比例<span style="color:red;">{{ state.companydraw.currentRatio }}%</span> (抽成金额精确到小数点后一位)</p>                    
+                    <p v-if="state.companydraw.nextRatio != 0">修改所有项目默认抽成比例为<span style="color:red;"> {{state.companydraw.nextRatio}}% 于{{ state.companydraw.nextEffectDate}} </span>生效</p>                    
+                </el-form-item>
+                <el-form-item>                    
+                    <el-button type="text" @click="onCompanyEdit"> 修改 </el-button>
+                </el-form-item>
+            </el-form>
+        </el-card>        
+        <el-card class="my-fill mt8" shadow="never">
+            <el-table v-loading="state.loading" :data="state.listData" row-key="id" height="'100%'"
+                style="width: 100%; height: 100%">
+                <el-table-column type="expand">
+                    <template v-slot="props">
+                        <el-table :data="props.row.prices" style="width: 100%;margin-bottom: 20px;" row-key="id"                            >
+                            <el-table-column prop="name" label="结算标准" width="180">
+                            </el-table-column>
+                            <el-table-column prop="price" label="价格" width="180">
+                            </el-table-column>
+                            <el-table-column label="设价方式" min-width="180">
+                                <template #default="{ pRow }">
+                                    <el-form label-position="left" inline class="demo-table-expand">
+                                        <el-form-item>
+                                            <el-select placeholder="请选择设价方式">
+                                                <el-option label="抽成比例" value="1"></el-option>
+                                                <el-option label="抽成金额" value="2"></el-option>
+                                            </el-select>
+                                        </el-form-item>
+                                        <el-form-item>                                           
+                                            <el-input placeholder="请输入设价信息"></el-input>                                                                                        
+                                        </el-form-item>
+                                        <el-form-item>                                             
+                                            %
+                                        </el-form-item>
+                                        <el-form-item>
+                                            <el-button type="primary" @click="SetPrice">设价</el-button>                                            
+                                        </el-form-item>
+                                    </el-form>
+                                </template>
+                            </el-table-column>                            
+                        </el-table>                        
+                    </template>
+                </el-table-column>                                           
+                <el-table-column label="Logo" prop="logo" min-width="120" show-overflow-tooltip >
+                    <template #default="{ row }">
+                        <div class="block"><el-avatar shape="square" size="medium" :src="row.logo"></el-avatar></div>
+                    </template>
+                </el-table-column>
+                <el-table-column label="项目名称" prop="name" min-width="120" show-overflow-tooltip />                
+                <el-table-column label="操作" width="180" header-align="center" align="center" fixed="right">
+                    <template #default="{ row }">
+                        <el-button size="small" text type="primary" @click="onDetail(row)">平台单独设价</el-button>                    
+                    </template>
+                </el-table-column>
+            </el-table>
+        </el-card>
+        <!-- <LinkForm ref="LinkFormRef" :title="state.linkFormTitle"></LinkForm> -->
+        <!-- <tenant-form ref="tenantFormRef" :title="state.tenantFormTitle"></tenant-form> -->
+        <!-- 公司抽成from -->
+        <company-form ref="companyFormRef" title="公司分成比例修改"></company-form>
+    </div>
+</template>
+<script lang="ts" setup name="admin/projectprice">
+import { stat } from 'fs'
+import { onMounted, reactive, onBeforeMount, defineAsyncComponent, ref } from 'vue'
+import { CompanyDrawOutput,pageInputProjectPriceSetPageInput, PriceGetPageOutput } from '/@/api/admin/data-contracts'
+import { ProjectPriceApi } from '/@/api/admin/ProjectPrice'
+import eventBus from '/@/utils/mitt'
+
+// 引入组件
+const CompanyForm = defineAsyncComponent(() => import('./components/company-form.vue'))
+const companyFormRef = ref();
+
+const state = reactive({    
+    companydraw: {         
+    } as CompanyDrawOutput,    
+    loading: false,
+    tenantFormTitle: '',
+    linkFormTitle: '',            
+    filter: {
+    },
+    pageInput: {
+        currentPage: 1,
+        pageSize: 20,
+    } as pageInputProjectPriceSetPageInput,
+    total: 0,
+    listData: [] as Array<PriceGetPageOutput>        
+})
+onMounted(() => { 
+    onCompanyQuery();   
+    onQuery();   
+    eventBus.on('refreshCompanyDraw', async () => { 
+        onCompanyQuery();
+    }) 
+    eventBus.off('refreshProjectPrice')
+    eventBus.on('refreshProjectPrice', async () => {
+        onQuery()
+    })
+
+})
+onBeforeMount(() => {
+    eventBus.off('refreshProjectPrice')
+})
+//查询
+const onQuery = async () => {
+    state.loading = true
+    state.pageInput.filter = state.filter
+    const res = await new ProjectPriceApi().getPricePage(state.pageInput).catch(() => {
+        state.loading = false
+    })
+    state.listData = res?.data?.list ?? []
+    state.total = res?.data?.total ?? 0
+    state.loading = false
+}
+//查询公司抽成
+const onCompanyQuery = async () => {
+    // state.loading = true
+    const res = await new ProjectPriceApi().getCompanyDraw({ })
+
+    if (res?.success) {
+        state.companydraw = res.data as CompanyDrawOutput;
+        state.companydraw.nextEffectDate = state.companydraw.nextEffectDate?.split(' ')[0];        
+    }       
+}
+//更新公司抽成
+const onCompanyEdit = () => {
+    companyFormRef.value.open()
+}
+
+
+
+//平台单独设价
+// const onDetail = (row: ProjectLinkManagePageOutput) => {
+//     state.tenantFormTitle = '编辑租户'
+//     tenantFormRef.value.open(row)    
+// }
+</script>