478 lines
9.9 KiB
Vue
Executable File
478 lines
9.9 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>
|
|
<input class="top-row-input-class-gray" disabled="true"></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-gray" disabled="true"></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>
|
|
</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/scanningblue.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="material-detail">
|
|
<view class="body-box-other-row">
|
|
<view class="other-first-row-title">调节阀</view>
|
|
<view class="clock">
|
|
<view class="other-first-row-time">xxxxxxxxxxx</view>
|
|
<view style="width: 12rpx;"></view>
|
|
<image class="image-clock" src="../../../static/img/clock.svg"></image>
|
|
</view>
|
|
</view>
|
|
<view class="body-box-other-row">
|
|
<view class="other-row-title">xxx</view>
|
|
<view class="body-tool-box"></view>
|
|
<view class="other-row-content">xxx</view>
|
|
</view>
|
|
<view class="body-box-other-row">
|
|
<view class="other-row-title">xxx</view>
|
|
<view class="body-tool-box"></view>
|
|
<view class="other-row-content">xxx</view>
|
|
</view>
|
|
</view>
|
|
</uni-swipe-action-item>
|
|
</uni-swipe-action>
|
|
</view>
|
|
|
|
<view style="height: 80rpx;"></view>
|
|
</view>
|
|
|
|
<view class="btn">
|
|
<view class="btn-clear">清空</view>
|
|
<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:'吞吞吐吐'
|
|
}
|
|
]
|
|
}, 1000);
|
|
},
|
|
|
|
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-left: 24rpx;
|
|
}
|
|
.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;
|
|
}
|
|
.material-detail{
|
|
/* width: 100%; */
|
|
box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.05);
|
|
border-radius: 10rpx;
|
|
margin-left: 32rpx;
|
|
margin-right: 32rpx;
|
|
}
|
|
.clear-text{
|
|
font-size: 28rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #395FF2;
|
|
}
|
|
.body-box-other-row{
|
|
display: flex;
|
|
position: relative;
|
|
flex-wrap: nowrap;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
height: 38rpx;
|
|
margin-bottom: 24rpx;
|
|
}
|
|
.other-first-row-title{
|
|
font-size: 28rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #333333;
|
|
margin-left: 32rpx;
|
|
}
|
|
.other-first-row-time{
|
|
font-size: 24rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.clock{
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
align-items: center;
|
|
position: absolute;
|
|
right: 24rpx;
|
|
}
|
|
.image-clock{
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
}
|
|
.other-row-title{
|
|
/* width: 150rpx; */
|
|
height: 38rpx;
|
|
line-height: 38rpx;
|
|
font-size: 28rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
text-align: left;
|
|
margin-left: 32rpx;
|
|
}
|
|
.body-tool-box{
|
|
width: 16rpx;
|
|
}
|
|
.other-row-content{
|
|
height: 38rpx;
|
|
line-height: 38rpx;
|
|
font-size: 24rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #333333;
|
|
text-align: left;
|
|
}
|
|
.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: 50%;
|
|
font-size: 32rpx;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
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>
|