|
|
@@ -19,7 +19,6 @@
|
|
|
:inline="true"
|
|
|
style="float: right;position:absolute;right:15px;top:10.5px"
|
|
|
>
|
|
|
-
|
|
|
<el-form-item label="企业名称">
|
|
|
<el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入内容"></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -51,12 +50,16 @@
|
|
|
border
|
|
|
height="calc(100vh - 243px)"
|
|
|
style="width: 100%"
|
|
|
+ :span-method="cellMerge"
|
|
|
@sort-change="orderby"
|
|
|
- @row-click="handle"
|
|
|
>
|
|
|
<!--内框表格剩余栏显示-->
|
|
|
- <el-table-column label="企业名称" prop="SupplierName" sortable align="center"></el-table-column>
|
|
|
+ <el-table-column label="企业名称" prop="SupplierName" align="center"></el-table-column>
|
|
|
<el-table-column label="准入类别" prop="SupplierTypeName" align="center"></el-table-column>
|
|
|
+ <el-table-column label="上报数量" prop align="center"></el-table-column>
|
|
|
+ <el-table-column label="合格数量" prop align="center"></el-table-column>
|
|
|
+ <el-table-column label="不合格数量" prop align="center"></el-table-column>
|
|
|
+ <el-table-column label="不合格原因" prop align="center"></el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 分页 -->
|
|
|
@@ -70,7 +73,6 @@
|
|
|
:total="currentItemCount"
|
|
|
></el-pagination>
|
|
|
</el-card>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -85,134 +87,59 @@ import XLSX from "xlsx";
|
|
|
import oapi from "@/api/oilsupplier/supplier";
|
|
|
export default {
|
|
|
created() {
|
|
|
- Object.assign(this.searchFormReset, this.searchForm);
|
|
|
- // 执行初始化方法
|
|
|
- this.getDictOptions();
|
|
|
this.initDatas();
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- CityAry: [],
|
|
|
- LinkCityAry: [],
|
|
|
- countryprops: {
|
|
|
- value: "adcode",
|
|
|
- label: "name",
|
|
|
- children: "districts"
|
|
|
- },
|
|
|
- CompanyTypeOptions: [],
|
|
|
- dictData: null,
|
|
|
- searchFormReset: {},
|
|
|
- dialogVisible: false,
|
|
|
- formData: {
|
|
|
- SupplierName: "",
|
|
|
- AccessCardNo: "",
|
|
|
- SpecTypeCode: "",
|
|
|
- Country: "",
|
|
|
- InStyle: "",
|
|
|
- ManagementUnit: "",
|
|
|
- CredentialFlag: "",
|
|
|
- CommercialNo: "",
|
|
|
- CountryTaxNo: "",
|
|
|
- OrganCode: "",
|
|
|
- Address: "",
|
|
|
- ZipCode: "",
|
|
|
- LinkAddress: "",
|
|
|
- LinkZipCode: "",
|
|
|
- LegalPerson: "",
|
|
|
- CompanyType: "",
|
|
|
- RegCapital: "",
|
|
|
- SetupTime: "",
|
|
|
- DepositBank: "",
|
|
|
- BankAccount: "",
|
|
|
- ContactName: "",
|
|
|
- Mobile: "",
|
|
|
- Telphone: "",
|
|
|
- Fax: "",
|
|
|
- CompanyTel: "",
|
|
|
- EMail: "",
|
|
|
- BankCreditRating: "",
|
|
|
- Level: "",
|
|
|
- HseTraining: "",
|
|
|
- QualitySystemCert: "",
|
|
|
- ProductQualityCert: "",
|
|
|
- MaunLicense: "",
|
|
|
- AgentManufacturer: "",
|
|
|
- SupplierCertificate: "",
|
|
|
- SafetyLicense: "",
|
|
|
- SpecIndustryCert: "",
|
|
|
- BusinessScope: "",
|
|
|
- Remark: ""
|
|
|
- },
|
|
|
- show: false,
|
|
|
// 定义列表数据
|
|
|
entityList: [],
|
|
|
// 分页参数
|
|
|
size: 10,
|
|
|
currentPage: 1,
|
|
|
currentItemCount: 0,
|
|
|
- SetupTime: "",
|
|
|
searchForm: {
|
|
|
- AccessCardNo: "",
|
|
|
- SupplierName: "",
|
|
|
- SupplierTypeCode: "",
|
|
|
- InFlag: "",
|
|
|
- LegalPerson: "",
|
|
|
- ContactName: "",
|
|
|
- CommercialNo: "",
|
|
|
- RegCapital1: "",
|
|
|
- RegCapital2: "",
|
|
|
- CompanyType: "",
|
|
|
- SetupTime: "",
|
|
|
- Province: "",
|
|
|
- City: "",
|
|
|
- Street: "",
|
|
|
- Address: "",
|
|
|
- LinkProvince: "",
|
|
|
- LinkCity: "",
|
|
|
- LinkStreet: "",
|
|
|
- LinkAddress: "",
|
|
|
- DepositBank: "",
|
|
|
- BusinessScope: ""
|
|
|
+ SupplierName: ""
|
|
|
},
|
|
|
//列表排序
|
|
|
Column: {
|
|
|
Order: "",
|
|
|
Prop: ""
|
|
|
},
|
|
|
- countryoptions: []
|
|
|
+ spanArr: [],
|
|
|
+ pos: 0
|
|
|
};
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- handleLinkAreaChange(value) {
|
|
|
- this.searchForm.LinkProvince = value[0];
|
|
|
- this.searchForm.LinkCity = value[1];
|
|
|
- this.searchForm.LinkStreet = value[2];
|
|
|
- },
|
|
|
- handleAreaChange(value) {
|
|
|
- console.log(value);
|
|
|
- this.searchForm.Province = value[0];
|
|
|
- this.searchForm.City = value[1];
|
|
|
- this.searchForm.Street = value[2];
|
|
|
- },
|
|
|
- getDictOptions() {
|
|
|
- oapi
|
|
|
- .getDictList(this.$axios)
|
|
|
- .then(res => {
|
|
|
- this.dictData = res.data.items;
|
|
|
- this.CompanyTypeOptions = this.dictData["CompanyType"];
|
|
|
- this.getCityList(this.dictData["GaodeMapChinaAreas"]);
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ getSpanArr(data) {
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = 0;
|
|
|
+ } else {
|
|
|
+ // 判断当前元素与上一个元素是否相同
|
|
|
+ if (data[i].SupplierName === data[i - 1].SupplierName) {
|
|
|
+ this.spanArr[this.pos] += 1;
|
|
|
+ this.spanArr.push(0);
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- getCityList(val) {
|
|
|
- let resultData = JSON.parse(val);
|
|
|
- let countstr = JSON.stringify(resultData.districts[0].districts);
|
|
|
- countstr = countstr.replace(/\,\"districts\"\:\[\]/g, "");
|
|
|
- this.countryoptions = JSON.parse(countstr);
|
|
|
+
|
|
|
+ cellMerge({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (columnIndex === 0) {
|
|
|
+ const _row = this.spanArr[rowIndex];
|
|
|
+ const _col = _row > 0 ? 1 : 0;
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col
|
|
|
+ };
|
|
|
+ }
|
|
|
},
|
|
|
+
|
|
|
exportExcel() {
|
|
|
/* generate workbook object from table */
|
|
|
let wb = XLSX.utils.table_to_book(
|
|
|
@@ -234,49 +161,6 @@ export default {
|
|
|
}
|
|
|
return wbout;
|
|
|
},
|
|
|
- handle(row, column, event, cell) {
|
|
|
- console.log(row);
|
|
|
- this.formData.SupplierName = row.SupplierName;
|
|
|
- this.formData.AccessCardNo = row.AccessCardNo;
|
|
|
- this.formData.SpecTypeCode = row.SpecTypeCode;
|
|
|
- this.formData.Country = row.Country;
|
|
|
- this.formData.InStyle = row.InStyle;
|
|
|
- this.formData.ManagementUnit = row.ManagementUnit;
|
|
|
- this.formData.CredentialFlag = row.CredentialFlag;
|
|
|
- this.formData.CommercialNo = row.CommercialNo;
|
|
|
- this.formData.CountryTaxNo = row.CountryTaxNo;
|
|
|
- this.formData.OrganCode = row.OrganCode;
|
|
|
- this.formData.Address = row.Address;
|
|
|
- this.formData.ZipCode = row.ZipCode;
|
|
|
- this.formData.LinkAddress = row.LinkAddress;
|
|
|
- this.formData.LinkZipCode = row.LinkZipCode;
|
|
|
- this.formData.LegalPerson = row.LegalPerson;
|
|
|
- this.formData.CompanyType = row.CompanyType;
|
|
|
- this.formData.RegCapital = row.RegCapital;
|
|
|
- this.formData.SetupTime = row.SetupTime;
|
|
|
- this.formData.DepositBank = row.DepositBank;
|
|
|
- this.formData.BankAccount = row.BankAccount;
|
|
|
- this.formData.ContactName = row.ContactName;
|
|
|
- this.formData.Mobile = row.Mobile;
|
|
|
- this.formData.Telphone = row.Telphone;
|
|
|
- this.formData.Fax = row.Fax;
|
|
|
- this.formData.CompanyTel = row.CompanyTel;
|
|
|
- this.formData.EMail = row.EMail;
|
|
|
- this.formData.BankCreditRating = row.BankCreditRating;
|
|
|
- this.formData.Level = row.Level;
|
|
|
- this.formData.HseTraining = row.HseTraining;
|
|
|
- this.formData.QualitySystemCert = row.QualitySystemCert;
|
|
|
- this.formData.ProductQualityCert = row.ProductQualityCert;
|
|
|
- this.formData.MaunLicense = row.MaunLicense;
|
|
|
- this.formData.AgentManufacturer = row.AgentManufacturer;
|
|
|
- this.formData.SupplierCertificate = row.SupplierCertificate;
|
|
|
- this.formData.SafetyLicense = row.SafetyLicense;
|
|
|
- this.formData.SpecIndustryCert = row.SpecIndustryCert;
|
|
|
- this.formData.BusinessScope = row.BusinessScope;
|
|
|
- this.formData.Remark = row.Remark;
|
|
|
-
|
|
|
- this.show = true;
|
|
|
- },
|
|
|
|
|
|
//列表排序功能
|
|
|
orderby(column) {
|
|
|
@@ -288,23 +172,9 @@ export default {
|
|
|
this.Column.Prop = column.prop;
|
|
|
this.initDatas();
|
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
- if (val === "") {
|
|
|
- return "----";
|
|
|
- } else if (val === "0001-01-01T08:00:00+08:00") {
|
|
|
- return "----";
|
|
|
- } else if (val === "0001-01-01T00:00:00Z") {
|
|
|
- return "----";
|
|
|
- } else if (val === "5000-01-01T23:59:59+08:00") {
|
|
|
- return "永久";
|
|
|
- } else {
|
|
|
- val = val.replace("T", " ");
|
|
|
- return val.substring(0, 10);
|
|
|
- }
|
|
|
- },
|
|
|
//初始化列表方法
|
|
|
initDatas(event) {
|
|
|
- console.log(this.searchForm);
|
|
|
+ this.spanArr= []
|
|
|
if (event != null) {
|
|
|
this.currentPage = 1;
|
|
|
this.dialogVisible = false;
|
|
|
@@ -312,24 +182,17 @@ export default {
|
|
|
let params = {
|
|
|
_size: this.size,
|
|
|
_currentPage: this.currentPage,
|
|
|
- Order: this.Column.Order,
|
|
|
- Prop: this.Column.Prop,
|
|
|
- SetupTime: this.searchForm.SetupTime,
|
|
|
- Province: this.searchForm.Province,
|
|
|
- City: this.searchForm.City,
|
|
|
- Street: this.searchForm.Street,
|
|
|
- Address: this.searchForm.Address,
|
|
|
- LinkProvince: this.searchForm.LinkProvince,
|
|
|
- LinkCity: this.searchForm.LinkCity,
|
|
|
- LinkStreet: this.searchForm.LinkStreet,
|
|
|
- LinkAddress: this.searchForm.LinkAddress,
|
|
|
- DepositBank: this.searchForm.DepositBank
|
|
|
+ Order: "desc",
|
|
|
+ Prop: "SupplierName"
|
|
|
};
|
|
|
|
|
|
+ console.log(params);
|
|
|
api
|
|
|
- .getCompanyList(params, this.searchForm, this.$axios)
|
|
|
+ .up(params, this.searchForm, this.$axios)
|
|
|
.then(res => {
|
|
|
this.entityList = res.data.items;
|
|
|
+ console.log(this.entityList);
|
|
|
+ this.getSpanArr(res.data.items);
|
|
|
this.currentItemCount = res.data.currentItemCount;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
@@ -347,30 +210,14 @@ export default {
|
|
|
this.initDatas();
|
|
|
},
|
|
|
searchCommand(command) {
|
|
|
- if (command == "search") {
|
|
|
- this.dialogVisible = true;
|
|
|
- } else if (command == "clear") {
|
|
|
+ if (command == "clear") {
|
|
|
this.clearSearch();
|
|
|
}
|
|
|
},
|
|
|
clearSearch() {
|
|
|
- Object.assign(this.searchForm, this.searchFormReset);
|
|
|
- this.CityAry = [];
|
|
|
- (this.LinkCityAry = []), (this.currentPage = 1);
|
|
|
+ this.searchForm.SupplierName = "";
|
|
|
this.initDatas();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style>
|
|
|
-.eldialog .el-input__inner {
|
|
|
- border: none;
|
|
|
-}
|
|
|
-.eldialog .el-textarea__inner {
|
|
|
- border: none;
|
|
|
- resize: none;
|
|
|
- height: 70px;
|
|
|
-}
|
|
|
-</style>
|
|
|
-
|
|
|
+</script>
|