6.21宁夏预报废审核新增多选-领料申请限制-领料出库完成出库

This commit is contained in:
FrancisHu 2024-06-21 17:41:49 +08:00
parent 9a1b28cce5
commit 300e785e15
9 changed files with 402 additions and 99 deletions

View File

@ -328,7 +328,14 @@ const fetchMaterialOutStore = {
HttpConfig.serviceUrl.fetchMaterialOutStore.searchRfid,
data
)
}
},
async directOutStore(data = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.directOutStore,
data
)
},
}
const exitMaterial = {
@ -827,6 +834,14 @@ const preCrashList = {
header
)
},
async fetchDeptTree(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.preCrashList.fetchDeptTree,
data,
header
)
},
}
const url = HttpConfig.systemPath

View File

@ -10,7 +10,7 @@ class HttpConfig {
// baseUrl = "http://10.40.92.8:8080"
// baseUrl = "http://10.40.92.52:28080"
// baseUrl = "http://10.40.92.78:28080"
baseUrl = "http://10.40.92.60:38080"
baseUrl = "http://10.40.92.48:38080"
// baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://10.40.92.141:28080"
// #endif
@ -72,6 +72,7 @@ class HttpConfig {
subOutStoreArr: '/leaseOutDetails/submitOutRfid', // 领料出库提交-数组
fetchSingleDetail: '/tm_task/getLeaseAuditListDetail', // 根据领料id查询领料申请详情
searchRfid: '/backReceive/rfidCodeQuery', // 查询rfid
directOutStore: '/tm_task/outboundCompleted', // 直接完成出库
},
exitMaterial: {
exitDeptList: '/back_apply/getbackUnit', // 获取退料单位,工程列表
@ -167,6 +168,7 @@ class HttpConfig {
},
preCrashList: {
fetchPreSubList: '/scrap/getScrapTaskListApp', // 获取预报废提交列表
fetchDeptTree: '/user/deptTree', // 获取部门树状结构
}
}
}

View File

@ -73,12 +73,12 @@
查看
</view>
<view
v-show="fetch.taskStatus == '33' || fetch.taskStatus == '34'"
style="background-color: #FCA30D;"
v-show="fetch.taskStatus != '33'"
@click="seeExam(fetch)"
@click="directlyOut(fetch)"
>
<uni-icons style="color: #fff;" type="auth" size="36"></uni-icons>
审核
<uni-icons style="color: #fff;" type="auth"></uni-icons>
完成出库
</view>
</view> -->
<view class="sticky-area">
@ -266,6 +266,9 @@ import { basePath } from '../../public'
},
searchKeyword () {
this.initFetch(this.keywordVal)
},
directlyOut (list) {
console.log(list);
}
},
onShow() {

View File

@ -18,6 +18,22 @@
<span>待出库数量</span>
<h4>{{ fetch.outNum }}</h4>
</view>
<!-- <view style="
width: 25%;
border-radius: 15rpx;
background-color: #3788FF;
color: #fff;
font-size: 14px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 15rpx 25rpx;
"
@click.stop="finishOut(fetch)"
>
完成出库
</view> -->
</view>
<uni-popup
ref="popup1"
@ -53,7 +69,7 @@
>
<view class="popup2">
<view class="pop-top">
<h4>量出库</h4>
<h4>量出库</h4>
<uni-icons
style="color: #AAAAAA; font-weight: bold;"
type="closeempty"
@ -97,9 +113,16 @@
</view>
<view
class="sub-btn"
style="margin-bottom: 15rpx;"
@click="multiOut"
>
批量出库
数量出库
</view>
<view
class="sub-btn"
@click="finishOut"
>
完成出库
</view>
</view>
</uni-popup>
@ -208,7 +231,7 @@
},
multiOut () {
let that = this
let posiIntReg = /^\+?[1-9]\d*$/
let posiIntReg = /^\+?[0-9]\d*$/
if (!posiIntReg.test(that.multiNum)) {
uni.showToast({
icon: 'none',
@ -292,6 +315,33 @@
multiNumChange(val){
console.log('multiNumChange ===============',val);
},
finishOut () {
let that = this
uni.showModal({
title: '完成出库',
content: '确定将此种机具完成出库吗?',
confirmText: '出库',
success: (res) => {
if (res.confirm) {
console.log(that.infoList);
that.$api.fetchMaterialOutStore.directOutStore({
id: that.infoList.parentId,
typeId: that.infoList.typeId
}).then(res => {
console.log(res);
if (res.data.code == 200) {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
}
}
})
}
},
onLoad(params) {

View File

@ -305,12 +305,13 @@ import { basePath } from '../../public';
status: '0',
// createTime: that.formatDate(new Date().getTime()),
typeId: item['typeId'],
preNum: item['bookNum']
preNum: item['bookNum'],
manageType: item['manageType']
}
})
let setArr = []
that.totalGoods.forEach(list => {
setArr.push(list.typeId)
setArr.push(list.manageType)
})
console.log(setArr);
let set = new Set(setArr)

View File

@ -163,15 +163,15 @@
})
},
seePreDetail (taskId) {
uni.setStorageSync('preTaskId', taskId)
// uni.setStorageSync('preTaskId', taskId)
uni.navigateTo({
url: `/pages/preCrashExamDetail/preCrashExamDetail`
url: `/pages/preCrashExamDetail/preCrashExamDetail?taskId=${taskId}`
})
},
examPreDetail (taskId) {
uni.setStorageSync('preTaskId', taskId)
// uni.setStorageSync('preTaskId', taskId)
uni.navigateTo({
url: `/pages/preCrashExamDetail/preCrashExamDetail?showBtn=0`
url: `/pages/preCrashExamDetail/preCrashExamDetail?showBtn=0&taskId=${taskId}`
})
}
},

View File

@ -5,70 +5,105 @@
v-for="(list, index) in preDetailList"
:key="list.id"
>
<view>
<h4>设备类型</h4>
<h5>{{ list.machineTypeName }}</h5>
<view>
<checkbox-group
v-show="list.status == '0' && showBtn == '0'"
style="margin-right: 15rpx;"
@change="checkClick(list)"
>
<checkbox :checked="list.checked" />
</checkbox-group>
</view>
<view class="info-cont">
<view>
<h4>设备类型</h4>
<h5>{{ list.machineTypeName }}</h5>
</view>
<view>
<h4>规格型号</h4>
<h5>{{ list.specificationType }}</h5>
</view>
<view>
<h4>设备编码</h4>
<h5>{{ list.maCode == null ? '-' : list.maCode }}</h5>
</view>
<view>
<h4>报废数量</h4>
<h5>{{ list.scrapNum }}</h5>
</view>
<view>
<h4>损坏原因</h4>
<h5>{{ list.scrapType == '0' ? '自然' : '人为' }}</h5>
</view>
<view>
<h4>报废图片</h4>
<h5>
<image
v-for="(img, index) in list.fileUrl"
:key="index"
:src="imgPrefix + img[index]"
mode=""
></image>
</h5>
</view>
<!-- <h3 v-show="list.status == '0' && showBtn == '0'">
<text
@click="togglePass(list)"
>
通过
</text>
<text
style="background-color: #fff; color: #000; border: 1px solid #EBEBEB;"
@click="toggleRefuse(list)"
>
驳回
</text>
</h3> -->
<h6 class="sticky-area">
<h4
v-show="list.status == '0'"
style="background-color: #FFF6E7; color: #FCAA23;"
>
待审核
</h4>
<h4
v-show="list.status == '1'"
style="background-color: #E9FBE7; color: #3CD92E;"
>
已通过
</h4>
<h4
v-show="list.status == '2'"
style="background-color: #FFECEC; color: #FF4C4C;"
>
驳回
</h4>
</h6>
</view>
<view>
<h4>规格型号</h4>
<h5>{{ list.specificationType }}</h5>
</view>
<view class="btm-sticky" v-show="showBtn == '0'">
<view class="checked">
<checkbox-group @tap="checkAll" style="margin-right: 15rpx;">
<checkbox :checked="allChecked" />
</checkbox-group>
<text>全选</text>
</view>
<view>
<h4>设备编码</h4>
<h5>{{ list.maCode == null ? '-' : list.maCode }}</h5>
</view>
<view>
<h4>报废数量</h4>
<h5>{{ list.scrapNum }}</h5>
</view>
<view>
<h4>损坏原因</h4>
<h5>{{ list.scrapType == '0' ? '自然' : '人为' }}</h5>
</view>
<view>
<h4>报废图片</h4>
<h5>
<image
v-for="(img, index) in list.fileUrl"
:key="index"
:src="imgPrefix + img[index]"
mode=""
></image>
</h5>
</view>
<h3 v-show="list.status == '0' && showBtn == '0'">
<text
@click="togglePass(list)"
<view style="display: flex;">
<view
class="exam"
@click="clickPass"
style="margin-right: 15rpx;"
>
通过
</text>
<text
</view>
<view
class="exam"
style="background-color: #fff; color: #000; border: 1px solid #EBEBEB;"
@click="toggleRefuse(list)"
@click="clickReject"
>
驳回
</text>
</h3>
<h6 class="sticky-area">
<h4
v-show="list.status == '0'"
style="background-color: #FFF6E7; color: #FCAA23;"
>
待审核
</h4>
<h4
v-show="list.status == '1'"
style="background-color: #E9FBE7; color: #3CD92E;"
>
已通过
</h4>
<h4
v-show="list.status == '2'"
style="background-color: #FFECEC; color: #FF4C4C;"
>
驳回
</h4>
</h6>
</view>
</view>
</view>
<uni-popup
ref="popup1"
@ -98,12 +133,14 @@
export default {
data() {
return {
allChecked: false,
taskId: '',
preDetailList: [],
imgPrefix: '',
rejectReason: '',
refuseList: '',
showBtn: ''
showBtn: '',
rejectList: []
}
},
methods: {
@ -118,6 +155,7 @@
if (item.fileUrl != null) {
item.fileUrl = item.fileUrl.split(',')
}
item.checked = false
})
that.preDetailList = res.data.data
console.log(that.preDetailList);
@ -136,9 +174,7 @@
icon: 'none',
title: res.data.msg,
success: () => {
uni.redirectTo({
url: '/pages/preCrashExamDetail/preCrashExamDetail'
})
uni.navigateBack()
}
})
} else {
@ -185,7 +221,7 @@
},
confirmReject () {
let that = this
let arr = []
/* let arr = []
arr.push({
auditBy: uni.getStorageSync('userInfo').userid,
id: this.refuseList.id,
@ -198,15 +234,120 @@
}
console.log(subObj);
that.submitExam(subObj)
that.closePopup1()
that.closePopup1() */
if (that.rejectReason == '') {
uni.showToast({
icon: 'none',
title: '请填写驳回原因!'
})
} else {
that.rejectList.forEach(item => {
item.auditRemark = that.rejectReason
})
let subObj = {
scrapDetailList: that.rejectList,
taskId: that.taskId
}
console.log(subObj);
that.submitExam(subObj)
that.closePopup1()
}
},
checkClick(item) {
item.checked = !item.checked
if (!item.checked) {
this.allChecked = false
} else {
const goods = this.preDetailList.every(item => {
return item.checked === true
})
if (goods) {
this.allChecked = true
} else {
this.allChecked = false
}
}
},
checkAll() {
this.allChecked = !this.allChecked
if (this.allChecked) {
this.preDetailList.map(item => {
if (item.checked == false) {
item.checked = true
}
})
} else {
this.preDetailList.map(item => {
if (item.checked == true) {
item.checked = false
}
})
}
},
clickPass () {
let that = this
let subList = that.preDetailList.filter(item => {
return item.checked == true
}).map(subItem => {
return {
auditBy: uni.getStorageSync('userInfo').userid,
id: subItem['id'],
status: '1'
}
})
if (subList.length == 0) {
uni.showToast({
icon: 'none',
title: '未选中审核项!'
})
} else {
let subObj = {
scrapDetailList: subList,
taskId: this.taskId
}
uni.showModal({
title: '通过审核',
content: '是否通过审核?',
confirmText: '通过',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
console.log(subObj);
that.submitExam(subObj)
}
}
})
}
},
clickReject () {
let that = this
let subList = that.preDetailList.filter(item => {
return item.checked == true
}).map(subItem => {
return {
auditBy: uni.getStorageSync('userInfo').userid,
id: subItem['id'],
status: '2'
}
})
if (subList.length == 0) {
uni.showToast({
icon: 'none',
title: '未选中审核项!'
})
} else {
that.rejectList = subList
that.$refs.popup1.open()
}
}
},
onLoad(params) {
this.showBtn = params.showBtn
this.taskId = params.taskId
},
onShow() {
this.imgPrefix = this.$api.url
this.fetchPreDetail(uni.getStorageSync('preTaskId'))
this.fetchPreDetail(this.taskId)
}
}
</script>
@ -214,6 +355,8 @@
<style lang="scss">
body{
background-color: #FAFDFF;
box-sizing: border-box;
padding-bottom: 10vh;
}
.single-pre{
width: 100%;
@ -221,28 +364,34 @@
padding: 30rpx;
background-color: #fff;
position: relative;
view{
display: flex;
align-items: center;
.info-cont{
width: 100%;
margin-bottom: 25rpx;
display: flex;
align-items: center;
h4{
font-weight: normal;
font-size: 30rpx;
color: #ADADAD;
padding-right: 20rpx;
}
h5{
font-weight: normal;
font-size: 30rpx;
image{
width: 20%;
height: 100rpx;
flex-direction: column;
view{
display: flex;
align-items: center;
margin-bottom: 25rpx;
h4{
font-weight: normal;
font-size: 30rpx;
color: #ADADAD;
padding-right: 20rpx;
}
h5{
font-weight: normal;
font-size: 30rpx;
image{
width: 20%;
height: 100rpx;
}
}
}
}
view:last-child{
margin-bottom: 0;
view:last-child{
margin-bottom: 0;
}
}
h3{
width: 100%;
@ -282,6 +431,30 @@
}
}
}
.btm-sticky{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 15rpx 30rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
.checked{
display: flex;
align-items: center;
}
.exam{
box-sizing: border-box;
padding: 10rpx 50rpx;
border-radius: 30rpx;
background-color: #3788FF;
font-size: 14px;
color: #fff;
}
}
.popup1{
width: 80vw;
height: 20vh;

View File

@ -56,6 +56,12 @@
<uni-icons style="color: #fff;" type="auth"></uni-icons>
审核
</view>
<view
style="background-color: #1BD30B;"
>
<uni-icons style="color: #fff;" type="paperplane"></uni-icons>
提交
</view>
</view>
<view class="sticky-area">
<!-- <image src="/static/passed.png" v-show="pre.taskStatus == 59" mode=""></image>

View File

@ -8,14 +8,67 @@
export default {
data() {
return {
taskId: '',
preDetailList: [],
deptList: []
}
},
methods: {
fetchPreDetail (taskId) {
let that = this
that.$api.preCrashExam.fetchPreCrashDetail({
taskId
}).then(res => {
console.log(res);
if (res.data.code == 200) {
res.data.data.forEach(item => {
if (item.fileUrl != null) {
item.fileUrl = item.fileUrl.split(',')
}
item.checked = false
})
that.preDetailList = res.data.data
console.log(that.preDetailList);
}
}).catch(err => {
console.log(err);
})
},
getDeptTree () {
let that = this
that.$api.preCrashList.fetchDeptTree().then(res => {
that.deptList = that.veri(res.data.data)
console.log(that.deptList);
}).catch(err => {
console.log(err);
})
},
veri (data) {
let that = this
if (!data || data.length <= 0) {
return null;
}
return data.map(x => {
const model = {
name: x.label,
id: x.id
}
const children = that.veri(x.children);
if (children) {
model.children = children;
}
return model;
});
}
},
onLoad(params) {
console.log(params);
this.taskId = params.taskId
this.fetchPreDetail(this.taskId)
this.getDeptTree()
}
}
</script>