Browse Source

赫艾修改

master
shenzhouyu 3 days ago
parent
commit
f6760263f7
  1. 1
      src/api/qc/qc.js
  2. 4
      src/views/modules/qc/FQCResultEntry.vue
  3. 4
      src/views/modules/qc/IPQCResultEntry.vue
  4. 4
      src/views/modules/qc/IQCResultEntry.vue
  5. 4
      src/views/modules/qc/OQCResultEntry.vue
  6. 4
      src/views/modules/qc/SQCResultEntry.vue
  7. 209
      src/views/modules/qc/qcPartAttribute.vue
  8. 2
      src/views/modules/qc/qcTemplate.vue

1
src/api/qc/qc.js

@ -274,6 +274,7 @@ export const fqasRecordOverLoad = data => createAPI(`/pms/qc/fqasRecordOverLoad`
export const actionFQASInspection = data => createAPI(`/pms/qc/actionFQASInspection`,'post',data) export const actionFQASInspection = data => createAPI(`/pms/qc/actionFQASInspection`,'post',data)
export const changeInspectionWay = data => createAPI(`/pms/qc/changeInspectionWay`,'post',data) export const changeInspectionWay = data => createAPI(`/pms/qc/changeInspectionWay`,'post',data)
export const getFileContentList2 = data => createAPI('sys/file/getFileContentList2','post',data) export const getFileContentList2 = data => createAPI('sys/file/getFileContentList2','post',data)
export const getPartAttributeFileList = data => createAPI('sys/file/getPartAttributeFileList','post',data)
export const downLoadObjectFile = data => createAPI(`pms/eamObject/downLoadObjectFile?id=`+data.id,'post',777) export const downLoadObjectFile = data => createAPI(`pms/eamObject/downLoadObjectFile?id=`+data.id,'post',777)
export const deleteObjectFile = data => createAPI(`/pms/qc/deleteObjectFile`,'post',data) export const deleteObjectFile = data => createAPI(`/pms/qc/deleteObjectFile`,'post',data)
export const getUserRoleList = data => createAPI(`/pms/qc/getUserRoleList`,'post',data) export const getUserRoleList = data => createAPI(`/pms/qc/getUserRoleList`,'post',data)

4
src/views/modules/qc/FQCResultEntry.vue

@ -512,9 +512,9 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
<el-button type="primary" @click="detailInformationFlag=false">关闭</el-button> <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('2')">最终检验完成</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>

4
src/views/modules/qc/IPQCResultEntry.vue

@ -524,9 +524,9 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
<el-button type="primary" @click="detailInformationFlag=false">关闭</el-button> <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('2')">最终检验完成</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>

4
src/views/modules/qc/IQCResultEntry.vue

@ -427,9 +427,9 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
<el-button type="primary" @click="detailInformationFlag=false">关闭</el-button> <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('2')">最终检验完成</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>

4
src/views/modules/qc/OQCResultEntry.vue

@ -376,9 +376,9 @@
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
<el-button type="primary" @click="detailInformationFlag=false">关闭</el-button> <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('2')">最终检验完成</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>

4
src/views/modules/qc/SQCResultEntry.vue

@ -389,9 +389,9 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
<el-button type="primary" @click="detailInformationFlag=false">关闭</el-button> <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('2')">最终检验完成</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>

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

@ -30,6 +30,31 @@
<el-form-item :label="'类别名称'"> <el-form-item :label="'类别名称'">
<el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input> <el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="IQC">
<el-select v-model="searchData.iqcFlag" placeholder="全部" clearable style="width: 90px">
<el-option v-for="item in maintainStatusOptions" :key="'iqc-' + item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="IPQC">
<el-select v-model="searchData.ipqcFlag" placeholder="全部" clearable style="width: 90px">
<el-option v-for="item in maintainStatusOptions" :key="'ipqc-' + item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="FQC">
<el-select v-model="searchData.fqcFlag" placeholder="全部" clearable style="width: 90px">
<el-option v-for="item in maintainStatusOptions" :key="'fqc-' + item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="OQC">
<el-select v-model="searchData.oqcFlag" placeholder="全部" clearable style="width: 90px">
<el-option v-for="item in maintainStatusOptions" :key="'oqc-' + item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="SQC">
<el-select v-model="searchData.sqcFlag" placeholder="全部" clearable style="width: 90px">
<el-option v-for="item in maintainStatusOptions" :key="'sqc-' + item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button> <el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
<el-button v-if="!authSave" type="primary" @click="addModal()">新增</el-button> <el-button v-if="!authSave" type="primary" @click="addModal()">新增</el-button>
@ -71,7 +96,10 @@
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden"> <span v-if="!item.columnHidden">
<span v-if="columnsProp.includes(item.columnProp)">{{ scope.row[`${item.columnProp}Desc`] }}</span>
<span v-if="maintainFlagProps.includes(item.columnProp)">
<el-tag :type="isMaintained(scope.row[item.columnProp]) ? 'success' : 'info'" size="small">{{ scope.row[item.columnProp] }}</el-tag>
</span>
<span v-else-if="columnsProp.includes(item.columnProp)">{{ scope.row[`${item.columnProp}Desc`] }}</span>
<span v-else> <span v-else>
{{ scope.row[item.columnProp] }} {{ scope.row[item.columnProp] }}
</span> </span>
@ -520,7 +548,7 @@
<el-form-item :label="'物料名称'"> <el-form-item :label="'物料名称'">
<el-input v-model="standardDetailData.partDesc" readonly style="width: 240px"></el-input> <el-input v-model="standardDetailData.partDesc" readonly style="width: 240px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="检验类型">
<!-- <el-form-item label="检验类型">
<el-select v-model="standardDetailData.inspectionTypeNo" @change="syncStandardInspectionTypeName" placeholder="请选择" style="width: 160px"> <el-select v-model="standardDetailData.inspectionTypeNo" @change="syncStandardInspectionTypeName" placeholder="请选择" style="width: 160px">
<el-option <el-option
v-for="i in options" v-for="i in options"
@ -529,9 +557,10 @@
:value="i.inspectionTypeNo"> :value="i.inspectionTypeNo">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-form-item> -->
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="standardAddFastModal()">新增</el-button>
<!-- <el-button type="primary" @click="standardAddFastModal()">新增</el-button> -->
<el-button type="primary" @click="standardSyncFromTemplate()">同步检验项目</el-button>
<!-- <el-button type="primary" @click="standardGoUp()">上移</el-button> <!-- <el-button type="primary" @click="standardGoUp()">上移</el-button>
<el-button type="primary" @click="standardGoDown()">下移</el-button> --> <el-button type="primary" @click="standardGoDown()">下移</el-button> -->
</el-form-item> </el-form-item>
@ -874,7 +903,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="downloadFile(scope.row)">下载</a> <a @click="downloadFile(scope.row)">下载</a>
<a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
<a v-if="scope.row.orderReftype !== 'AttachmentList'" type="text" size="small" @click="deleteFile(scope.row)">删除</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -1036,17 +1065,19 @@
addPartAttrItemDetails, addPartAttrItemDetails,
delPartAttrItemDetails, delPartAttrItemDetails,
savePartAttrDetailed, savePartAttrDetailed,
syncPartAttrDetailedFromTemplate,
goUpPartAttrItem, goUpPartAttrItem,
goDownPartAttrItem, goDownPartAttrItem,
getPatrolConfigList as fetchPatrolConfigListApi, getPatrolConfigList as fetchPatrolConfigListApi,
savePatrolConfig as savePatrolConfigApi, savePatrolConfig as savePatrolConfigApi,
updatePatrolConfig as updatePatrolConfigApi, updatePatrolConfig as updatePatrolConfigApi,
deletePatrolConfig as deletePatrolConfigApi, deletePatrolConfig as deletePatrolConfigApi,
getPatrolOperationDescList as getPatrolOperationDescListApi
getPatrolOperationDescList as getPatrolOperationDescListApi,
getPartAttributeFileList
} 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'
import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'
import {downLoadObjectFile} from '@/api/eam/eam_object_list.js'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
import {deleteObjectFile} from '@/api/eam/eam.js' import {deleteObjectFile} from '@/api/eam/eam.js'
import qcUpload from "./qc_upload" import qcUpload from "./qc_upload"
@ -1062,6 +1093,7 @@
data () { data () {
return { return {
columnsProp:['createBy', 'updateBy'], columnsProp:['createBy', 'updateBy'],
maintainFlagProps: ['iqcFlag', 'ipqcFlag', 'fqcFlag', 'oqcFlag', 'sqcFlag'],
// //
favorite: false, favorite: false,
// start // start
@ -1093,6 +1125,11 @@
familyID: '', familyID: '',
familyName: '', familyName: '',
buDesc: '', buDesc: '',
iqcFlag: '',
ipqcFlag: '',
fqcFlag: '',
oqcFlag: '',
sqcFlag: '',
attributeType: 'A', attributeType: 'A',
page: 1, page: 1,
limit: 10, limit: 10,
@ -1397,6 +1434,96 @@
fixed: '', fixed: '',
columnWidth: 100, columnWidth: 100,
}, },
{
userId: this.$store.state.user.name,
functionId: 301003,
serialNumber: '301003Table1IqcFlag',
tableId: "301003Table1",
tableName: "物料属性设置表",
columnProp: 'iqcFlag',
headerAlign: "center",
align: "center",
columnLabel: 'IQC',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 301003,
serialNumber: '301003Table1IpqcFlag',
tableId: "301003Table1",
tableName: "物料属性设置表",
columnProp: 'ipqcFlag',
headerAlign: "center",
align: "center",
columnLabel: 'IPQC',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 301003,
serialNumber: '301003Table1FqcFlag',
tableId: "301003Table1",
tableName: "物料属性设置表",
columnProp: 'fqcFlag',
headerAlign: "center",
align: "center",
columnLabel: 'FQC',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 301003,
serialNumber: '301003Table1OqcFlag',
tableId: "301003Table1",
tableName: "物料属性设置表",
columnProp: 'oqcFlag',
headerAlign: "center",
align: "center",
columnLabel: 'OQC',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 301003,
serialNumber: '301003Table1SqcFlag',
tableId: "301003Table1",
tableName: "物料属性设置表",
columnProp: 'sqcFlag',
headerAlign: "center",
align: "center",
columnLabel: 'SQC',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
// { // {
// userId: this.$store.state.user.name, // userId: this.$store.state.user.name,
// functionId: 301003, // functionId: 301003,
@ -1939,6 +2066,12 @@
}, },
computed: { computed: {
maintainStatusOptions () {
return [
{ label: '已维护', value: '已维护' },
{ label: '未维护', value: '未维护' }
]
},
detailColumnsBeforeIpqc () { detailColumnsBeforeIpqc () {
const list = Array.isArray(this.columnDetailList) ? this.columnDetailList : [] const list = Array.isArray(this.columnDetailList) ? this.columnDetailList : []
const idx = list.findIndex(i => i.columnProp === 'inspectionTypeName') const idx = list.findIndex(i => i.columnProp === 'inspectionTypeName')
@ -1978,6 +2111,9 @@
}, },
methods: { methods: {
isMaintained (val) {
return val === '已维护'
},
// bu // bu
getSiteAndBuByUserName () { getSiteAndBuByUserName () {
let tempData = { let tempData = {
@ -2788,6 +2924,52 @@
this.standardFastAddFlag = true this.standardFastAddFlag = true
}, },
standardSyncFromTemplate () {
const queryData = {
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo,
attributeType: 'A'
}
searchPartAttributeDetails(queryData).then(({data}) => {
const templates = (data.rows || []).filter(t => t.templateId)
if (templates.length === 0) {
this.$message.warning('没有已维护的检验模板,请先在检验模板清单中维护!')
return
}
const seen = new Set()
const uniqueTemplates = templates.filter(t => {
if (seen.has(t.templateId)) return false
seen.add(t.templateId)
return true
})
this.$confirm(`将根据全部检验类型下 ${uniqueTemplates.length} 个检验模板同步检验项目,已存在的项目将跳过,是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const syncPromises = uniqueTemplates.map(t => syncPartAttrDetailedFromTemplate({
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo,
attributeType: 'A',
templateId: t.templateId,
inspectionTypeNo: t.inspectionTypeNo,
updateBy: this.$store.state.user.name
}))
return Promise.all(syncPromises)
}).then((results) => {
const failed = (results || []).filter(r => r && r.data && r.data.code !== 0)
if (failed.length > 0) {
this.$alert((failed[0].data && failed[0].data.msg) || '部分模板同步失败', '错误', { confirmButtonText: '确定' })
} else {
this.$message.success('同步成功')
}
this.standardRefreshDetailList()
}).catch(() => {})
})
},
standardGetItem () { standardGetItem () {
this.syncStandardInspectionTypeName() this.syncStandardInspectionTypeName()
getPartAttrItem(this.standardDetailData).then(({data}) => { getPartAttrItem(this.standardDetailData).then(({data}) => {
@ -3312,7 +3494,7 @@
orderRef3:this.sopData.inspectionTypeNo, orderRef3:this.sopData.inspectionTypeNo,
orderRef4: this.sopData.buNo, orderRef4: this.sopData.buNo,
} }
getFileContentList(tempData).then(({data}) => {
getPartAttributeFileList(tempData).then(({data}) => {
if (data && data.code === 200) { if (data && data.code === 200) {
this.sopList = data.rows this.sopList = data.rows
} else { } else {
@ -3341,6 +3523,17 @@
// //
downloadFile (row) { downloadFile (row) {
if (row.orderReftype === 'AttachmentList') {
const linkNode = document.createElement('a')
linkNode.href = this.$store.state.user.padSopUrl + row.url
linkNode.download = row.fileName
linkNode.target = '_blank'
linkNode.style.display = 'none'
document.body.appendChild(linkNode)
linkNode.click()
document.body.removeChild(linkNode)
return
}
downLoadObjectFile(row).then(({data}) => { downLoadObjectFile(row).then(({data}) => {
// //
const blob = new Blob([data], {type: "application/octet-stream"}) const blob = new Blob([data], {type: "application/octet-stream"})

2
src/views/modules/qc/qcTemplate.vue

@ -162,7 +162,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="检验周期(h)">
<el-form-item label="检验完成时间(h)">
<el-input v-model="modalData.inspectionCycle" type="number" style="width: 143px"></el-input> <el-input v-model="modalData.inspectionCycle" type="number" style="width: 143px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="默认抽样数量"> <el-form-item label="默认抽样数量">

Loading…
Cancel
Save