出库修改
This commit is contained in:
parent
ceda98aa00
commit
40c26f83e4
|
|
@ -888,20 +888,20 @@ const pickUpCodeForm = reactive<any>({
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.orderStatus == '3'"
|
v-if="item.orderStatus == '2'"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="pickUpView(item)"
|
@click="pickUpView(item)"
|
||||||
>查看取件码</el-button
|
>查看取件码</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="item.orderStatus == '3'"
|
v-if="item.orderStatus == '3'"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="pickUpViewOut(index)"
|
@click="pickUpViewOut(index)"
|
||||||
>确认收货</el-button
|
>确认收货</el-button
|
||||||
>
|
> -->
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
@click="handleViewOrder(j, item)"
|
@click="handleViewOrder(j, item)"
|
||||||
|
|
|
||||||
|
|
@ -160,42 +160,53 @@ const onAcceptOrders = (item: any) => {
|
||||||
})
|
})
|
||||||
.then(async() => {
|
.then(async() => {
|
||||||
const passApiRes = await passApi({ orderId: item.orderId, orderStatus: 2 });
|
const passApiRes = await passApi({ orderId: item.orderId, orderStatus: 2 });
|
||||||
// 检查 passApi 是否成功
|
if (passApiRes && passApiRes.code === 200) {
|
||||||
if (passApiRes && passApiRes.code === 200) {
|
ElMessage({
|
||||||
// 如果 passApi 成功,调用 passApi(原代码中的 passApiTwo 可能是拼写错误)
|
|
||||||
const passApiTwoRes = await passApi({ orderId: item.orderId, orderStatus: 3 });
|
|
||||||
if (passApiTwoRes && passApiTwoRes.code === 200) {
|
|
||||||
ElMessage({
|
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '接单成功',
|
message: '接单成功',
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
numberTemp.value = numberTemp.value + 1;
|
numberTemp.value = numberTemp.value + 1;
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
}
|
// 检查 passApi 是否成功
|
||||||
|
// if (passApiRes && passApiRes.code === 200) {
|
||||||
|
// // 如果 passApi 成功,调用 passApi(原代码中的 passApiTwo 可能是拼写错误)
|
||||||
|
// const passApiTwoRes = await passApi({ orderId: item.orderId, orderStatus: 3 });
|
||||||
|
// if (passApiTwoRes && passApiTwoRes.code === 200) {
|
||||||
|
// ElMessage({
|
||||||
|
// type: 'success',
|
||||||
|
// message: '接单成功',
|
||||||
|
// duration: 1000,
|
||||||
|
// });
|
||||||
|
// numberTemp.value = numberTemp.value + 1;
|
||||||
|
// getList();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const indexPickUpCode = ref(0);
|
||||||
//出库弹窗参数
|
//出库弹窗参数
|
||||||
const dialogVisiblePickUpCodeOut = ref(false);
|
const dialogVisiblePickUpCodeOut = ref(false);
|
||||||
// 新增变量来存储取件码
|
// 新增变量来存储取件码
|
||||||
const pickUpCodeOut = ref('');
|
const pickUpCodeOut = ref('');
|
||||||
const pickUpViewOut = (index: Number) => {
|
const pickUpViewOut = (index: number) => {
|
||||||
|
indexPickUpCode.value = index;
|
||||||
pickUpCodeForm.pickUpCode = '';
|
pickUpCodeForm.pickUpCode = '';
|
||||||
dialogVisiblePickUpCodeOut.value = true;
|
dialogVisiblePickUpCodeOut.value = true;
|
||||||
};
|
};
|
||||||
const pickUpCodeFormRef = ref()
|
const pickUpCodeFormRef = ref()
|
||||||
//取件码表单校验规则
|
//取件码表单校验规则
|
||||||
const pickUpCodeRules = ref({
|
const pickUpCodeRules = ref({
|
||||||
pickUpCode: [
|
pickUpCode:[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入取件码',
|
message: '请输入取件码',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
const pickUpCodeForm = reactive<any>({
|
const pickUpCodeForm = reactive<any>({
|
||||||
|
|
@ -767,6 +778,35 @@ const pickUpView = async(item: any) => {
|
||||||
dialogVisiblePickUpCode.value = true;
|
dialogVisiblePickUpCode.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 确认收获按钮
|
||||||
|
const confirmReceipt = () => {
|
||||||
|
pickUpCodeFormRef.value.validate((valid:any) => {
|
||||||
|
if (valid) {
|
||||||
|
ElMessageBox.confirm('是否确定收货?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log('xxxxxxxxxxxxxxxx',indexPickUpCode.value,pickUpCodeForm.pickUpCode)
|
||||||
|
return passApi({ orderId: cardList.value[indexPickUpCode.value].orderId, orderStatus: 4,pickupCode:pickUpCodeForm.pickUpCode })
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '确定出库成功',
|
||||||
|
})
|
||||||
|
numberTemp.value = numberTemp.value + 1
|
||||||
|
dialogVisiblePickUpCodeOut.value = false
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -1154,13 +1194,19 @@ const pickUpView = async(item: any) => {
|
||||||
>接单</el-button
|
>接单</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.orderStatus == '3'"
|
v-if="item.orderStatus == '2'"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="pickUpView(item)"
|
@click="pickUpView(item)"
|
||||||
>查看取件码</el-button
|
>查看取件码</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="item.orderStatus == '2'"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="pickUpViewOut(index)"
|
||||||
|
>出库</el-button
|
||||||
|
>
|
||||||
|
|
||||||
<el-button @click="handleViewOrder(item)" type="primary" size="small">
|
<el-button @click="handleViewOrder(item)" type="primary" size="small">
|
||||||
订单详情
|
订单详情
|
||||||
|
|
@ -2113,7 +2159,10 @@ const pickUpView = async(item: any) => {
|
||||||
title="收货"
|
title="收货"
|
||||||
width="30%"
|
width="30%"
|
||||||
align-center
|
align-center
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
ref="pickUpCodeFormRef"
|
ref="pickUpCodeFormRef"
|
||||||
|
label-position="right"
|
||||||
:model="pickUpCodeForm"
|
:model="pickUpCodeForm"
|
||||||
:rules="pickUpCodeRules"
|
:rules="pickUpCodeRules"
|
||||||
>
|
>
|
||||||
|
|
@ -2129,16 +2178,19 @@ const pickUpView = async(item: any) => {
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="button-container">
|
||||||
<el-button type="primary" class="primary-lease" @click="dialogVisiblePickUpCodeOut=false">
|
<el-button type="primary" class="primary-lease" @click="dialogVisiblePickUpCodeOut=false">
|
||||||
关闭
|
关闭
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="primary-lease"
|
class="primary-lease"
|
||||||
@click="confirmPass"
|
@click="confirmReceipt"
|
||||||
>
|
>
|
||||||
收货
|
出库
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -2525,4 +2577,9 @@ const pickUpView = async(item: any) => {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
.button-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 20px; // 根据实际情况调整顶部间距
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue