供应商列表接口对接
This commit is contained in:
parent
77af2e00a7
commit
aaf5ee94d7
|
|
@ -0,0 +1,91 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询 列表
|
||||||
|
export function supplierPageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_supplier/list',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function addSupplierApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_supplier/add',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function editSupplierApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_supplier/edit',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function removeSupplierApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_supplier/remove',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 变更供应商状态
|
||||||
|
export function editStatusSupplierApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_supplier/edit/status',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -84,12 +84,12 @@
|
||||||
<el-table-column label="地址" align="center" prop="address" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="地址" align="center" prop="address" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
|
<el-switch v-model="scope.row.status" active-value="1" inactive-value="2"
|
||||||
@change="handleStatusChange(scope.row)"
|
@change="handleStatusChange(scope.row)"
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -219,8 +219,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主要联系人手机号" prop="linkmanNumber">
|
<el-form-item label="主要联系人手机号" prop="linkmanPhone">
|
||||||
<el-input v-model="form.linkmanNumber" placeholder="请输入主要联系人手机号" maxlength="30" clearable/>
|
<el-input v-model="form.linkmanPhone" placeholder="请输入主要联系人手机号" maxlength="30" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -364,18 +364,18 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="主要资质" name="qualification">
|
<el-tab-pane label="主要资质" name="qualification">
|
||||||
<el-row style="height: 550px;overflow-y: auto;">
|
<el-row style="height: 550px;overflow-y: auto;">
|
||||||
<div v-for="(item,index) in mainQualificationList" :key="index">
|
<div v-for="(item,index) in mainQualificationList" :key="index">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div>{{ item.qualificationName }}</div>
|
<div>{{ item.qualificationName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="证书编号">
|
<el-form-item label="证书编号">
|
||||||
<el-input v-model="item.qualificationNum" placeholder="请输入供应商全称" maxlength="30" clearable/>
|
<el-input v-model="item.qualificationCode" placeholder="请输入供应商全称" maxlength="30" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="有效期" prop="">
|
<el-form-item label="有效期" prop="">
|
||||||
<el-date-picker v-model="item.validity"
|
<el-date-picker v-model="item.expirationDate"
|
||||||
type="date" align="right" clearable
|
type="date" align="right" clearable
|
||||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
|
|
@ -405,7 +405,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="附件管理" name="attachment">
|
<!-- <el-tab-pane label="附件管理" name="attachment">
|
||||||
<el-row style="height: 550px;overflow-y: auto;">
|
<el-row style="height: 550px;overflow-y: auto;">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="附件上传">
|
<el-form-item label="附件上传">
|
||||||
|
|
@ -430,7 +430,7 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="账户通知配置" name="notice">
|
<el-tab-pane label="账户通知配置" name="notice">
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -458,7 +458,7 @@
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { systemMaterialTreeApi } from "@/api/dish/material";
|
import { systemMaterialTreeApi } from "@/api/dish/material";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
// import { supplierPageApi,addSupplierApi, editSupplierApi, removeSupplierApi, editStatusSupplierApi } from "@/api/supplierManage/index";
|
import { supplierPageApi,addSupplierApi, editSupplierApi, removeSupplierApi, editStatusSupplierApi } from "@/api/foodManage/supplierManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -506,7 +506,7 @@ export default {
|
||||||
linkman: [
|
linkman: [
|
||||||
{ required: true, message: "主要联系人不能为空", trigger: "blur" }
|
{ required: true, message: "主要联系人不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
linkmanNumber: [
|
linkmanPhone: [
|
||||||
{ required: true, message: "主要联系人手机号不能为空", trigger: "blur" }
|
{ required: true, message: "主要联系人手机号不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
areaId: [
|
areaId: [
|
||||||
|
|
@ -524,37 +524,37 @@ export default {
|
||||||
idCardImgFNameList: [],//身份证反图片
|
idCardImgFNameList: [],//身份证反图片
|
||||||
mainQualificationList:[
|
mainQualificationList:[
|
||||||
// {
|
// {
|
||||||
// "qualificationNum": "",
|
// "qualificationCode": "",
|
||||||
// "qualificationName": "营业执照",
|
// "qualificationName": "营业执照",
|
||||||
// "validity": "",
|
// "expirationDate": "",
|
||||||
// "imgUrl": "",
|
// "imgUrl": "",
|
||||||
// "mainFlag": 1,
|
// "mainFlag": 1,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// "qualificationNum": "",
|
// "qualificationCode": "",
|
||||||
// "qualificationName": "ISO9001国际质量体系认证",
|
// "qualificationName": "ISO9001国际质量体系认证",
|
||||||
// "validity": "",
|
// "expirationDate": "",
|
||||||
// "imgUrl": "",
|
// "imgUrl": "",
|
||||||
// "mainFlag": 1,
|
// "mainFlag": 1,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// "qualificationNum": "",
|
// "qualificationCode": "",
|
||||||
// "qualificationName": "食品经营许可证",
|
// "qualificationName": "食品经营许可证",
|
||||||
// "validity": "",
|
// "expirationDate": "",
|
||||||
// "imgUrl": "",
|
// "imgUrl": "",
|
||||||
// "mainFlag": 1,
|
// "mainFlag": 1,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// "qualificationNum": "",
|
// "qualificationCode": "",
|
||||||
// "qualificationName": "烟草经营许可证",
|
// "qualificationName": "烟草经营许可证",
|
||||||
// "validity": "",
|
// "expirationDate": "",
|
||||||
// "imgUrl": "",
|
// "imgUrl": "",
|
||||||
// "mainFlag": 1,
|
// "mainFlag": 1,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// "qualificationNum": "",
|
// "qualificationCode": "",
|
||||||
// "qualificationName": "HACCP认证",
|
// "qualificationName": "HACCP认证",
|
||||||
// "validity": "",
|
// "expirationDate": "",
|
||||||
// "imgUrl": "",
|
// "imgUrl": "",
|
||||||
// "mainFlag": 1,
|
// "mainFlag": 1,
|
||||||
// }
|
// }
|
||||||
|
|
@ -583,9 +583,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
//类型树
|
//类型树
|
||||||
getTypeTreeData() {
|
getTypeTreeData() {
|
||||||
let param = {
|
let param = {}
|
||||||
// categoryType:1,
|
|
||||||
}
|
|
||||||
systemMaterialTreeApi(param).then((response) => {
|
systemMaterialTreeApi(param).then((response) => {
|
||||||
this.treeTypeOptions = response.data;
|
this.treeTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
|
|
@ -618,22 +616,26 @@ export default {
|
||||||
"linkman": this.queryParams.linkman,
|
"linkman": this.queryParams.linkman,
|
||||||
"status": this.queryParams.status
|
"status": this.queryParams.status
|
||||||
}
|
}
|
||||||
// supplierPageApi(param).then(response => {
|
supplierPageApi(param).then(response => {
|
||||||
// this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
// this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
// this.loading = false;
|
this.loading = false;
|
||||||
// });
|
});
|
||||||
},
|
},
|
||||||
// 状态修改
|
// 状态修改
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
// let text = row.status === '0' ? '启用' : '停用'
|
let text = row.status === '1' ? '启用' : '停用'
|
||||||
// this.$modal.confirm('确认要"' + text + '吗?').then(function() {
|
let param = {
|
||||||
// return updateSysIpWhitelistStatus(row.id, row.status)
|
supplierId:row.supplierId,
|
||||||
// }).then(() => {
|
status:row.status
|
||||||
// this.$modal.msgSuccess(text + '成功')
|
}
|
||||||
// }).catch(function() {
|
this.$modal.confirm('确认要"' + text + '吗?').then(function() {
|
||||||
// row.status = row.status === '0' ? '1' : '0'
|
return editStatusSupplierApi(param)
|
||||||
// })
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess(text + '成功')
|
||||||
|
}).catch(function() {
|
||||||
|
row.status = row.status === '1' ? '2' : '1'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
|
@ -686,41 +688,46 @@ export default {
|
||||||
this.idCardImgFNameList=[]
|
this.idCardImgFNameList=[]
|
||||||
this.mainQualificationList=[
|
this.mainQualificationList=[
|
||||||
{
|
{
|
||||||
"qualificationNum": "",
|
"qualificationCode": "",
|
||||||
"qualificationName": "营业执照",
|
"qualificationName": "营业执照",
|
||||||
"validity": "",
|
"qualificationType": 1,
|
||||||
|
"expirationDate": "",
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
fileList:[],
|
fileList:[],
|
||||||
"mainFlag": 1,
|
"mainFlag": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"qualificationNum": "",
|
"qualificationCode": "",
|
||||||
"qualificationName": "ISO9001国际质量体系认证",
|
"qualificationName": "ISO9001国际质量体系认证",
|
||||||
"validity": "",
|
"qualificationType": 2,
|
||||||
|
"expirationDate": "",
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
fileList:[],
|
fileList:[],
|
||||||
"mainFlag": 1,
|
"mainFlag": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"qualificationNum": "",
|
"qualificationCode": "",
|
||||||
"qualificationName": "食品经营许可证",
|
"qualificationName": "食品经营许可证",
|
||||||
"validity": "",
|
"qualificationType": 3,
|
||||||
|
"expirationDate": "",
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
fileList:[],
|
fileList:[],
|
||||||
"mainFlag": 1,
|
"mainFlag": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"qualificationNum": "",
|
"qualificationCode": "",
|
||||||
"qualificationName": "烟草经营许可证",
|
"qualificationName": "烟草经营许可证",
|
||||||
"validity": "",
|
"qualificationType": 4,
|
||||||
|
"expirationDate": "",
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
fileList:[],
|
fileList:[],
|
||||||
"mainFlag": 1,
|
"mainFlag": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"qualificationNum": "",
|
"qualificationCode": "",
|
||||||
"qualificationName": "HACCP认证",
|
"qualificationName": "HACCP认证",
|
||||||
"validity": "",
|
"qualificationType": 5,
|
||||||
|
"expirationDate": "",
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
fileList:[],
|
fileList:[],
|
||||||
"mainFlag": 1,
|
"mainFlag": 1,
|
||||||
|
|
@ -753,17 +760,17 @@ export default {
|
||||||
this.form.mainQualificationList = this.mainQualificationList
|
this.form.mainQualificationList = this.mainQualificationList
|
||||||
this.form.attachmentList = this.attachmentList
|
this.form.attachmentList = this.attachmentList
|
||||||
if (this.form.supplierId != undefined) {
|
if (this.form.supplierId != undefined) {
|
||||||
// editSupplierApi(this.form).then(response => {
|
editSupplierApi(this.form).then(response => {
|
||||||
// this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
// this.open = false;
|
this.open = false;
|
||||||
// this.getList();
|
this.getList();
|
||||||
// });
|
});
|
||||||
} else {
|
} else {
|
||||||
// addSupplierApi(this.form).then(response => {
|
addSupplierApi(this.form).then(response => {
|
||||||
// this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
// this.open = false;
|
this.open = false;
|
||||||
// this.getList();
|
this.getList();
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -771,7 +778,7 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
// return removeSupplierApi({supplierId:row.supplierId});
|
return removeSupplierApi({supplierId:[row.supplierId]});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue