新单子领料出库
This commit is contained in:
parent
529bfcc28f
commit
44df35a4de
|
|
@ -156,18 +156,23 @@ const toggleForm = () => {
|
|||
|
||||
// 页面加载完毕
|
||||
onLoad((options) => {
|
||||
console.log(queryParams.value)
|
||||
queryParams.value = JSON.parse(options.queryParams)
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
console.log(queryParams.value)
|
||||
getCodeDetailData(queryParams.value.id)//获取详情
|
||||
getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
})
|
||||
// 获取编码列表
|
||||
const getCodeDetailData = async (id) => {
|
||||
const res = await getCodeDetailAPI({id:id})
|
||||
const getCodeDetailData = async (id,publishTask,typeId) => {
|
||||
console.log("yyyyyyyyyy",id,publishTask,typeId)
|
||||
const res = await getCodeDetailAPI({id:id,publishTask:publishTask,typeId:typeId})
|
||||
console.log("zzzzzzzzz",res)
|
||||
formData.value=res.data;
|
||||
maxNum.value=formData.value.preNum-formData.value.alNum;
|
||||
console.log("xxxxxxxxxxxxxx",formData.value,maxNum.value)
|
||||
maxNum.value=formData.value.preNum-formData.value.alNum
|
||||
|
||||
queryCodeParams.value.typeId = queryParams.value.typeId;
|
||||
queryCodeParams.value.pageNum = 1;
|
||||
codeDeviceList.value = [];
|
||||
|
|
@ -236,7 +241,7 @@ const onHandleOutbound = async () => {
|
|||
return
|
||||
}
|
||||
// 解构所需要的数据
|
||||
const { typeId, parentId } = queryParams.value
|
||||
const { typeId, parentId,publishTask } = queryParams.value
|
||||
// 组装出库参数
|
||||
const paramsList = []
|
||||
codeDeviceList.value.map((e) => {
|
||||
|
|
@ -249,17 +254,19 @@ const onHandleOutbound = async () => {
|
|||
outNum: 1,
|
||||
parentId,
|
||||
typeId,
|
||||
publishTask,
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
console.log()
|
||||
console.log("mmmmmmmmmmmmmmmm",paramsList)
|
||||
const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '出库成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
getCodeDetailData(queryParams.value.id)//获取详情
|
||||
getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -369,7 +376,7 @@ const boxOutBound = async () => {
|
|||
title: '出库成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
getCodeDetailData(queryParams.value.id)//获取详情
|
||||
getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -484,7 +491,7 @@ const confirmCodeOutBound = async () => {
|
|||
title: '出库成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
getCodeDetailData(queryParams.value.id)//获取详情
|
||||
getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
setTimeout(() => {
|
||||
scanStart()
|
||||
}, 800)
|
||||
|
|
|
|||
|
|
@ -119,12 +119,18 @@ const leaseApplyInfo = ref({
|
|||
id: '', // 出库时所需参数 取详情接口 id
|
||||
typeId: '', // 出库时所需参数 取详情接口 typeId
|
||||
manageType: '', // 出库时所需参数 取详情接口 manageType
|
||||
publishTask: null, // 出库时所需参数 取详情接口 publishTask
|
||||
publishTask: '', // 出库时所需参数 取详情接口 publishTask
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
leaseApplyInfo.value.parentId = options.id
|
||||
leaseApplyInfo.value.publishTask = options.publishTask
|
||||
if(options.publishTask == "null"){
|
||||
leaseApplyInfo.value.publishTask = ""
|
||||
console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
|
||||
}else{
|
||||
leaseApplyInfo.value.publishTask = options.publishTask
|
||||
}
|
||||
// leaseApplyInfo.value.publishTask = options.publishTask
|
||||
console.log('🚀 ~ onLoad ~ options:', options)
|
||||
getOutboundDetailsData()
|
||||
})
|
||||
|
|
@ -133,24 +139,35 @@ onShow(() => {
|
|||
})
|
||||
// 获取列表详情
|
||||
const getOutboundDetailsData = async () => {
|
||||
console.log('Full leaseApplyInfo:', leaseApplyInfo.value);
|
||||
console.log('parentId:', leaseApplyInfo.value.parentId);
|
||||
console.log('keyWord:', keyWord.value);
|
||||
console.log('publishTask:', leaseApplyInfo.value.publishTask);
|
||||
let { data: res } = {};
|
||||
if (leaseApplyInfo.value.publishTask) {
|
||||
console.log('publishTask type:', typeof leaseApplyInfo.value.publishTask);
|
||||
|
||||
let res;
|
||||
if (leaseApplyInfo.value.publishTask === null || leaseApplyInfo.value.publishTask == "") {
|
||||
console.log("Condition: publishTask is null or empty string");
|
||||
// 如果 publishTask 为空,则只传递两个参数
|
||||
console.log("yyyyyyyyyyyyyyyyyyyy");
|
||||
const { data } = await getOutboundDetailsAPI(
|
||||
leaseApplyInfo.value.parentId,
|
||||
keyWord.value
|
||||
);
|
||||
res = data;
|
||||
console.log('🚀 ~ getOutboundDetailsData ~ res:', res);
|
||||
} else {
|
||||
console.log("Condition: publishTask is not null and not empty string");
|
||||
// 如果 publishTask 不为空,则传递三个参数
|
||||
res = await getOutboundDetailsAPITwo(
|
||||
const { data } = await getOutboundDetailsAPITwo(
|
||||
leaseApplyInfo.value.parentId,
|
||||
keyWord.value,
|
||||
leaseApplyInfo.value.publishTask
|
||||
);
|
||||
} else {
|
||||
// 如果 publishTask 为空,则只传递两个参数
|
||||
res = await getOutboundDetailsAPI(
|
||||
leaseApplyInfo.value.parentId,
|
||||
keyWord.value
|
||||
);
|
||||
res = data;
|
||||
console.log("xxxxxxxxxxx", res);
|
||||
}
|
||||
|
||||
detailsList.value = res.leaseApplyDetailsList;
|
||||
leaseApplyInfo.value.taskId = res.leaseApplyInfo.taskId;
|
||||
leaseApplyInfo.value.typeId = res.leaseApplyInfo.typeId;
|
||||
|
|
@ -303,13 +320,16 @@ const options2 = ref([
|
|||
|
||||
// 点击滑动按钮
|
||||
const onClick = (e, item) => {
|
||||
console.log("tttttttttt",e,item)
|
||||
if(taskStatus.value==3){//出库进行中
|
||||
console.log("333333333333333333333333333")
|
||||
if (e.index === 0) {
|
||||
if (item.status == 2) {//已完成
|
||||
console.log("x22222222222222222222",32)
|
||||
console.log(302)//退回
|
||||
leaseOutBack(item)
|
||||
}else{
|
||||
console.log(30)
|
||||
console.log("rrrrrrrrrrrrr",30)
|
||||
onCodingItem(item)//出库
|
||||
}
|
||||
}
|
||||
|
|
@ -339,6 +359,7 @@ const onClick = (e, item) => {
|
|||
}
|
||||
// 点击跳转出库页面
|
||||
const onCodingItem = (item) => {
|
||||
console.log("uuuuuuuuuuuuuuu",item)
|
||||
// 解构所需要的数据
|
||||
const {
|
||||
status,
|
||||
|
|
@ -389,6 +410,7 @@ const checkViewDetail = (item) => {
|
|||
id,
|
||||
typeId,
|
||||
unitValue,
|
||||
publishTask,
|
||||
} = item
|
||||
leaseApplyInfo.value.maTypeName = maTypeName
|
||||
leaseApplyInfo.value.typeName = typeName
|
||||
|
|
@ -399,7 +421,8 @@ const checkViewDetail = (item) => {
|
|||
leaseApplyInfo.value.id = id
|
||||
leaseApplyInfo.value.typeId = typeId
|
||||
leaseApplyInfo.value.manageType = manageType
|
||||
leaseApplyInfo.value.unitValue = unitValue
|
||||
leaseApplyInfo.value.unitValue = unitValue
|
||||
leaseApplyInfo.value.publishTask = publishTask
|
||||
console.log(leaseApplyInfo.value)
|
||||
let codingUrl = '/pages/picking/outbound/inner-detail'
|
||||
// 把 leaseApplyInfo 领料信息转成 json 传递到下个页面
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const queryParams = ref({
|
|||
startTime: '', // 开始时间
|
||||
endTime: '', // 结束时间
|
||||
keyWord: '', // 关键字
|
||||
statusList: [3,4,5], // 状态
|
||||
statusList: [3], // 状态
|
||||
pageNum: 1,
|
||||
pageSize: 3,
|
||||
})
|
||||
|
|
@ -181,7 +181,8 @@ const getTableList = async (isTap = false) => {
|
|||
if (res.data.rows.length == 0) {
|
||||
tableList.value = []
|
||||
} else {
|
||||
tableList.value.push(...res.data.rows)
|
||||
tableList.value = res.data.rows
|
||||
// tableList.value.push(...res.data.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ onShow(() => {
|
|||
console.log(queryParams.value)
|
||||
queryCodeParams.value.taskId = queryParams.value.taskId;
|
||||
queryCodeParams.value.typeId = queryParams.value.typeId;
|
||||
queryCodeParams.value.publishTask = queryParams.value.publishTask;
|
||||
queryCodeParams.value.pageNum = 1;
|
||||
codeDeviceList.value = [];
|
||||
getCodeDeviceListData()//获取编码列表
|
||||
|
|
@ -120,6 +121,7 @@ onShow(() => {
|
|||
// 获取编码列表
|
||||
const getCodeDeviceListData = async () => {
|
||||
const res = await getDetailsByIdApi(queryCodeParams.value)
|
||||
console.log("xxxxxxxxxxxxxx",res)
|
||||
if(queryParams.value.manageType==0){
|
||||
codeDeviceList.value.push(...res.data.rows)
|
||||
if (isBack.value&&codeDeviceList.value.length > 0) {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ const maxNum = computed(() => {
|
|||
|
||||
onLoad((options) => {
|
||||
queryParams.value = JSON.parse(options.queryParams)
|
||||
console.log("xxxxxxxxxxxxxx", queryParams.value)
|
||||
})
|
||||
|
||||
// 数量选择框change事件
|
||||
|
|
@ -114,8 +115,9 @@ const onHandleOutbound = async () => {
|
|||
inputNum: outboundNum.value,
|
||||
leaseType: 0,
|
||||
outNum: preNum,
|
||||
publishTask:queryParams.value.publishTask,
|
||||
}
|
||||
|
||||
console.log('出库参数', params)
|
||||
const res = await setOutboundNumAPI({ leaseOutDetailsList: [params] })
|
||||
console.log('出库结果', res)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue