物料安全库存
This commit is contained in:
parent
c9d3b15a5f
commit
0f8128a5d8
|
|
@ -295,7 +295,7 @@
|
||||||
ganttHeight:{
|
ganttHeight:{
|
||||||
type:Number,
|
type:Number,
|
||||||
default: () => {
|
default: () => {
|
||||||
return 300
|
return 0
|
||||||
}
|
}
|
||||||
} ,
|
} ,
|
||||||
},
|
},
|
||||||
|
|
@ -374,14 +374,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.ganttHeight = this.ganttHeight-45;
|
// this.ganttHeight = this.ganttHeight;
|
||||||
if(window.innerHeight){
|
|
||||||
this.windowWidth = window.innerWidth;
|
|
||||||
this.windowHeight = window.innerHeight;
|
|
||||||
}else{
|
|
||||||
this.windowHeight=document.body.clientHeight?document.body.clientHeight:document.documentElement.clientHeight;
|
|
||||||
this.windowWidth=document.body.clientWidth?document.body.clientWidth:document.documentElement.clientWidth;
|
|
||||||
}
|
|
||||||
let currentYear = new Date().getFullYear();
|
let currentYear = new Date().getFullYear();
|
||||||
this.timeRange = [currentYear+'-01',(currentYear+1)+'-12'];
|
this.timeRange = [currentYear+'-01',(currentYear+1)+'-12'];
|
||||||
this.list = [...this.proList];
|
this.list = [...this.proList];
|
||||||
|
|
@ -533,14 +526,14 @@
|
||||||
},
|
},
|
||||||
//修改后续高度
|
//修改后续高度
|
||||||
resetTop(zindex, reduce, isexpand) {
|
resetTop(zindex, reduce, isexpand) {
|
||||||
let num = reduce ? -40 : 40;
|
let num = reduce ? -34 : 34;
|
||||||
if (!reduce && !isexpand) {
|
if (!reduce && !isexpand) {
|
||||||
this.list.forEach((item, index) => {
|
this.list.forEach((item, index) => {
|
||||||
if (index > zindex) {
|
if (index > zindex) {
|
||||||
item.top = item.top + 40;
|
item.top = item.top + 35;
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
item.children.forEach((k, i) => {
|
item.children.forEach((k, i) => {
|
||||||
k.top = item.top + 40 * i + 40;
|
k.top = item.top + 34 * i + 35;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -820,19 +813,7 @@
|
||||||
parseInt(this.$refs[dom][0].style.width);
|
parseInt(this.$refs[dom][0].style.width);
|
||||||
end =
|
end =
|
||||||
Math.round(end / this.currentDaySize.value) *
|
Math.round(end / this.currentDaySize.value) *
|
||||||
this.currentDaySize.value -
|
this.currentDaySize.value -this.currentDaySize.value;
|
||||||
this.currentDaySize.value;
|
|
||||||
let infoDomX=0,infoDomY = 0;
|
|
||||||
if(this.windowWidth-e.clientX>230){
|
|
||||||
infoDomX = e.clientX;
|
|
||||||
}else{
|
|
||||||
infoDomX = this.windowWidth-230;
|
|
||||||
}
|
|
||||||
if(this.windowHeight-e.clientY>200){
|
|
||||||
infoDomY = e.clientY;
|
|
||||||
}else{
|
|
||||||
infoDomY = this.windowHeight-200;
|
|
||||||
}
|
|
||||||
this.currentProjectMsg = {
|
this.currentProjectMsg = {
|
||||||
name: this.computedList[index].name,
|
name: this.computedList[index].name,
|
||||||
allTime: (end - start) / this.currentDaySize.value + 1,
|
allTime: (end - start) / this.currentDaySize.value + 1,
|
||||||
|
|
@ -840,15 +821,9 @@
|
||||||
per1: this.computedList[index].per1,
|
per1: this.computedList[index].per1,
|
||||||
startTime: this.computedWithTime(start),
|
startTime: this.computedWithTime(start),
|
||||||
endTime: this.computedWithTime(end),
|
endTime: this.computedWithTime(end),
|
||||||
left:infoDomX ,
|
left:e.clientX ,
|
||||||
top: infoDomY
|
top: e.clientY
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* left:
|
|
||||||
e.clientX + 220 - this.$refs.chart.scrollLeft >= this.$refs.chart.clientWidth
|
|
||||||
? e.clientX - 220 - 400
|
|
||||||
: e.clientX ,
|
|
||||||
* */
|
|
||||||
this.isShowMsg = true;
|
this.isShowMsg = true;
|
||||||
},
|
},
|
||||||
//鼠标离开信息消失,时间显示消失
|
//鼠标离开信息消失,时间显示消失
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="totalCountWrap">
|
<div class="totalCountWrap">
|
||||||
<span class="totalCountText">本月合同数</span>
|
<span class="totalCountText">本月合同数</span>
|
||||||
<div class="totalCountNum">
|
<div class="totalCountNum">
|
||||||
<span class="totalCount">30</span>
|
<span class="totalCount">{{contractTotalCurrent}}</span>
|
||||||
<span>个</span>
|
<span>个</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="totalCountWrap">
|
<div class="totalCountWrap">
|
||||||
<span class="totalCountText">本月生产订单数</span>
|
<span class="totalCountText">本月生产订单数</span>
|
||||||
<div class="totalCountNum">
|
<div class="totalCountNum">
|
||||||
<span class="totalCount">30</span>
|
<span class="totalCount">{{orderTotalCurrent}}</span>
|
||||||
<span>个</span>
|
<span>个</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<div class="totalCountWrap">
|
<div class="totalCountWrap">
|
||||||
<span class="totalCountText">本月在制任务</span>
|
<span class="totalCountText">本月在制任务</span>
|
||||||
<div class="totalCountNum">
|
<div class="totalCountNum">
|
||||||
<span class="totalCount">30</span>
|
<span class="totalCount">{{planTotalCurrent}}</span>
|
||||||
<span>个</span>
|
<span>个</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -96,15 +96,15 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="padding: 5px 20px 20px 20px;">
|
<el-row class="dashboardCardPadding">
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<div style="height: 40px;line-height: 40px;"></div>
|
<div style="height: 40px;line-height: 40px;"></div>
|
||||||
<div>
|
<div>
|
||||||
<gantt
|
<gantt
|
||||||
style="position: relative"
|
|
||||||
v-if="proList.length>0"
|
v-if="proList.length>0"
|
||||||
|
style="position: relative"
|
||||||
:proList="proList"
|
:proList="proList"
|
||||||
:ganttHeight="cardTabelHeight"
|
:ganttHeight="ganttHeight"
|
||||||
></gantt>
|
></gantt>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -124,19 +124,25 @@
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<div class="convenientWrap">
|
<div class="convenientWrap">
|
||||||
<div class="convenientBtn" :class="{activeIndex:chartIndex==='1'}" @click="convenientClick('1','week')">本周</div>
|
<div class="convenientBtn" :class="{activeIndex:chartIndex==='1'}" @click="convenientClick('1','week')">
|
||||||
<div class="convenientBtn" :class="{activeIndex:chartIndex==='2'}" @click="convenientClick('1','month')">本月</div>
|
本周
|
||||||
<div class="convenientBtn" :class="{activeIndex:chartIndex==='3'}" @click="convenientClick('1','quarter')">三个月</div>
|
</div>
|
||||||
|
<div class="convenientBtn" :class="{activeIndex:chartIndex==='2'}"
|
||||||
|
@click="convenientClick('1','month')">本月
|
||||||
|
</div>
|
||||||
|
<div class="convenientBtn" :class="{activeIndex:chartIndex==='3'}"
|
||||||
|
@click="convenientClick('1','quarter')">三个月
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="chartColumn" style="width:100%;height: 300px;"></div>
|
</div>
|
||||||
|
<div id="chartColumn" style="width:100%;" :style="{height:ganttHeight+'px'}"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<el-row class="dashboardSubRow" :gutter="5">
|
<el-row :gutter="5">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card style="border-radius: 5px;">
|
<div class="dashboardBottomRow">
|
||||||
<div class="dashboardCardHand">
|
<div class="dashboardCardHand">
|
||||||
<div class="CardTitleWrap">
|
<div class="CardTitleWrap">
|
||||||
<span class="verticalLine"></span><span class="dashboardCardTitle">库存列表</span>
|
<span class="verticalLine"></span><span class="dashboardCardTitle">库存列表</span>
|
||||||
|
|
@ -154,12 +160,14 @@
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="dashboardCardPadding">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoadingStock"
|
v-loading="listLoadingStock"
|
||||||
:data="stockList"
|
:data="stockList"
|
||||||
fit stripe
|
fit stripe
|
||||||
size="mini"
|
size="mini"
|
||||||
:height="cardTabelHeight"
|
:height="cardTabelHeight"
|
||||||
|
style="border-top: 1px solid #f5f5f5;"
|
||||||
>
|
>
|
||||||
<el-table-column label="物料编号" prop="material_">
|
<el-table-column label="物料编号" prop="material_">
|
||||||
<template slot-scope="scope">{{ scope.row.material_.number }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.number }}</template>
|
||||||
|
|
@ -167,7 +175,7 @@
|
||||||
<el-table-column label="物料名称" prop="material_" show-overflow-tooltip>
|
<el-table-column label="物料名称" prop="material_" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格型号" prop="material_">
|
<el-table-column label="规格型号" prop="material_" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料类型" prop="material_">
|
<el-table-column label="物料类型" prop="material_">
|
||||||
|
|
@ -182,15 +190,15 @@
|
||||||
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</div>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card style="height: 350px;border-radius: 5px;">
|
<div class="dashboardBottomRow">
|
||||||
<div class="dashboardCardHand">
|
<div class="dashboardCardHand">
|
||||||
<div class="CardTitleWrap">
|
<div class="CardTitleWrap">
|
||||||
<span class="verticalLine"></span><span class="dashboardCardTitle">提醒</span>
|
<span class="verticalLine"></span><span class="dashboardCardTitle">提醒</span>
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="dashboardCardTitle">提醒</div>-->
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:current-page.sync="remindPage"
|
:current-page.sync="remindPage"
|
||||||
|
|
@ -203,17 +211,14 @@
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs type="card" :style="{height:cardTabelHeight+'px'}" v-model="activeName" @tab-click="activeNameClick">
|
<div class="dashboardCardPadding">
|
||||||
|
<el-tabs type="card" :style="{height:cardTabelHeight+'px'}" v-model="activeName"
|
||||||
|
@tab-click="activeNameClick">
|
||||||
<el-tab-pane label="库存警告" name="库存警告">
|
<el-tab-pane label="库存警告" name="库存警告">
|
||||||
<ul class="lists">
|
<ul :style="{height:cardTabelHeight-47+'px'}" class="lists" :class="{anim:animate}" @mouseenter="Stop()" @mouseleave="Up()">
|
||||||
<li class="listItem">
|
<li v-for="item in list" :key="item.id" class="listItem">
|
||||||
<div class="itemText">
|
<div class="itemText">
|
||||||
<span>玻璃低于安全库存</span><span>2021-12-30</span>
|
<span>{{item.name}}</span><span style="float: right">2021-12-30</span>
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="listItem" v-for="item in warningList" :key="item.id">
|
|
||||||
<div class="itemText">
|
|
||||||
<span>{{item}}</span><span>2021-12-20</span>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -247,7 +252,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</div>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -270,6 +276,8 @@ export default {
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
animate: false,
|
||||||
|
intNum: null,
|
||||||
chartColumn: null,
|
chartColumn: null,
|
||||||
week: null,
|
week: null,
|
||||||
currentTime: null,
|
currentTime: null,
|
||||||
|
|
@ -292,9 +300,13 @@ export default {
|
||||||
remindList: [],
|
remindList: [],
|
||||||
warningList: [],
|
warningList: [],
|
||||||
list: [
|
list: [
|
||||||
{id:1,name:'HIehd9',card:'3337',sco:'REF-32'},
|
{id: 1, name: 'HIehd91', card: '3337', sco: 'REF-32'},
|
||||||
{id:1,name:'HIehd9',card:'3337',sco:'REF-32'},
|
{id: 2, name: 'HIehd92', card: '3337', sco: 'REF-32'},
|
||||||
{id:1,name:'HIehd9',card:'3337',sco:'REF-32'}
|
{id: 3, name: 'HIehd93', card: '3337', sco: 'REF-32'},
|
||||||
|
{id: 4, name: 'HIehd94', card: '3337', sco: 'REF-32'},
|
||||||
|
{id: 5, name: 'HIehd95', card: '3337', sco: 'REF-32'},
|
||||||
|
{id: 6, name: 'HIehd96', card: '3337', sco: 'REF-32'},
|
||||||
|
{id: 7, name: 'HIehd97', card: '3337', sco: 'REF-32'},
|
||||||
],
|
],
|
||||||
options: {
|
options: {
|
||||||
"1": '成品',
|
"1": '成品',
|
||||||
|
|
@ -320,6 +332,7 @@ export default {
|
||||||
listLoadingPlan: false,
|
listLoadingPlan: false,
|
||||||
listLoadingStock: false,
|
listLoadingStock: false,
|
||||||
cardTabelHeight: null,
|
cardTabelHeight: null,
|
||||||
|
ganttHeight: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -330,6 +343,26 @@ export default {
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getNoticeData() {
|
||||||
|
this.ScrollUp();
|
||||||
|
},
|
||||||
|
ScrollUp() {
|
||||||
|
this.intNum = setInterval(() => {
|
||||||
|
this.animate = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.list.push(this.list[0]);
|
||||||
|
this.list.shift();
|
||||||
|
this.animate = false;
|
||||||
|
}, 500)
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
//鼠标移上去停止
|
||||||
|
Stop() {
|
||||||
|
clearInterval(this.intNum);
|
||||||
|
},
|
||||||
|
Up() {
|
||||||
|
this.ScrollUp();
|
||||||
|
},
|
||||||
getStatisticsData() {
|
getStatisticsData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let dat = new Date();
|
let dat = new Date();
|
||||||
|
|
@ -399,6 +432,12 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//获取库存警告
|
||||||
|
getMaterialList({tag: 'low_inm'}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
that.warningList = response.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
gotoTicketPage() {
|
gotoTicketPage() {
|
||||||
let path = this.$route.path;
|
let path = this.$route.path;
|
||||||
|
|
@ -663,17 +702,14 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//提示
|
//提示
|
||||||
activeNameClick(tab, event) {
|
activeNameClick(tab) {
|
||||||
let that = this;
|
let that = this;
|
||||||
// debugger;
|
|
||||||
// console.log(tab, event);
|
|
||||||
if (tab.label === '库存警告') {
|
if (tab.label === '库存警告') {
|
||||||
getMaterialList({page: 0, tag: 'low_inm'}).then((response) => {
|
getMaterialList({page: 0, tag: 'low_inm'}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.warningList = response.data;
|
that.warningList = response.data;
|
||||||
that.remindTotal = response.data.length;
|
that.remindTotal = response.data.length;
|
||||||
}
|
}
|
||||||
this.listLoadingPlan = false;
|
|
||||||
});
|
});
|
||||||
} else if (tab.label === '临近交货') {
|
} else if (tab.label === '临近交货') {
|
||||||
getmaterialbatchList({page: 0, tag: 'expired'}).then((response) => {
|
getmaterialbatchList({page: 0, tag: 'expired'}).then((response) => {
|
||||||
|
|
@ -681,7 +717,6 @@ export default {
|
||||||
that.warningList = response.data;
|
that.warningList = response.data;
|
||||||
that.remindTotal = response.data.length;
|
that.remindTotal = response.data.length;
|
||||||
}
|
}
|
||||||
this.listLoadingPlan = false;
|
|
||||||
});
|
});
|
||||||
} else if (tab.label === '过期提醒') {
|
} else if (tab.label === '过期提醒') {
|
||||||
getmaterialbatchList({page: 0, tag: 'expired'}).then((response) => {
|
getmaterialbatchList({page: 0, tag: 'expired'}).then((response) => {
|
||||||
|
|
@ -689,7 +724,6 @@ export default {
|
||||||
that.warningList = response.data;
|
that.warningList = response.data;
|
||||||
that.remindTotal = response.data.length;
|
that.remindTotal = response.data.length;
|
||||||
}
|
}
|
||||||
this.listLoadingPlan = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -775,17 +809,16 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
// let he = document.documentElement.clientHeight || document.body.clientHeight;
|
|
||||||
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
let heig = document.getElementsByClassName('dashboardTopCard')[0].clientHeight;
|
let heig = document.getElementsByClassName('dashboardTopCard')[0].clientHeight;
|
||||||
this.cardTabelHeight = ((hei - heig - 130) / 2);
|
this.cardTabelHeight = ((hei - heig - 130) / 2);
|
||||||
|
this.ganttHeight = this.cardTabelHeight - 50;
|
||||||
document.getElementById('chartColumn').style.height = this.cardTabelHeight - 35 + 'px';
|
document.getElementById('chartColumn').style.height = this.cardTabelHeight - 35 + 'px';
|
||||||
// this.drawChart();
|
|
||||||
this.getPlanList();
|
this.getPlanList();
|
||||||
this.getStockList();
|
this.getStockList();
|
||||||
this.getGanttData();
|
this.getGanttData();
|
||||||
// this.getYield();
|
|
||||||
this.getStatisticsData();
|
this.getStatisticsData();
|
||||||
|
this.getNoticeData();
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
this.drawChart()
|
this.drawChart()
|
||||||
|
|
@ -794,16 +827,13 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
ul{
|
|
||||||
margin: 0!important;
|
|
||||||
}
|
|
||||||
.el-card.is-always-shadow {
|
.el-card.is-always-shadow {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
.dashboard-container {
|
.dashboard-container {
|
||||||
margin: 5px 6px;
|
margin: 5px 6px;
|
||||||
}
|
}
|
||||||
.dashboardTopCard,.dashboardMiddle{
|
.dashboardTopCard, .dashboardMiddle, .dashboardBottomRow {
|
||||||
-webkit-border-radius: 5px;
|
-webkit-border-radius: 5px;
|
||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
@ -811,6 +841,12 @@ export default {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||||
}
|
}
|
||||||
|
.dashboardBottomRow {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.dashboardCardPadding {
|
||||||
|
padding: 5px 20px 20px 20px;
|
||||||
|
}
|
||||||
/**/
|
/**/
|
||||||
.cardsWrap {
|
.cardsWrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -846,7 +882,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardsWrap:nth-child(3) {
|
.cardsWrap:nth-child(3) {
|
||||||
.svgIconWrap {
|
.svgIconWrap {
|
||||||
background: #d9f6d8;
|
background: #d9f6d8;
|
||||||
|
|
@ -904,12 +939,12 @@ export default {
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
width: 50px;
|
width: 70px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
.stockMore {
|
.stockMore {
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -948,11 +983,18 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.anim {
|
||||||
|
transition: all 0.5s;
|
||||||
|
margin-top: -35px; //高度等于行高
|
||||||
|
}
|
||||||
.lists {
|
.lists {
|
||||||
|
height: 100%;
|
||||||
|
line-height: 35px;
|
||||||
|
transition: top 0.5s;
|
||||||
|
overflow-y: scroll;
|
||||||
padding-right: 40px;
|
padding-right: 40px;
|
||||||
|
margin: 0 !important;
|
||||||
.listItem {
|
.listItem {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
<el-form
|
<el-form
|
||||||
ref="Form"
|
ref="Form"
|
||||||
:model="material"
|
:model="material"
|
||||||
label-width="80px"
|
label-width="100px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
:rules="rule1"
|
:rules="rule1"
|
||||||
>
|
>
|
||||||
|
|
@ -131,41 +131,42 @@
|
||||||
<el-form-item label="物料编号" prop="number">
|
<el-form-item label="物料编号" prop="number">
|
||||||
<el-input v-model="material.number" placeholder="物料编号"/>
|
<el-input v-model="material.number" placeholder="物料编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规格型号" prop="specification">
|
<el-form-item label="规格型号">
|
||||||
<el-input v-model="material.specification" placeholder="规格型号"/>
|
<el-input v-model="material.specification" placeholder="规格型号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="计量单位" prop="unit">
|
<el-form-item label="计量单位">
|
||||||
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in unitoptions"
|
v-for="item in unitoptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="物料类别" prop="type">
|
<el-form-item label="物料类别">
|
||||||
|
<el-select style="width: 100%" v-model="material.type" placeholder="请选择物料类别">
|
||||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单片玻璃数量" prop="piece_count" v-if="material.type==1">
|
<el-form-item label="单片玻璃数量" v-if="material.type==1">
|
||||||
<el-input v-model="material.piece_count" placeholder="单片玻璃数量"/>
|
<el-input v-model="material.piece_count" placeholder="单片玻璃数量"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="安全库存数">
|
||||||
|
<el-input-number style="width: 100%;" v-model="material.count_safe" :step="1" :min="0" step-strictly placeholder="安全库存数"></el-input-number>
|
||||||
<el-form-item label="排序" prop="sort_str">
|
</el-form-item>
|
||||||
<el-input v-model="material.sort_str" placeholder="排序"/>
|
<el-form-item label="排序">
|
||||||
|
<el-input-number style="width: 100%;" v-model="material.sort_str" :step="1" :min="0" step-strictly placeholder="排序"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
|
@ -189,8 +190,14 @@
|
||||||
import {genTree} from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultmaterial = {
|
const defaultmaterial = {
|
||||||
name: "",
|
name: null,
|
||||||
number: "",
|
number: null,
|
||||||
|
specification: null,
|
||||||
|
unit: null,
|
||||||
|
type: null,
|
||||||
|
piece_count: null,
|
||||||
|
sort_str: null,
|
||||||
|
count_safe: 0,
|
||||||
processes: [],
|
processes: [],
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -270,19 +277,13 @@
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getProcessList();
|
this.getProcessList();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
//物料详情
|
//物料详情
|
||||||
handledetail(scope)
|
handledetail(scope){
|
||||||
{
|
|
||||||
this.$router.push({name: "MaterialDetail", params: { id: scope.row.id,type: scope.row.type }, })
|
this.$router.push({name: "MaterialDetail", params: { id: scope.row.id,type: scope.row.type }, })
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//选项卡切换
|
//选项卡切换
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
|
@ -311,10 +312,8 @@
|
||||||
},
|
},
|
||||||
//绑定工序
|
//绑定工序
|
||||||
handlebind(scope) {
|
handlebind(scope) {
|
||||||
|
|
||||||
this.$router.push({name: "MaterialDO", params: {id: scope.row.id},})
|
this.$router.push({name: "MaterialDO", params: {id: scope.row.id},})
|
||||||
}
|
},
|
||||||
,
|
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -324,7 +323,7 @@
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
}
|
};
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleCreate() {
|
handleCreate() {
|
||||||
|
|
@ -335,7 +334,6 @@
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
this.material = Object.assign({}, scope.row); // copy obj
|
this.material = Object.assign({}, scope.row); // copy obj
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
|
|
@ -359,7 +357,6 @@
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue