Compare commits
No commits in common. "78bb5006abd6796b29fc25b84aa1acd2ce68cccc" and "070df2478b2fadf0e6171aa447d867ce25c8ad04" have entirely different histories.
78bb5006ab
...
070df2478b
@ -69,15 +69,15 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-footer">
|
<view class="order-footer">
|
||||||
<template v-if="!queryParams.isBack && typeof queryParams.isBack === 'boolean'">
|
<template v-if="!queryParams.isBack && isShow">
|
||||||
<view @click="inOutWareHouse(item,true)" class="order-btn yes">通知领料</view>
|
<view @click="inOutWareHouse(item,true)" class="order-btn yes">通知领料</view>
|
||||||
<!-- <view class="order-btn yes">采购</view>-->
|
<!-- <view class="order-btn yes">采购</view>-->
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!queryParams.isBack && typeof queryParams.isBack === 'undefined'">
|
<template v-else-if="!queryParams.isBack && !isShow">
|
||||||
<view @click="inOutWareHouse(item,true)" class="order-btn yes">查看申请</view>
|
<view @click="inOutWareHouse(item,true)" class="order-btn yes">查看申请</view>
|
||||||
<!-- <view class="order-btn yes">采购</view>-->
|
<!-- <view class="order-btn yes">采购</view>-->
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="queryParams.isBack">
|
<template v-else-if="queryParams.isBack && isShow">
|
||||||
<view @click="inOutWareHouse(item,false)" class="order-btn yes">通知退料</view>
|
<view @click="inOutWareHouse(item,false)" class="order-btn yes">通知退料</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
@ -160,8 +160,6 @@ export default {
|
|||||||
noReadNum: 0,
|
noReadNum: 0,
|
||||||
//通知公告数量
|
//通知公告数量
|
||||||
noticeNum: 0,
|
noticeNum: 0,
|
||||||
//是否首次打开页面
|
|
||||||
ifFirstLogin: true,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -205,33 +203,19 @@ export default {
|
|||||||
*/
|
*/
|
||||||
activeTab(index) {
|
activeTab(index) {
|
||||||
this.active = index
|
this.active = index
|
||||||
if (index === 0) {
|
if (index == 1) {
|
||||||
this.queryParams.isBack = false
|
|
||||||
this.queryParams.isToBeReviewed = undefined
|
|
||||||
this.isShow = true
|
|
||||||
} else if (index === 1) {
|
|
||||||
this.queryParams.isBack = true
|
this.queryParams.isBack = true
|
||||||
this.queryParams.isToBeReviewed = undefined
|
this.queryParams.isToBeReviewed = undefined
|
||||||
this.isShow = true
|
this.isShow = true
|
||||||
} else if (index === 2) {
|
} else if (index == 2) {
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
this.queryParams.isToBeReviewed = true
|
this.queryParams.isToBeReviewed = true
|
||||||
this.queryParams.isBack = undefined
|
this.queryParams.isBack = undefined
|
||||||
|
} else {
|
||||||
|
this.isShow = true
|
||||||
|
this.queryParams.isBack = undefined
|
||||||
|
this.queryParams.isToBeReviewed = undefined
|
||||||
}
|
}
|
||||||
// this.active = index
|
|
||||||
// if (index == 1) {
|
|
||||||
// this.queryParams.isBack = false
|
|
||||||
// this.queryParams.isToBeReviewed = undefined
|
|
||||||
// this.isShow = true
|
|
||||||
// } else if (index == 2) {
|
|
||||||
// this.isShow = true
|
|
||||||
// this.queryParams.isToBeReviewed = true
|
|
||||||
// this.queryParams.isBack = undefined
|
|
||||||
// } else {
|
|
||||||
// this.isShow = true
|
|
||||||
// this.queryParams.isBack = undefined
|
|
||||||
// this.queryParams.isToBeReviewed = undefined
|
|
||||||
// }
|
|
||||||
this.onRefresherrefresh()
|
this.onRefresherrefresh()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -393,11 +377,6 @@ export default {
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.noReadNum = res.data > 99 ? 99 : res.data
|
this.noReadNum = res.data > 99 ? 99 : res.data
|
||||||
}
|
}
|
||||||
if (this.ifFirstLogin && this.noReadNum > 0) {
|
|
||||||
console.log("播放")
|
|
||||||
this.$refs.tarBar.dianyidain()
|
|
||||||
this.ifFirstLogin = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -94,12 +94,10 @@ export default {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: params
|
params: params
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
this.wares = res.data
|
res.data.map((item)=>{
|
||||||
if (this.isToBeReviewed){
|
if(!item.waresAlreadyCount){
|
||||||
this.wares = this.wares.filter(item => item.waresStatus === '1')
|
item.waresAlreadyCount = 0
|
||||||
this.wares = this.wares.filter(item => this.isReceive ? (item.waresCount > item.waresAlreadyCount) : (item.waresAlreadyCount > 0))
|
|
||||||
}
|
}
|
||||||
this.wares.forEach(item => {
|
|
||||||
if(!item.wares.stock){
|
if(!item.wares.stock){
|
||||||
item.wares.stock=0
|
item.wares.stock=0
|
||||||
}
|
}
|
||||||
@ -116,27 +114,7 @@ export default {
|
|||||||
item.thisNum = 0
|
item.thisNum = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// res.data.map((item)=>{
|
this.wares = res.data;
|
||||||
// if(!item.waresAlreadyCount){
|
|
||||||
// item.waresAlreadyCount = 0
|
|
||||||
// }
|
|
||||||
// if(!item.wares.stock){
|
|
||||||
// item.wares.stock=0
|
|
||||||
// }
|
|
||||||
// if(this.isReceive){
|
|
||||||
// //领料,最大可领取数量为申请数量-已领取数量,同时不能大于库存数量,默认数量就是最大可领取数量
|
|
||||||
// item.maxNum = parseInt(item.waresCount) - parseInt(item.waresAlreadyCount)
|
|
||||||
// if(item.maxNum >item.wares.stock){
|
|
||||||
// item.maxNum = item.wares.stock
|
|
||||||
// }
|
|
||||||
// item.thisNum = item.maxNum
|
|
||||||
// }else{
|
|
||||||
// //退料,最大数量为已领取数量,最小数量为0,默认数量为0
|
|
||||||
// item.maxNum = item.waresAlreadyCount
|
|
||||||
// item.thisNum = 0
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// this.wares = res.data;
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -151,16 +129,13 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$set(repair, 'thisNum', repair.thisNum + 1)
|
this.$set(repair, 'thisNum', repair.thisNum + 1)
|
||||||
const findIndex = this.wares.findIndex(f => f.id === repair.id);
|
const find = this.wares.find(f => f.id == repair.id)
|
||||||
if (findIndex !== -1) {
|
if (find) {
|
||||||
this.$set(this.wares, findIndex, repair);
|
find.thisNum = repair.thisNum
|
||||||
|
} else {
|
||||||
|
this.wares.push(JSON.parse(JSON.stringify(repair)))
|
||||||
}
|
}
|
||||||
// const find = this.wares.find(f => f.id == repair.id)
|
console.log('repair', repair)
|
||||||
// if (find) {
|
|
||||||
// find.thisNum = repair.thisNum
|
|
||||||
// } else {
|
|
||||||
// this.wares.push(JSON.parse(JSON.stringify(repair)))
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 减
|
* 减
|
||||||
@ -171,16 +146,12 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$set(repair, 'thisNum', repair.thisNum - 1)
|
this.$set(repair, 'thisNum', repair.thisNum - 1)
|
||||||
const findIndex = this.wares.findIndex(f => f.id === repair.id);
|
const find = this.wares.find(f => f.id == repair.id)
|
||||||
if (findIndex !== -1) {
|
if (find) {
|
||||||
this.$set(this.wares, findIndex, repair);
|
find.thisNum = repair.thisNum
|
||||||
|
} else {
|
||||||
|
this.wares.push(JSON.parse(JSON.stringify(repair)))
|
||||||
}
|
}
|
||||||
// const find = this.wares.find(f => f.id == repair.id)
|
|
||||||
// if (find) {
|
|
||||||
// find.thisNum = repair.thisNum
|
|
||||||
// } else {
|
|
||||||
// this.wares.push(JSON.parse(JSON.stringify(repair)))
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 出库
|
* 出库
|
||||||
@ -193,16 +164,6 @@ export default {
|
|||||||
userName:this.formData.repairName,
|
userName:this.formData.repairName,
|
||||||
soStatus:this.isReceive?'04':'07'
|
soStatus:this.isReceive?'04':'07'
|
||||||
}
|
}
|
||||||
// 过滤一下,thisNum不等0才行
|
|
||||||
const flag = this.wares.filter(item => item.thisNum > 0)
|
|
||||||
if (!flag || flag.length === 0){
|
|
||||||
uni.showToast({
|
|
||||||
title: '请设置配件数量!',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.wares = flag
|
|
||||||
this.formData.repairSois = [...this.wares.map(item =>{
|
this.formData.repairSois = [...this.wares.map(item =>{
|
||||||
return {
|
return {
|
||||||
soiType: this.isReceive ? '02' : "04",
|
soiType: this.isReceive ? '02' : "04",
|
||||||
@ -322,11 +283,9 @@ export default {
|
|||||||
.listItem {
|
.listItem {
|
||||||
padding: 30rpx 0;
|
padding: 30rpx 0;
|
||||||
border-bottom: 2rpx solid #DDDDDD;
|
border-bottom: 2rpx solid #DDDDDD;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repairName {
|
.repairName {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user