fix:光子首页变更
This commit is contained in:
parent
0c4b829c65
commit
9c73b60a7b
|
@ -5,7 +5,7 @@
|
|||
光子科技生产管理系统
|
||||
<span class="top-line top-line-right"></span>
|
||||
</el-header>
|
||||
<el-main style="padding: 0; overflow: hidden" id="mainBlock">
|
||||
<el-main id="mainBlock">
|
||||
<el-row style="height: 100%">
|
||||
<div
|
||||
style="position: absolute; left: 0; width: 20%; z-index: 10"
|
||||
|
@ -2290,7 +2290,10 @@ export default {
|
|||
background: url("/public/img/photon_bg.png") no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
#mainBlock{
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.pageHeader {
|
||||
font-size: 32px;
|
||||
background: none;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
<img class="topCardImg" src="img/topCard.png" />
|
||||
</div>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="retangleWrap">
|
||||
<div class="retangle countRetangle">
|
||||
<div class="Retangle_container">
|
||||
|
@ -46,18 +48,6 @@
|
|||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="countItem">
|
||||
<div class="countname">AVG合格数</div>
|
||||
<p class="countnum">{{ dayAVGcountOk }}</p>
|
||||
<p class="countrate">
|
||||
同比前天
|
||||
<span :class="bindClass(AVGOktongbi)">
|
||||
{{ AVGOktongbi }}%
|
||||
<span v-if="AVGOktongbi < 0"> ▼</span>
|
||||
<span v-else> ▲</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="countItem">
|
||||
<div class="countname">预制棒管交付数</div>
|
||||
<p class="countnum">{{ dayPayNum6 }}</p>
|
||||
|
@ -70,45 +60,27 @@
|
|||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="countItem">
|
||||
<div class="countname">AVG交付数</div>
|
||||
<p class="countnum">{{ dayAVGcountDelivered }}</p>
|
||||
<p class="countrate">
|
||||
同比前天
|
||||
<span :class="bindClass(AVGDelivertongbi)">
|
||||
{{ AVGDelivertongbi }}%
|
||||
<span v-if="AVGDelivertongbi < 0"> ▼</span>
|
||||
<span v-else> ▲</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="retangleWrap retangleWrapmiddle">
|
||||
<div class="retangle middleRetangle">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="retangleWrap">
|
||||
<div class="retangle countRetangle">
|
||||
<div class="Retangle_container">
|
||||
<div class="title">本月生产数据</div>
|
||||
</div>
|
||||
<div style="padding: 20px 0; display: flex">
|
||||
<div class="middleItem">
|
||||
<div class="countname">本月累积交付数</div>
|
||||
<div style="display: flex;justify-content: space-around;padding-top: 25px;font-size: 20px;">
|
||||
<div>
|
||||
<div>预制棒管</div>
|
||||
<div style="padding-top: 20px; display: flex">
|
||||
<div class="countItem">
|
||||
<div class="countname">预制棒管 </div>
|
||||
<p class="countnum">{{ monthPayNum6 }}</p>
|
||||
<div class="countrate">本月累积交付数</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>AVG</div>
|
||||
<p class="countnum">{{ monthPayNumAVG }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middleItem" style="display: flex">
|
||||
<div class="countItem" style="display: flex">
|
||||
<el-progress
|
||||
type="circle"
|
||||
:stroke-width="15"
|
||||
:show-text="false"
|
||||
width="100"
|
||||
:stroke-width="10"
|
||||
:percentage="monthPassRate7"
|
||||
/>
|
||||
<div style="margin-left: 20px">
|
||||
|
@ -118,11 +90,11 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middleItem" style="display: flex">
|
||||
<div class="countItem" style="display: flex">
|
||||
<el-progress
|
||||
type="circle"
|
||||
:stroke-width="15"
|
||||
:show-text="false"
|
||||
width="100"
|
||||
:stroke-width="10"
|
||||
:percentage="monthPassRate10"
|
||||
/>
|
||||
<div style="margin-left: 20px">
|
||||
|
@ -130,27 +102,13 @@
|
|||
<p class="countnum" style="line-height: 82px">
|
||||
{{ monthPassRate10 }}%
|
||||
</p>
|
||||
<!-- <p class="countrate">同比上周 8.63%</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="middleItem" style="display: flex">
|
||||
<el-progress
|
||||
type="circle"
|
||||
:stroke-width="15"
|
||||
:show-text="false"
|
||||
:percentage="monthRateAVG"
|
||||
/>
|
||||
<div style="margin-left: 20px">
|
||||
<div class="countname">AVG合格率</div>
|
||||
<p class="countnum" style="line-height: 82px">
|
||||
{{ monthRateAVG }}%
|
||||
</p>
|
||||
<!-- <p class="countrate">同比上周 8.63%</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="14">
|
||||
<div class="retangleWrap" style="padding-right: 0">
|
||||
|
@ -215,20 +173,20 @@
|
|||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="material_name"
|
||||
label="名称"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="specification"
|
||||
prop="material_specification"
|
||||
label="规格"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="model"
|
||||
prop="material_model"
|
||||
label="型号"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="unit"
|
||||
label="单位"
|
||||
prop="dept_name"
|
||||
label="完成车间"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="count"
|
||||
|
@ -251,6 +209,7 @@
|
|||
<div style="flex: 2">名称</div>
|
||||
<div class="warningFlex1">型号</div>
|
||||
<div class="warningFlex1">规格</div>
|
||||
<div class="warningFlex1">安全库存</div>
|
||||
<div
|
||||
class="warningFlex1"
|
||||
style="text-align: right"
|
||||
|
@ -277,6 +236,9 @@
|
|||
<div class="warningFlex1">
|
||||
{{ item.specification }}
|
||||
</div>
|
||||
<div class="warningFlex1">
|
||||
{{ item.count_safe }}
|
||||
</div>
|
||||
<div
|
||||
class="warningFlex1 warningNumberStyle"
|
||||
>
|
||||
|
@ -429,6 +391,7 @@ export default {
|
|||
chartData: [],
|
||||
tableData: [],
|
||||
equipList: [],
|
||||
productList:[],
|
||||
halfProductList: [],
|
||||
warningMaterial: [],
|
||||
calendarValue: "",
|
||||
|
@ -449,10 +412,10 @@ export default {
|
|||
monthPassRate7: 0,
|
||||
monthPassRate10: 0,
|
||||
|
||||
dayAVGcountOk: 0,
|
||||
AVGOktongbi: 0,
|
||||
dayAVGcountDelivered: 0,
|
||||
AVGDelivertongbi: 0,
|
||||
// dayAVGcountOk: 0,
|
||||
// AVGOktongbi: 0,
|
||||
// dayAVGcountDelivered: 0,
|
||||
// AVGDelivertongbi: 0,
|
||||
monthRateAVG: 0,
|
||||
monthPayNumAVG: 0,
|
||||
hgNumber: 0,
|
||||
|
@ -536,12 +499,12 @@ export default {
|
|||
yesterdayBefore.getDate();
|
||||
that.getdayData();
|
||||
that.getMonthData();
|
||||
this.getAVGDayData();
|
||||
this.calendarValue = new Date();
|
||||
this.getEquipList();
|
||||
this.getMaterialList();
|
||||
// this.getMaterialList();
|
||||
this.getProductStatistic();
|
||||
this.getMaterialWarning();
|
||||
this.getProductList();
|
||||
this.getHalfProductList();
|
||||
},
|
||||
methods: {
|
||||
|
@ -570,37 +533,50 @@ export default {
|
|||
//半成品数量统计
|
||||
getHalfProductList() {
|
||||
let that = this;
|
||||
let obj = {
|
||||
query: {
|
||||
material_types: "20",
|
||||
},
|
||||
};
|
||||
let obj = {query: {material_types: "20"}};
|
||||
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
|
||||
if (res.data2.ds0) {
|
||||
this.halfProductList = res.data2.ds0;
|
||||
console.log("getHalfProductList", res);
|
||||
that.halfProductList = res.data2.ds0;
|
||||
that.tableData = res.data2.ds0;
|
||||
}
|
||||
});
|
||||
},
|
||||
//成品数量统计
|
||||
getProductList() {
|
||||
let that = this;
|
||||
let obj = {query: {material_types: "10"}};
|
||||
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
|
||||
if (res.data2.ds0) {
|
||||
console.log("getHalfProductList", res);
|
||||
that.productList = res.data2.ds0;
|
||||
that.tableData = res.data2.ds0;
|
||||
}
|
||||
});
|
||||
},
|
||||
materialTypeChange() {
|
||||
this.getMaterialList();
|
||||
let that = this;
|
||||
if(that.materialType==10){
|
||||
this.getProductList();
|
||||
}else{
|
||||
this.getHalfProductList();
|
||||
}
|
||||
},
|
||||
//获取库存
|
||||
getMaterialList() {
|
||||
let that = this;
|
||||
that.$API.mtm.material.list
|
||||
.req({ page: 0, type: that.materialType })
|
||||
.then((res) => {
|
||||
that.$API.mtm.material.list.req({ page: 0, type: that.materialType }).then((res) => {
|
||||
that.tableData = [];
|
||||
that.tableData = res.filter((item) => {
|
||||
return item.count > 0;
|
||||
});
|
||||
console.log("getMaterialList", res);
|
||||
});
|
||||
},
|
||||
//库存警告
|
||||
getMaterialWarning() {
|
||||
let that = this;
|
||||
that.$API.mtm.material.list
|
||||
.req({ page: 0, type__in: "10,20", count__lte: 1 })
|
||||
.then((res) => {
|
||||
that.$API.mtm.material.list.req({ page: 0, tag:'low_inm'}).then((res) => {
|
||||
if (res.length > 0) {
|
||||
console.log("getMaterialWarning", res);
|
||||
that.warningMaterial = res;
|
||||
|
@ -882,14 +858,12 @@ export default {
|
|||
let that = this;
|
||||
let date = that.yesterday;
|
||||
let date0 = that.yesterdayBefore;
|
||||
this.$API.wpm.otherlog.list
|
||||
.req({
|
||||
this.$API.wpm.otherlog.list.req({
|
||||
product: "AVG",
|
||||
page: 0,
|
||||
handle_date__gte: date,
|
||||
handle_date__lte: date,
|
||||
})
|
||||
.then((res) => {
|
||||
}).then((res) => {
|
||||
let list = res;
|
||||
let count_ok = 0,
|
||||
count_delivered = 0;
|
||||
|
@ -899,16 +873,14 @@ export default {
|
|||
count_delivered =
|
||||
count_delivered + item.count_delivered;
|
||||
});
|
||||
that.dayAVGcountOk = count_ok;
|
||||
// that.dayAVGcountOk = count_ok;
|
||||
that.dayAVGcountDelivered = count_delivered;
|
||||
this.$API.wpm.otherlog.list
|
||||
.req({
|
||||
this.$API.wpm.otherlog.list.req({
|
||||
product: "AVG",
|
||||
page: 0,
|
||||
handle_date__gte: date0,
|
||||
handle_date__lte: date0,
|
||||
})
|
||||
.then((res0) => {
|
||||
}).then((res0) => {
|
||||
let list0 = res0;
|
||||
let count_ok0 = 0,
|
||||
count_delivered0 = 0;
|
||||
|
@ -933,33 +905,6 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
getAVGMonthData() {
|
||||
let that = this;
|
||||
let start_date = that.year_s + "-" + that.month_s + "-01";
|
||||
let end_date = that.year_s + "-" + that.month_s + "-" + that.day_s;
|
||||
let obj = {
|
||||
query: { start_date: start_date, end_date: end_date },
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("AVGMonth", obj).then((res) => {
|
||||
let list = res.data2.ds0;
|
||||
let sum = 0,
|
||||
count_real = 0,
|
||||
count_ok = 0;
|
||||
list.forEach((item) => {
|
||||
sum = sum + item.交付数;
|
||||
count_ok = count_ok + item.count_ok;
|
||||
count_real = count_real + item.count_real;
|
||||
});
|
||||
this.monthPayNumAVG = sum;
|
||||
if (count_real != 0) {
|
||||
this.monthRateAVG = Math.round(
|
||||
(count_ok / count_real) * 100
|
||||
);
|
||||
} else {
|
||||
this.monthRateAVG = 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
getProductStatistic() {
|
||||
let that = this;
|
||||
let start_date = that.year_s + "-" + that.month_s + "-01";
|
||||
|
@ -1081,7 +1026,7 @@ export default {
|
|||
}
|
||||
|
||||
.countItem {
|
||||
width: 20%;
|
||||
width: 33.33%;
|
||||
padding-left: 24px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
|
|
Loading…
Reference in New Issue