|
|
@@ -1,56 +1,56 @@
|
|
|
<template>
|
|
|
- <!-- 采购合同: 新增合同-已完结合同-->
|
|
|
- <div class="spot-contract-not-commit" :loading="loading">
|
|
|
- <filterCustomTable @search="updateColumn">
|
|
|
- <mtp-table-button :buttons="firstBtn" @click="openComponent" />
|
|
|
- </filterCustomTable>
|
|
|
- <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ record }">
|
|
|
- <mtp-table-button class="btn-list-sticky" :buttons="secondBtn" :record="record" @click="openComponent" />
|
|
|
- </template>
|
|
|
- <template #biztype="{ text }">
|
|
|
- <a>{{ getBizTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
- <template #pricetype="{ text }">
|
|
|
- <span>{{ getPriceTypeName(text) }}</span>
|
|
|
- </template>
|
|
|
- <template #contracctstatus="{ text }">
|
|
|
- <a>{{ getContractStatusName(text) }}</a>
|
|
|
- </template>
|
|
|
- <template #contracttype="{ text }">
|
|
|
- <a>{{ getContractTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
- <!-- 对手方 -->
|
|
|
- <template #negative="{ record }">
|
|
|
- <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
|
|
|
- </template>
|
|
|
- <!-- 点假期 -->
|
|
|
- <template #startdate="{ record }">
|
|
|
- <span>{{ formatValue(formatTime(record.startdate, 'd') + '--' + formatTime(record.enddate, 'd')) }}</span>
|
|
|
- </template>
|
|
|
- <!-- 交收期 -->
|
|
|
- <template #deliverystartdate="{ record }">
|
|
|
- <span>{{ formatValue(formatTime(record.deliverystartdate, 'd') + '--' + formatTime(record.deliveryenddate, 'd')) }}</span>
|
|
|
- </template>
|
|
|
- <!-- 业务员 -->
|
|
|
- <template #saleuserid="{ record }">
|
|
|
- <span>{{ findManagerName(record.saleuserid) }}</span>
|
|
|
- </template>
|
|
|
- <!-- 跟单员 -->
|
|
|
- <template #meruserid="{ record }">
|
|
|
- <span>{{ findManagerName(record.meruserid) }}</span>
|
|
|
- </template>
|
|
|
- <!-- 合同量 -->
|
|
|
- <template #qty="{ text, record }">
|
|
|
- <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <!-- 右键 -->
|
|
|
- <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="secondBtn"> </contextMenu>
|
|
|
- <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
|
|
|
- </div>
|
|
|
+ <!-- 采购合同: 新增合同-已完结合同-->
|
|
|
+ <div class="spot-contract-not-commit" :loading="loading">
|
|
|
+ <filterCustomTable @search="updateColumn">
|
|
|
+ <mtp-table-button :buttons="firstBtn" @click="openComponent" />
|
|
|
+ </filterCustomTable>
|
|
|
+ <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ record }">
|
|
|
+ <mtp-table-button class="btn-list-sticky" :buttons="secondBtn" :record="record" @click="openComponent" />
|
|
|
+ </template>
|
|
|
+ <template #biztype="{ text }">
|
|
|
+ <a>{{ getBizTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #pricetype="{ text }">
|
|
|
+ <span>{{ getPriceTypeName(text) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #contracctstatus="{ text }">
|
|
|
+ <a>{{ getContractStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #contracttype="{ text }">
|
|
|
+ <a>{{ getContractTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 对手方 -->
|
|
|
+ <template #negative="{ record }">
|
|
|
+ <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 点假期 -->
|
|
|
+ <template #startdate="{ record }">
|
|
|
+ <span>{{ formatValue(formatTime(record.startdate, 'd') + '--' + formatTime(record.enddate, 'd')) }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 交收期 -->
|
|
|
+ <template #deliverystartdate="{ record }">
|
|
|
+ <span>{{ formatValue(formatTime(record.deliverystartdate, 'd') + '--' + formatTime(record.deliveryenddate, 'd')) }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 业务员 -->
|
|
|
+ <template #saleuserid="{ record }">
|
|
|
+ <span>{{ findManagerName(record.saleuserid) }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 跟单员 -->
|
|
|
+ <template #meruserid="{ record }">
|
|
|
+ <span>{{ findManagerName(record.meruserid) }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 合同量 -->
|
|
|
+ <template #qty="{ text, record }">
|
|
|
+ <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- 右键 -->
|
|
|
+ <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="secondBtn"> </contextMenu>
|
|
|
+ <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -89,23 +89,32 @@ export default defineComponent({
|
|
|
switch (routeName) {
|
|
|
// 新增合同
|
|
|
case 'purchase_contract':
|
|
|
- queryTable(QuerySpotContract, { contracttype: 1 });
|
|
|
+ queryTable(QuerySpotContract, { contracttype: 1, querytype: '1,2' });
|
|
|
break;
|
|
|
// 已完结合同
|
|
|
case 'purchase_finish':
|
|
|
- queryTable(QuerySpotContract, { contracttype: 1, querytype: 4 });
|
|
|
+ queryTable(QuerySpotContract, { contracttype: 1, querytype: '4' });
|
|
|
break;
|
|
|
}
|
|
|
// 获取 业务账户
|
|
|
queryBusinessManager();
|
|
|
};
|
|
|
|
|
|
+ // function handleButton(item: Ermcp3ContractRsp) {
|
|
|
+ // const { contracctstatus } = item;
|
|
|
+ // if (['']) {
|
|
|
+ // return btnList;
|
|
|
+ // } else {
|
|
|
+ // return btnList.filter((e) => e.code === 'detail');
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
// 表格通用逻辑
|
|
|
const param: ComposeTableParam = {
|
|
|
queryFn: queryTableAction,
|
|
|
menuType: EnumRouterName.spot_contract_unsubmitted,
|
|
|
tableName: 'table_pcweb_delivery',
|
|
|
- tableFilterKey: ['contracttype', 'pricetype', 'contractno'],
|
|
|
+ tableFilterKey: ['pricetype', 'contractno'],
|
|
|
tableFilterCB,
|
|
|
isDetail: true,
|
|
|
};
|