diff --git a/src/api/changeManagement/changeManagement.js b/src/api/changeManagement/changeManagement.js
index 5e85bf0..c5c5b5c 100644
--- a/src/api/changeManagement/changeManagement.js
+++ b/src/api/changeManagement/changeManagement.js
@@ -259,6 +259,13 @@ export const searchDelegateAccess = (data)=> createAPI(`/plm/changeManagement/se
*/
export const updateShowInQueryFlag = data => createAPI(`/plm/changeManagement/updateShowInQueryFlag`,'post',data)
+/**
+ * 流程关闭
+ * @param data
+ * @returns {*}
+ */
+export const closeProcess = data => createAPI(`/plm/changeManagement/closeProcess`,'post',data)
+
diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue
index 445aa45..dc74812 100644
--- a/src/views/modules/changeManagement/changeRecord.vue
+++ b/src/views/modules/changeManagement/changeRecord.vue
@@ -54,6 +54,7 @@
{{ "导出" }}
搜索
+ 流程关闭
@@ -66,7 +67,14 @@
ref="changeTable"
@row-click="changeClickRow"
@current-change="currentChange"
+ @selection-change="selectionChangeHandle"
style="width: 100%;">
+
+
row.changeStatus === '审批中')
+ 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.changeNo),
+ documentType: 'ECN'
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('流程关闭成功')
+ this.getDataList()
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).catch(err => {
+ this.$message.error(err.message || '流程关闭失败')
+ })
+ }).catch(() => {})
+ },
+
// ======== 列表数据刷新方法 ========
// 获取数据列表
diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue
index cdc7ce5..cd38531 100644
--- a/src/views/modules/proofing/requestForProofing.vue
+++ b/src/views/modules/proofing/requestForProofing.vue
@@ -106,6 +106,7 @@
{{ "导出" }}
搜索
+ 流程关闭
@@ -876,7 +877,7 @@ import {
searchDelegateAccess,
searchDelegateAccessByUser, submitChange
} from "../../../api/proofing/proofingInformation";
-import {getNodeAuthority, getApprovalList, checkSuperAdmin} from "../../../api/changeManagement/changeManagement";
+import {getNodeAuthority, getApprovalList, checkSuperAdmin, closeProcess} from "../../../api/changeManagement/changeManagement";
import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
import profingFile from "./profingFile"
import proofingAttribute from "../demoComponents/orderProperties"
@@ -2937,6 +2938,34 @@ export default {
* 复选报价信息
* @param val
*/
+ closeProcessModal() {
+ const approvedRows = this.proofingSelections.filter(row => row.proofingStatus === '审批中')
+ 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.proofingNo),
+ documentType: 'PROOFING'
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('流程关闭成功')
+ this.getDataList()
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).catch(err => {
+ this.$message.error(err.message || '流程关闭失败')
+ })
+ }).catch(() => {})
+ },
+
selectionProofing(val) {
this.proofingSelections = val
this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue
index e47f715..0df9451 100644
--- a/src/views/modules/quotation/requestForQuote.vue
+++ b/src/views/modules/quotation/requestForQuote.vue
@@ -113,6 +113,7 @@
{{ "导出" }}
搜索
+ 流程关闭
@@ -817,7 +818,7 @@ import {projectPartSearchByAnyField, queryProjectByCustomer} from "../../../api/
import OssComponents from "../oss/ossComponents.vue";
import BuSelect from "../base/BuSelect.vue";
import ApprovalInformation from "../changeManagement/approvalInformation.vue";
-import {getApprovalList} from "../../../api/changeManagement/changeManagement";
+import {getApprovalList, closeProcess} from "../../../api/changeManagement/changeManagement";
import CustomerInfo from "./sellForQuotation/customerInfo.vue";
import {isAuth} from "../../../utils";
import FilterSearch from "../../common/filterSearch.vue";
@@ -2782,6 +2783,34 @@ export default {
this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
},
+ closeProcessModal() {
+ const approvedRows = this.quotationSelections.filter(row => row.quotationStatus === '审批中')
+ 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.quotationBatchNo),
+ documentType: 'QUOTATION'
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('流程关闭成功')
+ this.getDataList()
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).catch(err => {
+ this.$message.error(err.message || '流程关闭失败')
+ })
+ }).catch(() => {})
+ },
+
// ======== 询价结果相关方法 ========
/**
* 封装录入方法
diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue
index e8b79a6..fe4bfb9 100644
--- a/src/views/modules/quote/index.vue
+++ b/src/views/modules/quote/index.vue
@@ -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 {
{{ '导出' }}
-
+
diff --git a/src/views/modules/quote/primary/quoteSearch.vue b/src/views/modules/quote/primary/quoteSearch.vue
index 172a8f4..aef9135 100644
--- a/src/views/modules/quote/primary/quoteSearch.vue
+++ b/src/views/modules/quote/primary/quoteSearch.vue
@@ -115,11 +115,12 @@ export default {
-
+
查 询
新 增
搜索
+ 流程关闭
diff --git a/src/views/modules/quote/primary/quoteTable.vue b/src/views/modules/quote/primary/quoteTable.vue
index 1444b36..0857933 100644
--- a/src/views/modules/quote/primary/quoteTable.vue
+++ b/src/views/modules/quote/primary/quoteTable.vue
@@ -29,6 +29,9 @@ export default {
}
},
methods:{
+ handleSelectionChange(val) {
+ this.$emit('selectionChange', val)
+ },
handleRowClick(row, column, event){
if (column.label === '操作'){
return
@@ -110,7 +113,13 @@ export default {
-
+
+
+
{{ '导出' }}
搜索
+ 流程关闭
@@ -88,9 +89,16 @@
border
ref="mainTable"
@row-click="changeData"
+ @selection-change="selectionChangeMainHandle"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%; ">
+
+
row.statusDesc === '审批中')
+ 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.codeNo),
+ documentType: 'BM'
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('流程关闭成功')
+ this.search()
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).catch(err => {
+ this.$message.error(err.message || '流程关闭失败')
+ })
+ }).catch(() => {})
+ },
+
// 下达
issueModal (row) {
this.$confirm(`是否确认下达?`, '提示', {
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index 8bfbc31..9bc52c3 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -116,6 +116,7 @@
{{ "导出" }}
搜索
+ 流程关闭
@@ -1018,7 +1019,7 @@ import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer, queryProjectPart} from "../../../api/project/project";
import OssComponents from "../oss/ossComponents.vue";
import BuSelect from "../base/BuSelect.vue";
-import {getApprovalList} from "../../../api/changeManagement/changeManagement";
+import {getApprovalList, closeProcess} from "../../../api/changeManagement/changeManagement";
import CustomerInfo from "../quotation/sellForQuotation/customerInfo.vue";
import FilterSearch from "../../common/filterSearch.vue";
import {quotationInformationSearchByAnyField} from "../../../api/quotation/quotationInformation";
@@ -3142,6 +3143,34 @@ export default {
* 复选报价信息
* @param val
*/
+ closeProcessModal() {
+ const approvedRows = this.testSelections.filter(row => row.testStatus === '审批中')
+ 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.testNo),
+ documentType: 'TEST'
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('流程关闭成功')
+ this.getDataList()
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).catch(err => {
+ this.$message.error(err.message || '流程关闭失败')
+ })
+ }).catch(() => {})
+ },
+
selectionTest(val) {
this.testSelections = val
this.$refs.selectDiv.setLengthselected(this.testSelections.length)
diff --git a/src/views/modules/tooling/searchToolApply.vue b/src/views/modules/tooling/searchToolApply.vue
index 891476d..98791fd 100644
--- a/src/views/modules/tooling/searchToolApply.vue
+++ b/src/views/modules/tooling/searchToolApply.vue
@@ -71,6 +71,7 @@
{{ '导出' }}
搜索
+ 流程关闭
@@ -80,9 +81,16 @@
border
ref="mainTable"
@row-click="changeData"
+ @selection-change="selectionChangeMainHandle"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%;">
+
+
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.applyNo),
+ documentType: 'TOOL'
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('流程关闭成功')
+ this.search()
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).catch(err => {
+ this.$message.error(err.message || '流程关闭失败')
+ })
+ }).catch(() => {})
+ },
+
// 查询审批信息
getApprovalList() {
if (Object.keys(this.currentRow).length !== 0) {