杨奉源 3 years ago
parent
commit
db7fa7f22b
  1. 12
      src/views/modules/qc/IQCResultEntry.vue
  2. 2
      src/views/modules/qc/qcFamilyAttribute.vue
  3. 4
      src/views/modules/qc/qcItem.vue
  4. 28
      src/views/modules/qc/qcPartAttribute.vue
  5. 6
      src/views/modules/qc/qcTemplate.vue
  6. 134
      src/views/modules/qc/qc_upload.vue

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

@ -34,11 +34,11 @@
</el-form-item>
<el-form-item :label="'检验时间:'">
<el-date-picker style="width: 150px" v-model="searchData.startDate" type="datetime"
value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="开始日期">
value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="开始日期">
</el-date-picker>
-
<el-date-picker style="width: 150px" v-model="searchData.endDate" type="datetime"
value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期">
value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="' '">
@ -291,8 +291,8 @@
width="100"
label="操作">
<template slot-scope="scope">
<a @click="downloadFile(scope.row)" >下载</a>
<a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
<a @click="downloadFile(scope.row)">下载</a>
<a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
@ -730,7 +730,7 @@
columnProp: 'maxValue',
headerAlign: "center",
align: "left",
columnLabel: '上限值',
columnLabel: '最大值',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -742,7 +742,7 @@
columnProp: 'minValue',
headerAlign: "center",
align: "left",
columnLabel: '下限值',
columnLabel: '最小值',
columnHidden: false,
columnImage: false,
columnSortable: false,

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

@ -935,6 +935,8 @@
qcUpload(){
let currentData = {
flag: 'familyAttribute',
createBy: this.$store.state.user.name,
site: this.$store.state.user.site,
};
//
this.$nextTick(() => {

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

@ -247,7 +247,7 @@
columnProp: 'defaultValue',
headerAlign: 'center',
align: 'left',
columnLabel: '参照值',
columnLabel: '标准值',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -515,6 +515,8 @@
qcUpload(){
let currentData = {
flag: 'item',
createBy: this.$store.state.user.name,
site: this.$store.state.user.site,
};
//
this.$nextTick(() => {

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

@ -119,7 +119,7 @@
</el-dialog>
<!-- 检验模板 -->
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1500px">
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1600px">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'物料编码'">
<el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input>
@ -573,6 +573,30 @@
status: true,
fixed: '',
},
{
columnProp: 'defaultSamplingQuantity',
headerAlign: "center",
align: "left",
columnLabel: '默认检验数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'defaultSamplingProportion',
headerAlign: "center",
align: "left",
columnLabel: '默认检验比例',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
//
fastAddFlag:false,
@ -988,6 +1012,8 @@
qcUpload(){
let currentData = {
flag: 'partAttribute',
createBy: this.$store.state.user.name,
site: this.$store.state.user.site,
};
//
this.$nextTick(() => {

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

@ -222,7 +222,7 @@
header-align="center"
align="right"
min-width="80"
label="上限值">
label="最大值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb == 'T'" v-model="scope.row.maxValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb != 'T'" v-model="scope.row.maxValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
@ -233,7 +233,7 @@
header-align="center"
align="right"
min-width="80"
label="下限值">
label="最小值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb == 'T'" v-model="scope.row.minValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb != 'T'" v-model="scope.row.minValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
@ -1149,6 +1149,8 @@
qcUpload(){
let currentData = {
flag: 'template',
createBy: this.$store.state.user.name,
site: this.$store.state.user.site,
};
//
this.$nextTick(() => {

134
src/views/modules/qc/qc_upload.vue

@ -2,6 +2,7 @@
<div class="customer-css">
<el-dialog :title="titleCon" :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"
@ -27,6 +28,8 @@ import {
uploadPartAttributeExcel, //
uploadFamilyAttributeExcel, //
} from "@/api/qc/qc.js"
import axios from 'axios'
import Vue from 'vue'
export default {
data() {
return {
@ -35,6 +38,8 @@ export default {
fileList: [],
pageData: {
flag: '',
createBy: '',
site: ''
},
}
},
@ -74,6 +79,8 @@ export default {
}
const formData = new FormData();
formData.append("file", this.fileList[0].raw);
formData.append("createBy", this.pageData.createBy);
formData.append("site", this.pageData.site);
if (this.pageData.flag == 'item'){
uploadExcel(formData).then(({data}) => {
if (data.code === 0) {
@ -123,8 +130,133 @@ export default {
}
})
}
},
downloadFile(){
if(this.pageData.flag == 'item'){
let file = {
id: 61,
fileName: '检验项目格式.xlsx',
}
axios.get('/proxyApi/pms/eamObject/downLoadObjectFile/' + file.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = file.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)
})
}else if (this.pageData.flag == 'template'){
let file = {
id: 62,
fileName: '检验模板格式.xlsx',
}
axios.get('/proxyApi/pms/eamObject/downLoadObjectFile/' + file.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = file.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)
})
}else if (this.pageData.flag == 'partAttribute'){
let file = {
id: 63,
fileName: '物料属性设置.xlsx',
}
axios.get('/proxyApi/pms/eamObject/downLoadObjectFile/' + file.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = file.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)
})
}else if (this.pageData.flag == 'familyAttribute'){
let file = {
id: 64,
fileName: '分类属性设置.xlsx',
}
axios.get('/proxyApi/pms/eamObject/downLoadObjectFile/' + file.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = file.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)
})
}
},
}
},
created() {

Loading…
Cancel
Save