baishaojie před 9 měsíci
rodič
revize
4924a60908
100 změnil soubory, kde provedl 7961 přidání a 12576 odebrání
  1. 7 4
      .env.development
  2. 53 0
      .eslintignore
  3. binární
      dist.zip
  4. 0 0
      dist/index.html
  5. 65 180
      package-lock.json
  6. 1 1
      package.json
  7. 107 0
      src/api/common.js
  8. binární
      src/assets/images/2.png
  9. 8 8
      src/layout/components/Sidebar/SidebarItem.vue
  10. 1 1
      src/permission.js
  11. 111 73
      src/router/index.js
  12. 1 0
      src/store/getters.js
  13. 9 1
      src/store/modules/user.js
  14. 1 0
      src/utils/request.js
  15. 2 2
      src/views/asset/SST/index.vue
  16. 859 0
      src/views/asset/assetBigData/index.vue
  17. 33 33
      src/views/asset/assetDesignee/index.vue
  18. 47 47
      src/views/asset/assetDesignee/index1.vue
  19. 1 1
      src/views/asset/assetinventory/index.vue
  20. 37 27
      src/views/asset/basics/index.vue
  21. 1 1
      src/views/asset/complain/index.vue
  22. 2 2
      src/views/asset/equipmentAllocation/index.vue
  23. 2 2
      src/views/asset/install/index.vue
  24. 1 1
      src/views/asset/installrecord/index.vue
  25. 1 1
      src/views/asset/mailrepair/index.vue
  26. 1 1
      src/views/asset/order/index.vue
  27. 1 1
      src/views/asset/ordersend/index.vue
  28. 1 1
      src/views/asset/service/index.vue
  29. 2 2
      src/views/asset/standardAssetAllocation/index.vue
  30. 1 1
      src/views/asset/telvisit/index.vue
  31. 4 3
      src/views/asset/template/components/baoyang.vue
  32. 1 1
      src/views/asset/template/components/bumeng.vue
  33. 3 2
      src/views/asset/template/components/buwei.vue
  34. 3 2
      src/views/asset/template/components/buwei1.vue
  35. 1 0
      src/views/asset/template/components/dianjian.vue
  36. 1 0
      src/views/asset/template/components/guzhang.vue
  37. 7 0
      src/views/asset/template/index.vue
  38. 4 3
      src/views/basic/assetStandardManagement/index.vue
  39. 1 1
      src/views/basic/brand/index.vue
  40. 1 1
      src/views/basic/maintenanceWorkerCategory/index.vue
  41. 178 11
      src/views/basic/otherinfo/index.vue
  42. 5 3
      src/views/basic/product/index.vue
  43. 1 1
      src/views/basic/productclass/index.vue
  44. 472 0
      src/views/basic/ranchAccompany/index.vue
  45. 3 2
      src/views/basic/standardStock/index.vue
  46. 1 1
      src/views/basic/warehouse/index.vue
  47. 1 1
      src/views/business/visit/index.vue
  48. 1 1
      src/views/console/apisql/index.vue
  49. 1 1
      src/views/console/dict/index.vue
  50. 1 1
      src/views/console/emp/index.vue
  51. 1 1
      src/views/console/feedings/index.vue
  52. 1 1
      src/views/console/ranchManagement/index.vue
  53. 1 1
      src/views/console/role/index.vue
  54. 2 2
      src/views/console/safetyStock/index.vue
  55. 26 5
      src/views/console/user/index.vue
  56. 1 1
      src/views/console/user/index改好.vue
  57. 46 46
      src/views/cost/biomassConsum/index.vue
  58. 1 1
      src/views/cost/budget/index.vue
  59. 47 47
      src/views/cost/coalConsum/index.vue
  60. 46 46
      src/views/cost/coalConsum/index1.vue
  61. 204 24
      src/views/cost/diesel/index.vue
  62. 177 14
      src/views/cost/elec/index.vue
  63. 3 3
      src/views/cost/gas/index.vue
  64. 46 46
      src/views/cost/gasolineConsum/index.vue
  65. 1 1
      src/views/cost/generation/index.vue
  66. 2 2
      src/views/cost/methane/index.vue
  67. 2 2
      src/views/cost/other/index.vue
  68. 3 3
      src/views/cost/steam/index.vue
  69. 185 23
      src/views/cost/water/index.vue
  70. 1 1
      src/views/custom/allot/index.vue
  71. 1 1
      src/views/custom/allot/index1.vue
  72. 11 10
      src/views/custom/basic/index.vue
  73. 6 6
      src/views/custom/contract/index.vue
  74. 2971 2971
      src/views/custom/contractManagement/index.vue
  75. 24 16
      src/views/custom/custom/index.vue
  76. 6 6
      src/views/custom/inventory/index.vue
  77. 1 1
      src/views/custom/outRecord/index.vue
  78. 282 20
      src/views/custom/outStock/index.vue
  79. 6 6
      src/views/custom/outStock/index1.vue
  80. 1015 661
      src/views/custom/purchase/index.vue
  81. 0 2530
      src/views/custom/purchase/index1.vue
  82. 0 2538
      src/views/custom/purchase/index2.vue
  83. 139 16
      src/views/custom/receive/index.vue
  84. 3 3
      src/views/custom/receive/index1.vue
  85. 1 1
      src/views/custom/record/index.vue
  86. 1 1
      src/views/custom/refuse/index.vue
  87. 23 23
      src/views/custom/retreat/index.vue
  88. 4 4
      src/views/custom/returngoods/index.vue
  89. 29 29
      src/views/custom/returngoods/index1.vue
  90. 3 3
      src/views/custom/saplog/index.vue
  91. 0 2457
      src/views/custom/storage/index.vue
  92. 554 538
      src/views/custom/subscribe/index.vue
  93. 2 2
      src/views/custom/writeoff/index.vue
  94. 11 11
      src/views/custom/writeoff/index1.vue
  95. 15 15
      src/views/custom/writeoff/index2.vue
  96. 1 1
      src/views/dashboard/editor/index.vue
  97. 1 1
      src/views/electro/electroData/index.vue
  98. 4 4
      src/views/evaluationVerification/assessment/index.vue
  99. 3 3
      src/views/evaluationVerification/assessment/index1.vue
  100. 2 2
      src/views/knowledgeBase/file/index.vue

+ 7 - 4
.env.development

@@ -5,12 +5,15 @@ ENV = 'development'
 # VUE_APP_BASE_API = '/dev-api'
 # 线上正式地址
 #  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
-#  白少后台本地
-# 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.56:8082/'
+
+
+
+
 # 线上测试
 VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
-# VUE_APP_BASE_API = 'http://127.0.0.1:8082/'
+
+# 白少后台本地
+# VUE_APP_BASE_API = 'http://192.168.1.76:8082/'
 
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 

+ 53 - 0
.eslintignore

@@ -2,3 +2,56 @@ build/*.js
 src/assets
 public
 dist
+经产围产牛配方
+经产围产牛配方
+新产牛配方
+青年围产
+高产1
+高产牛配方 1
+15月龄
+高产牛配方 1
+高产牛配方 1
+新产牛配方
+11-14月龄
+高产牛配方 1
+高产牛配方 1
+15月龄
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+15月龄
+15月龄
+高产牛配方 1
+6-10月龄
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+	
+高产牛2配方
+低产牛配方
+6-10月龄
+高产牛配方 1
+经产围产牛配方
+高产牛配方 1
+高产牛配方 1
+新产牛配方
+15月龄
+高产牛配方 1
+高产牛配方 1
+干奶牛配方
+高产牛配方 1
+15月龄
+高产牛配方 1
+高产牛配方 1
+15月龄以上配方
+15月龄以上配方
+高产牛2配方
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1
+高产牛配方 1

binární
dist.zip


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/index.html


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 65 - 180
package-lock.json


+ 1 - 1
package.json

@@ -26,6 +26,7 @@
     "js-cookie": "2.2.0",
     "js-table2excel": "^1.0.3",
     "moment": "^2.24.0",
+    "node-sass": "^4.14.1",
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
@@ -55,7 +56,6 @@
     "eslint-plugin-vue": "5.2.2",
     "html-webpack-plugin": "3.2.0",
     "mockjs": "1.0.1-beta3",
-    "node-sass": "^4.13.1",
     "runjs": "^4.3.2",
     "sass-loader": "^8.0.2",
     "script-ext-html-webpack-plugin": "2.1.3",

+ 107 - 0
src/api/common.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
 import parseTime from '@/utils/index.js'
+import { data } from 'jquery'
 
 export function postJson(url, data) {
   return request({
@@ -338,3 +339,109 @@ export function getWorkList() {
   })
 }
 
+// 获取订单号库
+export function getNumList(data) {
+  return request({
+    url: '/authdata/ensiling',
+    method: 'get',
+    params: data
+  })
+}
+
+// 车辆运转率
+export function getVehicRate(data) {
+  return request({
+    url: '/authdata/running/rate/detail',
+    method: 'get',
+    params: data
+  })
+}
+
+
+export function getVehicRateTotal(data) {
+  return request({
+    url: '/authdata/running/rate',
+    method: 'get',
+    params: data
+  })
+}
+
+// 点检率
+export function getSpotRate(data) {
+  return request({
+    url: '/authdata/spotcheck/report',
+    method: 'get',
+    params: data
+  })
+}
+
+export function saveImgIds(data) {
+  return request({
+    url: '/authdata/PostDataByName',
+    method: 'post',
+    data
+  })
+}
+
+// 主牧场修改
+export function editMainPasture(data) {
+  return request({
+    url: '/authdata/mainpasture/edit',
+    method: 'post',
+    data
+  })
+}
+
+// 查询主牧场
+export function getMainPastur(data) {
+  return request({
+    url: '/authdata/mainpasture/list',
+    method: 'get',
+    params: data
+  })
+}
+
+// 查询主牧场
+export function getPartsListSGList(data) {
+  return request({
+    url: '/authdata/sg/parts/list',
+    method: 'post',
+    data
+  })
+}
+
+// 导出验收单
+export function getDownList(data) {
+  return request({
+    url: '/authdata/GetDataByName',
+    method: 'post',
+    data
+  })
+}
+
+// 大数据
+export function getBigData(data) {
+  return request({
+    url: '/authdata/eq/data',
+    method: 'get',
+    params: data
+  })
+}
+
+// 大数据记录
+export function getBigDataRecode(data) {
+  return request({
+    url: '/authdata/eq/data/record',
+    method: 'get',
+    params: data
+  })
+}
+
+// 大数据导出
+export function getDownLoadData(data) {
+   return request({
+    url: '/authdata/eq/data/excel',
+    method: 'get',
+    params: data
+  })
+}

binární
src/assets/images/2.png


+ 8 - 8
src/layout/components/Sidebar/SidebarItem.vue

@@ -20,7 +20,7 @@
           :item="child"
           :base-path="resolvePath(child.path)"
           class="nest-menu"
-     
+
         />
       </template>
 
@@ -36,8 +36,8 @@ import AppLink from './Link'
 import FixiOSBug from './FixiOSBug'
 
 
-import { GetDataByName, GetDataByNames, PostDataByName } from '@/api/common'
- 
+import {  PostDataByName } from '@/api/common'
+
 export default {
   name: 'SidebarItem',
   components: { Item, AppLink },
@@ -68,23 +68,23 @@ export default {
     acconut(e){
       console.log("统计点击量")
       var numId = e.id
-       
+
       console.log(numId)
 
       var send_data =   {
         name: 'addMenuClick',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {menuId:numId}
-      } 
+      }
 
 
          PostDataByName(send_data).then(response => {
-          
+
             if (response.msg !== 'fail') {
-           
+
               //this.$notify({ title: '成功', message: '发送!!', type: 'success', duration: 2000 })
               // this.reload()
             } else {

+ 1 - 1
src/permission.js

@@ -7,7 +7,7 @@ import { getToken, removeToken } from '@/utils/auth' // get token from cookie
 import Cookies from 'js-cookie'
 import getPageTitle from '@/utils/get-page-title'
 // 1为单点登录,其他不是
-Cookies.set('sso', 1)
+Cookies.set('sso', 0)
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['/login'] // no redirect whitelist

+ 111 - 73
src/router/index.js

@@ -52,86 +52,124 @@ export const constantRoutes = [
       component: () => import('@/views/dashboard/index'),
       meta: { title: '首页', icon: '首页', affix: true }
     }]
-  }
+  },
+
+  {
+    path: '/changpwd',
+    component: Layout,
+    redirect: '/changpwd',
+    hidden: true,
+    children: [{
+      path: 'changpwd',
+      name: 'Changpwd',
+      component: () => import('@/views/changpwd/changpwd.vue'),
+      meta: { title: '修改密码', icon: '', affix: false }
+    }]
+  },
+
+  // {
+  //   path: '/assetBigData',
+  //   component: Layout,
+  //   redirect: '/assetBigData',
+  //   children: [{
+  //     path: 'assetBigData',
+  //     name: 'assetBigData',
+  //     component: () => import('@/views/asset/assetBigData/index.vue'),
+  //     meta: { title: '设备大数据', icon: '', affix: true }
+  //   }]
+  // }
+
+  // {
+  //   path: '/vehiclRateTotal',
+  //   component: Layout,
+  //   redirect: '/vehiclRateTotal',
+  //   children: [{
+  //     path: 'vehiclRateTotal',
+  //     name: 'VehiclRateTotal',
+  //     component: () => import('@/views/report/vehiclRateTotal/index.vue'),
+  //     meta: { title: '车辆运转率总览', icon: '', affix: true }
+  //   }]
+  // }
+
 ]
 
 /**
  * asyncRoutes
  * the routes that need to be dynamically loaded based on user roles
  */
-export const asyncRoutes = [
-  {
-    path: '/nested',
-    component: Layout,
-    redirect: '/nested/menu1',
-    name: 'Nested',
-    meta: {
-      title: 'Nested',
-      icon: 'nested'
-    },
-    children: [
-      {
-        path: 'menu1',
-        component: () => import('@/views/nested/menu1/index'), // Parent router-view
-        name: 'Menu1',
-        meta: { title: 'Menu1' },
-        children: [
-          {
-            path: 'menu1-1',
-            component: () => import('@/views/nested/menu1/menu1-1'),
-            name: 'Menu1-1',
-            meta: { title: 'Menu1-1' }
-          },
-          {
-            path: 'menu1-2',
-            component: () => import('@/views/nested/menu1/menu1-2'),
-            name: 'Menu1-2',
-            meta: { title: 'Menu1-2' },
-            children: [
-              {
-                path: 'menu1-2-1',
-                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
-                name: 'Menu1-2-1',
-                meta: { title: 'Menu1-2-1' }
-              },
-              {
-                path: 'menu1-2-2',
-                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
-                name: 'Menu1-2-2',
-                meta: { title: 'Menu1-2-2' }
-              }
-            ]
-          },
-          {
-            path: 'menu1-3',
-            component: () => import('@/views/nested/menu1/menu1-3'),
-            name: 'Menu1-3',
-            meta: { title: 'Menu1-3' }
-          }
-        ]
-      },
-      {
-        path: 'menu2',
-        component: () => import('@/views/nested/menu2/index'),
-        meta: { title: 'menu2' }
-      }
-
-    ]
-  },
+// export const asyncRoutes = [
+//   {
+//     path: '/nested',
+//     component: Layout,
+//     redirect: '/nested/menu1',
+//     name: 'Nested',
+//     meta: {
+//       title: 'Nested',
+//       icon: 'nested'
+//     },
+//     children: [
+//       {
+//         path: 'menu1',
+//         component: () => import('@/views/nested/menu1/index'), // Parent router-view
+//         name: 'Menu1',
+//         meta: { title: 'Menu1' },
+//         children: [
+//           {
+//             path: 'menu1-1',
+//             component: () => import('@/views/nested/menu1/menu1-1'),
+//             name: 'Menu1-1',
+//             meta: { title: 'Menu1-1' }
+//           },
+//           {
+//             path: 'menu1-2',
+//             component: () => import('@/views/nested/menu1/menu1-2'),
+//             name: 'Menu1-2',
+//             meta: { title: 'Menu1-2' },
+//             children: [
+//               {
+//                 path: 'menu1-2-1',
+//                 component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
+//                 name: 'Menu1-2-1',
+//                 meta: { title: 'Menu1-2-1' }
+//               },
+//               {
+//                 path: 'menu1-2-2',
+//                 component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
+//                 name: 'Menu1-2-2',
+//                 meta: { title: 'Menu1-2-2' }
+//               }
+//             ]
+//           },
+//           {
+//             path: 'menu1-3',
+//             component: () => import('@/views/nested/menu1/menu1-3'),
+//             name: 'Menu1-3',
+//             meta: { title: 'Menu1-3' }
+//           }
+//         ]
+//       },
+//       {
+//         path: 'menu2',
+//         component: () => import('@/views/nested/menu2/index'),
+//         meta: { title: 'menu2' }
+//       }
 
-  {
-    path: 'external-link',
-    component: Layout,
-    children: [
-      {
-        path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
-        meta: { title: 'External Link', icon: 'link' }
-      }
-    ]
-  },
-  // 404 page must be placed at the end !!!
-  { path: '*', redirect: '/404', hidden: true }
-]
+//     ]
+//   },
+
+//   {
+//     path: 'external-link',
+//     component: Layout,
+//     children: [
+//       {
+//         path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
+//         meta: { title: 'External Link', icon: 'link' }
+//       }
+//     ]
+//   },
+//   // 404 page must be placed at the end !!!
+//   { path: '*', redirect: '/404', hidden: true }
+// ]
 
 const createRouter = () => new Router({
   // mode: 'history', // require service support

+ 1 - 0
src/store/getters.js

@@ -6,6 +6,7 @@ const getters = {
   name: state => state.user.name,
   roles: state => state.user.roles,
   buttons: state => state.user.buttons,
+  mainpasture: state => state.user.mainpasture,
   pastureid: state => state.user.pastureid,
   pasturename: state => state.user.pasturename,
   pasturenumber: state => state.user.pasturenumber,

+ 9 - 1
src/store/modules/user.js

@@ -10,6 +10,7 @@ const state = {
   name: '',
   avatar: '',
   pastureid: '',
+  mainpasture:'',
   pasturename: '',
   pasturenumber: '',
   employename: '',
@@ -42,6 +43,10 @@ const mutations = {
     Cookies.set('pastureid', pastureid)
     state.pastureid = pastureid
   },
+  SET_MAINPASTURE: (state, mainpasture) => {
+    Cookies.set('mainpasture', mainpasture)
+    state.mainpasture = mainpasture
+  },
   SET_PASTURENAME: (state, pasturename) => {
     Cookies.set('pasturename', pasturename)
     state.pasturename = pasturename
@@ -173,6 +178,7 @@ const actions = {
               Cookies.remove('employename')
               Cookies.remove('employeid')
               Cookies.remove('pastureid')
+              Cookies.remove('mainpasture')
               removeToken()
               resetRouter()
               resolve()
@@ -202,7 +208,9 @@ const actions = {
 
         GetDataByName({ 'name': 'findByUserPastureName', 'parammaps': { 'jwt_username': username }}).then(response => {
           if (response.data.list.length > 0) {
+            console.log(response.data.list[0],'99999999====')
             commit('SET_PASTUREID', response.data.list[0].pastureId)
+            commit('SET_MAINPASTURE', response.data.list[0].mainpasture)
             commit('SET_PASTURENAME', response.data.list[0].pastureName)
             commit('SET_PASTURENUMBER', response.data.list[0].pastureNumber)
             commit('SET_EMPLOYEID', response.data.list[0].employeId)
@@ -212,7 +220,7 @@ const actions = {
             commit('SET_DEPIDS', response.data.list[0].depIds)
             Cookies.set('gempid', response.data.list[0].employeId)
             Cookies.set('gdepartmentname', response.data.list[0].departmentName)
-
+            Cookies.set('mainpasture', response.data.list[0].mainpasture)
             Cookies.set('gshebquanx','0')
             // 接口判断是不是设备主管权限
             GetDataByName({ 'name': 'getIsDirectorOfEquipment', 'parammaps': { 'empId': response.data.list[0].employeId }}).then(response => {

+ 1 - 0
src/utils/request.js

@@ -16,6 +16,7 @@ if(aa.indexOf('/')==0 && aa.length==1){
     withCredentials: true, // send cookies when cross-domain requests
     timeout: 60000 ,// request timeout
   })
+
 // request interceptor
 service.interceptors.request.use(
   config => {

+ 2 - 2
src/views/asset/SST/index.vue

@@ -320,7 +320,7 @@ export default {
         name: 'geteqSTTList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           eqCode: '',
@@ -415,7 +415,7 @@ export default {
         name: 'getAssetSTT1',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetId: '',

+ 859 - 0
src/views/asset/assetBigData/index.vue

@@ -0,0 +1,859 @@
+<template>
+  <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <div class="filter-container">
+      <el-select
+        v-model="getdataListParm.parammaps.pastureArr"
+        style="width: 220px"
+        placeholder="牧场"
+        multiple
+        collapse-tags
+        filterable collapse-tags-tooltip
+        class="filter-item"
+      >
+           <div class="select_up">
+                <el-button type="text" @click="selectAll">
+                    <i class="jw jw-quanxuan " />
+                    全选</el-button>
+                <el-button type="text" @click="removeTag">
+                    <i class="jw jw-qingkong " />
+                    清空</el-button>
+                <el-button type="text" @click="selectReverse">
+                    <i class="jw jw-fanxuan " />
+                    反选</el-button>
+            </div>
+            <div class="select_list">
+        <el-option
+          v-for="item in findAllPasture"
+          :key="item.id"
+          :label="item.name"
+          :value="item.name"
+        />
+        </div>
+      </el-select>
+         <el-input
+            v-model="getdataListParm.parammaps.eqName"
+            placeholder="设备名称"
+            clearable
+            style="width: 120px"
+            class="filter-item"
+          />
+            <el-input
+            v-model="getdataListParm.parammaps.eqCode"
+            placeholder="设备内部编号"
+            clearable
+            style="width: 150px"
+            class="filter-item"
+          />
+           <el-input
+            v-model="getdataListParm.parammaps.financeCode"
+            placeholder="财务编号"
+            clearable
+            style="width: 120px"
+            class="filter-item"
+          />
+      <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+          <el-select
+            v-model="getdataListParm.parammaps.status"
+            clearable
+            placeholder="状态"
+            class="filter-item"
+            style="width: 120px"
+          >
+            <el-option
+              v-for="item in getDictByName"
+              :key="item.id"
+              :label="item.label"
+              :value="item.id"
+            />
+          </el-select>
+           <el-input
+            v-model="getdataListParm.parammaps.cardCode"
+            placeholder="油卡编号"
+            clearable
+            style="width: 120px"
+            class="filter-item"
+          />
+      <!-- <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="monthrange" style="width: 250px;top:-3px;" format="yyyy-MM" value-format="yyyy-MM" range-separator="至" start-placeholder="盘点日期" end-placeholder="盘点日期" /> -->
+      <el-date-picker
+                  v-model="getdataListParm.parammaps.inputDatetime"
+                  type="month"
+                  placeholder="选择月">
+                </el-date-picker>
+      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <!-- <el-button class="filter-item" type="info" icon="el-icon-tickets" style="" @click="handleDownloadTemp">模板</el-button> -->
+      <!-- <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
+        <el-button class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
+      </el-upload> -->
+
+      <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
+      <!-- <el-button class="filter-item" type="primary" icon="el-icon-edit" @click="handleDelete">批量删除</el-button> -->
+    </div>
+    <el-table
+        :key="tableKey"
+        v-loading="listLoading"
+        element-loading-text="给我一点时间"
+        :data="list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable"
+        @selection-change="handleSelectionChange"
+        :max-height="myHeight"
+        ref="table"
+      >
+        <!-- <el-table-column type="selection" width="55" /> -->
+        <el-table-column label="序号" align="center" type="index" width="50px">
+          <template slot-scope="scope">
+            <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="牧场" align="center" prop="pastureName" />
+
+        <el-table-column label="设备类别" align="center" prop="eqClassName" />
+       <el-table-column label="设备名称" align="center" prop="eqName" />
+        <el-table-column label="设备内部编号" align="center" prop="eqCode" />
+        <el-table-column label="状态" align="center" prop="status" />
+        <el-table-column label="置换日期"   align="center" prop="purchaseDate" />
+        <el-table-column label="财务编号" align="center" prop="financeCode" />
+        <el-table-column label="部门" align="center" prop="departmentName" />
+        <el-table-column label="责任人" sortable align="center" prop="employeName" />
+        <el-table-column label="物联网编码" sortable align="center" prop="license" />
+        <el-table-column label="标准工作时长" sortable align="center" prop="duration" />
+        <el-table-column label="油卡号" sortable align="center" prop="cardCode" />
+        <el-table-column label="油卡类型" sortable align="center" prop="cardType" />
+        <el-table-column label="油卡状态" sortable align="center" prop="enable" >
+          </el-table-column>
+        <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
+          </template>
+        </el-table-column>
+     </el-table>
+      <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.parammaps.offset" :limit.sync="getdataListParm.parammaps.pagecount" @pagination="get_table_data" />
+      <el-dialog title="查看详情" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="80%">
+        <div class="app-change">
+          <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="基础信息" name="first">
+                <el-form ref="seeTemp" :model="see.temp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px" @click.native.prevent @submit.native.prevent>
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="牧场:" prop="pastureName">
+                  <el-input ref="pastureName" v-model="see.temp.pastureName" placeholder="牧场" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="部门:" prop="departmentName">
+                 <el-input ref="departmentName" v-model="see.temp.departmentName" placeholder="部门" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="设备类别:" prop="eqClassName">
+                 <el-input ref="departmentName" v-model="see.temp.eqClassName" placeholder="设备类别" disabled />
+                </el-form-item>
+              </el-col>
+               <el-col :span="6">
+                <el-form-item label="设备名称:" prop="eqName">
+                 <el-input ref="eqName" v-model="see.temp.eqName" placeholder="设备名称" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="设备内部编号:" prop="eqCode">
+                 <el-input ref="assetCode" v-model="see.temp.eqCode" placeholder="设备内部编号" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="设备规格:" prop="specification">
+                 <el-input ref="specification" v-model="see.temp.specification" placeholder="设备规格" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="品牌:" prop="brandName">
+                  <el-input ref="eqCode" v-model="see.temp.brandName" placeholder="品牌" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="原值:" prop="yuanzhi">
+                  <el-input ref="yuanzhi" v-model="see.temp.yuanzhi" placeholder="原值" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="用途:" prop="purpose">
+                  <el-input ref="unit" v-model="see.temp.purpose" placeholder="用途" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="购置日期:" prop="purchaseDate">
+                 <el-input ref="purchaseDate" v-model="see.temp.purchaseDate" placeholder="购置日期" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="财务编号:" prop="financeCode">
+                 <el-input ref="financeCode" v-model="see.temp.financeCode" placeholder="财务编号" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="维修费用:" prop="yearMaintainCost">
+                 <el-input ref="yearMaintainCost" v-model="see.temp.yearMaintainCost" placeholder="维修费用" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="残值:" prop="salvage">
+                  <el-input ref="salvage" v-model="see.temp.salvage" placeholder="残值" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="保养级别:" prop="upkeepgrade">
+                 <el-input ref="upkeepgrade" v-model="see.temp.upkeepgrade" placeholder="保养级别" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="保养费用:" prop="yearUpkeepCost">
+                 <el-input ref="yearUpkeepCost" v-model="see.temp.yearUpkeepCost" placeholder="保养费用" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="工作类别:" prop="work">
+                 <el-input ref="work" v-model="see.temp.work" placeholder="工作类别" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="责任人:" prop="employeName">
+                  <el-input ref="employeName" v-model="see.temp.employeName" placeholder="责任人" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="物联网编码:" prop="license">
+                 <el-input ref="license" v-model="see.temp.license" placeholder="物联网编码" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="标准工作时长:" prop="duration">
+                 <el-input ref="duration" v-model="see.temp.duration" placeholder="标准工作时长" disabled />
+                </el-form-item>
+              </el-col>
+               <el-col :span="6">
+                <el-form-item label="状态:" prop="status">
+                  <el-input ref="status" v-model="see.temp.status" placeholder="状态" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="6">
+                <el-form-item label="油卡号:" prop="cardCode">
+                  <el-input ref="cardCode" v-model="see.temp.cardCode" placeholder="油卡号" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="油卡类型:" prop="cardType">
+                 <el-input ref="cardType" v-model="see.temp.cardType" placeholder="油卡类型" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="油卡状态:" prop="enable">
+                 <el-input ref="enable" v-model="see.temp.enable" placeholder="油卡状态" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          </el-tab-pane>
+
+          <el-tab-pane label="记录" name="second">
+            <div style="margin-bottom: 60px;">
+          <!-- <el-date-picker
+            ref="inputDatetime2"
+            v-model="getdataListParm.parammaps.inputDatetime"
+            class="inputDatetime"
+            type="month"
+            style="width: 250px; top: -3px"
+            format="yyyy-MM"
+            value-format="yyyy-MM"
+            range-separator="至"
+            start-placeholder="购置日期"
+            end-placeholder="购置日期"
+            @change="getDateByList"
+          /> -->
+          <el-date-picker
+            v-model="getdataListParm.parammaps.inputDatetime"
+            type="month"
+            @change="getDateByList"
+            placeholder="选择月">
+          </el-date-picker>
+
+             <el-table
+              key="tableRef"
+              v-loading="listLoading"
+              element-loading-text="给我一点时间"
+              :data="recodeList"
+              border
+              fit
+              highlight-current-row
+              style="width: 100%;"
+              :row-style="rowStyle"
+              :cell-style="cellStyle"
+              class="elTable"
+              @selection-change="handleSelectionChange"
+              :max-height="myHeight2"
+           >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="日期" align="center" prop="date" />
+            <el-table-column label="工作时长/h" align="center" prop="hour" />
+            <el-table-column label="加油量/L" align="center" prop="oilAmount" />
+             </el-table>
+
+            </div>
+
+          </el-tab-pane>
+        </el-tabs>
+
+
+          <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
+            <el-button @click="dialogFormVisible = false;">关闭</el-button>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { GetDataByName, GetDataByNames,checkButtons,postJson,getJson ,getBigData,getBigDataRecode, getDownLoadData} from '@/api/common'
+import { parseTime, json2excel } from '@/utils/index.js'
+import Pagination from '@/components/Pagination'
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+export default {
+  inject: ['reload'],
+  name: 'Assetinventory',
+  components: { Pagination },
+  data() {
+    return {
+      recodeList:[],
+      mountDate:'',
+      tableKey: 0,
+      list: [],
+      statusMap: [
+            { id: 17, label: "正常", value: "正常" },
+            { id: 18, label: "闲置", value: "闲置" },
+            { id: 19, label: "报废", value: "报废" },
+            { id: 20, label: "封存", value: "封存" }
+        ],
+      activeName: 'first',
+      getDictByName:[],
+      total: 0,
+      listLoading: true,
+      getdataListParm: {
+        parammaps: { offset: 1, pagecount: 50, pastureId:'',  cardCode: '', status: '', departmentName: '', departmentId: '',eqCode:"",eqName:"",financeCode:"" ,inputDatetime:this.getCurrentMonthStart() , startTime: '', endTime: '',} // [this.getCurrentMonthStart(), this.getCurrentMonthEnd()]
+      },
+      isAssetinventorySee: [], isBasicsCard: [], isBasicsUpdate: [], isBasicsDel: [], isBasicsDel2: [], isBasic: [], isBasicSH: [], isBasicExamine: [],
+      requestParams: [
+          {
+          name: 'getDictByName',
+          offset: 0,
+          pagecount: 0,
+          params: ['资产状态']
+        },
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': "18" }}
+      ],
+      getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+      findAllPasture: [], findAllDepart: [],
+      selectionList:[],
+      textMap: { see: '查看设备信息' },
+      dialogFormVisible: false,
+      dialogStatus: '',
+      see:{
+        temp:{}
+      },
+      isPercentage:false,
+      uploadImageUrl: process.env.VUE_APP_BASE_API + 'authdata/uploaderimage',
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      myHeight: document.documentElement.clientHeight - 85 - 150,
+      myHeight2:  document.documentElement.clientHeight - 150
+    }
+  },
+  computed: {
+    headers() {
+      return {
+        // 设置token
+        token: getToken()
+      }
+    },
+    uploadData() {
+      return {
+        // importParams: '牧场,部门, 资产编号, 资产名称, 设备内部编号, 实物入账日期, 计量单位, 规格, 资产数量, 资产原值, 实际盘点数, 盈亏量, 有无标签, 备注',
+        // sheetname: 'SheetJS'
+      }
+    },
+
+    // 设置上传地址
+    uploadExcelUrl() {
+      // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
+      return process.env.VUE_APP_BASE_API + 'authdata/stock/import'
+    }
+  },
+
+
+
+  created() {
+    // this.get_buttons()
+
+    this.get_select_list()
+
+  },
+  methods: {
+    getDateByList(val) {
+      console.log(val,'yue')
+      this.handlegetBigDataRecode()
+   },
+    async handlegetBigDataRecode() {
+       const obj = {
+        startTime: '',
+        endTime: "",
+        eqId:this.see.temp.eqId,
+        cardCode: this.see.temp.cardCode
+      }
+      if (this.getdataListParm.parammaps.inputDatetime == '' || this.getdataListParm.parammaps.inputDatetime == null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+        const currentYear = new Date().getFullYear();
+        obj.startTime =  `${currentYear}-01-01`;
+        obj.endTime = `${currentYear}-12-31`;
+      } else {
+        obj.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime,'{y}-{m}')+'-01'
+        const year = new Date(this.getdataListParm.parammaps.inputDatetime).getFullYear();
+        const month = new Date(this.getdataListParm.parammaps.inputDatetime).getMonth() + 1; // 月份从0开始
+        const lastDay = new Date(year, month, 0).getDate(); // 获取当前月份的最后一天
+        obj.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime,'{y}-{m}') + '-' + lastDay;
+      }
+      const { data } = await getBigDataRecode(obj)
+      console.log(data, '记录')
+      this.recodeList = data.list;
+
+    },
+     // 获取当前月份的开始日期
+    getCurrentMonthStart() {
+        const date = new Date();
+        return new Date(date.getFullYear(), date.getMonth());
+        // return new Date(date.getFullYear(), date.getMonth(), 1);
+    },
+    // 获取当前月份的结束日期
+    getCurrentMonthEnd() {
+        const date = new Date();
+        return new Date(date.getFullYear(), date.getMonth() + 1, 0);
+    },
+    handleClick(){
+      // this.get_table_data()
+      this.activeName = 'second';
+      if ( this.activeName == 'second') {
+       this. handlegetBigDataRecode()
+      }
+    },
+        // 删除
+    removeTag() {
+      this.getdataListParm.parammaps.pastureArr = []
+    },
+    // 全选
+    selectAll(val) {
+      val = []
+      this.findAllPasture.map(item => {
+          val.push(item.name)
+      })
+      this.getdataListParm.parammaps.pastureArr = val
+    },
+    // 反选
+    selectReverse(val) {
+        val = []
+        this.findAllPasture.map(item => {
+            let index = this.getdataListParm.parammaps.pastureArr.indexOf(item.name);
+            if (index != -1) {
+                //orgData.splice(index, 1)
+            } else {
+                val.push(item.name)
+            }
+        })
+        this.getdataListParm.parammaps.pastureArr = val
+    },
+    // get_buttons() {
+    //   // 新增
+    //   const AssetinventorySee = 'asset:assetinventory:see'
+    //   const isAssetinventorySee = checkButtons(this.$store.state.user.buttons, AssetinventorySee)
+    //   this.isAssetinventorySee = isAssetinventorySee
+    // },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        if (response.data.list !== null) {
+          this.findAllPasture = response.data.findAllPasture.list
+          this.getDictByName = response.data.getDictByName.list
+          this.selectAll();
+          // this.getdataListParm.parammaps.pastureArr = [Cookies.get('pasturename')]
+          this.getDepartDownList()
+           this.get_table_data()
+
+        }
+      })
+    },
+    getDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.findAllDepart = response.data.list
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      if (this.getdataListParm.parammaps.inputDatetime == '' || this.getdataListParm.parammaps.inputDatetime == null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.endTime = ''
+      } else {
+        this.getdataListParm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime, '{y}-{m}') + '-01'
+        const year = new Date(this.getdataListParm.parammaps.inputDatetime).getFullYear();
+        const month = new Date(this.getdataListParm.parammaps.inputDatetime).getMonth() + 1; // 月份从0开始
+        const lastDay = new Date(year, month, 0).getDate(); // 获取当前月份的最后一天
+        this.getdataListParm.parammaps.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime,'{y}-{m}') + '-' + lastDay;
+        // this.getdataListParm.parammaps.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime,'{y}-{m}')+ '-31'
+      }
+    if (this.getdataListParm.parammaps.departmentId == undefined) { this.getdataListParm.parammaps.departmentId = '' }
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+      const obj = JSON.parse(JSON.stringify(this.getdataListParm.parammaps));
+
+      delete obj.pastureArr
+      delete obj.endTime
+      delete obj.startTime
+      getBigData(obj).then(response => {
+        console.log('table数据', response.data.list)
+        if (response.data.list !== null) {
+          this.list = response.data.list.map((child) => {
+            const status = this.statusMap.find(item => item.id == child.status);
+            console.log(status,'status')
+            child.status = status && status.value || ''
+            child.enable = child.enable == true ? '禁用' : '启用'
+            return child;
+          })
+          this.pageNum = 1
+          this.pageSize = response.data.pagecount
+        } else {
+          this.list = []
+        }
+        this.total = response.data.count
+        this.listLoading = false;
+        // setTimeout(() => {
+        //   this.listLoading = false
+        // }, 100)
+
+      })
+    },
+    changePastureName(item) {
+      this.getDepartParam.parammaps.pastureId = this.getdataListParm.parammaps.pastureId
+      this.getdataListParm.parammaps.departmentId = ''
+      this.getDepartDownList()
+    },
+    handleSelectionChange(item) {
+      this.selectionList = item
+    },
+    form_search() {
+      if (this.getdataListParm.parammaps.inputDatetime == null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.endTime = ''
+      } else {
+        this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
+        this.getdataListParm.parammaps.endTime = this.getdataListParm.parammaps.inputDatetime[1]
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+    },
+    form_see(row){
+      this.see.temp = Object.assign({}, row) // copy obj
+      this.dialogStatus = 'see'
+      this.dialogFormVisible = true
+      this.activeName = 'first'
+    },
+    form_delete(row){
+      MessageBox.confirm('确认删除此信息?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let url = 'authdata/stock/del'
+        let data = {
+          id:[row.id]
+        }
+        postJson(url,data).then(response => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+            this.get_table_data()
+          } else {
+            this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      })
+    },
+    handleDelete(){
+      if(this.selectionList.length == 0){
+        this.$message({ type: 'error', message: '请选择要删除的信息!', duration: 2000 })
+        return false
+      }
+      let array = []
+      this.selectionList.forEach((item)=>{
+        array.push(item.id)
+      })
+      let str = '确认删除选择的'+ array.length+ '条信息?'
+      MessageBox.confirm(str, {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let url = 'authdata/stock/del'
+        let data = {
+          id:array
+        }
+        postJson(url,data).then(response => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+            this.get_table_data()
+          } else {
+            this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      })
+    },
+
+// 处理每一行数据,生成与表头对应的字段
+processData(downLoadList, filterVal, tHeader) {
+    return downLoadList.map(item => {
+        let row = {};
+        // 遍历 filterVal,根据顺序提取相应字段的值
+        filterVal.forEach((key, index) => {
+            // 如果是 1 到 31 天的数据,处理工作时长和加油量
+            if (key.includes('时长')) {
+                // 对应工作时长
+                const dayIndex = parseInt(key.split('(')[0]) - 1; // 获取天数索引
+                row[key] = item.hours[dayIndex] || '0'; // 如果没有数据则默认为0
+            } else if (key.includes('加油量')) {
+                // 对应加油量
+                const dayIndex = parseInt(key.split('(')[0]) - 1; // 获取天数索引
+                row[key] = item.diesel[dayIndex] || '0'; // 如果没有数据则默认为0
+            } else {
+                // 其他字段直接赋值
+                row[key] = item[key] || ''; // 如果没有数据则默认为空
+            }
+        });
+        return row;
+    });
+},
+
+    handleDownload() {
+      this.$alert('设备大数据正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      if (this.getdataListParm.parammaps.inputDatetime == '' || this.getdataListParm.parammaps.inputDatetime == null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+        const currentYear = new Date().getFullYear();
+        this.getdataListParm.parammaps.startTime = `${currentYear}-01-01`;
+        this.getdataListParm.parammaps.endTime = `${currentYear}-12-31`;
+      } else {
+        this.getdataListParm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime,'{y}-{m}')+'-01'
+        const year = new Date(this.getdataListParm.parammaps.inputDatetime).getFullYear();
+        const month = new Date(this.getdataListParm.parammaps.inputDatetime).getMonth() + 1; // 月份从0开始
+        const lastDay = new Date(year, month, 0).getDate(); // 获取当前月份的最后一天
+        this.getdataListParm.parammaps.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime,'{y}-{m}') + '-' + lastDay;
+      }
+      if( this.getdataListParm.parammaps.departmentId == undefined){ this.getdataListParm.parammaps.departmentId = ''}
+
+       // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+      this.getdataListParm.parammaps.pagecount = 999999;
+      const obj = JSON.parse(JSON.stringify(this.getdataListParm.parammaps));
+      // obj.parammaps.pagecount = 999999;
+      delete obj.pastureArr
+      getDownLoadData(obj).then(response => {
+        var downLoadList = response.data.list.map((child) => {
+          const status = this.statusMap.find(item => item.id == child.status);
+          child.status = status && status.value;
+          child.enable = child.enable == true ? '禁用' : '启用'
+          return child
+        })
+        this.percentage = 99;
+          setTimeout(() => {
+            this.isPercentage = false;
+            this.getdataListParm.parammaps.pagecount = 50;
+        }, 2000);
+
+
+        const days = downLoadList.length > 0 && downLoadList[0].day || [];
+        let filterVal = []
+        const filterVal0 = ['date', 'pastureName', 'eqClassName','eqName', 'eqCode', 'specification', 'brandName', 'status', 'purpose', 'purchaseDate', 'financeCode', 'yuanzhi', 'salvage', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'departmentName', 'employeName', 'license', 'duration', 'work',
+           'cardCode', 'cardType', 'enable'];
+        filterVal = [...filterVal0];
+
+        // 添加每一天的 hours 和 diesel 数据
+        days.forEach(day => {
+          filterVal.push(`${day}(时长)`); // 添加对应的 hours
+        });
+        days.forEach(day => {
+          filterVal.push(`${day}(加油量)`); // 添加对应的 diesel
+        });
+
+
+
+
+        const table = this.$refs.table;
+
+
+          const labels = ['日期', '牧场', '设备类别','设备名称', '设备内部编号', '设备规格', '品牌', '状态', '用途', '购置日期', '财务编号','原值', '残值', '保养级别', '保养费用', '维修费用', '部门', '责任人', '物联网编码', '标准工作时长', '工作类别',
+          '油卡号','油卡类型','油卡状态'
+        ];
+        const tHeader = [...labels, ...days.map(d => `${d}(时长)`), ...days.map(d => `${d}(加油量)`)];
+
+        const processedData = this.processData(downLoadList, filterVal, tHeader);
+
+        const elecExcelDatas = [
+          {
+            tHeader: tHeader,
+            filterVal: filterVal,
+            tableDatas: processedData,
+            sheetName: '设备大数据',
+            autowidth: true
+          }
+        ];
+        console.log(elecExcelDatas, 'elecExcelDatas')
+        json2excel(elecExcelDatas, '设备大数据', false, 'xlsx')
+     })
+    },
+
+    handleImportExcelSuccess(res, file) {
+      if (res.msg === 'ok') {
+        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
+        if (res.data.err_count > 0) {
+          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
+          import('@/vendor/Export2Excel').then(excel => {
+            const list1 = res.data.result
+            const tHeader = [
+              '牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签', '备注','报错信息'
+            ]
+            const filterVal = [
+              '牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签', '备注','error_msg'
+            ]
+            const data1 = this.formatJson(filterVal, list1)
+            excel.export_json_to_excel({
+              header: tHeader,
+              data: data1,
+              filename: '资产盘点模板报错信息',
+              autoWidth: true,
+              bookType: 'xlsx'
+            })
+          })
+        }
+      } else {
+        this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
+      }
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map(v =>
+        filterVal.map(j => {
+          if (j === 'timestamp') {
+            return parseTime(v[j])
+          } else {
+            return v[j]
+          }
+        })
+      )
+    },
+    formatJsonTemp(filterVal, jsonData) {
+      return jsonData.map(v =>
+        filterVal.map(j => {
+          if (j === 'timestamp') { return parseTime(v[j])  } else { return v[j] } })
+      )
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .el-autocomplete-suggestion li{
+    padding:0 3px!important;
+  }
+  .el-table .warning-row {
+      background: oldlace;
+  }
+  .el-table .success-row {
+      background: #f0f9eb;
+  }
+
+  .select_up {
+    padding: 0 12px;
+    font-size: 14px;
+    position: absolute;
+    z-index: 99999;
+    background-color: white;
+    top: 0px;
+    width: 100%;
+    border-radius: 5px 5px 0 0;
+
+    ::v-deep .el-button {
+        color: #bcbcbc;
+        font-size: 14px;
+
+        i {
+            font-size: 14px;
+        }
+    }
+
+    ::v-deep .el-button:hover {
+        color: #409EFF;
+    }
+
+        .el-button+.el-button {
+            margin-left: 6px;
+        }
+    }
+
+    .select_list {
+        margin-top: 25px;
+    }
+</style>

+ 33 - 33
src/views/asset/assetDesignee/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     这个页面取消,暂停开发
- 
+
   </div>
 </template>
 
@@ -65,7 +65,7 @@ export default {
         { name: 'getdictbyname', offset: 0, pagecount: 0, params: ['保养级别'] }
       ],
       getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
-      disabled: false,  
+      disabled: false,
       nodeKey: 'id',
       defaultCheckedKeys: [],
       parentClass: [],
@@ -76,10 +76,10 @@ export default {
       total: 0,
       listLoading: true,
       getdataListParm: {
-        name: 'getAssetList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getAssetList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: {proId:'',brandId:'', assetCode:'',eqCode: '', eqName: '', departmentId: '', pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), status: '', inputDatetime1: '', startTime: '', stopTime: '', inputDatetime2: '', startTime2: '', stopTime2: '', inputDatetime3: '', startTime3: '', stopTime3: '', warning: '', eqClassId: '' }
       },
-     
+
       textMap: { update: '编辑', create: '新增', card: '查看设备信息', examine: '审核', change: '批量变更' },
       dialogFormVisible: false,
       dialogStatus: '',
@@ -98,14 +98,14 @@ export default {
       createTemp: { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), employeId: this.$store.state.user.employeid, inputUser: this.$store.state.user.employeid, deptId: this.$store.state.user.departmentid, departmentName: Cookies.get('departmentname'), pastureId: this.$store.state.user.pastureid, assetCode: '', eqClassName: '', eqClassId: '', eqCode: '', eqName: '', specification: '', providerName: '', brandName: '', financeCode: '', status: '正常', purpose: '', purchaseDate: parseTime(new Date(), '{y}-{m}-{d}'), entranceDate: parseTime(new Date(), '{y}-{m}-{d}'), yearUpkeepCost: '', yearMaintainDost: '', yuanzhi: '', baseHours: '', upkeepgrade: '', salvage: '', subtractvalue: '', yearMaintainCost: '', brandId: '', providerId: '', inputUserName: '', employeName: this.$store.state.user.employename, depreciation: '' },
       requestParam: { name: 'insertAsset', offset: 0, pagecount: 0, parammaps: {}},
       seeTemp: {},
- 
+
       dialogFormVisible_See: false,
       activeName: 'first',
 
       maintainTypes: [{ id: '0', name: '周保养' }, { id: '1', name: '月保养' }, { id: '2', name: '间隔保养' }],
       changeStates: [{ id: '17', name: '正常' }, { id: '18', name: '闲置' }, { id: '19', name: '报废' }, { id: '20', name: '封存' }],
 
-      getdataEQNumber: { name: 'cerateEQNumber', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}},
+      getdataEQNumber: { name: 'cerateEQNumber', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: {}},
 
       dialoFormVisible_Examine: false,
       examineTemp: { SHstatue: 1 },
@@ -116,32 +116,32 @@ export default {
       isDisplayRecord: false,
       buttons: [],
       // 查看-点检记录
-      getAssetBigSpotCheckListParm: { name: 'getAssetBigSpotCheck1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }},
+      getAssetBigSpotCheckListParm: { name: 'getAssetBigSpotCheck1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }},
       listLoadingSpotCheck1: false,
       listSpotCheck1: [],
       totalSpotCheck1: 0,
       // 查看-保养记录
-      getBigupkeepbyeqParm: { name: 'getBigupkeepbyeq', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeUpkeepbyeq: '', startTime: '', stopTime: '', upkeepType: '', upkeepCode: '' }},
+      getBigupkeepbyeqParm: { name: 'getBigupkeepbyeq', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { inputDatetimeUpkeepbyeq: '', startTime: '', stopTime: '', upkeepType: '', upkeepCode: '' }},
       listLoadingUpkeepbyeq: false,
       listUpkeepbyeq: [],
       totalUpkeepbyeq: 0,
       // 查看-维修记录
-      getAssetMaintainParm: { name: 'getAssetMaintain1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeAssetMaintain: '', startTime: '', stopTime: '', repairCode: '' }},
+      getAssetMaintainParm: { name: 'getAssetMaintain1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { inputDatetimeAssetMaintain: '', startTime: '', stopTime: '', repairCode: '' }},
       listLoadingAssetMaintain: false,
       listAssetMaintain: [],
       totalAssetMaintain: 0,
       // 查看-启停记录
-      getAssetSTTParm: { name: 'getAssetSTT1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '' }},
+      getAssetSTTParm: { name: 'getAssetSTT1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { startTime: '', stopTime: '' }},
       listLoadingAssetSTT: false,
       listAssetSTT: [],
       totalAssetSTT: 0,
       // 查看-变更记录
-      getAssetChangeParm: { name: 'getAssetChange1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '', changeStatue: '', inputDatetimeAssetChange: '' }},
+      getAssetChangeParm: { name: 'getAssetChange1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { startTime: '', stopTime: '', changeStatue: '', inputDatetimeAssetChange: '' }},
       listLoadingAssetChange: false,
       listAssetChange: [],
       totalAssetChange: 0,
       // 查看-备件领用记录
-      getAssetPartApplyParm: { name: 'getAssetPartApply', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '', inputDatetimeAssetPartApply: '' }},
+      getAssetPartApplyParm: { name: 'getAssetPartApply', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { startTime: '', stopTime: '', inputDatetimeAssetPartApply: '' }},
       listLoadingAssetPartApply: false,
       listAssetPartApply: [],
       totalAssetPartApply: 0,
@@ -151,7 +151,7 @@ export default {
         name: 'getBrandByPartCode',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -160,7 +160,7 @@ export default {
         name: 'findAllEmployeV2',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -187,7 +187,7 @@ export default {
         name: 'getEqPartuseDetailList',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           receiveTime: '',
@@ -241,7 +241,7 @@ export default {
         sheetname: 'SheetJS'
       }
     },
-   
+
     // 设置上传地址
     uploadExcelUrl() {
       // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
@@ -249,8 +249,8 @@ export default {
     }
   },
   created() {
-     
- 
+
+
   },
   methods: {
      // 导入
@@ -277,7 +277,7 @@ export default {
             duration: 2000
           })
 
-          
+
         }
       } else {
         this.$notify({
@@ -424,7 +424,7 @@ export default {
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
           this.list = response.data.list
-           
+
           this.pageNum = response.data.pageNum
           this.pageSize = response.data.pageSize
         } else {
@@ -437,7 +437,7 @@ export default {
         this.get_select_list()
       })
     },
-     
+
     SHStatus: function(cellValue) {
       if (cellValue.SHStatus == 0) {
         return '审核中'
@@ -485,7 +485,7 @@ export default {
       this.getdataListParm.offset = 1
       this.get_table_data()
     },
- 
+
     handlePicChange(file, fileList) {
       if (fileList.length > 0) {
         this.$nextTick(() => {
@@ -644,7 +644,7 @@ export default {
       this.createTemp.yearUpkeepCost = ''
       this.createTemp.yearMaintainDost = ''
       this.createTemp.yuanzhi = ''
- 
+
       this.createTemp.baseHours = ''
       this.createTemp.upkeepgrade = 113
       this.createTemp.salvage = ''
@@ -1409,7 +1409,7 @@ export default {
       this.getChartSeeParm.offset = 1
       this.getChartSeeList()
     },
- 
+
     form_delete(row) {
       MessageBox.confirm('确认删除此信息?', {
         confirmButtonText: '确认',
@@ -1424,7 +1424,7 @@ export default {
             this.getdataListParm.parammaps.inputDatetime1 = ''
           }
           this.get_table_data()
-        
+
           this.dialogFormVisible = false
           this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
         })
@@ -1442,17 +1442,17 @@ export default {
       this.getdataEQNumber.parammaps.pastureId = Cookies.get('pastureid')
       GetDataByName(this.getdataEQNumber).then(response => {
 
-        
+
         this.createTemp.assetCode = response.data.list[0].createNumber
         console.log(response.data.list[0].createNumber)
         console.log(this.createTemp.assetCode)
         this.$forceUpdate()
-        
+
       })
     },
 
-   
- 
+
+
     changeSHStatue(val) {
       if (val == 2) {
         this.statueReason = true
@@ -1460,10 +1460,10 @@ export default {
         this.statueReason = false
       }
     },
-   
- 
-   
-   
+
+
+
+
     changeBatchDept(item) {
       console.log(item)
       this.batchChange.getdataListParmPerson.parammaps.deptId = item

+ 47 - 47
src/views/asset/assetDesignee/index1.vue

@@ -5,14 +5,14 @@
       <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
       <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
     </div>
- 
+
         <div class="filter-container">
           <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <tree-select
             v-model="getdataListParm.parammaps.eqClassId"
-            :height="150"
+            :height="300"
             :width="250"
             class="typeSelect"
             size="small"
@@ -26,9 +26,9 @@
             style="display: inline-block;"
             @popoverHide="popoverHide"
           />
- 
+
           <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="指定维修人" clearable style="width: 150px;" class="filter-item" />
-          
+
           <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
           <div>
             <el-button v-if="isBasicsAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
@@ -38,7 +38,7 @@
               <el-button  v-waves class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
             </el-upload>
 
-        
+
           </div>
           <el-table
             :key="tableKey"
@@ -52,10 +52,10 @@
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable"
-   
+
             @sort-change="tableSort2"
           >
- 
+
             <el-table-column label="序号" align="center" type="index" width="50px">
               <template slot-scope="scope">
                 <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -69,8 +69,8 @@
             <el-table-column label="二级督办" align="center" prop="brandName" />
             <el-table-column label="三级督办" align="center" prop="brandName" />
             <el-table-column label="推送时间(分)" align="center" prop="brandName" />
-             
-            
+
+
             <el-table-column label="折旧年限" sortable align="center" prop="depreciation" />
             <el-table-column label="使用时长(年)" sortable align="center" prop="serviceDuration" />
             <el-table-column label="使用率(%)" sortable align="center" prop="utilizationRate" />
@@ -85,7 +85,7 @@
           </el-table>
           <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
         </div>
-     
+
 
     <!-- 新增 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible"  v-show = "dialogFormVisible" :close-on-click-modal="false" width="90%">
@@ -96,7 +96,7 @@
               <el-form-item label="设备类别:" prop="eqClassId">
                 <tree-select
                   v-model="createTemp.eqClassId"
-                  :height="200"
+                  :height="300"
                   :width="300"
                   size="small"
                   :data="parentClass"
@@ -475,7 +475,7 @@
                   <el-row>
                     <el-col>
                       <el-form-item label="操作:">
-                        
+
                       </el-form-item>
                     </el-col>
                   </el-row>
@@ -699,7 +699,7 @@
                     </el-select>
                     <el-date-picker ref="inputDatetime2" v-model="getChartSeeParm.parammaps.inputDatetime2" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
                     <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchChartSee">搜索</el-button>
-                 
+
                   </div>
                   <el-table
                     :key="tableKey"
@@ -796,7 +796,7 @@
         </div>
       </div>
     </el-dialog>
- 
+
     <!-- 变更 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_change" :close-on-click-modal="false" width="30%">
       <div class="app-change">
@@ -889,7 +889,7 @@ export default {
         { name: 'getdictbyname', offset: 0, pagecount: 0, params: ['保养级别'] }
       ],
       getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
-      disabled: false,  
+      disabled: false,
       nodeKey: 'id',
       defaultCheckedKeys: [],
       parentClass: [],
@@ -900,10 +900,10 @@ export default {
       total: 0,
       listLoading: true,
       getdataListParm: {
-        name: 'getAssetList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getAssetList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: {proId:'',brandId:'', assetCode:'',eqCode: '', eqName: '', departmentId: '', pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), status: '', inputDatetime1: '', startTime: '', stopTime: '', inputDatetime2: '', startTime2: '', stopTime2: '', inputDatetime3: '', startTime3: '', stopTime3: '', warning: '', eqClassId: '' }
       },
-     
+
       textMap: { update: '编辑', create: '新增', card: '查看设备信息', examine: '审核', change: '批量变更' },
       dialogFormVisible: false,
       dialogStatus: '',
@@ -922,14 +922,14 @@ export default {
       createTemp: { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), employeId: this.$store.state.user.employeid, inputUser: this.$store.state.user.employeid, deptId: this.$store.state.user.departmentid, departmentName: Cookies.get('departmentname'), pastureId: this.$store.state.user.pastureid, assetCode: '', eqClassName: '', eqClassId: '', eqCode: '', eqName: '', specification: '', providerName: '', brandName: '', financeCode: '', status: '正常', purpose: '', purchaseDate: parseTime(new Date(), '{y}-{m}-{d}'), entranceDate: parseTime(new Date(), '{y}-{m}-{d}'), yearUpkeepCost: '', yearMaintainDost: '', yuanzhi: '', baseHours: '', upkeepgrade: '', salvage: '', subtractvalue: '', yearMaintainCost: '', brandId: '', providerId: '', inputUserName: '', employeName: this.$store.state.user.employename, depreciation: '' },
       requestParam: { name: 'insertAsset', offset: 0, pagecount: 0, parammaps: {}},
       seeTemp: {},
- 
+
       dialogFormVisible_See: false,
       activeName: 'first',
 
       maintainTypes: [{ id: '0', name: '周保养' }, { id: '1', name: '月保养' }, { id: '2', name: '间隔保养' }],
       changeStates: [{ id: '17', name: '正常' }, { id: '18', name: '闲置' }, { id: '19', name: '报废' }, { id: '20', name: '封存' }],
 
-      getdataEQNumber: { name: 'cerateEQNumber', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}},
+      getdataEQNumber: { name: 'cerateEQNumber', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: {}},
 
       dialoFormVisible_Examine: false,
       examineTemp: { SHstatue: 1 },
@@ -940,32 +940,32 @@ export default {
       isDisplayRecord: false,
       buttons: [],
       // 查看-点检记录
-      getAssetBigSpotCheckListParm: { name: 'getAssetBigSpotCheck1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }},
+      getAssetBigSpotCheckListParm: { name: 'getAssetBigSpotCheck1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }},
       listLoadingSpotCheck1: false,
       listSpotCheck1: [],
       totalSpotCheck1: 0,
       // 查看-保养记录
-      getBigupkeepbyeqParm: { name: 'getBigupkeepbyeq', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeUpkeepbyeq: '', startTime: '', stopTime: '', upkeepType: '', upkeepCode: '' }},
+      getBigupkeepbyeqParm: { name: 'getBigupkeepbyeq', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { inputDatetimeUpkeepbyeq: '', startTime: '', stopTime: '', upkeepType: '', upkeepCode: '' }},
       listLoadingUpkeepbyeq: false,
       listUpkeepbyeq: [],
       totalUpkeepbyeq: 0,
       // 查看-维修记录
-      getAssetMaintainParm: { name: 'getAssetMaintain1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeAssetMaintain: '', startTime: '', stopTime: '', repairCode: '' }},
+      getAssetMaintainParm: { name: 'getAssetMaintain1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { inputDatetimeAssetMaintain: '', startTime: '', stopTime: '', repairCode: '' }},
       listLoadingAssetMaintain: false,
       listAssetMaintain: [],
       totalAssetMaintain: 0,
       // 查看-启停记录
-      getAssetSTTParm: { name: 'getAssetSTT1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '' }},
+      getAssetSTTParm: { name: 'getAssetSTT1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { startTime: '', stopTime: '' }},
       listLoadingAssetSTT: false,
       listAssetSTT: [],
       totalAssetSTT: 0,
       // 查看-变更记录
-      getAssetChangeParm: { name: 'getAssetChange1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '', changeStatue: '', inputDatetimeAssetChange: '' }},
+      getAssetChangeParm: { name: 'getAssetChange1', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { startTime: '', stopTime: '', changeStatue: '', inputDatetimeAssetChange: '' }},
       listLoadingAssetChange: false,
       listAssetChange: [],
       totalAssetChange: 0,
       // 查看-备件领用记录
-      getAssetPartApplyParm: { name: 'getAssetPartApply', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '', inputDatetimeAssetPartApply: '' }},
+      getAssetPartApplyParm: { name: 'getAssetPartApply', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { startTime: '', stopTime: '', inputDatetimeAssetPartApply: '' }},
       listLoadingAssetPartApply: false,
       listAssetPartApply: [],
       totalAssetPartApply: 0,
@@ -975,7 +975,7 @@ export default {
         name: 'getBrandByPartCode',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -984,7 +984,7 @@ export default {
         name: 'findAllEmployeV2',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -1011,7 +1011,7 @@ export default {
         name: 'getEqPartuseDetailList',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           receiveTime: '',
@@ -1065,7 +1065,7 @@ export default {
         sheetname: 'SheetJS'
       }
     },
-   
+
     // 设置上传地址
     uploadExcelUrl() {
       // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
@@ -1078,15 +1078,15 @@ export default {
       that.buttons = response.data.list
       that.get_auto_buttons()
     })
- 
+
     this.getDownClassList()
     this.getdataListParm.parammaps.pastureName = Cookies.get('pasturename')
         this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- 
+
 
     this.get_table_data()
     // Window.addEventListener('keyup', )
- 
+
   },
   methods: {
      // 导入
@@ -1113,7 +1113,7 @@ export default {
             duration: 2000
           })
 
-          
+
         }
       } else {
         this.$notify({
@@ -1260,7 +1260,7 @@ export default {
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
           this.list = response.data.list
-           
+
           this.pageNum = response.data.pageNum
           this.pageSize = response.data.pageSize
         } else {
@@ -1273,7 +1273,7 @@ export default {
         this.get_select_list()
       })
     },
-     
+
     SHStatus: function(cellValue) {
       if (cellValue.SHStatus == 0) {
         return '审核中'
@@ -1321,7 +1321,7 @@ export default {
       this.getdataListParm.offset = 1
       this.get_table_data()
     },
- 
+
     handlePicChange(file, fileList) {
       if (fileList.length > 0) {
         this.$nextTick(() => {
@@ -1480,7 +1480,7 @@ export default {
       this.createTemp.yearUpkeepCost = ''
       this.createTemp.yearMaintainDost = ''
       this.createTemp.yuanzhi = ''
- 
+
       this.createTemp.baseHours = ''
       this.createTemp.upkeepgrade = 113
       this.createTemp.salvage = ''
@@ -2245,7 +2245,7 @@ export default {
       this.getChartSeeParm.offset = 1
       this.getChartSeeList()
     },
- 
+
     form_delete(row) {
       MessageBox.confirm('确认删除此信息?', {
         confirmButtonText: '确认',
@@ -2260,7 +2260,7 @@ export default {
             this.getdataListParm.parammaps.inputDatetime1 = ''
           }
           this.get_table_data()
-        
+
           this.dialogFormVisible = false
           this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
         })
@@ -2278,17 +2278,17 @@ export default {
       this.getdataEQNumber.parammaps.pastureId = Cookies.get('pastureid')
       GetDataByName(this.getdataEQNumber).then(response => {
 
-        
+
         this.createTemp.assetCode = response.data.list[0].createNumber
         console.log(response.data.list[0].createNumber)
         console.log(this.createTemp.assetCode)
         this.$forceUpdate()
-        
+
       })
     },
 
-   
- 
+
+
     changeSHStatue(val) {
       if (val == 2) {
         this.statueReason = true
@@ -2296,10 +2296,10 @@ export default {
         this.statueReason = false
       }
     },
-   
- 
-   
-   
+
+
+
+
     changeBatchDept(item) {
       console.log(item)
       this.batchChange.getdataListParmPerson.parammaps.deptId = item

+ 1 - 1
src/views/asset/assetinventory/index.vue

@@ -193,7 +193,7 @@ export default {
       total: 0,
       listLoading: true,
       getdataListParm: {
-        name: 'getAssetList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getAssetList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureId: parseInt(Cookies.get('pastureid')),  inputDatetime: '', startTime: '', stopTime: '', departmentId: '' }
       },
       isAssetinventorySee: [], isBasicsCard: [], isBasicsUpdate: [], isBasicsDel: [], isBasicsDel2: [], isBasic: [], isBasicSH: [], isBasicExamine: [],

+ 37 - 27
src/views/asset/basics/index.vue

@@ -40,7 +40,7 @@
           </el-select>
           <tree-select
             v-model="getdataListParm.parammaps.eqClassId"
-            :height="150"
+            :height="300"
             :width="250"
             class="typeSelect"
             size="small"
@@ -228,7 +228,7 @@
               align="center"
               prop="eqClassName"
             />
-            <el-table-column align="center" prop="eqName" width="120">
+            <el-table-column align="center" prop="eqName" width="160">
               <template slot="header" slot-scope="scope">
                 <div>
                   设备名称
@@ -726,7 +726,7 @@
               <el-form-item label="设备类别:" prop="eqClassId">
                 <tree-select
                   v-model="createTemp.eqClassId"
-                  :height="200"
+                  :height="300"
                   :width="300"
                   size="small"
                   :data="parentClass"
@@ -762,7 +762,14 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="设备内部编号:" prop="eqCode">
+              <el-form-item v-if="isShow" label="设备内部编号:" prop="eqCode">
+                <el-input
+                  ref="eqCode"
+                  v-model="createTemp.eqCode"
+                  disabled
+                />
+              </el-form-item>
+              <el-form-item v-else label="设备内部编号:" prop="eqCode">
                 <el-input
                   ref="eqCode"
                   v-model="createTemp.eqCode"
@@ -1180,7 +1187,7 @@
                   ref="license"
                   v-model="createTemp.license"
                   placeholder="物联网编码"
-                  :disabled="dialogStatus == 'update' && isEditWork"
+
                 />
               </el-form-item>
             </el-col>
@@ -1192,25 +1199,19 @@
                   ref="duration"
                   v-model="createTemp.duration"
                   placeholder="标准工作时长"
-                  :disabled="dialogStatus == 'update' && isEditWork"
+
                 />
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="工作类别" prop="work">
-                <!-- <el-input
-                  ref="duration"
-                  v-model="createTemp.work"
-                  placeholder="工作类别"
-                  :disabled="dialogStatus == 'update' && isEditWork"
-                /> -->
+
                 <el-select
                   v-model="createTemp.work"
                   clearable
                   placeholder="工作类别"
                   class="filter-item"
                   style="width: 120px"
-                  :disabled="dialogStatus == 'update' && isEditWork"
                 >
                   <!-- TODO: -->
                   <el-option
@@ -2835,6 +2836,7 @@ export default {
   directives: { waves },
   data() {
     return {
+      isShow: true, // 是否有值
       workList: [], // 工作类别
       isEditWork: true,
       isBasicsAdd: [],
@@ -3000,7 +3002,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           proId: '',
@@ -3033,7 +3035,7 @@ export default {
         name: 'getAssetListSH',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           eqCode: '',
@@ -3141,7 +3143,7 @@ export default {
         name: 'cerateEQNumber',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -3159,7 +3161,7 @@ export default {
         name: 'getAssetBigSpotCheck1',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }
       },
@@ -3171,7 +3173,7 @@ export default {
         name: 'getBigupkeepbyeq',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetimeUpkeepbyeq: '',
@@ -3189,7 +3191,7 @@ export default {
         name: 'getAssetMaintain1',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetimeAssetMaintain: '',
@@ -3206,7 +3208,7 @@ export default {
         name: 'getAssetSTT1',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { startTime: '', stopTime: '' }
       },
@@ -3218,7 +3220,7 @@ export default {
         name: 'getAssetChange1',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           startTime: '',
@@ -3235,7 +3237,7 @@ export default {
         name: 'getAssetPartApply',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           startTime: '',
@@ -3252,7 +3254,7 @@ export default {
         name: 'getBrandByPartCode',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -3261,7 +3263,7 @@ export default {
         name: 'findAllEmployeV2',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -3288,7 +3290,7 @@ export default {
         name: 'getEqPartuseDetailList',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           receiveTime: '',
@@ -4473,12 +4475,20 @@ export default {
       })
     },
     form_edit(row) {
+      // row.eqCode = ''// TODO:
+      if (row.eqCode != '') {
+        this.isShow = true
+      } else {
+        this.isShow = false
+      }
+
       if (this.dialogFormVisible) {
         return
       }
       this.edit = 0
       this.getDepartParam.parammaps.pastureId = row.pastureId
       this.getCreateDepartDownList()
+
       this.createTemp = Object.assign({}, row) // copy obj
       if (row.inputUser !== undefined) {
         this.createTemp.inputUser = parseInt(row.inputUser)
@@ -5571,7 +5581,7 @@ export default {
             sheetName: '设备基础信息'
           }
         ]
-        json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
+        json2excel(elecExcelDatas, '设备基础信息', false, 'xlsx')
       })
     },
     handleDownloadSH() {
@@ -5660,7 +5670,7 @@ export default {
             sheetName: '设备基础信息'
           }
         ]
-        json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
+        json2excel(elecExcelDatas, '设备基础信息', false, 'xlsx')
       })
     },
     handleSelectionChange(item) {

+ 1 - 1
src/views/asset/complain/index.vue

@@ -246,7 +246,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 2 - 2
src/views/asset/equipmentAllocation/index.vue

@@ -237,7 +237,7 @@ export default {
         name: 'geteqTransferList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -260,7 +260,7 @@ export default {
         name: 'geteqbyNameCode',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 2 - 2
src/views/asset/install/index.vue

@@ -318,7 +318,7 @@ export default {
         name: 'geteqChangeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetCode: '',
@@ -412,7 +412,7 @@ export default {
         name: 'getAssetchangeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           eqId: '',

+ 1 - 1
src/views/asset/installrecord/index.vue

@@ -246,7 +246,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 1 - 1
src/views/asset/mailrepair/index.vue

@@ -246,7 +246,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 1 - 1
src/views/asset/order/index.vue

@@ -246,7 +246,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 1 - 1
src/views/asset/ordersend/index.vue

@@ -246,7 +246,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 1 - 1
src/views/asset/service/index.vue

@@ -246,7 +246,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 2 - 2
src/views/asset/standardAssetAllocation/index.vue

@@ -14,7 +14,7 @@
       <tree-select
         v-model="getdataListParm.parammaps.eqClassId"
         class="typeSelect"
-        :height="150"
+        :height="300"
         :width="250"
         size="small"
         :data="parentClass"
@@ -111,7 +111,7 @@ export default {
       total: 0,
       listLoading: true,
       getdataListParm: {
-        name: 'getEquipmentAndEquipmentStandard', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getEquipmentAndEquipmentStandard', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), departmentName: '', eqClassId: '' }
       },
       requestParam: { name: 'insertAsset', offset: 0, pagecount: 0, parammaps: {}}, statueReason: false,

+ 1 - 1
src/views/asset/telvisit/index.vue

@@ -247,7 +247,7 @@ export default {
         name: 'getAssetList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 4 - 3
src/views/asset/template/components/baoyang.vue

@@ -344,6 +344,7 @@
               <el-form-item label="设备类别:" prop="NewName">
                 <tree-select
                   :disabled="disabled"
+                  :height="300"
                   :width="300"
                   size="small"
                   multiple
@@ -469,7 +470,7 @@ export default {
         name: 'getPositionPartBypid',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -478,7 +479,7 @@ export default {
         name: 'getPositionByName',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
         }
@@ -497,7 +498,7 @@ export default {
         name: 'getPartsListUpkeep',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 1 - 1
src/views/asset/template/components/bumeng.vue

@@ -81,7 +81,7 @@ export default {
       getdataListParm: {
         name: 'getEmpAll',
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         params: []
       },

+ 3 - 2
src/views/asset/template/components/buwei.vue

@@ -249,6 +249,7 @@
                 <tree-select
                   :disabled="disabled"
                   :width="300"
+                  :height="300"
                   size="small"
                   multiple
                   :data="parentType"
@@ -349,7 +350,7 @@ export default {
         name: 'getPartsListBW',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -366,7 +367,7 @@ export default {
         name: 'getPositionPartBypid',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 3 - 2
src/views/asset/template/components/buwei1.vue

@@ -249,6 +249,7 @@
                 <tree-select
                   :disabled="disabled"
                   :width="300"
+                  :height="300"
                   size="small"
                   multiple
                   :data="parentType"
@@ -349,7 +350,7 @@ export default {
         name: 'getPartsListBW',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -366,7 +367,7 @@ export default {
         name: 'getPositionPartBypid',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 1 - 0
src/views/asset/template/components/dianjian.vue

@@ -167,6 +167,7 @@
                 <tree-select
                   :disabled="disabled"
                   :width="300"
+                  :height="280"
                   size="small"
                   multiple
                   :data="parentType"

+ 1 - 0
src/views/asset/template/components/guzhang.vue

@@ -193,6 +193,7 @@
                 <tree-select
                   :disabled="disabled"
                   :width="300"
+                  :height="280"
                   size="small"
                   multiple
                   :data="parentType"

+ 7 - 0
src/views/asset/template/index.vue

@@ -142,4 +142,11 @@ export default {
   .component-item{
     overflow-y: auto
   }
+  ::v-deep .el-tree-node__expand-icon{
+    font-size: 24px;
+  }
+  ::v-deep .el-tree-node__label{
+  font-size: 18px;
+  }
+
 </style>

+ 4 - 3
src/views/basic/assetStandardManagement/index.vue

@@ -6,7 +6,7 @@
       </el-select>
       <tree-select
         v-model="table.getdataListParm.eqClassId"
-        :height="200"
+        :height="260"
         :width="300"
         size="small"
         class="typeSelect"
@@ -56,6 +56,7 @@
             v-model="scope.row.eqClassId"
             size="small"
             :width="200"
+            :height="260"
             :display="scope.row.dispaly"
             :data="equipmentCategory.list"
             :disabled="equipmentCategory.disabled"
@@ -98,7 +99,7 @@ import Pagination from '@/components/Pagination'
 import { MessageBox } from 'element-ui'
 import TreeSelect from '@/components/TreeSelect'
 export default {
-  name: 'AssetStandardManagement',
+  // name: 'AssetStandardManagement',
   components: { Pagination, TreeSelect },
   data() {
     return {
@@ -117,7 +118,7 @@ export default {
       table: {
         tableKey: 0, list: [], tablelist: [], total: 0, listLoading: true, idsArray: [], deptEnableList: [], deptNameArray: [], propertyArray: [],
         getdataListParm: {
-          deptName: '', eqClassId: '', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}
+          deptName: '', eqClassId: '', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: {}
         }
       },
       postDataParm: {},

+ 1 - 1
src/views/basic/brand/index.vue

@@ -199,7 +199,7 @@ export default {
         name: 'getBrandList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           brandName: ''

+ 1 - 1
src/views/basic/maintenanceWorkerCategory/index.vue

@@ -91,7 +91,7 @@ export default {
       table: {
         tableKey: 0, total: 0, listLoading: true, list: [], pageNum: 0, pageSize: 10,
         getdataListParm: {
-          name: 'getMaintence', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+          name: 'getMaintence', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
           parammaps: {}
         }
       },

+ 178 - 11
src/views/basic/otherinfo/index.vue

@@ -7,7 +7,7 @@
       <el-select v-model="getdataListParm.parammaps.departmentName" clearable placeholder="部门" class="filter-item">
         <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.name" />
       </el-select>
-      <el-autocomplete ref="cardNumber" v-model="getdataListParm.parammaps.cardNumber" style="width:300px" value-key="cardNumber" class="inline-input filter-item" :fetch-suggestions="cardNumberSearch" placeholder="请选择油卡编号" @select="handlecardNumberSelect">
+      <el-autocomplete ref="cardNumber" v-model="getdataListParm.parammaps.cardNumber"   style="width:300px" value-key="cardNumber" class="inline-input filter-item" :fetch-suggestions="cardNumberSearch" placeholder="请选择油卡编号" @select="handlecardNumberSelect">
         <template slot-scope="{ item }">
           <div class="name" style="display: inline;">{{ item.cardNumber }}</div>
         </template>
@@ -54,7 +54,7 @@
           <span v-else>停用</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="350" class-name="small-padding fixed-width" fixed="right">
+      <el-table-column label="操作" align="center" width="420" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="{row}">
           <el-button v-if="row.enable == 0" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
           <el-button type="success" size="mini" @click="handleChange(row)">变更记录</el-button>
@@ -62,6 +62,7 @@
           <el-button v-if="row.enable == 0" type="danger" size="mini" @click="handleDisable(row)">停用</el-button>
           <el-button v-else type="danger" size="mini" @click="handleDisable(row)">启用</el-button>
           <el-button v-if="row.enable == 1" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button type="warning" size="mini" @click="handleHistory(row)">历史数据</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -239,6 +240,118 @@
         <el-button @click="rechargeFFormVisible = false">取消并关闭</el-button>
       </div>
     </el-dialog>
+
+    <!-- 历史数据 -->
+      <el-dialog title="历史数据" :visible.sync="historyVisible" :close-on-click-modal="false" width="80%">
+      <div>
+      <!-- 搜索条件 -->
+     <el-form ref="temp" :inline="true"  :model="getdataHistory.parammaps"   >
+        <el-row >
+          <el-col :span="10">
+            <el-form-item label="日期:" prop="dateFormat" >
+               <el-date-picker ref="date" style="width: 280px;"  v-model="getdataHistory.parammaps.date" class="date" type="month"  format="yyyy-MM"  value-format="yyyy-MM"/>
+            </el-form-item>
+          </el-col>
+          <!-- <el-col :span="8">
+            <el-form-item label="设备编号:" prop="assetNumber" >
+              <el-input ref="rechargeNum" placeholder="设备编号" v-model="getdataHistory.parammaps.assetNumber" />
+            </el-form-item>
+          </el-col> -->
+          <el-col :span="6">
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="searchHistory">搜索</el-button>
+          </el-col>
+        </el-row>
+      </el-form>
+      <!-- 数据查看 -->
+      <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="historyList"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          ref="histoyTable"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="牧场" width="90px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.pastureName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="部门" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.departName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="交易时间" sortable prop="selTime" width="90px" align="center" />
+      <el-table-column label="车号" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.assetNumber }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="加油工" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.empId }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="卡号" width="90px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.cardNumber }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="卡类型" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.cardType }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="本次加油量(升)" sortable prop="oilAmount" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.oilAmount }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="本次消费金额(元)" sortable prop="nowPrice" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.nowPrice }}</span>
+        </template>
+      </el-table-column>
+        <el-table-column label="录用人" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.employName }}</span>
+        </template>
+      </el-table-column>
+        <el-table-column label="柴油类型" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.oilName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.note }}</span>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="操作" align="center" width="200px" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+          <el-button v-if="isDieselModify" type="success" size="mini" @click="handleDieselUpdate(row)">编辑</el-button>
+          <el-button v-if="isDieselDel" type="danger" size="mini" @click="handleDieselDel(row)">删除</el-button>
+        </template>
+      </el-table-column> -->
+      </el-table>
+      <pagination v-show="total>0" :total="total" :page.sync="getdataHistory.offset" :limit.sync="getdataHistory.pagecount" @pagination="getHistory" />
+
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button type="primary" @click="createRechargeData()">确认</el-button> -->
+        <el-button @click="historyVisible = false">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -258,6 +371,20 @@ export default {
   directives: { waves },
   data() {
     return {
+        historyList:[],
+        getdataHistory: {
+        name: 'getDieselListByOilcard',
+        page: 1,
+        offset: 1,
+        pagecount: 100,
+          returntype: 'Map',
+        parammaps: {
+          selTime: '',
+          pastureName: Cookies.get('pasturename'),
+          departName: '',
+          date:''
+        }
+      },
       myHeight:document.documentElement.clientHeight - 85- 200,
       isOtherinfoExport:[],
       buttons:[],
@@ -284,27 +411,27 @@ export default {
       getDeptParm: { name: 'getdeptrecu', idname: 'value', params: [-1] },
       postDataPramas: { },
       getdataListParm: {
-        name: 'getOilcardList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getOilcardList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pname: '', pastureName: Cookies.get('pasturename') }
       },
       requestFilterParams: {
-        name: '', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: '', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: {}
       },
       requestFilterParams2: {
-        name: '', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: '', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: {}
       },
       getchangedataListParm: {
-        name: 'getOilcardHistory', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getOilcardHistory', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { }
       },
       getchangedataListParm2: {
-        // name: 'getOilcardHistory', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        // name: 'getOilcardHistory', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         // parammaps: { }
       },
       getrechargedataListParm: {
-        name: 'getrechargerecordList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getrechargerecordList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { }
       },
       cardTypeList: [{ name: '内部', id: '0' }],
@@ -331,6 +458,7 @@ export default {
       changeFormVisible: false,
       rechargeFormVisible: false,
       rechargeFFormVisible: false,
+      historyVisible: false,
       tabledialogStatus: '',
       dialogStatus: '',
       textMap: { update: '编辑', create: '新增', change: '变更记录', recharge: '充值记录', changeF: '换卡', rechargeF: '充值' },
@@ -390,6 +518,44 @@ export default {
   },
 
   methods: {
+    searchHistory() {
+      this.listLoading = true
+      this.getdataHistory.offset = 1
+      this.getHistory();
+    },
+    formatDate(date) {
+      const year = date.getFullYear();
+      const month = ('0' + (date.getMonth() + 1)).slice(-2);
+      return `${year}-${month}`;
+    },
+
+        // 查查看历史数据
+    handleHistory(row) {
+      this.historyVisible = true;
+      this.getdataHistory.parammaps.date = this.formatDate(new Date());
+      this.getdataHistory.parammaps.cardNumber = row.cardNumber;
+      this.getdataHistory.parammaps.id = row.id;
+      this.getHistory();
+    },
+    // 获取历史数据
+   getHistory() {
+       this.listLoading = true
+        GetDataByName(this.getdataHistory).then(response => {
+        if (response.data.list == null) {
+          this.historyList = []
+        } else {
+          this.historyList = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+          if (response.data.total) {
+            this.total = response.data.total
+          }
+        }
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
     get_auto_buttons() {
       // 导出
       const OtherinfoExport = 'basic:otherinfo:otherinfoExport'
@@ -487,7 +653,7 @@ export default {
       row.status = status
     },
     form_reset() {
-      this.temp = { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), dateFormat: parseTime(new Date(), '{y}-{m}-{d}'), assetName: '', assetId: '', deptName: '', pastureName: '', pastureId: Cookies.get('pastureid'), cardNumber: '', cardType: '内部', cardAmount: '', rechargeNum: '' }
+      this.temp = { date: parseTime(new Date(), '{y}-{m}-{d}'), dateFormat: parseTime(new Date(), '{y}-{m}-{d}'), assetName: '', assetId: '', deptName: '', pastureName: '', pastureId: Cookies.get('pastureid'), cardNumber: '', cardType: '内部', cardAmount: '', rechargeNum: '' }
     },
     form_add() {
       this.form_reset()
@@ -530,7 +696,7 @@ export default {
             dateFormat: this.temp.dateFormat,
             departmentId: this.temp.departmentId,
             deptName: this.temp.departmentName,
-            inputDatetime: this.temp.inputDatetime,
+            date: this.temp.date,
             pastureId: this.temp.pastureId,
             pastureName: this.temp.pastureName,
             rechargeNum: this.temp.rechargeNum
@@ -591,7 +757,7 @@ export default {
             dateFormat: this.temp.dateFormat,
             departmentId: this.temp.departmentId,
             deptName: this.temp.departmentName,
-            inputDatetime: this.temp.inputDatetime,
+            date: this.temp.date,
             pastureId: this.temp.pastureId,
             pastureName: this.temp.pastureName,
             rechargeNum: this.temp.rechargeNum
@@ -677,6 +843,7 @@ export default {
       this.getchangedataListParmList2(row)
     },
 
+
     getchangedataListParmList2(row) {
       this.changelistLoading = true
       this.getchangedataListParm2 = {}

+ 5 - 3
src/views/basic/product/index.vue

@@ -345,7 +345,7 @@ export default {
         name: 'getProviderList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           providerName: ''
@@ -400,7 +400,7 @@ export default {
         name: 'getWarehousimple',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         parammaps: {
           pastureId: Cookies.get('pastureid')
         }
@@ -413,7 +413,7 @@ export default {
         name: 'getWarehouproviderlist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -477,6 +477,8 @@ export default {
       rules: {
         assetNumber: [{ required: true, message: '必填', trigger: 'blur' }],
         equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
+        sapcode: [{ required: true, message: '必填', trigger: 'blur' }], // todo:
+        providerIntro: [{ required: true, message: '必填', trigger: 'blur' }],
         providerName: [{ required: true, message: '必填', trigger: 'blur' }],
         providerNumber: [{ required: true, message: '必填', trigger: 'blur' }]
       },

+ 1 - 1
src/views/basic/productclass/index.vue

@@ -120,7 +120,7 @@ export default {
       },
       getdataListParm: { name: 'getPastureList',
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         params: [] },
       rules: {
         productclass: [{ type: 'string', required: true, message: '产品分类名称必填', trigger: 'change' }],

+ 472 - 0
src/views/basic/ranchAccompany/index.vue

@@ -0,0 +1,472 @@
+<template>
+  <div class="app-container">
+    <div class="app-container">
+      <div class="filter-container">
+        <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="form_add"> 新增 </el-button>
+      </div>
+      <el-table
+        v-loading="listLoading"
+        element-loading-text="给我一点时间"
+        :data="list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable"
+        row-key="id"
+        :tree-props="{children: 'list'}"
+        :max-height="myHeight"
+      >
+        <el-table-column label="序号" type="index" width="50" />
+        <el-table-column label="牧场名称" header-align="center" min-width="150px">
+          <template slot-scope="scope">
+            <span>{{ scope.row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="牧场编号" header-align="center" min-width="110px">
+          <template slot-scope="scope">
+            <span>{{ scope.row.pastureNumber }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="说明" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.remark }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" align="center" width="260" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="primary" size="mini" @click="form_edit(row,1)"> 编辑 </el-button>
+            <el-button v-if="row.status!='已删'" size="mini" type="danger" @click="form_edit(row,2)"> 删除 </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
+        <el-form ref="dataForm" :rules="rules" :model="deptform" label-position="left" label-width="100px" style="width: 50%; margin-left:50px;">
+          <el-form-item  label="上级层级:" prop="mainPastrue">
+            <tree-select
+              :disabled="disabled"
+              :height="300"
+              :width="300"
+              size="small"
+              :data="parentDept"
+              :default-props="defaultProps"
+              :node-key="nodeKey"
+              :checked-keys="defaultCheckedKeys"
+              @popoverHide="popoverHide"
+              :clearable="true"
+            />
+          </el-form-item>
+          <el-form-item label="牧场名称:" prop="pastureId"  >
+            <el-select v-model="deptform.pastureId" placeholder="牧场:"  @change="getCode" >
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+          </el-form-item>
+          <!-- <el-form-item label="牧场名称:" prop="pastureId" v-else >
+            <el-input
+              ref="pastureNumber"
+              v-model="deptform.pastureName"
+              placeholder="牧场名称"
+              disabled
+            />
+          </el-form-item> -->
+          <el-form-item label="牧场编号:" prop="pastureNumber">
+            <el-input
+              ref="pastureNumber"
+              v-model="deptform.pastureNumber"
+              placeholder="自动填入编号"
+              disabled
+            />
+          </el-form-item>
+
+
+          <el-form-item label="说明: " prop="remark">
+            <el-input
+              ref="remark"
+              v-model="deptform.remark"
+              :autosize="{ minRows: 2, maxRows: 4}"
+              type="textarea"
+              placeholder="请输入"
+            />
+          </el-form-item>
+
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <!-- <el-button v-if="dialogStatus==='create'" ref="createb" type="success" @click="add_dialog_save_again()"> 确认新增 </el-button> -->
+          <el-button type="primary" @click="form_addConfirm('提交成功')"> 确认提交 </el-button>
+          <el-button @click="dialogFormVisible = false;get_table_data()"> 关闭 </el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import TreeSelect from '@/components/TreeSelect'
+import waves from '@/directive/waves' // waves directive
+import { isIntegerZero } from '@/utils/validate'
+import { PostDataByName, editMainPasture,getMainPastur, GetDataByName, transData, failproccess ,GetDataByNames} from '@/api/common'
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+
+export default {
+  name: 'Dept',
+  components: { TreeSelect },
+  directives: { waves },
+  data() {
+    return {
+      myHeight:document.documentElement.clientHeight - 85- 150,
+      disabled: false,
+      tableKey: 0,
+      list: [],
+      findAllPasture: [],
+      parentDept: [],
+      listLoading: true,
+      requestParam: {
+        name: 'createdept'
+      },
+      requestParamDel: {},
+      deptform: {
+        remark: '',
+        mainPastrue: '',
+        isMain:"",
+        pastureId:""
+      },
+     requestParams: [{ name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {'id': Cookies.get('pastureid') }},
+      ],
+     requestParams1: [{ name: 'getPastureIsMain', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {  }},
+    ],
+      getDeptListParm: { name: 'getdeptlistrecu',
+        idname: 'id',
+        params: [-1] },
+      getDeptParm: { name: 'getdeptrecu',
+        idname: 'value',
+        params: [-1] },
+      getDepartListParm: { name: 'getalldeptname' },
+      rules: {
+        pastureName: [{  required: true, message: '牧场名称必填', trigger: 'blur' }],
+        mainPastrue: [{ required: true, message: '上层级名称必填', trigger: 'blur' }]
+      },
+      dialogFormVisible: false,
+      parentDeptVisible: true,
+      dialogStatus: '',
+      textMap: {
+        update: '编辑',
+        create: '新增'
+      },
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      defaultProps: {
+        children: 'list',
+        label: 'name'
+      },
+      nodeKey: 'id',
+      defaultCheckedKeys: [],
+      type: '',
+      mainPastrue:[]
+    }
+  },
+  created() {
+    this.get_table_data()
+    this.get_select_list()
+
+  },
+  methods: {
+    // 编号
+    getCode(val) {
+      const obj = this.findAllPasture.find((item) => { return item.id == val })
+      console.log(obj,'obj')
+      this.deptform.pastureNumber = obj.pastureNumber;
+      this.deptform.pastureName = obj.name;
+      // this.dataform.pastureId = obj.id;
+    },
+    // 牧场
+     get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        console.log(this.findAllPasture,'hss')
+      })
+    },
+
+    get_mainPas_list() {
+      GetDataByNames(this.requestParams1).then(response => {
+        this.parentDept = response.data.getPastureIsMain.list
+        //  this.parentDept = this.list
+        console.log(  this.parentDept,response.data,'0++++')
+      })
+    },
+
+    popoverHide(checkedIds, checkedData) {
+      console.log(checkedIds, checkedData)
+      this.deptform.mainPastrue = checkedIds
+      // this.deptform.pastureId = checkedData.pastureId
+    },
+    deptenter() {
+      this.$nextTick(() => {
+        this.$refs['remark'].focus()
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      getMainPastur().then(response => {
+        if (response.data.list !== null) {
+          this.list = transData(response.data, 'id', 'list')
+        }
+        setTimeout(() => {
+          this.listLoading = false
+        }, 10)
+      })
+      this.get_mainPas_list()
+    },
+    // getDeptList() {
+    //   getRecuData(this.getDeptParm).then(response => {
+    //     this.parentDept = response.data
+    //   })
+    // },
+    resetRequestParam() {
+      this.deptform.isMain = ''
+      this.deptform.mainPastrue = ''
+      this.deptform.pastureId = ''
+      this.deptform.remark = ''
+      this.deptform.pastureName = ''
+      this.deptform.pastureNumber = ''
+    },
+    form_add() {
+      this.resetRequestParam()
+      this.dialogStatus = 'create'
+      this.parentDeptVisible = true
+      this.dialogFormVisible = true
+      if (this.list.length > 0) {
+        this.defaultCheckedKeys = [this.list[0].id]
+        this.deptform.mainPastrue = this.list[0].id
+        // this.deptform.pastureId = this.list[0].id
+      } else {
+        this.deptform.mainPastrue = 0
+      }
+      // this.$nextTick(() => {
+      //   this.$refs['dataForm'].clearValidate()
+      // })
+    },
+    // add_dialog_save() {
+    //   this.$refs['dataForm'].validate((valid) => {
+    //     if (valid) {
+    //       this.requestParam.name = 'createdept'
+    //       this.requestParam.parammaps = {}
+    //       this.requestParam.parammaps.pastureNumber = this.deptform.pastureNumber
+    //       this.requestParam.parammaps.KCcode = this.deptform.KCcode
+    //       this.requestParam.parammaps.pastureId = this.deptform.pastureId
+    //       this.requestParam.parammaps.mainPastrue = this.deptform.mainPastrue
+    //       this.requestParam.parammaps.deptname = this.deptform.deptname
+    //       this.requestParam.parammaps.remark = this.deptform.remark
+    //       this.requestParam.parammaps.sort = this.deptform.sort
+    //       this.requestParam.parammaps.enable = this.deptform.enable
+    //       this.requestParam.parammaps.isPasture = this.deptform.isPasture
+    //       this.requestParam.parammaps.costCenter_code = this.deptform.costCenter_code
+    //       PostDataByName(this.requestParam).then(response => {
+    //         if (response.msg !== 'fail') {
+    //           this.get_table_data()
+    //           this.dialogFormVisible = false
+    //           this.$notify({
+    //             title: '成功',
+    //             message: '新增成功',
+    //             type: 'success',
+    //             duration: 2000
+    //           })
+    //         } else {
+    //           failproccess(response, this.$notify)
+    //         }
+    //       })
+    //     }
+    //   })
+    // },
+    // add_dialog_save_again() {
+    //   this.$refs['dataForm'].validate((valid) => {
+    //     if (valid) {
+    //       this.requestParam.name = 'createdept'
+    //       this.requestParam.parammaps = {}
+    //       this.requestParam.parammaps.pastureNumber = this.deptform.pastureNumber
+    //       this.requestParam.parammaps.KCcode = this.deptform.KCcode
+    //       this.requestParam.parammaps.pastureId = this.deptform.pastureId
+    //       this.requestParam.parammaps.mainPastrue = this.deptform.mainPastrue
+    //       this.requestParam.parammaps.deptname = this.deptform.deptname
+    //       this.requestParam.parammaps.remark = this.deptform.remark
+    //       this.requestParam.parammaps.sort = this.deptform.sort
+    //       this.requestParam.parammaps.enable = this.deptform.enable
+    //       this.requestParam.parammaps.isPasture = this.deptform.isPasture
+    //       this.requestParam.parammaps.costCenter_code = this.deptform.costCenter_code
+    //       PostDataByName(this.requestParam).then(() => {
+    //         this.$nextTick(() => {
+    //           this.$refs['deptname'].focus()
+    //         })
+    //         this.get_table_data()
+    //         this.requestParam = {
+    //           name: 'createdept',
+    //           params: []
+    //         }
+    //         this.deptform.id = ''
+    //         this.deptform.deptname = ''
+    //         this.deptform.remark = ''
+    //         this.deptform.costCenter_code = ''
+    //         this.deptform.sort = '0'
+    //         this.deptform.enable = '1'
+    //         this.deptform.isPasture = '0'
+
+    //         this.$notify({
+    //           title: '成功',
+    //           message: '新增成功',
+    //           type: 'success',
+    //           duration: 2000
+    //         })
+    //       })
+    //     }
+    //   })
+    // },
+    form_addConfirm(type) {
+      if (this.type != 'del') {
+        // 如果 主牧场 和 子牧场 相同 ,则 isMain =1;
+         this.deptform.isMain = (this.deptform.mainPastrue &&  this.deptform.mainPastrue !== this.deptform.pastureId )? 0 : 1
+         this.deptform.mainPastrue = this.deptform.isMain == 1 ? 0 : this.deptform.mainPastrue
+       }
+      editMainPasture(this.deptform).then((res) => {
+        const { data } = res;
+        if (data == true) {
+          this.$notify({
+            title: '提示',
+            message: type,
+            type: 'success',
+            duration: 2000
+          })
+        } else {
+          this.$notify({
+            title: '提示',
+            message: data,
+            type: 'success',
+            duration: 2000
+          })
+        }
+       this.get_table_data()
+       this.dialogFormVisible = false
+       this.type = '';
+
+      })
+
+    },
+    form_edit(row, type) {
+      console.log(row,type,'000')
+      if (type != 1) {
+        this.type = 'del';
+        this.$confirm('此操作将永久删除牧场配置, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.resetRequestParam()
+          this.deptform.isMain = 0
+          this.deptform.mainPastrue = 0
+          this.deptform.pastureId = row.id
+          this.form_addConfirm('删除成功')
+
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
+      } else {
+        this.type = 'edit';
+        this.deptform.pastureId = row.id
+        this.deptform.pastureName = row.name
+        this.deptform.pastureNumber = row.pastureNumber
+        this.deptform.remark = row.remark
+        this.deptform.mainPastrue = 0
+        this.dialogStatus = 'update'
+        this.dialogFormVisible = true
+        this.parentDeptVisible = true
+        // this.$nextTick(() => {
+        //   this.$refs['dataForm'].clearValidate()
+        //   this.$refs['deptname'].focus()
+        // })
+          console.log(this.deptform,'001')
+      }
+    },
+    edit_dialog_save() {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.requestParam.name = 'updatedept'
+          this.requestParam.params = []
+          this.requestParam.params[0] = this.deptform.pastureNumber
+          this.requestParam.params[1] = this.deptform.KCcode
+          this.requestParam.params[2] = this.deptform.mainPastrue
+          this.requestParam.params[3] = this.deptform.deptname
+          this.requestParam.params[4] = this.deptform.remark
+          this.requestParam.params[5] = this.deptform.sort
+          this.requestParam.params[6] = this.deptform.enable
+          this.requestParam.params[7] = this.deptform.isPasture
+          this.requestParam.params[8] = this.deptform.costCenter_code
+          this.requestParam.params[9] = this.deptform.id
+
+          PostDataByName(this.requestParam).then(() => {
+            this.get_table_data()
+            this.dialogFormVisible = false
+            this.$notify({
+              title: '成功',
+              message: '修改成功',
+              type: 'success',
+              duration: 2000
+            })
+          })
+        }
+      })
+    },
+    handleEnableChange(index, row) {
+      this.requestParam.name = 'updatedept'
+      this.requestParam.params = []
+      if (row.sort === null) {
+        row.sort = '0'
+      }
+      this.requestParam.params[0] = row.pastureNumber
+      this.requestParam.params[1] = row.KCcode
+      this.requestParam.params[2] = row.mainPastrue
+      this.requestParam.params[3] = row.deptname
+      this.requestParam.params[4] = row.remark
+      this.requestParam.params[5] = row.sort
+      this.requestParam.params[6] = row.enable
+      this.requestParam.params[7] = row.isPasture
+      this.requestParam.params[8] = row.costCenter_code
+          this.requestParam.params[9] = row.id
+      PostDataByName(this.requestParam).then(() => {
+        this.$notify({
+          title: '成功',
+          message: '修改成功',
+          type: 'success',
+          duration: 2000
+        })
+      })
+    },
+    form_delete(row) {
+      MessageBox.confirm('部门名称:' + row.deptname, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.requestParamDel.name = 'deletedept'
+        this.requestParamDel.params = []
+        this.requestParamDel.params[0] = row.id
+        PostDataByName(this.requestParamDel).then(() => {
+          this.get_table_data()
+          this.dialogFormVisible = false
+          this.$notify({
+            title: '成功',
+            message: '删除成功',
+            type: 'success',
+            duration: 2000
+          })
+        })
+      })
+    }
+  }
+}
+</script>

+ 3 - 2
src/views/basic/standardStock/index.vue

@@ -7,7 +7,7 @@
     <div class="filter-container">
       <tree-select
         v-model="table.getdataListParm.partClassId"
-        :height="200"
+        :height="280"
         :width="300"
         size="small"
         class="typeSelect"
@@ -48,6 +48,7 @@
             v-model="scope.row.partClassId"
             size="small"
             :width="200"
+            :heigh="260"
             :display="scope.row.dispaly"
             :data="equipmentCategory.list"
             :disabled="equipmentCategory.disabled"
@@ -108,7 +109,7 @@ export default {
       table: {
         tableKey: 0, list: [], tablelist: [], total: 0, listLoading: true, idsArray: [],
         getdataListParm: {
-          partClassId: '', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}
+          partClassId: '', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: {}
         }
       },
       createTemp: {},

+ 1 - 1
src/views/basic/warehouse/index.vue

@@ -217,7 +217,7 @@ export default {
         name: 'getWarehouselist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: this.$store.state.user.pastureid,

+ 1 - 1
src/views/business/visit/index.vue

@@ -146,7 +146,7 @@ export default {
       getdataListParm: {
         name: 'getVisitList',
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           customname: '',

+ 1 - 1
src/views/console/apisql/index.vue

@@ -266,7 +266,7 @@ export default {
       },
       getdataListParm: { name: 'getapisqlall',
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         params: ['', '', '', ''] },
       getRecuListParm: { name: 'getMenuRecu' },
       rules: {

+ 1 - 1
src/views/console/dict/index.vue

@@ -200,7 +200,7 @@ export default {
       },
       getdataListParm: { name: 'getDictList',
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         params: [] },
       getRecuListParm: { name: 'getDictclass',
         idname: 'id',

+ 1 - 1
src/views/console/emp/index.vue

@@ -234,7 +234,7 @@ export default {
         name: 'getEmpAllL',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           empname: '',

+ 1 - 1
src/views/console/feedings/index.vue

@@ -203,7 +203,7 @@ export default {
         name: 'getFeedsumlist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename')

+ 1 - 1
src/views/console/ranchManagement/index.vue

@@ -179,7 +179,7 @@ export default {
           name: 'getPastureInforList',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {}
         }

+ 1 - 1
src/views/console/role/index.vue

@@ -150,7 +150,7 @@ export default {
         id: '', name: '', selectMenus: [], sort: '', enable: '', easInformationReception: ''
       },
       getdataListParm: { name: 'getRoleall',
-        offset: 1, pagecount: 10, returntype: 'Map',
+        offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureId: Cookies.get('pastureid') }},
       getMenuParm: { name: 'getMenuandButtonRecuRule', idname: 'id', params: [-1] },
       rules: {

+ 2 - 2
src/views/console/safetyStock/index.vue

@@ -13,7 +13,7 @@
       <el-input v-model="getdataListParm.parammaps.partName" placeholder="备件名称" style="width: 160px;" class="filter-item" />
       <tree-select
         class="typeSelect"
-        :height="150"
+        :height="260"
         :width="250"
         size="small"
         clearable
@@ -236,7 +236,7 @@ export default {
         name: 'getProviderList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       }

+ 26 - 5
src/views/console/user/index.vue

@@ -2,6 +2,20 @@
   <div class="app-container">
     <div class="app-container">
       <div class="filter-container">
+        <el-select
+          v-model="getdataListParm.parammaps.pastureName"
+          placeholder="牧场"
+          style="width:120px"
+          class="filter-item"
+          @change="changePastureName"
+        >
+          <el-option
+            v-for="item in findAllPasture"
+            :key="item.id"
+            :label="item.name"
+            :value="item.name"
+          />
+        </el-select>
         <el-input v-model="getdataListParm.parammaps.empCode" placeholder="用户名" style="width: 140px;" class="filter-item" />
         <el-input v-model="getdataListParm.parammaps.empname" placeholder="姓名" style="width: 140px;" class="filter-item" />
         <el-input v-model="getdataListParm.parammaps.roleName" placeholder="角色" style="width: 140px;" class="filter-item" />
@@ -25,6 +39,8 @@
         @sort-change="tableSort"
         :max-height="myHeight"
       >
+        <el-table-column label="牧场" prop="pastureName"  header-align="center" width="120px" align="center">
+        </el-table-column>
         <el-table-column label="用户名称" header-align="center" width="120px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.username }}</span>
@@ -200,6 +216,7 @@ export default {
   directives: { waves },
   data() {
     return {
+      findAllPasture: [],
       myHeight:document.documentElement.clientHeight - 85- 200,
       isUserDelete:[],isUserResetpassword:[],isUserEdit:[],isUserRole:[],isUserAdd:[],
       tableKey: 0,
@@ -214,7 +231,7 @@ export default {
         { name: 'getEmpall', offset: 0, pagecount: 0, params: [] },
         { name: 'getMaintenanceTypeList', offset: 0, pagecount: 0, params: [] },
         { name: 'getMcsAccounts', offset: 0, pagecount: 0, params: [] },
-
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }}
       ],
       requestFilterParams: { returntype: 'Map', parammaps: {}},
       UpdateDataRelationParam: { name: '', dataname: '', datavalue: '', valuename: '', values: [] },
@@ -227,8 +244,8 @@ export default {
       //   { deviceId: 'apptest2', uId: 'PC', pwd: 'mcs8@666' }
       ],
       getdataListParm: {
-        name: 'getuserallL', offset: 1, pagecount: 10, returntype: 'Map',
-        parammaps: { pastureId: Cookies.get('pastureid'), empCode: '', empname: '' }
+        name: 'getuserallL', offset: 1, pagecount: 50, returntype: 'Map',
+        parammaps: { pastureId: Cookies.get('pastureid'), empCode: '', empname: '', }
       },
       updateParam: {
         name: 'getMaintenanceTypeByUser', offset: 1, pagecount: 0, returntype: 'list',
@@ -261,6 +278,11 @@ export default {
     this.get_table_data()
   },
   methods: {
+     changePastureName(item) {
+      this.getdataListParm.parammaps.pastureId = this.findAllPasture.find(
+        (obj) => obj.name == item
+      ).id
+    },
     tableSort(column) {
       sortChange(column, this.list)
     },
@@ -292,9 +314,8 @@ export default {
         this.rolelist = response.data.getRoleall.list
         this.emplist = response.data.getEmpall.list
         this.repairmanTypeList = response.data.getMaintenanceTypeList.list
-
         this.viedoAccountList = response.data.getMcsAccounts.list
-
+        this.findAllPasture = response.data.findAllPasture.list
 
         GetDataByName(this.getdataListParm).then(response => {
           this.list = response.data.list

+ 1 - 1
src/views/console/user/index改好.vue

@@ -224,7 +224,7 @@ export default {
         { deviceId: 'apptest2', uId: 'PC', pwd: 'mcs8@666' }
       ],
       getdataListParm: {
-        name: 'getuserallL', offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getuserallL', offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureId: Cookies.get('pastureid'), empCode: '', empname: '' }
       },
       updateParam: {

+ 46 - 46
src/views/cost/biomassConsum/index.vue

@@ -40,7 +40,7 @@
       :row-style="rowStyle"
       :cell-style="cellStyle"
       class="elTable"
- 
+
     >
       <el-table-column label="序号" align="center" type="index" width="50px">
         <template slot-scope="scope">
@@ -62,7 +62,7 @@
           <span>{{ scope.row.dosage }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="单价"  min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.price }}</span>
@@ -83,7 +83,7 @@
           <span>{{ scope.row.date  }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="备注" min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.remarks  }}</span>
@@ -101,9 +101,9 @@
     <!-- 弹出层新增or修改 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
       <el-form ref="temp" :rules="rules1" :model="temp" label-position="right" label-width="110px">
-        
+
         <el-row>
-           
+
           <el-col :span="8">
 
             <el-form-item label="牧场:" prop="pastureId" v-show="dialogStatus==='create'">
@@ -127,11 +127,11 @@
             <el-form-item label="部门:"  prop="departmentId"  v-show="dialogStatus==='update'">
                 <el-input ref="departmentName" v-model="temp.departmentName"  disabled />
             </el-form-item>
-    
+
           </el-col>
- 
 
-           
+
+
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -139,7 +139,7 @@
               <el-input ref="dosage" v-model="temp.dosage"    />
             </el-form-item>
           </el-col>
-         
+
           <el-col :span="8">
             <el-form-item label="单价(元):" prop="price">
               <el-input ref="price" v-model="temp.price"   />
@@ -161,7 +161,7 @@
             <el-form-item label="记录人:"  prop="empname"  v-show="dialogStatus==='update'" >
               <el-input ref="empname" v-model="temp.empname"  disabled />
             </el-form-item>
-           
+
           </el-col>
           <el-col :span="8">
             <el-form-item label="录入日期:" prop="date">
@@ -173,9 +173,9 @@
               <el-input ref="remarks" v-model="temp.remarks"  />
             </el-form-item>
           </el-col>
-          
+
         </el-row>
-         
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="dialogStatus==='create'" ref="createb" type="success" :disabled="isokDisable" @click="add_dialog_save_again()">保存并新增</el-button>
@@ -209,7 +209,7 @@
               <span>{{ scope.$index + (pageNumDosageRecord-1) * pageSizeDosageRecord + 1 }}</span>
             </template>
           </el-table-column>
-  
+
           <el-table-column label="用量"  prop="dosage" min-width="110px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.dosage }}</span>
@@ -235,7 +235,7 @@
               <span>{{ scope.row.date }}</span>
             </template>
           </el-table-column>
-        
+
         </el-table>
         <pagination v-show="totalDosageRecord>=0" :total="totalDosageRecord" :page.sync="getDosageRecordListParm.offset" :limit.sync="getDosageRecordListParm.pagecount" @pagination="get_record_list" />
         <div slot="footer" class="dialog-footer">
@@ -291,8 +291,8 @@ export default {
       list: null,
       total: 0,
       listLoading: true,
- 
-   
+
+
       requestParam: {
         name: 'insertElectricity',
         offset: 0,
@@ -307,7 +307,7 @@ export default {
         name: 'getBiomass',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',  formNumber: '',   formType: '',    pastureName: Cookies.get('pasturename'),  departName: '', date: ''
@@ -328,8 +328,8 @@ export default {
       useTypes: [{ id: 0, name: '1级表' }, { id: 1, name: '2级表' }, { id: 2, name: '3级表' }],
       getDictByName: [],
       findAllAssetType: [],
-     
- 
+
+
       pastureList: [],
       departList1:[],
       departList2:[],
@@ -351,12 +351,12 @@ export default {
         name: 'getElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { }
       },
 
-      temp: { 
+      temp: {
         pastureName: '',
         departName: '',
         dosage: '',
@@ -385,7 +385,7 @@ export default {
         name: 'getBiomassList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { "departmentId": ""}
       },
@@ -417,12 +417,12 @@ export default {
         price: [{ required: true, message: '必填', trigger: 'blur' }],
         departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
         expense: [{ required: true, message: '必填', trigger: 'blur' }],
-       
-         
+
+
       },
 
       rules2: { },
-    
+
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       buttons: [],
@@ -506,7 +506,7 @@ export default {
         }
       }, 0)
     },
-   
+
     form_export() {
       this.downLoadObj.parammaps = this.tableObj.parammaps
       GetDataByName(this.downLoadObj).then(response => {
@@ -531,7 +531,7 @@ export default {
     },
 
 
-    
+
 
     formatJson(filterVal, jsonData) {
       return jsonData.map(v =>
@@ -574,10 +574,10 @@ export default {
         this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
       }
     },
-   
-  
-   
-  
+
+
+
+
     // 1-1: table&搜索
     get_table_data() {
       if(this.tableObj.parammaps.pastureName == '现代牧业'){
@@ -612,7 +612,7 @@ export default {
         this.get_departList2()
       })
     },
-    
+
     change_pasture1(item) {
       this.getDepartParam1.parammaps.pastureId = this.pastureList.find(obj => obj.name == item).id
       this.tableObj.parammaps.departName = ''
@@ -643,7 +643,7 @@ export default {
         this.tableObj.parammaps.date =''
       }
 
-    
+
       this.get_table_data()
     },
 
@@ -653,10 +653,10 @@ export default {
       this.$set(this.temp, 'inputid', item)
       this.$forceUpdate()
     },
-   
+
     form_reset() {
 
-    
+
 
       this.temp.pastureName = ''
       this.temp.departName = ''
@@ -671,20 +671,20 @@ export default {
       this.temp.pastureId = ''
 
 
-      
+
     },
     form_add() {
       this.form_reset()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
-       
+
       this.$nextTick(() => {
         this.$refs['temp'].clearValidate()
       })
- 
+
     },
-   
-    
+
+
     add_dialog_save() {
       console.log("this.temp=====>",this.temp)
       this.isokDisable = true
@@ -700,9 +700,9 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
-  
+
             if (response.msg === 'fail') {
               this.$notify({
                 title: '保存失败',
@@ -738,7 +738,7 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             console.log('保存发送参数', this.postDataPramas)
             if (response.msg === 'fail') {
@@ -774,14 +774,14 @@ export default {
     edit_dialog_save() {
       this.$refs['temp'].validate(valid => {
         if (valid) {
-           
+
           var send_data = {
               "name": "updateBiomass",
               "offset": 0,
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             if (response.msg === 'fail') {
               this.$notify({
@@ -812,7 +812,7 @@ export default {
     form_delete_sure() {
       this.$refs['deleteTemp'].validate(valid => {
         if (valid) {
-    
+
           var send_data = {
             "name":"delBiomass","offset":0,"pagecount":0,
             "parammaps":{"date":this.deleteTemp.startTime}

+ 1 - 1
src/views/cost/budget/index.vue

@@ -242,7 +242,7 @@ export default {
         name: 'getMonthbudgetlist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),

+ 47 - 47
src/views/cost/coalConsum/index.vue

@@ -40,7 +40,7 @@
       :row-style="rowStyle"
       :cell-style="cellStyle"
       class="elTable"
- 
+
     >
       <el-table-column label="序号" align="center" type="index" width="50px">
         <template slot-scope="scope">
@@ -62,7 +62,7 @@
           <span>{{ scope.row.dosage }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="单价"  min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.price }}</span>
@@ -83,7 +83,7 @@
           <span>{{ scope.row.date  }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="备注" min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.remarks  }}</span>
@@ -101,9 +101,9 @@
     <!-- 弹出层新增or修改 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
       <el-form ref="temp" :rules="rules1" :model="temp" label-position="right" label-width="110px">
-        
+
         <el-row>
-           
+
           <el-col :span="8">
 
             <el-form-item label="牧场:" prop="pastureId" v-show="dialogStatus==='create'">
@@ -127,11 +127,11 @@
             <el-form-item label="部门:"  prop="departmentId"  v-show="dialogStatus==='update'">
                 <el-input ref="departmentName" v-model="temp.departmentName"  disabled />
             </el-form-item>
-    
+
           </el-col>
- 
 
-           
+
+
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -139,7 +139,7 @@
               <el-input ref="dosage" v-model="temp.dosage"    />
             </el-form-item>
           </el-col>
-         
+
           <el-col :span="8">
             <el-form-item label="单价(元):" prop="price">
               <el-input ref="price" v-model="temp.price"   />
@@ -161,7 +161,7 @@
             <el-form-item label="记录人:"  prop="empname"  v-show="dialogStatus==='update'" >
               <el-input ref="empname" v-model="temp.empname"  disabled />
             </el-form-item>
-           
+
           </el-col>
           <el-col :span="8">
             <el-form-item label="录入日期:" prop="date">
@@ -173,9 +173,9 @@
               <el-input ref="remarks" v-model="temp.remarks"  />
             </el-form-item>
           </el-col>
-          
+
         </el-row>
-         
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="dialogStatus==='create'" ref="createb" type="success" :disabled="isokDisable" @click="add_dialog_save_again()">保存并新增</el-button>
@@ -209,7 +209,7 @@
               <span>{{ scope.$index + (pageNumDosageRecord-1) * pageSizeDosageRecord + 1 }}</span>
             </template>
           </el-table-column>
-  
+
           <el-table-column label="用量"  prop="dosage" min-width="110px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.dosage }}</span>
@@ -235,7 +235,7 @@
               <span>{{ scope.row.date }}</span>
             </template>
           </el-table-column>
-        
+
         </el-table>
         <pagination v-show="totalDosageRecord>=0" :total="totalDosageRecord" :page.sync="getDosageRecordListParm.offset" :limit.sync="getDosageRecordListParm.pagecount" @pagination="get_record_list" />
         <div slot="footer" class="dialog-footer">
@@ -291,8 +291,8 @@ export default {
       list: null,
       total: 0,
       listLoading: true,
- 
-   
+
+
       requestParam: {
         name: 'insertElectricity',
         offset: 0,
@@ -307,7 +307,7 @@ export default {
         name: 'getCoal',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',  formNumber: '',   formType: '',    pastureName: Cookies.get('pasturename'),  departName: '', date: ''
@@ -328,8 +328,8 @@ export default {
       useTypes: [{ id: 0, name: '1级表' }, { id: 1, name: '2级表' }, { id: 2, name: '3级表' }],
       getDictByName: [],
       findAllAssetType: [],
-     
- 
+
+
       pastureList: [],
       departList1:[],
       departList2:[],
@@ -351,12 +351,12 @@ export default {
         name: 'getElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { }
       },
 
-      temp: { 
+      temp: {
         pastureName: '',
         departName: '',
         dosage: '',
@@ -385,7 +385,7 @@ export default {
         name: 'getCoalList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { "departmentId": ""}
       },
@@ -411,19 +411,19 @@ export default {
         //     }
         //   }, 0)
         // }, trigger: 'blur' }],
-      
+
         pastureId: [{ required: true, message: '必填', trigger: 'blur' }],
         departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
         dosage: [{ required: true, message: '必填', trigger: 'blur' }],
         price: [{ required: true, message: '必填', trigger: 'blur' }],
         departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
         expense: [{ required: true, message: '必填', trigger: 'blur' }],
-       
-         
+
+
       },
 
       rules2: { },
-    
+
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       buttons: [],
@@ -507,7 +507,7 @@ export default {
         }
       }, 0)
     },
-   
+
     form_export() {
       this.downLoadObj.parammaps = this.tableObj.parammaps
       GetDataByName(this.downLoadObj).then(response => {
@@ -532,7 +532,7 @@ export default {
     },
 
 
-    
+
 
     formatJson(filterVal, jsonData) {
       return jsonData.map(v =>
@@ -575,10 +575,10 @@ export default {
         this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
       }
     },
-   
-  
-   
-  
+
+
+
+
     // 1-1: table&搜索
     get_table_data() {
       if(this.tableObj.parammaps.pastureName == '现代牧业'){
@@ -613,7 +613,7 @@ export default {
         this.get_departList2()
       })
     },
-    
+
     change_pasture1(item) {
       this.getDepartParam1.parammaps.pastureId = this.pastureList.find(obj => obj.name == item).id
       this.tableObj.parammaps.departName = ''
@@ -644,7 +644,7 @@ export default {
         this.tableObj.parammaps.date =''
       }
 
-    
+
       this.get_table_data()
     },
 
@@ -654,10 +654,10 @@ export default {
       this.$set(this.temp, 'inputid', item)
       this.$forceUpdate()
     },
-   
+
     form_reset() {
 
-    
+
 
       this.temp.pastureName = ''
       this.temp.departName = ''
@@ -672,20 +672,20 @@ export default {
       this.temp.pastureId = ''
 
 
-      
+
     },
     form_add() {
       this.form_reset()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
-       
+
       this.$nextTick(() => {
         this.$refs['temp'].clearValidate()
       })
- 
+
     },
-   
-    
+
+
     add_dialog_save() {
       console.log("this.temp=====>",this.temp)
       this.isokDisable = true
@@ -701,9 +701,9 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
-  
+
             if (response.msg === 'fail') {
               this.$notify({
                 title: '保存失败',
@@ -739,7 +739,7 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             console.log('保存发送参数', this.postDataPramas)
             if (response.msg === 'fail') {
@@ -775,14 +775,14 @@ export default {
     edit_dialog_save() {
       this.$refs['temp'].validate(valid => {
         if (valid) {
-           
+
           var send_data = {
               "name": "updateCoal",
               "offset": 0,
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             if (response.msg === 'fail') {
               this.$notify({
@@ -813,7 +813,7 @@ export default {
     form_delete_sure() {
       this.$refs['deleteTemp'].validate(valid => {
         if (valid) {
-    
+
           var send_data = {
             "name":"delCoal","offset":0,"pagecount":0,
             "parammaps":{"date":this.deleteTemp.startTime}

+ 46 - 46
src/views/cost/coalConsum/index1.vue

@@ -40,7 +40,7 @@
       :row-style="rowStyle"
       :cell-style="cellStyle"
       class="elTable"
- 
+
     >
       <el-table-column label="序号" align="center" type="index" width="50px">
         <template slot-scope="scope">
@@ -62,7 +62,7 @@
           <span>{{ scope.row.dosage }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="单价"  min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.price }}</span>
@@ -83,7 +83,7 @@
           <span>{{ scope.row.date  }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="备注" min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.remarks  }}</span>
@@ -101,9 +101,9 @@
     <!-- 弹出层新增or修改 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
       <el-form ref="temp" :rules="rules" :model="temp" label-position="right" label-width="110px">
-        
+
         <el-row>
-           
+
           <el-col :span="8">
 
             <el-form-item label="牧场:" prop="pastureId" v-show="dialogStatus==='create'">
@@ -127,11 +127,11 @@
             <el-form-item label="部门:"  prop="departmentId"  v-show="dialogStatus==='update'">
                 <el-input ref="departmentName" v-model="temp.departmentName"  disabled />
             </el-form-item>
-    
+
           </el-col>
- 
 
-           
+
+
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -139,7 +139,7 @@
               <el-input ref="dosage" v-model="temp.dosage"    />
             </el-form-item>
           </el-col>
-         
+
           <el-col :span="8">
             <el-form-item label="单价(元):" prop="price">
               <el-input ref="price" v-model="temp.price"   />
@@ -161,7 +161,7 @@
             <el-form-item label="记录人:"  prop="empname"  v-show="dialogStatus==='update'" >
               <el-input ref="empname" v-model="temp.empname"  disabled />
             </el-form-item>
-           
+
           </el-col>
           <el-col :span="8">
             <el-form-item label="录入日期:" prop="date">
@@ -173,9 +173,9 @@
               <el-input ref="remarks" v-model="temp.remarks"  />
             </el-form-item>
           </el-col>
-          
+
         </el-row>
-         
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="dialogStatus==='create'" ref="createb" type="success" :disabled="isokDisable" @click="add_dialog_save_again()">保存并新增</el-button>
@@ -186,7 +186,7 @@
     <!-- 用量记录 -->
     <el-dialog  title="用量记录" :visible.sync="dialogFormDosageRecord" :close-on-click-modal="false">
       <div class="dosageRecord">
-        
+
         <el-table
           :key="tableKey"
           v-loading="listLoadingDosageRecord"
@@ -206,7 +206,7 @@
               <span>{{ scope.$index + (pageNumDosageRecord-1) * pageSizeDosageRecord + 1 }}</span>
             </template>
           </el-table-column>
-  
+
           <el-table-column label="用量"  prop="dosage" min-width="110px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.dosage }}</span>
@@ -232,7 +232,7 @@
               <span>{{ scope.row.date }}</span>
             </template>
           </el-table-column>
-        
+
         </el-table>
         <pagination v-show="totalDosageRecord>=0" :total="totalDosageRecord" :page.sync="getDosageRecordListParm.offset" :limit.sync="getDosageRecordListParm.pagecount" @pagination="get_record_list" />
         <div slot="footer" class="dialog-footer">
@@ -288,8 +288,8 @@ export default {
       list: null,
       total: 0,
       listLoading: true,
- 
-   
+
+
       requestParam: {
         name: 'insertElectricity',
         offset: 0,
@@ -304,7 +304,7 @@ export default {
         name: 'getCoal',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',  formNumber: '',   formType: '',    pastureName: Cookies.get('pasturename'),  departName: '', date: ''
@@ -325,8 +325,8 @@ export default {
       useTypes: [{ id: 0, name: '1级表' }, { id: 1, name: '2级表' }, { id: 2, name: '3级表' }],
       getDictByName: [],
       findAllAssetType: [],
-     
- 
+
+
       pastureList: [],
       departList1:[],
       departList2:[],
@@ -348,12 +348,12 @@ export default {
         name: 'getElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { }
       },
 
-      temp: { 
+      temp: {
         pastureName: '',
         departName: '',
         dosage: '',
@@ -382,7 +382,7 @@ export default {
         name: 'getCoalList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { "departmentId": ""}
       },
@@ -408,10 +408,10 @@ export default {
         //     }
         //   }, 0)
         // }, trigger: 'blur' }],
-      
+
         // startTime: [{ required: true, message: '必填', trigger: 'blur' }]
       },
-    
+
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       buttons: [],
@@ -495,7 +495,7 @@ export default {
         }
       }, 0)
     },
-   
+
     form_export() {
       this.downLoadObj.parammaps = this.tableObj.parammaps
       GetDataByName(this.downLoadObj).then(response => {
@@ -520,7 +520,7 @@ export default {
     },
 
 
-    
+
 
     formatJson(filterVal, jsonData) {
       return jsonData.map(v =>
@@ -563,10 +563,10 @@ export default {
         this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
       }
     },
-   
-  
-   
-  
+
+
+
+
     // 1-1: table&搜索
     get_table_data() {
       if(this.tableObj.parammaps.pastureName == '现代牧业'){
@@ -601,7 +601,7 @@ export default {
         this.get_departList2()
       })
     },
-    
+
     change_pasture1(item) {
       this.getDepartParam1.parammaps.pastureId = this.pastureList.find(obj => obj.name == item).id
       this.tableObj.parammaps.departName = ''
@@ -632,7 +632,7 @@ export default {
         this.tableObj.parammaps.date =''
       }
 
-    
+
       this.get_table_data()
     },
 
@@ -642,10 +642,10 @@ export default {
       this.$set(this.temp, 'inputid', item)
       this.$forceUpdate()
     },
-   
+
     form_reset() {
 
-    
+
 
       this.temp.pastureName = ''
       this.temp.departName = ''
@@ -660,20 +660,20 @@ export default {
       this.temp.pastureId = ''
 
 
-      
+
     },
     form_add() {
       this.form_reset()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
-       
+
       this.$nextTick(() => {
         this.$refs['temp'].clearValidate()
       })
- 
+
     },
-   
-    
+
+
     add_dialog_save() {
       console.log("this.temp=====>",this.temp)
       this.isokDisable = true
@@ -689,9 +689,9 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
-  
+
             if (response.msg === 'fail') {
               this.$notify({
                 title: '保存失败',
@@ -727,7 +727,7 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             console.log('保存发送参数', this.postDataPramas)
             if (response.msg === 'fail') {
@@ -763,14 +763,14 @@ export default {
     edit_dialog_save() {
       this.$refs['temp'].validate(valid => {
         if (valid) {
-           
+
           var send_data = {
               "name": "updateCoal",
               "offset": 0,
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             if (response.msg === 'fail') {
               this.$notify({
@@ -801,7 +801,7 @@ export default {
     form_delete_sure() {
       this.$refs['deleteTemp'].validate(valid => {
         if (valid) {
-    
+
           var send_data = {
             "name":"delCoal","offset":0,"pagecount":0,
             "parammaps":{"date":this.deleteTemp.startTime}

+ 204 - 24
src/views/cost/diesel/index.vue

@@ -19,7 +19,7 @@
       <el-input v-model="getdataListParm.parammaps.equipmentNumber" placeholder="设备编号" clearable class="filter-item" style="width: 120px" />
       <el-input v-model="getdataListParm.parammaps.assetName" placeholder="设备名称" clearable class="filter-item" style="width: 120px" />
       <el-input v-model="getdataListParm.parammaps.employName" placeholder="加油工" clearable class="filter-item" style="width: 120px" />
-      <el-input v-model="getdataListParm.parammaps.oilClass" placeholder="加油工班" clearable class="filter-item" style="width: 120px" />
+      <!-- <el-input v-model="getdataListParm.parammaps.oilClass" placeholder="加油工班" clearable class="filter-item" style="width: 120px" /> -->
       <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
       <div>
         <el-button v-if="isDieselAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
@@ -29,6 +29,8 @@
         </el-upload>
         <el-button v-if="isDieselExport" v-waves class="filter-item" type="success" icon="el-icon-download" @click="handleDownload">数据导出</el-button>
         <!-- <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button> -->
+         <el-button class="filter-item"  icon="el-icon-share" @click="formEchart">折线图</el-button>
+
       </div>
     </div>
 
@@ -67,11 +69,11 @@
           <span>{{ scope.row.assetNumber }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="加油工班" width="80px" align="center">
+      <!-- <el-table-column label="加油工班" width="80px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.oilClass }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="加油工" width="80px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.empId }}</span>
@@ -96,6 +98,16 @@
         <template slot-scope="scope">
           <span>{{ scope.row.nowPrice }}</span>
         </template>
+      </el-table-column>
+        <el-table-column label="录用人" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.employName }}</span>
+        </template>
+      </el-table-column>
+        <el-table-column label="柴油类型" width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.oilName }}</span>
+        </template>
       </el-table-column>
       <el-table-column label="备注" min-width="110px" align="center">
         <template slot-scope="scope">
@@ -184,6 +196,11 @@
               <el-input ref="deptName" v-model="temp.deptName" disabled />
             </el-form-item>
           </el-col>
+           <el-col :span="8">
+            <el-form-item label="备注:" prop="note">
+              <el-input v-model="temp.note" type="textarea" :rows="2" placeholder="请输入内容" />
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -206,21 +223,17 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="加油工班次:" prop="oilClass">
               <el-input ref="oilClass" v-model="temp.oilClass" :disabled="dialogStatus==='update'" />
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="8">
             <el-form-item label="交易时间:" prop="selTime">
               <el-date-picker v-model="temp.selTime" type="date" placeholder="交易时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%;" :disabled="dialogStatus==='update'" />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
-            <el-form-item label="备注:" prop="note">
-              <el-input v-model="temp.note" type="textarea" :rows="2" placeholder="请输入内容" />
-            </el-form-item>
-          </el-col>
+
         </el-row>
 
       </el-form>
@@ -311,13 +324,28 @@
         <el-button @click="dialogFormDelete = false;get_table_data()">关闭</el-button>
       </div>
     </el-dialog>
+
+      <!-- 折线图 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogECharts" :close-on-click-modal="false" width="80%">
+      <div>
+        <h3 style="text-align: center;">月总用量: {{mountTotal}} 升</h3>
+        <div id="chart7" style="width: 100%;height:400px;" />
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button type="primary" :disabled="isokDisable" @click="deleteData()">确认</el-button> -->
+        <el-button @click="dialogECharts = false">关闭</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
 // 引入
 require('script-loader!file-saver')
-import { GetDataByName, GetDataByNames, PostDataByName,postJson, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson } from '@/api/common'
+import echarts from 'echarts'
+import { GetDataByName, GetDataByNames, PostDataByName,postJson, checkButtons, ExecDataByConfig, failproccess, GetAccount,getJson,GetReportform } from '@/api/common'
 // import {  DownloadExcel, GetDataByNameXlsx } from '@/api/common'
 import waves from '@/directive/waves'
 import { parseTime, sortChange } from '@/utils/index.js'
@@ -331,6 +359,11 @@ export default {
   directives: { waves },
   data() {
     return {
+      mountTotal:0,
+      pastureName: Cookies.get('pasturename'),
+       year: new Date().getFullYear(),
+      month: new Date().getMonth() < 9 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1,
+      employename: Cookies.get('employename'),
       isokDisable: false,
       isDieselUpdate: [],
       isDieselDel: [],
@@ -359,7 +392,7 @@ export default {
         name: 'getDieselList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           selTime: '',
@@ -389,7 +422,7 @@ export default {
         name: 'getWaterList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -416,7 +449,8 @@ export default {
         update: '编辑',
         create: '新增',
         DosageRecord: '用量记录',
-        delete: '删除'
+        delete: '删除',
+        echarts: '每日用柴油量'
       },
       dialogFormDosageRecord: false,
       totalDosageRecord: 0,
@@ -426,7 +460,7 @@ export default {
         name: 'getDieselHistory',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -468,7 +502,19 @@ export default {
       percentage: 1,
       dialogFormDelete: false,
       deleteTemp: {},
-      dieselTypeList:[]
+      dieselTypeList: [],
+      dialogECharts: false,
+      isChart7: [],
+      chart_data7: {},
+      getChart7Parm: {
+        name: 'getpSumNowWater',
+        parammaps: {
+          receiveTime: new Date().getFullYear(),
+          pastureName: Cookies.get('pasturename'),
+          startTime: "",
+          endTime:""
+        }
+      },
     }
   },
 
@@ -483,7 +529,7 @@ export default {
     uploadData() {
       return {
         name: 'importDiesel',
-        importParams: '牧场,油卡编号,设备名称,设备编号,加油日期,加油量(升),单价,录入人,加油人,加油工班,备注,柴油类型',
+        importParams: '牧场,油卡编号,设备名称,设备编号,加油日期,加油量(升),单价,加油人,录入人,柴油类型,备注',
         sheetname: 'SheetJS',
         pastureId:Cookies.get('pastureid')
       }
@@ -506,6 +552,132 @@ export default {
   },
 
   methods: {
+       // 电年度每月总用量
+    // 各牧场年度用水量对比
+    getChart1() {
+      let date = new Date();
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let startTime = ''
+      let endTime = ''
+      let lastDay = new Date(year, month, 0).getDate();
+       if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+        startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}') + '-01'
+        endTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}') + '-' + lastDay
+      }else{
+        startTime = parseTime(new Date(),  '{y}-{m}') + '-01'
+        endTime = parseTime(new Date(), '{y}-{m}') + '-' + lastDay
+      }
+      let datas = {
+        name: "getPastureSumMonthDiesel",
+        parammaps: {
+          startTime: startTime,
+          endTime: endTime,
+          pastureName: this.getdataListParm.parammaps.pastureName || Cookies.get('pasturename'),
+        },
+      }
+      GetReportform(datas).then(response => {
+        console.log('牧场每月用水量', response)
+        if (response.data) {
+            this.mountTotal = response.data.chart_data.nowYear[0][0]
+          }else{
+            this.mountTotal = 0;
+          }
+      })
+
+    },
+    // 折线图
+    formEchart() {
+      this.dialogECharts = true;
+      this.dialogStatus = 'echarts'
+      this.getChart7();
+      this.getChart1();
+    },
+    // XX月每日用电量
+    getChart7() {
+      if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+        this.getChart7Parm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}')
+        this.getChart7Parm.parammaps.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}')
+        this.getChart7Parm.parammaps.date = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}')
+      }else{
+        this.getChart7Parm.parammaps.startTime = ''
+        this.getChart7Parm.parammaps.endTime = ''
+        this.getChart7Parm.parammaps.date = parseTime(new Date(), '{y}-{m}')
+      }
+
+      // this.getChart1();
+
+      let data = {
+        name:"getPastureSumDayDiesel",
+        parammaps:{
+          startTime: this.getChart7Parm.parammaps.startTime || parseTime(new Date(), '{y}-{m}'),
+          endTime: this.getChart7Parm.parammaps.endTime || parseTime(new Date(), '{y}-{m}'),
+          pastureName: this.getdataListParm.parammaps.pastureName || Cookies.get('pasturename'),
+        },
+      }
+      GetReportform(data).then(response => {
+        console.log('XX月每日用油量==>图8', response)
+        if(response.data.chart_data){
+          this.chart_data7 = {
+              data1:response.data.chart_data.nowYear,
+              data_name:response.data.chart_data.pastureName,
+              xdata:response.data.chart_data.day
+            }
+        }else{
+          this.chart_data7 = {
+            data1:[],
+            data_name:[],
+            xdata:[]
+          }
+        }
+        this.roadChart7(this.chart_data7)
+      })
+
+    },
+    // XX月每日用油量
+    roadChart7(chart_data) {
+      if (this.chart7 != null) {
+        this.chart7.dispose()
+      }
+      this.chart7 = echarts.init(document.getElementById('chart7'))
+      var text = this.getChart7Parm.parammaps.date+ '月每日用油量'
+      var option = {
+        title: { text: text, left:'left',textStyle: { color: '#769cfc' }},
+        tooltip: { trigger: 'axis' },
+        legend: {
+          data: chart_data.data_name,
+          left: 40,
+          bottom:0
+        },
+        color: ['#eb123a','#eba612','#124feb','#15ab2e','#b20fdb'],
+        grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
+        xAxis: [{ type: 'category',  name: '日',data: chart_data.xdata, axisLabel: { interval: 0, rotate: 30 }}],
+        yAxis: [{ type: 'value', name: '油量(升)'}],
+        series: (function() {
+          var serie = []
+          if(chart_data.data1 !== null){
+            for (var i = 0; i < chart_data.data1.length; i++) {
+              var item = {
+                name: chart_data.data_name && chart_data.data_name[i] || '',
+                type: 'line',
+                data: chart_data.data1[i]
+              }
+              serie.push(item)
+            }
+          }
+          return serie
+        }())
+      }
+      this.chart7.setOption(option)
+      window.onresize = function() {
+        this.chart7.resize()
+      }
+      var that = this
+      this.chart7.on('click', function(param, i) {
+        // console.log(param)
+      })
+    },
+
     getDieselTypeList(){
       let url = 'authdata/diesel/type/list'
       let data = ''
@@ -675,10 +847,10 @@ export default {
           import('@/vendor/Export2Excel').then(excel => {
             const list1 = response.data.list
             const tHeader = [
-              '牧场', '部门', '交易时间', '车号', '加油工班', '加油工', '卡号', '卡类型', '本次加油量(升)', '本次消费金额(元)', '备注'
+              '牧场', '部门', '交易时间', '车号', '加油工', '卡号', '卡类型', '本次加油量(升)', '本次消费金额(元)', '备注'
             ]
             const filterVal = [
-              'pastureName', 'departName', 'selTime', 'assetNumber', 'oilClass', 'empId', 'cardNumber', 'cardType', 'oilAmount', 'nowPrice', 'note'
+              'pastureName', 'departName', 'selTime', 'assetNumber', 'empId', 'cardNumber', 'cardType', 'oilAmount', 'nowPrice', 'note'
             ]
             const data1 = this.formatJson(filterVal, list1)
             excel.export_json_to_excel({ header: tHeader, data: data1, filename: '柴油用量', autoWidth: true, bookType: 'xlsx' })
@@ -719,10 +891,10 @@ export default {
             const list1 = response.data.list
             console.log(list1,'list1')
             const tHeader = [
-              '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(升)', '单价', '录入人', '加油人', '加油工班', '备注','柴油类型'
+              '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(升)', '单价', '加油工', '录入人', '备注','柴油类型'
             ]
             const filterVal = [
-              'i', 'pastureName', 'cardNumber', 'assetName', 'assetNumber', 'day', '加油量(L)', '单价', 'name', '加油人', '加油工班', '备注','柴油类型'
+              'i', 'pastureName', 'cardNumber', 'assetName', 'assetNumber', 'day', '加油量(L)', '单价', '加油工', 'name', '备注','柴油类型'
             ]
             const data1 = this.formatJson(filterVal, list1)
             excel.export_json_to_excel({
@@ -782,10 +954,10 @@ export default {
            import('@/vendor/Export2Excel').then(excel => {
              const list1 = res.data.result
              const tHeader = [
-               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人', '加油工班','柴油类型', '备注', '错误信息'
+               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人','柴油类型', '备注', '错误信息'
              ]
              const filterVal = [
-               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人', '加油工班','柴油类型', '备注', 'error_msg'
+               '编号', '牧场', '油卡编号', '设备名称', '设备编号', '加油日期', '加油量(L)', '单价', '录入人', '加油人','柴油类型', '备注', 'error_msg'
              ]
              const data1 = this.formatJson(filterVal, list1)
              excel.export_json_to_excel({
@@ -856,6 +1028,7 @@ export default {
     },
     changePastureName(item) {
       this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+      this.getdataListParm.parammaps.pastureName = item
       this.getdataListParm.parammaps.deptName = ''
       this.getDepartDownList()
     },
@@ -899,7 +1072,7 @@ export default {
       this.temp.note = ''
     },
     form_add() {
-      console.log(this.temp.DATE)
+      console.log(this.temp.date)
       this.form_reset()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
@@ -1035,6 +1208,7 @@ export default {
 
     form_edit(row) {
       this.temp = Object.assign({}, row) // copy obj
+      this.temp.date = row.dateFormat;
       this.dialogStatus = 'update'
       this.dialogFormVisible = true
       this.$nextTick(() => {
@@ -1189,3 +1363,9 @@ export default {
   }
 }
 </script>
+
+<style  scoped>
+.dialog-footer{
+  margin-top:20px;
+}
+</style>

+ 177 - 14
src/views/cost/elec/index.vue

@@ -18,8 +18,8 @@
       </el-select>
       <el-date-picker v-model="getdataListParm.parammaps.createDate" type="date" placeholder="日期" style="width:140px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
       <el-date-picker v-model="getdataListParm.parammaps.inputDatetime" clearable class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;margin-right: 10px;" />
-      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
       <div>
+        <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
         <el-button v-if="isElecAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
         <el-button v-waves class="filter-item" type="info" icon="el-icon-tickets" @click="handleDownloadTemp">模板</el-button>
         <el-button v-if="isElecExport" v-waves class="filter-item" type="success" icon="el-icon-download" @click="handleDownload">导出数据</el-button>
@@ -27,6 +27,8 @@
           <el-button v-if="isElecImport" v-waves class="filter-item" type="warning" icon="el-icon-upload2" @click="form_search">导入</el-button>
         </el-upload>
         <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button>
+         <el-button class="filter-item"  icon="el-icon-share" @click="formEchart">折线图</el-button>
+
       </div>
     </div>
 
@@ -95,11 +97,11 @@
           <span>{{ scope.row.price }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="倍率" sortable prop="Multiple" width="80px" align="center">
+      <!-- <el-table-column label="倍率" sortable prop="Multiple" width="80px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.Multiple }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="当天费用" sortable prop="sumPrice" width="80px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.sumPrice }}</span>
@@ -192,17 +194,17 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="当前时间:" prop="DATE">
-              <el-date-picker v-model="temp.DATE" type="date" placeholder="当前时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd" disabled style="width:100%;" />
+            <el-form-item label="当前时间:" prop="date">
+              <el-date-picker v-model="temp.date" type="date" placeholder="当前时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd" disabled style="width:100%;" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="倍率:">
               <el-input ref="rate" v-model="temp.rate" disabled />
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="8">
             <el-form-item label="负责人:" prop="employeId">
               <el-select v-model="temp.employeId" placeholder="负责人" class="filter-item" style="width:100%;">
@@ -299,13 +301,28 @@
         <el-button @click="dialogFormDelete = false;get_table_data()">关闭</el-button>
       </div>
     </el-dialog>
+
+     <!-- 折线图 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogECharts" :close-on-click-modal="false" width="80%">
+      <div>
+        <h3 style="text-align: center;">月总用量: {{mountTotal}} 度</h3>
+        <div id="chart7" style="width: 100%;height:400px;" />
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button type="primary" :disabled="isokDisable" @click="deleteData()">确认</el-button> -->
+        <el-button @click="dialogECharts = false">关闭</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
 // 引入
 require('script-loader!file-saver')
-import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, GetAccount } from '@/api/common'
+import echarts from 'echarts'
+import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, GetAccount,GetReportform ,getJson} from '@/api/common'
 // import {  DownloadExcel, GetDataByNameXlsx } from '@/api/common'
 import waves from '@/directive/waves' // waves directive
 // eslint-disable-next-line no-unused-vars
@@ -321,6 +338,10 @@ export default {
   directives: { waves },
   data() {
     return {
+      mountTotal:0,
+      pastureName: Cookies.get('pasturename'),
+       year: new Date().getFullYear(),
+      month: new Date().getMonth() < 9 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1,
       selectionList:[],
       myHeight:document.documentElement.clientHeight - 85- 200,
       isokDisable: false,
@@ -348,7 +369,7 @@ export default {
         name: 'getElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',
@@ -382,7 +403,7 @@ export default {
         name: 'getElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { }
       },
@@ -414,7 +435,8 @@ export default {
         update: '编辑',
         create: '新增',
         DosageRecord: '用量记录',
-        delete: '删除'
+        delete: '删除',
+        echarts: '每日用电量'
       },
       dialogFormDosageRecord: false,
       totalDosageRecord: 0,
@@ -424,7 +446,7 @@ export default {
         name: 'getAllMeasureTypeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -462,7 +484,19 @@ export default {
       isPercentage: false,
       percentage: 1,
       dialogFormDelete: false,
-      deleteTemp: {}
+      deleteTemp: {},
+       dialogECharts: false,
+       isChart7: [],
+      chart_data7: {},
+      getChart7Parm: {
+        name: 'getpSumNowWater',
+        parammaps: {
+          receiveTime: new Date().getFullYear(),
+          pastureName: Cookies.get('pasturename'),
+          startTime: "",
+          endTime:""
+        }
+      },
     }
   },
 
@@ -498,6 +532,131 @@ export default {
   },
 
   methods: {
+     // 电年度每月总用量
+    // 各牧场年度用水量对比
+    getChart1() {
+      let date = new Date();
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let startTime = ''
+      let endTime = ''
+      let lastDay = new Date(year, month, 0).getDate();
+       if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+        startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}') + '-01'
+        endTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}') + '-' + lastDay
+      }else{
+        startTime = parseTime(new Date(),  '{y}-{m}') + '-01'
+        endTime = parseTime(new Date(), '{y}-{m}') + '-' + lastDay
+       }
+      let datas = {
+        name: "getPastureSumMonthElec",
+        parammaps: {
+          startTime: startTime,
+          endTime: endTime,
+          pastureName: this.pastureName.toString(),
+        },
+      }
+      GetReportform(datas).then(response => {
+        console.log('牧场每月用水量', response)
+        if (response.data) {
+            this.mountTotal = response.data.chart_data.nowYear[0][0]
+          }else{
+            this.mountTotal = 0;
+          }
+      })
+
+    },
+    // 折线图
+    formEchart() {
+      this.dialogECharts = true;
+      this.dialogStatus = 'echarts'
+      this.getChart7();
+    },
+    // XX月每日用电量
+    getChart7() {
+      if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+        this.getChart7Parm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}')
+        this.getChart7Parm.parammaps.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}')
+        this.getChart7Parm.parammaps.date = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}')
+      }else{
+        this.getChart7Parm.parammaps.startTime = ''
+        this.getChart7Parm.parammaps.endTime = ''
+        this.getChart7Parm.parammaps.date = parseTime(new Date(), '{y}-{m}')
+      }
+      this.getChart1();
+      let data = {
+        name:"getPastureSumDayElec",
+        parammaps:{
+          startTime: this.getChart7Parm.parammaps.startTime || parseTime(new Date(), '{y}-{m}'),
+          endTime: this.getChart7Parm.parammaps.endTime || parseTime(new Date(), '{y}-{m}'),
+          pastureName: this.getdataListParm.parammaps.pastureName || Cookies.get('pasturename'),
+        },
+      }
+        GetReportform(data).then(response => {
+        console.log('XX月每日用电量==>图8', response)
+        // this.chart_data7 = response.data.chart_data
+        if(response.data){
+          this.chart_data7 = {
+            data1:response.data.chart_data.nowYear,
+            data_name:this.pastureName,
+            xdata:response.data.chart_data.day
+          }
+        }else{
+          this.chart_data7 = {
+            data1:[],
+            data_name:[],
+            xdata:[]
+          }
+        }
+        this.roadChart7(this.chart_data7)
+      })
+
+    },
+     // XX月每日用电量
+    roadChart7(chart_data) {
+      console.log(chart_data,'chart_data')
+      if (this.chart7 != null) {
+        this.chart7.dispose()
+      }
+      this.chart7 = echarts.init(document.getElementById('chart7'))
+      var text = this.getChart7Parm.parammaps.date + '月每日用电量'
+      var option = {
+        title: { text: text, left:'left',textStyle: { color: '#769cfc' }},
+        tooltip: { trigger: 'axis' },
+        legend: {
+          data: chart_data.data_name,
+          left: 40,
+          bottom:0
+        },
+        color: ['#eb123a','#eba612','#124feb','#15ab2e','#b20fdb'],
+        grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
+        xAxis: [{ type: 'category',  name: '日',data: chart_data.xdata, axisLabel: { interval: 0, rotate: 30 }}],
+        yAxis: [{ type: 'value', name: '电量(度)'}],
+        series: (function() {
+          var serie = []
+          if(chart_data.data1 !== null){
+            for (var i = 0; i < chart_data.data1.length; i++) {
+              var item = {
+                name:  chart_data.data_name && chart_data.data_name[i] ||'',
+                type: 'line',
+                data: chart_data.data1[i]
+              }
+              serie.push(item)
+            }
+          }
+          return serie
+        }())
+      }
+      this.chart7.setOption(option)
+      window.onresize = function() {
+        this.chart7.resize()
+      }
+      var that = this
+      this.chart7.on('click', function(param, i) {
+        // console.log(param)
+      })
+    },
+
     tableSort1(column) {
       sortChange(column, this.list)
     },
@@ -831,6 +990,8 @@ export default {
     changePastureName(item) {
       this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
       this.getdataListParm.parammaps.departName = ''
+      // this.getdataListParm.parammaps.pastureName = item
+      this.getdataListParm.parammaps.pastureName = item
       this.getDepartDownList()
     },
     form_search() {
@@ -863,7 +1024,7 @@ export default {
       this.temp.note = ''
       this.temp.employeId = ''
       this.temp.employeName = ''
-      this.temp.DATE = parseTime(new Date(), '{y}-{m}-{d}')
+      this.temp.date = parseTime(new Date(), '{y}-{m}-{d}')
       this.temp.inputDatetime = parseTime(new Date(), '{y}-{m}-{d}')
       this.temp.typeName = ''
       this.temp.assTypeId = ''
@@ -1021,10 +1182,12 @@ export default {
       })
     },
     form_edit(row) {
+      console.log(row,'编剧')
       this.temp = Object.assign({}, row) // copy obj
       // if (this.temp.endAmount !== '' && this.temp.endAmount !== undefined && this.temp.endAmount !== null && this.temp.aAmount !== '' && this.temp.aAmount !== undefined && this.temp.aAmount !== null) {
       //   this.$set(this.temp, 'consumption', parseFloat(this.temp.endAmount) - parseFloat(this.temp.aAmount))
       // }
+      this.temp.date = row.dateFormat;
       this.dialogStatus = 'update'
       this.dialogFormVisible = true
       this.$nextTick(() => {

+ 3 - 3
src/views/cost/gas/index.vue

@@ -245,7 +245,7 @@ export default {
       requestParam: { name: 'insertGas', offset: 0, pagecount: 0, parammaps: {}},
       postDataPramas: {},
       getdataListParm: {
-        name: 'getGasList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getGasList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { formName: '', formNumber: '', formType: '', pastureName: Cookies.get('pasturename'), departName: '' }
       },
       tableKey: 0,
@@ -264,7 +264,7 @@ export default {
       getDepartParam: {
         name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }
       },
-      requestFilterParams: { name: 'getWaterList', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { }},
+      requestFilterParams: { name: 'getWaterList', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: { }},
 
       temp: { pastureName: '', consumption: '', measureId: '', useType: '', departName: '', aAmount: '', employeName1: '', endAmount: '', employeName: '', price1: '', note: '', formName: '', formNumber: '', inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), typeName: '', assTypeId: '', employeId: this.$store.state.user.employeid, departmentId: this.$store.state.user.departmentid, pastureId: this.$store.state.user.pastureid },
       dialogFormVisible: false,
@@ -274,7 +274,7 @@ export default {
       totalDosageRecord: 0,
       listDosageRecord: [],
       listLoadingDosageRecord: false,
-      getDosageRecordListParm: { name: 'getAllMeasureTypeList', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}},
+      getDosageRecordListParm: { name: 'getAllMeasureTypeList', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: {}},
       dosageRecordTemp: {},
       rules: {
         endAmount: [{ type: 'number', required: true, validator: (rule, value, callback) => {

+ 46 - 46
src/views/cost/gasolineConsum/index.vue

@@ -40,7 +40,7 @@
       :row-style="rowStyle"
       :cell-style="cellStyle"
       class="elTable"
- 
+
     >
       <el-table-column label="序号" align="center" type="index" width="50px">
         <template slot-scope="scope">
@@ -62,7 +62,7 @@
           <span>{{ scope.row.dosage }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="单价"  min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.price }}</span>
@@ -83,7 +83,7 @@
           <span>{{ scope.row.date  }}</span>
         </template>
       </el-table-column>
- 
+
       <el-table-column label="备注" min-width="110px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.remarks  }}</span>
@@ -101,9 +101,9 @@
     <!-- 弹出层新增or修改 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
       <el-form ref="temp" :rules="rules1" :model="temp" label-position="right" label-width="110px">
-        
+
         <el-row>
-           
+
           <el-col :span="8">
 
             <el-form-item label="牧场:" prop="pastureId" v-show="dialogStatus==='create'">
@@ -127,11 +127,11 @@
             <el-form-item label="部门:"  prop="departmentId"  v-show="dialogStatus==='update'">
                 <el-input ref="departmentName" v-model="temp.departmentName"  disabled />
             </el-form-item>
-    
+
           </el-col>
- 
 
-           
+
+
         </el-row>
         <el-row>
           <el-col :span="8">
@@ -139,7 +139,7 @@
               <el-input ref="dosage" v-model="temp.dosage"    />
             </el-form-item>
           </el-col>
-         
+
           <el-col :span="8">
             <el-form-item label="单价(元):" prop="price">
               <el-input ref="price" v-model="temp.price"   />
@@ -161,7 +161,7 @@
             <el-form-item label="记录人:"  prop="empname"  v-show="dialogStatus==='update'" >
               <el-input ref="empname" v-model="temp.empname"  disabled />
             </el-form-item>
-           
+
           </el-col>
           <el-col :span="8">
             <el-form-item label="录入日期:" prop="date">
@@ -173,9 +173,9 @@
               <el-input ref="remarks" v-model="temp.remarks"  />
             </el-form-item>
           </el-col>
-          
+
         </el-row>
-         
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="dialogStatus==='create'" ref="createb" type="success" :disabled="isokDisable" @click="add_dialog_save_again()">保存并新增</el-button>
@@ -209,7 +209,7 @@
               <span>{{ scope.$index + (pageNumDosageRecord-1) * pageSizeDosageRecord + 1 }}</span>
             </template>
           </el-table-column>
-  
+
           <el-table-column label="用量"  prop="dosage" min-width="110px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.dosage }}</span>
@@ -235,7 +235,7 @@
               <span>{{ scope.row.date }}</span>
             </template>
           </el-table-column>
-        
+
         </el-table>
         <pagination v-show="totalDosageRecord>=0" :total="totalDosageRecord" :page.sync="getDosageRecordListParm.offset" :limit.sync="getDosageRecordListParm.pagecount" @pagination="get_record_list" />
         <div slot="footer" class="dialog-footer">
@@ -291,8 +291,8 @@ export default {
       list: null,
       total: 0,
       listLoading: true,
- 
-   
+
+
       requestParam: {
         name: 'insertElectricity',
         offset: 0,
@@ -307,7 +307,7 @@ export default {
         name: 'getGasoline',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',  formNumber: '',   formType: '',    pastureName: Cookies.get('pasturename'),  departName: '', date: ''
@@ -328,8 +328,8 @@ export default {
       useTypes: [{ id: 0, name: '1级表' }, { id: 1, name: '2级表' }, { id: 2, name: '3级表' }],
       getDictByName: [],
       findAllAssetType: [],
-     
- 
+
+
       pastureList: [],
       departList1:[],
       departList2:[],
@@ -351,12 +351,12 @@ export default {
         name: 'getElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { }
       },
 
-      temp: { 
+      temp: {
         pastureName: '',
         departName: '',
         dosage: '',
@@ -385,7 +385,7 @@ export default {
         name: 'getGasolineList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { "departmentId": ""}
       },
@@ -417,12 +417,12 @@ export default {
         price: [{ required: true, message: '必填', trigger: 'blur' }],
         departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
         expense: [{ required: true, message: '必填', trigger: 'blur' }],
-       
-         
+
+
       },
 
       rules2: { },
-    
+
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       buttons: [],
@@ -506,7 +506,7 @@ export default {
         }
       }, 0)
     },
-   
+
     form_export() {
       this.downLoadObj.parammaps = this.tableObj.parammaps
       GetDataByName(this.downLoadObj).then(response => {
@@ -531,7 +531,7 @@ export default {
     },
 
 
-    
+
 
     formatJson(filterVal, jsonData) {
       return jsonData.map(v =>
@@ -574,10 +574,10 @@ export default {
         this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
       }
     },
-   
-  
-   
-  
+
+
+
+
     // 1-1: table&搜索
     get_table_data() {
       if(this.tableObj.parammaps.pastureName == '现代牧业'){
@@ -612,7 +612,7 @@ export default {
         this.get_departList2()
       })
     },
-    
+
     change_pasture1(item) {
       this.getDepartParam1.parammaps.pastureId = this.pastureList.find(obj => obj.name == item).id
       this.tableObj.parammaps.departName = ''
@@ -643,7 +643,7 @@ export default {
         this.tableObj.parammaps.date =''
       }
 
-    
+
       this.get_table_data()
     },
 
@@ -653,10 +653,10 @@ export default {
       this.$set(this.temp, 'inputid', item)
       this.$forceUpdate()
     },
-   
+
     form_reset() {
 
-    
+
 
       this.temp.pastureName = ''
       this.temp.departName = ''
@@ -671,20 +671,20 @@ export default {
       this.temp.pastureId = ''
 
 
-      
+
     },
     form_add() {
       this.form_reset()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
-       
+
       this.$nextTick(() => {
         this.$refs['temp'].clearValidate()
       })
- 
+
     },
-   
-    
+
+
     add_dialog_save() {
       console.log("this.temp=====>",this.temp)
       this.isokDisable = true
@@ -700,9 +700,9 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
-  
+
             if (response.msg === 'fail') {
               this.$notify({
                 title: '保存失败',
@@ -738,7 +738,7 @@ export default {
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             console.log('保存发送参数', this.postDataPramas)
             if (response.msg === 'fail') {
@@ -774,14 +774,14 @@ export default {
     edit_dialog_save() {
       this.$refs['temp'].validate(valid => {
         if (valid) {
-           
+
           var send_data = {
               "name": "updateGasoline",
               "offset": 0,
               "pagecount": 0,
               "parammaps": this.temp
           }
-          
+
           PostDataByName(send_data).then(response => {
             if (response.msg === 'fail') {
               this.$notify({
@@ -812,7 +812,7 @@ export default {
     form_delete_sure() {
       this.$refs['deleteTemp'].validate(valid => {
         if (valid) {
-    
+
           var send_data = {
             "name":"delGasoline","offset":0,"pagecount":0,
             "parammaps":{"date":this.deleteTemp.startTime}

+ 1 - 1
src/views/cost/generation/index.vue

@@ -147,7 +147,7 @@ export default {
       table: {
         tableKey: 0, list: [], total: 0, listLoading: true,
         getdataListParm: {
-          name: 'getElecList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+          name: 'getElecList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
           parammaps: {
             formName: '', formNumber: '', formType: '', pastureName: Cookies.get('pasturename'), departName: ''
           }

+ 2 - 2
src/views/cost/methane/index.vue

@@ -393,7 +393,7 @@ export default {
         name: 'getMethaneList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',
@@ -421,7 +421,7 @@ export default {
         name: 'getMethaneList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: { }
       },

+ 2 - 2
src/views/cost/other/index.vue

@@ -247,7 +247,7 @@ export default {
         name: 'getImportCostOtherList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -287,7 +287,7 @@ export default {
         name: 'getWaterList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 3 - 3
src/views/cost/steam/index.vue

@@ -345,7 +345,7 @@ export default {
         name: 'getSteamList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',
@@ -377,7 +377,7 @@ export default {
         name: 'getSteamList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -419,7 +419,7 @@ export default {
         name: 'getAllMeasureTypeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 185 - 23
src/views/cost/water/index.vue

@@ -27,6 +27,8 @@
           <el-button v-if="isWaterImport" v-waves class="filter-item" type="warning" icon="el-icon-upload2" @click="form_search">导入</el-button>
         </el-upload>
         <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button>
+         <el-button class="filter-item"  icon="el-icon-share" @click="formEchart">折线图</el-button>
+
       </div>
     </div>
 
@@ -86,11 +88,11 @@
           <span>{{ scope.row.price }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="倍率" sortable prop="rate" width="80px" align="center">
+      <!-- <el-table-column label="倍率" sortable prop="rate" width="80px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.rate }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="当天费用" sortable prop="sumPrice" width="80px" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.sumPrice }}</span>
@@ -175,22 +177,11 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="倍率:" prop="rate">
-              <el-input ref="rate" v-model="temp.rate" disabled />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="备注:" prop="note">
-              <el-input ref="note" v-model="temp.note" />
-            </el-form-item>
-          </el-col>
-        </el-row>
+
         <el-row>
           <el-col :span="8">
             <el-form-item label="当前时间:" prop="DATE">
-              <el-date-picker v-model="temp.DATE" type="date" placeholder="当前时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd" disabled style="width:100%;" />
+              <el-date-picker v-model="temp.date" type="date" placeholder="当前时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd" disabled style="width:100%;" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -201,6 +192,18 @@
             </el-form-item>
           </el-col>
         </el-row>
+         <el-row>
+          <!-- <el-col :span="8">
+            <el-form-item label="倍率:" prop="rate">
+              <el-input ref="rate" v-model="temp.rate" disabled />
+            </el-form-item>
+          </el-col> -->
+          <el-col :span="8">
+            <el-form-item label="备注:" prop="note">
+              <el-input ref="note" v-model="temp.note" />
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="dialogStatus==='create'" ref="createb" type="success" :disabled="isokDisable" @click="add_dialog_save_again()">保存并新增</el-button>
@@ -290,25 +293,44 @@
         <el-button @click="dialogFormDelete = false;get_table_data()">关闭</el-button>
       </div>
     </el-dialog>
+
+     <!-- 折线图 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogECharts" :close-on-click-modal="false" width="80%">
+      <div>
+        <h3 style="text-align: center;"> 月总用量: {{mountTotal}} 吨</h3>
+        <div id="chart7" style="width: 100%;height:400px;" />
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button type="primary" :disabled="isokDisable" @click="deleteData()">确认</el-button> -->
+        <el-button @click="dialogECharts = false">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 // 引入
 require('script-loader!file-saver')
-import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, GetAccount } from '@/api/common'
+import echarts from 'echarts'
+import { GetDataByName, GetDataByNames, PostDataByName, checkButtons, ExecDataByConfig, GetAccount,GetReportform, getJson } from '@/api/common'
 import waves from '@/directive/waves'
 import { parseTime, sortChange } from '@/utils/index.js'
 import Pagination from '@/components/Pagination' // secondary package based on el-pagination
 import { MessageBox } from 'element-ui'
 import { getToken } from '@/utils/auth'
 import Cookies from 'js-cookie'
+
 export default {
   name: 'Water',
   components: { Pagination },
   directives: { waves },
   data() {
     return {
+      mountTotal:0,
+      pastureName: Cookies.get('pasturename'),
+      year: new Date().getFullYear(),
+      month: new Date().getMonth() < 9 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1,
       myHeight:document.documentElement.clientHeight - 85- 200,
       isokDisable: false,
       isWaterAdd: [],
@@ -336,7 +358,7 @@ export default {
         name: 'getWaterList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           formName: '',
@@ -371,7 +393,7 @@ export default {
         name: 'getWaterList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -403,7 +425,8 @@ export default {
         update: '编辑',
         create: '新增',
         DosageRecord: '用量记录',
-        delete: '删除'
+        delete: '删除',
+        echarts: '每日折线图'
       },
       dialogFormDosageRecord: false,
       totalDosageRecord: 0,
@@ -413,7 +436,7 @@ export default {
         name: 'getAllMeasureTypeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -452,7 +475,19 @@ export default {
       isPercentage: false,
       percentage: 1,
       dialogFormDelete: false,
-      deleteTemp: {}
+      deleteTemp: {},
+      dialogECharts: false,
+       isChart7: [],
+      chart_data7: {},
+      getChart7Parm: {
+        name: 'getpSumNowWater',
+        parammaps: {
+          receiveTime: new Date().getFullYear(),
+          pastureName: Cookies.get('pasturename'),
+          startTime: "",
+          endTime:""
+        }
+      },
     }
   },
 
@@ -488,6 +523,131 @@ export default {
   },
 
   methods: {
+    // 水年度每月总用量
+    // 各牧场年度用水量对比
+    getChart1() {
+      let date = new Date();
+      let year = date.getFullYear()
+      let month = date.getMonth() + 1
+      let startTime = ''
+      let endTime = ''
+      let lastDay = new Date(year, month, 0).getDate();
+       if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+        startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}') + '-01'
+        endTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}') + '-' + lastDay
+      }else{
+        startTime = parseTime(new Date(),  '{y}-{m}') + '-01'
+        endTime = parseTime(new Date(), '{y}-{m}') + '-' + lastDay
+      }
+      let datas = {
+        name: "getPastureSumMonthWater",
+        parammaps: {
+          startTime: startTime,
+          endTime: endTime,
+          pastureName: this.pastureName.toString(),
+        },
+      }
+      GetReportform(datas).then(response => {
+        console.log('牧场每月用水量', response.data.chart_data.nowYear[0])
+        if (response.data) {
+            this.mountTotal = response.data.chart_data.nowYear[0][0]
+          }else{
+            this.mountTotal = 0;
+        }
+            console.log('this.mountTotal', this.mountTotal)
+      })
+
+    },
+    // 折线图
+    formEchart(){
+      this.dialogECharts = true;
+      this.dialogStatus = 'echarts'
+      this.getChart7();
+
+    },
+    // XX月每日用水量
+    getChart7() {
+      if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+        this.getChart7Parm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}')
+        this.getChart7Parm.parammaps.endTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}')
+        this.getChart7Parm.parammaps.date = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}')
+      }else{
+        this.getChart7Parm.parammaps.startTime = ''
+        this.getChart7Parm.parammaps.endTime = ''
+        this.getChart7Parm.parammaps.date = parseTime(new Date(), '{y}-{m}')
+      }
+       this.getChart1();
+      let data = {
+        name:"getPastureSumDayWater",
+        parammaps:{
+          startTime: this.getChart7Parm.parammaps.startTime || parseTime(new Date(), '{y}-{m}'),
+          endTime: this.getChart7Parm.parammaps.endTime || parseTime(new Date(), '{y}-{m}'),
+          pastureName: this.getdataListParm.parammaps.pastureName || Cookies.get('pasturename'),
+        },
+      }
+       GetReportform(data).then(response => {
+        console.log('XX月每日用水量==>图8', response)
+        if(response.data){
+          this.chart_data7 = {
+            data1:response.data.chart_data.nowYear,
+            data_name:this.pastureName,
+            xdata:response.data.chart_data.day
+          }
+        }else{
+          this.chart_data7 = {
+            data1:[],
+            data_name:[],
+            xdata:[]
+          }
+        }
+        this.roadChart7(this.chart_data7)
+      })
+    },
+      // XX月每日用水量
+    roadChart7(chart_data) {
+      console.log(chart_data,'chart_data')
+      if (this.chart7 != null) {
+        this.chart7.dispose()
+      }
+      this.chart7 = echarts.init(document.getElementById('chart7'))
+      var text = this.getChart7Parm.parammaps.date + '月每日用水量'
+      var option = {
+        title: { text: text, left:'left',textStyle: { color: '#769cfc' }},
+        tooltip: { trigger: 'axis' },
+        legend: {
+          data: chart_data.data_name,
+          left: 40,
+          bottom:0
+        },
+        color: ['#eb123a','#eba612','#124feb','#15ab2e','#b20fdb'],
+        grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
+        xAxis: [{ type: 'category',  name: '日',data: chart_data.xdata, axisLabel: { interval: 0, rotate: 30 }}],
+        yAxis: [{ type: 'value', name: '水量(吨)'}],
+        series: (function() {
+          var serie = []
+          if(chart_data.data1 !== null){
+            for (var i = 0; i < chart_data.data1.length; i++) {
+              var item = {
+                name: chart_data.data_name && chart_data.data_name[i] || '',
+                type: 'line',
+                data: chart_data.data1[i]
+              }
+              serie.push(item)
+            }
+          }
+          return serie
+        }())
+      }
+      this.chart7.setOption(option)
+      window.onresize = function() {
+        this.chart7.resize()
+      }
+      var that = this
+      this.chart7.on('click', function(param, i) {
+        console.log(param)
+      })
+    },
+
     tableSort1(column) {
       sortChange(column, this.list)
     },
@@ -845,6 +1005,7 @@ export default {
     changePastureName(item) {
       this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
       this.getdataListParm.parammaps.departName = ''
+          this.getdataListParm.parammaps.pastureName = item
       this.getDepartDownList()
     },
     form_search() {
@@ -874,7 +1035,7 @@ export default {
       this.temp.consumption = ''
       // this.temp.employeId = ''
       this.temp.employeName = ''
-      this.temp.DATE = parseTime(new Date(), '{y}-{m}-{d}')
+      this.temp.date = parseTime(new Date(), '{y}-{m}-{d}')
       this.temp.inputDatetime = parseTime(new Date(), '{y}-{m}-{d}')
       this.temp.typeName = ''
       this.temp.assTypeId = ''
@@ -883,7 +1044,7 @@ export default {
       this.temp.pastureId = this.$store.state.user.pastureid
     },
     form_add() {
-      // console.log(this.temp.DATE)
+      // console.log(this.temp.date)
       this.form_reset()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
@@ -1037,6 +1198,7 @@ export default {
       // if (this.temp.endAmount !== '' && this.temp.endAmount !== undefined && this.temp.endAmount !== null && this.temp.aAmount !== '' && this.temp.aAmount !== undefined && this.temp.aAmount !== null) {
       //   this.$set(this.temp, 'consumption', parseFloat(this.temp.endAmount) - parseFloat(this.temp.aAmount))
       // }
+        this.temp.date = row.dateFormat;
       this.dialogStatus = 'update'
       this.dialogFormVisible = true
       this.$nextTick(() => {

+ 1 - 1
src/views/custom/allot/index.vue

@@ -477,7 +477,7 @@ export default {
         name: 'getBigPartTransferList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),

+ 1 - 1
src/views/custom/allot/index1.vue

@@ -457,7 +457,7 @@ export default {
         name: 'getBigPartTransferList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),

+ 11 - 10
src/views/custom/basic/index.vue

@@ -12,7 +12,7 @@
           <el-input v-model="getdataListParm.parammaps.specification" placeholder="备件规格" style="width: 200px;" class="filter-item" />
           <tree-select
             class="typeSelect"
-            :height="150"
+            :height="380"
             :width="250"
             size="small"
             clearable
@@ -39,7 +39,8 @@
           />
           <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
           <div>
-            <el-button v-if="isBasicAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+
+            <!-- <el-button v-if="isBasicAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button> -->
             <el-button v-if="isBasicTemplate" v-waves class="filter-item" type="info" icon="el-icon-tickets" @click="handleDownloadTemp">模板</el-button>
             <el-button v-if="isDisable" v-waves class="filter-item" type="danger" icon="el-icon-remove-outline"  @click="handleBatchDisable">批量禁用</el-button>
             <el-button v-if="isEnable" v-waves class="filter-item" type="danger" icon="el-icon-success"  @click="handleBatchEnable">批量启用</el-button>
@@ -139,7 +140,7 @@
           <el-input v-model="getdataListParmSH.parammaps.specification" placeholder="备件规格" style="width: 200px;" class="filter-item" />
           <tree-select
             class="typeSelect"
-            :height="150"
+            :height="380"
             :width="250"
             size="small"
             clearable
@@ -259,8 +260,8 @@
               <el-form-item ref="partClass" label="备件类别:" prop="partClass">
                 <tree-select
                   class="typeSelect"
-                  :height="150"
-                  :width="230"
+                  :height="380"
+                  :width="250"
                   size="small"
                   :data="parentDept"
                   :disabled="disabled"
@@ -763,7 +764,7 @@ export default {
         name: 'getStockList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           partCode: '',
@@ -806,7 +807,7 @@ export default {
         name: 'getStockdetail',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -824,7 +825,7 @@ export default {
         name: 'getStockListSH',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           partCode: '',
@@ -857,7 +858,7 @@ export default {
       Selection: 0,
       selectionList: [],
       width: 0,
-      createExamineParm: { name: 'getPartCode', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}},
+      createExamineParm: { name: 'getPartCode', page: 1, offset: 1, pagecount: 50, returntype: 'Map', parammaps: {}},
       // EAS同步
       easStatus: {
         easStatusList: [{ name: '同步成功', id: '1' }, { name: '同步失败', id: '0' }],
@@ -871,7 +872,7 @@ export default {
           name: 'getpartsSync',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {}
         }

+ 6 - 6
src/views/custom/contract/index.vue

@@ -1082,7 +1082,7 @@ export default {
         name: 'providerPactList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -1103,7 +1103,7 @@ export default {
         name: 'contractDetail',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: '',
@@ -1121,7 +1121,7 @@ export default {
         name: 'clearPastureStock',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -1130,7 +1130,7 @@ export default {
         returntype: 'Map',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         parammaps: {}
       },
       totalSee: 0,
@@ -1139,7 +1139,7 @@ export default {
         returntype: 'Map',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         parammaps: {}
       },
       listLoadingChange: true,
@@ -1155,7 +1155,7 @@ export default {
         name: 'getBrandByPartCode',
         page: 0,
         offset: 0,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 2971 - 2971
src/views/custom/contractManagement/index.vue

@@ -1,2971 +1,2971 @@
-<template>
-  <div class="app-container">
-    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
-      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
-      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
-    </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="合同管理" name="first">
-        <div v-if="isContractManagement" class="contractManagement">
-          <div class="filter-container">
-            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.pastureName" placeholder="牧场" style="width:120px" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="tab1.contractManagement.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 140px;" class="filter-item" />
-            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.statue" clearable placeholder="合同状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in contractStatusList" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.providerName" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
-              <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.isZeroStock" clearable placeholder="是否零库存" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in isZeroInventoryList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="tab1InputDatetime1" v-model="tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-            <el-date-picker ref="tab1InputDatetime2" v-model="tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="审批日期" end-placeholder="审批日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab1Filter">搜索</el-button>
-            <div>
-              <el-button v-if="tab1.contractManagement.isContractAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab1Create">新增</el-button>
-              <el-radio-group v-model="tab1.contractManagement.radioAll" style="margin-top:-9px" @change="changeContractManagementAll()">
-                <el-radio-button label="全部" />
-                <el-badge :value="pending.total" class="item">
-                  <el-radio-button label="待处理" />
-                </el-badge>
-                <el-radio-button label="已处理" />
-              </el-radio-group>
-            </div>
-          </div>
-          <el-table
-            :key="tab1.contractManagement.tableKey"
-            v-loading="tab1.contractManagement.listLoading"
-            element-loading-text="给我一点时间"
-            :data="tab1.contractManagement.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (tab1.contractManagement.pageNum-1) * tab1.contractManagement.pageSize + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="120px" align="center" prop="pastureName" />
-            <el-table-column label="合同编号" min-width="120px" align="center" prop="contractCode" />
-            <el-table-column label="合同状态" min-width="110px" align="center" prop="statued" />
-            <el-table-column label="供应商" min-width="120px" align="center" prop="providerName" />
-            <el-table-column label="合同开始日期" sortable min-width="120px" align="center" prop="startTime" />
-            <el-table-column label="合同截止日期" sortable min-width="120px" align="center" prop="stopTime" />
-            <el-table-column label="零库存" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.isZeroStock == 0">否</span>
-                <span v-if="scope.row.isZeroStock == 1">是</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="录入人" min-width="120px" align="center" prop="creatorMan" />
-            <el-table-column label="录入时间" sortable min-width="120px" align="center" prop="creatorTime" />
-            <el-table-column label="审批时间" sortable min-width="120px" align="center" prop="SHdateTime" />
-            <el-table-column label="操作" align="center" width="350px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="tab1.contractManagement.isContractSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
-                <el-button v-if="tab1.contractManagement.isContractSee" type="primary" style="width:70px;" size="mini" @click="handleTab1DetailsSpareParts(row)">备件明细</el-button>
-                <el-button v-if="tab1.contractManagement.isContractSee" type="primary" style="width:70px;" size="mini" @click="handleTab1ChangeRecord(row)">变更记录</el-button>
-                <el-button v-if="tab1.contractManagement.isContractChange && (row.statued == '正常' || row.statued == '已过期')" :disabled="parseInt(row.pastureId) == 18 && parseInt(isGroupAdministrator) !== 18" type="warning" size="mini" @click="handleTab1Change(row)">变更</el-button>
-              </template>
-              <!-- //parseInt(row.pastureId) == 18 && parseInt(isGroupAdministrator) == 18 -->
-            </el-table-column>
-          </el-table>
-          <pagination v-show="tab1.contractManagement.total>0" :total="tab1.contractManagement.total" :page.sync="tab1.contractManagement.getdataListParm.offset" :limit.sync="tab1.contractManagement.getdataListParm.pagecount" @pagination="getTab1List" />
-        </div>
-        <div v-if="isDetailsSpareParts" class="DetailsSpareParts">
-          <div class="title" style="height: 30px;">
-            <b style="font-size: 20px;float: left;">备件明细</b>
-            <a style="float: right;font-weight: 600;font-size: 20px;" @click="handleTab1goBack()">&lt;返回</a>
-          </div>
-          <div class="filter-container">
-            <el-input v-model="tab1.detailsSpareParts.getdataListParm.parammaps.partCode" placeholder="备件编号" style="width: 140px;" class="filter-item" />
-            <el-input v-model="tab1.detailsSpareParts.getdataListParm.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
-            <el-input v-model="tab1.detailsSpareParts.getdataListParm.parammaps.specification" placeholder="备件规格" style="width: 140px;" class="filter-item" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab1Filter2">搜索</el-button>
-            <!-- <el-button v-waves class="filter-item" type="success" icon="el-icon-edit" @click="change_enabled">启用</el-button> -->
-            <el-button v-if="isContractJinyong"  v-waves class="filter-item" type="danger" icon="el-icon-edit" @click="change_no">禁用</el-button>
-          </div>
-          <div class="filter-container">
-            <el-button v-if="tab1.contractManagement.isContractAdd && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Create2">新增</el-button>
-            <el-button v-if="tab1.contractManagement.isContractChange && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Change2">变更</el-button>
-            <el-button v-if="tab1.contractManagement.isContractExport" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab1Export2">导出</el-button>
-            <el-button v-if="tab1.contractManagement.isContractUplaod" class="filter-item" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
-          </div>
-          <el-table
-            :key="tab1.detailsSpareParts.tableKey"
-            v-loading="tab1.detailsSpareParts.listLoading"
-            element-loading-text="给我一点时间"
-            :data="tab1.detailsSpareParts.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort1"
-            @selection-change="handleSelectionChange"
-            :max-height="myHeight"
-          >
-            <el-table-column type="selection"  width="55" />
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (tab1.detailsSpareParts.pageNum-1) * tab1.detailsSpareParts.pageSize + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件编号" min-width="120px" align="center" prop="partCode" />
-            <el-table-column label="备件名称" min-width="120px" align="center" prop="partName" />
-            <el-table-column label="备件规格" min-width="120px" align="center" prop="specification" />
-            <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
-              <template slot-scope="scope">
-                <el-popover placement="right" title="" trigger="hover">
-                  <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
-                  <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                </el-popover>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件品牌" min-width="120px" align="center" prop="brand" />
-            <el-table-column label="计量单位" min-width="120px" align="center" prop="unit" />
-            <el-table-column label="计划量" sortable min-width="120px" align="center" prop="planAmount" />
-            <el-table-column label="单价" sortable min-width="120px" align="center" prop="price" />
-            <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
-            <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" />
-            <el-table-column label="备注" sortable min-width="120px" align="center" prop="remark" />
-          </el-table>
-          <pagination v-show="tab1.detailsSpareParts.total>0" :total="tab1.detailsSpareParts.total" :page.sync="tab1.detailsSpareParts.getdataListParm.offset" :limit.sync="tab1.detailsSpareParts.getdataListParm.pagecount" @pagination="getTab1List2" />
-        </div>
-
-        <div v-if="isChangeRecord" class="ChangeRecord">
-          <div class="title" style="height: 30px;">
-            <b style="font-size: 20px;float: left;">变更记录</b>
-            <a style="float: right;font-weight: 600;font-size: 20px;" @click="handleTab1goBack2()">&lt;返回</a>
-          </div>
-          <div class="filter-container">
-            <el-input v-model="tab1.changeRecord.getdataListParm.parammaps.contractCode" placeholder="流水编号" style="width: 140px;" class="filter-item" />
-            <el-select v-model="tab1.changeRecord.getdataListParm.parammaps.SHtype" clearable placeholder="变更类型" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in changeTypeList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-select v-model="tab1.changeRecord.getdataListParm.parammaps.stuteSH" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in auditStatusList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="tab1InputDatetime3" v-model="tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab1Filter3">搜索</el-button>
-          </div>
-          <div class="filter-container">
-            <el-radio-group v-model="tab1.changeRecord.radioAll" style="margin-top:-9px" @change="changeChangeRecordAll()">
-              <el-radio-button label="全部" />
-              <el-radio-button label="待处理" />
-              <el-radio-button label="已处理" />
-            </el-radio-group>
-          </div>
-          <el-table
-            :key="tab1.changeRecord.tableKey"
-            v-loading="tab1.changeRecord.listLoading"
-            element-loading-text="给我一点时间"
-            :data="tab1.changeRecord.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (tab1.changeRecord.pageNum-1) * tab1.changeRecord.pageSize + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="流水编号" min-width="120px" align="center" prop="contractCode" />
-            <el-table-column label="变更类型" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.SHtype == 0">新增合同</span>
-                <span v-if="scope.row.SHtype == 1">新增备件</span>
-                <span v-if="scope.row.SHtype == 2">变更备件</span>
-                <span v-if="scope.row.SHtype == 3">合同变更</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="录入人" min-width="120px" align="center" prop="creatorMan" />
-            <el-table-column label="录入时间" sortable min-width="120px" align="center" prop="creatorTime" />
-            <el-table-column label="审核状态" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.SHStatus == 2 || scope.row.SHStatus == 3 || scope.row.SHStatus == 5">审核中</span>
-                <span v-if="scope.row.SHStatus == 4 || scope.row.SHStatus == 6 || scope.row.SHStatus == 8">未通过</span>
-                <span v-if="scope.row.SHStatus == 7">通过</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="350px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button type="primary" size="mini" @click="handleTab1See3(row)">查看</el-button>
-                <el-button v-if="tab1.changeRecord.isContractDelete && (row.SHStatus == 4 || row.SHStatus == 6 || row.SHStatus == 8)" type="success" size="mini" @click="handleTab1Update3(row)">编辑</el-button>
-                <el-button v-if="tab1.changeRecord.isContractExamineZG && row.SHStatus == 2" type="success" style="display:inline-block" size="mini" @click="handleTab1Examine(row)">审核1</el-button>
-                <el-button v-else type="success" style="display:none" size="mini" @click="handleTab1Examine(row)">审核1</el-button>
-                <!-- 设备助理审核 -->
-                <!-- <el-button v-if="tab1.changeRecord.isContractExamineZL && row.SHStatus == 3" type="success" style="display:inline-block" size="mini" @click="handleExamine2(row)">审核2</el-button>
-                <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine2(row)">审核2</el-button> -->
-                <!-- 设备中心审核 -->
-                <el-button v-if="tab1.changeRecord.isContractExamineZX && row.SHStatus == 5" type="success" style="display:inline-block" size="mini" @click="handleTab1Examine3(row)">审核2</el-button>
-                <el-button v-else type="success" style="display:none" size="mini" @click="handleTab1Examine3(row)">审核2</el-button>
-                <el-button v-if="tab1.changeRecord.isContractDelete && (row.SHStatus == 4 || row.SHStatus == 6 || row.SHStatus == 8) " type="danger" size="mini" @click="handleTab1Delete3(row)">删除</el-button>
-                <el-button v-else style="display:none" type="danger" size="mini" @click="handleTab1Delete3(row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="tab1.changeRecord.total>0" :total="tab1.changeRecord.total" :page.sync="tab1.changeRecord.getdataListParm.offset" :limit.sync="tab1.changeRecord.getdataListParm.pagecount" @pagination="getTab1List3" />
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="合同明细" name="second">
-        <div class="filter-container">
-          <el-select v-model="tab2.getdataListParm.parammaps.pastureName" placeholder="牧场" style="width:120px" class="filter-item">
-            <el-option v-for="item in findAllPastureList2" :key="item.id" :label="item.name" :value="item.name" />
-          </el-select>
-          <el-input v-model="tab2.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 140px;" class="filter-item" />
-          <el-select v-model="tab2.getdataListParm.parammaps.statue" clearable placeholder="合同状态" class="filter-item" style="width: 120px;">
-            <el-option v-for="item in contractStatusList" :key="item.id" :label="item.name" :value="item.name" />
-          </el-select>
-          <el-select v-model="tab2.getdataListParm.parammaps.isZeroStock" clearable placeholder="是否零库存" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in isZeroInventoryList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-          <el-input v-model="tab2.getdataListParm.parammaps.partCode" placeholder="备件编号" style="width: 140px;" class="filter-item" />
-          <el-input v-model="tab2.getdataListParm.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
-          <el-select v-model="tab2.getdataListParm.parammaps.providerName" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
-            <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.name" />
-          </el-select>
-          <el-date-picker ref="inputDatetime" v-model="tab2.getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-          <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab2Filter">搜索</el-button>
-          <el-button v-if="tab1.contractManagement.isContractExport" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab2Export">导出</el-button>
-        </div>
-        <el-table
-          :key="tab2.tableKey"
-          v-loading="tab2.listLoading"
-          element-loading-text="给我一点时间"
-          :data="tab2.list"
-          border
-          fit
-          highlight-current-row
-          style="width: 100%;"
-          :row-style="rowStyle"
-          :cell-style="cellStyle"
-          class="elTable table-fixed"
-          @sort-change="tableSort2"
-          :max-height="myHeight"
-        >
-          <el-table-column label="序号" align="center" type="index" width="50px">
-            <template slot-scope="scope">
-              <span>{{ scope.$index + (tab2.pageNum-1) * tab2.pageSize + 1 }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="牧场" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.pastureName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="合同编号" min-width="130px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.contractCode }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="合同状态" min-width="100px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.statue }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="供应商" min-width="120px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.providerName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="合同开始日期" sortable prop="startTime" min-width="110px" align="center" />
-          <el-table-column label="合同截止日期" sortable prop="stopTime" min-width="110px" align="center" />
-          <el-table-column label="零库存" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span v-if="scope.row.isZeroStock == 0">否</span>
-              <span v-if="scope.row.isZeroStock == 1">是</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件编号" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.partCode }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件名称" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.partName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件规格" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.specification }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件品牌" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.brand }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="计量单位" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.unit }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="计划量" sortable prop="planAmount" min-width="110px" align="center" />
-          <el-table-column label="单价" sortable prop="price" min-width="110px" align="center" />
-          <el-table-column label="备注" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.remark }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="录入人" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.creatorMan }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="录入日期" sortable prop="creatorTime" min-width="110px" align="center" />
-        </el-table>
-        <pagination v-show="tab2.total>0" :total="tab2.total" :page.sync="tab2.getdataListParm.offset" :limit.sync="tab2.getdataListParm.pagecount" @pagination="getTab2List" />
-      </el-tab-pane>
-    </el-tabs>
-    <!-- 合同管理新增/查看/变更 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.contractManagement.create.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <div class="app-add">
-        <el-form ref="createTemp" :rules="rules" :model="tab1.contractManagement.create.temp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="合同编号:" prop="contractCode">
-                <el-input ref="contractCode" v-model="tab1.contractManagement.create.temp.contractCode" disabled />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="牧场:" prop="pastureId">
-                <el-select v-model="tab1.contractManagement.create.temp.pastureId" placeholder="牧场" class="filter-item" style="width:100%;" :disabled="disabled">
-                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="供应商:" prop="providerName">
-                <el-autocomplete v-model="tab1.contractManagement.create.temp.providerName" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled || dialogStatus==='change'" value-key="name" class="inline-input" :fetch-suggestions="providerSearch" placeholder="请输入供应商名称或供应商编号" style="width:100%;" @focus="handleFocusProvider" @blur="handleBlurProvider" @select="handleSelectProvider" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="开始日期:" prop="startTime">
-                <el-date-picker v-model="tab1.contractManagement.create.temp.startTime" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled || dialogStatus==='change'" type="date" placeholder="开始日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTime" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="截止日期:" prop="stopTime">
-                <el-date-picker v-model="tab1.contractManagement.create.temp.stopTime" style="width:100%;" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled" type="date" :clearable="false" placeholder="截止日期" :picker-options="pickerOptions2" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTime" />
-              </el-form-item>
-            </el-col>
-            <el-col v-if="dialogStatus=='create'" :span="8">
-              <el-form-item label="合同状态:" prop="statue">
-                <el-select v-model="tab1.contractManagement.create.temp.statue" clearable placeholder="合同状态" class="filter-item" style="width: 100%;" disabled>
-                  <el-option v-for="item in contractStatus2List" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col v-if="dialogStatus=='change' || dialogStatus=='see'" :span="8">
-              <el-form-item label="合同状态:" prop="statued">
-                <el-input ref="contractCode" v-model="tab1.contractManagement.create.temp.statued" placeholder="合同状态" disabled />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="零库存:" prop="isZeroStock">
-                <el-radio-group v-model="tab1.contractManagement.create.temp.isZeroStock" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled || dialogStatus==='change'" @change="changeIsZero">
-                  <el-radio v-model="tab1.contractManagement.create.temp.isZeroStock" :label="1">是</el-radio>
-                  <el-radio v-model="tab1.contractManagement.create.temp.isZeroStock" :label="0">否</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="录入人:" prop="creatorId">
-                <el-select ref="creatorId" v-model="tab1.contractManagement.create.temp.creatorId" :disabled="tab1.contractManagement.isDisabled || dialogStatus==='see' || dialogStatus==='change'" placeholder="录入人" class="filter-item" style="width:100%;" @change="changeCreatorMan">
-                  <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="录入日期:" prop="creatorTime">
-                <el-date-picker v-model="tab1.contractManagement.create.temp.creatorTime" :disabled="disabled" type="date" :picker-options="pickerOptions3" placeholder="录入日期" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="备注:" prop="remark">
-                <el-input ref="remark" v-model="tab1.contractManagement.create.temp.remark" placeholder="备注" :disabled="tab1.contractManagement.isDisabled || dialogStatus==='see' || dialogStatus==='change'" />
-              </el-form-item>
-            </el-col>
-            <el-col v-if="dialogStatus !== 'see'" :span="8">
-              <el-form-item label="同步牧场:" prop="synchronousPasture">
-                <el-select v-model="tab1.contractManagement.create.temp.synchronousPasture" multiple collapse-tags placeholder="同步牧场" :disabled="isGroupAdministrator !== '18'">
-                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col v-else :span="16">
-              <el-form-item label="同步牧场:" prop="pastureName2">
-                <el-input v-model="tab1.contractManagement.create.temp.pastureName2" type="textarea" :rows="2" placeholder="同步牧场" :disabled="dialogStatus=='see'" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <!-- <el-row v-if="dialogStatus == 'see'">
-            <el-col>
-              <el-form-item label="流程进度1" />
-              <el-steps :active="tab1.contractManagement.create.temp.active" align-center finish-status="success">
-                <el-step
-                  v-for="(item,index) in tab1.contractManagement.create.temp.activeList"
-                  :key="index"
-                  :title="item.title"
-                  :status="item.status"
-                >
-                  <template slot="description">
-                    <div class="step-row">
-                      <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
-                      <div>{{ item.reason }}</div>
-                    </div>
-                  </template>
-                </el-step>
-              </el-steps>
-            </el-col>
-          </el-row> -->
-        </el-form>
-        <div slot="footer" class="dialog-footer" style="bottom:5px">
-          <el-button v-if="dialogStatus =='change'" type="primary" @click="terminationData()">终止合同</el-button>
-          <el-button v-if="dialogStatus !=='see'" type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():changeData()">保存并关闭</el-button>
-          <el-button @click="tab1.contractManagement.create.dialogFormVisible = false;getTab1List();tab1.contractManagement.create.temp.providerName=''">取消并关闭</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- 备件明细新增/变更 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.detailsSpareParts.create.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <div v-if="tab1.detailsSpareParts.updateList.SHtype !== 0 && tab1.detailsSpareParts.updateList.SHtype !== 3" class="app-add">
-        <el-form ref="createTemp2" :rules="rules" :model="tab1.detailsSpareParts.create.temp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
-          <el-row>
-            <el-col :span="10">
-              <el-form-item label="备件:" prop="partCode">
-                <el-autocomplete v-model="tab1.detailsSpareParts.partCode" value-key="name1" class="inline-input" :fetch-suggestions="sparePartSearch" placeholder="请输入备件编号或备件名称或备件规格" style="width:550px" @select="handleSelectSparePart">
-                  <template slot-scope="{ item }">
-                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
-                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
-                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
-                  </template>
-                </el-autocomplete>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-        <div v-if="dialogStatus=='tab1create2'" class="filter-container" style="float: right;">
-          <el-button v-waves class="filter-item" type="info" icon="el-icon-tickets" @click="handleTab1DownloadTemp2">模板</el-button>
-          <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
-            <el-button v-waves :disabled="tab1.detailsSpareParts.isDisabledImport" class="filter-item" type="warning" icon="el-icon-download">导入</el-button>
-          </el-upload>
-        </div>
-        <el-table
-          :key="tab1.detailsSpareParts.tableKeyAdd"
-          v-loading="tab1.detailsSpareParts.listLoadingAdd"
-          element-loading-text="给我一点时间"
-          :data="tab1.detailsSpareParts.listAdd"
-          border
-          fit
-          highlight-current-row
-          style="width: 100%;"
-          :row-style="rowStyle"
-          :cell-style="cellStyle"
-          class="elTable table-fixed"
-        >
-          <el-table-column label="序号" align="center" type="index" width="50px" />
-          <el-table-column label="备件编号" min-width="90px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.partCode }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件名称" min-width="80px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.partName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件规格" min-width="80px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.specification }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
-            <template slot-scope="scope">
-              <el-popover placement="right" title="" trigger="hover">
-                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
-                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-              </el-popover>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件品牌" min-width="120px" align="center">
-            <template slot-scope="scope">
-              <el-autocomplete v-model="scope.row.brand" value-key="brandName" class="inline-input" :fetch-suggestions="brandSearch" placeholder="请输入品牌" style="width:100%;" @focus="handleFocusBrand( scope.row)" @blur="handleBlurBrand(scope.row)" @select="(value)=> {handleSelectBrand(value, scope.row)}" />
-            </template>
-          </el-table-column>
-          <el-table-column label="计量单位" min-width="60px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.unit }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="计划量" min-width="70px" align="center" valign="middle">
-            <template slot-scope="scope">
-              <el-form :model="scope.row" :rules="rules">
-                <el-form-item prop="planAmount">
-                  <el-input ref="planAmount" v-model="scope.row.planAmount" style="margin-top:15px" />
-                </el-form-item>
-              </el-form>
-            </template>
-          </el-table-column>
-          <el-table-column label="单价" min-width="80px" align="center" valign="middle">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.price" />
-            </template>
-          </el-table-column>
-          <el-table-column label="使用周期" min-width="110px" align="center" valign="middle">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.lifeCycle" />
-              </template>
-            </el-table-column>
-            <el-table-column label="合同差异项" min-width="110px" align="center" valign="middle">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.contractVarianceItem" />
-              </template>
-            </el-table-column>
-          <el-table-column label="备注" min-width="110px" align="center">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.remark" type="textarea" placeholder="备注" autosize maxlength="100" show-word-limit />
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width" fixed="right">
-            <template slot-scope="{row}">
-              <a class="del" :disabled="isokDisable" @click="partDelete(row)">删除</a>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div v-if="tab1.detailsSpareParts.updateList.SHtype == 0 || tab1.detailsSpareParts.updateList.SHtype == 3" class="app-add">
-        <el-form ref="createTemp2" :rules="rules" :model="tab1.detailsSpareParts.create.temp" label-position="right" label-width="130px" style="width: 90%;margin:0 auto;">
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="牧场:" prop="pastureName">
-                <el-input ref="pastureName" v-model="tab1.detailsSpareParts.create.temp.pastureName" placeholder="牧场" disabled />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="合同编号:" prop="contractCode">
-                <el-input ref="contractCode" v-model="tab1.detailsSpareParts.create.temp.contractCode" placeholder="合同编号" disabled />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="供应商:" prop="providerName">
-                <el-input ref="providerName" v-model="tab1.detailsSpareParts.create.temp.providerName" placeholder="合同编号" disabled />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="开始日期:" prop="startTime">
-                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.startTime" :disabled="tab1.detailsSpareParts.create.temp.SHtype == 3" type="date" placeholder="开始日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
-              </el-form-item>
-            </el-col>
-            <el-col v-if="dialogStatus == 'tab1Update2' && tab1.detailsSpareParts.updateList.SHtype == 0" :span="8">
-              <el-form-item label="截止日期:" prop="stopTime">
-                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.stopTime" type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
-              </el-form-item>
-            </el-col>
-            <el-col v-if="dialogStatus == 'tab1Update2' && tab1.detailsSpareParts.updateList.SHtype !== 0" :span="8">
-              <el-form-item label="截止日期后:" prop="stopTimeHis">
-                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.stopTimeHis" type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="pickerOptions2" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="合同状态:" prop="statued">
-                <span>{{ tab1.detailsSpareParts.create.temp.statued }}</span>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="零库存:" prop="isZeroStock">
-                <el-radio-group v-model="tab1.detailsSpareParts.create.temp.isZeroStock" :disabled="tab1.detailsSpareParts.create.temp.SHtype == 3">
-                  <el-radio v-model="tab1.detailsSpareParts.create.temp.isZeroStock" :label="1">是</el-radio>
-                  <el-radio v-model="tab1.detailsSpareParts.create.temp.isZeroStock" :label="0">否</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="录入人:" prop="creatorMan">
-                <el-input ref="creatorMan" v-model="tab1.detailsSpareParts.create.temp.creatorMan" placeholder="录入人" disabled />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="录入日期:" prop="creatorTime">
-                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.creatorTime" :disabled="tab1.detailsSpareParts.create.temp.SHtype == 3 || dialogStatus=='tab1Update2' " type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="备注:" prop="remark">
-                <el-input ref="remark" v-model="tab1.detailsSpareParts.create.temp.remark" placeholder="备注" />
-              </el-form-item>
-            </el-col>
-            <el-col v-if="tab1.detailsSpareParts.create.temp.SHtype !== 0 && dialogStatus !=='tab1Update2'" :span="8">
-              <el-form-item label="变更后截止日期:" prop="stopTimeHis">
-                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.stopTimeHis" :disabled="tab1.detailsSpareParts.create.temp.SHtype !== 3" type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="pickerOptions2" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-        <el-button v-if="dialogStatus=='tab1create2'" type="primary" :disabled="isokDisable" @click="add_dialog_save2()">保存并关闭</el-button>
-        <el-button v-if="dialogStatus=='tab1change2'" type="primary" :disabled="isokDisable" @click="changeData2()">保存并关闭</el-button>
-        <el-button v-if="dialogStatus=='tab1Update2'" type="primary" :disabled="isokDisable" @click="edit_dialog_save2()">保存并关闭</el-button>
-        <el-button @click="tab1.detailsSpareParts.create.dialogFormVisible = false;">关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 变更记录查看 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.changeRecord.see.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <div class="app-see">
-        <div class="app-contentcard">
-          <el-form ref="seeTemp" :rules="rules" :model="tab1.changeRecord.see.temp" label-position="right" label-width="128px" style="width: 90%;margin:0 auto;">
-            <div v-if="tab1.changeRecord.see.temp.SHtype == 0 || tab1.changeRecord.see.temp.SHtype == 3">
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item label="牧场:" prop="pastureName">
-                    <span> {{ tab1.changeRecord.see.temp.pastureName }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="合同编号:" prop="contractCode">
-                    <span> {{ tab1.changeRecord.see.temp.contractCode }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="供应商:" prop="providerName">
-                    <span> {{ tab1.changeRecord.see.temp.providerName }} </span>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item label="开始日期:" prop="startTime">
-                    <span> {{ tab1.changeRecord.see.temp.startTime }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col v-if="dialogStatus !== 'tab1See2'" :span="8">
-                  <el-form-item label="截止日期:" prop="stopTime">
-                    <span> {{ tab1.changeRecord.see.temp.stopTime }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col v-if="dialogStatus == 'tab1See2' && tab1.changeRecord.see.temp.SHtype !== 3 && tab1.changeRecord.see.temp.SHtype !== 0" :span="8">
-                  <el-form-item label="截止日期:" prop="stopTimeHis">
-                    <span> {{ tab1.changeRecord.see.temp.stopTimeHis }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col v-if="dialogStatus == 'tab1See2' && tab1.changeRecord.see.temp.SHtype == 3" :span="8">
-                  <el-form-item label="截止日期:" prop="stopTime">
-                    <span> {{ tab1.changeRecord.see.temp.stopTime }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col v-if="dialogStatus == 'tab1See2' && tab1.changeRecord.see.temp.SHtype == 0" :span="8">
-                  <el-form-item label="截止日期:" prop="stopTime">
-                    <span> {{ tab1.changeRecord.see.temp.stopTime }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="合同状态:" prop="statued">
-                    <span>{{ tab1.changeRecord.see.temp.statued }}</span>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item label="零库存:" prop="isZeroStock">
-                    <el-radio-group v-model="tab1.changeRecord.see.temp.isZeroStock" disabled>
-                      <el-radio v-model="tab1.changeRecord.see.temp.isZeroStock" :label="1">是</el-radio>
-                      <el-radio v-model="tab1.changeRecord.see.temp.isZeroStock" :label="0">否</el-radio>
-                    </el-radio-group>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="录入人:" prop="creatorMan">
-                    <span> {{ tab1.changeRecord.see.temp.creatorMan }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="录入日期:" prop="creatorTime">
-                    <span> {{ tab1.changeRecord.see.temp.creatorTime }} </span>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item label="备注:" prop="remark">
-                    <span> {{ tab1.changeRecord.see.temp.remark }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="共享牧场:" prop="pastureNamesOld">
-                    <span> {{ tab1.changeRecord.see.temp.pastureNamesOld }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col v-if="tab1.changeRecord.see.temp.SHtype == 3" :span="8">
-                  <el-form-item label="变更后截止日期:" prop="stopTimeHis">
-                    <span> {{ tab1.changeRecord.see.temp.stopTimeHis }} </span>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item label="变更后共享牧场:" prop="pastureNamesNow">
-                    <span> {{ tab1.changeRecord.see.temp.pastureNamesNow }} </span>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </div>
-            <div v-if="tab1.changeRecord.see.temp.SHtype == 1 || tab1.changeRecord.see.temp.SHtype == 2">
-              <el-row>
-                <el-col :span="8">
-                  <el-form-item label="流水编号:" prop="contractCode">
-                    <span> {{ tab1.changeRecord.see.temp.contractCode }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="录入人:" prop="creatorMan">
-                    <span> {{ tab1.changeRecord.see.temp.creatorMan }} </span>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="录入日期:" prop="creatorTime">
-                    <span> {{ tab1.changeRecord.see.temp.creatorTime }} </span>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </div>
-          </el-form>
-          <div v-if="tab1.changeRecord.see.temp.SHtype == 1">
-            <el-table
-              :key="tab1.changeRecord.see.tableKey"
-              element-loading-text="给我一点时间"
-              :data="tab1.changeRecord.see.list"
-              border
-              fit
-              highlight-current-row
-              style="width: 100%;"
-              :row-style="rowStyle"
-              :cell-style="cellStyle"
-              class="elTable table-fixed"
-            >
-              <el-table-column label="序号" align="center" type="index" width="50px">
-                <template slot-scope="scope">
-                  <span>{{ scope.$index + (tab1.changeRecord.see.pageNum-1) * tab1.changeRecord.see.pageSize + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件编号" min-width="110px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.partCode }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件名称" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.partName }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件规格" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.specification }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
-                <template slot-scope="scope">
-                  <el-popover placement="right" title="" trigger="hover">
-                    <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
-                    <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                  </el-popover>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件品牌" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.brand }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="计量单位" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.unit }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="计划量" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.planAmount }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="单价" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.price }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备注" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.remark }}</span>
-                </template>
-              </el-table-column>
-            </el-table>
-            <pagination v-show="tab1.changeRecord.see.total>0" :total="tab1.changeRecord.see.total" :page.sync="tab1.changeRecord.see.getdataListParm.offset" :limit.sync="tab1.changeRecord.see.getdataListParm.pagecount" @pagination="getTab1List3See" />
-          </div>
-          <div v-if="tab1.changeRecord.see.temp.SHtype == 2">
-            <el-table
-              :key="tab1.changeRecord.see.tableKey"
-              element-loading-text="给我一点时间"
-              :data="tab1.changeRecord.see.list"
-              border
-              fit
-              highlight-current-row
-              style="width: 100%;"
-              :row-style="rowStyle"
-              :cell-style="cellStyle"
-              class="elTable table-fixed"
-            >
-              <el-table-column label="序号" align="center" type="index" width="50px">
-                <template slot-scope="scope">
-                  <span>{{ scope.$index + (tab1.changeRecord.see.pageNum-1) * tab1.changeRecord.see.pageSize + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件编号" min-width="110px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.partCode }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件名称" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.partName }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件规格" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.specification }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
-                <template slot-scope="scope">
-                  <el-popover placement="right" title="" trigger="hover">
-                    <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
-                    <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                  </el-popover>
-                </template>
-              </el-table-column>
-              <el-table-column label="备件品牌" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.brandhis }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="变更后品牌" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.brand }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="计量单位" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.unit }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="计划量" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.planAmounthis }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="变更后计划量" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.planAmount }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="单价" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.pricehis }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="变更后单价" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.price }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备注" min-width="80px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.remark }}</span>
-                </template>
-              </el-table-column>
-            </el-table>
-            <pagination v-show="tab1.changeRecord.see.total>0" :total="tab1.changeRecord.see.total" :page.sync="tab1.changeRecord.see.getdataListParm.offset" :limit.sync="tab1.changeRecord.see.getdataListParm.pagecount" @pagination="getTab1List3See" />
-          </div>
-          <el-form ref="seeTemp" :rules="rules" :model="tab1.changeRecord.see.temp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
-            <el-row>
-              <el-col>
-                <el-form-item label="流程进度" />
-                <el-steps :active="tab1.changeRecord.see.active" align-center finish-status="success">
-                  <el-step
-                    v-for="(item,index) in tab1.changeRecord.see.activeList"
-                    :key="index"
-                    :title="item.title"
-                    :status="item.status"
-                  >
-                    <template slot="description">
-                      <div class="step-row">
-                        <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
-                        <div>{{ item.reason }}</div>
-                      </div>
-                    </template>
-                  </el-step>
-                </el-steps>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col>
-                <el-form-item label="操作:">
-                  <!-- 设备主管审核 -->
-                  <el-button v-if="tab1.changeRecord.isContractExamineZG &&tab1.changeRecord.see.temp.SHStatus == 2" type="success" style="display:inline-block" @click="handleTab1Examine()">审核1</el-button>
-                  <el-button v-else type="success" style="display:none" @click="handleTab1Examine()">审核1</el-button>
-                  <!-- 设备助理审核 -->
-                  <!-- <el-button v-if="isContractExamineZL && seeTemp.SHStatus == 3" type="success" style="display:inline-block" @click="handleExamine2()">审核2</el-button>
-                  <el-button v-else type="success" style="display:none" @click="handleExamine2()">审核2</el-button> -->
-
-                  <!-- 设备中心审核 -->
-                  <el-button v-if="tab1.changeRecord.isContractExamineZX && tab1.changeRecord.see.temp.SHStatus == 5" type="success" style="display:inline-block" @click="handleTab1Examine3()">审核2</el-button>
-                  <el-button v-else type="success" style="display:none" @click="handleTab1Examine3()">审核2</el-button>
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </div>
-        <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-          <el-button @click="tab1.changeRecord.see.dialogFormVisible = false">关闭</el-button>
-        </div>
-      </div>
-    </el-dialog>
-    <!-- 变更记录审核 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.changeRecord.examine.dialogFormVisible" :close-on-click-modal="false" width="30%">
-      <div class="app-examine">
-        <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
-        <el-form ref="examineTemp" :rules="rules" :model="tab1.changeRecord.examine.temp" label-position="right" style="width: 50%;margin:0 auto;">
-          <el-row style="width:88%;height:150px;margin:0 auto;">
-            <el-col :span="20">
-              <el-form-item>
-                <el-radio-group v-model="tab1.changeRecord.examine.temp.statueSH" @change="changeExamineStatue">
-                  <el-radio :label="1" checked>通过</el-radio>
-                  <el-radio :label="2">不通过</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col v-if="tab1.changeRecord.examine.isReason" :span="20">
-              <el-input v-model="tab1.changeRecord.examine.temp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
-            </el-col>
-          </el-row>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button v-if="dialogStatus==='tab1examine'" type="primary" :disabled="isokDisable" @keyup.enter.native="createExamineData()" @click="createExamineData()">确认</el-button>
-        <!-- <el-button v-if="dialogStatus==='tab1examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button> -->
-        <el-button v-if="dialogStatus==='tab1examine3'" type="primary" :disabled="isokDisable" @keyup.enter.native="createExamineData3()" @click="createExamineData3()">确认</el-button>
-        <el-button @click="tab1.changeRecord.examine.dialogFormVisible = false;">关闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-// 引入
-import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess,postJson } from '@/api/common'
-import waves from '@/directive/waves'
-import { parseTime, json2excel, sortChange } from '@/utils/index.js'
-import Pagination from '@/components/Pagination'
-import Cookies from 'js-cookie'
-import { getToken } from '@/utils/auth'
-import { MessageBox } from 'element-ui'
-export default {
-  inject: ['reload'],
-  name: 'ContractManagement',
-  components: { Pagination },
-  directives: { waves },
-  data() {
-    return {
-      selectList:[],
-      contractCodese:'',
-      isGroupAdministrator: Cookies.get('pastureid'),
-      isEmployeid: Cookies.get('employeid'),
-      isPercentage: false,
-      percentage: 1,
-      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      buttons: [],
-      activeName: 'first',
-      contractStatusList: [{ id: '0', name: '正常' }, { id: '1', name: '已过期' }, { id: '2', name: '终止' }, { id: '3', name: '新增未通过' }],
-      contractStatus2List: [{ id: '1', name: '正常' }, { id: '0', name: '终止' }],
-      auditStatusList: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }], // 审核状态
-      changeTypeList: [{ id: '0', name: '新增合同' }, { id: '1', name: '新增备件' }, { id: '2', name: '变更备件' }, { id: '3', name: '合同变更' }],
-      isZeroInventoryList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 是否零库存
-      findAllProvider: [], findAllAssetType: [], findAllPasture: [], findAllPastureList2: [], findAllDepart: [], findAllEmploye: [], findAllCategory: [],
-      requestParams: [
-        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
-        { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
-        { name: 'findAllPastureForContract', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': 18 }},
-        { name: 'findAllDepart', offset: 0, pagecount: 0, params: [] },
-        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': 18 }},
-        { name: 'findAllCategory', offset: 0, pagecount: 0, params: [] }
-      ],
-      isokDisable: false,
-      disabled: true,
-      rules: {},
-      textMap: {
-        create: '新增合同',
-        see: '查看详情',
-        change: '变更合同',
-        tab1create2: '新增备件',
-        tab1change2: '变更备件',
-        tab1examine: '审核',
-        tab1examine2: '审核2',
-        tab1examine3: '审核2',
-        tab1See2: '查看',
-        tab1Update2: '编辑'
-      },
-      dialogStatus: '',
-      isContractManagement: true, // 备件合同
-      isDetailsSpareParts: false, // 备件明细
-      isChangeRecord: false, // 变更记录
-      tab1: {
-        // 合同管理1
-        contractManagement: {
-          radioAll: '全部',
-          isContractAdd: [],
-          isContractExport: [],
-          isContractUplaod: [],
-          isContractSee: [],
-          isContractChange: [],
-          isDisabled: false,
-          tableKey: 0,
-          listLoading: false,
-          total: 0,
-          list: [],
-          getdataListParm: {
-            name: 'providerPactListV2',
-            page: 1,
-            offset: 1,
-            pagecount: 10,
-            returntype: 'Map',
-            parammaps: {
-              loginid: Cookies.get('employeid'),
-              pastureName: Cookies.get('pasturename'),
-              contractCode: '',
-              statue: '',
-              stuteSH: '',
-              providerName: '',
-              tab1InputDatetime1: '',
-              startTime: '',
-              stopTime: '',
-              tab1InputDatetime2: '',
-              SHdateTimeF: '',
-              SHdateTimeE: '',
-              SHnums: 2
-            }
-          },
-          getParmCreateNumber: {
-            name: 'autoCreatCode',
-            page: 0,
-            offset: 0,
-            pagecount: 0,
-            returntype: 'Map',
-            parammaps: {
-              pastureId: Cookies.get('pastureid'),
-              codeType: 'HT'
-            }
-          },
-          create: {
-            dialogFormVisible: false,
-            temp: { contractCode: '', pastureId: Cookies.get('pastureid'), providerName: '', startTime: '', stopTime: '', statue: '', isZeroStock: 0, creatorId: Cookies.get('employeid'), creatorMan: Cookies.get('employename'), creatorTime: parseTime(new Date(), '{y}-{m}-{d}'), activeList: [], active: 3, workflowNote: '', synchronousPasture: [], synchronousPastureList: [] },
-            changeEchoParm: { name: 'getBigcontractPId', page: 0, offset: 0, pagecount: 0, returntype: 'Map', parammaps: {}}
-          }
-        },
-        // 合同管理-备件明细
-        detailsSpareParts: {
-          tableKey: 1,
-          listLoading: false,
-          total: 0,
-          list: [],
-          getdataListParm: {
-            name: 'getcontratListBybigV2',
-            page: 1,
-            offset: 1,
-            pagecount: 10,
-            returntype: 'Map',
-            parammaps: {
-              specification: '',
-              partName: '',
-              partCode: '',
-              pastureId: '',
-              providerId: '',
-              stopTime: '',
-              flag: '',
-              isZeroStock: '',
-              statue: ''
-            }
-          },
-          partCode: '',
-          requestSparePart: {
-            name: '',
-            page: 1,
-            offset: 1,
-            pagecount: 20,
-            returntype: 'Map',
-            parammaps: {}
-          },
-          detailsList: [],
-          updateList: [],
-          tableKeyAdd: 0,
-          listLoadingAdd: false,
-          listAdd: [],
-          requestBrand: {
-            name: 'getBrandByPartCode',
-            page: 0,
-            offset: 0,
-            pagecount: 10,
-            returntype: 'Map',
-            parammaps: {}
-          },
-          BrandList: [],
-          create: {
-            dialogFormVisible: false,
-            temp: { contractCode: '', pastureId: Cookies.get('pastureid'), providerName: '', startTime: '', stopTime: '', statue: '', isZeroStock: 0, creatorId: Cookies.get('employeid'), creatorMan: Cookies.get('employename'), creatorTime: parseTime(new Date(), '{y}-{m}-{d}'), activeList: [], active: 3, workflowNote: '' }
-          },
-          isDisabledImport: true,
-          clearImportExcelParm: {
-            name: 'deletecontract_upload',
-            page: 0,
-            offset: 0,
-            pagecount: '',
-            returntype: 'Map',
-            parammaps: {
-              user: Cookies.get('name')
-            }
-          },
-          importExcelParm: {
-            name: 'getcontract_uploadlist',
-            page: 0,
-            offset: 0,
-            pagecount: '',
-            returntype: 'Map',
-            parammaps: {
-              user: Cookies.get('name')
-            }
-          }
-        },
-        // 变更记录
-        changeRecord: {
-          isContractExamineZG: [],
-          //  isContractExamineZL: [],
-          isContractExamineZX: [],
-          isContractDelete: [],
-          isStatueReason: false,
-          isReason: false,
-          radioAll: '全部',
-          tableKey: 2,
-          listLoading: false,
-          total: 0,
-          list: [],
-          getdataListParm: {
-            name: 'providerPactListSH',
-            page: 1,
-            offset: 1,
-            pagecount: 10,
-            returntype: 'Map',
-            parammaps: {
-              loginid: Cookies.get('employeid'),
-              contractCode: '',
-              tab1InputDatetime3: '',
-              startTime: '',
-              stopTime: '',
-              SHStatus: '',
-              SHtype: '',
-              pastureId: '',
-              providerId: '',
-              stopTime1: '',
-              flag: '',
-              isZeroStock: '',
-              statue: '',
-              SHnums: 2,
-              stuteSH: ''
-            }
-          },
-          see: {
-            dialogFormVisible: false,
-            activeList: [], active: 3,
-            temp: {},
-            tableKey: 0,
-            listLoading: false,
-            total: 0,
-            list: [],
-            getdataListParm: {
-              name: 'getcontratListBybigSH',
-              returntype: 'Map',
-              page: 0,
-              offset: 0,
-              pagecount: 10,
-              parammaps: {}
-            }
-          },
-          examine: {
-            dialogFormVisible: false,
-            temp: {
-              statueSH: 1
-            },
-            isReason: false
-          }
-        }
-      },
-      postDataPramas: {},
-      // 开始日期
-      // pickerOptions1: {
-      //   disabledDate: (time) => {
-      //     if (this.tab1.contractManagement.create.temp.stopTime !== '') {
-      //       return parseTime(time.getTime(), '{y}-{m}-{d}') > parseTime(Date.now(), '{y}-{m}-{d}') || parseTime(time.getTime(), '{y}-{m}-{d}') >= this.tab1.contractManagement.create.temp.stopTime
-      //     } else {
-      //       return time.getTime() > Date.now()
-      //     }
-      //   }
-      // },
-      // 截止日期
-      pickerOptions2: {
-        disabledDate: (time) => {
-          return parseTime(time.getTime(), '{y}-{m}-{d}') <= this.tab1.contractManagement.create.temp.startTime || parseTime(time.getTime(), '{y}-{m}-{d}') < parseTime(Date.now(), '{y}-{m}-{d}')
-        }
-      },
-      pickerOptions3: {
-        disabledDate(time) {
-          return time.getTime() > Date.now()// 当天之前的时间可选
-        }
-      },
-      // 合同明细
-      tab2: {
-        tableKey: 0,
-        listLoading: false,
-        total: 0,
-        getdataListParm: {
-          name: 'contractDetailV2',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            inputDatetime: '',
-            providerName: '',
-            contractCode: '',
-            stopTime: '',
-            startTime: '',
-            statue: '',
-            partCode: '',
-            partName: '',
-            isZeroStock: '',
-            // pastureName: Cookies.get('pasturename')
-            pastureName: ''
-          }
-        },
-        list: []
-      },
-      UpdateDataParam: {},
-      UpdateDataParam2: {},
-      pending: {
-        total: 0,
-        getdataListParm: {
-          name: 'providerPactListV2', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
-          parammaps: {}
-        }
-      },
-      myHeight:document.documentElement.clientHeight - 85- 250
-    }
-  },
-  computed: {
-    // 设置请求头
-    headers() {
-      return {
-        token: getToken()
-      }
-    },
-    uploadData() {
-      return {
-        name: 'insertcontract_upload',
-        importParams: '备件编号,备件名称,规格型号,计量单位,品牌,计划量,单价,备注',
-        sheetname: 'SheetJS'
-      }
-    },
-    // 设置上传地址
-    uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
-    }
-  },
-  created() {
-    // this.keyupSubmit()
-    console.log(this.$route.query.contractCode)
-    this.get_select_list()
-    const that = this
-    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
-      that.buttons = response.data.list
-      that.get_auto_buttons()
-    })
-
-    this.getTab1List()
-    this.getPendingList()
-    if (this.$route.query.contractCode == undefined) {
-      this.tab1.contractManagement.getdataListParm.parammaps.contractCode = ''
-    } else {
-      this.tab1.contractManagement.getdataListParm.parammaps.contractCode = this.$route.query.contractCode
-    }
-  },
-
-  methods: {
-    tableSort1(column) {
-      sortChange(column, this.tab1.detailsSpareParts.list)
-    },
-    tableSort2(column) {
-      sortChange(column, this.tab2.list)
-    },
-    get_auto_buttons() {
-
-      // 新增
-      const ContractJinyong = 'customs:contract:jinyong'
-      const isContractJinyong = checkButtons(this.$store.state.user.buttons, ContractJinyong)
-      this.isContractJinyong = isContractJinyong
-
-      // 新增
-      const ContractAdd = 'customs:contract:add'
-      const isContractAdd = checkButtons(this.$store.state.user.buttons, ContractAdd)
-      this.tab1.contractManagement.isContractAdd = isContractAdd
-
-      // 查看
-      const ContractSee = 'customs:contract:see'
-      const isContractSee = checkButtons(this.$store.state.user.buttons, ContractSee)
-      this.tab1.contractManagement.isContractSee = isContractSee
-
-      // 办公室主任
-      const ContractExamineZG = 'customs:contract:examineZG'
-      const isContractExamineZG = checkButtons(this.$store.state.user.buttons, ContractExamineZG)
-      this.tab1.changeRecord.isContractExamineZG = isContractExamineZG
-      // 设备中心审核
-      const ContractExamineZX = 'customs:contract:examineZX'
-      const isContractExamineZX = checkButtons(this.$store.state.user.buttons, ContractExamineZX)
-      this.tab1.changeRecord.isContractExamineZX = isContractExamineZX
-      // 审核删除
-      const ContractDelete = 'customs:contract:delete'
-      const isContractDelete = checkButtons(this.$store.state.user.buttons, ContractDelete)
-      this.tab1.changeRecord.isContractDelete = isContractDelete
-      // 导出
-      const ContractExport = 'customs:contract:export'
-      const isContractExport = checkButtons(this.$store.state.user.buttons, ContractExport)
-      this.tab1.contractManagement.isContractExport = isContractExport
-      // SAP上传
-      const ContractUplaod = 'customs:contract:sapupload'
-      const isContractUplaod = checkButtons(this.$store.state.user.buttons, ContractUplaod)
-      this.tab1.contractManagement.isContractUplaod = isContractUplaod
-      // 变更
-      const ContractChange = 'customs:contract:change'
-      const isContractChange = checkButtons(this.$store.state.user.buttons, ContractChange)
-      this.tab1.contractManagement.isContractChange = isContractChange
-    },
-    get_select_list() {
-      GetDataByNames(this.requestParams).then(response => {
-        this.findAllProvider = response.data.findAllProvider.list
-        this.findAllAssetType = response.data.findAllAssetType.list
-        this.findAllPasture = response.data.findAllPasture.list
-        this.findAllPastureList2 = response.data.findAllPastureForContract.list
-        this.findAllDepart = response.data.findAllDepart.list
-        this.findAllEmploye = response.data.findAllEmploye.list
-        this.findAllCategory = response.data.findAllCategory.list
-      })
-    },
-    handleClick() {
-      if (this.tab1.contractManagement.create.temp.activeName == 'first') {
-        console.log('点击了合同管理')
-        this.getTab1List()
-      } else {
-        console.log('点击了合同明细')
-        this.getTab2List()
-      }
-    },
-    getPendingList() {
-      this.pending.getdataListParm.parammaps.loginid = this.tab1.contractManagement.getdataListParm.parammaps.loginid
-      this.pending.getdataListParm.parammaps.pastureName = this.tab1.contractManagement.getdataListParm.parammaps.pastureName
-      this.pending.getdataListParm.parammaps.contractCode = this.tab1.contractManagement.getdataListParm.parammaps.contractCode
-      this.pending.getdataListParm.parammaps.statue = this.tab1.contractManagement.getdataListParm.parammaps.statue
-      this.pending.getdataListParm.parammaps.stuteSH = this.tab1.contractManagement.getdataListParm.parammaps.stuteSH
-      this.pending.getdataListParm.parammaps.providerName = this.tab1.contractManagement.getdataListParm.parammaps.providerName
-      this.pending.getdataListParm.parammaps.tab1InputDatetime1 = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1
-      this.pending.getdataListParm.parammaps.startTime = this.tab1.contractManagement.getdataListParm.parammaps.startTime
-      this.pending.getdataListParm.parammaps.stopTime = this.tab1.contractManagement.getdataListParm.parammaps.stopTime
-      this.pending.getdataListParm.parammaps.tab1InputDatetime2 = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2
-      this.pending.getdataListParm.parammaps.SHdateTimeF = this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeF
-      this.pending.getdataListParm.parammaps.SHdateTimeE = this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeE
-      this.pending.getdataListParm.parammaps.SHnums = 0
-      GetDataByName(this.pending.getdataListParm).then(response => {
-        this.pending.total = response.data.total3
-      })
-    },
-    getTab1List() {
-      this.tab1.contractManagement.listLoading = true
-      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 !== '' && this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 !== null) {
-        this.tab1.contractManagement.getdataListParm.parammaps.startTime = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1[0]
-        this.tab1.contractManagement.getdataListParm.parammaps.stopTime = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1[1]
-      } else {
-        this.tab1.contractManagement.getdataListParm.parammaps.startTime = ''
-        this.tab1.contractManagement.getdataListParm.parammaps.stopTime = ''
-      }
-      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 !== '' && this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 !== null) {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeF = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2[0]
-        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeE = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2[1]
-      } else {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeF = ''
-        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeE = ''
-      }
-      GetDataByName(this.tab1.contractManagement.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.tab1.contractManagement.list = response.data.list
-          this.tab1.contractManagement.pageNum = response.data.pageNum
-          this.tab1.contractManagement.pageSize = response.data.pageSize
-        } else {
-          this.tab1.contractManagement.list = []
-        }
-        this.tab1.contractManagement.total = response.data.total
-        setTimeout(() => {
-          this.tab1.contractManagement.listLoading = false
-        }, 300)
-      })
-    },
-    handleTab1Filter() {
-      this.tab1.contractManagement.listLoading = true
-      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 == null) {
-        this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 = ''
-      }
-      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 == null) {
-        this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 = ''
-      }
-      this.tab1.contractManagement.getdataListParm.offset = 1
-      this.getTab1List()
-      this.getPendingList()
-      if (this.tab1.contractManagement.radioAll == '全部') {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 2
-        this.getTab1List()
-      } else if (this.tab1.contractManagement.radioAll == '待处理') {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 0
-        this.getTab1List()
-      } else if (this.tab1.contractManagement.radioAll == '已处理') {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 1
-        this.getTab1List()
-      }
-    },
-    changeContractManagementAll() {
-      if (this.tab1.contractManagement.radioAll == '全部') {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 2
-      } else if (this.tab1.contractManagement.radioAll == '待处理') {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 0
-      } else if (this.tab1.contractManagement.radioAll == '已处理') {
-        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 1
-      }
-      this.tab1.contractManagement.getdataListParm.offset = 1
-      this.getTab1List()
-    },
-    changeTime(val) {
-      if (this.tab1.contractManagement.create.temp.stopTime !== '') {
-        if (this.tab1.contractManagement.create.temp.stopTime <= this.tab1.contractManagement.create.temp.startTime) {
-          this.tab1.contractManagement.create.temp.stopTime = ''
-          this.tab1.contractManagement.create.temp.statue = ''
-          this.tab1.contractManagement.create.temp.statueId = ''
-        } else {
-          if (parseTime(new Date(), '{y}-{m}-{d}') <= this.tab1.contractManagement.create.temp.stopTime) {
-            this.tab1.contractManagement.create.temp.statue = '1'
-            // this.tab1.contractManagement.create.temp.statueId = 1
-          } else {
-            this.tab1.contractManagement.create.temp.statue = '0'
-            // this.tab1.contractManagement.create.temp.statueId = 2
-          }
-        }
-      } else {
-        this.tab1.contractManagement.create.temp.statue = ''
-        this.tab1.contractManagement.create.temp.statueId = ''
-      }
-    },
-    changeIsZero(val) {
-      console.log(val)
-    },
-    providerSearch(queryString, cb) {
-      var returnList = this.findAllProvider
-      var results = queryString ? returnList.filter(this.createFilter(queryString)) : returnList
-      // 调用 callback 返回建议列表的数据
-      cb(results)
-    },
-    createFilter(queryString) {
-      return returnValue => {
-        return (
-          returnValue.name.toLowerCase().indexOf(queryString.toLowerCase()) >= 0
-        )
-      }
-    },
-    handleSelectProvider(item) {
-      this.$set(this.tab1.contractManagement.create.temp, 'providerId', item.id)
-      this.$set(this.tab1.contractManagement.create.temp, 'providerName', item.name)
-    },
-    handleFocusProvider() {
-      this.tab1.contractManagement.create.temp.providerId = ''
-      this.tab1.contractManagement.create.temp.providerName = ''
-    },
-    handleBlurProvider() {
-      if (this.tab1.contractManagement.create.temp.providerId == '') {
-        this.tab1.contractManagement.create.temp.providerId = ''
-        this.tab1.contractManagement.create.temp.providerName = ''
-      }
-    },
-    changeCreatorMan(val) {
-      this.tab1.contractManagement.create.temp.creatorMan = this.findAllEmploye.find(obj => obj.id == val).name
-    },
-    resetCreateTemp() {
-      this.tab1.contractManagement.create.temp.synchronousPastureList = []
-      if (Cookies.get('pastureid') == 18) {
-        for (let i = 0; i < this.findAllPasture.length; i++) {
-          this.tab1.contractManagement.create.temp.synchronousPastureList.push(this.findAllPasture[i].id)
-        }
-      } else {
-        this.tab1.contractManagement.create.temp.synchronousPastureList.push(parseInt(Cookies.get('pastureid')))
-      }
-      this.tab1.contractManagement.create.temp = { contractCode: '', pastureId: parseFloat(Cookies.get('pastureid')), providerName: '', startTime: '', stopTime: '', statue: '', isZeroStock: 0, creatorId: parseFloat(Cookies.get('employeid')), creatorMan: Cookies.get('employename'), creatorTime: parseTime(new Date(), '{y}-{m}-{d}'), synchronousPasture: this.tab1.contractManagement.create.temp.synchronousPastureList, synchronousPasture2: [] }
-    },
-    handleTab1Create() {
-      this.resetCreateTemp()
-      this.dialogStatus = 'create'
-      this.tab1.contractManagement.create.dialogFormVisible = true
-      this.getCreateNumber()
-    },
-    getCreateNumber() {
-      GetDataByName(this.tab1.contractManagement.getParmCreateNumber).then(response => {
-        this.$nextTick(() => {
-          console.log('合同编号', response.data.list[0].orderCode)
-          this.tab1.contractManagement.create.temp.contractCode = response.data.list[0].orderCode
-          this.$forceUpdate()
-        })
-      })
-    },
-    add_dialog_save() {
-      console.log('点击了新增保存')
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['createTemp'].validate(valid => {
-        if (valid) {
-          if (this.tab1.contractManagement.create.temp.contractCode == '') {
-            GetDataByName(this.getParmCreateNumber).then(response => {
-              this.$nextTick(() => {
-                this.tab1.contractManagement.create.temp.contractCode = response.data.list[0].orderCode
-                this.$forceUpdate()
-                this.saveCreateData()
-              })
-            })
-          } else {
-            this.saveCreateData()
-          }
-        }
-      })
-    },
-    saveCreateData() {
-      this.postDataPramas = {}
-      if (Cookies.get('pastureid') == 18) {
-        if (this.tab1.contractManagement.create.temp.synchronousPasture.indexOf(18) == -1) {
-          this.$message({ type: 'error', message: '当前合同归属于现代牧业,未选中,共享牧场请选中现代牧业!', duration: 2000 })
-          return false
-        }
-      }
-      this.postDataPramas.common = { 'returnmap': '0' }
-      this.postDataPramas.data = []
-      this.postDataPramas.data[0] = { 'name': 'checkbigcontract', 'type': 'v', 'parammaps': {
-        pastureId: this.tab1.contractManagement.create.temp.pastureId,
-        providerId: this.tab1.contractManagement.create.temp.providerId
-      }}
-      this.postDataPramas.data[1] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
-        pastureId: this.tab1.contractManagement.create.temp.pastureId,
-        providerId: this.tab1.contractManagement.create.temp.providerId,
-        providerName: this.tab1.contractManagement.create.temp.providerName,
-        startTime: this.tab1.contractManagement.create.temp.startTime,
-        stopTime: this.tab1.contractManagement.create.temp.stopTime,
-        contractCode: this.tab1.contractManagement.create.temp.contractCode,
-        creatorId: this.tab1.contractManagement.create.temp.creatorId,
-        creatorMan: this.tab1.contractManagement.create.temp.creatorMan,
-        creatorTime: this.tab1.contractManagement.create.temp.creatorTime,
-        isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
-        statue: 1,
-        remark: this.tab1.contractManagement.create.temp.remark,
-        SHtype: 0
-      }}
-      var groupRanchList = []
-      for (let i = 0; i < this.tab1.contractManagement.create.temp.synchronousPasture.length; i++) {
-        var obj = {}
-        obj.pastureId = this.tab1.contractManagement.create.temp.synchronousPasture[i]
-        groupRanchList.push(obj)
-      }
-      if (Cookies.get('pastureid') == 18) {
-        this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': groupRanchList }}
-        this.postDataPramas.data[2].children = []
-        this.postDataPramas.data[2].children[0] = { 'name': 'insertPastureBigcontract', 'type': 'e', 'parammaps': {
-          bigcontractId: '@insertBigContractV2.LastInsertId',
-          pastureId: '@insertSpotList.pastureId'
-        }}
-      }
-      ExecDataByConfig(this.postDataPramas).then(response => {
-        console.log('新增保存发送参数', this.postDataPramas)
-        if (response.msg == 'fail') {
-          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-        } else {
-          this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 = ''
-          this.getTab1List()
-          this.getPendingList()
-          this.tab1.contractManagement.create.dialogFormVisible = false
-          this.tab1.contractManagement.create.temp.providerName = ''
-          this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-        }
-      })
-    },
-    form_see(row) {
-      console.log('查看', row)
-      row.statue = String(row.statue)
-      row.synchronousPasture2 = []
-      row.synchronousPastureName2 = []
-      row.synchronousPasture = []
-      this.tab1.contractManagement.create.temp = Object.assign({}, row)
-      this.dialogStatus = 'see'
-      this.tab1.contractManagement.create.dialogFormVisible = true
-      var reason = '未通过原因:' + this.tab1.contractManagement.create.temp.workflowNote
-      if (this.tab1.contractManagement.create.temp.SHStatus == 2) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核' }, { title: '设备中心审核' }]
-        this.tab1.contractManagement.create.temp.active = 1
-      } else if (this.tab1.contractManagement.create.temp.SHStatus == 3) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核' }]
-        this.tab1.contractManagement.create.temp.active = 2
-      } else if (this.tab1.contractManagement.create.temp.SHStatus == 4) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson, status: 'error', reason: reason }, { title: '设备中心审核' }]
-        this.tab1.contractManagement.create.temp.active = 2
-      } else if (this.tab1.contractManagement.create.temp.SHStatus == 5) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核' }]
-        this.tab1.contractManagement.create.temp.active = 2
-      } else if (this.tab1.contractManagement.create.temp.SHStatus == 6) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核' }]
-        this.tab1.contractManagement.create.temp.active = 3
-      } else if (this.tab1.contractManagement.create.temp.SHStatus == 7) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.contractManagement.create.temp.CGChargedate, name: this.tab1.contractManagement.create.temp.CGChargePerson }]
-        this.tab1.contractManagement.create.temp.active = 4
-      } else if (this.tab1.contractManagement.create.temp.SHStatus == 8) {
-        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.contractManagement.create.temp.CGChargedate, name: this.tab1.contractManagement.create.temp.CGChargePerson, status: 'error', reason: reason }]
-        this.tab1.contractManagement.create.temp.active = 4
-      }
-      this.tab1.contractManagement.create.changeEchoParm.parammaps.bigcontract_id = row.id
-      GetDataByName(this.tab1.contractManagement.create.changeEchoParm).then(response => {
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            this.tab1.contractManagement.create.temp.synchronousPasture2.push(response.data.list[i].pasture_id)
-            this.tab1.contractManagement.create.temp.synchronousPasture.push(response.data.list[i].pasture_id)
-            this.tab1.contractManagement.create.temp.synchronousPastureName2.push(this.findAllPasture.find(obj => obj.id == response.data.list[i].pasture_id).name)
-          }
-        } else {
-          this.tab1.contractManagement.create.temp.synchronousPasture = []
-        }
-        console.log(this.tab1.contractManagement.create.temp.synchronousPastureName2, 'synchronousPastureName2')
-      })
-    },
-    handleTab1Change(row) {
-      console.log('变更', row)
-      // row.statue = String(row.statue)
-      this.$set(row, 'mystopTime', row.stopTime)
-      row.synchronousPasture2 = []
-      row.synchronousPastureName2 = []
-      row.synchronousPasture = []
-      this.tab1.contractManagement.create.temp = Object.assign({}, row)
-      this.tab1.contractManagement.create.temp.statue = String(this.tab1.contractManagement.create.temp.statue)
-
-      this.dialogStatus = 'change'
-      this.tab1.contractManagement.create.dialogFormVisible = true
-      this.tab1.contractManagement.create.changeEchoParm.parammaps.bigcontract_id = row.id
-      GetDataByName(this.tab1.contractManagement.create.changeEchoParm).then(response => {
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            this.tab1.contractManagement.create.temp.synchronousPasture2.push(response.data.list[i].pasture_id)
-            this.tab1.contractManagement.create.temp.synchronousPasture.push(response.data.list[i].pasture_id)
-            this.tab1.contractManagement.create.temp.synchronousPastureName2.push(this.findAllPasture.find(obj => obj.id == response.data.list[i].pasture_id).name)
-          }
-        } else {
-          this.tab1.contractManagement.create.temp.synchronousPasture = []
-        }
-        console.log(this.tab1.contractManagement.create.temp.synchronousPastureName2, 'synchronousPastureName2')
-      })
-    },
-
-    terminationData() {
-      var aa = '确认终止合同?'
-      if (this.tab1.contractManagement.create.temp.isZeroStock == 1) {
-        aa = '若此合同库存中有剩余库存,建议先进行退货操作。'
-      } else {
-        aa = '确认终止合同?'
-      }
-      MessageBox.confirm(aa, { confirmButtonText: '确认终止', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.postDataPramas = {}
-        this.postDataPramas.name = 'updatecontractstatuV2'
-        this.postDataPramas.parammaps = {}
-        this.postDataPramas.parammaps = this.tab1.contractManagement.create.temp
-        this.postDataPramas.parammaps.creatorId = Cookies.get('employeid')
-        this.postDataPramas.parammaps.creatorMan = Cookies.get('employename')
-        this.postDataPramas.parammaps.creatorTime = parseTime(new Date(), '{y}-{m}-{d}')
-        PostDataByName(this.postDataPramas).then(response => {
-          console.log('变更保存发送参数', this.postDataPramas)
-          if (response.msg == 'fail') {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 = ''
-            this.getTab1List()
-            this.getPendingList()
-            this.tab1.contractManagement.create.dialogFormVisible = false
-            this.tab1.contractManagement.create.temp.providerName = ''
-            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-          }
-        })
-      })
-    },
-    changeData() {
-      if (Cookies.get('pastureid') == 18) {
-        this.UpdateDataParam = {}
-        this.UpdateDataParam.name = 'pasture_bigcontract'
-        this.UpdateDataParam.dataname = 'bigcontract_id'
-        this.UpdateDataParam.datavalue = this.tab1.contractManagement.create.temp.id
-        this.UpdateDataParam.valuename = 'pasture_id'
-        this.UpdateDataParam.values = this.tab1.contractManagement.create.temp.synchronousPasture
-        UpdateDataRelation(this.UpdateDataParam).then(response => {
-          if (response.msg !== 'fail') {
-            this.UpdateDataParam2.name = 'updateBigcontractPId'
-            this.UpdateDataParam2.parammaps = {}
-            this.UpdateDataParam2.parammaps.bigcontract_id = this.tab1.contractManagement.create.temp.id
-            this.UpdateDataParam2.parammaps.enable = 0
-            PostDataByName(this.UpdateDataParam2).then(response => {})
-          }
-        })
-      }
-      this.postDataPramas = {}
-      this.postDataPramas.common = { 'returnmap': '0' }
-      this.postDataPramas.data = []
-      this.postDataPramas.data[0] = { 'name': 'checkbigcontractSH', 'type': 'v', 'parammaps': {
-        pastureId: this.tab1.contractManagement.create.temp.pastureId,
-        providerId: this.tab1.contractManagement.create.temp.providerId,
-        stopTime: this.tab1.contractManagement.create.temp.mystopTime,
-        flag: this.tab1.contractManagement.create.temp.flag,
-        isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
-        statue: this.tab1.contractManagement.create.temp.statue
-      }}
-      if (Cookies.get('pastureid') == 18) {
-        var synchronousPastureName = []
-        for (let i = 0; i < this.tab1.contractManagement.create.temp.synchronousPasture.length; i++) {
-          synchronousPastureName.push(this.findAllPasture.find(obj => obj.id == this.tab1.contractManagement.create.temp.synchronousPasture[i]).name)
-        }
-        this.postDataPramas.data[1] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
-          pastureId: this.tab1.contractManagement.create.temp.pastureId,
-          providerId: this.tab1.contractManagement.create.temp.providerId,
-          providerName: this.tab1.contractManagement.create.temp.providerName,
-          startTime: this.tab1.contractManagement.create.temp.startTime,
-          stopTime: this.tab1.contractManagement.create.temp.mystopTime,
-          stopTime1: this.tab1.contractManagement.create.temp.stopTime,
-          contractCode: '',
-          contractCode1: this.tab1.contractManagement.create.temp.contractCode,
-          creatorId: this.tab1.contractManagement.create.temp.creatorId,
-          creatorMan: this.tab1.contractManagement.create.temp.creatorMan,
-          creatorTime: this.tab1.contractManagement.create.temp.creatorTime,
-          isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
-          statue: this.tab1.contractManagement.create.temp.statue,
-          remark: this.tab1.contractManagement.create.temp.remark,
-          flag: this.tab1.contractManagement.create.temp.flag,
-          SHtype: 3,
-          pastureNamesOld: this.tab1.contractManagement.create.temp.synchronousPastureName2.toString(),
-          pastureNamesNow: synchronousPastureName.toString()
-        }}
-      } else {
-        this.postDataPramas.data[1] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
-          pastureId: this.tab1.contractManagement.create.temp.pastureId,
-          providerId: this.tab1.contractManagement.create.temp.providerId,
-          providerName: this.tab1.contractManagement.create.temp.providerName,
-          startTime: this.tab1.contractManagement.create.temp.startTime,
-          stopTime: this.tab1.contractManagement.create.temp.mystopTime,
-          stopTime1: this.tab1.contractManagement.create.temp.stopTime,
-          contractCode: '',
-          contractCode1: this.tab1.contractManagement.create.temp.contractCode,
-          creatorId: this.tab1.contractManagement.create.temp.creatorId,
-          creatorMan: this.tab1.contractManagement.create.temp.creatorMan,
-          creatorTime: this.tab1.contractManagement.create.temp.creatorTime,
-          isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
-          statue: this.tab1.contractManagement.create.temp.statue,
-          remark: this.tab1.contractManagement.create.temp.remark,
-          flag: this.tab1.contractManagement.create.temp.flag,
-          SHtype: 3
-        }}
-      }
-      ExecDataByConfig(this.postDataPramas).then(response => {
-        console.log('变更保存发送参数', this.postDataPramas)
-        if (response.msg == 'fail') {
-          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-        } else {
-          this.getTab1List()
-          this.getPendingList()
-          this.tab1.contractManagement.create.dialogFormVisible = false
-          this.tab1.contractManagement.create.temp.providerName = ''
-          this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-        }
-      })
-    },
-    // 备件明细
-    handleTab1DetailsSpareParts(row) {
-      console.log('备件明细', row)
-      this.contractCodese = row.contractCode
-      this.tab1.detailsSpareParts.updateList = Object.assign({}, row)
-      this.tab1.detailsSpareParts.detailsList = Object.assign({}, row)
-      this.isContractManagement = false
-      this.isDetailsSpareParts = true
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.pastureId = row.pastureId
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.providerId = row.providerId
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.stopTime = row.stopTime
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.flag = row.flag
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.isZeroStock = row.isZeroStock
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.statue = row.statue
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.partCode = ''
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.partName = ''
-      this.tab1.detailsSpareParts.getdataListParm.parammaps.specification = ''
-      this.getTab1List2()
-    },
-    handleTab1goBack() {
-      // this.reload()
-      this.isContractManagement = true
-      this.isDetailsSpareParts = false
-      this.tab1.detailsSpareParts.total = 0
-      this.getTab1List()
-    },
-
-    change_enabled(){
-
-    },
-    change_no(){
-      console.log("selectList",this.selectList)
-
-
-      var send_data =    {
-        "common": {
-            "returnmap": "0"
-        },
-        "data": [
-            {
-                "name": "insertSpotList",
-                "resultmaps": {
-                    "list":  this.selectList
-                },
-                "children": [
-                    {
-                        "name": "updateContractEnableById",
-                        "type": "e",
-                        "parammaps": {
-                            "id": "@insertSpotList.id"
-                        }
-                    }
-                ]
-            },{
-        "name": "updateBigcontractIsToSap",
-                        "type": "e",
-                        "parammaps": {
-                            "contractCode": this.contractCodese
-                        }
-      }
-
-        ]
-    }
-
-
-      ExecDataByConfig(send_data).then(response => {
-          console.log('发送参数', send_data)
-          if (response.msg === 'fail') {
-            this.$notify({
-              title: '禁用失败',
-              message: response.data,
-              type: 'warning',
-              duration: 2000
-            })
-          } else {
-
-            this.getTab1List2()
-
-            this.$notify({
-              title: '',
-              message: '禁用成功',
-              type: 'success',
-              duration: 2000
-            })
-          }
-        })
-
-
-    },
-
-    handleSelectionChange(val) {
-      // this.create.temp.rowsNumber = []
-      // for(let i=0;i<val.length;i++){
-      //   this.create.temp.rowsNumber.push(val[i].rowNumber)
-      // }
-      console.log(val)
-      this.selectList = val
-    },
-    getTab1List2() {
-      this.tab1.detailsSpareParts.listLoading = true
-      GetDataByName(this.tab1.detailsSpareParts.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
-              const srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-              const picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-              response.data.list[i].srcpath = srcpath
-              response.data.list[i].picpath = picpath
-            } else {
-              response.data.list[i].srcpath = ''
-              response.data.list[i].picpath = ''
-            }
-          }
-          this.tab1.detailsSpareParts.list = response.data.list
-          this.tab1.detailsSpareParts.pageNum = response.data.pageNum
-          this.tab1.detailsSpareParts.pageSize = response.data.pageSize
-          if (response.data.list !== null) {
-            this.tab1.detailsSpareParts.total = response.data.total
-          } else {
-            this.tab1.detailsSpareParts.total = 0
-          }
-        } else {
-          this.tab1.detailsSpareParts.list = []
-        }
-        setTimeout(() => {
-          this.tab1.detailsSpareParts.listLoading = false
-        }, 300)
-      })
-    },
-    handleTab1Filter2() {
-      this.tab1.detailsSpareParts.listLoading = true
-      this.tab1.detailsSpareParts.getdataListParm.offset = 1
-      this.getTab1List2()
-    },
-    sparePartSearch(queryString, cb) {
-      this.tab1.detailsSpareParts.requestSparePart.parammaps['partCode'] = queryString
-      GetDataByName(this.tab1.detailsSpareParts.requestSparePart).then(response => {
-        if (response.data.list == null) {
-          cb([])
-        } else {
-          cb(response.data.list)
-        }
-      })
-    },
-    handleSelectSparePart(item) {
-      console.log('备件模糊查询选中值', item)
-      if (this.tab1.detailsSpareParts.listAdd.length > 0) {
-        if (this.tab1.detailsSpareParts.listAdd.find(obj => obj.partCode == item.partCode)) {
-          this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
-        } else {
-          if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
-            this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
-            this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
-          } else {
-            item.srcpath = ''
-            item.picpath = ''
-          }
-          this.$set(item, 'myid', new Date().getTime())
-          this.$set(item, 'taxcode', '')
-          this.tab1.detailsSpareParts.listAdd.unshift(item)
-        }
-      } else {
-        if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
-          this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
-          this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
-        } else {
-          item.srcpath = ''
-          item.picpath = ''
-        }
-        this.$set(item, 'myid', new Date().getTime())
-        this.tab1.detailsSpareParts.listAdd.unshift(item)
-      }
-    },
-    brandSearch(queryString, cb) {
-      this.tab1.detailsSpareParts.requestBrand.parammaps['brandName'] = queryString
-      GetDataByName(this.tab1.detailsSpareParts.requestBrand).then(response => {
-        this.tab1.detailsSpareParts.BrandList = response.data.list
-        cb(this.tab1.detailsSpareParts.BrandList)
-      })
-    },
-    handleSelectBrand(item, row) {
-      this.$set(row, 'brandName', item.brandName)
-      this.$set(row, 'brandId', item.brandId)
-      this.$forceUpdate()
-    },
-    handleFocusBrand(row) {
-      this.$set(row, 'brandName', '')
-      this.$set(row, 'brandId', '')
-    },
-    handleBlurBrand(row) {
-      if (row.brandId == '') {
-        this.$set(row, 'brand', '')
-        this.$set(row, 'brandName', '')
-        this.$set(row, 'brandId', '')
-      }
-    },
-    partDelete(row) {
-      console.log('备件明细-备件删除', row)
-      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        for (var i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
-          console.log(this.tab1.detailsSpareParts.listAdd[i])
-          if (this.tab1.detailsSpareParts.listAdd[i].myid === row.myid) {
-            var listAddIndex = this.tab1.detailsSpareParts.listAdd.indexOf(this.tab1.detailsSpareParts.listAdd[i])
-          }
-          if (listAddIndex > -1) {
-            this.tab1.detailsSpareParts.listAdd.splice(listAddIndex, 1)
-            return
-          }
-        }
-      })
-    },
-    handleTab1DownloadTemp2() {
-      console.log('备件明细-备件模板')
-      import('@/vendor/Export2Excel').then(excel => {
-        const list1 = []
-        const tHeader = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注']
-        const filterVal = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注']
-        const data1 = this.formatJsonTemp(filterVal, list1)
-        excel.export_json_to_excel({ header: tHeader, data: data1, filename: '备件明细模板', autoWidth: true, bookType: 'xlsx' })
-      })
-    },
-    formatJsonTemp(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j === 'timestamp') {
-            return parseTime(v[j])
-          } else {
-            return v[j]
-          }
-        })
-      )
-    },
-    beforeImportExcel(file) {
-      const isLt2M = file.size / 1024 / 1024 < 6
-      if (!isLt2M) {
-        this.$message.error('上传文件大小不能超过 6MB!')
-      }
-      return isLt2M
-    },
-    handleImportExcelSuccess(res, file) {
-      console.log(res)
-      if (res.msg == 'ok') {
-        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
-        if (res.data.err_count > 0) {
-          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
-           import('@/vendor/Export2Excel').then(excel => {
-             const list1 = res.data.result
-             const tHeader = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注', '报错信息']
-             const filterVal = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注', 'error_msg']
-             const data1 = this.formatJson(filterVal, list1)
-             excel.export_json_to_excel({ header: tHeader, data: data1, filename: '合同报错信息', autoWidth: true, bookType: 'xlsx' })
-           })
-        }
-        this.getImportExcelList()
-      } else {
-        this.$notify({ title: '失败', message: '上传失败,文件格式错误', type: 'danger', duration: 2000 })
-      }
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j == 'timestamp') {
-            return parseTime(v[j])
-          } else {
-            return v[j]
-          }
-        })
-      )
-    },
-    getClearImportExcelList() {
-      PostDataByName(this.tab1.detailsSpareParts.clearImportExcelParm).then(response => {
-        console.log(response.msg)
-        if (response.msg == 'ok') {
-          this.tab1.detailsSpareParts.isDisabledImport = false
-        }
-      })
-    },
-    getImportExcelList() {
-      GetDataByName(this.tab1.detailsSpareParts.importExcelParm).then(response => {
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            if (response.data.list[i].picpath == undefined) {
-              response.data.list[i].picpath = ''
-              response.data.list[i].srcpath = ''
-            } else {
-              this.$set(response.data.list[i], 'srcpath', process.env.VUE_APP_BASE_API + response.data.list[i].srcpath)
-              this.$set(response.data.list[i], 'picpath', process.env.VUE_APP_BASE_API + response.data.list[i].picpath)
-            }
-            response.data.list[i].myid = new Date().getTime() + i
-          }
-          this.tab1.detailsSpareParts.listAdd = response.data.list
-        } else {
-          this.tab1.detailsSpareParts.list = []
-        }
-      })
-    },
-    handleTab1Create2() {
-      console.log('备件明细-新增/变更')
-      this.dialogStatus = 'tab1create2'
-      this.tab1.detailsSpareParts.create.dialogFormVisible = true
-      this.tab1.detailsSpareParts.listAdd = []
-      this.tab1.detailsSpareParts.partCode = ''
-      this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigALLParts'
-      this.tab1.detailsSpareParts.requestSparePart.parammaps = {}
-      this.getClearImportExcelList()
-    },
-    add_dialog_save2() {
-      console.log('备件明细-新增保存')
-      if (this.tab1.detailsSpareParts.listAdd.length !== 0) {
-        for (let i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
-          if (this.tab1.detailsSpareParts.listAdd[i].planAmount == null || this.tab1.detailsSpareParts.listAdd[i].brand == null || this.tab1.detailsSpareParts.listAdd[i].price == null || this.tab1.detailsSpareParts.listAdd[i].planAmount == '' || this.tab1.detailsSpareParts.listAdd[i].brand === '' || this.tab1.detailsSpareParts.listAdd[i].brandId === '' || this.tab1.detailsSpareParts.listAdd[i].price == '' || this.tab1.detailsSpareParts.listAdd[i].brand == undefined || this.tab1.detailsSpareParts.listAdd[i].brandId == undefined) {
-            this.$message({ type: 'warning', message: '请检查备件品牌或计划量或单价是否为空', duration: 2000 })
-            return false
-          } else {
-            var rulesPlanAmount = /^[1-9]\d*$/
-            if (!rulesPlanAmount.test(parseFloat(this.tab1.detailsSpareParts.listAdd[i].planAmount))) {
-              this.$message({ type: 'error', message: '计划量请输入正整数', duration: 2000 })
-              return false
-            }
-            var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
-            if (rulesPrice.test(this.tab1.detailsSpareParts.listAdd[i].price) == false) {
-              this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
-              return false
-            }
-          }
-        }
-        this.postDataPramas = {}
-        this.postDataPramas.common = { 'returnmap': '0' }
-        this.postDataPramas.data = []
-        this.postDataPramas.data[0] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
-          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
-          flag: this.tab1.detailsSpareParts.detailsList.flag,
-          providerId: this.tab1.detailsSpareParts.detailsList.providerId,
-          providerName: this.tab1.detailsSpareParts.detailsList.providerName,
-          startTime: this.tab1.detailsSpareParts.detailsList.startTime,
-          stopTime: this.tab1.detailsSpareParts.detailsList.stopTime,
-          contractCode: '',
-          contractCode1: this.tab1.detailsSpareParts.detailsList.contractCode,
-          creatorId: Cookies.get('employeid'),
-          creatorMan: Cookies.get('employename'),
-          creatorTime: parseTime(new Date(), '{y}-{m}-{d}'),
-          isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock,
-          statue: this.tab1.detailsSpareParts.detailsList.statue,
-          remark: this.tab1.detailsSpareParts.detailsList.remark,
-          SHtype: 1
-        }}
-        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.tab1.detailsSpareParts.listAdd }}
-        this.postDataPramas.data[1].children = []
-        this.postDataPramas.data[1].children[0] = { 'name': 'checkcontracPartCode', 'type': 'v', 'parammaps': {
-          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
-          providerId: this.tab1.detailsSpareParts.detailsList.providerId,
-          stopTime: this.tab1.detailsSpareParts.detailsList.stopTime,
-          flag: this.tab1.detailsSpareParts.detailsList.flag,
-          isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock,
-          statue: this.tab1.detailsSpareParts.detailsList.statue,
-          partCode: '@insertSpotList.partCode',
-          brandId: '@insertSpotList.brandId'
-        }}
-        this.postDataPramas.data[1].children[1] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
-          bigId: '@insertBigContractV2.LastInsertId',
-          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
-          pastureName: this.tab1.detailsSpareParts.detailsList.pastureName,
-          partId: '@insertSpotList.id',
-          partName: '@insertSpotList.partName',
-          partCode: '@insertSpotList.partCode',
-          specification: '@insertSpotList.specification',
-          price: '@insertSpotList.price',
-          brandId: '@insertSpotList.brandId',
-          brand: '@insertSpotList.brand',
-          planAmount: '@insertSpotList.planAmount',
-          remark: '@insertSpotList.remark',
-          unit: '@insertSpotList.unit',
-          contractId: '@insertSpotList.contractId',
-          taxcode: '@insertSpotList.taxcode',
-          lifeCycle: '@insertSpotList.lifeCycle',
-          contractVarianceItem: '@insertSpotList.contractVarianceItem',
-        }}
-        ExecDataByConfig(this.postDataPramas).then(response => {
-          console.log('新增保存发送参数', this.postDataPramas)
-          if (response.msg == 'fail') {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.getTab1List2()
-            this.getPendingList()
-            this.tab1.detailsSpareParts.create.dialogFormVisible = false
-            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-          }
-        })
-      } else {
-        this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
-        return false
-      }
-    },
-    handleTab1Change2() {
-      console.log('备件明细-变更')
-      this.dialogStatus = 'tab1change2'
-      this.tab1.detailsSpareParts.create.dialogFormVisible = true
-      this.tab1.detailsSpareParts.listAdd = []
-      this.tab1.detailsSpareParts.requestSparePart.parammaps.pastureId = this.tab1.detailsSpareParts.detailsList.pastureId
-      this.tab1.detailsSpareParts.requestSparePart.parammaps.providerId = this.tab1.detailsSpareParts.detailsList.providerId
-      this.tab1.detailsSpareParts.requestSparePart.parammaps.stopTime = this.tab1.detailsSpareParts.detailsList.stopTime
-      this.tab1.detailsSpareParts.requestSparePart.parammaps.flag = this.tab1.detailsSpareParts.detailsList.flag
-      this.tab1.detailsSpareParts.requestSparePart.parammaps.isZeroStock = this.tab1.detailsSpareParts.detailsList.isZeroStock
-      this.tab1.detailsSpareParts.requestSparePart.parammaps.statue = this.tab1.detailsSpareParts.detailsList.statue
-      this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigParts'
-    },
-    changeData2() {
-      console.log('备件明细-变更保存')
-      if (this.tab1.detailsSpareParts.listAdd.length !== 0) {
-        for (let i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
-          if (this.tab1.detailsSpareParts.listAdd[i].planAmount == null || this.tab1.detailsSpareParts.listAdd[i].brand == null || this.tab1.detailsSpareParts.listAdd[i].price == null || this.tab1.detailsSpareParts.listAdd[i].planAmount == '' || this.tab1.detailsSpareParts.listAdd[i].brand === '' || this.tab1.detailsSpareParts.listAdd[i].brandId === '' || this.tab1.detailsSpareParts.listAdd[i].price == '' || this.tab1.detailsSpareParts.listAdd[i].brand == undefined || this.tab1.detailsSpareParts.listAdd[i].brandId == undefined) {
-            this.$message({ type: 'warning', message: '请检查备件品牌或计划量或单价是否为空', duration: 2000 })
-            return false
-          } else {
-            var rulesPlanAmount = /^[1-9]\d*$/
-            if (!rulesPlanAmount.test(parseFloat(this.tab1.detailsSpareParts.listAdd[i].planAmount))) {
-              this.$message({ type: 'error', message: '计划量请输入正整数', duration: 2000 })
-              return false
-            } else {
-              var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
-              if (rulesPrice.test(this.tab1.detailsSpareParts.listAdd[i].price) == false) {
-                this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
-                return false
-              }
-            }
-          }
-        }
-        this.postDataPramas = {}
-        this.postDataPramas.common = { 'returnmap': '0' }
-        this.postDataPramas.data = []
-        this.postDataPramas.data[0] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
-          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
-          flag: this.tab1.detailsSpareParts.detailsList.flag,
-          providerId: this.tab1.detailsSpareParts.detailsList.providerId,
-          providerName: this.tab1.detailsSpareParts.detailsList.providerName,
-          startTime: this.tab1.detailsSpareParts.detailsList.startTime,
-          stopTime: this.tab1.detailsSpareParts.detailsList.stopTime,
-          contractCode: '',
-          contractCode1: this.tab1.detailsSpareParts.detailsList.contractCode,
-          creatorId: Cookies.get('employeid'),
-          creatorMan: Cookies.get('employename'),
-          creatorTime: parseTime(new Date(), '{y}-{m}-{d}'),
-          isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock,
-          statue: this.tab1.detailsSpareParts.detailsList.statue,
-          remark: this.tab1.detailsSpareParts.detailsList.remark,
-          SHtype: 2
-        }}
-        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.tab1.detailsSpareParts.listAdd }}
-        this.postDataPramas.data[1].children = []
-        this.postDataPramas.data[1].children[0] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
-          bigId: '@insertBigContractV2.LastInsertId',
-          pastureId: '@insertSpotList.pastureId',
-          pastureName: '@insertSpotList.pastureName',
-          partId: '@insertSpotList.partId',
-          partName: '@insertSpotList.partName',
-          partCode: '@insertSpotList.partCode',
-          specification: '@insertSpotList.specification',
-          price: '@insertSpotList.price',
-          brandId: '@insertSpotList.brandId',
-          brand: '@insertSpotList.brand',
-          planAmount: '@insertSpotList.planAmount',
-          remark: '@insertSpotList.remark',
-          unit: '@insertSpotList.unit',
-          contractId: '@insertSpotList.contractId',
-          taxcode: '@insertSpotList.taxcode',
-          lifeCycle: '@insertSpotList.lifeCycle',
-          contractVarianceItem: '@insertSpotList.contractVarianceItem',
-        }}
-        ExecDataByConfig(this.postDataPramas).then(response => {
-          console.log('新增保存发送参数', this.postDataPramas)
-          if (response.msg == 'fail') {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.getTab1List2()
-            this.getPendingList()
-            this.tab1.detailsSpareParts.create.dialogFormVisible = false
-            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-          }
-        })
-      } else {
-        this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
-        return false
-      }
-    },
-    handleTab1Export2() {
-      console.log('备件明细-导出')
-      this.$alert('备件明细正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-          this.tab1.detailsSpareParts.getdataListParm.pagecount = 10
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.tab1.detailsSpareParts.getdataListParm.pagecount = ''
-      GetDataByName(this.tab1.detailsSpareParts.getdataListParm).then(response => {
-        if (response.data.list !== '') {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        if (response.data.list !== null) {
-          this.$nextTick(() => {
-            const ExcelDatas = [
-              {
-                tHeader: ['备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '计划量', '单价', '使用周期', '合同差异项', '备注'],
-                filterVal: ['partCode', 'partName', 'specification', 'brand', 'unit', 'planAmount', 'price','lifeCycle','contractVarianceItem', 'remark'],
-                tableDatas: response.data.list,
-                sheetName: '合同管理-备件明细'
-              }
-            ]
-            json2excel(ExcelDatas, '合同管理-备件明细', true, 'xlsx')
-          })
-        }
-      })
-    },
-
-    // 变更记录
-    handleTab1ChangeRecord(row) {
-      console.log('变更记录')
-      this.tab1.detailsSpareParts.detailsList = Object.assign({}, row)
-      this.contractCodese = row.contractCode
-      this.isContractManagement = false
-      this.isChangeRecord = true
-      this.tab1.changeRecord.getdataListParm.parammaps.pastureId = row.pastureId
-      this.tab1.changeRecord.getdataListParm.parammaps.providerId = row.providerId
-      this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = row.stopTime
-      this.tab1.changeRecord.getdataListParm.parammaps.flag = row.flag
-      this.tab1.changeRecord.getdataListParm.parammaps.isZeroStock = row.isZeroStock
-      this.tab1.changeRecord.getdataListParm.parammaps.statue = row.statue
-      this.tab1.changeRecord.getdataListParm.parammaps.contractCode = ''
-      this.tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3 = ''
-      this.tab1.changeRecord.getdataListParm.parammaps.startTime = ''
-      this.tab1.changeRecord.getdataListParm.parammaps.stopTime = ''
-      this.tab1.changeRecord.getdataListParm.parammaps.SHtype = ''
-      this.tab1.changeRecord.getdataListParm.parammaps.stuteSH = ''
-      this.getTab1List3()
-    },
-    handleTab1goBack2() {
-      // this.reload()
-      this.isContractManagement = true
-      this.isChangeRecord = false
-      this.tab1.changeRecord.total = 0
-      // this.tab1.contractManagement.getdataListParm.offset = 1
-      this.getTab1List()
-    },
-    getTab1List3() {
-      this.tab1.changeRecord.listLoading = true
-      if (this.$refs['tab1InputDatetime3'] !== undefined && this.$refs['tab1InputDatetime3'].value !== null) {
-        this.tab1.changeRecord.getdataListParm.parammaps.startTime = this.$refs['tab1InputDatetime3'].value[0]
-        this.tab1.changeRecord.getdataListParm.parammaps.stopTime = this.$refs['tab1InputDatetime3'].value[1]
-      } else {
-        this.tab1.changeRecord.getdataListParm.parammaps.startTime = ''
-        this.tab1.changeRecord.getdataListParm.parammaps.stopTime = ''
-      }
-      GetDataByName(this.tab1.changeRecord.getdataListParm).then(response => {
-        this.tab1.changeRecord.list = response.data.list
-        this.tab1.changeRecord.pageNum = response.data.pageNum
-        this.tab1.changeRecord.pageSize = response.data.pageSize
-        if (response.data.list !== null) {
-          this.tab1.changeRecord.total = response.data.total
-        } else {
-          this.tab1.changeRecord.total = 0
-        }
-        setTimeout(() => {
-          this.tab1.changeRecord.listLoading = false
-        }, 300)
-      })
-    },
-    handleTab1Filter3() {
-      this.tab1.changeRecord.listLoading = true
-      if (this.tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3 == null) {
-        this.tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3 = ''
-      }
-      this.tab1.changeRecord.getdataListParm.offset = 1
-      if (this.tab1.changeRecord.radioAll == '全部') {
-        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 2
-        this.getTab1List3()
-      } else if (this.tab1.changeRecord.radioAll == '待处理') {
-        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 0
-        this.getTab1List3()
-      } else if (this.tab1.changeRecord.radioAll == '已处理') {
-        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 1
-        this.getTab1List3()
-      }
-    },
-    changeChangeRecordAll() {
-      if (this.tab1.changeRecord.radioAll == '全部') {
-        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 2
-        this.getTab1List3()
-      } else if (this.tab1.changeRecord.radioAll == '待处理') {
-        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 0
-        this.getTab1List3()
-      } else if (this.tab1.changeRecord.radioAll == '已处理') {
-        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 1
-        this.getTab1List3()
-      }
-    },
-    handleTab1See3(row) {
-      console.log('变更记录-查看')
-      this.tab1.changeRecord.see.temp = Object.assign({}, row)
-      this.dialogStatus = 'tab1See2'
-      this.tab1.changeRecord.see.dialogFormVisible = true
-      if (row.SHtype == 0 || row.SHtype == 1 || row.SHtype == 2) {
-        this.tab1.changeRecord.see.getdataListParm.parammaps.id = row.id
-        this.getTab1List3See()
-      }
-      var reason = '未通过原因:' + this.tab1.changeRecord.see.temp.workflowNote
-      if (this.tab1.changeRecord.see.temp.SHStatus == 2) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核' }, { title: '设备中心审核' }]
-        this.tab1.changeRecord.see.active = 1
-      } else if (this.tab1.changeRecord.see.temp.SHStatus == 3) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核' }]
-        this.tab1.changeRecord.see.active = 2
-      } else if (this.tab1.changeRecord.see.temp.SHStatus == 4) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson, status: 'error', reason: reason }, { title: '设备中心审核' }]
-        this.tab1.changeRecord.see.active = 2
-      } else if (this.tab1.changeRecord.see.temp.SHStatus == 5) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核' }]
-        this.tab1.changeRecord.see.active = 2
-      } else if (this.tab1.changeRecord.see.temp.SHStatus == 6) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核' }]
-        this.tab1.changeRecord.see.active = 3
-      } else if (this.tab1.changeRecord.see.temp.SHStatus == 7) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.changeRecord.see.temp.CGChargedate, name: this.tab1.changeRecord.see.temp.CGChargePerson }]
-        this.tab1.changeRecord.see.active = 4
-      } else if (this.tab1.changeRecord.see.temp.SHStatus == 8) {
-        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.changeRecord.see.temp.CGChargedate, name: this.tab1.changeRecord.see.temp.CGChargePerson, status: 'error', reason: reason }]
-        this.tab1.changeRecord.see.active = 4
-      }
-    },
-    getTab1List3See() {
-      GetDataByName(this.tab1.changeRecord.see.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.tab1.changeRecord.see.pageNum = response.data.pageNum
-          this.tab1.changeRecord.see.pageSize = response.data.pageSize
-          if (response.data.total) {
-            this.tab1.changeRecord.see.total = response.data.total
-          }
-          for (let i = 0; i < response.data.list.length; i++) {
-            response.data.list[i].myid = new Date().getTime() + i
-            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
-              const srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-              const picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-              response.data.list[i].srcpath = srcpath
-              response.data.list[i].picpath = picpath
-            } else {
-              response.data.list[i].srcpath = ''
-              response.data.list[i].picpath = ''
-            }
-          }
-          this.tab1.changeRecord.see.list = response.data.list
-          this.tab1.detailsSpareParts.listAdd = response.data.list
-        } else {
-          this.tab1.changeRecord.see.list = []
-          this.tab1.detailsSpareParts.listAdd = []
-        }
-        setTimeout(() => {
-          this.tab1.changeRecord.see.listLoading = false
-        }, 300)
-      })
-    },
-    handleTab1Update3(row) {
-      console.log('变更记录-编辑', row)
-      this.tab1.detailsSpareParts.updateList = Object.assign({}, row)
-      this.tab1.detailsSpareParts.create.temp = Object.assign({}, row)
-      this.dialogStatus = 'tab1Update2'
-      this.tab1.detailsSpareParts.create.dialogFormVisible = true
-      this.tab1.changeRecord.see.getdataListParm.parammaps.id = row.id
-      this.getTab1List3See()
-      if (row.SHtype == 1) {
-        this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigALLParts'
-        this.tab1.detailsSpareParts.requestSparePart.parammaps = {}
-      } else {
-        this.tab1.detailsSpareParts.requestSparePart.parammaps.pastureId = this.tab1.detailsSpareParts.detailsList.pastureId
-        this.tab1.detailsSpareParts.requestSparePart.parammaps.providerId = this.tab1.detailsSpareParts.detailsList.providerId
-        this.tab1.detailsSpareParts.requestSparePart.parammaps.stopTime = this.tab1.detailsSpareParts.detailsList.stopTime
-        this.tab1.detailsSpareParts.requestSparePart.parammaps.flag = this.tab1.detailsSpareParts.detailsList.flag
-        this.tab1.detailsSpareParts.requestSparePart.parammaps.isZeroStock = this.tab1.detailsSpareParts.detailsList.isZeroStock
-        this.tab1.detailsSpareParts.requestSparePart.parammaps.statue = this.tab1.detailsSpareParts.detailsList.statue
-        this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigParts'
-      }
-    },
-    edit_dialog_save2() {
-      console.log('编辑保存')
-      // 新增合同 || 变更日期
-      if (this.tab1.detailsSpareParts.updateList.SHtype == 0 || this.tab1.detailsSpareParts.updateList.SHtype == 3) {
-        this.postDataPramas = {}
-        this.postDataPramas.common = { 'returnmap': '0' }
-        this.postDataPramas.data = []
-        this.postDataPramas.data[0] = { 'name': 'updateBigcontractV2', 'type': 'e', 'parammaps': {
-          id: this.tab1.detailsSpareParts.create.temp.id,
-          startTime: this.tab1.detailsSpareParts.create.temp.startTime,
-          stopTime: this.tab1.detailsSpareParts.create.temp.stopTime,
-          isZeroStock: this.tab1.detailsSpareParts.create.temp.isZeroStock,
-          remark: this.tab1.detailsSpareParts.create.temp.remark,
-          stopTimeHis: this.tab1.detailsSpareParts.create.temp.stopTimeHis
-        }}
-        ExecDataByConfig(this.postDataPramas).then(response => {
-          console.log('新增保存发送参数', this.postDataPramas)
-          if (response.msg == 'fail') {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            if (this.tab1.detailsSpareParts.updateList.SHtype == 0) {
-              this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.detailsSpareParts.create.temp.stopTime
-            }
-            this.getTab1List3()
-            this.getPendingList()
-            this.tab1.detailsSpareParts.create.dialogFormVisible = false
-            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-          }
-        })
-      } else {
-        if (this.tab1.detailsSpareParts.listAdd.length !== 0) {
-          for (let i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
-            if (this.tab1.detailsSpareParts.listAdd[i].planAmount == null || this.tab1.detailsSpareParts.listAdd[i].brand == null || this.tab1.detailsSpareParts.listAdd[i].price == null || this.tab1.detailsSpareParts.listAdd[i].planAmount == '' || this.tab1.detailsSpareParts.listAdd[i].brand == '' || this.tab1.detailsSpareParts.listAdd[i].brandId === '' || this.tab1.detailsSpareParts.listAdd[i].price == '' || this.tab1.detailsSpareParts.listAdd[i].brand == undefined || this.tab1.detailsSpareParts.listAdd[i].brandId == undefined) {
-              console.log(this.tab1.detailsSpareParts.listAdd[i])
-              this.$message({ type: 'warning', message: '请检查备件品牌或计划量或单价是否为空', duration: 2000 })
-              return false
-            } else {
-              var rulesPlanAmount = /^[1-9]\d*$/
-              if (!rulesPlanAmount.test(parseFloat(this.tab1.detailsSpareParts.listAdd[i].planAmount))) {
-                this.$message({ type: 'error', message: '计划量请输入正整数', duration: 2000 })
-                return false
-              } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
-                if (rulesPrice.test(this.tab1.detailsSpareParts.listAdd[i].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
-                  return false
-                }
-              }
-            }
-          }
-          this.postDataPramas = {}
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          this.postDataPramas.data[0] = { 'name': 'deleteContract', 'type': 'e', 'parammaps': {
-            bigId: this.tab1.detailsSpareParts.updateList.id
-          }}
-          this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.tab1.detailsSpareParts.listAdd }}
-          this.postDataPramas.data[1].children = []
-
-          if (this.tab1.detailsSpareParts.updateList.SHtype == 2) {
-            this.postDataPramas.data[1].children[0] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
-              bigId: this.tab1.detailsSpareParts.updateList.id,
-              pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
-              pastureName: this.tab1.detailsSpareParts.detailsList.pastureName,
-              partId: '@insertSpotList.id',
-              partName: '@insertSpotList.partName',
-              partCode: '@insertSpotList.partCode',
-              specification: '@insertSpotList.specification',
-              price: '@insertSpotList.price',
-              brandId: '@insertSpotList.brandId',
-              brand: '@insertSpotList.brand',
-              planAmount: '@insertSpotList.planAmount',
-              remark: '@insertSpotList.remark',
-              unit: '@insertSpotList.unit',
-              contractId: '@insertSpotList.contractId',
-              taxcode: '@insertSpotList.taxcode',
-              lifeCycle: '@insertSpotList.lifeCycle',
-              contractVarianceItem: '@insertSpotList.contractVarianceItem',
-            }}
-          } else {
-            this.postDataPramas.data[1].children[0] = { 'name': 'checkcontracPartCode', 'type': 'v', 'parammaps': { pastureId: this.tab1.detailsSpareParts.detailsList.pastureId, providerId: this.tab1.detailsSpareParts.detailsList.providerId, stopTime: this.tab1.detailsSpareParts.detailsList.stopTime, flag: this.tab1.detailsSpareParts.detailsList.flag, isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock, statue: this.tab1.detailsSpareParts.detailsList.statue, partCode: '@insertSpotList.partCode', brandId: '@insertSpotList.brandId' }}
-            this.postDataPramas.data[1].children[1] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
-              bigId: this.tab1.detailsSpareParts.updateList.id,
-              pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
-              pastureName: this.tab1.detailsSpareParts.detailsList.pastureName,
-              partId: '@insertSpotList.id',
-              partName: '@insertSpotList.partName',
-              partCode: '@insertSpotList.partCode',
-              specification: '@insertSpotList.specification',
-              price: '@insertSpotList.price',
-              brandId: '@insertSpotList.brandId',
-              brand: '@insertSpotList.brand',
-              planAmount: '@insertSpotList.planAmount',
-              remark: '@insertSpotList.remark',
-              unit: '@insertSpotList.unit',
-              contractId: '@insertSpotList.contractId',
-              lifeCycle: '@insertSpotList.lifeCycle',
-              contractVarianceItem: '@insertSpotList.contractVarianceItem',
-              // taxcode: '@insertSpotList.taxcode'
-            }}
-          }
-          this.postDataPramas.data[2] = { 'name': 'updateBigcontract', 'type': 'e', 'parammaps': {
-            id: this.tab1.detailsSpareParts.updateList.id
-          }}
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            console.log('新增保存发送参数', this.postDataPramas)
-            if (response.msg == 'fail') {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.getTab1List3()
-              this.getPendingList()
-              this.tab1.detailsSpareParts.create.dialogFormVisible = false
-              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-            }
-          })
-        } else {
-          this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
-          return false
-        }
-      }
-    },
-    changeExamineStatue(val) {
-      if (val == 2) {
-        this.tab1.changeRecord.examine.isReason = true
-      } else {
-        this.tab1.changeRecord.examine.isReason = false
-      }
-    },
-    // 审核1
-    handleTab1Examine(row) {
-      console.log('变更记录-审核')
-      this.dialogStatus = 'tab1examine'
-      this.tab1.changeRecord.examine.dialogFormVisible = true
-      this.tab1.changeRecord.examine.temp = Object.assign({}, row)
-      this.tab1.changeRecord.examine.isReason = false
-      if (row == undefined) {
-        this.tab1.changeRecord.examine.temp = this.tab1.changeRecord.see.temp
-        this.$set(this.tab1.changeRecord.see.temp, 'statueSH', 1)
-        this.$set(this.tab1.changeRecord.see.temp, 'workflowNote', '')
-      } else {
-        this.tab1.changeRecord.examine.temp = Object.assign({}, row)
-        this.$set(this.tab1.changeRecord.examine.temp, 'statueSH', 1)
-        this.$set(this.tab1.changeRecord.examine.temp, 'workflowNote', '')
-      }
-      this.keyupSubmit()
-    },
-    keyupSubmit() {
-      if (this.dialogStatus == 'tab1examine' || this.dialogStatus == 'tab1examine2' || this.dialogStatus == 'tab1examine3') {
-        document.onkeydown = e => {
-          const _key = window.event.keyCode
-          if (_key === 13) {
-            if (this.dialogStatus == 'tab1examine') {
-              this.createExamineData()
-            } else {
-              this.createExamineData3()
-            }
-          }
-        }
-      }
-    },
-    createExamineData() {
-      console.log('点击了设备主管审核确认1')
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-          this.postDataPramas = {}
-          this.postDataPramas.name = 'contractCharge'
-          this.postDataPramas.parammaps = {}
-          this.postDataPramas.parammaps.id = this.tab1.changeRecord.examine.temp.id
-          if (this.tab1.changeRecord.examine.temp.statueSH === 1) {
-            this.postDataPramas.parammaps.statue = 5
-          } else {
-            this.postDataPramas.parammaps.statue = 4
-          }
-          this.postDataPramas.parammaps.empId	 = Cookies.get('employeid')
-          this.postDataPramas.parammaps.workflowNote = this.tab1.changeRecord.examine.temp.workflowNote
-          PostDataByName(this.postDataPramas).then(response => {
-            console.log('设备主管审核确认发送参数', this.postDataPramas)
-            if (response.msg !== 'fail') {
-              this.tab1.changeRecord.examine.dialogFormVisible = false
-              this.tab1.changeRecord.see.dialogFormVisible = false
-              this.tab1.changeRecord.isStatueReason = false
-              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
-              this.getTab1List3()
-              this.getTab1List()
-              this.getPendingList()
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-    // 审核2
-    handleTab1Examine3(row) {
-      console.log(' 变更记录-审核3')
-      if (row == undefined) {
-        this.tab1.changeRecord.examine.temp = this.tab1.changeRecord.see.temp
-        this.$set(this.tab1.changeRecord.see.temp, 'statueSH', 1)
-        this.$set(this.tab1.changeRecord.see.temp, 'workflowNote', '')
-      } else {
-        this.tab1.changeRecord.examine.temp = Object.assign({}, row)
-        this.$set(this.tab1.changeRecord.examine.temp, 'statueSH', 1)
-        this.$set(this.tab1.changeRecord.examine.temp, 'workflowNote', '')
-      }
-      this.dialogStatus = 'tab1examine3'
-      this.tab1.changeRecord.examine.dialogFormVisible = true
-      this.tab1.changeRecord.examine.isReason = false
-      this.keyupSubmit()
-    },
-    createExamineData3() {
-      console.log('点击了设备中心审核确认3')
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-          this.postDataPramas = {}
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          if (this.tab1.changeRecord.examine.temp.statueSH == 1) {
-            this.postDataPramas.data[0] = { 'name': 'contractCharge1', 'type': 'e', 'parammaps': {
-              statue: 7,
-              empId: Cookies.get('employeid'),
-              workflowNote: this.tab1.changeRecord.examine.temp.workflowNote,
-              id: this.tab1.changeRecord.examine.temp.id
-            }}
-            if (this.tab1.changeRecord.examine.temp.SHtype == 1 || this.tab1.changeRecord.examine.temp.SHtype == 2) {
-              this.postDataPramas.data[1] = { 'name': 'updateContractEnable', 'type': 'e', 'parammaps': {
-                id: this.tab1.changeRecord.examine.temp.id
-              }}
-            } else if (this.tab1.changeRecord.examine.temp.SHtype == 3) {
-              this.postDataPramas.data[1] = { 'name': 'updatecontractdate', 'type': 'e', 'parammaps': {
-                pastureId: this.tab1.changeRecord.examine.temp.pastureId,
-                providerId: this.tab1.changeRecord.examine.temp.providerId,
-                stopTimeHis: this.tab1.changeRecord.examine.temp.stopTimeHis,
-                flag: this.tab1.changeRecord.examine.temp.flag,
-                isZeroStock: this.tab1.changeRecord.examine.temp.isZeroStock,
-                statue: this.tab1.changeRecord.examine.temp.statue,
-                startTime: this.tab1.changeRecord.examine.temp.startTime,
-                stopTime: this.tab1.changeRecord.examine.temp.stopTime,
-                id: this.tab1.changeRecord.examine.temp.id
-              }}
-            }
-            this.postDataPramas.data[2] = {
-                  "name": "updateBigcontractIsToSap",
-                              "type": "e",
-                              "parammaps": {
-                                  "contractCode": this.contractCodese
-                              }
-            }
-
-
-          } else {
-            this.postDataPramas.data[0] = { 'name': 'contractCharge1', 'type': 'e', 'parammaps': {
-              statue: 8,
-              empId: Cookies.get('employeid'),
-              workflowNote: this.tab1.changeRecord.examine.temp.workflowNote,
-              id: this.tab1.changeRecord.examine.temp.id
-            }}
-          }
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            console.log('新增保存发送参数', this.postDataPramas)
-            if (response.msg === 'fail') {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              if (this.postDataPramas.data[0].parammaps.statue == 7) {
-                if (this.tab1.changeRecord.examine.temp.SHtype == 3) {
-                  this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.changeRecord.examine.temp.stopTimeHis
-                } else {
-                  this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.changeRecord.examine.temp.stopTime
-                }
-              } else {
-                this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.detailsSpareParts.detailsList.stopTime
-              }
-              this.tab1.changeRecord.examine.dialogFormVisible = false
-              this.tab1.changeRecord.see.dialogFormVisible = false
-              this.tab1.changeRecord.examine.isStatueReason = false
-              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-              this.getTab1List3()
-              this.getTab1List()
-              this.getPendingList()
-            }
-          })
-        }
-      })
-    },
-    handleTab1Delete3(row) {
-      console.log('变更记录-删除')
-      console.log('点击了删除')
-      MessageBox.confirm('确认删除此条信息?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.postDataPramas = {}
-        this.postDataPramas.common = { 'returnmap': '0' }
-        this.postDataPramas.data = []
-        this.postDataPramas.data[0] = { 'name': 'deleteBigContract', 'type': 'e', 'parammaps': {
-          id: row.id
-        }}
-        this.postDataPramas.data[1] = { 'name': 'deleteContract', 'type': 'e', 'parammaps': {
-          bigId: row.id
-        }}
-        ExecDataByConfig(this.postDataPramas).then(response => {
-          this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
-          this.getTab1List3()
-          this.getPendingList()
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消删除' })
-      })
-    },
-
-    // 合同明细
-    getTab2List() {
-      this.tab2.listLoading = true
-      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
-        this.tab2.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
-        this.tab2.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
-      } else {
-        this.tab2.getdataListParm.parammaps.startTime = ''
-        this.tab2.getdataListParm.parammaps.stopTime = ''
-      }
-      GetDataByName(this.tab2.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.tab2.list = response.data.list
-          this.tab2.pageNum = response.data.pageNum
-          this.tab2.pageSize = response.data.pageSize
-          if (response.data.total) {
-            this.tab2.total = response.data.total
-          }
-        } else {
-          this.tab2.list = []
-        }
-        setTimeout(() => {
-          this.tab2.listLoading = false
-        }, 300)
-      })
-    },
-    handleTab2Filter() {
-      this.listLoading2 = true
-      if (this.tab2.getdataListParm.parammaps.inputDatetime === null) {
-        this.tab2.getdataListParm.parammaps.inputDatetime = ''
-      }
-      this.tab2.getdataListParm.offset = 1
-      this.getTab2List()
-    },
-    handleTab2Export() {
-      this.$alert('合同明细正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
-        this.tab2.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
-        this.tab2.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
-      } else {
-        this.tab2.getdataListParm.parammaps.startTime = ''
-        this.tab2.getdataListParm.parammaps.stopTime = ''
-      }
-      this.tab2.getdataListParm.pagecount = ''
-      GetDataByName(this.tab2.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            if (response.data.list[i].isZeroStock == 0) {
-              response.data.list[i].isZeroStock = '否'
-            } else {
-              response.data.list[i].isZeroStock = '是'
-            }
-          }
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        } else {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        this.tab2.getdataListParm.pagecount = 10
-        this.$nextTick(() => {
-          const ExcelDatas = [
-            {
-              tHeader: ['牧场', '合同编号', '合同状态', '供应商', '合同开始日期', '合同截止日期', '零库存', '备件编号', '备件名称', '规格', '备件品牌', '计量单位', '计划量', '单价', '备注', '录入人', '录入日期'],
-              filterVal: ['pastureName', 'contractCode', 'statue', 'providerName', 'startTime', 'stopTime', 'isZeroStock', 'partCode', 'partName', 'specification', 'brand', 'unit', 'planAmount', 'price', 'remark', 'creatorMan', 'creatorTime'],
-              tableDatas: response.data.list,
-              sheetName: '合同明细'
-            }
-          ]
-          json2excel(ExcelDatas, '合同明细', true, 'xlsx')
-        })
-      })
-    },
-    sapUpload(){
-      if(this.selectList.length == 0){
-        this.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
-        return false
-      }
-      let url = 'authdata/contract/push'
-      let ids = []
-      this.selectList.forEach((i)=>{
-        ids.push(i.id)
-        console.log(i,'===')
-      })
-      let data = {
-        pastureId:parseInt(Cookies.get('pastureid')),
-        providerId:this.tab1.detailsSpareParts.detailsList.providerId,
-        contractIdList:ids
-      }
-      postJson(url,data).then(response => {
-        if (response.msg !== 'fail') {
-          this.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-        } else {
-          this.$notify({ title: '上传失败', message: response.data, type: 'warning', duration: 2000 })
-        }
-      })
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-  /deep/ .el-badge__content.is-fixed{
-    z-index: 1;
-  }
-  .el-notification__content {
-    white-space: pre-line !important;
-  }
-</style>
-<style lang="scss">
-  .el-notification__content {
-      white-space: pre-line !important;
-    }
-</style>
+<template>
+  <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="合同管理" name="first">
+        <div v-if="isContractManagement" class="contractManagement">
+          <div class="filter-container">
+            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.pastureName" placeholder="牧场" style="width:120px" class="filter-item">
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-input v-model="tab1.contractManagement.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 140px;" class="filter-item" />
+            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.statue" clearable placeholder="合同状态" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in contractStatusList" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.providerName" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
+              <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-select v-model="tab1.contractManagement.getdataListParm.parammaps.isZeroStock" clearable placeholder="是否零库存" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in isZeroInventoryList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-date-picker ref="tab1InputDatetime1" v-model="tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+            <el-date-picker ref="tab1InputDatetime2" v-model="tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="审批日期" end-placeholder="审批日期" />
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab1Filter">搜索</el-button>
+            <div>
+              <el-button v-if="tab1.contractManagement.isContractAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab1Create">新增</el-button>
+              <el-radio-group v-model="tab1.contractManagement.radioAll" style="margin-top:-9px" @change="changeContractManagementAll()">
+                <el-radio-button label="全部" />
+                <el-badge :value="pending.total" class="item">
+                  <el-radio-button label="待处理" />
+                </el-badge>
+                <el-radio-button label="已处理" />
+              </el-radio-group>
+            </div>
+          </div>
+          <el-table
+            :key="tab1.contractManagement.tableKey"
+            v-loading="tab1.contractManagement.listLoading"
+            element-loading-text="给我一点时间"
+            :data="tab1.contractManagement.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            :max-height="myHeight"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (tab1.contractManagement.pageNum-1) * tab1.contractManagement.pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="牧场" min-width="120px" align="center" prop="pastureName" />
+            <el-table-column label="合同编号" min-width="120px" align="center" prop="contractCode" />
+            <el-table-column label="合同状态" min-width="110px" align="center" prop="statued" />
+            <el-table-column label="供应商" min-width="120px" align="center" prop="providerName" />
+            <el-table-column label="合同开始日期" sortable min-width="120px" align="center" prop="startTime" />
+            <el-table-column label="合同截止日期" sortable min-width="120px" align="center" prop="stopTime" />
+            <el-table-column label="零库存" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.isZeroStock == 0">否</span>
+                <span v-if="scope.row.isZeroStock == 1">是</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="录入人" min-width="120px" align="center" prop="creatorMan" />
+            <el-table-column label="录入时间" sortable min-width="120px" align="center" prop="creatorTime" />
+            <el-table-column label="审批时间" sortable min-width="120px" align="center" prop="SHdateTime" />
+            <el-table-column label="操作" align="center" width="350px" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="{row}">
+                <el-button v-if="tab1.contractManagement.isContractSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+                <el-button v-if="tab1.contractManagement.isContractSee" type="primary" style="width:70px;" size="mini" @click="handleTab1DetailsSpareParts(row)">备件明细</el-button>
+                <el-button v-if="tab1.contractManagement.isContractSee" type="primary" style="width:70px;" size="mini" @click="handleTab1ChangeRecord(row)">变更记录</el-button>
+                <el-button v-if="tab1.contractManagement.isContractChange && (row.statued == '正常' || row.statued == '已过期')" :disabled="parseInt(row.pastureId) == 18 && parseInt(isGroupAdministrator) !== 18" type="warning" size="mini" @click="handleTab1Change(row)">变更</el-button>
+              </template>
+              <!-- //parseInt(row.pastureId) == 18 && parseInt(isGroupAdministrator) == 18 -->
+            </el-table-column>
+          </el-table>
+          <pagination v-show="tab1.contractManagement.total>0" :total="tab1.contractManagement.total" :page.sync="tab1.contractManagement.getdataListParm.offset" :limit.sync="tab1.contractManagement.getdataListParm.pagecount" @pagination="getTab1List" />
+        </div>
+        <div v-if="isDetailsSpareParts" class="DetailsSpareParts">
+          <div class="title" style="height: 30px;">
+            <b style="font-size: 20px;float: left;">备件明细</b>
+            <a style="float: right;font-weight: 600;font-size: 20px;" @click="handleTab1goBack()">&lt;返回</a>
+          </div>
+          <div class="filter-container">
+            <el-input v-model="tab1.detailsSpareParts.getdataListParm.parammaps.partCode" placeholder="备件编号" style="width: 140px;" class="filter-item" />
+            <el-input v-model="tab1.detailsSpareParts.getdataListParm.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
+            <el-input v-model="tab1.detailsSpareParts.getdataListParm.parammaps.specification" placeholder="备件规格" style="width: 140px;" class="filter-item" />
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab1Filter2">搜索</el-button>
+            <!-- <el-button v-waves class="filter-item" type="success" icon="el-icon-edit" @click="change_enabled">启用</el-button> -->
+            <el-button v-if="isContractJinyong"  v-waves class="filter-item" type="danger" icon="el-icon-edit" @click="change_no">禁用</el-button>
+          </div>
+          <div class="filter-container">
+            <el-button v-if="tab1.contractManagement.isContractAdd && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Create2">新增</el-button>
+            <el-button v-if="tab1.contractManagement.isContractChange && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Change2">变更</el-button>
+            <el-button v-if="tab1.contractManagement.isContractExport" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab1Export2">导出</el-button>
+            <el-button v-if="tab1.contractManagement.isContractUplaod" class="filter-item" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
+          </div>
+          <el-table
+            :key="tab1.detailsSpareParts.tableKey"
+            v-loading="tab1.detailsSpareParts.listLoading"
+            element-loading-text="给我一点时间"
+            :data="tab1.detailsSpareParts.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            @sort-change="tableSort1"
+            @selection-change="handleSelectionChange"
+            :max-height="myHeight"
+          >
+            <el-table-column type="selection"  width="55" />
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (tab1.detailsSpareParts.pageNum-1) * tab1.detailsSpareParts.pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件编号" min-width="120px" align="center" prop="partCode" />
+            <el-table-column label="备件名称" min-width="120px" align="center" prop="partName" />
+            <el-table-column label="备件规格" min-width="120px" align="center" prop="specification" />
+            <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
+              <template slot-scope="scope">
+                <el-popover placement="right" title="" trigger="hover">
+                  <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                  <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                </el-popover>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件品牌" min-width="120px" align="center" prop="brand" />
+            <el-table-column label="计量单位" min-width="120px" align="center" prop="unit" />
+            <el-table-column label="计划量" sortable min-width="120px" align="center" prop="planAmount" />
+            <el-table-column label="单价" sortable min-width="120px" align="center" prop="price" />
+            <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
+            <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" />
+            <el-table-column label="备注" sortable min-width="120px" align="center" prop="remark" />
+          </el-table>
+          <pagination v-show="tab1.detailsSpareParts.total>0" :total="tab1.detailsSpareParts.total" :page.sync="tab1.detailsSpareParts.getdataListParm.offset" :limit.sync="tab1.detailsSpareParts.getdataListParm.pagecount" @pagination="getTab1List2" />
+        </div>
+
+        <div v-if="isChangeRecord" class="ChangeRecord">
+          <div class="title" style="height: 30px;">
+            <b style="font-size: 20px;float: left;">变更记录</b>
+            <a style="float: right;font-weight: 600;font-size: 20px;" @click="handleTab1goBack2()">&lt;返回</a>
+          </div>
+          <div class="filter-container">
+            <el-input v-model="tab1.changeRecord.getdataListParm.parammaps.contractCode" placeholder="流水编号" style="width: 140px;" class="filter-item" />
+            <el-select v-model="tab1.changeRecord.getdataListParm.parammaps.SHtype" clearable placeholder="变更类型" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in changeTypeList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-select v-model="tab1.changeRecord.getdataListParm.parammaps.stuteSH" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in auditStatusList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-date-picker ref="tab1InputDatetime3" v-model="tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab1Filter3">搜索</el-button>
+          </div>
+          <div class="filter-container">
+            <el-radio-group v-model="tab1.changeRecord.radioAll" style="margin-top:-9px" @change="changeChangeRecordAll()">
+              <el-radio-button label="全部" />
+              <el-radio-button label="待处理" />
+              <el-radio-button label="已处理" />
+            </el-radio-group>
+          </div>
+          <el-table
+            :key="tab1.changeRecord.tableKey"
+            v-loading="tab1.changeRecord.listLoading"
+            element-loading-text="给我一点时间"
+            :data="tab1.changeRecord.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            :max-height="myHeight"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (tab1.changeRecord.pageNum-1) * tab1.changeRecord.pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="流水编号" min-width="120px" align="center" prop="contractCode" />
+            <el-table-column label="变更类型" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.SHtype == 0">新增合同</span>
+                <span v-if="scope.row.SHtype == 1">新增备件</span>
+                <span v-if="scope.row.SHtype == 2">变更备件</span>
+                <span v-if="scope.row.SHtype == 3">合同变更</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="录入人" min-width="120px" align="center" prop="creatorMan" />
+            <el-table-column label="录入时间" sortable min-width="120px" align="center" prop="creatorTime" />
+            <el-table-column label="审核状态" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.SHStatus == 2 || scope.row.SHStatus == 3 || scope.row.SHStatus == 5">审核中</span>
+                <span v-if="scope.row.SHStatus == 4 || scope.row.SHStatus == 6 || scope.row.SHStatus == 8">未通过</span>
+                <span v-if="scope.row.SHStatus == 7">通过</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center" width="350px" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="{row}">
+                <el-button type="primary" size="mini" @click="handleTab1See3(row)">查看</el-button>
+                <el-button v-if="tab1.changeRecord.isContractDelete && (row.SHStatus == 4 || row.SHStatus == 6 || row.SHStatus == 8)" type="success" size="mini" @click="handleTab1Update3(row)">编辑</el-button>
+                <el-button v-if="tab1.changeRecord.isContractExamineZG && row.SHStatus == 2" type="success" style="display:inline-block" size="mini" @click="handleTab1Examine(row)">审核1</el-button>
+                <el-button v-else type="success" style="display:none" size="mini" @click="handleTab1Examine(row)">审核1</el-button>
+                <!-- 设备助理审核 -->
+                <!-- <el-button v-if="tab1.changeRecord.isContractExamineZL && row.SHStatus == 3" type="success" style="display:inline-block" size="mini" @click="handleExamine2(row)">审核2</el-button>
+                <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine2(row)">审核2</el-button> -->
+                <!-- 设备中心审核 -->
+                <el-button v-if="tab1.changeRecord.isContractExamineZX && row.SHStatus == 5" type="success" style="display:inline-block" size="mini" @click="handleTab1Examine3(row)">审核2</el-button>
+                <el-button v-else type="success" style="display:none" size="mini" @click="handleTab1Examine3(row)">审核2</el-button>
+                <el-button v-if="tab1.changeRecord.isContractDelete && (row.SHStatus == 4 || row.SHStatus == 6 || row.SHStatus == 8) " type="danger" size="mini" @click="handleTab1Delete3(row)">删除</el-button>
+                <el-button v-else style="display:none" type="danger" size="mini" @click="handleTab1Delete3(row)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination v-show="tab1.changeRecord.total>0" :total="tab1.changeRecord.total" :page.sync="tab1.changeRecord.getdataListParm.offset" :limit.sync="tab1.changeRecord.getdataListParm.pagecount" @pagination="getTab1List3" />
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="合同明细" name="second">
+        <div class="filter-container">
+          <el-select v-model="tab2.getdataListParm.parammaps.pastureName" placeholder="牧场" style="width:120px" class="filter-item">
+            <el-option v-for="item in findAllPastureList2" :key="item.id" :label="item.name" :value="item.name" />
+          </el-select>
+          <el-input v-model="tab2.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 140px;" class="filter-item" />
+          <el-select v-model="tab2.getdataListParm.parammaps.statue" clearable placeholder="合同状态" class="filter-item" style="width: 120px;">
+            <el-option v-for="item in contractStatusList" :key="item.id" :label="item.name" :value="item.name" />
+          </el-select>
+          <el-select v-model="tab2.getdataListParm.parammaps.isZeroStock" clearable placeholder="是否零库存" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in isZeroInventoryList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+          <el-input v-model="tab2.getdataListParm.parammaps.partCode" placeholder="备件编号" style="width: 140px;" class="filter-item" />
+          <el-input v-model="tab2.getdataListParm.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
+          <el-select v-model="tab2.getdataListParm.parammaps.providerName" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
+            <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.name" />
+          </el-select>
+          <el-date-picker ref="inputDatetime" v-model="tab2.getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+          <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleTab2Filter">搜索</el-button>
+          <el-button v-if="tab1.contractManagement.isContractExport" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab2Export">导出</el-button>
+        </div>
+        <el-table
+          :key="tab2.tableKey"
+          v-loading="tab2.listLoading"
+          element-loading-text="给我一点时间"
+          :data="tab2.list"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+          @sort-change="tableSort2"
+          :max-height="myHeight"
+        >
+          <el-table-column label="序号" align="center" type="index" width="50px">
+            <template slot-scope="scope">
+              <span>{{ scope.$index + (tab2.pageNum-1) * tab2.pageSize + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="牧场" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.pastureName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="合同编号" min-width="130px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.contractCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="合同状态" min-width="100px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.statue }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="供应商" min-width="120px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.providerName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="合同开始日期" sortable prop="startTime" min-width="110px" align="center" />
+          <el-table-column label="合同截止日期" sortable prop="stopTime" min-width="110px" align="center" />
+          <el-table-column label="零库存" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.isZeroStock == 0">否</span>
+              <span v-if="scope.row.isZeroStock == 1">是</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件编号" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brand }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计划量" sortable prop="planAmount" min-width="110px" align="center" />
+          <el-table-column label="单价" sortable prop="price" min-width="110px" align="center" />
+          <el-table-column label="备注" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.remark }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入人" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.creatorMan }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入日期" sortable prop="creatorTime" min-width="110px" align="center" />
+        </el-table>
+        <pagination v-show="tab2.total>0" :total="tab2.total" :page.sync="tab2.getdataListParm.offset" :limit.sync="tab2.getdataListParm.pagecount" @pagination="getTab2List" />
+      </el-tab-pane>
+    </el-tabs>
+    <!-- 合同管理新增/查看/变更 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.contractManagement.create.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div class="app-add">
+        <el-form ref="createTemp" :rules="rules" :model="tab1.contractManagement.create.temp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="合同编号:" prop="contractCode">
+                <el-input ref="contractCode" v-model="tab1.contractManagement.create.temp.contractCode" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureId">
+                <el-select v-model="tab1.contractManagement.create.temp.pastureId" placeholder="牧场" class="filter-item" style="width:100%;" :disabled="disabled">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="供应商:" prop="providerName">
+                <el-autocomplete v-model="tab1.contractManagement.create.temp.providerName" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled || dialogStatus==='change'" value-key="name" class="inline-input" :fetch-suggestions="providerSearch" placeholder="请输入供应商名称或供应商编号" style="width:100%;" @focus="handleFocusProvider" @blur="handleBlurProvider" @select="handleSelectProvider" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="开始日期:" prop="startTime">
+                <el-date-picker v-model="tab1.contractManagement.create.temp.startTime" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled || dialogStatus==='change'" type="date" placeholder="开始日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTime" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="截止日期:" prop="stopTime">
+                <el-date-picker v-model="tab1.contractManagement.create.temp.stopTime" style="width:100%;" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled" type="date" :clearable="false" placeholder="截止日期" :picker-options="pickerOptions2" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTime" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus=='create'" :span="8">
+              <el-form-item label="合同状态:" prop="statue">
+                <el-select v-model="tab1.contractManagement.create.temp.statue" clearable placeholder="合同状态" class="filter-item" style="width: 100%;" disabled>
+                  <el-option v-for="item in contractStatus2List" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus=='change' || dialogStatus=='see'" :span="8">
+              <el-form-item label="合同状态:" prop="statued">
+                <el-input ref="contractCode" v-model="tab1.contractManagement.create.temp.statued" placeholder="合同状态" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="零库存:" prop="isZeroStock">
+                <el-radio-group v-model="tab1.contractManagement.create.temp.isZeroStock" :disabled="dialogStatus==='see' || tab1.contractManagement.isDisabled || dialogStatus==='change'" @change="changeIsZero">
+                  <el-radio v-model="tab1.contractManagement.create.temp.isZeroStock" :label="1">是</el-radio>
+                  <el-radio v-model="tab1.contractManagement.create.temp.isZeroStock" :label="0">否</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="录入人:" prop="creatorId">
+                <el-select ref="creatorId" v-model="tab1.contractManagement.create.temp.creatorId" :disabled="tab1.contractManagement.isDisabled || dialogStatus==='see' || dialogStatus==='change'" placeholder="录入人" class="filter-item" style="width:100%;" @change="changeCreatorMan">
+                  <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="录入日期:" prop="creatorTime">
+                <el-date-picker v-model="tab1.contractManagement.create.temp.creatorTime" :disabled="disabled" type="date" :picker-options="pickerOptions3" placeholder="录入日期" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="备注:" prop="remark">
+                <el-input ref="remark" v-model="tab1.contractManagement.create.temp.remark" placeholder="备注" :disabled="tab1.contractManagement.isDisabled || dialogStatus==='see' || dialogStatus==='change'" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus !== 'see'" :span="8">
+              <el-form-item label="同步牧场:" prop="synchronousPasture">
+                <el-select v-model="tab1.contractManagement.create.temp.synchronousPasture" multiple collapse-tags placeholder="同步牧场" :disabled="isGroupAdministrator !== '18'">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col v-else :span="16">
+              <el-form-item label="同步牧场:" prop="pastureName2">
+                <el-input v-model="tab1.contractManagement.create.temp.pastureName2" type="textarea" :rows="2" placeholder="同步牧场" :disabled="dialogStatus=='see'" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- <el-row v-if="dialogStatus == 'see'">
+            <el-col>
+              <el-form-item label="流程进度1" />
+              <el-steps :active="tab1.contractManagement.create.temp.active" align-center finish-status="success">
+                <el-step
+                  v-for="(item,index) in tab1.contractManagement.create.temp.activeList"
+                  :key="index"
+                  :title="item.title"
+                  :status="item.status"
+                >
+                  <template slot="description">
+                    <div class="step-row">
+                      <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                      <div>{{ item.reason }}</div>
+                    </div>
+                  </template>
+                </el-step>
+              </el-steps>
+            </el-col>
+          </el-row> -->
+        </el-form>
+        <div slot="footer" class="dialog-footer" style="bottom:5px">
+          <el-button v-if="dialogStatus =='change'" type="primary" @click="terminationData()">终止合同</el-button>
+          <el-button v-if="dialogStatus !=='see'" type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():changeData()">保存并关闭</el-button>
+          <el-button @click="tab1.contractManagement.create.dialogFormVisible = false;getTab1List();tab1.contractManagement.create.temp.providerName=''">取消并关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <!-- 备件明细新增/变更 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.detailsSpareParts.create.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div v-if="tab1.detailsSpareParts.updateList.SHtype !== 0 && tab1.detailsSpareParts.updateList.SHtype !== 3" class="app-add">
+        <el-form ref="createTemp2" :rules="rules" :model="tab1.detailsSpareParts.create.temp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="备件:" prop="partCode">
+                <el-autocomplete v-model="tab1.detailsSpareParts.partCode" value-key="name1" class="inline-input" :fetch-suggestions="sparePartSearch" placeholder="请输入备件编号或备件名称或备件规格" style="width:550px" @select="handleSelectSparePart">
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
+                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
+                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div v-if="dialogStatus=='tab1create2'" class="filter-container" style="float: right;">
+          <el-button v-waves class="filter-item" type="info" icon="el-icon-tickets" @click="handleTab1DownloadTemp2">模板</el-button>
+          <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
+            <el-button v-waves :disabled="tab1.detailsSpareParts.isDisabledImport" class="filter-item" type="warning" icon="el-icon-download">导入</el-button>
+          </el-upload>
+        </div>
+        <el-table
+          :key="tab1.detailsSpareParts.tableKeyAdd"
+          v-loading="tab1.detailsSpareParts.listLoadingAdd"
+          element-loading-text="给我一点时间"
+          :data="tab1.detailsSpareParts.listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+        >
+          <el-table-column label="序号" align="center" type="index" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" min-width="120px" align="center">
+            <template slot-scope="scope">
+              <el-autocomplete v-model="scope.row.brand" value-key="brandName" class="inline-input" :fetch-suggestions="brandSearch" placeholder="请输入品牌" style="width:100%;" @focus="handleFocusBrand( scope.row)" @blur="handleBlurBrand(scope.row)" @select="(value)=> {handleSelectBrand(value, scope.row)}" />
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计划量" min-width="70px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="planAmount">
+                  <el-input ref="planAmount" v-model="scope.row.planAmount" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" min-width="80px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.price" />
+            </template>
+          </el-table-column>
+          <el-table-column label="使用周期" min-width="110px" align="center" valign="middle">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.lifeCycle" />
+              </template>
+            </el-table-column>
+            <el-table-column label="合同差异项" min-width="110px" align="center" valign="middle">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.contractVarianceItem" />
+              </template>
+            </el-table-column>
+          <el-table-column label="备注" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.remark" type="textarea" placeholder="备注" autosize maxlength="100" show-word-limit />
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" :disabled="isokDisable" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div v-if="tab1.detailsSpareParts.updateList.SHtype == 0 || tab1.detailsSpareParts.updateList.SHtype == 3" class="app-add">
+        <el-form ref="createTemp2" :rules="rules" :model="tab1.detailsSpareParts.create.temp" label-position="right" label-width="130px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureName">
+                <el-input ref="pastureName" v-model="tab1.detailsSpareParts.create.temp.pastureName" placeholder="牧场" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="合同编号:" prop="contractCode">
+                <el-input ref="contractCode" v-model="tab1.detailsSpareParts.create.temp.contractCode" placeholder="合同编号" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="供应商:" prop="providerName">
+                <el-input ref="providerName" v-model="tab1.detailsSpareParts.create.temp.providerName" placeholder="合同编号" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="开始日期:" prop="startTime">
+                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.startTime" :disabled="tab1.detailsSpareParts.create.temp.SHtype == 3" type="date" placeholder="开始日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus == 'tab1Update2' && tab1.detailsSpareParts.updateList.SHtype == 0" :span="8">
+              <el-form-item label="截止日期:" prop="stopTime">
+                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.stopTime" type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus == 'tab1Update2' && tab1.detailsSpareParts.updateList.SHtype !== 0" :span="8">
+              <el-form-item label="截止日期后:" prop="stopTimeHis">
+                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.stopTimeHis" type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="pickerOptions2" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="合同状态:" prop="statued">
+                <span>{{ tab1.detailsSpareParts.create.temp.statued }}</span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="零库存:" prop="isZeroStock">
+                <el-radio-group v-model="tab1.detailsSpareParts.create.temp.isZeroStock" :disabled="tab1.detailsSpareParts.create.temp.SHtype == 3">
+                  <el-radio v-model="tab1.detailsSpareParts.create.temp.isZeroStock" :label="1">是</el-radio>
+                  <el-radio v-model="tab1.detailsSpareParts.create.temp.isZeroStock" :label="0">否</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="录入人:" prop="creatorMan">
+                <el-input ref="creatorMan" v-model="tab1.detailsSpareParts.create.temp.creatorMan" placeholder="录入人" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="录入日期:" prop="creatorTime">
+                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.creatorTime" :disabled="tab1.detailsSpareParts.create.temp.SHtype == 3 || dialogStatus=='tab1Update2' " type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="备注:" prop="remark">
+                <el-input ref="remark" v-model="tab1.detailsSpareParts.create.temp.remark" placeholder="备注" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="tab1.detailsSpareParts.create.temp.SHtype !== 0 && dialogStatus !=='tab1Update2'" :span="8">
+              <el-form-item label="变更后截止日期:" prop="stopTimeHis">
+                <el-date-picker v-model="tab1.detailsSpareParts.create.temp.stopTimeHis" :disabled="tab1.detailsSpareParts.create.temp.SHtype !== 3" type="date" placeholder="截止日期" :clearable="false" style="width:100%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :picker-options="pickerOptions2" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
+        <el-button v-if="dialogStatus=='tab1create2'" type="primary" :disabled="isokDisable" @click="add_dialog_save2()">保存并关闭</el-button>
+        <el-button v-if="dialogStatus=='tab1change2'" type="primary" :disabled="isokDisable" @click="changeData2()">保存并关闭</el-button>
+        <el-button v-if="dialogStatus=='tab1Update2'" type="primary" :disabled="isokDisable" @click="edit_dialog_save2()">保存并关闭</el-button>
+        <el-button @click="tab1.detailsSpareParts.create.dialogFormVisible = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 变更记录查看 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.changeRecord.see.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div class="app-see">
+        <div class="app-contentcard">
+          <el-form ref="seeTemp" :rules="rules" :model="tab1.changeRecord.see.temp" label-position="right" label-width="128px" style="width: 90%;margin:0 auto;">
+            <div v-if="tab1.changeRecord.see.temp.SHtype == 0 || tab1.changeRecord.see.temp.SHtype == 3">
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="牧场:" prop="pastureName">
+                    <span> {{ tab1.changeRecord.see.temp.pastureName }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="合同编号:" prop="contractCode">
+                    <span> {{ tab1.changeRecord.see.temp.contractCode }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="供应商:" prop="providerName">
+                    <span> {{ tab1.changeRecord.see.temp.providerName }} </span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="开始日期:" prop="startTime">
+                    <span> {{ tab1.changeRecord.see.temp.startTime }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="dialogStatus !== 'tab1See2'" :span="8">
+                  <el-form-item label="截止日期:" prop="stopTime">
+                    <span> {{ tab1.changeRecord.see.temp.stopTime }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="dialogStatus == 'tab1See2' && tab1.changeRecord.see.temp.SHtype !== 3 && tab1.changeRecord.see.temp.SHtype !== 0" :span="8">
+                  <el-form-item label="截止日期:" prop="stopTimeHis">
+                    <span> {{ tab1.changeRecord.see.temp.stopTimeHis }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="dialogStatus == 'tab1See2' && tab1.changeRecord.see.temp.SHtype == 3" :span="8">
+                  <el-form-item label="截止日期:" prop="stopTime">
+                    <span> {{ tab1.changeRecord.see.temp.stopTime }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="dialogStatus == 'tab1See2' && tab1.changeRecord.see.temp.SHtype == 0" :span="8">
+                  <el-form-item label="截止日期:" prop="stopTime">
+                    <span> {{ tab1.changeRecord.see.temp.stopTime }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="合同状态:" prop="statued">
+                    <span>{{ tab1.changeRecord.see.temp.statued }}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="零库存:" prop="isZeroStock">
+                    <el-radio-group v-model="tab1.changeRecord.see.temp.isZeroStock" disabled>
+                      <el-radio v-model="tab1.changeRecord.see.temp.isZeroStock" :label="1">是</el-radio>
+                      <el-radio v-model="tab1.changeRecord.see.temp.isZeroStock" :label="0">否</el-radio>
+                    </el-radio-group>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="录入人:" prop="creatorMan">
+                    <span> {{ tab1.changeRecord.see.temp.creatorMan }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="录入日期:" prop="creatorTime">
+                    <span> {{ tab1.changeRecord.see.temp.creatorTime }} </span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="备注:" prop="remark">
+                    <span> {{ tab1.changeRecord.see.temp.remark }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="共享牧场:" prop="pastureNamesOld">
+                    <span> {{ tab1.changeRecord.see.temp.pastureNamesOld }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="tab1.changeRecord.see.temp.SHtype == 3" :span="8">
+                  <el-form-item label="变更后截止日期:" prop="stopTimeHis">
+                    <span> {{ tab1.changeRecord.see.temp.stopTimeHis }} </span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="变更后共享牧场:" prop="pastureNamesNow">
+                    <span> {{ tab1.changeRecord.see.temp.pastureNamesNow }} </span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+            <div v-if="tab1.changeRecord.see.temp.SHtype == 1 || tab1.changeRecord.see.temp.SHtype == 2">
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="流水编号:" prop="contractCode">
+                    <span> {{ tab1.changeRecord.see.temp.contractCode }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="录入人:" prop="creatorMan">
+                    <span> {{ tab1.changeRecord.see.temp.creatorMan }} </span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="录入日期:" prop="creatorTime">
+                    <span> {{ tab1.changeRecord.see.temp.creatorTime }} </span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
+          </el-form>
+          <div v-if="tab1.changeRecord.see.temp.SHtype == 1">
+            <el-table
+              :key="tab1.changeRecord.see.tableKey"
+              element-loading-text="给我一点时间"
+              :data="tab1.changeRecord.see.list"
+              border
+              fit
+              highlight-current-row
+              style="width: 100%;"
+              :row-style="rowStyle"
+              :cell-style="cellStyle"
+              class="elTable table-fixed"
+            >
+              <el-table-column label="序号" align="center" type="index" width="50px">
+                <template slot-scope="scope">
+                  <span>{{ scope.$index + (tab1.changeRecord.see.pageNum-1) * tab1.changeRecord.see.pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件编号" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件名称" min-width="130px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件规格" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.specification }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
+                <template slot-scope="scope">
+                  <el-popover placement="right" title="" trigger="hover">
+                    <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                    <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                  </el-popover>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件品牌" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.brand }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="计量单位" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.unit }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="计划量" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.planAmount }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="单价" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.price }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备注" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.remark }}</span>
+                </template>
+              </el-table-column>
+            </el-table>
+            <pagination v-show="tab1.changeRecord.see.total>0" :total="tab1.changeRecord.see.total" :page.sync="tab1.changeRecord.see.getdataListParm.offset" :limit.sync="tab1.changeRecord.see.getdataListParm.pagecount" @pagination="getTab1List3See" />
+          </div>
+          <div v-if="tab1.changeRecord.see.temp.SHtype == 2">
+            <el-table
+              :key="tab1.changeRecord.see.tableKey"
+              element-loading-text="给我一点时间"
+              :data="tab1.changeRecord.see.list"
+              border
+              fit
+              highlight-current-row
+              style="width: 100%;"
+              :row-style="rowStyle"
+              :cell-style="cellStyle"
+              class="elTable table-fixed"
+            >
+              <el-table-column label="序号" align="center" type="index" width="50px">
+                <template slot-scope="scope">
+                  <span>{{ scope.$index + (tab1.changeRecord.see.pageNum-1) * tab1.changeRecord.see.pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件编号" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件名称" min-width="130px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件规格" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.specification }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
+                <template slot-scope="scope">
+                  <el-popover placement="right" title="" trigger="hover">
+                    <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                    <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                  </el-popover>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件品牌" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.brandhis }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="变更后品牌" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.brand }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="计量单位" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.unit }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="计划量" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.planAmounthis }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="变更后计划量" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.planAmount }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="单价" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.pricehis }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="变更后单价" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.price }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备注" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.remark }}</span>
+                </template>
+              </el-table-column>
+            </el-table>
+            <pagination v-show="tab1.changeRecord.see.total>0" :total="tab1.changeRecord.see.total" :page.sync="tab1.changeRecord.see.getdataListParm.offset" :limit.sync="tab1.changeRecord.see.getdataListParm.pagecount" @pagination="getTab1List3See" />
+          </div>
+          <el-form ref="seeTemp" :rules="rules" :model="tab1.changeRecord.see.temp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+            <el-row>
+              <el-col>
+                <el-form-item label="流程进度" />
+                <el-steps :active="tab1.changeRecord.see.active" align-center finish-status="success">
+                  <el-step
+                    v-for="(item,index) in tab1.changeRecord.see.activeList"
+                    :key="index"
+                    :title="item.title"
+                    :status="item.status"
+                  >
+                    <template slot="description">
+                      <div class="step-row">
+                        <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                        <div>{{ item.reason }}</div>
+                      </div>
+                    </template>
+                  </el-step>
+                </el-steps>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="操作:">
+                  <!-- 设备主管审核 -->
+                  <el-button v-if="tab1.changeRecord.isContractExamineZG &&tab1.changeRecord.see.temp.SHStatus == 2" type="success" style="display:inline-block" @click="handleTab1Examine()">审核1</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleTab1Examine()">审核1</el-button>
+                  <!-- 设备助理审核 -->
+                  <!-- <el-button v-if="isContractExamineZL && seeTemp.SHStatus == 3" type="success" style="display:inline-block" @click="handleExamine2()">审核2</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine2()">审核2</el-button> -->
+
+                  <!-- 设备中心审核 -->
+                  <el-button v-if="tab1.changeRecord.isContractExamineZX && tab1.changeRecord.see.temp.SHStatus == 5" type="success" style="display:inline-block" @click="handleTab1Examine3()">审核2</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleTab1Examine3()">审核2</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
+          <el-button @click="tab1.changeRecord.see.dialogFormVisible = false">关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 变更记录审核 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="tab1.changeRecord.examine.dialogFormVisible" :close-on-click-modal="false" width="30%">
+      <div class="app-examine">
+        <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
+        <el-form ref="examineTemp" :rules="rules" :model="tab1.changeRecord.examine.temp" label-position="right" style="width: 50%;margin:0 auto;">
+          <el-row style="width:88%;height:150px;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="tab1.changeRecord.examine.temp.statueSH" @change="changeExamineStatue">
+                  <el-radio :label="1" checked>通过</el-radio>
+                  <el-radio :label="2">不通过</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="tab1.changeRecord.examine.isReason" :span="20">
+              <el-input v-model="tab1.changeRecord.examine.temp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="dialogStatus==='tab1examine'" type="primary" :disabled="isokDisable" @keyup.enter.native="createExamineData()" @click="createExamineData()">确认</el-button>
+        <!-- <el-button v-if="dialogStatus==='tab1examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button> -->
+        <el-button v-if="dialogStatus==='tab1examine3'" type="primary" :disabled="isokDisable" @keyup.enter.native="createExamineData3()" @click="createExamineData3()">确认</el-button>
+        <el-button @click="tab1.changeRecord.examine.dialogFormVisible = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// 引入
+import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess,postJson } from '@/api/common'
+import waves from '@/directive/waves'
+import { parseTime, json2excel, sortChange } from '@/utils/index.js'
+import Pagination from '@/components/Pagination'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+import { MessageBox } from 'element-ui'
+export default {
+  inject: ['reload'],
+  name: 'ContractManagement',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      selectList:[],
+      contractCodese:'',
+      isGroupAdministrator: Cookies.get('pastureid'),
+      isEmployeid: Cookies.get('employeid'),
+      isPercentage: false,
+      percentage: 1,
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      buttons: [],
+      activeName: 'first',
+      contractStatusList: [{ id: '0', name: '正常' }, { id: '1', name: '已过期' }, { id: '2', name: '终止' }, { id: '3', name: '新增未通过' }],
+      contractStatus2List: [{ id: '1', name: '正常' }, { id: '0', name: '终止' }],
+      auditStatusList: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }], // 审核状态
+      changeTypeList: [{ id: '0', name: '新增合同' }, { id: '1', name: '新增备件' }, { id: '2', name: '变更备件' }, { id: '3', name: '合同变更' }],
+      isZeroInventoryList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 是否零库存
+      findAllProvider: [], findAllAssetType: [], findAllPasture: [], findAllPastureList2: [], findAllDepart: [], findAllEmploye: [], findAllCategory: [],
+      requestParams: [
+        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
+        { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllPastureForContract', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': 18 }},
+        { name: 'findAllDepart', offset: 0, pagecount: 0, params: [] },
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': 18 }},
+        { name: 'findAllCategory', offset: 0, pagecount: 0, params: [] }
+      ],
+      isokDisable: false,
+      disabled: true,
+      rules: {},
+      textMap: {
+        create: '新增合同',
+        see: '查看详情',
+        change: '变更合同',
+        tab1create2: '新增备件',
+        tab1change2: '变更备件',
+        tab1examine: '审核',
+        tab1examine2: '审核2',
+        tab1examine3: '审核2',
+        tab1See2: '查看',
+        tab1Update2: '编辑'
+      },
+      dialogStatus: '',
+      isContractManagement: true, // 备件合同
+      isDetailsSpareParts: false, // 备件明细
+      isChangeRecord: false, // 变更记录
+      tab1: {
+        // 合同管理1
+        contractManagement: {
+          radioAll: '全部',
+          isContractAdd: [],
+          isContractExport: [],
+          isContractUplaod: [],
+          isContractSee: [],
+          isContractChange: [],
+          isDisabled: false,
+          tableKey: 0,
+          listLoading: false,
+          total: 0,
+          list: [],
+          getdataListParm: {
+            name: 'providerPactListV2',
+            page: 1,
+            offset: 1,
+            pagecount: 50,
+            returntype: 'Map',
+            parammaps: {
+              loginid: Cookies.get('employeid'),
+              pastureName: Cookies.get('pasturename'),
+              contractCode: '',
+              statue: '',
+              stuteSH: '',
+              providerName: '',
+              tab1InputDatetime1: '',
+              startTime: '',
+              stopTime: '',
+              tab1InputDatetime2: '',
+              SHdateTimeF: '',
+              SHdateTimeE: '',
+              SHnums: 2
+            }
+          },
+          getParmCreateNumber: {
+            name: 'autoCreatCode',
+            page: 0,
+            offset: 0,
+            pagecount: 0,
+            returntype: 'Map',
+            parammaps: {
+              pastureId: Cookies.get('pastureid'),
+              codeType: 'HT'
+            }
+          },
+          create: {
+            dialogFormVisible: false,
+            temp: { contractCode: '', pastureId: Cookies.get('pastureid'), providerName: '', startTime: '', stopTime: '', statue: '', isZeroStock: 0, creatorId: Cookies.get('employeid'), creatorMan: Cookies.get('employename'), creatorTime: parseTime(new Date(), '{y}-{m}-{d}'), activeList: [], active: 3, workflowNote: '', synchronousPasture: [], synchronousPastureList: [] },
+            changeEchoParm: { name: 'getBigcontractPId', page: 0, offset: 0, pagecount: 0, returntype: 'Map', parammaps: {}}
+          }
+        },
+        // 合同管理-备件明细
+        detailsSpareParts: {
+          tableKey: 1,
+          listLoading: false,
+          total: 0,
+          list: [],
+          getdataListParm: {
+            name: 'getcontratListBybigV2',
+            page: 1,
+            offset: 1,
+            pagecount: 50,
+            returntype: 'Map',
+            parammaps: {
+              specification: '',
+              partName: '',
+              partCode: '',
+              pastureId: '',
+              providerId: '',
+              stopTime: '',
+              flag: '',
+              isZeroStock: '',
+              statue: ''
+            }
+          },
+          partCode: '',
+          requestSparePart: {
+            name: '',
+            page: 1,
+            offset: 1,
+            pagecount: 20,
+            returntype: 'Map',
+            parammaps: {}
+          },
+          detailsList: [],
+          updateList: [],
+          tableKeyAdd: 0,
+          listLoadingAdd: false,
+          listAdd: [],
+          requestBrand: {
+            name: 'getBrandByPartCode',
+            page: 0,
+            offset: 0,
+            pagecount: 50,
+            returntype: 'Map',
+            parammaps: {}
+          },
+          BrandList: [],
+          create: {
+            dialogFormVisible: false,
+            temp: { contractCode: '', pastureId: Cookies.get('pastureid'), providerName: '', startTime: '', stopTime: '', statue: '', isZeroStock: 0, creatorId: Cookies.get('employeid'), creatorMan: Cookies.get('employename'), creatorTime: parseTime(new Date(), '{y}-{m}-{d}'), activeList: [], active: 3, workflowNote: '' }
+          },
+          isDisabledImport: true,
+          clearImportExcelParm: {
+            name: 'deletecontract_upload',
+            page: 0,
+            offset: 0,
+            pagecount: '',
+            returntype: 'Map',
+            parammaps: {
+              user: Cookies.get('name')
+            }
+          },
+          importExcelParm: {
+            name: 'getcontract_uploadlist',
+            page: 0,
+            offset: 0,
+            pagecount: '',
+            returntype: 'Map',
+            parammaps: {
+              user: Cookies.get('name')
+            }
+          }
+        },
+        // 变更记录
+        changeRecord: {
+          isContractExamineZG: [],
+          //  isContractExamineZL: [],
+          isContractExamineZX: [],
+          isContractDelete: [],
+          isStatueReason: false,
+          isReason: false,
+          radioAll: '全部',
+          tableKey: 2,
+          listLoading: false,
+          total: 0,
+          list: [],
+          getdataListParm: {
+            name: 'providerPactListSH',
+            page: 1,
+            offset: 1,
+            pagecount: 50,
+            returntype: 'Map',
+            parammaps: {
+              loginid: Cookies.get('employeid'),
+              contractCode: '',
+              tab1InputDatetime3: '',
+              startTime: '',
+              stopTime: '',
+              SHStatus: '',
+              SHtype: '',
+              pastureId: '',
+              providerId: '',
+              stopTime1: '',
+              flag: '',
+              isZeroStock: '',
+              statue: '',
+              SHnums: 2,
+              stuteSH: ''
+            }
+          },
+          see: {
+            dialogFormVisible: false,
+            activeList: [], active: 3,
+            temp: {},
+            tableKey: 0,
+            listLoading: false,
+            total: 0,
+            list: [],
+            getdataListParm: {
+              name: 'getcontratListBybigSH',
+              returntype: 'Map',
+              page: 0,
+              offset: 0,
+              pagecount: 50,
+              parammaps: {}
+            }
+          },
+          examine: {
+            dialogFormVisible: false,
+            temp: {
+              statueSH: 1
+            },
+            isReason: false
+          }
+        }
+      },
+      postDataPramas: {},
+      // 开始日期
+      // pickerOptions1: {
+      //   disabledDate: (time) => {
+      //     if (this.tab1.contractManagement.create.temp.stopTime !== '') {
+      //       return parseTime(time.getTime(), '{y}-{m}-{d}') > parseTime(Date.now(), '{y}-{m}-{d}') || parseTime(time.getTime(), '{y}-{m}-{d}') >= this.tab1.contractManagement.create.temp.stopTime
+      //     } else {
+      //       return time.getTime() > Date.now()
+      //     }
+      //   }
+      // },
+      // 截止日期
+      pickerOptions2: {
+        disabledDate: (time) => {
+          return parseTime(time.getTime(), '{y}-{m}-{d}') <= this.tab1.contractManagement.create.temp.startTime || parseTime(time.getTime(), '{y}-{m}-{d}') < parseTime(Date.now(), '{y}-{m}-{d}')
+        }
+      },
+      pickerOptions3: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()// 当天之前的时间可选
+        }
+      },
+      // 合同明细
+      tab2: {
+        tableKey: 0,
+        listLoading: false,
+        total: 0,
+        getdataListParm: {
+          name: 'contractDetailV2',
+          page: 1,
+          offset: 1,
+          pagecount: 50,
+          returntype: 'Map',
+          parammaps: {
+            inputDatetime: '',
+            providerName: '',
+            contractCode: '',
+            stopTime: '',
+            startTime: '',
+            statue: '',
+            partCode: '',
+            partName: '',
+            isZeroStock: '',
+            // pastureName: Cookies.get('pasturename')
+            pastureName: ''
+          }
+        },
+        list: []
+      },
+      UpdateDataParam: {},
+      UpdateDataParam2: {},
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'providerPactListV2', page: 1, offset: 1, getTotal: 'total3', pagecount: 50, returntype: 'Map',
+          parammaps: {}
+        }
+      },
+      myHeight:document.documentElement.clientHeight - 85- 250
+    }
+  },
+  computed: {
+    // 设置请求头
+    headers() {
+      return {
+        token: getToken()
+      }
+    },
+    uploadData() {
+      return {
+        name: 'insertcontract_upload',
+        importParams: '备件编号,备件名称,规格型号,计量单位,品牌,计划量,单价,备注',
+        sheetname: 'SheetJS'
+      }
+    },
+    // 设置上传地址
+    uploadExcelUrl() {
+      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
+    }
+  },
+  created() {
+    // this.keyupSubmit()
+    console.log(this.$route.query.contractCode)
+    this.get_select_list()
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+
+    this.getTab1List()
+    this.getPendingList()
+    if (this.$route.query.contractCode == undefined) {
+      this.tab1.contractManagement.getdataListParm.parammaps.contractCode = ''
+    } else {
+      this.tab1.contractManagement.getdataListParm.parammaps.contractCode = this.$route.query.contractCode
+    }
+  },
+
+  methods: {
+    tableSort1(column) {
+      sortChange(column, this.tab1.detailsSpareParts.list)
+    },
+    tableSort2(column) {
+      sortChange(column, this.tab2.list)
+    },
+    get_auto_buttons() {
+
+      // 新增
+      const ContractJinyong = 'customs:contract:jinyong'
+      const isContractJinyong = checkButtons(this.$store.state.user.buttons, ContractJinyong)
+      this.isContractJinyong = isContractJinyong
+
+      // 新增
+      const ContractAdd = 'customs:contract:add'
+      const isContractAdd = checkButtons(this.$store.state.user.buttons, ContractAdd)
+      this.tab1.contractManagement.isContractAdd = isContractAdd
+
+      // 查看
+      const ContractSee = 'customs:contract:see'
+      const isContractSee = checkButtons(this.$store.state.user.buttons, ContractSee)
+      this.tab1.contractManagement.isContractSee = isContractSee
+
+      // 办公室主任
+      const ContractExamineZG = 'customs:contract:examineZG'
+      const isContractExamineZG = checkButtons(this.$store.state.user.buttons, ContractExamineZG)
+      this.tab1.changeRecord.isContractExamineZG = isContractExamineZG
+      // 设备中心审核
+      const ContractExamineZX = 'customs:contract:examineZX'
+      const isContractExamineZX = checkButtons(this.$store.state.user.buttons, ContractExamineZX)
+      this.tab1.changeRecord.isContractExamineZX = isContractExamineZX
+      // 审核删除
+      const ContractDelete = 'customs:contract:delete'
+      const isContractDelete = checkButtons(this.$store.state.user.buttons, ContractDelete)
+      this.tab1.changeRecord.isContractDelete = isContractDelete
+      // 导出
+      const ContractExport = 'customs:contract:export'
+      const isContractExport = checkButtons(this.$store.state.user.buttons, ContractExport)
+      this.tab1.contractManagement.isContractExport = isContractExport
+      // SAP上传
+      const ContractUplaod = 'customs:contract:sapupload'
+      const isContractUplaod = checkButtons(this.$store.state.user.buttons, ContractUplaod)
+      this.tab1.contractManagement.isContractUplaod = isContractUplaod
+      // 变更
+      const ContractChange = 'customs:contract:change'
+      const isContractChange = checkButtons(this.$store.state.user.buttons, ContractChange)
+      this.tab1.contractManagement.isContractChange = isContractChange
+    },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllProvider = response.data.findAllProvider.list
+        this.findAllAssetType = response.data.findAllAssetType.list
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllPastureList2 = response.data.findAllPastureForContract.list
+        this.findAllDepart = response.data.findAllDepart.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+        this.findAllCategory = response.data.findAllCategory.list
+      })
+    },
+    handleClick() {
+      if (this.tab1.contractManagement.create.temp.activeName == 'first') {
+        console.log('点击了合同管理')
+        this.getTab1List()
+      } else {
+        console.log('点击了合同明细')
+        this.getTab2List()
+      }
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps.loginid = this.tab1.contractManagement.getdataListParm.parammaps.loginid
+      this.pending.getdataListParm.parammaps.pastureName = this.tab1.contractManagement.getdataListParm.parammaps.pastureName
+      this.pending.getdataListParm.parammaps.contractCode = this.tab1.contractManagement.getdataListParm.parammaps.contractCode
+      this.pending.getdataListParm.parammaps.statue = this.tab1.contractManagement.getdataListParm.parammaps.statue
+      this.pending.getdataListParm.parammaps.stuteSH = this.tab1.contractManagement.getdataListParm.parammaps.stuteSH
+      this.pending.getdataListParm.parammaps.providerName = this.tab1.contractManagement.getdataListParm.parammaps.providerName
+      this.pending.getdataListParm.parammaps.tab1InputDatetime1 = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1
+      this.pending.getdataListParm.parammaps.startTime = this.tab1.contractManagement.getdataListParm.parammaps.startTime
+      this.pending.getdataListParm.parammaps.stopTime = this.tab1.contractManagement.getdataListParm.parammaps.stopTime
+      this.pending.getdataListParm.parammaps.tab1InputDatetime2 = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2
+      this.pending.getdataListParm.parammaps.SHdateTimeF = this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeF
+      this.pending.getdataListParm.parammaps.SHdateTimeE = this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeE
+      this.pending.getdataListParm.parammaps.SHnums = 0
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    getTab1List() {
+      this.tab1.contractManagement.listLoading = true
+      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 !== '' && this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 !== null) {
+        this.tab1.contractManagement.getdataListParm.parammaps.startTime = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1[0]
+        this.tab1.contractManagement.getdataListParm.parammaps.stopTime = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1[1]
+      } else {
+        this.tab1.contractManagement.getdataListParm.parammaps.startTime = ''
+        this.tab1.contractManagement.getdataListParm.parammaps.stopTime = ''
+      }
+      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 !== '' && this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 !== null) {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeF = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2[0]
+        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeE = this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2[1]
+      } else {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeF = ''
+        this.tab1.contractManagement.getdataListParm.parammaps.SHdateTimeE = ''
+      }
+      GetDataByName(this.tab1.contractManagement.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.tab1.contractManagement.list = response.data.list
+          this.tab1.contractManagement.pageNum = response.data.pageNum
+          this.tab1.contractManagement.pageSize = response.data.pageSize
+        } else {
+          this.tab1.contractManagement.list = []
+        }
+        this.tab1.contractManagement.total = response.data.total
+        setTimeout(() => {
+          this.tab1.contractManagement.listLoading = false
+        }, 300)
+      })
+    },
+    handleTab1Filter() {
+      this.tab1.contractManagement.listLoading = true
+      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 == null) {
+        this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 = ''
+      }
+      if (this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 == null) {
+        this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime2 = ''
+      }
+      this.tab1.contractManagement.getdataListParm.offset = 1
+      this.getTab1List()
+      this.getPendingList()
+      if (this.tab1.contractManagement.radioAll == '全部') {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 2
+        this.getTab1List()
+      } else if (this.tab1.contractManagement.radioAll == '待处理') {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 0
+        this.getTab1List()
+      } else if (this.tab1.contractManagement.radioAll == '已处理') {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 1
+        this.getTab1List()
+      }
+    },
+    changeContractManagementAll() {
+      if (this.tab1.contractManagement.radioAll == '全部') {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 2
+      } else if (this.tab1.contractManagement.radioAll == '待处理') {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 0
+      } else if (this.tab1.contractManagement.radioAll == '已处理') {
+        this.tab1.contractManagement.getdataListParm.parammaps.SHnums = 1
+      }
+      this.tab1.contractManagement.getdataListParm.offset = 1
+      this.getTab1List()
+    },
+    changeTime(val) {
+      if (this.tab1.contractManagement.create.temp.stopTime !== '') {
+        if (this.tab1.contractManagement.create.temp.stopTime <= this.tab1.contractManagement.create.temp.startTime) {
+          this.tab1.contractManagement.create.temp.stopTime = ''
+          this.tab1.contractManagement.create.temp.statue = ''
+          this.tab1.contractManagement.create.temp.statueId = ''
+        } else {
+          if (parseTime(new Date(), '{y}-{m}-{d}') <= this.tab1.contractManagement.create.temp.stopTime) {
+            this.tab1.contractManagement.create.temp.statue = '1'
+            // this.tab1.contractManagement.create.temp.statueId = 1
+          } else {
+            this.tab1.contractManagement.create.temp.statue = '0'
+            // this.tab1.contractManagement.create.temp.statueId = 2
+          }
+        }
+      } else {
+        this.tab1.contractManagement.create.temp.statue = ''
+        this.tab1.contractManagement.create.temp.statueId = ''
+      }
+    },
+    changeIsZero(val) {
+      console.log(val)
+    },
+    providerSearch(queryString, cb) {
+      var returnList = this.findAllProvider
+      var results = queryString ? returnList.filter(this.createFilter(queryString)) : returnList
+      // 调用 callback 返回建议列表的数据
+      cb(results)
+    },
+    createFilter(queryString) {
+      return returnValue => {
+        return (
+          returnValue.name.toLowerCase().indexOf(queryString.toLowerCase()) >= 0
+        )
+      }
+    },
+    handleSelectProvider(item) {
+      this.$set(this.tab1.contractManagement.create.temp, 'providerId', item.id)
+      this.$set(this.tab1.contractManagement.create.temp, 'providerName', item.name)
+    },
+    handleFocusProvider() {
+      this.tab1.contractManagement.create.temp.providerId = ''
+      this.tab1.contractManagement.create.temp.providerName = ''
+    },
+    handleBlurProvider() {
+      if (this.tab1.contractManagement.create.temp.providerId == '') {
+        this.tab1.contractManagement.create.temp.providerId = ''
+        this.tab1.contractManagement.create.temp.providerName = ''
+      }
+    },
+    changeCreatorMan(val) {
+      this.tab1.contractManagement.create.temp.creatorMan = this.findAllEmploye.find(obj => obj.id == val).name
+    },
+    resetCreateTemp() {
+      this.tab1.contractManagement.create.temp.synchronousPastureList = []
+      if (Cookies.get('pastureid') == 18) {
+        for (let i = 0; i < this.findAllPasture.length; i++) {
+          this.tab1.contractManagement.create.temp.synchronousPastureList.push(this.findAllPasture[i].id)
+        }
+      } else {
+        this.tab1.contractManagement.create.temp.synchronousPastureList.push(parseInt(Cookies.get('pastureid')))
+      }
+      this.tab1.contractManagement.create.temp = { contractCode: '', pastureId: parseFloat(Cookies.get('pastureid')), providerName: '', startTime: '', stopTime: '', statue: '', isZeroStock: 0, creatorId: parseFloat(Cookies.get('employeid')), creatorMan: Cookies.get('employename'), creatorTime: parseTime(new Date(), '{y}-{m}-{d}'), synchronousPasture: this.tab1.contractManagement.create.temp.synchronousPastureList, synchronousPasture2: [] }
+    },
+    handleTab1Create() {
+      this.resetCreateTemp()
+      this.dialogStatus = 'create'
+      this.tab1.contractManagement.create.dialogFormVisible = true
+      this.getCreateNumber()
+    },
+    getCreateNumber() {
+      GetDataByName(this.tab1.contractManagement.getParmCreateNumber).then(response => {
+        this.$nextTick(() => {
+          console.log('合同编号', response.data.list[0].orderCode)
+          this.tab1.contractManagement.create.temp.contractCode = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+    add_dialog_save() {
+      console.log('点击了新增保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp'].validate(valid => {
+        if (valid) {
+          if (this.tab1.contractManagement.create.temp.contractCode == '') {
+            GetDataByName(this.getParmCreateNumber).then(response => {
+              this.$nextTick(() => {
+                this.tab1.contractManagement.create.temp.contractCode = response.data.list[0].orderCode
+                this.$forceUpdate()
+                this.saveCreateData()
+              })
+            })
+          } else {
+            this.saveCreateData()
+          }
+        }
+      })
+    },
+    saveCreateData() {
+      this.postDataPramas = {}
+      if (Cookies.get('pastureid') == 18) {
+        if (this.tab1.contractManagement.create.temp.synchronousPasture.indexOf(18) == -1) {
+          this.$message({ type: 'error', message: '当前合同归属于现代牧业,未选中,共享牧场请选中现代牧业!', duration: 2000 })
+          return false
+        }
+      }
+      this.postDataPramas.common = { 'returnmap': '0' }
+      this.postDataPramas.data = []
+      this.postDataPramas.data[0] = { 'name': 'checkbigcontract', 'type': 'v', 'parammaps': {
+        pastureId: this.tab1.contractManagement.create.temp.pastureId,
+        providerId: this.tab1.contractManagement.create.temp.providerId
+      }}
+      this.postDataPramas.data[1] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
+        pastureId: this.tab1.contractManagement.create.temp.pastureId,
+        providerId: this.tab1.contractManagement.create.temp.providerId,
+        providerName: this.tab1.contractManagement.create.temp.providerName,
+        startTime: this.tab1.contractManagement.create.temp.startTime,
+        stopTime: this.tab1.contractManagement.create.temp.stopTime,
+        contractCode: this.tab1.contractManagement.create.temp.contractCode,
+        creatorId: this.tab1.contractManagement.create.temp.creatorId,
+        creatorMan: this.tab1.contractManagement.create.temp.creatorMan,
+        creatorTime: this.tab1.contractManagement.create.temp.creatorTime,
+        isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
+        statue: 1,
+        remark: this.tab1.contractManagement.create.temp.remark,
+        SHtype: 0
+      }}
+      var groupRanchList = []
+      for (let i = 0; i < this.tab1.contractManagement.create.temp.synchronousPasture.length; i++) {
+        var obj = {}
+        obj.pastureId = this.tab1.contractManagement.create.temp.synchronousPasture[i]
+        groupRanchList.push(obj)
+      }
+      if (Cookies.get('pastureid') == 18) {
+        this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': groupRanchList }}
+        this.postDataPramas.data[2].children = []
+        this.postDataPramas.data[2].children[0] = { 'name': 'insertPastureBigcontract', 'type': 'e', 'parammaps': {
+          bigcontractId: '@insertBigContractV2.LastInsertId',
+          pastureId: '@insertSpotList.pastureId'
+        }}
+      }
+      ExecDataByConfig(this.postDataPramas).then(response => {
+        console.log('新增保存发送参数', this.postDataPramas)
+        if (response.msg == 'fail') {
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 = ''
+          this.getTab1List()
+          this.getPendingList()
+          this.tab1.contractManagement.create.dialogFormVisible = false
+          this.tab1.contractManagement.create.temp.providerName = ''
+          this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+        }
+      })
+    },
+    form_see(row) {
+      console.log('查看', row)
+      row.statue = String(row.statue)
+      row.synchronousPasture2 = []
+      row.synchronousPastureName2 = []
+      row.synchronousPasture = []
+      this.tab1.contractManagement.create.temp = Object.assign({}, row)
+      this.dialogStatus = 'see'
+      this.tab1.contractManagement.create.dialogFormVisible = true
+      var reason = '未通过原因:' + this.tab1.contractManagement.create.temp.workflowNote
+      if (this.tab1.contractManagement.create.temp.SHStatus == 2) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核' }, { title: '设备中心审核' }]
+        this.tab1.contractManagement.create.temp.active = 1
+      } else if (this.tab1.contractManagement.create.temp.SHStatus == 3) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核' }]
+        this.tab1.contractManagement.create.temp.active = 2
+      } else if (this.tab1.contractManagement.create.temp.SHStatus == 4) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson, status: 'error', reason: reason }, { title: '设备中心审核' }]
+        this.tab1.contractManagement.create.temp.active = 2
+      } else if (this.tab1.contractManagement.create.temp.SHStatus == 5) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核' }]
+        this.tab1.contractManagement.create.temp.active = 2
+      } else if (this.tab1.contractManagement.create.temp.SHStatus == 6) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核' }]
+        this.tab1.contractManagement.create.temp.active = 3
+      } else if (this.tab1.contractManagement.create.temp.SHStatus == 7) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.contractManagement.create.temp.CGChargedate, name: this.tab1.contractManagement.create.temp.CGChargePerson }]
+        this.tab1.contractManagement.create.temp.active = 4
+      } else if (this.tab1.contractManagement.create.temp.SHStatus == 8) {
+        this.tab1.contractManagement.create.temp.activeList = [{ title: '合同录入', date: this.tab1.contractManagement.create.temp.creatorTime, name: this.tab1.contractManagement.create.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.contractManagement.create.temp.chargeDate, name: this.tab1.contractManagement.create.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.contractManagement.create.temp.CGChargedate, name: this.tab1.contractManagement.create.temp.CGChargePerson, status: 'error', reason: reason }]
+        this.tab1.contractManagement.create.temp.active = 4
+      }
+      this.tab1.contractManagement.create.changeEchoParm.parammaps.bigcontract_id = row.id
+      GetDataByName(this.tab1.contractManagement.create.changeEchoParm).then(response => {
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.tab1.contractManagement.create.temp.synchronousPasture2.push(response.data.list[i].pasture_id)
+            this.tab1.contractManagement.create.temp.synchronousPasture.push(response.data.list[i].pasture_id)
+            this.tab1.contractManagement.create.temp.synchronousPastureName2.push(this.findAllPasture.find(obj => obj.id == response.data.list[i].pasture_id).name)
+          }
+        } else {
+          this.tab1.contractManagement.create.temp.synchronousPasture = []
+        }
+        console.log(this.tab1.contractManagement.create.temp.synchronousPastureName2, 'synchronousPastureName2')
+      })
+    },
+    handleTab1Change(row) {
+      console.log('变更', row)
+      // row.statue = String(row.statue)
+      this.$set(row, 'mystopTime', row.stopTime)
+      row.synchronousPasture2 = []
+      row.synchronousPastureName2 = []
+      row.synchronousPasture = []
+      this.tab1.contractManagement.create.temp = Object.assign({}, row)
+      this.tab1.contractManagement.create.temp.statue = String(this.tab1.contractManagement.create.temp.statue)
+
+      this.dialogStatus = 'change'
+      this.tab1.contractManagement.create.dialogFormVisible = true
+      this.tab1.contractManagement.create.changeEchoParm.parammaps.bigcontract_id = row.id
+      GetDataByName(this.tab1.contractManagement.create.changeEchoParm).then(response => {
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.tab1.contractManagement.create.temp.synchronousPasture2.push(response.data.list[i].pasture_id)
+            this.tab1.contractManagement.create.temp.synchronousPasture.push(response.data.list[i].pasture_id)
+            this.tab1.contractManagement.create.temp.synchronousPastureName2.push(this.findAllPasture.find(obj => obj.id == response.data.list[i].pasture_id).name)
+          }
+        } else {
+          this.tab1.contractManagement.create.temp.synchronousPasture = []
+        }
+        console.log(this.tab1.contractManagement.create.temp.synchronousPastureName2, 'synchronousPastureName2')
+      })
+    },
+
+    terminationData() {
+      var aa = '确认终止合同?'
+      if (this.tab1.contractManagement.create.temp.isZeroStock == 1) {
+        aa = '若此合同库存中有剩余库存,建议先进行退货操作。'
+      } else {
+        aa = '确认终止合同?'
+      }
+      MessageBox.confirm(aa, { confirmButtonText: '确认终止', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.postDataPramas = {}
+        this.postDataPramas.name = 'updatecontractstatuV2'
+        this.postDataPramas.parammaps = {}
+        this.postDataPramas.parammaps = this.tab1.contractManagement.create.temp
+        this.postDataPramas.parammaps.creatorId = Cookies.get('employeid')
+        this.postDataPramas.parammaps.creatorMan = Cookies.get('employename')
+        this.postDataPramas.parammaps.creatorTime = parseTime(new Date(), '{y}-{m}-{d}')
+        PostDataByName(this.postDataPramas).then(response => {
+          console.log('变更保存发送参数', this.postDataPramas)
+          if (response.msg == 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.tab1.contractManagement.getdataListParm.parammaps.tab1InputDatetime1 = ''
+            this.getTab1List()
+            this.getPendingList()
+            this.tab1.contractManagement.create.dialogFormVisible = false
+            this.tab1.contractManagement.create.temp.providerName = ''
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+      })
+    },
+    changeData() {
+      if (Cookies.get('pastureid') == 18) {
+        this.UpdateDataParam = {}
+        this.UpdateDataParam.name = 'pasture_bigcontract'
+        this.UpdateDataParam.dataname = 'bigcontract_id'
+        this.UpdateDataParam.datavalue = this.tab1.contractManagement.create.temp.id
+        this.UpdateDataParam.valuename = 'pasture_id'
+        this.UpdateDataParam.values = this.tab1.contractManagement.create.temp.synchronousPasture
+        UpdateDataRelation(this.UpdateDataParam).then(response => {
+          if (response.msg !== 'fail') {
+            this.UpdateDataParam2.name = 'updateBigcontractPId'
+            this.UpdateDataParam2.parammaps = {}
+            this.UpdateDataParam2.parammaps.bigcontract_id = this.tab1.contractManagement.create.temp.id
+            this.UpdateDataParam2.parammaps.enable = 0
+            PostDataByName(this.UpdateDataParam2).then(response => {})
+          }
+        })
+      }
+      this.postDataPramas = {}
+      this.postDataPramas.common = { 'returnmap': '0' }
+      this.postDataPramas.data = []
+      this.postDataPramas.data[0] = { 'name': 'checkbigcontractSH', 'type': 'v', 'parammaps': {
+        pastureId: this.tab1.contractManagement.create.temp.pastureId,
+        providerId: this.tab1.contractManagement.create.temp.providerId,
+        stopTime: this.tab1.contractManagement.create.temp.mystopTime,
+        flag: this.tab1.contractManagement.create.temp.flag,
+        isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
+        statue: this.tab1.contractManagement.create.temp.statue
+      }}
+      if (Cookies.get('pastureid') == 18) {
+        var synchronousPastureName = []
+        for (let i = 0; i < this.tab1.contractManagement.create.temp.synchronousPasture.length; i++) {
+          synchronousPastureName.push(this.findAllPasture.find(obj => obj.id == this.tab1.contractManagement.create.temp.synchronousPasture[i]).name)
+        }
+        this.postDataPramas.data[1] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
+          pastureId: this.tab1.contractManagement.create.temp.pastureId,
+          providerId: this.tab1.contractManagement.create.temp.providerId,
+          providerName: this.tab1.contractManagement.create.temp.providerName,
+          startTime: this.tab1.contractManagement.create.temp.startTime,
+          stopTime: this.tab1.contractManagement.create.temp.mystopTime,
+          stopTime1: this.tab1.contractManagement.create.temp.stopTime,
+          contractCode: '',
+          contractCode1: this.tab1.contractManagement.create.temp.contractCode,
+          creatorId: this.tab1.contractManagement.create.temp.creatorId,
+          creatorMan: this.tab1.contractManagement.create.temp.creatorMan,
+          creatorTime: this.tab1.contractManagement.create.temp.creatorTime,
+          isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
+          statue: this.tab1.contractManagement.create.temp.statue,
+          remark: this.tab1.contractManagement.create.temp.remark,
+          flag: this.tab1.contractManagement.create.temp.flag,
+          SHtype: 3,
+          pastureNamesOld: this.tab1.contractManagement.create.temp.synchronousPastureName2.toString(),
+          pastureNamesNow: synchronousPastureName.toString()
+        }}
+      } else {
+        this.postDataPramas.data[1] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
+          pastureId: this.tab1.contractManagement.create.temp.pastureId,
+          providerId: this.tab1.contractManagement.create.temp.providerId,
+          providerName: this.tab1.contractManagement.create.temp.providerName,
+          startTime: this.tab1.contractManagement.create.temp.startTime,
+          stopTime: this.tab1.contractManagement.create.temp.mystopTime,
+          stopTime1: this.tab1.contractManagement.create.temp.stopTime,
+          contractCode: '',
+          contractCode1: this.tab1.contractManagement.create.temp.contractCode,
+          creatorId: this.tab1.contractManagement.create.temp.creatorId,
+          creatorMan: this.tab1.contractManagement.create.temp.creatorMan,
+          creatorTime: this.tab1.contractManagement.create.temp.creatorTime,
+          isZeroStock: this.tab1.contractManagement.create.temp.isZeroStock,
+          statue: this.tab1.contractManagement.create.temp.statue,
+          remark: this.tab1.contractManagement.create.temp.remark,
+          flag: this.tab1.contractManagement.create.temp.flag,
+          SHtype: 3
+        }}
+      }
+      ExecDataByConfig(this.postDataPramas).then(response => {
+        console.log('变更保存发送参数', this.postDataPramas)
+        if (response.msg == 'fail') {
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.getTab1List()
+          this.getPendingList()
+          this.tab1.contractManagement.create.dialogFormVisible = false
+          this.tab1.contractManagement.create.temp.providerName = ''
+          this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+        }
+      })
+    },
+    // 备件明细
+    handleTab1DetailsSpareParts(row) {
+      console.log('备件明细', row)
+      this.contractCodese = row.contractCode
+      this.tab1.detailsSpareParts.updateList = Object.assign({}, row)
+      this.tab1.detailsSpareParts.detailsList = Object.assign({}, row)
+      this.isContractManagement = false
+      this.isDetailsSpareParts = true
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.pastureId = row.pastureId
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.providerId = row.providerId
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.stopTime = row.stopTime
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.flag = row.flag
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.isZeroStock = row.isZeroStock
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.statue = row.statue
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.partCode = ''
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.partName = ''
+      this.tab1.detailsSpareParts.getdataListParm.parammaps.specification = ''
+      this.getTab1List2()
+    },
+    handleTab1goBack() {
+      // this.reload()
+      this.isContractManagement = true
+      this.isDetailsSpareParts = false
+      this.tab1.detailsSpareParts.total = 0
+      this.getTab1List()
+    },
+
+    change_enabled(){
+
+    },
+    change_no(){
+      console.log("selectList",this.selectList)
+
+
+      var send_data =    {
+        "common": {
+            "returnmap": "0"
+        },
+        "data": [
+            {
+                "name": "insertSpotList",
+                "resultmaps": {
+                    "list":  this.selectList
+                },
+                "children": [
+                    {
+                        "name": "updateContractEnableById",
+                        "type": "e",
+                        "parammaps": {
+                            "id": "@insertSpotList.id"
+                        }
+                    }
+                ]
+            },{
+        "name": "updateBigcontractIsToSap",
+                        "type": "e",
+                        "parammaps": {
+                            "contractCode": this.contractCodese
+                        }
+      }
+
+        ]
+    }
+
+
+      ExecDataByConfig(send_data).then(response => {
+          console.log('发送参数', send_data)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '禁用失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+
+            this.getTab1List2()
+
+            this.$notify({
+              title: '',
+              message: '禁用成功',
+              type: 'success',
+              duration: 2000
+            })
+          }
+        })
+
+
+    },
+
+    handleSelectionChange(val) {
+      // this.create.temp.rowsNumber = []
+      // for(let i=0;i<val.length;i++){
+      //   this.create.temp.rowsNumber.push(val[i].rowNumber)
+      // }
+      console.log(val)
+      this.selectList = val
+    },
+    getTab1List2() {
+      this.tab1.detailsSpareParts.listLoading = true
+      GetDataByName(this.tab1.detailsSpareParts.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              const srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              const picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+              response.data.list[i].srcpath = srcpath
+              response.data.list[i].picpath = picpath
+            } else {
+              response.data.list[i].srcpath = ''
+              response.data.list[i].picpath = ''
+            }
+          }
+          this.tab1.detailsSpareParts.list = response.data.list
+          this.tab1.detailsSpareParts.pageNum = response.data.pageNum
+          this.tab1.detailsSpareParts.pageSize = response.data.pageSize
+          if (response.data.list !== null) {
+            this.tab1.detailsSpareParts.total = response.data.total
+          } else {
+            this.tab1.detailsSpareParts.total = 0
+          }
+        } else {
+          this.tab1.detailsSpareParts.list = []
+        }
+        setTimeout(() => {
+          this.tab1.detailsSpareParts.listLoading = false
+        }, 300)
+      })
+    },
+    handleTab1Filter2() {
+      this.tab1.detailsSpareParts.listLoading = true
+      this.tab1.detailsSpareParts.getdataListParm.offset = 1
+      this.getTab1List2()
+    },
+    sparePartSearch(queryString, cb) {
+      this.tab1.detailsSpareParts.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.tab1.detailsSpareParts.requestSparePart).then(response => {
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      if (this.tab1.detailsSpareParts.listAdd.length > 0) {
+        if (this.tab1.detailsSpareParts.listAdd.find(obj => obj.partCode == item.partCode)) {
+          this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
+        } else {
+          if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+            this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+            this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+          } else {
+            item.srcpath = ''
+            item.picpath = ''
+          }
+          this.$set(item, 'myid', new Date().getTime())
+          this.$set(item, 'taxcode', '')
+          this.tab1.detailsSpareParts.listAdd.unshift(item)
+        }
+      } else {
+        if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+          this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+          this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+        } else {
+          item.srcpath = ''
+          item.picpath = ''
+        }
+        this.$set(item, 'myid', new Date().getTime())
+        this.tab1.detailsSpareParts.listAdd.unshift(item)
+      }
+    },
+    brandSearch(queryString, cb) {
+      this.tab1.detailsSpareParts.requestBrand.parammaps['brandName'] = queryString
+      GetDataByName(this.tab1.detailsSpareParts.requestBrand).then(response => {
+        this.tab1.detailsSpareParts.BrandList = response.data.list
+        cb(this.tab1.detailsSpareParts.BrandList)
+      })
+    },
+    handleSelectBrand(item, row) {
+      this.$set(row, 'brandName', item.brandName)
+      this.$set(row, 'brandId', item.brandId)
+      this.$forceUpdate()
+    },
+    handleFocusBrand(row) {
+      this.$set(row, 'brandName', '')
+      this.$set(row, 'brandId', '')
+    },
+    handleBlurBrand(row) {
+      if (row.brandId == '') {
+        this.$set(row, 'brand', '')
+        this.$set(row, 'brandName', '')
+        this.$set(row, 'brandId', '')
+      }
+    },
+    partDelete(row) {
+      console.log('备件明细-备件删除', row)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        for (var i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
+          console.log(this.tab1.detailsSpareParts.listAdd[i])
+          if (this.tab1.detailsSpareParts.listAdd[i].myid === row.myid) {
+            var listAddIndex = this.tab1.detailsSpareParts.listAdd.indexOf(this.tab1.detailsSpareParts.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.tab1.detailsSpareParts.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    handleTab1DownloadTemp2() {
+      console.log('备件明细-备件模板')
+      import('@/vendor/Export2Excel').then(excel => {
+        const list1 = []
+        const tHeader = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注']
+        const filterVal = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注']
+        const data1 = this.formatJsonTemp(filterVal, list1)
+        excel.export_json_to_excel({ header: tHeader, data: data1, filename: '备件明细模板', autoWidth: true, bookType: 'xlsx' })
+      })
+    },
+    formatJsonTemp(filterVal, jsonData) {
+      return jsonData.map(v =>
+        filterVal.map(j => {
+          if (j === 'timestamp') {
+            return parseTime(v[j])
+          } else {
+            return v[j]
+          }
+        })
+      )
+    },
+    beforeImportExcel(file) {
+      const isLt2M = file.size / 1024 / 1024 < 6
+      if (!isLt2M) {
+        this.$message.error('上传文件大小不能超过 6MB!')
+      }
+      return isLt2M
+    },
+    handleImportExcelSuccess(res, file) {
+      console.log(res)
+      if (res.msg == 'ok') {
+        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
+        if (res.data.err_count > 0) {
+          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
+           import('@/vendor/Export2Excel').then(excel => {
+             const list1 = res.data.result
+             const tHeader = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注', '报错信息']
+             const filterVal = ['备件编号', '备件名称', '规格型号', '计量单位', '品牌', '计划量', '单价', '备注', 'error_msg']
+             const data1 = this.formatJson(filterVal, list1)
+             excel.export_json_to_excel({ header: tHeader, data: data1, filename: '合同报错信息', autoWidth: true, bookType: 'xlsx' })
+           })
+        }
+        this.getImportExcelList()
+      } else {
+        this.$notify({ title: '失败', message: '上传失败,文件格式错误', type: 'danger', duration: 2000 })
+      }
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map(v =>
+        filterVal.map(j => {
+          if (j == 'timestamp') {
+            return parseTime(v[j])
+          } else {
+            return v[j]
+          }
+        })
+      )
+    },
+    getClearImportExcelList() {
+      PostDataByName(this.tab1.detailsSpareParts.clearImportExcelParm).then(response => {
+        console.log(response.msg)
+        if (response.msg == 'ok') {
+          this.tab1.detailsSpareParts.isDisabledImport = false
+        }
+      })
+    },
+    getImportExcelList() {
+      GetDataByName(this.tab1.detailsSpareParts.importExcelParm).then(response => {
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            if (response.data.list[i].picpath == undefined) {
+              response.data.list[i].picpath = ''
+              response.data.list[i].srcpath = ''
+            } else {
+              this.$set(response.data.list[i], 'srcpath', process.env.VUE_APP_BASE_API + response.data.list[i].srcpath)
+              this.$set(response.data.list[i], 'picpath', process.env.VUE_APP_BASE_API + response.data.list[i].picpath)
+            }
+            response.data.list[i].myid = new Date().getTime() + i
+          }
+          this.tab1.detailsSpareParts.listAdd = response.data.list
+        } else {
+          this.tab1.detailsSpareParts.list = []
+        }
+      })
+    },
+    handleTab1Create2() {
+      console.log('备件明细-新增/变更')
+      this.dialogStatus = 'tab1create2'
+      this.tab1.detailsSpareParts.create.dialogFormVisible = true
+      this.tab1.detailsSpareParts.listAdd = []
+      this.tab1.detailsSpareParts.partCode = ''
+      this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigALLParts'
+      this.tab1.detailsSpareParts.requestSparePart.parammaps = {}
+      this.getClearImportExcelList()
+    },
+    add_dialog_save2() {
+      console.log('备件明细-新增保存')
+      if (this.tab1.detailsSpareParts.listAdd.length !== 0) {
+        for (let i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
+          if (this.tab1.detailsSpareParts.listAdd[i].planAmount == null || this.tab1.detailsSpareParts.listAdd[i].brand == null || this.tab1.detailsSpareParts.listAdd[i].price == null || this.tab1.detailsSpareParts.listAdd[i].planAmount == '' || this.tab1.detailsSpareParts.listAdd[i].brand === '' || this.tab1.detailsSpareParts.listAdd[i].brandId === '' || this.tab1.detailsSpareParts.listAdd[i].price == '' || this.tab1.detailsSpareParts.listAdd[i].brand == undefined || this.tab1.detailsSpareParts.listAdd[i].brandId == undefined) {
+            this.$message({ type: 'warning', message: '请检查备件品牌或计划量或单价是否为空', duration: 2000 })
+            return false
+          } else {
+            var rulesPlanAmount = /^[1-9]\d*$/
+            if (!rulesPlanAmount.test(parseFloat(this.tab1.detailsSpareParts.listAdd[i].planAmount))) {
+              this.$message({ type: 'error', message: '计划量请输入正整数', duration: 2000 })
+              return false
+            }
+            var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+            if (rulesPrice.test(this.tab1.detailsSpareParts.listAdd[i].price) == false) {
+              this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
+              return false
+            }
+          }
+        }
+        this.postDataPramas = {}
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
+          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
+          flag: this.tab1.detailsSpareParts.detailsList.flag,
+          providerId: this.tab1.detailsSpareParts.detailsList.providerId,
+          providerName: this.tab1.detailsSpareParts.detailsList.providerName,
+          startTime: this.tab1.detailsSpareParts.detailsList.startTime,
+          stopTime: this.tab1.detailsSpareParts.detailsList.stopTime,
+          contractCode: '',
+          contractCode1: this.tab1.detailsSpareParts.detailsList.contractCode,
+          creatorId: Cookies.get('employeid'),
+          creatorMan: Cookies.get('employename'),
+          creatorTime: parseTime(new Date(), '{y}-{m}-{d}'),
+          isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock,
+          statue: this.tab1.detailsSpareParts.detailsList.statue,
+          remark: this.tab1.detailsSpareParts.detailsList.remark,
+          SHtype: 1
+        }}
+        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.tab1.detailsSpareParts.listAdd }}
+        this.postDataPramas.data[1].children = []
+        this.postDataPramas.data[1].children[0] = { 'name': 'checkcontracPartCode', 'type': 'v', 'parammaps': {
+          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
+          providerId: this.tab1.detailsSpareParts.detailsList.providerId,
+          stopTime: this.tab1.detailsSpareParts.detailsList.stopTime,
+          flag: this.tab1.detailsSpareParts.detailsList.flag,
+          isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock,
+          statue: this.tab1.detailsSpareParts.detailsList.statue,
+          partCode: '@insertSpotList.partCode',
+          brandId: '@insertSpotList.brandId'
+        }}
+        this.postDataPramas.data[1].children[1] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
+          bigId: '@insertBigContractV2.LastInsertId',
+          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
+          pastureName: this.tab1.detailsSpareParts.detailsList.pastureName,
+          partId: '@insertSpotList.id',
+          partName: '@insertSpotList.partName',
+          partCode: '@insertSpotList.partCode',
+          specification: '@insertSpotList.specification',
+          price: '@insertSpotList.price',
+          brandId: '@insertSpotList.brandId',
+          brand: '@insertSpotList.brand',
+          planAmount: '@insertSpotList.planAmount',
+          remark: '@insertSpotList.remark',
+          unit: '@insertSpotList.unit',
+          contractId: '@insertSpotList.contractId',
+          taxcode: '@insertSpotList.taxcode',
+          lifeCycle: '@insertSpotList.lifeCycle',
+          contractVarianceItem: '@insertSpotList.contractVarianceItem',
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg == 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.getTab1List2()
+            this.getPendingList()
+            this.tab1.detailsSpareParts.create.dialogFormVisible = false
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+      } else {
+        this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+        return false
+      }
+    },
+    handleTab1Change2() {
+      console.log('备件明细-变更')
+      this.dialogStatus = 'tab1change2'
+      this.tab1.detailsSpareParts.create.dialogFormVisible = true
+      this.tab1.detailsSpareParts.listAdd = []
+      this.tab1.detailsSpareParts.requestSparePart.parammaps.pastureId = this.tab1.detailsSpareParts.detailsList.pastureId
+      this.tab1.detailsSpareParts.requestSparePart.parammaps.providerId = this.tab1.detailsSpareParts.detailsList.providerId
+      this.tab1.detailsSpareParts.requestSparePart.parammaps.stopTime = this.tab1.detailsSpareParts.detailsList.stopTime
+      this.tab1.detailsSpareParts.requestSparePart.parammaps.flag = this.tab1.detailsSpareParts.detailsList.flag
+      this.tab1.detailsSpareParts.requestSparePart.parammaps.isZeroStock = this.tab1.detailsSpareParts.detailsList.isZeroStock
+      this.tab1.detailsSpareParts.requestSparePart.parammaps.statue = this.tab1.detailsSpareParts.detailsList.statue
+      this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigParts'
+    },
+    changeData2() {
+      console.log('备件明细-变更保存')
+      if (this.tab1.detailsSpareParts.listAdd.length !== 0) {
+        for (let i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
+          if (this.tab1.detailsSpareParts.listAdd[i].planAmount == null || this.tab1.detailsSpareParts.listAdd[i].brand == null || this.tab1.detailsSpareParts.listAdd[i].price == null || this.tab1.detailsSpareParts.listAdd[i].planAmount == '' || this.tab1.detailsSpareParts.listAdd[i].brand === '' || this.tab1.detailsSpareParts.listAdd[i].brandId === '' || this.tab1.detailsSpareParts.listAdd[i].price == '' || this.tab1.detailsSpareParts.listAdd[i].brand == undefined || this.tab1.detailsSpareParts.listAdd[i].brandId == undefined) {
+            this.$message({ type: 'warning', message: '请检查备件品牌或计划量或单价是否为空', duration: 2000 })
+            return false
+          } else {
+            var rulesPlanAmount = /^[1-9]\d*$/
+            if (!rulesPlanAmount.test(parseFloat(this.tab1.detailsSpareParts.listAdd[i].planAmount))) {
+              this.$message({ type: 'error', message: '计划量请输入正整数', duration: 2000 })
+              return false
+            } else {
+              var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+              if (rulesPrice.test(this.tab1.detailsSpareParts.listAdd[i].price) == false) {
+                this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
+                return false
+              }
+            }
+          }
+        }
+        this.postDataPramas = {}
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'insertBigContractV2', 'type': 'e', 'parammaps': {
+          pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
+          flag: this.tab1.detailsSpareParts.detailsList.flag,
+          providerId: this.tab1.detailsSpareParts.detailsList.providerId,
+          providerName: this.tab1.detailsSpareParts.detailsList.providerName,
+          startTime: this.tab1.detailsSpareParts.detailsList.startTime,
+          stopTime: this.tab1.detailsSpareParts.detailsList.stopTime,
+          contractCode: '',
+          contractCode1: this.tab1.detailsSpareParts.detailsList.contractCode,
+          creatorId: Cookies.get('employeid'),
+          creatorMan: Cookies.get('employename'),
+          creatorTime: parseTime(new Date(), '{y}-{m}-{d}'),
+          isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock,
+          statue: this.tab1.detailsSpareParts.detailsList.statue,
+          remark: this.tab1.detailsSpareParts.detailsList.remark,
+          SHtype: 2
+        }}
+        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.tab1.detailsSpareParts.listAdd }}
+        this.postDataPramas.data[1].children = []
+        this.postDataPramas.data[1].children[0] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
+          bigId: '@insertBigContractV2.LastInsertId',
+          pastureId: '@insertSpotList.pastureId',
+          pastureName: '@insertSpotList.pastureName',
+          partId: '@insertSpotList.partId',
+          partName: '@insertSpotList.partName',
+          partCode: '@insertSpotList.partCode',
+          specification: '@insertSpotList.specification',
+          price: '@insertSpotList.price',
+          brandId: '@insertSpotList.brandId',
+          brand: '@insertSpotList.brand',
+          planAmount: '@insertSpotList.planAmount',
+          remark: '@insertSpotList.remark',
+          unit: '@insertSpotList.unit',
+          contractId: '@insertSpotList.contractId',
+          taxcode: '@insertSpotList.taxcode',
+          lifeCycle: '@insertSpotList.lifeCycle',
+          contractVarianceItem: '@insertSpotList.contractVarianceItem',
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg == 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.getTab1List2()
+            this.getPendingList()
+            this.tab1.detailsSpareParts.create.dialogFormVisible = false
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+      } else {
+        this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+        return false
+      }
+    },
+    handleTab1Export2() {
+      console.log('备件明细-导出')
+      this.$alert('备件明细正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+          this.tab1.detailsSpareParts.getdataListParm.pagecount = 10
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      this.tab1.detailsSpareParts.getdataListParm.pagecount = ''
+      GetDataByName(this.tab1.detailsSpareParts.getdataListParm).then(response => {
+        if (response.data.list !== '') {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+        if (response.data.list !== null) {
+          this.$nextTick(() => {
+            const ExcelDatas = [
+              {
+                tHeader: ['备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '计划量', '单价', '使用周期', '合同差异项', '备注'],
+                filterVal: ['partCode', 'partName', 'specification', 'brand', 'unit', 'planAmount', 'price','lifeCycle','contractVarianceItem', 'remark'],
+                tableDatas: response.data.list,
+                sheetName: '合同管理-备件明细'
+              }
+            ]
+            json2excel(ExcelDatas, '合同管理-备件明细', true, 'xlsx')
+          })
+        }
+      })
+    },
+
+    // 变更记录
+    handleTab1ChangeRecord(row) {
+      console.log('变更记录')
+      this.tab1.detailsSpareParts.detailsList = Object.assign({}, row)
+      this.contractCodese = row.contractCode
+      this.isContractManagement = false
+      this.isChangeRecord = true
+      this.tab1.changeRecord.getdataListParm.parammaps.pastureId = row.pastureId
+      this.tab1.changeRecord.getdataListParm.parammaps.providerId = row.providerId
+      this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = row.stopTime
+      this.tab1.changeRecord.getdataListParm.parammaps.flag = row.flag
+      this.tab1.changeRecord.getdataListParm.parammaps.isZeroStock = row.isZeroStock
+      this.tab1.changeRecord.getdataListParm.parammaps.statue = row.statue
+      this.tab1.changeRecord.getdataListParm.parammaps.contractCode = ''
+      this.tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3 = ''
+      this.tab1.changeRecord.getdataListParm.parammaps.startTime = ''
+      this.tab1.changeRecord.getdataListParm.parammaps.stopTime = ''
+      this.tab1.changeRecord.getdataListParm.parammaps.SHtype = ''
+      this.tab1.changeRecord.getdataListParm.parammaps.stuteSH = ''
+      this.getTab1List3()
+    },
+    handleTab1goBack2() {
+      // this.reload()
+      this.isContractManagement = true
+      this.isChangeRecord = false
+      this.tab1.changeRecord.total = 0
+      // this.tab1.contractManagement.getdataListParm.offset = 1
+      this.getTab1List()
+    },
+    getTab1List3() {
+      this.tab1.changeRecord.listLoading = true
+      if (this.$refs['tab1InputDatetime3'] !== undefined && this.$refs['tab1InputDatetime3'].value !== null) {
+        this.tab1.changeRecord.getdataListParm.parammaps.startTime = this.$refs['tab1InputDatetime3'].value[0]
+        this.tab1.changeRecord.getdataListParm.parammaps.stopTime = this.$refs['tab1InputDatetime3'].value[1]
+      } else {
+        this.tab1.changeRecord.getdataListParm.parammaps.startTime = ''
+        this.tab1.changeRecord.getdataListParm.parammaps.stopTime = ''
+      }
+      GetDataByName(this.tab1.changeRecord.getdataListParm).then(response => {
+        this.tab1.changeRecord.list = response.data.list
+        this.tab1.changeRecord.pageNum = response.data.pageNum
+        this.tab1.changeRecord.pageSize = response.data.pageSize
+        if (response.data.list !== null) {
+          this.tab1.changeRecord.total = response.data.total
+        } else {
+          this.tab1.changeRecord.total = 0
+        }
+        setTimeout(() => {
+          this.tab1.changeRecord.listLoading = false
+        }, 300)
+      })
+    },
+    handleTab1Filter3() {
+      this.tab1.changeRecord.listLoading = true
+      if (this.tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3 == null) {
+        this.tab1.changeRecord.getdataListParm.parammaps.tab1InputDatetime3 = ''
+      }
+      this.tab1.changeRecord.getdataListParm.offset = 1
+      if (this.tab1.changeRecord.radioAll == '全部') {
+        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 2
+        this.getTab1List3()
+      } else if (this.tab1.changeRecord.radioAll == '待处理') {
+        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 0
+        this.getTab1List3()
+      } else if (this.tab1.changeRecord.radioAll == '已处理') {
+        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 1
+        this.getTab1List3()
+      }
+    },
+    changeChangeRecordAll() {
+      if (this.tab1.changeRecord.radioAll == '全部') {
+        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 2
+        this.getTab1List3()
+      } else if (this.tab1.changeRecord.radioAll == '待处理') {
+        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 0
+        this.getTab1List3()
+      } else if (this.tab1.changeRecord.radioAll == '已处理') {
+        this.tab1.changeRecord.getdataListParm.parammaps.SHnums = 1
+        this.getTab1List3()
+      }
+    },
+    handleTab1See3(row) {
+      console.log('变更记录-查看')
+      this.tab1.changeRecord.see.temp = Object.assign({}, row)
+      this.dialogStatus = 'tab1See2'
+      this.tab1.changeRecord.see.dialogFormVisible = true
+      if (row.SHtype == 0 || row.SHtype == 1 || row.SHtype == 2) {
+        this.tab1.changeRecord.see.getdataListParm.parammaps.id = row.id
+        this.getTab1List3See()
+      }
+      var reason = '未通过原因:' + this.tab1.changeRecord.see.temp.workflowNote
+      if (this.tab1.changeRecord.see.temp.SHStatus == 2) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核' }, { title: '设备中心审核' }]
+        this.tab1.changeRecord.see.active = 1
+      } else if (this.tab1.changeRecord.see.temp.SHStatus == 3) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核' }]
+        this.tab1.changeRecord.see.active = 2
+      } else if (this.tab1.changeRecord.see.temp.SHStatus == 4) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson, status: 'error', reason: reason }, { title: '设备中心审核' }]
+        this.tab1.changeRecord.see.active = 2
+      } else if (this.tab1.changeRecord.see.temp.SHStatus == 5) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核' }]
+        this.tab1.changeRecord.see.active = 2
+      } else if (this.tab1.changeRecord.see.temp.SHStatus == 6) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核' }]
+        this.tab1.changeRecord.see.active = 3
+      } else if (this.tab1.changeRecord.see.temp.SHStatus == 7) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.changeRecord.see.temp.CGChargedate, name: this.tab1.changeRecord.see.temp.CGChargePerson }]
+        this.tab1.changeRecord.see.active = 4
+      } else if (this.tab1.changeRecord.see.temp.SHStatus == 8) {
+        this.tab1.changeRecord.see.activeList = [{ title: '合同录入', date: this.tab1.changeRecord.see.temp.creatorTime, name: this.tab1.changeRecord.see.temp.creatorMan }, { title: '供应主管审核', date: this.tab1.changeRecord.see.temp.chargeDate, name: this.tab1.changeRecord.see.temp.chargePerson }, { title: '设备中心审核', date: this.tab1.changeRecord.see.temp.CGChargedate, name: this.tab1.changeRecord.see.temp.CGChargePerson, status: 'error', reason: reason }]
+        this.tab1.changeRecord.see.active = 4
+      }
+    },
+    getTab1List3See() {
+      GetDataByName(this.tab1.changeRecord.see.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.tab1.changeRecord.see.pageNum = response.data.pageNum
+          this.tab1.changeRecord.see.pageSize = response.data.pageSize
+          if (response.data.total) {
+            this.tab1.changeRecord.see.total = response.data.total
+          }
+          for (let i = 0; i < response.data.list.length; i++) {
+            response.data.list[i].myid = new Date().getTime() + i
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              const srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              const picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+              response.data.list[i].srcpath = srcpath
+              response.data.list[i].picpath = picpath
+            } else {
+              response.data.list[i].srcpath = ''
+              response.data.list[i].picpath = ''
+            }
+          }
+          this.tab1.changeRecord.see.list = response.data.list
+          this.tab1.detailsSpareParts.listAdd = response.data.list
+        } else {
+          this.tab1.changeRecord.see.list = []
+          this.tab1.detailsSpareParts.listAdd = []
+        }
+        setTimeout(() => {
+          this.tab1.changeRecord.see.listLoading = false
+        }, 300)
+      })
+    },
+    handleTab1Update3(row) {
+      console.log('变更记录-编辑', row)
+      this.tab1.detailsSpareParts.updateList = Object.assign({}, row)
+      this.tab1.detailsSpareParts.create.temp = Object.assign({}, row)
+      this.dialogStatus = 'tab1Update2'
+      this.tab1.detailsSpareParts.create.dialogFormVisible = true
+      this.tab1.changeRecord.see.getdataListParm.parammaps.id = row.id
+      this.getTab1List3See()
+      if (row.SHtype == 1) {
+        this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigALLParts'
+        this.tab1.detailsSpareParts.requestSparePart.parammaps = {}
+      } else {
+        this.tab1.detailsSpareParts.requestSparePart.parammaps.pastureId = this.tab1.detailsSpareParts.detailsList.pastureId
+        this.tab1.detailsSpareParts.requestSparePart.parammaps.providerId = this.tab1.detailsSpareParts.detailsList.providerId
+        this.tab1.detailsSpareParts.requestSparePart.parammaps.stopTime = this.tab1.detailsSpareParts.detailsList.stopTime
+        this.tab1.detailsSpareParts.requestSparePart.parammaps.flag = this.tab1.detailsSpareParts.detailsList.flag
+        this.tab1.detailsSpareParts.requestSparePart.parammaps.isZeroStock = this.tab1.detailsSpareParts.detailsList.isZeroStock
+        this.tab1.detailsSpareParts.requestSparePart.parammaps.statue = this.tab1.detailsSpareParts.detailsList.statue
+        this.tab1.detailsSpareParts.requestSparePart.name = 'getcontratListBybigParts'
+      }
+    },
+    edit_dialog_save2() {
+      console.log('编辑保存')
+      // 新增合同 || 变更日期
+      if (this.tab1.detailsSpareParts.updateList.SHtype == 0 || this.tab1.detailsSpareParts.updateList.SHtype == 3) {
+        this.postDataPramas = {}
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'updateBigcontractV2', 'type': 'e', 'parammaps': {
+          id: this.tab1.detailsSpareParts.create.temp.id,
+          startTime: this.tab1.detailsSpareParts.create.temp.startTime,
+          stopTime: this.tab1.detailsSpareParts.create.temp.stopTime,
+          isZeroStock: this.tab1.detailsSpareParts.create.temp.isZeroStock,
+          remark: this.tab1.detailsSpareParts.create.temp.remark,
+          stopTimeHis: this.tab1.detailsSpareParts.create.temp.stopTimeHis
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg == 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            if (this.tab1.detailsSpareParts.updateList.SHtype == 0) {
+              this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.detailsSpareParts.create.temp.stopTime
+            }
+            this.getTab1List3()
+            this.getPendingList()
+            this.tab1.detailsSpareParts.create.dialogFormVisible = false
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+      } else {
+        if (this.tab1.detailsSpareParts.listAdd.length !== 0) {
+          for (let i = 0; i < this.tab1.detailsSpareParts.listAdd.length; i++) {
+            if (this.tab1.detailsSpareParts.listAdd[i].planAmount == null || this.tab1.detailsSpareParts.listAdd[i].brand == null || this.tab1.detailsSpareParts.listAdd[i].price == null || this.tab1.detailsSpareParts.listAdd[i].planAmount == '' || this.tab1.detailsSpareParts.listAdd[i].brand == '' || this.tab1.detailsSpareParts.listAdd[i].brandId === '' || this.tab1.detailsSpareParts.listAdd[i].price == '' || this.tab1.detailsSpareParts.listAdd[i].brand == undefined || this.tab1.detailsSpareParts.listAdd[i].brandId == undefined) {
+              console.log(this.tab1.detailsSpareParts.listAdd[i])
+              this.$message({ type: 'warning', message: '请检查备件品牌或计划量或单价是否为空', duration: 2000 })
+              return false
+            } else {
+              var rulesPlanAmount = /^[1-9]\d*$/
+              if (!rulesPlanAmount.test(parseFloat(this.tab1.detailsSpareParts.listAdd[i].planAmount))) {
+                this.$message({ type: 'error', message: '计划量请输入正整数', duration: 2000 })
+                return false
+              } else {
+                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                if (rulesPrice.test(this.tab1.detailsSpareParts.listAdd[i].price) == false) {
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后两位', duration: 2000 })
+                  return false
+                }
+              }
+            }
+          }
+          this.postDataPramas = {}
+          this.postDataPramas.common = { 'returnmap': '0' }
+          this.postDataPramas.data = []
+          this.postDataPramas.data[0] = { 'name': 'deleteContract', 'type': 'e', 'parammaps': {
+            bigId: this.tab1.detailsSpareParts.updateList.id
+          }}
+          this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.tab1.detailsSpareParts.listAdd }}
+          this.postDataPramas.data[1].children = []
+
+          if (this.tab1.detailsSpareParts.updateList.SHtype == 2) {
+            this.postDataPramas.data[1].children[0] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
+              bigId: this.tab1.detailsSpareParts.updateList.id,
+              pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
+              pastureName: this.tab1.detailsSpareParts.detailsList.pastureName,
+              partId: '@insertSpotList.id',
+              partName: '@insertSpotList.partName',
+              partCode: '@insertSpotList.partCode',
+              specification: '@insertSpotList.specification',
+              price: '@insertSpotList.price',
+              brandId: '@insertSpotList.brandId',
+              brand: '@insertSpotList.brand',
+              planAmount: '@insertSpotList.planAmount',
+              remark: '@insertSpotList.remark',
+              unit: '@insertSpotList.unit',
+              contractId: '@insertSpotList.contractId',
+              taxcode: '@insertSpotList.taxcode',
+              lifeCycle: '@insertSpotList.lifeCycle',
+              contractVarianceItem: '@insertSpotList.contractVarianceItem',
+            }}
+          } else {
+            this.postDataPramas.data[1].children[0] = { 'name': 'checkcontracPartCode', 'type': 'v', 'parammaps': { pastureId: this.tab1.detailsSpareParts.detailsList.pastureId, providerId: this.tab1.detailsSpareParts.detailsList.providerId, stopTime: this.tab1.detailsSpareParts.detailsList.stopTime, flag: this.tab1.detailsSpareParts.detailsList.flag, isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock, statue: this.tab1.detailsSpareParts.detailsList.statue, partCode: '@insertSpotList.partCode', brandId: '@insertSpotList.brandId' }}
+            this.postDataPramas.data[1].children[1] = { 'name': 'insertContractV2', 'type': 'e', 'parammaps': {
+              bigId: this.tab1.detailsSpareParts.updateList.id,
+              pastureId: this.tab1.detailsSpareParts.detailsList.pastureId,
+              pastureName: this.tab1.detailsSpareParts.detailsList.pastureName,
+              partId: '@insertSpotList.id',
+              partName: '@insertSpotList.partName',
+              partCode: '@insertSpotList.partCode',
+              specification: '@insertSpotList.specification',
+              price: '@insertSpotList.price',
+              brandId: '@insertSpotList.brandId',
+              brand: '@insertSpotList.brand',
+              planAmount: '@insertSpotList.planAmount',
+              remark: '@insertSpotList.remark',
+              unit: '@insertSpotList.unit',
+              contractId: '@insertSpotList.contractId',
+              lifeCycle: '@insertSpotList.lifeCycle',
+              contractVarianceItem: '@insertSpotList.contractVarianceItem',
+              // taxcode: '@insertSpotList.taxcode'
+            }}
+          }
+          this.postDataPramas.data[2] = { 'name': 'updateBigcontract', 'type': 'e', 'parammaps': {
+            id: this.tab1.detailsSpareParts.updateList.id
+          }}
+          ExecDataByConfig(this.postDataPramas).then(response => {
+            console.log('新增保存发送参数', this.postDataPramas)
+            if (response.msg == 'fail') {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.getTab1List3()
+              this.getPendingList()
+              this.tab1.detailsSpareParts.create.dialogFormVisible = false
+              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+            }
+          })
+        } else {
+          this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+          return false
+        }
+      }
+    },
+    changeExamineStatue(val) {
+      if (val == 2) {
+        this.tab1.changeRecord.examine.isReason = true
+      } else {
+        this.tab1.changeRecord.examine.isReason = false
+      }
+    },
+    // 审核1
+    handleTab1Examine(row) {
+      console.log('变更记录-审核')
+      this.dialogStatus = 'tab1examine'
+      this.tab1.changeRecord.examine.dialogFormVisible = true
+      this.tab1.changeRecord.examine.temp = Object.assign({}, row)
+      this.tab1.changeRecord.examine.isReason = false
+      if (row == undefined) {
+        this.tab1.changeRecord.examine.temp = this.tab1.changeRecord.see.temp
+        this.$set(this.tab1.changeRecord.see.temp, 'statueSH', 1)
+        this.$set(this.tab1.changeRecord.see.temp, 'workflowNote', '')
+      } else {
+        this.tab1.changeRecord.examine.temp = Object.assign({}, row)
+        this.$set(this.tab1.changeRecord.examine.temp, 'statueSH', 1)
+        this.$set(this.tab1.changeRecord.examine.temp, 'workflowNote', '')
+      }
+      this.keyupSubmit()
+    },
+    keyupSubmit() {
+      if (this.dialogStatus == 'tab1examine' || this.dialogStatus == 'tab1examine2' || this.dialogStatus == 'tab1examine3') {
+        document.onkeydown = e => {
+          const _key = window.event.keyCode
+          if (_key === 13) {
+            if (this.dialogStatus == 'tab1examine') {
+              this.createExamineData()
+            } else {
+              this.createExamineData3()
+            }
+          }
+        }
+      }
+    },
+    createExamineData() {
+      console.log('点击了设备主管审核确认1')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.postDataPramas = {}
+          this.postDataPramas.name = 'contractCharge'
+          this.postDataPramas.parammaps = {}
+          this.postDataPramas.parammaps.id = this.tab1.changeRecord.examine.temp.id
+          if (this.tab1.changeRecord.examine.temp.statueSH === 1) {
+            this.postDataPramas.parammaps.statue = 5
+          } else {
+            this.postDataPramas.parammaps.statue = 4
+          }
+          this.postDataPramas.parammaps.empId	 = Cookies.get('employeid')
+          this.postDataPramas.parammaps.workflowNote = this.tab1.changeRecord.examine.temp.workflowNote
+          PostDataByName(this.postDataPramas).then(response => {
+            console.log('设备主管审核确认发送参数', this.postDataPramas)
+            if (response.msg !== 'fail') {
+              this.tab1.changeRecord.examine.dialogFormVisible = false
+              this.tab1.changeRecord.see.dialogFormVisible = false
+              this.tab1.changeRecord.isStatueReason = false
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              this.getTab1List3()
+              this.getTab1List()
+              this.getPendingList()
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    // 审核2
+    handleTab1Examine3(row) {
+      console.log(' 变更记录-审核3')
+      if (row == undefined) {
+        this.tab1.changeRecord.examine.temp = this.tab1.changeRecord.see.temp
+        this.$set(this.tab1.changeRecord.see.temp, 'statueSH', 1)
+        this.$set(this.tab1.changeRecord.see.temp, 'workflowNote', '')
+      } else {
+        this.tab1.changeRecord.examine.temp = Object.assign({}, row)
+        this.$set(this.tab1.changeRecord.examine.temp, 'statueSH', 1)
+        this.$set(this.tab1.changeRecord.examine.temp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'tab1examine3'
+      this.tab1.changeRecord.examine.dialogFormVisible = true
+      this.tab1.changeRecord.examine.isReason = false
+      this.keyupSubmit()
+    },
+    createExamineData3() {
+      console.log('点击了设备中心审核确认3')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.postDataPramas = {}
+          this.postDataPramas.common = { 'returnmap': '0' }
+          this.postDataPramas.data = []
+          if (this.tab1.changeRecord.examine.temp.statueSH == 1) {
+            this.postDataPramas.data[0] = { 'name': 'contractCharge1', 'type': 'e', 'parammaps': {
+              statue: 7,
+              empId: Cookies.get('employeid'),
+              workflowNote: this.tab1.changeRecord.examine.temp.workflowNote,
+              id: this.tab1.changeRecord.examine.temp.id
+            }}
+            if (this.tab1.changeRecord.examine.temp.SHtype == 1 || this.tab1.changeRecord.examine.temp.SHtype == 2) {
+              this.postDataPramas.data[1] = { 'name': 'updateContractEnable', 'type': 'e', 'parammaps': {
+                id: this.tab1.changeRecord.examine.temp.id
+              }}
+            } else if (this.tab1.changeRecord.examine.temp.SHtype == 3) {
+              this.postDataPramas.data[1] = { 'name': 'updatecontractdate', 'type': 'e', 'parammaps': {
+                pastureId: this.tab1.changeRecord.examine.temp.pastureId,
+                providerId: this.tab1.changeRecord.examine.temp.providerId,
+                stopTimeHis: this.tab1.changeRecord.examine.temp.stopTimeHis,
+                flag: this.tab1.changeRecord.examine.temp.flag,
+                isZeroStock: this.tab1.changeRecord.examine.temp.isZeroStock,
+                statue: this.tab1.changeRecord.examine.temp.statue,
+                startTime: this.tab1.changeRecord.examine.temp.startTime,
+                stopTime: this.tab1.changeRecord.examine.temp.stopTime,
+                id: this.tab1.changeRecord.examine.temp.id
+              }}
+            }
+            this.postDataPramas.data[2] = {
+                  "name": "updateBigcontractIsToSap",
+                              "type": "e",
+                              "parammaps": {
+                                  "contractCode": this.contractCodese
+                              }
+            }
+
+
+          } else {
+            this.postDataPramas.data[0] = { 'name': 'contractCharge1', 'type': 'e', 'parammaps': {
+              statue: 8,
+              empId: Cookies.get('employeid'),
+              workflowNote: this.tab1.changeRecord.examine.temp.workflowNote,
+              id: this.tab1.changeRecord.examine.temp.id
+            }}
+          }
+          ExecDataByConfig(this.postDataPramas).then(response => {
+            console.log('新增保存发送参数', this.postDataPramas)
+            if (response.msg === 'fail') {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              if (this.postDataPramas.data[0].parammaps.statue == 7) {
+                if (this.tab1.changeRecord.examine.temp.SHtype == 3) {
+                  this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.changeRecord.examine.temp.stopTimeHis
+                } else {
+                  this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.changeRecord.examine.temp.stopTime
+                }
+              } else {
+                this.tab1.changeRecord.getdataListParm.parammaps.stopTime1 = this.tab1.detailsSpareParts.detailsList.stopTime
+              }
+              this.tab1.changeRecord.examine.dialogFormVisible = false
+              this.tab1.changeRecord.see.dialogFormVisible = false
+              this.tab1.changeRecord.examine.isStatueReason = false
+              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+              this.getTab1List3()
+              this.getTab1List()
+              this.getPendingList()
+            }
+          })
+        }
+      })
+    },
+    handleTab1Delete3(row) {
+      console.log('变更记录-删除')
+      console.log('点击了删除')
+      MessageBox.confirm('确认删除此条信息?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.postDataPramas = {}
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'deleteBigContract', 'type': 'e', 'parammaps': {
+          id: row.id
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deleteContract', 'type': 'e', 'parammaps': {
+          bigId: row.id
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+          this.getTab1List3()
+          this.getPendingList()
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+
+    // 合同明细
+    getTab2List() {
+      this.tab2.listLoading = true
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.tab2.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.tab2.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.tab2.getdataListParm.parammaps.startTime = ''
+        this.tab2.getdataListParm.parammaps.stopTime = ''
+      }
+      GetDataByName(this.tab2.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.tab2.list = response.data.list
+          this.tab2.pageNum = response.data.pageNum
+          this.tab2.pageSize = response.data.pageSize
+          if (response.data.total) {
+            this.tab2.total = response.data.total
+          }
+        } else {
+          this.tab2.list = []
+        }
+        setTimeout(() => {
+          this.tab2.listLoading = false
+        }, 300)
+      })
+    },
+    handleTab2Filter() {
+      this.listLoading2 = true
+      if (this.tab2.getdataListParm.parammaps.inputDatetime === null) {
+        this.tab2.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.tab2.getdataListParm.offset = 1
+      this.getTab2List()
+    },
+    handleTab2Export() {
+      this.$alert('合同明细正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.tab2.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.tab2.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.tab2.getdataListParm.parammaps.startTime = ''
+        this.tab2.getdataListParm.parammaps.stopTime = ''
+      }
+      this.tab2.getdataListParm.pagecount = ''
+      GetDataByName(this.tab2.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            if (response.data.list[i].isZeroStock == 0) {
+              response.data.list[i].isZeroStock = '否'
+            } else {
+              response.data.list[i].isZeroStock = '是'
+            }
+          }
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        } else {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+        this.tab2.getdataListParm.pagecount = 10
+        this.$nextTick(() => {
+          const ExcelDatas = [
+            {
+              tHeader: ['牧场', '合同编号', '合同状态', '供应商', '合同开始日期', '合同截止日期', '零库存', '备件编号', '备件名称', '规格', '备件品牌', '计量单位', '计划量', '单价', '备注', '录入人', '录入日期'],
+              filterVal: ['pastureName', 'contractCode', 'statue', 'providerName', 'startTime', 'stopTime', 'isZeroStock', 'partCode', 'partName', 'specification', 'brand', 'unit', 'planAmount', 'price', 'remark', 'creatorMan', 'creatorTime'],
+              tableDatas: response.data.list,
+              sheetName: '合同明细'
+            }
+          ]
+          json2excel(ExcelDatas, '合同明细', true, 'xlsx')
+        })
+      })
+    },
+    sapUpload(){
+      if(this.selectList.length == 0){
+        this.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+      let url = 'authdata/contract/push'
+      let ids = []
+      this.selectList.forEach((i)=>{
+        ids.push(i.id)
+        console.log(i,'===')
+      })
+      let data = {
+        pastureId:parseInt(Cookies.get('pastureid')),
+        providerId:this.tab1.detailsSpareParts.detailsList.providerId,
+        contractIdList:ids
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          this.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
+        } else {
+          this.$notify({ title: '上传失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+  .el-notification__content {
+    white-space: pre-line !important;
+  }
+</style>
+<style lang="scss">
+  .el-notification__content {
+      white-space: pre-line !important;
+    }
+</style>

+ 24 - 16
src/views/custom/custom/index.vue

@@ -32,7 +32,7 @@
       </el-select>
       <tree-select
         class="typeSelect"
-        :height="150"
+        :height="280"
         :width="250"
         size="small"
         clearable
@@ -85,6 +85,11 @@
         <template slot-scope="scope">
           <span>{{ scope.row.providerName }}</span>
         </template>
+      </el-table-column>
+        <el-table-column label="合同状态" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.statue }}</span>
+        </template>
       </el-table-column>
       <el-table-column label="备件编号" min-width="110px" align="center">
         <template slot-scope="scope">
@@ -160,11 +165,7 @@
         </template>
       </el-table-column>
       <el-table-column label="零库存" min-width="110px" align="center" :formatter="isZeroStock" />
-      <el-table-column label="合同状态" min-width="110px" align="center">
-        <template slot-scope="scope">
-          <span>{{ scope.row.statue }}</span>
-        </template>
-      </el-table-column>
+
       <el-table-column label="申购状态" min-width="80px" align="center">
         <template slot-scope="scope">
           <span v-if="scope.row.purchase_type == 1">暂估</span>
@@ -308,6 +309,7 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+                <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -349,6 +351,8 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+               <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
+
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -396,6 +400,8 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+               <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
+
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -434,6 +440,8 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+               <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
+
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -625,7 +633,7 @@ export default {
         name: 'getWarehouseListByProvider',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: '',
@@ -663,7 +671,7 @@ export default {
         name: 'getPartquitRecord',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           useForm: '',
@@ -678,7 +686,7 @@ export default {
         name: 'getPartrefundRecord',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           useForm: '',
@@ -693,7 +701,7 @@ export default {
         name: 'getCheckpartRecord',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           oddCode: '',
@@ -704,7 +712,7 @@ export default {
       //   name: 'getStockPastureList',
       //   page: 0,
       //   offset: 0,
-      //   pagecount: 10,
+      //   pagecount: 50,
       //   returntype: 'Map',
       //   parammaps: {
       //     pastureId: Cookies.get('pastureid')
@@ -733,7 +741,7 @@ export default {
         name: 'getBrandList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -741,7 +749,7 @@ export default {
         name: 'getProviderList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -753,7 +761,7 @@ export default {
         name: 'getStockPastureList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -797,7 +805,7 @@ export default {
         name: 'getPartLaidRecord',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           partCode: '',
@@ -815,7 +823,7 @@ export default {
         name: 'getPartUseRecord',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           useForm: '',

+ 6 - 6
src/views/custom/inventory/index.vue

@@ -285,7 +285,7 @@
 
           <tree-select
             class="typeSelect"
-            :height="150"
+            :height="280"
             :width="200"
             size="small"
             clearable
@@ -509,7 +509,7 @@ export default {
         name: 'getBigcheckpartList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           oddCode: '',
@@ -524,7 +524,7 @@ export default {
         name: 'getStockList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         params: []
       },
@@ -546,7 +546,7 @@ export default {
         name: 'getPartRepertoryList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         total: 0,
         parammaps: {
           pastureId: this.$store.state.user.pastureid
@@ -557,7 +557,7 @@ export default {
         name: 'getcheckpartbyBig',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         parammaps: {
           id: '',
           partCode: '',
@@ -571,7 +571,7 @@ export default {
         name: 'getcheckpartbyBig',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         parammaps: {
           id: '',
           partCode: '',

+ 1 - 1
src/views/custom/outRecord/index.vue

@@ -328,7 +328,7 @@ export default {
         name: 'getImportStockUseList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),

+ 282 - 20
src/views/custom/outStock/index.vue

@@ -6,11 +6,25 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="备件出库" name="first">
-        <!-- <div class="el-icon-info" style="font-size: 30px;float: right;color: #009C69;" @click="handleDescription" /> -->
         <div class="el-icon-info" style="font-size: 30px;float: right;color: #409EFF;" @click="handleDescription" />
         <div class="filter-container">
-          <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
+          <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场" class="filter-item" multiple
+              collapse-tags  filterable collapse-tags-tooltip  >
+               <!--  -->
+           <div class="select_up">
+                <el-button type="text" @click="selectAll">
+                    <i class="jw jw-quanxuan " />
+                    全选</el-button>
+                <el-button type="text" @click="removeTag(1)">
+                    <i class="jw jw-qingkong " />
+                    清空</el-button>
+                <el-button type="text" @click="selectReverse">
+                    <i class="jw jw-fanxuan " />
+                    反选</el-button>
+            </div>
+            <div class="select_list">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+            </div>
           </el-select>
           <el-input v-model="getdataListParm.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
           <el-select v-model="getdataListParm.parammaps.useType" clearable placeholder="出库方式" class="filter-item" style="width: 120px;">
@@ -19,9 +33,6 @@
           <el-select v-model="getdataListParm.parammaps.departmentId" style="width: 140px;" placeholder="领用部门" class="filter-item" clearable>
             <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
-          <!-- <el-select v-model="getdataListParm.parammaps.easStatus" style="width: 150px;" clearable placeholder="EAS同步状态" class="filter-item">
-            <el-option v-for="item in easStatus.easStatusList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select> -->
           <el-select v-model="getdataListParm.parammaps.sapStatus" style="width: 150px;" clearable placeholder="SAP上传状态" class="filter-item">
             <el-option v-for="item in easStatus.sapStatusList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
@@ -102,6 +113,7 @@
             </template>
           </el-table-column>
           <el-table-column label="出库日期" sortable prop="creatTime" min-width="100px" align="center" />
+          <el-table-column label="出库时间" sortable prop="creatDate" min-width="120px" align="center" />
           <!-- <el-table-column label="EAS同步状态" min-width="130px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.easStatus }}</span><br>
@@ -140,8 +152,23 @@
       </el-tab-pane>
       <el-tab-pane label="出库记录" name="second">
         <div class="filter-container">
-          <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+          <el-select v-model="getdataListParm2.parammaps.pastureArr" multiple
+              collapse-tags  filterable collapse-tags-tooltip filterable  style="width: 220px;" placeholder="牧场" class="filter-item">
+                 <!--  -->
+           <div class="select_up">
+                <el-button type="text" @click="selectAll2">
+                    <i class="jw jw-quanxuan " />
+                    全选</el-button>
+                <el-button type="text" @click="removeTag(2)">
+                    <i class="jw jw-qingkong " />
+                    清空</el-button>
+                <el-button type="text" @click="selectReverse2">
+                    <i class="jw jw-fanxuan " />
+                    反选</el-button>
+            </div>
+            <div class="select_list">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+             </div>
           </el-select>
           <el-input v-model="getdataListParm2.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
           <el-input v-model="getdataListParm2.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
@@ -149,12 +176,13 @@
           <el-select v-model="getdataListParm2.parammaps.providerId" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
             <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
-          <el-select v-model="getdataListParm2.parammaps.departmentId" style="width: 140px;" placeholder="领用部门" class="filter-item" clearable>
+          <el-select v-model="getdataListParm2.parammaps.departmentId" style="width: 220px;"  multiple
+        collapse-tags  filterable collapse-tags-tooltip filterable  placeholder="领用部门" class="filter-item" clearable>
             <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <tree-select
             class="typeSelect"
-            :height="150"
+            :height="280"
             :width="250"
             size="small"
             clearable
@@ -288,6 +316,8 @@
             </template>
           </el-table-column>
           <el-table-column label="出库日期" sortable prop="creatTime" min-width="120px" align="center" />
+          <el-table-column label="出库时间" sortable prop="creatDate" min-width="120px" align="center" />
+
           <el-table-column label="备注" min-width="130px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.note }}</span><br>
@@ -395,7 +425,16 @@
             </el-col>
             <el-col v-if="No2 && createTemp.useType == 6" :span="8">
               <el-form-item label="订单号:" prop="greenFodderNumber">
-                <el-input ref="greenFodderNumber" v-model="createTemp.greenFodderNumber" maxlength="20" />
+                <!-- <el-input ref="greenFodderNumber" v-model="createTemp.greenFodderNumber" maxlength="20" /> -->
+
+                <el-select ref="greenFodderNumber" v-model="createTemp.greenFodderNumber" filterable placeholder="订单号" class="filter-item" style="width:100%">
+                  <el-option
+                    v-for="item in numList"
+                    :key="item.id"
+                    :label="item.code"
+                    :value="item.code"
+                  />
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col v-if="isReceiveTime2" :span="8">
@@ -411,6 +450,19 @@
                 />
               </el-form-item>
             </el-col>
+            <!-- <el-col v-if="isReceiveTime2" :span="8">
+              <el-form-item label="出库时间:" prop="creatDate">
+                <el-time-picker
+                  v-model="createTemp.creatDate"
+                  arrow-control
+                  format="HH:mm:ss"
+                  value-format="HH:mm:ss"
+                  placeholder="出库时间"
+                />
+              </el-form-item>
+            </el-col> -->
+          </el-row>
+          <el-row>
             <el-col v-if="isReceiveTime2" :span="8">
               <el-form-item label="备注:" prop="note">
                 <el-input ref="note" v-model="createTemp.note" />
@@ -455,6 +507,17 @@
                 />
               </el-form-item>
             </el-col>
+            <!-- <el-col v-if="isReceiveTime" :span="8">
+              <el-form-item label="出库时间:" prop="creatDate">
+                <el-time-picker
+                  v-model="createTemp.creatDate"
+                  arrow-control
+                  format="HH:mm:ss"
+                  value-format="HH:mm:ss"
+                  placeholder="出库时间"
+                />
+              </el-form-item>
+            </el-col> -->
             <el-col v-if="isReceiveTime" :span="8">
               <el-form-item label="备注:" prop="note">
                 <el-input ref="note" v-model="createTemp.note" />
@@ -814,6 +877,19 @@
                 <el-input ref="creatTime" v-model="seeTemp.creatTime" disabled />
               </el-form-item>
             </el-col>
+
+            <el-col v-if="isCreatTimeAllo" :span="8">
+              <el-form-item label="出库时间:" prop="creatDate">
+                <el-time-picker
+                  v-model="createTemp.creatDate"
+                  arrow-control
+                  format="HH:mm:ss"
+                  value-format="HH:mm:ss"
+                  placeholder="出库时间"
+                />
+              </el-form-item>
+            </el-col>
+
             <el-col v-if="isCreatTimeAllo" :span="8">
               <el-form-item label="备注:" prop="note">
                 <el-input ref="note" v-model="seeTemp.note" disabled />
@@ -831,6 +907,11 @@
                 <el-input ref="creatTime" v-model="seeTemp.creatTime" disabled />
               </el-form-item>
             </el-col>
+            <el-col :span="8">
+              <el-form-item label="出库时间:" prop="creatDate">
+                <el-input ref="creatTime" v-model="seeTemp.creatDate" disabled />
+              </el-form-item>
+            </el-col>
             <el-col :span="8">
               <el-form-item label="备注:" prop="note">
                 <el-input ref="note" v-model="seeTemp.note" disabled />
@@ -1045,7 +1126,7 @@
 
 <script>
 // 引入
-import { GetDataByName, GetDataByNames, ExecDataByConfig, checkButtons, GetAccount, transData, PostDataByName, EasSync, SapUse } from '@/api/common'
+import { GetDataByName, GetDataByNames, ExecDataByConfig, checkButtons, GetAccount, transData, PostDataByName, EasSync, SapUse, getNumList } from '@/api/common'
 import waves from '@/directive/waves' // waves directive
 import { parseTime, sortChange } from '@/utils/index.js'
 // eslint-disable-next-line no-unused-vars
@@ -1067,6 +1148,8 @@ export default {
   },
   data() {
     return {
+      numList: [], // 青贮出库订单号
+      parueidIndex: '', // 当前赛场的id
       myHeight: document.documentElement.clientHeight - 85 - 250,
       isSap: 1,
       isSrm: 1,
@@ -1095,7 +1178,7 @@ export default {
         name: 'getImportStockLaidList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: '',
@@ -1149,7 +1232,7 @@ export default {
       requestParams: [
         { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
         { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllMainPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
         { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
         { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
         { name: 'getDictByName', offset: 0, pagecount: 0, params: ['耗用类别-父'] }
@@ -1192,7 +1275,7 @@ export default {
         name: 'getBigPartuseList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -1201,7 +1284,8 @@ export default {
           useForm: '',
           useType: '',
           easStatus: '',
-          sapStatus: ''
+          sapStatus: '',
+          pastureArr:[],
         }
       },
       list: [],
@@ -1214,7 +1298,7 @@ export default {
         name: 'getPartuseDetailList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: '',
@@ -1227,7 +1311,8 @@ export default {
           providerId: '',
           pastureName: Cookies.get('pasturename'),
           assetCode: '',
-          eqName: ''
+          eqName: '',
+          pastureArr:[],
         }
       },
       requestParam: {
@@ -1256,6 +1341,7 @@ export default {
         empId: Cookies.get('employeid'),
         pastureId: Cookies.get('pastureid'),
         receiveTime: parseTime(new Date(), '{y}-{m}-{d}'),
+        // creatDate: parseTime(new Date(), '{h}:{m}:{s}'),
         applicatId: Cookies.get('employeid'),
         departmentId: Cookies.get('departmentid'),
         greenFodderNumber: '',
@@ -1294,7 +1380,7 @@ export default {
         name: 'geteqbyNameCode',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -1346,7 +1432,7 @@ export default {
           name: 'getbigpartuseSync',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {
             pastureid: Cookies.get('pastureid')
@@ -1413,11 +1499,71 @@ export default {
       that.get_auto_buttons()
     })
     this.get_select_list()
-    this.get_table_data()
     this.getTypeList()
+
   },
 
   methods: {
+      // 删除
+    removeTag(type) {
+      if (type == 1) {
+        this.getdataListParm.parammaps.pastureArr = []
+      } else {
+        this.getdataListParm2.parammaps.pastureArr = []
+      }
+    },
+    // 全选
+    selectAll(val) {
+      val = []
+      this.findAllPasture.map(item => {
+          val.push(item.name)
+      })
+      this.getdataListParm.parammaps.pastureArr = val
+    },
+    // 反选
+    selectReverse(val) {
+        val = []
+        this.findAllPasture.map(item => {
+            let index = this.getdataListParm.parammaps.pastureArr.indexOf(item.name);
+            if (index != -1) {
+                //orgData.splice(index, 1)
+            } else {
+                val.push(item.name)
+            }
+        })
+        this.getdataListParm.parammaps.pastureArr = val
+    },
+
+      // 全选
+    selectAll2(val) {
+      val = []
+      this.findAllPasture.map(item => {
+          val.push(item.name)
+      })
+      this.getdataListParm2.parammaps.pastureArr = val
+    },
+    // 反选
+    selectReverse2(val) {
+        val = []
+        this.findAllPasture.map(item => {
+            let index = this.getdataListParm2.parammaps.pastureArr.indexOf(item.name);
+            if (index != -1) {
+                //orgData.splice(index, 1)
+            } else {
+                val.push(item.name)
+            }
+        })
+        this.getdataListParm2.parammaps.pastureArr = val
+    },
+    // 获取订单号数据
+    async getNumberArr(id) {
+      const params = {
+        pastureId: id
+      }
+      const data = await getNumList(params)
+      this.numList = data.data
+      console.log(data, 'hss-data')
+    },
     tableSort(column) {
       if (this.activeName == 'first') {
         sortChange(column, this.list)
@@ -1611,13 +1757,25 @@ export default {
       GetDataByNames(this.requestParams).then(response => {
         this.findAllProvider = response.data.findAllProvider.list
         this.findAllAssetType = response.data.findAllAssetType.list
-        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllPasture = response.data.findAllMainPasture.list
         this.findAllEmploye = response.data.findAllEmploye.list
         this.getDictByName = response.data.getDictByName.list
+        this.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+        this.getdataListParm2.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+        this.get_table_data()
         this.getDepartDownList()
+
+        this.parueidIndex = response.data.findAllMainPasture.list[0].id || Cookies.get('pastureid')
+        // 获取订单号
+        this.getNumberArr(this.parueidIndex)
       })
     },
     getDepartDownList() {
+      this.getDepartParam.parammaps.pastureId = Cookies.get('pastureid')
       GetDataByName(this.getDepartParam).then(response => {
         this.findAllDepart = response.data.list
       })
@@ -1644,8 +1802,21 @@ export default {
     },
     changePasture(item) {
       this.getDepartParam.parammaps.pastureId = item
+      this.requestUseForm.parammaps.pastureId = item
       this.edit = 1
       this.getCreateDepartDownList()
+      const arr = [
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': item } },
+        // { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': item }},
+      ]
+      GetDataByNames(arr).then(response => {
+        console.log('下拉框数据', response.data)
+        this.findAllEmploye = response.data.findAllEmploye.list
+        // this.findAllDepart = response.data.findAllDepart.list
+      })
+      // 获取订单号
+      this.getNumberArr(item)
+      this.getNumber()
     },
     changeDepart(item) {
       this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
@@ -1660,6 +1831,19 @@ export default {
         this.getdataListParm.parammaps.startTime = ''
         this.getdataListParm.parammaps.stopTime = ''
       }
+
+     // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+
       GetDataByName(this.getdataListParm).then(response => {
         console.log('table数据', response.data.list)
         this.list = response.data.list
@@ -1691,6 +1875,18 @@ export default {
         this.getdataListParm2.parammaps.startTime = ''
         this.getdataListParm2.parammaps.stopTime = ''
       }
+
+        if (this.getdataListParm2.parammaps.pastureArr && this.getdataListParm2.parammaps.pastureArr.length > 0) {
+        const arr2 = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm2.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids2 = arr2.map((child) => { return child.id })
+        console.log(arr2,ids2,'999999')
+        this.getdataListParm2.parammaps.pastureId = ids2.toString();
+     }
+     this.getdataListParm2.parammaps.departmentId = this.getdataListParm2.parammaps.departmentId.toString();
       GetDataByName(this.getdataListParm2).then(response => {
         this.list2 = response.data.list
         this.pageNum2 = response.data.pageNum
@@ -1816,6 +2012,7 @@ export default {
       this.createTemp.empId = parseInt(Cookies.get('employeid'))
       this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
       this.createTemp.receiveTime = parseTime(new Date(), '{y}-{m}-{d}')
+      this.createTemp.createDate = parseTime(new Date(), '{h}:{m}:{s}'), // TODO:
       this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
       this.createTemp.applicatId = parseInt(Cookies.get('employeid'))
       this.listAdd = []
@@ -1844,6 +2041,7 @@ export default {
       })
       this.getCreateNumber()
     },
+
     getCreateNumber() {
       GetDataByName(this.getParmCreateNumber).then(response => {
         this.$nextTick(() => {
@@ -2276,6 +2474,7 @@ export default {
             receiveTime: this.createTemp.receiveTime,
             empId: this.createTemp.empId,
             note: this.createTemp.note
+            // creatDate: this.createTemp.creatDate
           }}
 
           if (this.createTemp.oddCode == '') {
@@ -2390,6 +2589,7 @@ export default {
             useType: this.createTemp.useType,
             applicatId: this.createTemp.applicatId,
             receiveTime: this.createTemp.receiveTime,
+            // creatDate: this.createTemp.creatDate,
             empId: this.createTemp.empId,
             note: this.createTemp.note
           }}
@@ -2471,6 +2671,7 @@ export default {
             useType: 4,
             applicatId: this.createTemp.applicatId,
             receiveTime: this.createTemp.receiveTime,
+            // creatDate: this.createTemp.creatDate,
             empId: this.createTemp.empId,
             oddCode: this.createTemp.oddCode,
             note: this.createTemp.note
@@ -2583,6 +2784,7 @@ export default {
             useType: this.createTemp.useType,
             applicatId: this.createTemp.applicatId,
             receiveTime: this.createTemp.receiveTime,
+            // creatDate: this.createTemp.creatDate,
             empId: this.createTemp.empId,
             note: this.createTemp.note
           }}
@@ -2693,6 +2895,7 @@ export default {
             useType: this.createTemp.useType,
             applicatId: this.createTemp.applicatId,
             receiveTime: this.createTemp.receiveTime,
+            // creatDate: this.createTemp.creatDate,
             empId: this.createTemp.empId,
             note: this.createTemp.note,
             greenFodderNumber: this.createTemp.greenFodderNumber
@@ -2864,6 +3067,19 @@ export default {
       this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
       this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
       this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+      this.requestParam.parammaps.pastureId = this.getdataListParm.parammaps.pastureId
       GetAccount(this.requestParam).then(response => {
         this.$nextTick(() => {
           import('@/vendor/Export2Excel').then(excel => {
@@ -2921,6 +3137,20 @@ export default {
       this.requestParam.parammaps.partCode = this.getdataListParm2.parammaps.partCode
       this.requestParam.parammaps.partName = this.getdataListParm2.parammaps.partName
       this.requestParam.parammaps.providerId = this.getdataListParm2.parammaps.providerId
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm2.parammaps.pastureArr && this.getdataListParm2.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm2.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm2.parammaps.pastureId = ids.toString();
+      }
+      this.requestParam.parammaps.pastureId = this.getdataListParm2.parammaps.pastureId
+
       GetAccount(this.requestParam).then(response => {
         this.$nextTick(() => {
           import('@/vendor/Export2Excel').then(excel => {
@@ -3280,6 +3510,38 @@ export default {
   }
 </style>
 <style lang="scss" scoped>
+.select_up {
+    padding: 0 12px;
+    font-size: 14px;
+    position: absolute;
+    z-index: 99999;
+    background-color: white;
+    top: 0px;
+    width: 100%;
+    border-radius: 5px 5px 0 0;
+
+    ::v-deep .el-button {
+        color: #bcbcbc;
+        font-size: 14px;
+
+        i {
+            font-size: 14px;
+        }
+    }
+
+    ::v-deep .el-button:hover {
+        color: #409EFF;
+    }
+
+        .el-button+.el-button {
+            margin-left: 6px;
+        }
+    }
+
+    .select_list {
+        margin-top: 25px;
+    }
+
   .el-radio{
     margin: 10px 10px;
   }

+ 6 - 6
src/views/custom/outStock/index1.vue

@@ -125,7 +125,7 @@
           </el-select>
           <tree-select
             class="typeSelect"
-            :height="150"
+            :height="280"
             :width="250"
             size="small"
             clearable
@@ -1011,7 +1011,7 @@ export default {
         name: 'getImportStockLaidList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: '',
@@ -1107,7 +1107,7 @@ export default {
         name: 'getBigPartuseList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -1128,7 +1128,7 @@ export default {
         name: 'getPartuseDetailList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: '',
@@ -1206,7 +1206,7 @@ export default {
         name: 'geteqbyNameCode',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -1257,7 +1257,7 @@ export default {
           name: 'getbigpartuseSync',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {
             pastureid: Cookies.get('pastureid')

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1015 - 661
src/views/custom/purchase/index.vue


+ 0 - 2530
src/views/custom/purchase/index1.vue

@@ -1,2530 +0,0 @@
-<template>
-  <div class="app-container">
-    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
-      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
-      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
-    </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane v-if="isDistributionSheet" label="采购配单" name="first">
-        <div class="purchaseDistributionSheet">
-          <el-table
-            :key="tableKey1"
-            v-loading="listLoading1"
-            element-loading-text="给我一点时间"
-            :data="list1"
-            border
-            fit
-            :row-style="tableRowStyle"
-            :cell-style="tableCellStyle"
-            highlight-current-row
-            style="width: 100%;"
-            class="elTable table-fixed"
-            @cell-click="cellClick"
-            @sort-change="tableSort"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件编号" align="center" min-width="150px">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件名称" align="center" min-width="120px">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件规格" align="center" min-width="120px">
-              <template slot-scope="scope">
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件品牌" min-width="100px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.brand }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="计量单位" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="图片" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <el-popover placement="right" title="" trigger="hover">
-                  <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                  <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                </el-popover>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="price" label="单价" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sumAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <el-form :model="scope.row" :rules="rules">
-                  <el-form-item prop="amount">
-                    <el-input
-                      v-model="scope.row.amount"
-                      style="width:80px;margin-top:25px;height:10px"
-                    />
-                  </el-form-item>
-                </el-form>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-button :disabled="confirmationSheetDisabled" type="primary" style="float: right;margin-top: 10px;" @click="confirmationSheet()">确认配单</el-button>
-          <el-dialog :title="textMap[dialogStatusConfirmation]" :visible.sync="dialogFormVisibleConfirmation" :close-on-click-modal="false" style="width:100%;margin: 0 auto;overflow:auto">
-            <div class="app-contentConfirmationSheet">
-              <el-form ref="temp1" :rules="rules" :model="temp1" label-position="right" label-width="90px" style="width:100%;margin-bottom:50px">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <el-input ref="matchCode" v-model="temp1.matchCode" disabled />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="提交日期:" prop="buyerDate">
-                      <el-date-picker
-                        v-model="temp1.buyerDate"
-                        :picker-options="pickerOptions"
-                        type="date"
-                        placeholder="提交日期"
-                        format="yyyy-MM-dd"
-                        value-format="yyyy-MM-dd"
-                        style="width:170px;"
-                      />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="buyerPerson">
-                      <el-select v-model="temp1.buyerPerson" placeholder="采购员" class="filter-item">
-                        <el-option
-                          v-for="item in findAllEmploye"
-                          :key="item.id"
-                          :label="item.name"
-                          :value="item.id"
-                        />
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div v-for="(item,index) in listConfirmationSheet" :key="index" class="app-content">
-                <div class="title">
-                  <div>
-                    <b>采购单号:</b>
-                    <span>{{ item.orderNumber }}</span>
-                  </div>
-                  <div>
-                    <b>供应商:</b>
-                    <span>{{ item.providerName }}</span>
-                  </div>
-                </div>
-                <el-table
-                  :key="tableKey1"
-                  v-loading="listLoading1"
-                  element-loading-text="给我一点时间"
-                  :data="item.list"
-                  border
-                  fit
-                  highlight-current-row
-                  style="width: 97%;margin:0 auto"
-                  :row-style="rowStyle"
-                  :cell-style="cellStyle"
-                  class="elTable table-fixed"
-                >
-                  <!-- table表格 -->
-                  <el-table-column label="序号" align="center" type="index" width="50px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件编号" align="center" min-width="150px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.partCode }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件名称" align="center" min-width="120px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.partName }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件规格" align="center" min-width="120px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.specification }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="图片" min-width="110px" align="center">
-                    <template slot-scope="scope">
-                      <el-popover placement="right" title="" trigger="hover">
-                        <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                        <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                      </el-popover>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件品牌" min-width="100px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.brand }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="计量单位" min-width="80px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.unit }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="单价" min-width="70px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row. price }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="申购数量" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.sumAmount }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="合计采购数量" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.amount }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="总价" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ (scope.row.sumPrice = scope.row.price * parseFloat(scope.row.amount))| keepTwoNum }}</span>
-                    </template>
-                  </el-table-column>
-                </el-table>
-                <div ref="total" class="total">
-                  合计:
-                  <span>{{ item.Sum }}</span>
-                </div>
-              </div>
-              <div slot="footer" class="dialog-footer" style="bottom:10px">
-                <el-button type="primary" :disabled="isokDisable" @click="confirmationSheetData()">确认</el-button>
-                <el-button @click="dialogFormVisibleConfirmation= false;get_table_data1();">取消</el-button>
-              </div>
-            </div>
-          </el-dialog>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane v-if="isDistributionManagement" label="配单管理" name="fouth">
-        <div class="DistributionManagement">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm4.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm4.parammaps.matchCode" placeholder="配单号" clearable style="width: 200px;" class="filter-item" />
-            <el-select v-model="getdataListParm4.parammaps.statue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in status2" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="inputDatetime4" v-model="getdataListParm4.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search4">搜索</el-button>
-
-            
-            
-          </div>
-          <el-table
-            :key="tableKey4"
-            v-loading="listLoading4"
-            element-loading-text="给我一点时间"
-            :data="list4"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed" 
-            @sort-change="tableSort"
-            @current-change="handleCurrentChange"
-            :max-height="myHeight"
-          >
-         
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.matchCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购员" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="提交日期" sortable prop="dealTime" min-width="110px" align="center" />
-            <el-table-column sortable prop="cou" label="采购单数" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.cou }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
-           
-            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see4(row)">查看</el-button>
-                <el-button v-if="parseFloat(row.statue) === 0 && isExamineDM" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
-                <el-button v-else style="display:none;" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
-                <el-button v-if="parseFloat(row.statue) === 2" type="success" style="display:inline-block" size="mini" @click="form_edit(row)">编辑</el-button>
-                <el-button v-else style="display:none;" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="total4>0" :total="total4" :page.sync="getdataListParm4.offset" :limit.sync="getdataListParm4.pagecount" @pagination="get_table_data4" />
-          <el-dialog :title="textMap[dialogStatusSee4]" :visible.sync="dialogFormVisibleSee4" :close-on-click-modal="false">
-            <div class="app-contentSee">
-              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="80px" style="width: 800px;margin-bottom:30px">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <span>{{ temp4.matchCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ temp4.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="配单日期:" prop="dealTime">
-                      <span>{{ temp4.dealTime }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeySee4"
-                v-loading="listLoadingSee4"
-                element-loading-text="给我一点时间"
-                :data="listSee4"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-              >
-             
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="采购单号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.buyeCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="供应商" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.providerName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="price" label="单价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="amount" label="采购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.amount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumPrice" label="总价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumPrice }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="SGremark" label="备注" min-width="60px" align="center" />
-              </el-table>
-              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
-                <el-row>
-                  <el-col>
-                    <el-form-item label="流程进度" />
-                    <el-steps :active="active" align-center finish-status="success">
-                      <el-step
-                        v-for="(item,index) in activeList"
-                        :key="index"
-                        :title="item.title"
-                        :status="item.status"
-                      >
-                        <template slot="description">
-                          <div class="step-row">
-                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
-                            <div>{{ item.reason }}</div>
-                          </div>
-                        </template>
-                      </el-step>
-                    </el-steps>
-                  </el-col>
-                </el-row>
-                <el-row>
-                  <el-col>
-                    <el-form-item label="操作:">
-                      <!-- 审核 -->
-                      <el-button v-if="isExamineDM && temp4.statue == 0" type="success" style="display:inline-block" @click="handleExamine()">审核</el-button>
-                      <el-button v-else type="success" style="display:none" @click="handleExamine()">审核</el-button>
-
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-                <el-button @click="dialogFormVisibleSee4 = false;">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-
-          <el-dialog :title="textMap[dialogStatusUpdate4]" width="90%" :visible.sync="dialogFormVisibleUpdate4" :close-on-click-modal="false">
-            <div class="app-contentUpdate">
-              <el-form
-                ref="updateTemp4"
-                :rules="rules"
-                :model="updateTemp4"
-                label-position="right"
-                label-width="80px"
-                style="width:80%;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <span>{{ updateTemp4.matchCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ updateTemp4.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="配单日期:" prop="dealTime">
-                      <span>{{ updateTemp4.dealTime }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeyUpdate4"
-                v-loading="listLoadingUpdate4"
-                element-loading-text="给我一点时间"
-                :data="listUpdate4"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-              >
-                <!-- table表格 -->
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="采购单号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.buyeCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="供应商" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.providerName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="单价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="申购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="采购数量" min-width="100px" align="center">
-                  <template slot-scope="scope">
-                    <el-form :model="scope.row" :rules="rules">
-                      <el-form-item prop="amount">
-                        <el-input
-                          v-model="scope.row.amount"
-                          style="width:80px;margin-top:25px;height:10px"
-                        />
-                      </el-form-item>
-                    </el-form>
-                  </template>
-                </el-table-column>
-                <el-table-column label="总价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ (parseFloat(scope.row.price) * parseFloat(scope.row.amount)) | keepTwoNum2 }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-                <el-button type="primary" :disabled="isokDisable" @click="edit_dialog_save()">确认</el-button>
-                <el-button @click="dialogFormVisibleUpdate4 = false;">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-
-          <el-dialog :title="textMap[dialogStatus_Examine]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
-            <div class="app-examine">
-              <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
-              <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
-                <el-row style="width:88%;height:150px;margin:0 auto;">
-                  <el-col :span="20">
-                    <el-form-item>
-                      <el-radio-group v-model="examineTemp.SHstatue" @change="changeSHStatue">
-                        <el-radio :label="1" checked>通过</el-radio>
-                        <el-radio :label="2">不通过</el-radio>
-                      </el-radio-group>
-                    </el-form-item>
-                  </el-col>
-                  <el-col v-if="statueReason" :span="20">
-                    <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
-                  </el-col>
-                </el-row>
-              </el-form>
-            </div>
-            <div slot="footer" class="dialog-footer">
-              <el-button type="primary" :disabled="isokDisable" @click="dialogStatus_Examine==='examine'?createExamineData():createExamineData()">确认</el-button>
-              <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
-            </div>
-          </el-dialog>
-
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="采购单管理" name="second">
-        <div class="purchaseOrderManagement">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm2.parammaps.buyeCode" placeholder="采购单号" clearable style="width: 200px;" class="filter-item" />
-            <el-select v-model="getdataListParm2.parammaps.statu" clearable placeholder="单据状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in status" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-autocomplete v-model="getdataListParm2.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
-            <el-date-picker ref="inputDatetime2" v-model="getdataListParm2.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search2">搜索</el-button>
-            <el-button v-waves v-if="isPurchaseSap" class="filter-item" type="primary" @click="sapUpload">SAP上传</el-button>
-            <el-button v-waves  v-if="isPurchaseSrm" class="filter-item" type="primary" @click="srmUpload">SRM上传</el-button>
-          </div>
-          <el-table
-            :key="tableKey2"
-            v-loading="listLoading2"
-            element-loading-text="给我一点时间"
-            :data="list2"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            @selection-change="change_table_selection"
-          >
-          <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" />
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.buyeCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购员" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="提交日期" sortable prop="buyerDate" min-width="110px" align="center" />
-            <el-table-column label="最近到货日期" sortable prop="DoneDate" min-width="110px" align="center" />
-            <el-table-column label="单据状态" min-width="80px" align="center" :formatter="statu" />
-            <el-table-column  prop="sapNumber" label="sap编码" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{scope.row.sapNumber}}</span>
-              </template>
-            </el-table-column>
-            <el-table-column   prop
-            <el-table-column   prop="sapstatus" label="sap上传状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-show="scope.row.sapstatus == 1">上传失败</span>
-                <span v-show="scope.row.sapstatus == -1">未上传</span>
-                <span v-show="scope.row.sapstatus == 0">上传成功</span>
-              </template>
-            </el-table-column>
-            <el-table-column   prop="srmstatus" label="srm上传状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-show="scope.row.srmstatus == 1">上传失败</span>
-                <span v-show="scope.row.srmstatus == -1">未上传</span>
-                <span v-show="scope.row.srmstatus == 0">上传成功</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see2(row)">查看</el-button>
-                <el-button v-if="(row.statu === 2 || row.statu === 4) && isPurchaseClose" style="display:none" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
-                <el-button v-else-if="isPurchaseClose" style="display:inline-block" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="total2>0" :total="total2" :page.sync="getdataListParm2.offset" :limit.sync="getdataListParm2.pagecount" @pagination="get_table_data2" />
-          <el-dialog :title="textMap[dialogStatusSee2]" :visible.sync="dialogFormVisibleSee2" :close-on-click-modal="false">
-            <div class="app-contentSee">
-              <el-form
-                ref="temp2"
-                :rules="rules"
-                :model="temp2"
-                label-position="right"
-                label-width="80px"
-                style="width: 800px;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="采购单号:" prop="buyeCode">
-                      <span>{{ temp2.buyeCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="6">
-                    <el-form-item label="供应商:" prop="providerName">
-                      <span>{{ temp2.providerName }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="5">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ temp2.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="5">
-                    <el-form-item label="提交日期:" prop="buyerDate">
-                      <span>{{ temp2.buyerDate }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeySee2"
-                v-loading="listLoadingSee2"
-                element-loading-text="给我一点时间"
-                :data="listSee2"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-                @sort-change="tableSort2"
-              >
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="130px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="price" label="单价(元)" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="amount" label="采购数量" min-width="130px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.amount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumPrice" label="总价(元)" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumPrice }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.receiveAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="SGremark" label="备注" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.SGremark }}</span>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <div class="sum" style="right:30px;position:absolute;bottom:90px">
-                <b>总计:{{ temp2.sumPrices }}元</b>
-              </div>
-              <div class="stuts" style="left:30px;position:absolute;bottom:70px">
-                <b>单据状态:{{ temp2.statu }}</b>
-                <b v-if="isStatu">关闭原因:{{ temp2.note }}</b>
-                <div v-if="isExtensionDays">延期天数:{{ temp2.extensionDays }}</div>
-              </div>
-              <div
-                slot="footer"
-                class="dialog-footer"
-                style="right:30px;position:absolute;bottom:10px"
-              >
-                <el-button @click="dialogFormVisibleSee2 = false;get_table_data2()">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-          <el-dialog :title="textMap[dialogStatusClose]" :visible.sync="dialogFormVisibleClose" :close-on-click-modal="false" style="width:70%;margin: 0 auto">
-            <div class="app-contentClose">
-              <el-form
-                ref="temp2"
-                :rules="rules"
-                :model="temp2"
-                label-position="right"
-                label-width="80px"
-                style="width: 300px;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="24">
-                    <el-form-item label="采购单号:" prop="orderNo">
-                      <span>{{ temp2.buyeCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-                <el-row>
-                  <el-col :span="24">
-                    <el-form-item label="" prop="note">
-                      <el-input ref="note" v-model="temp2.note" type="textarea" placeholder="请输入关闭该采购单原因" />
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div
-                slot="footer"
-                class="dialog-footer"
-                style="right:30px;position:absolute;bottom:10px"
-              >
-                <el-button @click="dialogFormVisibleClose = false;get_table_data2();">取消</el-button>
-                <el-button type="primary" :disabled="isokDisable" @click="closeData()">确认关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="采购明细" name="third">
-        <div class="procurementDetails">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm3.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm3.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
-            <el-input v-model="getdataListParm3.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
-            <el-autocomplete v-model="getdataListParm3.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
-            <el-input v-model="getdataListParm3.parammaps.matchCode" placeholder="配单号" style="width: 140px;" class="filter-item" />
-            <el-input v-model="getdataListParm3.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />
-            <el-select v-model="getdataListParm3.parammaps.isStorage" clearable placeholder="到货情况" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in isStorages" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="inputDatetime3" v-model="getdataListParm3.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search3">搜索</el-button>
-            <el-button v-if="isPurchaseExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload3">导出</el-button>
-          </div>
-          <el-table
-            :key="tableKey3"
-            v-loading="listLoading3"
-            element-loading-text="给我一点时间"
-            :data="list3"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.matchCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.buyeCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件编号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件名称" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件规格" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件品牌" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.brand }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="计量单位" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="price" label="单价" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sumAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="amount" label="采购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.amount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.receiveAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="申购部门" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.departmentName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购人" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单日期" sortable prop="buyerDate" min-width="110px" align="center" />
-            <!-- <el-table-column label="备注" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.note }}</span>
-              </template>
-            </el-table-column> -->
-          </el-table>
-          <pagination v-show="total3>=0" :total="total3" :page.sync="getdataListParm3.offset" :limit.sync="getdataListParm3.pagecount" @pagination="get_table_data3" />
-        </div>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-// 引入
-import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, failproccess, checkButtons, GetAccount,SapOrder,SrmOrder } from '@/api/common'
-import waves from '@/directive/waves' // waves directive
-import Pagination from '@/components/Pagination' // secondary package based on el-pagination
-import Cookies from 'js-cookie'
-import { parseTime, sortChange, json2excel } from '@/utils/index.js'
-export default {
-  name: 'Purchase',
-  components: { Pagination },
-  directives: { waves },
-  filters: {
-    keepTwoNum(value) {
-      value = Number(value)
-      return value.toFixed(3)
-    },
-    keepTwoNum2(value) {
-      value = Number(value)
-      return value.toFixed(2)
-    }
-  },
-  data() {
-    return {
-      myHeight:document.documentElement.clientHeight - 85- 150,
-      isSap:1,
-      isSrm:1,
-      selectList: [],
-
-      isPurchaseSap: [],isPurchaseSrm: [],
-      isPurchaseSee: [], isPurchaseClose: [], isPurchaseExport: [], isDistributionSheet: [], isDistributionManagement: [], isExamineDM: [],
-      stripe: true,
-      activeName: 'first',
-      listLoading1: false,
-      tableKey1: 0,
-      list1: [],
-      confirmationSheetDisabled: false,
-      isokDisable: false,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now() // 当天之前的时间可选
-        }
-      },
-      temp: {},
-      total: 0,
-      total1: 0,
-      listParmConfirmation: [],
-      listConfirmationSheet: null,
-      getParmPurchaseOrderNumber: {
-        name: 'autoCreatCode',
-        page: 1,
-        offset: 1,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'CG'
-        }
-      },
-      postDataPramas: {},
-      requestProvider: {
-        name: 'getProviderList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {}
-      },
-      listLoading2: false,
-      tableKey2: 0,
-      list2: [],
-      status2: [
-        { id: '0', name: '审核中' },
-        { id: '1', name: '审核通过' },
-        { id: '2', name: '审核驳回' }
-      ],
-      status: [
-        { id: '0', name: '未到货' },
-        { id: '1', name: '部分到货' },
-        { id: '2', name: '按时到货' },
-        { id: '3', name: '已延期' },
-        { id: '4', name: '已关闭' },
-        { id: '5', name: '部分到货-延期' },
-        { id: '6', name: '全部到货-延期' }
-      ],
-      isStorages: [
-        { id: '0', name: '未入库' },
-        { id: '1', name: '已入库' }
-      ],
-      isStatu: false,
-      listLoadingSee2: false,
-      tableKeySee2: 0,
-      total2: 0,
-      total3: 0,
-      listLoading3: false,
-      tableKey3: 0,
-      list3: [],
-      findAllEmploye: [],
-      findAllPasture: [],
-      requestParams: [
-        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }}
-      ],
-      getdataListParm1: {
-        name: 'getbuydetailParts',
-        page: 1,
-        // offset: 1,
-        // pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid')
-        }
-      },
-      getdataListPart: {
-        name: 'getpartpurchasebg',
-        page: 1,
-        // offset: 1,
-        // pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          id: Cookies.get('pastureid')
-        }
-      },
-      partData: [],
-      getParmCreateNumber: {
-        name: 'autoCreatCode',
-        page: 1,
-        offset: 1,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'PD'
-        }
-      },
-      pageNum1: 0,
-      pageSize1: 0,
-      temp1: {
-        pastureId: Cookies.get('pastureid'),
-        buyerPerson: this.$store.state.user.employeid,
-        buyerDate: parseTime(new Date(), '{y}-{m}-{d}')
-      },
-      getdataListParm2: {
-        name: 'getBigbuydetailList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          providerName: '',
-          buyeCode: '',
-          inputDatetime: '',
-          // pastureId: Cookies.get('pastureid'),
-          pastureName: Cookies.get('pasturename')
-        }
-      },
-      dialogFormVisibleConfirmation: false,
-      dialogStatusConfirmation: '',
-      pageNum2: 0,
-      pageSize2: 0,
-      temp2: {
-        note: ''
-      },
-      getdataListParm3: {
-        name: 'getbuydetailList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pastureName: Cookies.get('pasturename'),
-          providerName: '',
-          partCode: '',
-          partName: '',
-          matchCode: '',
-          buyeCode: '',
-          isStorage: '',
-          startTime: '',
-          stopTime: '',
-          inputDatetime: ''
-        }
-      },
-      isExtensionDays: false,
-      listSee2: [],
-      getdataListSee2: {
-        name: 'getbuydetailListbyBig',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      requestParamStute: {
-        name: 'updateBigbuydetailStatu',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      pageNum3: 0,
-      pageSize3: 0,
-      temp3: {},
-      dialogFormVisibleSee2: false,
-      dialogStatusSee2: '',
-
-      // 配单管理
-      listLoading4: false,
-      tableKey4: 0,
-      list4: [],
-      pageNum4: 0,
-      pageSize4: 0,
-      total4: 0,
-      getdataListParm4: {
-        name: 'getbigpartdeallist',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pastureName: Cookies.get('pasturename'),
-          matchCode: '',
-          statue: '',
-          inputDatetime: '',
-          startTime: '',
-          stopTime: ''
-        }
-      },
-      dialogFormVisibleSee4: false,
-      dialogStatusSee4: '',
-      temp4: {},
-      listSee4: [],
-      tableKeySee4: 0,
-      listLoadingSee4: false,
-      getdataListSee4: {
-        name: 'getbigpartdealdetiallist',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      activeList: [],
-      active: 3,
-
-      currentRow:{},
-
-      dialogStatusUpdate4: '',
-      dialogFormVisibleUpdate4: false,
-      updateTemp4: {},
-      listUpdate4: [],
-      tableKeyUpdate4: 0,
-      listLoadingUpdate4: false,
-
-      dialogFormVisible_Examine: false,
-      dialogStatus_Examine: '',
-      examineTemp: {
-        SHstatue: 1,
-        workflowNote: ''
-      },
-      statueReason: false,
-      dialogFormVisibleClose: false,
-      dialogStatusClose: '',
-      textMap: {
-        confirmation: '确认配单',
-        see: '查看详情',
-        close: '关闭提示',
-        examine: '审核',
-        update: '编辑'
-      },
-      // 校验规则
-      rules: {
-        equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
-        note: [{ required: true, message: '必填', trigger: 'blur' }]
-      },
-      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      buttons: [],
-      downloadListParm3: {},
-      downloadList3: [],
-      isPercentage: false,
-      percentage: 1
-    }
-  },
-  created() {
-    const that = this
-    // GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
-    //   that.buttons = response.data.list
-    //   that.get_auto_buttons()
-    //   if (this.isDistributionSheet == true) {
-    //     this.activeName = 'first'
-    //     console.log(1, this.isDistributionSheet, this.isDistributionManagement)
-    //   } else if (this.isDistributionManagement == true) {
-    //     this.activeName = 'fouth'
-    //     console.log(2, this.isDistributionSheet, this.isDistributionManagement)
-    //   } else if (this.isDistributionSheet == false && this.isDistributionManagement == false) {
-    //     this.activeName = 'second'
-    //     console.log(3, this.isDistributionSheet, this.isDistributionManagement)
-    //   }
-    // })
-    // this.get_select_list()
-    // this.get_table_data1()
-    // this.get_table_data2()
-    // this.get_table_data3()
-    // this.get_table_data4()
-    // if (this.$route.query.activeName !== undefined) {
-    //   this.activeName = this.$route.query.activeName
-    // }
-
-
-   
-
-
-      
-  },
-
-  methods: {
-    tableSort(column) {
-      if (this.activeName == 'first') {
-        sortChange(column, this.list1)
-      } else if (this.activeName == 'second') {
-        sortChange(column, this.list2)
-      } else if (this.activeName == 'third') {
-        sortChange(column, this.list3)
-      } else if (this.activeName == 'fouth') {
-        sortChange(column, this.list4)
-      }
-    },
-    tableSort2(column) {
-      sortChange(column, this.listSee2)
-    },
-    get_auto_buttons() {
-      const DistributionSheet = 'customs:purchase:distributionSheet'
-      const isDistributionSheet = checkButtons(this.$store.state.user.buttons, DistributionSheet)
-      this.isDistributionSheet = isDistributionSheet
-
-      const PurchaseSee = 'customs:purchase:see'
-      const isPurchaseSee = checkButtons(this.$store.state.user.buttons, PurchaseSee)
-      this.isPurchaseSee = isPurchaseSee
-
-      const PurchaseClose = 'customs:purchase:close'
-      const isPurchaseClose = checkButtons(this.$store.state.user.buttons, PurchaseClose)
-      this.isPurchaseClose = isPurchaseClose
-
-      const PurchaseSap = 'customs:purchase:sap'
-      const isPurchaseSap = checkButtons(this.$store.state.user.buttons, PurchaseSap)
-      this.isPurchaseSap = isPurchaseSap
-
-      const PurchaseSrm = 'customs:purchase:srm'
-      const isPurchaseSrm = checkButtons(this.$store.state.user.buttons, PurchaseSrm)
-      this.isPurchaseSrm = isPurchaseSrm
-
-      const PurchaseExport = 'customs:purchase:export'
-      const isPurchaseExport = checkButtons(this.$store.state.user.buttons, PurchaseExport)
-      this.isPurchaseExport = isPurchaseExport
-
-      const ExamineDM = 'customs:purchase:shenhe'
-      const isExamineDM = checkButtons(this.$store.state.user.buttons, ExamineDM)
-      this.isExamineDM = isExamineDM
-
-      const DistributionManagement = 'customs:purchase:peidanjiemian'
-      const isDistributionManagement = checkButtons(this.$store.state.user.buttons, DistributionManagement)
-      this.isDistributionManagement = isDistributionManagement
-    },
-    cellClick(row, column, cell, event) {
-      console.log(cell)
-      console.log('column', column)
-      console.log('行索引', row.id)
-      console.log('列索引', column.id)
-      return {
-        background: '#eceb3c'
-      }
-      // console.log('event',event)
-    },
-    tableRowStyle({ row, rowIndex }) {
-      console.log(row, row)
-      console.log(' row.isParity', row.isParity)
-      console.log(parseInt(row.isParity) % 2 == 0)
-      if (parseInt(row.isParity) % 2 == 0) {
-        return {
-          background: '#eee'
-        }
-      }
-      return {
-        background: ''
-      }
-    },
-    tableCellStyle({ row, column, rowIndex, columnIndex }) {
-      if (row.isNo == 'No' && columnIndex === 10) {
-        return {
-          background: 'red'
-        }
-      }
-      return {
-        background: ''
-      }
-    },
-    handleClick(tab, event) {
-      console.log(tab, event)
-      if (tab.name === 'first') {
-        this.get_table_data1()
-      } else if (tab.name === 'fouth') {
-        this.get_table_data4()
-      } else if (tab.name === 'second') {
-        this.get_table_data2()
-      } else if (tab.name === 'third') {
-        this.get_table_data3()
-      }
-    },
-    get_select_list() {
-      GetDataByNames(this.requestParams).then(response => {
-        this.findAllEmploye = response.data.findAllEmploye.list
-        this.findAllPasture = response.data.findAllPasture.list
-      })
-    },
-    providerSearch(queryString, cb) {
-      console.log('供应商模糊查询输入值', queryString)
-      this.requestProvider.parammaps['providerName'] = queryString
-      GetDataByName(this.requestProvider).then(response => {
-        console.log('供应商模糊查询搜索data', response.data.list)
-        cb(response.data.list)
-      })
-    },
-    handleSelectProvider(item) {
-      console.log('供应商模糊查询选中值', item)
-    },
-    get_table_data1() {
-      this.listLoading1 = true
-      GetDataByName(this.getdataListPart).then(response => {
-        console.log(response)
-        this.partData = response.data.list
-      })
-      GetDataByName(this.getdataListParm1).then(response => {
-        console.log('this.list1', response.data.list)
-        if (response.data.list === null) {
-          this.list1 = []
-          this.confirmationSheetDisabled = true
-        } else {
-          // eslint-disable-next-line no-unused-vars
-          var list1
-          list1 = response.data.list
-          var result = []
-          list1.forEach((i, j) => {
-            // eslint-disable-next-line no-irregular-whitespace
-            Array.from(new Set(list1.map(function(item) { return item.partCode }))).forEach((x, y) => {
-              if (i.partCode === x) {
-                result.push({
-                  'amount': i.amount,
-                  'amountPre': i.amountPre,
-                  'bigId': i.bigId,
-                  'brand': i.brand,
-                  'brandId': i.brandId,
-                  'contractCode': i.contractCode,
-                  'count': i.count,
-                  'enable': i.enable,
-                  'id': i.id,
-                  'inventoryType': i.inventoryType,
-                  'isZeroStock': i.isZeroStock,
-                  'orderNumber': i.orderNumber,
-                  'partCode': i.partCode,
-                  'partId': i.partId,
-                  'partName': i.partName,
-                  'pastureId': i.pastureId,
-                  'pastureName': i.pastureName,
-                  'planAmount': i.planAmount,
-                  'price': i.price,
-                  'providerId': i.providerId,
-                  'providerName': i.providerName,
-                  'purpose': i.purpose,
-                  'remark': i.remark,
-                  'specification': i.specification,
-                  'sumAmount': i.sumAmount,
-                  'unit': i.unit,
-                  'isNo': i.isNo,
-                  'srcpath': i.srcpath,
-                  'picpath': i.picpath,
-                  'departmentName': i.departmentName,
-                  'isParity': y
-                })
-              }
-            })
-          })
-          console.log(result)
-          if (result !== null) {
-            for (let i = 0; i < result.length; i++) {
-              console.log(result[i].srcpath)
-              if (result[i].srcpath !== null && result[i].picpath !== null && result[i].srcpath !== undefined && result[i].picpath !== undefined) {
-                result[i].srcpath = process.env.VUE_APP_BASE_API + result[i].srcpath
-                result[i].picpath = process.env.VUE_APP_BASE_API + result[i].picpath
-              } else {
-                // this.$set(result[i], 'srcpath', '')
-                // this.$set(result[i], 'picpath', '')
-                result[i].srcpath = ''
-                result[i].picpath = ''
-              }
-            }
-          }
-          // console.log(result)
-          this.list1 = result
-          console.log('处理后table数', this.list1)
-          this.confirmationSheetDisabled = false
-        }
-        var tem = ''
-        for (var i = 0; i < this.list1.length; i++) {
-          if (tem !== this.list1[i].partCode) {
-            this.list1[i].amount = this.list1[i].sumAmount
-            tem = this.list1[i].partCode
-          } else {
-            this.list1[i].amount = 0
-          }
-        }
-        // var a = 0
-        // var b = 0
-        // for (var i = 0; i < this.list1.length; i++) {
-        //   if (parseInt(this.list1[i].amountPre) !== 0) {
-        //     console.log(parseInt(this.list1[i].amountPre))
-        //     if (a <= 0) {
-        //       a = this.list1[i].count - 1
-        //       if (b === 0) {
-        //         b = parseInt(this.list1[i].amountPre)
-        //       }
-        //     } else {
-        //       a--
-        //     }
-        //     if (b > 0) {
-        //       this.list1[i].amount = this.list1[i].amount + 1
-        //       b--
-        //     }
-        //   }
-        // }
-        if (response.data.total) {
-          this.total1 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading1 = false
-        }, 300)
-      })
-    },
-    confirmationSheet() {
-      console.log('点击立确认配单')
-      this.temp1.matchCode = ''
-      console.log(this.list1) // table表格数据
-      // -------------------------------------------
-      function groupBy1(array, f) {
-        var groups1 = {}
-        array.forEach(function(o) {
-          var group2 = JSON.stringify(f(o))
-          console.log("group2",group2)
-          groups1[group2] = groups1[group2] || []
-          groups1[group2].push(o)
-        })
-        return Object.keys(groups1).map(function(group2) {
-          return groups1[group2]
-        })
-      }
-      var sorted1 = groupBy1(this.list1, function(item) {
-        return [item.partCode]
-      })
-      console.log('表格数据根据供应商分划', sorted1)
-
-
-
-
-
-      for (var i = 0; i < sorted1.length; i++) {
-        var b = 0
-        var c = 0
-        for (var j = 0; j < sorted1[i].length; j++) {
-          // eslint-disable-next-line no-self-compare
-          if (sorted1[i][j].partCode === sorted1[i][j].partCode) {
-            // console.log(sorted1[i][j])
-            var element = sorted1[i][j]
-            b += parseInt(element.amount)
-            c = parseInt(element.sumAmount)
-            // console.log("amount", element.amount);
-          }
-        }
-        if (b > c || b < c) {
-          console.log('No')
-          console.log(element.id)
-          for (var a = 0; a < this.list1.length; a++) {
-            if (element.id === this.list1[a].id) {
-              console.log(this.list1[a].partCode)
-              for (var b = 0; b < this.list1.length; b++) {
-                if (this.list1[b].partCode === this.list1[a].partCode) {
-                  console.log(this.list1[b])
-                  this.$set(this.list1[b], 'isNo', 'No')
-                } else {
-                  this.$set(this.list1[b], 'isNo', 'Yes')
-                }
-              }
-            } else {
-              this.$set(this.list1[a], 'isNo', 'Yes')
-            }
-          }
-          console.log(b)
-          this.$message({
-            type: 'warning',
-            message: '同一备件多个供应商合计采购数量总和等于申购数量'
-          })
-          return
-        } else {
-          for (var a = 0; a < this.list1.length; a++) {
-            this.$set(this.list1[a], 'isNo', 'Yes')
-            var rulesAmount = /^[0-9]\d*$/
-            if (!rulesAmount.test(this.list1[a].amount)) {
-              this.$message({
-                type: 'error',
-                message: '采购数量请输入正整数',
-                duration: 2000
-              })
-              return false
-            }
-          }
-          // console.log('Yes')
-        }
-      }
-      this.getCreateNumber()
-      // -------------------------------------------
-      this.dialogStatusConfirmation = 'confirmation'
-      this.dialogFormVisibleConfirmation = true
-
-      console.log('确认配单data------',  JSON.stringify(this.list1) )
-      // this.list1 = this.list1.filter(i => parseFloat(i.amount) !== 0)
-      console.log(this.list1)
-      console.log('根据供应商分类', sorted1)
-      console.log('根据供应商分类表格listConfirmationSheet', this.listConfirmationSheet)
-      // 处理渲染数据
-      var providerNameMap = {}
-      var providerNameDest = []
-
-      var departmentNameMap = {}
-
-
-      
-
-
-
-  
-
-      // // eslint-disable-next-line no-redeclare
-      // for (var i = 0; i < this.list1.length; i++) {
-      //   console.log(this.list1[i])
-      //   var ai = this.list1[i]
-      //   var price = this.list1[i].price
-      //   var amount = this.list1[i].amount
-      //   // console.log(price, amount)
-      //   var sumPrice = 0
-      //   sumPrice = parseFloat(price) * parseFloat(amount)
-      //   if (!providerNameMap[ai.providerName]) {
-
-
-      //       providerNameDest.push({
-      //         price: [price],
-      //         amount: [amount],
-      //         sumPrice: [sumPrice],
-      //         providerId: ai.providerId,
-      //         providerName: ai.providerName,
-      //         purpose: ai.purpose,
-      //         list: [ai]
-      //       })
-      //       providerNameMap[ai.providerName] = ai
-      //       providerNameMap[ai.providerId] = ai
-
-
-
-      //   } else {
-      //     // eslint-disable-next-line no-redeclare
-      //     for (var j = 0; j < providerNameDest.length; j++) {
-      //       console.log(providerNameDest[j])
-      //       var dj = providerNameDest[j]
-      //       if (dj.providerName === ai.providerName) {
-      //         dj.sumPrice.push(sumPrice)
-      //         dj.price.push(price)
-      //         // eslint-disable-next-line no-mixed-spaces-and-tabs
-      //         dj.amount.push(amount)
-      //         dj.list.push(ai)
-      //         break
-      //       }
-      //     }
-      //   }
-      // }
-
-      // var providerNameArray = []
-      // // eslint-disable-next-line no-redeclare
-      // for (var i = 0; i < this.list1.length; i++) {
-      //   providerNameArray.push(this.list1[i].providerName)
-      // }
-      // // console.log('原供应商', providerNameArray)
-      // function unique(providerNameArray) {
-      //   return Array.from(new Set(providerNameArray))
-      // }
-      // var uniqueProviderNameArray = unique(providerNameArray)
-      // console.log('去重后供应商', uniqueProviderNameArray) // ["泰森机电", "浩祥晟机电", "国宇商贸", "赛娜牧业"]
-      // // ------------------------------------------
-
-      // var OrderNumberArray = []
-      // this.postDataPramas.common = { 'returnmap': '0' }
-      // this.postDataPramas.data = []
-      // for (var i = 0; i < uniqueProviderNameArray.length; i++) {
-      //   this.postDataPramas.data[i] = { 'name': 'autoCreatCode', 'type': 'sm', 'parammaps': {
-      //     pastureId: Cookies.get('pastureid'),
-      //     codeType: 'CG'
-      //   }}
-      // }
-      // ExecDataByConfig(this.postDataPramas).then(response => {
-      //   console.log('采购单请求发送参数', this.postDataPramas)
-      //   for (var i = 0; i < response.data.length; i++) {
-      //     // console.log(response.data[i].resultmaps[0].orderCode)
-      //     OrderNumberArray.push(response.data[i].resultmaps[0].orderCode)
-      //   }
-      //   console.log(OrderNumberArray)
-      //   this.listConfirmationSheet.map((item, index) => {
-      //     item.orderNumber = OrderNumberArray[index]
-      //     return item
-      //   })
-      //   this.$forceUpdate()
-      // })
-      // console.log(OrderNumberArray)
-      // this.listConfirmationSheet = providerNameDest
-      // // console.log(JSON.stringify(this.listConfirmationSheet))
-      // console.log('根据供应商分类表格listConfirmationSheet', this.listConfirmationSheet)
-
-
-
-
-
-      // var SumArray = []
-
-      // this.listConfirmationSheet.forEach((item, index) => {
-      //   console.log(item.sumPrice)
-      //   // console.log(item.sumPrice.reduce((count, v) => count + v, 0))
-      //   SumArray.push(item.sumPrice.reduce((count, v) => count + v, 0).toFixed(3))
-      // })
-      // this.listConfirmationSheet.map((item, index) => {
-      //   // console.log(item, index)
-      //   item.Sum = SumArray[index]
-      //   return item
-      // })
-
-      // console.log('根据供应商分类表格listConfirmationSheet', this.listConfirmationSheet)
-      // -------------------------------------------
-    },
-    getCreateNumber() {
-      GetDataByName(this.getParmCreateNumber).then(response => {
-        this.$nextTick(() => {
-          this.show = false
-          console.log('配单号', response.data.list[0].orderCode)
-          this.temp1.matchCode = response.data.list[0].orderCode
-          this.$forceUpdate()
-        })
-      })
-    },
-    confirmationSheetData() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      console.log('点击了确认配单提交')
-      this.$refs['temp1'].validate(valid => {
-        if (valid) {
-          // orderNumber
-          if (this.temp1.matchCode == '' || this.temp1.matchCode == null || this.temp1.matchCode == undefined) {
-            this.getCreateNumber()
-          }
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          console.log(this.listConfirmationSheet)
-          for (let i = 0; i < this.listConfirmationSheet.length; i++) {
-            if (this.listConfirmationSheet[i].orderNumber == null || this.listConfirmationSheet[i].orderNumber == undefined) {
-              this.$notify({
-                title: '保存失败',
-                message: '网络异常未生成采购单,请刷新后重新进行配单',
-                type: 'warning',
-                duration: 2000
-              })
-              return false
-            }
-          }
-          var a = this.listConfirmationSheet.length
-          this.listConfirmationSheet.forEach((item, index) => {
-            console.log(item)
-            this.postDataPramas.data[index] = { 'name': 'insertBigbuydetail', 'resultname': 'insertBigbuydetail' + index, 'type': 'e', 'parammaps': {
-              pastureId: Cookies.get('pastureid'),
-              buyeCode: item.orderNumber,
-              providerId: item.providerId,
-              buyerPerson: this.temp1.buyerPerson,
-              buyerDate: this.temp1.buyerDate,
-              matchCode: this.temp1.matchCode
-            }}
-            this.postDataPramas.data[a] = { 'name': 'insertSpotList', 'resultmaps': { 'list': item.list }}
-            this.postDataPramas.data[a].children = []
-            this.postDataPramas.data[a].children[0] = { 'name': 'insertbuydetail', 'type': 'e', 'parammaps': {
-              bigId: '@insertBigbuydetail' + index + '.LastInsertId',
-              pastureId: '@insertSpotList.pastureId',
-              contractCode: '@insertSpotList.contractCode',
-              amount: '@insertSpotList.amount',
-              sumAmount: '@insertSpotList.sumAmount',
-              contractId: '@insertSpotList.id',
-              departmentName: '@insertSpotList.departmentName',
-              remark: '@insertSpotList.purpose'
-            }}
-            a = a + 1
-          })
-          this.postDataPramas.data[a] = { 'name': 'insertSpotListbpp', 'resultmaps': { 'list': this.partData }}
-          this.postDataPramas.data[a].children = []
-          this.postDataPramas.data[a].children[0] = { 'name': 'updateBigpartpurchaseStatu', 'type': 'e', 'parammaps': {
-            id: '@insertSpotListbpp.id',
-            matchCode: this.temp1.matchCode
-          }}
-          this.postDataPramas.data.push({ 'name': 'insertbigpartdeal', 'type': 'e', 'parammaps': {
-            empId: this.temp1.buyerPerson,
-            pastureId: Cookies.get('pastureid'),
-            matchCode: this.temp1.matchCode
-          }}
-          )
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            if (response.msg === 'fail') {
-              var buyeCode = new RegExp('buyeCode')
-              if (buyeCode.test(response.data)) {
-                this.$notify({
-                  title: '',
-                  message: '网络异常未生成采购单,请刷新后重新进行配单',
-                  type: 'warning',
-                  duration: 2000
-                })
-              } else {
-                this.$notify({
-                  title: '保存失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-              }
-            } else {
-              this.dialogFormVisibleConfirmation = false
-              this.activeName = 'fouth'
-              this.get_table_data4()
-              this.$notify({
-                title: '',
-                message: '保存成功',
-                type: 'success',
-                duration: 2000
-              })
-            }
-          })
-        }
-      })
-    },
-
-    get_table_data2() {
-      this.listLoading2 = true
-      if (this.$refs['inputDatetime2'] !== undefined && this.$refs['inputDatetime2'].value !== null) {
-        this.getdataListParm2.parammaps.startTime = this.$refs['inputDatetime2'].value[0]
-        this.getdataListParm2.parammaps.stopTime = this.$refs['inputDatetime2'].value[1]
-      } else {
-        this.getdataListParm2.parammaps.startTime = ''
-        this.getdataListParm2.parammaps.stopTime = ''
-      }
-      GetDataByName(this.getdataListParm2).then(response => {
-        this.list2 = response.data.list
-        this.pageNum2 = response.data.pageNum
-        this.pageSize2 = response.data.pageSize
-        if (response.data.total) {
-          this.total2 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading2 = false
-        }, 300)
-      })
-    },
-    form_search2() {
-      this.listLoading = true
-      if (this.getdataListParm2.parammaps.inputDatetime === null) {
-        this.getdataListParm2.parammaps.inputDatetime = ''
-      }
-      this.getdataListParm2.offset = 1
-      this.get_table_data2()
-    },
-    statu: function(cellValue) {
-      if (cellValue.statu === 0) {
-        return '未到货'
-      } else if (cellValue.statu === 1) {
-        return '部分到货'
-      } else if (cellValue.statu === 2) {
-        return '按时到货'
-      } else if (cellValue.statu === 3) {
-        return '已延期'
-      } else if (cellValue.statu === 4) {
-        return '已关闭'
-      } else if (cellValue.statu === 5) {
-        return '部分到货-延期'
-      } else if (cellValue.statu === 6) {
-        return '全部到货-延期'
-      }
-    },
-    statue: function(cellValue) {
-      if (cellValue.statue === 0) {
-        return '审核中'
-      } else if (cellValue.statue === 1) {
-        return '审核通过'
-      } else if (cellValue.statue === 2) {
-        return '未通过'
-      }
-    },
-    form_see2(row) {
-      this.temp2 = Object.assign({}, row)
-      if (this.temp2.statu === 0) {
-        this.isStatu = false
-        this.temp2.statu = '未到货'
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 1) {
-        this.isStatu = false
-        this.temp2.statu = '部分到货'
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 2) {
-        this.isStatu = false
-        this.temp2.statu = '按时到货'
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 3) {
-        this.isStatu = false
-        this.temp2.statu = '已延期'
-        this.isExtensionDays = true
-      } else if (this.temp2.statu === 4) {
-        this.temp2.statu = '已关闭'
-        this.isStatu = true
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 5) {
-        this.isStatu = false
-        this.temp2.statu = '部分到货-延期'
-        this.isExtensionDays = true
-      } else if (this.temp2.statu === 6) {
-        this.isStatu = false
-        this.temp2.statu = '全部到货-延期'
-        this.isExtensionDays = true
-      }
-      this.dialogStatusSee2 = 'see'
-      this.dialogFormVisibleSee2 = true
-      this.getdataListSee2.parammaps.id = row.id
-      this.getSeeList2()
-    },
-    getSeeList2() {
-      GetDataByName(this.getdataListSee2).then(response => {
-        this.listSee2 = response.data.list
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
-              this.listSee2[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-              this.listSee2[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-            } else {
-              this.listSee2[i].srcpath = ''
-              this.listSee2[i].picpath = ''
-            }
-          }
-        }
-        console.log('查看下方table数据', response.data.list)
-        // this.pageNum2 = response.data.pageNum
-        // this.pageSize2 = response.data.pageSize
-        var sumArray = []
-        for (var i = 0; i < this.listSee2.length; i++) {
-          console.log()
-          sumArray.push(
-            this.listSee2[i].sumPrice
-          )
-        }
-        console.log('总价', sumArray)
-        var arrvalue = 0
-        for (var i = 0; i < sumArray.length; i++) {
-          console.log('table内总价每一个值', sumArray[i])
-          arrvalue += parseFloat(sumArray[i])// 数组的索引是从0开始的
-        }
-        this.temp2.sumPrices = arrvalue.toFixed(3)
-        setTimeout(() => {
-          this.listLoadingSee = false
-        }, 100)
-      })
-    },
-    resetCloseTemp() {
-      this.temp2.note = ''
-    },
-    handleClose2(row) {
-      this.resetCloseTemp()
-      this.temp2 = Object.assign({}, row)
-      this.dialogStatusClose = 'close'
-      this.dialogFormVisibleClose = true
-    },
-
-    handleCurrentChange(val) {
-        this.currentRow = val;
-        console.log("currentRow",this.currentRow)
-  },
-
-    sapUpload(){
-
-
-      const that = this 
-      console.log("currentRow",this.currentRow.sapstatus)
-
-     var send_data = this.selectList
-
-     if(send_data.length == 0){
-        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
-        return false
-      }
-
-
-      console.log(that.isSap)
-
-      if(that.isSap == 1){
-
-         that.isSap = 0
-         SapOrder(send_data).then(response => {
-              console.log('response', response)
-                
-               if (response.msg !== 'fail') {
-                that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-                that.selectList = []
-                that.get_table_data2()
-                 
-                } else {
-                  that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-                }
-               
-            })
- 
-            
-      } else {
-
-        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
-      }
-
-      setTimeout(() => {
-              that.isSap = 1
-            }, 3000)
-
-
-
-           
-    
-  
-      // if(this.currentRow.sapstatus){
-   
-      //   if(this.currentRow.sapstatus != 0){
-      //     const sapArr = this.currentRow.sapbuyeCode.split(",")
-      //     console.log("sapArr",sapArr)
-      //     sapArr.forEach(function(item){
-      //       console.log("sapArr item",item)
-      //       var send_data = {
-         
-      //             "code":item,
-      //             "pastureid":Cookies.get('pastureid')
-              
-      //       }
-
-      //       SapOrder(send_data).then(response => {
-      //         console.log('response', response)
-                
-      //          if (response.msg !== 'fail') {
-      //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-      //           that.get_table_data()
-                 
-      //           } else {
-      //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-      //           }
-               
-      //       })
-        
-        
-
-
-      //     })
-      //   }
-      // }
-
-    },
-
-
-    checkboxInit(row,index){
-      // console.log(row)
-      var data1 = new Date(row.creatTime)
-        var data2 = new Date('2022-10-25')
-        if(data1 > data2){ return 1 } else {return 0}
-    },
-
-    //监听 - 表格 - 勾选
-    change_table_selection(val) {
-      this.selectList = val
-      console.log('勾选数据selectList', this.selectList)
-    },
-
-    srmUpload(){
-
-      const that = this 
-      console.log("currentRow",this.currentRow.srmstatus)
-    
-      console.log('勾选数据selectList', this.selectList)
-
-      var send_data = this.selectList
-
-
-      if(send_data.length == 0){
-        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
-        return false
-      }
-
-
-      console.log(that.isSrm)
-
-      if(that.isSrm == 1){
-
-         that.isSrm = 0
-         SrmOrder(send_data).then(response => {
-              console.log('response', response)
-                
-               if (response.msg !== 'fail') {
-                that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-                that.selectList = []
-                that.get_table_data2()
-                
-                 
-                } else {
-                  that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-                }
-               
-            })
-
- 
-            
-      } else {
-
-        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
-      }
-
-      setTimeout(() => {
-              that.isSrm = 1
-            }, 3000)
-
-
-
-
-   
-      // if(this.currentRow.srmstatus){
-      //   if(this.currentRow.srmstatus != 0){
-      //     const srmArr = this.currentRow.srmbuyeCode.split(",")
-      //     console.log("srmArr",srmArr)
-      //     srmArr.forEach(function(item){
-      //       console.log("srmArr item",item)
-      //       var send_data = {
-         
-      //             "code":item,
-      //             "pastureid":Cookies.get('pastureid')
-      //       }
-      //       SrmOrder(send_data).then(response => {
-      //         console.log('response', response)
-                
-      //          if (response.msg !== 'fail') {
-      //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-      //           that.get_table_data()
-                 
-      //           } else {
-      //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-      //           }
-               
-      //       })
-        
-        
-
-
-      //     })
-      //   }
-      // }
-
-
-
-    },
-    
-
-    closeData() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      console.log('点击确认关闭', this.temp2)
-      this.$refs['temp2'].validate(valid => {
-        if (valid) {
-          this.requestParamStute.parammaps.id = this.temp2.id
-          this.requestParamStute.parammaps.note = this.temp2.note
-          PostDataByName(this.requestParamStute).then(response => {
-            console.log('新增保存发送参数', this.requestParamStute)
-            if (response.msg !== 'fail') {
-              this.get_table_data2()
-              this.dialogFormVisibleClose = false
-              this.$notify({
-                title: '成功',
-                message: '关闭成功',
-                type: 'success',
-                duration: 2000
-              })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-    get_table_data3() {
-      this.listLoading3 = true
-      if (this.$refs['inputDatetime3'] !== undefined && this.$refs['inputDatetime3'].value !== null) {
-        this.getdataListParm3.parammaps.startTime = this.$refs['inputDatetime3'].value[0]
-        this.getdataListParm3.parammaps.stopTime = this.$refs['inputDatetime3'].value[1]
-      } else {
-        this.getdataListParm3.parammaps.startTime = ''
-        this.getdataListParm3.parammaps.stopTime = ''
-      }
-      GetDataByName(this.getdataListParm3).then(response => {
-        this.list3 = response.data.list
-        this.pageNum3 = response.data.pageNum
-        this.pageSize3 = response.data.pageSize
-        if (response.data.total) {
-          this.total3 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading3 = false
-        }, 300)
-      })
-    },
-    form_search3() {
-      this.listLoading = true
-      if (this.getdataListParm3.parammaps.inputDatetime === null) {
-        this.getdataListParm3.parammaps.inputDatetime = ''
-      }
-      this.getdataListParm3.offset = 1
-      this.get_table_data3()
-    },
-    handleDownload3() {
-      console.log('点击了采购明细导出')
-      this.$alert('采购明细正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.downloadListParm3.name = this.getdataListParm3.name
-      this.downloadListParm3.parammaps = this.getdataListParm3.parammaps
-      GetAccount(this.downloadListParm3).then(response => {
-        if (response.data.list !== '') {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        this.downloadList3 = response.data.list
-        const elecExcelDatas = [
-          {
-            tHeader: ['配单号', '采购单号', '备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '供应商', '单价', '申购数量', '采购数量', '入库数', '申购部门', '采购人', '配单日期'],
-            filterVal: ['matchCode', 'buyeCode', 'partCode', 'partName', 'specification', 'brand', 'unit', 'providerName', 'price', 'sumAmount', 'amount', 'receiveAmount', 'departmentName', 'empname', 'buyerDate'],
-            tableDatas: this.downloadList3,
-            sheetName: '采购明细'
-          }
-        ]
-        json2excel(elecExcelDatas, '采购明细', true, 'xlsx')
-      })
-    },
-    get_table_data4() {
-      this.listLoading4 = true
-      if (this.$refs['inputDatetime4'] !== undefined && this.$refs['inputDatetime4'].value !== null) {
-        this.getdataListParm4.parammaps.startTime = this.$refs['inputDatetime4'].value[0]
-        this.getdataListParm4.parammaps.stopTime = this.$refs['inputDatetime4'].value[1]
-      } else {
-        this.getdataListParm4.parammaps.startTime = ''
-        this.getdataListParm4.parammaps.stopTime = ''
-      }
-      GetDataByName(this.getdataListParm4).then(response => {
-        this.list4 = response.data.list
-        this.pageNum4 = response.data.pageNum
-        this.pageSize4 = response.data.pageSize
-        if (response.data.total) {
-          this.total4 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading4 = false
-        }, 300)
-      })
-    },
-    form_search4() {
-      this.listLoading = true
-      if (this.getdataListParm4.parammaps.inputDatetime === null) {
-        this.getdataListParm4.parammaps.inputDatetime = ''
-      }
-      this.getdataListParm4.offset = 1
-      this.get_table_data4()
-    },
-    form_see4(row) {
-      this.dialogStatusSee4 = 'see'
-      this.dialogFormVisibleSee4 = true
-      this.temp4 = Object.assign({}, row)
-      this.getdataListSee4.parammaps.matchCode = row.matchCode
-      this.getSeeList4()
-      var reason = '未通过原因:' + this.temp4.workflowNote
-      if (this.temp4.statue === 0) {
-        this.activeList = [{ title: '配单', date: this.temp4.dealTime, name: this.temp4.empname }, { title: '办公室主任审核' }]
-        this.active = 1
-      } else if (this.temp4.statue === 1) {
-        this.activeList = [{ title: '配单', date: this.temp4.dealTime, name: this.temp4.empname }, { title: '办公室主任审核', date: this.temp4.chargeDate, name: this.temp4.chargeName }]
-        this.active = 2
-      } else if (this.temp4.statue === 2) {
-        this.activeList = [{ title: '配单', date: this.temp4.dealTime, name: this.temp4.empname }, { title: '办公室主任审核', date: this.temp4.chargeDate, name: this.temp4.chargeName, status: 'error', reason: reason }]
-        this.active = 2
-      }
-    },
-    getSeeList4() {
-      GetDataByName(this.getdataListSee4).then(response => {
-        this.listSee4 = response.data.list
-        this.listUpdate4 = response.data.list
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            console.log(response.data.list[i].srcpath)
-            console.log(response.data.list[i].picpath)
-            console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath)
-            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
-              if (this.dialogStatusSee4 == 'see') {
-                this.listSee4[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-                this.listSee4[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-              } else {
-                this.listUpdate4[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-                this.listUpdate4[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-              }
-            } else {
-              this.listSee4[i].srcpath = ''
-              this.listSee4[i].picpath = ''
-              this.listUpdate4[i].srcpath = ''
-              this.listUpdate4[i].picpath = ''
-            }
-          }
-        }
-
-        console.log('查看下方table数据', response.data.list)
-        this.pageNum4 = response.data.pageNum
-        this.pageSize4 = response.data.pageSize
-      })
-    },
-    handleExamine(row) {
-      if (row == undefined) {
-        this.examineTemp = this.temp4
-        this.$set(this.temp4, 'SHstatue', 1)
-        this.$set(this.temp4, 'workflowNote', '')
-      } else {
-        this.examineTemp = Object.assign({}, row)
-        this.$set(this.examineTemp, 'SHstatue', 1)
-        this.$set(this.examineTemp, 'workflowNote', '')
-      }
-      this.dialogStatus_Examine = 'examine'
-      this.dialogFormVisible_Examine = true
-      this.statueReason = false
-    },
-    changeSHStatue(val) {
-      if (val == 2) {
-        this.statueReason = true
-      } else {
-        this.statueReason = false
-      }
-    },
-    createExamineData() {
-      console.log(this.examineTemp)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-          if (this.examineTemp.SHstatue == 1) {
-            console.log('通过')
-            this.postDataPramas.common = { 'returnmap': '0' }
-            this.postDataPramas.data = []
-            this.postDataPramas.data[0] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
-              'id': this.examineTemp.id,
-              'statue': this.examineTemp.SHstatue,
-              'empId': Cookies.get('employeid'),
-              'workflowNote': this.examineTemp.workflowNote
-            }}
-
-            this.postDataPramas.data[1] = { 'name': 'updatebigbuydetailenable', 'type': 'e', 'parammaps': {
-              'matchCode': this.examineTemp.matchCode
-            }}
-            this.postDataPramas.data[2] = { 'name': 'updatebigbuydetailZero', 'type': 'e', 'parammaps': {
-              'matchCode': this.examineTemp.matchCode
-            }}
-            ExecDataByConfig(this.postDataPramas).then(response => {
-              console.log('审核保存发送参数', this.postDataPramas)
-              if (response.msg === 'fail') {
-                this.$notify({
-                  title: '审核失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-              } else {
-                this.dialogFormVisible_Examine = false
-                this.get_table_data4()
-                this.$notify({
-                  title: '',
-                  message: '审核成功',
-                  type: 'success',
-                  duration: 2000
-                })
-              }
-            })
-          } else if (this.examineTemp.SHstatue == 2) {
-            console.log('不通过')
-            this.postDataPramas.common = { 'returnmap': '0' }
-            this.postDataPramas.data = []
-            this.postDataPramas.data[0] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
-              'id': this.examineTemp.id,
-              'statue': this.examineTemp.SHstatue,
-              'empId': Cookies.get('employeid'),
-              'workflowNote': this.examineTemp.workflowNote
-            }}
-
-            // this.postDataPramas.data[1] = { 'name': 'updatepartpurchase', 'type': 'e', 'parammaps': {
-            //   'matchCode': this.examineTemp.matchCode
-            // }}
-            ExecDataByConfig(this.postDataPramas).then(response => {
-              console.log('审核保存发送参数', this.postDataPramas)
-              if (response.msg === 'fail') {
-                this.$notify({
-                  title: '审核失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-              } else {
-                this.dialogFormVisible_Examine = false
-                this.get_table_data4()
-                this.$notify({
-                  title: '',
-                  message: '审核成功',
-                  type: 'success',
-                  duration: 2000
-                })
-              }
-            })
-          }
-        }
-      })
-    },
-    form_edit(row) {
-      this.dialogStatusUpdate4 = 'update'
-      this.dialogFormVisibleUpdate4 = true
-      this.getdataListSee4.parammaps.matchCode = row.matchCode
-      this.updateTemp4 = Object.assign(row, {})
-      this.getSeeList4()
-    },
-    edit_dialog_save() {
-      this.$refs['updateTemp4'].validate(valid => {
-        if (valid) {
-          // for (let i = 0; i < this.listUpdate4.length; i++) {
-          //   var rulesAmount = /^\d+$/
-          //   if ((this.listUpdate4[i].amount == '' || this.listUpdate4[i].amount == undefined) && parseFloat(this.listUpdate4[i].amount) !== 0) {
-          //     this.$message({
-          //       type: 'error',
-          //       message: '采购数量不可为空',
-          //       duration: 2000
-          //     })
-          //     return false
-          //   } else if (!rulesAmount.test(parseFloat(this.listUpdate4[i].amount))) {
-          //     this.$message({
-          //       type: 'error',
-          //       message: '采购数量不可为空',
-          //       duration: 2000
-          //     })
-          //     return false
-          //   }
-          // }
-          for (let i = 0; i < this.listUpdate4.length; i++) {
-            console.log(this.listUpdate4[i].amount)
-            var rulesAmount = /^\d+$/
-            if ((this.listUpdate4[i].amount == '' || this.listUpdate4[i].amount == undefined) && parseFloat(this.listUpdate4[i].amount) !== 0) {
-              this.$message({
-                type: 'error',
-                message: '采购数量不可为空',
-                duration: 2000
-              })
-              return false
-            } else if (!rulesAmount.test(parseFloat(this.listUpdate4[i].amount))) {
-              this.$message({
-                type: 'error',
-                message: '采购数量请输入大于等于0的整数',
-                duration: 2000
-              })
-              return false
-            } else {
-              this.postDataPramas.common = { 'returnmap': '0' }
-              this.postDataPramas.data = []
-              this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listUpdate4 }}
-              this.postDataPramas.data[0].children = []
-              this.postDataPramas.data[0].children[0] = { 'name': 'updatePDbuydetail', 'type': 'e', 'parammaps': {
-                amount: '@insertSpotList.amount',
-                id: '@insertSpotList.id'
-              }}
-              this.postDataPramas.data[1] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
-                id: this.updateTemp4.id,
-                statue: '0',
-                empId: Cookies.get('employeid')
-              }}
-            }
-          }
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            console.log('新增保存发送参数', this.postDataPramas)
-            if (response.msg === 'fail') {
-              this.$notify({
-                title: '保存失败',
-                message: response.data,
-                type: 'warning',
-                duration: 2000
-              })
-            } else {
-              this.dialogFormVisibleUpdate4 = false
-              this.getdataListParm4.parammaps.inputDatetime = ''
-              this.get_table_data4()
-              this.$notify({
-                title: '',
-                message: '保存成功',
-                type: 'success',
-                duration: 2000
-              })
-            }
-          })
-          return true
-        }
-      })
-    }
-
-  }
-}
-</script>
-<style lang="scss" >
-.el-table .warning-row {
-    background: red;
-  }
-  .el-table .color-row {
-    background: #eee;
-  }
-</style>
-<style lang="scss" scoped>
-.app-contentClose .el-form-item__content {
-  margin-left: 0 !important;
-}
-</style>
-<style lang="scss" scoped>
-.app-contentConfirmationSheet {
-  margin-bottom: 50px;
-}
-.app-content {
-  background: #eee;
-  margin-bottom: 50px;
-  .title {
-    line-height: 40px;
-    div {
-      float: left;
-      margin-right: 50px;
-      b {
-        padding-left: 10px;
-      }
-    }
-  }
-  .total {
-    margin-left: 80%;
-    line-height: 30px;
-  }
-}
-</style>

+ 0 - 2538
src/views/custom/purchase/index2.vue

@@ -1,2538 +0,0 @@
-<template>
-  <div class="app-container">
-    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
-      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
-      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
-    </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane v-if="isDistributionSheet" label="采购配单" name="first">
-        <div class="purchaseDistributionSheet">
-
-          <div class="filter-container">
-            <el-select v-model="getdataListParm1.parammaps.departmentId" style="width: 140px;" placeholder="部门" class="filter-item" @change = "change_dept">
-              <el-option v-for="item in deptNameList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            
-          </div>
-
-          <el-table
-            :key="tableKey1"
-            v-loading="listLoading1"
-            element-loading-text="给我一点时间"
-            :data="list1"
-            border
-            fit
-            :row-style="tableRowStyle"
-            :cell-style="tableCellStyle"
-            highlight-current-row
-            style="width: 100%;"
-            class="elTable table-fixed"
-            @cell-click="cellClick"
-            @sort-change="tableSort"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件编号" align="center" min-width="150px">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件名称" align="center" min-width="120px">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件规格" align="center" min-width="120px">
-              <template slot-scope="scope">
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件品牌" min-width="100px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.brand }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="计量单位" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="图片" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <el-popover placement="right" title="" trigger="hover">
-                  <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                  <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                </el-popover>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="price" label="单价" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sumAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <el-form :model="scope.row" :rules="rules">
-                  <el-form-item prop="amount">
-                    <el-input
-                      v-model="scope.row.amount"
-                      style="width:80px;margin-top:25px;height:10px"
-                    />
-                  </el-form-item>
-                </el-form>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-button :disabled="confirmationSheetDisabled" type="primary" style="float: right;margin-top: 10px;" @click="confirmationSheet()">确认配单</el-button>
-          <el-dialog :title="textMap[dialogStatusConfirmation]" :visible.sync="dialogFormVisibleConfirmation" :close-on-click-modal="false" style="width:100%;margin: 0 auto;overflow:auto">
-            <div class="app-contentConfirmationSheet">
-              <el-form ref="temp1" :rules="rules" :model="temp1" label-position="right" label-width="90px" style="width:100%;margin-bottom:50px">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <el-input ref="matchCode" v-model="temp1.matchCode" disabled />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="提交日期:" prop="buyerDate">
-                      <el-date-picker
-                        v-model="temp1.buyerDate"
-                        :picker-options="pickerOptions"
-                        type="date"
-                        placeholder="提交日期"
-                        format="yyyy-MM-dd"
-                        value-format="yyyy-MM-dd"
-                        style="width:170px;"
-                      />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="buyerPerson">
-                      <el-select v-model="temp1.buyerPerson" placeholder="采购员" class="filter-item">
-                        <el-option
-                          v-for="item in findAllEmploye"
-                          :key="item.id"
-                          :label="item.name"
-                          :value="item.id"
-                        />
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div v-for="(item,index) in listConfirmationSheet" :key="index" class="app-content">
-                <div class="title">
-                  <div>
-                    <b>采购单号:</b>
-                    <span>{{ item.orderNumber }}</span>
-                  </div>
-                  <div>
-                    <b>供应商:</b>
-                    <span>{{ item.providerName }}</span>
-                  </div>
-                </div>
-                <el-table
-                  :key="tableKey1"
-                  v-loading="listLoading1"
-                  element-loading-text="给我一点时间"
-                  :data="item.list"
-                  border
-                  fit
-                  highlight-current-row
-                  style="width: 97%;margin:0 auto"
-                  :row-style="rowStyle"
-                  :cell-style="cellStyle"
-                  class="elTable table-fixed"
-                >
-                  <!-- table表格 -->
-                  <el-table-column label="序号" align="center" type="index" width="50px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件编号" align="center" min-width="150px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.partCode }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件名称" align="center" min-width="120px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.partName }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件规格" align="center" min-width="120px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.specification }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="图片" min-width="110px" align="center">
-                    <template slot-scope="scope">
-                      <el-popover placement="right" title="" trigger="hover">
-                        <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                        <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                      </el-popover>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件品牌" min-width="100px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.brand }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="计量单位" min-width="80px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.unit }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="单价" min-width="70px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row. price }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="申购数量" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.sumAmount }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="合计采购数量" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.amount }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="总价" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ (scope.row.sumPrice = scope.row.price * parseFloat(scope.row.amount))| keepTwoNum }}</span>
-                    </template>
-                  </el-table-column>
-                </el-table>
-                <div ref="total" class="total">
-                  合计:
-                  <span>{{ item.Sum }}</span>
-                </div>
-              </div>
-              <div slot="footer" class="dialog-footer" style="bottom:10px">
-                <el-button type="primary" :disabled="isokDisable" @click="confirmationSheetData()">确认</el-button>
-                <el-button @click="dialogFormVisibleConfirmation= false;get_table_data1();">取消</el-button>
-              </div>
-            </div>
-          </el-dialog>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane v-if="isDistributionManagement" label="配单管理" name="fouth">
-        <div class="DistributionManagement">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm4.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm4.parammaps.matchCode" placeholder="配单号" clearable style="width: 200px;" class="filter-item" />
-            <el-select v-model="getdataListParm4.parammaps.statue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in status2" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="inputDatetime4" v-model="getdataListParm4.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search4">搜索</el-button>
-
-            
-            
-          </div>
-          <el-table
-            :key="tableKey4"
-            v-loading="listLoading4"
-            element-loading-text="给我一点时间"
-            :data="list4"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed" 
-            @sort-change="tableSort"
-            @current-change="handleCurrentChange"
-            :max-height="myHeight"
-          >
-         
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.matchCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购员" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="提交日期" sortable prop="dealTime" min-width="110px" align="center" />
-            <el-table-column sortable prop="cou" label="采购单数" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.cou }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
-           
-            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see4(row)">查看</el-button>
-                <el-button v-if="parseFloat(row.statue) === 0 && isExamineDM" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
-                <el-button v-else style="display:none;" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
-                <el-button v-if="parseFloat(row.statue) === 2" type="success" style="display:inline-block" size="mini" @click="form_edit(row)">编辑</el-button>
-                <el-button v-else style="display:none;" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="total4>0" :total="total4" :page.sync="getdataListParm4.offset" :limit.sync="getdataListParm4.pagecount" @pagination="get_table_data4" />
-          <el-dialog :title="textMap[dialogStatusSee4]" :visible.sync="dialogFormVisibleSee4" :close-on-click-modal="false">
-            <div class="app-contentSee">
-              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="80px" style="width: 800px;margin-bottom:30px">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <span>{{ temp4.matchCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ temp4.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="配单日期:" prop="dealTime">
-                      <span>{{ temp4.dealTime }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeySee4"
-                v-loading="listLoadingSee4"
-                element-loading-text="给我一点时间"
-                :data="listSee4"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-                :max-height="myHeight"
-              >
-             
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="采购单号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.buyeCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="供应商" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.providerName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="price" label="单价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="amount" label="采购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.amount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumPrice" label="总价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumPrice }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="SGremark" label="备注" min-width="60px" align="center" />
-              </el-table>
-              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
-                <el-row>
-                  <el-col>
-                    <el-form-item label="流程进度" />
-                    <el-steps :active="active" align-center finish-status="success">
-                      <el-step
-                        v-for="(item,index) in activeList"
-                        :key="index"
-                        :title="item.title"
-                        :status="item.status"
-                      >
-                        <template slot="description">
-                          <div class="step-row">
-                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
-                            <div>{{ item.reason }}</div>
-                          </div>
-                        </template>
-                      </el-step>
-                    </el-steps>
-                  </el-col>
-                </el-row>
-                <el-row>
-                  <el-col>
-                    <el-form-item label="操作:">
-                      <!-- 审核 -->
-                      <el-button v-if="isExamineDM && temp4.statue == 0" type="success" style="display:inline-block" @click="handleExamine()">审核</el-button>
-                      <el-button v-else type="success" style="display:none" @click="handleExamine()">审核</el-button>
-
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-                <el-button @click="dialogFormVisibleSee4 = false;">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-
-          <el-dialog :title="textMap[dialogStatusUpdate4]" width="90%" :visible.sync="dialogFormVisibleUpdate4" :close-on-click-modal="false">
-            <div class="app-contentUpdate">
-              <el-form
-                ref="updateTemp4"
-                :rules="rules"
-                :model="updateTemp4"
-                label-position="right"
-                label-width="80px"
-                style="width:80%;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <span>{{ updateTemp4.matchCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ updateTemp4.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="配单日期:" prop="dealTime">
-                      <span>{{ updateTemp4.dealTime }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeyUpdate4"
-                v-loading="listLoadingUpdate4"
-                element-loading-text="给我一点时间"
-                :data="listUpdate4"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-              >
-                <!-- table表格 -->
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="采购单号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.buyeCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="供应商" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.providerName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="单价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="申购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="采购数量" min-width="100px" align="center">
-                  <template slot-scope="scope">
-                    <el-form :model="scope.row" :rules="rules">
-                      <el-form-item prop="amount">
-                        <el-input
-                          v-model="scope.row.amount"
-                          style="width:80px;margin-top:25px;height:10px"
-                        />
-                      </el-form-item>
-                    </el-form>
-                  </template>
-                </el-table-column>
-                <el-table-column label="总价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ (parseFloat(scope.row.price) * parseFloat(scope.row.amount)) | keepTwoNum2 }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-                <el-button type="primary" :disabled="isokDisable" @click="edit_dialog_save()">确认</el-button>
-                <el-button @click="dialogFormVisibleUpdate4 = false;">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-
-          <el-dialog :title="textMap[dialogStatus_Examine]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
-            <div class="app-examine">
-              <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
-              <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
-                <el-row style="width:88%;height:150px;margin:0 auto;">
-                  <el-col :span="20">
-                    <el-form-item>
-                      <el-radio-group v-model="examineTemp.SHstatue" @change="changeSHStatue">
-                        <el-radio :label="1" checked>通过</el-radio>
-                        <el-radio :label="2">不通过</el-radio>
-                      </el-radio-group>
-                    </el-form-item>
-                  </el-col>
-                  <el-col v-if="statueReason" :span="20">
-                    <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
-                  </el-col>
-                </el-row>
-              </el-form>
-            </div>
-            <div slot="footer" class="dialog-footer">
-              <el-button type="primary" :disabled="isokDisable" @click="dialogStatus_Examine==='examine'?createExamineData():createExamineData()">确认</el-button>
-              <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
-            </div>
-          </el-dialog>
-
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="采购单管理" name="second">
-        <div class="purchaseOrderManagement">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm2.parammaps.buyeCode" placeholder="采购单号" clearable style="width: 200px;" class="filter-item" />
-            <el-select v-model="getdataListParm2.parammaps.statu" clearable placeholder="单据状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in status" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-autocomplete v-model="getdataListParm2.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
-            <el-date-picker ref="inputDatetime2" v-model="getdataListParm2.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search2">搜索</el-button>
-            <el-button v-waves v-if="isPurchaseSap" class="filter-item" type="primary" @click="sapUpload">SAP上传</el-button>
-            <el-button v-waves  v-if="isPurchaseSrm" class="filter-item" type="primary" @click="srmUpload">SRM上传</el-button>
-          </div>
-          <el-table
-            :key="tableKey2"
-            v-loading="listLoading2"
-            element-loading-text="给我一点时间"
-            :data="list2"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            @selection-change="change_table_selection"
-            :max-height="myHeight"
-          >
-          <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" />
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.buyeCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购员" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="提交日期" sortable prop="buyerDate" min-width="110px" align="center" />
-            <el-table-column label="最近到货日期" sortable prop="DoneDate" min-width="110px" align="center" />
-            <el-table-column label="单据状态" min-width="80px" align="center" :formatter="statu" />
-            <el-table-column  prop="sapNumber" label="sap编码" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{scope.row.sapNumber}}</span>
-              </template>
-            </el-table-column>
-            <el-table-column   prop
-            <el-table-column   prop="sapstatus" label="sap上传状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-show="scope.row.sapstatus == 1">上传失败</span>
-                <span v-show="scope.row.sapstatus == -1">未上传</span>
-                <span v-show="scope.row.sapstatus == 0">上传成功</span>
-              </template>
-            </el-table-column>
-            <el-table-column   prop="srmstatus" label="srm上传状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-show="scope.row.srmstatus == 1">上传失败</span>
-                <span v-show="scope.row.srmstatus == -1">未上传</span>
-                <span v-show="scope.row.srmstatus == 0">上传成功</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see2(row)">查看</el-button>
-                <el-button v-if="(row.statu === 2 || row.statu === 4) && isPurchaseClose" style="display:none" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
-                <el-button v-else-if="isPurchaseClose" style="display:inline-block" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="total2>0" :total="total2" :page.sync="getdataListParm2.offset" :limit.sync="getdataListParm2.pagecount" @pagination="get_table_data2" />
-          <el-dialog :title="textMap[dialogStatusSee2]" :visible.sync="dialogFormVisibleSee2" :close-on-click-modal="false">
-            <div class="app-contentSee">
-              <el-form
-                ref="temp2"
-                :rules="rules"
-                :model="temp2"
-                label-position="right"
-                label-width="80px"
-                style="width: 800px;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="采购单号:" prop="buyeCode">
-                      <span>{{ temp2.buyeCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="6">
-                    <el-form-item label="供应商:" prop="providerName">
-                      <span>{{ temp2.providerName }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="5">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ temp2.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="5">
-                    <el-form-item label="提交日期:" prop="buyerDate">
-                      <span>{{ temp2.buyerDate }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeySee2"
-                v-loading="listLoadingSee2"
-                element-loading-text="给我一点时间"
-                :data="listSee2"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-                @sort-change="tableSort2"
-              >
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="130px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="price" label="单价(元)" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="amount" label="采购数量" min-width="130px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.amount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumPrice" label="总价(元)" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumPrice }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.receiveAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="SGremark" label="备注" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.SGremark }}</span>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <div class="sum" style="right:30px;position:absolute;bottom:90px">
-                <b>总计:{{ temp2.sumPrices }}元</b>
-              </div>
-              <div class="stuts" style="left:30px;position:absolute;bottom:70px">
-                <b>单据状态:{{ temp2.statu }}</b>
-                <b v-if="isStatu">关闭原因:{{ temp2.note }}</b>
-                <div v-if="isExtensionDays">延期天数:{{ temp2.extensionDays }}</div>
-              </div>
-              <div
-                slot="footer"
-                class="dialog-footer"
-                style="right:30px;position:absolute;bottom:10px"
-              >
-                <el-button @click="dialogFormVisibleSee2 = false;get_table_data2()">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-          <el-dialog :title="textMap[dialogStatusClose]" :visible.sync="dialogFormVisibleClose" :close-on-click-modal="false" style="width:70%;margin: 0 auto">
-            <div class="app-contentClose">
-              <el-form
-                ref="temp2"
-                :rules="rules"
-                :model="temp2"
-                label-position="right"
-                label-width="80px"
-                style="width: 300px;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="24">
-                    <el-form-item label="采购单号:" prop="orderNo">
-                      <span>{{ temp2.buyeCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-                <el-row>
-                  <el-col :span="24">
-                    <el-form-item label="" prop="note">
-                      <el-input ref="note" v-model="temp2.note" type="textarea" placeholder="请输入关闭该采购单原因" />
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div
-                slot="footer"
-                class="dialog-footer"
-                style="right:30px;position:absolute;bottom:10px"
-              >
-                <el-button @click="dialogFormVisibleClose = false;get_table_data2();">取消</el-button>
-                <el-button type="primary" :disabled="isokDisable" @click="closeData()">确认关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="采购明细" name="third">
-        <div class="procurementDetails">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm3.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm3.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
-            <el-input v-model="getdataListParm3.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
-            <el-autocomplete v-model="getdataListParm3.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
-            <el-input v-model="getdataListParm3.parammaps.matchCode" placeholder="配单号" style="width: 140px;" class="filter-item" />
-            <el-input v-model="getdataListParm3.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />
-            <el-select v-model="getdataListParm3.parammaps.isStorage" clearable placeholder="到货情况" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in isStorages" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="inputDatetime3" v-model="getdataListParm3.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search3">搜索</el-button>
-            <el-button v-if="isPurchaseExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload3">导出</el-button>
-          </div>
-          <el-table
-            :key="tableKey3"
-            v-loading="listLoading3"
-            element-loading-text="给我一点时间"
-            :data="list3"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.matchCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.buyeCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件编号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件名称" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件规格" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件品牌" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.brand }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="计量单位" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="price" label="单价" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sumAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="amount" label="采购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.amount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.receiveAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="申购部门" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.departmentName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购人" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单日期" sortable prop="buyerDate" min-width="110px" align="center" />
-            <!-- <el-table-column label="备注" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.note }}</span>
-              </template>
-            </el-table-column> -->
-          </el-table>
-          <pagination v-show="total3>=0" :total="total3" :page.sync="getdataListParm3.offset" :limit.sync="getdataListParm3.pagecount" @pagination="get_table_data3" />
-        </div>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-// 引入
-import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, failproccess, checkButtons, GetAccount,SapOrder,SrmOrder } from '@/api/common'
-import waves from '@/directive/waves' // waves directive
-import Pagination from '@/components/Pagination' // secondary package based on el-pagination
-import Cookies from 'js-cookie'
-import { parseTime, sortChange, json2excel } from '@/utils/index.js'
-export default {
-  name: 'Purchase',
-  components: { Pagination },
-  directives: { waves },
-  filters: {
-    keepTwoNum(value) {
-      value = Number(value)
-      return value.toFixed(3)
-    },
-    keepTwoNum2(value) {
-      value = Number(value)
-      return value.toFixed(2)
-    }
-  },
-  data() {
-    return {
-      myHeight:document.documentElement.clientHeight - 85- 150,
-      isSap:1,
-      isSrm:1,
-      selectList: [],
-
-      isPurchaseSap: [],isPurchaseSrm: [],
-      isPurchaseSee: [], isPurchaseClose: [], isPurchaseExport: [], isDistributionSheet: [], isDistributionManagement: [], isExamineDM: [],
-      stripe: true,
-      activeName: 'first',
-      listLoading1: false,
-      tableKey1: 0,
-      list1: [],
-      confirmationSheetDisabled: false,
-      isokDisable: false,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now() // 当天之前的时间可选
-        }
-      },
-      temp: {},
-      total: 0,
-      total1: 0,
-      listParmConfirmation: [],
-      listConfirmationSheet: null,
-      getParmPurchaseOrderNumber: {
-        name: 'autoCreatCode',
-        page: 1,
-        offset: 1,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'CG'
-        }
-      },
-      postDataPramas: {},
-      requestProvider: {
-        name: 'getProviderList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {}
-      },
-      listLoading2: false,
-      tableKey2: 0,
-      list2: [],
-      status2: [
-        { id: '0', name: '审核中' },
-        { id: '1', name: '审核通过' },
-        { id: '2', name: '审核驳回' }
-      ],
-      status: [
-        { id: '0', name: '未到货' },
-        { id: '1', name: '部分到货' },
-        { id: '2', name: '按时到货' },
-        { id: '3', name: '已延期' },
-        { id: '4', name: '已关闭' },
-        { id: '5', name: '部分到货-延期' },
-        { id: '6', name: '全部到货-延期' }
-      ],
-      isStorages: [
-        { id: '0', name: '未入库' },
-        { id: '1', name: '已入库' }
-      ],
-      isStatu: false,
-      listLoadingSee2: false,
-      tableKeySee2: 0,
-      total2: 0,
-      total3: 0,
-      listLoading3: false,
-      tableKey3: 0,
-      list3: [],
-      findAllEmploye: [],
-      findAllPasture: [],
-      requestParams: [
-        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'getDepartmentNY', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }}
-      ],
-      getdataListParm1: {
-        name: 'getbuydetailParts',
-        page: 1,
-        // offset: 1,
-        // pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          departmentId:0,
-        }
-      },
-      getdataListPart: {
-        name: 'getpartpurchasebg',
-        page: 1,
-        // offset: 1,
-        // pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          id: Cookies.get('pastureid'),
-          departmentId:0,
-        }
-      },
-      partData: [],
-      getParmCreateNumber: {
-        name: 'autoCreatCode',
-        page: 1,
-        offset: 1,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'PD'
-        }
-      },
-      pageNum1: 0,
-      pageSize1: 0,
-      temp1: {
-        pastureId: Cookies.get('pastureid'),
-        buyerPerson: this.$store.state.user.employeid,
-        buyerDate: parseTime(new Date(), '{y}-{m}-{d}')
-      },
-      getdataListParm2: {
-        name: 'getBigbuydetailList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          providerName: '',
-          buyeCode: '',
-          inputDatetime: '',
-          // pastureId: Cookies.get('pastureid'),
-          pastureName: Cookies.get('pasturename')
-        }
-      },
-      dialogFormVisibleConfirmation: false,
-      dialogStatusConfirmation: '',
-      pageNum2: 0,
-      pageSize2: 0,
-      temp2: {
-        note: ''
-      },
-      getdataListParm3: {
-        name: 'getbuydetailList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pastureName: Cookies.get('pasturename'),
-          providerName: '',
-          partCode: '',
-          partName: '',
-          matchCode: '',
-          buyeCode: '',
-          isStorage: '',
-          startTime: '',
-          stopTime: '',
-          inputDatetime: ''
-        }
-      },
-      isExtensionDays: false,
-      listSee2: [],
-      getdataListSee2: {
-        name: 'getbuydetailListbyBig',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      requestParamStute: {
-        name: 'updateBigbuydetailStatu',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      pageNum3: 0,
-      pageSize3: 0,
-      temp3: {},
-      dialogFormVisibleSee2: false,
-      dialogStatusSee2: '',
-
-      // 配单管理
-      listLoading4: false,
-      tableKey4: 0,
-      list4: [],
-      pageNum4: 0,
-      pageSize4: 0,
-      total4: 0,
-      getdataListParm4: {
-        name: 'getbigpartdeallist',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pastureName: Cookies.get('pasturename'),
-          matchCode: '',
-          statue: '',
-          inputDatetime: '',
-          startTime: '',
-          stopTime: ''
-        }
-      },
-      dialogFormVisibleSee4: false,
-      dialogStatusSee4: '',
-      temp4: {},
-      listSee4: [],
-      tableKeySee4: 0,
-      listLoadingSee4: false,
-      getdataListSee4: {
-        name: 'getbigpartdealdetiallist',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      activeList: [],
-
-      deptNameList: [],
-
-      active: 3,
-
-      currentRow:{},
-
-      dialogStatusUpdate4: '',
-      dialogFormVisibleUpdate4: false,
-      updateTemp4: {},
-      listUpdate4: [],
-      tableKeyUpdate4: 0,
-      listLoadingUpdate4: false,
-
-      dialogFormVisible_Examine: false,
-      dialogStatus_Examine: '',
-      examineTemp: {
-        SHstatue: 1,
-        workflowNote: ''
-      },
-      statueReason: false,
-      dialogFormVisibleClose: false,
-      dialogStatusClose: '',
-      textMap: {
-        confirmation: '确认配单',
-        see: '查看详情',
-        close: '关闭提示',
-        examine: '审核',
-        update: '编辑'
-      },
-      // 校验规则
-      rules: {
-        equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
-        note: [{ required: true, message: '必填', trigger: 'blur' }]
-      },
-      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      buttons: [],
-      downloadListParm3: {},
-      downloadList3: [],
-      isPercentage: false,
-      percentage: 1
-    }
-  },
-  created() {
-    const that = this
-    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
-      that.buttons = response.data.list
-      that.get_auto_buttons()
-      if (this.isDistributionSheet == true) {
-        this.activeName = 'first'
-        console.log(1, this.isDistributionSheet, this.isDistributionManagement)
-      } else if (this.isDistributionManagement == true) {
-        this.activeName = 'fouth'
-        console.log(2, this.isDistributionSheet, this.isDistributionManagement)
-      } else if (this.isDistributionSheet == false && this.isDistributionManagement == false) {
-        this.activeName = 'second'
-        console.log(3, this.isDistributionSheet, this.isDistributionManagement)
-      }
-    })
-    this.get_select_list()
-    this.get_table_data1()
-    this.get_table_data2()
-    this.get_table_data3()
-    this.get_table_data4()
-    if (this.$route.query.activeName !== undefined) {
-      this.activeName = this.$route.query.activeName
-    }
-  },
-
-  methods: {
-
-    change_dept(e){
-      console.log(e)
-      this.getdataListParm1.parammaps.departmentId = e
-      this.getdataListPart.parammaps.departmentId = e
-      this.get_table_data1()
-    },
-    tableSort(column) {
-      if (this.activeName == 'first') {
-        sortChange(column, this.list1)
-      } else if (this.activeName == 'second') {
-        sortChange(column, this.list2)
-      } else if (this.activeName == 'third') {
-        sortChange(column, this.list3)
-      } else if (this.activeName == 'fouth') {
-        sortChange(column, this.list4)
-      }
-    },
-    tableSort2(column) {
-      sortChange(column, this.listSee2)
-    },
-    get_auto_buttons() {
-      const DistributionSheet = 'customs:purchase:distributionSheet'
-      const isDistributionSheet = checkButtons(this.$store.state.user.buttons, DistributionSheet)
-      this.isDistributionSheet = isDistributionSheet
-
-      const PurchaseSee = 'customs:purchase:see'
-      const isPurchaseSee = checkButtons(this.$store.state.user.buttons, PurchaseSee)
-      this.isPurchaseSee = isPurchaseSee
-
-      const PurchaseClose = 'customs:purchase:close'
-      const isPurchaseClose = checkButtons(this.$store.state.user.buttons, PurchaseClose)
-      this.isPurchaseClose = isPurchaseClose
-
-      const PurchaseSap = 'customs:purchase:sap'
-      const isPurchaseSap = checkButtons(this.$store.state.user.buttons, PurchaseSap)
-      this.isPurchaseSap = isPurchaseSap
-
-      const PurchaseSrm = 'customs:purchase:srm'
-      const isPurchaseSrm = checkButtons(this.$store.state.user.buttons, PurchaseSrm)
-      this.isPurchaseSrm = isPurchaseSrm
-
-      const PurchaseExport = 'customs:purchase:export'
-      const isPurchaseExport = checkButtons(this.$store.state.user.buttons, PurchaseExport)
-      this.isPurchaseExport = isPurchaseExport
-
-      const ExamineDM = 'customs:purchase:shenhe'
-      const isExamineDM = checkButtons(this.$store.state.user.buttons, ExamineDM)
-      this.isExamineDM = isExamineDM
-
-      const DistributionManagement = 'customs:purchase:peidanjiemian'
-      const isDistributionManagement = checkButtons(this.$store.state.user.buttons, DistributionManagement)
-      this.isDistributionManagement = isDistributionManagement
-    },
-    cellClick(row, column, cell, event) {
-      console.log(cell)
-      console.log('column', column)
-      console.log('行索引', row.id)
-      console.log('列索引', column.id)
-      return {
-        background: '#eceb3c'
-      }
-      // console.log('event',event)
-    },
-    tableRowStyle({ row, rowIndex }) {
-      console.log(row, row)
-      console.log(' row.isParity', row.isParity)
-      console.log(parseInt(row.isParity) % 2 == 0)
-      if (parseInt(row.isParity) % 2 == 0) {
-        return {
-          background: '#eee'
-        }
-      }
-      return {
-        background: ''
-      }
-    },
-    tableCellStyle({ row, column, rowIndex, columnIndex }) {
-      if (row.isNo == 'No' && columnIndex === 10) {
-        return {
-          background: 'red'
-        }
-      }
-      return {
-        background: ''
-      }
-    },
-    handleClick(tab, event) {
-      console.log(tab, event)
-      if (tab.name === 'first') {
-        this.get_table_data1()
-      } else if (tab.name === 'fouth') {
-        this.get_table_data4()
-      } else if (tab.name === 'second') {
-        this.get_table_data2()
-      } else if (tab.name === 'third') {
-        this.get_table_data3()
-      }
-    },
-    get_select_list() {
-      GetDataByNames(this.requestParams).then(response => {
-        this.findAllEmploye = response.data.findAllEmploye.list
-        this.findAllPasture = response.data.findAllPasture.list
-        this.deptNameList =  response.data.getDepartmentNY.list
-        console.log(this.deptNameList)
-      })
-    },
-    providerSearch(queryString, cb) {
-      console.log('供应商模糊查询输入值', queryString)
-      this.requestProvider.parammaps['providerName'] = queryString
-      GetDataByName(this.requestProvider).then(response => {
-        console.log('供应商模糊查询搜索data', response.data.list)
-        cb(response.data.list)
-      })
-    },
-    handleSelectProvider(item) {
-      console.log('供应商模糊查询选中值', item)
-    },
-    get_table_data1() {
-      this.listLoading1 = true
-      GetDataByName(this.getdataListPart).then(response => {
-        console.log(response)
-        this.partData = response.data.list
-      })
-      GetDataByName(this.getdataListParm1).then(response => {
-        console.log('this.list1', response.data.list)
-        if (response.data.list === null) {
-          this.list1 = []
-          this.confirmationSheetDisabled = true
-        } else {
-          // eslint-disable-next-line no-unused-vars
-          var list1
-          list1 = response.data.list
-          var result = []
-          list1.forEach((i, j) => {
-            // eslint-disable-next-line no-irregular-whitespace
-            Array.from(new Set(list1.map(function(item) { return item.partCode }))).forEach((x, y) => {
-              if (i.partCode === x) {
-                result.push({
-                  'amount': i.amount,
-                  'amountPre': i.amountPre,
-                  'bigId': i.bigId,
-                  'brand': i.brand,
-                  'brandId': i.brandId,
-                  'contractCode': i.contractCode,
-                  'count': i.count,
-                  'enable': i.enable,
-                  'id': i.id,
-                  'inventoryType': i.inventoryType,
-                  'isZeroStock': i.isZeroStock,
-                  'orderNumber': i.orderNumber,
-                  'partCode': i.partCode,
-                  'partId': i.partId,
-                  'partName': i.partName,
-                  'pastureId': i.pastureId,
-                  'pastureName': i.pastureName,
-                  'planAmount': i.planAmount,
-                  'price': i.price,
-                  'providerId': i.providerId,
-                  'providerName': i.providerName,
-                  'purpose': i.purpose,
-                  'remark': i.remark,
-                  'specification': i.specification,
-                  'sumAmount': i.sumAmount,
-                  'unit': i.unit,
-                  'isNo': i.isNo,
-                  'srcpath': i.srcpath,
-                  'picpath': i.picpath,
-                  'departmentName': i.departmentName,
-                  'isParity': y
-                })
-              }
-            })
-          })
-          console.log(result)
-          if (result !== null) {
-            for (let i = 0; i < result.length; i++) {
-              console.log(result[i].srcpath)
-              if (result[i].srcpath !== null && result[i].picpath !== null && result[i].srcpath !== undefined && result[i].picpath !== undefined) {
-                result[i].srcpath = process.env.VUE_APP_BASE_API + result[i].srcpath
-                result[i].picpath = process.env.VUE_APP_BASE_API + result[i].picpath
-              } else {
-                // this.$set(result[i], 'srcpath', '')
-                // this.$set(result[i], 'picpath', '')
-                result[i].srcpath = ''
-                result[i].picpath = ''
-              }
-            }
-          }
-          // console.log(result)
-          this.list1 = result
-          console.log('处理后table数', this.list1)
-          this.confirmationSheetDisabled = false
-        }
-        var tem = ''
-        for (var i = 0; i < this.list1.length; i++) {
-          if (tem !== this.list1[i].partCode) {
-            this.list1[i].amount = this.list1[i].sumAmount
-            tem = this.list1[i].partCode
-          } else {
-            this.list1[i].amount = 0
-          }
-        }
-        // var a = 0
-        // var b = 0
-        // for (var i = 0; i < this.list1.length; i++) {
-        //   if (parseInt(this.list1[i].amountPre) !== 0) {
-        //     console.log(parseInt(this.list1[i].amountPre))
-        //     if (a <= 0) {
-        //       a = this.list1[i].count - 1
-        //       if (b === 0) {
-        //         b = parseInt(this.list1[i].amountPre)
-        //       }
-        //     } else {
-        //       a--
-        //     }
-        //     if (b > 0) {
-        //       this.list1[i].amount = this.list1[i].amount + 1
-        //       b--
-        //     }
-        //   }
-        // }
-        if (response.data.total) {
-          this.total1 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading1 = false
-        }, 300)
-      })
-    },
-    confirmationSheet() {
-      console.log('点击立确认配单')
-      this.temp1.matchCode = ''
-      console.log(this.list1) // table表格数据
-      // -------------------------------------------
-      function groupBy1(array, f) {
-        var groups1 = {}
-        array.forEach(function(o) {
-          var group2 = JSON.stringify(f(o))
-          console.log("group2",group2)
-          groups1[group2] = groups1[group2] || []
-          groups1[group2].push(o)
-        })
-        return Object.keys(groups1).map(function(group2) {
-          return groups1[group2]
-        })
-      }
-      var sorted1 = groupBy1(this.list1, function(item) {
-        return [item.partCode]
-      })
-      console.log('表格数据根据供应商分划', sorted1)
-
-
-
-
-
-      for (var i = 0; i < sorted1.length; i++) {
-        var b = 0
-        var c = 0
-        for (var j = 0; j < sorted1[i].length; j++) {
-          // eslint-disable-next-line no-self-compare
-          if (sorted1[i][j].partCode === sorted1[i][j].partCode) {
-            // console.log(sorted1[i][j])
-            var element = sorted1[i][j]
-            b += parseInt(element.amount)
-            c = parseInt(element.sumAmount)
-            // console.log("amount", element.amount);
-          }
-        }
-        if (b > c || b < c) {
-          console.log('No')
-          console.log(element.id)
-          for (var a = 0; a < this.list1.length; a++) {
-            if (element.id === this.list1[a].id) {
-              console.log(this.list1[a].partCode)
-              for (var b = 0; b < this.list1.length; b++) {
-                if (this.list1[b].partCode === this.list1[a].partCode) {
-                  console.log(this.list1[b])
-                  this.$set(this.list1[b], 'isNo', 'No')
-                } else {
-                  this.$set(this.list1[b], 'isNo', 'Yes')
-                }
-              }
-            } else {
-              this.$set(this.list1[a], 'isNo', 'Yes')
-            }
-          }
-          console.log(b)
-          this.$message({
-            type: 'warning',
-            message: '同一备件多个供应商合计采购数量总和等于申购数量'
-          })
-          return
-        } else {
-          for (var a = 0; a < this.list1.length; a++) {
-            this.$set(this.list1[a], 'isNo', 'Yes')
-            var rulesAmount = /^[0-9]\d*$/
-            if (!rulesAmount.test(this.list1[a].amount)) {
-              this.$message({
-                type: 'error',
-                message: '采购数量请输入正整数',
-                duration: 2000
-              })
-              return false
-            }
-          }
-          // console.log('Yes')
-        }
-      }
-      this.getCreateNumber()
-      // -------------------------------------------
-      this.dialogStatusConfirmation = 'confirmation'
-      this.dialogFormVisibleConfirmation = true
-
-      console.log('确认配单data------', this.list1)
-      // this.list1 = this.list1.filter(i => parseFloat(i.amount) !== 0)
-      console.log(this.list1)
-      console.log('根据供应商分类', sorted1)
-      console.log('根据供应商分类表格listConfirmationSheet', this.listConfirmationSheet)
-      // 处理渲染数据
-      var providerNameMap = {}
-      var providerNameDest = []
-
-
-  
-
-      // eslint-disable-next-line no-redeclare
-      for (var i = 0; i < this.list1.length; i++) {
-        console.log(this.list1[i])
-        var ai = this.list1[i]
-        var price = this.list1[i].price
-        var amount = this.list1[i].amount
-        // console.log(price, amount)
-        var sumPrice = 0
-        sumPrice = parseFloat(price) * parseFloat(amount)
-        if (!providerNameMap[ai.providerName]) {
-          providerNameDest.push({
-            price: [price],
-            amount: [amount],
-            sumPrice: [sumPrice],
-            providerId: ai.providerId,
-            providerName: ai.providerName,
-            purpose: ai.purpose,
-            list: [ai]
-          })
-          providerNameMap[ai.providerName] = ai
-          providerNameMap[ai.providerId] = ai
-        } else {
-          // eslint-disable-next-line no-redeclare
-          for (var j = 0; j < providerNameDest.length; j++) {
-            console.log(providerNameDest[j])
-            var dj = providerNameDest[j]
-            if (dj.providerName === ai.providerName) {
-              dj.sumPrice.push(sumPrice)
-              dj.price.push(price)
-              // eslint-disable-next-line no-mixed-spaces-and-tabs
-              dj.amount.push(amount)
-              dj.list.push(ai)
-              break
-            }
-          }
-        }
-      }
-
-      var providerNameArray = []
-      // eslint-disable-next-line no-redeclare
-      for (var i = 0; i < this.list1.length; i++) {
-        providerNameArray.push(this.list1[i].providerName)
-      }
-      // console.log('原供应商', providerNameArray)
-      function unique(providerNameArray) {
-        return Array.from(new Set(providerNameArray))
-      }
-      var uniqueProviderNameArray = unique(providerNameArray)
-      console.log('去重后供应商', uniqueProviderNameArray) // ["泰森机电", "浩祥晟机电", "国宇商贸", "赛娜牧业"]
-      // ------------------------------------------
-
-      var OrderNumberArray = []
-      this.postDataPramas.common = { 'returnmap': '0' }
-      this.postDataPramas.data = []
-      for (var i = 0; i < uniqueProviderNameArray.length; i++) {
-        this.postDataPramas.data[i] = { 'name': 'autoCreatCode', 'type': 'sm', 'parammaps': {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'CG'
-        }}
-      }
-      ExecDataByConfig(this.postDataPramas).then(response => {
-        console.log('采购单请求发送参数', this.postDataPramas)
-        for (var i = 0; i < response.data.length; i++) {
-          // console.log(response.data[i].resultmaps[0].orderCode)
-          OrderNumberArray.push(response.data[i].resultmaps[0].orderCode)
-        }
-        console.log(OrderNumberArray)
-        this.listConfirmationSheet.map((item, index) => {
-          item.orderNumber = OrderNumberArray[index]
-          return item
-        })
-        this.$forceUpdate()
-      })
-      console.log(OrderNumberArray)
-      this.listConfirmationSheet = providerNameDest
-      // console.log(JSON.stringify(this.listConfirmationSheet))
-      console.log('根据供应商分类表格listConfirmationSheet', this.listConfirmationSheet)
-
-
-
-
-
-      var SumArray = []
-
-      this.listConfirmationSheet.forEach((item, index) => {
-        console.log(item.sumPrice)
-        // console.log(item.sumPrice.reduce((count, v) => count + v, 0))
-        SumArray.push(item.sumPrice.reduce((count, v) => count + v, 0).toFixed(3))
-      })
-      this.listConfirmationSheet.map((item, index) => {
-        // console.log(item, index)
-        item.Sum = SumArray[index]
-        return item
-      })
-
-      console.log('根据供应商分类表格listConfirmationSheet', this.listConfirmationSheet)
-      // -------------------------------------------
-    },
-    getCreateNumber() {
-      GetDataByName(this.getParmCreateNumber).then(response => {
-        this.$nextTick(() => {
-          this.show = false
-          console.log('配单号', response.data.list[0].orderCode)
-          this.temp1.matchCode = response.data.list[0].orderCode
-          this.$forceUpdate()
-        })
-      })
-    },
-    confirmationSheetData() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      console.log('点击了确认配单提交')
-      this.$refs['temp1'].validate(valid => {
-        if (valid) {
-          // orderNumber
-          if (this.temp1.matchCode == '' || this.temp1.matchCode == null || this.temp1.matchCode == undefined) {
-            this.getCreateNumber()
-          }
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          console.log(this.listConfirmationSheet)
-          for (let i = 0; i < this.listConfirmationSheet.length; i++) {
-            if (this.listConfirmationSheet[i].orderNumber == null || this.listConfirmationSheet[i].orderNumber == undefined) {
-              this.$notify({
-                title: '保存失败',
-                message: '网络异常未生成采购单,请刷新后重新进行配单',
-                type: 'warning',
-                duration: 2000
-              })
-              return false
-            }
-          }
-          var a = this.listConfirmationSheet.length
-          this.listConfirmationSheet.forEach((item, index) => {
-            console.log(item)
-            this.postDataPramas.data[index] = { 'name': 'insertBigbuydetail', 'resultname': 'insertBigbuydetail' + index, 'type': 'e', 'parammaps': {
-              pastureId: Cookies.get('pastureid'),
-              buyeCode: item.orderNumber,
-              providerId: item.providerId,
-              buyerPerson: this.temp1.buyerPerson,
-              buyerDate: this.temp1.buyerDate,
-              matchCode: this.temp1.matchCode
-            }}
-            this.postDataPramas.data[a] = { 'name': 'insertSpotList', 'resultmaps': { 'list': item.list }}
-            this.postDataPramas.data[a].children = []
-            this.postDataPramas.data[a].children[0] = { 'name': 'insertbuydetail', 'type': 'e', 'parammaps': {
-              bigId: '@insertBigbuydetail' + index + '.LastInsertId',
-              pastureId: '@insertSpotList.pastureId',
-              contractCode: '@insertSpotList.contractCode',
-              amount: '@insertSpotList.amount',
-              sumAmount: '@insertSpotList.sumAmount',
-              contractId: '@insertSpotList.id',
-              departmentName: '@insertSpotList.departmentName',
-              remark: '@insertSpotList.purpose'
-            }}
-            a = a + 1
-          })
-          this.postDataPramas.data[a] = { 'name': 'insertSpotListbpp', 'resultmaps': { 'list': this.partData }}
-          this.postDataPramas.data[a].children = []
-          this.postDataPramas.data[a].children[0] = { 'name': 'updateBigpartpurchaseStatu', 'type': 'e', 'parammaps': {
-            id: '@insertSpotListbpp.id',
-            matchCode: this.temp1.matchCode
-          }}
-          this.postDataPramas.data.push({ 'name': 'insertbigpartdeal', 'type': 'e', 'parammaps': {
-            empId: this.temp1.buyerPerson,
-            pastureId: Cookies.get('pastureid'),
-            matchCode: this.temp1.matchCode
-          }}
-          )
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            if (response.msg === 'fail') {
-              var buyeCode = new RegExp('buyeCode')
-              if (buyeCode.test(response.data)) {
-                this.$notify({
-                  title: '',
-                  message: '网络异常未生成采购单,请刷新后重新进行配单',
-                  type: 'warning',
-                  duration: 2000
-                })
-              } else {
-                this.$notify({
-                  title: '保存失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-              }
-            } else {
-              this.dialogFormVisibleConfirmation = false
-              this.activeName = 'fouth'
-              this.get_table_data4()
-              this.$notify({
-                title: '',
-                message: '保存成功',
-                type: 'success',
-                duration: 2000
-              })
-            }
-          })
-        }
-      })
-    },
-
-    get_table_data2() {
-      this.listLoading2 = true
-      if (this.$refs['inputDatetime2'] !== undefined && this.$refs['inputDatetime2'].value !== null) {
-        this.getdataListParm2.parammaps.startTime = this.$refs['inputDatetime2'].value[0]
-        this.getdataListParm2.parammaps.stopTime = this.$refs['inputDatetime2'].value[1]
-      } else {
-        this.getdataListParm2.parammaps.startTime = ''
-        this.getdataListParm2.parammaps.stopTime = ''
-      }
-      GetDataByName(this.getdataListParm2).then(response => {
-        this.list2 = response.data.list
-        this.pageNum2 = response.data.pageNum
-        this.pageSize2 = response.data.pageSize
-        if (response.data.total) {
-          this.total2 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading2 = false
-        }, 300)
-      })
-    },
-    form_search2() {
-      this.listLoading = true
-      if (this.getdataListParm2.parammaps.inputDatetime === null) {
-        this.getdataListParm2.parammaps.inputDatetime = ''
-      }
-      this.getdataListParm2.offset = 1
-      this.get_table_data2()
-    },
-    statu: function(cellValue) {
-      if (cellValue.statu === 0) {
-        return '未到货'
-      } else if (cellValue.statu === 1) {
-        return '部分到货'
-      } else if (cellValue.statu === 2) {
-        return '按时到货'
-      } else if (cellValue.statu === 3) {
-        return '已延期'
-      } else if (cellValue.statu === 4) {
-        return '已关闭'
-      } else if (cellValue.statu === 5) {
-        return '部分到货-延期'
-      } else if (cellValue.statu === 6) {
-        return '全部到货-延期'
-      }
-    },
-    statue: function(cellValue) {
-      if (cellValue.statue === 0) {
-        return '审核中'
-      } else if (cellValue.statue === 1) {
-        return '审核通过'
-      } else if (cellValue.statue === 2) {
-        return '未通过'
-      }
-    },
-    form_see2(row) {
-      this.temp2 = Object.assign({}, row)
-      if (this.temp2.statu === 0) {
-        this.isStatu = false
-        this.temp2.statu = '未到货'
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 1) {
-        this.isStatu = false
-        this.temp2.statu = '部分到货'
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 2) {
-        this.isStatu = false
-        this.temp2.statu = '按时到货'
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 3) {
-        this.isStatu = false
-        this.temp2.statu = '已延期'
-        this.isExtensionDays = true
-      } else if (this.temp2.statu === 4) {
-        this.temp2.statu = '已关闭'
-        this.isStatu = true
-        this.isExtensionDays = false
-      } else if (this.temp2.statu === 5) {
-        this.isStatu = false
-        this.temp2.statu = '部分到货-延期'
-        this.isExtensionDays = true
-      } else if (this.temp2.statu === 6) {
-        this.isStatu = false
-        this.temp2.statu = '全部到货-延期'
-        this.isExtensionDays = true
-      }
-      this.dialogStatusSee2 = 'see'
-      this.dialogFormVisibleSee2 = true
-      this.getdataListSee2.parammaps.id = row.id
-      this.getSeeList2()
-    },
-    getSeeList2() {
-      GetDataByName(this.getdataListSee2).then(response => {
-        this.listSee2 = response.data.list
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
-              this.listSee2[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-              this.listSee2[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-            } else {
-              this.listSee2[i].srcpath = ''
-              this.listSee2[i].picpath = ''
-            }
-          }
-        }
-        console.log('查看下方table数据', response.data.list)
-        // this.pageNum2 = response.data.pageNum
-        // this.pageSize2 = response.data.pageSize
-        var sumArray = []
-        for (var i = 0; i < this.listSee2.length; i++) {
-          console.log()
-          sumArray.push(
-            this.listSee2[i].sumPrice
-          )
-        }
-        console.log('总价', sumArray)
-        var arrvalue = 0
-        for (var i = 0; i < sumArray.length; i++) {
-          console.log('table内总价每一个值', sumArray[i])
-          arrvalue += parseFloat(sumArray[i])// 数组的索引是从0开始的
-        }
-        this.temp2.sumPrices = arrvalue.toFixed(3)
-        setTimeout(() => {
-          this.listLoadingSee = false
-        }, 100)
-      })
-    },
-    resetCloseTemp() {
-      this.temp2.note = ''
-    },
-    handleClose2(row) {
-      this.resetCloseTemp()
-      this.temp2 = Object.assign({}, row)
-      this.dialogStatusClose = 'close'
-      this.dialogFormVisibleClose = true
-    },
-
-    handleCurrentChange(val) {
-        this.currentRow = val;
-        console.log("currentRow",this.currentRow)
-  },
-
-    sapUpload(){
-
-
-      const that = this 
-      console.log("currentRow",this.currentRow.sapstatus)
-
-     var send_data = this.selectList
-
-     if(send_data.length == 0){
-        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
-        return false
-      }
-
-
-      console.log(that.isSap)
-
-      if(that.isSap == 1){
-
-         that.isSap = 0
-         SapOrder(send_data).then(response => {
-              console.log('response', response)
-                
-               if (response.msg !== 'fail') {
-                that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-                that.selectList = []
-                that.get_table_data2()
-                 
-                } else {
-                  that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-                }
-               
-            })
- 
-            
-      } else {
-
-        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
-      }
-
-      setTimeout(() => {
-              that.isSap = 1
-            }, 3000)
-
-
-
-           
-    
-  
-      // if(this.currentRow.sapstatus){
-   
-      //   if(this.currentRow.sapstatus != 0){
-      //     const sapArr = this.currentRow.sapbuyeCode.split(",")
-      //     console.log("sapArr",sapArr)
-      //     sapArr.forEach(function(item){
-      //       console.log("sapArr item",item)
-      //       var send_data = {
-         
-      //             "code":item,
-      //             "pastureid":Cookies.get('pastureid')
-              
-      //       }
-
-      //       SapOrder(send_data).then(response => {
-      //         console.log('response', response)
-                
-      //          if (response.msg !== 'fail') {
-      //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-      //           that.get_table_data()
-                 
-      //           } else {
-      //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-      //           }
-               
-      //       })
-        
-        
-
-
-      //     })
-      //   }
-      // }
-
-    },
-
-
-    checkboxInit(row,index){
-      console.log(row)
-      var data1 = new Date(row.buyerDate)
-      var data2 = new Date('2022-10-25')
-      if(data1 > data2){ return 1 } else {return 0}
-    },
-
-    //监听 - 表格 - 勾选
-    change_table_selection(val) {
-      this.selectList = val
-      console.log('勾选数据selectList', this.selectList)
-    },
-
-    srmUpload(){
-
-      const that = this 
-      console.log("currentRow",this.currentRow.srmstatus)
-    
-      console.log('勾选数据selectList', this.selectList)
-
-      var send_data = this.selectList
-
-
-      if(send_data.length == 0){
-        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
-        return false
-      }
-
-
-      console.log(that.isSrm)
-
-      if(that.isSrm == 1){
-
-         that.isSrm = 0
-         SrmOrder(send_data).then(response => {
-              console.log('response', response)
-                
-               if (response.msg !== 'fail') {
-                that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-                that.selectList = []
-                that.get_table_data2()
-                
-                 
-                } else {
-                  that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-                }
-               
-            })
-
- 
-            
-      } else {
-
-        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
-      }
-
-      setTimeout(() => {
-              that.isSrm = 1
-            }, 3000)
-
-
-
-
-   
-      // if(this.currentRow.srmstatus){
-      //   if(this.currentRow.srmstatus != 0){
-      //     const srmArr = this.currentRow.srmbuyeCode.split(",")
-      //     console.log("srmArr",srmArr)
-      //     srmArr.forEach(function(item){
-      //       console.log("srmArr item",item)
-      //       var send_data = {
-         
-      //             "code":item,
-      //             "pastureid":Cookies.get('pastureid')
-      //       }
-      //       SrmOrder(send_data).then(response => {
-      //         console.log('response', response)
-                
-      //          if (response.msg !== 'fail') {
-      //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
-      //           that.get_table_data()
-                 
-      //           } else {
-      //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
-      //           }
-               
-      //       })
-        
-        
-
-
-      //     })
-      //   }
-      // }
-
-
-
-    },
-    
-
-    closeData() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      console.log('点击确认关闭', this.temp2)
-      this.$refs['temp2'].validate(valid => {
-        if (valid) {
-          this.requestParamStute.parammaps.id = this.temp2.id
-          this.requestParamStute.parammaps.note = this.temp2.note
-          PostDataByName(this.requestParamStute).then(response => {
-            console.log('新增保存发送参数', this.requestParamStute)
-            if (response.msg !== 'fail') {
-              this.get_table_data2()
-              this.dialogFormVisibleClose = false
-              this.$notify({
-                title: '成功',
-                message: '关闭成功',
-                type: 'success',
-                duration: 2000
-              })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-    get_table_data3() {
-      this.listLoading3 = true
-      if (this.$refs['inputDatetime3'] !== undefined && this.$refs['inputDatetime3'].value !== null) {
-        this.getdataListParm3.parammaps.startTime = this.$refs['inputDatetime3'].value[0]
-        this.getdataListParm3.parammaps.stopTime = this.$refs['inputDatetime3'].value[1]
-      } else {
-        this.getdataListParm3.parammaps.startTime = ''
-        this.getdataListParm3.parammaps.stopTime = ''
-      }
-      GetDataByName(this.getdataListParm3).then(response => {
-        this.list3 = response.data.list
-        this.pageNum3 = response.data.pageNum
-        this.pageSize3 = response.data.pageSize
-        if (response.data.total) {
-          this.total3 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading3 = false
-        }, 300)
-      })
-    },
-    form_search3() {
-      this.listLoading = true
-      if (this.getdataListParm3.parammaps.inputDatetime === null) {
-        this.getdataListParm3.parammaps.inputDatetime = ''
-      }
-      this.getdataListParm3.offset = 1
-      this.get_table_data3()
-    },
-    handleDownload3() {
-      console.log('点击了采购明细导出')
-      this.$alert('采购明细正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.downloadListParm3.name = this.getdataListParm3.name
-      this.downloadListParm3.parammaps = this.getdataListParm3.parammaps
-      GetAccount(this.downloadListParm3).then(response => {
-        if (response.data.list !== '') {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        this.downloadList3 = response.data.list
-        const elecExcelDatas = [
-          {
-            tHeader: ['配单号', '采购单号', '备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '供应商', '单价', '申购数量', '采购数量', '入库数', '申购部门', '采购人', '配单日期'],
-            filterVal: ['matchCode', 'buyeCode', 'partCode', 'partName', 'specification', 'brand', 'unit', 'providerName', 'price', 'sumAmount', 'amount', 'receiveAmount', 'departmentName', 'empname', 'buyerDate'],
-            tableDatas: this.downloadList3,
-            sheetName: '采购明细'
-          }
-        ]
-        json2excel(elecExcelDatas, '采购明细', true, 'xlsx')
-      })
-    },
-    get_table_data4() {
-      this.listLoading4 = true
-      if (this.$refs['inputDatetime4'] !== undefined && this.$refs['inputDatetime4'].value !== null) {
-        this.getdataListParm4.parammaps.startTime = this.$refs['inputDatetime4'].value[0]
-        this.getdataListParm4.parammaps.stopTime = this.$refs['inputDatetime4'].value[1]
-      } else {
-        this.getdataListParm4.parammaps.startTime = ''
-        this.getdataListParm4.parammaps.stopTime = ''
-      }
-      GetDataByName(this.getdataListParm4).then(response => {
-        this.list4 = response.data.list
-        this.pageNum4 = response.data.pageNum
-        this.pageSize4 = response.data.pageSize
-        if (response.data.total) {
-          this.total4 = response.data.total
-        }
-        // Just to simulate the time of the request
-        setTimeout(() => {
-          this.listLoading4 = false
-        }, 300)
-      })
-    },
-    form_search4() {
-      this.listLoading = true
-      if (this.getdataListParm4.parammaps.inputDatetime === null) {
-        this.getdataListParm4.parammaps.inputDatetime = ''
-      }
-      this.getdataListParm4.offset = 1
-      this.get_table_data4()
-    },
-    form_see4(row) {
-      this.dialogStatusSee4 = 'see'
-      this.dialogFormVisibleSee4 = true
-      this.temp4 = Object.assign({}, row)
-      this.getdataListSee4.parammaps.matchCode = row.matchCode
-      this.getSeeList4()
-      var reason = '未通过原因:' + this.temp4.workflowNote
-      if (this.temp4.statue === 0) {
-        this.activeList = [{ title: '配单', date: this.temp4.dealTime, name: this.temp4.empname }, { title: '办公室主任审核' }]
-        this.active = 1
-      } else if (this.temp4.statue === 1) {
-        this.activeList = [{ title: '配单', date: this.temp4.dealTime, name: this.temp4.empname }, { title: '办公室主任审核', date: this.temp4.chargeDate, name: this.temp4.chargeName }]
-        this.active = 2
-      } else if (this.temp4.statue === 2) {
-        this.activeList = [{ title: '配单', date: this.temp4.dealTime, name: this.temp4.empname }, { title: '办公室主任审核', date: this.temp4.chargeDate, name: this.temp4.chargeName, status: 'error', reason: reason }]
-        this.active = 2
-      }
-    },
-    getSeeList4() {
-      GetDataByName(this.getdataListSee4).then(response => {
-        this.listSee4 = response.data.list
-        this.listUpdate4 = response.data.list
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            console.log(response.data.list[i].srcpath)
-            console.log(response.data.list[i].picpath)
-            console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath)
-            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
-              if (this.dialogStatusSee4 == 'see') {
-                this.listSee4[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-                this.listSee4[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-              } else {
-                this.listUpdate4[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
-                this.listUpdate4[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
-              }
-            } else {
-              this.listSee4[i].srcpath = ''
-              this.listSee4[i].picpath = ''
-              this.listUpdate4[i].srcpath = ''
-              this.listUpdate4[i].picpath = ''
-            }
-          }
-        }
-
-        console.log('查看下方table数据', response.data.list)
-        this.pageNum4 = response.data.pageNum
-        this.pageSize4 = response.data.pageSize
-      })
-    },
-    handleExamine(row) {
-      if (row == undefined) {
-        this.examineTemp = this.temp4
-        this.$set(this.temp4, 'SHstatue', 1)
-        this.$set(this.temp4, 'workflowNote', '')
-      } else {
-        this.examineTemp = Object.assign({}, row)
-        this.$set(this.examineTemp, 'SHstatue', 1)
-        this.$set(this.examineTemp, 'workflowNote', '')
-      }
-      this.dialogStatus_Examine = 'examine'
-      this.dialogFormVisible_Examine = true
-      this.statueReason = false
-    },
-    changeSHStatue(val) {
-      if (val == 2) {
-        this.statueReason = true
-      } else {
-        this.statueReason = false
-      }
-    },
-    createExamineData() {
-      console.log(this.examineTemp)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-          if (this.examineTemp.SHstatue == 1) {
-            console.log('通过')
-            this.postDataPramas.common = { 'returnmap': '0' }
-            this.postDataPramas.data = []
-            this.postDataPramas.data[0] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
-              'id': this.examineTemp.id,
-              'statue': this.examineTemp.SHstatue,
-              'empId': Cookies.get('employeid'),
-              'workflowNote': this.examineTemp.workflowNote
-            }}
-
-            this.postDataPramas.data[1] = { 'name': 'updatebigbuydetailenable', 'type': 'e', 'parammaps': {
-              'matchCode': this.examineTemp.matchCode
-            }}
-            this.postDataPramas.data[2] = { 'name': 'updatebigbuydetailZero', 'type': 'e', 'parammaps': {
-              'matchCode': this.examineTemp.matchCode
-            }}
-            ExecDataByConfig(this.postDataPramas).then(response => {
-              console.log('审核保存发送参数', this.postDataPramas)
-              if (response.msg === 'fail') {
-                this.$notify({
-                  title: '审核失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-              } else {
-                this.dialogFormVisible_Examine = false
-                this.get_table_data4()
-                this.$notify({
-                  title: '',
-                  message: '审核成功',
-                  type: 'success',
-                  duration: 2000
-                })
-              }
-            })
-          } else if (this.examineTemp.SHstatue == 2) {
-            console.log('不通过')
-            this.postDataPramas.common = { 'returnmap': '0' }
-            this.postDataPramas.data = []
-            this.postDataPramas.data[0] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
-              'id': this.examineTemp.id,
-              'statue': this.examineTemp.SHstatue,
-              'empId': Cookies.get('employeid'),
-              'workflowNote': this.examineTemp.workflowNote
-            }}
-
-            // this.postDataPramas.data[1] = { 'name': 'updatepartpurchase', 'type': 'e', 'parammaps': {
-            //   'matchCode': this.examineTemp.matchCode
-            // }}
-            ExecDataByConfig(this.postDataPramas).then(response => {
-              console.log('审核保存发送参数', this.postDataPramas)
-              if (response.msg === 'fail') {
-                this.$notify({
-                  title: '审核失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-              } else {
-                this.dialogFormVisible_Examine = false
-                this.get_table_data4()
-                this.$notify({
-                  title: '',
-                  message: '审核成功',
-                  type: 'success',
-                  duration: 2000
-                })
-              }
-            })
-          }
-        }
-      })
-    },
-    form_edit(row) {
-      this.dialogStatusUpdate4 = 'update'
-      this.dialogFormVisibleUpdate4 = true
-      this.getdataListSee4.parammaps.matchCode = row.matchCode
-      this.updateTemp4 = Object.assign(row, {})
-      this.getSeeList4()
-    },
-    edit_dialog_save() {
-      this.$refs['updateTemp4'].validate(valid => {
-        if (valid) {
-          // for (let i = 0; i < this.listUpdate4.length; i++) {
-          //   var rulesAmount = /^\d+$/
-          //   if ((this.listUpdate4[i].amount == '' || this.listUpdate4[i].amount == undefined) && parseFloat(this.listUpdate4[i].amount) !== 0) {
-          //     this.$message({
-          //       type: 'error',
-          //       message: '采购数量不可为空',
-          //       duration: 2000
-          //     })
-          //     return false
-          //   } else if (!rulesAmount.test(parseFloat(this.listUpdate4[i].amount))) {
-          //     this.$message({
-          //       type: 'error',
-          //       message: '采购数量不可为空',
-          //       duration: 2000
-          //     })
-          //     return false
-          //   }
-          // }
-          for (let i = 0; i < this.listUpdate4.length; i++) {
-            console.log(this.listUpdate4[i].amount)
-            var rulesAmount = /^\d+$/
-            if ((this.listUpdate4[i].amount == '' || this.listUpdate4[i].amount == undefined) && parseFloat(this.listUpdate4[i].amount) !== 0) {
-              this.$message({
-                type: 'error',
-                message: '采购数量不可为空',
-                duration: 2000
-              })
-              return false
-            } else if (!rulesAmount.test(parseFloat(this.listUpdate4[i].amount))) {
-              this.$message({
-                type: 'error',
-                message: '采购数量请输入大于等于0的整数',
-                duration: 2000
-              })
-              return false
-            } else {
-              this.postDataPramas.common = { 'returnmap': '0' }
-              this.postDataPramas.data = []
-              this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listUpdate4 }}
-              this.postDataPramas.data[0].children = []
-              this.postDataPramas.data[0].children[0] = { 'name': 'updatePDbuydetail', 'type': 'e', 'parammaps': {
-                amount: '@insertSpotList.amount',
-                id: '@insertSpotList.id'
-              }}
-              this.postDataPramas.data[1] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
-                id: this.updateTemp4.id,
-                statue: '0',
-                empId: Cookies.get('employeid')
-              }}
-            }
-          }
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            console.log('新增保存发送参数', this.postDataPramas)
-            if (response.msg === 'fail') {
-              this.$notify({
-                title: '保存失败',
-                message: response.data,
-                type: 'warning',
-                duration: 2000
-              })
-            } else {
-              this.dialogFormVisibleUpdate4 = false
-              this.getdataListParm4.parammaps.inputDatetime = ''
-              this.get_table_data4()
-              this.$notify({
-                title: '',
-                message: '保存成功',
-                type: 'success',
-                duration: 2000
-              })
-            }
-          })
-          return true
-        }
-      })
-    }
-
-  }
-}
-</script>
-<style lang="scss" >
-.el-table .warning-row {
-    background: red;
-  }
-  .el-table .color-row {
-    background: #eee;
-  }
-</style>
-<style lang="scss" scoped>
-.app-contentClose .el-form-item__content {
-  margin-left: 0 !important;
-}
-</style>
-<style lang="scss" scoped>
-.app-contentConfirmationSheet {
-  margin-bottom: 50px;
-}
-.app-content {
-  background: #eee;
-  margin-bottom: 50px;
-  .title {
-    line-height: 40px;
-    div {
-      float: left;
-      margin-right: 50px;
-      b {
-        padding-left: 10px;
-      }
-    }
-  }
-  .total {
-    margin-left: 80%;
-    line-height: 30px;
-  }
-}
-</style>

+ 139 - 16
src/views/custom/receive/index.vue

@@ -5,8 +5,23 @@
       <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
     </div>
     <div class="filter-container">
-      <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
+      <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场"  multiple
+        collapse-tags filterable collapse-tags-tooltip  class="filter-item" @change="changePastureName">
+        <!--  -->
+           <div class="select_up">
+                <el-button type="text" @click="selectAll">
+                    <i class="jw jw-quanxuan " />
+                    全选</el-button>
+                <el-button type="text" @click="removeTag">
+                    <i class="jw jw-qingkong " />
+                    清空</el-button>
+                <el-button type="text" @click="selectReverse">
+                    <i class="jw jw-fanxuan " />
+                    反选</el-button>
+            </div>
+        <div class="select_list">
         <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+        </div>
       </el-select>
       <el-input v-model="getdataListParm.parammaps.applyCode" clearable placeholder="领用单号" style="width: 200px;" class="filter-item" />
       <el-select v-model="getdataListParm.parammaps.applyType" style="width: 120px;" clearable placeholder="领用类型" class="filter-item">
@@ -548,7 +563,7 @@ export default {
       myHeight:document.documentElement.clientHeight - 85- 250,
       findAllPasture: [], findAllDepart: [], findAllEmploye: [], createDepartList: [], edit: 0,
       requestParams: [
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllMainPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
         { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
         { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }}
       ],
@@ -574,8 +589,8 @@ export default {
       collarType: [{ id: '0', name: '非维保' }, { id: '1', name: '维修' }, { id: '2', name: '保养' },{ id: '3', name: '委外维修' }],
       radioAll: '全部',
       getdataListParm: {
-        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
-        parammaps: { pastureName: Cookies.get('pasturename'), applyCode: this.$route.query.applyCode, applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', loginId: Cookies.get('employeid'), menu: 'Receive', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid') }
+        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
+        parammaps: { pastureName: Cookies.get('pasturename'), applyCode: this.$route.query.applyCode, applyType: '', pastureArr:[], statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', loginId: Cookies.get('employeid'), menu: 'Receive', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid') }
       },
       tableKey: 0,
       listLoading: true,
@@ -613,7 +628,7 @@ export default {
       listAdd: [],
       EqNameList: [],
       requestEqName: {
-        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureId: Cookies.get('pastureid') }
       },
       EqCodeList: [],
@@ -632,8 +647,10 @@ export default {
       pending: {
         total: 0,
         getdataListParm: {
-          name: 'getPartapplyWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
-          parammaps: {}
+          name: 'getPartapplyWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 50, returntype: 'Map',
+          parammaps: {
+            empId: Cookies.get('employeid'),
+          }
         }
       },
       depids: []
@@ -677,11 +694,36 @@ export default {
       that.get_auto_buttons()
     })
     this.get_select_list()
-    this.get_table_data()
-    this.getPendingList()
+    // this.get_table_data()
+    // this.getPendingList()
   },
 
   methods: {
+       // 删除
+    removeTag(type) {
+      this.getdataListParm.parammaps.pastureArr = []
+    },
+    // 全选
+    selectAll(val) {
+      val = []
+      this.findAllPasture.map(item => {
+          val.push(item.name)
+      })
+      this.getdataListParm.parammaps.pastureArr = val
+    },
+    // 反选
+    selectReverse(val) {
+        val = []
+        this.findAllPasture.map(item => {
+            let index = this.getdataListParm.parammaps.pastureArr.indexOf(item.name);
+            if (index != -1) {
+                //orgData.splice(index, 1)
+            } else {
+                val.push(item.name)
+            }
+        })
+        this.getdataListParm.parammaps.pastureArr = val
+    },
     tableSort(column) {
       sortChange(column, this.listSee)
     },
@@ -754,8 +796,8 @@ export default {
       this.pending.getdataListParm.parammaps.menu = this.getdataListParm.parammaps.menu
       this.pending.getdataListParm.parammaps.logindeptId = this.getdataListParm.parammaps.logindeptId
       this.pending.getdataListParm.parammaps.loginpastureId = this.getdataListParm.parammaps.loginpastureId
-      this.pending.getdataListParm.parammaps.empId = this.getdataListParm.parammaps.empId
-      this.pending.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
+      this.pending.getdataListParm.parammaps.empId = this.getdataListParm.parammaps.empId || Cookies.get('employeid'),
+      this.pending.getdataListParm.parammaps.pastureId =this.getdataListParm.parammaps.pastureId || Cookies.get('pastureid')
       this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
       GetDataByName(this.pending.getdataListParm).then(response => {
         this.pending.total = response.data.total3
@@ -770,6 +812,19 @@ export default {
         this.getdataListParm.parammaps.startTime = ''
         this.getdataListParm.parammaps.stopTime = ''
       }
+
+      // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+
       GetDataByName(this.getdataListParm).then(response => {
         if (response.data.list !== null) {
           console.log('table数据', response.data.list)
@@ -788,6 +843,18 @@ export default {
 
     changeAll() {
       console.log(this.radioAll)
+       // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+      console.log(this.getdataListParm.parammaps,'this.getdataListParm.parammaps')
       if (this.radioAll === '全部') {
         this.getdataListParm.name = 'getBigpartapplyList'
         this.getdataListParm.offset = 1
@@ -796,7 +863,9 @@ export default {
           applyCode: '', applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', menu: 'Receive',
           loginId: Cookies.get('employeid'),
           logindeptId: Cookies.get('departmentid'),
-          loginpastureId: Cookies.get('pastureid')
+          loginpastureId: Cookies.get('pastureid'),
+          pastureId: this.getdataListParm.parammaps.pastureId || Cookies.get('pastureid'),
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
         }
         this.get_table_data()
       } else if (this.radioAll === '待处理') {
@@ -804,6 +873,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           applyCode: this.getdataListParm.parammaps.applyCode,
           applyType: this.getdataListParm.parammaps.applyType,
           statue: this.getdataListParm.parammaps.statue,
@@ -816,8 +886,9 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           loginpastureId: Cookies.get('pastureid'),
           empId: Cookies.get('employeid'),
-          pastureId: Cookies.get('pastureid'),
-          deptId: Cookies.get('departmentid')
+          pastureId:this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid'),
+          empId: Cookies.get('employeid'),
         }
         this.get_table_data()
       } else if (this.radioAll === '已处理') {
@@ -825,6 +896,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           applyCode: this.getdataListParm.parammaps.applyCode,
           applyType: this.getdataListParm.parammaps.applyType,
           statue: this.getdataListParm.parammaps.statue,
@@ -837,7 +909,7 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           loginpastureId: Cookies.get('pastureid'),
           empId: Cookies.get('employeid'),
-          pastureId: Cookies.get('pastureid'),
+          pastureId:this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid'),
           deptId: Cookies.get('departmentid')
         }
         this.get_table_data()
@@ -1318,9 +1390,14 @@ export default {
     },
     get_select_list() {
       GetDataByNames(this.requestParams).then(response => {
-        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllPasture = response.data.findAllMainPasture.list
         this.findAllEmploye = response.data.findAllEmploye.list
+        this.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
         this.getDepartDownList()
+        this.get_table_data()
+        this.getPendingList()
       })
     },
     getDepartDownList() {
@@ -1390,7 +1467,21 @@ export default {
         this.percentage = this.percentage
       }, 1000)
       this.downloadParam.name = 'downloadpartapply'
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+
       this.downloadParam.parammaps = this.getdataListParm.parammaps
+
       GetAccount(this.downloadParam).then(response => {
         if (response.data.list !== null) {
           this.percentage = 99
@@ -1767,6 +1858,38 @@ export default {
   }
 </style>
 <style lang="scss" scoped>
+.select_up {
+    padding: 0 12px;
+    font-size: 14px;
+    position: absolute;
+    z-index: 99999;
+    background-color: white;
+    top: 0px;
+    width: 100%;
+    border-radius: 5px 5px 0 0;
+
+    ::v-deep .el-button {
+        color: #bcbcbc;
+        font-size: 14px;
+
+        i {
+            font-size: 14px;
+        }
+    }
+
+    ::v-deep .el-button:hover {
+        color: #409EFF;
+    }
+
+        .el-button+.el-button {
+            margin-left: 6px;
+        }
+    }
+
+    .select_list {
+        margin-top: 25px;
+    }
+
   .el-table  {
     text-align: left !important;
   }

+ 3 - 3
src/views/custom/receive/index1.vue

@@ -573,7 +573,7 @@ export default {
       collarType: [{ id: '0', name: '非维保' }, { id: '1', name: '维修' }, { id: '2', name: '保养' }],
       radioAll: '全部',
       getdataListParm: {
-        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureName: Cookies.get('pasturename'), applyCode: this.$route.query.applyCode, applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', loginId: Cookies.get('employeid'), menu: 'Receive', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid') }
       },
       tableKey: 0,
@@ -612,7 +612,7 @@ export default {
       listAdd: [],
       EqNameList: [],
       requestEqName: {
-        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
         parammaps: { pastureId: Cookies.get('pastureid') }
       },
       EqCodeList: [],
@@ -631,7 +631,7 @@ export default {
       pending: {
         total: 0,
         getdataListParm: {
-          name: 'getPartapplyWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          name: 'getPartapplyWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 50, returntype: 'Map',
           parammaps: {}
         }
       },

+ 1 - 1
src/views/custom/record/index.vue

@@ -272,7 +272,7 @@ export default {
         name: 'getImportStockLaidList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),

+ 1 - 1
src/views/custom/refuse/index.vue

@@ -327,7 +327,7 @@ export default {
         name: 'getRefuseList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: new Date(),

+ 23 - 23
src/views/custom/retreat/index.vue

@@ -80,7 +80,7 @@
               <template slot-scope="scope">
                 <span v-if="scope.row.ProofCode">已上传</span>
                 <span v-else>未上传</span>
-            
+
               </template>
             </el-table-column>
           <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
@@ -655,7 +655,7 @@ export default {
         name: 'getBigPartquitlist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -680,7 +680,7 @@ export default {
         name: 'getPartquitDetaillist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: '',
@@ -734,7 +734,7 @@ export default {
         name: 'getBigpartusecode',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid')
@@ -769,7 +769,7 @@ export default {
           name: 'getbigpartquitSync',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {
             pastureid: Cookies.get('pastureid')
@@ -790,8 +790,8 @@ export default {
             if(parseInt(i.quitNumber) > (parseInt(i.checkoutNumber)-parseInt(i.quitNumberC))){
               i.quitNumber = parseInt(i.checkoutNumber)-parseInt(i.quitNumberC)
             }
-                
-          })  
+
+          })
       }
     },
   },
@@ -984,17 +984,17 @@ export default {
 
     checkboxInit(row,index){
       // console.log(row)
-      if(row.ProofCode){ 
-        return 0 
+      if(row.ProofCode){
+        return 0
       } else {
 
         var data1 = new Date(row.creatTime)
         var data2 = new Date('2022-10-25')
         if(data1 > data2){ return 1 } else {return 0}
- 
+
       }
 
- 
+
     },
     //监听 - 表格 - 勾选
     change_table_selection(val) {
@@ -1003,7 +1003,7 @@ export default {
     },
 
     sapUpload(){
-      const that = this 
+      const that = this
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
 
@@ -1018,21 +1018,21 @@ export default {
       if(that.isSap == 1){
 
          that.isSap = 0
-      
+
          SapQuit(send_data).then(response => {
               console.log('response', response)
-                
+
               if (response.msg !== 'fail') {
                 that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
 
                 that.selectList = []
                 that.get_table_data()
-                
+
                 } else {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
-            
+
       } else {
 
         that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
@@ -1043,7 +1043,7 @@ export default {
             }, 3000)
 
 
-      
+
       //  if(true){
       // if(this.currentRow.ProofCode){
       //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")
@@ -1051,28 +1051,28 @@ export default {
       // } else {
       //   console.log("currentRow ProofCode没有这个值")
       //   console.log("currentRow ProofCode",this.currentRow.ProofCode)
-      //     const useForm = this.currentRow.useForm 
-      //     const creatTime = this.currentRow.creatTime 
+      //     const useForm = this.currentRow.useForm
+      //     const creatTime = this.currentRow.creatTime
       //     console.log("useForm",useForm)
       //       var send_data = {
       //             "useForm":useForm,
       //             "quitDate":creatTime,
       //             "pastureid":Cookies.get('pastureid')
-              
+
       //       }
       //       SapQuit(send_data).then(response => {
       //         console.log('response', response)
-                
+
       //         if (response.msg !== 'fail') {
       //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
 
       //           that.get_table_data()
-                
+
       //           } else {
       //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
       //           }
       //       })
- 
+
     //  }
 
     },

+ 4 - 4
src/views/custom/returngoods/index.vue

@@ -715,7 +715,7 @@ export default {
         name: 'getBigPartrefundlist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -741,7 +741,7 @@ export default {
         name: 'getPartrefundDetaillist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: '',
@@ -851,7 +851,7 @@ export default {
           name: 'getbigpartrefundSync',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {
             pastureid: Cookies.get('pastureid')
@@ -861,7 +861,7 @@ export default {
       pending: {
         total: 0,
         getdataListParm: {
-          name: 'getBigPartrefundWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          name: 'getBigPartrefundWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 50, returntype: 'Map',
           parammaps: {pastureId: Cookies.get('pastureid')}
         }
       },

+ 29 - 29
src/views/custom/returngoods/index1.vue

@@ -87,7 +87,7 @@
               <template slot-scope="scope">
                 <span v-if="scope.row.ProofCode">已上传</span>
                 <span v-else>未上传</span>
-            
+
               </template>
             </el-table-column>
           <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
@@ -635,7 +635,7 @@ export default {
       isSap:1,
       isSrm:1,
       selectList: [],
-      isRetrunsap: [], 
+      isRetrunsap: [],
       currentRow:{},
       // 权限
       isReturngoodsAdd: [], isReturngoodsTemplate: [], isReturngoodsImport: [], isReturngoodsExport: [], isReturngoodsSee: [], isReturngoodsDelete: [], isReturngoodsExamineZG: [], isReturngoodsExamineCG: [], isReturngoodsUpdate: [],
@@ -676,7 +676,7 @@ export default {
         name: 'getBigPartrefundlist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -702,7 +702,7 @@ export default {
         name: 'getPartrefundDetaillist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           inputDatetime: '',
@@ -810,7 +810,7 @@ export default {
           name: 'getbigpartrefundSync',
           page: 1,
           offset: 1,
-          pagecount: 10,
+          pagecount: 50,
           returntype: 'Map',
           parammaps: {
             pastureid: Cookies.get('pastureid')
@@ -820,7 +820,7 @@ export default {
       pending: {
         total: 0,
         getdataListParm: {
-          name: 'getBigPartrefundWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          name: 'getBigPartrefundWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 50, returntype: 'Map',
           parammaps: {pastureId: Cookies.get('pastureid')}
         }
       }
@@ -832,22 +832,22 @@ export default {
   },
 
   watch: {
- 
+
     listAdd: {
       deep: true,
       handler: function (item) {
-   
+
           this.listAdd.forEach(function(i){
             if(parseInt(i.refundNumber) > parseInt(i.reportery)){
               i.refundNumber = i.reportery
             }
-               
+
           })
 
-           
+
       }
     },
- 
+
   },
 
 
@@ -873,7 +873,7 @@ export default {
     get_auto_buttons() {
 
 
-      
+
       const Retrunsap = 'customs:returngoods:sap'
       const isRetrunsap = checkButtons(this.$store.state.user.buttons, Retrunsap)
       this.isRetrunsap = isRetrunsap
@@ -1093,17 +1093,17 @@ export default {
 
     checkboxInit(row,index){
       // console.log(row)
-      if(row.ProofCode){ 
-        return 0 
+      if(row.ProofCode){
+        return 0
       } else {
 
         var data1 = new Date(row.createTime1)
         var data2 = new Date('2022-10-25')
         if(data1 > data2){ return 1 } else {return 0}
- 
+
       }
 
- 
+
     },
 
     //监听 - 表格 - 勾选
@@ -1113,7 +1113,7 @@ export default {
     },
 
     sapUpload(){
-      const that = this 
+      const that = this
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
 
@@ -1130,18 +1130,18 @@ export default {
          that.isSap = 0
          SapRef(send_data).then(response => {
               console.log('response', response)
-                
+
               if (response.msg !== 'fail') {
                 that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
                 that.selectList = []
                 that.get_table_data()
-                
+
                 } else {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
- 
-            
+
+
       } else {
 
         that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
@@ -1152,7 +1152,7 @@ export default {
             }, 3000)
 
 
-     
+
 
       //  if(true){
       // if(this.currentRow.ProofCode){
@@ -1161,27 +1161,27 @@ export default {
       // } else {
       //   console.log("currentRow ProofCode没有这个值")
       //   console.log("currentRow ProofCode",this.currentRow.ProofCode)
-      //     const id = this.currentRow.id 
- 
+      //     const id = this.currentRow.id
+
       //     console.log("id",id)
       //       var send_data = {
       //             "id":id,
- 
+
       //             "pastureid":Cookies.get('pastureid')
-              
+
       //       }
       //       SapRef(send_data).then(response => {
       //         console.log('response', response)
-                
+
       //         if (response.msg !== 'fail') {
       //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
       //           that.get_table_data()
-                
+
       //           } else {
       //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
       //           }
       //       })
- 
+
       // }
 
     },

+ 3 - 3
src/views/custom/saplog/index.vue

@@ -102,7 +102,7 @@ export default {
         name: 'getSapLog',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           praseTime: parseTime(new Date().getTime(), '{y}-{m}-{d}')
@@ -125,7 +125,7 @@ export default {
         name: 'getEqRunstatueListDept',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           type: 0
@@ -137,7 +137,7 @@ export default {
         name: 'getEqRunstatueListEqclass',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 2457
src/views/custom/storage/index.vue


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 554 - 538
src/views/custom/subscribe/index.vue


+ 2 - 2
src/views/custom/writeoff/index.vue

@@ -173,7 +173,7 @@ export default {
       materialVoucherNoList:[{id:0,name:'11111'},{id:1,name:'2222'}],//物料凭证号
       // table1:{
       //   getdataListParm: {
-      //     name: 'getBigPartTransferList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+      //     name: 'getBigPartTransferList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
       //     parammaps: {
       //       pastureName: Cookies.get('pasturename'),
       //       writeoffType:'',
@@ -184,7 +184,7 @@ export default {
       // },
       table1:{
         getdataListParm: {
-          name: 'getLaidProofList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+          name: 'getLaidProofList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
           parammaps: {
 
             pastureName: Cookies.get('pasturename'),

+ 11 - 11
src/views/custom/writeoff/index1.vue

@@ -40,7 +40,7 @@
       <el-table-column label="物料凭证年度" min-width="150px" align="center" prop="proofYear" />
       <el-table-column label="凭证中的过账信息" min-width="150px" align="center" prop="chargeDate" />
       <el-table-column label="设备管理平台单号" min-width="150px" align="center" prop="orderNumber" />
- 
+
       <el-table-column label="是否已开票" min-width="150px" align="center" show-overflow-tooltip v-if="table1.getdataListParm.parammaps.writeoffType == '备件入库' || table1.getdataListParm.parammaps.writeoffType == '备件退货'" >
             <template slot-scope="scope">
               <span v-if="scope.row.hasTicket == 1">是</span>
@@ -162,7 +162,7 @@ export default {
       materialVoucherNoList:[{id:0,name:'11111'},{id:1,name:'2222'}],//物料凭证号
       // table1:{
       //   getdataListParm: {
-      //     name: 'getBigPartTransferList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+      //     name: 'getBigPartTransferList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
       //     parammaps: {
       //       pastureName: Cookies.get('pasturename'),
       //       writeoffType:'',
@@ -173,7 +173,7 @@ export default {
       // },
       table1:{
         getdataListParm: {
-          name: 'getLaidProofList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+          name: 'getLaidProofList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
           parammaps: {
             pastureName: Cookies.get('pasturename'),
             writeoffType:'备件入库',
@@ -365,27 +365,27 @@ export default {
 
     change_type(item) {
       console.log(item)
-      if(item == "备件入库"){ 
+      if(item == "备件入库"){
         this.table1.getdataListParm.name = 'getLaidProofList'
         this.table1.getdataListParm.parammaps.writeoffType = '备件入库'
        }
       if(item == "备件出库"){ this.table1.getdataListParm.name = 'getReturnProofList'
-      this.table1.getdataListParm.parammaps.writeoffType = '备件出库' 
+      this.table1.getdataListParm.parammaps.writeoffType = '备件出库'
     }
-      if(item == "备件退库"){ this.table1.getdataListParm.name = 'getQuitProofList' 
-      this.table1.getdataListParm.parammaps.writeoffType = '备件退库' 
+      if(item == "备件退库"){ this.table1.getdataListParm.name = 'getQuitProofList'
+      this.table1.getdataListParm.parammaps.writeoffType = '备件退库'
     }
-      if(item == "备件退货"){ this.table1.getdataListParm.name = 'getUseProofList' 
-      this.table1.getdataListParm.parammaps.writeoffType = '备件退货' 
+      if(item == "备件退货"){ this.table1.getdataListParm.name = 'getUseProofList'
+      this.table1.getdataListParm.parammaps.writeoffType = '备件退货'
     }
     },
 
     // 查看
     form_see(row) {
       this.dialogStatus = 'see'
-      
+
       this.create.temp = Object.assign({}, row)
-     
+
       console.log('row',row)
 
 

+ 15 - 15
src/views/custom/writeoff/index2.vue

@@ -44,7 +44,7 @@ index copy      <el-input v-if="table1.getdataListParm.parammaps.writeoffType ==
       <el-table-column label="物料凭证年度" min-width="150px" align="center" prop="proofYear" />
       <el-table-column label="凭证中的过账信息" min-width="150px" align="center" prop="chargeDate" />
       <el-table-column label="设备管理平台单号" min-width="150px" align="center" prop="orderNumber" />
- 
+
       <el-table-column label="是否已开票" min-width="150px" align="center" show-overflow-tooltip v-if="table1.getdataListParm.parammaps.writeoffType == '备件入库' || table1.getdataListParm.parammaps.writeoffType == '备件退货'" >
             <template slot-scope="scope">
               <span v-if="scope.row.hasTicket == 1">是</span>
@@ -120,7 +120,7 @@ index copy      <el-input v-if="table1.getdataListParm.parammaps.writeoffType ==
           :cell-style="cellStyle"
           class="elTable"
           >
-      
+
           <el-table-column label="行号" align="center" prop="rowNumber" width="50px" />
           <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
           <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
@@ -172,7 +172,7 @@ export default {
       materialVoucherNoList:[{id:0,name:'11111'},{id:1,name:'2222'}],//物料凭证号
       // table1:{
       //   getdataListParm: {
-      //     name: 'getBigPartTransferList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+      //     name: 'getBigPartTransferList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
       //     parammaps: {
       //       pastureName: Cookies.get('pasturename'),
       //       writeoffType:'',
@@ -183,9 +183,9 @@ export default {
       // },
       table1:{
         getdataListParm: {
-          name: 'getLaidProofList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+          name: 'getLaidProofList', page: 1, offset: 1, pagecount: 50, returntype: 'Map',
           parammaps: {
-            
+
             pastureName: Cookies.get('pasturename'),
             writeoffType:'备件入库',
             orderNumber:'',
@@ -330,7 +330,7 @@ export default {
         // this.$message({ title: '', message: re, type: 'warning', duration: 2000 })
       })
     },
-   
+
     add_dialog_save() {
       this.isokDisable = true
       setTimeout(() => {
@@ -338,7 +338,7 @@ export default {
       }, 1000)
 
       var rowsNumberArr = []
- 
+
 
       this.create.list.forEach(function(item){
         rowsNumberArr.push(item.rowNumber)
@@ -382,27 +382,27 @@ export default {
 
     change_type(item) {
       console.log(item)
-      if(item == "备件入库"){ 
+      if(item == "备件入库"){
         this.table1.getdataListParm.name = 'getLaidProofList'
         this.table1.getdataListParm.parammaps.writeoffType = '备件入库'
        }
       if(item == "备件出库"){ this.table1.getdataListParm.name = 'getReturnProofList'
-      this.table1.getdataListParm.parammaps.writeoffType = '备件出库' 
+      this.table1.getdataListParm.parammaps.writeoffType = '备件出库'
     }
-      if(item == "备件退库"){ this.table1.getdataListParm.name = 'getQuitProofList' 
-      this.table1.getdataListParm.parammaps.writeoffType = '备件退库' 
+      if(item == "备件退库"){ this.table1.getdataListParm.name = 'getQuitProofList'
+      this.table1.getdataListParm.parammaps.writeoffType = '备件退库'
     }
-      if(item == "备件退货"){ this.table1.getdataListParm.name = 'getUseProofList' 
-      this.table1.getdataListParm.parammaps.writeoffType = '备件退货' 
+      if(item == "备件退货"){ this.table1.getdataListParm.name = 'getUseProofList'
+      this.table1.getdataListParm.parammaps.writeoffType = '备件退货'
     }
     },
 
     // 查看
     form_see(row) {
       this.dialogStatus = 'see'
-      
+
       this.create.temp = Object.assign({}, row)
-     
+
       console.log('row',row)
 
 

+ 1 - 1
src/views/dashboard/editor/index.vue

@@ -220,7 +220,7 @@ export default {
               name: 'homepageRate',
               page: 1,
               offset: 1,
-              pagecount: 10,
+              pagecount: 50,
               returntype: 'Map',
               parammaps: {
                 pastureName: ''

+ 1 - 1
src/views/electro/electroData/index.vue

@@ -419,7 +419,7 @@ export default {
         name: 'getUseElecList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           assetNumber: '',

+ 4 - 4
src/views/evaluationVerification/assessment/index.vue

@@ -422,7 +422,7 @@ export default {
         name: 'getbigjudgeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -444,7 +444,7 @@ export default {
         name: 'getjudgeListBybig',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -485,7 +485,7 @@ export default {
         name: 'getAssessmentList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -494,7 +494,7 @@ export default {
         name: 'getAssessmentList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 3 - 3
src/views/evaluationVerification/assessment/index1.vue

@@ -397,7 +397,7 @@ export default {
         name: 'getbigjudgeList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
@@ -416,7 +416,7 @@ export default {
         name: 'getjudgeListBybig',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },
@@ -456,7 +456,7 @@ export default {
         name: 'getAssessmentList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {}
       },

+ 2 - 2
src/views/knowledgeBase/file/index.vue

@@ -175,7 +175,7 @@ export default {
         name: 'getFilelist',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           id: '',
@@ -186,7 +186,7 @@ export default {
         name: 'searchFileList',
         page: 1,
         offset: 1,
-        pagecount: 10,
+        pagecount: 50,
         returntype: 'Map',
         parammaps: {
           docname: ''

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů