|
|
@@ -0,0 +1,210 @@
|
|
|
+<!-- 履约信息-详情 -->
|
|
|
+<template>
|
|
|
+ <app-drawer class="g-details" width="80%" title="详情" v-model:show="show" :loading="loading" :refresh="refresh">
|
|
|
+ <app-table-details title="基本信息" :label-width="180" :data="selectedRow" :cell-props="detailProps" :column="2">
|
|
|
+ <!-- 付款方式 -->
|
|
|
+ <template #paymenttype="{ value }">
|
|
|
+ {{ value === 1 ? '冻结' : '扣款' }}
|
|
|
+ </template>
|
|
|
+ <!-- 买方冻结 -->
|
|
|
+ <template #buyerfreezeamount="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 卖方冻结 -->
|
|
|
+ <template #sellerfreezeamount="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 买方冻结剩余 -->
|
|
|
+ <template #buyerfreezeamountremain="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 卖方冻结剩余 -->
|
|
|
+ <template #sellerfreezeamountremain="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 买方今日付款 -->
|
|
|
+ <template #buytodayamount="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 卖方今日收款 -->
|
|
|
+ <template #selltodayamount="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 已付金额 -->
|
|
|
+ <template #buypaidamount="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 已收金额 -->
|
|
|
+ <template #sellreceivedamount="{ value }">
|
|
|
+ {{ handleNumberValue(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 买方联络信息 -->
|
|
|
+ <template #buyerInfo>
|
|
|
+ {{ buyerInfo }}
|
|
|
+ </template>
|
|
|
+ <!-- 卖方联络信息 -->
|
|
|
+ <template #sellerInfo>
|
|
|
+ {{ sellerInfo }}
|
|
|
+ </template>
|
|
|
+ </app-table-details>
|
|
|
+ <app-table :data="dataList" :columns="tableColumns" :show-toolbar="false" :row-style="rowStyle" border>
|
|
|
+ <template #header>
|
|
|
+ <h3 class="g-details__title">步骤列表</h3>
|
|
|
+ </template>
|
|
|
+ <!-- 步骤值 -->
|
|
|
+ <template #stepvalue="{ value }">
|
|
|
+ {{ (value * 100).toFixed(1) }}
|
|
|
+ </template>
|
|
|
+ <template #isauto="{ value }">
|
|
|
+ {{ value ? '是' : '否' }}
|
|
|
+ </template>
|
|
|
+ <!-- 启动类型 -->
|
|
|
+ <template #steplanchtype="{ value }">
|
|
|
+ {{ value === 1 ? '系统自动' : '手动' }}
|
|
|
+ </template>
|
|
|
+ <!-- 步骤状态 -->
|
|
|
+ <template #stepstatus="{ value }">
|
|
|
+ {{ getPerformanceStepStatusName(value) }}
|
|
|
+ </template>
|
|
|
+ </app-table>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="onCancel(false)" plain>取消</el-button>
|
|
|
+ </template>
|
|
|
+ </app-drawer>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import { defineComponent } from 'vue'
|
|
|
+export default defineComponent({
|
|
|
+ inheritAttrs: false,
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+import { PropType, computed, ref, shallowRef } from 'vue'
|
|
|
+import { handleNumberValue, handleNoneValue } from '@/filters'
|
|
|
+import { getPerformanceStepStatusName } from '@/constants/order'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { queryWrPerformancePlanStep } from '@/services/api/performance'
|
|
|
+import AppTable from '@pc/components/base/table/index.vue'
|
|
|
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
+import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
+
|
|
|
+const props = defineProps({
|
|
|
+ code: String,
|
|
|
+ teleportTo: {
|
|
|
+ type: String,
|
|
|
+ default: '#appPageTeleport'
|
|
|
+ },
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Model.PerformancePlanRsp>,
|
|
|
+ default: () => ({})
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const show = ref(true)
|
|
|
+const refresh = ref(false)
|
|
|
+
|
|
|
+const { loading, dataList } = useRequest(queryWrPerformancePlanStep, {
|
|
|
+ params: {
|
|
|
+ planid: props.selectedRow.performanceplanid
|
|
|
+ },
|
|
|
+})
|
|
|
+
|
|
|
+const detailProps = [
|
|
|
+ { prop: 'relatedorderid', label: '关联单号:' },
|
|
|
+ { prop: 'wrstandardname', label: '履约商品:' },
|
|
|
+ { prop: 'amount', label: '履约金额:' },
|
|
|
+ { prop: 'paymenttype', label: '付款方式:' },
|
|
|
+ { prop: 'accountname', label: '对手方:' },
|
|
|
+ { prop: 'buyerfreezeamount', label: '买方冻结:' },
|
|
|
+ { prop: 'buytodayamount', label: '买方今日付款:' },
|
|
|
+ { prop: 'sellerfreezeamount', label: '卖方冻结:' },
|
|
|
+ { prop: 'selltodayamount', label: '卖方今日收款:' },
|
|
|
+ { prop: 'buyerfreezeamountremain', label: '买方冻结剩余:' },
|
|
|
+ { prop: 'buypaidamount', label: '已付金额:' },
|
|
|
+ { prop: 'sellerfreezeamountremain', label: '卖方冻结剩余:' },
|
|
|
+ { prop: 'sellreceivedamount', label: '已收金额:' },
|
|
|
+ { prop: 'sellerInfo', label: '卖方联络信息:' },
|
|
|
+ { prop: 'buyerInfo', label: '买方联络信息:' },
|
|
|
+]
|
|
|
+
|
|
|
+const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
+ { prop: 'steptypename', label: '名称' },
|
|
|
+ { prop: 'stepdays', label: '天数' },
|
|
|
+ { prop: 'remaindays', label: '剩余天数' },
|
|
|
+ { prop: 'stepvalue', label: '步骤值(%)' },
|
|
|
+ { prop: 'stepamount', label: '金额' },
|
|
|
+ { prop: 'realamount', label: '完成金额' },
|
|
|
+ { prop: 'isauto', label: '是否自动' },
|
|
|
+ { prop: 'steplanchtype', label: '启动类型' },
|
|
|
+ { prop: 'starttime', label: '开始日期' },
|
|
|
+ { prop: 'endtime', label: '结束日期' },
|
|
|
+ { prop: 'stepstatus', label: '步骤状态' },
|
|
|
+ { prop: 'remark', label: '步骤备注' },
|
|
|
+])
|
|
|
+
|
|
|
+// 当前步骤索引位置
|
|
|
+const currentStepIndex = computed(() => dataList.value.findIndex((e) => e.performancestepid === props.selectedRow.curstepid))
|
|
|
+
|
|
|
+// 买方联络信息
|
|
|
+const buyerInfo = computed(() => {
|
|
|
+ if (props.selectedRow.buyerinfo) {
|
|
|
+ const obj = JSON.parse(props.selectedRow.buyerinfo)
|
|
|
+ const content: string[] = []
|
|
|
+ Object.entries(obj).forEach(([key, value]) => {
|
|
|
+ if (value) {
|
|
|
+ switch (key) {
|
|
|
+ case 'ContactInfo': {
|
|
|
+ content.push('联络信息:' + value)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'ReceiveInfo': {
|
|
|
+ content.push('收货地址:' + value)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'ReceiptInfo': {
|
|
|
+ content.push('发票信息:' + value)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return content.join('\n')
|
|
|
+ }
|
|
|
+ return handleNoneValue()
|
|
|
+})
|
|
|
+
|
|
|
+// 卖方联络信息
|
|
|
+const sellerInfo = computed(() => {
|
|
|
+ const obj = JSON.parse(props.selectedRow.sellerinfo || '{}')
|
|
|
+ return obj.ContactInfo || handleNoneValue()
|
|
|
+})
|
|
|
+
|
|
|
+const rowStyle = ({ rowIndex }: { rowIndex: number }) => {
|
|
|
+ if (currentStepIndex.value > rowIndex) {
|
|
|
+ return {
|
|
|
+ color: 'green'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (currentStepIndex.value === rowIndex) {
|
|
|
+ return {
|
|
|
+ color: 'red'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ color: '#999'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const onCancel = (isRefresh = false) => {
|
|
|
+ show.value = false
|
|
|
+ refresh.value = isRefresh
|
|
|
+}
|
|
|
+
|
|
|
+// getPlanStepList()
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+@import './index.less';
|
|
|
+</style>
|