feat 变更采购单查询
This commit is contained in:
parent
a82ef471a7
commit
f70b66e1c7
@ -154,4 +154,12 @@ export function createDelivery(params: any) {
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
export function getPurchase(params: any) {
|
||||
return request({
|
||||
url: '/api/delivery/getPurchase',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
@ -22,8 +22,8 @@
|
||||
<el-table border v-loading="loading" :data="state.dataList"
|
||||
highlight-current-row row-key="id" @selection-change="handleSelection">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="SITENAME" label="工厂"/>
|
||||
<el-table-column prop="RECEIVEREQUESTNAME" label="订单编号"/>
|
||||
<el-table-column prop="siteName" label="工厂"/>
|
||||
<el-table-column prop="receiveRequestName" label="订单编号"/>
|
||||
</el-table>
|
||||
<div>
|
||||
<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 { ElForm, ElMessageBox, ElTable } from 'element-plus'
|
||||
import { localStorage } from '@/utils/storage'
|
||||
import { getQueryPageList } from '@/api/common'
|
||||
import { createDelivery } from '@/api/StockIn'
|
||||
import { createDelivery, getPurchase } from '@/api/StockIn'
|
||||
|
||||
const queryFormRef = ref(ElForm)
|
||||
const { proxy }: any = getCurrentInstance()
|
||||
@ -51,8 +50,6 @@ let state = reactive({
|
||||
loading: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
queryId: 'GetPurchase',
|
||||
version: 'G5002',
|
||||
params: {
|
||||
SITENAME: localStorage.get('siteName') || 'SDK',
|
||||
RECEIVEREQUESTNAME: '' // 单号
|
||||
@ -77,14 +74,9 @@ function queryInfo() {
|
||||
// 查询
|
||||
async function handleQuery() {
|
||||
state.loading = true
|
||||
await getQueryPageList(state.queryParams).then((res: any) => {
|
||||
if (res.data.list.length > 0) {
|
||||
state.dataList = res.data.list
|
||||
state.total = res.data.total
|
||||
} else {
|
||||
state.dataList = res.data.list
|
||||
proxy.$ElMessage.success('查询结果为空')
|
||||
}
|
||||
await getPurchase(state.queryParams).then((res: any) => {
|
||||
state.dataList = res.resultObj.list
|
||||
state.total = res.resultObj.total
|
||||
state.loading = false
|
||||
})
|
||||
}
|
||||
@ -114,6 +106,6 @@ function handleCreate() {
|
||||
}
|
||||
function resetQuery() {
|
||||
queryFormRef.value.resetFields();
|
||||
handleQuery();
|
||||
queryInfo();
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user