This commit is contained in:
2023-05-28 14:42:55 +08:00
parent 20135fc031
commit cadfb7e5d3
9 changed files with 105 additions and 61 deletions

View File

@@ -93,3 +93,17 @@ export const updateReport = (id, report, nok, repare) => post('api/produceshifto
export const deleteReport = (id) => post('api/produceshiftorder/deleteReport', {
macoperate_id: id
})
// 工单作业列表
// 2.工单管理
export const getOrderList2 = (code, val, d1, d2) => post('api/produceshiftorder/getOrderList2', {
device_code: code,
key_value: val,
realproducestart_date: d1,
realproduceend_date: d2
})
// export const getOrderList2 = (code, val, d1, d2) => {
// let res = {'totalElements': 2, 'content': [{'material_weight': 0.000000, 'down_id': '1', 'down_time': '2023-05-26 10:32:16.706', 'plan_qty': 111, 'is_needmove': true, 'report_qty': 0, 'create_type': '1', 'confirm_id': '20', 'realproducestart_date': '2023-05-26 10:37:00', 'down_name': '管理员', 'material_spec': '清洗S15', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '1', 'is_error': false, 'material_name': '直接\\CG\\清洗S15\\EKTC00003', 'realproduceend_date': '2023-05-26 11:07:20', 'workorder_status': '3', 'dq_real_qty': 0, 'workprocedure_id': '1535144356586065920', 'workorder_id': '1661923147433250817', 'create_time': '2023-05-26 10:32:10', 'workorder_code': '230526007', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '镗孔', 'order_status_name': '完成', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TK_11', 'order_type_scode': '10', 'material_id': '1528687484865744896', 'planproduceend_date': '2023-05-26 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023-05-26 07:30:00', 'is_canupdate_update': true, 'material_code': '24007845L', 'create_name': '管理员'}, {'material_weight': 1.000000, 'down_id': '1', 'down_time': '2023-05-26 14:06:24.182', 'plan_qty': 1234, 'is_needmove': true, 'report_qty': 0, 'create_type': '1', 'confirm_id': '20', 'realproducestart_date': '2023-05-26 14:11:28', 'down_name': '管理员', 'material_spec': '清洗S15', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '1', 'is_error': false, 'material_name': '直接\\CG\\清洗S15\\EKTC00003', 'realproduceend_date': '2023-05-26 14:52:54', 'workorder_status': '5', 'dq_real_qty': 0, 'workprocedure_id': '1535144356586065920', 'workorder_id': '1661976821887012864', 'create_time': '2023-05-26 14:05:27', 'workorder_code': '230526010', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '镗孔', 'order_status_name': '完成', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TK_11', 'order_type_scode': '10', 'material_id': '1528687484865744896', 'planproduceend_date': '2023-05-26 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023-05-26 07:30:00', 'is_canupdate_update': true, 'material_code': '24007845L', 'create_name': '管理员'}], 'code': 200, 'msg': '查询成功'}
// return res
// }

View File

@@ -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>

View File

@@ -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
}
},

View File

@@ -126,7 +126,7 @@ export default {
return {
options: [],
value: '',
value1: [new Date(), new Date()],
value1: [],
workorder: '',
disabled1: false,
disabled2: false,

View File

@@ -11,6 +11,8 @@
content '\e60f'
.select_icon::before
content '\e608'
.icon_user::before
content '\e7a3'
// new
[class*=" icon_"],[class^=icon_]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -224,14 +224,15 @@ header
.filter-table
width 100%
text-align center
border 1px solid #8B90A6
th
position: sticky;
top -1px
z-index 1
color #606266
border-left 1px solid #8B90A6
border 1px solid #8B90A6
padding 5px 0
font-weight bold
background-color #8B90A6
th,td
line-height 18px
font-size 12px
@@ -239,10 +240,6 @@ header
td
border 1px solid #8B90A6
padding 5px
&:first-child
border-left 0
&:last-child
border-right 0
.input
width 1.8rem
height .3rem
@@ -386,10 +383,6 @@ input::-webkit-input-placeholder
.selected_icon
background-color: #fff;
color: $red
.filter-table
border-color #fff
th, td
border-color #fff
.overall_lightgreen
background linear-gradient(#00d9a1 0%,#00c0a5 30%,#115fae 100%)
.body-container
@@ -409,9 +402,5 @@ input::-webkit-input-placeholder
.selected_icon
background-color: #fff;
color: #008f8f
.filter-table
border-color #fff
th, td
border-color #fff
.overall_blue
background linear-gradient(#031f6d 0%,#011a60 20%,#060346 100%)