master
lion 1 month ago
parent c9f3dcf7f4
commit 4f3c921e0b

@ -57,7 +57,7 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleBatchPay" @click="handleBatchPay"
>批量支付</el-button> >批量支付</el-button>
</div> </div>
<el-table ref="pendingTable" :data="pendingRows" border style="width: 100%"> <el-table ref="pendingTable" :data="pendingRows" border style="width: 100%">
<el-table-column type="selection" width="50"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="申请人" width="120" align="center"> <el-table-column label="申请人" width="120" align="center">
@ -135,7 +135,49 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="采购中" name="processing"> <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 <el-button
type="primary" type="primary"
size="small" size="small"
@ -221,7 +263,49 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已收货" name="received"> <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 <el-button
type="primary" type="primary"
size="small" size="small"
@ -340,10 +424,20 @@ export default {
}, },
pendingRows: [], pendingRows: [],
isShowPay: false, isShowPay: false,
processingQuery: {
creator_department_id: '',
created_by: '',
keywords: '',
},
processingRows: [], processingRows: [],
processingPage: 1, processingPage: 1,
processingPageSize: 10, processingPageSize: 10,
processingTotal: 0, processingTotal: 0,
receivedQuery: {
creator_department_id: '',
created_by: '',
keywords: '',
},
receivedRows: [], receivedRows: [],
receivedPage: 1, receivedPage: 1,
receivedPageSize: 10, receivedPageSize: 10,
@ -373,8 +467,8 @@ export default {
async getUserList() { async getUserList() {
try { try {
const res = await userListNoAuth({ const res = await userListNoAuth({
page:1, page: 1,
rows:9999, rows: 9999
}) })
console.log(res) console.log(res)
const arr = res.data const arr = res.data
@ -637,6 +731,14 @@ export default {
handlePendingQueryChange() { handlePendingQueryChange() {
this.getWaitList() this.getWaitList()
}, },
handleProcessingQueryChange() {
this.processingPage = 1
this.getProcessingList()
},
handleReceivedQueryChange() {
this.receivedPage = 1
this.getReceivedList()
},
async getWaitList() { async getWaitList() {
try { try {
const params = { const params = {
@ -678,11 +780,21 @@ export default {
}, },
async getProcessingList() { async getProcessingList() {
try { try {
const res = await receiveList({ const params = {
page: this.processingPage, page: this.processingPage,
page_size: this.processingPageSize, page_size: this.processingPageSize,
is_receive: 0, 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.processingTotal = res.total || 0
// //
this.processingRows = (res.data || []).map(item => ({ this.processingRows = (res.data || []).map(item => ({
@ -706,11 +818,21 @@ export default {
}, },
async getReceivedList() { async getReceivedList() {
try { try {
const res = await receiveList({ const params = {
page: this.receivedPage, page: this.receivedPage,
page_size: this.receivedPageSize, page_size: this.receivedPageSize,
is_receive: 1, 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.receivedTotal = res.total || 0
// //
this.receivedRows = (res.data || []).map(item => ({ this.receivedRows = (res.data || []).map(item => ({
@ -762,13 +884,25 @@ export default {
this.receivedPageSize = 10 this.receivedPageSize = 10
} }
// //
if (newTab === 'pending') { if (newTab === 'pending') {
this.pendingQuery = { this.pendingQuery = {
creator_department_id: '', creator_department_id: '',
created_by: '', created_by: '',
keywords: '', 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 // 使 nextTick

Loading…
Cancel
Save