You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-spms-vue/src/views/purchase/cert/supCertAudit.vue

644 lines
25 KiB
Vue

2 years ago
<template>
<div>
<!-- 配送企业资质 -->
<el-card>
<el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="配送企业名称:">
<el-input v-model="filterQuery.companyName" style="width: 90%" placeholder="请输入配送企业名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="统一社会信用号:">
<el-input v-model="filterQuery.creditNum" style="width: 90%" placeholder="请输入统一社会信用号"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row @row-click="supCompanyClick">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="配送企业名称" prop="companyName" show-overflow-tooltip></el-table-column>
<el-table-column label="统一社会信用号" prop="creditNum"></el-table-column>
<el-table-column label="所属地区" prop="area"></el-table-column>
<el-table-column label="详细地址" prop="detailAddr" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button
type="text"
v-if="scope.row.auditStatus ==6 || scope.row.auditStatus ==3|| scope.row.auditStatus ==4"
@click.native.stop="editCompany(scope.row)"
>审核
</el-button>
<el-button
type="text"
v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3 && scope.row.auditStatus !=4"
@click.native.stop="editCompany(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="handleCurrentChange"
></pagination>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="supCompanyVisible"
2 years ago
:before-close="close"
2 years ago
width="80%"
v-if="supCompanyVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<supCompanyEditAdudit
:closeDialog="closeDialog"
:inputQuery="inputQuery"
:editType="editType"
></supCompanyEditAdudit>
</el-dialog>
<!-- 生产企业资质 -->
<el-card class="el-card">
<el-form :model="filterManufacturerQuery" class="query-form" label-width="120px" v-show="showSearch2">
<el-row>
<el-col :span="6">
<el-form-item label="生产企业名称">
<el-input v-model="filterManufacturerQuery.companyName" style="width: 90%" placeholder="请输入生产企业名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="统一社会信用号">
<el-input v-model="filterManufacturerQuery.creditCode" style="width: 90%" placeholder="请输入统一社会信用号"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch2">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onManufacturerReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onManufacturerSubmit"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loadManufacturerLoading" :data="manufacturerList" style="width: 100%" ref="table" highlight-current-row border @row-click="supManufacturerClick">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="生产企业名称" prop="companyName" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="社会信用号" prop="creditCode"></el-table-column>
<el-table-column label="企业类型" prop="bussinessStatus" width="120">
<template slot-scope="scope">
<span>{{ companyTypeMap[scope.row.companyType] }}</span>
</template>
</el-table-column>
<el-table-column label="所在地区" prop="placeArea"></el-table-column>
<el-table-column label="所在地址" prop="placeAddress" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="所属供应商" prop="supName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.auditStatus ==6 || scope.row.auditStatus ==3|| scope.row.auditStatus ==4" @click.native.stop="addInfoDialog(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3 && scope.row.auditStatus !=4" @click.native.stop="addInfoDialog(scope.row)"></el-button>
2 years ago
</template>
</el-table-column>
</el-table>
<pagination
v-show="manufacturerTotal>0"
:total="manufacturerTotal"
:page.sync="filterManufacturerQuery.page"
:limit.sync="filterManufacturerQuery.limit"
@pagination="handleManuChange"
></pagination>
</el-card>
<el-dialog
:title="formManufacturerMap[formManufacturerName]"
:visible.sync="addInfoVisible"
width="80%"
:before-close="headClose"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addInfoVisible"
@close='closeDialog'
>
<supManufacturerAuditDialog
:addCloseDialog="closeManufacturerDialog"
:enterpriseId="enterpriseId"
:inputQuery="inputManufacturerQuery"
:editType="editManufacturerType"
></supManufacturerAuditDialog>
</el-dialog>
<!-- 配送产品资质 -->
<el-card class="el-card">
<el-form :model="registrationQuery" class="query-form" label-width="120px" v-show="showSearch3">
<el-row>
<el-col :span="6">
<el-form-item label="产品名称:">
<el-input v-model="registrationQuery.recordProductName" style="width: 90%;" clearable="true" placeholder="请输入产品名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="注册备案号:">
<el-input v-model="registrationQuery.recordCode" style="width: 90%;" clearable="true" placeholder="请输入注册备案号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="注册备案人:">
<el-input v-model="registrationQuery.recordPeopleName" style="width: 90%;" clearable="true" placeholder="请输入注册备案人"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch3">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset2"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit2"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="registrationLoading" :data="registrationList" border highlight-current-row style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="产品名称" prop="recordProductName" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="recordCode" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案人名称" prop="recordPeopleName" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufacturerName" show-overflow-tooltip></el-table-column>
<el-table-column label="所属供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus ==6 || scope.row.auditStatus ==3|| scope.row.auditStatus ==4"
@click.native.stop="registrationDialog(scope.row)"
>审核
</el-button>
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3 && scope.row.auditStatus !=4"
@click.native.stop="registrationDialog(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="certTotal>0"
:total="certTotal"
:page.sync="registrationQuery.page"
:limit.sync="registrationQuery.limit"
@pagination="certHandleCurrentChange"
></pagination>
</el-card>
<el-dialog
:title="formProductMap[formProductName]"
:visible.sync="registrationVisible"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="registrationVisible"
@close='closeProductDialog'
>
<suppliersRegistrationBasic
:closeRegistrationDialog="closeProductDialog"
:inputQuery="inputProudtQuery"
:editType="editProductType"
></suppliersRegistrationBasic>
</el-dialog>
</div>
</template>
<script>
import {getSupComapnys, delSupComapnys} from "@/api/purchase/supCompany";
import supCompanyEditAdudit from "@/views/purchase/company/supCompanyAduditDialog";
import supManufacturerAuditDialog from "@/views/purchase/manufacturer/supManufacturerAuditDialog";
import {deleteCompany, getCompanyList} from "@/api/purchase/supManufacturer";
import suppliersRegistrationBasic from "@/views/purchase/product/supProductAuditDialog";
import {deleteRegistration, getRegistrationList} from "@/api/purchase/suppliersRegistrationBasic";
export default {
data() {
return {
/**-----------------配送企业资质----------------------------*/
showSearch: true,
filterQuery: {
companyName: "",
checkType: "",
creditNum: "",
auditStatus: "21",
page: 1,
limit: 20,
},
loading: false,
list: [],
total: 0,
formName: 1,
formMap: {
1: "配送企业资质详情",
2: "配送企业资质审核",
},
checkFlag: {
0: "草稿",
1: "已通过",
2: "已拒绝",
3: "变更未审核",
6: "未审核",
},
supCompanyVisible: false,
inputQuery: {},
editType: 0, //0:新增1编辑
/**-----------------生产企业资质----------------------------*/
showSearch2: true,
filterManufacturerQuery: {
customerId: null,
companyName: "",
creditCode: "",
placeArea: "",
auditStatus: "21",
page: 1,
limit: 10,
},
manufacturerTotal: 0,
companyTypeMap: {
1: "境内企业",
2: "境外企业"
},
productManageTypeMap: {
1: "Ⅰ类",
2: "Ⅱ类",
3: "Ⅲ类",
},
formManufacturerName: 1,
formManufacturerMap: {
1: "生产企业资质详情",
2: "生产企业资质审核",
},
manufacturerLoading: false,
manufacturerList: [],
fromOptions: [],
addInfoVisible: false,
enterpriseId: "",
inputManufacturerQuery: {},
editManufacturerType: 1,
loadManufacturerLoading: false,
/**----------------------------配送产品资质--------------------------------*/
showSearch3: true,
productLoading: false,
value: "",
registrationVisible: false,
registrationQuery: {
customerId: null,
manufacturerIdFk: null,
auditStatus: "21",
recordProductName: "",
recordCode: "",
recordPeopleName: "",
page: 1,
limit: 20
},
registrationList: [],
registrationLoading: false,
pmQuery: {
customerId: null,
companyName: null,
page: 1,
limit: 10,
},
formProductName: 1,
formProductMap: {
1: "配送产品资质详情",
2: "配送产品资质审核",
},
inputProudtQuery: {},
editProductType: 0,
certTotal: 0,
};
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
6: "warning",
3: "warning",
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
0: "禁用",
1: "正常",
2: "未验证",
};
return statusMap[status];
},
},
methods: {
/**-------------------------配送企业资质--------------------------*/
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
companyName: "",
creditNum: "",
auditStatus: "21",
page: 1,
limit: 20,
};
this.getList();
this.productList = [];
this.salesmanList = [];
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
getSupComapnys(this.filterQuery)
.then((response) => {
console.log(response)
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
onSubmit() {
this.getList();
},
editCompany(row) {
if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
this.formName = 2;
this.editType = 2;
} else {
this.editType = 1;
this.formName = 1;
}
this.supCompanyVisible = true;
this.inputQuery = row;
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
deleteDialog(row) {
this.$confirm("删除后将清空该供应商以及所有关联信息?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let tQuery = {
id: row.customerId,
};
delSupComapnys(tQuery).then(() => {
this.getList();
});
})
.catch(() => {
});
},
closeDialog() {
this.supCompanyVisible = false;
},
supCompanyClick(row) {
this.filterManufacturerQuery.customerId = row.customerId;
this.onManufacturerReset();
},
/**-------------------------生产企业资质--------------------------*/
onManufacturerReset() {
let customerId = this.filterManufacturerQuery.customerId;
this.filterManufacturerQuery = {
customerId: customerId,
companyName: "",
creditCode: "",
placeArea: "",
page: 1,
auditStatus: "21",
limit: 10,
};
this.manufacturerList = [];
this.getManufacturerList();
},
2 years ago
close(){
this.getList();
this.supCompanyVisible=false;
},
2 years ago
headClose(){
this.addInfoVisible = false;
this.getManufacturerList();
},
onManufacturerSubmit() {
2 years ago
this.onManufacturerReset();
this.addInfoVisible=false;
2 years ago
},
hideSearch2() {
this.showSearch2 = !this.showSearch2;
},
getManufacturerList() {
this.manufacturerLoading = true;
getCompanyList(this.filterManufacturerQuery)
.then((response) => {
this.manufacturerLoading = false;
this.manufacturerList = response.data.list || [];
this.manufacturerTotal = response.data.total || 0;
})
.catch(() => {
this.manufacturerLoading = false;
this.manufacturerList = [];
this.total = 0;
});
},
addInfoDialog(row) {
if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
this.editManufacturerType = 2;
this.formManufacturerName = 2;
} else {
this.editManufacturerType = 1;
this.formManufacturerName = 1;
}
this.enterpriseId = row.id;
this.inputManufacturerQuery = row;
this.addInfoVisible = true;
},
closeManufacturerDialog(type) {
if(type==true){
this.addInfoVisible = false;
this.enterpriseId = null;
this.manufacturerList = [];
this.getManufacturerList();
}else{
this.getManufacturerList();
}
},
handleManuChange(val) {
this.filterManufacturerQuery.page = val.page;
this.getManufacturerList();
},
supManufacturerClick(row) {
this.registrationQuery.customerId = row.customerId;
this.registrationQuery.manufacturerIdFk = row.manufacturerId;
this.onReset2();
},
/**-------------------------配送产品资质--------------------------*/
onReset2() {
let customerId = this.registrationQuery.customerId;
let manufacturerIdFk = this.registrationQuery.manufacturerIdFk;
this.registrationQuery = {
customerId: customerId,
manufacturerIdFk: manufacturerIdFk,
recordProductName: "",
recordCode: "",
recordPeopleName: "",
auditStatus: "21",
page: 1,
limit: 10
};
this.getRegistrationList();
},
onSubmit2() {
this.getRegistrationList();
},
hideSearch3() {
this.showSearch3 = !this.showSearch3;
},
registrationDialog(row) {
if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
this.formProductName = 2;
this.editProductType = 2;
} else {
this.editProductType = 1;
this.formProductName = 1;
}
this.registrationId = row.id;
this.inputProudtQuery = row;
this.registrationVisible = true;
},
closeProductDialog() {
this.registrationVisible = false;
this.enterpriseId = null;
this.registrationId = null;
this.registrationList = [];
this.getRegistrationList();
},
getRegistrationList() {
this.registrationLoading = true;
getRegistrationList(this.registrationQuery)
.then((response) => {
this.registrationLoading = false;
this.registrationList = response.data.list || [];
this.certTotal= response.data.total
})
.catch(() => {
this.registrationLoading = false;
this.registrationList = [];
});
},
certHandleCurrentChange(val) {
this.registrationQuery.page = val.page;
this.getRegistrationList();
}
},
components: {
supCompanyEditAdudit, supManufacturerAuditDialog, suppliersRegistrationBasic
}
,
created() {
this.getList();
},
};
</script>