Browse Source

刀模修改

master
shenzhouyu 1 month ago
parent
commit
6a19bdad16
  1. 39
      src/views/modules/dm/DMFAIResultEntry.vue
  2. 2
      src/views/modules/dm/DMQcItem.vue
  3. 10
      src/views/modules/dm/DMQcMethod.vue
  4. 14
      src/views/modules/dm/DMQcPartAttribute.vue
  5. 4
      src/views/modules/dm/DMQcTemplate.vue
  6. 4
      src/views/modules/dm/DMResultEntry.vue
  7. 222
      src/views/modules/dm/IQCFileTable.vue
  8. 2
      src/views/modules/dm/dm_SOP_upload_file.vue

39
src/views/modules/dm/DMFAIResultEntry.vue

@ -382,7 +382,7 @@
: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.columnHidden && shouldShowDetailValue(item, scope.row)">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
@ -883,6 +883,7 @@
import comQcItemImageUploadFile from "../qc/com_qc_itemImage_upload_file" import comQcItemImageUploadFile from "../qc/com_qc_itemImage_upload_file"
import subDetailUpload from "../qc/sub_detail_upload"; import subDetailUpload from "../qc/sub_detail_upload";
import QrCode from "../common/QrCode.vue"; import QrCode from "../common/QrCode.vue";
import IqcFileTable from './IQCFileTable.vue'
/*上传文件的組件*/ /*上传文件的組件*/
export default { export default {
components: { components: {
@ -890,7 +891,8 @@
Chooselist, Chooselist,
qcFAIUploadFile, qcFAIUploadFile,
comQcItemImageUploadFile, comQcItemImageUploadFile,
subDetailUpload
subDetailUpload,
IqcFileTable
}, },
computed: { computed: {
templateTableData () { templateTableData () {
@ -1668,7 +1670,7 @@
fixed: '', fixed: '',
columnWidth: 200, columnWidth: 200,
}, },
{
/* {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301014, functionId: 301014,
serialNumber: '301014Table2ObjectDesc', serialNumber: '301014Table2ObjectDesc',
@ -1685,7 +1687,7 @@
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120, columnWidth: 120,
},
}, */
/* { /* {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301014, functionId: 301014,
@ -3314,28 +3316,12 @@
this.$message.warning('请选择BU!') this.$message.warning('请选择BU!')
return return
} }
if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
this.$message.warning('请选择派工单!')
return
}
if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
this.$message.warning('请选择工单!')
return
}
if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) { if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
this.$message.warning('请选择检验类型!') this.$message.warning('请选择检验类型!')
return return
} }
if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) { if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
this.$message.warning('请选择物料!')
return
}
if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
this.$message.warning('请选择工序!')
return
}
if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
this.$message.warning('请选择机台!')
this.$message.warning('请选择工具ID!')
return return
} }
if (this.modalData.rollQty === '' || this.modalData.rollQty == null) { if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
@ -3900,6 +3886,8 @@
if (row.maxValue == null && row.minValue == null) { if (row.maxValue == null && row.minValue == null) {
if (row.numberValue!=row.defaultValue){ if (row.numberValue!=row.defaultValue){
row.itemResult = 'N' row.itemResult = 'N'
}else{
row.itemResult = 'Y'
} }
}else if (row.maxValue != null && row.minValue != null){ }else if (row.maxValue != null && row.minValue != null){
if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){ if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){
@ -4015,6 +4003,15 @@
} }
}, },
//
//
shouldShowDetailValue (columnItem, row) {
if (columnItem.columnProp === 'defaultValue' && row.valueTypeDb === 'N') {
return row.itemResult === 'N'
}
return true
},
// //
favoriteIsOk () { favoriteIsOk () {
let userFavorite = { let userFavorite = {

2
src/views/modules/dm/DMQcItem.vue

@ -947,7 +947,7 @@ export default {
methodNo: "", methodNo: "",
methodName: "", methodName: "",
updateBy: "", updateBy: "",
inspectionTypeNo: "822",
inspectionTypeNo: "823",
itemSamplingQuantity: "", itemSamplingQuantity: "",
samplingProgrammeNo: "", samplingProgrammeNo: "",
samplingProgrammeDesc: "", samplingProgrammeDesc: "",

10
src/views/modules/dm/DMQcMethod.vue

@ -197,7 +197,7 @@ export default {
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
methodRemark: "", methodRemark: "",
inspectionTypeNo: "822"
inspectionTypeNo: "823"
}, },
columnList: [ columnList: [
{ {
@ -442,7 +442,7 @@ export default {
methodNo: "", methodNo: "",
methodName: "", methodName: "",
methodRemark: "", methodRemark: "",
inspectionTypeNo: "822"
inspectionTypeNo: "823"
}; };
this.modalDisableFlag = false; this.modalDisableFlag = false;
this.modalFlag = true; this.modalFlag = true;
@ -457,7 +457,7 @@ export default {
methodNo: row.methodNo, methodNo: row.methodNo,
methodName: row.methodName, methodName: row.methodName,
methodRemark: row.methodRemark, methodRemark: row.methodRemark,
inspectionTypeNo: "822"
inspectionTypeNo: row.inspectionTypeNo
}; };
this.modalDisableFlag = true; this.modalDisableFlag = true;
this.modalFlag = true; this.modalFlag = true;
@ -517,7 +517,7 @@ export default {
inspectionTypeSearch(tempData).then(({ data }) => { inspectionTypeSearch(tempData).then(({ data }) => {
if (data.code === 0) { if (data.code === 0) {
this.options = data.rows; this.options = data.rows;
this.modalData.inspectionTypeNo = "822";
this.modalData.inspectionTypeNo = "823";
} }
}); });
}, },
@ -548,7 +548,7 @@ export default {
async createExportData() { async createExportData() {
this.searchData.limit = -1; this.searchData.limit = -1;
this.searchData.page = 1; this.searchData.page = 1;
this.searchData.inspectionTypeNo = "822";
this.searchData.inspectionTypeNo = "823";
await qcMethodSearch(this.searchData).then(({ data }) => { await qcMethodSearch(this.searchData).then(({ data }) => {
this.exportList = data.page.list; this.exportList = data.page.list;
}); });

14
src/views/modules/dm/DMQcPartAttribute.vue

@ -74,7 +74,7 @@
<a v-if="!authDetail" type="text" size="small" @click="detailModal(scope.row)">检验模板</a> <a v-if="!authDetail" type="text" size="small" @click="detailModal(scope.row)">检验模板</a>
<a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a> <a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a>
<a v-if="!authDelete" type="text" size="small" @click="deletePropertiesModel(scope.row)">删除</a> <a v-if="!authDelete" type="text" size="small" @click="deletePropertiesModel(scope.row)">删除</a>
<a v-if="!authFile" type="text" size="small" @click="sopFileList(scope.row)">SOP文件</a>
<a v-if="!authFile" type="text" size="small" @click="sopFileList(scope.row)">图纸</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -181,7 +181,7 @@
<el-form-item :label="'物料编码'"><el-input v-model="standardHeader.attributeNo" readonly style="width: 140px"></el-input></el-form-item> <el-form-item :label="'物料编码'"><el-input v-model="standardHeader.attributeNo" readonly style="width: 140px"></el-input></el-form-item>
<el-form-item :label="'物料名称'"><el-input v-model="standardHeader.partDesc" readonly style="width: 260px"></el-input></el-form-item> <el-form-item :label="'物料名称'"><el-input v-model="standardHeader.partDesc" readonly style="width: 260px"></el-input></el-form-item>
<el-form-item label="检验类型"><el-input v-model="standardHeader.inspectionTypeName" readonly style="width: 120px"></el-input></el-form-item> <el-form-item label="检验类型"><el-input v-model="standardHeader.inspectionTypeName" readonly style="width: 120px"></el-input></el-form-item>
<!-- <el-form-item :label="' '"><el-button type="primary" @click="openStandardFastAdd()">新增</el-button></el-form-item> -->
<el-form-item :label="' '"><el-button type="primary" @click="openStandardFastAdd()">新增</el-button></el-form-item>
</el-form> </el-form>
<el-table :height="360" :data="standardList" border style="width: 100%;"> <el-table :height="360" :data="standardList" border style="width: 100%;">
<el-table-column prop="itemNo" header-align="center" align="center" width="130" label="检验项目编码"></el-table-column> <el-table-column prop="itemNo" header-align="center" align="center" width="130" label="检验项目编码"></el-table-column>
@ -196,9 +196,9 @@
<el-table-column prop="" header-align="center" align="right" width="120" label="最小值"> <el-table-column prop="" header-align="center" align="right" width="120" label="最小值">
<template slot-scope="scope"><el-input v-model="scope.row.minValue" style="width: 100%"></el-input></template> <template slot-scope="scope"><el-input v-model="scope.row.minValue" style="width: 100%"></el-input></template>
</el-table-column> </el-table-column>
<!-- <el-table-column fixed="right" header-align="center" align="center" width="90" label="操作">
<el-table-column fixed="right" header-align="center" align="center" width="90" label="操作">
<template slot-scope="scope"><a type="text" size="small" @click="deleteStandardItem(scope.row)">删除项目</a></template> <template slot-scope="scope"><a type="text" size="small" @click="deleteStandardItem(scope.row)">删除项目</a></template>
</el-table-column> -->
</el-table-column>
</el-table> </el-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveStandardList()">保存</el-button> <el-button type="primary" @click="saveStandardList()">保存</el-button>
@ -371,7 +371,7 @@
</el-dialog> </el-dialog>
<!-- sop文件清单 --> <!-- sop文件清单 -->
<el-dialog title="SOP文件清单" :close-on-click-modal="false" v-drag :visible.sync="sopFileModelFlag" width="800px">
<el-dialog title="图纸清单" :close-on-click-modal="false" v-drag :visible.sync="sopFileModelFlag" width="800px">
<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="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="uploadSopFile">上传文件</el-button> <el-button type="primary" @click="uploadSopFile">上传文件</el-button>
@ -1457,12 +1457,12 @@ export default {
}, },
uploadSopFile() { uploadSopFile() {
const currentData = { const currentData = {
titleCon: "SOP文件上传",
titleCon: "图纸上传",
site: this.sopData.site, site: this.sopData.site,
buNo: this.sopData.buNo, buNo: this.sopData.buNo,
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
partNo: this.sopData.partNo, partNo: this.sopData.partNo,
inspectionTypeNo: "822",
inspectionTypeNo: "823",
options: this.options, options: this.options,
}; };
this.$nextTick(() => this.$refs.qcSOPUploadFile.init(currentData)); this.$nextTick(() => this.$refs.qcSOPUploadFile.init(currentData));

4
src/views/modules/dm/DMQcTemplate.vue

@ -365,7 +365,7 @@ export default {
userName: this.$store.state.user.name, userName: this.$store.state.user.name,
templateId: "", templateId: "",
templateName: "", templateName: "",
inspectionTypeNo: "822",
inspectionTypeNo: "",
buDesc: "RFID", buDesc: "RFID",
page: 1, page: 1,
limit: 10 limit: 10
@ -798,7 +798,7 @@ export default {
templateVersion: "", templateVersion: "",
samplingProgrammeNo: "", samplingProgrammeNo: "",
samplingProgrammeDesc: "", samplingProgrammeDesc: "",
inspectionTypeNo: "822",
inspectionTypeNo: "823",
inspectionCycle: "", inspectionCycle: "",
samplingLevelNo: "", samplingLevelNo: "",
samplingLevelDesc: "", samplingLevelDesc: "",

4
src/views/modules/dm/DMResultEntry.vue

@ -1609,7 +1609,7 @@
fixed: '', fixed: '',
columnWidth: 200, columnWidth: 200,
}, },
{
/* {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301014, functionId: 301014,
serialNumber: '301014Table2ObjectDesc', serialNumber: '301014Table2ObjectDesc',
@ -1626,7 +1626,7 @@
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120, columnWidth: 120,
},
}, */
/* { /* {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 301014, functionId: 301014,

222
src/views/modules/dm/IQCFileTable.vue

@ -0,0 +1,222 @@
<script>
import {downLoadObjectFile, downLoadObjectFileMes} from '@/api/eam/eam_object_list.js'
import {deleteObjectFile} from '@/api/eam/eam.js'
export default {
name: "iqcFileTable",
props:{
dataList:{
type:Array,
required:true
},
queryLoading:{
type:Boolean,
default:false,
},
columns:{
type:Array,
required: true,
}
},
methods: {
//
previewFile (row) {
//
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
let type = ''
if (image.includes(row.fileType.toLowerCase())) {
type = 'image/' + row.fileType
}
let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
if (video.includes(row.fileType.toLowerCase())) {
type = 'video/' + row.fileType
}
let txt = ['txt']
if (txt.includes(row.fileType.toLowerCase())) {
type = 'text/plain'
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
if (office.includes(row.fileType.toLowerCase())) {
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return
}
let pdf = ['pdf']
if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
}
if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return;
}
downLoadObjectFile(row).then(({data}) => {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
const newTab = window.open(fileURL, '_blank')
})
},
//
previewFileMes (row) {
//
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
let type = ''
if (image.includes(row.fileType.toLowerCase())) {
type = 'image/' + row.fileType
}
let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
if (video.includes(row.fileType.toLowerCase())) {
type = 'video/' + row.fileType
}
let txt = ['txt']
if (txt.includes(row.fileType.toLowerCase())) {
type = 'text/plain'
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
if (office.includes(row.fileType.toLowerCase())) {
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return
}
let pdf = ['pdf']
if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
}
if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return;
}
downLoadObjectFileMes(row).then(({data}) => {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
const newTab = window.open(fileURL, '_blank')
})
},
//
downloadFile (row) {
downLoadObjectFile(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = row.fileName
// a
const linkNode = document.createElement('a')
// adownload
linkNode.download = fileName
linkNode.style.display = 'none'
// Blob URL
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
//
linkNode.click()
// URL
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
},
//
downloadFileMes (row) {
downLoadObjectFileMes(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = row.fileName
// a
const linkNode = document.createElement('a')
// adownload
linkNode.download = fileName
linkNode.style.display = 'none'
// Blob URL
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
//
linkNode.click()
// URL
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
},
//
deleteFile (row) {
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2,
buNo: row.orderRef4
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteObjectFile(row).then(({data}) => {
if (data && data.code == 0) {
this.getFileContentData(tempData)
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
}
}
</script>
<template>
<el-table
:height="350"
:data="dataList"
border
v-loading="queryLoading"
element-loading-text="拼命加载中"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
: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.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<el-link v-if="scope.row.orderReftype !== 'mes'" style="cursor: pointer" @click="previewFile(scope.row)">预览</el-link>
<el-link v-if="scope.row.orderReftype !== 'mes'" style="cursor: pointer" @click="downloadFile(scope.row)">下载</el-link>
<el-link v-if="scope.row.orderReftype !== 'mes'" style="cursor: pointer" @click="deleteFile(scope.row)">删除</el-link>
<el-link v-if="scope.row.orderReftype === 'mes'" style="cursor: pointer" @click="previewFileMes(scope.row)">预览</el-link>
<el-link v-if="scope.row.orderReftype === 'mes'" style="cursor: pointer" @click="downloadFileMes(scope.row)">下载</el-link>
</template>
</el-table-column>
</el-table>
</template>
<style scoped>
</style>

2
src/views/modules/dm/dm_SOP_upload_file.vue

@ -107,6 +107,8 @@ export default {
this.$message.success(data.msg); this.$message.success(data.msg);
this.$refs.uploadFile.clearFiles(); this.$refs.uploadFile.clearFiles();
this.fileList = []; this.fileList = [];
this.$emit("refreshPageTables");
this.visible = false;
} else { } else {
this.$message.warning(data.msg); this.$message.warning(data.msg);
} }

Loading…
Cancel
Save