修改
This commit is contained in:
@@ -1,43 +1,39 @@
|
||||
<template>
|
||||
<div class="content blue" ref="content">
|
||||
<div class="header">
|
||||
<div class="header_wrap_left">
|
||||
<div class="header-user-content" @click="toSelect">
|
||||
<div class="header-user-txt">
|
||||
<span class="span1">登录人员:</span>
|
||||
<span class="span2">{{userName}}</span>
|
||||
</div>
|
||||
<div class="drop-button-wraper"><span class="icon_dropdown"></span></div>
|
||||
<div v-show="show" class="dropdown-wrap">
|
||||
<ul class="dropdown-list drift">
|
||||
<li class="dropdown-item" @click="exit">退出</li>
|
||||
</ul>
|
||||
<div class="popper__arrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-user-content set_color_wrap" @click="toSelectColor">
|
||||
<div class="header-user-txt">
|
||||
<span class="span1">背景颜色</span>
|
||||
<span class="span2"></span>
|
||||
</div>
|
||||
<div class="drop-button-wraper"><span class="icon_dropdown"></span></div>
|
||||
<div v-show="showColor" class="dropdown-wrap">
|
||||
<ul class="dropdown-list drift">
|
||||
<li class="dropdown-item" @click="switchColor(1)"><div class="color_button overall_orange"></div></li>
|
||||
<li class="dropdown-item" @click="switchColor(2)"><div class="color_button overall_lightgreen"></div></li>
|
||||
<li class="dropdown-item" @click="switchColor(3)"><div class="color_button overall_blue"></div></li>
|
||||
</ul>
|
||||
<div class="popper__arrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-time-wrap">
|
||||
<div class="header-time">
|
||||
<div class="xj_time">{{time}}</div>
|
||||
<div class="date_week">
|
||||
<div class="xj_date">{{date}}</div>
|
||||
<div class="xj_week">{{week}}</div>
|
||||
</div>
|
||||
<div class="xj_time">{{time}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header_wrap_left">
|
||||
<div class="header-user-content" @click="toSelect">
|
||||
<div class="header-user-txt">
|
||||
<span class="span2">{{userName}}</span>
|
||||
<span class="span1 icon_user"></span>
|
||||
</div>
|
||||
<div class="drop-button-wraper">
|
||||
<div class="colors_3_wrap">
|
||||
<div class="color_item color_1"></div>
|
||||
<div class="color_item color_2"></div>
|
||||
<div class="color_item color_3"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="show" class="dropdown-wrap">
|
||||
<ul class="dropdown-list drift">
|
||||
<li class="dropdown-item" @click="exit">退出</li>
|
||||
<li class="dropdown-item color_button_wrap">
|
||||
<div class="color_button overall_orange" @click="switchColor(1)"></div>
|
||||
<div class="color_button overall_lightgreen" @click="switchColor(2)"></div>
|
||||
<div class="color_button overall_blue" @click="switchColor(3)"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="popper__arrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,7 +95,7 @@ export default {
|
||||
let myddy = new Date().getDay()
|
||||
let week = weekday[myddy]
|
||||
this.time = `${hh}:${mm}:${ss}`
|
||||
this.date = `${year}年${month}月${date}日`
|
||||
this.date = `${year}/${month}/${date}`
|
||||
this.week = `${week}`
|
||||
},
|
||||
toSelect () {
|
||||
@@ -151,7 +147,7 @@ export default {
|
||||
padding 14.5px 0
|
||||
line-height 1
|
||||
.span1
|
||||
_font(14px, 1, #fff,,)
|
||||
_font(16px, 1, #fff,bold,)
|
||||
vertical-align middle
|
||||
.span2
|
||||
_font(16px, 1, #fff,,)
|
||||
@@ -163,9 +159,9 @@ export default {
|
||||
color #fff
|
||||
margin-left 15px
|
||||
vertical-align middle
|
||||
_fj(center)
|
||||
.dropdown-wrap
|
||||
position absolute
|
||||
width 100%
|
||||
top 39px
|
||||
right 0
|
||||
z-index 1
|
||||
@@ -176,11 +172,15 @@ export default {
|
||||
background-color #fff
|
||||
box-shadow 0 2px 12px 0 rgba(0,0,0,.1)
|
||||
margin 5px 0
|
||||
padding 5px 0
|
||||
.dropdown-list
|
||||
padding 0
|
||||
.dropdown-item
|
||||
height 34px
|
||||
_font(14px, 34px, #606266,,center)
|
||||
padding 0 20px
|
||||
&:hover
|
||||
background-color $gray2
|
||||
.popper__arrow
|
||||
position absolute
|
||||
display block
|
||||
@@ -200,15 +200,16 @@ export default {
|
||||
height 45px
|
||||
.header-time
|
||||
height 45px
|
||||
_fj(center,flex-end,column)
|
||||
_fj(flex-start)
|
||||
.xj_time
|
||||
_font(14px, 18px, #fff,,right)
|
||||
_font(16px, 18px, #fff,,right)
|
||||
.date_week
|
||||
_fj()
|
||||
.xj_date
|
||||
_font(12px, 18px, #fff,,)
|
||||
_font(16px, 18px, #fff,,)
|
||||
.xj_week
|
||||
_font(12px, 18px, #fff,,)
|
||||
_font(16px, 18px, #fff,,)
|
||||
margin 0 5px 0 1px
|
||||
.body-container
|
||||
_wh(calc(100% - 30px), calc(100% - 65px))
|
||||
margin 0 auto 20px
|
||||
@@ -237,9 +238,6 @@ export default {
|
||||
border-top-right-radius 12px
|
||||
.main-container
|
||||
_wh(100%, calc(100% - 44px))
|
||||
.color_button
|
||||
_wh(30px, 30px)
|
||||
border-radius 50%
|
||||
.set_color_wrap
|
||||
.dropdown-wrap
|
||||
width 132px
|
||||
@@ -252,4 +250,36 @@ export default {
|
||||
padding 10px 0
|
||||
&:nth-child(2)
|
||||
padding 10px 10px
|
||||
.colors_3_wrap
|
||||
position relative
|
||||
_wh(20px, 20px)
|
||||
border 1px solid $gray3
|
||||
border-radius 50%
|
||||
overflow hidden
|
||||
>.color_item
|
||||
_wh(58%, 58%)
|
||||
position absolute
|
||||
top 50%
|
||||
left 50%
|
||||
transform-origin 0% 0%
|
||||
.color_1
|
||||
transform rotate(0deg) skewX(-30deg)
|
||||
background-color #ffa530
|
||||
.color_2
|
||||
transform rotate(120deg) skewX(-30deg)
|
||||
background-color #b7e15d
|
||||
.color_3
|
||||
transform rotate(240deg) skewX(-30deg)
|
||||
background-color #484cce
|
||||
.color_button_wrap
|
||||
display block
|
||||
_fj()
|
||||
.color_button
|
||||
_wh(30px, 30px)
|
||||
line-height 30px
|
||||
font-size 30px
|
||||
border-radius 50%
|
||||
overflow hidden
|
||||
&:nth-child(2)
|
||||
margin 0 5px
|
||||
</style>
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
</div>
|
||||
<div class="wrap-buttons">
|
||||
<button class="button button--primary" @click="getDatas">查询</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled1" @click="_openStart">开工</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === '' || pkObj.workorder_status === '3'}" :disabled="disabled1" @click="_openStart">开工</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled2" @click="showDialog('1')">报工</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled3" @click="showDialog('2')">强制完成</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === '' || pkObj.workorder_status === '2'}" :disabled="disabled3" @click="showDialog('2')">强制完成</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_wraper">
|
||||
@@ -93,7 +93,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deviceList, getTable, openStart, tofinish, saveReport } from '../../../config/getData2.js'
|
||||
import { deviceList, getOrderList2, openStart, tofinish, saveReport } from '../../../config/getData2.js'
|
||||
import jxDialog from '@components/dialog.vue'
|
||||
import {accSubtract} from '@config/utils.js'
|
||||
export default {
|
||||
@@ -131,6 +131,7 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this._deviceList()
|
||||
this.getDatas()
|
||||
},
|
||||
methods: {
|
||||
async _deviceList () {
|
||||
@@ -140,7 +141,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async getDatas () {
|
||||
let res = await getTable(this.value)
|
||||
let res = await getOrderList2(this.value)
|
||||
res.content.map(el => {
|
||||
let qty = '0'
|
||||
if (Number(accSubtract(el.plan_qty, el.real_qty)) > 0) {
|
||||
@@ -158,6 +159,10 @@ export default {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
if (this.pkObj.workorder_status === '3') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await openStart(this.pkId, this.value)
|
||||
this.toast(res.message)
|
||||
@@ -199,14 +204,18 @@ export default {
|
||||
this.toast('请选择一行')
|
||||
return
|
||||
}
|
||||
this.$refs.child.active = true
|
||||
switch (type) {
|
||||
case '1':
|
||||
this.reportQty = ''
|
||||
this.nokQty = ''
|
||||
this.repareQty = ''
|
||||
this.$refs.child.active = true
|
||||
break
|
||||
case '2':
|
||||
if (this.pkObj.workorder_status === '2') {
|
||||
return
|
||||
}
|
||||
this.$refs.child.active = true
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
return {
|
||||
options: [],
|
||||
value: '',
|
||||
value1: [new Date(), new Date()],
|
||||
value1: [],
|
||||
workorder: '',
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
|
||||
Reference in New Issue
Block a user