|
|
@ -8,6 +8,7 @@ |
|
|
<el-select v-model="searchData.taskType" clearable placeholder="全部" style="width: 120px"> |
|
|
<el-select v-model="searchData.taskType" clearable placeholder="全部" style="width: 120px"> |
|
|
<el-option label="线缆自制" value="线缆自制"></el-option> |
|
|
<el-option label="线缆自制" value="线缆自制"></el-option> |
|
|
<el-option label="COP自制" value="COP自制"></el-option> |
|
|
<el-option label="COP自制" value="COP自制"></el-option> |
|
|
|
|
|
<el-option label="其他" value="其他"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="类别"> |
|
|
<el-form-item label="类别"> |
|
|
@ -73,7 +74,7 @@ |
|
|
<el-table-column prop="projectNo" label="项目号" width="140" align="center"></el-table-column> |
|
|
<el-table-column prop="projectNo" label="项目号" width="140" align="center"></el-table-column> |
|
|
<el-table-column prop="taskType" label="任务类型" width="100" align="center"> |
|
|
<el-table-column prop="taskType" label="任务类型" width="100" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tag :type="scope.row.taskType === '线缆自制' ? 'primary' : 'success'" size="small">{{ scope.row.taskType }}</el-tag> |
|
|
|
|
|
|
|
|
<el-tag :type="getTaskTypeTagType(scope.row.taskType)" size="small">{{ scope.row.taskType }}</el-tag> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="category" label="类别" width="90" align="center"></el-table-column> |
|
|
<el-table-column prop="category" label="类别" width="90" align="center"></el-table-column> |
|
|
@ -177,7 +178,7 @@ |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<el-dialog :title="saveHeaderData.orderNo ? '修改线缆/COP自制任务单' : '新增线缆/COP自制任务单'" :visible.sync="setUp.reviewFlag" width="550px" :close-on-click-modal="false" v-drag> |
|
|
|
|
|
|
|
|
<el-dialog :title="saveHeaderData.orderNo ? '修改部件自制任务单' : '新增部件自制任务单'" :visible.sync="setUp.reviewFlag" width="550px" :close-on-click-modal="false" v-drag> |
|
|
<el-form |
|
|
<el-form |
|
|
ref="editForm" |
|
|
ref="editForm" |
|
|
:model="saveHeaderData" |
|
|
:model="saveHeaderData" |
|
|
@ -185,7 +186,7 @@ |
|
|
class="edit-form"> |
|
|
class="edit-form"> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"><el-form-item label="项目号" required><el-input v-model="saveHeaderData.projectNo" :disabled="isDateOnlyEditMode()"></el-input></el-form-item></el-col> |
|
|
<el-col :span="12"><el-form-item label="项目号" required><el-input v-model="saveHeaderData.projectNo" :disabled="isDateOnlyEditMode()"></el-input></el-form-item></el-col> |
|
|
<el-col :span="12"><el-form-item label="任务类型" required><el-select v-model="saveHeaderData.taskType" style="width: 100%" :disabled="isDateOnlyEditMode()"><el-option label="线缆自制" value="线缆自制"></el-option><el-option label="COP自制" value="COP自制"></el-option></el-select></el-form-item></el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12"><el-form-item label="任务类型" required><el-select v-model="saveHeaderData.taskType" style="width: 100%" :disabled="isDateOnlyEditMode()"><el-option label="线缆自制" value="线缆自制"></el-option><el-option label="COP自制" value="COP自制"></el-option><el-option label="其他" value="其他"></el-option></el-select></el-form-item></el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
@ -412,8 +413,15 @@ export default { |
|
|
const status = String(this.saveHeaderData.status || '').trim() |
|
|
const status = String(this.saveHeaderData.status || '').trim() |
|
|
return !!this.saveHeaderData.orderNo && !!status && status !== '已排产' |
|
|
return !!this.saveHeaderData.orderNo && !!status && status !== '已排产' |
|
|
}, |
|
|
}, |
|
|
|
|
|
getTaskTypeTagType(taskType) { |
|
|
|
|
|
if (taskType === '线缆自制') return 'primary' |
|
|
|
|
|
if (taskType === 'COP自制') return 'success' |
|
|
|
|
|
if (taskType === '其他' || taskType === '其它') return 'info' |
|
|
|
|
|
return 'warning' |
|
|
|
|
|
}, |
|
|
getExpectedNodeCodeByTaskType(taskType) { |
|
|
getExpectedNodeCodeByTaskType(taskType) { |
|
|
const text = (taskType || '').trim() |
|
|
const text = (taskType || '').trim() |
|
|
|
|
|
if (text.includes('其他') || text.includes('其它')) return 'otherProduction' |
|
|
if (text.includes('线缆')) return 'lineProduction' |
|
|
if (text.includes('线缆')) return 'lineProduction' |
|
|
if (text.toUpperCase().includes('COP')) return 'copProduction' |
|
|
if (text.toUpperCase().includes('COP')) return 'copProduction' |
|
|
return '' |
|
|
return '' |
|
|
@ -422,6 +430,7 @@ export default { |
|
|
const nodeCode = this.getExpectedNodeCodeByTaskType(taskType) |
|
|
const nodeCode = this.getExpectedNodeCodeByTaskType(taskType) |
|
|
if (nodeCode === 'lineProduction') return '线缆生产' |
|
|
if (nodeCode === 'lineProduction') return '线缆生产' |
|
|
if (nodeCode === 'copProduction') return 'COP生产' |
|
|
if (nodeCode === 'copProduction') return 'COP生产' |
|
|
|
|
|
if (nodeCode === 'otherProduction') return '其他' |
|
|
return '' |
|
|
return '' |
|
|
}, |
|
|
}, |
|
|
getDefaultNodeListByTaskType(taskType) { |
|
|
getDefaultNodeListByTaskType(taskType) { |
|
|
@ -430,7 +439,8 @@ export default { |
|
|
if (!nodeCode || !nodeName) { |
|
|
if (!nodeCode || !nodeName) { |
|
|
return [ |
|
|
return [ |
|
|
{ nodeCode: 'lineProduction', nodeName: '线缆生产', status: '未开始' }, |
|
|
{ nodeCode: 'lineProduction', nodeName: '线缆生产', status: '未开始' }, |
|
|
{ nodeCode: 'copProduction', nodeName: 'COP生产', status: '未开始' } |
|
|
|
|
|
|
|
|
{ nodeCode: 'copProduction', nodeName: 'COP生产', status: '未开始' }, |
|
|
|
|
|
{ nodeCode: 'otherProduction', nodeName: '其他', status: '未开始' } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
return [{ nodeCode: nodeCode, nodeName: nodeName, status: '未开始' }] |
|
|
return [{ nodeCode: nodeCode, nodeName: nodeName, status: '未开始' }] |
|
|
@ -577,8 +587,8 @@ export default { |
|
|
if (row.action && row.action !== '报工完成') { |
|
|
if (row.action && row.action !== '报工完成') { |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
const codeSet = ['lineProduction', 'copProduction'] |
|
|
|
|
|
const nameSet = ['线缆生产', 'COP生产'] |
|
|
|
|
|
|
|
|
const codeSet = ['lineProduction', 'copProduction', 'otherProduction'] |
|
|
|
|
|
const nameSet = ['线缆生产', 'COP生产', '其他'] |
|
|
const nodeCode = String(row.nodeCode || '').trim() |
|
|
const nodeCode = String(row.nodeCode || '').trim() |
|
|
const nodeName = String(row.nodeName || '').replace(/\s+/g, '') |
|
|
const nodeName = String(row.nodeName || '').replace(/\s+/g, '') |
|
|
return codeSet.includes(nodeCode) || nameSet.some(item => item.replace(/\s+/g, '') === nodeName) |
|
|
return codeSet.includes(nodeCode) || nameSet.some(item => item.replace(/\s+/g, '') === nodeName) |
|
|
@ -848,7 +858,7 @@ export default { |
|
|
this.$message.error(errorMsg) |
|
|
this.$message.error(errorMsg) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
const fileName = this.resolveExportFileName(response, '线缆COP任务单') |
|
|
|
|
|
|
|
|
const fileName = this.resolveExportFileName(response, '部件任务单') |
|
|
this.downloadExportFile(response.data, fileName) |
|
|
this.downloadExportFile(response.data, fileName) |
|
|
this.$message.success('导出成功') |
|
|
this.$message.success('导出成功') |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
|