Explorar o código

合并feature/repair-optimize分支最新代码功能

Shan9312 hai 10 meses
pai
achega
ccc58fdf62

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/index.html


+ 25 - 24
src/api/common.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 import parseTime from '@/utils/index.js'
 
-export function postJson(url,data) {
+export function postJson(url, data) {
   return request({
     url: process.env.VUE_APP_BASE_API + url,
     method: 'post',
@@ -10,7 +10,6 @@ export function postJson(url,data) {
   })
 }
 
-
 export function partslistSGv2(data) {
   return request({
     url: '/authdata/partslistSGv2',
@@ -19,8 +18,6 @@ export function partslistSGv2(data) {
   })
 }
 
-
-
 export function startStopRecord(data) {
   return request({
     url: '/authdata/startStopRecord',
@@ -29,7 +26,6 @@ export function startStopRecord(data) {
   })
 }
 
-
 export function GetDataByName(data) {
   return request({
     url: '/authdata/GetDataByName',
@@ -85,7 +81,6 @@ export function EasSync(data) {
   })
 }
 
-
 export function SapTrans(data) {
   return request({
     url: '/authdata/sap/transfer/send',
@@ -118,7 +113,6 @@ export function SapUse(data) {
   })
 }
 
-
 export function SapLaid(data) {
   return request({
     url: '/authdata/sap/laidproof/send',
@@ -127,7 +121,6 @@ export function SapLaid(data) {
   })
 }
 
-
 export function SapOrder(data) {
   return request({
     url: '/authdata/sap/order/send',
@@ -136,7 +129,6 @@ export function SapOrder(data) {
   })
 }
 
-
 export function SrmOrder(data) {
   return request({
     url: '/authdata/srm/order/send',
@@ -191,9 +183,9 @@ export function removeimage(data) {
     data
   })
 }
-export function getJson(url,data) {
+export function getJson(url, data) {
   return request({
-    url:  url + data,
+    url: url + data,
     method: 'get'
   })
 }
@@ -213,7 +205,8 @@ export function downloadmailreport(data) {
   })
 }
 
-export function failproccess(data, notify) {
+export function failproccess(data, notify, num) {
+  console.log(data, 'failproccess-闪闪')
   if (data.data.includes('Duplicate')) {
     notify({
       title: '失败',
@@ -224,7 +217,7 @@ export function failproccess(data, notify) {
   } else {
     notify({
       title: '失败',
-      message: '数据存在错误,请校验好重新录入,不可以录入数据',
+      message: num && num == 1 ? data.data : '数据存在错误,请校验好重新录入,不可以录入数据', // '数据存在错误,请校验好重新录入,不可以录入数据',
       type: 'error',
       duration: 2000
     })
@@ -268,7 +261,6 @@ export function updateAndInster(data) {
   })
 }
 
-
 export function transData(a, idStr, pidStr, chindrenStr) {
   var r = []; var hash = {}; var id = idStr; var pid = pidStr; var children = chindrenStr; var i = 0; var j = 0; var len = a.length
   for (; i < len; i++) {
@@ -326,14 +318,23 @@ export function DownloadExcel(data, filename) {
   }
 }
 // 用于获取本月或指定月份的最后一天
-export function getMonthFinalDay(year,month){
-	var day='';
-	if(year==null || year==undefined || year==''){
-		year = new Date().getFullYear();
-	}
-	if(month==null ||  month==undefined || month==''){
-		month = new Date().getMonth()+1;
-	}
-	day = new Date(new Date(year,month).setDate(0)).getDate();
-	return year+"-"+month+"-"+day;
+export function getMonthFinalDay(year, month) {
+  var day = ''
+  if (year == null || year == undefined || year == '') {
+    year = new Date().getFullYear()
+  }
+  if (month == null || month == undefined || month == '') {
+    month = new Date().getMonth() + 1
+  }
+  day = new Date(new Date(year, month).setDate(0)).getDate()
+  return year + '-' + month + '-' + day
+}
+
+// 获取工作类别数据
+export function getWorkList() {
+  return request({
+    url: '/authdata/work/class',
+    method: 'get'
+  })
 }
+

+ 11 - 11
src/permission.js

@@ -3,11 +3,11 @@ import store from './store'
 import { Message } from 'element-ui'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
-import { getToken,removeToken } from '@/utils/auth' // get token from cookie
+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', 1)
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['/login'] // no redirect whitelist
@@ -22,7 +22,7 @@ router.beforeEach(async(to, from, next) => {
   // determine whether the user has logged in
   const hasToken = getToken()
 
-    console.log('hasToken==>',hasToken)
+  console.log('hasToken==>', hasToken)
   if (hasToken) {
     if (to.path === '/login') {
       // if is logged in, redirect to the home page
@@ -43,7 +43,7 @@ router.beforeEach(async(to, from, next) => {
 
           // generate accessible routes map based on roles
           const accessRoutes = await store.dispatch('permission/generateRoutes', roles)
-          console.log(accessRoutes,'accessRoutes')
+          console.log(accessRoutes, 'accessRoutes')
           // dynamically add accessible routes
           router.addRoutes(accessRoutes)
 
@@ -75,19 +75,19 @@ router.beforeEach(async(to, from, next) => {
 
       next({ path: '/login' })
       NProgress.done()
-      if(Cookies.get('sso') == 1){
+      if (Cookies.get('sso') == 1) {
         // 单点登录
         // 构建要跳转的URL
         var url = process.env.VUE_APP_BASE_API
-        console.log(url,'url')
-        //获取当前url
-        if(url.indexOf('/')==0 && url.length==1){
-          url= window.location.protocol + "//"+window.location.host+url
+        console.log(url, 'url')
+        // 获取当前url
+        if (url.indexOf('/') == 0 && url.length == 1) {
+          url = window.location.protocol + '//' + window.location.host + url
         }
-        const externalURL = "https://id.xiandaimuye.com/api/v1/oauth2/authorize?response_type=code&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I&redirect_uri="+url+'api/v1/oauth2/token';
+        const externalURL = 'https://id.xiandaimuye.com/api/v1/oauth2/authorize?response_type=code&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I&redirect_uri=' + url + 'api/v1/oauth2/token'
         // 使用 $router.push 进行页面跳转
         // 注意: 这里的跳转是在当前窗口进行的,如果需要在新标签页打开,可以使用 window.open(externalURL)
-        window.open(externalURL, "_self");
+        window.open(externalURL, '_self')
       }
     }
   }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 688 - 115
src/views/asset/basics/index.vue


+ 114 - 145
src/views/custom/outStock/index.vue

@@ -7,7 +7,7 @@
     <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="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-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
@@ -49,7 +49,7 @@
             <!-- <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas">导出EAS</el-button> -->
             <!-- <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas1">导出EAS</el-button> -->
             <!-- <el-button v-if="isEasSynchronization" class="filter-item" type="primary" style="float: right;" @click="handleEAS">EAS同步</el-button> -->
-            <el-button v-if="isOutsap"  class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
+            <el-button v-if="isOutsap" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
           </div>
         </div>
         <el-table
@@ -64,12 +64,12 @@
           :row-style="rowStyle"
           :cell-style="cellStyle"
           class="elTable table-fixed"
+          :max-height="myHeight"
           @sort-change="tableSort"
           @selection-change="change_table_selection"
           @current-change="handleCurrentChange"
-          :max-height="myHeight"
         >
-        <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" />
+          <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 + (pageNum-1) * pageSize + 1 }}</span>
@@ -107,25 +107,25 @@
               <span>{{ scope.row.easStatus }}</span><br>
             </template>
           </el-table-column> -->
-          <el-table-column  prop="ProofCode" label="sap编码" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{scope.row.ProofCode}}</span>
-              </template>
-            </el-table-column>
-          <el-table-column   prop="ProofCode" label="sap上传状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.ProofCode">已上传</span>
-                <span v-else>未上传</span>
-
-              </template>
-            </el-table-column>
-            <el-table-column   prop="sterilisation" label="冲销状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.sterilisation == 1">已冲销</span>
-                <span v-else-if="scope.row.sterilisation == 2">部分冲销</span>
-                <span v-else>未冲销</span>
-              </template>
-            </el-table-column>
+          <el-table-column prop="ProofCode" label="sap编码" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.ProofCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="ProofCode" label="sap上传状态" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.ProofCode">已上传</span>
+              <span v-else>未上传</span>
+
+            </template>
+          </el-table-column>
+          <el-table-column prop="sterilisation" label="冲销状态" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.sterilisation == 1">已冲销</span>
+              <span v-else-if="scope.row.sterilisation == 2">部分冲销</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">
             <template slot-scope="{row}">
@@ -184,8 +184,8 @@
           :row-style="rowStyle"
           :cell-style="cellStyle"
           class="elTable table-fixed"
-          @sort-change="tableSort"
           :max-height="myHeight"
+          @sort-change="tableSort"
         >
           <el-table-column label="序号" align="center" type="index" width="50px">
             <template slot-scope="scope">
@@ -298,7 +298,7 @@
       </el-tab-pane>
     </el-tabs>
     <!-- 弹出层新增or修改 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" v-if ="dialogFormVisible" :close-on-click-modal="false" width="90%">
+    <el-dialog v-if="dialogFormVisible" :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
       <div class="app-add">
         <el-form
           ref="createTemp"
@@ -393,11 +393,11 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <!-- <el-col v-if="No2 && createTemp.useType == 6" :span="8">
+            <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-form-item>
-            </el-col> -->
+            </el-col>
             <el-col v-if="isReceiveTime2" :span="8">
               <el-form-item label="出库日期:" prop="receiveTime">
                 <el-date-picker
@@ -794,11 +794,11 @@
                 </el-radio-group>
               </el-form-item>
             </el-col>
-           <!-- <el-col :span="8" v-if="seeTemp.useType == 6">
-              <el-form-item v-if="oddCodeAllo" label="青贮单号:" prop="greenFodderNumber">
+            <el-col v-if="seeTemp.useType == 6" :span="8">
+              <el-form-item label="青贮单号:" prop="greenFodderNumber">
                 <el-input ref="oddCode" v-model="seeTemp.greenFodderNumber" disabled />
               </el-form-item>
-            </el-col> -->
+            </el-col>
             <el-col :span="8">
               <el-form-item v-if="oddCodeAllo" label="领用单号:" prop="oddCode">
                 <el-input ref="oddCode" v-model="seeTemp.oddCode" disabled />
@@ -955,20 +955,18 @@
             </template>
           </el-table-column>
 
-
           <el-table-column :key="19" label="备注" prop="sumPrice" align="center" min-width="80">
             <template slot-scope="scope">
               <span>{{ scope.row.note }}</span>
             </template>
           </el-table-column>
 
-          <el-table-column    prop="dflag" label="冲销状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.dflag == 1">已冲销</span>
-                <span v-else>未冲销</span>
-              </template>
-            </el-table-column>
-
+          <el-table-column prop="dflag" label="冲销状态" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.dflag == 1">已冲销</span>
+              <span v-else>未冲销</span>
+            </template>
+          </el-table-column>
 
         </el-table>
         <!-- <pagination
@@ -1026,8 +1024,8 @@
     </el-dialog>
 
     <el-dialog :title="textMap[description.dialogStatus]" :destroy-on-close="true" :visible.sync="description.dialogFormVisible" :close-on-click-modal="false" width="70%">
-        <b style="line-height: 28px;">常见问题1:出库保存报错</b>
-        <br>
+      <b style="line-height: 28px;">常见问题1:出库保存报错</b>
+      <br>
       <div class="app-description dialogMinHeight">
         <div class="content">
           报错原因1: 请求超时
@@ -1047,7 +1045,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 } from '@/api/common'
 import waves from '@/directive/waves' // waves directive
 import { parseTime, sortChange } from '@/utils/index.js'
 // eslint-disable-next-line no-unused-vars
@@ -1069,16 +1067,15 @@ export default {
   },
   data() {
     return {
-      myHeight:document.documentElement.clientHeight - 85- 250,
-      isSap:1,
-      isSrm:1,
+      myHeight: document.documentElement.clientHeight - 85 - 250,
+      isSap: 1,
+      isSrm: 1,
       selectList: [],
-      currentRow:{},
+      currentRow: {},
       totalImportInfo: 0,
       listLoadingImportInfo: true,
       listImportInfo: [],
 
-
       isOutsap: [],
       // isReceiveImport: [],
       // isRetreatMuban: [],
@@ -1137,7 +1134,7 @@ export default {
       dialogPvVisible: false,
       // 校验规则
       // -----------------------------------------
-      isOutStockAdd: [], isReceiveTemplate: [], isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [],isOutStockMethod4:[],isOutStockMethod5:[],
+      isOutStockAdd: [], isReceiveTemplate: [], isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [], isOutStockMethod4: [], isOutStockMethod5: [],
       isEasSynchronization: [], isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
       rules: {},
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
@@ -1204,7 +1201,7 @@ export default {
           useForm: '',
           useType: '',
           easStatus: '',
-          sapStatus:''
+          sapStatus: ''
         }
       },
       list: [],
@@ -1261,8 +1258,8 @@ export default {
         receiveTime: parseTime(new Date(), '{y}-{m}-{d}'),
         applicatId: Cookies.get('employeid'),
         departmentId: Cookies.get('departmentid'),
-        greenFodderNumber:'',
-        note:''
+        greenFodderNumber: '',
+        note: ''
       },
       requestSparePart: {
         name: 'getPartsListCK',
@@ -1338,7 +1335,7 @@ export default {
       // EAS同步
       easStatus: {
         easStatusList: [{ name: '同步成功', id: '1' }, { name: '同步失败', id: '0' }, { name: '关闭同步', id: '2' }],
-        sapStatusList: [ { name: '所有', id: '0' }, { name: '已上传', id: '1' }, { name: '未上传', id: '2' }],
+        sapStatusList: [{ name: '所有', id: '0' }, { name: '已上传', id: '1' }, { name: '未上传', id: '2' }],
         dialogStatus: '',
         dialogFormVisible: false,
         tableKey: 0,
@@ -1359,7 +1356,7 @@ export default {
       description: {
         dialogFormVisible: false,
         dialogStatus: ''
-      },
+      }
     }
   },
   computed: {
@@ -1396,21 +1393,17 @@ export default {
 
     listAdd: {
       deep: true,
-      handler: function (item) {
-
-          this.listAdd.forEach(function(i){
-            if(parseInt(i.checkoutNumber) > parseInt(i.amount)){
-              i.checkoutNumber = i.amount
-            }
-            if(parseInt(i.checkoutNumber) > parseInt(i.reportery)){
-              i.checkoutNumber = i.reportery
-            }
-
-          })
-
-
+      handler: function(item) {
+        this.listAdd.forEach(function(i) {
+          if (parseInt(i.checkoutNumber) > parseInt(i.amount)) {
+            i.checkoutNumber = i.amount
+          }
+          if (parseInt(i.checkoutNumber) > parseInt(i.reportery)) {
+            i.checkoutNumber = i.reportery
+          }
+        })
       }
-    },
+    }
 
   },
   created() {
@@ -1437,71 +1430,59 @@ export default {
     },
 
     handleCurrentChange(val) {
-        this.currentRow = val;
-        console.log("currentRow",this.currentRow)
+      this.currentRow = val
+      console.log('currentRow', this.currentRow)
     },
 
-    checkboxInit(row,index){
+    checkboxInit(row, index) {
       // console.log(row)
-      if(row.ProofCode){
+      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}
-
+        if (data1 > data2) { return 1 } else { return 0 }
       }
     },
 
-    //监听 - 表格 - 勾选
+    // 监听 - 表格 - 勾选
     change_table_selection(val) {
       this.selectList = val
       console.log('勾选数据selectList', this.selectList)
     },
 
-    sapUpload(){
+    sapUpload() {
       const that = this
-      console.log("currentRow ProofCode",this.currentRow.ProofCode)
+      console.log('currentRow ProofCode', this.currentRow.ProofCode)
       var send_data = this.selectList
 
-      if(send_data.length == 0){
-        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+      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
-         SapUse(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 })
-                }
-            })
-
+      if (that.isSap == 1) {
+        that.isSap = 0
+        SapUse(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 })
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击', type: 'error', duration: 2000 })
       }
 
       setTimeout(() => {
-              that.isSap = 1
-            }, 3000)
-
-
-
-
+        that.isSap = 1
+      }, 3000)
 
       // if(this.currentRow.ProofCode){
       //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")
@@ -1531,12 +1512,9 @@ export default {
       //       })
 
       // }
-
     },
 
-
     get_auto_buttons() {
-
       const Outsap = 'customs:outStock:sap'
       const isOutsap = checkButtons(this.$store.state.user.buttons, OutStockAdd)
       this.isOutsap = isOutsap
@@ -1911,7 +1889,7 @@ export default {
         // 调拨数量/出库数量显示
         this.allo = true
         this.No4 = false
-      }else if(val === 5){
+      } else if (val === 5) {
         // 报废出库
         this.No1 = false
         this.No2 = true
@@ -1924,7 +1902,7 @@ export default {
         this.No4 = true
         // 调拨数量/出库数量
         this.allo = false
-      }else if(val === 6){
+      } else if (val === 6) {
         // 报废出库
         this.No1 = false
         this.No2 = true
@@ -1953,9 +1931,8 @@ export default {
       this.getParmCreateAdd.parammaps.id = item.id
       this.getParmCreateAdd.parammaps.pastureId = Cookies.get('pastureid')
 
-
       // this.createTemp.departmentId = item.departmentId
-      this.$set(this.createTemp, "departmentId", item.departmentId)
+      this.$set(this.createTemp, 'departmentId', item.departmentId)
 
       this.createTemp.bid = item.id
       this.createTemp.applicatId = item.empId
@@ -2301,13 +2278,13 @@ export default {
             note: this.createTemp.note
           }}
 
-          if(this.createTemp.oddCode == ""){
+          if (this.createTemp.oddCode == '') {
             this.$notify({
-                title: '保存失败',
-                message: '领用单号不得为空',
-                type: 'warning',
-                duration: 2000
-              })
+              title: '保存失败',
+              message: '领用单号不得为空',
+              type: 'warning',
+              duration: 2000
+            })
             return false
           }
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
@@ -2499,13 +2476,13 @@ export default {
             note: this.createTemp.note
           }}
 
-          if(this.createTemp.oddCode == ""){
+          if (this.createTemp.oddCode == '') {
             this.$notify({
-                title: '保存失败',
-                message: '领用单号不得为空',
-                type: 'warning',
-                duration: 2000
-              })
+              title: '保存失败',
+              message: '领用单号不得为空',
+              type: 'warning',
+              duration: 2000
+            })
             return false
           }
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
@@ -2561,8 +2538,8 @@ export default {
             }
           })
           return true
-        }else if(this.createTemp.useType === 5){
-          console.log('baofei',this.createTemp.oddCode)
+        } else if (this.createTemp.useType === 5) {
+          console.log('baofei', this.createTemp.oddCode)
           // 报废出库
           this.postDataPramas.common = { 'returnmap': '0' }
           this.postDataPramas.data = []
@@ -2610,13 +2587,13 @@ export default {
             note: this.createTemp.note
           }}
 
-          if(this.createTemp.oddCode == ""){
+          if (this.createTemp.oddCode == '') {
             this.$notify({
-                title: '保存失败',
-                message: '领用单号不得为空',
-                type: 'warning',
-                duration: 2000
-              })
+              title: '保存失败',
+              message: '领用单号不得为空',
+              type: 'warning',
+              duration: 2000
+            })
             return false
           }
 
@@ -2672,7 +2649,7 @@ export default {
             }
           })
           return true
-        }else if(this.createTemp.useType === 6){
+        } else if (this.createTemp.useType === 6) {
           // 青贮出库
           this.postDataPramas.common = { 'returnmap': '0' }
           this.postDataPramas.data = []
@@ -2718,7 +2695,7 @@ export default {
             receiveTime: this.createTemp.receiveTime,
             empId: this.createTemp.empId,
             note: this.createTemp.note,
-            greenFodderNumber:this.createTemp.greenFodderNumber
+            greenFodderNumber: this.createTemp.greenFodderNumber
           }}
 
           // if(this.createTemp.oddCode == ""){
@@ -2890,21 +2867,16 @@ export default {
       GetAccount(this.requestParam).then(response => {
         this.$nextTick(() => {
           import('@/vendor/Export2Excel').then(excel => {
-
-
             if (response.data.list !== null) {
               for (let i = 0; i < response.data.list.length; i++) {
-
-                if(response.data.list[i].sterilisation == 1){
-                  this.$set(response.data.list[i], 'sterilisation', "已冲销")
+                if (response.data.list[i].sterilisation == 1) {
+                  this.$set(response.data.list[i], 'sterilisation', '已冲销')
                 } else {
-                  this.$set(response.data.list[i], 'sterilisation', "未冲销")
+                  this.$set(response.data.list[i], 'sterilisation', '未冲销')
                 }
               }
             }
 
-
-
             const list1 = response.data.list
             if (response.data.list !== '') {
               this.percentage = 99
@@ -2913,13 +2885,10 @@ export default {
               }, 2000)
             }
 
-
-
-
             const tHeader = [
-              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号','资产品牌', '费用类型', '领用部门', '领用人', '备注', '冲销状态']
+              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '资产品牌', '费用类型', '领用部门', '领用人', '备注', '冲销状态']
             const filterVal = [
-              'pastureName', 'useForm', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'eqName', 'eqCode', 'eqBrand','useTypeV', 'departmentName', 'appliname', 'note', 'sterilisation'
+              'pastureName', 'useForm', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'eqName', 'eqCode', 'eqBrand', 'useTypeV', 'departmentName', 'appliname', 'note', 'sterilisation'
             ]
             const data1 = this.formatJson(filterVal, list1)
             excel.export_json_to_excel({ header: tHeader, data: data1, filename: this.requestParam.parammaps.formType, autoWidth: true, bookType: 'xlsx' })

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1118 - 469
src/views/custom/subscribe/index.vue


+ 48 - 6
src/views/maintenance/repair/index.vue

@@ -13,6 +13,9 @@
       <el-select v-model="getdataListParm.parammaps.SHStatue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
         <el-option v-for="item in SHStatues" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
+      <el-select v-model="getdataListParm.parammaps.outsourcing" clearable placeholder="是否委外" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in outsourcingList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
       <el-date-picker
         ref="inputDatetime"
         v-model="getdataListParm.parammaps.inputDatetime"
@@ -117,6 +120,13 @@
           <span>{{ scope.row.LRStatue }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="是否委外" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.outsourcing == 0">无委外</span>
+          <span v-else-if="scope.row.outsourcing == 1">确认委外维修</span>
+          <span v-else-if="scope.row.outsourcing == 2">生成委外维修</span>
+        </template>
+      </el-table-column>
       <el-table-column label="审核状态" min-width="100px" align="center" :formatter="SHStatue" />
       <el-table-column label="操作" align="center" min-width="400" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="{row}">
@@ -154,9 +164,8 @@
           <el-button v-if="(row.orderStatue == 0 && isRejectRepair)" style="display:inline-block;" type="success" class="successMaintenanceAudit" size="mini" @click="handleRejectRepair(row)">报修驳回</el-button>
 
 
-           <el-button  v-if="isshengweiwaidan && row.outsourcing == 1"   style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont(row)">生成委外单</el-button>
-
-          <el-button   v-if="roleSet1(row) && row.outsourcing == 0"  style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont_sure(row)">委外维修</el-button>
+          <el-button  v-if="isshengweiwaidan && row.outsourcing == 1"   style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont(row)">生成委外单</el-button>
+          <el-button   v-if="roleSet11(row)"  style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont_sure(row)">委外维修</el-button>
 
 
         </template>
@@ -253,7 +262,7 @@
             <el-table-column :key="0" label="序号" align="center" type="index" width="50px" />
             <el-table-column :key="1" label="供应商" prop="providerName" align="center" min-width="80px">
               <template slot-scope="scope">
-                <el-select v-model="scope.row.providerName" placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px"   >
+                <el-select v-model="scope.row.providerName" filterable placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px"   >
                   <el-option v-for="item in providerNameList" :key="item.name" :label="item.name" :value="item.name" />
                 </el-select>
 
@@ -1645,6 +1654,7 @@ export default {
       ],
       orderStatues: [{ id: '0', name: '待接单' }, { id: '1', name: '维修中' }, { id: '2', name: '维修完成' }],
       SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      outsourcingList: [{ id: '0', name: '无委外' }, { id: '1', name: '确认委外维修' }, { id: '2', name: '生成委外维修' }],
       pickerOptions: {
         disabledDate(time) {
           return time.getTime() > Date.now()// 当天之前的时间可选
@@ -1679,6 +1689,7 @@ export default {
           orderStatue: '',
           SHStatue: '',
           inputDatetime: '',
+          outsourcing:'',
 
           loginId: Cookies.get('employeid'),
           menu: 'Repair',
@@ -1975,6 +1986,7 @@ export default {
       isMaintenanceSee: [],
       isDistributeLeaflets: [],
       isReceipt: [],
+      isReceipt1:[],
       isMaintenanceRequisition: [],
       isRepairComplete: [],
       isDelete: [],
@@ -2029,6 +2041,28 @@ export default {
       }
 
 
+      return result
+
+    },
+    roleSet11(row){
+      var result = true
+      if(row.orderStatue == 1  && row.SHStatue == 1 &&  this.isReceipt1 ){
+
+        if(row.pickId){
+          if(row.pickId.split(',').includes(this.getdataListParm.parammaps.loginId)){
+            result = true
+          } else{
+            result = false
+          }
+        } else{
+            result = false
+        }
+
+      } else {
+        result = false
+      }
+
+
       return result
 
     },
@@ -2119,6 +2153,11 @@ export default {
       const Receipt = 'maintenance:repair:jiedan'
       const isReceipt = checkButtons(this.buttons, Receipt)
       this.isReceipt = isReceipt
+
+      // 委外维修
+      const Receipt1 = 'maintenance:repair:weiwaiweixiu'
+      const isReceipt1 = checkButtons(this.buttons, Receipt1)
+      this.isReceipt1 = isReceipt1
       // 维修及领用
       const Repairlingyong = 'maintenance:repair:lingyong'
       const isMaintenanceRequisition = checkButtons(this.buttons, Repairlingyong)
@@ -3421,6 +3460,7 @@ export default {
             this.requestParam.name = 'completeRepirs'
             this.requestParam.parammaps = {}
             this.requestParam.parammaps.id = this.repairCompleteTemp.id
+            this.requestParam.parammaps.empId = Cookies.get('employeid')
             PostDataByName(this.requestParam).then((response) => {
               if (response.msg !== 'fail') {
                 this.get_table_data()
@@ -4031,7 +4071,8 @@ export default {
                     applyCode: this.collectionSparePartsSeeTemp.applyCode,
                     applyType: 1,
                     departmentId: this.collectionSparePartsSeeTemp.departmentId,
-                    empId: this.collectionSparePartsSeeTemp.pickId,
+                    // empId: this.collectionSparePartsSeeTemp.pickId,
+                    empId: Cookies.get('employeid'),
                     applyDate: this.collectionSparePartsSeeTemp.createDate,
                     RUCode: this.collectionSparePartsSeeTemp.repairCode
                   }}
@@ -4061,7 +4102,8 @@ export default {
                       applyCode: this.collectionSparePartsSeeTemp.applyCode,
                       applyType: 1,
                       departmentId: this.collectionSparePartsSeeTemp.departmentId,
-                      empId: this.collectionSparePartsSeeTemp.pickId,
+                      // empId: this.collectionSparePartsSeeTemp.pickId,
+                      empId: Cookies.get('employeid'),
                       applyDate: this.collectionSparePartsSeeTemp.createDate,
                       RUCode: this.collectionSparePartsSeeTemp.repairCode,
                       SHStatus: this.collectionSparePartsSeeTemp.SHStatus

+ 1624 - 1622
src/views/maintenance/subcontractingMainten/tabPage/tab1.vue

@@ -1,1623 +1,1625 @@
-<template>
-  <div class="app-container">
-    <div class="filter-container">
-
-      <el-select v-model="tableObj1.getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="change_pasture1">
-        <el-option v-for="item in pastureNameList" :key="item.id" :label="item.name" :value="item.name" />
-      </el-select>
-
-      <el-select v-model="tableObj1.getdataListParm.parammaps.departmentId" clearable style="width: 140px;" placeholder="部门" class="filter-item">
-        <el-option v-for="item in departNameList1" :key="item.id" :label="item.name" :value="item.id" />
-      </el-select>
-
-      <el-input v-model="tableObj1.getdataListParm.parammaps.outsourcingCode" placeholder="委外维修单号" style="width: 200px;" class="filter-item" />
-
-      <el-select v-model="tableObj1.getdataListParm.parammaps.status" style="width: 140px;" clearable placeholder="审核状态" class="filter-item">
-        <el-option v-for="item in statuesNameList" :key="item.id" :label="item.name" :value="item.id" />
-      </el-select>
-
-      <el-input v-model="tableObj1.getdataListParm.parammaps.eqName" placeholder="设备名称" style="width: 200px;" class="filter-item" />
-
-      <el-input v-model="tableObj1.getdataListParm.parammaps.eqCode" placeholder="设备内部编号" style="width: 200px;" class="filter-item" />
-
-      <el-input v-model="tableObj1.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 200px;" class="filter-item" />
-
-      <el-date-picker ref="inputDatetime" v-model="tableObj1.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  class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
-
-      <el-button v-if="istab1Add" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
-
-
-
-    </div>
-
-
-    <div class="elTable">
-      <el-table :max-height="myHeight" :key="tableObj1.tableKey"  v-loading="tableObj1.listLoading" element-loading-text="给我一点时间"  :data="tableObj1.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 + (tableObj1.pageNum-1) * tableObj1.pageSize + 1 }}</span>
-          </template>
-        </el-table-column>
-
-        <el-table-column label="委外单号" min-width="120px" align="center" prop="outsourcingCode" />
-        <el-table-column label="牧场" min-width="120px" align="center" prop="pastureName" />
-        <el-table-column label="责任部门 " min-width="120px" align="center" prop="departmentName" />
-        <el-table-column label="合同" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.contract ==1 ">有</span>
-            <span v-else>无</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="申请人" min-width="120px" align="center" prop="applicantName" />
-        <el-table-column label="日期" min-width="120px" align="center" prop="date" />
-        <el-table-column label="审核状态" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.status == 0 ">审核中</span>
-            <span v-else-if="scope.row.status == 1 ">审核通过</span>
-            <span v-else>审核未通过</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_see(row)">查看</el-button>
-          <el-button v-if="istab1Edit && (row.status !== 0) && (row.status !== 1) "  type="success" size="mini" @click="form_edit(row)">编辑</el-button>
-          <el-button v-if="istab1Del && (row.status !== 1) "  type="danger" size="mini" @click="form_delete(row)">删除</el-button>
-
-          <el-button  v-if="istab1Shenhe1 && (row.status== 0) && (row.flowCompeleted == 1) "  style="display:inline-block" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
-
-          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
-
-          <el-button   v-if="istab1Shenhe2 && (row.status== 0) && (row.flowCompeleted == 2 )" style="display:inline-block" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
-          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
-
-          <el-button   v-if="istab1Shenhe3 && (row.status== 0) && (row.flowCompeleted == 4)" style="display:inline-block" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
-          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
-
-          <el-button   v-if="istab1Shenhe4 && (row.status== 0) && (row.flowCompeleted == 6)  && (row.isAudit == 1)" style="display:inline-block" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
-          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
-        </template>
-      </el-table-column>
-
-      </el-table>
-
-      <pagination v-show="tableObj1.total>0" :total="tableObj1.total" :page.sync="tableObj1.getdataListParm.offset" :limit.sync="tableObj1.getdataListParm.pagecount" @pagination="get_table_data1()" />
-    </div>
-
-
-    <!-- 弹出层新增or修改 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <div >
-        <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="100px" style="width: 100%;">
-          <el-row :gutter="20">
-            <el-col :span="8">
-              <el-form-item label="委外维修单号:" prop="outsourcingCode">
-                <el-input ref="outsourcingCode" v-model="createTemp.outsourcingCode" disabled   />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="牧场:" prop="pastureId" >
-                <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" style="width:100%" :disabled=" dialogStatus==='see'" @change="change_pasture2" >
-                  <el-option v-for="item in pastureNameList" :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="departmentId">
-                <el-select v-model="createTemp.departmentId" placeholder="责任部门" class="filter-item" style="width:100%" :disabled=" dialogStatus==='see'"  @change="change_depart2">
-                  <el-option v-for="item in departNameList2" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="20">
-
-            <el-col :span="8">
-              <el-form-item label="合同:" prop="contract">
-                <el-radio-group v-model="createTemp.contract" :disabled="dialogStatus==='see'"  @change="change_contract" >
-                  <el-radio   :label="0" :checked="createTemp.contract == 0">无合同</el-radio>
-                  <el-radio   :label="1" :checked="createTemp.contract == 1">有合同</el-radio>
-
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-
-            <el-col :span="8">
-              <el-form-item label="申请人:" prop="applicant">
-                <el-select v-model="createTemp.applicant" placeholder="申请人" class="filter-item" style="width:100%" :disabled="dialogStatus==='see'"  >
-                  <el-option v-for="item in employeNameList" :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="date">
-                <el-date-picker v-model="createTemp.date" :picker-options="pickerOptions" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" :disabled="dialogStatus==='see'"  />
-              </el-form-item>
-            </el-col>
-
-
-          </el-row>
-          <el-row :gutter="20">
-            <el-col :span="16">
-              <el-form-item label="故障描述:" prop="description">
-                <el-input   v-model="createTemp.description" type="textarea" autosize :disabled="dialogStatus==='see'"  />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="报修单号:" prop="RUCode">
-                <el-input ref="RUCode" v-model="createTemp.RUCode" disabled   />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-
-
-
-          <el-table
-            :key="tableKey"
-            v-loading="listLoading"
-            element-loading-text="给我一点时间"
-            :data="listAddCont"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;margin-bottom:30px"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable"
-          >
-            <!-- table表格 -->
-            <el-table-column :key="1" label="序号" align="center" type="index" width="50px" />
-            <el-table-column :key="2" label="供应商" prop="providerName" align="center" min-width="80px">
-              <template slot-scope="scope">
-                <el-select v-model="scope.row.providerName" placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px" v-if="dialogStatus ==='create'||dialogStatus ==='update'"  >
-                  <el-option v-for="item in providerNameList" :key="item.name" :label="item.name" :value="item.name" />
-                </el-select>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column :key="3" v-if="createTemp.contract==0" label="金额" prop="amount" align="center" min-width="80px">
-              <template slot-scope="scope">
-                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-                  <el-input v-model="scope.row.amount" style="margin-top:10px" />
-                </span>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.amount }}</span>
-              </template>
-            </el-table-column>
-              <el-table-column  :key="4" label="设备名称" prop="eqName" align="center" min-width="250">
-                <template slot-scope="scope">
-                  <el-autocomplete     style="margin-top:10px"  :disabled="dialogStatus ==='see'"
-                    v-model="scope.row.eqName"
-                    class="inline-input"
-                    :fetch-suggestions="querySearchEqNameCont"
-                    value-key="eqName"
-                    placeholder="设备名称"
-                    @select="(value)=>
-                    {handleSelectEqNameCont(value, scope.row)}"
-                    @blur="(value)=>
-                    {blurSelectEqNameCont(value, scope.row)}"
-                  >
-                    <template slot-scope="{ item }">
-                      <span class="addr">{{ item.eqName }}</span>
-                      |<span class="addr">{{ item.eqCode }}</span>
-                    </template>
-                  </el-autocomplete>
-
-                </template>
-              </el-table-column>
-              <el-table-column  :key="5" label="设备内部编号" prop="eqCode" align="center" min-width="150">
-                <template slot-scope="scope">
-
-
-                  <el-autocomplete  style="margin-top:10px"
-                    v-model="scope.row.eqCode" :disabled="dialogStatus ==='see'"
-                    class="inline-input"
-                    :fetch-suggestions="querySearchCodeCont"
-                    value-key="eqCode"
-                    placeholder="设备内部编号"
-                    @select="(value)=>
-                    {handleSelectEqCodeCont(value, scope.row)}"
-                    @blur="(value)=>
-                    {blurSelectEqCodeCont(value, scope.row)}"
-                  />
-
-                </template>
-              </el-table-column>
-
-
-            <!-- <el-table-column label="设备名称" prop="eqName" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-                  <el-input v-model="scope.row.eqName" style="margin-top:10px" />
-                </span>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.eqName }}</span>
-              </template>
-            </el-table-column>
-
-
-            <el-table-column label="设备内部编号" prop="eqCode" align="center" min-width="80px">
-              <template slot-scope="scope">
-                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-                  <el-input v-model="scope.row.eqCode" style="margin-top:10px" />
-                </span>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.eqCode }}</span>
-              </template>
-            </el-table-column> -->
-            <el-table-column :key="6" label="费用类型" prop="typea" align="center" min-width="80px">
-              <template slot-scope="scope">
-
-                <el-select v-model="scope.row.typea" placeholder="费用类型" class="filter-item" style="width: 120px; margin-top:10px " v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-                  <el-option v-for="item in costTypeList" :key="item.id" :label="item.name" :value="item.name" />
-                </el-select>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.typea }}</span>
-              </template>
-            </el-table-column>
-            <!-- <el-table-column label="交付日期" prop="date" align="center" min-width="80px">
-              <template slot-scope="scope">
-                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-
-                  <el-date-picker v-model="scope.row.date"   style="margin-top:10px"   type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"   />
-                </span>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.date }}</span>
-              </template>
-            </el-table-column> -->
-            <el-table-column :key="7" v-if="createTemp.contract == 1" label="合同编号" prop="contractCode" align="center" min-width="80px">
-              <template slot-scope="scope">
-                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-                  <el-input v-model="scope.row.contractCode" style="margin-top:10px" />
-                </span>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.contractCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column :key="8" label="备注" prop="remark" align="center" min-width="180px">
-              <template slot-scope="scope">
-                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
-                  <el-input v-model="scope.row.remark" style="margin-top:10px" />
-                </span>
-                <span v-if="dialogStatus ==='see'">{{ scope.row.remark }}</span>
-              </template>
-            </el-table-column>
-
-
-
-          </el-table>
-
-
-          <el-row :gutter="10" v-if="dialogStatus ==='see'  ">
-
-            <el-col>
-              <h3>流程进度</h3>
-              <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>
-
-
-
-
-        <div slot="footer" class="dialog-footer" style="bottom:10px">
-          <el-button type="primary" :disabled="isokDisable" v-if="dialogStatus !=='see'" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
-          <el-button @click="dialogFormVisible = false;get_table_data1()">取消并关闭</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- 审核 -->
-    <el-dialog :title="textMap[dialogStatus]" :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" :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.status" @change="change_statue">
-                  <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 v-if="istab1Shenhe1 && (examineTemp.flowCompeleted == 1) "  type="primary" :disabled="isokDisable" @click="form_examine_save()">确认1</el-button>
-        <el-button v-if="istab1Shenhe2 && (examineTemp.flowCompeleted == 2)"  type="primary" :disabled="isokDisable" @click="form_examine_save2()">确认2</el-button>
-        <el-button v-if="istab1Shenhe3 && (examineTemp.flowCompeleted == 4)"  type="primary" :disabled="isokDisable" @click="form_examine_save3()">确认3</el-button>
-        <el-button v-if="istab1Shenhe4 && (examineTemp.flowCompeleted == 6)"  type="primary" :disabled="isokDisable" @click="form_examine_save4()">确认4</el-button>
-        <!-- <el-button v-if="dialogStatus==='examine22'" type="primary" :disabled="isokDisable" @click="form_examine_save22()">确认</el-button>
-        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="form_examine_save2()">确认</el-button>
-        <el-button v-if="dialogStatus==='examine33'" type="primary" :disabled="isokDisable" @click="form_examine_save33()">确认</el-button>
-        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="form_examine_save3()">确认</el-button> -->
-        <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
-      </div>
-    </el-dialog>
-
-
-  </div>
-</template>
-
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons')
-import { GetDataByNames, GetReportform, GetDataByName, PostDataByName, checkButtons, ExecDataByConfig} from '@/api/common'
-import Cookies from 'js-cookie'
-import { parseTime, json2excel } from '@/utils/index.js'
-import { MessageBox } from 'element-ui'
-import Pagination from '@/components/Pagination'
-export default {
-  name: 'Tab1',
-  components: { Pagination },
-  inject: ['reload'],
-  data() {
-    return {
-      myHeight:document.documentElement.clientHeight - 85- 200,
-      //多个下拉框 - 请求内容
-      send_select_list: [
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
-        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'findAllProviderByCt', offset: 0, pagecount: 0, parammaps: { 'id': Cookies.get('pastureid') }},
-
-      ],
-
-
-      //  下拉框 - 牧场
-      pastureNameList: [
-        // {id: "犊牛1", name: "犊牛1"},
-        // {id: "犊牛2", name: "犊牛2"},
-        // {id: "犊牛3", name: "犊牛3"}
-      ],
-
-      getDepartParam1: {
-        name: 'findAllDepart', offset: 0, pagecount: 0,
-        parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
-      },
-      employeNameList: [],
-      departNameList1: [],
-      getDepartParam2: {
-        name: 'findAllDepart', offset: 0, pagecount: 0,
-        parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
-      },
-      departNameList2: [],
-
-      statuesNameList: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
-      isokDisable: false,
-
-
-      tableObj1: {
-        getdataListParm: {
-          name: 'getBigoutsourcingList',
-          //请求的 page 无用参数  offset 第几页  pagecount 每页多少条
-          page: 1, offset: 1,pagecount: 10,returntype: 'Map',
-          parammaps: { pastureName: Cookies.get('pasturename'), outsourcingCode: '',departmentName: '',status: "",eqName: "",eqCode: "",contractCode: "",inputDatetime:"",startdate: "",enddate: ""}
-        },
-        tableKey: 0,listLoading: false,
-        //返回的 pageNum 第几页  pageSize 每页多少条 total 总条数
-        pageNum:'',pageSize:'',total: 0,
-        list: [
-
-        ]
-      },
-
-      getAddContListParam:  {
-        name: "getOutsourcingList",
-        page: 1,offset: 1,pagecount: 20,returntype: "Map",
-        parammaps: {"bigId": ""}
-      },
-
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now()// 当天之前的时间可选
-        }
-      },
-
-      rules: {
-        outsourcingCode: [{ required: true, message: '必填', trigger: 'blur' }],
-        equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
-        departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
-        contract: [{ required: true, message: '必填', trigger: 'blur' }],
-        description: [{ required: true, message: '必填', trigger: 'blur' }],
-        // equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
-      },
-
-      tableKey: 0,
-      listLoading: true,
-      total: 0,
-      list: [],
-      dialogStatus: '',
-      dialogFormVisible: false,
-      dialogFormVisibleSee: false,
-      listLoadingSee: true,
-      listSee: [],
-      totalSee: 0,
-      seeTemp: {},
-      getdataListSee: {
-        name: 'getpartpurchaseBybig',
-        returntype: 'Map',
-        parammaps: {}
-      },
-      createTemp: {
-        pastureId: this.$store.state.user.pastureid,
-        departmentId: this.$store.state.user.departmentid,
-        employeId: this.$store.state.user.employeid,
-        date: parseTime(new Date(), '{y}-{m}-{d}'),
-        outsourcingCode: '',
-        applicant: '',
-        RUCode: '',
-        providerId: '',
-        departmentName: '',
-        description: '',
-        contract:1,
-      },
-
-      costTypeList:[
-        {id:'保养',name:'保养'},
-        {id:'维修',name:'维修'},
-        {id:'物耗',name:'物耗'},
-        {id:'土建',name:'土建'},
-        {id:'安全',name:'安全'},
-      ],
-
-      providerNameList:[
-
-      ],
-
-
-      getParmCreateNumber: {
-        name: 'autoCreatCode',
-        page: 0,
-        offset: 0,
-        pagecount: 0,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'WW'
-        }
-      },
-
-      listAddCont:[
-         {providerName:"",providerId: "0",eqId: "0",contractId: "0",}
-      ],
-      activeList: [],
-      active: 1,
-
-
-
-      EqNameList: [],
-      requestEqName: {
-        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
-        parammaps: { pastureId: Cookies.get('pastureid') }
-      },
-      EqCodeList: [],
-
-      dialogFormVisible_Examine: false,
-      examineTemp: {
-            "status": 1,
-            "empid": "",
-            "flowCompeleted":"",
-            "workflowNote": "",
-            "id": ""
-      },
-      statueReason: false,
-      rowStyle: { maxHeight: 50 + 'px', height: 35 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      textMap: {
-        update: '编辑',
-        create: '新增',
-        see: '查看',
-        examine: '审核1',
-        examine22: '审核2',
-        examine2: '审核3',
-        examine33: '审核4',
-        examine3: '审核5'
-      },
-
-      istab1Add:[],
-      istab1Edit:[],
-      istab1Del:[],
-      istab1Shenhe1:[],
-      istab1Shenhe2:[],
-      istab1Shenhe4:[],
-      getParmCreateNumber2: {
-        name: 'autoCreatCode',
-        page: 0, offset: 0,  pagecount: 0,  returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'WY'
-        }
-      },
-
-    }
-  },
-  created() {
-
-
-    this.get_select_list()
-    this.get_table_data1()
-    this.get_auto_buttons()
-  },
-  methods: {
-    //获取按钮权限
-    get_auto_buttons() {
-      const istab1Add = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:add')
-      this.istab1Add = istab1Add
-
-      const istab1Edit = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:edit')
-      this.istab1Edit = istab1Edit
-
-      const istab1Del = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:del')
-      this.istab1Del = istab1Del
-
-      const istab1Shenhe1 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe1')
-      this.istab1Shenhe1 = istab1Shenhe1
-
-      const istab1Shenhe2 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe2')
-      this.istab1Shenhe2 = istab1Shenhe2
-
-      const istab1Shenhe3 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe3')
-      this.istab1Shenhe3 = istab1Shenhe3
-
-      const istab1Shenhe4 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe4')
-      this.istab1Shenhe4 = istab1Shenhe4
-
-    },
-
-    querySearchEqNameCont(queryString, cb) {
-      console.log('备件名称/设备内部编号模糊查询输入值', queryString)
-      this.requestEqName.parammaps['eqName'] = queryString
-      GetDataByName(this.requestEqName).then(response => {
-        console.log('备件名称模糊查询搜索data', response.data.list)
-        this.EqNameList = response.data.list
-        cb(this.EqNameList)
-      })
-    },
-    handleSelectEqNameCont(item, row) {
-      console.log('备件名称/设备内部编号模糊查询选中值', item.eqName)
-      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
-      this.$set(row, 'eqCode', item.eqCode)
-      this.$forceUpdate()
-    },
-    querySearchCodeCont(queryString, cb) {
-      console.log('备件名称/设备内部编号模糊查询输入值', queryString)
-      this.requestEqName.parammaps['eqCode'] = queryString
-      GetDataByName(this.requestEqName).then(response => {
-        console.log('备件名称模糊查询搜索data', response.data.list)
-        this.EqNameList = response.data.list
-        cb(this.EqNameList)
-      })
-    },
-    handleSelectEqCodeCont(item, row) {
-      console.log('备件名称/设备内部编号模糊查询选中值', item)
-      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
-      this.$set(row, 'eqName', item.eqName)
-      this.$forceUpdate()
-    },
-    blurSelectEqNameCont(item, row) {
-      this.$set(row, 'eqName', '')
-      this.$set(row, 'eqCode', '')
-    },
-    blurSelectEqCodeCont(item, row) {
-      this.$set(row, 'eqName', '')
-      this.$set(row, 'eqCode', '')
-    },
-
-
-    get_select_list() {
-      GetDataByNames(this.send_select_list).then(response => {
-        this.pastureNameList = response.data.findAllPasture.list
-        console.log("牧场下拉框", this.pastureNameList)
-        this.employeNameList = response.data.findAllEmploye.list
-        console.log("申请人下拉框", this.employeNameList)
-        this.providerNameList = response.data.findAllProviderByCt.list
-
-        this.get_depart_list1()
-      })
-    },
-    change_pasture1(item) {
-      this.getDepartParam1.parammaps.pastureId = this.pastureNameList.find(obj => obj.name == item).id
-      this.tableObj1.getdataListParm.parammaps.departmentId = ''
-      this.get_depart_list1()
-    },
-    //部门List
-    get_depart_list1() {
-      GetDataByName(this.getDepartParam1).then(response => {
-        this.departNameList1 = response.data.list
-      })
-    },
-
-
-    change_pasture2(item) {
-      this.getDepartParam2.parammaps.pastureId = item
-      this.get_depart_list2()
-    },
-
-    get_depart_list2() {
-      GetDataByName(this.getDepartParam2).then(response => {
-        this.departNameList2 = response.data.list
-      })
-    },
-
-    change_depart2(item) {
-      this.createTemp.departmentName = this.departNameList2.find(obj => obj.id == item).name
-    },
-
-
-    get_table_data1() {
-      this.tableObj1.listLoading = false
-
-      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
-        this.tableObj1.getdataListParm.parammaps.startdate = this.$refs['inputDatetime'].value[0]
-        this.tableObj1.getdataListParm.parammaps.enddate = this.$refs['inputDatetime'].value[1]
-
-
-      } else {
-        this.tableObj1.getdataListParm.parammaps.inputDatetime = ''
-        this.tableObj1.getdataListParm.parammaps.startdate = ''
-        this.tableObj1.getdataListParm.parammaps.enddate = ''
-      }
-
-      GetDataByName(this.tableObj1.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.tableObj1.list = response.data.list
-          this.tableObj1.pageNum = response.data.pageNum
-          this.tableObj1.pageSize = response.data.pageSize
-          this.tableObj1.total = response.data.total
-        } else {
-          this.tableObj1.list = [ ]
-        }
-
-        setTimeout(() => {
-          this.tableObj1.listLoading = false
-        }, 100)
-      })
-    },
-    form_search() {
-      console.log('查询')
-
-
-      this.get_table_data1()
-
-    },
-    change_contract(val) {
-      console.log(val)
-      if(val ==1){
-        this.createTemp.contract = 1
-      } else {
-        this.createTemp.contract = 0
-      }
-
-    },
-    form_add() {
-      this.reset_create()
-      this.getDepartParam2.parammaps.pastureId = this.createTemp.pastureId
-      this.get_depart_list2()
-      this.dialogStatus = 'create'
-      this.dialogFormVisible = true
-      this.listLoading = false
-      this.$nextTick(() => {
-        this.$refs['createTemp'].clearValidate()
-      })
-       //新增生成单号
-      this.get_create_num()
-    },
-
-    reset_create() {
-      this.createTemp.pastureId =  parseInt(Cookies.get('pastureid'))
-     this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
-
-
-     if(parseInt(Cookies.get('pastureid')) == 18){
-      this.createTemp.departmentId = ""
-     }
-     this.createTemp.departmentName = Cookies.get('departmentname')
-      this.createTemp.employeId = parseInt(Cookies.get('employeid'))
-      this.createTemp.date = parseTime(new Date(), '{y}-{m}-{d}')
-
-      this.createTemp.outsourcingCode = ''
-      this.createTemp.applicant = parseInt(Cookies.get('employeid'))
-      this.createTemp.providerId = ''
-      this.createTemp.contract = 1
-
-      this.createTemp.description = ''
-
-
-
-
-
-      this.listAddCont = [{providerName:"",providerId: "0",eqId: "0",contractId: "0",amount:"",contractCode:"",date:"",eqCode:"",eqName:"",remark:"",typea:"",}]
-
-    },
-
-    get_create_num() {
-      GetDataByName(this.getParmCreateNumber).then(response => {
-        this.$nextTick(() => {
-          console.log('新增单号', response.data.list[0].orderCode)
-          this.createTemp.outsourcingCode = response.data.list[0].orderCode
-          this.$forceUpdate()
-        })
-      })
-    },
-
-    add_dialog_save() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['createTemp'].validate(valid => {
-        if (valid) {
-          console.log(this.listAddCont)
-          if (this.createTemp.outsourcingCode == '' || this.createTemp.outsourcingCode == null || this.createTemp.outsourcingCode == undefined) {
-            GetDataByName(this.getParmCreateNumber2).then(response => {
-              this.$nextTick(() => {
-                console.log('新增单号', response.data.list[0].orderCode)
-                this.createTemp.outsourcingCode = response.data.list[0].orderCode
-                this.$forceUpdate()
-                this.add_dialog_saveSave()
-              })
-            })
-          } else {
-            this.add_dialog_saveSave()
-          }
-        }
-      })
-    },
-
-
-    add_dialog_saveSave() {
-
-        for (var j = 0; j < this.listAddCont.length; j++) {
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+
+      <el-select v-model="tableObj1.getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="change_pasture1">
+        <el-option v-for="item in pastureNameList" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+
+      <el-select v-model="tableObj1.getdataListParm.parammaps.departmentId" clearable style="width: 140px;" placeholder="部门" class="filter-item">
+        <el-option v-for="item in departNameList1" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+
+      <el-input v-model="tableObj1.getdataListParm.parammaps.outsourcingCode" placeholder="委外维修单号" style="width: 200px;" class="filter-item" />
+
+      <el-select v-model="tableObj1.getdataListParm.parammaps.status" style="width: 140px;" clearable placeholder="审核状态" class="filter-item">
+        <el-option v-for="item in statuesNameList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+
+      <el-input v-model="tableObj1.getdataListParm.parammaps.eqName" placeholder="设备名称" style="width: 200px;" class="filter-item" />
+
+      <el-input v-model="tableObj1.getdataListParm.parammaps.eqCode" placeholder="设备内部编号" style="width: 200px;" class="filter-item" />
+
+      <el-input v-model="tableObj1.getdataListParm.parammaps.contractCode" placeholder="合同编号" style="width: 200px;" class="filter-item" />
+
+      <el-date-picker ref="inputDatetime" v-model="tableObj1.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  class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+
+      <el-button v-if="istab1Add" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+
+
+
+    </div>
+
+
+    <div class="elTable">
+      <el-table :max-height="myHeight" :key="tableObj1.tableKey"  v-loading="tableObj1.listLoading" element-loading-text="给我一点时间"  :data="tableObj1.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 + (tableObj1.pageNum-1) * tableObj1.pageSize + 1 }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="委外单号" min-width="120px" align="center" prop="outsourcingCode" />
+        <el-table-column label="牧场" min-width="120px" align="center" prop="pastureName" />
+        <el-table-column label="责任部门 " min-width="120px" align="center" prop="departmentName" />
+        <el-table-column label="合同" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span v-if="scope.row.contract ==1 ">有</span>
+            <span v-else>无</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="申请人" min-width="120px" align="center" prop="applicantName" />
+        <el-table-column label="日期" min-width="120px" align="center" prop="date" />
+        <el-table-column label="审核状态" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span v-if="scope.row.status == 0 ">审核中</span>
+            <span v-else-if="scope.row.status == 1 ">审核通过</span>
+            <span v-else>审核未通过</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_see(row)">查看</el-button>
+          <el-button v-if="istab1Edit && (row.status !== 0) && (row.status !== 1) "  type="success" size="mini" @click="form_edit(row)">编辑</el-button>
+          <el-button v-if="istab1Del && (row.status !== 1) "  type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+
+          <el-button  v-if="istab1Shenhe1 && (row.status== 0) && (row.flowCompeleted == 1) "  style="display:inline-block" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
+
+          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine(row)">审核1</el-button>
+
+          <el-button   v-if="istab1Shenhe2 && (row.status== 0) && (row.flowCompeleted == 2 )" style="display:inline-block" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine2(row)">审核2</el-button>
+
+          <el-button   v-if="istab1Shenhe3 && (row.status== 0) && (row.flowCompeleted == 4)" style="display:inline-block" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine3(row)">审核3</el-button>
+
+          <el-button   v-if="istab1Shenhe4 && (row.status== 0) && (row.flowCompeleted == 6)  && (row.isAudit == 1)" style="display:inline-block" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="form_examine4(row)">审核4</el-button>
+        </template>
+      </el-table-column>
+
+      </el-table>
+
+      <pagination v-show="tableObj1.total>0" :total="tableObj1.total" :page.sync="tableObj1.getdataListParm.offset" :limit.sync="tableObj1.getdataListParm.pagecount" @pagination="get_table_data1()" />
+    </div>
+
+
+    <!-- 弹出层新增or修改 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div >
+        <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="100px" style="width: 100%;">
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="委外维修单号:" prop="outsourcingCode">
+                <el-input ref="outsourcingCode" v-model="createTemp.outsourcingCode" disabled   />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureId" >
+                <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" style="width:100%" :disabled=" dialogStatus==='see'" @change="change_pasture2" >
+                  <el-option v-for="item in pastureNameList" :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="departmentId">
+                <el-select v-model="createTemp.departmentId" placeholder="责任部门" class="filter-item" style="width:100%" :disabled=" dialogStatus==='see'"  @change="change_depart2">
+                  <el-option v-for="item in departNameList2" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+
+            <el-col :span="8">
+              <el-form-item label="合同:" prop="contract">
+                <el-radio-group v-model="createTemp.contract" :disabled="dialogStatus==='see'"  @change="change_contract" >
+                  <el-radio   :label="0" :checked="createTemp.contract == 0">无合同</el-radio>
+                  <el-radio   :label="1" :checked="createTemp.contract == 1">有合同</el-radio>
+
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="申请人:" prop="applicant">
+                <el-select v-model="createTemp.applicant" placeholder="申请人" class="filter-item" style="width:100%" :disabled="dialogStatus==='see'"  >
+                  <el-option v-for="item in employeNameList" :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="date">
+                <el-date-picker v-model="createTemp.date" :picker-options="pickerOptions" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" :disabled="dialogStatus==='see'"  />
+              </el-form-item>
+            </el-col>
+
+
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="16">
+              <el-form-item label="故障描述:" prop="description">
+                <el-input   v-model="createTemp.description" type="textarea" autosize :disabled="dialogStatus==='see'"  />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="报修单号:" prop="RUCode">
+                <el-input ref="RUCode" v-model="createTemp.RUCode" disabled   />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+
+
+
+          <el-table
+            :key="tableKey"
+            v-loading="listLoading"
+            element-loading-text="给我一点时间"
+            :data="listAddCont"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;margin-bottom:30px"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable"
+          >
+            <!-- table表格 -->
+            <el-table-column :key="1" label="序号" align="center" type="index" width="50px" />
+            <el-table-column :key="2" label="供应商" prop="providerName" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <el-select v-model="scope.row.providerName" filterable placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px" v-if="dialogStatus ==='create'||dialogStatus ==='update'"  >
+                  <el-option v-for="item in providerNameList" :key="item.name" :label="item.name" :value="item.name" />
+                </el-select>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.providerName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column :key="3" v-if="createTemp.contract==0" label="金额" prop="amount" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.amount" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.amount }}</span>
+              </template>
+            </el-table-column>
+              <el-table-column  :key="4" label="设备名称" prop="eqName" align="center" min-width="250">
+                <template slot-scope="scope">
+                  <el-autocomplete     style="margin-top:10px"  :disabled="dialogStatus ==='see'"
+                    v-model="scope.row.eqName"
+                    class="inline-input"
+                    :fetch-suggestions="querySearchEqNameCont"
+                    value-key="eqName"
+                    placeholder="设备名称"
+                    @select="(value)=>
+                    {handleSelectEqNameCont(value, scope.row)}"
+                    @blur="(value)=>
+                    {blurSelectEqNameCont(value, scope.row)}"
+                  >
+                    <template slot-scope="{ item }">
+                      <span class="addr">{{ item.eqName }}</span>
+                      |<span class="addr">{{ item.eqCode }}</span>
+                    </template>
+                  </el-autocomplete>
+
+                </template>
+              </el-table-column>
+              <el-table-column  :key="5" label="设备内部编号" prop="eqCode" align="center" min-width="150">
+                <template slot-scope="scope">
+
+
+                  <el-autocomplete  style="margin-top:10px"
+                    v-model="scope.row.eqCode" :disabled="dialogStatus ==='see'"
+                    class="inline-input"
+                    :fetch-suggestions="querySearchCodeCont"
+                    value-key="eqCode"
+                    placeholder="设备内部编号"
+                    @select="(value)=>
+                    {handleSelectEqCodeCont(value, scope.row)}"
+                    @blur="(value)=>
+                    {blurSelectEqCodeCont(value, scope.row)}"
+                  />
+
+                </template>
+              </el-table-column>
+
+
+            <!-- <el-table-column label="设备名称" prop="eqName" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.eqName" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.eqName }}</span>
+              </template>
+            </el-table-column>
+
+
+            <el-table-column label="设备内部编号" prop="eqCode" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.eqCode" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.eqCode }}</span>
+              </template>
+            </el-table-column> -->
+            <el-table-column :key="6" label="费用类型" prop="typea" align="center" min-width="80px">
+              <template slot-scope="scope">
+
+                <el-select v-model="scope.row.typea" placeholder="费用类型" class="filter-item" style="width: 120px; margin-top:10px " v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-option v-for="item in costTypeList" :key="item.id" :label="item.name" :value="item.name" />
+                </el-select>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.typea }}</span>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column label="交付日期" prop="date" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+
+                  <el-date-picker v-model="scope.row.date"   style="margin-top:10px"   type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"   />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.date }}</span>
+              </template>
+            </el-table-column> -->
+            <el-table-column :key="7" v-if="createTemp.contract == 1" label="合同编号" prop="contractCode" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.contractCode" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.contractCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column :key="8" label="备注" prop="remark" align="center" min-width="180px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.remark" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.remark }}</span>
+              </template>
+            </el-table-column>
+
+
+
+          </el-table>
+
+
+          <el-row :gutter="10" v-if="dialogStatus ==='see'  ">
+
+            <el-col>
+              <h3>流程进度</h3>
+              <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>
+
+
+
+
+        <div slot="footer" class="dialog-footer" style="bottom:10px">
+          <el-button type="primary" :disabled="isokDisable" v-if="dialogStatus !=='see'" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
+          <el-button @click="dialogFormVisible = false;get_table_data1()">取消并关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <!-- 审核 -->
+    <el-dialog :title="textMap[dialogStatus]" :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" :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.status" @change="change_statue">
+                  <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 v-if="istab1Shenhe1 && (examineTemp.flowCompeleted == 1) "  type="primary" :disabled="isokDisable" @click="form_examine_save()">确认1</el-button>
+        <el-button v-if="istab1Shenhe2 && (examineTemp.flowCompeleted == 2)"  type="primary" :disabled="isokDisable" @click="form_examine_save2()">确认2</el-button>
+        <el-button v-if="istab1Shenhe3 && (examineTemp.flowCompeleted == 4)"  type="primary" :disabled="isokDisable" @click="form_examine_save3()">确认3</el-button>
+        <el-button v-if="istab1Shenhe4 && (examineTemp.flowCompeleted == 6)"  type="primary" :disabled="isokDisable" @click="form_examine_save4()">确认4</el-button>
+        <!-- <el-button v-if="dialogStatus==='examine22'" type="primary" :disabled="isokDisable" @click="form_examine_save22()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="form_examine_save2()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine33'" type="primary" :disabled="isokDisable" @click="form_examine_save33()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="form_examine_save3()">确认</el-button> -->
+        <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script>
+import echarts from 'echarts'
+require('echarts/theme/macarons')
+import { GetDataByNames, GetReportform, GetDataByName, PostDataByName, checkButtons, ExecDataByConfig} from '@/api/common'
+import Cookies from 'js-cookie'
+import { parseTime, json2excel } from '@/utils/index.js'
+import { MessageBox } from 'element-ui'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'Tab1',
+  components: { Pagination },
+  inject: ['reload'],
+  data() {
+    return {
+      myHeight:document.documentElement.clientHeight - 85- 200,
+      //多个下拉框 - 请求内容
+      send_select_list: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
+        { name: 'findAllProviderByCt', offset: 0, pagecount: 0, parammaps: { 'id': Cookies.get('pastureid') }},
+
+      ],
+
+
+      //  下拉框 - 牧场
+      pastureNameList: [
+        // {id: "犊牛1", name: "犊牛1"},
+        // {id: "犊牛2", name: "犊牛2"},
+        // {id: "犊牛3", name: "犊牛3"}
+      ],
+
+      getDepartParam1: {
+        name: 'findAllDepart', offset: 0, pagecount: 0,
+        parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
+      },
+      employeNameList: [],
+      departNameList1: [],
+      getDepartParam2: {
+        name: 'findAllDepart', offset: 0, pagecount: 0,
+        parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
+      },
+      departNameList2: [],
+
+      statuesNameList: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      isokDisable: false,
+
+
+      tableObj1: {
+        getdataListParm: {
+          name: 'getBigoutsourcingList',
+          //请求的 page 无用参数  offset 第几页  pagecount 每页多少条
+          page: 1, offset: 1,pagecount: 10,returntype: 'Map',
+          parammaps: { pastureName: Cookies.get('pasturename'), outsourcingCode: '',departmentName: '',status: "",eqName: "",eqCode: "",contractCode: "",inputDatetime:"",startdate: "",enddate: ""}
+        },
+        tableKey: 0,listLoading: false,
+        //返回的 pageNum 第几页  pageSize 每页多少条 total 总条数
+        pageNum:'',pageSize:'',total: 0,
+        list: [
+
+        ]
+      },
+
+      getAddContListParam:  {
+        name: "getOutsourcingList",
+        page: 1,offset: 1,pagecount: 20,returntype: "Map",
+        parammaps: {"bigId": ""}
+      },
+
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()// 当天之前的时间可选
+        }
+      },
+
+      rules: {
+        outsourcingCode: [{ required: true, message: '必填', trigger: 'blur' }],
+        equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
+        departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
+        contract: [{ required: true, message: '必填', trigger: 'blur' }],
+        description: [{ required: true, message: '必填', trigger: 'blur' }],
+        // equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+
+      tableKey: 0,
+      listLoading: true,
+      total: 0,
+      list: [],
+      dialogStatus: '',
+      dialogFormVisible: false,
+      dialogFormVisibleSee: false,
+      listLoadingSee: true,
+      listSee: [],
+      totalSee: 0,
+      seeTemp: {},
+      getdataListSee: {
+        name: 'getpartpurchaseBybig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      createTemp: {
+        pastureId: this.$store.state.user.pastureid,
+        departmentId: this.$store.state.user.departmentid,
+        employeId: this.$store.state.user.employeid,
+        date: parseTime(new Date(), '{y}-{m}-{d}'),
+        outsourcingCode: '',
+        applicant: '',
+        RUCode: '',
+        providerId: '',
+        departmentName: '',
+        description: '',
+        contract:1,
+      },
+
+      costTypeList:[
+        {id:'保养',name:'保养'},
+        {id:'维修',name:'维修'},
+        {id:'物耗',name:'物耗'},
+        {id:'土建',name:'土建'},
+        {id:'安全',name:'安全'},
+      ],
+
+      providerNameList:[
+
+      ],
+
+
+      getParmCreateNumber: {
+        name: 'autoCreatCode',
+        page: 0,
+        offset: 0,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'WW'
+        }
+      },
+
+      listAddCont:[
+         {providerName:"",providerId: "0",eqId: "0",contractId: "0",}
+      ],
+      activeList: [],
+      active: 1,
+
+
+
+      EqNameList: [],
+      requestEqName: {
+        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        parammaps: { pastureId: Cookies.get('pastureid') }
+      },
+      EqCodeList: [],
+
+      dialogFormVisible_Examine: false,
+      examineTemp: {
+            "status": 1,
+            "empid": "",
+            "flowCompeleted":"",
+            "workflowNote": "",
+            "id": ""
+      },
+      statueReason: false,
+      rowStyle: { maxHeight: 50 + 'px', height: 35 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      textMap: {
+        update: '编辑',
+        create: '新增',
+        see: '查看',
+        examine: '审核1',
+        examine22: '审核2',
+        examine2: '审核3',
+        examine33: '审核4',
+        examine3: '审核5'
+      },
+
+      istab1Add:[],
+      istab1Edit:[],
+      istab1Del:[],
+      istab1Shenhe1:[],
+      istab1Shenhe2:[],
+      istab1Shenhe4:[],
+      getParmCreateNumber2: {
+        name: 'autoCreatCode',
+        page: 0, offset: 0,  pagecount: 0,  returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'WY'
+        }
+      },
+
+    }
+  },
+  created() {
+
+
+    this.get_select_list()
+    this.get_table_data1()
+    this.get_auto_buttons()
+  },
+  methods: {
+    //获取按钮权限
+    get_auto_buttons() {
+      const istab1Add = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:add')
+      this.istab1Add = istab1Add
+
+      const istab1Edit = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:edit')
+      this.istab1Edit = istab1Edit
+
+      const istab1Del = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:del')
+      this.istab1Del = istab1Del
+
+      const istab1Shenhe1 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe1')
+      this.istab1Shenhe1 = istab1Shenhe1
+
+      const istab1Shenhe2 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe2')
+      this.istab1Shenhe2 = istab1Shenhe2
+
+      const istab1Shenhe3 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe3')
+      this.istab1Shenhe3 = istab1Shenhe3
+
+      const istab1Shenhe4 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe4')
+      this.istab1Shenhe4 = istab1Shenhe4
+
+    },
+
+    querySearchEqNameCont(queryString, cb) {
+      console.log('备件名称/设备内部编号模糊查询输入值', queryString)
+      this.requestEqName.parammaps['eqName'] = queryString
+      GetDataByName(this.requestEqName).then(response => {
+        console.log('备件名称模糊查询搜索data', response.data.list)
+        this.EqNameList = response.data.list
+        cb(this.EqNameList)
+      })
+    },
+    handleSelectEqNameCont(item, row) {
+      console.log('备件名称/设备内部编号模糊查询选中值', item.eqName)
+      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
+      this.$set(row, 'eqCode', item.eqCode)
+      this.$forceUpdate()
+    },
+    querySearchCodeCont(queryString, cb) {
+      console.log('备件名称/设备内部编号模糊查询输入值', queryString)
+      this.requestEqName.parammaps['eqCode'] = queryString
+      GetDataByName(this.requestEqName).then(response => {
+        console.log('备件名称模糊查询搜索data', response.data.list)
+        this.EqNameList = response.data.list
+        cb(this.EqNameList)
+      })
+    },
+    handleSelectEqCodeCont(item, row) {
+      console.log('备件名称/设备内部编号模糊查询选中值', item)
+      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
+      this.$set(row, 'eqName', item.eqName)
+      this.$forceUpdate()
+    },
+    blurSelectEqNameCont(item, row) {
+      this.$set(row, 'eqName', '')
+      this.$set(row, 'eqCode', '')
+    },
+    blurSelectEqCodeCont(item, row) {
+      this.$set(row, 'eqName', '')
+      this.$set(row, 'eqCode', '')
+    },
+
+
+    get_select_list() {
+      GetDataByNames(this.send_select_list).then(response => {
+        this.pastureNameList = response.data.findAllPasture.list
+        console.log("牧场下拉框", this.pastureNameList)
+        this.employeNameList = response.data.findAllEmploye.list
+        console.log("申请人下拉框", this.employeNameList)
+        this.providerNameList = response.data.findAllProviderByCt.list
+
+        this.get_depart_list1()
+      })
+    },
+    change_pasture1(item) {
+      this.getDepartParam1.parammaps.pastureId = this.pastureNameList.find(obj => obj.name == item).id
+      this.tableObj1.getdataListParm.parammaps.departmentId = ''
+      this.get_depart_list1()
+    },
+    //部门List
+    get_depart_list1() {
+      GetDataByName(this.getDepartParam1).then(response => {
+        this.departNameList1 = response.data.list
+      })
+    },
+
+
+    change_pasture2(item) {
+      this.getDepartParam2.parammaps.pastureId = item
+      this.get_depart_list2()
+    },
+
+    get_depart_list2() {
+      GetDataByName(this.getDepartParam2).then(response => {
+        this.departNameList2 = response.data.list
+      })
+    },
+
+    change_depart2(item) {
+      this.createTemp.departmentName = this.departNameList2.find(obj => obj.id == item).name
+    },
+
+
+    get_table_data1() {
+      this.tableObj1.listLoading = false
+
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.tableObj1.getdataListParm.parammaps.startdate = this.$refs['inputDatetime'].value[0]
+        this.tableObj1.getdataListParm.parammaps.enddate = this.$refs['inputDatetime'].value[1]
+
+
+      } else {
+        this.tableObj1.getdataListParm.parammaps.inputDatetime = ''
+        this.tableObj1.getdataListParm.parammaps.startdate = ''
+        this.tableObj1.getdataListParm.parammaps.enddate = ''
+      }
+
+      GetDataByName(this.tableObj1.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.tableObj1.list = response.data.list
+          this.tableObj1.pageNum = response.data.pageNum
+          this.tableObj1.pageSize = response.data.pageSize
+          this.tableObj1.total = response.data.total
+        } else {
+          this.tableObj1.list = [ ]
+        }
+
+        setTimeout(() => {
+          this.tableObj1.listLoading = false
+        }, 100)
+      })
+    },
+    form_search() {
+      console.log('查询')
+
+
+      this.get_table_data1()
+
+    },
+    change_contract(val) {
+      console.log(val)
+      if(val ==1){
+        this.createTemp.contract = 1
+      } else {
+        this.createTemp.contract = 0
+      }
+
+    },
+    form_add() {
+      this.reset_create()
+      this.getDepartParam2.parammaps.pastureId = this.createTemp.pastureId
+      this.get_depart_list2()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.listLoading = false
+      this.$nextTick(() => {
+        this.$refs['createTemp'].clearValidate()
+      })
+       //新增生成单号
+      this.get_create_num()
+    },
+
+    reset_create() {
+      this.createTemp.pastureId =  parseInt(Cookies.get('pastureid'))
+     this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
+
+
+     if(parseInt(Cookies.get('pastureid')) == 18){
+      this.createTemp.departmentId = ""
+     }
+     this.createTemp.departmentName = Cookies.get('departmentname')
+      this.createTemp.employeId = parseInt(Cookies.get('employeid'))
+      this.createTemp.date = parseTime(new Date(), '{y}-{m}-{d}')
+
+      this.createTemp.outsourcingCode = ''
+      this.createTemp.applicant = parseInt(Cookies.get('employeid'))
+      this.createTemp.providerId = ''
+      this.createTemp.contract = 1
+
+      this.createTemp.description = ''
+
+
+
+
+
+      this.listAddCont = [{providerName:"",providerId: "0",eqId: "0",contractId: "0",amount:"",contractCode:"",date:"",eqCode:"",eqName:"",remark:"",typea:"",}]
+
+    },
+
+    get_create_num() {
+      GetDataByName(this.getParmCreateNumber).then(response => {
+        this.$nextTick(() => {
+          console.log('新增单号', response.data.list[0].orderCode)
+          this.createTemp.outsourcingCode = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+
+    add_dialog_save() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp'].validate(valid => {
+        if (valid) {
+          console.log(this.listAddCont)
+          if (this.createTemp.outsourcingCode == '' || this.createTemp.outsourcingCode == null || this.createTemp.outsourcingCode == undefined) {
+            GetDataByName(this.getParmCreateNumber2).then(response => {
+              this.$nextTick(() => {
+                console.log('新增单号', response.data.list[0].orderCode)
+                this.createTemp.outsourcingCode = response.data.list[0].orderCode
+                this.$forceUpdate()
+                this.add_dialog_saveSave()
+              })
+            })
+          } else {
+            this.add_dialog_saveSave()
+          }
+        }
+      })
+    },
+
+
+    add_dialog_saveSave() {
+
+        for (var j = 0; j < this.listAddCont.length; j++) {
           console.log(this.listAddCont[j].amount)
-          if(this.listAddCont[j].providerName == ''){
-            this.$message({ type: 'warning', message: '请检查供应商是否未填写', duration: 2000 })
-            return false
-          }
-          if(this.listAddCont[j].eqName == ''){
-            this.$message({ type: 'warning', message: '请检查设备名称是否未填写', duration: 2000 })
-            return false
-          }
-          if(this.listAddCont[j].eqCode == ''){
-            this.$message({ type: 'warning', message: '请检查设备内部编号是否未填写', duration: 2000 })
-            return false
-          }
-          if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
-            // this.$message({ type: 'warning', message: '请检查金额是否未填写', duration: 2000 })
-            // return false
-          } else {
-            // var rulesAmount = /^[1-9]\d*$/
-            // if (!rulesAmount.test(this.listAddCont[j].amount)) {
-            //   this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
-            //   return false
-            // }
-          }
-
-          if (this.createTemp.contract == 1){
-            if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
-              this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
-              return false
-            }
-          }
-
-
-
-
-        }
-        var amount = 0
-        if(this.createTemp.contract==0){
-          amount = "@insertSpotList.amount"
-        }else{
-          amount = 0
-        }
-        if(this.createTemp.contract == 0){
-          // 无合同
-          this.$set(this.createTemp,'status',0)
-        }else{
-          // 有合同
-          this.$set(this.createTemp,'status',1)
-        }
-        var send_data = {
-          "common": {  "returnmap": "0" },
-          "data": [
-            {
-              "name": "addBigoutsourcing", "type": "e",
-              "parammaps": this.createTemp
-            },
-            {
-              "name": "insertSpotList",
-              "resultmaps": {  "list": this.listAddCont },
-
-              "children": [
-                {
-                    "name": "addOutsourcing",  "type": "e",
-                    "parammaps": {
-                      "bigId": "@addBigoutsourcing.LastInsertId",
-                      "providerId": "@insertSpotList.providerId",
-                      "amount": amount,
-                      "eqId": "@insertSpotList.eqId",
-                      "eqCode": "@insertSpotList.eqCode",
-                      "eqName": "@insertSpotList.eqName",
-                      "typea": "@insertSpotList.typea",
-                      "date": "@insertSpotList.date",
-                      "contractId": "@insertSpotList.contractId",
-                      "providerName": "@insertSpotList.providerName",
-                      "contractCode": "@insertSpotList.contractCode",
-                      "remark": "@insertSpotList.remark",
-                      "status":this.createTemp.status
-                      }
-                  }
-              ]
-              }
-            ]
-        }
-        ExecDataByConfig(send_data).then(response => {
-          console.log('新增保存发送参数', send_data)
-          if (response.msg === 'fail') {
-            this.$notify({
-              title: '保存失败',
-              message: response.data,
-              type: 'warning',
-              duration: 2000
-            })
-          } else {
-            if(this.createTemp.contract==1){
-              this.add_dialog_saveSave2()
-            }
-            this.dialogFormVisible = false
-
-            this.get_table_data1()
-
-            this.$notify({
-              title: '',
-              message: '保存成功',
-              type: 'success',
-              duration: 2000
-            })
-          }
-        })
-        return true
-
-    },
-
-
-
-
-
-    form_see(row){
-      console.log('查看======》',row)
-      this.getDepartParam2.parammaps.pastureId = row.pastureId
-      this.get_depart_list2()
-      this.createTemp = Object.assign({}, row)
-      this.dialogStatus = 'see'
-      this.dialogFormVisible = true
-      this.$nextTick(() => {
-        this.$refs['createTemp'].clearValidate()
-      })
-
-
-      //总价大于等于10000,有高级设备工程师
-      if(row.isAudit == 1) {
-        if (row.flowCompeleted == 1) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人' },
-              { title: '财务负责人' },
-              { title: '场长' },
-              { title: '运营支持部高级工程师' },
-            ]
-            this.active = 1
-          } else if (row.flowCompeleted == 2) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人' },
-              { title: '场长' },
-              { title: '运营支持部高级工程师' },
-            ]
-            this.active = 2
-          } else if (row.flowCompeleted === 3) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
-              { title: '财务负责人' },
-              { title: '场长' },
-              { title: '运营支持部高级工程师' }
-            ]
-            this.active = 2
-          } else if (row.flowCompeleted === 4) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长' },
-              { title: '运营支持部高级工程师' }
-            ]
-            this.active = 3
-          } else if (row.flowCompeleted === 5) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
-              { title: '场长' },
-              { title: '运营支持部高级工程师' }
-            ]
-            this.active = 3
-          } else if (row.flowCompeleted === 6) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长',date: row.fielddate, name: row.fieldName },
-              { title: '运营支持部高级工程师' }
-            ]
-            this.active = 4
-          } else if (row.flowCompeleted === 7) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote },
-              { title: '运营支持部高级工程师' }
-            ]
-            this.active = 4
-          }else if (row.flowCompeleted === 8) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长',date: row.fielddate, name: row.fieldName },
-              { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName }
-            ]
-            this.active = 5
-          }else if (row.flowCompeleted === 9) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长',date: row.fielddate, name: row.fieldName},
-              { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName,status: 'error', reason: row.workflowNote  }
-            ]
-            this.active = 5
-          }
-
-
-
-      //总价小于10000 没有高级设备工程师,直接场长审核
-      } else {
-        if (row.flowCompeleted == 1) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人' },
-              { title: '财务负责人' },
-              { title: '场长' }
-            ]
-            this.active = 1
-          } else if (row.flowCompeleted == 2) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人' },
-              { title: '场长' }
-            ]
-            this.active = 2
-          } else if (row.flowCompeleted === 3) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
-              { title: '财务负责人' },
-              { title: '场长' }
-            ]
-            this.active = 2
-          } else if (row.flowCompeleted === 4) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长' },
-            ]
-            this.active = 3
-          } else if (row.flowCompeleted === 5) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
-              { title: '场长' }
-            ]
-            this.active = 3
-          } else if (row.flowCompeleted === 6) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长',date: row.fielddate, name: row.fieldName },
-            ]
-            this.active = 4
-          } else if (row.flowCompeleted === 7) {
-            this.activeList = [
-              { title: '设备处长', date: row.createTime, name: row.applicantName },
-              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
-              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
-              { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote }
-            ]
-            this.active = 4
-          }
-      }
-      if(row.contract == 1){
-        this.activeList = [
-          { title: '设备处长', date: row.createTime, name: row.applicantName }
-        ]
-        this.active = 1
-      }
-          this.getAddContListParam.parammaps.bigId = row.id
-         this.getAddContList()
-    },
-
-    getAddContList() {
-      GetDataByName(this.getAddContListParam).then(response => {
-        this.listAddCont = response.data.list
-        this.listLoading = false
-      })
-    },
-
-
-
-    form_edit(row) {
-      this.reset_create()
-      console.log('编辑',row)
-      this.getDepartParam2.parammaps.pastureId = row.pastureId
-      this.get_depart_list2()
-      if (row.providerId == undefined) {
-        row.providerId = ''
-        row.providerName = ''
-      }
-      this.createTemp = Object.assign({}, row) // copy obj
-      this.dialogStatus = 'update'
-      this.dialogFormVisible = true
-      this.$nextTick(() => {
-        this.$refs['createTemp'].clearValidate()
-      })
-      this.getAddContListParam.parammaps.bigId = row.id
-      this.getAddContList()
-    },
-    edit_dialog_save() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['createTemp'].validate(valid => {
-        if (valid) {
-          this.edit_dialog_saveSave()
-        }
-      })
-    },
-    edit_dialog_saveSave() {
-
-        for (var j = 0; j < this.listAddCont.length; j++) {
-          console.log(this.listAddCont[j].amount)
-          // eslint-disable-next-line use-isnan
-          if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
-            this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
-            return false
-          }
-
-        }
-
-        this.listAddCont[0].providerId = "0"
-        this.listAddCont[0].eqId = "0"
-        this.listAddCont[0].contractId = "0"
-
-        var amount = 0
-        if(this.createTemp.contract==0){
-          amount = "@insertSpotList.amount"
-        }else{
-          amount = 0
-        }
-        var send_data = {
-          "common": {  "returnmap": "0" },
-          "data": [
-            {
-              "name": "editBigoutsourcing", "type": "e",
-              "parammaps": this.createTemp
-            },
-            {
-              "name": "insertSpotList",
-              "resultmaps": {  "list": this.listAddCont },
-              "children": [
-                {
-                    "name": "editOutsourcing",  "type": "e",
-                    "parammaps": {
-                      "bigId": "@insertSpotList.LastInsertId",
-                      "providerId": "@insertSpotList.providerId",
-                      "amount": amount,
-                      "eqId": "@insertSpotList.eqId",
-                      "eqCode": "@insertSpotList.eqCode",
-                      "eqName": "@insertSpotList.eqName",
-                      "typea": "@insertSpotList.typea",
-                      "date": "@insertSpotList.date",
-                      "contractId": "@insertSpotList.contractId",
-                      "id": "@insertSpotList.id",
-                      "providerName": "@insertSpotList.providerName",
-                      "contractCode": "@insertSpotList.contractCode"
-                      }
-                  }
-              ]
-            },
-            {
-              "name": "updateBigoutsourcingFlowCompeleted", "type": "e",
-              "parammaps":{
-                id:this.createTemp.id
-              }
-            },
-            ]
-        }
-
-        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.dialogFormVisible = false
-
-            this.get_table_data1()
-            this.$notify({
-              title: '',
-              message: '保存成功',
-              type: 'success',
-              duration: 2000
-            })
-          }
-        })
-
-    },
-
-    form_delete(row) {
-      console.log('点击了删除',row)
-      MessageBox.confirm('确认删除此条信息?', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        var send_data = {
-        "common": { "returnmap": "0" },
-        "data": [
-          {
-            "name": "deleteBigoutsourcing", "type": "e",
-            "parammaps": { "id":row.id }
-           }
-          ]
-        }
-
-        ExecDataByConfig(send_data).then(response => {
-          this.get_table_data1()
-          this.$notify({
-            title: '成功',
-            message: '删除成功',
-            type: 'success',
-            duration: 2000
-          })
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        })
-      })
-    },
-
-
-    change_statue(val) {
-      if (val == 2) {
-        this.statueReason = true
-      } else {
-        this.statueReason = false
-      }
-    },
-
-    form_examine(row) {
-      console.log('点击了设备处长审核',row)
-      if (row == undefined) {
-        this.examineTemp = this.createTemp
-        this.$set(this.createTemp, 'status', 1)
-        this.$set(this.createTemp, 'workflowNote', '')
-      } else {
-        this.examineTemp = Object.assign({}, row)
-        this.$set(this.examineTemp, 'status', 1)
-        this.$set(this.examineTemp, 'workflowNote', '')
-      }
-      this.dialogStatus = 'examine'
-      this.dialogFormVisible_Examine = true
-      this.statueReason = false
-    },
-    form_examine_save() {
-      console.log('点击了设备处长审核', this.examineTemp)
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-
-          //不通过
-          if(this.statueReason){
-            this.examineTemp.status = 2
-             //审核角色
-            this.examineTemp.flowCompeleted = "3"
-          } else {
-            this.examineTemp.status = 0
-            this.examineTemp.flowCompeleted = "2"
-          }
-          this.examineTemp.empid = Cookies.get('employeid')
-
-          var send_data = {
-              "common": {  "returnmap": "0"  },
-              "data": [
-                  // {
-                  //     "name": "editBigoutsourcingEquipment",  "type": "e",
-                  //     "parammaps": this.examineTemp
-                  // },
-                  {
-                      "name": "editBigoutsourcingDepartment",  "type": "e",
-                      "parammaps": this.examineTemp
-                  }
-              ]
-          }
-          console.log(send_data,'审核1保存')
-          ExecDataByConfig(send_data).then(response => {
-            console.log('审核确认发送参数', send_data)
-            if (response.msg !== 'fail') {
-              this.get_table_data1()
-              this.dialogFormVisible_Examine = false
-              this.statueReason = false
-              this.$notify({
-                title: '成功',
-                message: '审核成功',
-                type: 'success',
-                duration: 2000
-              })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-
-    form_examine2(row) {
-      console.log('点击了场长审核',row)
-      this.examineTemp = Object.assign({}, row)
-      if (row == undefined) {
-        // this.examineTemp = this.createTemp
-        this.$set(this.createTemp, 'status', 1)
-        this.$set(this.createTemp, 'workflowNote', '')
-      } else {
-
-        this.$set(this.examineTemp, 'status', 1)
-        this.$set(this.examineTemp, 'workflowNote', '')
-      }
-      this.dialogStatus = 'examine'
-      this.statueReason = false
-      this.dialogFormVisible_Examine = true
-      // GetDataByName(this.getParmCreateNumber).then(response => {
-      //   this.$nextTick(() => {
-      //     console.log('新增单号', response.data.list[0].orderCode)
-      //     this.examineTemp.acceptanceCode = response.data.list[0].orderCode
-      //     this.$set(this.examineTemp,'acceptanceCode',response.data.list[0].orderCode)
-      //     this.$forceUpdate()
-      //   })
-      // })
-    },
-    add_dialog_saveSave2() {
-      console.log(this.examineTemp,'=======contract')
-      // this.examineTemp.iscontract =
-
-        //牧场
-        var mydata = {
-          // acceptanceCode:this.createTemp.acceptanceCode,
-          pastureId:  this.createTemp.pastureId,
-          departmentId: this.createTemp.departmentId,
-          applicant:Cookies.get('employeid'),
-          outsourcingCode:this.createTemp.outsourcingCode,
-          applyType:0,
-          date:parseTime(new Date(), '{y}-{m}-{d}'),
-          status:1
-        }
-        if(this.examineTemp.contract == 0){
-          mydata.iscontract = 1
-        }else{
-          mydata.iscontract = 0
-        }
-        var send_data = {
-          "common": {  "returnmap": "0" },
-          "data": [
-            {
-              "name": "insertBigacceptance",
-              "type": "e",
-              "parammaps": mydata
-            }
-          ]
-        }
-        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.$notify({
-            //   title: '',
-            //   message: '保存成功',
-            //   type: 'success',
-            //   duration: 2000
-            // })
-          }
-        })
-
-
-    },
-
-    form_examine_save2() {
-      console.log('点击了场长审核', this.examineTemp)
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      // this.examineTemp.acceptanceCode = this.createTemp.acceptanceCode
-
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-
-          //不通过
-          if(this.statueReason){
-            this.examineTemp.status = 2
-             //审核角色
-            this.examineTemp.flowCompeleted = "5"
-          } else {
-
-
-           // //总价大于等于10000 有高级设备工程师审核
-           //  if(this.examineTemp.isAudit == 1){
-           //     this.examineTemp.status = 0
-           // //总价小于10000 没有高级设备工程师,直接场长审核
-           //  } else {
-           //     this.examineTemp.status = 1
-           //  }
-           this.examineTemp.status = 0
-            this.examineTemp.flowCompeleted = "4"
-          }
-          this.examineTemp.empid = Cookies.get('employeid')
-
-          var send_data = {
-              "common": {  "returnmap": "0"  },
-              "data": [
-                  // {
-                  //     "name": "editBigoutsourcingField",  "type": "e",
-                  //     "parammaps": this.examineTemp
-                  // },
-                  {
-                      "name": "editBigoutsourcingEquipment",  "type": "e",
-                      "parammaps": this.examineTemp
-                  }
-              ]
-          }
-          console.log(send_data,'审核2保存')
-          ExecDataByConfig(send_data).then(response => {
-            console.log('审核确认发送参数', send_data)
-            if (response.msg !== 'fail') {
-              if(this.examineTemp.status == 1){
-                this.add_dialog_saveSave2()
-              }
-              this.get_table_data1()
-              this.dialogFormVisible_Examine = false
-              this.statueReason = false
-              this.$notify({
-                title: '成功',
-                message: '审核成功',
-                type: 'success',
-                duration: 2000
-              })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-
-    form_examine3(row) {
-      console.log('点击了高级工程师  审核',row)
-      this.examineTemp = Object.assign({}, row)
-      if (row == undefined) {
-        //this.examineTemp = this.createTemp
-        this.$set(this.createTemp, 'status', 1)
-        this.$set(this.createTemp, 'workflowNote', '')
-      } else {
-
-        this.$set(this.examineTemp, 'status', 1)
-        this.$set(this.examineTemp, 'workflowNote', '')
-      }
-      this.dialogStatus = 'examine'
-      this.dialogFormVisible_Examine = true
-      this.statueReason = false
-    },
-    form_examine_save3() {
-      console.log('点击了高级工程师审核',this.examineTemp )
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-
-          //不通过
-          if(this.statueReason){
-            this.examineTemp.status = 2
-             //审核角色
-            this.examineTemp.flowCompeleted = "7"
-          } else {
-            //总价大于等于10000 有高级设备工程师审核
-             if(this.examineTemp.isAudit == 1){
-                this.examineTemp.status = 0
-            //总价小于10000 没有高级设备工程师,直接场长审核
-             } else {
-                this.examineTemp.status = 1
-             }
-            this.examineTemp.flowCompeleted = "6"
-          }
-          this.examineTemp.empid = Cookies.get('employeid')
-
-          var send_data = {
-              "common": {  "returnmap": "0"  },
-              "data": [
-                  // {
-                  //     "name": "editBigoutsourcingAdvanceddate",  "type": "e",
-                  //     "parammaps": this.examineTemp
-                  // },
-                  {
-                      "name": "editBigoutsourcingField",  "type": "e",
-                      "parammaps": this.examineTemp
-                  }
-              ]
-          }
-          console.log(send_data,'审核3保存',this.examineTemp)
-          ExecDataByConfig(send_data).then(response => {
-            console.log('审核确认发送参数', send_data)
-            if (response.msg !== 'fail') {
-              if(this.examineTemp.status == 1){
-                this.add_dialog_saveSave2()
-              }
-              this.get_table_data1()
-              this.dialogFormVisible_Examine = false
-              this.statueReason = false
-              this.$notify({
-                title: '成功',
-                message: '审核成功',
-                type: 'success',
-                duration: 2000
-              })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-    form_examine4(row) {
-      console.log('点击了高级工程师  审核',row)
-      this.examineTemp = Object.assign({}, row)
-      if (row == undefined) {
-        //this.examineTemp = this.createTemp
-        this.$set(this.createTemp, 'status', 1)
-        this.$set(this.createTemp, 'workflowNote', '')
-      } else {
-
-        this.$set(this.examineTemp, 'status', 1)
-        this.$set(this.examineTemp, 'workflowNote', '')
-      }
-      this.dialogStatus = 'examine'
-      this.dialogFormVisible_Examine = true
-      this.statueReason = false
-    },
-    form_examine_save4() {
-      console.log('点击了高级工程师审核',this.examineTemp )
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['examineTemp'].validate(valid => {
-        if (valid) {
-
-          //不通过
-          if(this.statueReason){
-            this.examineTemp.status = 2
-             //审核角色
-            this.examineTemp.flowCompeleted = "9"
-          } else {
-            this.examineTemp.status = 1
-            this.examineTemp.flowCompeleted = "8"
-          }
-          this.examineTemp.empid = Cookies.get('employeid')
-
-          var send_data = {
-              "common": {  "returnmap": "0"  },
-              "data": [
-                  // {
-                  //     "name": "editBigoutsourcingAdvanceddate",  "type": "e",
-                  //     "parammaps": this.examineTemp
-                  // },
-                  {
-                      "name": "editBigoutsourcingAdvanceddate",  "type": "e",
-                      "parammaps": this.examineTemp
-                  }
-              ]
-          }
-          console.log(send_data,'审核4保存')
-          ExecDataByConfig(send_data).then(response => {
-            console.log('审核确认发送参数', send_data)
-            if (response.msg !== 'fail') {
-              if(this.examineTemp.status == 1){
-                this.add_dialog_saveSave2()
-              }
-              this.get_table_data1()
-              this.dialogFormVisible_Examine = false
-              this.statueReason = false
-              this.$notify({
-                title: '成功',
-                message: '审核成功',
-                type: 'success',
-                duration: 2000
-              })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-
-
-  }
-}
-</script>
-<style lang="scss" scoped>
-
-  // .content{
-  //   padding: 20px 20px;
-  //   .title{
-  //     text-align: center;
-  //     font-weight: 700;
-  //   }
-  //   .title2{
-  //     float: left;
-  //     font-weight: 700;
-  //     padding: 10px 0;
-  //   }
-  // }
-
-</style>
+          if(this.createTemp.contract == 1){
+            if(this.listAddCont[j].providerName == ''){
+              this.$message({ type: 'warning', message: '请检查供应商是否未填写', duration: 2000 })
+              return false
+            }
+          }
+          if(this.listAddCont[j].eqName == ''){
+            this.$message({ type: 'warning', message: '请检查设备名称是否未填写', duration: 2000 })
+            return false
+          }
+          if(this.listAddCont[j].eqCode == ''){
+            this.$message({ type: 'warning', message: '请检查设备内部编号是否未填写', duration: 2000 })
+            return false
+          }
+          if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
+            // this.$message({ type: 'warning', message: '请检查金额是否未填写', duration: 2000 })
+            // return false
+          } else {
+            // var rulesAmount = /^[1-9]\d*$/
+            // if (!rulesAmount.test(this.listAddCont[j].amount)) {
+            //   this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
+            //   return false
+            // }
+          }
+
+          if (this.createTemp.contract == 1){
+            if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
+              this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
+              return false
+            }
+          }
+
+
+
+
+        }
+        var amount = 0
+        if(this.createTemp.contract==0){
+          amount = "@insertSpotList.amount"
+        }else{
+          amount = 0
+        }
+        if(this.createTemp.contract == 0){
+          // 无合同
+          this.$set(this.createTemp,'status',0)
+        }else{
+          // 有合同
+          this.$set(this.createTemp,'status',1)
+        }
+        var send_data = {
+          "common": {  "returnmap": "0" },
+          "data": [
+            {
+              "name": "addBigoutsourcing", "type": "e",
+              "parammaps": this.createTemp
+            },
+            {
+              "name": "insertSpotList",
+              "resultmaps": {  "list": this.listAddCont },
+
+              "children": [
+                {
+                    "name": "addOutsourcing",  "type": "e",
+                    "parammaps": {
+                      "bigId": "@addBigoutsourcing.LastInsertId",
+                      "providerId": "@insertSpotList.providerId",
+                      "amount": amount,
+                      "eqId": "@insertSpotList.eqId",
+                      "eqCode": "@insertSpotList.eqCode",
+                      "eqName": "@insertSpotList.eqName",
+                      "typea": "@insertSpotList.typea",
+                      "date": "@insertSpotList.date",
+                      "contractId": "@insertSpotList.contractId",
+                      "providerName": "@insertSpotList.providerName",
+                      "contractCode": "@insertSpotList.contractCode",
+                      "remark": "@insertSpotList.remark",
+                      "status":this.createTemp.status
+                      }
+                  }
+              ]
+              }
+            ]
+        }
+        ExecDataByConfig(send_data).then(response => {
+          console.log('新增保存发送参数', send_data)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '保存失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+            if(this.createTemp.contract==1){
+              this.add_dialog_saveSave2()
+            }
+            this.dialogFormVisible = false
+
+            this.get_table_data1()
+
+            this.$notify({
+              title: '',
+              message: '保存成功',
+              type: 'success',
+              duration: 2000
+            })
+          }
+        })
+        return true
+
+    },
+
+
+
+
+
+    form_see(row){
+      console.log('查看======》',row)
+      this.getDepartParam2.parammaps.pastureId = row.pastureId
+      this.get_depart_list2()
+      this.createTemp = Object.assign({}, row)
+      this.dialogStatus = 'see'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['createTemp'].clearValidate()
+      })
+
+
+      //总价大于等于10000,有高级设备工程师
+      if(row.isAudit == 1) {
+        if (row.flowCompeleted == 1) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人' },
+              { title: '财务负责人' },
+              { title: '场长' },
+              { title: '运营支持部高级工程师' },
+            ]
+            this.active = 1
+          } else if (row.flowCompeleted == 2) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人' },
+              { title: '场长' },
+              { title: '运营支持部高级工程师' },
+            ]
+            this.active = 2
+          } else if (row.flowCompeleted === 3) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
+              { title: '财务负责人' },
+              { title: '场长' },
+              { title: '运营支持部高级工程师' }
+            ]
+            this.active = 2
+          } else if (row.flowCompeleted === 4) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长' },
+              { title: '运营支持部高级工程师' }
+            ]
+            this.active = 3
+          } else if (row.flowCompeleted === 5) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
+              { title: '场长' },
+              { title: '运营支持部高级工程师' }
+            ]
+            this.active = 3
+          } else if (row.flowCompeleted === 6) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长',date: row.fielddate, name: row.fieldName },
+              { title: '运营支持部高级工程师' }
+            ]
+            this.active = 4
+          } else if (row.flowCompeleted === 7) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote },
+              { title: '运营支持部高级工程师' }
+            ]
+            this.active = 4
+          }else if (row.flowCompeleted === 8) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长',date: row.fielddate, name: row.fieldName },
+              { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName }
+            ]
+            this.active = 5
+          }else if (row.flowCompeleted === 9) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长',date: row.fielddate, name: row.fieldName},
+              { title: '运营支持部高级工程师',date: row.advanceddate, name: row.advancedName,status: 'error', reason: row.workflowNote  }
+            ]
+            this.active = 5
+          }
+
+
+
+      //总价小于10000 没有高级设备工程师,直接场长审核
+      } else {
+        if (row.flowCompeleted == 1) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人' },
+              { title: '财务负责人' },
+              { title: '场长' }
+            ]
+            this.active = 1
+          } else if (row.flowCompeleted == 2) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人' },
+              { title: '场长' }
+            ]
+            this.active = 2
+          } else if (row.flowCompeleted === 3) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName,status: 'error', reason: row.workflowNote },
+              { title: '财务负责人' },
+              { title: '场长' }
+            ]
+            this.active = 2
+          } else if (row.flowCompeleted === 4) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长' },
+            ]
+            this.active = 3
+          } else if (row.flowCompeleted === 5) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName,status: 'error', reason: row.workflowNote },
+              { title: '场长' }
+            ]
+            this.active = 3
+          } else if (row.flowCompeleted === 6) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长',date: row.fielddate, name: row.fieldName },
+            ]
+            this.active = 4
+          } else if (row.flowCompeleted === 7) {
+            this.activeList = [
+              { title: '设备处长', date: row.createTime, name: row.applicantName },
+              { title: '部门负责人', date: row.departmentdate, name: row.departmentUserName },
+              { title: '财务负责人',date: row.equipmentdate, name: row.equipmentName },
+              { title: '场长',date: row.fielddate, name: row.fieldName,status: 'error', reason: row.workflowNote }
+            ]
+            this.active = 4
+          }
+      }
+      if(row.contract == 1){
+        this.activeList = [
+          { title: '设备处长', date: row.createTime, name: row.applicantName }
+        ]
+        this.active = 1
+      }
+          this.getAddContListParam.parammaps.bigId = row.id
+         this.getAddContList()
+    },
+
+    getAddContList() {
+      GetDataByName(this.getAddContListParam).then(response => {
+        this.listAddCont = response.data.list
+        this.listLoading = false
+      })
+    },
+
+
+
+    form_edit(row) {
+      this.reset_create()
+      console.log('编辑',row)
+      this.getDepartParam2.parammaps.pastureId = row.pastureId
+      this.get_depart_list2()
+      if (row.providerId == undefined) {
+        row.providerId = ''
+        row.providerName = ''
+      }
+      this.createTemp = Object.assign({}, row) // copy obj
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['createTemp'].clearValidate()
+      })
+      this.getAddContListParam.parammaps.bigId = row.id
+      this.getAddContList()
+    },
+    edit_dialog_save() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp'].validate(valid => {
+        if (valid) {
+          this.edit_dialog_saveSave()
+        }
+      })
+    },
+    edit_dialog_saveSave() {
+
+        for (var j = 0; j < this.listAddCont.length; j++) {
+          console.log(this.listAddCont[j].amount)
+          // eslint-disable-next-line use-isnan
+          if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
+            this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
+            return false
+          }
+
+        }
+
+        this.listAddCont[0].providerId = "0"
+        this.listAddCont[0].eqId = "0"
+        this.listAddCont[0].contractId = "0"
+
+        var amount = 0
+        if(this.createTemp.contract==0){
+          amount = "@insertSpotList.amount"
+        }else{
+          amount = 0
+        }
+        var send_data = {
+          "common": {  "returnmap": "0" },
+          "data": [
+            {
+              "name": "editBigoutsourcing", "type": "e",
+              "parammaps": this.createTemp
+            },
+            {
+              "name": "insertSpotList",
+              "resultmaps": {  "list": this.listAddCont },
+              "children": [
+                {
+                    "name": "editOutsourcing",  "type": "e",
+                    "parammaps": {
+                      "bigId": "@insertSpotList.LastInsertId",
+                      "providerId": "@insertSpotList.providerId",
+                      "amount": amount,
+                      "eqId": "@insertSpotList.eqId",
+                      "eqCode": "@insertSpotList.eqCode",
+                      "eqName": "@insertSpotList.eqName",
+                      "typea": "@insertSpotList.typea",
+                      "date": "@insertSpotList.date",
+                      "contractId": "@insertSpotList.contractId",
+                      "id": "@insertSpotList.id",
+                      "providerName": "@insertSpotList.providerName",
+                      "contractCode": "@insertSpotList.contractCode"
+                      }
+                  }
+              ]
+            },
+            {
+              "name": "updateBigoutsourcingFlowCompeleted", "type": "e",
+              "parammaps":{
+                id:this.createTemp.id
+              }
+            },
+            ]
+        }
+
+        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.dialogFormVisible = false
+
+            this.get_table_data1()
+            this.$notify({
+              title: '',
+              message: '保存成功',
+              type: 'success',
+              duration: 2000
+            })
+          }
+        })
+
+    },
+
+    form_delete(row) {
+      console.log('点击了删除',row)
+      MessageBox.confirm('确认删除此条信息?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        var send_data = {
+        "common": { "returnmap": "0" },
+        "data": [
+          {
+            "name": "deleteBigoutsourcing", "type": "e",
+            "parammaps": { "id":row.id }
+           }
+          ]
+        }
+
+        ExecDataByConfig(send_data).then(response => {
+          this.get_table_data1()
+          this.$notify({
+            title: '成功',
+            message: '删除成功',
+            type: 'success',
+            duration: 2000
+          })
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+
+
+    change_statue(val) {
+      if (val == 2) {
+        this.statueReason = true
+      } else {
+        this.statueReason = false
+      }
+    },
+
+    form_examine(row) {
+      console.log('点击了设备处长审核',row)
+      if (row == undefined) {
+        this.examineTemp = this.createTemp
+        this.$set(this.createTemp, 'status', 1)
+        this.$set(this.createTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'status', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    form_examine_save() {
+      console.log('点击了设备处长审核', this.examineTemp)
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+
+          //不通过
+          if(this.statueReason){
+            this.examineTemp.status = 2
+             //审核角色
+            this.examineTemp.flowCompeleted = "3"
+          } else {
+            this.examineTemp.status = 0
+            this.examineTemp.flowCompeleted = "2"
+          }
+          this.examineTemp.empid = Cookies.get('employeid')
+
+          var send_data = {
+              "common": {  "returnmap": "0"  },
+              "data": [
+                  // {
+                  //     "name": "editBigoutsourcingEquipment",  "type": "e",
+                  //     "parammaps": this.examineTemp
+                  // },
+                  {
+                      "name": "editBigoutsourcingDepartment",  "type": "e",
+                      "parammaps": this.examineTemp
+                  }
+              ]
+          }
+          console.log(send_data,'审核1保存')
+          ExecDataByConfig(send_data).then(response => {
+            console.log('审核确认发送参数', send_data)
+            if (response.msg !== 'fail') {
+              this.get_table_data1()
+              this.dialogFormVisible_Examine = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+
+    form_examine2(row) {
+      console.log('点击了场长审核',row)
+      this.examineTemp = Object.assign({}, row)
+      if (row == undefined) {
+        // this.examineTemp = this.createTemp
+        this.$set(this.createTemp, 'status', 1)
+        this.$set(this.createTemp, 'workflowNote', '')
+      } else {
+
+        this.$set(this.examineTemp, 'status', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.statueReason = false
+      this.dialogFormVisible_Examine = true
+      // GetDataByName(this.getParmCreateNumber).then(response => {
+      //   this.$nextTick(() => {
+      //     console.log('新增单号', response.data.list[0].orderCode)
+      //     this.examineTemp.acceptanceCode = response.data.list[0].orderCode
+      //     this.$set(this.examineTemp,'acceptanceCode',response.data.list[0].orderCode)
+      //     this.$forceUpdate()
+      //   })
+      // })
+    },
+    add_dialog_saveSave2() {
+      console.log(this.examineTemp,'=======contract')
+      // this.examineTemp.iscontract =
+
+        //牧场
+        var mydata = {
+          // acceptanceCode:this.createTemp.acceptanceCode,
+          pastureId:  this.createTemp.pastureId,
+          departmentId: this.createTemp.departmentId,
+          applicant:Cookies.get('employeid'),
+          outsourcingCode:this.createTemp.outsourcingCode,
+          applyType:0,
+          date:parseTime(new Date(), '{y}-{m}-{d}'),
+          status:1
+        }
+        if(this.examineTemp.contract == 0){
+          mydata.iscontract = 1
+        }else{
+          mydata.iscontract = 0
+        }
+        var send_data = {
+          "common": {  "returnmap": "0" },
+          "data": [
+            {
+              "name": "insertBigacceptance",
+              "type": "e",
+              "parammaps": mydata
+            }
+          ]
+        }
+        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.$notify({
+            //   title: '',
+            //   message: '保存成功',
+            //   type: 'success',
+            //   duration: 2000
+            // })
+          }
+        })
+
+
+    },
+
+    form_examine_save2() {
+      console.log('点击了场长审核', this.examineTemp)
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      // this.examineTemp.acceptanceCode = this.createTemp.acceptanceCode
+
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+
+          //不通过
+          if(this.statueReason){
+            this.examineTemp.status = 2
+             //审核角色
+            this.examineTemp.flowCompeleted = "5"
+          } else {
+
+
+           // //总价大于等于10000 有高级设备工程师审核
+           //  if(this.examineTemp.isAudit == 1){
+           //     this.examineTemp.status = 0
+           // //总价小于10000 没有高级设备工程师,直接场长审核
+           //  } else {
+           //     this.examineTemp.status = 1
+           //  }
+           this.examineTemp.status = 0
+            this.examineTemp.flowCompeleted = "4"
+          }
+          this.examineTemp.empid = Cookies.get('employeid')
+
+          var send_data = {
+              "common": {  "returnmap": "0"  },
+              "data": [
+                  // {
+                  //     "name": "editBigoutsourcingField",  "type": "e",
+                  //     "parammaps": this.examineTemp
+                  // },
+                  {
+                      "name": "editBigoutsourcingEquipment",  "type": "e",
+                      "parammaps": this.examineTemp
+                  }
+              ]
+          }
+          console.log(send_data,'审核2保存')
+          ExecDataByConfig(send_data).then(response => {
+            console.log('审核确认发送参数', send_data)
+            if (response.msg !== 'fail') {
+              if(this.examineTemp.status == 1){
+                this.add_dialog_saveSave2()
+              }
+              this.get_table_data1()
+              this.dialogFormVisible_Examine = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+
+    form_examine3(row) {
+      console.log('点击了高级工程师  审核',row)
+      this.examineTemp = Object.assign({}, row)
+      if (row == undefined) {
+        //this.examineTemp = this.createTemp
+        this.$set(this.createTemp, 'status', 1)
+        this.$set(this.createTemp, 'workflowNote', '')
+      } else {
+
+        this.$set(this.examineTemp, 'status', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    form_examine_save3() {
+      console.log('点击了高级工程师审核',this.examineTemp )
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+
+          //不通过
+          if(this.statueReason){
+            this.examineTemp.status = 2
+             //审核角色
+            this.examineTemp.flowCompeleted = "7"
+          } else {
+            //总价大于等于10000 有高级设备工程师审核
+             if(this.examineTemp.isAudit == 1){
+                this.examineTemp.status = 0
+            //总价小于10000 没有高级设备工程师,直接场长审核
+             } else {
+                this.examineTemp.status = 1
+             }
+            this.examineTemp.flowCompeleted = "6"
+          }
+          this.examineTemp.empid = Cookies.get('employeid')
+
+          var send_data = {
+              "common": {  "returnmap": "0"  },
+              "data": [
+                  // {
+                  //     "name": "editBigoutsourcingAdvanceddate",  "type": "e",
+                  //     "parammaps": this.examineTemp
+                  // },
+                  {
+                      "name": "editBigoutsourcingField",  "type": "e",
+                      "parammaps": this.examineTemp
+                  }
+              ]
+          }
+          console.log(send_data,'审核3保存',this.examineTemp)
+          ExecDataByConfig(send_data).then(response => {
+            console.log('审核确认发送参数', send_data)
+            if (response.msg !== 'fail') {
+              if(this.examineTemp.status == 1){
+                this.add_dialog_saveSave2()
+              }
+              this.get_table_data1()
+              this.dialogFormVisible_Examine = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    form_examine4(row) {
+      console.log('点击了高级工程师  审核',row)
+      this.examineTemp = Object.assign({}, row)
+      if (row == undefined) {
+        //this.examineTemp = this.createTemp
+        this.$set(this.createTemp, 'status', 1)
+        this.$set(this.createTemp, 'workflowNote', '')
+      } else {
+
+        this.$set(this.examineTemp, 'status', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    form_examine_save4() {
+      console.log('点击了高级工程师审核',this.examineTemp )
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+
+          //不通过
+          if(this.statueReason){
+            this.examineTemp.status = 2
+             //审核角色
+            this.examineTemp.flowCompeleted = "9"
+          } else {
+            this.examineTemp.status = 1
+            this.examineTemp.flowCompeleted = "8"
+          }
+          this.examineTemp.empid = Cookies.get('employeid')
+
+          var send_data = {
+              "common": {  "returnmap": "0"  },
+              "data": [
+                  // {
+                  //     "name": "editBigoutsourcingAdvanceddate",  "type": "e",
+                  //     "parammaps": this.examineTemp
+                  // },
+                  {
+                      "name": "editBigoutsourcingAdvanceddate",  "type": "e",
+                      "parammaps": this.examineTemp
+                  }
+              ]
+          }
+          console.log(send_data,'审核4保存')
+          ExecDataByConfig(send_data).then(response => {
+            console.log('审核确认发送参数', send_data)
+            if (response.msg !== 'fail') {
+              if(this.examineTemp.status == 1){
+                this.add_dialog_saveSave2()
+              }
+              this.get_table_data1()
+              this.dialogFormVisible_Examine = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+
+
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+  // .content{
+  //   padding: 20px 20px;
+  //   .title{
+  //     text-align: center;
+  //     font-weight: 700;
+  //   }
+  //   .title2{
+  //     float: left;
+  //     font-weight: 700;
+  //     padding: 10px 0;
+  //   }
+  // }
+
+</style>

+ 10 - 2
src/views/maintenance/subcontractingMainten/tabPage/tab2.vue

@@ -164,6 +164,13 @@
                 <el-date-picker v-model="createTemp.hcdate" :picker-options="pickerOptions" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" :disabled="dialogStatus==='see'"  />
               </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="createTemp.remark" :disabled="dialogStatus==='see'" />
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-divider></el-divider>
 
@@ -851,7 +858,7 @@ export default {
         acceptanceCode:"",
         outsourcingCode:"",
         applyType:0,
-
+        remark:'',
 
         applicant: '',
 
@@ -1882,7 +1889,8 @@ export default {
                           "parammaps":{
                             id:this.createTemp.id,
                             lcdate:this.createTemp.lcdate,
-                            hcdate:this.createTemp.hcdate
+                            hcdate:this.createTemp.hcdate,
+                            remark:this.createTemp.remark
                           }
                         },
                         {

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio