+
-
+
+
+
-
+
+
-
+
-
-
-
-
+
+
-
+
@@ -110,8 +126,9 @@
import bottomRight from './bottomRight'
import {getPlanGantt} from "@/api/srm";
import {getProductionplanList} from "@/api/pm";
- import {getProcessYield} from "@/api/srm";
+ import {getProcessYield,productCount,getProcessNow,planCount,orderCount} from "@/api/srm";
import {getContractList, getOrderList} from "@/api/sam";
+ import {getArticles} from "@/api/cms";
export default {
mixins: [drawMixin],
@@ -236,7 +253,7 @@
unit: '%'
},
water: {
- data: [24, 45],
+ data: [45, 90],
shape: 'roundRect',
formatter: '{value}%',
waveNum: 3
@@ -277,18 +294,9 @@
},
//人员到岗
userConfig: {
- header: ['姓名', '部门', '到岗情况'],
+ header: ['姓名', '到岗情况'],
data: [
- ['张思', '一车间', "
已到岗"],
- ['李森', '一车间', "
已到岗"],
- ['王师', '一车间', "
未到岗"],
- ['赵迪', '一车间', "
已到岗"],
- ['孟津', '一车间', "
已到岗"],
- ['孙东课', '一车间', "
已到岗"],
- ['周神秘', '二车间', "
已到岗"],
- ['吴老弟', '二车间', "
未到岗"],
- ['郑成功', '二车间', "
已到岗"],
- ['冯宝宝', '二车间', "
已到岗"]
+ ['冯宝宝', "
已到岗"]
],
rowNum: 7, //表格行数
headerHeight: 35,
@@ -296,6 +304,127 @@
oddRowBGC: '#0f1325', //奇数行
evenRowBGC: '#171c33', //偶数行
index: false,
+ columnWidth: [70],
+ align: ['center']
+ },
+ //车间一
+ numberData: [
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '今日产量'
+ },
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '年累计完成量'
+ },
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '在制品数量'
+ },
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '不合格数量'
+ },
+
+ ],
+ limitedOne:false,
+ //车间二
+ numberDataTwo: [
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '今日产量'
+ },
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '年累计完成量'
+ },
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '在制品数量'
+ },
+ {
+ number: {
+ number: [0],
+ toFixed: 0,
+ textAlign: 'left',
+ content: '{nt}',
+ style: {
+ fontSize: 24
+ }
+ },
+ text: '不合格数量'
+ },
+
+ ],
+ limitedTwo:false,
+ configArticle: {
+ header: ['标题','置顶','作者', '发布时间'],
+ data: [
+ ['郑成功', '2022-03-05'],
+ ['冯宝宝', '2022-03-05']
+ ],
+ rowNum: 15, //表格行数
+ headerHeight: 40,
+ headerBGC: '#0f1325', //表头
+ oddRowBGC: '#0f1325', //奇数行
+ evenRowBGC: '#171c33', //偶数行
+ index: false,
// columnWidth: [50],
align: ['center']
},
@@ -336,6 +465,9 @@
that.getCenterData();
that.getCenterRight2Data();
that.getUserList();
+ that.getOneData();//车间一
+ that.getTwoData();//车间二
+ that.getArticle();
},
beforeDestroy() {
clearInterval(this.timing)
@@ -365,9 +497,12 @@
},
getCenterData() {
let that = this;
+ let dat = new Date();
+ let Year = dat.getFullYear();
+ let month = dat.getMonth() + 1;
+ let searchTime = Year + '-' + month + '-01';
that.numberShow = false;
- //合同
- getContractList({
+ getContractList({ //合同
type: 'big_screen',
page: 1,
page_size: 1,
@@ -380,13 +515,47 @@
page: 1,
page_size: 1,
create_time_start: that.create_time_start
- }).then((response) => {
- if (response.data) {
- that.titleItem[1].number.number[0] = response.data.count;
- getProductionplanList({type: 'big_screen', page: 1, page_size: 1, tag: 'working'}).then((response) => {
- if (response.data) {
- that.titleItem[2].number.number[0] = response.data.count;
- that.numberShow = true;
+ }).then((respons) => {//订单
+ if (respons.data) {
+ that.titleItem[1].number.number[0] = respons.data.count;
+ getProductionplanList({type: 'big_screen', page: 1, page_size: 1, tag: 'working'}).then((respon) => {
+ if (respon.data) {
+ that.titleItem[2].number.number[0] = respon.data.count;
+ productCount({type: 'big_screen',datetime_start:searchTime,tag:1}).then(respo=>{
+ if (respo.data) {
+ that.titleItem[3].number.number[0] = respo.data.count_selled;
+ that.titleItem[4].number.number[0] = respo.data.count_notok;
+ let mtestCount = respo.data.count_mtestok + respo.data.count_mtestnotok;
+ that.titleItem[5].number.number[0] = Math.floor((respo.data.count_mtestok/mtestCount)*100);
+ that.rate[0].tips = Math.floor((respo.data.count_ok/respo.data.count)*100);
+ getProcessNow({type: 'big_screen'}).then(res=>{//工序生产进度
+ if (res.data) {
+ let list = res.data;
+ let data = [];
+ list.forEach(item => {
+ let obj = new Object();
+ obj.name = item.process__name;
+ let value = Math.floor(item.count/item.count_real * 100);
+ obj.value = value>100?100:value;
+ data.push(obj)
+ });
+ that.ranking.data = data;
+ //任务完成率
+ /* planCount({type: 'big_screen'}).then(res=>{
+ debugger;
+ })*/
+ //准时交付率
+ /*getOrderList({type: 'big_screen',page: 1, page_size: that.warningPageSize, tag: 'near_delivery'}).then((response) => {
+ if (response.data) {
+ that.warningList = response.data.results;
+ that.warningTotal = response.data.count;
+ }
+ });*/
+ that.numberShow = true;
+ }
+ })
+ }
+ });
}
});
}
@@ -418,6 +587,52 @@
}
});
},
+ //一车间
+ getOneData(){
+ let that = this;
+ that.limitedOne = false;
+ let dat = new Date();
+ let Year = dat.getFullYear();
+ let month = dat.getMonth() + 1;
+ let searchTime = Year + '-' + month + '-01';
+ let searchYear = Year + '-' + '01-01';
+ productCount({type: 'big_screen',datetime_start:searchTime,tag:2,dept:1}).then(response=>{
+ if (response.data) {
+ that.numberData[0].number.number[0] = response.data.count;
+ that.numberData[2].number.number[0] = response.data.count_doing;
+ that.numberData[3].number.number[0] = response.data.count_notok;
+ productCount({type: 'big_screen',datetime_start:searchYear,tag:2,dept:1}).then(res=>{
+ if (res.data) {
+ that.numberData[1].number.number[0] = res.data.count;
+ that.limitedOne = true;
+ }
+ });
+ }
+ });
+ },
+ //二车间
+ getTwoData(){
+ let that = this;
+ that.limitedTwo = false;
+ let dat = new Date();
+ let Year = dat.getFullYear();
+ let month = dat.getMonth() + 1;
+ let searchTime = Year + '-' + month + '-01';
+ let searchYear = Year + '-' + '01-01';
+ productCount({type: 'big_screen',datetime_start:searchTime,tag:2,dept:2}).then(response=>{
+ if (response.data) {
+ that.numberDataTwo[0].number.number[0] = response.data.count;
+ that.numberDataTwo[2].number.number[0] = response.data.count_doing;
+ that.numberDataTwo[3].number.number[0] = response.data.count_notok;
+ productCount({type: 'big_screen',datetime_start:searchYear,tag:2,dept:2}).then(res=>{
+ if (res.data) {
+ that.numberDataTwo[1].number.number[0] = res.data.count;
+ that.limitedTwo = true;
+ }
+ });
+ }
+ });
+ },
//人员到岗情况列表
getUserList() {
let that = this;
@@ -429,7 +644,7 @@
list.forEach(item => {
let obj = [];
obj.push(item.name);
- obj.push(item.dept_.name);
+ // obj.push(item.dept_.name);
if (item.is_atwork) {
obj.push("
已到岗")
} else {
@@ -442,6 +657,32 @@
}
});
},
+ //企业资讯
+ getArticle(){
+ let that = this;
+ getArticles({type: 'big_screen',page:0}).then((response) => {
+ if (response.data) {
+ // this.configArticle = response.data;
+ let list = response.data;
+ let data=[];
+ list.forEach(item => {
+ let obj = [];
+ obj.push(item.title);
+ if(item.is_top===false){
+ obj.push('未置顶');
+ }else{
+ obj.push('已置顶');
+ }
+ obj.push(item.author);
+ obj.push(item.create_time);
+ data.push(obj)
+ });
+ that.configArticle.data=data;
+ }
+ });
+ },
+
+ //任务完成进度
}
}
diff --git a/hb_client/src/views/cms/article.vue b/hb_client/src/views/cms/article.vue
new file mode 100644
index 0000000..4aee150
--- /dev/null
+++ b/hb_client/src/views/cms/article.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+ 新增
+
+
+
+ 搜索
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确认
+
+
+
+
+
+
diff --git a/hb_client/src/views/dashboard/index.vue b/hb_client/src/views/dashboard/index.vue
index 9103f1c..f5ace61 100644
--- a/hb_client/src/views/dashboard/index.vue
+++ b/hb_client/src/views/dashboard/index.vue
@@ -55,7 +55,7 @@
本月交付产品
- 30
+ {{selledTotalCurrent}}
个
@@ -67,7 +67,7 @@
本月不合格产品
- 30
+ {{notokTotalCurrent}}
个
@@ -337,7 +337,7 @@
import {getmaterialbatchList} from "@/api/inm";
import gantt from "@/components/Gantt/dashGantt";
import {getpEquipmentList} from "@/api/equipment";
- import {getProcessYield, getPlanGantt} from "@/api/srm";
+ import {getProcessYield, getPlanGantt,productCount} from "@/api/srm";
import {getContractList, getOrderList} from "@/api/sam";
import {getToken} from '@/utils/auth' // get token from cookie
export default {
@@ -408,8 +408,8 @@
orderTotalCurrent: null,
planTotalCount: null,//已排产任务总数
planTotalCurrent: null,
- rderTotalCount: null,//累计交付产品总数
- derTotalCount: null,//累计不合格产品总数
+ selledTotalCurrent: null,//累计交付产品总数
+ notokTotalCurrent: null,//累计不合格产品总数
listLoadingPlan: false,
listLoadingEm: false,
listLoadingUser: false,
@@ -490,22 +490,12 @@
that.currentDay = dat.getDate();
let create_time_start = that.currentYear + '-' + that.currentMonth + '-01';
//获取合同数
- getContractList({page: 1, page_size: 1}).then((response) => {
- if (response.data) {
- that.contractTotalCount = response.data.count;
- }
- });
getContractList({page: 1, page_size: 1, create_time_start: create_time_start}).then((response) => {
if (response.data) {
that.contractTotalCurrent = response.data.count;
}
});
//获取生产订单数
- getOrderList({page: 1, page_size: 1}).then((response) => {
- if (response.data) {
- that.orderTotalCount = response.data.count;
- }
- });
getOrderList({page: 1, page_size: 1, create_time_start: create_time_start}).then((response) => {
if (response.data) {
that.orderTotalCurrent = response.data.count;
@@ -517,13 +507,19 @@
that.planTotalCount = response.data.count;
}
});
+ //本月在制任务
getProductionplanList({page: 1, page_size: 1, tag: 'working'}).then((response) => {
if (response.data) {
that.planTotalCurrent = response.data.count;
}
});
- //获取交付产品
-
+ //本月交付产品&本月不合格产品
+ productCount({datetime_start:create_time_start,tag:1}).then(respo=>{
+ if (respo.data) {
+ that.selledTotalCurrent = respo.data.count_selled;
+ that.notokTotalCurrent = respo.data.count_notok;
+ }
+ });
//获取不合格产品
//获取成品率