LAPTOP-R6EHHS26\86155 9 months ago
commit 5535e3f22c

@ -81,6 +81,14 @@ export function getLineChartData() {
method: 'get' method: 'get'
}); });
} }
// 获取组线每月设备故障数
export function getGroupLineEquInfo() {
return request({
url: '/device/deviceInterface/getGroupLineEquInfo',
method: 'get'
});
}
//查询设备小时表头 //查询设备小时表头
export function getHourProductionTitle(query) { export function getHourProductionTitle(query) {
return request({ return request({
@ -115,7 +123,7 @@ export function getMesListUser(query) {
method: 'get', method: 'get',
params: query params: query
}); });
} }
//查询工单列表 //查询工单列表
export function getMesListWorkOrder(query) { export function getMesListWorkOrder(query) {
@ -124,7 +132,7 @@ export function getMesListWorkOrder(query) {
method: 'get', method: 'get',
params: query params: query
}); });
} }
//查询线体列表 //查询线体列表
export function getMesListEquip(query) { export function getMesListEquip(query) {
@ -133,7 +141,7 @@ export function getMesListEquip(query) {
method: 'get', method: 'get',
params: query params: query
}); });
} }
//报工按钮 //报工按钮
export function reportSap(workorderCode) { export function reportSap(workorderCode) {
const data = { const data = {

@ -25,6 +25,14 @@ export function addOutorder(data) {
data: data data: data
}); });
} }
// 用于出库任务页面--查询
export function getOutorderOUT(data) {
return request({
url: '/wms/order/PurchaseOrderOutboundPda',
method: 'post',
data: data
});
}
// 修改包材出库单 // 修改包材出库单
export function updateOutorder(data) { export function updateOutorder(data) {
@ -65,4 +73,12 @@ export function addPurchaseOrderOutbound(data) {
method: 'post', method: 'post',
data: data data: data
}); });
} }
// 新增
export function OutboundPostingSAP(data) {
return request({
url: '/wms/order/OutboundPostingSAP',
method: 'post',
data: data
});
}

@ -0,0 +1,101 @@
<template>
<div>
<div ref="chart" style="width:50%;height:376px"></div>
</div>
</template>
<script>
import {getGroupLineEquInfo} from "@/api/mes/reportWork";
export default {
data() {
return{
}
},
mounted() {
this.getGroupLineEquInfo();
this.getEchartData();
},
methods: {
getGroupLineEquInfo(){
getGroupLineEquInfo().then(response => {
var info = response.data;
var groupLineNames = [];
for (let i = 0; i < info.length; i++) {
// 线
groupLineNames.push(info[i].name);
info[i].type = 'line';
info[i].smooth = true;
info[i].stack = 'Total';
}
//
var monthTemp = ['一月', '二月', '三月', '四月', '五月', '六月', '七月','八月','九月','十月','十一月','十二月']
monthTemp.splice(new Date().getMonth()+1)
const chart = this.$refs.chart
if (chart) {
const myChart = this.$echarts.init(chart)
const option = {
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data: groupLineNames
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: monthTemp
},
yAxis: {
type: 'value'
},
series: info
}
myChart.setOption(option)
window.addEventListener("resize", function() {
myChart.resize()
})
}
this.$on('hook:destroyed',()=>{
window.removeEventListener("resize", function() {
myChart.resize();
});
})
});
},
getEchartData() {
},
},
watch: {},
created() {
}
}
</script>

@ -343,6 +343,12 @@
prop="workReason" prop="workReason"
width="300" width="300"
/> />
<el-table-column
label="维修处理措施"
align="center"
prop="repairMeasures"
width="300"
/>
<el-table-column <el-table-column
label="维修开始时间" label="维修开始时间"
align="center" align="center"
@ -1093,6 +1099,19 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="处理措施" prop="repairMeasures">
<el-input
v-model="form.repairMeasures"
placeholder="请输入处理措施"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 940px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="故障图片" prop="afterRepairFile"> <el-form-item label="故障图片" prop="afterRepairFile">
@ -1423,6 +1442,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="处理措施" prop="repairMeasures">
<el-input
disabled
v-model="form.repairMeasures"
placeholder="请输入处理措施"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 940px"
/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="查看备件申领记录"> <el-tab-pane label="查看备件申领记录">
<!-- 使用备件领用记录 --> <!-- 使用备件领用记录 -->

@ -22,6 +22,12 @@
</el-row> </el-row>
<el-divider /> <el-divider />
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :sm="12" :lg="24">
<span style="font-size: 20px;margin: 20%;color: cadetblue;">{{deviceTitle}}</span>
</el-col>
</el-row>
<el-row :gutter="20">
<DeviceChartLine :chart-data="deviceChartLineData" ref="DeviceChartLine"/>
</el-row> </el-row>
</div> </div>
</template> </template>
@ -30,10 +36,12 @@
import LineChart from './dashboard/LineChart'; import LineChart from './dashboard/LineChart';
import PieChart from './dashboard/PieChart'; import PieChart from './dashboard/PieChart';
import PieChart2 from './dashboard/PieChart2'; import PieChart2 from './dashboard/PieChart2';
import {getLineChartData} from '@/api/mes/reportWork' import {getGroupLineEquInfo, getLineChartData} from '@/api/mes/reportWork'
import DeviceChartLine from "./dashboard/DeviceChartLine";
export default { export default {
name: "Index", name: "Index",
components: { components: {
DeviceChartLine,
LineChart//,PieChart,PieChart2 LineChart//,PieChart,PieChart2
}, },
data() { data() {
@ -41,11 +49,14 @@ export default {
// //
version: "1.0.0", version: "1.0.0",
lineChartData: null, lineChartData: null,
title:"本月工厂产量" deviceChartLineData:null,
title:"本月工厂产量",
deviceTitle: "各组线月设备故障数"
}; };
}, },
created() { created() {
this.getLineChartData(); this.getLineChartData();
this.getGroupLineEquInfo();
}, },
methods: { methods: {
goTarget(href) { goTarget(href) {
@ -55,6 +66,11 @@ export default {
getLineChartData().then(data => { getLineChartData().then(data => {
this.lineChartData = data; this.lineChartData = data;
}); });
},
getGroupLineEquInfo(){
getGroupLineEquInfo().then(response => {
this.deviceChartLineData = response.data;
});
} }
}, },
}; };

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20">
<MaterialGroupAdd ref="MaterialGroupAdd" @onNodeClick="onNodeClick" @child-event="getCheckTypeList"></MaterialGroupAdd> <MaterialGroupAdd ref="MaterialGroupAdd" @onNodeClick="onNodeClick" @child-event="getCheckTypeList"></MaterialGroupAdd>
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="23" :xs="24"> <el-col :span="23" :xs="24">
<el-tabs v-model="editableTabsValue" type="card" @tab-click="handleClick"> <el-tabs v-model="editableTabsValue" type="card" @tab-click="handleClick">
@ -125,7 +125,7 @@
@change="handleStatusChange(scope.row)" @change="handleStatusChange(scope.row)"
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -331,7 +331,7 @@ export default {
}); });
}, },
/**初始化表格信息 */ /**初始化表格信息 */
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -367,6 +367,9 @@ export default {
}, },
/**物料树点击 */ /**物料树点击 */
onNodeClick(obj) { onNodeClick(obj) {
console.log("数据在这里")
console.log(obj)
console.log(12312312312321)
if(obj.level == 1) { if(obj.level == 1) {
this.queryParams.groupId = obj.id; this.queryParams.groupId = obj.id;
this.groupId = obj.id; this.groupId = obj.id;
@ -421,8 +424,8 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
if(this.groupId==null||this.materialCode){ if(this.groupId==null&&this.materialCode==null){
this.$modal.msgError("请点击左侧节点"); this.$modal.msgError("请点击左侧节点");
return return
}; };
@ -459,7 +462,7 @@ export default {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} }
} }
}); });
@ -512,7 +515,7 @@ export default {
} }
}); });
} }
this.editableTabsValue = activeName; this.editableTabsValue = activeName;
this.editableTabs = tabs.filter(tab => tab.name !== targetName); this.editableTabs = tabs.filter(tab => tab.name !== targetName);
} }
@ -541,14 +544,14 @@ export default {
onSelectProjects(objs) { onSelectProjects(objs) {
let _this = this; let _this = this;
objs.forEach(function(item,index,arr){ objs.forEach(function(item,index,arr){
item.projectId = item.id; item.projectId = item.id;
item.projectNo = item.orderNum; item.projectNo = item.orderNum;
item.unit = item.unitCode; item.unit = item.unitCode;
item.standardValue = item.checkStandard; item.standardValue = item.checkStandard;
item.typeId = _this.queryParams.typeId; item.typeId = _this.queryParams.typeId;
item.groupId = _this.groupId; item.groupId = _this.groupId;
item.materialCode = _this.materialCode; item.materialCode = _this.materialCode;
}); });
submitProjects(objs).then(response => { submitProjects(objs).then(response => {
this.$modal.msgSuccess("提交成功"); this.$modal.msgSuccess("提交成功");

@ -104,7 +104,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" :index='indexMethod'> </el-table-column> <el-table-column label="序号" type="index" :index='indexMethod'> </el-table-column>
<el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" /> <el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" />
<el-table-column label="ID" align="center" prop="ID" v-if="false" /> <el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="采购单号" align="center" prop="procureCode" /> <el-table-column label="采购单号" align="center" prop="procureCode" />
<el-table-column label="物料编码" align="center" prop="materialCode" /> <el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料描述" align="center" prop="materialDesc" /> <el-table-column label="物料描述" align="center" prop="materialDesc" />
@ -356,7 +356,7 @@ export default {
reset() { reset() {
this.form = { this.form = {
siteCode: null, siteCode: null,
ID: null, id: null,
procureCode: null, procureCode: null,
materialCode: null, materialCode: null,
materialDesc: null, materialDesc: null,
@ -401,7 +401,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -414,7 +414,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const ID = row.ID || this.ids const ID = row.id || this.ids
getOrder(ID).then(response => { getOrder(ID).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
@ -425,7 +425,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.ID != null) { if (this.form.id != null) {
updateOrder(this.form).then(response => { updateOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -443,7 +443,7 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const IDs = row.ID || this.ids; const IDs = row.id || this.ids;
this.$modal.confirm('是否确认删除包材采购单编号为"' + IDs + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除包材采购单编号为"' + IDs + '"的数据项?').then(function() {
return delOrder(IDs); return delOrder(IDs);
}).then(() => { }).then(() => {

@ -26,14 +26,14 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['wms:outorder:add']">新增</el-button> v-hasPermi="['wms:outorder:add']">新增</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" <el-button type="success" plain icon="el-icon-edit" size="mini" @click="handleSAP"
v-hasPermi="['wms:outorder:edit']">修改</el-button> >过账</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['wms:outorder:remove']">删除</el-button> v-hasPermi="['wms:outorder:remove']">删除</el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['wms:outorder:export']">导出</el-button> v-hasPermi="['wms:outorder:export']">导出</el-button>
@ -57,15 +57,31 @@
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" prop="unit" v-if="false" /> <el-table-column label="单位" align="center" prop="unit" v-if="false" />
<el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="出库数量" align="center" prop="outNumber" /> <el-table-column label="出库数量" align="center" prop="outNumber" />
<el-table-column label="托盘号" align="center" prop="userDefined2" /> <el-table-column label="托盘号" align="center" prop="userDefined2" />
<el-table-column label="库位" align="center" prop="locCode" /> <el-table-column label="仓库编号" align="center" prop="locCode" />
<el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" /> <el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" />
<el-table-column label="产线名称" align="center" prop="productionLineDesc" v-if="false" /> <el-table-column label="产线名称" align="center" prop="productionLineDesc" v-if="false" />
<el-table-column label="产线" align="center" prop="productionLineCode" /> <el-table-column label="产线" align="center" prop="productionLineCode" />
<el-table-column label="状态" align="center" prop="orderStatus" /> <el-table-column label="状态" align="center" prop="orderStatus">
<template slot-scope="scope">
<span v-if="scope.row.orderStatus === '1'"></span>
<span v-else-if="scope.row.orderStatus === '2'">进行中</span>
<span v-else-if="scope.row.orderStatus === '3'">完成</span>
</template>
</el-table-column>
<el-table-column label="反冲标识" align="center" prop="userDefined3" />
<el-table-column label="sap过账状态" align="center" prop="userDefined10">
<template slot-scope="scope">
<span v-if="scope.row.userDefined10 === '1'"></span>
<span v-else-if="scope.row.userDefined10 === '2'">过账成功</span>
<span v-else-if="scope.row.userDefined10 === '3'">过账失败</span>
</template>
</el-table-column>
<el-table-column label="sap过账信息" align="center" prop="userDefined11" />
<el-table-column label="操作人" align="center" prop="createBy" /> <el-table-column label="操作人" align="center" prop="createBy" />
<el-table-column label="操作时间" align="center" prop="createDate" width="180"> <el-table-column label="操作时间" align="center" prop="createDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -114,7 +130,18 @@
<el-table-column label="物料描述" align="center" prop="materialDesc" /> <el-table-column label="物料描述" align="center" prop="materialDesc" />
<el-table-column label="物料编号" align="center" prop="materialCode" /> <el-table-column label="物料编号" align="center" prop="materialCode" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="数量" align="center" prop="planNumber" /> <el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="出库数量" align="center" prop="outNumber" />
<el-table-column label="剩余数量" align="center">
<template slot-scope="scope">
{{ scope.row.planNumber - scope.row.outNumber }}
</template>
</el-table-column>
<el-table-column label="操作数量" align="center" width="180">
<template slot-scope="scope">
<el-input v-model="scope.row.qty" @change="handleQtyChange(scope.row, $event)"></el-input>
</template>
</el-table-column>
<el-table-column label="包装线" align="center" prop="stationNo" width="180"> <el-table-column label="包装线" align="center" prop="stationNo" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.stationNo" placeholder="请选择包装线" @change="change1(scope.row)" clearable <el-select v-model="scope.row.stationNo" placeholder="请选择包装线" @change="change1(scope.row)" clearable
@ -135,7 +162,7 @@
</template> </template>
<script> <script>
import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK } from "@/api/wms/outorder"; import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK ,OutboundPostingSAP} from "@/api/wms/outorder";
export default { export default {
name: "Outorder", name: "Outorder",
@ -169,6 +196,7 @@ export default {
materialDesc: null, materialDesc: null,
planDate: null, planDate: null,
planNumber: null, planNumber: null,
qty: null,
Unit: null, Unit: null,
outNumber: null, outNumber: null,
locCode: null, locCode: null,
@ -203,11 +231,16 @@ export default {
produceCode: '', produceCode: '',
warehouseNo: '', warehouseNo: '',
}, },
queryParams2: { queryParams2: {
orderNo: '', orderNo: '',
ken:'',
warehouseNo: '', warehouseNo: '',
orderLines:[], list:[],
}, },
queryParams3:{
ID: '',
},
// //
form: {}, form: {},
// //
@ -303,7 +336,7 @@ export default {
}); });
}, },
handleSelectionChange1(selection) { handleSelectionChange1(selection) {
this.ids = selection.map(item => item.ID) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
this.selectedRows = selection; this.selectedRows = selection;
@ -320,6 +353,7 @@ export default {
this.reset(); this.reset();
this.queryForm = {} this.queryForm = {}
}, },
// //
reset() { reset() {
this.form = { this.form = {
@ -330,6 +364,7 @@ export default {
materialDesc: null, materialDesc: null,
planDate: null, planDate: null,
planNumber: null, planNumber: null,
qty: null,
Unit: null, Unit: null,
outNumber: null, outNumber: null,
locCode: null, locCode: null,
@ -377,11 +412,19 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
handleQtyChange(row, event) {
// row qty
row.qty = event;
//
// this.saveQtyToServer(row.id, event);
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
@ -400,6 +443,15 @@ export default {
this.title = "修改包材出库单"; this.title = "修改包材出库单";
}); });
}, },
handleSAP(row){
console.log(this.ids)
let postData = this.ids.map(id => ({ id: id }));
console.log(postData)
OutboundPostingSAP(JSON.stringify(postData)).then(response => {
this.$modal.msgSuccess("操作完成");
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
const _this = this const _this = this
@ -410,6 +462,18 @@ export default {
_this.$modal.msgError("请选择"); _this.$modal.msgError("请选择");
return return
} }
let tem=""
_this.selectedRows.forEach(function(row) {
// row
if (row.outNumber === row.planNumber) {
_this.$modal.msgError("已经出完");
tem="0"
}
});
if (tem=="0"){
return
}
var bull = _this.selectedRows.some((item) => { var bull = _this.selectedRows.some((item) => {
// console.log(item.stationNo == undefined || item.stationNo == '',item.stationNo) // console.log(item.stationNo == undefined || item.stationNo == '',item.stationNo)
return item.stationNo == undefined || item.stationNo == '' return item.stationNo == undefined || item.stationNo == ''
@ -426,14 +490,14 @@ export default {
// }); // });
} else { } else {
this.queryParams2.orderNo = this.queryParams1.produceCode this.queryParams2.orderNo = this.queryParams1.produceCode
this.queryParams2.warehouseCode = this.queryParams1.warehouseCode this.queryParams2.warehouseNo = this.queryParams1.warehouseNo
this.queryParams2.orderLines = _this.selectedRows this.queryParams2.list = _this.selectedRows
addPurchaseOrderOutbound(_this.queryParams2).then(response => { this.queryParams2.ken= 2
if (response.data) { addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}
}); });
} }

Loading…
Cancel
Save