Browse Source

QMS功能添加

master
shenzhouyu 5 months ago
parent
commit
646cfde7b5
  1. 35
      src/api/qc/qc.js
  2. 144
      src/views/modules/qc/FAIResultEntry.vue
  3. 144
      src/views/modules/qc/FQCResultEntry.vue
  4. 144
      src/views/modules/qc/IPQCResultEntry.vue
  5. 121
      src/views/modules/qc/IQCResultEntry.vue
  6. 3529
      src/views/modules/qc/OQCResultEntry.vue
  7. 2
      src/views/modules/qc/PQCResultEntry.vue
  8. 107
      src/views/modules/qc/SQCResultEntry.vue
  9. 2
      src/views/modules/qc/com_qc_itemImage_upload_file.vue
  10. 126
      src/views/modules/qc/patrol_config_upload.vue
  11. 8
      src/views/modules/qc/qcItem.vue
  12. 1056
      src/views/modules/qc/qcPartAttribute.vue

35
src/api/qc/qc.js

@ -82,8 +82,17 @@ export const saveAttributeDetailed = data => createAPI(`/pms/qc/saveAttributeDet
export const uploadPartAttributeExcel = data => createAPI(`/pms/qc/uploadPartAttributeExcel`,'post',data)
export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescList`,'post',data)
export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data)
export const getCustomerList = data => createAPI(`/pms/qc/getCustomerList`,'post',data)
export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data)
export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data)
// IPQC 巡检特殊配置(按工序)
export const getPatrolConfigList = data => createAPI(`/pms/qc/getPatrolConfigList`, 'post', data)
export const savePatrolConfig = data => createAPI(`/pms/qc/savePatrolConfig`, 'post', data)
export const updatePatrolConfig = data => createAPI(`/pms/qc/updatePatrolConfig`, 'post', data)
export const deletePatrolConfig = data => createAPI(`/pms/qc/deletePatrolConfig`, 'post', data)
export const getPatrolOperationDescList = data => createAPI(`/pms/qc/getPatrolOperationDescList`, 'post', data)
export const patrolConfigUpload = data => createAPI(`/pms/qc/patrolConfigUpload`, 'post', data)
export const overLoadSearchPartInfo = data => createAPI(`/pms/qc/overLoadSearchPartInfo`,'post',data)
export const partAttrDetailedSearch = data => createAPI(`/pms/qc/partAttrDetailedSearch`,'post',data)
export const getPartAttrItemList = data => createAPI(`/pms/qc/getPartAttrItemList`,'post',data)
@ -249,6 +258,32 @@ export const goUpItemQC = data => createAPI(`/pms/qc/goUpItemQC`,'post',data)
export const goDownItemQC = data => createAPI(`/pms/qc/goDownItemQC`,'post',data)
export const cancelApproval2 = data => createAPI(`/pms/qc/cancelApproval2`,'post',data)
// ===================================== OQC / FQAS(OQCResultEntry) =====================================
export const qcOQCInspectionSearch = data => createAPI(`/pms/qc/qcOQCInspectionSearch`,'post',data)
export const fqasDetailSearch = data => createAPI(`/pms/qc/fqasDetailSearch`,'post',data)
export const selectFQASSubDetailedRecord = data => createAPI(`/pms/qc/selectFQASSubDetailedRecord`,'post',data)
export const saveFQASDetailedRecord = data => createAPI(`/pms/qc/saveFQASDetailedRecord`,'post',data)
export const checkFQASIsSubmit = data => createAPI(`/pms/qc/checkFQASIsSubmit`,'post',data)
export const saveFQASSubDetailed = data => createAPI(`/pms/qc/saveFQASSubDetailed`,'post',data)
export const saveFQASSubmitResult = data => createAPI(`/pms/qc/saveFQASSubmitResult`,'post',data)
export const cancelFQASSubmitResult = data => createAPI(`/pms/qc/cancelFQASSubmitResult`,'post',data)
export const fqasRecordDelete = data => createAPI(`/pms/qc/fqasRecordDelete`,'post',data)
export const fqasRecordOverLoad = data => createAPI(`/pms/qc/fqasRecordOverLoad`,'post',data)
export const actionFQASInspection = data => createAPI(`/pms/qc/actionFQASInspection`,'post',data)
export const changeInspectionWay = data => createAPI(`/pms/qc/changeInspectionWay`,'post',data)
export const getFileContentList2 = data => createAPI('sys/file/getFileContentList2','post',data)
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 getUserRoleList = data => createAPI(`/pms/qc/getUserRoleList`,'post',data)
export const getOperatorList = data => createAPI(`/pms/qc/getOperatorList`,'post',data)
export const searchQcSopFileList = data => createAPI(`/pms/qc/searchQcSopFileList`,'post',data)
export const downloadSopFile = sopUrl => createAPI(`/pms/qc/downloadSopFile?sopUrl=${encodeURIComponent(sopUrl)}`,'post', 777)
export const getOQCItemList = data => createAPI(`/pms/qc/getOQCItemList`,'post',data)
export const addOQCItemDetails = data => createAPI(`/pms/qc/addOQCItemDetails`,'post',data)
export const deleteOQCItemDetails = data => createAPI(`/pms/qc/deleteOQCItemDetails`,'post',data)
export const getOQCTemplateList = data => createAPI(`/pms/qc/getOQCTemplateList`,'post',data)
export const importOQCTemplateItems = data => createAPI(`/pms/qc/importOQCTemplateItems`,'post',data)
// ===================================== SQC取消审核 =====================================
export const cancelSQCApproval = data => createAPI(`/pms/qc/cancelSQCApproval`,'post',data)

