commit
e6c68d7520
64
src/api/mes/md/pallet.js
Normal file
64
src/api/mes/md/pallet.js
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 分页查询托盘设置列表
|
||||||
|
export function listMdItem(query) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/findProPallet",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增托盘设置
|
||||||
|
export function addMdItem(data) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/addProPallet",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改托盘设置
|
||||||
|
export function updateMdItem(data) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/updateProPallet",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除托盘设置
|
||||||
|
export function delMdItem(data) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/deleteProPallet",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量删除托盘设置
|
||||||
|
export function batchDeleteProPallet(itemId) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/batchDeleteProPallet" + "?proPalletIds=" + itemId,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自动生成托盘编码
|
||||||
|
export function findPalletCode(query) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/findPalletCode",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 托盘设置导出
|
||||||
|
export function exportProPallet(query) {
|
||||||
|
return request({
|
||||||
|
url: "/propallet/exportProPallet",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -45,10 +45,11 @@ export function confirmItemrecpt(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//执行入库
|
//执行入库
|
||||||
export function execute(recptId) {
|
export function storage(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/mes/wm/itemrecpt/' + recptId,
|
url: '/wmMatter/storage',
|
||||||
method: 'put'
|
method: 'post',
|
||||||
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
src/assets/images/biaotixiugai.png
Normal file
BIN
src/assets/images/biaotixiugai.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/images/return.png
Normal file
BIN
src/assets/images/return.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 183 KiB |
BIN
src/assets/images/zhubeijing.png
Normal file
BIN
src/assets/images/zhubeijing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 594 KiB |
@ -161,7 +161,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
showFlag:false,
|
showFlag:false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: false,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
selectedId: null,
|
selectedId: null,
|
||||||
selectedRow: null,
|
selectedRow: null,
|
||||||
@ -244,16 +244,19 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listWmstock(this.queryParams).then(response => {
|
listWmstock(this.queryParams).then(response => {
|
||||||
if(response.rows){
|
// if(response.rows){
|
||||||
if(this.warehouseCode.indexOf('VIR') == -1){
|
// if(this.warehouseCode.indexOf('VIR') == -1){
|
||||||
//如果不是查询线边库的物资,则在查询结果中过滤掉线边库的数据
|
// //如果不是查询线边库的物资,则在查询结果中过滤掉线边库的数据
|
||||||
this.wmstockList = response.rows.filter((el) =>{
|
// this.wmstockList = response.rows.filter((el) =>{
|
||||||
return el.warehouseCode.indexOf('VIR') == -1;
|
// return el.warehouseCode.indexOf('VIR') == -1;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
// this.total = response.total;
|
||||||
|
// this.loading = false;
|
||||||
|
// }
|
||||||
|
this.wmstockList = response.rows
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询分类下拉树结构 */
|
/** 查询分类下拉树结构 */
|
||||||
|
162
src/views/mes/dv/largeScreen/components/AGVrate.vue
Normal file
162
src/views/mes/dv/largeScreen/components/AGVrate.vue
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||||
|
<div id="AGVrate" style="width: 100%; height: 150px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { echarts, Treeselect },
|
||||||
|
props: ["message"], // 声明一个自定义的属性
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
echartData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
message: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
// console.log(val,'差点撒旦阿萨=============');
|
||||||
|
this.echartData = val;
|
||||||
|
// val.forEach((item) => {
|
||||||
|
// this.getDataNum.push(Number(item.ytdUvNew))
|
||||||
|
// this.getDataTime.push(moment(item.dt).format('YYYY-MM-DD'))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
|
//这里需要重新加载渲染
|
||||||
|
this.drawLine();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.drawLine();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drawLine() {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById("AGVrate"));
|
||||||
|
|
||||||
|
let value = "10%";
|
||||||
|
let title = "设备在线率";
|
||||||
|
var option = {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
text: "{a|" + value + "}\n{c|" + title + "}",
|
||||||
|
x: "center",
|
||||||
|
top: "35%",
|
||||||
|
textStyle: {
|
||||||
|
rich: {
|
||||||
|
a: {
|
||||||
|
fontSize: 15,
|
||||||
|
color: "#ffffff",
|
||||||
|
},
|
||||||
|
c: {
|
||||||
|
fontSize: 10,
|
||||||
|
color: "#ffffff",
|
||||||
|
padding: [5, 0],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// backgroundColor: "#111",
|
||||||
|
polar: {
|
||||||
|
radius: ["70%", "95%"],
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
},
|
||||||
|
angleAxis: {
|
||||||
|
max: 100,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
type: "category",
|
||||||
|
show: true,
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "bar",
|
||||||
|
roundCap: true,
|
||||||
|
barWidth: 90,
|
||||||
|
showBackground: true,
|
||||||
|
backgroundStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .3)",
|
||||||
|
},
|
||||||
|
data: [10],
|
||||||
|
coordinateSystem: "polar",
|
||||||
|
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '',
|
||||||
|
// type: 'pie',
|
||||||
|
// startAngle: 80,
|
||||||
|
// radius: ['6%'],
|
||||||
|
// hoverAnimation: false,
|
||||||
|
// center: ['50%', '50%'],
|
||||||
|
// itemStyle: {
|
||||||
|
// color: 'rgba(66, 66, 66, .1)',
|
||||||
|
// borderWidth: 1,
|
||||||
|
// borderColor: '#5269EE',
|
||||||
|
// },
|
||||||
|
// data: [100],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "pie",
|
||||||
|
startAngle: 80,
|
||||||
|
radius: ["100%"],
|
||||||
|
hoverAnimation: false,
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
itemStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .1)",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: "#5269EE",
|
||||||
|
},
|
||||||
|
data: [100],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
padding: 0px !important;
|
||||||
|
min-height: calc(0vh - 0px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
153
src/views/mes/dv/largeScreen/components/fault.vue
Normal file
153
src/views/mes/dv/largeScreen/components/fault.vue
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||||
|
<div id="fault" style="width: 100%; height: 70px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { echarts, Treeselect },
|
||||||
|
props: ["message"], // 声明一个自定义的属性
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
echartData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
message: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
// console.log(val,'差点撒旦阿萨=============');
|
||||||
|
this.echartData = val;
|
||||||
|
// val.forEach((item) => {
|
||||||
|
// this.getDataNum.push(Number(item.ytdUvNew))
|
||||||
|
// this.getDataTime.push(moment(item.dt).format('YYYY-MM-DD'))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
|
//这里需要重新加载渲染
|
||||||
|
this.drawLine();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.drawLine();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drawLine() {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById("fault"));
|
||||||
|
|
||||||
|
var option = {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
text: "1%",
|
||||||
|
x: "center",
|
||||||
|
top: "35%",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: "15",
|
||||||
|
color: "#FFFFFF",
|
||||||
|
fontFamily: "DINAlternate-Bold, DINAlternate",
|
||||||
|
foontWeight: "100",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// backgroundColor: "#111",
|
||||||
|
polar: {
|
||||||
|
radius: ["75%", "90%"],
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
},
|
||||||
|
angleAxis: {
|
||||||
|
max: 100,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
type: "category",
|
||||||
|
show: true,
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "bar",
|
||||||
|
roundCap: true,
|
||||||
|
barWidth: 90,
|
||||||
|
showBackground: true,
|
||||||
|
backgroundStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .3)",
|
||||||
|
},
|
||||||
|
data: [1],
|
||||||
|
coordinateSystem: "polar",
|
||||||
|
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '',
|
||||||
|
// type: 'pie',
|
||||||
|
// startAngle: 80,
|
||||||
|
// radius: ['6%'],
|
||||||
|
// hoverAnimation: false,
|
||||||
|
// center: ['50%', '50%'],
|
||||||
|
// itemStyle: {
|
||||||
|
// color: 'rgba(66, 66, 66, .1)',
|
||||||
|
// borderWidth: 1,
|
||||||
|
// borderColor: '#5269EE',
|
||||||
|
// },
|
||||||
|
// data: [100],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "pie",
|
||||||
|
startAngle: 80,
|
||||||
|
radius: ["100%"],
|
||||||
|
hoverAnimation: false,
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
itemStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .1)",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: "#5269EE",
|
||||||
|
},
|
||||||
|
data: [100],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
padding: 0px !important;
|
||||||
|
min-height: calc(0vh - 0px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
153
src/views/mes/dv/largeScreen/components/offline.vue
Normal file
153
src/views/mes/dv/largeScreen/components/offline.vue
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||||
|
<div id="offline" style="width: 100%; height: 70px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { echarts, Treeselect },
|
||||||
|
props: ["message"], // 声明一个自定义的属性
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
echartData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
message: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
// console.log(val,'差点撒旦阿萨=============');
|
||||||
|
this.echartData = val;
|
||||||
|
// val.forEach((item) => {
|
||||||
|
// this.getDataNum.push(Number(item.ytdUvNew))
|
||||||
|
// this.getDataTime.push(moment(item.dt).format('YYYY-MM-DD'))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
|
//这里需要重新加载渲染
|
||||||
|
this.drawLine();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.drawLine();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drawLine() {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById("offline"));
|
||||||
|
|
||||||
|
var option = {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
text: "5%",
|
||||||
|
x: "center",
|
||||||
|
top: "35%",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: "15",
|
||||||
|
color: "#FFFFFF",
|
||||||
|
fontFamily: "DINAlternate-Bold, DINAlternate",
|
||||||
|
foontWeight: "100",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// backgroundColor: "#111",
|
||||||
|
polar: {
|
||||||
|
radius: ["75%", "90%"],
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
},
|
||||||
|
angleAxis: {
|
||||||
|
max: 100,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
type: "category",
|
||||||
|
show: true,
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "bar",
|
||||||
|
roundCap: true,
|
||||||
|
barWidth: 90,
|
||||||
|
showBackground: true,
|
||||||
|
backgroundStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .3)",
|
||||||
|
},
|
||||||
|
data: [5],
|
||||||
|
coordinateSystem: "polar",
|
||||||
|
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '',
|
||||||
|
// type: 'pie',
|
||||||
|
// startAngle: 80,
|
||||||
|
// radius: ['6%'],
|
||||||
|
// hoverAnimation: false,
|
||||||
|
// center: ['50%', '50%'],
|
||||||
|
// itemStyle: {
|
||||||
|
// color: 'rgba(66, 66, 66, .1)',
|
||||||
|
// borderWidth: 1,
|
||||||
|
// borderColor: '#5269EE',
|
||||||
|
// },
|
||||||
|
// data: [100],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "pie",
|
||||||
|
startAngle: 80,
|
||||||
|
radius: ["100%"],
|
||||||
|
hoverAnimation: false,
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
itemStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .1)",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: "#5269EE",
|
||||||
|
},
|
||||||
|
data: [100],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
padding: 0px !important;
|
||||||
|
min-height: calc(0vh - 0px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
153
src/views/mes/dv/largeScreen/components/online.vue
Normal file
153
src/views/mes/dv/largeScreen/components/online.vue
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||||
|
<div id="main" style="width: 100%; height: 70px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { echarts, Treeselect },
|
||||||
|
props: ["message"], // 声明一个自定义的属性
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
echartData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
message: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
// console.log(val,'差点撒旦阿萨=============');
|
||||||
|
this.echartData = val;
|
||||||
|
// val.forEach((item) => {
|
||||||
|
// this.getDataNum.push(Number(item.ytdUvNew))
|
||||||
|
// this.getDataTime.push(moment(item.dt).format('YYYY-MM-DD'))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
|
//这里需要重新加载渲染
|
||||||
|
this.drawLine();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.drawLine();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drawLine() {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById("main"));
|
||||||
|
|
||||||
|
var option = {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
text: "10%",
|
||||||
|
x: "center",
|
||||||
|
top: "35%",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: "15",
|
||||||
|
color: "#FFFFFF",
|
||||||
|
fontFamily: "DINAlternate-Bold, DINAlternate",
|
||||||
|
foontWeight: "100",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// backgroundColor: "#111",
|
||||||
|
polar: {
|
||||||
|
radius: ["75%", "90%"],
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
},
|
||||||
|
angleAxis: {
|
||||||
|
max: 100,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
type: "category",
|
||||||
|
show: true,
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "bar",
|
||||||
|
roundCap: true,
|
||||||
|
barWidth: 90,
|
||||||
|
showBackground: true,
|
||||||
|
backgroundStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .3)",
|
||||||
|
},
|
||||||
|
data: [10],
|
||||||
|
coordinateSystem: "polar",
|
||||||
|
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '',
|
||||||
|
// type: 'pie',
|
||||||
|
// startAngle: 80,
|
||||||
|
// radius: ['6%'],
|
||||||
|
// hoverAnimation: false,
|
||||||
|
// center: ['50%', '50%'],
|
||||||
|
// itemStyle: {
|
||||||
|
// color: 'rgba(66, 66, 66, .1)',
|
||||||
|
// borderWidth: 1,
|
||||||
|
// borderColor: '#5269EE',
|
||||||
|
// },
|
||||||
|
// data: [100],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "pie",
|
||||||
|
startAngle: 80,
|
||||||
|
radius: ["100%"],
|
||||||
|
hoverAnimation: false,
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
itemStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .1)",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: "#5269EE",
|
||||||
|
},
|
||||||
|
data: [100],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
padding: 0px !important;
|
||||||
|
min-height: calc(0vh - 0px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
162
src/views/mes/dv/largeScreen/components/onlineRate.vue
Normal file
162
src/views/mes/dv/largeScreen/components/onlineRate.vue
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||||
|
<div id="onlineRate" style="width: 100%; height: 150px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { echarts, Treeselect },
|
||||||
|
props: ["message"], // 声明一个自定义的属性
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
echartData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
message: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
// console.log(val,'差点撒旦阿萨=============');
|
||||||
|
this.echartData = val;
|
||||||
|
// val.forEach((item) => {
|
||||||
|
// this.getDataNum.push(Number(item.ytdUvNew))
|
||||||
|
// this.getDataTime.push(moment(item.dt).format('YYYY-MM-DD'))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
|
//这里需要重新加载渲染
|
||||||
|
this.drawLine();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.drawLine();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drawLine() {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById("onlineRate"));
|
||||||
|
|
||||||
|
let value = "50%";
|
||||||
|
let title = "设备在线率";
|
||||||
|
var option = {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
text: "{a|" + value + "}\n{c|" + title + "}",
|
||||||
|
x: "center",
|
||||||
|
top: "35%",
|
||||||
|
textStyle: {
|
||||||
|
rich: {
|
||||||
|
a: {
|
||||||
|
fontSize: 15,
|
||||||
|
color: "#ffffff",
|
||||||
|
},
|
||||||
|
c: {
|
||||||
|
fontSize: 10,
|
||||||
|
color: "#ffffff",
|
||||||
|
padding: [5, 0],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// backgroundColor: "#111",
|
||||||
|
polar: {
|
||||||
|
radius: ["70%", "95%"],
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
},
|
||||||
|
angleAxis: {
|
||||||
|
max: 100,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
type: "category",
|
||||||
|
show: true,
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "bar",
|
||||||
|
roundCap: true,
|
||||||
|
barWidth: 90,
|
||||||
|
showBackground: true,
|
||||||
|
backgroundStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .3)",
|
||||||
|
},
|
||||||
|
data: [50],
|
||||||
|
coordinateSystem: "polar",
|
||||||
|
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '',
|
||||||
|
// type: 'pie',
|
||||||
|
// startAngle: 80,
|
||||||
|
// radius: ['6%'],
|
||||||
|
// hoverAnimation: false,
|
||||||
|
// center: ['50%', '50%'],
|
||||||
|
// itemStyle: {
|
||||||
|
// color: 'rgba(66, 66, 66, .1)',
|
||||||
|
// borderWidth: 1,
|
||||||
|
// borderColor: '#5269EE',
|
||||||
|
// },
|
||||||
|
// data: [100],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "pie",
|
||||||
|
startAngle: 80,
|
||||||
|
radius: ["100%"],
|
||||||
|
hoverAnimation: false,
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
itemStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .1)",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: "#5269EE",
|
||||||
|
},
|
||||||
|
data: [100],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
padding: 0px !important;
|
||||||
|
min-height: calc(0vh - 0px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
162
src/views/mes/dv/largeScreen/components/roboticRate.vue
Normal file
162
src/views/mes/dv/largeScreen/components/roboticRate.vue
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||||
|
<div id="roboticRate" style="width: 100%; height: 150px"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { echarts, Treeselect },
|
||||||
|
props: ["message"], // 声明一个自定义的属性
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
echartData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
message: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
// console.log(val,'差点撒旦阿萨=============');
|
||||||
|
this.echartData = val;
|
||||||
|
// val.forEach((item) => {
|
||||||
|
// this.getDataNum.push(Number(item.ytdUvNew))
|
||||||
|
// this.getDataTime.push(moment(item.dt).format('YYYY-MM-DD'))
|
||||||
|
// })
|
||||||
|
this.$nextTick(() => {
|
||||||
|
//这里需要重新加载渲染
|
||||||
|
this.drawLine();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.drawLine();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drawLine() {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById("roboticRate"));
|
||||||
|
|
||||||
|
let value = "30%";
|
||||||
|
let title = "设备在线率";
|
||||||
|
var option = {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
text: "{a|" + value + "}\n{c|" + title + "}",
|
||||||
|
x: "center",
|
||||||
|
top: "35%",
|
||||||
|
textStyle: {
|
||||||
|
rich: {
|
||||||
|
a: {
|
||||||
|
fontSize: 15,
|
||||||
|
color: "#ffffff",
|
||||||
|
},
|
||||||
|
c: {
|
||||||
|
fontSize: 10,
|
||||||
|
color: "#ffffff",
|
||||||
|
padding: [5, 0],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// backgroundColor: "#111",
|
||||||
|
polar: {
|
||||||
|
radius: ["70%", "95%"],
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
},
|
||||||
|
angleAxis: {
|
||||||
|
max: 100,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
type: "category",
|
||||||
|
show: true,
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "bar",
|
||||||
|
roundCap: true,
|
||||||
|
barWidth: 90,
|
||||||
|
showBackground: true,
|
||||||
|
backgroundStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .3)",
|
||||||
|
},
|
||||||
|
data: [30],
|
||||||
|
coordinateSystem: "polar",
|
||||||
|
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#717171",
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '',
|
||||||
|
// type: 'pie',
|
||||||
|
// startAngle: 80,
|
||||||
|
// radius: ['6%'],
|
||||||
|
// hoverAnimation: false,
|
||||||
|
// center: ['50%', '50%'],
|
||||||
|
// itemStyle: {
|
||||||
|
// color: 'rgba(66, 66, 66, .1)',
|
||||||
|
// borderWidth: 1,
|
||||||
|
// borderColor: '#5269EE',
|
||||||
|
// },
|
||||||
|
// data: [100],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: "",
|
||||||
|
type: "pie",
|
||||||
|
startAngle: 80,
|
||||||
|
radius: ["100%"],
|
||||||
|
hoverAnimation: false,
|
||||||
|
center: ["50%", "50%"],
|
||||||
|
itemStyle: {
|
||||||
|
color: "rgba(66, 66, 66, .1)",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: "#5269EE",
|
||||||
|
},
|
||||||
|
data: [100],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
padding: 0px !important;
|
||||||
|
min-height: calc(0vh - 0px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
645
src/views/mes/dv/largeScreen/index.vue
Normal file
645
src/views/mes/dv/largeScreen/index.vue
Normal file
@ -0,0 +1,645 @@
|
|||||||
|
<template>
|
||||||
|
<div class="shopping-classify">
|
||||||
|
<div class="right-menu" id="container">
|
||||||
|
<!-- 头 -->
|
||||||
|
<div style="height: 10%">
|
||||||
|
<el-row type="flex" justify="space-between" style="height: 100%">
|
||||||
|
<el-col :span="10">
|
||||||
|
<div
|
||||||
|
class="grid-content bg-purple"
|
||||||
|
style="display: flex; flex-direction: row-reverse"
|
||||||
|
>
|
||||||
|
<!-- <svg-icon
|
||||||
|
:icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
|
||||||
|
style="
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
color: #f4deb0;
|
||||||
|
margin: 0% -70% 1% 0%;
|
||||||
|
"
|
||||||
|
@click="buttoncli"
|
||||||
|
/> -->
|
||||||
|
<img
|
||||||
|
@click="buttoncli"
|
||||||
|
style="height: 40px; margin: 5% 4.3% 0% 0%"
|
||||||
|
src="../../../../assets/images/return.png"
|
||||||
|
/></div
|
||||||
|
></el-col>
|
||||||
|
<el-col
|
||||||
|
:span="5"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
><div style="color: #fff; font-size: 30px; font-weight: 700">
|
||||||
|
{{ this.title }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style="color: rgb(9 207 255); font-size: 21px; margin-bottom: 4%"
|
||||||
|
>
|
||||||
|
2024.01.11 09:18:18
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10"
|
||||||
|
><div class="grid-content bg-purple" style="display: flex">
|
||||||
|
<img
|
||||||
|
style="height: 40px; margin: 5% 0% 0% 4%"
|
||||||
|
src="../../../../assets/images/biaotixiugai.png"
|
||||||
|
@click="handleChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<!-- 第一部分 -->
|
||||||
|
<div style="height: 10%">
|
||||||
|
<el-row type="flex" class="row-bg-1" justify="space-between">
|
||||||
|
<el-col :span="8"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-row
|
||||||
|
:gutter="8"
|
||||||
|
style="display: flex; justify-content: center"
|
||||||
|
>
|
||||||
|
<el-col :span="3"
|
||||||
|
><div class="grid-content bg-purple" style="width: 70px">
|
||||||
|
<online :message="this.barquantity" /></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="4"
|
||||||
|
><div class="grid-content bg-purple" style="margin-top: 10%">
|
||||||
|
<div style="font-size: 25px">12</div>
|
||||||
|
<div>当前在线</div>
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-row
|
||||||
|
:gutter="8"
|
||||||
|
style="display: flex; justify-content: center"
|
||||||
|
>
|
||||||
|
<el-col :span="3"
|
||||||
|
><div class="grid-content bg-purple" style="width: 70px">
|
||||||
|
<offline :message="this.offlineData" /></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="4"
|
||||||
|
><div class="grid-content bg-purple" style="margin-top: 10%">
|
||||||
|
<div style="font-size: 25px">12</div>
|
||||||
|
<div>当前离线</div>
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-row
|
||||||
|
:gutter="8"
|
||||||
|
style="display: flex; justify-content: center"
|
||||||
|
>
|
||||||
|
<el-col :span="3"
|
||||||
|
><div class="grid-content bg-purple" style="width: 70px">
|
||||||
|
<fault :message="this.faultData" /></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="4"
|
||||||
|
><div class="grid-content bg-purple" style="margin-top: 10%">
|
||||||
|
<div style="font-size: 25px">12</div>
|
||||||
|
<div>当前故障</div>
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 第二部分 -->
|
||||||
|
<div style="height: 80%">
|
||||||
|
<el-row type="flex" class="row-bg-3" justify="space-between">
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="display: flex; flex-direction: column; height: 100%">
|
||||||
|
<div style="height: 10%">
|
||||||
|
<el-radio-group
|
||||||
|
size="mini"
|
||||||
|
v-model="radio1"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin: 2% 5% 0% 0%;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-radio-button :label="1">当前</el-radio-button>
|
||||||
|
<el-radio-button :label="2">本月</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="height: 20%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin-left: 28%">
|
||||||
|
<onlineRate :message="this.onlineRateData" /></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 0% 0% 17%">2</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 27% 0% 0%; color: #2cc195">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 55% 0% 0%; color: #ec1821">
|
||||||
|
4
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 25%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 0% 0% 3%">2</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 7% 0% 0%; color: #f5c959">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 18% 0% 0%">4</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 45%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 0% 0% 33%">1</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 0% 0% 5%; color: #f5c959">
|
||||||
|
2
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 27% 0% 0%; color: #ec1821">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 60% 0% 0%; color: #2cc195">
|
||||||
|
4
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="display: flex; flex-direction: column; height: 100%">
|
||||||
|
<div style="height: 10%">
|
||||||
|
<el-radio-group
|
||||||
|
size="mini"
|
||||||
|
v-model="radio2"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin: 2% 5% 0% 0%;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-radio-button :label="1">当前</el-radio-button>
|
||||||
|
<el-radio-button :label="2">本月</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="height: 20%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin-left: 28%">
|
||||||
|
<roboticRate :message="this.roboticRateData" /></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 0% 0% 30%">2</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 15% 0% 0%; color: #2cc195">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 40% 0% 0%; color: #ec1821">
|
||||||
|
4
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 25%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 0% 0% 12%">2</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 0% 0% 2%; color: #f5c959">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 10% 0% 0%">4</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 45%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 0% 0% 46%">1</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 0% 0% 17%; color: #f5c959">
|
||||||
|
2
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 17% 0% 0%; color: #ec1821">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 25% 50% 0% 0%; color: #2cc195">
|
||||||
|
4
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="display: flex; flex-direction: column; height: 100%">
|
||||||
|
<div style="height: 10%">
|
||||||
|
<el-radio-group
|
||||||
|
size="mini"
|
||||||
|
v-model="radio3"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin: 2% 5% 0% 0%;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-radio-button :label="1">当前</el-radio-button>
|
||||||
|
<el-radio-button :label="2">本月</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="height: 20%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin-left: 28%">
|
||||||
|
<AGVrate :message="this.AGVrateData" /></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 0% 0% 32%">2</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 0% 0% 0%; color: #2cc195">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="6"
|
||||||
|
><div style="margin: 45% 40% 0% 0%; color: #ec1821">
|
||||||
|
4
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 25%">
|
||||||
|
<div style="height: 100%">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 0% 0% 17%">2</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 0% 0% 6%; color: #f5c959">
|
||||||
|
3
|
||||||
|
</div></el-col
|
||||||
|
>
|
||||||
|
<el-col :span="8"
|
||||||
|
><div style="margin: 40% 4% 0% 0%">4</div></el-col
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 45%">
|
||||||
|
<div style="height: 100%"></div>
|
||||||
|
</div></div
|
||||||
|
></el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--标题修改-->
|
||||||
|
<el-dialog :visible.sync="titleVisible" append-to-body width="30%">
|
||||||
|
<el-form ref="installForm" :model="installForm" label-width="80px">
|
||||||
|
<el-form-item label="标题修改">
|
||||||
|
<el-input
|
||||||
|
maxlength="11"
|
||||||
|
show-word-limit
|
||||||
|
v-model="installForm.name"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="titleVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="sumitInstall">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import * as statisServer from "@/api/statistics";
|
||||||
|
// import { getInfo } from "@/api/user";
|
||||||
|
import screenfull from "screenfull";
|
||||||
|
import online from "./components/online.vue";
|
||||||
|
import offline from "./components/offline.vue";
|
||||||
|
import fault from "./components/fault.vue";
|
||||||
|
import onlineRate from "./components/onlineRate.vue";
|
||||||
|
import roboticRate from "./components/roboticRate.vue";
|
||||||
|
import AGVrate from "./components/AGVrate.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { online, offline, fault, onlineRate, roboticRate, AGVrate },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
screenfull: false,
|
||||||
|
title: "设备监控分析",
|
||||||
|
titleVisible: false,
|
||||||
|
installForm: { name: "" },
|
||||||
|
taskForm: {
|
||||||
|
total_num: 0, // 采样任务百分比 (完成/总数量)
|
||||||
|
completed_num: 0,
|
||||||
|
incompleted_num: 0,
|
||||||
|
},
|
||||||
|
lineChartData: {},
|
||||||
|
totalarr: 0, // 求和
|
||||||
|
month: "", //获取当月合同
|
||||||
|
Contracts: "",
|
||||||
|
barquantity: [],
|
||||||
|
offlineData: [],
|
||||||
|
faultData: [],
|
||||||
|
onlineRateData: [],
|
||||||
|
roboticRateData: [],
|
||||||
|
AGVrateData: [],
|
||||||
|
signarr: [],
|
||||||
|
detection: [],
|
||||||
|
reports: "",
|
||||||
|
issue: "1",
|
||||||
|
accumulation: true,
|
||||||
|
thisYear: false,
|
||||||
|
isFullscreen: false,
|
||||||
|
radio1: 1,
|
||||||
|
radio2: 1,
|
||||||
|
radio3: 1,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
// 监听事件
|
||||||
|
window.addEventListener("resize", this.onresize);
|
||||||
|
this.getList();
|
||||||
|
this.findTasks();
|
||||||
|
this.findContactList();
|
||||||
|
this.findSampleClass();
|
||||||
|
this.findvalid();
|
||||||
|
this.findSortContNumList();
|
||||||
|
this.NumberReports();
|
||||||
|
this.factorNumber();
|
||||||
|
},
|
||||||
|
|
||||||
|
// beforeDestroy() {
|
||||||
|
// // 取消监听事件
|
||||||
|
// window.removeEventListener("resize", this.onresize);
|
||||||
|
// },
|
||||||
|
methods: {
|
||||||
|
// 监听是否全屏状态
|
||||||
|
onresize(event) {
|
||||||
|
// 利用屏幕分辨率和window对象的内高度来判断兼容IE
|
||||||
|
let winFlag = window.innerHeight === window.screen.height;
|
||||||
|
// 利用window全屏标识来判断 -- IE无效
|
||||||
|
let isFull = window.fullScreen || document.webkitIsFullScreen;
|
||||||
|
|
||||||
|
if (isFull === undefined) {
|
||||||
|
this.isFullscreen = winFlag;
|
||||||
|
} else {
|
||||||
|
this.isFullscreen = winFlag || isFull;
|
||||||
|
}
|
||||||
|
// console.log(winFlag); // true全屏 false不是全屏
|
||||||
|
},
|
||||||
|
buttoncli() {
|
||||||
|
const element = document.getElementById("container");
|
||||||
|
if (!screenfull) {
|
||||||
|
this.$message({
|
||||||
|
message: "浏览器不能全屏,安装其他版本试试",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
screenfull.toggle(element);
|
||||||
|
this.findSampleClass();
|
||||||
|
this.findSortContNumList();
|
||||||
|
this.factorNumber();
|
||||||
|
},
|
||||||
|
|
||||||
|
buttoncliArr() {
|
||||||
|
const element = document.getElementById("container");
|
||||||
|
if (!screenfull) {
|
||||||
|
this.$message({
|
||||||
|
message: "浏览器不能全屏,安装其他版本试试",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
screenfull.toggle(element);
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
// getInfo().then(res => {
|
||||||
|
// this.title = res.result.screenName;
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
|
||||||
|
// 任务
|
||||||
|
findTasks() {
|
||||||
|
// statisServer.findCompleteTask({ type: 1 }).then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// const taskForm = res.result.find(i => i.name === "报告编制任务");
|
||||||
|
// this.taskForm.total_num = taskForm.totalCnt;
|
||||||
|
// this.taskForm.completed_num = Number(
|
||||||
|
// taskForm.totalCnt - taskForm.completeCnt
|
||||||
|
// ).toFixed(0);
|
||||||
|
// this.taskForm.incompleted_num = taskForm.completeCnt;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
//合同总数
|
||||||
|
findContactList() {
|
||||||
|
// statisServer.findValidContractsForPass11Month().then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// this.lineChartData = res.result || [];
|
||||||
|
// // 求和
|
||||||
|
// this.lineChartData.contactNum.forEach(item => {
|
||||||
|
// this.totalarr += item;
|
||||||
|
// });
|
||||||
|
// //获取当月合同
|
||||||
|
// this.month = this.lineChartData.contactNum.pop();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
|
||||||
|
//样品类别
|
||||||
|
findSampleClass() {
|
||||||
|
// statisServer.findStoredSampleClassificationCnt({ limit: 6 }).then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// var arr = [];
|
||||||
|
// var barData = res.result.xNameData;
|
||||||
|
// var barquantity = res.result.xValData;
|
||||||
|
// //
|
||||||
|
// barData.forEach((item, i) => {
|
||||||
|
// arr.push({
|
||||||
|
// name: item,
|
||||||
|
// value: barquantity[i]
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// this.barquantity = arr;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
|
||||||
|
findvalid() {
|
||||||
|
// statisServer.findValidContracts({ type: 0 }).then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// this.Contracts = res.result.cusSum;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
//签合同排名
|
||||||
|
findSortContNumList() {
|
||||||
|
// statisServer.findSortContNum({ type: 1, limit: 5 }).then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// var arr = [];
|
||||||
|
// var barData = res.result.xNameData;
|
||||||
|
// var barquantity = res.result.xValData;
|
||||||
|
// //
|
||||||
|
// barData.forEach((item, i) => {
|
||||||
|
// arr.push({
|
||||||
|
// code: item,
|
||||||
|
// fundPost: barquantity[i]
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// arr.sort((a, b) => {
|
||||||
|
// return b.fundPost - a.fundPost;
|
||||||
|
// }); //升序
|
||||||
|
// this.signarr = arr.slice(0, 10);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
//签发报告数
|
||||||
|
NumberReports() {
|
||||||
|
// statisServer.getReport({ type: this.issue }).then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// this.reports = res.result;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
//因子数
|
||||||
|
factorNumber() {
|
||||||
|
// statisServer.detectorFactor().then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// var arr = res.result;
|
||||||
|
// arr.sort((a, b) => {
|
||||||
|
// return b.value - a.value;
|
||||||
|
// }); //升序
|
||||||
|
// this.detection = arr.slice(0, 10);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
|
||||||
|
handleChange() {
|
||||||
|
this.titleVisible = true;
|
||||||
|
},
|
||||||
|
//修改确认
|
||||||
|
sumitInstall() {
|
||||||
|
// statisServer.updateName(this.installForm).then(res => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// this.$notify({
|
||||||
|
// title: "修改成功",
|
||||||
|
// message: res.message,
|
||||||
|
// type: "success"
|
||||||
|
// });
|
||||||
|
// this.titleVisible = false;
|
||||||
|
// this.getList();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
accumulationClick() {
|
||||||
|
this.issue = 2;
|
||||||
|
this.accumulation = false;
|
||||||
|
this.thisYear = true;
|
||||||
|
this.NumberReports();
|
||||||
|
},
|
||||||
|
thisYearClick() {
|
||||||
|
this.issue = 1;
|
||||||
|
this.accumulation = true;
|
||||||
|
this.thisYear = false;
|
||||||
|
this.NumberReports();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
#container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
background: url("../../../../assets/images/zhubeijing.png") center center
|
||||||
|
no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.row-bg-1 {
|
||||||
|
height: 70px;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.row-bg-3 {
|
||||||
|
height: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.row-bg-4 {
|
||||||
|
color: #8bdbe6;
|
||||||
|
font-size: 25px;
|
||||||
|
margin-top: 27%;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.row-bg-5 {
|
||||||
|
height: 365px;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
</style>
|
@ -11,9 +11,9 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="托盘编码" prop="itemCode">
|
<el-form-item label="托盘编码" prop="palletCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.itemCode"
|
v-model="queryParams.palletCode"
|
||||||
placeholder="请输入托盘编码"
|
placeholder="请输入托盘编码"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@ -46,7 +46,7 @@
|
|||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
@ -57,7 +57,7 @@
|
|||||||
v-hasPermi="['mes:md:mditem:edit']"
|
v-hasPermi="['mes:md:mditem:edit']"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@ -65,7 +65,7 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDeleteData"
|
||||||
v-hasPermi="['mes:md:mditem:remove']"
|
v-hasPermi="['mes:md:mditem:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
@ -108,52 +108,45 @@
|
|||||||
label="托盘码"
|
label="托盘码"
|
||||||
width="120"
|
width="120"
|
||||||
align="center"
|
align="center"
|
||||||
key="itemCode"
|
key="palletCode"
|
||||||
prop="itemCode"
|
prop="palletCode"
|
||||||
v-if="columns[0].visible"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
@click="handleView(scope.row)"
|
|
||||||
v-hasPermi="['mes:md:mditem:query']"
|
|
||||||
>{{ scope.row.itemCode }}</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="托盘尺寸"
|
label="托盘尺寸"
|
||||||
align="center"
|
align="center"
|
||||||
key="specification"
|
key="palletSize"
|
||||||
prop="specification"
|
prop="palletSize"
|
||||||
v-if="columns[2].visible"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="动裁承重"
|
label="动裁承重"
|
||||||
align="center"
|
align="center"
|
||||||
key="specification"
|
key="dynamicBear"
|
||||||
prop="specification"
|
prop="dynamicBear"
|
||||||
v-if="columns[2].visible"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.dynamicBear + "kg" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="静载承重"
|
label="静载承重"
|
||||||
align="center"
|
align="center"
|
||||||
key="unitOfMeasure"
|
key="staticBear"
|
||||||
prop="unitOfMeasure"
|
prop="staticBear"
|
||||||
v-if="columns[3].visible"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.staticBear + "kg" }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="当前位置"
|
label="当前位置"
|
||||||
align="center"
|
align="center"
|
||||||
key="unitOfMeasure"
|
key="currentLocation"
|
||||||
prop="unitOfMeasure"
|
prop="currentLocation"
|
||||||
v-if="columns[3].visible"
|
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -200,15 +193,15 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="托盘编码" prop="itemCode">
|
<el-form-item label="托盘编码" prop="palletCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemCode"
|
v-model="form.palletCode"
|
||||||
readonly="readonly"
|
readonly="readonly"
|
||||||
maxlength="64"
|
maxlength="64"
|
||||||
v-if="optType == 'view'"
|
v-if="optType == 'view'"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemCode"
|
v-model="form.palletCode"
|
||||||
placeholder="请输入托盘编码"
|
placeholder="请输入托盘编码"
|
||||||
maxlength="64"
|
maxlength="64"
|
||||||
v-else
|
v-else
|
||||||
@ -228,15 +221,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="托盘尺寸" prop="itemName">
|
<el-form-item label="托盘尺寸" prop="palletSize">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemName"
|
v-model="form.palletSize"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
readonly="readonly"
|
readonly="readonly"
|
||||||
v-if="optType == 'view'"
|
v-if="optType == 'view'"
|
||||||
/>
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemName"
|
v-model="form.palletSize"
|
||||||
placeholder="请输入托盘尺寸"
|
placeholder="请输入托盘尺寸"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
v-else
|
v-else
|
||||||
@ -244,35 +237,79 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="动载承里" prop="">
|
<el-form-item label="动载承重" prop="dynamicBear">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemName"
|
v-model="form.dynamicBear"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
readonly="readonly"
|
readonly="readonly"
|
||||||
v-if="optType == 'view'"
|
v-if="optType == 'view'"
|
||||||
/>
|
>
|
||||||
|
<i
|
||||||
|
slot="suffix"
|
||||||
|
style="
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 10px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #1e1e1e;
|
||||||
|
"
|
||||||
|
>kg</i
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemName"
|
v-model="form.dynamicBear"
|
||||||
placeholder="请输入动载承里"
|
placeholder="请输入动载承重"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
v-else
|
v-else
|
||||||
/>
|
>
|
||||||
|
<i
|
||||||
|
slot="suffix"
|
||||||
|
style="
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 10px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #1e1e1e;
|
||||||
|
"
|
||||||
|
>kg</i
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="静载承里" prop="">
|
<el-form-item label="静载承重" prop="staticBear">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemName"
|
v-model="form.staticBear"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
readonly="readonly"
|
readonly="readonly"
|
||||||
v-if="optType == 'view'"
|
v-if="optType == 'view'"
|
||||||
/>
|
>
|
||||||
|
<i
|
||||||
|
slot="suffix"
|
||||||
|
style="
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 10px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #1e1e1e;
|
||||||
|
"
|
||||||
|
>kg</i
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.itemName"
|
v-model="form.staticBear"
|
||||||
placeholder="请输入静载承里"
|
placeholder="请输入静载承重"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
v-else
|
v-else
|
||||||
/>
|
>
|
||||||
|
<i
|
||||||
|
slot="suffix"
|
||||||
|
style="
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 10px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #1e1e1e;
|
||||||
|
"
|
||||||
|
>kg</i
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -333,11 +370,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
listMdItem,
|
listMdItem,
|
||||||
getMdItem,
|
|
||||||
delMdItem,
|
delMdItem,
|
||||||
addMdItem,
|
addMdItem,
|
||||||
updateMdItem,
|
updateMdItem,
|
||||||
} from "@/api/mes/md/mdItem";
|
findPalletCode,
|
||||||
|
batchDeleteProPallet,
|
||||||
|
exportProPallet,
|
||||||
|
} from "@/api/mes/md/pallet";
|
||||||
|
|
||||||
import { genCode } from "@/api/system/autocode/rule";
|
import { genCode } from "@/api/system/autocode/rule";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
@ -345,7 +384,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
|||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MdItem",
|
name: "Pallet",
|
||||||
dicts: ["sys_yes_no", "mes_item_product"],
|
dicts: ["sys_yes_no", "mes_item_product"],
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
@ -393,29 +432,18 @@ export default {
|
|||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + "/mes/md/mditem/importData",
|
url: process.env.VUE_APP_BASE_API + "/mes/md/mditem/importData",
|
||||||
},
|
},
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
itemCode: undefined,
|
palletCode: undefined,
|
||||||
itemName: undefined,
|
itemName: undefined,
|
||||||
itemTypeId: 0,
|
|
||||||
},
|
},
|
||||||
// 列信息
|
|
||||||
columns: [
|
|
||||||
{ key: 0, label: `物料/产品编码`, visible: true },
|
|
||||||
{ key: 1, label: `物料/产品名称`, visible: true },
|
|
||||||
{ key: 2, label: `规格型号`, visible: true },
|
|
||||||
{ key: 3, label: `单位`, visible: true },
|
|
||||||
{ key: 4, label: `物料/产品`, visible: true },
|
|
||||||
{ key: 5, label: `物料分类`, visible: true },
|
|
||||||
{ key: 6, label: `是否启用`, visible: true },
|
|
||||||
{ key: 7, label: `是否设置安全库存`, visible: true },
|
|
||||||
{ key: 8, label: `创建时间`, visible: true },
|
|
||||||
],
|
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
itemCode: [
|
palletCode: [
|
||||||
{ required: true, message: "托盘编码不能为空", trigger: "blur" },
|
{ required: true, message: "托盘编码不能为空", trigger: "blur" },
|
||||||
{
|
{
|
||||||
max: 64,
|
max: 64,
|
||||||
@ -429,9 +457,6 @@ export default {
|
|||||||
unitOfMeasure: [
|
unitOfMeasure: [
|
||||||
{ required: true, message: "单位不能为空", trigger: "blur" },
|
{ required: true, message: "单位不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
itemTypeId: [
|
|
||||||
{ required: true, message: "物料分类不能为空", trigger: "blur" },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -441,7 +466,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 查询物料编码列表 */
|
/** 查询物料编码列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = false;
|
||||||
listMdItem(this.queryParams).then((response) => {
|
listMdItem(this.queryParams).then((response) => {
|
||||||
this.itemList = response.rows;
|
this.itemList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -457,20 +482,12 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
itemId: undefined,
|
proPalletId: undefined,
|
||||||
itemTypeId: undefined,
|
palletCode: undefined,
|
||||||
itemCode: undefined,
|
palletSize: undefined,
|
||||||
itemName: undefined,
|
dynamicBear: undefined,
|
||||||
specification: undefined,
|
staticBear: undefined,
|
||||||
unitOfMeasrue: undefined,
|
currentLocation: undefined,
|
||||||
enableFlag: undefined,
|
|
||||||
itemOrProduct: undefined,
|
|
||||||
enableFlag: "Y",
|
|
||||||
safeStockFlag: "N",
|
|
||||||
minStock: 0,
|
|
||||||
maxStock: 0,
|
|
||||||
optType: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
};
|
};
|
||||||
this.autoGenFlag = true;
|
this.autoGenFlag = true;
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
@ -487,47 +504,33 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map((item) => item.itemId);
|
this.ids = selection.map((item) => item.proPalletId);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
// 查询明细按钮操作
|
|
||||||
handleView(row) {
|
|
||||||
this.reset();
|
|
||||||
const itemId = row.itemId || this.ids;
|
|
||||||
getMdItem(itemId).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "查看物料/产品";
|
|
||||||
this.optType = "view";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.optType = "add";
|
this.optType = "add";
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "新增托盘";
|
this.title = "新增托盘";
|
||||||
genCode("ITEM_CODE").then((response) => {
|
findPalletCode().then((response) => {
|
||||||
this.form.itemCode = response;
|
this.form.palletCode = response.data.palletCode;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const itemId = row.itemId || this.ids;
|
this.form = row;
|
||||||
getMdItem(itemId).then((response) => {
|
this.open = true;
|
||||||
this.form = response.data;
|
this.optType = "edit";
|
||||||
this.open = true;
|
this.title = "修改";
|
||||||
this.optType = "edit";
|
|
||||||
this.title = "修改物料/产品";
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.itemId != undefined) {
|
if (this.form.proPalletId != undefined) {
|
||||||
updateMdItem(this.form).then((response) => {
|
updateMdItem(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -546,11 +549,30 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const itemIds = row.itemId || this.ids;
|
const itemIds = row.proPalletId;
|
||||||
|
delMdItem({ proPalletId: itemIds }).then((response) => {
|
||||||
|
this.$modal
|
||||||
|
.confirm("是否确认删除当前的数据项?")
|
||||||
|
.then(() => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.$notify({
|
||||||
|
title: "删除成功",
|
||||||
|
message: response.msg,
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 批量删除按钮操作 */
|
||||||
|
handleDeleteData() {
|
||||||
|
const itemIds = this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("确认删除数据项?")
|
.confirm("是否确认删除班次?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delMdItem(itemIds);
|
return batchDeleteProPallet(itemIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -561,25 +583,25 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download(
|
this.download(
|
||||||
"mes/md/mditem/export",
|
"/propallet/exportProPallet",
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
},
|
},
|
||||||
`user_${new Date().getTime()}.xlsx`
|
`calplan_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.upload.title = "物料/产品导入";
|
// this.upload.title = "物料/产品导入";
|
||||||
this.upload.open = true;
|
// this.upload.open = true;
|
||||||
},
|
},
|
||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
this.download(
|
// this.download(
|
||||||
"mes/md/mditem/importTemplate",
|
// "mes/md/mditem/importTemplate",
|
||||||
{},
|
// {},
|
||||||
`md_item_${new Date().getTime()}.xlsx`
|
// `md_item_${new Date().getTime()}.xlsx`
|
||||||
);
|
// );
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
@ -606,11 +628,11 @@ export default {
|
|||||||
//自动生成物料编码
|
//自动生成物料编码
|
||||||
handleAutoGenChange(autoGenFlag) {
|
handleAutoGenChange(autoGenFlag) {
|
||||||
if (autoGenFlag) {
|
if (autoGenFlag) {
|
||||||
genCode("ITEM_CODE").then((response) => {
|
findPalletCode().then((response) => {
|
||||||
this.form.itemCode = response;
|
this.form.palletCode = response.data.palletCode;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.form.itemCode = null;
|
this.form.palletCode = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
<el-form-item label="入库单编号" prop="recptCode">
|
<el-form-item label="入库单编号" prop="recptCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.recptCode"
|
v-model="queryParams.recptCode"
|
||||||
@ -34,16 +41,26 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="入库日期" prop="recptDate">
|
<el-form-item label="入库日期" prop="recptDate">
|
||||||
<el-date-picker clearable
|
<el-date-picker
|
||||||
|
clearable
|
||||||
v-model="queryParams.recptDate"
|
v-model="queryParams.recptDate"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="请选择入库日期">
|
placeholder="请选择入库日期"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -56,7 +73,8 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:add']"
|
v-hasPermi="['mes:wm:itemrecpt:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -67,7 +85,8 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -78,7 +97,8 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:remove']"
|
v-hasPermi="['mes:wm:itemrecpt:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -88,67 +108,112 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:export']"
|
v-hasPermi="['mes:wm:itemrecpt:export']"
|
||||||
>导出</el-button>
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="itemrecptList" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
v-loading="loading"
|
||||||
<el-table-column label="入库单编号" align="center" width="180px" prop="recptCode" >
|
:data="itemrecptList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="入库单编号"
|
||||||
|
align="center"
|
||||||
|
width="180px"
|
||||||
|
prop="recptCode"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:query']"
|
v-hasPermi="['mes:wm:itemrecpt:query']"
|
||||||
>{{scope.row.recptCode}}</el-button>
|
>{{ scope.row.recptCode }}</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="入库单名称" align="center" prop="recptName" :show-overflow-tooltip="true"/>
|
<el-table-column
|
||||||
<el-table-column label="供应商名称" align="center" prop="vendorName" :show-overflow-tooltip="true"/>
|
label="入库单名称"
|
||||||
<el-table-column label="入库日期" align="center" prop="recptDate" width="180">
|
align="center"
|
||||||
|
prop="recptName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商名称"
|
||||||
|
align="center"
|
||||||
|
prop="vendorName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="入库日期"
|
||||||
|
align="center"
|
||||||
|
prop="recptDate"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.recptDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购订单号" align="center" prop="poCode" />
|
<el-table-column label="采购订单号" align="center" prop="poCode" />
|
||||||
<el-table-column label="单据状态" align="center" prop="status" >
|
<el-table-column label="单据状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
<dict-tag
|
||||||
|
:options="dict.type.mes_order_status"
|
||||||
|
:value="scope.row.status"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-video-play"
|
icon="el-icon-video-play"
|
||||||
v-if="scope.row.status =='PREPARE'"
|
v-if="
|
||||||
|
scope.row.status == 'PREPARE' || scope.row.status == 'WAREHOUSING'
|
||||||
|
"
|
||||||
@click="handleExecute(scope.row)"
|
@click="handleExecute(scope.row)"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||||
>执行入库</el-button>
|
>执行入库</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
v-if="scope.row.status =='PREPARE'"
|
v-if="
|
||||||
|
scope.row.status == 'PREPARE' || scope.row.status == 'WAREHOUSING'
|
||||||
|
"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-if="scope.row.status =='PREPARE'"
|
v-if="
|
||||||
|
scope.row.status == 'PREPARE' || scope.row.status == 'WAREHOUSING'
|
||||||
|
"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['mes:wm:itemrecpt:remove']"
|
v-hasPermi="['mes:wm:itemrecpt:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@ -156,37 +221,53 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改物料入库单对话框 -->
|
<!-- 添加或修改物料入库单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="入库单编号" prop="recptCode">
|
<el-form-item label="入库单编号" prop="recptCode">
|
||||||
<el-input v-model="form.recptCode" placeholder="请输入入库单编号" />
|
<el-input
|
||||||
|
v-model="form.recptCode"
|
||||||
|
placeholder="请输入入库单编号"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label-width="80">
|
<el-form-item label-width="80">
|
||||||
<el-switch v-model="autoGenFlag"
|
<el-switch
|
||||||
active-color="#13ce66"
|
v-model="autoGenFlag"
|
||||||
active-text="自动生成"
|
active-color="#13ce66"
|
||||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status =='PREPARE'">
|
active-text="自动生成"
|
||||||
|
@change="handleAutoGenChange(autoGenFlag)"
|
||||||
|
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||||
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入库单名称" prop="recptName">
|
<el-form-item label="入库单名称" prop="recptName">
|
||||||
<el-input v-model="form.recptName" placeholder="请输入入库单名称" />
|
<el-input
|
||||||
|
v-model="form.recptName"
|
||||||
|
placeholder="请输入入库单名称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="入库日期" prop="recptDate">
|
<el-form-item label="入库日期" prop="recptDate">
|
||||||
<el-date-picker clearable
|
<el-date-picker
|
||||||
|
clearable
|
||||||
v-model="form.recptDate"
|
v-model="form.recptDate"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="请选择入库日期">
|
placeholder="请选择入库日期"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -197,7 +278,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单据状态" prop="status">
|
<el-form-item label="单据状态" prop="status">
|
||||||
<el-select v-model="form.status" disabled placeholder="请选择单据状态">
|
<el-select
|
||||||
|
v-model="form.status"
|
||||||
|
disabled
|
||||||
|
placeholder="请选择单据状态"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.mes_order_status"
|
v-for="dict in dict.type.mes_order_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -211,69 +296,182 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="供应商" prop="vendorName">
|
<el-form-item label="供应商" prop="vendorName">
|
||||||
<el-input v-model="form.vendorName" readonly="readonly" placeholder="请选择供应商" >
|
<el-input
|
||||||
<el-button slot="append" @click="handleSelectVendor" icon="el-icon-search"></el-button>
|
v-model="form.vendorName"
|
||||||
|
readonly="readonly"
|
||||||
|
placeholder="请选择供应商"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
slot="append"
|
||||||
|
@click="handleSelectVendor"
|
||||||
|
icon="el-icon-search"
|
||||||
|
></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
<VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
|
<VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="入库仓库">
|
<el-form-item label="入库仓库">
|
||||||
<el-cascader v-model="warehouseInfo"
|
<el-cascader
|
||||||
|
v-model="warehouseInfo"
|
||||||
:options="warehouseOptions"
|
:options="warehouseOptions"
|
||||||
:props="warehouseProps"
|
:props="warehouseProps"
|
||||||
@change="handleWarehouseChanged"
|
@change="handleWarehouseChanged"
|
||||||
>
|
>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8"> </el-col>
|
||||||
|
</el-row>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-divider v-if="form.recptId !=null" content-position="center">物料信息</el-divider>
|
<el-divider v-if="form.recptId != null" content-position="center"
|
||||||
<el-card shadow="always" v-if="form.recptId !=null" class="box-card">
|
>物料信息</el-divider
|
||||||
<Itemrecptline ref=line :recptId="form.recptId" :warehouseId="form.warehouseId" :locationId="form.locationId" :areaId="form.areaId" :optType="optType"></Itemrecptline>
|
>
|
||||||
</el-card>
|
<el-card shadow="always" v-if="form.recptId != null" class="box-card">
|
||||||
|
<Itemrecptline
|
||||||
|
ref="line"
|
||||||
|
:recptId="form.recptId"
|
||||||
|
:warehouseId="form.warehouseId"
|
||||||
|
:locationId="form.locationId"
|
||||||
|
:areaId="form.areaId"
|
||||||
|
:optType="optType"
|
||||||
|
></Itemrecptline>
|
||||||
|
</el-card>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
<el-button
|
||||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
type="primary"
|
||||||
|
@click="cancel"
|
||||||
|
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||||
|
>返回</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="submitForm"
|
||||||
|
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||||
|
>保 存</el-button
|
||||||
|
>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 执行入库对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
title="执行入库"
|
||||||
|
:visible.sync="warehousing"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="perform"
|
||||||
|
:model="perform"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="物料编码" prop="itemId">
|
||||||
|
<el-select
|
||||||
|
style="width: 80%"
|
||||||
|
v-model="perform.itemCode"
|
||||||
|
placeholder="请选择物料编码"
|
||||||
|
@change="selectEncoding"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in itemrecptlineList"
|
||||||
|
:key="dict.lineId"
|
||||||
|
:label="dict.itemCode"
|
||||||
|
:value="dict"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="选择托盘" prop="palletId">
|
||||||
|
<el-select
|
||||||
|
style="width: 80%"
|
||||||
|
v-model="perform.palletCode"
|
||||||
|
placeholder="请选择选择托盘"
|
||||||
|
@change="selectTray"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in itemList"
|
||||||
|
:key="dict.proPalletId"
|
||||||
|
:label="dict.palletCode"
|
||||||
|
:value="dict"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="剩余数量" prop=""
|
||||||
|
>{{ this.remainingquantity }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="warehousing = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listItemrecpt, getItemrecpt, delItemrecpt, addItemrecpt, updateItemrecpt, confirmItemrecpt,execute } from "@/api/mes/wm/itemrecpt";
|
import {
|
||||||
import {getTreeList} from "@/api/mes/wm/warehouse"
|
listItemrecpt,
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
getItemrecpt,
|
||||||
|
delItemrecpt,
|
||||||
|
addItemrecpt,
|
||||||
|
updateItemrecpt,
|
||||||
|
confirmItemrecpt,
|
||||||
|
storage,
|
||||||
|
} from "@/api/mes/wm/itemrecpt";
|
||||||
|
import { listItemrecptline } from "@/api/mes/wm/itemrecptline";
|
||||||
|
import { listMdItem } from "@/api/mes/md/pallet";
|
||||||
|
|
||||||
|
import { getTreeList } from "@/api/mes/wm/warehouse";
|
||||||
|
import { genCode } from "@/api/system/autocode/rule";
|
||||||
import VendorSelect from "@/components/vendorSelect/single.vue";
|
import VendorSelect from "@/components/vendorSelect/single.vue";
|
||||||
import IqcSelect from "@/components/iqcSelect/single.vue";
|
import IqcSelect from "@/components/iqcSelect/single.vue";
|
||||||
import Itemrecptline from "./line.vue";
|
import Itemrecptline from "./line.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "Itemrecpt",
|
name: "Itemrecpt",
|
||||||
dicts:['mes_order_status'],
|
dicts: ["mes_order_status"],
|
||||||
components :{VendorSelect,IqcSelect,Itemrecptline},
|
components: {
|
||||||
|
VendorSelect,
|
||||||
|
IqcSelect,
|
||||||
|
Itemrecptline,
|
||||||
|
listItemrecptline,
|
||||||
|
listMdItem,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:true,
|
autoGenFlag: true,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
warehouseInfo:[],
|
warehouseInfo: [],
|
||||||
warehouseOptions:[],
|
warehouseOptions: [],
|
||||||
warehouseProps:{
|
warehouseProps: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
value: 'pId',
|
value: "pId",
|
||||||
label: 'pName',
|
label: "pName",
|
||||||
},
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@ -293,6 +491,14 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 是否显示弹出层
|
||||||
|
warehousing: false,
|
||||||
|
itemrecptlineList: [],
|
||||||
|
itemList: [],
|
||||||
|
perform: {},
|
||||||
|
remainingquantity: "",
|
||||||
|
recptIdsData: "",
|
||||||
|
itemData: "",
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -323,18 +529,22 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
recptCode: [
|
recptCode: [
|
||||||
{ required: true, message: "入库单编号不能为空", trigger: "blur" }
|
{ required: true, message: "入库单编号不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
recptName: [
|
recptName: [
|
||||||
{ required: true, message: "入库单名称不能为空", trigger: "blur" }
|
{ required: true, message: "入库单名称不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
recptDate: [
|
recptDate: [
|
||||||
{ required: true, message: "入库时间不能为空", trigger: "blur"}
|
{ required: true, message: "入库时间不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
vendorName: [
|
vendorName: [
|
||||||
{ required: true, message: "请选择对应的供应商", trigger: "blur"}
|
{ required: true, message: "请选择对应的供应商", trigger: "blur" },
|
||||||
]
|
],
|
||||||
}
|
itemId: [
|
||||||
|
{ required: true, message: "请选择物料编码", trigger: "blur" },
|
||||||
|
],
|
||||||
|
palletId: [{ required: true, message: "请选择托盘", trigger: "blur" }],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -345,30 +555,37 @@ export default {
|
|||||||
/** 查询物料入库单列表 */
|
/** 查询物料入库单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listItemrecpt(this.queryParams).then(response => {
|
listItemrecpt(this.queryParams).then((response) => {
|
||||||
this.itemrecptList = response.rows;
|
this.itemrecptList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getWarehouseList(){
|
getWarehouseList() {
|
||||||
getTreeList().then( response =>{
|
getTreeList().then((response) => {
|
||||||
if(response.data){
|
if (response.data) {
|
||||||
this.warehouseOptions = response.data.filter((el) =>{
|
this.warehouseOptions = response.data.filter((el) => {
|
||||||
return el.warehouseCode.indexOf('VIR') == -1;
|
return el.warehouseCode.indexOf("VIR") == -1;
|
||||||
});;
|
});
|
||||||
}
|
}
|
||||||
this.warehouseOptions.map(w =>{
|
this.warehouseOptions.map((w) => {
|
||||||
w.children.map(l =>{
|
w.children.map((l) => {
|
||||||
let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName');
|
let lstr = JSON.stringify(l.children)
|
||||||
l.children = JSON.parse(lstr);
|
.replace(/locationId/g, "lId")
|
||||||
|
.replace(/areaId/g, "pId")
|
||||||
|
.replace(/areaName/g, "pName");
|
||||||
|
l.children = JSON.parse(lstr);
|
||||||
});
|
});
|
||||||
|
|
||||||
let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName');
|
|
||||||
w.children = JSON.parse(wstr);
|
|
||||||
|
|
||||||
|
let wstr = JSON.stringify(w.children)
|
||||||
|
.replace(/warehouseId/g, "wId")
|
||||||
|
.replace(/locationId/g, "pId")
|
||||||
|
.replace(/locationName/g, "pName");
|
||||||
|
w.children = JSON.parse(wstr);
|
||||||
});
|
});
|
||||||
let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName');
|
let ostr = JSON.stringify(this.warehouseOptions)
|
||||||
|
.replace(/warehouseId/g, "pId")
|
||||||
|
.replace(/warehouseName/g, "pName");
|
||||||
this.warehouseOptions = JSON.parse(ostr);
|
this.warehouseOptions = JSON.parse(ostr);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -405,9 +622,9 @@ export default {
|
|||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null,
|
||||||
};
|
};
|
||||||
this.autoGenFlag = true;
|
this.autoGenFlag = true;
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -422,9 +639,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.recptId)
|
this.ids = selection.map((item) => item.recptId);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
@ -433,19 +650,19 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加物料入库单";
|
this.title = "添加物料入库单";
|
||||||
this.optType = "add";
|
this.optType = "add";
|
||||||
genCode('ITEMRECPT_CODE').then(response =>{
|
genCode("ITEMRECPT_CODE").then((response) => {
|
||||||
this.form.recptCode = response;
|
this.form.recptCode = response;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 查询明细按钮操作
|
// 查询明细按钮操作
|
||||||
handleView(row){
|
handleView(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const recptIds = row.recptId
|
const recptIds = row.recptId;
|
||||||
getItemrecpt(recptIds).then(response => {
|
getItemrecpt(recptIds).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.warehouseInfo[0] = response.data.warehouseId;
|
this.warehouseInfo[0] = response.data.warehouseId;
|
||||||
this.warehouseInfo[1] = response.data.locationId;
|
this.warehouseInfo[1] = response.data.locationId;
|
||||||
this.warehouseInfo[2] = response.data.areaId;
|
this.warehouseInfo[2] = response.data.areaId;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "查看入库单信息";
|
this.title = "查看入库单信息";
|
||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
@ -454,40 +671,63 @@ export default {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const recptId = row.recptId || this.ids
|
const recptId = row.recptId || this.ids;
|
||||||
getItemrecpt(recptId).then(response => {
|
getItemrecpt(recptId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.warehouseInfo[0] = response.data.warehouseId;
|
this.warehouseInfo[0] = response.data.warehouseId;
|
||||||
this.warehouseInfo[1] = response.data.locationId;
|
this.warehouseInfo[1] = response.data.locationId;
|
||||||
this.warehouseInfo[2] = response.data.areaId;
|
this.warehouseInfo[2] = response.data.areaId;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改物料入库单";
|
this.title = "修改物料入库单";
|
||||||
this.optType = "edit";
|
this.optType = "edit";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//执行入库
|
//执行入库
|
||||||
handleExecute(row){
|
handleExecute(row) {
|
||||||
const recptIds = row.recptId || this.ids;
|
console.log(row);
|
||||||
this.$modal.confirm('确认执行入库?').then(function() {
|
this.recptIdsData = row.recptId;
|
||||||
return execute(recptIds)//执行入库
|
this.perform.recptId = row.recptId;
|
||||||
}).then(() => {
|
this.warehousing = true;
|
||||||
this.getList();
|
// 物料查询
|
||||||
|
listItemrecptline({ recptId: row.recptId }).then((response) => {
|
||||||
|
this.itemrecptlineList = response.rows;
|
||||||
|
});
|
||||||
|
// 托盘查询
|
||||||
|
listMdItem(this.queryParams).then((response) => {
|
||||||
|
this.itemList = response.rows;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
selectEncoding(data) {
|
||||||
|
this.remainingquantity = data.quantityRecived;
|
||||||
|
this.perform.itemCode = data.itemCode;
|
||||||
|
this.perform.lineId = data.lineId;
|
||||||
|
this.perform.itemId = data.itemId;
|
||||||
|
},
|
||||||
|
selectTray(data) {
|
||||||
|
this.perform.palletId = data.proPalletId;
|
||||||
|
this.perform.palletCode = data.palletCode;
|
||||||
|
},
|
||||||
|
submitFileForm() {
|
||||||
|
storage(this.perform).then((response) => {
|
||||||
this.$modal.msgSuccess("入库成功");
|
this.$modal.msgSuccess("入库成功");
|
||||||
}).catch(() => {});
|
this.warehousing = false;
|
||||||
|
this.getList();
|
||||||
|
this.selectEncoding();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.recptId != null) {
|
if (this.form.recptId != null) {
|
||||||
updateItemrecpt(this.form).then(response => {
|
updateItemrecpt(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addItemrecpt(this.form).then(response => {
|
addItemrecpt(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -496,79 +736,89 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doconfirm(){
|
doconfirm() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$modal.confirm('是否完成入库单编制?【完成后将不能更改】').then(function(){
|
this.$modal
|
||||||
that.form.status = 'CONFIRMED';
|
.confirm("是否完成入库单编制?【完成后将不能更改】")
|
||||||
that.submitForm();
|
.then(function () {
|
||||||
});
|
that.form.status = "CONFIRMED";
|
||||||
|
that.submitForm();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const recptIds = row.recptId || this.ids;
|
const recptIds = row.recptId || this.ids;
|
||||||
this.$modal.confirm('是否确认删除物料入库单?').then(function() {
|
this.$modal
|
||||||
return delItemrecpt(recptIds);
|
.confirm("是否确认删除物料入库单?")
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delItemrecpt(recptIds);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('mes/wm/itemrecpt/export', {
|
this.download(
|
||||||
...this.queryParams
|
"mes/wm/itemrecpt/export",
|
||||||
}, `itemrecpt_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`itemrecpt_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
},
|
},
|
||||||
//选择默认的仓库、库区、库位
|
//选择默认的仓库、库区、库位
|
||||||
handleWarehouseChanged(obj){
|
handleWarehouseChanged(obj) {
|
||||||
debugger;
|
debugger;
|
||||||
if(obj !=null){
|
if (obj != null) {
|
||||||
this.form.warehouseId = obj[0];
|
this.form.warehouseId = obj[0];
|
||||||
this.form.locationId = obj[1];
|
this.form.locationId = obj[1];
|
||||||
this.form.areaId = obj[2];
|
this.form.areaId = obj[2];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//IQC检验单选择
|
//IQC检验单选择
|
||||||
handleSelectIqc(){
|
handleSelectIqc() {
|
||||||
this.$refs.iqcSelect.showFlag = true;
|
this.$refs.iqcSelect.showFlag = true;
|
||||||
},
|
},
|
||||||
//IQC检验单选择弹出框
|
//IQC检验单选择弹出框
|
||||||
onIqcSelected(obj){
|
onIqcSelected(obj) {
|
||||||
if(obj != undefined && obj != null){
|
if (obj != undefined && obj != null) {
|
||||||
this.form.iqcId = obj.iqcId;
|
this.form.iqcId = obj.iqcId;
|
||||||
this.form.iqcCode = obj.iqcCode;
|
this.form.iqcCode = obj.iqcCode;
|
||||||
this.form.recptName = obj.iqcName;
|
this.form.recptName = obj.iqcName;
|
||||||
this.form.vendorId = obj.vendorId;
|
this.form.vendorId = obj.vendorId;
|
||||||
this.form.vendorCode = obj.vendorCode;
|
this.form.vendorCode = obj.vendorCode;
|
||||||
this.form.vendorName = obj.vendorName;
|
this.form.vendorName = obj.vendorName;
|
||||||
this.form.vendorNick = obj.vendorNick;
|
this.form.vendorNick = obj.vendorNick;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//供应商选择
|
//供应商选择
|
||||||
handleSelectVendor(){
|
handleSelectVendor() {
|
||||||
this.$refs.vendorSelect.showFlag = true;
|
this.$refs.vendorSelect.showFlag = true;
|
||||||
},
|
},
|
||||||
//供应商选择弹出框
|
//供应商选择弹出框
|
||||||
onVendorSelected(obj){
|
onVendorSelected(obj) {
|
||||||
if(obj != undefined && obj != null){
|
if (obj != undefined && obj != null) {
|
||||||
this.form.vendorId = obj.vendorId;
|
this.form.vendorId = obj.vendorId;
|
||||||
this.form.vendorCode = obj.vendorCode;
|
this.form.vendorCode = obj.vendorCode;
|
||||||
this.form.vendorName = obj.vendorName;
|
this.form.vendorName = obj.vendorName;
|
||||||
this.form.vendorNick = obj.vendorNick;
|
this.form.vendorNick = obj.vendorNick;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
handleAutoGenChange(autoGenFlag){
|
handleAutoGenChange(autoGenFlag) {
|
||||||
if(autoGenFlag){
|
if (autoGenFlag) {
|
||||||
genCode('ITEMRECPT_CODE').then(response =>{
|
genCode("ITEMRECPT_CODE").then((response) => {
|
||||||
this.form.recptCode = response;
|
this.form.recptCode = response;
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
this.form.recptCode = null;
|
this.form.recptCode = null;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@ -576,4 +826,4 @@ export default {
|
|||||||
flex: 0 1 54%;
|
flex: 0 1 54%;
|
||||||
order: 1;
|
order: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user