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

View File

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

View File

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

View File

@ -9,6 +9,7 @@
<checkbox-group <checkbox-group
@change="checkClick(fetch)" @change="checkClick(fetch)"
style="margin-right: 15rpx;" style="margin-right: 15rpx;"
v-show="fetch.backStatus == '0' && Number(fetch.num) == 0"
> >
<checkbox :checked="fetch.checked" /> <checkbox :checked="fetch.checked" />
</checkbox-group> </checkbox-group>
@ -40,6 +41,12 @@
</checkbox-group> </checkbox-group>
<text>全选</text> <text>全选</text>
</view> </view>
<view
class="exam"
@click="totalBack"
>
完成退料
</view>
</view> </view>
<uni-popup ref="popup1" type="center" :mask-click="false"> <uni-popup ref="popup1" type="center" :mask-click="false">
<view class="popup1"> <view class="popup1">
@ -111,6 +118,9 @@
export default { export default {
data() { data() {
return { return {
pageNum: 1,
pageSize: 10,
pageTotal: 0,
allChecked: false, allChecked: false,
fetchList: [ fetchList: [
@ -326,17 +336,21 @@
let that = this let that = this
console.log(that.detailsId); console.log(that.detailsId);
that.$api.backMaterialReceive.backMaterialReceiveDetail({ that.$api.backMaterialReceive.backMaterialReceiveDetail({
id: that.detailsId id: that.detailsId,
taskId: that.taskId,
pageNum: that.pageNum,
pageSize: that.pageSize
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
res.data.data.forEach(item => { that.pageTotal = res.data.data.total
item.checked = false 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.forEach(item => {
res.data.data[i].num = res.data.data[i].num.split('.')[0] item.checked = false
} */ }) */
that.fetchList = res.data.data that.fetchList = [...that.fetchList, ...res.data.data.rows]
console.log(that.fetchList); console.log(that.fetchList);
} }
}).catch(err => { }).catch(err => {
@ -394,6 +408,61 @@
}, 0); }, 0);
console.log("numaccumulator", sum) console.log("numaccumulator", sum)
return 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) { onLoad(params) {
@ -403,6 +472,7 @@
this.taskStatus = params.taskStatus this.taskStatus = params.taskStatus
}, },
onShow() { onShow() {
this.fetchList = []
this.initListData() this.initListData()
}, },
onNavigationBarButtonTap(ev) { onNavigationBarButtonTap(ev) {
@ -426,6 +496,11 @@
title: '未选中完成退料项!' title: '未选中完成退料项!'
}) })
} }
},
onReachBottom() {
if (this.fetchList.length >= this.pageTotal) return;
this.pageNum++
this.initListData()
} }
} }
</script> </script>
@ -510,12 +585,20 @@
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
justify-content: left; justify-content: space-between;
align-items: center; align-items: center;
.checked{ .checked{
display: flex; display: flex;
align-items: center; align-items: center;
} }
.exam{
box-sizing: border-box;
padding: 10rpx 50rpx;
border-radius: 30rpx;
background-color: #3788FF;
font-size: 14px;
color: #fff;
}
} }
.popup1 { .popup1 {

View File

@ -329,6 +329,12 @@
}, },
finishOut () { finishOut () {
let that = this let that = this
if (that.infoList.outNum > 0) {
uni.showToast({
icon: 'none',
title: '该设备待出库数量不为0'
})
} else {
uni.showModal({ uni.showModal({
title: '完成出库', title: '完成出库',
content: '确定将此种机具完成出库吗?', content: '确定将此种机具完成出库吗?',
@ -365,6 +371,7 @@
} }
}) })
} }
}
}, },
onLoad(params) { onLoad(params) {
let that = this let that = this