Commit 407ff920 authored by chenzj's avatar chenzj

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-pad into dev

parents 4f36b09e fc427065
<template>
<view class="commonBody">
<view class="button-bar">
<view class="button-frame" @click="addQC('QCMSG')">
<!-- <view class="button-frame" @click="addQC('QCMSG')">
<view class="shortcut-icon icon-color01">
<image class="icon-button" src="/static/icons/png/pro.png"/>
</view>
<view class="grid-text">检查通知</view>
</view>
<view class="button-frame" @click="addQC('SJQR')">
</view> -->
<!-- <view class="button-frame" @click="addQC('SJQR')">
<view class="shortcut-icon icon-color01">
<image class="icon-button" src="/static/icons/png/pro.png"/>
</view>
<view class="grid-text">首检确认</view>
</view>
<view class="button-frame" v-for="qcType in dict.type.mes_ipqc_type" v-if="qcType.value !== 'FIRST'"
@click="addQC(qcType.value )">
<view class="shortcut-icon icon-color01">
</view> -->
<view class="button-frame" :class="{'active': qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type"
@click="handleClickBtn(qcType.value )">
<!-- <view class="shortcut-icon icon-color01">
<image class="icon-button" src="/static/icons/png/pro.png"/>
</view>
</view> -->
<view class="grid-text">{{ qcType.label }}</view>
</view>
<!-- <view class="button-frame" :class="{'active': !curQcType }" @click="handleClickBtn('')">
<view class="grid-text">全部</view>
</view> -->
</view>
<view class="list-bar">
<!-- 新增 -->
<view class="btnbox">
<u-button v-if="getAddShow()" type="success" size="medium" @click="handleAddClick">新增</u-button>
</view>
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
......@@ -68,9 +75,15 @@
</uni-td>
<uni-td>
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" v-if="line.quantityCheck>=line.maxNum"
<button class="uni-button" size="mini" type="primary" v-if="line.ipqcType === 'SJQR'&&line.quantityCheck>=line.maxNum"
@click="qcLineClick(line)">查看确认
</button>
<button class="uni-button" size="mini" type="primary" v-if="line.ipqcType !== 'SJQR'&&line.quantityCheck>=line.maxNum"
@click="qcLineClick(line)">查看编辑
</button>
<button class="uni-button" size="mini" type="primary" v-if="line.quantityCheck>=line.maxNum&&line.ipqcType === 'SJQR'"
@click="firstCONFIRMED(line)">确认
</button>
</view>
</uni-td>
</uni-tr>
......@@ -318,11 +331,13 @@
<script>
import SearchInput from "@/components/ScanInput/index.vue";
import UButton from '../../../uview-ui/components/u-button/u-button.vue';
export default {
name: "QcContent",
components: {
SearchInput
SearchInput,
UButton
},
dicts: ['mes_ipqc_type', 'mes_qc_result', 'mes_order_status', 'mes_defect_level'],
data() {
......@@ -387,8 +402,8 @@ export default {
this.getQcFirstLines();
}
},
async getIpqcList() {
const res = await this.$u.api.ipqcList({})
async getIpqcList(type) {
const res = await this.$u.api.ipqcList({ipqcType: type})
if (res.code === 200) {
this.qcList = res.rows;
}
......@@ -475,19 +490,39 @@ export default {
}
});
},
addQC(type) {
handleAddClick() {
this.qcForm = {}
this.curQcType = type;
if (type === 'QCMSG') {
this.qcMsgVisible = true
} else if (type === 'SJQR') {
this.getQcFirstLines()
this.qcFirstVisible = true
} else {
this.qcModalFlag = true;
// this.getTemplateLineList(type);
},
getAddShow() {
const type = this.curQcType
switch (type) {
case 'FIRST': // 首检
return true
case 'FINAL': // 末检
return true
case 'PATROL': // 巡检
return true
case 'FQC': // 终检
return true
default:
return false
}
},
handleClickBtn(type) {
this.qcForm = {}
this.curQcType = type;
this.getIpqcList(type)
console.log(type, 'type')
// if (type === 'QCMSG') {
// this.qcMsgVisible = true
// } else if (type === 'SJQR') {
// this.getQcFirstLines()
// this.qcFirstVisible = true
// } else {
// this.qcModalFlag = true;
// }
},
qcLineClick(item) {
this.qcModalFlag = true;
this.qcForm = item
......@@ -536,7 +571,7 @@ export default {
}
</script>
<style>
<style lang="scss" scoped>
.commonBody {
width: 100%;
height: 100%;
......@@ -561,17 +596,30 @@ export default {
.button-frame {
width: 80px;
height: 80px;
background-color: #76bd1d;
height: 80rpx;
padding:40rpx;
background-color: #e5eeff;
border-radius: 10px;
box-shadow: 2px 2px 3px #888888;
display: flex;
flex-wrap: wrap;
// flex-wrap: wrap;
align-items: center;
justify-content: center;
color: #FFFFFF;
place-items: center;
color: #0256FF;
// place-items: center;
&.active{
background-color:rgb(2, 86, 255);
color:#fff;
}
}
.btnbox{
// display:flex;
margin-bottom: 20rpx;
padding-left:20rpx;
.u-btn{
width: 150rpx;
}
}
.icon-button {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment