Compare commits
No commits in common. "956f7c618d768b7bbad32afbc17931a72dee0fe1" and "ea1837d6ce8059f4dabae8dea98d8ea3ef35fe67" have entirely different histories.
956f7c618d
...
ea1837d6ce
|
|
@ -236,7 +236,6 @@ 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.code
|
// this.codeVal = params.transCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</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.modalList.directAuditRemark)
|
that.rejectExam(that.modalList.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
closePopup () {
|
closePopup () {
|
||||||
|
|
@ -257,12 +257,11 @@ import { basePath } from '../../public'
|
||||||
closePopup1 () {
|
closePopup1 () {
|
||||||
this.$refs.popup1.close()
|
this.$refs.popup1.close()
|
||||||
},
|
},
|
||||||
seeExam (id, directAuditRemark) {
|
seeExam (id) {
|
||||||
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) {
|
||||||
|
|
@ -289,7 +288,7 @@ import { basePath } from '../../public'
|
||||||
console.log(err);
|
console.log(err);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
rejectExam (id) {
|
rejectExam () {
|
||||||
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,28 +170,18 @@
|
||||||
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);
|
||||||
const fixedCode = res.result.split('=')[1]
|
|
||||||
console.log(fixedCode);
|
|
||||||
if (!fixedCode) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: '未识别到设备!'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/scanOutStore/scanOutStore?code=${fixedCode}&typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`
|
url: `/pages/scanOutStore/scanOutStore?code=${res.result}&typeId=${this.infoList.typeId}&num=${this.infoList.preNum}&parentId=${this.infoList.parenntId}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
/* 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()
|
||||||
|
|
@ -228,7 +218,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
|
||||||
}
|
}
|
||||||
|
|
@ -269,8 +259,7 @@
|
||||||
} */
|
} */
|
||||||
// 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 = []
|
||||||
|
|
@ -280,7 +269,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
|
that.fetchList = res.data.data.rows
|
||||||
console.log('获取详情 ===========================',that.fetchList);
|
console.log('获取详情 ===========================',that.fetchList);
|
||||||
// that.fetchList[1].manageType = 1
|
// that.fetchList[1].manageType = 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,44 +9,46 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="switch-log">
|
<view class="switch-log">
|
||||||
<view :class="[{ active: switchStatus == 1 }]" @click="switchUpper(1)">
|
<view
|
||||||
|
:class="[{ active: switchStatus == 1 }]"
|
||||||
|
@click="switchUpper(1)"
|
||||||
|
>
|
||||||
账号登录
|
账号登录
|
||||||
</view>
|
</view>
|
||||||
<view :class="[{ active: switchStatus == 2 }]" @click="switchUpper(2)">
|
<view
|
||||||
|
: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"
|
<uni-forms v-show="switchStatus == 1" ref="accountForm" :modelValue="accountFormData" :rules="accountRules" class="form-area" label-position="top">
|
||||||
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"
|
<uni-easyinput placeholder="请输入用户名称" maxlength="60" v-model="accountFormData.username"></uni-easyinput>
|
||||||
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"
|
<uni-easyinput type="password" placeholder="请输入密码" maxlength="60" v-model="accountFormData.password"></uni-easyinput>
|
||||||
v-model="accountFormData.password"></uni-easyinput>
|
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<text style="
|
<text
|
||||||
|
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"
|
<uni-forms v-show="switchStatus == 2" ref="veriForm" :modelValue="veriFormData" :rules="veriRules" class="form-area" label-position="top">
|
||||||
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"
|
<uni-easyinput placeholder="请输入手机号码" type="number" v-model="veriFormData.phone" maxlength="11"></uni-easyinput>
|
||||||
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="请输入验证码"
|
<uni-easyinput type="number" maxlength="6" placeholder="请输入验证码" v-model="veriFormData.code"></uni-easyinput>
|
||||||
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">
|
||||||
|
|
@ -63,7 +65,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,
|
||||||
|
|
@ -119,10 +121,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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)) {
|
||||||
|
|
@ -152,7 +154,7 @@ export default {
|
||||||
}, 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
|
||||||
|
|
@ -160,8 +162,8 @@ export default {
|
||||||
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.login_user)
|
uni.setStorageSync('userInfo', res.data.data)
|
||||||
uni.setStorageSync('token', res.data.data.access_token)
|
uni.setStorageSync('token', res.data.data.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({
|
||||||
|
|
@ -188,7 +190,7 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
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
|
||||||
|
|
@ -225,35 +227,31 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</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;
|
||||||
|
|
@ -261,9 +259,8 @@ body {
|
||||||
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;
|
||||||
|
|
@ -272,17 +269,15 @@ body {
|
||||||
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;
|
||||||
|
|
@ -290,12 +285,10 @@ body {
|
||||||
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;
|
||||||
|
|
@ -303,5 +296,5 @@ body {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,21 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* 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: '是否确定审核通过?',
|
||||||
|
|
|
||||||
|
|
@ -1,337 +0,0 @@
|
||||||
<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,
|
||||||
|
|
@ -181,7 +181,6 @@
|
||||||
}).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,28 +120,9 @@
|
||||||
console.log(this.iptVal);
|
console.log(this.iptVal);
|
||||||
},
|
},
|
||||||
jumpUrl (path) {
|
jumpUrl (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({
|
uni.navigateTo({
|
||||||
url: `/pages/${path}/${path}`
|
url: `/pages/${path}/${path}`
|
||||||
})
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toast () {
|
toast () {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue