修复 不能下单问题

This commit is contained in:
YuanFeng 2024-11-20 08:56:02 +08:00
parent 5984d5a9d7
commit 5b64e3b160
1 changed files with 29 additions and 29 deletions

View File

@ -634,35 +634,35 @@ const addNewBill = () => {
console.log("stepRef.value.getTableData()", stepRef.value.getTableData())
submitPreHandler().then(res=>{
console.log("formData",formData.value)
// if(formData.value.id){
// SaleOrderApi.editOrder(formData.value.id,{
// ...formData.value
// }).then(res => {
// that.pageLoading = ElLoading.service({
// lock: true,
// text: '...',
// background: 'rgba(0,0,0,0.5)'
// })
// setTimeout(()=>{
// that.pageLoading.close()
// push("/")
// },800)
// })
// }else {
// SaleOrderApi.placeOrder({
// ...formData.value
// }).then(res => {
// that.pageLoading = ElLoading.service({
// lock: true,
// text: '...',
// background: 'rgba(0,0,0,0.5)'
// })
// setTimeout(()=>{
// that.pageLoading.close()
// push("/")
// },800)
// })
// }
if(formData.value.id){
SaleOrderApi.editOrder(formData.value.id,{
...formData.value
}).then(res => {
that.pageLoading = ElLoading.service({
lock: true,
text: '修改成功...',
background: 'rgba(0,0,0,0.5)'
})
setTimeout(()=>{
that.pageLoading.close()
push("/")
},800)
})
}else {
SaleOrderApi.placeOrder({
...formData.value
}).then(res => {
that.pageLoading = ElLoading.service({
lock: true,
text: '下单成功...',
background: 'rgba(0,0,0,0.5)'
})
setTimeout(()=>{
that.pageLoading.close()
push("/")
},800)
})
}
});