5.7 Merge branch 'main-cq'
This commit is contained in:
commit
956f7c618d
|
|
@ -236,6 +236,7 @@ import { basePath } from '../../public'
|
|||
}
|
||||
},
|
||||
getList (keyWord) {
|
||||
console.log(keyWord);
|
||||
let that = this
|
||||
// 获取退料接收列表
|
||||
that.$api.backMaterialReceive.backMaterialReceiveList({
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<view class="form-area">
|
||||
<view class="upper-ipt">
|
||||
<uni-easyinput style="margin-bottom: 15rpx;" v-model="carCode" placeholder="请输入车牌号"></uni-easyinput>
|
||||
<!-- <uni-easyinput style="margin-bottom: 15rpx;" v-model="carCode" placeholder="请输入车牌号"></uni-easyinput> -->
|
||||
<uni-easyinput suffixIcon="search" v-model="codeVal" placeholder="请输入编码" @iconClick="searchCode"></uni-easyinput>
|
||||
</view>
|
||||
<view
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
if (res.data.rows.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '未查询到设备数据!'
|
||||
title: '请输入正确格式的编码!'
|
||||
})
|
||||
} else {
|
||||
that.infoList = res.data.rows
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
if (this.infoList[0].typeId != this.typeId) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '编码与机具类型不匹配!'
|
||||
title: '机具类型不匹配!'
|
||||
})
|
||||
} else {
|
||||
that.subList = {
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
taskId: that.taskId,
|
||||
maId: that.infoList[0].maId,
|
||||
outNum: 1,
|
||||
carCode: that.carCode,
|
||||
// carCode: that.carCode,
|
||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
||||
}
|
||||
console.log(that.subList);
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
this.parentId = params.parentId
|
||||
this.manageType = params.manageType
|
||||
this.taskId = params.taskId
|
||||
// this.codeVal = params.transCode
|
||||
// this.codeVal = params.code
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
if (this.infoList[0].typeId != this.typeId) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '编码与机具类型不匹配!'
|
||||
title: '机具类型不匹配!'
|
||||
})
|
||||
} else {
|
||||
that.subList = {
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ import { basePath } from '../../public'
|
|||
} else {
|
||||
that.modalList.directAuditRemark = that.rejectReason
|
||||
console.log(that.modalList);
|
||||
that.rejectExam(that.modalList.id)
|
||||
that.rejectExam(that.modalList.id, that.modalList.directAuditRemark)
|
||||
}
|
||||
},
|
||||
closePopup () {
|
||||
|
|
@ -257,11 +257,12 @@ import { basePath } from '../../public'
|
|||
closePopup1 () {
|
||||
this.$refs.popup1.close()
|
||||
},
|
||||
seeExam (id) {
|
||||
seeExam (id, directAuditRemark) {
|
||||
let that = this
|
||||
// 提交单个审核
|
||||
that.$api.exitExam.subExitExam({
|
||||
id
|
||||
id,
|
||||
directAuditRemark
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
|
|
@ -288,7 +289,7 @@ import { basePath } from '../../public'
|
|||
console.log(err);
|
||||
})
|
||||
},
|
||||
rejectExam () {
|
||||
rejectExam (id) {
|
||||
let that = this
|
||||
// 拒绝单个审核
|
||||
that.$api.exitExam.rejectExitExam({
|
||||
|
|
|
|||
|
|
@ -75,15 +75,15 @@
|
|||
<h4>待出库数量</h4>
|
||||
<span>{{ infoList.outNum }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<!-- <view>
|
||||
<h4>车牌号</h4>
|
||||
<!-- <uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/> -->
|
||||
<uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/>
|
||||
<uni-easyinput
|
||||
placeholder="请输入车牌号"
|
||||
v-model="carCode"
|
||||
>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
</view> -->
|
||||
<view>
|
||||
<h4>出库数量</h4>
|
||||
<!-- <uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/> -->
|
||||
|
|
@ -170,18 +170,28 @@
|
|||
this.$refs.popup2.close()
|
||||
},
|
||||
scanCode () {
|
||||
console.log(this.infoList);
|
||||
this.closePopup1()
|
||||
/* uni.scanCode({
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
uni.navigateTo({
|
||||
url: `/pages/scanOutStore/scanOutStore?code=${res.result}&typeId=${this.infoList.typeId}&num=${this.infoList.preNum}&parentId=${this.infoList.parenntId}`
|
||||
})
|
||||
const fixedCode = res.result.split('=')[1]
|
||||
console.log(fixedCode);
|
||||
if (!fixedCode) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '未识别到设备!'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/scanOutStore/scanOutStore?code=${fixedCode}&typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}) */
|
||||
uni.navigateTo({
|
||||
url: `/pages/QROut/QROut?typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`
|
||||
})
|
||||
/* uni.navigateTo({
|
||||
url: `/pages/QROut/QROut?typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`
|
||||
}) */
|
||||
},
|
||||
codeOut () {
|
||||
this.closePopup1()
|
||||
|
|
@ -218,7 +228,7 @@
|
|||
parentId: that.infoList.parentId,
|
||||
typeId: that.infoList.typeId,
|
||||
taskId: that.infoList.taskId,
|
||||
carCode: that.carCode,
|
||||
// carCode: that.carCode,
|
||||
outNum: that.multiNum,
|
||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
||||
}
|
||||
|
|
@ -259,7 +269,8 @@
|
|||
} */
|
||||
// const res = await that.$api.fetchMaterialOutStore.fetchSingleDetail(params)
|
||||
that.$api.fetchMaterialOutStore.fetchSingleDetail({
|
||||
id: that.id
|
||||
id: that.id,
|
||||
souceBy: 1
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
that.fetchList = []
|
||||
|
|
@ -269,7 +280,7 @@
|
|||
that.fetchList.push(res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails[k])
|
||||
}
|
||||
} */
|
||||
that.fetchList = res.data.data.rows
|
||||
that.fetchList = res.data.data
|
||||
console.log('获取详情 ===========================',that.fetchList);
|
||||
// that.fetchList[1].manageType = 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,46 +9,44 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="switch-log">
|
||||
<view
|
||||
:class="[{ active: switchStatus == 1 }]"
|
||||
@click="switchUpper(1)"
|
||||
>
|
||||
<view :class="[{ active: switchStatus == 1 }]" @click="switchUpper(1)">
|
||||
账号登录
|
||||
</view>
|
||||
<view
|
||||
:class="[{ active: switchStatus == 2 }]"
|
||||
@click="switchUpper(2)"
|
||||
>
|
||||
<view :class="[{ active: switchStatus == 2 }]" @click="switchUpper(2)">
|
||||
手机登录
|
||||
</view>
|
||||
</view>
|
||||
<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-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 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>
|
||||
<text
|
||||
style="
|
||||
<text style="
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
color: #3689FF;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
">
|
||||
忘记密码
|
||||
</text>
|
||||
<button class="submit-btn" @click="accountSubmit">登录</button>
|
||||
</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-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 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;">
|
||||
<span v-if="countDownStatus == 0">发送验证码</span>
|
||||
<span v-if="countDownStatus == 1">
|
||||
|
|
@ -65,236 +63,245 @@
|
|||
|
||||
<script>
|
||||
import { authPath, publicPath, systemPath } from '../../public'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
accountFormData: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
veriFormData: {
|
||||
phone: '',
|
||||
code: ''
|
||||
},
|
||||
switchStatus: 1,
|
||||
countDown: 60,
|
||||
countDownStatus: 0,
|
||||
sendDisabled: false,
|
||||
givenCode: '',
|
||||
accountRules: {
|
||||
username: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入用户名称!'
|
||||
}
|
||||
]
|
||||
},
|
||||
password: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入密码!'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
veriRules: {
|
||||
phone: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入手机号码!'
|
||||
}
|
||||
]
|
||||
},
|
||||
code: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入验证码!'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchUpper (count) {
|
||||
this.switchStatus = count
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
accountFormData: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
sendVeriCode () {
|
||||
let that = this
|
||||
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
|
||||
if (!phoneReg.test(that.veriFormData.phone)) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入正确格式的手机号!'
|
||||
})
|
||||
} else {
|
||||
that.$api.login.codeLogin({
|
||||
phone: String(that.veriFormData.phone)
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
that.countDownStatus = 1
|
||||
that.sendDisabled = true
|
||||
let timeInterval = setInterval(() => {
|
||||
that.countDown -= 1
|
||||
}, 1000)
|
||||
let timeOut = setTimeout(() => {
|
||||
that.countDownStatus = 0
|
||||
that.countDown = 60
|
||||
that.sendDisabled = false
|
||||
clearInterval(timeInterval)
|
||||
clearTimeout(timeOut)
|
||||
}, 1000 * 60)
|
||||
veriFormData: {
|
||||
phone: '',
|
||||
code: ''
|
||||
},
|
||||
switchStatus: 1,
|
||||
countDown: 60,
|
||||
countDownStatus: 0,
|
||||
sendDisabled: false,
|
||||
givenCode: '',
|
||||
accountRules: {
|
||||
username: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入用户名称!'
|
||||
}
|
||||
]
|
||||
},
|
||||
password: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入密码!'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
veriSubmit () {
|
||||
let that = this
|
||||
that.$refs.veriForm.validate().then(formRes => {
|
||||
that.showLoading = true
|
||||
console.log(formRes);
|
||||
that.$api.login.checkCode(formRes).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.setStorageSync('userInfo', res.data.data)
|
||||
uni.setStorageSync('token', res.data.data.token)
|
||||
uni.setStorageSync('roles', res.data.data.login_user.roles)
|
||||
uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录成功!',
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
}
|
||||
})
|
||||
veriRules: {
|
||||
phone: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入手机号码!'
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
})
|
||||
},
|
||||
accountSubmit () {
|
||||
let that = this
|
||||
that.$refs.accountForm.validate().then(formData => {
|
||||
that.showLoading = true
|
||||
console.log(formData);
|
||||
that.$api.login.log(formData).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.setStorageSync('userInfo', res.data.data.login_user)
|
||||
uni.setStorageSync('token', res.data.data.access_token)
|
||||
uni.setStorageSync('roles', res.data.data.login_user.roles)
|
||||
uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录成功!',
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
code: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: '请输入验证码!'
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchUpper(count) {
|
||||
this.switchStatus = count
|
||||
},
|
||||
sendVeriCode() {
|
||||
let that = this
|
||||
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
|
||||
if (!phoneReg.test(that.veriFormData.phone)) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入正确格式的手机号!'
|
||||
})
|
||||
} else {
|
||||
that.$api.login.codeLogin({
|
||||
phone: String(that.veriFormData.phone)
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
that.countDownStatus = 1
|
||||
that.sendDisabled = true
|
||||
let timeInterval = setInterval(() => {
|
||||
that.countDown -= 1
|
||||
}, 1000)
|
||||
let timeOut = setTimeout(() => {
|
||||
that.countDownStatus = 0
|
||||
that.countDown = 60
|
||||
that.sendDisabled = false
|
||||
clearInterval(timeInterval)
|
||||
clearTimeout(timeOut)
|
||||
}, 1000 * 60)
|
||||
}
|
||||
},
|
||||
veriSubmit() {
|
||||
let that = this
|
||||
that.$refs.veriForm.validate().then(formRes => {
|
||||
that.showLoading = true
|
||||
console.log(formRes);
|
||||
that.$api.login.checkCode(formRes).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.setStorageSync('userInfo', res.data.data.login_user)
|
||||
uni.setStorageSync('token', res.data.data.access_token)
|
||||
uni.setStorageSync('roles', res.data.data.login_user.roles)
|
||||
uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录成功!',
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
})
|
||||
},
|
||||
accountSubmit() {
|
||||
let that = this
|
||||
that.$refs.accountForm.validate().then(formData => {
|
||||
that.showLoading = true
|
||||
console.log(formData);
|
||||
that.$api.login.log(formData).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.setStorageSync('userInfo', res.data.data.login_user)
|
||||
uni.setStorageSync('token', res.data.data.access_token)
|
||||
uni.setStorageSync('roles', res.data.data.login_user.roles)
|
||||
uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录成功!',
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
success: () => {
|
||||
that.showLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
body{
|
||||
background: url('/static/log-bgd.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.upper-bgd{
|
||||
width: 100%;
|
||||
height: 25vh;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10vh;
|
||||
.logo{
|
||||
width: 20%;
|
||||
height: 10vh;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 2vh;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.tit{
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
color: #3C87F3;
|
||||
}
|
||||
}
|
||||
.switch-log{
|
||||
width: 80%;
|
||||
height: 100rpx;
|
||||
margin: 6vh auto;
|
||||
margin-bottom: 1vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
.active{
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border-bottom: 4px solid #B4D0FF;
|
||||
border-bottom-left-radius: 15rpx;
|
||||
border-bottom-right-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
.login-area{
|
||||
width: 80%;
|
||||
box-sizing: border-box;
|
||||
padding: 3vh;
|
||||
body {
|
||||
background: url('/static/log-bgd.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.upper-bgd {
|
||||
width: 100%;
|
||||
height: 25vh;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10vh;
|
||||
|
||||
.logo {
|
||||
width: 20%;
|
||||
height: 10vh;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 3px 5px #E6EEFE;
|
||||
.uni-forms-item__content[data-v-61dfc0d0]{
|
||||
display: flex;
|
||||
}
|
||||
.submit-btn{
|
||||
background-color: #3888FF;
|
||||
margin: 10vh auto;
|
||||
margin-bottom: 0;
|
||||
border-radius: 50rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 2vh;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
color: #3C87F3;
|
||||
}
|
||||
}
|
||||
|
||||
.switch-log {
|
||||
width: 80%;
|
||||
height: 100rpx;
|
||||
margin: 6vh auto;
|
||||
margin-bottom: 1vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
.active {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border-bottom: 4px solid #B4D0FF;
|
||||
border-bottom-left-radius: 15rpx;
|
||||
border-bottom-right-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.login-area {
|
||||
width: 80%;
|
||||
box-sizing: border-box;
|
||||
padding: 3vh;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 3px 5px #E6EEFE;
|
||||
|
||||
.uni-forms-item__content[data-v-61dfc0d0] {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
background-color: #3888FF;
|
||||
margin: 10vh auto;
|
||||
margin-bottom: 0;
|
||||
border-radius: 50rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -210,21 +210,6 @@
|
|||
})
|
||||
}
|
||||
}
|
||||
/* that.totalGoods.forEach(item => {
|
||||
console.log(item);
|
||||
if (item.manageType == 0) {
|
||||
if (item.maCode == null) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '该机具编码未绑定,无法审核!'
|
||||
})
|
||||
} else {
|
||||
that.openPopup()
|
||||
}
|
||||
} else {
|
||||
that.openPopup()
|
||||
}
|
||||
}) */
|
||||
/* uni.showModal({
|
||||
title: '新购明细审核',
|
||||
content: '是否确定审核通过?',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,337 @@
|
|||
<template>
|
||||
<view>
|
||||
<view
|
||||
class="single-patch"
|
||||
v-for="(item, index) in upperInfo"
|
||||
:key="index"
|
||||
>
|
||||
<view>
|
||||
<h4>序号</h4>
|
||||
<span>{{ index + 1 }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>设备类型</h4>
|
||||
<span>{{ item.typeName }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>规格型号</h4>
|
||||
<span>{{ item.typeModelName }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>单位</h4>
|
||||
<span>{{ item.unitName }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>应退数量</h4>
|
||||
<span>{{ item.partNum }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>合格数量</h4>
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
v-model="item.okNum"
|
||||
placeholder="请输入数量"
|
||||
@change="okChange($event, index)"
|
||||
>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view>
|
||||
<h4>待修数量</h4>
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
v-model="item.reNum"
|
||||
placeholder="请输入数量"
|
||||
@change="reChange($event, index)"
|
||||
>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view>
|
||||
<h4>待报废数量</h4>
|
||||
<uni-easyinput
|
||||
type="number"
|
||||
v-model="item.crashNum"
|
||||
placeholder="请输入数量"
|
||||
@change="crashChange($event, index)"
|
||||
>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="form-area">
|
||||
<view>
|
||||
<h4>类型名称</h4>
|
||||
<span>{{ upperInfo.typeName }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>规格型号</h4>
|
||||
<span>{{ upperInfo.typeCode }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>待入库数量</h4>
|
||||
<span>{{ upperInfo.num }}</span>
|
||||
</view>
|
||||
<view>
|
||||
<h4>合格数量</h4>
|
||||
<uni-easyinput type="number" v-model="lowerIpt.passedNum" placeholder="请输入数量"></uni-easyinput>
|
||||
</view>
|
||||
<view>
|
||||
<h4>待修数量</h4>
|
||||
<uni-easyinput type="number" v-model="lowerIpt.waitRepairNum" placeholder="请输入数量"></uni-easyinput>
|
||||
</view>
|
||||
<view>
|
||||
<h4>待报废数量</h4>
|
||||
<uni-easyinput type="number" v-model="lowerIpt.waitCrashNum" placeholder="请输入数量"></uni-easyinput>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="sub-btn" @click="subForm">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
upperInfo: [],
|
||||
userId: '',
|
||||
manageType: '',
|
||||
taskId: '',
|
||||
intReg: /^\+?[0-9]\d*$/
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
okChange (e, index) {
|
||||
console.log(e, index);
|
||||
if (!this.intReg.test(e)) {
|
||||
this.upperInfo[index].okNum = 1
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入0或正整数!'
|
||||
})
|
||||
}
|
||||
},
|
||||
reChange (e, index) {
|
||||
console.log(e, index);
|
||||
if (!this.intReg.test(e)) {
|
||||
this.upperInfo[index].reNum = 1
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入0或正整数!'
|
||||
})
|
||||
}
|
||||
},
|
||||
crashChange (e, index) {
|
||||
console.log(e, index);
|
||||
if (!this.intReg.test(e)) {
|
||||
this.upperInfo[index].crashNum = 1
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入0或正整数!'
|
||||
})
|
||||
}
|
||||
},
|
||||
subForm() {
|
||||
let that = this
|
||||
const ifAllAgree = that.upperInfo.every(item => {
|
||||
return Number(item.okNum) + Number(item.reNum) + Number(item.crashNum) <= Number(item.partNum)
|
||||
})
|
||||
console.log(ifAllAgree);
|
||||
if (!ifAllAgree) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '数量相加不得大于应退数量!'
|
||||
})
|
||||
} else {
|
||||
console.log(that.upperInfo);
|
||||
let submitList = []
|
||||
that.upperInfo.forEach(list => {
|
||||
let baseObj = {
|
||||
parentId: list.parentId,
|
||||
typeId: list.modelId,
|
||||
manageType: this.manageType,
|
||||
createBy: this.userId
|
||||
}
|
||||
if (Number(list.okNum) > 0) {
|
||||
let info = {
|
||||
...baseObj,
|
||||
backStatus: 1,
|
||||
backNum: list.okNum
|
||||
}
|
||||
submitList.push(info)
|
||||
}
|
||||
if (Number(list.reNum) > 0) {
|
||||
let info = {
|
||||
...baseObj,
|
||||
backStatus: 2,
|
||||
backNum: list.reNum
|
||||
}
|
||||
submitList.push(info)
|
||||
}
|
||||
if (Number(list.crashNum) > 0) {
|
||||
let info = {
|
||||
...baseObj,
|
||||
backStatus: 3,
|
||||
backNum: list.crashNum
|
||||
}
|
||||
submitList.push(info)
|
||||
}
|
||||
})
|
||||
console.log(submitList);
|
||||
that.$api.backMaterialReceive.backMaterialSetNumBack({
|
||||
taskId: this.taskId,
|
||||
arr: submitList
|
||||
}).then(res => {
|
||||
console.log("res===", res)
|
||||
if (res.data.code == 200) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '接收成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
},
|
||||
300)
|
||||
} else {
|
||||
submitList = []
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
/* if (!this.lowerIpt.passedNum && !this.lowerIpt.waitRepairNum && !this.lowerIpt.waitCrashNum) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请至少填写一个数据!'
|
||||
})
|
||||
return
|
||||
}
|
||||
that.totalNum = Number(that.lowerIpt.passedNum) + Number(that.lowerIpt.waitRepairNum) + Number(that
|
||||
.lowerIpt.waitCrashNum)
|
||||
console.log(that.totalNum);
|
||||
if (that.totalNum > that.upperInfo.num) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '接收总量不能大于退库数量!'
|
||||
})
|
||||
} else if (that.totalNum == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请确保退料总量不为0!'
|
||||
})
|
||||
} else {
|
||||
console.log(this.handleSubmitData());
|
||||
that.$api.backMaterialReceive.backMaterialSetNumBack({
|
||||
taskId: this.upperInfo.taskId,
|
||||
arr: this.handleSubmitData()
|
||||
}).then(res => {
|
||||
console.log("res===", res)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '接收成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
},
|
||||
300)
|
||||
})
|
||||
} */
|
||||
},
|
||||
handleSubmitData() {
|
||||
let list = []
|
||||
const baseInfo = {
|
||||
parentId: this.upperInfo.id,
|
||||
typeId: this.upperInfo.modelId,
|
||||
manageType: this.upperInfo.manageType,
|
||||
createBy: this.upperInfo.userId
|
||||
}
|
||||
let passInfo = {
|
||||
backStatus: 1,
|
||||
backNum: this.lowerIpt.passedNum
|
||||
}
|
||||
let repairInfo = {
|
||||
backStatus: 2,
|
||||
backNum: this.lowerIpt.waitRepairNum
|
||||
}
|
||||
let crashInfo = {
|
||||
backStatus: 3,
|
||||
backNum: this.lowerIpt.waitCrashNum
|
||||
}
|
||||
|
||||
if (this.lowerIpt.passedNum) {
|
||||
let info = {
|
||||
...baseInfo,
|
||||
...passInfo
|
||||
}
|
||||
list.push(info)
|
||||
}
|
||||
if (this.lowerIpt.waitRepairNum) {
|
||||
let info = {
|
||||
...baseInfo,
|
||||
...repairInfo
|
||||
}
|
||||
list.push(info)
|
||||
}
|
||||
if (this.lowerIpt.waitCrashNum) {
|
||||
let info = {
|
||||
...baseInfo,
|
||||
...crashInfo
|
||||
}
|
||||
list.push(info)
|
||||
}
|
||||
return list
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
params.arr.forEach(item => {
|
||||
item.backNum = 0
|
||||
item.okNum = 1
|
||||
item.reNum = 1
|
||||
item.crashNum = 1
|
||||
})
|
||||
console.log(params);
|
||||
this.userId = params.userId
|
||||
this.manageType = params.manageType
|
||||
this.upperInfo = params.arr
|
||||
this.taskId = params.taskId
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.single-patch{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
view{
|
||||
width: 100%;
|
||||
margin-bottom: 15rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
h4{
|
||||
width: 30%;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
view:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.sub-btn {
|
||||
width: 80%;
|
||||
margin: 5vh auto;
|
||||
box-sizing: border-box;
|
||||
padding: 15rpx 0;
|
||||
background-color: #3788FF;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -108,9 +108,9 @@
|
|||
},
|
||||
toggleBind () {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
console.log(that.qrcode);
|
||||
that.$refs.qrForm.validate().then(formData => {
|
||||
that.showLoading = true
|
||||
console.log(formData);
|
||||
that.$api.qrcodeBinding.bindQrcode({
|
||||
typeId: formData.specVal,
|
||||
|
|
@ -145,42 +145,43 @@
|
|||
let that = this
|
||||
const { code } = params
|
||||
console.log(code);
|
||||
that.qrcode = code
|
||||
// 根据扫出的编码查询设备
|
||||
/* that.$api.fetchMaterialOutStore.fetchInfoByQrCode({
|
||||
qrCode: code
|
||||
}).then(res => {
|
||||
console.log('fetchInfoByQrCode =================================',res);
|
||||
// if (res.data.code == 200) that.deviceStats = res.data.rows[0]
|
||||
if (res.data.rows.length == 0) {
|
||||
that.showBindBtn = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '未查询到设备数据!'
|
||||
})
|
||||
} else {
|
||||
that.showBindBtn = true
|
||||
that.deviceStats = res.data.rows[0]
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
}) */
|
||||
// 获取机具设备类型
|
||||
that.$api.qrcodeBinding.fetchDeviceType({
|
||||
level: '3'
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.typeRange = res.data.data.map(item => {
|
||||
return {
|
||||
text: item['typeName'],
|
||||
value: item['typeId']
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
that.qrcode = code
|
||||
// 根据扫出的编码查询设备
|
||||
/* that.$api.fetchMaterialOutStore.fetchInfoByQrCode({
|
||||
qrCode: code
|
||||
}).then(res => {
|
||||
console.log('fetchInfoByQrCode =================================',res);
|
||||
// if (res.data.code == 200) that.deviceStats = res.data.rows[0]
|
||||
if (res.data.rows.length == 0) {
|
||||
that.showBindBtn = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '未查询到设备数据!'
|
||||
})
|
||||
} else {
|
||||
that.showBindBtn = true
|
||||
that.deviceStats = res.data.rows[0]
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
}) */
|
||||
// 获取机具设备类型
|
||||
that.$api.qrcodeBinding.fetchDeviceType({
|
||||
level: '3'
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.typeRange = res.data.data.map(item => {
|
||||
return {
|
||||
text: item['typeName'],
|
||||
value: item['typeId']
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
if (this.infoList[0].typeId != this.typeId) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '编码与机具类型不匹配!'
|
||||
title: '机具类型不匹配!'
|
||||
})
|
||||
} else if (that.num == 0) {
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
if (this.infoList[0].typeId != this.typeId) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '编码与机具类型不匹配!'
|
||||
title: '机具类型不匹配!'
|
||||
})
|
||||
} else if (this.infoList[0].sdId != '16') {
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -120,9 +120,28 @@
|
|||
console.log(this.iptVal);
|
||||
},
|
||||
jumpUrl (path) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/${path}/${path}`
|
||||
})
|
||||
if (path == 'qrcodeBinding') {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
const fixedCode = res.result.split('=')[1]
|
||||
console.log(fixedCode);
|
||||
if (!fixedCode) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '未识别到设备!'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/qrcodeBindPage/qrcodeBindPage?code=${fixedCode}`
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/${path}/${path}`
|
||||
})
|
||||
}
|
||||
},
|
||||
toast () {
|
||||
uni.showToast({
|
||||
|
|
|
|||
Loading…
Reference in New Issue