Compare commits
11 Commits
ea1837d6ce
...
956f7c618d
| Author | SHA1 | Date |
|---|---|---|
|
|
956f7c618d | |
|
|
fe81e77526 | |
|
|
b9f7bd4c2e | |
|
|
c76df2aded | |
|
|
5210a1b496 | |
|
|
f0e753e323 | |
|
|
58e80c2b5f | |
|
|
db0a81b143 | |
|
|
1d79fee877 | |
|
|
dc7a15f3e8 | |
|
|
53f405070d |
|
|
@ -236,6 +236,7 @@ import { basePath } from '../../public'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList (keyWord) {
|
getList (keyWord) {
|
||||||
|
console.log(keyWord);
|
||||||
let that = this
|
let that = this
|
||||||
// 获取退料接收列表
|
// 获取退料接收列表
|
||||||
that.$api.backMaterialReceive.backMaterialReceiveList({
|
that.$api.backMaterialReceive.backMaterialReceiveList({
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<view>
|
<view>
|
||||||
<view class="form-area">
|
<view class="form-area">
|
||||||
<view class="upper-ipt">
|
<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>
|
<uni-easyinput suffixIcon="search" v-model="codeVal" placeholder="请输入编码" @iconClick="searchCode"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
if (res.data.rows.length == 0) {
|
if (res.data.rows.length == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '未查询到设备数据!'
|
title: '请输入正确格式的编码!'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
that.infoList = res.data.rows
|
that.infoList = res.data.rows
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
if (this.infoList[0].typeId != this.typeId) {
|
if (this.infoList[0].typeId != this.typeId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '编码与机具类型不匹配!'
|
title: '机具类型不匹配!'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
that.subList = {
|
that.subList = {
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
taskId: that.taskId,
|
taskId: that.taskId,
|
||||||
maId: that.infoList[0].maId,
|
maId: that.infoList[0].maId,
|
||||||
outNum: 1,
|
outNum: 1,
|
||||||
carCode: that.carCode,
|
// carCode: that.carCode,
|
||||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
||||||
}
|
}
|
||||||
console.log(that.subList);
|
console.log(that.subList);
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
this.parentId = params.parentId
|
this.parentId = params.parentId
|
||||||
this.manageType = params.manageType
|
this.manageType = params.manageType
|
||||||
this.taskId = params.taskId
|
this.taskId = params.taskId
|
||||||
// this.codeVal = params.transCode
|
// this.codeVal = params.code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
if (this.infoList[0].typeId != this.typeId) {
|
if (this.infoList[0].typeId != this.typeId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '编码与机具类型不匹配!'
|
title: '机具类型不匹配!'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
that.subList = {
|
that.subList = {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ import { basePath } from '../../public'
|
||||||
} else {
|
} else {
|
||||||
that.modalList.directAuditRemark = that.rejectReason
|
that.modalList.directAuditRemark = that.rejectReason
|
||||||
console.log(that.modalList);
|
console.log(that.modalList);
|
||||||
that.rejectExam(that.modalList.id)
|
that.rejectExam(that.modalList.id, that.modalList.directAuditRemark)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
closePopup () {
|
closePopup () {
|
||||||
|
|
@ -257,11 +257,12 @@ import { basePath } from '../../public'
|
||||||
closePopup1 () {
|
closePopup1 () {
|
||||||
this.$refs.popup1.close()
|
this.$refs.popup1.close()
|
||||||
},
|
},
|
||||||
seeExam (id) {
|
seeExam (id, directAuditRemark) {
|
||||||
let that = this
|
let that = this
|
||||||
// 提交单个审核
|
// 提交单个审核
|
||||||
that.$api.exitExam.subExitExam({
|
that.$api.exitExam.subExitExam({
|
||||||
id
|
id,
|
||||||
|
directAuditRemark
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
|
|
@ -288,7 +289,7 @@ import { basePath } from '../../public'
|
||||||
console.log(err);
|
console.log(err);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
rejectExam () {
|
rejectExam (id) {
|
||||||
let that = this
|
let that = this
|
||||||
// 拒绝单个审核
|
// 拒绝单个审核
|
||||||
that.$api.exitExam.rejectExitExam({
|
that.$api.exitExam.rejectExitExam({
|
||||||
|
|
|
||||||
|
|
@ -75,15 +75,15 @@
|
||||||
<h4>待出库数量</h4>
|
<h4>待出库数量</h4>
|
||||||
<span>{{ infoList.outNum }}</span>
|
<span>{{ infoList.outNum }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<!-- <view>
|
||||||
<h4>车牌号</h4>
|
<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
|
<uni-easyinput
|
||||||
placeholder="请输入车牌号"
|
placeholder="请输入车牌号"
|
||||||
v-model="carCode"
|
v-model="carCode"
|
||||||
>
|
>
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
</view>
|
</view> -->
|
||||||
<view>
|
<view>
|
||||||
<h4>出库数量</h4>
|
<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"/> -->
|
||||||
|
|
@ -170,18 +170,28 @@
|
||||||
this.$refs.popup2.close()
|
this.$refs.popup2.close()
|
||||||
},
|
},
|
||||||
scanCode () {
|
scanCode () {
|
||||||
|
console.log(this.infoList);
|
||||||
this.closePopup1()
|
this.closePopup1()
|
||||||
/* uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
uni.navigateTo({
|
const fixedCode = res.result.split('=')[1]
|
||||||
url: `/pages/scanOutStore/scanOutStore?code=${res.result}&typeId=${this.infoList.typeId}&num=${this.infoList.preNum}&parentId=${this.infoList.parenntId}`
|
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 () {
|
codeOut () {
|
||||||
this.closePopup1()
|
this.closePopup1()
|
||||||
|
|
@ -218,7 +228,7 @@
|
||||||
parentId: that.infoList.parentId,
|
parentId: that.infoList.parentId,
|
||||||
typeId: that.infoList.typeId,
|
typeId: that.infoList.typeId,
|
||||||
taskId: that.infoList.taskId,
|
taskId: that.infoList.taskId,
|
||||||
carCode: that.carCode,
|
// carCode: that.carCode,
|
||||||
outNum: that.multiNum,
|
outNum: that.multiNum,
|
||||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
||||||
}
|
}
|
||||||
|
|
@ -259,7 +269,8 @@
|
||||||
} */
|
} */
|
||||||
// const res = await that.$api.fetchMaterialOutStore.fetchSingleDetail(params)
|
// const res = await that.$api.fetchMaterialOutStore.fetchSingleDetail(params)
|
||||||
that.$api.fetchMaterialOutStore.fetchSingleDetail({
|
that.$api.fetchMaterialOutStore.fetchSingleDetail({
|
||||||
id: that.id
|
id: that.id,
|
||||||
|
souceBy: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
that.fetchList = []
|
that.fetchList = []
|
||||||
|
|
@ -269,7 +280,7 @@
|
||||||
that.fetchList.push(res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails[k])
|
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);
|
console.log('获取详情 ===========================',that.fetchList);
|
||||||
// that.fetchList[1].manageType = 1
|
// that.fetchList[1].manageType = 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,236 +63,245 @@
|
||||||
|
|
||||||
<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,
|
||||||
accountFormData: {
|
accountFormData: {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
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
|
|
||||||
},
|
},
|
||||||
sendVeriCode () {
|
veriFormData: {
|
||||||
let that = this
|
phone: '',
|
||||||
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
|
code: ''
|
||||||
if (!phoneReg.test(that.veriFormData.phone)) {
|
},
|
||||||
uni.showToast({
|
switchStatus: 1,
|
||||||
icon: 'none',
|
countDown: 60,
|
||||||
title: '请输入正确格式的手机号!'
|
countDownStatus: 0,
|
||||||
})
|
sendDisabled: false,
|
||||||
} else {
|
givenCode: '',
|
||||||
that.$api.login.codeLogin({
|
accountRules: {
|
||||||
phone: String(that.veriFormData.phone)
|
username: {
|
||||||
}).then(res => {
|
rules: [
|
||||||
console.log(res);
|
{
|
||||||
}).catch(err => {
|
required: true,
|
||||||
console.log(err);
|
errorMessage: '请输入用户名称!'
|
||||||
})
|
}
|
||||||
that.countDownStatus = 1
|
]
|
||||||
that.sendDisabled = true
|
},
|
||||||
let timeInterval = setInterval(() => {
|
password: {
|
||||||
that.countDown -= 1
|
rules: [
|
||||||
}, 1000)
|
{
|
||||||
let timeOut = setTimeout(() => {
|
required: true,
|
||||||
that.countDownStatus = 0
|
errorMessage: '请输入密码!'
|
||||||
that.countDown = 60
|
}
|
||||||
that.sendDisabled = false
|
]
|
||||||
clearInterval(timeInterval)
|
|
||||||
clearTimeout(timeOut)
|
|
||||||
}, 1000 * 60)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
veriSubmit () {
|
veriRules: {
|
||||||
let that = this
|
phone: {
|
||||||
that.$refs.veriForm.validate().then(formRes => {
|
rules: [
|
||||||
that.showLoading = true
|
{
|
||||||
console.log(formRes);
|
required: true,
|
||||||
that.$api.login.checkCode(formRes).then(res => {
|
errorMessage: '请输入手机号码!'
|
||||||
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
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
]
|
||||||
console.log(err);
|
},
|
||||||
})
|
code: {
|
||||||
})
|
rules: [
|
||||||
},
|
{
|
||||||
accountSubmit () {
|
required: true,
|
||||||
let that = this
|
errorMessage: '请输入验证码!'
|
||||||
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);
|
}
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
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>
|
</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{
|
|
||||||
width: 100%;
|
.upper-bgd {
|
||||||
height: 25vh;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
height: 25vh;
|
||||||
padding-top: 10vh;
|
box-sizing: border-box;
|
||||||
.logo{
|
padding-top: 10vh;
|
||||||
width: 20%;
|
|
||||||
height: 10vh;
|
.logo {
|
||||||
margin: 0 auto;
|
width: 20%;
|
||||||
margin-bottom: 2vh;
|
height: 10vh;
|
||||||
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;
|
margin: 0 auto;
|
||||||
background-color: #fff;
|
margin-bottom: 2vh;
|
||||||
border-radius: 20rpx;
|
|
||||||
box-shadow: 0 3px 5px #E6EEFE;
|
image {
|
||||||
.uni-forms-item__content[data-v-61dfc0d0]{
|
width: 100%;
|
||||||
display: flex;
|
height: 100%;
|
||||||
}
|
|
||||||
.submit-btn{
|
|
||||||
background-color: #3888FF;
|
|
||||||
margin: 10vh auto;
|
|
||||||
margin-bottom: 0;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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>
|
</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({
|
/* uni.showModal({
|
||||||
title: '新购明细审核',
|
title: '新购明细审核',
|
||||||
content: '是否确定审核通过?',
|
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 () {
|
toggleBind () {
|
||||||
let that = this
|
let that = this
|
||||||
that.showLoading = true
|
|
||||||
console.log(that.qrcode);
|
console.log(that.qrcode);
|
||||||
that.$refs.qrForm.validate().then(formData => {
|
that.$refs.qrForm.validate().then(formData => {
|
||||||
|
that.showLoading = true
|
||||||
console.log(formData);
|
console.log(formData);
|
||||||
that.$api.qrcodeBinding.bindQrcode({
|
that.$api.qrcodeBinding.bindQrcode({
|
||||||
typeId: formData.specVal,
|
typeId: formData.specVal,
|
||||||
|
|
@ -145,42 +145,43 @@
|
||||||
let that = this
|
let that = this
|
||||||
const { code } = params
|
const { code } = params
|
||||||
console.log(code);
|
console.log(code);
|
||||||
that.qrcode = code
|
that.qrcode = code
|
||||||
// 根据扫出的编码查询设备
|
// 根据扫出的编码查询设备
|
||||||
/* that.$api.fetchMaterialOutStore.fetchInfoByQrCode({
|
/* that.$api.fetchMaterialOutStore.fetchInfoByQrCode({
|
||||||
qrCode: code
|
qrCode: code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('fetchInfoByQrCode =================================',res);
|
console.log('fetchInfoByQrCode =================================',res);
|
||||||
// if (res.data.code == 200) that.deviceStats = res.data.rows[0]
|
// if (res.data.code == 200) that.deviceStats = res.data.rows[0]
|
||||||
if (res.data.rows.length == 0) {
|
if (res.data.rows.length == 0) {
|
||||||
that.showBindBtn = false
|
that.showBindBtn = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '未查询到设备数据!'
|
title: '未查询到设备数据!'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
that.showBindBtn = true
|
that.showBindBtn = true
|
||||||
that.deviceStats = res.data.rows[0]
|
that.deviceStats = res.data.rows[0]
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}) */
|
}) */
|
||||||
// 获取机具设备类型
|
// 获取机具设备类型
|
||||||
that.$api.qrcodeBinding.fetchDeviceType({
|
that.$api.qrcodeBinding.fetchDeviceType({
|
||||||
level: '3'
|
level: '3'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
that.typeRange = res.data.data.map(item => {
|
that.typeRange = res.data.data.map(item => {
|
||||||
return {
|
return {
|
||||||
text: item['typeName'],
|
text: item['typeName'],
|
||||||
value: item['typeId']
|
value: item['typeId']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
if (this.infoList[0].typeId != this.typeId) {
|
if (this.infoList[0].typeId != this.typeId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '编码与机具类型不匹配!'
|
title: '机具类型不匹配!'
|
||||||
})
|
})
|
||||||
} else if (that.num == 0) {
|
} else if (that.num == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
if (this.infoList[0].typeId != this.typeId) {
|
if (this.infoList[0].typeId != this.typeId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '编码与机具类型不匹配!'
|
title: '机具类型不匹配!'
|
||||||
})
|
})
|
||||||
} else if (this.infoList[0].sdId != '16') {
|
} else if (this.infoList[0].sdId != '16') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -120,9 +120,28 @@
|
||||||
console.log(this.iptVal);
|
console.log(this.iptVal);
|
||||||
},
|
},
|
||||||
jumpUrl (path) {
|
jumpUrl (path) {
|
||||||
uni.navigateTo({
|
if (path == 'qrcodeBinding') {
|
||||||
url: `/pages/${path}/${path}`
|
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 () {
|
toast () {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue