shiyi 6 år sedan
förälder
incheckning
0e8c30e335
1 ändrade filer med 219 tillägg och 219 borttagningar
  1. 219 219
      src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

+ 219 - 219
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -670,85 +670,85 @@
 
 
 <script>
-import api from "@/api/oilsupplier/select";
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-import oapi from "@/api/oilsupplier/supplier";
+import api from '@/api/oilsupplier/select'
+import FileSaver from 'file-saver'
+import XLSX from 'xlsx'
+import oapi from '@/api/oilsupplier/supplier'
 export default {
-  created() {
-    Object.assign(this.searchFormReset, this.searchForm);
+  created () {
+    Object.assign(this.searchFormReset, this.searchForm)
     // 执行初始化方法
-    this.getDictOptions();
-    this.initDatas();
-    this.initNftOptions();
+    this.getDictOptions()
+    this.initDatas()
+    this.initNftOptions()
   },
-  data() {
+  data () {
     return {
       HSEOptions: [
         {
-          value: "",
-          label: "全部"
+          value: '',
+          label: '全部'
         },
         {
           value: '1',
-          label: "是"
+          label: '是'
         },
         {
           value: '0',
-          label: "否"
+          label: '否'
         }
       ],
       nftOptions: [],
       CityAry: [],
       LinkCityAry: [],
       countryprops: {
-        value: "adcode",
-        label: "name",
-        children: "districts"
+        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: ""
+        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,
       // 定义列表数据
@@ -757,232 +757,232 @@ export default {
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
-      SetupTime: "",//成立时间
+      SetupTime: '', // 成立时间
       searchForm: {
-        AccessCardNo: "",
-        SupplierName: "",
-        SupplierTypeCode: "",
-        InFlag: "",
-        LegalPerson: "",
-        ContactName: "",
-        CommercialNo: "",
-        RegCapital1: "",
-        RegCapital2: "",
-        CompanyType: "",
-        Province: "",
-        City: "",
-        Street: "",
-        Address: "",
-        LinkProvince: "",
-        LinkCity: "",
-        LinkStreet: "",
-        LinkAddress: "",
-        DepositBank: "",
-        BusinessScope: "",
-        OldSupplierName: "",
-        HseTraining: "", 
+        AccessCardNo: '',
+        SupplierName: '',
+        SupplierTypeCode: '',
+        InFlag: '',
+        LegalPerson: '',
+        ContactName: '',
+        CommercialNo: '',
+        RegCapital1: '',
+        RegCapital2: '',
+        CompanyType: '',
+        Province: '',
+        City: '',
+        Street: '',
+        Address: '',
+        LinkProvince: '',
+        LinkCity: '',
+        LinkStreet: '',
+        LinkAddress: '',
+        DepositBank: '',
+        BusinessScope: '',
+        OldSupplierName: '',
+        HseTraining: '',
         // NeedFileType: [],
-        NeedFileType:"",
-        CerSubName:""
+        NeedFileType: '',
+        CerSubName: ''
       },
-      //列表排序
+      // 列表排序
       Column: {
-        Order: "",
-        Prop: ""
+        Order: '',
+        Prop: ''
       },
       countryoptions: []
-    };
+    }
   },
 
   methods: {
     transferStr (val) {
-        if (val === '01') {
-          return '物资类'
-        } else if (val === '02') {
-          return '基建类'
-        } else if (val === '03') {
-          return '技术服务类'
-        } else {
-          return val
-        }
-      },
-    initNftOptions() {
+      if (val === '01') {
+        return '物资类'
+      } else if (val === '02') {
+        return '基建类'
+      } else if (val === '03') {
+        return '技术服务类'
+      } else {
+        return val
+      }
+    },
+    initNftOptions () {
       api
         .getNFTOptions(this.$axios)
         .then(res => {
-          this.nftOptions = res.data.items;
+          this.nftOptions = res.data.items
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     },
-    handleLinkAreaChange(value) {
-      this.searchForm.LinkProvince = value[0];
-      this.searchForm.LinkCity = value[1];
-      this.searchForm.LinkStreet = value[2];
+    handleLinkAreaChange (value) {
+      this.searchForm.LinkProvince = value[0]
+      this.searchForm.LinkCity = value[1]
+      this.searchForm.LinkStreet = value[2]
     },
-    handleAreaChange(value) {
-      this.searchForm.Province = value[0];
-      this.searchForm.City = value[1];
-      this.searchForm.Street = value[2];
+    handleAreaChange (value) {
+      this.searchForm.Province = value[0]
+      this.searchForm.City = value[1]
+      this.searchForm.Street = value[2]
     },
-    getDictOptions() {
+    getDictOptions () {
       oapi
         .getDictList(this.$axios)
         .then(res => {
-          this.dictData = res.data.items;
-          this.CompanyTypeOptions = this.dictData["CompanyType"];
+          this.dictData = res.data.items
+          this.CompanyTypeOptions = this.dictData['CompanyType']
           console.log(this.CompanyTypeOptions)
-          this.getCityList(this.dictData["GaodeMapChinaAreas"]);
+          this.getCityList(this.dictData['GaodeMapChinaAreas'])
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     },
-    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);
+    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)
     },
-    exportExcel() {
+    exportExcel () {
       /* generate workbook object from table */
       let wb = XLSX.utils.table_to_book(
-        document.querySelector("#rebateSetTable")
-      );
+        document.querySelector('#rebateSetTable')
+      )
       /* get binary string as output */
       let wbout = XLSX.write(wb, {
-        bookType: "xlsx",
+        bookType: 'xlsx',
         bookSST: true,
-        type: "array"
-      });
+        type: 'array'
+      })
       try {
         FileSaver.saveAs(
-          new Blob([wbout], { type: "application/octet-stream" }),
-          "SupplierSituation.xlsx"
-        );
+          new Blob([wbout], { type: 'application/octet-stream' }),
+          'SupplierSituation.xlsx'
+        )
       } catch (e) {
-        if (typeof console !== "undefined") console.log(e, wbout);
+        if (typeof console !== 'undefined') console.log(e, wbout)
       }
-      return wbout;
+      return wbout
     },
-    handle(row, column, event, cell) {
-      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;
+    handle (row, column, event, cell) {
+      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) {
-      if (column.order == "ascending") {
-        this.Column.Order = "asc";
-      } else if (column.order == "descending") {
-        this.Column.Order = "desc";
+    // 列表排序功能
+    orderby (column) {
+      if (column.order == 'ascending') {
+        this.Column.Order = 'asc'
+      } else if (column.order == 'descending') {
+        this.Column.Order = 'desc'
       }
-      this.Column.Prop = column.prop;
-      this.initDatas();
+      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 "永久";
+    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);
+        val = val.replace('T', ' ')
+        return val.substring(0, 10)
       }
     },
-    //初始化列表方法
-    initDatas(event) {
-      console.log(this.searchForm);
+    // 初始化列表方法
+    initDatas (event) {
+      console.log(this.searchForm)
       if (event != null) {
-        this.currentPage = 1;
-        this.dialogVisible = false;
+        this.currentPage = 1
+        this.dialogVisible = false
       }
       let params = {
         _size: this.size,
         _currentPage: this.currentPage,
         Order: this.Column.Order,
         Prop: this.Column.Prop,
-        SetupTime: this.SetupTime,
-      };
+        SetupTime: this.SetupTime
+      }
       api
         .getCompanyList(params, this.searchForm, this.$axios)
         .then(res => {
-          this.entityList = res.data.items;
-          this.currentItemCount = res.data.currentItemCount;
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     },
-    //分页方法
-    handleCurrentChange(value) {
-      this.currentPage = value;
-      this.initDatas();
+    // 分页方法
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initDatas()
     },
-    handleSizeChange(value) {
-      this.size = value;
-      this.currentPage = 1;
-      this.initDatas();
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initDatas()
     },
-    searchCommand(command) {
-      if (command == "search") {
-        this.dialogVisible = true;
-      } else if (command == "clear") {
-        this.clearSearch();
+    searchCommand (command) {
+      if (command == 'search') {
+        this.dialogVisible = true
+      } else if (command == 'clear') {
+        this.clearSearch()
       }
     },
-    clearSearch() {
-      Object.assign(this.searchForm, this.searchFormReset);
-      this.CityAry = [];
-      this.SetupTime="";
-      (this.LinkCityAry = []), (this.currentPage = 1);
-      this.initDatas();
+    clearSearch () {
+      Object.assign(this.searchForm, this.searchFormReset)
+      this.CityAry = []
+      this.SetupTime = '';
+      (this.LinkCityAry = []), (this.currentPage = 1)
+      this.initDatas()
     }
   }
-};
+}
 </script>
 
 <style>