|
|
|
@ -36,6 +36,14 @@ |
|
|
|
:style="{ top: contextMenuTop + 'px', left: contextMenuLeft + 'px' }" |
|
|
|
:style="{ top: contextMenuTop + 'px', left: contextMenuLeft + 'px' }" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="context-menu"> |
|
|
|
<div class="context-menu"> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
link |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="handleCopyNode" |
|
|
|
|
|
|
|
v-if="contextTreeNode && contextTreeNode.level === 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
复制 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
link |
|
|
|
link |
|
|
|
type="danger" |
|
|
|
type="danger" |
|
|
|
@ -163,7 +171,6 @@ |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
@change="processChange(scope.row, scope.$index)" |
|
|
|
@change="processChange(scope.row, scope.$index)" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in processSetOption" |
|
|
|
v-for="(item, index) in processSetOption" |
|
|
|
:key="index" |
|
|
|
:key="index" |
|
|
|
@ -499,6 +506,7 @@ import { |
|
|
|
} from '@/api/processManagement/taskProcessing'; |
|
|
|
} from '@/api/processManagement/taskProcessing'; |
|
|
|
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; |
|
|
|
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; |
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
|
|
|
|
import {craftBatchCopy} from '@/api/processManagement/procepssPlanning'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'CraftIndex', |
|
|
|
name: 'CraftIndex', |
|
|
|
components: {}, |
|
|
|
components: {}, |
|
|
|
@ -981,7 +989,7 @@ export default { |
|
|
|
return { |
|
|
|
return { |
|
|
|
...processInfo, |
|
|
|
...processInfo, |
|
|
|
id: generateId('process', processInfo.id, processInfo.processNo), |
|
|
|
id: generateId('process', processInfo.id, processInfo.processNo), |
|
|
|
label: processInfo.processNo+'-'+processInfo.processName, |
|
|
|
label: processInfo.processNo + '-' + processInfo.processName, |
|
|
|
level: 3, |
|
|
|
level: 3, |
|
|
|
rawData: { |
|
|
|
rawData: { |
|
|
|
processInfo, |
|
|
|
processInfo, |
|
|
|
@ -992,7 +1000,7 @@ export default { |
|
|
|
// ✅ 子节点(项目) |
|
|
|
// ✅ 子节点(项目) |
|
|
|
children: (projectList || []).map(project => ({ |
|
|
|
children: (projectList || []).map(project => ({ |
|
|
|
id: generateId('project', project.id, project.projectCode), |
|
|
|
id: generateId('project', project.id, project.projectCode), |
|
|
|
label: project.trialNo+'-'+project.projectName || '未知项目', |
|
|
|
label: project.trialNo + '-' + project.projectName || '未知项目', |
|
|
|
level: 4, |
|
|
|
level: 4, |
|
|
|
disabled: true, |
|
|
|
disabled: true, |
|
|
|
rawData: project, |
|
|
|
rawData: project, |
|
|
|
@ -1093,6 +1101,7 @@ export default { |
|
|
|
this.contextNodeData = null; |
|
|
|
this.contextNodeData = null; |
|
|
|
this.contextTreeNode = null; |
|
|
|
this.contextTreeNode = null; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 工艺右键删除 |
|
|
|
async handleDeleteNode() { |
|
|
|
async handleDeleteNode() { |
|
|
|
if (!this.contextTreeNode) { |
|
|
|
if (!this.contextTreeNode) { |
|
|
|
this.closeContextMenu(); |
|
|
|
this.closeContextMenu(); |
|
|
|
@ -1121,6 +1130,39 @@ export default { |
|
|
|
this.closeContextMenu(); |
|
|
|
this.closeContextMenu(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 工艺右键 复制 |
|
|
|
|
|
|
|
handleCopyNode() { |
|
|
|
|
|
|
|
if (!this.contextTreeNode) { |
|
|
|
|
|
|
|
this.closeContextMenu(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const node = this.contextTreeNode; |
|
|
|
|
|
|
|
this.$prompt('请输入零件号', '提示', { |
|
|
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/, |
|
|
|
|
|
|
|
inputErrorMessage: '零件号正确', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(({ value }) => { |
|
|
|
|
|
|
|
let query = { |
|
|
|
|
|
|
|
craftId: node.data.id, |
|
|
|
|
|
|
|
partCode: value, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(9999999, node.data.id); |
|
|
|
|
|
|
|
craftBatchCopy(query).then(res => { |
|
|
|
|
|
|
|
this.$message.success('复制成功'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'info', |
|
|
|
|
|
|
|
message: '取消输入', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 右侧tab切换 |
|
|
|
// 右侧tab切换 |
|
|
|
handleClick(value) { |
|
|
|
handleClick(value) { |
|
|
|
@ -1181,7 +1223,7 @@ export default { |
|
|
|
_tempId: this.tempId, // 临时唯一标识 |
|
|
|
_tempId: this.tempId, // 临时唯一标识 |
|
|
|
id: null, |
|
|
|
id: null, |
|
|
|
processNo: this.getProcessNo(this.form1.tableData1), |
|
|
|
processNo: this.getProcessNo(this.form1.tableData1), |
|
|
|
isMain:'0' |
|
|
|
isMain: '0', |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.activeName == '2') { |
|
|
|
if (this.activeName == '2') { |
|
|
|
@ -1195,11 +1237,13 @@ export default { |
|
|
|
let trialNo_ = ''; |
|
|
|
let trialNo_ = ''; |
|
|
|
if (this.treeNodes.children.length <= 0) { |
|
|
|
if (this.treeNodes.children.length <= 0) { |
|
|
|
trialNo_ = this.treeNodes.processNo; |
|
|
|
trialNo_ = this.treeNodes.processNo; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
let projectInfo = this.treeNodes.children.filter(item => item.rawData.projectName.indexOf('尺寸检测')>-1); |
|
|
|
let projectInfo = this.treeNodes.children.filter( |
|
|
|
if(projectInfo.length>0){ |
|
|
|
item => item.rawData.projectName.indexOf('尺寸检测') > -1 |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (projectInfo.length > 0) { |
|
|
|
trialNo_ = projectInfo[0].rawData.trialNo; |
|
|
|
trialNo_ = projectInfo[0].rawData.trialNo; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
trialNo_ = this.treeNodes.processNo; |
|
|
|
trialNo_ = this.treeNodes.processNo; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|