|
|
|
@ -228,6 +228,7 @@ |
|
|
|
<el-table-column label="操作" fixed="right" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a @click="openOneKeyDialog('edit', scope.row)" v-if="scope.row.proofingNo && scope.row.proofingStatus !== '打样完成'">修改</a> |
|
|
|
<a class="action-link detail-link" @click="openOneKeyDialog('detail', scope.row)" v-if="scope.row.proofingNo && scope.row.proofingStatus === '打样完成'">详情</a> |
|
|
|
<a class="action-link delete-link" v-if="scope.row.proofingNo && scope.row.proofingStatus === '草稿'" @click="deleteProof(scope.row)">删除</a> |
|
|
|
<!-- <a class="action-link end-link" v-if="scope.row.proofingNo && scope.row.proofingStatus === '进行中'" @click="finishProof(scope.row)">打样完成</a>--> |
|
|
|
</template> |
|
|
|
@ -432,8 +433,8 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog :title="oneKeyDialogMode === 'edit' ? '修改项目/物料/打样' : '一键创建项目/物料/打样'" :visible.sync="oneKeyDialogVisible" :close-on-click-modal="false" width="1000px"> |
|
|
|
<el-form :model="oneKeyForm" label-position="top" class="one-key-grid-form"> |
|
|
|
<el-dialog :title="oneKeyDialogTitle" :visible.sync="oneKeyDialogVisible" :close-on-click-modal="false" width="1000px"> |
|
|
|
<el-form :model="oneKeyForm" label-position="top" :class="['one-key-grid-form', { 'one-key-grid-form--detail': isOneKeyDetailMode }]"> |
|
|
|
<el-row :gutter="16"> |
|
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('buNo')"> |
|
|
|
<el-form-item label="BU" required> |
|
|
|
@ -778,8 +779,8 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height: 40px; margin-top: 40px; text-align: center"> |
|
|
|
<el-button @click="oneKeyDialogVisible = false">取消</el-button> |
|
|
|
<el-button type="primary" :loading="saveOneKeyLoading" @click="submitOneKey">{{ oneKeyDialogMode === 'edit' ? '保存修改' : '保存' }}</el-button> |
|
|
|
<el-button @click="oneKeyDialogVisible = false">{{ isOneKeyDetailMode ? '关闭' : '取消' }}</el-button> |
|
|
|
<el-button v-if="!isOneKeyDetailMode" type="primary" :loading="saveOneKeyLoading" @click="submitOneKey">{{ oneKeyDialogMode === 'edit' ? '保存修改' : '保存' }}</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -1595,6 +1596,18 @@ export default { |
|
|
|
const visibleColumns = this.processColumns.filter(item => visibleCodes.indexOf(item.code) > -1) |
|
|
|
return visibleColumns.length > 0 ? visibleColumns : this.processColumns |
|
|
|
}, |
|
|
|
isOneKeyDetailMode () { |
|
|
|
return this.oneKeyDialogMode === 'detail' |
|
|
|
}, |
|
|
|
oneKeyDialogTitle () { |
|
|
|
if (this.oneKeyDialogMode === 'edit') { |
|
|
|
return '修改项目/物料/打样' |
|
|
|
} |
|
|
|
if (this.oneKeyDialogMode === 'detail') { |
|
|
|
return '项目/物料/打样详情' |
|
|
|
} |
|
|
|
return '一键创建项目/物料/打样' |
|
|
|
}, |
|
|
|
oneKeySelectedApplyOption () { |
|
|
|
const selectedApplyNo = this.oneKeyForm && !this.isBlankValue(this.oneKeyForm.proofingNo) |
|
|
|
? String(this.oneKeyForm.proofingNo).trim() |
|
|
|
@ -4052,7 +4065,7 @@ export default { |
|
|
|
}, |
|
|
|
handleOneKeyProofingNoChange (proofingNo) { |
|
|
|
const selectedNo = this.isBlankValue(proofingNo) ? '' : String(proofingNo).trim() |
|
|
|
if (this.oneKeyDialogMode === 'edit') { |
|
|
|
if (this.oneKeyDialogMode !== 'create') { |
|
|
|
// 修改模式下预计完成日期以数据库已存值为准,不跟随打样单号自动回填/清空。 |
|
|
|
if (!selectedNo) { |
|
|
|
this.oneKeyForm.proofingNo = '' |
|
|
|
@ -4741,9 +4754,10 @@ export default { |
|
|
|
return form |
|
|
|
}, |
|
|
|
openOneKeyDialog (mode, row) { |
|
|
|
const dialogMode = mode === 'edit' ? 'edit' : 'create' |
|
|
|
const dialogMode = mode === 'edit' ? 'edit' : (mode === 'detail' ? 'detail' : 'create') |
|
|
|
this.oneKeyDialogMode = dialogMode |
|
|
|
if (dialogMode !== 'edit') { |
|
|
|
const actionText = dialogMode === 'detail' ? '查看详情' : '修改' |
|
|
|
if (dialogMode === 'create') { |
|
|
|
this.oneKeyProofingApplyQueryToken += 1 |
|
|
|
this.oneKeyProofingApplyLoading = false |
|
|
|
this.oneKeyProofingApplyOptions = [] |
|
|
|
@ -4765,13 +4779,13 @@ export default { |
|
|
|
} |
|
|
|
const current = this.getActionRow(row) |
|
|
|
if (!current) { |
|
|
|
this.$message.warning('请先选择一条记录后再修改项目/物料/打样') |
|
|
|
this.$message.warning(`请先选择一条记录后再${actionText}项目/物料/打样`) |
|
|
|
this.oneKeyDialogMode = 'create' |
|
|
|
return |
|
|
|
} |
|
|
|
const projectPartId = this.getTrackingProjectPartId(current) |
|
|
|
if (!current.projectId || !projectPartId || !current.trackingId) { |
|
|
|
this.$message.warning('当前记录缺少项目/物料/打样关键信息,无法修改') |
|
|
|
this.$message.warning(`当前记录缺少项目/物料/打样关键信息,无法${actionText}`) |
|
|
|
this.oneKeyDialogMode = 'create' |
|
|
|
return |
|
|
|
} |
|
|
|
@ -4805,10 +4819,10 @@ export default { |
|
|
|
const projectRows = (projectData.page && projectData.page.list) || [] |
|
|
|
const partRows = (partData.page && partData.page.list) || [] |
|
|
|
if (projectRows.length === 0) { |
|
|
|
throw new Error('未找到对应的项目信息,无法修改') |
|
|
|
throw new Error(`未找到对应的项目信息,无法${actionText}`) |
|
|
|
} |
|
|
|
if (partRows.length === 0) { |
|
|
|
throw new Error('未找到对应的项目物料信息,无法修改') |
|
|
|
throw new Error(`未找到对应的项目物料信息,无法${actionText}`) |
|
|
|
} |
|
|
|
this.oneKeyForm = this.buildOneKeyEditForm(current, projectRows[0], partRows[0]) |
|
|
|
this.snapshotOneKeyProjectRoles(projectRows[0]) |
|
|
|
@ -5919,6 +5933,10 @@ export default { |
|
|
|
padding: 0 8px; |
|
|
|
} |
|
|
|
|
|
|
|
.one-key-grid-form--detail { |
|
|
|
pointer-events: none; |
|
|
|
} |
|
|
|
|
|
|
|
.one-key-grid-form .el-form-item { |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
|