Browse Source

Merge remote-tracking branch 'origin/master'

master
zelian_wu 2 years ago
parent
commit
dccb065627
  1. 1
      src/api/production/generateReport.js
  2. 458
      src/views/modules/production/liuhuaProductView.vue
  3. 2
      src/views/modules/production/shopOrderProductView.vue

1
src/api/production/generateReport.js

@ -53,6 +53,7 @@ export const getBadCodeList=data => createAPI(`dailyPlan/getBadCodeList`, 'post'
export const printDefectCard=data => createAPI(`dailyPlan/printDefectCard`, 'post', data)
export const getOrderView=data => createAPI(`dailyPlan/getOrderView`, 'post', data)
export const getLiuhuaView=data => createAPI(`dailyPlan/getLiuhuaView`, 'post', data)
export const selectSFDCToolHist = data =>createAPI(`dailyPlan/selectToolHist`,'post',data)
export const selectToolingHist = data =>createAPI(`dailyPlan/selectToolingHist`,'post',data)

458
src/views/modules/production/liuhuaProductView.vue

@ -0,0 +1,458 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'工厂编码'">
<el-input v-model="searchData.site" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'生产订单号'">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'派工单号'">
<el-input v-model="searchData.seqNo" type="number" style="width: 130px"></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span>
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'规格型号'">
<el-input v-model="searchData.partSpec" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'派工日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'到:'">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
<el-button @click="search()" type="primary">查询</el-button>
<download-excel
:fields="fields()"
type="xls"
:name="exportName"
:fetch="createExportData"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ '导出' }}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="tableData"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
header-align="center"
: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>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 100, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getLiuhuaView,
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
name: 'searchSfdc',
components: {
Chooselist
},
data () {
return {
pageIndex: 1,
pageSize: 20,
totalPage: 0,
site: this.$store.state.user.site,
// + start
exportData: [],
userDev:this.$store.state.user.userDev,
exportName: "半成品派工单追踪表"+this.getStrDate(),
columnList: [
{
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "site",
columnLabel: "工厂",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 20,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'left'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "seqNo",
columnLabel: "派工单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'left'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "orderNo",
columnLabel: "生产订单",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 80,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'left'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "partSpec",
columnLabel: "规格型号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 120,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'left'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "qtyRequired",
columnLabel: "派工数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "qtyReported",
columnLabel: "报工数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "xiubianWancheng",
columnLabel: "修边完成率",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "hongkaoWancheng",
columnLabel: "烘烤完成率",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "jiagongWancheng",
columnLabel: "加工完成率",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "jianyanWancheng",
columnLabel: "检验完成率",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "baozhuangWancheng",
columnLabel: "包装完成率",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}, {
tableId: "liuhuaView",
tableName: this.$route.meta.title,
columnProp: "liuhuaWancheng",
columnLabel: "总完成率",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 60,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: '',
serialNumber: null,
columnType: null,
align: 'right'
}
],
visible:false,
// end
height: 200,
tableData: [],
exportList: [],
searchData: {
page: 1,
limit: 20,
site:'',
orderNo: '',
partNo: '',
partSpec:'',
startDate:'',
endDate:'',
seqNo:'',
},
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 240
})
},
methods: {
// S
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 24) {
strVal = this.searchData.workCenterNo
}
if (val === 5) {
strVal = this.searchData.partNo
}
if (val === 26) {
strVal = this.searchData.operatorName
}
if (val === 88) {
strVal = this.searchData.resourceId
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 24) {
this.searchData.workCenterNo = val.WorkCenterNo
} else if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
}
if (this.tagNo === 26) {
this.searchData.operatorName = val.OperatorName
}
if (this.tagNo === 88) {
this.searchData.resourceId = val.ResourceID
}
},
search() {
if (this.searchData.site === ''&&this.searchData.orderNo === ''&&this.searchData.partNo === ''&&this.searchData.partSpec === ''&&this.searchData.startDate === ''&&this.searchData.endDate === ''&&this.searchData.seqNo === ''){
this.$alert('计算量过大,请至少填写一个筛选条件!', '错误', {
confirmButtonText: '确定'
})
return false;
}
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
getLiuhuaView(this.searchData).then(({data}) => {
if (data.code == 0) {
this.tableData = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
},
// +
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
},
async createExportData() {
// ,,
this.searchData.limit = -1
this.searchData.page = 1
await getLiuhuaView(this.searchData).then(({data}) => {
this.exportList= data.page.list;
})
return this.exportList;
},
getStrDate() {
let dd = new Date();
let Y = dd.getFullYear();
let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//100
let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//100
let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours();
let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes();
let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds();
return Y + M + D + H + MM + S;
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.search()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.search()
},
},
created () {
// this.getTableUserColumn()
}
}
</script>
<style scoped>
.input_left{
text-align: left;
}
.input_reight{
text-align: right;
}
/deep/ input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type='number'] {
-moz-appearance: textfield !important;
}
</style>

2
src/views/modules/production/shopOrderProductView.vue

@ -392,7 +392,7 @@
},
search () {
if (this.site === ''&&this.orderNo === ''&&this.partNo === ''&&this.partSpec === ''&&this.startDate === ''&&this.endDate === ''&&this.closedFlag === ''){
if (this.searchData.site === ''&&this.searchData.orderNo === ''&&this.searchData.partNo === ''&&this.searchData.partSpec === ''&&this.searchData.startDate === ''&&this.searchData.endDate === ''&&this.searchData.closedFlag === ''){
this.$alert('计算量过大,请至少填写一个筛选条件!', '错误', {
confirmButtonText: '确定'
})

Loading…
Cancel
Save