增加单据完结
This commit is contained in:
parent
72acd4affa
commit
645667125d
|
|
@ -253,3 +253,11 @@ export function endBack(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 单据完结
|
||||||
|
export function endBackOver(data) {
|
||||||
|
return request({
|
||||||
|
url: 'base/backReceive/endBackOver',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -78,6 +78,9 @@
|
||||||
<el-button type="primary" size="mini" @click="completeBack"
|
<el-button type="primary" size="mini" @click="completeBack"
|
||||||
>完成退料</el-button
|
>完成退料</el-button
|
||||||
>
|
>
|
||||||
|
<el-button type="primary" size="mini" @click="invoicesEnd"
|
||||||
|
>单据完结</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -244,7 +247,7 @@
|
||||||
v-if="
|
v-if="
|
||||||
!isView &&
|
!isView &&
|
||||||
scope.row.manageType == '0' &&
|
scope.row.manageType == '0' &&
|
||||||
scope.row.num > 0
|
scope.row.backStatus == 0
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
编码退料
|
编码退料
|
||||||
|
|
@ -257,7 +260,7 @@
|
||||||
!isView &&
|
!isView &&
|
||||||
(scope.row.manageType == '1' ||
|
(scope.row.manageType == '1' ||
|
||||||
scope.row.manageType == '2') &&
|
scope.row.manageType == '2') &&
|
||||||
scope.row.num > 0
|
scope.row.backStatus == 0
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
数量退料
|
数量退料
|
||||||
|
|
@ -740,6 +743,7 @@ import {
|
||||||
endBack,
|
endBack,
|
||||||
revoke,
|
revoke,
|
||||||
endBackBeforeQueryApi,
|
endBackBeforeQueryApi,
|
||||||
|
endBackOver,
|
||||||
} from '@/api/claimAndRefund/return'
|
} from '@/api/claimAndRefund/return'
|
||||||
import { getTypeList } from '@/api/store/warehousing'
|
import { getTypeList } from '@/api/store/warehousing'
|
||||||
import { equipmentTypeTree } from '@/api/store/tools'
|
import { equipmentTypeTree } from '@/api/store/tools'
|
||||||
|
|
@ -959,7 +963,7 @@ export default {
|
||||||
this.$tab.closeOpenPage({ path: '/claimAndRefund/returnIn' })
|
this.$tab.closeOpenPage({ path: '/claimAndRefund/returnIn' })
|
||||||
},
|
},
|
||||||
//完成退料接收
|
//完成退料接收
|
||||||
async completeBack() {
|
completeBack() {
|
||||||
// let param1 = {
|
// let param1 = {
|
||||||
// parentId: this.queryParams.id,
|
// parentId: this.queryParams.id,
|
||||||
// }
|
// }
|
||||||
|
|
@ -969,41 +973,74 @@ export default {
|
||||||
this.$message.error('请勾选需要退料的数据!')
|
this.$message.error('请勾选需要退料的数据!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 二次确认
|
||||||
|
this.$confirm('是否确定要完成退料?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
let typeId = ''
|
||||||
|
let badId = ''
|
||||||
|
this.selChangeList.map((e) => {
|
||||||
|
typeId += e.modelId + ','
|
||||||
|
})
|
||||||
|
this.selChangeList.map((e) => {
|
||||||
|
badId += e.badId + ','
|
||||||
|
})
|
||||||
|
|
||||||
let typeId = ''
|
// if (true) return
|
||||||
let badId = ''
|
const { data: res } = await endBackBeforeQueryApi({
|
||||||
this.selChangeList.map((e) => {
|
typeId,
|
||||||
typeId += e.modelId + ','
|
id: this.queryParams.id,
|
||||||
})
|
})
|
||||||
this.selChangeList.map((e) => {
|
|
||||||
badId += e.badId + ','
|
|
||||||
})
|
|
||||||
|
|
||||||
// if (true) return
|
if (res == 0) {
|
||||||
const { data: res } = await endBackBeforeQueryApi({
|
this.$message.error(
|
||||||
typeId,
|
'当前存在未退料机具,请处理之后再点击完成退料!',
|
||||||
id: this.queryParams.id,
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let param = {
|
||||||
|
createBy: this.createBy,
|
||||||
|
parentId: this.queryParams.id,
|
||||||
|
taskId: this.queryParams.taskId,
|
||||||
|
typeId,
|
||||||
|
badId,
|
||||||
|
}
|
||||||
|
endBack(param).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// this.back()
|
||||||
|
// this.$emit('goBackPage')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
if (res == 0) {
|
// 单据完结
|
||||||
this.$message.error(
|
invoicesEnd() {
|
||||||
'当前存在未退料机具,请处理之后再点击完成退料!',
|
if (this.selChangeList.length < 1) {
|
||||||
)
|
this.$message.error('请勾选需要退料的数据!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let param = {
|
// 二次确认
|
||||||
createBy: this.createBy,
|
this.$confirm('是否确定要单据完结?', '提示', {
|
||||||
parentId: this.queryParams.id,
|
confirmButtonText: '确定',
|
||||||
taskId: this.queryParams.taskId,
|
cancelButtonText: '取消',
|
||||||
typeId,
|
type: 'warning'
|
||||||
badId,
|
}).then(async () => {
|
||||||
}
|
const params = this.selChangeList.map(item => {
|
||||||
endBack(param).then((response) => {
|
return {
|
||||||
if (response.code == 200) {
|
id: item.id,
|
||||||
this.$modal.msgSuccess('操作成功')
|
typeId: item.typeId,
|
||||||
// this.back()
|
}
|
||||||
// this.$emit('goBackPage')
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await endBackOver(params)
|
||||||
this.getList()
|
this.getList()
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ invoicesEnd ~ error:', error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -1132,23 +1169,30 @@ export default {
|
||||||
//
|
//
|
||||||
handleBackup(row) {
|
handleBackup(row) {
|
||||||
// console.log(row)
|
// console.log(row)
|
||||||
let param = {
|
// 二次确认
|
||||||
parentId: row.id,
|
this.$confirm('是否确定要撤回?', '提示', {
|
||||||
typeId: row.modelId,
|
confirmButtonText: '确定',
|
||||||
manageType: row.manageType,
|
cancelButtonText: '取消',
|
||||||
createBy: this.createBy,
|
type: 'warning'
|
||||||
}
|
}).then(() => {
|
||||||
if (row.maTypeDetails && row.maTypeDetails.length > 0) {
|
let param = {
|
||||||
param.typeIds = row.maTypeDetails.map((item) => {
|
parentId: row.id,
|
||||||
return item.modelId
|
typeId: row.modelId,
|
||||||
})
|
manageType: row.manageType,
|
||||||
}
|
createBy: this.createBy,
|
||||||
console.log(param)
|
|
||||||
revoke(param).then((response) => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess('操作成功')
|
|
||||||
this.handleQuery()
|
|
||||||
}
|
}
|
||||||
|
if (row.maTypeDetails && row.maTypeDetails.length > 0) {
|
||||||
|
param.typeIds = row.maTypeDetails.map((item) => {
|
||||||
|
return item.modelId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(param)
|
||||||
|
revoke(param).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
this.handleQuery()
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//编码退料查询
|
//编码退料查询
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue