代码更新备份

master
1178634255 2 years ago
parent 1b6921c9a9
commit 0fa3850e6a

@ -38,10 +38,10 @@
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="validDate">
<el-form-item prop="vailDate">
<el-date-picker
v-model="formData.validDate"
v-model="formData.vailDate"
type="date"
:disabled="formData.auditStatus == 1"
value-format="yyyy-MM-dd"
@ -71,12 +71,12 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>证书备注</span>
<span>备注</span>
</div>
</el-col>
<el-col :span="8">
@ -85,19 +85,28 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="4">-->
<!-- </el-col>-->
<!-- <el-col :span="16">-->
<!-- <div style="color: red">-->
<!-- 需要上传档案为营业执照电子档案经营许可证电子档案经营备案证电子档案开户行电子档案-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>证书照片</span>
<span>文件</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item>
<el-upload
:disabled="formData.auditStatus == 1"
class="upload-demo"
ref="upload"
:action="this.uploadUrl"
@ -133,11 +142,10 @@
</template>
<script>
import {isertCert, filterCompanyCert, updateCert} from "@/api/sup/userCert";
import draggable from "vuedraggable";
import store from "../../../store";
import {insertCompanyCert, updateCompanyCert} from "../../../api/purchase/companyCert";
import ElImageViewer from "element-ui/packages/image/src/image-viewer"
export default {
name: "supCompanyCertAdd",
@ -154,10 +162,11 @@ export default {
type: Object,//1:2
required: true,
},
ucId: {
addType: {
type: Object,
required: true,
},
},
data() {
return {
@ -165,14 +174,14 @@ export default {
code: "",
isCleck: false,
formData: {
validDate: null,
type: 0,
vailDate: null,
expireDate: null,
remark: null,
checkComment:null,
code: null,
name: null,
manufacturerIdFk: null,
status: null,
auditStatus: 6
},
formRules: {
name: [
@ -191,11 +200,94 @@ export default {
};
},
components: {
draggable,
ElImageViewer
},
methods: {
uploadHandlePreview(file) {
console.log(file);
console.log(this.fileList);
submitUpload() {
this.$refs["dataForm"].validate(valid => {
if (valid) {
if (this.formData.auditStatus == 1) {
this.$confirm("该证书已审核通过,是否重新提交审核?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.onConfirmSubmit(1);
})
.catch(() => {
});
} else {
this.onConfirmSubmit();
}
}
});
},
onConfirmSubmit(val) {
this.formData.repeatUpload = val;
console.log(this.formData)
if (this.$isNotBlank(this.formData.filePath)) {
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
this.onSubmit();
} else {
this.onSubmit();
}
} else {
console.log(this.$refs.upload.uploadFiles.length);
if (this.$refs.upload.uploadFiles.length > 0) {
this.$refs.upload.submit();
} else {
this.$message.warning(`请选择文件`);
}
}
},
onSubmit() {
this.formData.customerId = this.inputQuery.customerId;
if (this.formData.customerId == null) {
this.formData.customerId = store.getters.customerId
}
this.formData.type = this.addType;
//1:2.3.
if (this.addType == 2) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerId;
} else if (this.addType == 3) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
this.formData.productIdFk = this.inputQuery.productId;
}
if (this.formData.auditStatus != 1)
this.formData.auditStatus = "6";
if (this.editTye == 1) {
insertCompanyCert(this.formData).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
} else {
updateCompanyCert(this.formData).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
}
},
uploadHandleRemove(file, fileList) {
this.formData.filePath = "";
@ -203,6 +295,10 @@ export default {
this.formData.filePath += fileList[i].response.data.name + ",";
}
},
uploadHandlePreview(file) {
console.log(file);
console.log(this.fileList);
},
uploadHandleExceed(files, fileList) {
},
@ -248,48 +344,17 @@ export default {
},
submitUpload(){
if(this.editTye == 1){
this.onConfirmSubmit();
}else{
this.updateCert();
}
},
onConfirmSubmit() {
this.formData.businessId=this.ucId;
isertCert(this.formData).then( (res)=>{
if(res.code == 20000){
this.$message.success("添加成功!")
this.closeDialog();
}
})
toViewCompanyCert() {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + this.formData.filePath);
},
updateCert(){
updateCert(this.formData).then((res)=>{
if(res.code == 20000){
this.$message.success("修改成功!")
this.closeDialog();
}else{
this.$message.error(res.message);
}
})
},
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file";
@ -298,9 +363,12 @@ export default {
ADMIN_TOKEN: store.getters.token,
};
if (this.inputQuery.formData == null) {
this.formData = {};
this.formData = {}
} else if (this.inputQuery.formData != null && this.inputQuery.formData.addType == 1) {
this.formData = {}
} else {
this.formData = this.inputQuery.formData;
console.log(this.inputQuery.formData);
}
if (this.formData.filePath != null) {
this.choiceFile = "更换文件";
@ -308,7 +376,6 @@ export default {
} else {
this.choiceFile = "选取文件";
}
},
};
</script>

@ -0,0 +1,723 @@
<template>
<div>
<!-- 配送企业资质 -->
<el-card>
<el-form :model="filterQuery" class="query-form" 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="请输入配送企业名称" clearable></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="请输入统一社会信用号" clearable></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="180">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.auditStatus ==6 || scope.row.auditStatus ==3" @click.native.stop="editCompany(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3" @click.native.stop="editCompany(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3" @click.native="printSupCertPdf(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"
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="showSearch1">
<el-row>
<el-col :span="6">
<el-form-item label="生产企业名称">
<el-input v-model="filterManufacturerQuery.companyName" style="width: 90%" placeholder="请输入生产企业名称" clearable></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="请输入统一社会信用号" clearable></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="hideSearch1">/</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%" border highlight-current-row @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="180">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.auditStatus ==6 || scope.row.auditStatus ==3" @click.native.stop="addInfoDialog(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3" @click.native.stop="addInfoDialog(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3" @click.native="printSupCertManufacturerPdf(scope.row)"></el-button>
</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%"
: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="100px" v-show="showSearch2">
<el-row style="width: 100%">
<el-form-item label="物资名称:">
<el-input v-model="registrationQuery.recordProductName" style="width: 90%" clearable="true" placeholder="请输入物资名称"></el-input>
</el-form-item>
<el-form-item label="注册备案号:">
<el-input v-model="registrationQuery.recordCode" style="width: 90%" clearable="true" placeholder="请输入注册备案号"></el-input>
</el-form-item>
<el-form-item label="注册备案人:">
<el-input v-model="registrationQuery.recordPeopleName" style="width: 90%" clearable="true" placeholder="请输入注册备案人"></el-input>
</el-form-item>
</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="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="180">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.auditStatus ==6 || scope.row.auditStatus ==3" @click.native.stop="registrationDialog(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3" @click.native.stop="registrationDialog(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus !=6 && scope.row.auditStatus !=3" @click.native="printSupCertProductionPdf(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, printSupCert, verifyTemplateFile,filterCompanyCertIdList,printSupCertManufacturer,printSupCertProduction} 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: "22",
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
/**-----------------生产企业资质----------------------------*/
showSearch1:true,
filterManufacturerQuery: {
customerId: null,
companyName: "",
creditCode: "",
placeArea: "",
auditStatus: "22",
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,
/**----------------------------配送产品资质--------------------------------*/
showSearch2:true,
productLoading: false,
value: "",
registrationVisible: false,
registrationQuery: {
customerId: null,
manufacturerIdFk: null,
auditStatus: "22",
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",
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
0: "禁用",
1: "正常",
2: "未验证",
};
return statusMap[status];
},
},
methods: {
/**-------------------------配送企业资质--------------------------*/
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
companyName: "",
creditNum: "",
auditStatus: "22",
page: 1,
limit: 20,
};
this.getList();
this.productList = [];
this.salesmanList = [];
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
getSupComapnys(this.filterQuery)
.then((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) {
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: "22",
limit: 10,
};
this.manufacturerList = [];
this.getManufacturerList();
},
hideSearch1() {
this.showSearch1 = !this.showSearch1;
},
onManufacturerSubmit() {
this.manufacturerList = [];
this.getManufacturerList();
},
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.manufacturerTotal = 0;
});
},
addInfoDialog(row) {
if (row.auditStatus == 6 || row.auditStatus == 3) {
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) {
this.addInfoVisible = false;
this.enterpriseId = null;
this.manufacturerList = [];
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: "22",
page: 1,
limit: 10
};
this.getRegistrationList();
},
onSubmit2() {
this.getRegistrationList();
},
hideSearch2() {
this.showSearch2 = !this.showSearch2;
},
registrationDialog(row) {
if (row.auditStatus == 6 || row.auditStatus == 3) {
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 || 0;
})
.catch(() => {
this.registrationLoading = false;
this.registrationList = [];
this.certTotal = 0;
});
},
certHandleCurrentChange(val) {
this.registrationQuery.page = val.page;
this.getRegistrationList();
},
printSupCertPdf(row) {
let query = {id: 1};
this.loading = true;
verifyTemplateFile(query).then((res) => {
if (res.code === 20000) {
//id
var supCertQuery={
customerId:row.customerId,
type:1
};
filterCompanyCertIdList(supCertQuery).then((req) => {
if(req.code===20000){
let printParams = {
templateId: res.data,
ids: req.data,
customerId: row.customerId
};
printSupCert(printParams).then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
})
}
})
} else {
this.loading = false;
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
})
},
//
printSupCertManufacturerPdf(row) {
let query = {id: 2};
this.loading = true;
verifyTemplateFile(query).then((res) => {
if (res.code === 20000) {
//id
var supCertQuery={
customerId:row.customerId,
manufacturerIdFk:row.manufacturerId,
type:2
};
filterCompanyCertIdList(supCertQuery).then((req) => {
if(req.code===20000){
let printParams = {
templateId: res.data,
ids: req.data,
id: row.id
};
printSupCertManufacturer(printParams).then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
})
}
})
} else {
this.loading = false;
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
})
},
//
printSupCertProductionPdf(row) {
let query = {id: 3};
this.loading = true;
verifyTemplateFile(query).then((res) => {
if (res.code === 20000) {
//id
var supCertQuery={
customerId:row.customerId,
manufacturerIdFk:row.manufacturerIdFk,
productIdFk:row.productId,
type:3
};
filterCompanyCertIdList(supCertQuery).then((req) => {
if(req.code===20000){
let printParams = {
templateId: res.data,
ids: req.data,
id: row.id
};
printSupCertProduction(printParams).then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
})
}
})
} else {
this.loading = false;
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
})
},
},
components: {
supCompanyEditAdudit, supManufacturerAuditDialog, suppliersRegistrationBasic
}
,
mounted() {
},
created() {
this.getList();
},
};
</script>

@ -0,0 +1,761 @@
<template>
<div>
<el-card>
<div>
<p class="form-title">配送企业资质设置</p>
</div>
<div style=" float: right; text-align: right; margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addCert" style="text-align:right">添加设置</el-button>
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="require" s>
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="handleEdit(scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click="handleDel( scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="handleCurrentChange"
></pagination>
<el-dialog
:title="formMap[formName]"
:visible.sync="addDialogVisible"
width="60%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
>
<el-form :model="currentSup" :rules="formRules" label-width="100px" ref="dataForm">
<el-row>
<el-col :span="11">
<el-form-item label="证书名称:" prop="name">
<el-input v-model="currentSup.name" style="width: 90%" auto-complete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="是否必传:" prop="need">
<el-select style="width: 90%" v-model="currentSup.need">
<el-option label="是" :value=true></el-option>
<el-option label="否" :value=false></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="说明:" prop="remark">
<el-input v-model="currentSup.remark" style="width: 95.5%" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
</el-card>
<el-card>
<div>
<p class="form-title">生产企业资质设置</p>
</div>
<div style=" float: right;
text-align: right;
margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addManufacturerCert" style="text-align:right">添加设置</el-button>
</div>
<el-table v-loading="loading" :data="manufacturerList" style="width: 100%" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="产地" prop="foreign">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.foreign] }}</span>
</template>
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="handleManufacturerEdit( scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click="handleManufacturerDel( scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="manufacturerTotal>0"
:total="manufacturerTotal"
:page.sync="manufacturerQuery.page"
:limit.sync="manufacturerQuery.limit"
@pagination="handleManufacturerChange"
></pagination>
<el-dialog
:title="formManufacturerMap[formManufacturerName]"
:visible.sync="addManufacturerDialogVisible"
width="60%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addManufacturerDialogVisible"
:isShow="false"
>
<el-form :model="currentManufacturer" label-width="100px" :rules="formManufactureRules" ref="dataManufacturerForm">
<el-row>
<el-col :span="11">
<el-form-item label="证书名称:" prop="name">
<el-input v-model="currentManufacturer.name" auto-complete="off" :disabled="currentManufacturer.need"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="产地:" prop="foreign">
<el-select v-model="currentManufacturer.foreign" style="width: 100%" :disabled="currentManufacturer.need">
<el-option label="全部" :value="1"></el-option>
<el-option label="国外" :value="2"></el-option>
<el-option label="国内" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" v-if="isShow">
<el-form-item label="是否禁用:" prop="need">
<el-select v-model="currentManufacturer.need" style="width: 100%">
<el-option label="是" :value=true></el-option>
<el-option label="否" :value=false></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="说明:" prop="remark">
<el-input v-model="currentManufacturer.remark" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddManufacturerSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
</el-card>
<el-card>
<div>
<p class="form-title">产品资质设置</p>
</div>
<div style="float:right;
text-align: right;
margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addProductCert" style="text-align:right">添加设置</el-button>
</div>
<el-table v-loading="productLoading" :data="productList" style="width: 100%" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="产地" prop="imports">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.imports] }}</span>
</template>
</el-table-column>
<el-table-column label="产品类型" prop="cplx">
</el-table-column>
<el-table-column label="产品类别" prop="hchzsb">
</el-table-column>
<el-table-column label="分类编码" prop="flbm">
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="handleProductEdit( scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click="handleProductDel( scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="productTotal>0"
:total="productTotal"
:page.sync="productQuery.page"
:limit.sync="productQuery.limit"
@pagination="handleProductChange"
></pagination>
<el-dialog
:title="formProductMap[formProductName]"
:visible.sync="addProductDialogVisible"
width="60%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addProductDialogVisible"
:isShow="false"
>
<el-form :model="currentProduct" label-width="100px" :rules="formRules" ref="dataForm">
<el-row>
<el-col :span="11">
<el-form-item label="证书名称" prop="name">
<el-input v-model="currentProduct.name" style="width: 90%" auto-complete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" v-if="isShow" >
<el-form-item label="是否禁用:" prop="need">
<el-select v-model="currentProduct.need" style="width: 90%">
<el-option label="禁用" :value=true></el-option>
<el-option label="启用" :value=false></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="产品类型:" prop="require">
<el-select v-model="currentProduct.cplx" style="width: 90%">
<el-option label="全部" key="全部" value="全部"></el-option>
<el-option label="器械" key="器械" value="器械"></el-option>
<el-option label="试剂" key="试剂" value="试剂"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="产品类别:" prop="require">
<el-select v-model="currentProduct.hchzsb" style="width: 90%">
<el-option label="全部" value="全部"></el-option>
<el-option label="耗材" value="耗材"></el-option>
<el-option label="设备" value="设备"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="产地:" prop="require">
<el-select v-model="currentProduct.imports" style="width: 90%">
<el-option label="全部" value="1"></el-option>
<el-option label="国外" value="2"></el-option>
<el-option label="国内" value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="说明:" prop="remark">
<el-input v-model="currentProduct.remark" style="width: 90%" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="分类编码:" prop="require">
<el-select
v-model="currentProduct.flbmList"
filterable
remote
clearable="true"
style="width: 90%"
multiple
reserve-keyword
placeholder="请选择"
:remote-method="classifySearch"
:loading="loading"
>
<el-option
v-for="item in classifyList"
:key="item.code"
:label="item.name"
:value="item.code">
<span>{{ item.code }}</span>
<span>{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddProductSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet";
import {filterClassify} from "@/api/purchase/classifyCode"
export default {
data() {
return {
/**--------配送企业资质设置--------------*/
query: {
type: 1,
page: 1,
limit: 20
},
list: [],
total: 0,
loading: false,
enableMap: {
true: "是",
false: "否",
},
addDialogVisible: false,
currentSup: {},
formName: "add",
formMap: {
add: "新增配送企业资质设置",
update: "编辑配送企业资质设置",
},
formRules: {
name: [
{required: true, message: "证书名称", trigger: "blur"}
],
need: [
{required: true, message: "是否必传", trigger: "blur"}
],
},
/**--------生产企业资质设置 --------------*/
manufacturerList: [],
manufacturerQuery: {
type: 2,
page: 1,
limit: 20
},
statusMap: {
true: "禁用",
false: "启用",
},
foreignMap: {
"1": "全部",
"2": "国外",
"3": "国内",
},
manufacturerTotal: 0,
manufacturerLoading: false,
addManufacturerDialogVisible: false,
currentManufacturer: {},
formManufacturerName: "add",
formManufacturerMap: {
add: "新增生产企业资质设置",
update: "编辑生产企业资质设置",
},
formManufactureRules: {
name: [
{required: true, message: "请输入证书名称", trigger: "blur"}
],
},
/**--------产品资质设置--------------*/
productList: [],
productQuery: {
type: 3,
page: 1,
limit: 20
},
productTotal: 0,
productLoading: false,
addProductDialogVisible: false,
currentProduct: {},
formProductName: "add",
formProductMap: {
add: "新增产品资质设置",
update: "编辑产品资质设置",
},
classifyList: [],
mutilData: [],
inputKey: null,
};
},
methods: {
/**--------配送企业资质设置--------------*/
handleCurrentChange(val) {
this.query.page = val.page;
this.getList();
},
getList() {
this.loading = true;
filterCertSet(this.query)
.then(response => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleEdit(row) {
this.formName = "update";
this.currentSup = row;
this.addDialogVisible = true;
},
handleDel(row) {
let query = {
id: row.id,
}
delSupCertCert(query)
.then((response) => {
this.getList();
})
.catch(() => {
});
},
addCert() {
this.formName = "add";
this.currentSup = {};
this.addDialogVisible = true;
},
onAddSubmit() {
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.addDialogVisible = false;
if (this.formName == "add") {
this.currentSup.type = 1;
addSupCertSet(this.currentSup)
.then((response) => {
if(response.code==20000){
this.getList();
}else{
this.$message.error(response.message);
}
})
.catch(() => {
});
} else {
modifySupCertSet(this.currentSup).then((res) => {
if (res.code == 20000) {
this.getList();
this.$message.success("保存成功!");
} else {
this.getList();
this.$message.error(res.message);
}
})
}
}
});
},
cancelDialog() {
this.getList();
this.getManufacturerList();
this.getProductList();
this.addDialogVisible = false;
this.addManufacturerDialogVisible = false;
this.addProductDialogVisible = false;
},
/**--------生产企业资质设置--------------*/
handleManufacturerChange(val) {
this.manufacturerQuery.page = val.page;
this.getManufacturerList();
},
getManufacturerList() {
this.manufacturerLoading = true;
filterCertSet(this.manufacturerQuery)
.then(response => {
this.manufacturerLoading = false;
this.manufacturerList = response.data.list || [];
this.manufacturerTotal = response.data.total || 0;
})
.catch(() => {
this.manufacturerLoading = false;
this.manufacturerList = [];
this.manufacturerTotal = 0;
});
},
handleManufacturerEdit(row) {
this.formManufacturerName = "update";
this.currentManufacturer = row;
this.addManufacturerDialogVisible = true;
},
handleManufacturerDel(row) {
let query = {
id: row.id,
}
delSupCertCert(query)
.then((response) => {
this.getManufacturerList();
})
.catch(() => {
});
},
addManufacturerCert() {
this.formManufacturerName = "add";
this.currentManufacturer = {};
this.addManufacturerDialogVisible = true;
},
onAddManufacturerSubmit() {
this.$refs["dataManufacturerForm"].validate(valid => {
if (valid) {
this.addManufacturerDialogVisible = false;
if (this.formManufacturerName == "add") {
this.currentManufacturer.type = 2;
addSupCertSet(this.currentManufacturer)
.then((response) => {
if(response.code==20000){
this.getManufacturerList();
}else{
this.$message.error(response.message);
}
})
.catch(() => {
});
} else {
modifySupCertSet(this.currentManufacturer).then((res) => {
if (res.code == 20000) {
this.getManufacturerList();
this.$message.success("保存成功!");
} else {
this.getManufacturerList();
this.$message.error(res.message);
}
})
}
}
});
},
/**--------产品资质设置--------------*/
handleProductChange(val) {
this.productQuery.page = val.page;
this.getProductList();
},
getProductList() {
this.productLoading = true;
filterCertSet(this.productQuery)
.then(response => {
this.productLoading = false;
this.productList = response.data.list || [];
this.productTotal = response.data.total || 0;
})
.catch(() => {
this.productLoading = false;
this.productList = [];
this.productTotal = 0;
});
},
handleProductEdit(row) {
this.formProductName = "update";
this.currentProduct = row;
this.addProductDialogVisible = true;
this.classifyFirstSearch(this.currentProduct.flbm);
},
handleProductDel(row) {
let query = {
id: row.id,
}
delSupCertCert(query)
.then((response) => {
this.getProductList();
})
.catch(() => {
});
},
addProductCert() {
this.formProductName = "add";
this.currentProduct = {};
this.addProductDialogVisible = true;
},
onAddProductSubmit() {
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.addProductDialogVisible = false;
if (this.formProductName == "add") {
this.currentProduct.type = 3;
addSupCertSet(this.currentProduct)
.then((response) => {
if(response.code==20000){
this.getProductList();
}else{
this.$message.error(response.message);
}
})
.catch(() => {
});
} else {
modifySupCertSet(this.currentProduct).then((res) => {
if (res.code == 20000) {
this.getProductList();
this.$message.success("保存成功!");
} else {
this.getProductList();
this.$message.error(res.message);
}
})
}
}
})
},
classifyFirstSearch(key) {
let query = {
inFilter: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
classifySearch(key) {
let query = {
key: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
},
filters: {},
mounted() {
},
created() {
//
this.getList();
this.getManufacturerList();
this.getProductList();
}
};
</script>
<style scoped
>
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
}
</style>

@ -0,0 +1,180 @@
<template>
<div>
<el-card style="margin-top: -20px">
<div style="float: right;margin-bottom: 10px;margin-right: 25px">
<el-button type="primary" size="small" @click="selectSet()"></el-button>
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row @selection-change="handleCheckedChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="是否必传" prop="require" v-if="certType == 1">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.need] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="foreign" v-if="certType == 2">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.foreign] }}</span>
</template>
</el-table-column>
<el-table-column label="产地" prop="imports" v-if="certType == 3">
<template slot-scope="scope">
<span>{{ foreignMap[scope.row.imports] }}</span>
</template>
</el-table-column>
<el-table-column label="器械类别" prop="cplx" v-if="certType == 3">
</el-table-column>
<el-table-column label="产品类别" prop="hchzsb" v-if="certType == 3">
</el-table-column>
<el-table-column label="分类编码" prop="flbm" v-if="certType == 3">
</el-table-column>
<el-table-column label="说明" prop="remark"></el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {filterCertSet, selectAllCert} from "@/api/purchase/supCertSet";
export default {
name: "supCertSetDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
certType: { //1.2.3)
type: Object,
required: true,
},
manufacturerId: {
type: Object,
required: true,
},
productId: {
type: Object,
required: true,
},
customerId:{
type: Object,
required: true,
},
},
data() {
return {
query: {
manufacturerIdFk: null,
type: 1,
page: 1,
limit: 20
},
multipleSelection: [],
enableMap: {
true: "是",
false: "否",
},
list: [],
total: 0,
loading: false,
foreignMap: {
"1": "全部",
"2": "国外",
"3": "国内",
},
};
},
methods: {
handleCheckedChange(val) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
this.query.page = val.page;
this.getList();
},
getList() {
this.loading = true;
this.query.type = this.certType;
filterCertSet(this.query)
.then(response => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
selectSet() {
let postQuery = {
certType: this.certType,
manufacturerIdFk: this.manufacturerId,
productIdFk: this.productId,
supCertSetEntities: this.multipleSelection,
customerId:this.customerId,
};
selectAllCert(postQuery)
.then(response => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error(response.message);
});
},
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getList();
},
}
</script>
<style scoped>
</style>

@ -0,0 +1,672 @@
<template>
<!-- 首营品种资质 -->
<div>
<!---生产企业资质----->
<el-card>
<el-form
:model="filterQuery"
class="query-form"
label-width="100px"
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.creditCode"
style="width: 90%"
placeholder="请输入社会信用号"
></el-input>
</el-form-item>
</el-col>
<el-col span="6">
<el-form-item label="处理状态:">
<el-select
v-model="filterQuery.auditStatus"
style="width: 90%"
placeholder="请输入处理状态"
>
<el-option label="全部" value=""></el-option>
<el-option label="草稿" value="0"></el-option>
<el-option label="未审核" value="6"></el-option>
<el-option label="变更未审核" value="3"></el-option>
<el-option label="已审核" value="1"></el-option>
<el-option label="已拒绝" value="2"></el-option>
</el-select>
</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 type="primary" icon="el-icon-plus" @click="addInfoDialog()"
>添加</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
@current-change="supManufacturerClick"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="企业名称"
prop="companyName"
width="250"
></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
></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"
@click.native.stop="addInfoDialog(scope.row)"
>编辑</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.auditStatus === 1"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus === 2"
@click.native.stop="rejectInfo(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-dialog
:title="formMap[formName]"
:visible.sync="addInfoVisible"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addInfoVisible"
@close="closeDialog"
>
<suppliersEnterpriseBasicAdd
:addCloseDialog="closeDialog"
:inputQuery="inputQuery"
:editType="editType"
:fromType="fromType"
></suppliersEnterpriseBasicAdd>
</el-dialog>
</el-card>
<!---配送企业资质----->
<el-card class="el-card">
<el-form
:model="registrationQuery"
class="query-form"
style="margin-top: 5px"
v-show="showSearch2"
label-width="100px"
>
<el-row>
<el-col span="6">
<el-form-item label="物资名称:">
<el-input
v-model="registrationQuery.recordProductName"
style="width: 90%"
clearable
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
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
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="onReset2"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" @click="onSubmit2"
>查询</el-button
>
<el-button
type="primary"
icon="el-icon-plus"
@click="registrationDialog()"
>添加</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table
v-loading="registrationLoading"
:data="registrationList"
style="width: 100%"
border
highlight-current-row
>
<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"
@click.native.stop="registrationDialog(scope.row)"
>编辑</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.auditStatus === 1"
@click.native="deleteRegistration(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-dialog
:title="formProductMap[formName]"
:visible.sync="registrationVisible"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="registrationVisible"
@close="closeProductDialog"
>
<suppliersRegistrationBasic
:closeRegistrationDialog="closeProductDialog"
:inputQuery="curProductQuery"
:editType="editProductType"
:currentManufacturer="currentManufacturer"
></suppliersRegistrationBasic>
</el-dialog>
</el-card>
</div>
</template>
<script>
import {
deleteCompany,
getCompanyList,
getCompanyBySup,
} from "../../../api/purchase/supManufacturer";
import suppliersEnterpriseBasicAdd from "@/views/purchase/manufacturer/supManufacturerEditDialog";
import {
getRegistrationList,
deleteRegistration,
} from "../../../api/purchase/suppliersRegistrationBasic";
import suppliersRegistrationBasic from "@/views/purchase/product/supProductEditDialog";
export default {
name: "supCertificationAdd",
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
showSearch2: true,
/**------------------生产企业资质--------------------*/
filterQuery: {
customerId: null,
companyName: "",
auditStatus: null,
creditCode: "",
placeArea: "",
page: 1,
limit: 20,
},
total: 0,
companyTypeMap: {
1: "境内企业",
2: "境外企业",
},
productManageTypeMap: {
1: "Ⅰ类",
2: "Ⅱ类",
3: "Ⅲ类",
},
checkFlag: {
0: "草稿",
1: "已通过",
2: "已拒绝",
3: "变更未审核",
6: "未审核",
},
loading: false,
list: [],
addInfoVisible: false,
fileUrl: "",
inputQuery: {
auditStatus: 6,
},
editType: 1,
fromType: 1, //1:2:
formMap: {
add: "新增生产企业资质信息",
update: "编辑生产企业资质信息",
},
currentManufacturer: null,
/**------------------配送企业资质--------------------*/
registrationVisible: false,
enterpriseId: "",
registrationQuery: {
auditStatus: null,
customerId: null,
manufacturerIdFk: null,
recordProductName: "",
recordCode: "",
recordPeopleName: "",
page: 1,
limit: 20,
},
registrationList: [],
certTotal: 0,
registrationLoading: false,
registrationId: "",
pmQuery: {
customerId: null,
companyName: null,
page: 1,
limit: 10,
},
curProductQuery: {
auditStatus: 6,
},
editProductType: 0,
formName: "add",
formProductMap: {
add: "新增配送产品资质信息",
update: "编辑配送产品资质信息",
},
};
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
3: "warning",
6: "warning",
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
0: "禁用",
1: "正常",
2: "未验证",
};
return statusMap[status];
},
},
methods: {
/**-------------------------生产企业资质---------------------*/
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
customerId: null,
companyName: "",
creditCode: "",
placeArea: "",
auditStatus: "",
page: 1,
limit: 20,
};
this.getList();
this.registrationList = [];
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
this.registrationList = [];
this.currentManufacturer = null;
},
toViewRegistrationCert(row, num) {
let path = num === 1 ? row.filePath : row.instructions;
window.open(this.fileUrl + path);
},
getList() {
this.loading = true;
this.filterQuery.customerId = this.$store.getters.customerId;
getCompanyBySup(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
hideSearch2() {
this.showSearch2 = !this.showSearch2;
},
addInfoDialog(row) {
if (this.$isNotBlank(row)) {
this.enterpriseId = row.id;
this.editType = 1;
this.inputQuery = row;
} else {
this.enterpriseId = null;
this.editType = 0;
this.inputQuery = {
auditStatus: 0,
};
}
this.addInfoVisible = true;
},
closeDialog(type) {
this.addInfoVisible = false;
this.registrationVisible = false;
this.enterpriseId = null;
this.registrationId = null;
this.getList();
this.registrationList = [];
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
handleCheckedChange(val) {
console.log(val);
console.log(this.check);
},
rejectInfo(row) {
this.$confirm(row.auditComment, "驳回说明", {
confirmButtonText: "确定",
type: "warning",
showCancelButton: false,
}).then(() => {});
},
deleteDialog(row) {
this.$confirm("删除后将清空该生产企业以及所有关联信息?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let tQuery = {
id: row.id,
};
deleteCompany(tQuery).then(() => {
this.getList();
});
})
.catch(() => {});
},
supManufacturerClick(row) {
this.registrationQuery.customerId = row.customerId;
this.registrationQuery.manufacturerIdFk = row.manufacturerId;
this.getRegistrationList();
this.currentManufacturer = row;
},
/**---------------------------配送产品资质----------------------*/
onReset2() {
//
if (this.currentManufacturer != null) {
this.registrationQuery = {
customerId: this.registrationQuery.customerId,
manufacturerIdFk: this.registrationQuery.manufacturerIdFk,
recordProductName: "",
recordCode: "",
recordPeopleName: "",
auditStatus: null,
page: 1,
limit: 20,
};
this.getRegistrationList();
}
},
onSubmit2() {
if (this.currentManufacturer == null) {
this.$message.error("请先选中生产企业!");
return;
}
this.registrationQuery.page = 1;
this.getRegistrationList();
},
registrationDialog(row) {
if (this.currentManufacturer == null) {
this.$message.error("请先选中生产企业!");
return;
}
if (this.$isNotBlank(row)) {
this.registrationId = row.id;
this.curProductQuery = row;
this.curProductQuery.cuStatus = this.currentManufacturer.auditStatus;
this.curProductQuery.manufacturerId =
this.registrationQuery.manufacturerIdFk;
this.formName = "update";
this.editProductType = 1;
} else {
this.editProductType = 0;
this.formName = "add";
this.curProductQuery = {
auditStatus: 0,
cuStatus: this.currentManufacturer.auditStatus,
manufacturerId: this.registrationQuery.manufacturerIdFk,
};
}
this.registrationVisible = true;
},
deleteRegistration(row) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.certLoading = true;
let tQuery = {
id: row.id,
filePath: row.filePath,
filePath2: row.instructions,
};
deleteRegistration(tQuery)
.then((response) => {
this.certLoading = false;
if (response.code === 20000) {
this.getRegistrationList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.certLoading = false;
});
})
.catch(() => {});
},
closeProductDialog() {
this.registrationVisible = false;
this.enterpriseId = null;
this.registrationId = null;
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 = [];
});
},
supChange(val) {
this.pmQuery.customerId = val;
this.findPMMethod();
},
certHandleCurrentChange(val) {
this.registrationQuery.page = val.page;
this.getRegistrationList();
},
},
components: {
suppliersEnterpriseBasicAdd,
suppliersRegistrationBasic,
},
mounted() {},
created() {
this.fileUrl =
this.BASE_URL + "/udiwms/image/register/file/getImage?type=image4&name=";
this.getList();
// this.getRegistrationList();
},
};
</script>
<style scoped></style>

@ -0,0 +1,583 @@
<template>
<div>
<el-card>
<el-form :model="filterQuery" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="产品编码:">
<el-input v-model="filterQuery.unionCode" style="width:90%" placeholder="请输入DI/医保编码/商品条码" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物资名称:">
<el-input v-model="filterQuery.cpmctymc" style="width:90%" placeholder="请输入物资名称" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="生产企业:">
<el-input v-model="filterQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人" clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="配送企业:">
<el-input v-model="filterQuery.supName" style="width: 90%" placeholder="请输入配送企业" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="第三方产品编码:">
<el-input v-model="filterQuery.thrPiId" style="width: 90%" placeholder="请输入第三方产品编码" clearable="true"></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="submitSearch"></el-button>
<el-button type="primary" icon="el-icon-upload2" @click="selectExport"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row>
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="最小销售产品标识" prop="nameCode" width="140"></el-table-column>
<el-table-column label="产品编码" prop="thirdId" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="器械类别" prop="qxlb" show-overflow-tooltip></el-table-column>
<el-table-column width="60" label="操作" >
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="产品信息详情"
:visible.sync="editDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="editDialogVisible"
>
<el-table :data="sysList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="第三方系统名称" prop="sysName" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方产品名称" prop="thirdName" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方产品ID" prop="thirdId" show-overflow-tooltip></el-table-column>
</el-table>
<el-table v-loading="loading" :data="detailList" style="width: 100%; margin-top: 20px" border @current-change="handleDetail" border highlight-current-row>
<el-table-column label="产品标识" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip></el-table-column>
<el-table-column label="包装层级" prop="bzcj" show-overflow-tooltip></el-table-column>
</el-table>
<el-form :model="editQuery" :rules="rules" ref="editQuery" label-width="190px" style="margin-top: 20px">
<el-row>
<el-col :span="12">
<el-form-item label="物资名称" prop="cpmctymc">
<el-input style="width: 90%" size="small" splaceholder="请输入物资名称" :disabled="true" v-model="editQuery.cpmctymc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="产品标识" prop="nameCode">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入产品标识" v-model="editQuery.nameCode"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="规格型号" prop="ggxh">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入内容" v-model="editQuery.ggxh"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="器械类别" prop="qxlb">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入器械类别" v-model="editQuery.qxlb"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="产品类别" prop="cplb">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入产品类别" v-model="editQuery.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="分类编码" prop="flbm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入分类编码" v-model="editQuery.flbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="商品条码" prop="sptm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入商品条码" v-model="editQuery.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="医保编码" prop="ybbm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入医保编码" v-model="editQuery.ybbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="医疗器械注册人" prop="ylqxzcrbarmc">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入医疗器械注册人" v-model="editQuery.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册人英文名称" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入注册人英文名称" v-model="editQuery.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="统一社会信用号" prop="tyshxydm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入统一社会信用号" v-model="editQuery.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册证/备案号" prop="zczbhhzbapzbh">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入注册证/备案号" v-model="editQuery.zczbhhzbapzbh"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="上级产品编码" prop="sjcpbm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入上级产品编码" v-model="editQuery.sjcpbm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="包装级别" prop="packLevel">
<el-input style="width: 90%" size="small" splaceholder="请输入包装级别" :disabled="true" v-model="editQuery.packLevel"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="包装层级" prop="bzcj">
<el-input style="width: 90%" size="small" splaceholder="请输入包装层级" v-model="editQuery.bzcj" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="包含下级包装数量" prop="bhxjsl">
<el-input style="width: 90%" size="small" splaceholder="请输入包含下级包装数量" :disabled="true" v-model="editQuery.bhxjsl"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="包含下级产品编码" prop="bhxjcpbm">
<el-input style="width: 90%" size="small" :disabled="true" splaceholder="请输入包含下级产品编码" v-model="editQuery.bhxjcpbm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="包含最小销售包装数量" prop="bhzxxsbzsl">
<el-input style="width: 90%" size="small" :disabled="true" splaceholder="请输入包含最小销售包装数量" v-model="editQuery.bhzxxsbzsl"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="是否包含批号" prop="scbssfbhph">
<el-input style="width: 90%" :disabled="true" size="small" v-model="editQuery.scbssfbhph"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="是否包含序列号" prop="scbssfbhxlh">
<el-input style="width: 90%" :disabled="true" size="small" v-model="editQuery.scbssfbhxlh" splaceholder="请输入内容"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="是否包含生产日期" prop="scbssfbhscrq">
<el-input style="width: 90%" :disabled="true" size="small" v-model="editQuery.scbssfbhscrq"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="是否包含失效日期" prop="scbssfbhsxrq">
<el-input style="width: 90%" :disabled="true" v-model="editQuery.scbssfbhsxrq" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="产品描述" prop="cpms">
<el-input style="width: 90%" :disabled="false" size="small" v-model="editQuery.cpms"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="计量单位" prop="measname">
<el-input style="width: 90%" size="small" splaceholder="请输入内容" v-model="editQuery.measname"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row >
<el-col :span="12" class="el-col">
<el-form-item label="使用单元数量" prop="zxxsbzbhsydysl">
<el-input style="width: 90%" :disabled="!checked" size="small" splaceholder="请输入内容" v-model="editQuery.zxxsbzbhsydysl"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {updateErpProduct, thirdSysDetail, getSmUdiInfos} from "../../../api/basic/udiRelevance";
import {filterByUuid} from "../../../api/basic/udiInfo";
import {insertCompanyProductRelevance, insertFilter} from "../../../api/basic/companyProductRelevance";
import store from "../../../store";
export default {
name: "basicSelectSingleProducts",
props: {
selectType: {
type: Object,
required: true,
},
closeSelDialog: {
type: Function,
required: true,
},
},
data() {
return {
radioCheck: null,
filterQuery: {
customerId: null,
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
limit: 10,
addType: 1,
isDisable: false,
},
postQuery: {
customerId: null,
uuids: [],
rlIds: [],
supplementRequest: null,
},
loading: false,
editQuery: null,
repEditQuery: {},
relevanceEdit: {
id: null,
thirdId: "",
isUseDy: false,
},
replTitle: "物资字典信息补齐:",
isImport: false,
isImportUdi: false,
isUploadSmp: false,
isImportFile: false,
uploadFileUrl: null,
checked: false,
list: [],
detailList: [],
sysList: [],
total: 0,
thirdNo: "",
uuid: "111",
thirdId: null,
relId: "",
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null
},
currentRow: null,
multipleSelection: [],
editDialogVisible: false,
selectUdiDialogVisible: false,
selectErpDialogVisible: false,
selectLocalVisible: false,
productRemarkSet: {},
supplementRequest: null,
};
},
methods: {
onReset() {
this.radioCheck = null;
this.$router.push({
path: "",
});
this.filterQuery = {
customerId: null,
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
limit: 10,
addType: 1,
};
this.getList();
},
submitSearch() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
getSmUdiInfos(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getDetailList(detailQuery) {
this.loading = true;
filterByUuid(detailQuery)
.then((response) => {
this.loading = false;
this.detailList = response.data || [];
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
},
handleDetail(row) {
this.editQuery = row;
},
combine() {
this.combineQuery.productUuid = this.currentRow.uuid;
this.combineQuery.customerId = store.getters.customerId;
insertCompanyProductRelevance(this.combineQuery).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
},
cellClass(row) {
if (row.columnIndex === 0) {
return 'disabledCheck'
}
},
selectExport() {
var selectData = this.multipleSelection;
if (selectData == null || selectData.length == 0) {
this.$message.warning("请先选入物资字典信息!");
return;
}
this.closeSelDialog(selectData[0].id);
},
allExport() {
this.postQuery.customerId = store.getters.customerId;
this.postQuery.supplementRequest = this.repEditQuery;
insertFilter(this.postQuery).then(response => {
this.loading = false;
if (response.code == 20000) {
this.$message.success(response.data);
this.$emit("closeSelDialog", true);
this.closeSelDialog();
} else {
this.$message.error(response.message);
}
});
},
intentDetail() {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
},
intentImportErp(val) {
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.selectErpDialogVisible = true;
},
handleSelectionChange(selection) {
this.radioCheck = selection.id;
this.curSelectDi = selection;
if (selection.length > 1) {
this.$refs.diList.clearSelection();
this.$refs.diList.toggleRowSelection(selection.pop());
}
this.multipleSelection = selection
this.currentRow = selection;
this.replTitle = "(" + this.currentRow.cpmctymc + ")" + "产品信息补齐:";
},
handleErpChange(val) {
this.currentRow = val;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleModifyClick(row) {
this.editDialogVisible = true;
this.editQuery = row;
this.relevanceEdit = {
id: row.id,
thirdId: row.thirdId,
isUseDy: row.isUseDy,
};
this.checked = row.isUseDy == 1;
let ttquery = {
uuid: row.uuid,
page: 1,
limit: 10,
};
this.getDetailList(ttquery);
this.getThirdSysDetail();
},
closeUdi(val) {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
if (val) {
this.getList();
}
},
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
checkSelectable(row) {
return !row.isSelect;
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
},
},
mounted() {
},
components: {},
created() {
},
};
</script>
<style scoped>
.el-table .disabledCheck .cell .el-checkbox .el-checkbox__input {
display: none !important;
}
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 6px;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -0,0 +1,541 @@
<template>
<div>
<el-card>
<el-form :model="filterQuery" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="DI/物资编码:">
<el-input v-model="filterQuery.unionCode" style="width:90%" placeholder="请输入DI/物资编码"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物资名称:">
<el-input v-model="filterQuery.cpmctymc" style="width:90%" placeholder="请输入物资名称"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产企业:">
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="注册/备案人:">
<el-input v-model="filterQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入注册/备案人"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="统一社会信用号:">
<el-input v-model="filterQuery.tyshxydm" style="width: 90%" placeholder="请输入统一社会信用号"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
clearable="true"></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="submitSearch"></el-button>
<el-button type="primary" icon="el-icon-upload2" @click="selectExport"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleSelectionChange" border
highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="产品类别" prop="cplb" show-overflow-tooltip></el-table-column>
<el-table-column label="器械类别" prop="qxlb" show-overflow-tooltip></el-table-column>
<el-table-column label="分类编码" prop="classifyName" show-overflow-tooltip></el-table-column>
<el-table-column width="60" label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="产品信息详情"
:visible.sync="editDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="editDialogVisible"
>
<el-card>
<el-form :model="editQuery" ref="editQuery" label-width="140px" style="margin-top: 20px">
<el-row>
<el-col :span="12">
<el-form-item label="物资名称" prop="cpmctymc">
<el-input style="width: 90%" size="small" splaceholder="请输入物资名称" :disabled="true"
v-model="editQuery.cpmctymc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="器械类别" prop="qxlb">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入器械类别"
v-model="editQuery.qxlb"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="产品类别" prop="cplb">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入产品类别"
v-model="editQuery.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="分类编码" prop="flbm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入分类编码"
v-model="editQuery.flbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="医疗器械注册人" prop="ylqxzcrbarmc">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入医疗器械注册人"
v-model="editQuery.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册人英文名称" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入注册人英文名称"
v-model="editQuery.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="el-col">
<el-form-item label="统一社会信用号" prop="tyshxydm">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入统一社会信用号"
v-model="editQuery.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="注册证/备案号" prop="zczbhhzbapzbh">
<el-input style="width: 90%" :disabled="true" size="small" splaceholder="请输入注册证/备案号"
v-model="editQuery.zczbhhzbapzbh"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<el-table :data="detailList" style="width: 100%" @current-change="handleSelectionChange" border
highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="最小销售产品标识" prop="nameCode" width="140"></el-table-column>
<el-table-column label="产品编码" prop="thirdId" show-overflow-tooltip></el-table-column>
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:limit.sync="detailQuery.limit"
:page.sync="detailQuery.page"
@pagination="handeleDetailChange"
></pagination>
</el-card>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {
getUdiInfos,
updateErpProduct,
thirdSysDetail,
getSmUdiInfos, getCertUdis
} from "@/api/basic/udiRelevance";
import {udiUpload} from "@/api/thrsys/smp"
import {filterByUuid} from "@/api/basic/udiInfo";
import {
insertCompanyProductRelevance,
updateCompanyProductRelevance, insertFilter
} from "@/api/basic/udiRlSuptRelevance";
import store from "@/store";
export default {
name: "UdIInfoSelect",
props: {
unitFk: {
type: Object,
required: true,
},
selectType: {
type: Object,
required: true,
},
closeSelDialog: {
type: Function,
required: true,
},
},
data() {
return {
showSearch: true,
filterQuery: {
customerId: null,
uuids: [],
rlIds: [],
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
limit: 20,
addType: 1,
isDisable: false,
},
detailTotal: 0,
detailQuery: {
cpmctymc: null,
manufactory: null,
page: 1,
limit: 20,
},
editQuery: null,
relevanceEdit: {
id: null,
thirdId: "",
isUseDy: false,
},
isImport: false,
isImportUdi: false,
isUploadSmp: false,
isImportFile: false,
uploadFileUrl: null,
checked: false,
list: [],
detailList: [],
sysList: [],
total: 0,
thirdNo: "",
uuid: "111",
thirdId: null,
relId: "",
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null
},
multipleSelection: {},
editDialogVisible: false,
selectUdiDialogVisible: false,
selectErpDialogVisible: false,
selectLocalVisible: false,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
customerId: null,
uuids: [],
rlIds: [],
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
limit: 20,
unitFk: null,
addType: 1,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
submitSearch() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
getCertUdis(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getDetailList(detailQuery) {
this.loading = true;
getUdiInfos(detailQuery)
.then((response) => {
this.loading = false;
this.detailList = response.data.list || [];
this.detailTotal = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.detailTotal = 0;
});
},
handleDetail(row) {
this.editQuery = row;
},
combine() {
this.combineQuery.productUuid = this.currentRow.uuid;
this.combineQuery.customerId = store.getters.customerId;
insertCompanyProductRelevance(this.combineQuery).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
},
selectExport() {
var selectData = this.multipleSelection;
if (selectData == null) {
this.$message.warning("请先选入物资字典信息!");
return;
}
this.closeSelDialog(selectData.id);
},
allExport() {
this.filterQuery.customerId = store.getters.customerId;
insertFilter(this.filterQuery).then(response => {
this.loading = false;
if (response.code == 20000) {
this.$message.success(response.data);
this.$emit("closeSelDialog", true);
this.closeSelDialog();
} else {
this.$message.error(response.message);
}
});
},
intentDetail() {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
},
intentImportErp(val) {
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.selectErpDialogVisible = true;
},
uploadSMP() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.uuids.push(obj.uuid);
});
this.allUploadSMP();
},
allUploadSMP() {
udiUpload(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
this.$emit("cancelDialog", true);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handeleDetailChange(val) {
this.detailQuery.page = val.page;
this.getDetailList();
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
handleModifyClick(row) {
this.editDialogVisible = true;
this.editQuery = row;
this.relevanceEdit = {
id: row.id,
thirdId: row.thirdId,
isUseDy: row.isUseDy,
};
this.checked = row.isUseDy == 1;
this.detailQuery = {
entireCpmctymc: row.cpmctymc,
manufactory: row.manufactory,
page: 1,
limit: 10,
};
this.getDetailList(this.detailQuery);
this.getThirdSysDetail();
},
closeUdi(val) {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
if (val) {
this.getList();
}
},
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
checkSelectable(row) {
return !row.isSelect;
},
uploadErpProduct() {
updateErpProduct()
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: response.data,
});
this.$emit("closeDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
},
selectSysParam() {
let query = {
paramKey: "smp_isUploadProuct",
};
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isUploadSmp = true;
}
}
});
let query1 = {
paramKey: "upload_pi_file_enabled",
};
selectSysParamByKey(query1).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isImportFile = true;
}
}
});
let query2 = {
paramKey: "upload_pi_file_url",
};
selectSysParamByKey(query2).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.paramValue;
}
});
},
},
mounted() {
},
components: {},
created() {
this.getList();
this.selectSysParam();
},
};
</script>
<style scoped>
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style>

@ -0,0 +1,254 @@
<template>
<div>
<el-card>
<el-form :model="filterQuery" class="query-form" label-width="100px" 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 type="primary" icon="el-icon-plus" @click="addCompany"></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>
<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="contacts"></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" @click.native.stop="editCompany(scope.row)">编辑</el-button>
<el-button type="text" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
<el-button type="text" v-if="scope.row.auditStatus === 2" @click.native.stop="rejectInfo(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"
width="80%"
v-if="supCompanyVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="handleClose"
>
<supCompanyEdit
:closeDialog="closeDialog"
:inputQuery="inputQuery"
:editType="editType"
></supCompanyEdit>
</el-dialog>
</div>
</template>
<script>
import {getSupComapnys, delSupComapnys} from "@/api/purchase/supCompany";
import supCompanyEdit from "./supCompanyEditDialog";
export default {
data() {
return {
showSearch:true,
filterQuery: {
companyName: "",
checkType: "",
creditNum: "",
auditStatus: "20",
page: 1,
limit: 20,
},
loading: false,
list: [],
total: 0,
formName: "add",
formMap: {
add: "新增配送企业资质信息",
update: "编辑配送企业资质信息",
},
checkFlag: {
0: "草稿",
1: "已通过",
2: "已拒绝",
3: "变更未审核",
6: "未审核",
},
supCompanyVisible: false,
inputQuery: {},
editType: 0, //0:1
};
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
6: "success",
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
0: "禁用",
1: "正常",
2: "未验证",
};
return statusMap[status];
},
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
companyName: "",
creditNum: "",
auditStatus: "20",
page: 1,
limit: 20,
};
this.getList();
this.productList = [];
this.salesmanList = [];
},
hideSearch() {
this.showSearch = !this.showSearch;
},
handleClose(){
this.supCompanyVisible=false;
this. getList();
},
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();
},
addCompany() {
this.supCompanyVisible = true;
this.formName = "add";
this.editType = 0;
this.inputQuery = {};
},
editCompany(row) {
this.supCompanyVisible = true;
this.formName = "update";
this.editType = 1;
this.inputQuery = row;
},
rejectInfo(row) {
this.$confirm(row.auditComment, "驳回说明", {
confirmButtonText: "确定",
type: "warning",
showCancelButton: false,
})
.then(() => {
});
},
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;
this.getList();
},
},
components: {
supCompanyEdit,
}
,
mounted() {
},
created() {
this.getList();
},
};
</script>

@ -0,0 +1,698 @@
<template>
<div>
<el-form :model="inputQuery" :rules="rules" ref="inputQuery" label-width="100px">
<el-card class="el-card" style="margin-top: -15px">
<div style="float: right; ">
<el-button type="primary" size="mini" icon="search" @click="selectBasicCorp()"></el-button>
<el-button type="primary" size="mini" icon="search" @click="onModifySubmit(0)">稿</el-button>
<el-button type="primary" size="mini" icon="search" @click="onModifySubmit(6)"></el-button>
</div>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 35px">
<el-col :span="10" class="el-col">
<el-form-item label="企业名称:" label-width="150px" prop="companyName">
<el-input
size="small"
splaceholder="请输入内容"
v-model="inputQuery.companyName"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="统一社会信用代码:" label-width="150px" prop="creditNum">
<el-input
size="small"
splaceholder="请输入内容"
v-model="inputQuery.creditNum"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-form-item label="企业类别:" label-width="150px" prop="classes">
<el-select
size="small"
v-model="inputQuery.classes"
placeholder="企业类别"
style="width: 100%;"
>
<el-option v-if="classesDisplay" label="医院" value="1"></el-option>
<el-option label="经营企业" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="所属地区:" label-width="150px" prop="area">
<el-cascader
size="small"
:options="options"
v-model="selectedOptions"
placeholder="请选择所属地区"
style="width: 100%"
@change="handleChange"
>
</el-cascader>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-form-item label="联系人:" label-width="150px" prop="contacts">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.contacts"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="详细地址:" label-width="150px" prop="detailAddr">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.detailAddr"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-form-item label="联系电话:" label-width="150px" prop="mobile">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.mobile"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" class="el-col">
<el-form-item label="邮箱:" label-width="150px" prop="email">
<el-input
size="small"
placeholder="请输入内容"
v-model="inputQuery.email"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card>
<div style=" float: right;
text-align: right;
margin-bottom: 8px;"
>
<el-button type="primary" size="mini" icon="search" @click="selectCert"
style="text-align:right"
>选入资质证书
</el-button
>
<el-button type="primary" size="mini" icon="search" @click="addCert"
style="text-align:right"
>添加资质证书
</el-button
>
</div>
<el-table v-loading="certLoading" :data="certList" style=" width: 100%;margin-top: 20px" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="证书编号" prop="code"></el-table-column>
<el-table-column label="生效期" prop="vailDate"></el-table-column>
<el-table-column label="失效期" prop="expireDate"></el-table-column>
<el-table-column label="证书状态" >
<template slot-scope="scope">
<span>{{ expire[scope.row.status] }}</span>
</template>
</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="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="180">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native="addCert(scope.row)"
v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native="toViewCompanyCert(scope.row)"
>预览
</el-button
>
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
@click.native="deleteCompanyCert(scope.row)"
>删除
</el-button
>
<el-button
type="text"
size="small"
v-if=" scope.row.auditStatus == 1 && scope.row.status==0"
@click.native="disableCert(scope.row,1)"
>禁用
</el-button
>
<el-button
type="text"
size="small"
v-if=" scope.row.auditStatus == 1 && scope.row.status==1"
@click.native="disableCert(scope.row,0)"
>启用
</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="certTotal>0"
:total="certTotal"
:page.sync="certQuery.page"
:limit.sync="certQuery.limit"
@pagination="certHandleCurrentChange"
></pagination>
</el-card>
<el-dialog
title="添加资质证书"
:visible.sync="addCertVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="addCertVisible"
append-to-body
@close='closeLocalDialog'
>
<companyAddCert
:closeDialog="closeLocalDialog"
:inputQuery="inputQuery"
:addType="addType"
:editTye="editTye"
></companyAddCert>
</el-dialog>
<el-dialog
title="选入往来单位"
:visible.sync="selectCorpVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="selectCorpVisible"
append-to-body
@close='closeLocalDialog'
>
<corpMaintainSelect
:closeDialog="closeSelectCorpDialog"
></corpMaintainSelect>
</el-dialog>
<el-dialog
title="选入资质证书"
:visible.sync="selectCertVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="selectCertVisible"
append-to-body
@close='closeLocalDialog'
>
<supCertSetSelectDialog
:certType="certType"
:closeDialog="closeLocalDialog"
:customerId="customerId"
></supCertSetSelectDialog>
</el-dialog>
</el-form>
</div>
</template>
<script>
import {modifyCompany, addCompany, bindCorp} from "@/api/purchase/supCompany";
import store from "@/store/index";
import {regionDataPlus, CodeToText} from "element-china-area-data";
import {filterCompanyCert, deleteCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert";
import corpMaintainSelect from "@/views/basic/corpMaintain/corpMaintainSelect"
import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
import draggable from "vuedraggable";
import {getUUID} from "@/utils/strUtil";
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
export default {
name: "supCompanyEdit",
props: {
closeDialog: {
type: Function,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
editType: {
type: Number,
required: true,
}
},
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
headers: {},
classesDisplay: false,
selectedOptions: [],
options: regionDataPlus,
rules: {
companyName: [
{
required: true,
message: "请输入企业名称",
trigger: "blur"
}
],
creditNum: [
{
required: true,
message: "请输入统一社会信用代码",
trigger: "blur"
}
],
classes: [
{
required: true,
message: "请选择企业类别",
trigger: "change"
}
],
area: [
{
required: true,
message: "请选择所属地区",
trigger: "change"
}
],
detailAddr: [
{
required: true,
message: "请输入详细地址",
trigger: "change"
}
],
contacts: [
{
required: true,
message: "请输入联系人",
trigger: "change"
}
],
mobile: [
{
required: true,
message: "请输入联系电话",
trigger: "change"
}
],
email: [
{
required: true,
message: "请输入邮箱",
trigger: "change"
}
],
updateCause: [
{
required: true,
message: "请输入变更原因",
trigger: "change"
}
],
},
uploadUrl: "",
fileUrl: "",
certFileUrl: "",
url: 'http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg',
certQuery: {
page: 1,
limit: 20
},
expire:{
0:"有效",
1:"失效"
},
certList: [],
certTotal: 0,
certLoading: false,
addCertVisible: false,
salesmanQuery: {
name: "",
page: 1,
limit: 20
},
salesmanList: [],
salesmanTotal: 0,
salesmanLoading: false,
addSalesmanVisible: false,
certTypeMap: {
1: '身份证'
},
selectLocalVisible: false,
productQuery: {
ylqxzcrbarmc: "",
cpmctymc: "",
ggxh: "",
page: 1,
limit: 20
},
productList: [],
productTotal: 0,
productLoading: false,
uuid: null,
companyApplyUpdateVisible: false,
companyEditDisabled: true,
companyEditButtonStr: "编辑",
addType: "1", //1:2.3.
checkFlag: {
0: "草稿",
1: "已通过",
2: "已拒绝",
3: "变更未审核",
6: "未审核",
},
editTye: 1,
selectCorpVisible: false,
selectCertVisible: false,
certType: 1,
customerId: null,
};
}
,
created() {
if (this.editType == 0) {
this.inputQuery.customerId = getUUID("");
}else{
this.customerId=this.inputQuery.customerId
this.getCompanyCertList();
}
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.customerId = this.inputQuery.customerId;
if (this.inputQuery.areaCode != null)
this.selectedOptions = this.inputQuery.areaCode.split(",");
}
,
components: {
draggable, companyAddCert, corpMaintainSelect, supCertSetSelectDialog
}
,
methods: {
onModifySubmit(val) {
this.inputQuery.auditStatus = val;
if (this.editType == 0) { //
this.$refs["inputQuery"].validate(valid => {
if (valid) {
this.$confirm("是否确定提交保存?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.loading = true;
addCompany(this.inputQuery).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功");
this.closeDialog();
} else {
this.$message.error(response.message);
}
});
}).catch(() => {
});
} else {
return false;
}
});
} else { //
this.$refs["inputQuery"].validate(valid => {
if (valid) {
this.$confirm("是否提交变更?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.loading = true;
modifyCompany(this.inputQuery).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功");
this.closeDialog();
} else {
this.$message.error(response.message);
this.inputQuery.auditStatus=0
}
});
}).catch(() => {
});
} else {
return false;
}
});
}
}
,
onAuditSubmit() {
}
,
selectBasicCorp() {
this.selectCorpVisible = true;
}
,
cancelDialog() {
this.closeDialog();
}
,
closeLocalDialog() {
this.addCertVisible = false;
this.selectCertVisible = false;
this.getCompanyCertList();
}
,
closeSelectCorpDialog(val) {
if (val != null) {
let query = {
customerId: val.erpId
};
bindCorp(query).then(response => {
this.loading = false;
if (response.code === 20000) {
this.inputQuery = response.data;
this.customerId=val.erpId
this.selectCorpVisible = false;
} else {
this.$message.error(response.message);
}
});
}
},
handleChange(value) {
var area='';
for(var i=0;i<=2;i++){
if(CodeToText[value[i]]!=null && CodeToText[value[i]]!=undefined){
area+=CodeToText[value[i]];
}
}
this.inputQuery.area = area;
this.inputQuery.areaCode = value.toString();
}
,
addCert(row) {
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.formName = 2
this.inputQuery.formData = row;
this.editTye = 2;
} else {
this.formName = 1;
this.inputQuery.formData = {};
this.inputQuery.formData.addType=1;
this.editTye = 1;
}
this.addCertVisible = true;
}
,
selectCert() {
this.selectCertVisible = true;
},
toViewCompanyCert(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + row.filePath);
}
,
certHandleCurrentChange(val) {
this.certQuery.page = val.page;
this.getCompanyCertList();
}
,
getCompanyCertList() {
this.certLoading = true;
this.certQuery.customerId = this.customerId;
filterCompanyCert(this.certQuery)
.then((response) => {
this.certLoading = false;
this.certList = response.data.list || [];
this.certTotal=response.data.total;
})
.catch(() => {
this.certLoading = false;
this.certList = [];
});
}
,
deleteCompanyCert(row) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.certLoading = true;
let tquery = {
id: row.id,
filePath: row.filePath,
};
deleteCompanyCert(tquery)
.then((response) => {
this.certLoading = false;
if (response.code === 20000) {
this.getCompanyCertList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.certLoading = false;
});
}).catch(() => {
});
}
,
disableCert(row, status) {
row.status = status;
updateCompanyCert(row).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("更新成功!");
this.getCompanyCertList();
} else {
this.$message.error(response.message);
}
});
},
}
,
filters: {
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
6: "warning",
};
return statusMap[status];
}
,
}
,
}
;
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 120px;
}
.text {
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-card {
margin-right: 20px;
margin-top: 15px;
/*transition: all .5s;*/
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>
Loading…
Cancel
Save