#154 坐盆返修/包装实际计划数量

Merged
Liwei merged 3 commits from feature_supplier into develop 3 years ago
  1. +17
    -0
      src/api/quality/defectdata.js
  2. +7
    -0
      src/api/quality/pkg.js
  3. +129
    -0
      src/views/quality/component/bidetRepair.vue
  4. +37
    -31
      src/views/quality/component/login.vue
  5. +11
    -0
      src/views/quality/pkg.vue
  6. +16
    -1
      src/views/quality/pkgDefeck.vue

+ 17
- 0
src/api/quality/defectdata.js View File

@ -113,4 +113,21 @@ export function submitRecliner (data) {
method: 'post',
data: data
})
}
// 坐盆返修调角器查询
export function bidetReclinerQuery (code) {
return request({
url: `/admin/qm/reclinerreclst/serione/${code}`,
method: 'get',
})
}
// 坐盆返修根据扫码获取产品缺陷记录
export function submitBidetRepair (data) {
return request({
url: `/admin/qm/reclinerreclst/insertserione`,
method: 'post',
data: data
})
}

+ 7
- 0
src/api/quality/pkg.js View File

@ -94,3 +94,10 @@ export function demolitionPkg (data) {
})
}
// 获取包装扫码计划和实际数量
export function getPkgPlanCount (code) {
return request({
url: `/admin/log/packorder/get/` + code,
method: 'get'
})
}

+ 129
- 0
src/views/quality/component/bidetRepair.vue View File

@ -0,0 +1,129 @@
<template>
<el-dialog
title="坐盆返修"
class="bidet-repair-wrapper"
:visible.sync="bidetVisible"
:close-on-click-modal="false"
@close="closeRepair"
width="600px">
<div class="repair-pic">
<div class="repair-code-right">
<p><span>返修条码</span><span>{{repairCodeEcho}}</span></p>
<p><span>产品条码</span><span>{{productCodeEcho}}</span></p>
</div>
</div>
<div class="repair-code">
<el-input v-model="repairCode"
autofocus
style="width: 375px;"
ref="codeFocus"
placeholder="产品条码"
@keyup.enter.native="enterRepairPress"></el-input>
<el-button type="primary" @click="confirmRepair" class="repair-btn">完成</el-button>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeRepair"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { bidetReclinerQuery, submitBidetRepair } from '@/api/quality/defectdata'
export default {
name: 'bidetRepair',
props: {
// bidetVisible: {
// type: Boolean,
// default: false,
// }
},
data() {
return {
bidetVisible: true,
repairCode: '',
repairCodeEcho: '',
productCodeEcho: '',
echoInfo: {}, //
}
},
methods: {
//
closeRepair() {
this.bidetVisible = false
this.echoInfo = null
this.$emit('bidetHandle', this.bidetVisible)
},
//
enterRepairPress() {
bidetReclinerQuery(this.repairCode).then((res) => {
if (res.code === 200) {
this.repairCodeEcho = res.data['QM_ReclinerReclst-ReclinerNr']
this.productCodeEcho = res.data['QM_ReclinerReclst-SerialOrderId']
this.echoInfo = res.data
}
})
this.repairCode = ''
this.$refs.codeFocus.focus()
},
// --
confirmRepair() {
if (!this.repairCodeEcho) {
this.msgInfo('请先输入产品条码查询相关信息')
return
}
this.$confirm('确认进行完成操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let params = {
"QM_ReclinerReclst-PlantNr": 100,
"QM_ReclinerReclst-SerialOrderId": this.echoInfo['QM_ReclinerReclst-SerialOrderId'],
}
submitBidetRepair(params).then((res) => {
if (res.code == 200) {
this.msgSuccess('提交成功!')
} else {
this.msgError(res.msg)
}
})
})
this.$refs.codeFocus.focus()
},
},
}
</script>
<style lang="scss" scoped>
.bidet-repair-wrapper {
.repair-pic {
border: 1px solid #DCDFE6;
text-align: center;
margin-bottom: 20px;
.repair-code-right {
text-align: left;
p {
padding-left: 10px;
line-height: 40px;
font-size: 16px;
}
}
}
.repair-code {
text-align: center;
/deep/ .el-input--medium {
.el-input__inner {
height: 45px;
}
}
.repair-btn {
width: 160px;
height: 45px;
background: #0a708f;
border-radius: 4px;
margin-top: 20px;
margin-left: 16px;
}
}
}
</style>

+ 37
- 31
src/views/quality/component/login.vue View File

@ -2,16 +2,15 @@
<div class="permissions-login">
<div class="top-info">
<div class="left-info" style="cursor: pointer;" @click="isVisible = true">
<img src="../../../assets/imgs/工位icon.png" alt="">
工位信息
<img src="../../../assets/imgs/工位icon.png" alt="">工位信息
<i style="margin-left:10px;color:#B4BAC8" class="el-icon-caret-bottom"></i>
</div>
<div class="right-info">
<el-button type="primary" v-show="isShowRepair && isLoginSuccess" @click="repairClick" class="confirm-btn" style="margin-right: 32px;">返修</el-button>
<el-button type="primary" v-show="isShowRepair && isLoginSuccess" @click="bidetRepairClick" class="confirm-btn" style="margin-right: 32px;">坐盆返修</el-button>
<el-button type="primary" v-show="isShowRepair && isLoginSuccess" @click="repairClick" class="confirm-btn" style="margin-right: 32px;">靠背返修</el-button>
<img src="../../../assets/imgs/人员icon.png" alt="">
<span style="margin-right:40px">登录人员{{userInfo.name}}</span>
<img src="../../../assets/imgs/时间icon.png" alt="">
登录时间{{userInfo.time}}
<img src="../../../assets/imgs/时间icon.png" alt="">登录时间{{userInfo.time}}
</div>
</div>
<!-- 登录弹框 -->
@ -26,10 +25,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="code">
<el-input placeholder="请输入编号"
v-model="form.code"
autofocus
@keyup.enter.native="searchCode"></el-input>
<el-input placeholder="请输入编号" v-model="form.code" autofocus @keyup.enter.native="searchCode"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@ -42,9 +38,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="line">
<el-select v-model="form.line"
placeholder="请选择"
@change="changeWorkLine">
<el-select v-model="form.line" placeholder="请选择" @change="changeWorkLine">
<el-option v-for="(item,index) in options"
:key="index"
:label="item['WorkLine-Descr']"
@ -69,7 +63,7 @@
</div>
</el-dialog>
<!-- 返修弹框 -->
<el-dialog title="返修" :visible.sync="open" :close-on-click-modal="false" @close="closeRepair" width="1000px">
<el-dialog title="靠背返修" :visible.sync="open" :close-on-click-modal="false" @close="closeRepair" width="1000px">
<div class="repair-pic clearfix">
<el-carousel arrow="always" height="400px" class="fl">
<el-carousel-item v-for="(item, index) in newImgSrc" :key="index">
@ -80,7 +74,6 @@
<p><span>产品条码</span><span>{{productCodeEcho}}</span></p>
<p><span>调角器条码</span><span>{{repairCodeEcho}}</span></p>
</div>
</div>
<div class="repair-code">
<el-input v-model="repairCode"
@ -95,14 +88,18 @@
<el-button @click="closeRepair"> </el-button>
</div>
</el-dialog>
<!-- 坐盆返修 -->
<bidetRepair @bidetHandle="bidetHandle" v-if="bidetVisible" />
</div>
</template>
<script>
import * as api from '@/api/quality/ods'
import { reclinerQuery, submitRecliner } from '@/api/quality/defectdata'
import bidetRepair from './bidetRepair'
import moment from 'moment'
export default {
components: {bidetRepair},
props: {
isShowRepair: {
type: Boolean,
@ -137,16 +134,25 @@ export default {
repairCodeEcho: '', //
productCodeEcho: '', //
echoInfo: {}, //
bidetVisible: false, //
}
},
created() {
this.getWorklines()
},
methods: {
//
//
bidetHandle(value) {
this.bidetVisible = value
},
//
repairClick() {
this.open = true
},
//
bidetRepairClick() {
this.bidetVisible = true
},
//
closeRepair() {
this.open = false
@ -181,23 +187,23 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let params = {
"QM_ReclinerReclst-PlantNr": 100,
"QM_ReclinerReclst-Line": this.echoInfo['ACC_UNITID-LINE'],
"QM_ReclinerReclst-SerialOrderId": this.echoInfo['ACC_UNITID-UNITSN'],
"QM_ReclinerReclst-ReclinerNr": this.echoInfo['ACC_UNITID-ID_VALUE'],
"QM_ReclinerReclst-ItemPartNr": this.echoInfo['ACC_UNITID-ID_NAME'],
"QM_ReclinerReclst-Status": "N"
let params = {
"QM_ReclinerReclst-PlantNr": 100,
"QM_ReclinerReclst-Line": this.echoInfo['ACC_UNITID-LINE'],
"QM_ReclinerReclst-SerialOrderId": this.echoInfo['ACC_UNITID-UNITSN'],
"QM_ReclinerReclst-ReclinerNr": this.echoInfo['ACC_UNITID-ID_VALUE'],
"QM_ReclinerReclst-ItemPartNr": this.echoInfo['ACC_UNITID-ID_NAME'],
"QM_ReclinerReclst-Status": "N"
}
submitRecliner(params).then((res) => {
if (res.code == 200) {
this.msgSuccess('提交成功!')
} else {
this.msgError(res.msg)
}
submitRecliner(params).then((res) => {
if (res.code == 200) {
this.msgSuccess('提交成功!')
} else {
this.msgError(res.msg)
}
})
})
this.$refs.codeFocus.focus()
})
})
this.$refs.codeFocus.focus()
},
choosePos(item) {
this.actPosItem = item


+ 11
- 0
src/views/quality/pkg.vue View File

@ -132,6 +132,7 @@ export default {
selectCurrentClick(item) { // li
this.choosePkg(item['LOG_PackOrder-PackOrderId'])
this.activePkg = item['LOG_PackOrder-PackOrderId']
this.getCodePlanCount(item['LOG_PackOrder-PackOrderId'])
},
codeparser() { //
api.codeparser().then((res) => {
@ -157,6 +158,7 @@ export default {
this.activePkg = PackOrderId
this.actPkgObj = this.pkgs.filter((pkg) => pkg.PackOrderId == PackOrderId)[0] || {}
this.packorderitemlst() //
this.getCodePlanCount(PackOrderId)
this.$nextTick(() => {
if (this.$refs[`${PackOrderId}`])
this.$refs[`${PackOrderId}`][0].scrollIntoView()
@ -175,6 +177,7 @@ export default {
api.packorderitemlst(this.activePkg).then((res) => {
this.tableData = res.data || []
this.tableLoading = false
this.getCodePlanCount(this.actPkgObj['LOG_PackOrder-PackOrderId'])
if (type === 1) {
this.scrollCurrentPos()
}
@ -203,6 +206,14 @@ export default {
}
})
},
//
getCodePlanCount(code) {
api.getPkgPlanCount(code).then((res) => {
if (res.code === 200) {
this.$emit('planActQTy', res.data)
}
})
},
enterPress(e) { //
// twotab
if (e.target.value === 'two') {


+ 16
- 1
src/views/quality/pkgDefeck.vue View File

@ -2,12 +2,16 @@
<div class="app-container pkg-defect-wrapper">
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane label="包装" name="first">
<pkgComponent @handleActiveNameOne="handleActiveName" />
<pkgComponent @handleActiveNameOne="handleActiveName" @planActQTy="planActQTy" />
</el-tab-pane>
<el-tab-pane label="缺陷数据采集" name="second">
<defectData @handleActiveNameTwo="handleActiveName" />
</el-tab-pane>
</el-tabs>
<div class="plan-actual-count" v-if="activeName === 'first'">
<span>计划数量</span><span>{{planQty}}</span>
<span style="margin-left: 30px;">实际数量</span><span>{{actQty}}</span>
</div>
<el-button type="danger" @click="unPackClick" class="unpack-wrapper">拆除包装</el-button>
<unpack
v-if="isVisible"
@ -31,6 +35,8 @@ export default {
return {
activeName: 'first',
isVisible: false,
planQty: 0,
actQty: 0,
}
},
methods: {
@ -44,6 +50,10 @@ export default {
this.activeName = 'first'
}
},
planActQTy(valueObj) {
this.actQty = valueObj['LOG_PackOrder-ActQty']
this.planQty = valueObj['LOG_PackOrder-PlanQty']
},
completeCallBack(value) {
this.isVisible = value
},
@ -66,5 +76,10 @@ export default {
right: 32px;
width: 100px;
}
.plan-actual-count {
position: absolute;
left: 26%;
top: 43px;
}
}
</style>

Loading…
Cancel
Save