This commit is contained in:
zty 2024-12-03 11:44:53 +08:00
commit c667ac0994
12 changed files with 1049 additions and 225 deletions

View File

@ -431,4 +431,10 @@ export default {
}, },
}, },
}, },
batchst: {
name: "批次统计数据",
req: async function (data) {
return await http.get(`${config.API_URL}/wpm/batchst/`, data);
},
},
}; };

View File

@ -3445,6 +3445,29 @@ const routes = [
}, },
component: "statistics/total_statistics.vue", component: "statistics/total_statistics.vue",
}, },
//综合统计--棒
{
name: "statistics_bang",
path: "/statistic/statistics_bang",
meta: {
title: "棒综合统计",
icon: "el-icon-DataAnalysis",
perms: ["statistics_bang"],
},
component: "statistics/statistics_bang.vue",
},
//综合统计--管
{
name: "statistics_guan",
path: "/statistic/statistics_guan",
meta: {
title: "管综合统计",
icon: "el-icon-DataAnalysis",
perms: ["statistics_guan"],
},
component: "statistics/statistics_guan.vue",
},
//综合统计--AVG
], ],
// children:[ // children:[
// { // {

View File

@ -104,7 +104,7 @@
<div>设备运转状态</div> <div>设备运转状态</div>
</div> </div>
<div class="itemBody"> <div class="itemBody">
<div id="eqPieChart" style="width: 310px;height: 220px;"></div> <div id="eqPieChart" style="width:16vw;height:20vh;"></div>
</div> </div>
</div> </div>
</div> </div>
@ -112,7 +112,7 @@
<div class="flexItem"> <div class="flexItem">
<div class="itemTitle2"> <div class="itemTitle2">
<div>库存</div> <div>库存</div>
<el-carousel height="40px" :interval="30000" indicator-position="none" <el-carousel height="4vh" :interval="30000" indicator-position="none"
style="position: absolute;top: 0;right: 0;width: 100px;"> style="position: absolute;top: 0;right: 0;width: 100px;">
<el-carousel-item> <el-carousel-item>
<div style="color: #ffffff; z-index: 10;font-size: 18px;">成品库</div> <div style="color: #ffffff; z-index: 10;font-size: 18px;">成品库</div>
@ -123,7 +123,7 @@
</el-carousel> </el-carousel>
</div> </div>
<div class="itemBody itemBody1"> <div class="itemBody itemBody1">
<el-carousel height="140px" :interval="30000" indicator-position="none"> <el-carousel height="14vh" :interval="30000" indicator-position="none">
<el-carousel-item> <el-carousel-item>
<dv-scroll-board <dv-scroll-board
:config="configDataProd" :config="configDataProd"
@ -145,11 +145,11 @@
<div>质量分析</div> <div>质量分析</div>
</div> </div>
<div class="itemBody3"> <div class="itemBody3">
<scEcharts height="165px" width="128px" :option="options"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="options"></scEcharts>
<scEcharts height="165px" width="128px" :option="option1"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option1"></scEcharts>
<scEcharts height="165px" width="128px" :option="option2"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option2"></scEcharts>
<scEcharts height="165px" width="128px" :option="option3"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option3"></scEcharts>
<scEcharts height="165px" width="128px" :option="option4"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option4"></scEcharts>
</div> </div>
</div> </div>
</div> </div>
@ -159,7 +159,7 @@
<div class="itemTitleIcon"></div> <div class="itemTitleIcon"></div>
<div>实时视频</div> <div>实时视频</div>
</div> </div>
<div class="itemBody"> <div class="itemBody" style="height: 32.5vh;">
<video width="100%" height="100%" autoplay controls loop> <video width="100%" height="100%" autoplay controls loop>
<!-- <source :src="videoUrl" type="video/mp4"> --> <!-- <source :src="videoUrl" type="video/mp4"> -->
<source src="img/gx/gx_video.mp4" type="video/mp4"> <source src="img/gx/gx_video.mp4" type="video/mp4">
@ -174,46 +174,17 @@
<div class="itemBody"> <div class="itemBody">
<div class="viewsItem" v-for="articleItem in articleList" :key="articleItem.id"> <div class="viewsItem" v-for="articleItem in articleList" :key="articleItem.id">
<div class="viewsItem_wrap"> <div class="viewsItem_wrap">
<!-- <img style="float: left;" class="viewsItem_img" src="img/gz_logo.png"> -->
<img style="float: left;" class="viewsItem_img" :src="articleItem.poster"> <img style="float: left;" class="viewsItem_img" :src="articleItem.poster">
<article> <article>
{{ articleItem.content }} {{ articleItem.content }}
</article> </article>
</div> </div>
</div> </div>
<div class="viewsItem">
<div class="viewsItem_wrap">
<img style="float: left;" class="viewsItem_img" src="img/gz_logo.png">
<article>
紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查
</article>
</div>
</div>
<!-- <div class="viewsItem">
<div class="viewsItem_wrap">
<img style="float: left;" class="viewsItem_img" src="img/gz_logo.png">
<article>
紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查
</article>
</div>
</div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="bottom_block"> <div class="bottom_block">
<div id="scroll" class="bottom_block2"> <div id="scroll" class="bottom_block2">
<!-- <div class="flexItem3">
<div class="itemTitle itemTitle_b">
<div>切片</div>
</div>
<div class="itemBody">
<dv-scroll-board
:config="configData0"
class="inmBoxmain"
/>
</div>
</div> -->
<div class="flexItem3"> <div class="flexItem3">
<div class="flexItem3_title">切片</div> <div class="flexItem3_title">切片</div>
<div class="flexItem3Body"> <div class="flexItem3Body">
@ -221,7 +192,7 @@
:config="configData0" :config="configData0"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options0"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options0"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -231,7 +202,7 @@
:config="configData2" :config="configData2"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options2"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options2"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -241,7 +212,7 @@
:config="configData3" :config="configData3"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options3"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options3"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -251,7 +222,7 @@
:config="configData4" :config="configData4"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options4"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options4"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -261,7 +232,7 @@
:config="configData5" :config="configData5"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options5"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options5"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -271,7 +242,7 @@
:config="configData6" :config="configData6"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options6"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options6"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -281,7 +252,7 @@
:config="configData8" :config="configData8"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options8"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options8"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -291,7 +262,7 @@
:config="configData9" :config="configData9"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options9"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options9"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -301,7 +272,7 @@
:config="configData10" :config="configData10"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options10"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options10"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -311,7 +282,7 @@
:config="configData11" :config="configData11"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options11"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options11"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -321,7 +292,7 @@
:config="configData12" :config="configData12"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options12"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options12"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -331,7 +302,7 @@
:config="configData13" :config="configData13"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options13"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options13"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -341,7 +312,7 @@
:config="configData14" :config="configData14"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options14"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options14"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -351,7 +322,7 @@
:config="configData15" :config="configData15"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options15"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options15"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -361,7 +332,7 @@
:config="configData0" :config="configData0"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options0"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options0"></scEcharts>
</div> </div>
</div> </div>
</div> </div>
@ -388,7 +359,7 @@ import baseUrl from "@/config";
const configData={ const configData={
header : ['物料批次','未加工','进行中','已完成','合格数'], header : ['物料批次','未加工','进行中','已完成','合格数'],
headerBGC : '#0a3f44', headerBGC : '#0a3f44',
rowNum : 3, rowNum : 4,
headerHeight : 35, headerHeight : 35,
align : 'center', align : 'center',
waitTime : 150000, waitTime : 150000,
@ -691,14 +662,22 @@ export default {
options15:{}, options15:{},
articleList:[], articleList:[],
videoUrl:'', videoUrl:'',
pieWidth:0,
lineWidth:0,
pieHeight:0,
lineHeight:0,
}; };
}, },
mounted() { mounted() {
let that = this; let that = this;
that.initFactory(); var windowHeight = window.innerHeight;
var windowWidth = window.innerWidth;
that.pieWidth =Math.round((windowWidth/100*33)/5)+'px';
that.pieHeight = Math.round((windowHeight/100)*13)+'px';
that.lineWidth = (windowWidth/5-10)+'px';
that.lineHeight = (windowHeight/100)*12.5+'px';
that.bigScreenName = that.$TOOL.data.get("BASE_INFO").base.bigScreen_name; that.bigScreenName = that.$TOOL.data.get("BASE_INFO").base.bigScreen_name;
that.showTime();
that.addListener();
// //
let nowDate = new Date(); let nowDate = new Date();
let year = nowDate.getFullYear(); let year = nowDate.getFullYear();
@ -716,14 +695,7 @@ export default {
} }
// dayArr.push(day); // dayArr.push(day);
that.dayArr = dayArr; that.dayArr = dayArr;
that.getEquipments();
that.getMaterials();
that.getMgroup();
that.getTaskNumber();
that.addListener();
that.setIntervalFun();
that.getQulity();
that.getArticles();
that.myChart = echarts.init(document.getElementById('eqPieChart')); that.myChart = echarts.init(document.getElementById('eqPieChart'));
that.myChart.setOption(that.option_eq); that.myChart.setOption(that.option_eq);
let index2 = 0; let index2 = 0;
@ -748,6 +720,19 @@ export default {
index2 = 0; index2 = 0;
} }
}, 3000); }, 3000);
that.$nextTick(function () {
that.getEquipments();
that.getMaterials();
that.getMgroup();
that.getTaskNumber();
that.addListener();
that.setIntervalFun();
that.getQulity();
that.getArticles();
that.initFactory();
that.showTime();
that.addListener();
})
}, },
methods: { methods: {
// //
@ -826,16 +811,18 @@ export default {
// //
setIntervalFun(){ setIntervalFun(){
let that = this; let that = this;
let containerWidth = document.getElementsByClassName("container")[0].offsetWidth;
let wdiths = containerWidth/5;
that.scrollInterval = setInterval(() => { that.scrollInterval = setInterval(() => {
if(that.scrollNum>8){ if(that.scrollNum>8){
that.scrollNum = 0; that.scrollNum = 0;
}else{ }else{
that.scrollNum++; that.scrollNum++;
} }
let nums = that.scrollNum * 384; let nums = that.scrollNum * wdiths;
let lefts = 0-nums; let lefts = 0-nums;
document.getElementById("scroll").style.left = lefts +'px'; document.getElementById("scroll").style.left = lefts +'px';
},6000) },600000)
}, },
// //
showTime() { showTime() {
@ -871,6 +858,10 @@ export default {
var windowWidth = window.innerWidth; var windowWidth = window.innerWidth;
var container = document.getElementsByClassName("container")[0]; var container = document.getElementsByClassName("container")[0];
var model = document.getElementsByClassName("model")[0]; var model = document.getElementsByClassName("model")[0];
that.pieWidth = windowWidth/500*33+'px';
that.lineWidth = (windowWidth/5-10)+'px';
that.pieHeight = windowHeight/100*13+'px';
that.lineHeight = windowHeight/100*12.8+'px';
if (windowWidth > 960) { if (windowWidth > 960) {
container.style.overflow = "hidden"; container.style.overflow = "hidden";
model.style.position = "absolute"; model.style.position = "absolute";
@ -1191,17 +1182,17 @@ export default {
.container { .container {
/* background: url("/public/img/gx/gx_bj.jpg") no-repeat; */ /* background: url("/public/img/gx/gx_bj.jpg") no-repeat; */
background-size: cover; background-size: cover;
height: 1080px; height: 100vh;
width: 1920px; width: 100vw;
position: relative; position: relative;
} }
/* header-start */ /* header-start */
.pageHeader { .pageHeader {
z-index: 100; z-index: 100;
height: 70px; height: 6.48vh;
width: 1920px; width: 100vw;
padding: 0 20px; padding: 0 1vw;
line-height:70px; line-height:6.48vh;
color: #ffffff; color: #ffffff;
position: absolute; position: absolute;
text-align: center; text-align: center;
@ -1210,30 +1201,30 @@ export default {
/* border-bottom: 1px solid rgba(54, 217, 187, 0.3); */ /* border-bottom: 1px solid rgba(54, 217, 187, 0.3); */
} }
.header_left{ .header_left{
position: absolute;top: 0;left: 10px;font-size: 18px; position: absolute;top: 0;left: 1vw;font-size: 18px;
} }
.header_center_text{ .header_center_text{
font-family: myfont;letter-spacing: 0.2em; font-size: 38px;line-height:53px;z-index: 100; font-family: myfont;letter-spacing: 0.2em; font-size: 3vh;line-height:5vh;z-index: 100;
} }
.header_right{ .header_right{
position: absolute;top: 0;right: 10px;font-size: 18px; position: absolute;top: 0;right: 1vw;font-size: 18px;
} }
.header_bg{ .header_bg{
z-index: -1;position: absolute;top:0;left:0;width:1920px;height:70px; z-index: -1;position: absolute;top:0;left:0;width:100vw;height:6.48vh;
} }
.header_line{ .header_line{
top:65px; top:6vh;
height: 1px; height: 1px;
position: absolute; position: absolute;
background: rgb(54,217,187); background: rgb(54,217,187);
} }
.header_line1{ .header_line1{
width: 10px; width: 0.5vw;
right: 160px; right: 8vw;
} }
.header_line2{ .header_line2{
width: 20px; width: 1.5vw;
right: 80px; right: 4vw;
} }
/* header-end */ /* header-end */
@ -1241,8 +1232,8 @@ export default {
.left_block, .left_block,
.left_block2, .left_block2,
.right_block{ .right_block{
top:74px; top:6.48vh;
width:320px; width:16.5vw;
z-index: 10; z-index: 10;
display: flex; display: flex;
position:absolute; position:absolute;
@ -1254,65 +1245,67 @@ export default {
background: rgba(9, 31, 43, 0.5); background: rgba(9, 31, 43, 0.5);
} }
.left_block3{ .left_block3{
top:340px; top:31.48vh;
left: 0; left: 0;
width:640px; width:33vw;
display: flex; display: flex;
position:absolute; position:absolute;
overflow:hidden; overflow:hidden;
flex-direction: column; flex-direction: column;
padding: 0 5px; padding: 0 5px;
height: 400px; height: 37vh;
background: rgba(9, 31, 43, 0.5); background: rgba(9, 31, 43, 0.5);
} }
.left_block3 .flexItem{ .left_block3 .flexItem{
width:630px; width:32.8vw;
height: 38vh;
} }
.left_block { .left_block {
left: 0; left: 0;
height: 270px; height: 25vh;
} }
.right_block { .right_block {
right: 0; right: 0;
width:640px; width:33vw;
height: 670px; height: 62vh;
} }
.left_block2{ .left_block2{
left: 320px; left: 16.5vw;
height: 270px; height: 25vh;
padding: 0 5px; padding: 0 5px;
} }
.left_block2 .flexItem{ .left_block2 .flexItem{
width:310px; width:16vw;
} }
.flexItem{ .flexItem{
width: 310px; width: 16.5vw;
} }
.videoFlexItem{ .videoFlexItem{
width: 630px; width: 32.8vw;
height: 400px; height: 37vh;
} }
.newsFlexItem{ .newsFlexItem{
width: 620px; width: 32.8vw;
height: 270px; height: 25vh;
} }
/* //短标题 */ /* //短标题 */
.itemTitle{ .itemTitle{
color: #fff; color: #fff;
height:45px; height: 4.2vh;
padding-left: 1.5em; padding-left: 1.5em;
font-size: 16px; font-size: 1.3vh;
line-height: 40px; line-height: 4vh;
width: 16vw;
background-size: 100% 100%; background-size: 100% 100%;
background-image: url("/public/img/gx/title_bg2.png"); background-image: url("/public/img/gx/title_bg2.png");
} }
/* //长标题 */ /* //长标题 */
.itemTitle2 { .itemTitle2 {
color: #fff; color: #fff;
height:45px; height:4.2vh;
padding-left: 1.5em; padding-left: 1.5em;
font-size: 16px; font-size: 1.3vh;
line-height: 40px; line-height: 4vh;
background: url("/public/img/gx/title_bg.png") ; background: url("/public/img/gx/title_bg.png") ;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
@ -1329,7 +1322,7 @@ export default {
} }
.block1NumberWrap{ .block1NumberWrap{
width:135px; width:7.5vw;
border: 1px solid rgba(54, 217, 187, 0.3); border: 1px solid rgba(54, 217, 187, 0.3);
padding: 3px; padding: 3px;
text-align: center; text-align: center;
@ -1337,20 +1330,20 @@ export default {
.block1Numberinner{ .block1Numberinner{
background: rgba(54, 217, 187, 0.3); background: rgba(54, 217, 187, 0.3);
color: #fff; color: #fff;
height:64px; height: 6vh;
line-height:80px; line-height: 7.5vh;
position: relative; position: relative;
} }
.block1Text{ .block1Text{
top: 0; top: 0;
left: 10px; left: 10px;
height: 30px; height: 2vh;
line-height: 30px; line-height: 2vh;
position: absolute; position: absolute;
font-size: 14px; font-size: 0.8vh;
} }
.block1Number{ .block1Number{
font-size: 26px; font-size: 1.6vh;
vertical-align: bottom; vertical-align: bottom;
margin: 0 0.5em; margin: 0 0.5em;
color: orange; color: orange;
@ -1374,7 +1367,7 @@ export default {
display: flex; display: flex;
} }
.boxmain{ .boxmain{
height: 140px; height: 13vh;
width:100%; width:100%;
margin:auto; margin:auto;
} }
@ -1384,7 +1377,7 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 340px; height: 31vh;
overflow: hidden; overflow: hidden;
} }
.bottom_block2{ .bottom_block2{
@ -1392,22 +1385,22 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 340px; height: 31.4vh;
display: flex; display: flex;
transition: left 2s ease; transition: left 2s ease;
} }
.flexItem3 { .flexItem3 {
width: 384px; width: 20vw;
height: 340px; height: 31.5vh;
position: relative; position: relative;
background: rgba(9, 31, 43, 0.5) background: rgba(9, 31, 43, 0.5)
} }
.flexItem3_title{ .flexItem3_title{
left: 50%; left: 50%;
width: 150px; width: 7.8vw;
height: 30px; height: 2.8vh;
line-height: 28px; line-height: 2.5vh;
font-size: 16px; font-size: 16px;
color: #00ffff; color: #00ffff;
text-align: center; text-align: center;
@ -1416,24 +1409,24 @@ export default {
box-shadow: inset 0 0 5px 5px rgb(0 255 255 / 32%); box-shadow: inset 0 0 5px 5px rgb(0 255 255 / 32%);
z-index: 99; z-index: 99;
position: absolute; position: absolute;
top: 0; top: 0.6vh;
transform: translateX(-50%); transform: translateX(-50%);
background: rgb(4 50 83); background: rgb(4 50 83);
} }
.flexItem3Body{ .flexItem3Body{
width: 380px; width: 19.8vw;
height: 315px; height: 28.5vh;
padding-top: 25px; padding-top: 2.3vh;
border: 1px solid #00ffff; border: 1px solid #00ffff;
border-radius: 5px; border-radius: 5px;
position: absolute; position: absolute;
top: 15px; top: 2vh;
box-shadow: inset 0 0 15px 5px rgb(0 255 255 / 32%); box-shadow: inset 0 0 15px 5px rgb(0 255 255 / 32%);
} }
.inmBoxmain{ .inmBoxmain{
flex: 1; flex: 1;
height:140px; height:12.96vh;
width:98%; width:98%;
margin:auto; margin:auto;
/* border-left: 2px solid #0f5b8e; */ /* border-left: 2px solid #0f5b8e; */
@ -1444,21 +1437,21 @@ export default {
} }
.viewsItem { .viewsItem {
color: #ffffff; color: #ffffff;
width: 620px; width: 32.3vw;
height: 100px; height: 9.26vh;
font-size: 15px; font-size: 15px;
display: inline-block; display: inline-block;
margin-bottom: 10px; margin-bottom: 1vh;
} }
.viewsItem_wrap { .viewsItem_wrap {
height: 100px; height: 9.26vh;
flex-direction: column; flex-direction: column;
border-left: 5px solid rgba(28, 169, 231, 0.81); border-left: 5px solid rgba(28, 169, 231, 0.81);
padding-left: 10px; padding-left: 10px;
border-radius: 5px; border-radius: 5px;
} }
.viewsItem_img{ .viewsItem_img{
width: 85px; width: 4.4vw;
margin-top: 10px; margin-top: 10px;
} }
article{ article{

View File

@ -21,9 +21,10 @@
v-model="form.batch" v-model="form.batch"
placeholder="物料批次" placeholder="物料批次"
clearable clearable
filterable
style="width: 100%" style="width: 100%"
@change="handleChange" @change="handleChange"
disabled="mode != 'add'" :disabled="mode != 'add'"
> >
<el-option <el-option
v-for="item in options" v-for="item in options"

View File

@ -0,0 +1,341 @@
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-select
v-model="query.batch"
style="width: 200px"
@change="batchChange"
>
<el-option
v-for="item in options"
:key="item.batch"
:label="item.batch"
:value="item.batch">
</el-option>
</el-select>
<el-date-picker
v-model="query.date"
type="date"
placeholder="查询日期"
value-format="YYYY-MM-DD"
style="width: 150px; margin-right: 10px"
>
</el-date-picker>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button
@click="handleExport"
class="tables"
type="primary"
>导出</el-button
>
</div>
</el-header>
<el-main class="nopadding">
<scTable
:data="tableData"
id="exportDiv"
stripe
hideDo
hidePagination
>
<el-table-column label="产品编号" prop="产品编号">
</el-table-column>
<el-table-column label="7号车间生产" prop="7号车间生产" align="center">
<el-table-column label="规格" prop="规格">
</el-table-column>
<el-table-column label="实际重量/KG" prop="实际重量">
</el-table-column>
<el-table-column label="合格重量/KG" prop="合格重量">
</el-table-column>
<el-table-column label="应出数" prop="应出数">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="废品数" prop="废品数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="炸纹" prop="炸纹">
</el-table-column>
<el-table-column label="气泡" prop="气泡">
</el-table-column>
<el-table-column label="炸头" prop="炸头">
</el-table-column>
<el-table-column label="条纹" prop="条纹">
</el-table-column>
<el-table-column label="弯曲" prop="弯曲">
</el-table-column>
<el-table-column label="断" prop="断">
</el-table-column>
<el-table-column label="粘料" prop="粘料">
</el-table-column>
<el-table-column label="杂质" prop="杂质">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="出料" prop="出料">
</el-table-column>
<el-table-column label="切料" prop="切料">
</el-table-column>
<el-table-column label="备注" prop="备注">
</el-table-column>
</el-table-column>
<el-table-column label="8号车间中检" prop="8号车间中检" align="center">
<el-table-column label="时间" prop="时间">
</el-table-column>
<el-table-column label="接收数" prop="接收数">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="纹" prop="纹">
</el-table-column>
<el-table-column label="气泡" prop="气泡">
</el-table-column>
<el-table-column label="裂" prop="裂">
</el-table-column>
<el-table-column label="弯" prop="弯">
</el-table-column>
<el-table-column label="扁" prop="扁">
</el-table-column>
<el-table-column label="青" prop="青">
</el-table-column>
<el-table-column label="杂质" prop="杂质">
</el-table-column>
<el-table-column label="矫正" prop="矫正">
</el-table-column>
<el-table-column label="交送人" prop="交送人">
</el-table-column>
<el-table-column label="接收人" prop="接收人">
</el-table-column>
<el-table-column label="备注" prop="备注">
</el-table-column>
</el-table-column>
<el-table-column label="6号车间加工" prop="6号车间加工" align="center">
<el-table-column label="领棒日期" prop="领棒日期">
</el-table-column>
<el-table-column label="领取数量" prop="领取数量">
</el-table-column>
<el-table-column label="平头" prop="平头">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="摔断" prop="摔断">
</el-table-column>
<el-table-column label="少" prop="少">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="粘头接收数" prop="粘头接收数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="气泡" prop="气泡">
</el-table-column>
<el-table-column label="少" prop="少">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="粗中细接收数" prop="粗中细接收数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="皮" prop="皮">
</el-table-column>
<el-table-column label="掉头" prop="掉头">
</el-table-column>
<el-table-column label="断裂" prop="断裂">
</el-table-column>
<el-table-column label="炸裂" prop="炸裂">
</el-table-column>
<el-table-column label="气泡" prop="气泡">
</el-table-column>
<el-table-column label="杂质" prop="杂质">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="抛光接收数" prop="抛光接收数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="掉头" prop="掉头">
</el-table-column>
<el-table-column label="断裂" prop="断裂">
</el-table-column>
<el-table-column label="气泡" prop="气泡">
</el-table-column>
<el-table-column label="划伤" prop="划伤">
</el-table-column>
<el-table-column label="少" prop="少">
</el-table-column>
<el-table-column label="杂质" prop="杂质">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="开槽接收数" prop="开槽接收数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="切割划伤" prop="切割划伤">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="检测接收数" prop="检测接收数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="磕划" prop="磕划">
</el-table-column>
<el-table-column label="锥" prop="锥">
</el-table-column>
<el-table-column label="皮" prop="皮">
</el-table-column>
<el-table-column label="不亮" prop="不亮">
</el-table-column>
<el-table-column label="纹" prop="纹">
</el-table-column>
<el-table-column label="气泡" prop="气泡">
</el-table-column>
<el-table-column label="小" prop="小">
</el-table-column>
<el-table-column label="少" prop="少">
</el-table-column>
<el-table-column label="杂质" prop="杂质">
</el-table-column>
<el-table-column label="裂" prop="裂">
</el-table-column>
<el-table-column label="色差" prop="色差">
</el-table-column>
<el-table-column label="碎" prop="碎">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
</el-table-column>
<el-table-column label="技术质量" prop="技术质量" align="center">
<el-table-column label="终检" prop="终检">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="划伤" prop="划伤">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="时间" prop="时间">
</el-table-column>
<el-table-column label="合格重量/KG" prop="合格重量">
</el-table-column>
</el-table-column>
<el-table-column label="6号领取加工-发货合格率" prop="6号领取加工-发货合格率">
</el-table-column>
<el-table-column label="7号生产-发货合格率" prop="7号生产-发货合格率">
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
export default {
name: "chart",
data() {
return {
query: {
batch: "",
date:''
},
options:[],
tableData:[],
};
},
mounted() {
let that = this;
that.getOptions();
// that.getTableData();
},
methods: {
//
getOptions(){
let that = this;
let obj = {};
obj.page = 0;
obj.type__in = "10,20";
obj.is_hidden = false;
that.options = [];
that.$API.mtm.material.list.req(obj).then((res) => {
if(res.length>0){
that.options = res;
}
});
},
//
getTableData(){
let that = this;
let obj = {};
obj.query = that.query;
that.tableData =[];
that.$API.bi.dataset.exec.req('batch_search', obj).then((res) => {
if(res.data2.ds0){
that.tableData = res.data2.ds0;
}
});
},
searchTypeChange(){
this.query.batch = '';
},
batchChange(val){
},
handleQuery(){
this.getTableData();
},
},
};
</script>
<style scoped>
#bachart1{
width: 100%;
height: 500px;
}
.tableHead {
background:rgb(0,176,240);
height:40px;
}
.tableTh{
width:120px;
height:36px;
}
.tableTd{
width:120px;
height:36px;
}
</style>

View File

@ -0,0 +1,330 @@
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-select
v-model="query.batch"
style="width: 200px"
@change="batchChange"
>
<el-option
v-for="item in options"
:key="item.batch"
:label="item.batch"
:value="item.batch">
</el-option>
</el-select>
<el-date-picker
v-model="query.date"
type="date"
placeholder="查询日期"
value-format="YYYY-MM-DD"
style="width: 150px; margin-right: 10px"
>
</el-date-picker>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button
@click="handleExport"
class="tables"
type="primary"
>导出</el-button
>
</div>
</el-header>
<el-main class="nopadding">
<scTable
:data="tableData"
id="exportDiv"
stripe
hideDo
hidePagination
>
<el-table-column label="10号生产" align="center">
<el-table-column label="产品编号" prop="产品编号">
</el-table-column>
<el-table-column label="规格" prop="规格">
</el-table-column>
<el-table-column label="生产数量" prop="生产数量">
</el-table-column>
<el-table-column label="合格数量" prop="合格数量">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="不合格数" prop="不合格数">
</el-table-column>
<el-table-column label="结石气线" prop="结石气线">
</el-table-column>
<el-table-column label="断裂" prop="断裂">
</el-table-column>
<el-table-column label="偏壁" prop="偏壁">
</el-table-column>
<el-table-column label="大小头" prop="大小头">
</el-table-column>
<el-table-column label="条纹" prop="条纹">
</el-table-column>
<el-table-column label="变形椭圆" prop="变形椭圆">
</el-table-column>
<el-table-column label="原因" prop="原因">
</el-table-column>
</el-table-column>
<el-table-column label="10号抽检" align="center">
<el-table-column label="抽检数量" prop="抽检数量">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="偏壁" prop="偏壁">
</el-table-column>
<el-table-column label="结石" prop="结石">
</el-table-column>
<el-table-column label="脏料" prop="脏料">
</el-table-column>
<el-table-column label="断裂" prop="断裂">
</el-table-column>
<el-table-column label="椭圆" prop="椭圆">
</el-table-column>
<el-table-column label="炸裂" prop="炸裂">
</el-table-column>
<el-table-column label="锥" prop="锥">
</el-table-column>
<el-table-column label="大小头" prop="大小头">
</el-table-column>
<el-table-column label="划伤" prop="划伤">
</el-table-column>
<el-table-column label="气线" prop="气线">
</el-table-column>
<el-table-column label="炸纹" prop="炸纹">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="抽检人" prop="抽检人">
</el-table-column>
</el-table-column>
<el-table-column label="8号入库" align="center">
<el-table-column label="时间" prop="时间">
</el-table-column>
<el-table-column label="入库数" prop="入库数">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="结石" prop="结石">
</el-table-column>
<el-table-column label="气线" prop="气线">
</el-table-column>
<el-table-column label="断裂" prop="断裂">
</el-table-column>
<el-table-column label="划伤" prop="划伤">
</el-table-column>
<el-table-column label="碎" prop="碎">
</el-table-column>
<el-table-column label="内径小" prop="内径小">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="备注" prop="备注">
</el-table-column>
<el-table-column label="接收人" prop="接收人">
</el-table-column>
</el-table-column>
<el-table-column label="退火" align="center">
<el-table-column label="时间" prop="时间">
</el-table-column>
<el-table-column label="退火数" prop="退火数">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="碎" prop="碎">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="退火人" prop="退火人">
</el-table-column>
</el-table-column>
<el-table-column label="6号领取" align="center">
<el-table-column label="领取时间" prop="领取时间">
</el-table-column>
<el-table-column label="领取数" prop="领取数">
</el-table-column>
<el-table-column label="交送人" prop="交送人">
</el-table-column>
<el-table-column label="领取人" prop="领取人">
</el-table-column>
<el-table-column label="备注" prop="备注">
</el-table-column>
</el-table-column>
<el-table-column label="开管" align="center">
<el-table-column label="开槽" prop="开槽">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="短" prop="短">
</el-table-column>
<el-table-column label="少" prop="少">
</el-table-column>
<el-table-column label="断裂" prop="断裂">
</el-table-column>
<el-table-column label="红锈" prop="红锈">
</el-table-column>
<el-table-column label="开槽前检验不合格" prop="开槽前检验不合格">
</el-table-column>
<el-table-column label="加工日期" prop="加工日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="备注" prop="备注">
</el-table-column>
</el-table-column>
<el-table-column label="检验" align="center">
<el-table-column label="检验" prop="检验">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="划伤" prop="划伤">
</el-table-column>
<el-table-column label="气线" prop="气线">
</el-table-column>
<el-table-column label="炸纹" prop="炸纹">
</el-table-column>
<el-table-column label="偏壁" prop="偏壁">
</el-table-column>
<el-table-column label="弯" prop="弯">
</el-table-column>
<el-table-column label="大小头" prop="大小头">
</el-table-column>
<el-table-column label="结子" prop="结子">
</el-table-column>
<el-table-column label="锥" prop="锥">
</el-table-column>
<el-table-column label="椭" prop="椭">
</el-table-column>
<el-table-column label="短" prop="短">
</el-table-column>
<el-table-column label="少" prop="少">
</el-table-column>
<el-table-column label="多" prop="多">
</el-table-column>
<el-table-column label="碎裂" prop="碎裂">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="日期" prop="日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
</el-table-column>
<el-table-column label="终检" align="center">
<el-table-column label="终检" prop="终检">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<el-table-column label="划伤" prop="划伤">
</el-table-column>
<el-table-column label="炸纹" prop="炸纹">
</el-table-column>
<el-table-column label="气线" prop="气线">
</el-table-column>
<el-table-column label="结子" prop="结子">
</el-table-column>
<el-table-column label="其他" prop="其他">
</el-table-column>
<el-table-column label="日期" prop="日期">
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
</el-table-column>
<el-table-column label="领管-终检合格率" prop="领管-终检合格率">
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
export default {
name: "chart",
data() {
return {
query: {
batch: "",
date:''
},
options:[],
tableData:[],
};
},
mounted() {
let that = this;
that.getOptions();
// that.getTableData();
},
methods: {
//
getOptions(){
let that = this;
let obj = {};
obj.page = 0;
obj.type__in = "10,20";
obj.is_hidden = false;
that.options = [];
that.$API.mtm.material.list.req(obj).then((res) => {
if(res.length>0){
that.options = res;
}
});
},
//
getTableData(){
let that = this;
let obj = {};
obj.query = that.query;
that.tableData =[];
that.$API.bi.dataset.exec.req('batch_search', obj).then((res) => {
if(res.data2.ds0){
that.tableData = res.data2.ds0;
}
});
},
searchTypeChange(){
this.query.batch = '';
},
batchChange(val){
},
handleQuery(){
this.getTableData();
},
},
};
</script>
<style scoped>
#bachart1{
width: 100%;
height: 500px;
}
.tableHead {
background:rgb(0,176,240);
height:40px;
}
.tableTh{
width:120px;
height:36px;
}
.tableTd{
width:120px;
height:36px;
}
</style>

View File

@ -3,28 +3,44 @@
@closed="$emit('closed')"> @closed="$emit('closed')">
<el-form ref="dialogForm" :model="form" :rules="rules" label-width="80px"> <el-form ref="dialogForm" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :md="12" :sm="24"> <el-col>
<el-form-item label="交接物料" prop="material"> <el-form-item label="交接物料" prop="wm">
<el-select v-model="form.wm" placeholder="交接物料" clearable style="width:100%" <el-select
@change="materialChange"> v-model="formWm"
<el-option v-for="item in materialOptions" :key="item.id" :label="item.batch" placeholder="交接物料"
:value="item.id"></el-option> clearable
value-key="id"
style="width:100%"
:disabled="mode == 'edit'"
@change="materialChange"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.material_name + '---' + item.batch"
:value="item"
>
<span style="float: left"
>{{ item.material_name }}---{{
item.batch
}}</span
>
<span
style="
float: right;
color: var(--el-text-color-secondary);
font-size: 13px;
"
>{{ item.count }}</span
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="交接数量" width="100"> <el-form-item label="交送日期">
<el-input-number v-model="form.count" controls-position="right" :min="0" step="1" <el-date-picker v-model="form.send_date" type="date" placeholder="选择时间" format="YYYY-MM-DD"
:step-strictly="true" style="width:100%" placeholder="交接数量"> value-format="YYYY-MM-DD" style="width:100%" />
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="送料部门" prop="send_dept">
<el-select v-model="form.send_dept" placeholder="送料部门" clearable style="width:100%">
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
@ -36,7 +52,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="接收部门" prop="recive_dept"> <el-form-item label="接收部门" prop="recive_dept">
<el-select v-model="form.recive_dept" placeholder="接收部门" clearable style="width:100%"> <el-select v-model="form.recive_dept" placeholder="接收部门" @change="reciveDeptChange" clearable style="width:100%">
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" <el-option v-for="item in deptOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
@ -50,9 +66,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="交送日期"> <el-form-item label="交接数量" width="100">
<el-date-picker v-model="form.send_date" type="date" placeholder="选择时间" format="YYYY-MM-DD" <el-input-number v-model="form.count" controls-position="right" :min="0" step="1"
value-format="YYYY-MM-DD" style="width:100%" /> :step-strictly="true" style="width:100%" placeholder="交接数量">
</el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -66,6 +83,11 @@
<script> <script>
export default { export default {
emits: ["success", "closed"], emits: ["success", "closed"],
props: {
mgroup: { type: String, default: "" },
type: { type: String, default: "" },
dept: { type: String, default: "" }
},
data() { data() {
return { return {
yseorno: ['是', '否'], yseorno: ['是', '否'],
@ -78,15 +100,19 @@ export default {
}, },
handle_user: [], handle_user: [],
form: { form: {
batch: '',
count: 0,//
wm: '', wm: '',
batch: '',
count: 0, //
send_user: '', send_user: '',
send_dept: '', send_dept: '',
send_date: '', send_date: '',
send_mgroup:'',
recive_dept: '', recive_dept: '',
recive_user: '', recive_user: '',
count_eweight : 0 ,//
// handoverb:[],
}, },
formWm:null,
userList: [], userList: [],
userList2: [], userList2: [],
deptOptions: [], deptOptions: [],
@ -97,39 +123,42 @@ export default {
}; };
}, },
mounted() { mounted() {
let materialObj = this.$TOOL.data.get('MATERIAL_OBJECT'); let that = this;
this.materialObj = materialObj;
this.getDeptOptions();
this.getMaterial();
this.getUserList();
let date = new Date(); let date = new Date();
let year = date.getFullYear(); let year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
let day = date.getDate(); let day = date.getDate();
this.form.handle_date = year + '-' + month + '-' + day; that.form.handle_date = that.$TOOL.dateFormat2(date);
let materialObj = that.$TOOL.data.get('MATERIAL_OBJECT');
that.materialObj = materialObj;
that.getDeptOptions();//
that.getMaterial();//
that.getUserList();//
that.form.send_dept = that.dept;
}, },
methods: { methods: {
//68 //
getUserList() { getUserList() {
let that = this; let that = this;
this.$API.system.user.list.req({ belong_dept__name: '6车间', page: 0 }).then(res => { that.$API.system.user.list.req({ belong_dept: that.dept, page: 0 }).then(res => {
that.userList2 = res;
});
this.$API.system.user.list.req({ belong_dept__name: '8车间', page: 0 }).then(res => {
that.userList = res; that.userList = res;
}); });
}, },
// //
getDeptOptions() { getDeptOptions() {
this.$API.system.dept.list.req({ page: 0, type__in: 'dept' }).then((res) => { let that = this;
this.deptOptions = res; that.$API.system.dept.list.req({ page: 0, type__in: 'dept' }).then((res) => {
that.deptOptions = res;
}); });
}, },
// //
getMaterial() { getMaterial() {
let that = this; let that = this;
this.$API.wpm.wmaterial.list.req({ belong_dept_name: '8车间', page: 0 }).then(res => { let obj = {};
obj.belong_dept = that.dept;
obj.page = 0;
obj.count__gte = 1;
that.$API.wpm.wmaterial.list.req(obj).then(res => {
that.materialOptions = res; that.materialOptions = res;
}); });
}, },
@ -149,36 +178,49 @@ export default {
this.visible = true; this.visible = true;
return this; return this;
}, },
//
reciveDeptChange(){
let that = this;
that.$API.system.user.list.req({ belong_dept:that.form.recive_dept, page: 0 }).then(res => {
that.userList2 = res;
});
},
materialChange(val) { materialChange(val) {
let data = this.materialOptions.filter(item => { // let obj = new Object();
return item.id == val; // obj.wm = val.id;
}) // obj.count = val.count;
this.form.batch = data[0].batch; // this.form.handoverb.push(obj);
this.form.wm = val.id;
this.form.count = val.count;
this.form.batch = val.batch;
this.form.material = val.material;
// this.form.count_eweight = val.count_eweight;
}, },
// //
submit() { submit() {
this.$refs.dialogForm.validate(async (valid) => { let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) { if (valid) {
if (this.mode == "add") { if (that.mode == "add") {
this.$API.wpm.handover.create.req(this.form).then(res => { that.$API.wpm.handover.create.req(that.form).then(res => {
this.isSaveing = false; that.isSaveing = false;
this.$emit("success", this.form, this.mode); that.$emit("success", that.form, that.mode);
this.visible = false; that.visible = false;
this.$message.success("操作成功"); that.$message.success("操作成功");
}).catch((err) => { }).catch((err) => {
// //
this.isSaveing = false; that.isSaveing = false;
return err; return err;
}) })
} else if (this.mode == "edit") { } else if (that.mode == "edit") {
this.$API.wpm.handover.update.req(this.form.id, this.form).then(res => { that.$API.wpm.handover.update.req(that.form.id, that.form).then(res => {
this.isSaveing = false; that.isSaveing = false;
this.$emit("success", this.form, this.mode); that.$emit("success", that.form, that.mode);
this.visible = false; that.visible = false;
this.$message.success("操作成功"); that.$message.success("操作成功");
}).catch((err) => { }).catch((err) => {
// //
this.isSaveing = false; that.isSaveing = false;
return err; return err;
}) })
} }

View File

@ -424,7 +424,13 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px;margin-right: 10px;">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增
</el-button>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input <el-input
@ -644,6 +650,14 @@
<el-button @click="addMtaskInfoVisible = false">取消</el-button> <el-button @click="addMtaskInfoVisible = false">取消</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<handover-dialog
v-if="dialogHandover"
ref="handoverDialog"
:mgroup="mgroup"
:dept="currentDept.id"
@success="handleHandoverSuccess"
@closed="dialogHandover = false">
</handover-dialog>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%"> <el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials <materials
style="height: 500px" style="height: 500px"
@ -656,6 +670,7 @@
</template> </template>
<script> <script>
import handoverDialog from "./handover_form.vue";
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue"; import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue"; import materials from "./../mtm/materials.vue";
@ -664,6 +679,7 @@ export default {
saveDialog, saveDialog,
showDrawer, showDrawer,
materials, materials,
handoverDialog
}, },
data() { data() {
return { return {
@ -708,6 +724,7 @@ export default {
material_model: "", material_model: "",
queryMtaskState: false, queryMtaskState: false,
materialsVisible: false, materialsVisible: false,
dialogHandover:false,
}; };
}, },
mounted() { mounted() {
@ -934,6 +951,14 @@ export default {
this.mlogHandleLoading = false; this.mlogHandleLoading = false;
}); });
}, },
//
addHandover() {
this.dialogHandover = true;
this.$nextTick(() => {
this.$refs.handoverDialog.open('add');
})
},
handleHandoverSuccess(){},
}, },
}; };
</script> </script>

View File

@ -158,6 +158,12 @@
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增
</el-button>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input <el-input
@ -347,15 +353,24 @@
@choseChange="choseChange" @choseChange="choseChange"
></materials> ></materials>
</el-dialog> </el-dialog>
<handover-dialog
v-if="dialogHandover"
ref="handoverDialog"
:dept="currentDeptId"
@success="handleHandoverSuccess"
@closed="dialogHandover = false">
</handover-dialog>
</template> </template>
<script> <script>
import handoverDialog from "./handover_form.vue";
import showDrawer from "./mlog_dept6_detail.vue"; import showDrawer from "./mlog_dept6_detail.vue";
import materials from "./../mtm/materials.vue"; import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
showDrawer, showDrawer,
materials, materials,
handoverDialog
}, },
data() { data() {
return { return {
@ -405,17 +420,26 @@ export default {
queryMtask: { queryMtask: {
state__in: "", state__in: "",
}, },
currentDeptId:'',
mtaskId: "", mtaskId: "",
dataWm: [], dataWm: [],
dataWmOrigin: [], dataWmOrigin: [],
materialType: "wm", materialType: "wm",
visibleDrawer: false, visibleDrawer: false,
dialogHandover:false,
}; };
}, },
mounted() { mounted() {
let NowDate = new Date(); let NowDate = new Date();
// this.queryMtask.start_date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate(); // this.queryMtask.start_date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
this.apiObj = this.$API.pm.mtask.list; this.apiObj = this.$API.pm.mtask.list;
this.$API.system.dept.list.req({ page: 0, name: "6车间" }).then((res) => {
if (res.length > 0) {
this.currentDeptId = res[0].id;
} else {
this.$message.error("未找到车间");
}
});
}, },
methods: { methods: {
tomio() { tomio() {
@ -505,6 +529,13 @@ export default {
}) })
.catch((err) => {}); .catch((err) => {});
}, },
//
addHandover() {
this.dialogHandover = true;
this.$nextTick(() => {
this.$refs.handoverDialog.open('add');
})
},
}, },
}; };
</script> </script>

View File

@ -394,7 +394,13 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px;margin-right: 10px">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增
</el-button>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input <el-input
@ -584,6 +590,14 @@
@closed="dialogSave = false" @closed="dialogSave = false"
> >
</save-dialog> </save-dialog>
<handover-dialog
v-if="dialogHandover"
ref="handoverDialog"
:mgroup="mgroup"
:dept="currentDept.id"
@success="handleHandoverSuccess"
@closed="dialogHandover = false">
</handover-dialog>
<showDrawer <showDrawer
ref="showDrawer" ref="showDrawer"
v-if="visibleDrawer" v-if="visibleDrawer"
@ -602,11 +616,13 @@
</el-container> </el-container>
</template> </template>
<script> <script>
import handoverDialog from "./handover_form.vue";
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue"; import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue"; import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
handoverDialog,
saveDialog, saveDialog,
showDrawer, showDrawer,
materials, materials,
@ -627,6 +643,7 @@ export default {
34: "已终止", 34: "已终止",
40: "已提交", 40: "已提交",
}, },
dialogHandover:false,
dialogSave: false, dialogSave: false,
visibleDrawer: false, visibleDrawer: false,
queryMtaskState: false, queryMtaskState: false,
@ -819,6 +836,7 @@ export default {
handleSaveSuccess() { handleSaveSuccess() {
this.getMlogs(); this.getMlogs();
}, },
handleHandoverSuccess(){},
table_show(row) { table_show(row) {
this.mlogId = row.id; this.mlogId = row.id;
this.visibleDrawer = true; this.visibleDrawer = true;
@ -840,6 +858,13 @@ export default {
this.mlogHandleLoading = false; this.mlogHandleLoading = false;
}); });
}, },
//
addHandover() {
this.dialogHandover = true;
this.$nextTick(() => {
this.$refs.handoverDialog.open('add');
})
},
}, },
}; };
</script> </script>

View File

@ -18,14 +18,33 @@
> >
<el-row> <el-row>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="工艺路线" prop="route"> <el-form-item label="关联任务" prop="mtask">
<el-select
v-model="form.mtask"
placeholder="关联任务"
clearable
style="width: 100%"
@change="changeMtask"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="工艺路线">
<el-select <el-select
v-model="form.route" v-model="form.route"
placeholder="工艺路线" placeholder="工艺路线"
clearable clearable
disabled
filterable filterable
style="width: 100%" style="width: 100%"
:disabled="mode == 'edit'"
> >
<el-option <el-option
v-for="item in routeOptions" v-for="item in routeOptions"
@ -42,25 +61,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="关联任务">
<el-select
v-model="form.mtask"
placeholder="关联任务"
clearable
style="width: 100%"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
>
<!-- <span>{{ item.material_out_name }}</span>/ -->
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
@ -129,11 +129,10 @@ export default {
form: Object.assign({}, defaultForm), form: Object.assign({}, defaultForm),
// //
rules: { rules: {
mtask: [
route: [
{ {
required: true, required: true,
message: "请选择工艺路线", message: "请选择任务",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -185,7 +184,14 @@ export default {
Object.assign(this.form, data); Object.assign(this.form, data);
this.getRoute(data.id); this.getRoute(data.id);
}, },
changeMtask(){
let that = this;
that.options.forEach((item) => {
if(item.id == that.form.mtask){
that.form.route = item.route;
}
})
},
// //
submit() { submit() {
let that = this; let that = this;

View File

@ -146,16 +146,17 @@ export default {
that.$API.mtm.mgroup.list that.$API.mtm.mgroup.list
.req({ page: 0, name: that.mgroupName }) .req({ page: 0, name: that.mgroupName })
.then((res) => { .then((res) => {
if(res.length != 1){ if(res.length>0){
that.$message.error("获取工段错误");
return;
}
that.mgroupId = res[0].id; that.mgroupId = res[0].id;
that.deptId = res[0].belong_dept; that.deptId = res[0].belong_dept;
that.processId = res[0].process; that.processId = res[0].process;
that.processCate = res[0].process_cate; that.processCate = res[0].process_cate;
that.params.mgroup = res[0].id; that.params.mgroup = res[0].id;
that.apiObj = this.$API.pm.mtask.list; that.apiObj = this.$API.pm.mtask.list;
}else{
that.$message.error("获取工段错误");
return;
}
}); });
}, },
methods: { methods: {