Browse Source

0823更新

master
ruanqi 4 years ago
parent
commit
c37ace6f66
  1. 2
      src/api/production/dailyPlan.js
  2. 2
      src/api/production/pallet.js
  3. 1648
      src/views/modules/production/dailyPlan.vue
  4. 856
      src/views/modules/production/search_schedule.vue

2
src/api/production/dailyPlan.js

@ -31,3 +31,5 @@ export const changeSoScheduledListSeqNo=data => createAPI(`/dailyPlan/changeSoS
export const resourceCapacityLoadingData=data => createAPI(`/dailyPlan/resourceCapacityLoadingData`,'post',data)
//
export const checkScheduleLoad=data => createAPI(`/dailyPlan/checkScheduleLoad`,'post',data)
// 获取
export const getProduceScheduleList = data => createAPI('/dailyPlan/getProduceScheduleData', 'POST', data)

2
src/api/production/pallet.js

@ -8,7 +8,7 @@ export const savePallet=data => createAPI(`/pallet/savePallet`,'post',data)
export const savePalletAdds=data => createAPI(`/pallet/savePalletAdds`,'post',data)
export const printPallet=data => createAPI(`/pallet/printPallet`,'post',data)
export const printSerialNo=data => createAPI(`/pallet/printSerialNo`,'post',data)
//获取位置数据
export const getLocationData=data => createAPI(`/pallet/getLocationData`,'post',data)
//保存位置数据

1648
src/views/modules/production/dailyPlan.vue
File diff suppressed because it is too large
View File

856
src/views/modules/production/search_schedule.vue

@ -0,0 +1,856 @@
<template>
<div class="customer-css">
<!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label="'工厂编号:'">
<el-input v-model="searchData.site" style="width: 85px"></el-input>
</el-form-item>
<el-form-item :label="'物料编码:'">
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'机台编号:'">
<el-input v-model="searchData.resourceId" style="width: 110px"></el-input>
</el-form-item>
<el-form-item :label="'计划日期:'">
<el-date-picker
style="width: 120px"
v-model="searchData.date1"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 120px"
v-model="searchData.date2"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'生产订单号:'">
<el-input v-model="searchData.orderNo" style="width: 120px" ></el-input>
</el-form-item>
<el-form-item :label="''" style="margin-left: -5px;">
<el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已关闭计划
</el-checkbox>
</el-form-item>
<el-form-item :label="' '" style="margin-left: -5px;">
<el-button type="primary" @click="refreshTables()" class="customer-bun-mid"
style="margin-left: 10px; margin-bottom: 5px;">查询
</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
导出
</download-excel>
</el-form-item>
<div class="mainTable">
<el-table :height="height"
:data="dataList"
:row-class-name="routingRowClassName2"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
prop=""
header-align="center"
align="center"
width="70"
label="操作">
<template slot-scope="scope" class="foo_container">
<a type="text" size="small" @click="printAction(scope.row)">打印标签</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="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>
</div>
</el-form>
</div>
</template>
<script>
import {
getProduceScheduleList
} from '@/api/production/dailyPlan.js'
import {
printSerialNo
} from '@/api/production/pallet.js'
export default {
name: 'search_schedule',
data () {
return {
// start
exportData: [],
exportName: "排产日计划清单"+this.dayjs().format('YYYYMMDDHHmmss'),
exportFooter: [],
// end
height:200,
dataList:[],
dataListLoading: false,
columnArray: [
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceScheduledDate',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "scheduledDate",
headerAlign: "center",
align: "left",
columnLabel: "排产日期",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceItemDesc',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "printFlag",
headerAlign: "center",
align: "left",
columnLabel: "是否打印",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceOrderNo',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "orderNo",
headerAlign: "center",
align: "left",
columnLabel: "生产订单号",
columnWidth: 120,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceItemNo',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "itemNo",
headerAlign: "center",
align: "right",
columnLabel: "工序号",
columnWidth: 50,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceItemDesc',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "itemDesc",
headerAlign: "center",
align: "left",
columnLabel: "工序描述",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceResourceId',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "resourceId",
headerAlign: "center",
align: "left",
columnLabel: "机台",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceTimeRequired',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "timeRequired",
headerAlign: "center",
align: "right",
columnLabel: "需求时间",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceTimeReported',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "timeReported",
headerAlign: "center",
align: "right",
columnLabel: "已报告时间",
columnWidth: 70,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyRequired',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "qtyRequired",
headerAlign: "center",
align: "right",
columnLabel: "需求数量",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyReported',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "qtyReported",
headerAlign: "center",
align: "right",
columnLabel: "已报告数量",
columnWidth: 70,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceNeedDate',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "needDate",
headerAlign: "center",
align: "left",
columnLabel: "生产订单要求完工日期",
columnWidth: 130,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceClosedFlag',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "closedFlag",
headerAlign: "center",
align: "left",
columnLabel: "已关闭",
columnWidth: 50,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProducePartNo',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "partNo",
headerAlign: "center",
align: "left",
columnLabel: "产品编码",
columnWidth: 110,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProducePartDesc',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "partDesc",
headerAlign: "center",
align: "left",
columnLabel: "产品名称",
columnWidth: 180,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceSpec',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "spec",
headerAlign: "center",
align: "left",
columnLabel: "规格型号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceSeqNo',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "seqNo",
headerAlign: "center",
align: "right",
columnLabel: "次序号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyApprove',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "qtyApprove",
headerAlign: "center",
align: "right",
columnLabel: "合格数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
// {
// userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceBarcodeId',
// tableId: "5302Produce",
// tableName: "",
// columnProp: "barcodeId",
// headerAlign: "center",
// align: "left",
// columnLabel: "",
// columnWidth: 80,
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: false
// },
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceRemark',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "remark",
headerAlign: "center",
align: "left",
columnLabel: "备注",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceCrewSize',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "crewSize",
headerAlign: "center",
align: "right",
columnLabel: "操作工人数",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceQtyScrapt',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "qtyScrapt",
headerAlign: "center",
align: "right",
columnLabel: "报废数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceOutWorkFlag',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "outWorkFlag",
headerAlign: "center",
align: "left",
columnLabel: "是否外协",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
// {
// userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceScheduledSeqNo',
// tableId: "5302Produce",
// tableName: "",
// columnProp: "scheduledSeqNo",
// headerAlign: "center",
// align: "right",
// columnLabel: "",
// columnWidth: 80,
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: false
// },
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceShiftNo',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "shiftNo",
headerAlign: "center",
align: "left",
columnLabel: "班次",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceMachSetupTime',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "machSetupTime",
headerAlign: "center",
align: "right",
columnLabel: "调机时间",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceMachRunFactor',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "machRunFactor",
headerAlign: "center",
align: "right",
columnLabel: "单位产出",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceFactorUnit',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "factorUnit",
headerAlign: "center",
align: "right",
columnLabel: "产出单位",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceEfficiency',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "efficiency",
headerAlign: "center",
align: "right",
columnLabel: "效率",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceSite',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "site",
headerAlign: "center",
align: "left",
columnLabel: "工厂编号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceParkFlag',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "parkFlag",
headerAlign: "center",
align: "left",
columnLabel: "暂停",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
// {
// userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceCustomerName',
// tableId: "5302Produce",
// tableName: "",
// columnProp: "customerName",
// headerAlign: "center",
// align: "center",
// columnLabel: "",
// columnWidth: 80,
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: false
// },
// {
// userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceCustPartNo',
// tableId: "5302Produce",
// tableName: "",
// columnProp: "custPartNo",
// headerAlign: "center",
// align: "center",
// columnLabel: "",
// columnWidth: 80,
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: false
// },
// {
// userId: this.$store.state.user.name,
// functionId: 5302,
// serialNumber: '5302ProduceQtyRequiredOriginal',
// tableId: "5302Produce",
// tableName: "",
// columnProp: "qtyRequiredOriginal",
// headerAlign: "center",
// align: "center",
// columnLabel: "",
// columnWidth: 80,
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: false
// },
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceClosedBy',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "closedBy",
headerAlign: "center",
align: "left",
columnLabel: "关闭人",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceClosedDate',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "closedDate",
headerAlign: "center",
align: "left",
columnLabel: "关闭日期",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceCostRollUpFlag',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "costRollUpFlag",
headerAlign: "center",
align: "left",
columnLabel: "已排料",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
searchData:{
site:'',
partNo:'',
resourceId:'',
date1:'',
date2:'',
orderNo:'',
closedFlag:'',
},
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 160
})
},
methods: {
//excel
createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnArray.forEach((item, index) => {
if (index == this.columnArray.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
refreshTables(){
getProduceScheduleList(this.searchData).then(({data}) => {
//
this.dataList = data.rows;
})
},
printAction(row){
let array=[];
let data={
site:row.site,
orderNo:row.orderNo,
itemNo:row.itemNo,
scheduleDate:row.scheduledDate,
shiftNo:row.shiftNo,
}
array.push(data);
printSerialNo(array).then(({data}) => {
if(data.code===200){
this.$message({
message: '打印成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
},
routingRowClassName2({row, rowIndex}){
//
if(row.printFlag=="Y"){
return 'customer-row-2';
}
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save