144
src/views/modules/qc/FAIResultEntry.vue

@ -144,7 +144,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -451,7 +456,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -520,8 +530,8 @@
</div>
<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 === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</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-footer>
</el-dialog>
@ -574,6 +584,15 @@
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -718,7 +737,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -766,7 +790,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -839,7 +868,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -870,7 +904,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -1748,6 +1787,24 @@ export default {
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table2ObjectDesc',
tableId: "301006Table2",
tableName: "检验单明细表",
columnProp: 'pictureFlag',
headerAlign: "center",
align: "center",
columnLabel: '图片是否必填',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301007,
@ -3320,17 +3377,31 @@ export default {
// 上传项目图片
uploadImageModal (row) {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'FAIItemImageFile'
const openImage = () => {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'FAIItemImageFile'
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
})
}
//打开组件 去做新增业务
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
if (this.detailData.state !== '待检验') {
openImage()
return
}
if (this.detailData.passQty > this.detailData.rollQty) {
this.$message.warning('合格数量不能大于送检数量!')
return
}
this.saveDetailInformation('1', {
keepDetailOpen: true,
skipSuccessMessage: true,
afterSuccess: openImage
})
},
@ -3472,6 +3543,13 @@ export default {
this.detailData.disposalMeasures = ''
this.detailData.disposalRemark = ''
}
const picRequiredRow = this.detailList.find(
item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
)
if (picRequiredRow) {
this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
return
}
}
if (this.detailData.passQty>this.detailData.rollQty){
this.$message.warning('合格数量不能大于送检数量!')
@ -3481,7 +3559,8 @@ export default {
},
// 新增明细信息
saveDetailInformation (type) {
saveDetailInformation (type, options = {}) {
const keepDetailOpen = options.keepDetailOpen === true
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -3507,13 +3586,28 @@ export default {
saveFAIDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (keepDetailOpen) {
this.getInspectionFormData()
if (!options.skipSuccessMessage) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
} else {
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
if (typeof options.afterSuccess === 'function') {
options.afterSuccess()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

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

@ -144,7 +144,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -431,7 +436,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -500,8 +510,8 @@
</div>
<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 === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</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-footer>
</el-dialog>
@ -632,7 +642,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -680,7 +695,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -753,6 +773,15 @@
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -810,7 +839,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -841,7 +875,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -1718,6 +1757,24 @@
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table2ObjectDesc',
tableId: "301006Table2",
tableName: "检验单明细表",
columnProp: 'pictureFlag',
headerAlign: "center",
align: "center",
columnLabel: '图片是否必填',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301015,
@ -3284,17 +3341,31 @@
// 上传项目图片
uploadImageModal (row) {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'FQCItemImageFile'
const openImage = () => {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'FQCItemImageFile'
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
})
}
//打开组件 去做新增业务
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
if (this.detailData.state !== '待检验') {
openImage()
return
}
if (this.detailData.passQty > this.detailData.rollQty) {
this.$message.warning('合格数量不能大于送检数量!')
return
}
this.saveDetailInformation('1', {
keepDetailOpen: true,
skipSuccessMessage: true,
afterSuccess: openImage
})
},
@ -3436,6 +3507,13 @@
this.detailData.disposalMeasures = ''
this.detailData.disposalRemark = ''
}
const picRequiredRow = this.detailList.find(
item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
)
if (picRequiredRow) {
this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
return
}
}
if (this.detailData.passQty>this.detailData.rollQty){
this.$message.warning('合格数量不能大于送检数量!')
@ -3445,7 +3523,8 @@
},
// 新增明细信息
saveDetailInformation (type) {
saveDetailInformation (type, options = {}) {
const keepDetailOpen = options.keepDetailOpen === true
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -3471,13 +3550,28 @@
saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (keepDetailOpen) {
this.getInspectionFormData()
if (!options.skipSuccessMessage) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
} else {
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
if (typeof options.afterSuccess === 'function') {
options.afterSuccess()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

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

@ -148,7 +148,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -443,7 +448,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -512,8 +522,8 @@
</div>
<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 === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</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-footer>
</el-dialog>
@ -643,6 +653,15 @@
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -710,7 +729,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -758,7 +782,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -831,7 +860,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -862,7 +896,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -1763,6 +1802,24 @@
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table2ObjectDesc',
tableId: "301006Table2",
tableName: "检验单明细表",
columnProp: 'pictureFlag',
headerAlign: "center",
align: "center",
columnLabel: '图片是否必填',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301014,
@ -2951,17 +3008,31 @@
// 上传项目图片
uploadImageModal (row) {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'IPQCItemImageFile'
const openImage = () => {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'IPQCItemImageFile'
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
})
}
//打开组件 去做新增业务
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
if (this.detailData.state !== '待检验') {
openImage()
return
}
if (this.detailData.passQty > this.detailData.rollQty) {
this.$message.warning('合格数量不能大于送检数量!')
return
}
this.saveDetailInformation('1', {
keepDetailOpen: true,
skipSuccessMessage: true,
afterSuccess: openImage
})
},
@ -3512,6 +3583,13 @@
this.detailData.disposalMeasures = ''
this.detailData.disposalRemark = ''
}
const picRequiredRow = this.detailList.find(
item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
)
if (picRequiredRow) {
this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
return
}
}
if (this.detailData.passQty>this.detailData.rollQty){
this.$message.warning('合格数量不能大于送检数量!')
@ -3521,7 +3599,8 @@
},
// 新增明细信息
saveDetailInformation (type) {
saveDetailInformation (type, options = {}) {
const keepDetailOpen = options.keepDetailOpen === true
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -3547,13 +3626,28 @@
saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (keepDetailOpen) {
this.getInspectionFormData()
if (!options.skipSuccessMessage) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
} else {
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
if (typeof options.afterSuccess === 'function') {
options.afterSuccess()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

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

@ -165,7 +165,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -355,7 +360,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -424,8 +434,8 @@
</div>
<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 === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</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-footer>
</el-dialog>
@ -702,7 +712,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -732,7 +747,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -1605,6 +1625,24 @@
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table2ObjectDesc',
tableId: "301006Table2",
tableName: "检验单明细表",
columnProp: 'pictureFlag',
headerAlign: "center",
align: "center",
columnLabel: '图片是否必填',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
@ -2422,17 +2460,31 @@
// 上传项目图片
uploadImageModal (row) {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'IQCItemImageFile'
const openImage = () => {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'IQCItemImageFile'
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
})
}
//打开组件 去做新增业务
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
if (this.detailData.state !== '待检验') {
openImage()
return
}
if (this.detailData.passQty > this.detailData.rollQty) {
this.$message.warning('合格数量不能大于送检数量!')
return
}
this.saveDetailInformation('1', {
keepDetailOpen: true,
skipSuccessMessage: true,
afterSuccess: openImage
})
},
@ -2542,6 +2594,13 @@
this.detailData.disposalMeasures = ''
this.detailData.disposalRemark = ''
}
const picRequiredRow = this.detailList.find(
item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
)
if (picRequiredRow) {
this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
return
}
}
if (this.detailData.passQty>this.detailData.rollQty){
this.$message.warning('合格数量不能大于送检数量!')
@ -2551,7 +2610,8 @@
},
// 新增明细信息
saveDetailInformation (type) {
saveDetailInformation (type, options = {}) {
const keepDetailOpen = options.keepDetailOpen === true
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -2580,13 +2640,28 @@
saveIQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (keepDetailOpen) {
this.getInspectionFormData()
if (!options.skipSuccessMessage) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
} else {
this.detailInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
}
if (typeof options.afterSuccess === 'function') {
options.afterSuccess()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

3529
src/views/modules/qc/OQCResultEntry.vue
File diff suppressed because it is too large
View File

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

@ -625,8 +625,8 @@
</div>
<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 === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</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-footer>
</el-dialog>

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

@ -148,7 +148,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -311,7 +316,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -379,9 +389,9 @@
</el-table>
</div>
<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 === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</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 v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
</el-footer>
</el-dialog>
@ -506,7 +516,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -534,7 +549,12 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">
<template v-if="item.columnProp === 'pictureFlag'">
<span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
</template>
<template v-else>{{ scope.row[item.columnProp] }}</template>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
@ -1410,6 +1430,24 @@
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table2ObjectDesc',
tableId: "301006Table2",
tableName: "检验单明细表",
columnProp: 'pictureFlag',
headerAlign: "center",
align: "center",
columnLabel: '图片是否必填',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301015,
@ -1824,6 +1862,13 @@
this.detailData.disposalMeasures = ''
this.detailData.disposalRemark = ''
}
const picRequiredRow = this.detailList.find(
item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
)
if (picRequiredRow) {
this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
return
}
}
if (this.detailData.passQty > this.detailData.rollQty) {
this.$message.warning('合格数量不能大于送检数量!')
@ -1831,7 +1876,8 @@
}
this.saveDetailInformation(type)
},
saveDetailInformation (type) {
saveDetailInformation (type, options = {}) {
const keepDetailOpen = options.keepDetailOpen === true
this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -1856,8 +1902,18 @@
saveSQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailInformationFlag = false
this.$message.success('操作成功')
if (keepDetailOpen) {
this.getInspectionFormData()
if (!options.skipSuccessMessage) {
this.$message.success('操作成功')
}
} else {
this.detailInformationFlag = false
this.$message.success('操作成功')
}
if (typeof options.afterSuccess === 'function') {
options.afterSuccess()
}
} else {
this.$message.warning((data && data.msg) || '操作失败')
}
@ -2162,16 +2218,31 @@
}
},
uploadImageModal (row) {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'SQCItemImageFile'
const openImage = () => {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'SQCItemImageFile'
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
})
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
if (this.detailData.state !== '待检验') {
openImage()
return
}
if (this.detailData.passQty > this.detailData.rollQty) {
this.$message.warning('合格数量不能大于送检数量!')
return
}
this.saveDetailInformation('1', {
keepDetailOpen: true,
skipSuccessMessage: true,
afterSuccess: openImage
})
},
inspectorSearch () {

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

@ -155,7 +155,7 @@ export default {
// 清空文件上传记录
this.$refs.uploadFile.clearFiles()
// 刷新报工的页面
//this.$emit('refreshPageTables2')
this.$emit('refreshPageTables2')
// 关闭当前的页面
this.visible = false
},

126
src/views/modules/qc/patrol_config_upload.vue

@ -0,0 +1,126 @@
<template>
<div class="customer-css">
<el-dialog title="巡检配置导入" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-button type="primary" @click="downloadFile()">下载文件模板</el-button>
<el-row>
<el-col :span="24">
<el-upload class="customer-upload" drag action="javascript:void(0);" ref="uploadFile" :limit="1" accept=".xlsx,.xls"
:before-upload="beforeUploadHandle" :on-change="onChange" :auto-upload="false" style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveUploadFile()">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
patrolConfigUpload,
queryFileId
} from '@/api/qc/qc.js'
import { downLoadObjectFile } from '@/api/eam/eam_object_list.js'
export default {
data () {
return {
visible: false,
fileList: [],
pageData: {
site: '',
buNo: '',
partNo: ''
}
}
},
methods: {
init (currentRow) {
this.pageData = JSON.parse(JSON.stringify(currentRow))
this.visible = true
},
beforeUploadHandle (file) {
let extName = file[0].name.substring(file[0].name.lastIndexOf('.')).toLowerCase()
if (!(extName === '.xlsx' || extName === '.xls')) {
this.$message.error('数据导入失败,请选择正确的xlsx模板文件')
return false
}
},
onChange (file) {
this.fileList.push(file)
},
closeDialog () {
this.fileList = []
this.visible = false
},
saveUploadFile () {
if (this.fileList == null || this.fileList.length === 0) {
this.$message.error('请先上传文件!')
return false
}
const formData = new FormData()
formData.append('file', this.fileList[0].raw)
formData.append('site', this.pageData.site)
formData.append('buNo', this.pageData.buNo)
formData.append('partNo', this.pageData.partNo)
patrolConfigUpload(formData).then(({ data }) => {
if (data.code === 0) {
this.$message.success(data.msg)
this.$refs.uploadFile.clearFiles()
this.fileList = []
this.visible = false
this.$emit('refreshPatrolConfig')
} else {
let message = (data.msg || '').split(';')
this.$alert(message[0] + '<br/>' + (message[1] || ''), '导入失败', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true
})
}
}).catch(() => {
this.$message.error('导入失败,请检查文件格式和内容')
})
},
async downloadFile () {
let file = {
id: 0,
fileName: ''
}
let tempData = {
orderRef1: 'qc',
orderRef2: 'patrolConfigUpload'
}
await queryFileId(tempData).then(({ data }) => {
if (data && data.code === 0) {
file.id = data.data.id
file.fileName = data.data.fileName
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
await downLoadObjectFile(file).then(({ data }) => {
const blob = new Blob([data], { type: 'application/octet-stream' })
const fileName = file.fileName
const linkNode = document.createElement('a')
linkNode.download = fileName
linkNode.style.display = 'none'
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
linkNode.click()
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
}
}
}
</script>
<style scoped lang="scss">
</style>

8
src/views/modules/qc/qcItem.vue

@ -194,9 +194,9 @@
<el-form-item label="抽样比例%">
<el-input v-model="modalData.defaultSamplingProportion" type="number" style="width: 143px"></el-input>
</el-form-item>
<!-- <el-form-item label=" " style="margin-left: 30px">-->
<!-- <el-checkbox v-model="modalData.collectionFlag" true-label="Y">采集标记</el-checkbox>-->
<!-- </el-form-item>-->
<el-form-item label=" " style="margin-left: 30px">
<el-checkbox v-model="modalData.pictureFlag" true-label="Y">需上传图片</el-checkbox>
</el-form-item>
</el-form>
<!-- <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="采集数据来源">-->
@ -1272,6 +1272,7 @@
samplingLevelNo: '',
samplingLevelDesc: '',
defaultSamplingProportion: '',
pictureFlag:'N',
collectionFlag: '',
collectionSource: '',
collectionSourceList: [],
@ -1313,6 +1314,7 @@
samplingLevelNo: row.samplingLevelNo,
samplingLevelDesc: row.samplingLevelDesc,
defaultSamplingProportion: row.defaultSamplingProportion,
pictureFlag: row.pictureFlag,
collectionFlag: row.collectionFlag,
collectionSource: row.collectionSource,
collectionSourceList: row.collectionSource == null || row.collectionSource === '' ? [] : row.collectionSource.split(','),

1056
src/views/modules/qc/qcPartAttribute.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save