From b6a08b4e13cf446a3228e2d6055392ceaef04382 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 22 九月 2022 17:02:21 +0800
Subject: [PATCH] #
---
pages/basics/pickOffLines.vue | 243 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 175 insertions(+), 68 deletions(-)
diff --git a/pages/basics/pickOffLines.vue b/pages/basics/pickOffLines.vue
index e47d52a..11786b0 100644
--- a/pages/basics/pickOffLines.vue
+++ b/pages/basics/pickOffLines.vue
@@ -1,5 +1,6 @@
<template>
<view>
+ <scroll-view scroll-y class="scroll-Y">
<view class="square-2">
<view class="square-title">
<view class="title-sign"><view class="sign"></view></view>
@@ -7,7 +8,7 @@
</view>
<view class="square-content">
<view class="content-input">
- <input readonly="value" v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"
+ <input readonly="value" v-model="doc_num" type="text" placeholder="鎵爜 / 杈撳叆"
:focus="barcodeFocus" @input="nextInput">
<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
</view>
@@ -24,50 +25,59 @@
</view>
<view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
<view class="number indent">
- No:{{index + 1}}
+ <text class="text-key">No:</text>
+ <text class="text-value">{{index + 1}}</text>
</view>
- <view class="column">
- <view class="locno indent" style="width: 260rpx;font-weight: 700;color: #303133;">
- 搴撲綅鍙凤細<text style="color: #606266;font-weight: 500;">{{item.locNo}}</text>
+
+ <view class="column indent">
+ <view class="text-key">
+ <text class="text-key">搴撲綅鍙凤細</text>
+ <text class="text-value">{{item.locNo}}</text>
</view>
- <view class="matkx indent" style="width: 400rpx;font-weight: 700;color: #303133;">
- 鍟嗗搧鍚嶇О锛�<text style="color: #606266;font-weight: 500;">{{item.maktx}}</text></view>
+ <view class="matkx indent" >
+ <text class="text-key">鍟嗗搧鍚嶇О锛�</text>
+ <text class="text-value">{{item.maktx}}</text>
+ </view>
</view>
- <view class="column">
- <view class="count indent" style="width: 260rpx;font-weight: 700;color: #303133;">
- 鏁伴噺锛�<text style="color: #606266;font-weight: 500;">{{item.anfme}}</text></view>
- <view class="button">
- <button :type="item.btnType"
- style="width: 150rpx;font-size: 24rpx;height: 60rpx;line-height:60rpx;margin-left: 170rpx;"
- @click="open(index)">{{item.btnText}}</button>
-
+
+ <view class="column indent">
+ <view class="anfme">
+ <text class="text-key">鏁伴噺锛�</text>
+ <text class="text-value">{{item.anfme}}</text></view>
+ <view>
+ <button :type="item.btnType" @click="open(index)">{{item.btnText}}</button>
</view>
</view>
</view>
+ </scroll-view>
+
+ <view class="footer flex justify-around">
+ <view>
+ <button class="cu-btn lg" @click="resst()">閲嶇疆</button>
+ </view>
+ <!-- <view>
+ <button class="cu-btn lg pakin-btn bg-blue" @click="comb()">纭</button>
+ </view> -->
+ </view>
<!-- 寮瑰嚭灞� -->
- <view style="position: fixed;width: 100%;min-height: 100%;background-color: rgba(0, 0, 0, 0.5);
- z-index: 999;left: 0;top: 0;margin: 0;padding: 0;display: flex;flex-direction: column;align-items:center;
- justify-content:center" v-if="popShow">
- <view style="background-color: #fff;width: 90%;min-height: 200rpx;border-radius: 14rpx;">
- <view style="text-align: center;font-weight: bold;font-size: 36rpx;height: 100rpx;line-height: 120rpx;
- color: #909399;">鎷h揣淇℃伅</view>
+ <view class="popup-mask" v-if="popShow">
+ <view class="popup">
+ <view class="title">鎷h揣淇℃伅</view>
<view class="column">
- <view style="text-indent: 20rpx;">鎷h揣鍗曞彿锛�</view>
- <view>jh202209211355</view>
+ <view class="popup-text-key">鎷h揣鍗曞彿锛�</view>
+ <view>{{doc_num}}</view>
</view>
+ <!-- <view class="column">
+ <view class="popup-text-key">璐ф灦鍙凤細</view>
+ <input type="text">
+ </view> -->
<view class="column">
- <view style="text-indent: 20rpx;">璐ф灦鍙凤細</view>
- <input type="text" style="border: 1rpx solid #C0C4CC;border-radius: 5rpx;">
+ <view class="popup-text-key">搴撲綅鍙凤細</view>
+ <input type="text" v-model="locNo">
</view>
- <view class="column">
- <view style="text-indent: 20rpx;">搴撲綅鍙凤細</view>
- <input type="text" style="border: 1rpx solid #C0C4CC;border-radius: 5rpx;">
- </view>
- <view class="column" style="border-top: 1rpx solid #ccc;height: 100rpx;line-height: 100rpx;">
- <view style="width: 50%;border-right: 1rpx solid #ccc;text-align: center;letter-spacing: 8px;
- font-weight: 700;" @click="close">鍙栨秷</view>
- <view style="width: 50%;text-align: center;letter-spacing: 8px;color: #409EFF;
- font-weight: 700;" @click="confirm()">纭</view>
+ <view class="column event">
+ <view class="close" @click="close">鍙栨秷</view>
+ <view class="confirm" @click="confirm()">纭</view>
</view>
</view>
</view>
@@ -79,28 +89,14 @@
data() {
return {
commonUrl:null,
- barcode: '',
+ doc_num: '',
barcodeFocus:true,
- matList:[
- {
- locNo:"010022",
- matkx:"灞炴�х敤浜庤缃瓧浣�",
- count:"9999",
- btnType:"default", // default
- btnText: '鏈‘璁�', // 鏈‘璁�
- },
- {
- locNo:"01001",
- matkx:"灞炴�х敤浜庤缃瓧浣�",
- count:"9999",
- btnType:"primary", // default
- btnText: '宸插嚭搴�', // 鏈‘璁�
- }
- ],
+ matList:[],
btnType:"primary", // default
btnText: '宸插嚭搴�', // 鏈‘璁�
popShow:false,
index:0,
+ locNo: ''
@@ -130,17 +126,24 @@
nextInput() {
let that = this
uni.request({
- url: 'http://192.168.4.188:8081/sxjzwms/ManPakOut/list/auth',
- data:{doc_num:"202209211053"},
+ url: that.commonUrl + '/ManPakOut/list/auth',
+ data:{doc_num:that.doc_num},
header: { 'token':uni.getStorageSync('token'),},
method:'GET',
success(result) {
+ console.log(result);
let res = result.data
if (res.code === 200) {
let records = res.data.records
for(var i = 0; i < records.length; i++) {
- records[i]['btnType'] = 'default'
- records[i]['btnText'] = '鏈‘璁�'
+ if (records[i].status == 0) {
+ records[i]['btnType'] = 'default'
+ records[i]['btnText'] = '鏈‘璁�'
+ } else if (records[i].status == 1) {
+ records[i]['btnType'] = 'primary'
+ records[i]['btnText'] = '宸插嚭搴�'
+ }
+
}
that.matList = res.data.records
} else if (res.code === 403) {
@@ -163,12 +166,44 @@
close() {
this.popShow = false
},
- confirm() {
- this.popShow = false
- this.matList[this.index].btnText= '宸插嚭搴�'
- this.matList[this.index].btnType = 'primary'
+ removeBarcode() {
+ this.doc_num = ''
},
-
+ confirm() {
+ let that = this
+ if(!that.matList[that.index].locNo == that.locNo) {
+ uni.showToast({title: '璇风‘璁ゅ簱浣嶅彿鏄惁姝g‘', icon: "none", position: 'top'});
+ return
+ }
+ this.matList[this.index].status= 1
+ uni.request({
+ url: that.commonUrl + '/manPakOut/finish',
+ data:JSON.stringify(that.matList[that.index]),
+ method:'POST',
+ success(result) {
+ var res = result.data
+ if(res.code === 200) {
+ that.popShow = false
+ that.matList[that.index].btnText= '宸插嚭搴�'
+ that.matList[that.index].btnType = 'primary'
+ } else if (res.code === 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
+ }
+ }
+ })
+
+ },
+ resst() {
+ this.matList = []
+ this.doc_num = ''
+ }
}
}
@@ -189,6 +224,7 @@
/* height: 130rpx; */
margin: 25rpx;
border-radius: 20rpx;
+ font-size: 32rpx;
}
.data-list:first-child {
margin-top: 20rpx;
@@ -208,15 +244,16 @@
min-height: 70rpx;
line-height: 70rpx;
}
- .button {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
-
- }
.indent {
- text-indent: 32rpx;
+ text-indent: 24rpx;
+ }
+ .column button {
+ width: 150rpx;
+ font-size: 24rpx;
+ height: 60rpx;
+ line-height:60rpx;
+ margin-left: 170rpx;
+ text-indent: 0;
}
/* .data-list-left {
display: inline-block;
@@ -247,4 +284,74 @@
line-height: 130rpx;
margin-right: 10%;
}
+ .text-key {
+ width: 260rpx;
+ font-weight: 700;
+ color: #303133;
+ }
+ .text-value {
+ color: #606266;
+ font-weight: 500;
+ }
+ .anfme {
+ width: 260rpx;
+ font-weight: 700;
+ color: #303133;
+ }
+ .popup-mask {
+ position: fixed;
+ width: 100%;
+ min-height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 999;
+ left: 0;
+ top: 0;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ align-items:center;
+ justify-content:center
+ }
+ .popup {
+ background-color: #fff;
+ width: 90%;
+ min-height: 200rpx;
+ border-radius: 14rpx;
+ }
+ .popup .title {
+ text-align: center;
+ font-weight: bold;
+ font-size: 36rpx;
+ height: 100rpx;
+ line-height: 120rpx;
+ color: #909399;
+ }
+ .popup-text-key {
+ width: 180rpx;
+ text-indent: 20rpx;
+ }
+ .popup input {
+ border: 1rpx solid #C0C4CC;border-radius: 5rpx;
+ }
+ .close {
+ width: 50%;
+ border-right: 1rpx solid #ccc;
+ text-align: center;
+ letter-spacing: 8px;
+ font-weight: 700
+ }
+ .confirm {
+ width: 50%;
+ text-align: center;
+ letter-spacing: 8px;
+ color: #409EFF;
+ font-weight: 700;
+ }
+ /* 浜嬩欢 */
+ .event {
+ border-top: 1rpx solid #ccc;
+ height: 100rpx;
+ line-height: 100rpx;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1