退料接收
This commit is contained in:
parent
17c9fe9185
commit
d17634a4ca
|
|
@ -333,3 +333,22 @@ export function getLeaseOutDetailRecordApi(data) {
|
||||||
export const getHoldingPoleSelListApi = () => {
|
export const getHoldingPoleSelListApi = () => {
|
||||||
return request.get('/material/maWhole/selectWholeList')
|
return request.get('/material/maWhole/selectWholeList')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 退料接收编辑 获取详情数据
|
||||||
|
export function getTaskDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/base/backReceive/getDetailsReceiveList',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退料接收编辑 保存
|
||||||
|
export function submitUpdateBackApply(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/backApply/updateBackApply',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -190,17 +190,17 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="退料数量"
|
label="退料数量"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTime"
|
prop="num"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.num"
|
v-model="scope.row.num"
|
||||||
placeholder="请输入退料数量"
|
placeholder="请输入退料数量"
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
clearable
|
clearable
|
||||||
@input="checkNum(scope.row)"
|
@change="checkNum(scope.row)"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -273,6 +273,8 @@ import {
|
||||||
submitLeaseApply,
|
submitLeaseApply,
|
||||||
getUseTypeTreee,
|
getUseTypeTreee,
|
||||||
getUseNumByTypeId,
|
getUseNumByTypeId,
|
||||||
|
getTaskDetail,
|
||||||
|
submitUpdateBackApply,
|
||||||
} from '@/api/claimAndRefund/receive'
|
} from '@/api/claimAndRefund/receive'
|
||||||
import { submitBackApplyApi } from '@/api/claimAndRefund/return'
|
import { submitBackApplyApi } from '@/api/claimAndRefund/return'
|
||||||
import {
|
import {
|
||||||
|
|
@ -295,6 +297,9 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
rejectTaskId: {
|
||||||
|
type: [String, Number],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const validatePhone = (rule, value, callback) => {
|
const validatePhone = (rule, value, callback) => {
|
||||||
|
|
@ -372,6 +377,8 @@ export default {
|
||||||
taskType: 29,
|
taskType: 29,
|
||||||
taskStatus: 30,
|
taskStatus: 30,
|
||||||
backTime: '', //申请时间
|
backTime: '', //申请时间
|
||||||
|
backPerson: '', //退料人
|
||||||
|
remark: '', //备注
|
||||||
//退料人信息
|
//退料人信息
|
||||||
leaseApplyInfo: {
|
leaseApplyInfo: {
|
||||||
backPerson: '',
|
backPerson: '',
|
||||||
|
|
@ -493,6 +500,7 @@ export default {
|
||||||
// isEdit: 'true',
|
// isEdit: 'true',
|
||||||
rowId: '',
|
rowId: '',
|
||||||
propsKey: 2000,
|
propsKey: 2000,
|
||||||
|
taskId:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -506,17 +514,38 @@ export default {
|
||||||
// this.rowId = this.$route.query.Id
|
// this.rowId = this.$route.query.Id
|
||||||
// this.GetViewByApply(this.$route.query.Id)
|
// this.GetViewByApply(this.$route.query.Id)
|
||||||
// }
|
// }
|
||||||
if (this.rejectId) {
|
// if (this.rejectTaskId && this.isEdit) {
|
||||||
this.rowId = this.rejectId
|
// this.rowId = this.rejectTaskId
|
||||||
this.GetViewByApply({
|
// this.GetViewByApply({
|
||||||
id: this.rejectId,
|
// id: this.rejectId,
|
||||||
agreementId: this.agreementId,
|
// agreementId: this.agreementId,
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
getInfo().then((res) => {
|
getInfo().then((res) => {
|
||||||
this.companyId = res.user.companyId
|
this.companyId = res.user.companyId
|
||||||
this.createBy = res.user.userName
|
this.createBy = res.user.userName
|
||||||
})
|
})
|
||||||
|
this.taskId = this.rejectTaskId
|
||||||
|
this.rowId = this.rejectId
|
||||||
|
if(this.taskId && this.isEdit){
|
||||||
|
Promise.all([
|
||||||
|
this.GetTaskDetail(this.taskId),
|
||||||
|
// this.GetDeviceTypeTree(),
|
||||||
|
])
|
||||||
|
// .then(() => {
|
||||||
|
// let selectList = []
|
||||||
|
// this.leaseApplyDetails.forEach((e) => {
|
||||||
|
// selectList.push(
|
||||||
|
// this.getParentsById(this.deviceTypeTree, e.typeId),
|
||||||
|
// )
|
||||||
|
// })
|
||||||
|
// console.log( 'selectList', selectList)
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.deviceType = selectList
|
||||||
|
// this.propsKey++
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
|
|
@ -543,9 +572,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取 设备树结构数据
|
// 获取 设备树结构数据
|
||||||
async GetDeviceTypeTreeFn(agreementId) {
|
async GetDeviceTypeTreeFn(agreementId,id) {
|
||||||
const params = {
|
const params = {
|
||||||
agreementId: agreementId,
|
agreementId: agreementId,
|
||||||
|
id: id,
|
||||||
// this.agreementId
|
// this.agreementId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -604,8 +634,28 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//编辑获取信息
|
||||||
|
async GetTaskDetail(taskId) {
|
||||||
|
const res = await getTaskDetail({
|
||||||
|
taskId: taskId,
|
||||||
|
})
|
||||||
|
const data = res.data.backApplyInfo
|
||||||
|
// console.log(data)
|
||||||
|
// this.queryParams.taskId = data.taskId
|
||||||
|
this.queryParams.unitId = data.unitId
|
||||||
|
this.queryParams.proId = Number(data.projectId)
|
||||||
|
this.$set(this.queryParams, 'phone', data.phone)
|
||||||
|
this.queryParams.backPerson = data.backPerson
|
||||||
|
this.queryParams.backTime = data.backTime
|
||||||
|
this.queryParams.agreementCode = data.agreementCode
|
||||||
|
this.queryParams.agreementId = data.agreementId
|
||||||
|
this.queryParams.remark = data.remark
|
||||||
|
this.leaseApplyDetails = res.data.backApplyDetails
|
||||||
|
this.GetDeviceTypeTreeFn(data.agreementId,data.id)
|
||||||
|
},
|
||||||
|
|
||||||
// 获取 任务详情数据
|
// 获取 任务详情数据
|
||||||
async GetViewByApply(params) {
|
async GetViewByApply(taskId) {
|
||||||
const res = await materialReturnNoteByApply({
|
const res = await materialReturnNoteByApply({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
agreementId: params.agreementId,
|
agreementId: params.agreementId,
|
||||||
|
|
@ -782,13 +832,14 @@ export default {
|
||||||
this.queryParams.createBy = this.user.name
|
this.queryParams.createBy = this.user.name
|
||||||
this.queryParams.companyId = this.companyId
|
this.queryParams.companyId = this.companyId
|
||||||
this.queryParams.backApplyInfo = {
|
this.queryParams.backApplyInfo = {
|
||||||
|
id: this.rowId,
|
||||||
backPerson: this.queryParams.backPerson,
|
backPerson: this.queryParams.backPerson,
|
||||||
phone: this.queryParams.phone,
|
phone: this.queryParams.phone,
|
||||||
remark: this.queryParams.remark,
|
remark: this.queryParams.remark,
|
||||||
backTime: this.queryParams.backTime,
|
backTime: this.queryParams.backTime,
|
||||||
companyId: this.companyId,
|
companyId: this.companyId,
|
||||||
}
|
}
|
||||||
if (this.rowId != '') {
|
if (this.taskId != '') {
|
||||||
let params = {
|
let params = {
|
||||||
companyId: this.companyId,
|
companyId: this.companyId,
|
||||||
createBy: this.createBy,
|
createBy: this.createBy,
|
||||||
|
|
@ -798,7 +849,7 @@ export default {
|
||||||
backApplyDetails:
|
backApplyDetails:
|
||||||
this.queryParams.leaseApplyDetails,
|
this.queryParams.leaseApplyDetails,
|
||||||
}
|
}
|
||||||
const res = await submitRefuseBackApply(params)
|
const res = await submitUpdateBackApply(params)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message({ type: 'success', message: res.msg })
|
this.$message({ type: 'success', message: res.msg })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -905,11 +956,12 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
checkNum(row) {
|
checkNum(row) {
|
||||||
let maxNum = row.useNum
|
let maxNum = Number(row.useNum)
|
||||||
|
console.log('maxNum', maxNum)
|
||||||
if (row.num <= 1) {
|
if (row.num <= 1) {
|
||||||
row.num = 1
|
this.$set(row, 'num', 1);
|
||||||
} else if (row.num >= maxNum) {
|
} else if (row.num >= maxNum) {
|
||||||
row.num = maxNum
|
this.$set(row, 'num', maxNum);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -820,24 +820,57 @@ export default {
|
||||||
},
|
},
|
||||||
//完成退料接收
|
//完成退料接收
|
||||||
async completeBack() {
|
async completeBack() {
|
||||||
let param1 = {
|
// 显示确认操作弹窗
|
||||||
parentId: this.queryParams.id,
|
this.$confirm('该操作后进行退料的数据之后无法再次修改和删除,是否确认?', '提示', {
|
||||||
}
|
confirmButtonText: '确定',
|
||||||
const res1 = await getRecord(param1)
|
cancelButtonText: '取消',
|
||||||
if (res1.code == 200) {
|
type: 'warning'
|
||||||
let param = {
|
}).then(async () => {
|
||||||
createBy: this.createBy,
|
let param1 = {
|
||||||
parentId: this.queryParams.id,
|
parentId: this.queryParams.id,
|
||||||
taskId: this.queryParams.taskId,
|
|
||||||
}
|
}
|
||||||
endBack(param).then((response) => {
|
const res1 = await getRecord(param1)
|
||||||
if (response.code == 200) {
|
if (res1.code == 200) {
|
||||||
this.$modal.msgSuccess('操作成功')
|
let param = {
|
||||||
// this.back()
|
createBy: this.createBy,
|
||||||
this.$emit('goBackPage')
|
parentId: this.queryParams.id,
|
||||||
|
taskId: this.queryParams.taskId,
|
||||||
}
|
}
|
||||||
})
|
endBack(param).then((response) => {
|
||||||
}
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
// this.back()
|
||||||
|
this.$emit('goBackPage')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
// this.$message({
|
||||||
|
// type: 'info',
|
||||||
|
// message: '已取消操作'
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
|
||||||
|
// let param1 = {
|
||||||
|
// parentId: this.queryParams.id,
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// const res1 = await getRecord(param1)
|
||||||
|
// if (res1.code == 200) {
|
||||||
|
// let param = {
|
||||||
|
// createBy: this.createBy,
|
||||||
|
// parentId: this.queryParams.id,
|
||||||
|
// taskId: this.queryParams.taskId,
|
||||||
|
// }
|
||||||
|
// endBack(param).then((response) => {
|
||||||
|
// if (response.code == 200) {
|
||||||
|
// this.$modal.msgSuccess('操作成功')
|
||||||
|
// // this.back()
|
||||||
|
// this.$emit('goBackPage')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
//查看数据
|
//查看数据
|
||||||
handleViewCode(row) {
|
handleViewCode(row) {
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,16 @@
|
||||||
@click="handleSee(scope.row, 'see')"
|
@click="handleSee(scope.row, 'see')"
|
||||||
>查看</el-button
|
>查看</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
type="text"
|
||||||
|
@click="handleEdit(scope.row, 'see')"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
v-hasPermi="['return:receive:handler']"
|
||||||
|
v-if="scope.row.taskStatus != '40'"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="medium"
|
size="medium"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -462,6 +472,10 @@ export default {
|
||||||
this.$emit('returnApply')
|
this.$emit('returnApply')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleEdit(row) {
|
||||||
|
this.$emit('returnEdit',row.id, row.taskId)
|
||||||
|
},
|
||||||
|
|
||||||
//打开退料单
|
//打开退料单
|
||||||
handlePrint(row) {
|
handlePrint(row) {
|
||||||
// this.title = "退料单";
|
// this.title = "退料单";
|
||||||
|
|
@ -489,7 +503,7 @@ export default {
|
||||||
// taskId: row.taskId,
|
// taskId: row.taskId,
|
||||||
// },
|
// },
|
||||||
// })
|
// })
|
||||||
this.$emit('receiveReturn', row.id, row.taskId)
|
this.$emit('receiveReturn', row.id, row.taskId,row.agreementId)
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,10 @@
|
||||||
:isView="isView"
|
:isView="isView"
|
||||||
:rejectId="rejectId"
|
:rejectId="rejectId"
|
||||||
:rejectTaskId="rejectTaskId"
|
:rejectTaskId="rejectTaskId"
|
||||||
|
:rejectAgreementId="rejectAgreementId"
|
||||||
:isEdit="isEdit"
|
:isEdit="isEdit"
|
||||||
@returnApply="returnApply"
|
@returnApply="returnApply"
|
||||||
|
@returnEdit="returnEdit"
|
||||||
@receiveView="receiveView"
|
@receiveView="receiveView"
|
||||||
@receiveReturn="receiveReturn"
|
@receiveReturn="receiveReturn"
|
||||||
@goBackPage="goBack"
|
@goBackPage="goBack"
|
||||||
|
|
@ -40,6 +42,7 @@ export default {
|
||||||
rejectTaskId: '',
|
rejectTaskId: '',
|
||||||
isView: false,
|
isView: false,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
rejectAgreementId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -50,6 +53,14 @@ export default {
|
||||||
this.isShowComponent = 'AddReturn'
|
this.isShowComponent = 'AddReturn'
|
||||||
this.isEdit = false
|
this.isEdit = false
|
||||||
},
|
},
|
||||||
|
// 退料编辑
|
||||||
|
returnEdit(id,taskId) {
|
||||||
|
this.rejectId = id
|
||||||
|
this.rejectTaskId = taskId
|
||||||
|
this.pageContent = '编辑退料任务'
|
||||||
|
this.isShowComponent = 'AddReturn'
|
||||||
|
this.isEdit = true
|
||||||
|
},
|
||||||
// 查看
|
// 查看
|
||||||
receiveView(id) {
|
receiveView(id) {
|
||||||
this.pageContent = '退料详情'
|
this.pageContent = '退料详情'
|
||||||
|
|
@ -58,9 +69,10 @@ export default {
|
||||||
this.isShowComponent = 'HandlePage'
|
this.isShowComponent = 'HandlePage'
|
||||||
},
|
},
|
||||||
// 退料操作
|
// 退料操作
|
||||||
receiveReturn(id, taskId) {
|
receiveReturn(id, taskId,agreementId) {
|
||||||
this.rejectId = id
|
this.rejectId = id
|
||||||
this.rejectTaskId = taskId
|
this.rejectTaskId = taskId
|
||||||
|
this.rejectAgreementId = agreementId
|
||||||
this.isView = false
|
this.isView = false
|
||||||
this.pageContent = '退料处理'
|
this.pageContent = '退料处理'
|
||||||
this.isShowComponent = 'HandlePage'
|
this.isShowComponent = 'HandlePage'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue