7.18宁夏新增完成退料

This commit is contained in:
FrancisHu 2024-07-18 10:30:47 +08:00
parent a999ac3192
commit dd420cfd53
5 changed files with 139 additions and 48 deletions

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://192.168.2.248:28080"
// baseUrl = "http://192.168.2.167:28080"
// baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://10.40.92.141:28080"
// #endif
@ -115,7 +115,7 @@ class HttpConfig {
},
backMaterialReceive: {
backMaterialReceiveList: '/backReceive/getbackReceiveList', // 获取退料接收列表
backMaterialReceiveDetail: '/backReceive/receiveView',
backMaterialReceiveDetail: '/backReceive/receiveViewWeb',
backMaterialSetNumBack: '/backReceive/setNumBack',
backMaterialQrcodeQuery:'/backReceive/qrcodeQuery',
backMaterialSetCodeBack:'/backReceive/setCodeBack',

View File

@ -286,8 +286,8 @@
}, {
"path": "pages/backMaterialReceiveDetail/backMaterialReceiveDetail",
"style": {
"navigationBarTitleText": "退料接收明细",
"app-plus": {
"navigationBarTitleText": "退料接收明细"
/* "app-plus": {
"titleNView": {
"buttons": [
{
@ -298,7 +298,7 @@
}
]
}
}
} */
}
}, {

View File

@ -277,7 +277,8 @@ import { basePath } from '../../public'
}
},
onShow() {
this.getList('')
this.fetchMaterialList = []
this.searchKeyword(this.exitIpt)
},
onReachBottom() {
if (this.fetchMaterialList.length >= this.pageTotal) return;

View File

@ -9,6 +9,7 @@
<checkbox-group
@change="checkClick(fetch)"
style="margin-right: 15rpx;"
v-show="fetch.backStatus == '0' && Number(fetch.num) == 0"
>
<checkbox :checked="fetch.checked" />
</checkbox-group>
@ -40,6 +41,12 @@
</checkbox-group>
<text>全选</text>
</view>
<view
class="exam"
@click="totalBack"
>
完成退料
</view>
</view>
<uni-popup ref="popup1" type="center" :mask-click="false">
<view class="popup1">
@ -111,6 +118,9 @@
export default {
data() {
return {
pageNum: 1,
pageSize: 10,
pageTotal: 0,
allChecked: false,
fetchList: [
@ -326,17 +336,21 @@
let that = this
console.log(that.detailsId);
that.$api.backMaterialReceive.backMaterialReceiveDetail({
id: that.detailsId
id: that.detailsId,
taskId: that.taskId,
pageNum: that.pageNum,
pageSize: that.pageSize
}).then(res => {
console.log(res);
if (res.data.code == 200) {
res.data.data.forEach(item => {
item.checked = false
that.pageTotal = res.data.data.total
res.data.data.rows.forEach(item => {
if (item.backStatus == '0') item.checked = false
})
/* for (let i = 0; i < res.data.data.length; i++) {
res.data.data[i].num = res.data.data[i].num.split('.')[0]
} */
that.fetchList = res.data.data
/* res.data.data.forEach(item => {
item.checked = false
}) */
that.fetchList = [...that.fetchList, ...res.data.data.rows]
console.log(that.fetchList);
}
}).catch(err => {
@ -394,6 +408,61 @@
}, 0);
console.log("numaccumulator", sum)
return sum
},
endBackMaFn (obj) {
let that = this
console.log(obj);
// 退
that.$api.backMaterialReceive.backReceiveEndBack(obj).then(res => {
console.log(res)
if (res.data.code == 200) {
uni.showToast({
icon: 'none',
title: res.data.msg
})
uni.navigateBack()
} else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err=>{
console.log(err);
})
},
totalBack () {
let that = this
let submitList = that.fetchList.filter(item => item.checked == true && Number(item.num) == 0)
if (submitList.length != 0) {
console.log(submitList);
let typeIdStr
let typeIdArr = []
submitList.forEach(item => {
typeIdArr.push(item.modelId)
})
typeIdStr = typeIdArr.join(',')
console.log(typeIdStr);
uni.showModal({
title: '完成退料',
content: '确认完成退料吗?',
success: (res) => {
if (res.confirm) {
that.endBackMaFn({
createBy: uni.getStorageSync('userInfo').userid,
parentId: submitList[0].id,
taskId: submitList[0].taskId,
typeId: typeIdStr
})
}
}
})
} else {
uni.showToast({
icon: 'none',
title: '未选中完成退料项!'
})
}
}
},
onLoad(params) {
@ -403,6 +472,7 @@
this.taskStatus = params.taskStatus
},
onShow() {
this.fetchList = []
this.initListData()
},
onNavigationBarButtonTap(ev) {
@ -426,6 +496,11 @@
title: '未选中完成退料项!'
})
}
},
onReachBottom() {
if (this.fetchList.length >= this.pageTotal) return;
this.pageNum++
this.initListData()
}
}
</script>
@ -510,12 +585,20 @@
padding: 15rpx 30rpx;
background-color: #fff;
display: flex;
justify-content: left;
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 {

View File

@ -329,41 +329,48 @@
},
finishOut () {
let that = this
uni.showModal({
title: '完成出库',
content: '确定将此种机具完成出库吗?',
confirmText: '出库',
success: (res) => {
if (res.confirm) {
that.showLoading = true
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) {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg,
success: () => {
uni.navigateBack()
}
})
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
if (that.infoList.outNum > 0) {
uni.showToast({
icon: 'none',
title: '该设备待出库数量不为0'
})
} else {
uni.showModal({
title: '完成出库',
content: '确定将此种机具完成出库吗?',
confirmText: '出库',
success: (res) => {
if (res.confirm) {
that.showLoading = true
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) {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg,
success: () => {
uni.navigateBack()
}
})
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
}
}
}
})
})
}
}
},
onLoad(params) {