Browse Source

2025-04-14

1、质量明细报表导出优化
2、IPQC检验单增加实际机台(初始值与机台一致,可以修改)
master
fengyuan_yang 9 months ago
parent
commit
1f97cb1cc5
  1. 3
      src/api/qc/qc_report.js
  2. 4
      src/utils/httpRequest.js
  3. 81
      src/views/modules/qc/IPQCResultEntry.vue
  4. 12
      src/views/modules/qc/IQCResultEntry.vue
  5. 66
      src/views/modules/report/FQAS_report.vue
  6. 54
      src/views/modules/report/IPQC_report.vue
  7. 58
      src/views/modules/report/IQC_report.vue
  8. 65
      src/views/modules/report/OQC_report.vue

3
src/api/qc/qc_report.js

@ -8,3 +8,6 @@ export const getIPQCReport = data => createAPI('/pms/qcReport/getIPQCReport','po
export const getFQASReport = data => createAPI('/pms/qcReport/getFQASReport','post',data) export const getFQASReport = data => createAPI('/pms/qcReport/getFQASReport','post',data)
// OQC报表查询 // OQC报表查询
export const getOQCReport = data => createAPI('/pms/qcReport/getOQCReport','post',data) export const getOQCReport = data => createAPI('/pms/qcReport/getOQCReport','post',data)
// 导出
export const downloadQcRecord = data => createAPI('/pms/qcReport/downloadQcRecord','post',data, 'download')

4
src/utils/httpRequest.js

@ -146,14 +146,14 @@ instance2.interceptors.response.use(response => {
}) })
export const createAPI = (url, method, data) => {
export const createAPI = (url, method, data, type) => {
let config = {} let config = {}
if (method === 'get') { if (method === 'get') {
config.params = data config.params = data
} else { } else {
config.data = data config.data = data
} }
if (data === 777){ // 下载功能的请求
if (data === 777 || type === 'download'){ // 下载功能的请求
return instance2({ return instance2({
url, url,
method, method,

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

@ -101,7 +101,7 @@
<el-date-picker style="width: 130px" v-model="searchData.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd' placeholder="结束日期"></el-date-picker> <el-date-picker style="width: 130px" v-model="searchData.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd' placeholder="结束日期"></el-date-picker>
</el-form-item> </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" :loading="searchLoading" 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>
<el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button> <el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button>
<el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button> <el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button>
@ -258,7 +258,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
<span style="cursor: pointer" slot="label" @click="getBaseList(505, 1)"><a herf="#">机台</a></span>
<el-input v-model="modalData.resourceDesc" readonly style="width: 221px"></el-input> <el-input v-model="modalData.resourceDesc" readonly style="width: 221px"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item v-else label="机台" prop="resourceId" :rules="rules.resourceIdType">--> <!-- <el-form-item v-else label="机台" prop="resourceId" :rules="rules.resourceIdType">-->
@ -334,7 +334,7 @@
<!-- 检验单详情页 --> <!-- 检验单详情页 -->
<el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag top="5vh" :visible.sync="detailInformationFlag" width="1200px"> <el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag top="5vh" :visible.sync="detailInformationFlag" width="1200px">
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList">
<el-form :inline="true" label-position="top">
<el-form-item :label="'物料编码'"> <el-form-item :label="'物料编码'">
<el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input> <el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input>
</el-form-item> </el-form-item>
@ -368,7 +368,7 @@
<el-input class="inlineNumber numInput" v-model="detailData.notPassQty" type="number" disabled style="width: 70px"></el-input> <el-input class="inlineNumber numInput" v-model="detailData.notPassQty" type="number" disabled style="width: 70px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList">
<el-form :inline="true" label-position="top">
<el-form-item :label="'检验结论'"> <el-form-item :label="'检验结论'">
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择"> <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
@ -383,8 +383,8 @@
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 303px"></el-input> <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 303px"></el-input>
<el-input v-else v-model="detailData.inspectionRemark" style="width: 303px"></el-input> <el-input v-else v-model="detailData.inspectionRemark" style="width: 303px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="检验员">
<!-- <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectorNo" disabled style="width: 100px">-->
<!-- <el-form-item label="检验员">-->
<!-- <el-select v-model="detailData.inspectorNo" disabled style="width: 100px">-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for = "i in options"--> <!-- v-for = "i in options"-->
<!-- :key = "i.inspectorNo"--> <!-- :key = "i.inspectorNo"-->
@ -392,14 +392,10 @@
<!-- :value = "i.inspectorNo">--> <!-- :value = "i.inspectorNo">-->
<!-- </el-option>--> <!-- </el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<el-select v-model="detailData.inspectorNo" disabled style="width: 100px">
<el-option
v-for = "i in options"
:key = "i.inspectorNo"
:label = "i.inspectorName"
:value = "i.inspectorNo">
</el-option>
</el-select>
<!-- </el-form-item>-->
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(505, 2)"><a herf="#">实际机台</a></span>
<el-input v-model="detailData.actualResourceDesc" readonly style="width: 100px"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span v-if="detailData.submitFlag === 'Y'" slot="label">协同人员</span> <span v-if="detailData.submitFlag === 'Y'" slot="label">协同人员</span>
@ -1030,7 +1026,8 @@
inspectionResult: '', inspectionResult: '',
submitList: [], submitList: [],
}, },
tagNo:'',
tagNo: '',
type: '',
searchData: { searchData: {
site: '', site: '',
userName: this.$store.state.user.name, userName: this.$store.state.user.name,
@ -1069,16 +1066,16 @@
dataList: [], dataList: [],
dataListSelections: [], dataListSelections: [],
modalData: { modalData: {
flag:'',
flag: '',
site: '', site: '',
bu: '', bu: '',
inspectionNo:'',
inspectionNo: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
inspectionTypeNo:'',
inspectionTypeName:'',
inspectorNo:'',
inspectorName:'',
inspectionTypeNo: '',
inspectionTypeName: '',
inspectorNo: '',
inspectorName: '',
orderNo: '', orderNo: '',
operationDesc: '', operationDesc: '',
operationNo: '', operationNo: '',
@ -1100,7 +1097,8 @@
sjzs: '', sjzs: '',
boxNo: '', boxNo: '',
createBy: '', createBy: '',
importantFlag: ''
importantFlag: '',
actualResourceId: ''
}, },
// //
columnList1: [ columnList1: [
@ -1672,7 +1670,9 @@
responsiblePersonName: '', responsiblePersonName: '',
passQty: '', passQty: '',
notPassQty: '', notPassQty: '',
shiftDesc: ''
shiftDesc: '',
actualResourceId: '',
actualResourceDesc: ''
}, },
detailInformationFlag: false, detailInformationFlag: false,
detailList: [], detailList: [],
@ -1696,7 +1696,8 @@
responsiblePersonName: '', responsiblePersonName: '',
subDetailList: [], subDetailList: [],
passQty: '', passQty: '',
notPassQty: ''
notPassQty: '',
actualResourceId: ''
}, },
detailColumnList: [ detailColumnList: [
{ {
@ -2419,6 +2420,7 @@
currentRow: {}, currentRow: {},
currentDetailRow: {}, currentDetailRow: {},
saveLoading: false, saveLoading: false,
searchLoading: false
} }
}, },
@ -3096,18 +3098,23 @@
}, },
// S // S
getBaseList (val,type) {
getBaseList (val, type) {
this.tagNo = val this.tagNo = val
this.type = type
this.$nextTick(() => { this.$nextTick(() => {
let strVal = '' let strVal = ''
if (val === 1052) { if (val === 1052) {
this.searchSeqInfo() this.searchSeqInfo()
this.seqDetailFlag = true this.seqDetailFlag = true
} }
if (val === 505) {
if (val === 505 && type === 1) {
strVal = this.modalData.resourceDesc strVal = this.modalData.resourceDesc
this.$refs.baseList.init(val, strVal) this.$refs.baseList.init(val, strVal)
} }
if (val === 505 && type === 2) {
strVal = this.detailData.actualResourceDesc
this.$refs.baseList.init(val, strVal)
}
if (val === 509) { if (val === 509) {
strVal = this.detailData.responsiblePerson strVal = this.detailData.responsiblePerson
this.$refs.baseList.init(val, strVal) this.$refs.baseList.init(val, strVal)
@ -3129,10 +3136,14 @@
this.getOperationList() this.getOperationList()
//this.getPartList() //this.getPartList()
} }
if (this.tagNo === 505) {
if (this.tagNo === 505 && this.type === 1) {
this.modalData.resourceId = val.ResourceID this.modalData.resourceId = val.ResourceID
this.modalData.resourceDesc = val.ResourceDesc this.modalData.resourceDesc = val.ResourceDesc
} }
if (this.tagNo === 505 && this.type === 2) {
this.detailData.actualResourceId = val.ResourceID
this.detailData.actualResourceDesc = val.ResourceDesc
}
if (this.tagNo === 509) { if (this.tagNo === 509) {
this.detailData.responsiblePerson = val.SupplierID this.detailData.responsiblePerson = val.SupplierID
} }
@ -3264,7 +3275,8 @@
sjzs: '', sjzs: '',
boxNo: '', boxNo: '',
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
importantFlag: ''
importantFlag: '',
actualResourceId: ''
} }
this.operationList = [] this.operationList = []
this.resourceList = [] this.resourceList = []
@ -3452,8 +3464,9 @@
this.$message.warning('请选择检验模板!') this.$message.warning('请选择检验模板!')
return return
} }
this.modalData.actualResourceId = this.modalData.resourceId // 2025 04 14 =
this.saveLoading = true this.saveLoading = true
if(this.modalData.flag === '1'){
if(this.modalData.flag === '1') {
saveOsInspection(this.modalData).then(({data}) => { saveOsInspection(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
@ -3481,6 +3494,7 @@
// //
getDataList () { getDataList () {
this.searchLoading = true
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
qcIPQCInspectionSearch(this.searchData).then(({data}) => { qcIPQCInspectionSearch(this.searchData).then(({data}) => {
@ -3489,7 +3503,12 @@
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.searchLoading = false
} else {
this.searchLoading = false
} }
}).catch(() => {
this.searchLoading = false
}) })
}, },
@ -3654,6 +3673,7 @@
this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.actualResourceId = this.detailData.actualResourceId
// this.saveInformationData.subDetailList = this.acquisitionList // this.saveInformationData.subDetailList = this.acquisitionList
saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => { saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -3731,6 +3751,8 @@
this.detailData.responsiblePerson = row.responsiblePerson this.detailData.responsiblePerson = row.responsiblePerson
this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.shiftDesc = row.shiftDesc this.detailData.shiftDesc = row.shiftDesc
this.detailData.actualResourceId = row.actualResourceId
this.detailData.actualResourceDesc = row.actualResourceDesc
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty
} else { } else {
@ -3823,7 +3845,6 @@
}) })
} }
}) })
}).catch(() => {
}) })
}, },

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

@ -109,7 +109,7 @@
<el-date-picker style="width: 120px" v-model="searchData.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd' placeholder="结束日期"></el-date-picker> <el-date-picker style="width: 120px" v-model="searchData.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd' placeholder="结束日期"></el-date-picker>
</el-form-item> </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" :loading="searchLoading" type="primary" @click="getDataList">查询</el-button>
<el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button> <el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button>
<el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button> <el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button>
<el-button v-if="!authOverLoad" type="primary" :loading="overLoading" @click="overLoadModal">任务重载</el-button> <el-button v-if="!authOverLoad" type="primary" :loading="overLoading" @click="overLoadModal">任务重载</el-button>
@ -2116,7 +2116,8 @@
}, },
changeModalFlag: false, changeModalFlag: false,
batchLoading: false, batchLoading: false,
overLoading: false
overLoading: false,
searchLoading: false
} }
}, },
@ -2933,6 +2934,7 @@
// //
getDataList () { getDataList () {
this.searchLoading = true
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
qcIQCInspectionSearch(this.searchData).then(({data}) => { qcIQCInspectionSearch(this.searchData).then(({data}) => {
@ -2941,7 +2943,12 @@
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.searchLoading = false
} else {
this.searchLoading = false
} }
}).catch(() => {
this.searchLoading = false
}) })
}, },
@ -3205,7 +3212,6 @@
}) })
} }
}) })
}).catch(() => {
}) })
}, },

