5.6新增整套租赁功能
This commit is contained in:
parent
f0e753e323
commit
5210a1b496
14
apis/http.js
14
apis/http.js
|
|
@ -4,23 +4,23 @@ class HttpConfig {
|
|||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
// baseUrl = "http://112.29.103.165:21624"
|
||||
baseUrl = "http://192.168.0.14:21624"
|
||||
// baseUrl = "http://192.168.0.14:21624"
|
||||
// baseUrl = "http://112.29.103.165:21626"
|
||||
// baseUrl = "http://172.20.10.3:8080"
|
||||
// baseUrl = "http://10.40.92.8:8080"
|
||||
baseUrl = "http://10.40.92.8:8080"
|
||||
// baseUrl = "http://10.40.92.52:28080"
|
||||
// baseUrl = "http://10.40.92.81:8080"
|
||||
// baseUrl = "https://z.csgmall.com.cn/gl"
|
||||
// #endif
|
||||
// 基地址
|
||||
authPath = `${this.baseUrl}/dev-api/auth`
|
||||
/* authPath = `${this.baseUrl}/dev-api/auth`
|
||||
systemPath = `${this.baseUrl}/dev-api/system`
|
||||
basePath = `${this.baseUrl}/dev-api/base`
|
||||
materialPath = `${this.baseUrl}/dev-api/material`
|
||||
/* authPath = `${this.baseUrl}/auth`
|
||||
materialPath = `${this.baseUrl}/dev-api/material` */
|
||||
authPath = `${this.baseUrl}/auth`
|
||||
systemPath = `${this.baseUrl}/system`
|
||||
basePath = `${this.baseUrl}/base`
|
||||
materialPath = `${this.baseUrl}/material` */
|
||||
materialPath = `${this.baseUrl}/material`
|
||||
// 短链
|
||||
serviceUrl = {
|
||||
login: {
|
||||
|
|
@ -55,7 +55,7 @@ class HttpConfig {
|
|||
fetchExamListAll: '/tm_task/getLeaseAuditListAll', // 获取领料申请列表
|
||||
fetchTrueExamList: '/tm_task/getLeaseManageListAll', // 获取领料审批列表
|
||||
fetchTrueExamListCq: '/tm_task/getLeaseManageListAllCq', // 获取重庆领料审批列表
|
||||
fetchDetailList: '/tm_task/getLeaseListAll', // 获取领料明细列表
|
||||
fetchDetailList: '/tm_task/getLeaseListAllCq', // 获取领料明细列表
|
||||
subExam: '/tm_task/auditLeaseByCompany', // 通过领料审批
|
||||
subExamCq: '/tm_task/auditLeaseByCompanyCq', // 通过重庆领料审批
|
||||
rejectExam: '/tm_task/rejectLeaseByCompany', // 驳回领料审批
|
||||
|
|
|
|||
|
|
@ -451,6 +451,13 @@
|
|||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/numLoanReceive/numLoanReceive",
|
||||
"style": {
|
||||
"navigationBarTitleText": "数量接收"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#2c2c2c",
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ import { basePath } from '../../public'
|
|||
}
|
||||
},
|
||||
getList (keyWord) {
|
||||
console.log(keyWord);
|
||||
let that = this
|
||||
// 获取退料接收列表
|
||||
that.$api.backMaterialReceive.backMaterialReceiveList({
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@
|
|||
<span>待退料数量</span>
|
||||
<h4>{{ fetch.num }}</h4>
|
||||
</view>
|
||||
<text
|
||||
v-show="fetch.manageType == 2"
|
||||
class="see-item"
|
||||
@click.stop="openPopup3(fetch.maTypeDetails)"
|
||||
>
|
||||
查看配件
|
||||
</text>
|
||||
</view>
|
||||
<uni-popup ref="popup1" type="center" :mask-click="false">
|
||||
<view class="popup1">
|
||||
|
|
@ -76,6 +83,52 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<uni-popup
|
||||
ref="popup3"
|
||||
type="center"
|
||||
:mask-click="false"
|
||||
>
|
||||
<view class="popup3">
|
||||
<view class="pop-top">
|
||||
<h4>查看配件</h4>
|
||||
<uni-icons
|
||||
style="color: #AAAAAA; font-weight: bold;"
|
||||
type="closeempty"
|
||||
size="20"
|
||||
@click="closePopup3"
|
||||
>
|
||||
</uni-icons>
|
||||
</view>
|
||||
<view class="item-detail">
|
||||
<view
|
||||
class="single-item"
|
||||
v-for="(item, index) in maList"
|
||||
: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>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -87,6 +140,7 @@ export default {
|
|||
fetchList: [
|
||||
|
||||
],
|
||||
maList: [],
|
||||
codeVal: '',
|
||||
manageType: '',
|
||||
infoList: '',
|
||||
|
|
@ -136,11 +190,18 @@ export default {
|
|||
}
|
||||
if (this.infoList.manageType == '0') {
|
||||
this.$refs.popup1.open()
|
||||
} else if (this.infoList.manageType == '2') {
|
||||
const userInfo = uni.getStorageSync('userInfo');
|
||||
const { manageType, taskId } = this.infoList
|
||||
const userId = userInfo.userid
|
||||
const maList = encodeURIComponent(JSON.stringify(this.infoList.maTypeDetails))
|
||||
uni.navigateTo({
|
||||
url: `/pages/numLoanReceive/numLoanReceive?arr=${maList}&userId=${userId}&manageType=${manageType}&taskId=${taskId}`
|
||||
})
|
||||
} else {
|
||||
const userInfo = uni.getStorageSync('userInfo');
|
||||
console.log("userInfo", userInfo)
|
||||
const userId = userInfo.userid
|
||||
|
||||
const {
|
||||
taskId,
|
||||
id,
|
||||
|
|
@ -169,12 +230,19 @@ export default {
|
|||
})
|
||||
}
|
||||
},
|
||||
openPopup3 (list) {
|
||||
this.maList = list
|
||||
this.$refs.popup3.open()
|
||||
},
|
||||
closePopup1() {
|
||||
this.$refs.popup1.close()
|
||||
},
|
||||
closePopup2() {
|
||||
this.$refs.popup2.close()
|
||||
},
|
||||
closePopup3() {
|
||||
this.$refs.popup3.close()
|
||||
},
|
||||
scanCode() {
|
||||
const that = this
|
||||
that.closePopup1()
|
||||
|
|
@ -391,6 +459,19 @@ export default {
|
|||
view:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.see-item{
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #3788FF;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.btm-exam {
|
||||
|
|
@ -510,4 +591,53 @@ export default {
|
|||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.popup3{
|
||||
width: 80vw;
|
||||
height: 60vh;
|
||||
background-color: #fff;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.pop-top{
|
||||
width: 100%;
|
||||
height: 5vh;
|
||||
box-sizing: border-box;
|
||||
padding: 0 25rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.item-detail{
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
padding: 25rpx;
|
||||
.single-item{
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
box-sizing: border-box;
|
||||
padding: 25rpx 0;
|
||||
view{
|
||||
width: 100%;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
h4{
|
||||
width: 35%;
|
||||
color: #A7A7A7;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
view:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.single-item:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
if (res.data.rows.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入编码!'
|
||||
title: '请输入正确格式的编码!'
|
||||
})
|
||||
} else {
|
||||
that.infoList = res.data.rows
|
||||
|
|
|
|||
|
|
@ -17,23 +17,14 @@
|
|||
<span>申请数量</span>
|
||||
<h4>{{ fetch.num }}</h4>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<span>设备编号</span>
|
||||
<h4>{{ fetch.num }}</h4>
|
||||
</view>
|
||||
<view>
|
||||
<span>入库时间</span>
|
||||
<h4>{{ fetch.num }}</h4>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="btm-exam">
|
||||
<view
|
||||
class="exam"
|
||||
@click="seeExam"
|
||||
<text
|
||||
v-show="fetch.manageType == 2"
|
||||
class="see-item"
|
||||
@click="openPopup(fetch.maTypeDetails)"
|
||||
>
|
||||
审核
|
||||
</view>
|
||||
</view> -->
|
||||
查看配件
|
||||
</text>
|
||||
</view>
|
||||
<uni-popup
|
||||
ref="popup"
|
||||
type="center"
|
||||
|
|
@ -41,30 +32,42 @@
|
|||
>
|
||||
<view class="popup">
|
||||
<view class="pop-top">
|
||||
<h4>审批</h4>
|
||||
<h4>查看配件</h4>
|
||||
<uni-icons
|
||||
style="color: #AAAAAA; font-weight: bold;"
|
||||
type="closeempty"
|
||||
size="32"
|
||||
size="20"
|
||||
@click="closePopup"
|
||||
>
|
||||
</uni-icons>
|
||||
</view>
|
||||
<view class="select-area">
|
||||
<uni-forms ref="examForm" :modelValue="examFormData" :rules="rules" label-position="top">
|
||||
<uni-forms-item name="ifPass" required label="是否通过" label-width="150">
|
||||
<uni-data-select
|
||||
v-model="examFormData.ifPass"
|
||||
:localdata="ifPassRange"
|
||||
:clear="false"
|
||||
@change="ifPassChange"
|
||||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item required v-show="examFormData.ifPass == '1'" name="noPassReason" label="不通过原因" label-width="150">
|
||||
<uni-easyinput type="textarea" v-model="examFormData.noPassReason" placeholder="请输入内容"></uni-easyinput>
|
||||
</uni-forms-item>
|
||||
<button class="submit-btn" @click="formSubmit">确认</button>
|
||||
</uni-forms>
|
||||
<view class="item-detail">
|
||||
<view
|
||||
class="single-item"
|
||||
v-for="(item, index) in maList"
|
||||
: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>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
|
@ -78,6 +81,7 @@
|
|||
fetchList: [
|
||||
|
||||
],
|
||||
maList: [],
|
||||
examFormData: {
|
||||
ifPass: '',
|
||||
noPassReason: ''
|
||||
|
|
@ -99,7 +103,8 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
seeExam () {
|
||||
openPopup (list) {
|
||||
this.maList = list
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
closePopup () {
|
||||
|
|
@ -165,7 +170,7 @@
|
|||
console.log(that.fetchList);
|
||||
}
|
||||
}).catch(err => {
|
||||
throw err
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -197,6 +202,19 @@
|
|||
view:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.see-item{
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #3788FF;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.btm-exam{
|
||||
position: fixed;
|
||||
|
|
@ -224,6 +242,9 @@
|
|||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.pop-top{
|
||||
width: 100%;
|
||||
height: 5vh;
|
||||
|
|
@ -233,12 +254,33 @@
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.select-area{
|
||||
width: 85%;
|
||||
margin: 40rpx auto;
|
||||
.submit-btn{
|
||||
background-color: #409EFF;
|
||||
color: #fff;
|
||||
.item-detail{
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
padding: 25rpx;
|
||||
.single-item{
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
box-sizing: border-box;
|
||||
padding: 25rpx 0;
|
||||
view{
|
||||
width: 100%;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
h4{
|
||||
width: 35%;
|
||||
color: #A7A7A7;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
view:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.single-item:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,15 +17,61 @@
|
|||
<span>申请数量</span>
|
||||
<h4>{{ fetch.preNum }}</h4>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="btm-exam">
|
||||
<view
|
||||
class="exam"
|
||||
@click="exam"
|
||||
<!-- <button v-show="fetch.manageType == 2">sss</button> -->
|
||||
<text
|
||||
v-show="fetch.manageType == 2"
|
||||
class="see-item"
|
||||
@click="openPopup(fetch.maTypeDetails)"
|
||||
>
|
||||
审核
|
||||
查看配件
|
||||
</text>
|
||||
</view>
|
||||
<uni-popup
|
||||
ref="popup"
|
||||
type="center"
|
||||
:mask-click="false"
|
||||
>
|
||||
<view class="popup">
|
||||
<view class="pop-top">
|
||||
<h4>查看配件</h4>
|
||||
<uni-icons
|
||||
style="color: #AAAAAA; font-weight: bold;"
|
||||
type="closeempty"
|
||||
size="20"
|
||||
@click="closePopup"
|
||||
>
|
||||
</uni-icons>
|
||||
</view>
|
||||
<view class="item-detail">
|
||||
<view
|
||||
class="single-item"
|
||||
v-for="(item, index) in maList"
|
||||
: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>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -34,14 +80,17 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
fetchList: [
|
||||
|
||||
]
|
||||
fetchList: [],
|
||||
maList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exam () {
|
||||
console.log('审核');
|
||||
openPopup (list) {
|
||||
this.maList = list
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
closePopup () {
|
||||
this.$refs.popup.close()
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -91,6 +140,19 @@
|
|||
view:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.see-item{
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #3788FF;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.btm-exam{
|
||||
position: fixed;
|
||||
|
|
@ -111,4 +173,53 @@
|
|||
color: #fff;
|
||||
}
|
||||
}
|
||||
.popup{
|
||||
width: 80vw;
|
||||
height: 60vh;
|
||||
background-color: #fff;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.pop-top{
|
||||
width: 100%;
|
||||
height: 5vh;
|
||||
box-sizing: border-box;
|
||||
padding: 0 25rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.item-detail{
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
padding: 25rpx;
|
||||
.single-item{
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
box-sizing: border-box;
|
||||
padding: 25rpx 0;
|
||||
view{
|
||||
width: 100%;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
h4{
|
||||
width: 35%;
|
||||
color: #A7A7A7;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
view:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.single-item:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,339 @@
|
|||
<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: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
okChange (e, index) {
|
||||
console.log(e, index);
|
||||
let intReg = /^\+?[0-9]\d*$/
|
||||
if (!intReg.test(e)) {
|
||||
this.upperInfo[index].okNum = 1
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入0或正整数!'
|
||||
})
|
||||
}
|
||||
},
|
||||
reChange (e, index) {
|
||||
console.log(e, index);
|
||||
let intReg = /^\+?[0-9]\d*$/
|
||||
if (!intReg.test(e)) {
|
||||
this.upperInfo[index].reNum = 1
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入0或正整数!'
|
||||
})
|
||||
}
|
||||
},
|
||||
crashChange (e, index) {
|
||||
console.log(e, index);
|
||||
let intReg = /^\+?[0-9]\d*$/
|
||||
if (!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>
|
||||
|
|
@ -412,6 +412,13 @@ const router = createRouter({
|
|||
"meta": {
|
||||
"needAuth": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "/pages/numLoanReceive/numLoanReceive",
|
||||
"name": 'numLoanReceive',
|
||||
"meta": {
|
||||
"needAuth": "true"
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue