|
|
|
@ -27,7 +27,7 @@ import { |
|
|
|
import PriceCheckProperties from "../quotation/priceCheckProperties.vue"; |
|
|
|
import ApprovalInformation from "../changeManagement/approvalInformation.vue"; |
|
|
|
import {getPriceCheckPropertiesList} from "../../../api/quotation/priceCheckProperties"; |
|
|
|
import {getApprovalList, getNodeAuthority, checkSuperAdmin} from "../../../api/changeManagement/changeManagement"; |
|
|
|
import {getApprovalList, getNodeAuthority, checkSuperAdmin, closeProcess} from "../../../api/changeManagement/changeManagement"; |
|
|
|
import QuoteGroupDetail from "./detail/quoteGroupDetail.vue"; |
|
|
|
import {submitChange} from "../../../api/quote/quote"; |
|
|
|
import {queryQuoteDetail} from "../../../api/quote/quoteDetail"; |
|
|
|
@ -537,6 +537,7 @@ export default { |
|
|
|
filterVisible:false, |
|
|
|
isFilterSearch: false, |
|
|
|
filterSearchData: {}, |
|
|
|
quoteSelections: [], |
|
|
|
currentQuote:{ |
|
|
|
|
|
|
|
}, |
|
|
|
@ -663,6 +664,38 @@ export default { |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
this.quoteSelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
handleCloseProcess() { |
|
|
|
const approvedRows = this.quoteSelections.filter(row => row.status === '审批中') |
|
|
|
if (approvedRows.length === 0) { |
|
|
|
this.$message.warning('请勾选状态为"审批中"的单据!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm(`确定关闭这 ${approvedRows.length} 条销售报价的OA流程?关闭后状态将变为"草稿"。`, '流程关闭', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
closeProcess({ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
documentNos: approvedRows.map(row => row.quoteVersionNo), |
|
|
|
documentType: 'QUOTE' |
|
|
|
}).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('流程关闭成功') |
|
|
|
this.handleSearch() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
this.$message.error(err.message || '流程关闭失败') |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
handleSearch(index){ |
|
|
|
let params = { |
|
|
|
...this.quoteForm, |
|
|
|
@ -1603,7 +1636,7 @@ export default { |
|
|
|
<i v-if="exportLoading" class="el-icon-loading"></i> |
|
|
|
<span>{{ '导出' }}</span> |
|
|
|
</download-excel> |
|
|
|
<quote-search v-if="isMenu" v-model:quote="quoteForm" :node-options="nodeOptions" @filterSearch="filterVisible = true" @search="handleSearch" @save="handleSave"></quote-search> |
|
|
|
<quote-search v-if="isMenu" v-model:quote="quoteForm" :node-options="nodeOptions" @filterSearch="filterVisible = true" @search="handleSearch" @save="handleSave" @closeProcess="handleCloseProcess"></quote-search> |
|
|
|
<quote-table v-loading="searchLoading" |
|
|
|
:current-row="currentQuote" |
|
|
|
:columns="columns" |
|
|
|
@ -1616,6 +1649,7 @@ export default { |
|
|
|
@queryById="handleQueryById" |
|
|
|
@againQuote="handleAgainQuote" |
|
|
|
@editStatus="handleEditStatus" |
|
|
|
@selectionChange="handleSelectionChange" |
|
|
|
:data-list="dataList" |
|
|
|
:issue-loading="submitLoading" |
|
|
|
:height="height"> |
|
|
|
|