Parcourir la source

spell style fix

baichengfei il y a 5 ans
Parent
commit
88ed0687bb

+ 94 - 109
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/goodsindex.vue

@@ -8,7 +8,7 @@
       <el-card class="box-card" style="height: calc(100vh - 115px);">
         <div slot="header">
           <span>
-            <i class="icon icon-table2"></i> 年审申请表
+            <i class="icon icon-table2"></i> 年审1申请表
           </span>
           <span style="float: right;">
             <el-button v-if="IsCompanyUser == 0" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
@@ -209,7 +209,7 @@
 <script>
   import {
     mapGetters
-  } from 'vuex';
+  } from 'vuex'
   import WfHistory from '@/components/workflow/wfmultihistory.vue'
   import supplierapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/annualaudit'
@@ -229,7 +229,7 @@
     },
     name: 'annualaudit',
 
-    data() {
+    data () {
       return {
         chooseAuditorVisible: false,
         orgtreelist: [],
@@ -246,27 +246,27 @@
         auditerOption: [],
         auditer: '',
         auditerName: '',
-        //列表数据
+        // 列表数据
         selectsupplierlist: [],
         entityList: [],
-        //分页参数
+        // 分页参数
         size: 10,
         currentPage: 1,
         currentItemCount: 0,
-        //列表排序
+        // 列表排序
         Column: {
           Order: '',
           Prop: ''
         },
-        //工作流
+        // 工作流
         entrydetail: {
           process: 'oil_audit_apply',
           business: '',
-          instance: '',
+          instance: ''
         },
-        //查询时间
+        // 查询时间
         CreateOn: '',
-        //查询项
+        // 查询项
         searchFormReset: {},
         entityForm: {
           Id: '',
@@ -308,14 +308,14 @@
           CreateBy: '',
           ModifiedOn: '',
           ModifiedUserId: '',
-          ModifiedBy: '',
+          ModifiedBy: ''
         },
         rules: {
           SupplierId: [{
             required: true,
             message: '请选择企业名称',
             trigger: 'blur'
-          }, ],
+          }],
           SupplierTypeName: [{
             required: true,
             message: '请选择准入类别',
@@ -335,15 +335,15 @@
         IsCompanyUser: 0,
         supplierList: [],
         suplen: 1,
-        certId: '',
+        certId: ''
       }
     },
-    created() {
+    created () {
       console.log('++++++++++++++++++++++++++++++++++++++')
       this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
-      //查询条件初始值备份
+      // 查询条件初始值备份
       Object.assign(this.searchFormReset, this.searchForm)
-      //查询列表
+      // 查询列表
       this.initDatas()
       this.getselectsupplier()
       this.getorgtreelist()
@@ -351,8 +351,8 @@
       this.getSupplierList()
     },
     methods: {
-      initDatas() {
-        //分页及列表条件
+      initDatas () {
+        // 分页及列表条件
         let params = {
           _currentPage: this.currentPage,
           _size: this.size,
@@ -368,9 +368,9 @@
           myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
           myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
         }
-        //查询条件
+        // 查询条件
         Object.assign(params, this.searchForm)
-        //访问接口
+        // 访问接口
         api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
           this.entityList = res.data.items
           this.currentItemCount = res.data.currentItemCount
@@ -378,15 +378,13 @@
           console.error(err)
         })
       },
-      getSupplierList() {
+      getSupplierList () {
         let _this = this
         _this.supplierList = []
         let params = {
-          SuppTypeCode: '01',
+          SuppTypeCode: '01'
         }
-        _this.$axios.get('/annualaudit/getsupplier', {
-            params
-          })
+        _this.$axios.get('/annualaudit/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
@@ -409,9 +407,7 @@
         let params = {
           IsInnerOrganize: 1
         }
-        _this.$axios.get('organizes/orgalllist', {
-            params
-          })
+        _this.$axios.get('organizes/orgalllist', {params})
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
             if (_this.authUser.Profile.IsCompanyUser === 0) {
@@ -425,29 +421,29 @@
             console.error(err)
           })
       },
-      setAuditer(val, name) {
+      setAuditer (val, name) {
         this.auditer = val
         this.auditerName = name
         this.chooseAuditorVisible = false
       },
-      chooseAuditorShow() {
+      chooseAuditorShow () {
         this.$refs['chooseAuditor'].getorgtreelist(this.entityForm.SupplierTypeName)
         this.chooseAuditorVisible = true
       },
-      supplierchange(value) {
-        let obj = {};
+      supplierchange (value) {
+        let obj = {}
         obj = this.selectsupplierlist.find((item) => {
-          return item.Id === value;
-        });
+          return item.Id === value
+        })
         this.entityForm.SupplierName = obj.Realname
       },
-      addAnnualAudit() {
+      addAnnualAudit () {
         this.$refs['EntityFormref'].validate((valid) => {
           if (valid) {
             this.entityForm.auditer = this.auditer
             api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
               if (res.data.code === 0) {
-                //保存成功后,初始化数据,变成修改
+                // 保存成功后,初始化数据,变成修改
                 this.entityForm.Id = res.data.item
                 this.initDatas()
                 this.addshow = false
@@ -465,59 +461,59 @@
                 this.$message({
                   type: 'warning',
                   message: res.data.message
-                });
+                })
               }
             }).catch(err => {
               console.error(err)
-            });
+            })
           }
         })
       },
