fix:bug修复

This commit is contained in:
hhui 2024-04-28 14:52:35 +08:00
parent 53f405070d
commit dc7a15f3e8
3 changed files with 835 additions and 838 deletions

View File

@ -80,8 +80,8 @@
</template> </template>
<script> <script>
import QS from "qs" import QS from "qs"
export default { export default {
data() { data() {
return { return {
fetchList: [ fetchList: [
@ -111,8 +111,8 @@
waitCrashNum: '', waitCrashNum: '',
detailsId: '', detailsId: '',
taskId: '', taskId: '',
submitFlag:false, submitFlag: false,
taskStatus:'', taskStatus: '',
transMaCode: '', transMaCode: '',
rfidNum: '', rfidNum: '',
sendTypeId: '', sendTypeId: '',
@ -127,7 +127,7 @@
this.transMaCode = list.code this.transMaCode = list.code
this.sendTypeId = list.typeId this.sendTypeId = list.typeId
this.parentId = list.id this.parentId = list.id
if(Number(list.num)==0){ if (Number(list.num) == 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '待退料数据为0请勿再点击' title: '待退料数据为0请勿再点击'
@ -227,7 +227,7 @@
url: `/pages/codeReceive/codeReceive?${urlStr}&maCode=${this.transMaCode}` url: `/pages/codeReceive/codeReceive?${urlStr}&maCode=${this.transMaCode}`
}) })
}, },
rfidOut () { rfidOut() {
this.closePopup1() this.closePopup1()
uni.navigateTo({ uni.navigateTo({
url: `/pages/rfidReceive/rfidReceive?waitOut=${this.rfidNum}&typeId=${this.sendTypeId}&parentId=${this.parentId}&taskId=${this.taskId}` url: `/pages/rfidReceive/rfidReceive?waitOut=${this.rfidNum}&typeId=${this.sendTypeId}&parentId=${this.parentId}&taskId=${this.taskId}`
@ -284,7 +284,7 @@
backReceiveEndBackFn() { backReceiveEndBackFn() {
const that = this const that = this
let total = that.reduceNumTotal() let total = that.reduceNumTotal()
console.log("total==",total) console.log("total==", total)
if (total > 0) { if (total > 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -294,7 +294,7 @@
} }
// submitFlag false // submitFlag false
if(that.submitFlag==true){ if (that.submitFlag == true) {
return return
} }
that.submitFlag = true that.submitFlag = true
@ -310,7 +310,7 @@
icon: 'none', icon: 'none',
title: '结束任务成功' title: '结束任务成功'
}) })
console.log("退料结束",res) console.log("退料结束", res)
that.submitFlag = false that.submitFlag = false
uni.navigateBack() uni.navigateBack()
} else { } else {
@ -319,9 +319,10 @@
title: res.data.msg title: res.data.msg
}) })
} }
}).catch(err=>{ }).catch(err => {
console.log(err, 'sss');
that.submitFlag = false that.submitFlag = false
}).finally(result=>{ }).finally(result => {
that.submitFlag = false that.submitFlag = false
}) })
}, },
@ -347,7 +348,7 @@
console.log("点击了自定义按钮", ev); console.log("点击了自定义按钮", ev);
const that = this const that = this
if (ev.text == '结束任务') { if (ev.text == '结束任务') {
if(this.taskStatus=="40"){ if (this.taskStatus == "40") {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '请勿再点击' title: '请勿再点击'
@ -357,11 +358,11 @@
that.backReceiveEndBackFn() that.backReceiveEndBackFn()
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.single-fetch { .single-fetch {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 35rpx; padding: 20rpx 35rpx;
@ -386,9 +387,9 @@
view:last-child { view:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.btm-exam { .btm-exam {
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
@ -407,9 +408,9 @@
font-size: 14px; font-size: 14px;
color: #fff; color: #fff;
} }
} }
.popup1 { .popup1 {
width: 80vw; width: 80vw;
height: 20vh; height: 20vh;
background-color: #fff; background-color: #fff;
@ -447,9 +448,9 @@
width: 85%; width: 85%;
margin: 40rpx auto; margin: 40rpx auto;
} }
} }
.popup2 { .popup2 {
width: 80vw; width: 80vw;
height: 60vh; height: 60vh;
background-color: #fff; background-color: #fff;
@ -504,5 +505,5 @@
border-radius: 40rpx; border-radius: 40rpx;
font-size: 14px; font-size: 14px;
} }
} }
</style> </style>

View File

@ -1,18 +1,10 @@
<template> <template>
<view> <view>
<view class="ipt-area"> <view class="ipt-area">
<uni-easyinput <uni-easyinput suffixIcon="search" v-model="keywordVal" placeholder="请输入领料单号"
suffixIcon="search" @iconClick="searchKeyword"></uni-easyinput>
v-model="keywordVal"
placeholder="请输入关键字"
@iconClick="searchKeyword"
></uni-easyinput>
</view> </view>
<view <view class="single-fetch" v-for="(fetch, index) in fetchMaterialList" :key="index">
class="single-fetch"
v-for="(fetch, index) in fetchMaterialList"
:key="index"
>
<view class="fetch-upper"> <view class="fetch-upper">
<!-- {{ fetch.taskStatus }} --> <!-- {{ fetch.taskStatus }} -->
<!-- <checkbox-group <!-- <checkbox-group
@ -30,10 +22,7 @@
<h4 style="color: #989898;">{{ fetch.phoneNumber }}</h4> <h4 style="color: #989898;">{{ fetch.phoneNumber }}</h4>
</view> </view>
</view> </view>
<view <view class="fetch-lower" @click="seeDetail(fetch.taskId, fetch.taskStatus, fetch.id)">
class="fetch-lower"
@click="seeDetail(fetch.taskId, fetch.taskStatus, fetch.id)"
>
<view> <view>
<span>领料申请单位</span> <span>领料申请单位</span>
<h4>{{ fetch.unitName }}</h4> <h4>{{ fetch.unitName }}</h4>
@ -82,38 +71,22 @@
</view> </view>
</view> --> </view> -->
<view class="sticky-area"> <view class="sticky-area">
<h4 <h4 v-show="fetch.taskStatus == '33'">
v-show="fetch.taskStatus == '33'"
>
待出库 待出库
</h4> </h4>
<h4 <h4 v-show="fetch.taskStatus == '34'">
v-show="fetch.taskStatus == '34'"
>
出库进行中 出库进行中
</h4> </h4>
<h4 <h4 v-show="fetch.taskStatus == '35'" style="border: 1px solid #27D870; color: #27D870;">
v-show="fetch.taskStatus == '35'"
style="border: 1px solid #27D870; color: #27D870;"
>
出库完成 出库完成
</h4> </h4>
<h4 <h4 v-show="fetch.taskStatus == '98'" style="border: 1px solid #EE603D; color: #EE603D;">
v-show="fetch.taskStatus == '98'"
style="border: 1px solid #EE603D; color: #EE603D;"
>
分公司审核驳回 分公司审核驳回
</h4> </h4>
<h4 <h4 v-show="fetch.taskStatus == '99'" style="border: 1px solid #EE603D; color: #EE603D;">
v-show="fetch.taskStatus == '99'"
style="border: 1px solid #EE603D; color: #EE603D;"
>
分管审核驳回 分管审核驳回
</h4> </h4>
<h4 <h4 v-show="fetch.taskStatus == '100'" style="border: 1px solid #EE603D; color: #EE603D;">
v-show="fetch.taskStatus == '100'"
style="border: 1px solid #EE603D; color: #EE603D;"
>
内部审核驳回 内部审核驳回
</h4> </h4>
</view> </view>
@ -138,7 +111,7 @@
<script> <script>
import { basePath } from '../../public' import { basePath } from '../../public'
export default { export default {
data() { data() {
return { return {
keywordVal: '', keywordVal: '',
@ -151,7 +124,7 @@ import { basePath } from '../../public'
} }
}, },
methods: { methods: {
seeDetail (taskId, taskStatus, id) { seeDetail(taskId, taskStatus, id) {
// if (taskStatus == 33) { // if (taskStatus == 33) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail?taskId=${taskId}&taskStatus=${taskStatus}&id=${id}` url: `/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail?taskId=${taskId}&taskStatus=${taskStatus}&id=${id}`
@ -189,7 +162,7 @@ import { basePath } from '../../public'
} }
} }
}, */ }, */
toggleExam () { toggleExam() {
let that = this let that = this
that.examList = that.fetchMaterialList.filter((item) => { that.examList = that.fetchMaterialList.filter((item) => {
return item.checked == true return item.checked == true
@ -201,21 +174,21 @@ import { basePath } from '../../public'
}) })
console.log(that.examList); console.log(that.examList);
}, },
closePopup () { closePopup() {
this.$refs.popup.close() this.$refs.popup.close()
}, },
seeExam (name) { seeExam(name) {
console.log(name); console.log(name);
this.$refs.popup.open() this.$refs.popup.open()
}, },
formSubmit () { formSubmit() {
let that = this let that = this
that.$refs.examForm.validate().then(formData => { that.$refs.examForm.validate().then(formData => {
console.log(formData); console.log(formData);
that.$refs.popup.close() that.$refs.popup.close()
}) })
}, },
initFetch (code) { initFetch(code) {
let that = this let that = this
that.showLoading = true that.showLoading = true
// //
@ -224,7 +197,7 @@ import { basePath } from '../../public'
role: uni.getStorageSync('roles').join(','), role: uni.getStorageSync('roles').join(','),
flag: 0 flag: 0
}).then(res => { }).then(res => {
console.log(res); console.log(code);
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.rows.length == 0) { if (res.data.data.rows.length == 0) {
that.showLoading = false that.showLoading = false
@ -247,7 +220,7 @@ import { basePath } from '../../public'
console.log(err); console.log(err);
}) })
}, },
searchKeyword () { searchKeyword() {
this.initFetch(this.keywordVal) this.initFetch(this.keywordVal)
} }
}, },
@ -256,20 +229,22 @@ import { basePath } from '../../public'
console.log(uni.getStorageSync('roles').join(',')); console.log(uni.getStorageSync('roles').join(','));
that.initFetch('') that.initFetch('')
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
body{ body {
background-color: #f8f8f8; background-color: #f8f8f8;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 10vh; padding-bottom: 10vh;
} }
.ipt-area{
.ipt-area {
width: 95%; width: 95%;
margin: 20rpx auto; margin: 20rpx auto;
} }
.single-fetch{
.single-fetch {
width: 95%; width: 95%;
margin: 20rpx auto; margin: 20rpx auto;
background-color: #fff; background-color: #fff;
@ -277,14 +252,16 @@ import { basePath } from '../../public'
box-sizing: border-box; box-sizing: border-box;
padding: 15rpx; padding: 15rpx;
position: relative; position: relative;
.fetch-upper{
.fetch-upper {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 15rpx; padding: 15rpx;
border-bottom: 1px solid #D7D7D7; border-bottom: 1px solid #D7D7D7;
display: flex; display: flex;
align-items: center; align-items: center;
.upper-lef{
.upper-lef {
width: 12%; width: 12%;
height: 5vh; height: 5vh;
border-radius: 15rpx; border-radius: 15rpx;
@ -295,50 +272,59 @@ import { basePath } from '../../public'
color: #fff; color: #fff;
font-size: 24px; font-size: 24px;
} }
.upper-rig{
.upper-rig {
flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
h4{
h4 {
font-weight: normal; font-weight: normal;
font-size: 14px; font-size: 14px;
} }
} }
} }
.fetch-lower{
.fetch-lower {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 15rpx; padding: 15rpx;
view{
view {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 15rpx; margin-bottom: 15rpx;
font-size: 14px; font-size: 14px;
span{
span {
color: #9D9D9D; color: #9D9D9D;
padding-right: 20rpx; padding-right: 20rpx;
} }
h4{
h4 {
color: #000; color: #000;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: normal;
} }
} }
view:last-child{
view:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.fetch-btns{
.fetch-btns {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 15rpx; padding: 15rpx;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
view{
view {
box-sizing: border-box; box-sizing: border-box;
padding: 8rpx 25rpx; padding: 8rpx 25rpx;
border-radius: 15rpx; border-radius: 15rpx;
@ -346,15 +332,18 @@ import { basePath } from '../../public'
margin-right: 15rpx; margin-right: 15rpx;
font-size: 14px; font-size: 14px;
} }
view:last-child{
view:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.sticky-area{
.sticky-area {
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
right: 20rpx; right: 20rpx;
h4{
h4 {
box-sizing: border-box; box-sizing: border-box;
padding: 8rpx 20rpx; padding: 8rpx 20rpx;
border-radius: 15rpx; border-radius: 15rpx;
@ -365,5 +354,5 @@ import { basePath } from '../../public'
color: #3788FF; color: #3788FF;
} }
} }
} }
</style> </style>

View File

@ -9,46 +9,44 @@
</view> </view>
</view> </view>
<view class="switch-log"> <view class="switch-log">
<view <view :class="[{ active: switchStatus == 1 }]" @click="switchUpper(1)">
:class="[{ active: switchStatus == 1 }]"
@click="switchUpper(1)"
>
账号登录 账号登录
</view> </view>
<view <view :class="[{ active: switchStatus == 2 }]" @click="switchUpper(2)">
:class="[{ active: switchStatus == 2 }]"
@click="switchUpper(2)"
>
手机登录 手机登录
</view> </view>
</view> </view>
<view class="login-area"> <view class="login-area">
<uni-forms v-show="switchStatus == 1" ref="accountForm" :modelValue="accountFormData" :rules="accountRules" class="form-area" label-position="top"> <uni-forms v-show="switchStatus == 1" ref="accountForm" :modelValue="accountFormData" :rules="accountRules"
class="form-area" label-position="top">
<uni-forms-item name="username" required label="用户名" label-width="100"> <uni-forms-item name="username" required label="用户名" label-width="100">
<uni-easyinput placeholder="请输入用户名称" maxlength="60" v-model="accountFormData.username"></uni-easyinput> <uni-easyinput placeholder="请输入用户名称" maxlength="60"
v-model="accountFormData.username"></uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="password" required label="密码" label-width="100"> <uni-forms-item name="password" required label="密码" label-width="100">
<uni-easyinput type="password" placeholder="请输入密码" maxlength="60" v-model="accountFormData.password"></uni-easyinput> <uni-easyinput type="password" placeholder="请输入密码" maxlength="60"
v-model="accountFormData.password"></uni-easyinput>
</uni-forms-item> </uni-forms-item>
<text <text style="
style="
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
color: #3689FF; color: #3689FF;
font-size: 14px; font-size: 14px;
" ">
>
忘记密码 忘记密码
</text> </text>
<button class="submit-btn" @click="accountSubmit">登录</button> <button class="submit-btn" @click="accountSubmit">登录</button>
</uni-forms> </uni-forms>
<uni-forms v-show="switchStatus == 2" ref="veriForm" :modelValue="veriFormData" :rules="veriRules" class="form-area" label-position="top"> <uni-forms v-show="switchStatus == 2" ref="veriForm" :modelValue="veriFormData" :rules="veriRules"
class="form-area" label-position="top">
<uni-forms-item name="phone" required label="手机号码" label-width="100"> <uni-forms-item name="phone" required label="手机号码" label-width="100">
<uni-easyinput placeholder="请输入手机号码" type="number" v-model="veriFormData.phone" maxlength="11"></uni-easyinput> <uni-easyinput placeholder="请输入手机号码" type="number" v-model="veriFormData.phone"
maxlength="11"></uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="code" required label="验证码" label-width="100"> <uni-forms-item name="code" required label="验证码" label-width="100">
<uni-easyinput type="number" maxlength="6" placeholder="请输入验证码" v-model="veriFormData.code"></uni-easyinput> <uni-easyinput type="number" maxlength="6" placeholder="请输入验证码"
v-model="veriFormData.code"></uni-easyinput>
<button class="count-down" :disabled="sendDisabled" @click="sendVeriCode" style="font-size: 14px;"> <button class="count-down" :disabled="sendDisabled" @click="sendVeriCode" style="font-size: 14px;">
<span v-if="countDownStatus == 0">发送验证码</span> <span v-if="countDownStatus == 0">发送验证码</span>
<span v-if="countDownStatus == 1"> <span v-if="countDownStatus == 1">
@ -65,7 +63,7 @@
<script> <script>
import { authPath, publicPath, systemPath } from '../../public' import { authPath, publicPath, systemPath } from '../../public'
export default { export default {
data() { data() {
return { return {
showLoading: false, showLoading: false,
@ -121,10 +119,10 @@ import { authPath, publicPath, systemPath } from '../../public'
} }
}, },
methods: { methods: {
switchUpper (count) { switchUpper(count) {
this.switchStatus = count this.switchStatus = count
}, },
sendVeriCode () { sendVeriCode() {
let that = this let that = this
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/ let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
if (!phoneReg.test(that.veriFormData.phone)) { if (!phoneReg.test(that.veriFormData.phone)) {
@ -154,7 +152,7 @@ import { authPath, publicPath, systemPath } from '../../public'
}, 1000 * 60) }, 1000 * 60)
} }
}, },
veriSubmit () { veriSubmit() {
let that = this let that = this
that.$refs.veriForm.validate().then(formRes => { that.$refs.veriForm.validate().then(formRes => {
that.showLoading = true that.showLoading = true
@ -162,8 +160,8 @@ import { authPath, publicPath, systemPath } from '../../public'
that.$api.login.checkCode(formRes).then(res => { that.$api.login.checkCode(formRes).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
uni.setStorageSync('userInfo', res.data.data) uni.setStorageSync('userInfo', res.data.data.login_user)
uni.setStorageSync('token', res.data.data.token) uni.setStorageSync('token', res.data.data.access_token)
uni.setStorageSync('roles', res.data.data.login_user.roles) uni.setStorageSync('roles', res.data.data.login_user.roles)
uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId) uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId)
uni.showToast({ uni.showToast({
@ -190,7 +188,7 @@ import { authPath, publicPath, systemPath } from '../../public'
}) })
}) })
}, },
accountSubmit () { accountSubmit() {
let that = this let that = this
that.$refs.accountForm.validate().then(formData => { that.$refs.accountForm.validate().then(formData => {
that.showLoading = true that.showLoading = true
@ -227,31 +225,35 @@ import { authPath, publicPath, systemPath } from '../../public'
}) })
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
body{ body {
background: url('/static/log-bgd.png'); background: url('/static/log-bgd.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.upper-bgd{
.upper-bgd {
width: 100%; width: 100%;
height: 25vh; height: 25vh;
box-sizing: border-box; box-sizing: border-box;
padding-top: 10vh; padding-top: 10vh;
.logo{
.logo {
width: 20%; width: 20%;
height: 10vh; height: 10vh;
margin: 0 auto; margin: 0 auto;
margin-bottom: 2vh; margin-bottom: 2vh;
image{
image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.tit{
.tit {
width: 100%; width: 100%;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
@ -259,8 +261,9 @@ import { authPath, publicPath, systemPath } from '../../public'
justify-content: center; justify-content: center;
color: #3C87F3; color: #3C87F3;
} }
} }
.switch-log{
.switch-log {
width: 80%; width: 80%;
height: 100rpx; height: 100rpx;
margin: 6vh auto; margin: 6vh auto;
@ -269,15 +272,17 @@ import { authPath, publicPath, systemPath } from '../../public'
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
font-size: 26rpx; font-size: 26rpx;
.active{
.active {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
border-bottom: 4px solid #B4D0FF; border-bottom: 4px solid #B4D0FF;
border-bottom-left-radius: 15rpx; border-bottom-left-radius: 15rpx;
border-bottom-right-radius: 15rpx; border-bottom-right-radius: 15rpx;
} }
} }
.login-area{
.login-area {
width: 80%; width: 80%;
box-sizing: border-box; box-sizing: border-box;
padding: 3vh; padding: 3vh;
@ -285,10 +290,12 @@ import { authPath, publicPath, systemPath } from '../../public'
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
box-shadow: 0 3px 5px #E6EEFE; box-shadow: 0 3px 5px #E6EEFE;
.uni-forms-item__content[data-v-61dfc0d0]{
.uni-forms-item__content[data-v-61dfc0d0] {
display: flex; display: flex;
} }
.submit-btn{
.submit-btn {
background-color: #3888FF; background-color: #3888FF;
margin: 10vh auto; margin: 10vh auto;
margin-bottom: 0; margin-bottom: 0;
@ -296,5 +303,5 @@ import { authPath, publicPath, systemPath } from '../../public'
color: #fff; color: #fff;
font-size: 26rpx; font-size: 26rpx;
} }
} }
</style> </style>