baichengfei 5 yıl önce
ebeveyn
işleme
a79cae8931

+ 81 - 83
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/techlist.vue

@@ -216,8 +216,8 @@
 <script>
   import {
     mapGetters
-  } from 'vuex';
-  import WfHistory from '@/components/workflow/wfhistory.vue'
+  } from 'vuex'
+import WfHistory from '@/components/workflow/wfhistory.vue'
   import api from '@/api/oilsupplier/supplierappend'
   import page401 from '@/components/error/401.vue'
 
@@ -233,25 +233,25 @@
     },
     name: 'oilsuppliercertappend',
 
-    data() {
+    data () {
       return {
         addshow: false,
         historyVisible: false,
-        dialogVisible: false, //高级查询
-        //列表数据
+        dialogVisible: false, // 高级查询
+        // 列表数据
         entityList: [],
-        //分页参数
+        // 分页参数
         size: 10,
         currentPage: 1,
         currentItemCount: 0,
-        //列表排序
+        // 列表排序
         Column: {
           Order: '',
           Prop: ''
         },
-        //查询起始时间(一月前开始)
+        // 查询起始时间(一月前开始)
         CreateOn: '',
-        //查询项
+        // 查询项
         searchFormReset: {},
         searchForm: {
           Id: '',
@@ -260,7 +260,7 @@
           ApplyDate: '',
           RecUnitId: '',
           RecUnitName: '',
-          AppendType: '03', //增项类别(1 物资类,2 基建类,3 服务类)
+          AppendType: '03', // 增项类别(1 物资类,2 基建类,3 服务类)
           DenyReason: '',
           AuditDate: '',
           Status: '',
@@ -271,16 +271,16 @@
           CreateBy: '',
           ModifiedOn: '',
           ModifiedUserId: '',
-          ModifiedBy: '',
+          ModifiedBy: ''
         },
-        //工作流
+        // 工作流
         entrydetail: {
           process: 'oil_append_apply',
           business: '',
           instance: ''
         },
-        //修改
-        optionsList: [], //服务类层级选择列表
+        // 修改
+        optionsList: [], // 服务类层级选择列表
         orgtreeprops: {
           value: 'id',
           label: 'Name',
@@ -296,19 +296,19 @@
           SupplierName: '',
           SupplierId: '',
           SupplierCertId: 0,
-          RecUnitFlag: '', //推荐单位的级联Id标记
-          RecUnitId: '', //推荐单位编码
-          RecUnitName: '', //推荐单位名称
-          AppendType: '', //增项类别(01 物资类,02 基建类,03 服务类)
-          Remark: '', //备注
-        },
+          RecUnitFlag: '', // 推荐单位的级联Id标记
+          RecUnitId: '', // 推荐单位编码
+          RecUnitName: '', // 推荐单位名称
+          AppendType: '', // 增项类别(01 物资类,02 基建类,03 服务类)
+          Remark: '' // 备注
+        }
       }
     },
-    created() {
+    created () {
       this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
-      //查询条件初始值备份
+      // 查询条件初始值备份
       Object.assign(this.searchFormReset, this.searchForm)
-      //查询列表
+      // 查询列表
       this.initData()
       this.getSupplierList()
     },
@@ -325,13 +325,13 @@
         this.appendformData.SupplierCertId = parseInt(obj.SupplierCertId)
         this.appendformData.SupplierName = obj.SupplierName
       },
-      initData() {
-        //分页及列表条件
+      initData () {
+        // 分页及列表条件
         let params = {
           _currentPage: this.currentPage,
           _size: this.size,
           Order: this.Column.Order,
-          Prop: this.Column.Prop,
+          Prop: this.Column.Prop
         }
         let myCreateOn = []
         // 解析时间
@@ -342,9 +342,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
@@ -353,13 +353,13 @@
         })
       },
 
-      addappendcom() {
+      addappendcom () {
         let _this = this
-        _this.$confirm("确定添加增项申请, 是否继续?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+        _this.$confirm('确定添加增项申请, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             _this.addshow = false
             _this.appendformData.AppendType = '03'
@@ -367,19 +367,19 @@
             _this.$axios.post('/suppliercertappend/addappend/', _this.appendformData)
               .then(res => {
                 if (res.data.code === 0) {
-                  //this.entityList = res.data.item
+                  // this.entityList = res.data.item
                   let AppendId = res.data.info
                   this.$router.push({
                     path: `/oilsupplier/supplierappend/3/techdataopera`,
                     query: {
                       Id: AppendId,
-                      editFlag: 1, //编辑标记: 1 修改,0 不修改
+                      editFlag: 1, // 编辑标记: 1 修改,0 不修改
                       sId: _this.appendformData.SupplierId
                     }
                   })
                   _this.$message({
                     type: 'success',
-                    message: res.data.message,
+                    message: res.data.message
                   })
                 } else {
                   _this.$message({
@@ -392,18 +392,18 @@
                 console.error(err)
               })
           })
-          .catch(() => {});
+          .catch(() => {})
       },
 
-      getSupplierList() {
+      getSupplierList () {
         let _this = this
         _this.supplierList = []
         let params = {
-          SuppTypeCode: '03',
+          SuppTypeCode: '03'
         }
         _this.$axios.get('/suppliercertappend/getsupplier', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
@@ -422,8 +422,8 @@
           })
       },
 
-      //获取服务类层级列表
-      getTechTreeList() {
+      // 获取服务类层级列表
+      getTechTreeList () {
         let _this = this
         this.$axios.get('technologyservice/businesslist', {})
           .then(res => {
@@ -434,27 +434,27 @@
           })
       },
 
-      //编辑
-      editData(row) {
+      // 编辑
+      editData (row) {
         let _this = this
         _this.$router.push({
           path: `/oilsupplier/supplierappend/3/techdataopera`,
           query: {
             Id: row.Id,
-            editFlag: 1, //编辑标记: 1 修改,0 不修改
+            editFlag: 1, // 编辑标记: 1 修改,0 不修改
             sId: row.SupplierId
           }
         })
       },
 
-      //删除
-      deleteData(Id) {
+      // 删除
+      deleteData (Id) {
         let _this = this
         _this.$confirm('此操作将彻底删除该数据, 是否继续?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             api.deleteEntity(Id, _this.$axios)
               .then(res => {
@@ -477,29 +477,28 @@
           .catch(() => {})
       },
 
-      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.deleteData(cmd.row)
         }
       },
 
-      GetCommand(cmdType, row) {
+      GetCommand (cmdType, row) {
         let cmd = {}
         cmd.Command = cmdType
         cmd.row = row
         return cmd
       },
 
-      searchCommand(command) {
+      searchCommand (command) {
         if (command == 'search') {
           this.dialogVisible = true
         } else if (command == 'clear') {
@@ -507,8 +506,8 @@
         }
       },
 
-      //列表排序功能
-      orderby(column) {
+      // 列表排序功能
+      orderby (column) {
         if (column.order == 'ascending') {
           this.Column.Order = 'asc'
         } else if (column.order == 'descending') {
@@ -517,29 +516,29 @@
         this.Column.Prop = column.prop
         this.initData()
       },
-      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.initData()
       },
-      handleSearch() {
-        this.currentPage = 1;
-        this.dialogVisible = false;
-        this.initData();
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initData()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initData()
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initData()
       },
 
-      //判断增项类别,(1 物资类,2 基建类,3 服务类)
-      checkAppendType(val) {
+      // 判断增项类别,(1 物资类,2 基建类,3 服务类)
+      checkAppendType (val) {
         if (val == '01') {
           return '物资类'
         } else if (val == '02') {
@@ -563,7 +562,7 @@
           return '招标准入'
         }
       },
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -578,20 +577,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">