Browse Source

2026-01-12

master
fengyuan_yang 9 hours ago
parent
commit
c05756a311
  1. 1
      src/api/qc/qc.js
  2. 119
      src/views/modules/qc/qcPartAttribute.vue
  3. 30
      src/views/modules/yieldReport/com_separate_roll.vue

1
src/api/qc/qc.js

@ -91,6 +91,7 @@ export const getPatrolConfigList = data => createAPI(`/pms/qc/getPatrolConfigLis
export const savePatrolConfig = data => createAPI(`/pms/qc/savePatrolConfig`,'post',data) export const savePatrolConfig = data => createAPI(`/pms/qc/savePatrolConfig`,'post',data)
export const updatePatrolConfig = data => createAPI(`/pms/qc/updatePatrolConfig`,'post',data) export const updatePatrolConfig = data => createAPI(`/pms/qc/updatePatrolConfig`,'post',data)
export const deletePatrolConfig = data => createAPI(`/pms/qc/deletePatrolConfig`,'post',data) export const deletePatrolConfig = data => createAPI(`/pms/qc/deletePatrolConfig`,'post',data)
export const getAllOperationDescList = data => createAPI(`/pms/qc/getAllOperationDescList`,'post',data)
export const updateLabelTemplate = data => createAPI(`/pms/qc/updateLabelTemplate`,'post',data) export const updateLabelTemplate = data => createAPI(`/pms/qc/updateLabelTemplate`,'post',data)
// ===================================== FAI检验 ===================================== // ===================================== FAI检验 =====================================

119
src/views/modules/qc/qcPartAttribute.vue

@ -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 = {

30
src/views/modules/yieldReport/com_separate_roll.vue

@ -120,9 +120,9 @@
</div> </div>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="checkCreateSeparateRolllBun">产量报告</el-button>
<el-button type="success" @click="saveShiftChangeTransfer">换班结转</el-button>
<el-button type="warning" @click="executeAbnormalRollCut">异常截卷</el-button>
<el-button type="primary" @click="checkCreateSeparateRolllBun" :loading="yieldReportLoading">产量报告</el-button>
<el-button type="success" @click="saveShiftChangeTransfer" :loading="shiftChangeLoading">换班结转</el-button>
<el-button type="warning" @click="executeAbnormalRollCut" :loading="abnormalCutLoading">异常截卷</el-button>
<el-button @click="closeDialog">{{ buttons.closeButton }}</el-button> <el-button @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -269,6 +269,10 @@ export default {
return { return {
titleCon: '创建分卷', titleCon: '创建分卷',
showDefault: false, showDefault: false,
// loading
yieldReportLoading: false, // loading
shiftChangeLoading: false, // loading
abnormalCutLoading: false, // loading
scheduleData: { scheduleData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
username: this.$store.state.user.name, username: this.$store.state.user.name,
@ -682,6 +686,9 @@ export default {
return false; return false;
} }
// loading
this.shiftChangeLoading = true;
try { try {
// //
const saveData = { const saveData = {
@ -719,6 +726,8 @@ export default {
} catch (error) { } catch (error) {
console.error('换班结转保存失败:', error); console.error('换班结转保存失败:', error);
this.$message.error('换班结转保存失败:' + error.message); this.$message.error('换班结转保存失败:' + error.message);
} finally {
this.shiftChangeLoading = false;
} }
}, },
@ -760,6 +769,9 @@ export default {
return false; // return false; //
} }
// loading
this.abnormalCutLoading = true;
try { try {
// ========== + ========== // ========== + ==========
// //
@ -892,11 +904,13 @@ export default {
// //
setTimeout(() => { setTimeout(() => {
this.closeDialog(); this.closeDialog();
this.abnormalCutLoading = false;
}, 1000); }, 1000);
} catch (error) { } catch (error) {
console.error('异常截卷操作失败:', error); console.error('异常截卷操作失败:', error);
this.$message.error('异常截卷操作失败:' + error.message); this.$message.error('异常截卷操作失败:' + error.message);
this.abnormalCutLoading = false;
} }
}, },
@ -1182,12 +1196,15 @@ export default {
// this.$message.error(this.labels.rollQtyMustMoreTanZeroAndBeInteger); // this.$message.error(this.labels.rollQtyMustMoreTanZeroAndBeInteger);
// return false; // return false;
// } // }
// loading
this.yieldReportLoading = true;
// //
checkCreateSplitSfdcRoll(this.pageData) checkCreateSplitSfdcRoll(this.pageData)
.then(({data}) => { .then(({data}) => {
// //
if (data.code == 500) { if (data.code == 500) {
this.$message.error(data.msg); this.$message.error(data.msg);
this.yieldReportLoading = false;
} else if (data.resultMap.resultCode == '201') { } else if (data.resultMap.resultCode == '201') {
// //
this.$confirm(data.resultMap.resultMsg, '提示', { this.$confirm(data.resultMap.resultMsg, '提示', {
@ -1197,10 +1214,14 @@ export default {
}).then(() => { }).then(() => {
// //
this.createSeparateRolllOperation(); this.createSeparateRolllOperation();
}).catch(() => {
this.yieldReportLoading = false;
}); });
} else { // } else { //
this.createSeparateRolllOperation(); this.createSeparateRolllOperation();
} }
}).catch(() => {
this.yieldReportLoading = false;
}); });
}, },
@ -1208,6 +1229,7 @@ export default {
async createSeparateRolllOperation() { async createSeparateRolllOperation() {
// //
if (!this.validateRowData()) { if (!this.validateRowData()) {
this.yieldReportLoading = false;
return false return false
} }
@ -1310,10 +1332,12 @@ export default {
setTimeout(() =>{ setTimeout(() =>{
// //
this.closeDialog() this.closeDialog()
this.yieldReportLoading = false;
}, 1000) }, 1000)
} catch (error) { } catch (error) {
this.$message.error('创建分卷失败: ' + error.message) this.$message.error('创建分卷失败: ' + error.message)
this.yieldReportLoading = false;
} }
}, },

Loading…
Cancel
Save