66
src/views/modules/report/FQAS_report.vue

@ -9,7 +9,7 @@
</div> </div>
<!-- 条件查询 --> <!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px"> <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px">
<el-option <el-option
@ -41,7 +41,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'关联单号1'"> <el-form-item :label="'关联单号1'">
<el-input v-model="searchData.orderRef1" clearable style="width: 183px"></el-input> <el-input v-model="searchData.orderRef1" clearable style="width: 183px"></el-input>
</el-form-item> </el-form-item>
@ -59,7 +59,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'检验结论'"> <el-form-item :label="'检验结论'">
<el-select v-model="searchData.inspectionResult" clearable style="width: 80px"> <el-select v-model="searchData.inspectionResult" clearable style="width: 80px">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
@ -95,20 +95,7 @@
</el-form-item> </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>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
<el-button v-if="!authSearch" type="primary" :loading="downLoading" @click="downloadQcRecord">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -200,6 +187,7 @@
<script> <script>
import { import {
getFQASReport, // FQAS getFQASReport, // FQAS
downloadQcRecord, //
} from "@/api/qc/qc_report.js" } from "@/api/qc/qc_report.js"
import { import {
getSiteAndBuByUserName, // site bu getSiteAndBuByUserName, // site bu
@ -260,6 +248,7 @@
orderRef3: '', orderRef3: '',
orderRef4: '', orderRef4: '',
orderRef5: '', orderRef5: '',
downloadType: 'fqas',
}, },
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
@ -652,20 +641,20 @@
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 107001003, functionId: 107001003,
serialNumber: '107001003Table1SupplierDesc',
serialNumber: '107001003Table1OrderRef6',
tableId: "107001003Table1", tableId: "107001003Table1",
tableName: "FQAS报表", tableName: "FQAS报表",
columnProp: 'supplierDesc',
columnProp: 'orderRef6',
headerAlign: "center", headerAlign: "center",
align: "left",
columnLabel: '供应商',
align: "center",
columnLabel: '关联单号6',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 200,
columnWidth: 130,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -781,7 +770,7 @@
serialNumber: '107001003Table1ItemNo', serialNumber: '107001003Table1ItemNo',
tableId: "107001003Table1", tableId: "107001003Table1",
tableName: "FQAS报表", tableName: "FQAS报表",
columnProp: 'itemNo',
columnProp: 'c',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: '检验项目编码', columnLabel: '检验项目编码',
@ -1002,6 +991,7 @@
subDetailDataList: [], subDetailDataList: [],
currentRow: {}, currentRow: {},
disposalMeasuresOptions: [], disposalMeasuresOptions: [],
downLoading: false
} }
}, },
@ -1030,20 +1020,22 @@
methods: { methods: {
exportAllIQCRecord () {
// exportAllIQCRecord(this.searchData).then(({data}) => {
// if (data && data.code === 0) {
// this.$message({
// message: '',
// type: 'success',
// duration: 1500
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
//
downloadQcRecord () {
this.downLoading = true
downloadQcRecord(this.searchData)
.then(response => {
const blob = new Blob([response.data],{ type: 'application/vnd.ms-excel'});
const url = window.URL.createObjectURL(blob);
const link= document.createElement('a');
link.href = url;
link.download='FQAS报表.xlsx';//
link.click();
window.URL.revokeObjectURL(url);//URL
this.downLoading = false
}).catch(()=>{
this.downLoading = false
})
}, },
// //

54
src/views/modules/report/IPQC_report.vue

@ -9,7 +9,7 @@
</div> </div>
<!-- 条件查询 --> <!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px"> <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px">
<el-option <el-option
@ -31,7 +31,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'工单号'"> <el-form-item :label="'工单号'">
<el-input v-model="searchData.orderNo" clearable style="width: 173px"></el-input> <el-input v-model="searchData.orderNo" clearable style="width: 173px"></el-input>
</el-form-item> </el-form-item>
@ -50,7 +50,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'检验类型'"> <el-form-item :label="'检验类型'">
<el-select v-model="searchData.inspectionTypeNo" clearable style="width: 100px"> <el-select v-model="searchData.inspectionTypeNo" clearable style="width: 100px">
<el-option label="IPQC首检" value="101"></el-option> <el-option label="IPQC首检" value="101"></el-option>
@ -93,20 +93,7 @@
</el-form-item> </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>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
<el-button v-if="!authSearch" type="primary" :loading="downLoading" @click="downloadQcRecord">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -196,6 +183,7 @@
<script> <script>
import { import {
getIPQCReport, // IPQC getIPQCReport, // IPQC
downloadQcRecord, //
} from "@/api/qc/qc_report.js" } from "@/api/qc/qc_report.js"
import { import {
getSiteAndBuByUserName, // site bu getSiteAndBuByUserName, // site bu
@ -248,6 +236,7 @@
limit: 10, limit: 10,
seqNo: '', seqNo: '',
states: [], states: [],
downloadType: 'ipqc',
}, },
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
@ -936,6 +925,7 @@
subDetailDataList: [], subDetailDataList: [],
currentRow: {}, currentRow: {},
disposalMeasuresOptions: [], disposalMeasuresOptions: [],
downLoading: false
} }
}, },
@ -964,20 +954,22 @@
methods: { methods: {
exportAllIQCRecord () {
// exportAllIQCRecord(this.searchData).then(({data}) => {
// if (data && data.code === 0) {
// this.$message({
// message: '',
// type: 'success',
// duration: 1500
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
//
downloadQcRecord () {
this.downLoading = true
downloadQcRecord(this.searchData)
.then(response => {
const blob = new Blob([response.data],{ type: 'application/vnd.ms-excel'});
const url = window.URL.createObjectURL(blob);
const link= document.createElement('a');
link.href = url;
link.download='IPQC报表.xlsx';//
link.click();
window.URL.revokeObjectURL(url);//URL
this.downLoading = false
}).catch(()=>{
this.downLoading = false
})
}, },
// //

58
src/views/modules/report/IQC_report.vue

@ -9,7 +9,7 @@
</div> </div>
<!-- 条件查询 --> <!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px"> <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px">
<el-option <el-option
@ -36,7 +36,7 @@
<el-input v-model="searchData.partDesc" clearable style="width: 315px"></el-input> <el-input v-model="searchData.partDesc" clearable style="width: 315px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'通知单号'"> <el-form-item :label="'通知单号'">
<el-input v-model="searchData.receiptNo" clearable style="width: 144px"></el-input> <el-input v-model="searchData.receiptNo" clearable style="width: 144px"></el-input>
</el-form-item> </el-form-item>
@ -56,7 +56,7 @@
<el-input v-model="searchData.refInfo5" clearable style="width: 155px"></el-input> <el-input v-model="searchData.refInfo5" clearable style="width: 155px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'质检员'"> <el-form-item :label="'质检员'">
<el-input v-model="searchData.inspectorName" clearable style="width: 120px"></el-input> <el-input v-model="searchData.inspectorName" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
@ -80,7 +80,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'检验结论'"> <el-form-item :label="'检验结论'">
<el-select v-model="searchData.inspectionResult" clearable style="width: 80px"> <el-select v-model="searchData.inspectionResult" clearable style="width: 80px">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
@ -116,20 +116,7 @@
</el-form-item> </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>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
<el-button v-if="!authSearch" type="primary" :loading="downLoading" @click="downloadQcRecord">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -221,6 +208,7 @@
<script> <script>
import { import {
getIQCReport, // IQC getIQCReport, // IQC
downloadQcRecord, //
} from "@/api/qc/qc_report.js" } from "@/api/qc/qc_report.js"
import { import {
getSiteAndBuByUserName, // site bu getSiteAndBuByUserName, // site bu
@ -259,7 +247,7 @@
site: '', site: '',
userName: this.$store.state.user.name, userName: this.$store.state.user.name,
inspectionNo: '', inspectionNo: '',
inspectionTypeNo:'105',
inspectionTypeNo: '105',
isQualified: '', isQualified: '',
buDesc: '', buDesc: '',
startDate: '', startDate: '',
@ -288,6 +276,7 @@
refInfo3: '', refInfo3: '',
refInfo4: '', refInfo4: '',
refInfo5: '', refInfo5: '',
downloadType: 'iqc',
}, },
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
@ -1102,6 +1091,7 @@
subDetailDataList: [], subDetailDataList: [],
currentRow: {}, currentRow: {},
disposalMeasuresOptions: [], disposalMeasuresOptions: [],
downLoading: false
} }
}, },
@ -1130,20 +1120,22 @@
methods: { methods: {
exportAllIQCRecord () {
// exportAllIQCRecord(this.searchData).then(({data}) => {
// if (data && data.code === 0) {
// this.$message({
// message: '',
// type: 'success',
// duration: 1500
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
//
downloadQcRecord () {
this.downLoading = true
downloadQcRecord(this.searchData)
.then(response => {
const blob = new Blob([response.data],{ type: 'application/vnd.ms-excel'});
const url = window.URL.createObjectURL(blob);
const link= document.createElement('a');
link.href = url;
link.download='IQC报表.xlsx';//
link.click();
window.URL.revokeObjectURL(url);//URL
this.downLoading = false
}).catch(()=>{
this.downLoading = false
})
}, },
// //

65
src/views/modules/report/OQC_report.vue

@ -9,7 +9,7 @@
</div> </div>
<!-- 条件查询 --> <!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px"> <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px">
<el-option <el-option
@ -41,7 +41,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'关联单号1'"> <el-form-item :label="'关联单号1'">
<el-input v-model="searchData.orderRef1" clearable style="width: 183px"></el-input> <el-input v-model="searchData.orderRef1" clearable style="width: 183px"></el-input>
</el-form-item> </el-form-item>
@ -58,7 +58,7 @@
<el-input v-model="searchData.orderRef5" clearable style="width: 183px"></el-input> <el-input v-model="searchData.orderRef5" clearable style="width: 183px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'检验结论'"> <el-form-item :label="'检验结论'">
<el-select v-model="searchData.inspectionResult" clearable style="width: 80px"> <el-select v-model="searchData.inspectionResult" clearable style="width: 80px">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
@ -94,20 +94,7 @@
</el-form-item> </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>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
<el-button v-if="!authSearch" type="primary" :loading="downLoading" @click="downloadQcRecord">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -199,6 +186,7 @@
<script> <script>
import { import {
getOQCReport, // OQC getOQCReport, // OQC
downloadQcRecord, //
} from "@/api/qc/qc_report.js" } from "@/api/qc/qc_report.js"
import { import {
getSiteAndBuByUserName, // site bu getSiteAndBuByUserName, // site bu
@ -259,6 +247,7 @@ export default {
orderRef3: '', orderRef3: '',
orderRef4: '', orderRef4: '',
orderRef5: '', orderRef5: '',
downloadType: 'oqc',
}, },
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
@ -651,20 +640,20 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 107001004, functionId: 107001004,
serialNumber: '107001004Table1SupplierDesc',
serialNumber: '107001004Table1OrderRef6',
tableId: "107001004Table1", tableId: "107001004Table1",
tableName: "OQC报表", tableName: "OQC报表",
columnProp: 'supplierDesc',
columnProp: 'orderRef6',
headerAlign: "center", headerAlign: "center",
align: "left",
columnLabel: '供应商',
align: "center",
columnLabel: '关联单号6',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 200,
columnWidth: 130,
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1001,6 +990,7 @@ export default {
subDetailDataList: [], subDetailDataList: [],
currentRow: {}, currentRow: {},
disposalMeasuresOptions: [], disposalMeasuresOptions: [],
downLoading: false
} }
}, },
@ -1029,22 +1019,25 @@ export default {
methods: { methods: {
exportAllIQCRecord () {
// exportAllIQCRecord(this.searchData).then(({data}) => {
// if (data && data.code === 0) {
// this.$message({
// message: '',
// type: 'success',
// duration: 1500
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
//
downloadQcRecord () {
this.downLoading = true
downloadQcRecord(this.searchData)
.then(response => {
const blob = new Blob([response.data],{ type: 'application/vnd.ms-excel'});
const url = window.URL.createObjectURL(blob);
const link= document.createElement('a');
link.href = url;
link.download='OQC报表.xlsx';//
link.click();
window.URL.revokeObjectURL(url);//URL
this.downLoading = false
}).catch(()=>{
this.downLoading = false
})
}, },
// //
OQClickRow (row) { OQClickRow (row) {
this.currentRow = JSON.parse(JSON.stringify(row)) this.currentRow = JSON.parse(JSON.stringify(row))

Loading…
Cancel
Save