|
|
@ -45,8 +45,8 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="3"> |
|
|
<el-col :span="3"> |
|
|
<el-form-item label=" "> |
|
|
<el-form-item label=" "> |
|
|
<el-button type="primary" @click="getDataListAll">查 询</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="getDataListAll" :disabled="isBatchEditing">查 询</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="resetQuery" :disabled="isBatchEditing">重置</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -77,10 +77,10 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column fixed="right" header-align="center" align="center" width="180" label="操作"> |
|
|
<el-table-column fixed="right" header-align="center" align="center" width="180" label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-link v-if="!scope.row.isModelFlag" style="cursor: pointer" @click="copyModel(scope.row)">复制</el-link> |
|
|
|
|
|
<el-link style="cursor: pointer" @click="handleUpdate(scope.row)">编辑</el-link> |
|
|
|
|
|
|
|
|
<el-link v-if="!scope.row.isModelFlag" style="cursor: pointer" @click="copyModel(scope.row)" :disabled="isBatchEditing">复制</el-link> |
|
|
|
|
|
<el-link style="cursor: pointer" @click="handleUpdate(scope.row)" :disabled="isBatchEditing">编辑</el-link> |
|
|
<!-- <el-link style="cursor: pointer" v-if="scope.row.partStatus == '0'" @click="updateProjectPartStatus(scope.row)">下达</el-link> --> |
|
|
<!-- <el-link style="cursor: pointer" v-if="scope.row.partStatus == '0'" @click="updateProjectPartStatus(scope.row)">下达</el-link> --> |
|
|
<el-link v-if="!scope.row.isModelFlag" style="cursor: pointer" @click="handleModal(scope.row)">新增模具</el-link> |
|
|
|
|
|
|
|
|
<el-link v-if="!scope.row.isModelFlag" style="cursor: pointer" @click="handleModal(scope.row)" :disabled="isBatchEditing">新增模具</el-link> |
|
|
<!-- <el-link style="cursor: pointer" @click="handleExport(scope.row)">导出</el-link> --> |
|
|
<!-- <el-link style="cursor: pointer" @click="handleExport(scope.row)">导出</el-link> --> |
|
|
<!-- <el-link style="cursor: pointer" @click="deleteProject(scope.row)">删除</el-link> --> |
|
|
<!-- <el-link style="cursor: pointer" @click="deleteProject(scope.row)">删除</el-link> --> |
|
|
</template> |
|
|
</template> |
|
|
@ -90,24 +90,31 @@ |
|
|
<!-- 分页插件 --> |
|
|
<!-- 分页插件 --> |
|
|
<el-pagination style="margin-top: 0px" @size-change="sizeChangeHandle" @current-change="currentChangeHandle" |
|
|
<el-pagination style="margin-top: 0px" @size-change="sizeChangeHandle" @current-change="currentChangeHandle" |
|
|
:current-page="pageIndex" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize" :total="totalPage" |
|
|
:current-page="pageIndex" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize" :total="totalPage" |
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" :disabled="isBatchEditing"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
|
|
|
|
|
|
<el-tabs style="margin-top: 0px; width: 100%; height: 100%;font-size: 14px;" v-model="activeTable" |
|
|
<el-tabs style="margin-top: 0px; width: 100%; height: 100%;font-size: 14px;" v-model="activeTable" |
|
|
class="customer-tab" type="border-card" @tab-click="tabClick"> |
|
|
|
|
|
<el-tab-pane label="项目管理事项" name="projectPartProperty"> |
|
|
|
|
|
|
|
|
class="customer-tab" type="border-card" @tab-click="tabClick" :before-leave="beforeLeaveTab"> |
|
|
|
|
|
<el-tab-pane label="项目管理事项" name="projectPartProperty" |
|
|
|
|
|
:disabled="isBatchEditing && activeTable !== 'projectPartProperty'"> |
|
|
<projectPartModelTable :projectPartModel="projectPartModel" :projectPart="model" |
|
|
<projectPartModelTable :projectPartModel="projectPartModel" :projectPart="model" |
|
|
@partFinished="getProjectPartModelList" :auth-flag="true" :height="'33vh'"></projectPartModelTable> |
|
|
|
|
|
|
|
|
@partFinished="getProjectPartModelList" |
|
|
|
|
|
@batch-edit-change="onBatchEditChange('projectPartProperty', $event)" |
|
|
|
|
|
:auth-flag="true" :height="'33vh'"></projectPartModelTable> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane label="模具开发进度" name="projectPartModel"> |
|
|
|
|
|
|
|
|
<el-tab-pane label="模具开发进度" name="projectPartModel" |
|
|
|
|
|
:disabled="isBatchEditing && activeTable !== 'projectPartModel'"> |
|
|
<ProjectPartModelTableDetail ref="projectPartModelTableDetail" :projectPartModel="projectPartModel" |
|
|
<ProjectPartModelTableDetail ref="projectPartModelTableDetail" :projectPartModel="projectPartModel" |
|
|
@partFinished="getProjectPartModelList" @change="onModelFlagChange" :auth-flag="true" :height="'33vh'"></ProjectPartModelTableDetail> |
|
|
|
|
|
|
|
|
@partFinished="getProjectPartModelList" @change="onModelFlagChange" |
|
|
|
|
|
@batch-edit-change="onBatchEditChange('projectPartModel', $event)" |
|
|
|
|
|
:auth-flag="true" :height="'33vh'"></ProjectPartModelTableDetail> |
|
|
<!-- <oss-components ref="inquiryDocument" label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns" |
|
|
<!-- <oss-components ref="inquiryDocument" label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns" |
|
|
:disabled="false" :orderRef1="model.site" :orderRef2="model.objectId" :rfqNo="model.projectCode" |
|
|
:disabled="false" :orderRef1="model.site" :orderRef2="model.objectId" :rfqNo="model.projectCode" |
|
|
:orderRef5="model.projectId"> |
|
|
:orderRef5="model.projectId"> |
|
|
</oss-components> --> |
|
|
</oss-components> --> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane label="相关文档" name="inquiryDocument"> |
|
|
|
|
|
|
|
|
<el-tab-pane label="相关文档" name="inquiryDocument" |
|
|
|
|
|
:disabled="isBatchEditing && activeTable !== 'inquiryDocument'"> |
|
|
<div style="height: 100%;overflow: auto;"> |
|
|
<div style="height: 100%;overflow: auto;"> |
|
|
<oss-components ref="inquiryDocument" label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns" |
|
|
<oss-components ref="inquiryDocument" label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns" |
|
|
:disabled="false" :orderRef1="model.site" :orderRef2="model.projectPartId" :fileTypeCode="1" :rfqNo="model.projectCode" |
|
|
:disabled="false" :orderRef1="model.site" :orderRef2="model.projectPartId" :fileTypeCode="1" :rfqNo="model.projectCode" |
|
|
@ -147,7 +154,14 @@ export default { |
|
|
}, |
|
|
}, |
|
|
dicts: ['function_project_part_status'], |
|
|
dicts: ['function_project_part_status'], |
|
|
name: 'projectPartIndex', |
|
|
name: 'projectPartIndex', |
|
|
computed: {}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
isBatchEditing() { |
|
|
|
|
|
return !!( |
|
|
|
|
|
(this.batchEditLocks && this.batchEditLocks.projectPartProperty) || |
|
|
|
|
|
(this.batchEditLocks && this.batchEditLocks.projectPartModel) |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
components: { |
|
|
components: { |
|
|
ProjectPartModelTable, |
|
|
ProjectPartModelTable, |
|
|
OssComponents, |
|
|
OssComponents, |
|
|
@ -337,6 +351,13 @@ export default { |
|
|
reviewFlag: false, |
|
|
reviewFlag: false, |
|
|
// 初始页签 |
|
|
// 初始页签 |
|
|
activeTable: 'projectPartProperty', |
|
|
activeTable: 'projectPartProperty', |
|
|
|
|
|
lastActiveTable: 'projectPartProperty', |
|
|
|
|
|
tabRollbacking: false, |
|
|
|
|
|
batchEditLocks: { |
|
|
|
|
|
projectPartProperty: false, |
|
|
|
|
|
projectPartModel: false, |
|
|
|
|
|
}, |
|
|
|
|
|
batchEditLockedTab: '', |
|
|
// ======== 数据对象 ======== |
|
|
// ======== 数据对象 ======== |
|
|
modalData: { |
|
|
modalData: { |
|
|
flag: '', |
|
|
flag: '', |
|
|
@ -687,7 +708,46 @@ export default { |
|
|
|
|
|
|
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
activeTable(newVal, oldVal) { |
|
|
|
|
|
if (this.tabRollbacking) return |
|
|
|
|
|
// 记录上一次可用tab(非批量编辑时) |
|
|
|
|
|
if (!this.isBatchEditing) { |
|
|
|
|
|
this.lastActiveTable = newVal |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 批量编辑中:强制回滚到锁定tab(或上一次tab) |
|
|
|
|
|
const target = this.batchEditLockedTab || oldVal || this.lastActiveTable |
|
|
|
|
|
if (target && newVal !== target) { |
|
|
|
|
|
this.tabRollbacking = true |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消后再切换页签') |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.activeTable = target |
|
|
|
|
|
this.tabRollbacking = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
onBatchEditChange(source, val) { |
|
|
|
|
|
if (!this.batchEditLocks) return |
|
|
|
|
|
this.$set(this.batchEditLocks, source, !!val) |
|
|
|
|
|
if (!!val) { |
|
|
|
|
|
// 进入批量编辑时锁定当前tab |
|
|
|
|
|
this.batchEditLockedTab = this.activeTable |
|
|
|
|
|
} else if (!this.isBatchEditing) { |
|
|
|
|
|
// 全部退出批量编辑后解锁 |
|
|
|
|
|
this.batchEditLockedTab = '' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
beforeLeaveTab(activeName, oldActiveName) { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消后再切换页签') |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
return true |
|
|
|
|
|
}, |
|
|
handleColumnResize(newWidth, oldWidth, column, event) { |
|
|
handleColumnResize(newWidth, oldWidth, column, event) { |
|
|
let inData = this.columnList.filter( |
|
|
let inData = this.columnList.filter( |
|
|
(item) => item.columnProp === column.property |
|
|
(item) => item.columnProp === column.property |
|
|
@ -705,6 +765,10 @@ export default { |
|
|
* @param val |
|
|
* @param val |
|
|
*/ |
|
|
*/ |
|
|
sizeChangeHandle(val) { |
|
|
sizeChangeHandle(val) { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.pageSize = val |
|
|
this.pageSize = val |
|
|
this.pageIndex = 1 |
|
|
this.pageIndex = 1 |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
@ -714,6 +778,10 @@ export default { |
|
|
* @param val |
|
|
* @param val |
|
|
*/ |
|
|
*/ |
|
|
currentChangeHandle(val) { |
|
|
currentChangeHandle(val) { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.pageIndex = val |
|
|
this.pageIndex = val |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
@ -725,6 +793,13 @@ export default { |
|
|
* @param event |
|
|
* @param event |
|
|
*/ |
|
|
*/ |
|
|
tabClick(tab, event) { |
|
|
tabClick(tab, event) { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
// 兜底:有些版本不会触发 before-leave 或 disabled 表现不一致 |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消后再切换页签') |
|
|
|
|
|
const target = this.batchEditLockedTab || this.lastActiveTable |
|
|
|
|
|
if (target) this.activeTable = target |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
// 刷新列表数据 |
|
|
// 刷新列表数据 |
|
|
this.refreshCurrentTabTable() |
|
|
this.refreshCurrentTabTable() |
|
|
}, |
|
|
}, |
|
|
@ -735,6 +810,10 @@ export default { |
|
|
* @param row |
|
|
* @param row |
|
|
*/ |
|
|
*/ |
|
|
projectClickRow(row) { |
|
|
projectClickRow(row) { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.projectCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
this.projectCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
this.model = JSON.parse(JSON.stringify(row)) |
|
|
this.model = JSON.parse(JSON.stringify(row)) |
|
|
@ -747,6 +826,7 @@ export default { |
|
|
* @param oldRow |
|
|
* @param oldRow |
|
|
*/ |
|
|
*/ |
|
|
changeCurrentRow(row, oldRow) { |
|
|
changeCurrentRow(row, oldRow) { |
|
|
|
|
|
if (this.isBatchEditing) return |
|
|
// 判断是否是获取焦点的事件 |
|
|
// 判断是否是获取焦点的事件 |
|
|
if (row) { |
|
|
if (row) { |
|
|
this.projectCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
this.projectCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
@ -764,11 +844,19 @@ export default { |
|
|
* 获取数据列表 |
|
|
* 获取数据列表 |
|
|
*/ |
|
|
*/ |
|
|
getDataListAll() { |
|
|
getDataListAll() { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.searchData1 = null |
|
|
this.searchData1 = null |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getDataList() { |
|
|
getDataList() { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
//console.log(this.searchData1) |
|
|
//console.log(this.searchData1) |
|
|
this.searchData.pageSize = this.pageSize |
|
|
this.searchData.pageSize = this.pageSize |
|
|
this.searchData.pageNo = this.pageIndex |
|
|
this.searchData.pageNo = this.pageIndex |
|
|
@ -1102,6 +1190,10 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
resetQuery() { |
|
|
resetQuery() { |
|
|
|
|
|
if (this.isBatchEditing) { |
|
|
|
|
|
this.$message.warning('批量编辑中,请先保存或取消') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.$set(this.searchData, 'startDate', '') |
|
|
this.$set(this.searchData, 'startDate', '') |
|
|
this.$set(this.searchData, 'endDate', '') |
|
|
this.$set(this.searchData, 'endDate', '') |
|
|
this.resetForm('queryForm') |
|
|
this.resetForm('queryForm') |
|
|
|