|
|
@@ -1,81 +1,78 @@
|
|
|
<template>
|
|
|
<!-- 采购合同详情-->
|
|
|
- <a-modal class="add-custom custom-detail"
|
|
|
- title="详情"
|
|
|
- v-model:visible="visible"
|
|
|
- centered
|
|
|
- @cancel="cancel"
|
|
|
- width="890px">
|
|
|
+ <a-modal class="add-custom custom-detail" title="详情" v-model:visible="visible" centered @cancel="cancel" width="890px">
|
|
|
<template #footer>
|
|
|
- <a-button key="submit"
|
|
|
- type="primary"
|
|
|
- :loading="loading"
|
|
|
- @click="submit">关闭
|
|
|
+ <a-button key="submit" type="primary" :loading="loading" @click="submit">关闭
|
|
|
</a-button>
|
|
|
</template>
|
|
|
<a-tabs v-model:activeKey="activeKey" @change="tabClick">
|
|
|
- <a-tab-pane v-for="item in tabList" :key="item.key" :tab="item.name"></a-tab-pane>
|
|
|
+ <a-tab-pane v-for="item in tabList" :key="item.key" :tab="item.name"></a-tab-pane>
|
|
|
</a-tabs>
|
|
|
<InfoDetail :selectedRow="selectedRow" v-if="activeKey == 1" />
|
|
|
<div class="tableDatas" v-else>
|
|
|
- <a-table class="dialogTable" :columns="columns" :data-source="tableList" :pagination="false">
|
|
|
- <template #status="{ text }">
|
|
|
- <span class="yellow">{{ text }}</span>
|
|
|
- <!-- 审核通过'green' 审核拒绝 'orange' 待审核'yellow' -->
|
|
|
- </template>
|
|
|
+ <a-table class="dialogTable" :columns="columns" :data-source="tableList" :pagination="false">
|
|
|
+ <template #status="{ text }">
|
|
|
+ <span class="yellow">{{ text }}</span>
|
|
|
+ <!-- 审核通过'green' 审核拒绝 'orange' 待审核'yellow' -->
|
|
|
+ </template>
|
|
|
|
|
|
- <template #applystatus="{ text }">
|
|
|
- <a>{{ getApplyStatusName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <template #applystatus="{ text }">
|
|
|
+ <a>{{ getApplyStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 发票金额-->
|
|
|
- <template #invoicetype="{ text }">
|
|
|
- <a>{{ invoiceStatusName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <!-- 发票金额-->
|
|
|
+ <template #invoicetype="{ text }">
|
|
|
+ <a>{{ invoiceStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 发票类型-->
|
|
|
- <template #contracttype="{ text }">
|
|
|
- <a>{{ getReceiptName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <!-- 发票类型-->
|
|
|
+ <template #contracttype="{ text }">
|
|
|
+ <a>{{ getReceiptName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 出入库类型 -->
|
|
|
- <template #inouttype="{ text }">
|
|
|
- <a>{{ InOutTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <!-- 出入库类型 -->
|
|
|
+ <template #inouttype="{ text }">
|
|
|
+ <a>{{ InOutTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 款项类型 -->
|
|
|
- <template #kxtype="{ record }">
|
|
|
- <a>{{ stateName(record.deductamount, record.contracttype) }}</a>
|
|
|
- </template>
|
|
|
+ <!-- 款项类型 -->
|
|
|
+ <template #kxtype="{ record }">
|
|
|
+ <a>{{ stateName(record.deductamount, record.contracttype) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 金额-->
|
|
|
- <template #payamount="{ text, record }">
|
|
|
- <span>{{ formatValue(record.kxtype === 2 ? record.deductamount : text) }}</span>
|
|
|
- </template>
|
|
|
+ <!-- 金额-->
|
|
|
+ <template #payamount="{ text, record }">
|
|
|
+ <span>{{ formatValue(record.kxtype === 2 ? record.deductamount : text) }}</span>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 调整付保证金-->
|
|
|
- <template #addmargin="{ record }">
|
|
|
- <span>{{ formatValue(record.addmargin === undefined || '' ? record.decmargin : record.addmargin) }}</span>
|
|
|
- </template>
|
|
|
+ <!-- 调整付保证金-->
|
|
|
+ <template #addmargin="{ record }">
|
|
|
+ <span>{{ formatValue(record.addmargin === undefined || '' ? record.decmargin : record.addmargin) }}</span>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 交收量 -->
|
|
|
- <template #reckonrealqty="{ record }">
|
|
|
- <span>{{ formatValue(record.reckonrealqty) }}</span>
|
|
|
- </template>
|
|
|
+ <!-- 交收量 -->
|
|
|
+ <template #reckonrealqty="{ record }">
|
|
|
+ <span>{{ formatValue(record.reckonrealqty) }}</span>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 其他费用 -->
|
|
|
- <template #reckonotheramount="{ record }">
|
|
|
- <span>{{ formatValue(record.reckonotheramount) }}</span>
|
|
|
- </template>
|
|
|
+ <!-- 其他费用 -->
|
|
|
+ <template #reckonotheramount="{ record }">
|
|
|
+ <span>{{ formatValue(record.reckonotheramount) }}</span>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 申请人 -->
|
|
|
- <template #applyname="{ record }">
|
|
|
- <span>{{ formatValue(record.applyname) }}</span>
|
|
|
- </template>
|
|
|
+ <!-- 调整金额 -->
|
|
|
+ <template #reckonadjustamount="{ record }">
|
|
|
+ <span>{{ formatValue(record.reckonadjustamount) }}</span>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 款项记录 款项类型为退款 则金额使用deductamount-->
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
+ <!-- 申请人 -->
|
|
|
+ <template #applyname="{ record }">
|
|
|
+ <span>{{ formatValue(record.applyname) }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 款项记录 款项类型为退款 则金额使用deductamount-->
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -93,14 +90,15 @@ import { QueryAreaStockApply } from '@/services/go/ermcp/inventory-review';
|
|
|
import { QueryChangeLog } from '@/services/go/ermcp/spot-contract';
|
|
|
import { QueryPaTradeLinkDetail } from '@/services/go/ermcp/patrade-link';
|
|
|
import { columnsPaTradeLink } from '@/views/information/spot-contract/components/detail/setup';
|
|
|
-import InfoDetail from '../infoDetail/index.vue'
|
|
|
+import InfoDetail from '../infoDetail/index.vue';
|
|
|
import { getApplyStatusName, getReceiptName } from '@/common/constants/enumsName';
|
|
|
import { InOutTypeName } from '@/views/manage/inventory-review/setup';
|
|
|
import { invoiceStatusName, stateName } from '@/views/manage/finance-review/setup';
|
|
|
+import moment from 'moment';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'purchase_pending-detail',
|
|
|
- components: {InfoDetail},
|
|
|
+ components: { InfoDetail },
|
|
|
emits: ['cancel', 'update'],
|
|
|
props: {
|
|
|
selectedRow: {
|
|
|
@@ -120,13 +118,10 @@ export default defineComponent({
|
|
|
// 表头数据
|
|
|
const { columns, registerColumn } = getTableColumns();
|
|
|
|
|
|
-
|
|
|
function submit() {
|
|
|
cancel();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// 审核拒绝和未提交不显示后面的选项
|
|
|
tabList.value = [0, 4, 6].includes(props.selectedRow.contracctstatus)
|
|
|
? [{ key: 1, name: '合同详情' }]
|
|
|
@@ -137,69 +132,66 @@ export default defineComponent({
|
|
|
{ key: 4, name: '款项记录' },
|
|
|
{ key: 5, name: '发票记录' },
|
|
|
{ key: 6, name: props.selectedRow.contracttype === 1 ? '入库记录' : '出库记录' },
|
|
|
- { key: 8, name: '变更记录' },
|
|
|
- { key: 9, name: '关联记录' },
|
|
|
+ { key: 7, name: '变更记录' },
|
|
|
+ { key: 8, name: '关联记录' },
|
|
|
];
|
|
|
activeKey.value = 1;
|
|
|
function tabClick() {
|
|
|
- const relatedid = props.selectedRow.spotcontractid;
|
|
|
+ const { spotcontractid, contracttype } = props.selectedRow;
|
|
|
switch (activeKey.value) {
|
|
|
case 1:
|
|
|
break;
|
|
|
case 2: // 点价记录
|
|
|
registerColumn('table_pcweb_someprice_detail_dj', []);
|
|
|
- queryResultLoadingAndInfo(QueryBusinessDj, loading, { relatedid }).then((res) => {
|
|
|
- console.log(res,'hhh')
|
|
|
+ queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid }).then((res) => {
|
|
|
+ console.log(res, 'hhh');
|
|
|
tableList.value = res;
|
|
|
});
|
|
|
break;
|
|
|
case 3: // 交收记录
|
|
|
registerColumn('table_pcweb_someprice_detail_js', []);
|
|
|
- queryResultLoadingAndInfo(QueryBusinessJs, loading, { relatedid }).then((res) => {
|
|
|
+ queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid }).then((res) => {
|
|
|
tableList.value = res;
|
|
|
});
|
|
|
break;
|
|
|
case 4: //款项记录
|
|
|
registerColumn('table_pcweb_someprice_detail_kx', []);
|
|
|
- queryResultLoadingAndInfo(QueryBusinessKx, loading, { relatedid }).then((res) => {
|
|
|
+ queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid }).then((res) => {
|
|
|
tableList.value = res;
|
|
|
});
|
|
|
break;
|
|
|
case 5: // 发票记录
|
|
|
registerColumn('table_pcweb_someprice_detail_fp', []);
|
|
|
- queryResultLoadingAndInfo(QueryBusinessFp, loading, { relatedid }).then((res) => {
|
|
|
+ queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid }).then((res) => {
|
|
|
tableList.value = res;
|
|
|
});
|
|
|
break;
|
|
|
- case 6: // 入库记录
|
|
|
- registerColumn('table_pcweb_someprice_detail_stock', []);
|
|
|
- queryResultLoadingAndInfo(QueryAreaStockApply, loading, {
|
|
|
- spotcontractid: relatedid,
|
|
|
- inouttype: '1,3',
|
|
|
- }).then((res) => {
|
|
|
- tableList.value = res;
|
|
|
- });
|
|
|
- break;
|
|
|
- case 7: // 出库记录
|
|
|
- registerColumn('table_pcweb_someprice_detail_stock_out', []);
|
|
|
+ case 6: // 出入库记录
|
|
|
+ const inouttype = contracttype === 1 ? '5' : '6';
|
|
|
+ if (contracttype === 1) {
|
|
|
+ registerColumn('table_pcweb_someprice_detail_stock', []);
|
|
|
+ } else {
|
|
|
+ registerColumn('table_pcweb_someprice_detail_stock_out', []);
|
|
|
+ }
|
|
|
queryResultLoadingAndInfo(QueryAreaStockApply, loading, {
|
|
|
- spotcontractid: relatedid,
|
|
|
- inouttype: '2,4',
|
|
|
+ spotcontractid: spotcontractid,
|
|
|
+ inouttype,
|
|
|
}).then((res) => {
|
|
|
tableList.value = res;
|
|
|
});
|
|
|
break;
|
|
|
- case 8: //// 变更记录
|
|
|
+ case 7: //// 变更记录
|
|
|
registerColumn('table_pcweb_someprice_detail_change', []);
|
|
|
- queryResultLoadingAndInfo(QueryChangeLog, loading, { RelatedId: relatedid }).then((res) => {
|
|
|
+ queryResultLoadingAndInfo(QueryChangeLog, loading, { RelatedId: spotcontractid }).then((res) => {
|
|
|
tableList.value = res;
|
|
|
});
|
|
|
break;
|
|
|
- case 9: //// 关联记录
|
|
|
+ case 8: //// 关联记录
|
|
|
columns.value.length = 0;
|
|
|
columns.value.push(...columnsPaTradeLink);
|
|
|
queryResultLoadingAndInfo(QueryPaTradeLinkDetail, loading).then((res) => {
|
|
|
- tableList.value = res;
|
|
|
+ // 关联日期降序
|
|
|
+ tableList.value = res.sort((a, b) => moment(b.tradetime).valueOf() - moment(a.tradetime).valueOf());
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
|
@@ -217,10 +209,10 @@ export default defineComponent({
|
|
|
tableList,
|
|
|
activeKey,
|
|
|
columns,
|
|
|
- getApplyStatusName,
|
|
|
+ getApplyStatusName,
|
|
|
getReceiptName,
|
|
|
InOutTypeName,
|
|
|
- invoiceStatusName,
|
|
|
+ invoiceStatusName,
|
|
|
stateName,
|
|
|
};
|
|
|
},
|