增加参数

This commit is contained in:
BianLzhaoMin 2025-03-06 11:13:23 +08:00
parent 2584475e8b
commit 18a29f3d67
5 changed files with 1114 additions and 1418 deletions

View File

@ -5,16 +5,16 @@ export function getListLeaseOut(query) {
return request({ return request({
url: '/material/lease_out_details/list', url: '/material/lease_out_details/list',
method: 'get', method: 'get',
params: query, params: query
}) })
} }
// 领料出库-出库详情信息 // 领料出库-出库详情信息
export function outInfoList(id,query) { export function outInfoList(id, query) {
return request({ return request({
url: '/material/lease_apply_info/' + id, url: '/material/lease_apply_info/' + id,
method: 'get', method: 'get',
params: query, params: query
}) })
} }
@ -23,7 +23,7 @@ export function getDetailsByTypeId(query) {
return request({ return request({
url: '/material/ma_machine/list', url: '/material/ma_machine/list',
method: 'get', method: 'get',
params: query, params: query
}) })
} }
@ -32,18 +32,17 @@ export function submitOut(data) {
return request({ return request({
url: '/material/lease_apply_info/leaseOut', url: '/material/lease_apply_info/leaseOut',
method: 'post', method: 'post',
data: data, data: data
}) })
} }
//-------暂未用到----------- //-------暂未用到-----------
// 领料出库-新增 // 领料出库-新增
export function addApplyInfo(data) { export function addApplyInfo(data) {
return request({ return request({
url: '/material/lease_apply_info', url: '/material/lease_apply_info',
method: 'post', method: 'post',
data: data, data: data
}) })
} }
@ -52,7 +51,7 @@ export function updateApplyInfo(data) {
return request({ return request({
url: '/material/lease_apply_info', url: '/material/lease_apply_info',
method: 'put', method: 'put',
data: data, data: data
}) })
} }
@ -69,9 +68,6 @@ export function submitNumOut(data) {
return request({ return request({
url: '/material/lease_apply_info/leaseOut', url: '/material/lease_apply_info/leaseOut',
method: 'post', method: 'post',
data: data, data: data
}) })
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<!-- 基础页面 --> <!-- 基础页面 -->
<div class="app-container"> <div class="app-container">
<el-form v-show="showSearch" :model="queryParams" ref="queryForm" size="small" inline> <el-form :model="queryParams" ref="queryForm" size="small" inline>
<el-form-item label="申请日期" prop="timeRange"> <el-form-item label="申请日期" prop="timeRange">
<el-date-picker <el-date-picker
v-model="queryParams.timeRange" v-model="queryParams.timeRange"
@ -40,16 +40,6 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">直转申请</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出数据</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> -->
<el-table :data="tableList" fit highlight-current-row style="width: 100%"> <el-table :data="tableList" fit highlight-current-row style="width: 100%">
<!-- 多选 --> <!-- 多选 -->
<el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" /> <el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" />
@ -70,31 +60,18 @@
> >
<!-- 插槽 --> <!-- 插槽 -->
<template v-slot="scope" v-if="column.prop == 'flowStatus'"> <template v-slot="scope" v-if="column.prop == 'flowStatus'">
<el-tag v-if="scope.row.flowStatus == '0'" type="warning" size="mini" style="margin-right: 5px"> <el-tag v-if="scope.row.flowStatus == '0'" type="warning" size="mini">待审核</el-tag>
待审核 <el-tag v-else-if="scope.row.flowStatus == '1'" size="mini">审核中</el-tag>
</el-tag> <el-tag v-else-if="scope.row.flowStatus == '2'" type="success" size="mini">已审核</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '1'" size="mini" style="margin-right: 5px"> <el-tag v-else-if="scope.row.flowStatus == '3'" type="error" size="mini">已驳回</el-tag>
审核中
</el-tag>
<el-tag
v-else-if="scope.row.flowStatus == '2'"
type="success"
size="mini"
style="margin-right: 5px"
>
已审核
</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '3'" type="error" size="mini" style="margin-right: 5px">
已驳回
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 操作 --> <!-- 操作 -->
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" size="mini" icon="el-icon-search" @click="handleEdit(scope.row, 1)">查看</el-button> --> <!-- <el-button type="text" size="mini" icon="el-icon-search" @click="handleEdit(scope.row, 1)">查看</el-button> -->
<el-button <el-button
v-if="scope.row.flowStatus == '0' || scope.row.flowStatus == '1'" v-if="auditingShow(scope.row)"
type="text" type="text"
size="mini" size="mini"
icon="el-icon-edit" icon="el-icon-edit"
@ -102,16 +79,6 @@
> >
审核 审核
</el-button> </el-button>
<!-- <el-button
v-if="scope.row.status == '0'"
type="text"
size="mini"
icon="el-icon-delete"
style="color: #f56c6c"
@click="handleDelete(scope.row)"
>
删除
</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -133,7 +100,6 @@ import { getReceiveList, receiveDelete, getDerateList } from '@/api/business/ind
export default { export default {
data() { data() {
return { return {
showSearch: true,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
@ -141,7 +107,7 @@ export default {
status: '', // status: '', //
timeRange: [] // timeRange: [] //
}, },
// //
statusOptions: [ statusOptions: [
{ label: '待审核', value: '1' }, { label: '待审核', value: '1' },
{ label: '审核中', value: '2' }, { label: '审核中', value: '2' },
@ -160,10 +126,12 @@ export default {
{ label: '状态', prop: 'flowStatus' } { label: '状态', prop: 'flowStatus' }
], ],
// //
tableList: [] tableList: [],
userId: ''
} }
}, },
created() { created() {
this.userId = sessionStorage.getItem('userId')
this.getList() this.getList()
}, },
methods: { methods: {
@ -232,9 +200,15 @@ export default {
message: '删除成功!' message: '删除成功!'
}) })
}) })
},
//
auditingShow(row) {
console.log('row.configValues', row.configValue)
if (row.configValue) {
return row.flowStatus != 1 && row.configValue.includes(this.userId)
}
} }
} }
} }
</script> </script>
<style lang="scss" scoped></style>

View File

@ -1,7 +1,7 @@
<template> <template>
<!-- 业务办理审核 -- 领料审核 --> <!-- 业务办理审核 -- 领料审核 -->
<div class="app-container"> <div class="app-container">
<el-form v-show="showSearch" :model="queryParams" ref="queryForm" size="small" inline> <el-form :model="queryParams" ref="queryForm" size="small" inline>
<el-form-item label="申请日期" prop="timeRange"> <el-form-item label="申请日期" prop="timeRange">
<el-date-picker <el-date-picker
clearable clearable
@ -40,7 +40,6 @@
</el-form> </el-form>
<el-table :data="tableList" fit highlight-current-row style="width: 100%"> <el-table :data="tableList" fit highlight-current-row style="width: 100%">
<!-- 多选 -->
<el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" /> <el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" />
<el-table-column <el-table-column
width="55" width="55"
@ -58,21 +57,22 @@
v-for="column in tableColumns" v-for="column in tableColumns"
> >
<!-- 插槽 --> <!-- 插槽 -->
<template v-slot="scope" v-if="column.prop == 'taskStatus'"> <template v-slot="{ row }" v-if="column.prop == 'taskStatus'">
<el-tag v-if="scope.row.taskStatus == '0'" type="warning" size="mini">待审核</el-tag> <el-tag v-if="row.taskStatus == '1'" size="mini">审核中</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '1'" size="mini">审核中</el-tag> <el-tag v-if="row.taskStatus == '0'" type="warning" size="mini">待审核</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'" type="success" size="mini">已完成</el-tag> <el-tag v-if="row.taskStatus == '2'" type="success" size="mini">已完成</el-tag>
<el-tag v-if="row.taskStatus == '3'" type="danger" size="mini">已驳回</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 操作 --> <!-- 操作 -->
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="{ row }">
<el-button <el-button
type="text" type="text"
size="mini" size="mini"
icon="el-icon-edit" icon="el-icon-edit"
v-if="auditingShow(scope.row)" v-if="auditingShow(row)"
@click="handleAuditing(scope.row, 1)" @click="handleAuditing(row, 1)"
> >
审核 审核
</el-button> </el-button>
@ -80,8 +80,8 @@
type="text" type="text"
size="mini" size="mini"
icon="el-icon-search" icon="el-icon-search"
v-if="scope.row.taskStatus == 2" v-if="row.taskStatus == 2 || row.taskStatus == 3"
@click="handleAuditing(scope.row, 2)" @click="handleAuditing(row, 2)"
> >
查看 查看
</el-button> </el-button>
@ -102,13 +102,13 @@
<script> <script>
import { getReceiveApplyApi } from '@/api/receive-apply/index.js' import { getReceiveApplyApi } from '@/api/receive-apply/index.js'
import { getLeaseTaskList, deleteLeaseTask } from '@/api/business/index'
export default { export default {
data() { data() {
return { return {
showSearch: true,
userId: '', userId: '',
//
tableList: [],
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
@ -135,9 +135,7 @@ export default {
{ label: '领料人', prop: 'leasePerson' }, { label: '领料人', prop: 'leasePerson' },
{ label: '领料人电话', prop: 'phone' }, { label: '领料人电话', prop: 'phone' },
{ label: '状态', prop: 'taskStatus' } { label: '状态', prop: 'taskStatus' }
], ]
//
tableList: []
} }
}, },
created() { created() {
@ -176,11 +174,7 @@ export default {
selectionChange(val) { selectionChange(val) {
console.log('selectionChange', val) console.log('selectionChange', val)
}, },
handleAdd() { // /
console.log('领料申请')
this.$router.push({ path: '/business/businessHandling/index' })
},
//
handleAuditing(row, type) { handleAuditing(row, type) {
this.$router.push({ this.$router.push({
name: 'receive-apply-details', name: 'receive-apply-details',
@ -192,40 +186,9 @@ export default {
} }
}) // }) //
}, },
//
handleDelete(row) {
console.log('删除', row)
this.$confirm('是否删除该数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res = await deleteLeaseTask(row.id)
console.log('🚀 ~ 删除 ~ res:', res)
this.getList()
this.$message({
type: 'success',
message: '删除成功!'
})
})
},
//
handleExport() {
try {
let fileName = `数据_${new Date().getTime()}.xLsx`
let url = ''
const params = { ...this.queryParams }
console.log('🚀 ~ 导出 ~ params:', params)
// this.derive(url, params, fileName)
} catch (error) {
console.log('导出数据失败', error)
}
},
// //
auditingShow(row) { auditingShow(row) {
console.log('row.configValues', row.configValue)
if (row.configValue) { if (row.configValue) {
return row.status != 1 && row.configValue.includes(this.userId) return row.status != 1 && row.configValue.includes(this.userId)
} }

View File

@ -136,6 +136,7 @@
filterable filterable
multiple multiple
@change="onRolesChange" @change="onRolesChange"
@remove-tag="onRemoveTag"
> >
<el-option <el-option
:key="item.roleId" :key="item.roleId"
@ -320,30 +321,42 @@ export default {
if (valid) { if (valid) {
const SUBMIT_FUN = this.title === '添加' ? addConfigNodeApi : editConfigNodeApi const SUBMIT_FUN = this.title === '添加' ? addConfigNodeApi : editConfigNodeApi
const isSortPass = this.dataList.findIndex(e => e.nodeSort === this.form.nodeSort) const isSortPass = this.dataList.findIndex(e => e.nodeSort === this.form.nodeSort)
//
// let apiPromises = []
// if (isSortPass > -1) { //
// this.$modal.msgError('') if (this.form.nodeSignConfig == 0) {
// return this.userIds = []
// } // API Promise
// apiPromises = this.form.configValuesList.map(e => {
// this.form.configValues = this.form.configValuesList.join(',') return allocatedUserList({ pageNum: 1, pageSize: 999, roleId: e }).then(res => {
res.rows.forEach(j => {
if (this.userIds.length > 0) { this.userIds.push(j.userId)
this.form.configValues = this.userIds.join(',') })
this.form.roleIds = this.form.configValuesList.join(',') })
})
} else { } else {
this.form.configValues = this.form.configValuesList.join(',') this.form.configValues = this.form.configValuesList.join(',')
} }
const addOrEditForm = JSON.parse(JSON.stringify(this.form)) try {
// API
await Promise.all(apiPromises)
this.$delete(addOrEditForm, 'configValuesList') // if (this.form.nodeSignConfig == 0) {
this.form.configValues = this.userIds.join(',')
this.form.roleIds = this.form.configValuesList.join(',')
}
//
const addOrEditForm = JSON.parse(JSON.stringify(this.form))
this.$delete(addOrEditForm, 'configValuesList') //
if (this.title === '添加') { if (this.title === '添加') {
addOrEditForm.typeId = this.queryParams.typeId addOrEditForm.typeId = this.queryParams.typeId
} }
//
const res = await SUBMIT_FUN(addOrEditForm) const res = await SUBMIT_FUN(addOrEditForm)
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess(`${this.title}成功`) this.$modal.msgSuccess(`${this.title}成功`)
@ -351,6 +364,9 @@ export default {
this.getList() this.getList()
this.open = false this.open = false
} }
} catch (err) {
console.error('请求错误:', err)
}
} }
}) })
}, },
@ -377,24 +393,20 @@ export default {
}, },
// change // change
async onRolesChange(val) { async onRolesChange(val) {
console.log('val', val) // if (val.length === 0) {
const newRoles = val.map(e => e * 1) // this.userIds = []
// } else {
if (val.length === 0) { // val.forEach(e => {
this.userIds = [] // allocatedUserList({ pageNum: 1, pageSize: 999, roleId: e }).then(res => {
} else { // res.rows.forEach(j => {
val.forEach(e => { // this.userIds.push(j.userId)
allocatedUserList({ pageNum: 1, pageSize: 999, roleId: e }).then(res => { // })
res.rows.forEach(j => { // })
this.userIds.push(j.userId) // })
}) // }
}) },
}) //
} onRemoveTag(val) {}
// const res = await allocatedUserList(val)
// console.log('res', res)
}
} }
} }
</script> </script>

File diff suppressed because it is too large Load Diff