From d94b9c4827af9dff8700a21a042bedf58daffcd8 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 20 Dec 2021 11:32:25 +0800 Subject: [PATCH 1/4] ganttBottom --- .../components/Gantt/components/leftMenu.vue | 200 +++ .../components/Gantt/components/slider.vue | 156 ++ hb_client/src/components/Gantt/index.vue | 1374 +++++++++++++++++ hb_client/src/views/pm/gantt.vue | 27 +- hb_client/src/views/pm/plan.vue | 608 ++++---- 5 files changed, 2066 insertions(+), 299 deletions(-) create mode 100644 hb_client/src/components/Gantt/components/leftMenu.vue create mode 100644 hb_client/src/components/Gantt/components/slider.vue create mode 100644 hb_client/src/components/Gantt/index.vue diff --git a/hb_client/src/components/Gantt/components/leftMenu.vue b/hb_client/src/components/Gantt/components/leftMenu.vue new file mode 100644 index 0000000..2167e1c --- /dev/null +++ b/hb_client/src/components/Gantt/components/leftMenu.vue @@ -0,0 +1,200 @@ + + + + + + diff --git a/hb_client/src/components/Gantt/components/slider.vue b/hb_client/src/components/Gantt/components/slider.vue new file mode 100644 index 0000000..b355b75 --- /dev/null +++ b/hb_client/src/components/Gantt/components/slider.vue @@ -0,0 +1,156 @@ + + + diff --git a/hb_client/src/components/Gantt/index.vue b/hb_client/src/components/Gantt/index.vue new file mode 100644 index 0000000..1ba94e5 --- /dev/null +++ b/hb_client/src/components/Gantt/index.vue @@ -0,0 +1,1374 @@ + + + + + diff --git a/hb_client/src/views/pm/gantt.vue b/hb_client/src/views/pm/gantt.vue index 36b3b6c..564d3b3 100644 --- a/hb_client/src/views/pm/gantt.vue +++ b/hb_client/src/views/pm/gantt.vue @@ -4,11 +4,12 @@ +
@@ -944,7 +945,7 @@ }; this.handlerSelect(); }, - //获取近三年的所有天数 + //获取要显示的所有天数 getDay() { this.getAllDate(); }, @@ -959,8 +960,13 @@ return false; }, getAllDate() { - let obj = {}; - let arr = [this.currentYear - 1, this.currentYear, this.currentYear + 1]; + let obj = {},arr=[]; + let start = new Date(this.timeRange[0]).getFullYear(); + let end = new Date(this.timeRange[1]).getFullYear(); + for(let i=start;i { obj.year = item; obj.days = this.isLeapYear(item) ? 365 : 366; @@ -974,7 +980,6 @@ this.allDays.forEach(item => { item.month = this.handleMonthDay(item.days, item.year); }); - // console.log(this.allDays); this.allDays.forEach(element => { if (element.year == this.currentYear) { element.month[0][this.currentMonth].forEach(k => { @@ -1063,15 +1068,6 @@ break; } }, - setList() { - /*getPlanGantt().then(res=>{ - if(res.code===200){ - this.list = res.data.results; - }else{ - this.$message.error(res.msg); - } - })*/ - }, //设置里程碑线的高度 setStoneLine(isFirst) { this.$nextTick(() => { @@ -1112,7 +1108,6 @@ mounted() { document.addEventListener("scroll", this.handleScroll); this.getDay(); - this.setList(); this.setStoneLine(); }, beforeDestroy() { diff --git a/hb_client/src/views/pm/plan.vue b/hb_client/src/views/pm/plan.vue index 7cc3913..4d114e1 100644 --- a/hb_client/src/views/pm/plan.vue +++ b/hb_client/src/views/pm/plan.vue @@ -1,63 +1,62 @@ - + - \ No newline at end of file + From 85c8a85594dee99ec31c4af3a1ada41575eaa84c Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Mon, 20 Dec 2021 14:12:24 +0800 Subject: [PATCH 2/4] baofei --- hb_client/src/api/wpm.js | 9 +++ hb_client/src/views/wpm/need.vue | 91 ++++++++++++++++++++++++++- hb_client/src/views/wpm/operation.vue | 43 ++++++++++--- 3 files changed, 133 insertions(+), 10 deletions(-) diff --git a/hb_client/src/api/wpm.js b/hb_client/src/api/wpm.js index 5c585ca..f3b876d 100644 --- a/hb_client/src/api/wpm.js +++ b/hb_client/src/api/wpm.js @@ -297,5 +297,14 @@ export function testInit(data) { }) } +//不合格半成品报废 +export function scrap(id) { + return request({ + url: `/wpm/wproduct/${id}/scrap/`, + method: 'post', + + }) +} + diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 3664c2c..5d73c0f 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -174,6 +174,58 @@ @pagination="getList1" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -425,7 +477,7 @@