增加参数

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

@ -2,76 +2,72 @@ import request from '@/utils/request'
//领料出库-列表
export function getListLeaseOut(query) {
return request({
url: '/material/lease_out_details/list',
method: 'get',
params: query,
})
return request({
url: '/material/lease_out_details/list',
method: 'get',
params: query
})
}
// 领料出库-出库详情信息
export function outInfoList(id,query) {
return request({
url: '/material/lease_apply_info/' + id,
method: 'get',
params: query,
})
export function outInfoList(id, query) {
return request({
url: '/material/lease_apply_info/' + id,
method: 'get',
params: query
})
}
// 领料出库-编码出库详情信息
export function getDetailsByTypeId(query) {
return request({
url: '/material/ma_machine/list',
method: 'get',
params: query,
})
return request({
url: '/material/ma_machine/list',
method: 'get',
params: query
})
}
// 领料出库-编码出库
export function submitOut(data) {
return request({
url: '/material/lease_apply_info/leaseOut',
method: 'post',
data: data,
})
return request({
url: '/material/lease_apply_info/leaseOut',
method: 'post',
data: data
})
}
//-------暂未用到-----------
// 领料出库-新增
export function addApplyInfo(data) {
return request({
url: '/material/lease_apply_info',
method: 'post',
data: data,
})
return request({
url: '/material/lease_apply_info',
method: 'post',
data: data
})
}
// 领料出库-编辑
export function updateApplyInfo(data) {
return request({
url: '/material/lease_apply_info',
method: 'put',
data: data,
})
return request({
url: '/material/lease_apply_info',
method: 'put',
data: data
})
}
// 领料出库-详情信息
export function getLeaseOutInfo(id) {
return request({
url: '/material/lease_apply_info/' + id,
method: 'get'
})
return request({
url: '/material/lease_apply_info/' + id,
method: 'get'
})
}
// 领料出库-数量出库
export function submitNumOut(data) {
return request({
url: '/material/lease_apply_info/leaseOut',
method: 'post',
data: data,
})
return request({
url: '/material/lease_apply_info/leaseOut',
method: 'post',
data: data
})
}

View File

@ -1,7 +1,7 @@
<template>
<!-- 基础页面 -->
<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-date-picker
v-model="queryParams.timeRange"
@ -40,16 +40,6 @@
</el-form-item>
</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-column type="selection" width="55" align="center" @selection-change="selectionChange" />
@ -70,31 +60,18 @@
>
<!-- 插槽 -->
<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>
<el-tag v-else-if="scope.row.flowStatus == '1'" size="mini" style="margin-right: 5px">
审核中
</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>
<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 v-else-if="scope.row.flowStatus == '2'" type="success" size="mini">已审核</el-tag>
<el-tag v-else-if="scope.row.flowStatus == '3'" type="error" size="mini">已驳回</el-tag>
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column label="操作" align="center" width="180">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<!-- <el-button type="text" size="mini" icon="el-icon-search" @click="handleEdit(scope.row, 1)">查看</el-button> -->
<el-button
v-if="scope.row.flowStatus == '0' || scope.row.flowStatus == '1'"
v-if="auditingShow(scope.row)"
type="text"
size="mini"
icon="el-icon-edit"
@ -102,16 +79,6 @@
>
审核
</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>
</el-table-column>
</el-table>
@ -133,7 +100,6 @@ import { getReceiveList, receiveDelete, getDerateList } from '@/api/business/ind
export default {
data() {
return {
showSearch: true,
queryParams: {
pageNum: 1,
pageSize: 10,
@ -141,7 +107,7 @@ export default {
status: '', //
timeRange: [] //
},
//
//
statusOptions: [
{ label: '待审核', value: '1' },
{ label: '审核中', value: '2' },
@ -160,10 +126,12 @@ export default {
{ label: '状态', prop: 'flowStatus' }
],
//
tableList: []
tableList: [],
userId: ''
}
},
created() {
this.userId = sessionStorage.getItem('userId')
this.getList()
},
methods: {
@ -232,9 +200,15 @@ export default {
message: '删除成功!'
})
})
},
//
auditingShow(row) {
console.log('row.configValues', row.configValue)
if (row.configValue) {
return row.flowStatus != 1 && row.configValue.includes(this.userId)
}
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@ -1,7 +1,7 @@
<template>
<!-- 业务办理审核 -- 领料审核 -->
<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-date-picker
clearable
@ -40,7 +40,6 @@
</el-form>
<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
width="55"
@ -58,21 +57,22 @@
v-for="column in tableColumns"
>
<!-- 插槽 -->
<template v-slot="scope" v-if="column.prop == 'taskStatus'">
<el-tag v-if="scope.row.taskStatus == '0'" type="warning" size="mini">待审核</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '1'" size="mini">审核中</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'" type="success" size="mini">已完成</el-tag>
<template v-slot="{ row }" v-if="column.prop == 'taskStatus'">
<el-tag v-if="row.taskStatus == '1'" size="mini">审核中</el-tag>
<el-tag v-if="row.taskStatus == '0'" type="warning" 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>
</el-table-column>
<!-- 操作 -->
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<template slot-scope="{ row }">
<el-button
type="text"
size="mini"
icon="el-icon-edit"
v-if="auditingShow(scope.row)"
@click="handleAuditing(scope.row, 1)"
v-if="auditingShow(row)"
@click="handleAuditing(row, 1)"
>
审核
</el-button>
@ -80,8 +80,8 @@
type="text"
size="mini"
icon="el-icon-search"
v-if="scope.row.taskStatus == 2"
@click="handleAuditing(scope.row, 2)"
v-if="row.taskStatus == 2 || row.taskStatus == 3"
@click="handleAuditing(row, 2)"
>
查看
</el-button>
@ -102,13 +102,13 @@
<script>
import { getReceiveApplyApi } from '@/api/receive-apply/index.js'
import { getLeaseTaskList, deleteLeaseTask } from '@/api/business/index'
export default {
data() {
return {
showSearch: true,
userId: '',
//
tableList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
@ -135,9 +135,7 @@ export default {
{ label: '领料人', prop: 'leasePerson' },
{ label: '领料人电话', prop: 'phone' },
{ label: '状态', prop: 'taskStatus' }
],
//
tableList: []
]
}
},
created() {
@ -176,11 +174,7 @@ export default {
selectionChange(val) {
console.log('selectionChange', val)
},
handleAdd() {
console.log('领料申请')
this.$router.push({ path: '/business/businessHandling/index' })
},
//
// /
handleAuditing(row, type) {
this.$router.push({
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) {
console.log('row.configValues', row.configValue)
if (row.configValue) {
return row.status != 1 && row.configValue.includes(this.userId)
}

View File

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

File diff suppressed because it is too large Load Diff