Files
GX.O3.WMS/APK/APP_O3/pages/views/MESRESRE01/MESRESRE01CompletedReport.vue

451 lines
9.1 KiB
Vue
Executable File

<template>
<view class="content">
<view class="head-box">
<view style="height: 48rpx;"></view>
<view class="top-row-class-barcode">
<text class="top-row-title-class">是否关单</text><text style="width: 16rpx;"></text>
<checkbox class="head-checkbox"></checkbox>
</view>
<view class="top-row-class-barcode">
<text class="top-row-title-class">生产数量</text><text style="width: 16rpx;"></text>
<input class="top-row-input-class"></input>
</view>
<view class="top-row-class-barcode">
<text class="top-row-title-class">良品数量</text><text style="width: 16rpx;"></text>
<input class="top-row-input-class"></input>
<text class="top-row-title-class">不良数量</text><text style="width: 16rpx;"></text>
<input class="top-row-input-class"></input>
</view>
</view>
<view style="height: 16rpx;"></view>
<view style="height: 16rpx;background-color: #F5F5F5;"></view>
<view class="body-box">
<view class="body-box-first-row">
<view class="body-title">不良明细</view>
<view class="clear">
<image class="image-barcode" src="../../../static/img/plusblue.svg"></image>
</view>
</view>
<view>
<uni-swipe-action>
<uni-swipe-action-item v-for="(item, index) in swipeList" :right-options="item.options" :key="item.id" @change="swipeChange($event, index)" @click="swipeClick($event, index)">
<view class="body-box-other-row-qty">
<view class="other-row-title">不良数量</view>
<view class="other-row-content">{{item.defultQty}}</view>
</view>
<view class="sparet-line"></view>
<view class="body-box-other-row-res">
<view class="other-row-title">不良原因</view>
<view class="other-row-content">{{item.defultCause}}</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<view style="height: 80rpx;"></view>
</view>
<view class="btn">
<view class="btn-confirm">确定汇报</view>
</view>
</view>
</template>
<script>
import Vue from 'vue';
import {
mapState,
mapMutations
} from 'vuex';
var commonUtil = require('../../../common/util.js');
var _self;
export default {
data() {
return {
swipeList: [],
isShowClear:false,
isShowWorkStar:false,
}
},
onReady() {
// 模拟延迟赋值
setTimeout(() => {
this.isOpened = 'right';
this.swipeList = [{
id: 1,
options: [{
text: '删除',
style: {
backgroundColor: 'rgb(255,58,49)'
}
}
],
defultQty: 12,
defultCause:'吞吞吐吐'
}
]
}, 100);
},
onLoad() {
_self = this;
},
computed: {
...mapState(['userInfo'])
},
methods: {
change(e) {
this.isOpened = e;
console.log('返回:', e);
},
swipeChange(e, index) {
console.log('返回:', e);
console.log('当前索引:', index);
},
swipeClick(e, index) {
let {
content
} = e;
if (content.text === '删除') {
uni.showModal({
title: '提示',
content: '是否删除',
success: res => {
if (res.confirm) {
this.swipeList.splice(index, 1);
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}else {
uni.showToast({
title: `点击了${e.content.text}按钮`,
icon: 'none'
});
}
}
}
}
</script>
<style>
page{
background-color: #FFFFFF;
}
.top-row-class-barcode{
display: flex;
position: relative;
justify-content: flex-start;
align-items: center;
height: 72rpx;
background: #FFFFFF;
padding-right: 32rpx;
margin-bottom: 16rpx;
}
.top-row-title-class{
text-align: end;
flex-shrink: 0;
flex-grow: 0;
width: 144rpx;
height: 72rpx;
line-height: 72rpx;
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #333333;
}
.top-row-input-class{
width: 144rpx;
height: 72rpx;
line-height: 72rpx;
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #333333;
flex-shrink: 1;
flex-grow: 1;
border-radius:10rpx;
border: 1px solid #D8D8D8;
padding-right: 24rpx;
text-align: end;
}
.top-row-input-class-gray{
width: 144rpx;
height: 72rpx;
line-height: 72rpx;
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #333333;
background-color: #F4F4F4;
flex-shrink: 1;
flex-grow: 1;
border-radius:10rpx;
border: 1px solid #D8D8D8;
padding-left: 24rpx;
}
.placeholder{
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #CCCCCC;
}
.body-box-first-row{
display: flex;
position: relative;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
height: 94rpx;
margin-left: 32rpx;
}
.body-title{
height: 94rpx;
line-height: 94rpx;
font-size: 32rpx;
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
font-weight: bold;
color: #333333;
text-align: left;
}
.clear{
position: absolute;
right: 32rpx;
}
.image-barcode{
width: 40rpx;
height: 40rpx;
}
.clear-text{
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #395FF2;
}
.body-box-other-row-qty{
display: flex;
position: relative;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
height: 38rpx;
margin-left: 32rpx;
margin-bottom: 12rpx;
}
.body-box-other-row-res{
display: flex;
position: relative;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
height: 38rpx;
margin-left: 32rpx;
margin-top: 12rpx;
}
.other-row-title{
width: 150rpx;
height: 38rpx;
line-height: 38rpx;
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #666666;
text-align: left;
}
.other-row-content{
height: 38rpx;
line-height: 38rpx;
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #333333;
position: absolute;
right: 32rpx;
}
.sparet-line{
height: 2rpx;
background-color: #F5F5F5;
margin-left: 32rpx;
margin-right: 32rpx;
}
.btn{
display: flex;
height: 80rpx;
line-height: 80rpx;
width: 100%;
position: fixed;
bottom: 0;
background: #5778FF;
font-size: 32rpx;
font-family: MicrosoftYaHei;
color: #FFFFFF;
}
.btn-clear{
height: 80rpx;
line-height: 80rpx;
width: 50%;
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
text-align: center;
background-color: #FFFFFF;
}
.btn-confirm{
height: 80rpx;
line-height: 80rpx;
width: 100%;
font-size: 32rpx;
font-family: MicrosoftYaHei;
color: #FFFFFF;
text-align: center;
background-color: #5778FF;
}
/* 滑动删除样式开始 */
/* 头条小程序组件内不能引入字体 */
/* #ifdef MP-TOUTIAO */
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('~@/static/uni.ttf') format('truetype');
}
/* #endif */
/* #ifndef APP-NVUE */
/* page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #efeff4;
min-height: 100%;
height: auto;
} */
view {
font-size: 14px;
line-height: inherit;
}
.example {
padding: 0 15px 15px;
}
.example-info {
padding: 15px;
color: #3b4144;
background: #ffffff;
}
.example-body {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
padding: 0;
font-size: 14px;
background-color: #ffffff;
}
/* #endif */
.example {
padding: 0 15px;
}
.example-info {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
padding: 15px;
color: #3b4144;
background-color: #ffffff;
font-size: 14px;
line-height: 20px;
}
.example-info-text {
font-size: 14px;
line-height: 20px;
color: #3b4144;
}
.example-body {
flex-direction: column;
padding: 15px;
background-color: #ffffff;
}
.word-btn-white {
font-size: 18px;
color: #FFFFFF;
}
.word-btn {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 6px;
height: 48px;
margin: 15px;
background-color: #007AFF;
}
.word-btn--hover {
background-color: #4ca2ff;
}
.example-body {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding: 10px 0;
background-color: #fff;
}
.button {
border-color: #e5e5e5;
border-style: solid;
border-width: 1px;
padding: 4px 8px;
border-radius: 4px;
}
.button-text {
font-size: 15px;
}
.slot-button {
/* #ifndef APP-NVUE */
display: flex;
height: 100%;
/* #endif */
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 0 20px;
background-color: #ff5a5f;
}
.slot-button-text {
color: #ffffff;
font-size: 14px;
}
/* 滑动删除样式结束 */
</style>