feat 变更采购单查询

This commit is contained in:
Amjacks 2025-03-26 10:32:10 +08:00
parent a82ef471a7
commit f70b66e1c7
2 changed files with 15 additions and 15 deletions

View File

@ -155,3 +155,11 @@ export function createDelivery(params: any) {
data: params, data: params,
}); });
} }
export function getPurchase(params: any) {
return request({
url: '/api/delivery/getPurchase',
method: 'post',
data: params,
});
}

View File

@ -22,8 +22,8 @@
<el-table border v-loading="loading" :data="state.dataList" <el-table border v-loading="loading" :data="state.dataList"
highlight-current-row row-key="id" @selection-change="handleSelection"> highlight-current-row row-key="id" @selection-change="handleSelection">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column prop="SITENAME" label="工厂"/> <el-table-column prop="siteName" label="工厂"/>
<el-table-column prop="RECEIVEREQUESTNAME" label="订单编号"/> <el-table-column prop="receiveRequestName" label="订单编号"/>
</el-table> </el-table>
<div> <div>
<pagination v-if="total > 0" :total="total" v-model:pageNumTo="queryParams.pageNum" <pagination v-if="total > 0" :total="total" v-model:pageNumTo="queryParams.pageNum"
@ -37,8 +37,7 @@
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue' import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue'
import { ElForm, ElMessageBox, ElTable } from 'element-plus' import { ElForm, ElMessageBox, ElTable } from 'element-plus'
import { localStorage } from '@/utils/storage' import { localStorage } from '@/utils/storage'
import { getQueryPageList } from '@/api/common' import { createDelivery, getPurchase } from '@/api/StockIn'
import { createDelivery } from '@/api/StockIn'
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)
const { proxy }: any = getCurrentInstance() const { proxy }: any = getCurrentInstance()
@ -51,8 +50,6 @@ let state = reactive({
loading: true, loading: true,
// //
queryParams: { queryParams: {
queryId: 'GetPurchase',
version: 'G5002',
params: { params: {
SITENAME: localStorage.get('siteName') || 'SDK', SITENAME: localStorage.get('siteName') || 'SDK',
RECEIVEREQUESTNAME: '' // RECEIVEREQUESTNAME: '' //
@ -77,14 +74,9 @@ function queryInfo() {
// //
async function handleQuery() { async function handleQuery() {
state.loading = true state.loading = true
await getQueryPageList(state.queryParams).then((res: any) => { await getPurchase(state.queryParams).then((res: any) => {
if (res.data.list.length > 0) { state.dataList = res.resultObj.list
state.dataList = res.data.list state.total = res.resultObj.total
state.total = res.data.total
} else {
state.dataList = res.data.list
proxy.$ElMessage.success('查询结果为空')
}
state.loading = false state.loading = false
}) })
} }
@ -114,6 +106,6 @@ function handleCreate() {
} }
function resetQuery() { function resetQuery() {
queryFormRef.value.resetFields(); queryFormRef.value.resetFields();
handleQuery(); queryInfo();
} }
</script> </script>