优化首页查看跳转,领料驳回等bug问题

This commit is contained in:
BianLzhaoMin 2024-06-06 14:20:07 +08:00
parent 1655cdc492
commit 9e113d0ee0
9 changed files with 248 additions and 225 deletions

View File

@ -254,6 +254,12 @@ export default {
viewTaskId: { viewTaskId: {
type: [String, Number], type: [String, Number],
}, },
rejectTaskStatus: {
type: [String, Number],
default: () => {
return null
},
},
}, },
data() { data() {
const validatePhone = (rule, value, callback) => { const validatePhone = (rule, value, callback) => {
@ -694,17 +700,16 @@ export default {
this.queryParams.leaseApplyDetails, this.queryParams.leaseApplyDetails,
) )
}) })
// 100 souceByRefuse1
if (this.rejectTaskStatus == 100) {
this.queryParams.souceByRefuse = 1
}
const params = { const params = {
...this.queryParams, ...this.queryParams,
taskId: this.taskId, taskId: this.taskId,
leaseApplyInfoList: this.leaseApplyInfoList, leaseApplyInfoList: this.leaseApplyInfoList,
} }
console.log(
'驳回提交--------------保存',
params,
'参数----------',
)
res = await editLeaseApply(params) res = await editLeaseApply(params)
} else { } else {
// console.log(this.queryParams) // console.log(this.queryParams)
@ -717,11 +722,6 @@ export default {
return return
} }
res = await submitLeaseApply(this.queryParams) res = await submitLeaseApply(this.queryParams)
console.log(
'正常申请提交--------------保存',
this.queryParams,
'参数--------------',
)
} }
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({

View File

@ -496,7 +496,7 @@ export default {
// isBack: true, // isBack: true,
// }, // },
// }) // })
this.$emit('editPicking', row.taskId) this.$emit('editPicking', row.taskId, row.taskStatus)
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
async handleDelete(row) { async handleDelete(row) {
@ -534,6 +534,17 @@ export default {
}) })
}, },
}, },
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -11,6 +11,7 @@
:viewTaskId="viewTaskId" :viewTaskId="viewTaskId"
:isView="isView" :isView="isView"
:isEdit="isEdit" :isEdit="isEdit"
:rejectTaskStatus="rejectTaskStatus"
@addPicking="addPicking" @addPicking="addPicking"
@viewPicking="viewPicking" @viewPicking="viewPicking"
@editPicking="editPicking" @editPicking="editPicking"
@ -34,6 +35,7 @@ export default {
isShowComponent: 'Home', isShowComponent: 'Home',
pageContent: '新增领料任务', pageContent: '新增领料任务',
viewTaskId: '', viewTaskId: '',
rejectTaskStatus: '',
isView: false, isView: false,
isEdit: false, isEdit: false,
} }
@ -55,8 +57,9 @@ export default {
this.isShowComponent = 'AddPicking' this.isShowComponent = 'AddPicking'
}, },
/* 编辑和驳回提交 */ /* 编辑和驳回提交 */
editPicking(taskId) { editPicking(taskId, taskStatus) {
this.viewTaskId = taskId this.viewTaskId = taskId
this.rejectTaskStatus = taskStatus || null
this.isView = true this.isView = true
this.isEdit = true this.isEdit = true
this.pageContent = '领料任务编辑' this.pageContent = '领料任务编辑'

View File

@ -259,7 +259,8 @@
(scope.row.leaseApplyInfoList[0].status == '5' || (scope.row.leaseApplyInfoList[0].status == '5' ||
scope.row.leaseApplyInfoList[0].status == '7' || scope.row.leaseApplyInfoList[0].status == '7' ||
scope.row.leaseApplyInfoList[0].status == '4' || scope.row.leaseApplyInfoList[0].status == '4' ||
scope.row.leaseApplyInfoList[0].status == '2') scope.row.leaseApplyInfoList[0].status == '2' ||
scope.row.leaseApplyInfoList[0].status == '0')
" "
>审批</el-button >审批</el-button
> >
@ -274,7 +275,8 @@
scope.row.leaseApplyInfoList[0].status == '7' || scope.row.leaseApplyInfoList[0].status == '7' ||
scope.row.leaseApplyInfoList[0].status == '4' || scope.row.leaseApplyInfoList[0].status == '4' ||
scope.row.leaseApplyInfoList[0].status == '2' || scope.row.leaseApplyInfoList[0].status == '2' ||
scope.row.leaseApplyInfoList[0].status == '9') scope.row.leaseApplyInfoList[0].status == '9' ||
scope.row.leaseApplyInfoList[0].status == '0')
" "
>审批</el-button >审批</el-button
> >

View File

