|
|
@ -332,7 +332,9 @@ |
|
|
<el-table-column type="selection" width="50" align="center"></el-table-column> |
|
|
<el-table-column type="selection" width="50" align="center"></el-table-column> |
|
|
<el-table-column prop="operationDesc" label="工序" header-align="center" align="left" min-width="150"> |
|
|
<el-table-column prop="operationDesc" label="工序" header-align="center" align="left" min-width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-input v-model="scope.row.operationDesc" size="small" placeholder="请输入工序"></el-input> |
|
|
|
|
|
|
|
|
<el-select v-model="scope.row.operationDesc" size="small" placeholder="请选择工序" filterable clearable style="width: 100%"> |
|
|
|
|
|
<el-option v-for="item in operationDescList" :key="item" :label="item" :value="item"></el-option> |
|
|
|
|
|
</el-select> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="firstInspectionDuration" label="首次巡检时长(h)" header-align="center" align="right" width="140"> |
|
|
<el-table-column prop="firstInspectionDuration" label="首次巡检时长(h)" header-align="center" align="right" width="140"> |
|
|
@ -362,6 +364,7 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center"> |
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="batchSavePatrolConfig" :loading="patrolConfigSaveLoading">保存</el-button> |
|
|
<el-button @click="patrolConfigDialogFlag = false">关闭</el-button> |
|
|
<el-button @click="patrolConfigDialogFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -428,8 +431,22 @@ |
|
|
:min-width="item.columnWidth" |
|
|
:min-width="item.columnWidth" |
|
|
:label="item.columnLabel"> |
|
|
:label="item.columnLabel"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
|
|
|
<!-- IPQC检验方式特殊处理:批量编辑时且检验类型为IPQC(101)时显示下拉框 --> |
|
|
|
|
|
<template v-if="item.columnProp === 'ipqcInspectionMethod'"> |
|
|
|
|
|
<span v-if="editBatchVisible && scope.row.inspectionTypeNo === '101'"> |
|
|
|
|
|
<el-select v-model="scope.row.ipqcInspectionMethod" placeholder="请选择" clearable size="mini" style="width: 100%"> |
|
|
|
|
|
<el-option label="首件检" value="首件检"></el-option> |
|
|
|
|
|
<el-option label="自检" value="自检"></el-option> |
|
|
|
|
|
<el-option label="巡检" value="巡检"></el-option> |
|
|
|
|
|
<el-option label="末件检" value="末件检"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span v-else>{{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else> |
|
|
|
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -1294,6 +1311,7 @@ |
|
|
savePatrolConfig, // 新增巡检特殊配置 |
|
|
savePatrolConfig, // 新增巡检特殊配置 |
|
|
updatePatrolConfig, // 更新巡检特殊配置 |
|
|
updatePatrolConfig, // 更新巡检特殊配置 |
|
|
deletePatrolConfig, // 删除巡检特殊配置 |
|
|
deletePatrolConfig, // 删除巡检特殊配置 |
|
|
|
|
|
getAllOperationDescList, // 查询所有工序列表 |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
@ -1355,6 +1373,8 @@ |
|
|
patrolConfigLoading: false, |
|
|
patrolConfigLoading: false, |
|
|
patrolConfigList: [], |
|
|
patrolConfigList: [], |
|
|
patrolConfigSelections: [], |
|
|
patrolConfigSelections: [], |
|
|
|
|
|
operationDescList: [], // 工序列表 |
|
|
|
|
|
patrolConfigSaveLoading: false, // 批量保存loading |
|
|
modalData: { |
|
|
modalData: { |
|
|
site: '', |
|
|
site: '', |
|
|
bu: '', |
|
|
bu: '', |
|
|
@ -1716,6 +1736,24 @@ |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 100, |
|
|
columnWidth: 100, |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 301003, |
|
|
|
|
|
serialNumber: '301003Table2IpqcInspectionMethod', |
|
|
|
|
|
tableId: "301003Table2", |
|
|
|
|
|
tableName: "检验模板清单表", |
|
|
|
|
|
columnProp: 'ipqcInspectionMethod', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: 'IPQC检验方式', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 120, |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 301003, |
|
|
functionId: 301003, |
|
|
@ -2126,6 +2164,19 @@ |
|
|
openPatrolConfigDialog() { |
|
|
openPatrolConfigDialog() { |
|
|
this.patrolConfigDialogFlag = true |
|
|
this.patrolConfigDialogFlag = true |
|
|
this.getPatrolConfigList() |
|
|
this.getPatrolConfigList() |
|
|
|
|
|
this.loadOperationDescList() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取工序列表 |
|
|
|
|
|
loadOperationDescList() { |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: this.modalData.site |
|
|
|
|
|
} |
|
|
|
|
|
getAllOperationDescList(params).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.operationDescList = data.rows || [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 获取巡检特殊配置列表 |
|
|
// 获取巡检特殊配置列表 |
|
|
@ -2264,6 +2315,68 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 批量保存巡检配置 |
|
|
|
|
|
batchSavePatrolConfig() { |
|
|
|
|
|
if (this.patrolConfigList.length === 0) { |
|
|
|
|
|
this.$message.warning('没有需要保存的数据') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
// 验证数据 |
|
|
|
|
|
for (let i = 0; i < this.patrolConfigList.length; i++) { |
|
|
|
|
|
const item = this.patrolConfigList[i] |
|
|
|
|
|
if (!item.operationDesc) { |
|
|
|
|
|
this.$message.warning(`第${i + 1}行工序不能为空`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.patrolConfigSaveLoading = true |
|
|
|
|
|
let successCount = 0 |
|
|
|
|
|
let errorCount = 0 |
|
|
|
|
|
const promises = this.patrolConfigList.map(row => { |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: row.site, |
|
|
|
|
|
buNo: row.buNo, |
|
|
|
|
|
partNo: row.partNo, |
|
|
|
|
|
operationDesc: row.operationDesc, |
|
|
|
|
|
firstInspectionDuration: row.firstInspectionDuration, |
|
|
|
|
|
nextInspectionDuration: row.nextInspectionDuration, |
|
|
|
|
|
totalInspectionDuration: row.totalInspectionDuration, |
|
|
|
|
|
defaultFlag: row.defaultFlag || 'N' |
|
|
|
|
|
} |
|
|
|
|
|
if (row.isNew) { |
|
|
|
|
|
return savePatrolConfig(params).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
successCount++ |
|
|
|
|
|
row.isNew = false |
|
|
|
|
|
} else { |
|
|
|
|
|
errorCount++ |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
errorCount++ |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
return updatePatrolConfig(params).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
successCount++ |
|
|
|
|
|
} else { |
|
|
|
|
|
errorCount++ |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
errorCount++ |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
Promise.all(promises).then(() => { |
|
|
|
|
|
this.patrolConfigSaveLoading = false |
|
|
|
|
|
if (errorCount === 0) { |
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning(`保存完成,成功${successCount}条,失败${errorCount}条`) |
|
|
|
|
|
} |
|
|
|
|
|
this.getPatrolConfigList() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 获取用户的bu |
|
|
// 获取用户的bu |
|
|
getSiteAndBuByUserName () { |
|
|
getSiteAndBuByUserName () { |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
|