Browse Source

新增 订单产出标签报表

master
赵宏斌 3 months ago
parent
commit
85bb1326d8
  1. 3
      src/api/shopOrder/productionReport.js
  2. 651
      src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue

3
src/api/shopOrder/productionReport.js

@ -21,6 +21,9 @@ export const searchItemToBeProduct = data => createAPI(`/productionReport/search
// 查询-产线产量报告 // 查询-产线产量报告
export const searchProductionLineOutputReport = data => createAPI(`/productionReport/searchProductionLineOutputReport`,'post',data) export const searchProductionLineOutputReport = data => createAPI(`/productionReport/searchProductionLineOutputReport`,'post',data)
//订单产出标签报表--查询
export const searchSfdcRollsReport = data => createAPI(`/productionReport/searchSfdcRollsReport`,'post',data)
// 查询-CQC检验记录 // 查询-CQC检验记录
export const searchCQCInspectionRecord = data => createAPI(`/productionReport/searchCQCInspectionRecord`,'post',data) export const searchCQCInspectionRecord = data => createAPI(`/productionReport/searchCQCInspectionRecord`,'post',data)

651
src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue

@ -0,0 +1,651 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item label='来源工单号'>
<el-input v-model="searchData.orderNo" style="width: 150px" clearable></el-input>
</el-form-item>
<el-form-item label='来源派工单号'>
<el-input v-model="searchData.createdOpsSeqNo" style="width: 130px" clearable></el-input>
</el-form-item>
<el-form-item label='来源工序号'>
<el-input v-model="searchData.createdOpsItemNo" style="width: 130px" clearable></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(18)"><a herf="#">{{labels.site}}</a></span>
<el-input v-model="searchData.site" style="width: 130px"></el-input>
</el-form-item>
<!-- <el-form-item :label="labels.reportDate">-->
<!-- <el-date-picker-->
<!-- style="width: 130px"-->
<!-- v-model="searchData.date1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- :placeholder="labels.placeholder">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="labels.to">-->
<!-- <el-date-picker-->
<!-- style="width: 130px"-->
<!-- v-model="searchData.date2"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- :placeholder="labels.placeholder">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="getBaseList(5)"><a herf="#">{{labels.partNo}}</a></span>-->
<!-- <el-input v-model="searchData.partNo" style="width: 130px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="labels.partDescription">-->
<!-- <el-input v-model="searchData.partDescription" style="width: 130px"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label='消耗工单号'>
<el-input v-model="searchData.consumeOrderNo" style="width: 150px" clearable></el-input>
</el-form-item>
<el-form-item label='消耗派工单号'>
<el-input v-model="searchData.consumeSeqNo" style="width: 130px" clearable></el-input>
</el-form-item>
<el-form-item label='消耗工序号'>
<el-input v-model="searchData.consumeItemNo" style="width: 130px" clearable></el-input>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker
style="width: 130px"
v-model="searchData.createdDate2"
value-format="yyyy-MM-dd"
:placeholder="labels.placeholder">
</el-date-picker>
</el-form-item>
<!-- <el-form-item :label="labels.orderNo">-->
<!-- <el-input v-model="searchData.orderNo" style="width: 273px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="getBaseList(26)"><a herf="#">{{labels.operatorID}}</a></span>-->
<!-- <el-input v-model="searchData.operatorID" style="width: 130px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="getBaseList(24)"><a herf="#">{{labels.workCenterNo}}</a></span>-->
<!-- <el-input v-model="searchData.workCenterNo" style="width: 130px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item >
<!-- <span slot="label" style="" @click="getBaseList(88)"><a herf="#">{{labels.sResourceID}}</a></span>-->
<!-- <el-input v-model="searchData.sResourceID" style="width: 130px"></el-input>-->
<el-button @click="getData()" type="primary" style="margin-left: 2px;margin-top: 20px">{{buttons.search}}</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">
{{ buttons.download }}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :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"
: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>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js"
import {
searchProductionLineOutputReport
} from "@/api/shopOrder/productionReport.js"
import Chooselist from '@/views/modules/common/Chooselist'
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
import {searchSfdcRollsReport} from "../../../../api/shopOrder/productionReport";
var functionId='104003003';
export default {
//-线
name: "searchProductionLineOutputReport",
components: {
Chooselist
},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
this.searchData.orderNo = this.searchData.orderNo.toUpperCase()
this.searchData.operatorID = this.searchData.operatorID.toUpperCase()
this.searchData.sResourceID = this.searchData.sResourceID.toUpperCase()
this.searchData.workCenterNo = this.searchData.workCenterNo.toUpperCase()
}
}
},
data() {
return {
visible: false,
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "104003003Table",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "104003003Table",
status: true,
languageCode: this.$i18n.locale
},
labels: {
reportDate:'报告日期:',
placeholder:'选择日期',
to:'至:',
partNo:'产成品编码:',
partDescription:'产品名称:',
site:'工厂编码:',
orderNo:'生产订单号:',
operatorID:'操作员ID:',
workCenterNo:'加工中心:',
sResourceID:'派工机台编号:',
},
buttons:{
search:'查询',
download:'导出',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
tagNo:'',
// start
exportData: [],
exportName: "产线产量报告"+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["产线产量报告"],
exportFooter: [],
// end
height: 200,
modelFlag:false,
modelInputFlag:true,
selectList:[],
searchData: {
site:'',
partNo:'',
partDescription:'',
orderNo:'',
operatorID:'',
sResourceID:'',
workCenterNo:'',
date1:'',
date2:'',
user:this.$store.state.user.name
},
dataList:[],
dataListLoading: false,
columnList: [
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsSite',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "site",
headerAlign: "center",
align: "left",
columnLabel: "工厂编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsRollNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "rollNo",
headerAlign: "center",
align: "left",
columnLabel: "卷标签",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsRollQty',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "rollQty",
headerAlign: "center",
align: "left",
columnLabel: "卷数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsParentRollNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "parentRollNo",
headerAlign: "center",
align: "left",
columnLabel: "上级卷标签号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsParentRollType',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "parentRollType",
headerAlign: "center",
align: "left",
columnLabel: "上机卷标签类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsOrderNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "orderNo",
headerAlign: "center",
align: "left",
columnLabel: "来源工单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsCreatedOpsSeqNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "createdOpsSeqNo",
headerAlign: "center",
align: "left",
columnLabel: "来源派工单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsCreatedOpsItemNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "createdOpsItemNo",
headerAlign: "center",
align: "left",
columnLabel: "来源工序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsCreatedby',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "createdby",
headerAlign: "center",
align: "left",
columnLabel: "创建人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsCreatedDate',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "createdDate",
headerAlign: "center",
align: "left",
columnLabel: "创建时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsConsumeOrderNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "consumeOrderNo",
headerAlign: "center",
align: "left",
columnLabel: "消耗工单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsConsumeSeqNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "consumeSeqNo",
headerAlign: "center",
align: "left",
columnLabel: "消耗派工单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsConsumeItemNo',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "consumeItemNo",
headerAlign: "center",
align: "left",
columnLabel: "消耗工序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsDate1',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "date1",
headerAlign: "center",
align: "left",
columnLabel: "上机时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsDate2',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "date2",
headerAlign: "center",
align: "left",
columnLabel: "下机时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104003007,
serialNumber: '104003007TableSfdcRollsFinalStatus',
tableId: "104003007Table",
tableName: "订单产出标签报表",
columnProp: "finalStatus",
headerAlign: "center",
align: "left",
columnLabel: "状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
}
]
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 185;
})
},
methods: {
getBaseData(val){
if (this.tagNo === 5){
this.searchData.partNo = val.PartNo
}
if (this.tagNo === 18){
this.searchData.site = val.Site
}
if (this.tagNo === 26){
this.searchData.operatorID = val.OperatorID
}
if (this.tagNo === 24){
this.searchData.workCenterNo = val.WorkCenterNo
}
if (this.tagNo === 88){
this.searchData.sResourceID = val.ResourceID
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 5){
strVal = this.searchData.partNo
}
if (val === 18){
strVal = this.searchData.site
}
if (val === 26){
strVal = this.searchData.operatorID
}
if (val === 24){
strVal = this.searchData.workCenterNo
}
if (val === 88){
strVal = this.searchData.sResourceID
}
this.$refs.baseList.init(val,strVal)
})
},
getData(){
searchSfdcRollsReport(this.searchData).then(({data}) => {
this.dataList = data.rows
})
},
//excel
createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
getTableUserColumn(tableId) {
console.log(tableId)
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.columnList = data.rows
} else {
this.getColumnList()
}
})
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
},
created() {
// this.getMultiLanguageList()//
// this.getTableUserColumn()
}
}
</script>
<style >
.el-textarea__inner {
padding: 5px 5px;
}
</style>
Loading…
Cancel
Save