siontion 4 months ago
commit 3b71224a9c

@ -297,7 +297,7 @@
link
type="danger"
size="small"
@click.prevent="handleDelete2(scope.$index, scope.row.id)"
@click.prevent="handleDelete2(scope.$index)"
v-bind:disabled="activetype == 'review' || activetype == 'Check'"
>
删除
@ -447,7 +447,7 @@
link
type="danger"
size="small"
@click.prevent="handleDelete2(scope.$index, scope.row.id)"
@click.prevent="handleDelete2(scope.$index)"
v-bind:disabled="activetype == 'review' || activetype == 'Check'"
>
删除
@ -976,16 +976,16 @@ const saveFormData = async (active, status, type) => {
//
// setTimeout(async () => {
// console.log('------');
formData.value.active === 'SUBMIT'
data.outbound = useUserStore().getUser.id
const nowStr = formatDate(new Date(), 'YYYY-MM-DD HH:mm')
const now = new Date(nowStr).getTime()
data.outboundTime = now
await StorageApi.updateStorage(data)
commonStore.setStore('active', 'review')
// reload()
// console.log('------');
formData.value.active === 'SUBMIT'
data.outbound = useUserStore().getUser.id
const nowStr = formatDate(new Date(), 'YYYY-MM-DD HH:mm')
const now = new Date(nowStr).getTime()
data.outboundTime = now
await StorageApi.updateStorage(data)
commonStore.setStore('active', 'review')
// reload()
// }, 500)
// commonStore.setStore('id', formData.value.id)
@ -997,6 +997,7 @@ const saveFormData = async (active, status, type) => {
reload()
} else {
await StorageApi.updateStorage(data)
// reload()
}
var repeatItem = []
formData.value.matItemDOList.forEach((item) => {
@ -1015,7 +1016,7 @@ const saveFormData = async (active, status, type) => {
}
if (active !== 'INVALID') {
// console.log('-------');
formData.value.matItemDOList.forEach((item) => {
item.stockId = formData.value.id
item.whId = formData.value.whId
@ -1063,11 +1064,10 @@ const saveFormDataSUBMIT = (active, status) => {
}, 1000)
}
//
const handleDelete2 = async (index: number, id: number) => {
// console.log(id, index)
await StorageMatApi.deleteStorageMat(id)
// deleteStorageMat
formData.value.matItemDOList.splice(index, 1)
const handleDelete2 = async (index: number) => {
let deletedItems = formData.value.matItemDOList.splice(index, 1)
let id = deletedItems[0].id
if (id) await StorageMatApi.deleteStorageMat(id)
}
//

Loading…
Cancel
Save