-      addannualdirect() {
+      addannualdirect () {
         api.addEntityDirect(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.entityForm.Id = res.data.item;
-            this.initDatas();
+            // 保存成功后,初始化数据,变成修改
+            this.entityForm.Id = res.data.item
+            this.initDatas()
             this.addshow = false
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
-      addaudit() {
+      addaudit () {
         this.addshow = true
       },
-      addauditcom() {
-        this.$confirm("确定添加年审, 是否继续?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+      addauditcom () {
+        this.$confirm('确定添加年审, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             api.addEntity(this.entityForm, this.entityForm.auditer, this.$axios).then(res => {
               if (res.data.code === 0) {
-                //保存成功后,初始化数据,变成修改
-                this.entityForm.Id = res.data.item;
-                this.initDatas();
+                // 保存成功后,初始化数据,变成修改
+                this.entityForm.Id = res.data.item
+                this.initDatas()
                 this.addshow = false
                 this.$router.push({
                   path: '/oilsupplier/annualaudit/' + this.entityForm.SupplierId + '/goodsoperation',
                   query: {
                     certid: this.certId,
-                    //WorkflowId: ,
+                    // WorkflowId: ,
                     Status: 0,
                     Step: 1,
-                    annualId: this.entityForm.Id,
+                    annualId: this.entityForm.Id
                   }
                 })
                 this.$message({
@@ -525,25 +521,24 @@
                   message: res.data.message
                 });
               } else if (res.data.code === -3) {
-                this.$confirm(res.data.message + ",点击继续可继续进行年审")
+                this.$confirm(res.data.message + ',点击继续可继续进行年审')
                   .then(_ => {
                     this.addannualdirect()
                   })
-                  .catch(_ => {});
+                  .catch(_ => {})
               } else {
                 this.$message({
                   type: 'warning',
                   message: res.data.message
-                });
+                })
               }
             }).catch(err => {
               console.error(err)
-            });
+            })
           })
-          .catch(() => {});
+          .catch(() => {})
       },
-
-      getselectsupplier() {
+      getselectsupplier () {
         console.log('++==================++++++++')
         api.getSupList('01', this.$axios).then(res => {
           if (res.data.items.length != 0) {
@@ -558,15 +553,12 @@
           console.error(err)
         })
       },
-
       getorgtreelist() {
         let _this = this
         let params = {
           IsInnerOrganize: 1
         }
-        _this.$axios.get('organizes/orgalllist', {
-            params
-          })
+        _this.$axios.get('organizes/orgalllist', { params })
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
           })
@@ -574,16 +566,15 @@
             console.error(err)
           })
       },
-
-      getDictOptions() {
+      getDictOptions () {
         supplierapi.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items
-          //this.organizeOption = res.data.items['Organizes']
+          // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
       },
-      checkSupplierTypeName(val) {
+      checkSupplierTypeName (val) {
         if (val == '01') {
           return '物资类'
         } else if (val == '02') {
@@ -592,16 +583,15 @@
           return '服务类'
         }
       },
-
-      searchCommand(command) {
+      searchCommand (command) {
         if (command == 'search') {
           this.dialogVisible = true
         } else if (command == 'clear') {
           this.clearSearch()
         }
       },
-      //列表排序功能
-      orderby(column) {
+      // 列表排序功能
+      orderby (column) {
         if (column.order == 'ascending') {
           this.Column.Order = 'asc'
         } else if (column.order == 'descending') {
@@ -610,69 +600,65 @@
         this.Column.Prop = column.prop
         this.initDatas()
       },
-      clearSearch() {
-        Object.assign(this.searchForm, this.searchFormReset);
-        //this.searchForm = this.searchFormReset;
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
         this.CreateOn = ''
         this.initDatas()
       },
-      handleSearch() {
-        this.currentPage = 1;
-        this.dialogVisible = false;
-        this.initDatas();
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initDatas()
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initDatas()
       },
-      deleteEntity(row) {
+      deleteEntity (row) {
         api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
-            this.initDatas();
+            this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      getvalues(val) {
+      getvalues (val) {
         this.entrydetail.business = val.Id
         this.entrydetail.instance = val.WorkflowId
         this.historyVisible = true
       },
 
-      MoreCmdClick(cmd) {
+      MoreCmdClick (cmd) {
         if (cmd.Command == 'History') {
           this.getvalues(cmd.row)
-
         } else if (cmd.Command == 'Delete') {
           this.deleteEntity(cmd.row)
         }
       },
-
-      GetCommand(cmdType, row) {
+      GetCommand (cmdType, row) {
         let cmd = {}
         cmd.Command = cmdType
         cmd.row = row
         return cmd
       },
-
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T00:00:00Z') {
@@ -687,20 +673,19 @@
         }
       },
 
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>
 
 <style lang="scss">