|
@@ -7,17 +7,25 @@ import { ElMessage } from 'element-plus'
|
|
import Drawer from '@/components/Drawer/index.vue'
|
|
import Drawer from '@/components/Drawer/index.vue'
|
|
import ImageCom from '@/components/Image/index.vue'
|
|
import ImageCom from '@/components/Image/index.vue'
|
|
import { ColumnProps } from '@/components/TableBase/interface/index'
|
|
import { ColumnProps } from '@/components/TableBase/interface/index'
|
|
-import { Storehouse_Contract_Get, Storehouse_Contract_Approval } from '@/api/storehouse/index'
|
|
|
|
-
|
|
|
|
|
|
+import { percentage_Get, percentage_Approval } from '@/api/percentage/index'
|
|
|
|
+import PercentageTable from './PercentageTable.vue'
|
|
|
|
+import {
|
|
|
|
+ royalty,
|
|
|
|
+ columnsRemit,
|
|
|
|
+ labelsInvoice
|
|
|
|
+} from '@/hooks/useTablePublic'
|
|
interface InfoType {
|
|
interface InfoType {
|
|
Id: number
|
|
Id: number
|
|
T_State: number
|
|
T_State: number
|
|
T_approver: string
|
|
T_approver: string
|
|
T_approver_name: string
|
|
T_approver_name: string
|
|
|
|
+ T_recoveries_money: number
|
|
|
|
+ T_contract_money: number
|
|
T_customer: string
|
|
T_customer: string
|
|
T_date: string
|
|
T_date: string
|
|
T_money: number
|
|
T_money: number
|
|
T_number: string
|
|
T_number: string
|
|
|
|
+ T_uuid_name:string
|
|
T_out: number
|
|
T_out: number
|
|
T_pdf: string
|
|
T_pdf: string
|
|
T_remark: string
|
|
T_remark: string
|
|
@@ -96,13 +104,17 @@ const snColumns = [
|
|
{ type: 'index', label: '序号', width: 80, align: 'center ' },
|
|
{ type: 'index', label: '序号', width: 80, align: 'center ' },
|
|
{ label: 'SN', prop: 'sn', align: 'center ' }
|
|
{ label: 'SN', prop: 'sn', align: 'center ' }
|
|
]
|
|
]
|
|
-
|
|
|
|
|
|
+const tableDatalty = ref<any[]>([])//提成
|
|
const getStorehouseContractGet = async () => {
|
|
const getStorehouseContractGet = async () => {
|
|
- const res: any = await Storehouse_Contract_Get({ User_tokey: globalStore.GET_User_tokey, T_number: route.params.id })
|
|
|
|
|
|
+ const res: any = await percentage_Get({ User_tokey: globalStore.GET_User_tokey, T_id: route.params.id })
|
|
|
|
+
|
|
|
|
+ console.log('提成详情', route.params, res)
|
|
if (res.Code === 200) {
|
|
if (res.Code === 200) {
|
|
info.value = res.Data
|
|
info.value = res.Data
|
|
- const { T_Product, T_invoice, T_recoveries } = res.Data
|
|
|
|
|
|
+ const { T_Product, T_remit, T_invoice, T_recoveries,T_item } = res.Data
|
|
tableData.value = T_Product
|
|
tableData.value = T_Product
|
|
|
|
+ tableDatalty.value = T_item
|
|
|
|
+ T_remit && InvoiceRef.value?.setMoneyDeatil(T_remit)
|
|
invoiceTableData.value = T_invoice
|
|
invoiceTableData.value = T_invoice
|
|
recoveriesTableData.value = T_recoveries
|
|
recoveriesTableData.value = T_recoveries
|
|
if (!isVerify.value && T_Product) {
|
|
if (!isVerify.value && T_Product) {
|
|
@@ -116,14 +128,15 @@ const getStorehouseContractGet = async () => {
|
|
const previewPdf = (str: string) => window.open(str)
|
|
const previewPdf = (str: string) => window.open(str)
|
|
|
|
|
|
const contractApproval = async (state: number) => {
|
|
const contractApproval = async (state: number) => {
|
|
- const res: any = await Storehouse_Contract_Approval({
|
|
|
|
|
|
+ const res: any = await percentage_Approval({
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
- T_number: route.params.id,
|
|
|
|
|
|
+ T_id: route.params.id,
|
|
T_state: state
|
|
T_state: state
|
|
})
|
|
})
|
|
if (res.Code === 200) {
|
|
if (res.Code === 200) {
|
|
ElMessage.success('审核成功!!')
|
|
ElMessage.success('审核成功!!')
|
|
getStorehouseContractGet()
|
|
getStorehouseContractGet()
|
|
|
|
+ router.back()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const getState = (val: number, type: string) => {
|
|
const getState = (val: number, type: string) => {
|
|
@@ -163,31 +176,43 @@ onMounted(() => {
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
isSale.value = false
|
|
isSale.value = false
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+const InvoiceRef = ref<InstanceType<typeof PercentageTable> | null>(null)
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<template>
|
|
<template>
|
|
<div class="contract-detail">
|
|
<div class="contract-detail">
|
|
<div class="info">
|
|
<div class="info">
|
|
<h1>
|
|
<h1>
|
|
- 详情<span v-if="isVerify"> - {{ getState(info?.T_State!, 'T_State') }}</span>
|
|
|
|
|
|
+ {{ route.params.titles }}
|
|
</h1>
|
|
</h1>
|
|
<el-divider />
|
|
<el-divider />
|
|
<div class="content">
|
|
<div class="content">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>合同编号</span></el-col>
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>合同编号</span></el-col>
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ info?.T_number! }}</span></el-col
|
|
|
|
- >
|
|
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"><span>{{ info?.T_number! }}</span></el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row v-if="isVerify">
|
|
<el-row v-if="isVerify">
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>客户名称</span></el-col>
|
|
<el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>客户名称</span></el-col>
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ info?.T_customer! }}</span></el-col
|
|
|
|
- >
|
|
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"><span>{{ info?.T_customer! }}</span></el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row v-if="isVerify">
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>合同金额</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"><span>{{ info?.T_contract_money! }}</span></el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row v-if="isVerify">
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>回款金额</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"><span>{{ info?.T_recoveries_money! }}</span></el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row v-if="isVerify">
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>提成类型</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
+ <span>{{ info?.T_type! == 1 ? '验证实施' : '报告编写' }}</span>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"
|
|
|
|
- ><span>{{ isVerify ? '产品' : '验证' }}明细</span></el-col
|
|
|
|
- >
|
|
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2">
|
|
|
|
+ <span>产品明细</span></el-col>
|
|
<el-col :span="21">
|
|
<el-col :span="21">
|
|
<el-table border stripe :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
|
|
<el-table border stripe :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
|
|
<template v-for="item in columns" :key="item.prop">
|
|
<template v-for="item in columns" :key="item.prop">
|
|
@@ -198,17 +223,13 @@ onUnmounted(() => {
|
|
<el-tag v-else type="success" effect="dark">否</el-tag>
|
|
<el-tag v-else type="success" effect="dark">否</el-tag>
|
|
</span>
|
|
</span>
|
|
<ImageCom v-if="item.prop === 'T_product_img'" :src="row.T_product_img" />
|
|
<ImageCom v-if="item.prop === 'T_product_img'" :src="row.T_product_img" />
|
|
- <el-tooltip
|
|
|
|
- v-if="item.prop === 'T_product_model'"
|
|
|
|
- effect="dark"
|
|
|
|
- :content="row.T_product_model"
|
|
|
|
- placement="bottom"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-tooltip v-if="item.prop === 'T_product_model'" effect="dark" :content="row.T_product_model"
|
|
|
|
+ placement="bottom">
|
|
{{ row.T_product_model }}
|
|
{{ row.T_product_model }}
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column v-bind="item" v-if="item.fixed === 'right'">
|
|
|
|
|
|
+ <!-- <el-table-column v-bind="item" v-if="item.fixed === 'right'">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@@ -217,134 +238,58 @@ onUnmounted(() => {
|
|
>查看</el-button
|
|
>查看</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
|
|
+ </el-table-column> -->
|
|
</template>
|
|
</template>
|
|
</el-table>
|
|
</el-table>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row v-if="isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>业务日期</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <span>{{ info?.T_date! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>合同金额</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <el-text type="danger">{{ info?.T_money! }}¥</el-text>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row v-if="!isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>优惠金额</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <el-text type="danger">{{ info?.T_discount! }}¥</el-text>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row v-if="!isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>签订时间</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <span>{{ info?.T_date! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
- <el-row v-if="!isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>起始时间</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <span>{{ info?.T_start_date! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
- <el-row v-if="!isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>终止时间</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <span>{{ info?.T_end_date! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>项目</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
- <span>{{ info?.T_project }}</span>
|
|
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2">
|
|
|
|
+ <span>提成明细:</span></el-col>
|
|
|
|
+ <el-col :span="21">
|
|
|
|
+ <el-table border stripe :data="tableDatalty" style="width: 100%"
|
|
|
|
+ :header-cell-style="{ background: '#dedfe0', height: '50px' }">
|
|
|
|
+ <template v-for="item in royalty" :key="item.prop">
|
|
|
|
+ <el-table-column v-bind="item">
|
|
|
|
+ <template #default="{ row }" v-if="item.prop === item.name">
|
|
|
|
+ <div v-if="item.prop === 'T_priceNum'">{{ Number(row.T_num) * Number(row.T_price) }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
-
|
|
|
|
- <el-row v-if="isVerify">
|
|
|
|
- <!-- 1-未出库 2-已部分出库 3-已全部出库 -->
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>出库状态</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ getState(info?.T_out!, 'T_out') }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
<el-row v-if="isVerify">
|
|
<el-row v-if="isVerify">
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"
|
|
|
|
- ><span v-if="isVerify">经办人</span><span v-else>合同负责人</span></el-col
|
|
|
|
- >
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ info?.T_submit_name! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>合同备注</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span>{{ info?.T_remark! }}</span></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>附件</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><span v-if="!info?.T_pdf!">无</span>
|
|
|
|
- <el-button v-else type="primary" @click="previewPdf(info?.T_pdf!)">查看附件</el-button></el-col
|
|
|
|
- >
|
|
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>提成金额</span></el-col>
|
|
|
|
+ <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
|
|
+ <span>{{ info?.T_money! }}</span></el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>回款明细</span></el-col>
|
|
|
|
- <el-col :span="21">
|
|
|
|
- <el-table
|
|
|
|
- border
|
|
|
|
- stripe
|
|
|
|
- :data="recoveriesTableData"
|
|
|
|
- style="width: 100%"
|
|
|
|
- :header-cell-style="headerCellStyle"
|
|
|
|
- >
|
|
|
|
- <el-table-column v-bind="item" v-for="item in columnsRecoveries" :key="item.prop"></el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <el-row v-if="isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>未回款金额</span></el-col>
|
|
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>提成人员</span></el-col>
|
|
<el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
<el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5">
|
|
- <el-text type="danger">{{ info?.T_no_recoveries_money! }}¥</el-text>
|
|
|
|
|
|
+ <div>{{ info?.T_uuid_name! }}</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
-
|
|
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>开票明细</span></el-col>
|
|
|
|
|
|
+ <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"> <span>打款明细</span></el-col>
|
|
<el-col :span="21">
|
|
<el-col :span="21">
|
|
- <el-table border stripe :data="invoiceTableData" style="width: 100%" :header-cell-style="headerCellStyle">
|
|
|
|
- <el-table-column v-bind="item" v-for="item in columnsInvoice" :key="item.prop"></el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <PercentageTable ref="InvoiceRef" :columns="columnsRemit" :showTable="false" title="打款明细" :labels="labelsInvoice">
|
|
|
|
+ <template #add="{ AddDetail }">
|
|
|
|
+ <el-button type="primary" @click="AddDetail">
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Plus />
|
|
|
|
+ </el-icon><span style="margin-left: 6px">添加</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </PercentageTable>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row v-if="isVerify">
|
|
|
|
- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="2"><span>未开票金额</span></el-col>
|
|
|
|
- <el-col :xs="11" :sm="9" :md="7" :lg="6" :xl="5"
|
|
|
|
- ><el-text type="danger">{{ info?.T_no_invoice_money! }}¥</el-text></el-col
|
|
|
|
- >
|
|
|
|
- </el-row>
|
|
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<el-divider />
|
|
<el-divider />
|
|
<div class="submit">
|
|
<div class="submit">
|
|
- <el-button v-if="info?.T_State === 3 && isSale" type="danger" round @click="contractApproval(2)"
|
|
|
|
- >审核不通过</el-button
|
|
|
|
- >
|
|
|
|
- <el-button v-if="info?.T_State === 3 && isSale" type="success" round @click="contractApproval(1)"
|
|
|
|
- >审核通过</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button v-if="route.params.titles=='审核'" type="danger" round @click="contractApproval(3)">审核不通过</el-button>
|
|
|
|
+ <el-button v-if="route.params.titles=='审核'" type="success" round @click="contractApproval(2)">审核通过</el-button>
|
|
<el-button type="primary" round @click="router.back()">返回</el-button>
|
|
<el-button type="primary" round @click="router.back()">返回</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -364,22 +309,28 @@ onUnmounted(() => {
|
|
height: 100%;
|
|
height: 100%;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
color: var(--el-text-color-secondary);
|
|
color: var(--el-text-color-secondary);
|
|
|
|
+
|
|
.info {
|
|
.info {
|
|
height: 100%;
|
|
height: 100%;
|
|
padding: 20px;
|
|
padding: 20px;
|
|
|
|
+
|
|
h1 {
|
|
h1 {
|
|
font-size: 24px;
|
|
font-size: 24px;
|
|
|
|
+
|
|
span {
|
|
span {
|
|
color: #f56c6c;
|
|
color: #f56c6c;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
& .content {
|
|
& .content {
|
|
height: calc(100% - 72px - 25px - 40px);
|
|
height: calc(100% - 72px - 25px - 40px);
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
|
+
|
|
.el-row {
|
|
.el-row {
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.submit {
|
|
.submit {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|