123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <template>
- <div class="">
- <TableBase ref="TableRef" border :columns="columns" :requestApi="ContractReview_List_Post" :initParam="data.initParam">
- <template #table-header>
- <div style="display: flex;justify-content: space-between;flex-wrap: wrap;flex: 1;">
- <el-form :inline="true" :model="data.initParam" class="demo-form-inline">
- <el-form-item label="项目名称">
- <el-input v-model="data.initParam.T_name" placeholder="搜索项目名称" />
- </el-form-item>
- <el-form-item label="状态">
- <el-select v-model="data.initParam.T_audit" placeholder="请选择状态">
- <el-option v-for="item in optionReviewList" :key="item.value" :label="item.name" :value="item.value" />
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="onclicksearch">查询</el-button>
- </el-form-item>
- </el-form>
- <contractReviewListAdd ref="btnRef" :fromData="data.fromData" @successFun="successFun"></contractReviewListAdd>
- </div>
- </template>
- <template #T_audit="{ row }">
- <el-tag :type="
- [1,2].includes(row.T_audit)?'warning':
- [3,5].includes(row.T_audit)?'primary':
- [4,6].includes(row.T_audit)?'danger':''">
- {{
- row.T_audit=='1'?'待提交审核':
- row.T_audit=='2'?'待审核':
- row.T_audit=='3'?'财务通过':
- row.T_audit=='4'?'财务驳回':
- row.T_audit=='5'?'总经理通过':
- row.T_audit=='6'?'总经理驳回':''
- }}
- </el-tag>
- </template>
- <template #T_have_brokerage_fee="{ row }">
- <el-tag :type="row.T_have_brokerage_fee?'primary':'success'">
- {{ row.T_have_brokerage_fee?'是':'否' }}
- </el-tag>
- </template>
- <template #right="{ row }">
- {{ }}
- <el-button link type="primary" size="small" :icon="View" @click="openDrawer('详情', row)">详情</el-button>
- <el-button link type="primary" size="small" :disabled="[1,4,6].includes(row.T_audit)?false:true"
- icon="Check" @click="SubmitAudit(row)" >提交审核</el-button>
- <el-button link type="primary" size="small" :disabled="[1,2,4,6].includes(row.T_audit)?false:true"
- :icon="Edit" @click="openDrawer('编辑', row)">编辑</el-button>
- <el-button link type="danger" size="small" :disabled="[1,2,4,6].includes(row.T_audit)?false:true"
- :icon="Delete" @click="openDelect(row)">删除</el-button>
- </template>
- </TableBase>
- </div>
- </template>
- <script setup lang='ts'>
- import { ref, reactive,computed } from 'vue';
- import { View,Check,Edit, Delete } from '@element-plus/icons-vue'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import { GlobalStore } from '@/stores/index'
- import contractReviewListAdd from './modules/contractReviewListAdd.vue'
- import { optionReviewList } from './modules/optionsData'
- import { ContractReview_Del_Post,ContractReview_Submit_Post} from '@/api/contractReview/index'
- import TableBase from '@/components/TableBase/index.vue'
- import { ContractReview_List_Post} from '@/api/contractReview/index'
- const globalStore = GlobalStore()
- const TableRef = ref()
- const btnRef = ref()
- const successFun = async (data:any)=>{
- TableRef.value?.getTableList()
- }
- const data = reactive({
- initParam :{
- User_tokey: globalStore.GET_User_tokey,
- T_name: '',
- T_submit: '',
- T_audit: ''
- },
- fromData:{},
- })
- // 搜索以及参数
- const columns = [
- { type: 'index', label: '序号', width: 80, align: 'center ' },
- { prop: 'T_audit', label: '状态', name: 'T_audit'},
- { prop: 'T_name', label: '项目名称' },
- { prop: 'T_address', label: '项目地址' },
- { prop: 'T_submit_name', label: '项目负责人' },
- { prop: 'T_predict_sign_time', label: '预计签约时间' },
- { prop: 'T_money', label: '总金额' },
- { prop: 'T_discount_money', label: '最终优惠金额' },
- { prop: 'T_have_brokerage_fee', label: '是否有居间费', name: 'T_have_brokerage_fee' },
- { prop: 'T_brokerage_fee_money', label: '居间费金额' },
- { prop: 'operation', label: '操作', fixed: 'right',width:'300px' }
- ]
- const onclicksearch = (row: any) => {
- TableRef.value?.getTableList()
- }
- /**
- * 编辑
- * @param tit
- * @param row
- */
- const openDrawer = (tit:string,row: any) => {
- btnRef.value.outerVisible = true
- btnRef.value.data.drawerTiti = tit
- data.fromData = row
- }
- /**
- * 删除
- * @param row
- */
- const openDelect = (row: any) => {
- ElMessageBox.confirm('删除操作,是否执行操作?','删除',{
- confirmButtonText: '立即删除',
- cancelButtonText: '取消',
- type: 'warning',
- center: true,
- }).then(async() => {
- const result:any = await ContractReview_Del_Post({T_id:row.Id})
- if(result.Code==200){
- ElMessage.success('删除成功')
- TableRef.value?.getTableList()
- }
- }).catch(() => {})
- }
- /**
- * 提交审核
- */
- const SubmitAudit = async(row: any) => {
- const result:any = await ContractReview_Submit_Post({T_id:row.Id})
- if(result.Code==200){
- ElMessage.success('审核提交成功')
- TableRef.value?.getTableList()
- }
- }
- </script>
- <style lang="scss">
- /* @import url(); 引入css类 */
- </style>
|