@ -83,9 +83,16 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column
<template scope="scope"> label="序号"
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span> align="center"
width="80"
type="index"
>
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * 10 + scope.$index + 1
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -166,214 +173,214 @@
</template> </template>
<script> <script>
import { import {
getAgreementList, getAgreementList,
getUnitList, getUnitList,
getProjectList, getProjectList,
} from '@/api/claimAndRefund/receive' } from '@/api/claimAndRefund/receive'
import { getSltAgreementInfo } from '@/api/cost/cost' import { getSltAgreementInfo } from '@/api/cost/cost'
export default { export default {
name: 'CostApplyList', name: 'CostApplyList',
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
// //
loading: true, loading: true,
// //
ids: [], ids: [],
// //
single: true, single: true,
// //
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
unitList: [], unitList: [],
// //
projectList: [], projectList: [],
statusList: [ statusList: [
{ id: '0', name: '请选择' }, { id: '0', name: '请选择' },
{ id: '1', name: '未结算' }, { id: '1', name: '未结算' },
{ id: '2', name: '已结算' }, { id: '2', name: '已结算' },
{ id: '3', name: '待审核' }, { id: '3', name: '待审核' },
], // ], //
// //
agreementList: [], agreementList: [],
// //
title: '', title: '',
// //
open: false, open: false,
// //
dateRange: [], dateRange: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
keyWord: undefined, keyWord: undefined,
sltStatus: '0', sltStatus: '0',
unitId: '', unitId: '',
projectId: '', projectId: '',
}, },
// //
form: {}, form: {},
// //
uploadHeader: process.env.VUE_APP_BASE_API, uploadHeader: process.env.VUE_APP_BASE_API,
imageUrl: '', imageUrl: '',
imageName: '', imageName: '',
fileList: [], fileList: [],
field101fileList: [], field101fileList: [],
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
// //
// uploadUrl:'http://192.168.0.14:21624/system',//线+system // uploadUrl:'http://192.168.0.14:21624/system',//线+system
// uploadUrl:'http://112.29.103.165:21626/system',//线+system // uploadUrl:'http://112.29.103.165:21626/system',//线+system
uploadUrl: process.env.VUE_APP_BASE_API + '/system', // uploadUrl: process.env.VUE_APP_BASE_API + '/system', //
// //
rules: { rules: {
contractCode: [ contractCode: [
{ {
required: true, required: true,
message: '合同编号不能为空', message: '合同编号不能为空',
trigger: 'blur', trigger: 'blur',
}, },
], ],
signTime: [ signTime: [
{ {
required: true, required: true,
message: '签订日期不能为空', message: '签订日期不能为空',
trigger: 'blur', trigger: 'blur',
}, },
], ],
unitName: [ unitName: [
{ {
required: true, required: true,
message: '往来单位不能为空', message: '往来单位不能为空',
trigger: 'blur', trigger: 'blur',
}, },
], ],
projectName: [ projectName: [
{ {
required: true, required: true,
message: '工程名称不能为空', message: '工程名称不能为空',
trigger: 'blur', trigger: 'blur',
}, },
], ],
}, },
peopleOpen: false, peopleOpen: false,
noticeOpen: false, noticeOpen: false,
nform: { nform: {
notice: '', notice: '',
}, },
nrules: { nrules: {
notice: [ notice: [
{ {
required: true, required: true,
message: '通知内容不能为空', message: '通知内容不能为空',
trigger: 'blur', trigger: 'blur',
}, },
], ],
}, },
deptName: undefined, deptName: undefined,
} }
},
created() {
this.getList()
this.getUnitList()
this.getProjectList()
},
methods: {
// ,getUnitList, getProjectList
getUnitList() {
getUnitList().then((response) => {
this.unitList = response.data
})
}, },
created() { getProjectList() {
getProjectList().then((response) => {
this.projectList = response.data
})
},
/** 查询字典类型列表 */
getList() {
this.loading = true
getSltAgreementInfo(this.queryParams).then((response) => {
this.agreementList = response.rows
this.total = response.total
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList() this.getList()
this.getUnitList()
this.getProjectList()
}, },
methods: { /** 重置按钮操作 */
// ,getUnitList, getProjectList resetQuery() {
getUnitList() { this.dateRange = []
getUnitList().then((response) => { this.resetForm('queryForm')
this.unitList = response.data this.handleQuery()
}) },
}, //
getProjectList() { handleApply(row) {
getProjectList().then((response) => { let arr = [row]
this.projectList = response.data console.log(arr)
}) console.log(this.ids)
}, console.log(JSON.stringify(arr))
this.$tab.closeOpenPage({
/** 查询字典类型列表 */ path: '/cost/cost/costApplyAdd',
getList() { query: {
this.loading = true rowData: JSON.stringify(arr),
getSltAgreementInfo(this.queryParams).then((response) => { },
this.agreementList = response.rows })
this.total = response.total },
this.loading = false handleApplyList() {
}) if (this.ids.length > 0) {
}, let arr = this.ids
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.resetForm('queryForm')
this.handleQuery()
},
//
handleApply(row) {
let arr = [row]
console.log(arr)
console.log(this.ids)
console.log(JSON.stringify(arr))
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path: '/cost/cost/costApplyAdd', path: '/cost/cost/costApplyAdd',
query: { query: {
rowData: JSON.stringify(arr), rowData: JSON.stringify(arr),
}, },
}) })
}, }
handleApplyList() {
if (this.ids.length > 0) {
let arr = this.ids
this.$tab.closeOpenPage({
path: '/cost/cost/costApplyAdd',
query: {
rowData: JSON.stringify(arr),
},
})
}
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item)
this.single = selection.length != 1
this.multiple = !selection.length
},
/** 删除按钮操作 */
handleDelete(row) {
// const agreementId = row.agreementId;
// let param = {
// agreementId:row.agreementId+''
// }
// this.$modal.confirm('').then(function() {
// return removeAgreement(param);
// }).then(() => {
// this.getList();
// this.$modal.msgSuccess("");
// }).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('material/agreementInfo/export', {
// ...this.queryParams
// }, `_${new Date().getTime()}.xlsx`)
},
}, },
} //
handleSelectionChange(selection) {
this.ids = selection.map((item) => item)
this.single = selection.length != 1
this.multiple = !selection.length
},
/** 删除按钮操作 */
handleDelete(row) {
// const agreementId = row.agreementId;
// let param = {
// agreementId:row.agreementId+''
// }
// this.$modal.confirm('').then(function() {
// return removeAgreement(param);
// }).then(() => {
// this.getList();
// this.$modal.msgSuccess("");
// }).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('material/agreementInfo/export', {
// ...this.queryParams
// }, `_${new Date().getTime()}.xlsx`)
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini { ::v-deep.el-table .fixed-width .el-button--mini {
width: 80px !important; width: 80px !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
</style> </style>

View File

@ -306,17 +306,17 @@ export default {
/* 新购任务 */ /* 新购任务 */
{ {
taskTypeId: 23, taskTypeId: 23,
routerPath: 'store/newBuy/newDevicesList', routerPath: 'store/newPurchase/tools',
}, },
/* 领料任务 */ /* 领料任务 */
{ {
taskTypeId: 29, taskTypeId: 29,
routerPath: 'claimAndRefund/receive/receiveManage', routerPath: 'claimAndRefund/picking/apply',
}, },
/* 退料任务 */ /* 退料任务 */
{ {
taskTypeId: 36, taskTypeId: 36,
routerPath: 'claimAndRefund/return/returnApply', routerPath: 'claimAndRefund/return/apply',
}, },
/* 维修任务 */ /* 维修任务 */
{ {
@ -326,22 +326,22 @@ export default {
/* 维修审核 */ /* 维修审核 */
{ {
taskTypeId: 45, taskTypeId: 45,
routerPath: 'repairTest/repair/repair', routerPath: 'repairTest/testExamine/testExamine',
}, },
/* 修试入库任务 */ /* 修试入库任务 */
{ {
taskTypeId: 50, taskTypeId: 50,
routerPath: 'store/warehousing/repairWarehousing', routerPath: 'store/warehousing/repair',
}, },
/* 修试入库任务 */ /* 报废任务 */
{ {
taskTypeId: 57, taskTypeId: 57,
routerPath: 'scrap/manage/scrapAuditing', routerPath: 'scrap/manage/scrapAuditing',
}, },
/* 修试入库任务 */ /* 新购配件任务 */
{ {
taskTypeId: 67, taskTypeId: 67,
routerPath: 'store/newBuy/newAccessoryList', routerPath: 'store/warehousing/newParts',
}, },
], ],

View File

@ -296,7 +296,7 @@
width="80" width="80"
type="index" type="index"
> >
<template scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
(queryParams.pageNum - 1) * 10 + (queryParams.pageNum - 1) * 10 +
scope.$index + scope.$index +

View File

@ -283,7 +283,7 @@
width="80" width="80"
type="index" type="index"
> >
<template scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
(query.pageNum - 1) * 10 + scope.$index + 1 (query.pageNum - 1) * 10 + scope.$index + 1
}}</span> }}</span>

View File

@ -380,7 +380,7 @@
width="80" width="80"
type="index" type="index"
> >
<template scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
(query.pageNum - 1) * 10 + scope.$index + 1 (query.pageNum - 1) * 10 + scope.$index + 1
}}</span> }}</span>