Ver Fonte

bug

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing há 6 anos atrás
pai
commit
937aa8384a

+ 91 - 93
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/annualfistaudit.vue

@@ -163,14 +163,14 @@
 <script>
   import {
     mapGetters
-  } from 'vuex';
-  import WfHistory from '@/components/workflow/wfhistory.vue'
-  import supplierapi from '@/api/oilsupplier/supplier';
-  import api from '@/api/oilsupplier/annualaudit';
+  } from 'vuex'
+import WfHistory from '@/components/workflow/wfhistory.vue'
+  import supplierapi from '@/api/oilsupplier/supplier'
+import api from '@/api/oilsupplier/annualaudit'
 
-  export default {
+export default {
     components: {
-      WfHistory,
+      WfHistory
     },
     computed: {
       ...mapGetters({
@@ -179,39 +179,39 @@
     },
     name: 'annualaudit',
 
-    data() {
+    data () {
       return {
         historyVisible: false,
         addshow: false,
         dialogVisible: false,
         delevisble: false,
-        //列表数据
+        // 列表数据
         selectsupplierlist: [],
         entityList: [],
-        //分页参数
+        // 分页参数
         size: 10,
         currentPage: 1,
         currentItemCount: 0,
-        //列表排序
+        // 列表排序
         Column: {
           Order: '',
           Prop: ''
         },
-        //工作流
+        // 工作流
         entrydetail: {
           process: 'oil_audit_apply',
           business: '',
-          instance: '',
+          instance: ''
         },
-        //查询时间
+        // 查询时间
         CreateOn: '',
-        //查询项
+        // 查询项
         searchFormReset: {},
         entityForm: {
           Id: '',
           SupplierName: '',
           SupplierId: '',
-          SupplierTypeName: '',
+          SupplierTypeName: ''
         },
         searchForm: {
           Id: '',
@@ -243,27 +243,27 @@
           CreateBy: '',
           ModifiedOn: '',
           ModifiedUserId: '',
-          ModifiedBy: '',
+          ModifiedBy: ''
 
-        },
+        }
       }
     },
-    created() {
-      //查询条件初始值备份
+    created () {
+      // 查询条件初始值备份
       Object.assign(this.searchFormReset, this.searchForm)
-      //查询列表
+      // 查询列表
       this.initDatas()
-      this.getselectsupplier()
-      //this.getDictOptions()
+      // this.getselectsupplier()
+      // this.getDictOptions()
     },
     methods: {
-      initDatas() {
-        //分页及列表条件
+      initDatas () {
+        // 分页及列表条件
         let params = {
           _currentPage: this.currentPage,
           _size: this.size,
           Order: this.Column.Order,
-          Prop: this.Column.Prop,
+          Prop: this.Column.Prop
         }
         let myCreateOn = []
         // 解析时间
@@ -274,53 +274,53 @@
           myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
           myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
         }
-        //查询条件
+        // 查询条件
         Object.assign(params, this.searchForm)
-        //访问接口
+        // 访问接口
         api.getMyList(myCreateOn.join(','), params, this.$axios).then(res => {
           this.entityList = res.data.items
-          console.log("---this.entityList ----",this.entityList )
+          console.log('---this.entityList ----', this.entityList)
           this.currentItemCount = res.data.currentItemCount
         }).catch(err => {
           console.error(err)
         })
       },
-      supplierchange(value) {
-        let obj = {};
-        obj = this.selectsupplierlist.find((item) => {
-          return item.Id === value;
-        });
-        this.entityForm.SupplierName = obj.Realname
+      supplierchange (value) {
+        let obj = {}
+      obj = this.selectsupplierlist.find((item) => {
+          return item.Id === value
+      })
+      this.entityForm.SupplierName = obj.Realname
       },
-      addAnnualAudit() {
-        console.log("----this.entityForm--", this.entityForm)
+      addAnnualAudit () {
+        console.log('----this.entityForm--', this.entityForm)
         api.addEntity(this.entityForm, this.$axios).then(res => {
           if (res.data.code === 0) {
-            console.log("--------res.data----", res.data)
-            //保存成功后,初始化数据,变成修改
-            this.entityForm.Id = res.data.item;
-            this.initDatas();
-            this.addshow = false
+            console.log('--------res.data----', res.data)
+            // 保存成功后,初始化数据,变成修改
+            this.entityForm.Id = res.data.item
+          this.initDatas()
+          this.addshow = false
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
 
-          } else {
+        } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
-          }
+            })
+        }
         }).catch(err => {
           console.error(err)
-        });
-      },
-      addaudit() {
+        })
+    },
+      addaudit () {
         this.addshow = true
       },
 
-      getselectsupplier() {
+      getselectsupplier () {
         api.getSupList(this.$axios).then(res => {
           if (res.data.items.length != 0) {
             for (var i = 0; i < res.data.items.length; i++) {
@@ -335,16 +335,16 @@
         })
       },
 
-      getDictOptions() {
+      getDictOptions () {
         api.getDictList(this.$axios).then(res => {
-          //this.dictOptions.customerList = res.data.items['customerList']
-          //this.dictOptions.projectList = res.data.items['projectList']
+          // this.dictOptions.customerList = res.data.items['customerList']
+          // this.dictOptions.projectList = res.data.items['projectList']
 
         }).catch(err => {
           console.error(err)
         })
       },
-      checkSupplierTypeName(val) {
+      checkSupplierTypeName (val) {
         if (val == '01') {
           return '物资类'
         } else if (val == '02') {
@@ -354,15 +354,15 @@
         }
       },
 
-      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') {
@@ -371,69 +371,68 @@
         this.Column.Prop = column.prop
         this.initDatas()
       },
-      clearSearch() {
-        Object.assign(this.searchForm, this.searchFormReset);
-        //this.searchForm = this.searchFormReset;
-        this.CreateOn = ''
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+      //this.searchForm = this.searchFormReset;
+      this.CreateOn = ''
         this.initDatas()
       },
-      handleSearch() {
-        this.currentPage = 1;
-        this.dialogVisible = false;
-        this.initDatas();
-      },
-      handleCurrentChange(value) {
+      handleSearch () {
+        this.currentPage = 1
+      this.dialogVisible = false
+      this.initDatas()
+    },
+      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.$message({
+            this.initDatas()
+          this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
 
-          } else {
+        } 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') {
@@ -448,20 +447,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">