修改采购合同媒体信息和付款信息不能被编辑异常

This commit is contained in:
wangchengming 2026-01-07 20:32:21 +08:00
parent 2cc2bc4c86
commit 404cd04a7e

View File

@ -44,59 +44,48 @@
<!-- 媒体信息开始 -->
<template #purchaseMediaBoList>
<div class="table-container">
<el-table
:data="visibleMediaData"
:key="'media-table-' + tableKey"
style="width: 100%"
height="400"
show-summary
:summary-method="mediaTypeSummary"
>
<el-table-column
v-for="column in mediaListColumns"
:key="column.dataIndex"
:prop="column.dataIndex"
:label="column.title"
:width="column.width"
>
<el-table :data="visibleMediaData" :key="'media-table-' + tableKey" style="width: 100%" height="400"
show-summary :summary-method="mediaTypeSummary">
<el-table-column v-for="column in mediaListColumns" :key="column.dataIndex" :prop="column.dataIndex"
:label="column.title" :width="column.width">
<template #default="scope">
<template v-if="column.slot">
<!-- 城市选择 -->
<template v-if="column.dataIndex === 'cityId'">
<el-custom-cascader
v-model="scope.row.cityIds"
:dataSource="cityList"
<el-custom-cascader v-model="scope.row.cityIds" :dataSource="cityList"
:cascaderStyle="{ width: '100%' }"
@change="(v, t) => { scope.row.cityId = v; scope.row.cityName = t; }"
/>
@change="(v, t) => { scope.row.cityId = v; scope.row.cityName = t; }" />
</template>
<!-- 媒体类型 -->
<template v-else-if="column.dataIndex === 'mediaId'">
<el-custom-select
v-model="scope.row.mediaId"
:dataSource="mediaTypeList"
:remoteAdd="handleAddMediaTypeParty"
@change="(v, t) => (scope.row.mediaName = t)"
/>
<el-custom-select v-model="scope.row.mediaId" :dataSource="mediaTypeList"
:remoteAdd="handleAddMediaTypeParty" @change="(v, t) => (scope.row.mediaName = t)" />
</template>
<!-- 媒体位置 -->
<template v-else-if="column.dataIndex === 'mediaPosition'">
<el-input v-model="scope.row.mediaPosition"></el-input>
</template>
<!-- 采购数量 -->
<template v-else-if="column.dataIndex === 'accountNumber'">
<el-input type="number" v-model="scope.row.accountNumber"></el-input>
</template>
<!-- 发布频次 -->
<template v-else-if="column.dataIndex === 'releaseFrequency'">
<el-input v-model="scope.row.releaseFrequency"></el-input>
</template>
<!-- 上刊时间 -->
<template v-else-if="column.dataIndex === 'upTime'">
<el-date-picker
v-model="scope.row.upTime"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
<el-date-picker v-model="scope.row.upTime" value-format="yyyy-MM-dd" style="width: 100%" />
</template>
<!-- 下刊时间 -->
<template v-else-if="column.dataIndex === 'downTime'">
<el-date-picker
v-model="scope.row.downTime"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
<el-date-picker v-model="scope.row.downTime" value-format="yyyy-MM-dd" style="width: 100%" />
</template>
<!-- 周期 -->
@ -104,16 +93,39 @@
{{ delayPeriodDate(scope.row) }}
</template>
<!-- 刊例价 -->
<template v-else-if="column.dataIndex === 'printPrice'">
<el-input type="number" v-model="scope.row.printPrice"></el-input>
</template>
<!-- 刊例价单位 -->
<template v-else-if="column.dataIndex === 'printPriceUnit'">
<el-input v-model="scope.row.printPriceUnit"></el-input>
</template>
<!-- 折扣 -->
<template v-else-if="column.dataIndex === 'discount'">
<div class="flexRowCenter">
<el-input
v-model="scope.row.discount"
@change="handleNumberChange(scope.row.discount, $event)"
></el-input>
<el-input v-model="scope.row.discount"
@change="handleNumberChange(scope.row.discount, $event)"></el-input>
</div>
</template>
<!-- 媒体费 -->
<template v-else-if="column.dataIndex === 'mediaFee'">
<el-input type="number" v-model="scope.row.mediaFee"></el-input>
</template>
<!-- 制作费 -->
<template v-else-if="column.dataIndex === 'productFee'">
<el-input type="number" v-model="scope.row.productFee"></el-input>
</template>
<!-- 备注 -->
<template v-else-if="column.dataIndex === 'remark'">
<el-input type="textarea" v-model="scope.row.remark"></el-input>
</template>
<!-- 默认显示 -->
<template v-else>
{{ scope.row[column.dataIndex] }}
@ -136,15 +148,9 @@
<div class="table-actions">
<el-button type="primary" @click="addMediaRow">新增媒体</el-button>
<el-pagination
v-if="mediaTableData.length > pageSize"
small
layout="prev, pager, next"
:total="mediaTableData.length"
:page-size="pageSize"
:current-page="mediaCurrentPage"
@current-change="handleMediaPageChange"
/>
<el-pagination v-if="mediaTableData.length > pageSize" small layout="prev, pager, next"
:total="mediaTableData.length" :page-size="pageSize" :current-page="mediaCurrentPage"
@current-change="handleMediaPageChange" />
</div>
</div>
</template>
@ -153,21 +159,10 @@
<!-- 付款管理开始 -->
<template #purchasePaymentBoList>
<div class="table-container">
<el-table
:data="visiblePaymentData"
:key="'payment-table-' + tableKey"
style="width: 100%"
height="400"
show-summary
:summary-method="paymentSummary"
>
<el-table-column
v-for="column in contranctPayListColumns"
:key="column.dataIndex"
:prop="column.dataIndex"
:label="column.title"
:width="column.width"
>
<el-table :data="visiblePaymentData" :key="'payment-table-' + tableKey" style="width: 100%" height="400"
show-summary :summary-method="paymentSummary">
<el-table-column v-for="column in contranctPayListColumns" :key="column.dataIndex" :prop="column.dataIndex"
:label="column.title" :width="column.width">
<template #default="scope">
<template v-if="column.slot">
<!-- 笔数 -->
@ -183,20 +178,21 @@
<!-- 约定付款时间 -->
<template v-else-if="column.dataIndex === 'payTime'">
<el-date-picker
v-model="scope.row.payTime"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
<el-date-picker v-model="scope.row.payTime" value-format="yyyy-MM-dd" style="width: 100%" />
</template>
<!-- 约定付款金额 -->
<template v-else-if="column.dataIndex === 'conventionArrivalMoney'">
<el-input type="number" v-model="scope.row.conventionArrivalMoney"></el-input>
</template>
<!-- 实际付款时间 -->
<template v-else-if="column.dataIndex === 'arrivalTime'">
<el-date-picker
v-model="scope.row.arrivalTime"
value-format="yyyy-MM-dd"
style="width: 100%"
/>
<el-date-picker v-model="scope.row.arrivalTime" value-format="yyyy-MM-dd" style="width: 100%" />
</template>
<!-- 实际付款金额 -->
<template v-else-if="column.dataIndex === 'actualArrivalMoney'">
<el-input type="number" v-model="scope.row.actualArrivalMoney"></el-input>
</template>
<!-- 是否逾期 -->
@ -214,11 +210,8 @@
<!-- 附件 -->
<template v-else-if="column.dataIndex === 'annex'">
<el-file-upload
:key="`annex_${scope.row.id || scope.row.tempId}_${tableKey}`"
listType="list"
:uploadStyle="{ width: '336px' }"
/>
<el-file-upload :key="`annex_${scope.row.id || scope.row.tempId}_${tableKey}`" listType="list"
:uploadStyle="{ width: '336px' }" />
</template>
<!-- 默认显示 -->
@ -243,15 +236,9 @@
<div class="table-actions">
<el-button type="primary" @click="addPaymentRow">新增付款</el-button>
<el-pagination
v-if="paymentTableData.length > pageSize"
small
layout="prev, pager, next"
:total="paymentTableData.length"
:page-size="pageSize"
:current-page="paymentCurrentPage"
@current-change="handlePaymentPageChange"
/>
<el-pagination v-if="paymentTableData.length > pageSize" small layout="prev, pager, next"
:total="paymentTableData.length" :page-size="pageSize" :current-page="paymentCurrentPage"
@current-change="handlePaymentPageChange" />
</div>
</div>
</template>
@ -403,8 +390,8 @@ export default {
processColumns(columns) {
return columns.map(column => ({
...column,
slot: !!column.scopedSlots || ['cityId', 'mediaId', 'upTime', 'downTime', 'period', 'discount',
'transactionsNumber', 'payTime', 'arrivalTime', 'isOverdue', 'overdueDay', 'annex'].includes(column.dataIndex)
slot: !!column.scopedSlots || ['cityId', 'mediaId', 'upTime', 'downTime', 'period', 'discount', 'mediaPosition', 'accountNumber', 'releaseFrequency', 'printPrice', 'printPriceUnit', 'mediaFee', 'productFee', 'remark',
'transactionsNumber', 'payTime', 'arrivalTime', 'isOverdue', 'overdueDay', 'annex', 'conventionArrivalMoney', 'actualArrivalMoney'].includes(column.dataIndex)
}));
},