master
lion 1 month ago
parent c9f3dcf7f4
commit 4f3c921e0b

@ -135,7 +135,49 @@
</el-tab-pane>
<el-tab-pane label="采购中" name="processing">
<div style="margin-bottom: 10px; display: flex; justify-content: flex-start;">
<div style="margin-bottom: 10px; display: flex; justify-content: flex-start; align-items: center; gap: 10px;">
<el-select
v-model="processingQuery.creator_department_id"
placeholder="科室"
size="small"
clearable
style="width: 150px"
>
<el-option
v-for="item in departments"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-select
v-model="processingQuery.created_by"
placeholder="采购负责人"
size="small"
clearable
filterable
style="width: 150px"
>
<el-option
v-for="item in users"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-input
v-model="processingQuery.keywords"
placeholder="关键词"
size="small"
clearable
style="width: 200px"
/>
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="handleProcessingQueryChange"
>查询</el-button>
<el-button
type="primary"
size="small"
@ -221,7 +263,49 @@
</el-tab-pane>
<el-tab-pane label="已收货" name="received">
<div style="margin-bottom: 10px; display: flex; justify-content: flex-start;">
<div style="margin-bottom: 10px; display: flex; justify-content: flex-start; align-items: center; gap: 10px;">
<el-select
v-model="receivedQuery.creator_department_id"
placeholder="科室"
size="small"
clearable
style="width: 150px"
>
<el-option
v-for="item in departments"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-select
v-model="receivedQuery.created_by"
placeholder="采购负责人"
size="small"
clearable
filterable
style="width: 150px"
>
<el-option
v-for="item in users"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-input
v-model="receivedQuery.keywords"
placeholder="关键词"
size="small"
clearable
style="width: 200px"
/>
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="handleReceivedQueryChange"
>查询</el-button>
<el-button
type="primary"
size="small"
@ -340,10 +424,20 @@ export default {
},
pendingRows: [],
isShowPay: false,
processingQuery: {
creator_department_id: '',
created_by: '',
keywords: '',
},
processingRows: [],
processingPage: 1,
processingPageSize: 10,
processingTotal: 0,
receivedQuery: {
creator_department_id: '',
created_by: '',
keywords: '',
},
receivedRows: [],
receivedPage: 1,
receivedPageSize: 10,
@ -373,8 +467,8 @@ export default {
async getUserList() {
try {
const res = await userListNoAuth({
page:1,
rows:9999,
page: 1,
rows: 9999
})
console.log(res)
const arr = res.data
@ -637,6 +731,14 @@ export default {
handlePendingQueryChange() {
this.getWaitList()
},
handleProcessingQueryChange() {
this.processingPage = 1
this.getProcessingList()
},
handleReceivedQueryChange() {
this.receivedPage = 1
this.getReceivedList()
},
async getWaitList() {
try {
const params = {
@ -678,11 +780,21 @@ export default {
},
async getProcessingList() {
try {
const res = await receiveList({
const params = {
page: this.processingPage,
page_size: this.processingPageSize,
is_receive: 0,
})
}
if (this.processingQuery.creator_department_id) {
params.creator_department_id = this.processingQuery.creator_department_id
}
if (this.processingQuery.created_by) {
params.created_by = this.processingQuery.created_by
}
if (this.processingQuery.keywords) {
params.keywords = this.processingQuery.keywords
}
const res = await receiveList(params)
this.processingTotal = res.total || 0
//
this.processingRows = (res.data || []).map(item => ({
@ -706,11 +818,21 @@ export default {
},
async getReceivedList() {
try {
const res = await receiveList({
const params = {
page: this.receivedPage,
page_size: this.receivedPageSize,
is_receive: 1,
})
}
if (this.receivedQuery.creator_department_id) {
params.creator_department_id = this.receivedQuery.creator_department_id
}
if (this.receivedQuery.created_by) {
params.created_by = this.receivedQuery.created_by
}
if (this.receivedQuery.keywords) {
params.keywords = this.receivedQuery.keywords
}
const res = await receiveList(params)
this.receivedTotal = res.total || 0
//
this.receivedRows = (res.data || []).map(item => ({
@ -762,13 +884,25 @@ export default {
this.receivedPageSize = 10
}
//
//
if (newTab === 'pending') {
this.pendingQuery = {
creator_department_id: '',
created_by: '',
keywords: '',
}
} else if (newTab === 'processing') {
this.processingQuery = {
creator_department_id: '',
created_by: '',
keywords: '',
}
} else if (newTab === 'received') {
this.receivedQuery = {
creator_department_id: '',
created_by: '',
keywords: '',
}
}
// 使 nextTick

Loading…
Cancel
Save