|
|
@@ -1,8 +1,9 @@
|
|
|
<!-- 底部-履约信息-卖履约 -->
|
|
|
<template>
|
|
|
- <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey" :expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
- <!-- 履约状态 -->
|
|
|
- <template #performancestatus="{ value }">
|
|
|
+ <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
|
|
|
+ :expand-row-keys="expandKeys" @row-click="rowClick">
|
|
|
+ <!-- 履约状态 -->
|
|
|
+ <template #performancestatus="{ value }">
|
|
|
{{ getPerformanceStatusName(value) }}
|
|
|
</template>
|
|
|
<!-- 履约类型 -->
|
|
|
@@ -20,16 +21,22 @@
|
|
|
<!-- 展开行 -->
|
|
|
<template #expand="{ row }">
|
|
|
<div class="buttonbar">
|
|
|
- <el-button type="danger" size="small" v-if="row.buyorsell===row.executeside-1" @click="showComponent('manual', row)">手动确认</el-button>
|
|
|
- <el-button type="warning" size="small" v-if="row.buyorsell===row.executeside-1" @click="showComponent('delay', row)">延期</el-button>
|
|
|
- <el-button type="primary" size="small" v-if="![6, 7].includes(row.performancestatus)" @click="showComponent('contracted', row)">违约</el-button>
|
|
|
- <el-button type="info" v-if="![6, 7].includes(row.performancestatus)" size="small" @click="showComponent('edit', row)">修改</el-button>
|
|
|
+ <el-button type="danger" size="small" v-if="row.buyorsell === row.executeside - 1"
|
|
|
+ @click="showComponent('manual', row)">手动确认</el-button>
|
|
|
+ <el-button type="warning" size="small" v-if="row.buyorsell === row.executeside - 1"
|
|
|
+ @click="showComponent('delay', row)">延期</el-button>
|
|
|
+ <el-button type="primary" size="small" v-if="![6, 7].includes(row.performancestatus)"
|
|
|
+ @click="showComponent('contracted', row)">违约</el-button>
|
|
|
+ <el-button type="info" v-if="![6, 7].includes(row.performancestatus)" size="small"
|
|
|
+ @click="showComponent('edit', row)">修改</el-button>
|
|
|
<el-button type="success" size="small" @click="showComponent('details', row)">详细</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #footer>
|
|
|
+ <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
|
|
|
+ @closed="closeComponent" v-if="componentId" />
|
|
|
+ </template>
|
|
|
</app-table>
|
|
|
- <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
|
|
|
- v-if="componentId" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
@@ -50,10 +57,6 @@ const componentMap = new Map<string, unknown>([
|
|
|
['edit', defineAsyncComponent(() => import('../components/edit/index.vue'))],
|
|
|
])
|
|
|
|
|
|
-defineProps({
|
|
|
- code: String
|
|
|
-})
|
|
|
-
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
run()
|
|
|
})
|
|
|
@@ -64,7 +67,7 @@ const selectedRow = shallowRef<Model.PerformancePlanRsp>()
|
|
|
const { loading, dataList, run } = useRequest(queryPerformancePlan, {
|
|
|
params: {
|
|
|
buyorsell: BuyOrSell.Sell,
|
|
|
- status:'2'
|
|
|
+ status: '2'
|
|
|
},
|
|
|
})
|
|
|
|
|
|
@@ -83,7 +86,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
{ prop: 'performancestatus', label: '履约状态' },
|
|
|
{ prop: 'curstepname', label: '当前步骤' },
|
|
|
{ prop: 'starttime', label: '开始时间' },
|
|
|
-
|
|
|
+
|
|
|
])
|
|
|
|
|
|
const showComponent = (componentName: string, row: Model.PerformancePlanRsp) => {
|