接口对接

This commit is contained in:
zzyuan 2025-07-03 18:01:47 +08:00
parent 78368dbd99
commit 44bd0ab06b
2 changed files with 97 additions and 20 deletions

View File

@ -61,9 +61,29 @@ export function editStatusSupplierApi(data) {
// 供应商资质预警列表
export function supplierQualificationWarningPageApi(data) {
return request({
url: '/smart-canteen/ims_supplier_qualification/early_warning',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}
// 供应商供货统计
export function supplyStatisticsPageApi(data) {
return request({
url: '/smart-canteen/ims_supplier/supply_statistics',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}

View File

@ -1,6 +1,40 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams.areaId"
:options="treeOptions" :filterable="true" style="width: 240px;" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="供应商名称" prop="supplierName">
<el-input
v-model="queryParams.supplierName"
placeholder="请输入供应商名称"
clearable maxlength="30"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="资质名称" prop="qualificationName">
<el-input
v-model="queryParams.qualificationName"
placeholder="请输入资质名称"
clearable maxlength="30"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="资质编号" prop="qualificationCode">
<el-input
v-model="queryParams.qualificationCode"
placeholder="请输入资质编号"
clearable maxlength="30"
style="width: 240px"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -18,15 +52,15 @@
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span> <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商编号" align="center" prop="supplierNum" :show-overflow-tooltip="true" width="120"/> <el-table-column label="供应商编号" align="center" prop="supplierCode" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120" /> <el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/> <el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="资质编号" align="center" prop="areaName" :show-overflow-tooltip="true" /> <el-table-column label="资质编号" align="center" prop="qualificationCode" :show-overflow-tooltip="true" />
<el-table-column label="资质名称" align="center" prop="areaName" :show-overflow-tooltip="true"/> <el-table-column label="资质名称" align="center" prop="qualificationName" :show-overflow-tooltip="true"/>
<el-table-column label="联系人" align="center" prop="areaName" :show-overflow-tooltip="true" /> <el-table-column label="联系人" align="center" prop="linkman" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" prop="areaName" :show-overflow-tooltip="true"/> <el-table-column label="手机号码" align="center" prop="linkmanPhone" :show-overflow-tooltip="true"/>
<el-table-column label="到期时间" align="center" prop="areaName" :show-overflow-tooltip="true" /> <el-table-column label="到期时间" align="center" prop="expirationDate" :show-overflow-tooltip="true" />
<el-table-column label="临期天数" align="center" prop="areaName" :show-overflow-tooltip="true"/> <el-table-column label="临期天数" align="center" prop="expireDays" :show-overflow-tooltip="true"/>
</el-table> </el-table>
<pagination <pagination
@ -55,7 +89,8 @@
</template> </template>
<script> <script>
import { getPageCanteenApi } from "@/api/base/canteen"; import { systemAreaTreeApi } from "@/api/base/stall";
import { supplierQualificationWarningPageApi } from "@/api/foodManage/supplierManage";
export default { export default {
name: "", name: "",
@ -76,6 +111,7 @@ export default {
total: 0, total: 0,
// //
tableListData: [], tableListData: [],
treeOptions: [],
// //
title: "", title: "",
// //
@ -83,9 +119,11 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
canteenName: undefined, areaId: null,
areaNameStr: undefined, supplierName: "",
qualificationName: "",
qualificationCode: "",
}, },
// //
form: {}, form: {},
@ -101,9 +139,16 @@ export default {
}; };
}, },
created() { created() {
// this.getList(); this.getTreeData();
this.getList();
}, },
methods: { methods: {
//
getTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeOptions = response.data;
});
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -111,6 +156,14 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
areaId: null,
supplierName: "",
qualificationName: "",
qualificationCode: "",
}
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
@ -118,11 +171,15 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
let param = { let param = {
"current": this.queryParams.pageNum, "pageNum": this.queryParams.pageNum,
"size": this.queryParams.pageSize, "pageSize": this.queryParams.pageSize,
"areaId": this.queryParams.areaId,
"supplierName": this.queryParams.supplierName,
"qualificationName": this.queryParams.qualificationName,
"qualificationCode": this.queryParams.qualificationCode,
} }
getPageCanteenApi(param).then(response => { supplierQualificationWarningPageApi(param).then(response => {
this.tableListData = response.records; this.tableListData = response.rows;
this.total = Number(response.total); this.total = Number(response.total);
this.loading = false; this.loading = false;
}); });