Browse Source

彭埠牧场新需求

epans 2 years ago
parent
commit
717ef0e927
40 changed files with 19360 additions and 183 deletions
  1. BIN
      dist-现代牧业-本地地址-20221129-1.zip
  2. BIN
      dist-现代牧业-本地地址-20221219-1.zip
  3. BIN
      dist-现代牧业-正式地址-20221205-1.zip
  4. BIN
      dist-现代牧业-正式地址-20221216-1.zip
  5. BIN
      dist-现代牧业-正式地址-20221219-1.zip
  6. BIN
      dist-现代牧业-正式地址-20221219-2.zip
  7. BIN
      dist-现代牧业-测试地址-20221205-1.zip
  8. BIN
      dist-现代牧业-测试地址-20221205-3.zip
  9. BIN
      dist-现代牧业-测试地址-20221208-1.zip
  10. BIN
      dist-现代牧业-测试地址-20221209-1.zip
  11. BIN
      dist-现代牧业-测试地址-20221219-3t.zip
  12. BIN
      dist-现代牧业-测试地址-20221219-4.zip
  13. 0 0
      dist/index.html
  14. 9 0
      src/api/common.js
  15. 14 5
      src/views/asset/basics/index.vue
  16. 33 2
      src/views/custom/outStock/index.vue
  17. 2 2
      src/views/custom/outStock/index1.vue
  18. 937 1
      src/views/custom/purchase/index.vue
  19. 2534 0
      src/views/custom/purchase/index2.vue
  20. 1 1
      src/views/custom/receive/index.vue
  21. 1786 0
      src/views/custom/receive/index1.vue
  22. 2 2
      src/views/custom/retreat/index.vue
  23. 153 7
      src/views/custom/returngoods/index.vue
  24. 1938 0
      src/views/custom/returngoods/index1.vue
  25. 2 2
      src/views/custom/storage/index.vue
  26. 105 22
      src/views/custom/subscribe/index.vue
  27. 1615 0
      src/views/custom/subscribe/index1.vue
  28. 41 33
      src/views/maintenance/maintain/index.vue
  29. 2194 0
      src/views/maintenance/maintain/index1.vue
  30. 2188 0
      src/views/maintenance/maintain/index流程改了一半.vue
  31. 2200 0
      src/views/maintenance/maintain/index流程改完了3.vue
  32. 58 8
      src/views/maintenance/repair/index.vue
  33. 3253 0
      src/views/maintenance/repair/index1.vue
  34. 171 0
      src/views/report/inventoryTurnover/index.vue
  35. 19 11
      src/views/report/maintenanceCycle/index.vue
  36. 4 4
      src/views/report/queryCombustion/index.vue
  37. 4 4
      src/views/report/queryElec/index.vue
  38. 4 4
      src/views/report/queryWater/index.vue
  39. 90 20
      src/views/report/stopRecord/index.vue
  40. 3 55
      src/views/report/stopRecord/index2.vue

BIN
dist-现代牧业-本地地址-20221129-1.zip


BIN
dist-现代牧业-本地地址-20221205-1.zip → dist-现代牧业-本地地址-20221219-1.zip


BIN
dist-现代牧业-正式地址-20221205-1.zip


BIN
dist-现代牧业-正式地址-20221205-2.zip → dist-现代牧业-正式地址-20221216-1.zip


BIN
dist-现代牧业-测试地址-20221205-2.zip → dist-现代牧业-正式地址-20221219-1.zip


BIN
dist-现代牧业-测试地址-20221201-1.zip → dist-现代牧业-正式地址-20221219-2.zip


BIN
dist-现代牧业-测试地址-20221205-1.zip


BIN
dist-现代牧业-测试地址-20221205-3.zip


BIN
dist-现代牧业-测试地址-20221208-1.zip


BIN
dist-现代牧业-测试地址-20221209-1.zip


BIN
dist-现代牧业-测试地址-20221208-2.zip → dist-现代牧业-测试地址-20221219-3t.zip


BIN
dist-现代牧业-正式地址-20221202-1.zip → dist-现代牧业-测试地址-20221219-4.zip


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 9 - 0
src/api/common.js

@@ -9,6 +9,15 @@ export function postJson(url,data) {
     data
   })
 }
+
+export function startStopRecord(data) {
+  return request({
+    url: '/authdata/startStopRecord',
+    method: 'post',
+    data
+  })
+}
+
 export function GetDataByName(data) {
   return request({
     url: '/authdata/GetDataByName',

+ 14 - 5
src/views/asset/basics/index.vue

@@ -99,6 +99,7 @@
                 </div>
               </template>
             </el-table-column>
+            <el-table-column label="用途"   align="center" prop="purpose" />
             <el-table-column label="部门" align="center" prop="deptName" />
             <el-table-column label="责任人" align="center" prop="employeName" />
             <el-table-column label="审批日期" sortable align="center" prop="spDate" />
@@ -116,6 +117,7 @@
             <el-table-column label="折旧年限" sortable align="center" prop="depreciation" />
             <el-table-column label="使用时长(年)" sortable align="center" prop="serviceDuration" />
             <el-table-column label="使用率(%)" sortable align="center" prop="utilizationRate" />
+           
             <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
               <template slot-scope="{row}">
                 <el-button v-if="isBasicsCard" type="primary" size="mini" @click="form_see(row)">查看</el-button>
@@ -394,14 +396,14 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="一级督办:" prop="levelone">
-                <el-select v-model="createTemp.levelone" placeholder="一级督办" class="filter-item">
+                <el-select v-model="createTemp.levelone" placeholder="设备主管" class="filter-item">
                   <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="二级督办:" prop="leveltwo">
-                <el-select v-model="createTemp.leveltwo" placeholder="二级督办" class="filter-item">
+                <el-select v-model="createTemp.leveltwo" placeholder="设备助理" class="filter-item">
                   <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
@@ -410,7 +412,7 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="三级督办:" prop="levelthree">
-                <el-select v-model="createTemp.levelthree" placeholder="三级督办" class="filter-item">
+                <el-select v-model="createTemp.levelthree" placeholder="场长" class="filter-item">
                   <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
@@ -2679,6 +2681,10 @@ export default {
             }, 2000)
           }
           console.log(this.downLoadList2)
+
+
+
+
           const ExcelDatas = [
             {
               tHeader: ['类型', '单号', '领用日期', '领用部门', '备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '出库数量', '退库数量', '单价', '总价'],
@@ -2833,10 +2839,13 @@ export default {
           }, 2000)
         }
         console.log(this.downLoadList)
+ 
+
+
         const elecExcelDatas = [
           {
-            tHeader: ['牧场','设备类别', '资产编号', '设备名称', '设备内部编号', '设备规格', '品牌', '供应商', '用途', '状态', '购置日期', '入场日期', '折旧年限', '财务编号', '原值', '残值', '月核减值', '保养级别', '保养费用', '维修费用', '基数(小时)',  '部门', '责任人', '录入人', '录入时间', '使用时长(年)', '使用率(%)'],
-            filterVal: ['pastureName','eqClassName', 'assetCode', 'eqName', 'eqCode', 'specification', 'brandName', 'providerName', 'purpose', 'status', 'purchaseDate', 'entranceDate', 'depreciation', 'financeCode', 'yuanzhi', 'salvage', 'subtractvalue', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'baseHours', 'deptName', 'employeName', 'inputUserName', 'inputDatetime', 'serviceDuration', 'utilizationRate'],
+            tHeader: ['牧场','设备类别', '资产编号', '设备名称', '设备内部编号', '设备规格', '品牌', '供应商', '用途', '状态', '购置日期', '入场日期', '折旧年限', '财务编号', '原值', '残值', '月核减值', '保养级别', '保养费用', '维修费用', '基数(小时)',  '部门', '责任人', '录入人', '录入时间', '使用时长(年)', '使用率(%)', '指定维修人', '间隔时间', '一级督办', '二级督办', '三级督办'],
+            filterVal: ['pastureName','eqClassName', 'assetCode', 'eqName', 'eqCode', 'specification', 'brandName', 'providerName', 'purpose', 'status', 'purchaseDate', 'entranceDate', 'depreciation', 'financeCode', 'yuanzhi', 'salvage', 'subtractvalue', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'baseHours', 'deptName', 'employeName', 'inputUserName', 'inputDatetime', 'serviceDuration', 'utilizationRate', 'maintenanceName', 'pushTime', 'leveloneName', 'leveltwoName', 'levelthreeName'],
             tableDatas: this.downLoadList,
             sheetName: '设备基础信息'
           }

+ 33 - 2
src/views/custom/outStock/index.vue

@@ -99,11 +99,11 @@
             </template>
           </el-table-column>
           <el-table-column label="出库日期" sortable prop="creatTime" min-width="100px" align="center" />
-          <el-table-column label="EAS同步状态" min-width="130px" align="center">
+          <!-- <el-table-column label="EAS同步状态" min-width="130px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.easStatus }}</span><br>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column  prop="ProofCode" label="sap编码" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span>{{scope.row.ProofCode}}</span>
@@ -2215,6 +2215,16 @@ export default {
             empId: this.createTemp.empId,
             note: this.createTemp.note
           }}
+
+          if(this.createTemp.oddCode == ""){
+            this.$notify({
+                title: '保存失败',
+                message: '领用单号不得为空',
+                type: 'warning',
+                duration: 2000
+              })
+            return false
+          }
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
           this.postDataPramas.data[1].children = []
           this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {
@@ -2403,6 +2413,16 @@ export default {
             oddCode: this.createTemp.oddCode,
             note: this.createTemp.note
           }}
+
+          if(this.createTemp.oddCode == ""){
+            this.$notify({
+                title: '保存失败',
+                message: '领用单号不得为空',
+                type: 'warning',
+                duration: 2000
+              })
+            return false
+          }
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
           this.postDataPramas.data[1].children = []
           this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {
@@ -2503,6 +2523,17 @@ export default {
             empId: this.createTemp.empId,
             note: this.createTemp.note
           }}
+
+          if(this.createTemp.oddCode == ""){
+            this.$notify({
+                title: '保存失败',
+                message: '领用单号不得为空',
+                type: 'warning',
+                duration: 2000
+              })
+            return false
+          }
+
           this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
           this.postDataPramas.data[1].children = []
           this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {

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

@@ -92,11 +92,11 @@
             </template>
           </el-table-column>
           <el-table-column label="出库日期" sortable prop="creatTime" min-width="100px" align="center" />
-          <el-table-column label="EAS同步状态" min-width="130px" align="center">
+          <!-- <el-table-column label="EAS同步状态" min-width="130px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.easStatus }}</span><br>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
               <el-button v-if="isOutStockSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>

+ 937 - 1
src/views/custom/purchase/index.vue

@@ -967,16 +967,429 @@
           <pagination v-show="total3>=0" :total="total3" :page.sync="getdataListParm3.offset" :limit.sync="getdataListParm3.pagecount" @pagination="get_table_data3" />
         </div>
       </el-tab-pane>
+       <el-tab-pane label="采购退货" name="fifth">
+        <div class="procurementDetails">
+          <div class="filter-container">
+            <el-select v-model="getdataListParm5.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-input v-model="getdataListParm5.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />
+            <el-autocomplete v-model="getdataListParm5.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search5">搜索</el-button>
+            <el-button  class="filter-item" type="primary" icon="el-icon-edit" @click="form_add5">新增</el-button>
+     
+          </div>
+          <el-table
+            :key="tableKey5"
+            v-loading="listLoading5"
+            element-loading-text="给我一点时间"
+            :data="list5"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            @sort-change="tableSort"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购单号" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.buyeCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="供应商" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.providerName }}</span>
+              </template>
+            </el-table-column>       
+            <el-table-column label="牧场" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.pastureName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="录入人" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.empname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购员" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.empname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="提交日期" sortable prop="buyerDate" min-width="110px" align="center" />
+           
+            <el-table-column label="单据状态" min-width="80px" align="center" :formatter="statu" />
+            <el-table-column  prop="sapNumber" label="sap编码" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{scope.row.sapNumber}}</span>
+              </template>
+            </el-table-column>
+   
+            <el-table-column   prop="sapstatus" label="sap上传状态" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span v-show="scope.row.sapstatus == 1">上传失败</span>
+                <span v-show="scope.row.sapstatus == -1">未上传</span>
+                <span v-show="scope.row.sapstatus == 0">上传成功</span>
+              </template>
+            </el-table-column>
+            <el-table-column   prop="srmstatus" label="srm上传状态" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span v-show="scope.row.srmstatus == 1">上传失败</span>
+                <span v-show="scope.row.srmstatus == -1">未上传</span>
+                <span v-show="scope.row.srmstatus == 0">上传成功</span>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="{row}">
+                <el-button type="primary" size="mini" @click="form_see5(row)">查看</el-button>
+                <el-button v-if="row.statu === 0"  type="danger" size="mini" @click="handleClose5(row)">关闭</el-button> 
+           
+              </template>
+            </el-table-column>
+
+             
+          </el-table>
+          <pagination v-show="total5>=0" :total="total5" :page.sync="getdataListParm5.offset" :limit.sync="getdataListParm5.pagecount" @pagination="get_table_data5" />
+        </div>
+      </el-tab-pane>    
+
+
+
     </el-tabs>
+
+    <el-dialog  title="查看详情" :visible.sync="dialogFormVisibleSee5" :close-on-click-modal="false">
+            <div class="app-contentSee">
+              <el-form
+                ref="temp5"
+                :model="temp5"
+                label-position="right"
+                label-width="80px"
+                style="width: 800px;margin-bottom:30px"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="采购单号:" prop="buyeCode">
+                      <span>{{ temp5.buyeCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="供应商:" prop="providerName">
+                      <span>{{ temp5.providerName }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="5">
+                    <el-form-item label="采购员:" prop="empname">
+                      <span>{{ temp5.empname }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="5">
+                    <el-form-item label="提交日期:" prop="buyerDate">
+                      <span>{{ temp5.buyerDate }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+               
+             
+                element-loading-text="给我一点时间"
+                :data="listSee5"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;margin-bottom:100px"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable table-fixed"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px" />
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件图片" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <el-popover placement="right" title="" trigger="hover">
+                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
+                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                    </el-popover>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件品牌" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.brand }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="计量单位" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.unit }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="price" label="单价(元)" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.price }}</span>
+                  </template>
+                </el-table-column>
+              
+                <el-table-column sortable prop="amount" label="采购数量" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.amount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="sumPrice" label="总价(元)" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.sumPrice }}</span>
+                  </template>
+                </el-table-column>
+             
+                <el-table-column prop="SGremark" label="备注" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.SGremark }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <div class="sum" style="right:30px;position:absolute;bottom:90px">
+                <b>总计:{{ temp5.sumPrices }}元</b>
+              </div>
+              <div class="stuts" style="left:30px;position:absolute;bottom:70px">
+                <b>单据状态:{{ temp5.statu }}</b>
+                <b v-if="isStatu">关闭原因:{{ temp5.note }}</b>
+                <!-- <div v-if="isExtensionDays">延期天数:{{ temp5.extensionDays }}</div> -->
+              </div>
+              <div
+                slot="footer"
+                class="dialog-footer"
+                style="right:30px;position:absolute;bottom:10px"
+              >
+                <el-button @click="dialogFormVisibleSee5 = false;get_table_data5()">关闭</el-button>
+              </div>
+            </div>
+          </el-dialog>
+
+
+
+          <el-dialog  title="关闭提示" :visible.sync="dialogFormVisibleClose5" :close-on-click-modal="false" style="width:70%;margin: 0 auto">
+            <div class="app-contentClose">
+              <el-form
+                ref="temp5"
+                :rules="rules55"
+                :model="temp5"
+                label-position="right"
+                label-width="80px"
+                style="width: 300px;margin-bottom:30px"
+              >
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="采购单号:" prop="orderNo">
+                      <span>{{ temp5.buyeCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="" prop="note">
+                      <el-input ref="note" v-model="temp5.note" type="textarea" placeholder="请输入关闭该采购单原因" />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <div
+                slot="footer"
+                class="dialog-footer"
+                style="right:30px;position:absolute;bottom:10px"
+              >
+                <el-button @click="dialogFormVisibleClose5 = false;get_table_data5();">取消</el-button>
+                <el-button type="primary" :disabled="isokDisable" @click="closeData5()">确认关闭</el-button>
+              </div>
+            </div>
+          </el-dialog>
+
+
+
+     <!-- 弹出层新增  -->
+     <el-dialog  title="采购退货" :visible.sync="dialogFormVisible5" :close-on-click-modal="false" width="90%">
+      <div class="app-container">
+        <el-form
+          ref="createTemp5"
+          :rules="rules5"
+          :model="createTemp5"
+          label-position="right"
+          label-width="100px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="采购单号:" prop="buyeCode">
+                <el-input   v-model="createTemp5.buyeCode"   disabled placeholder="采购单号" style="width:100%"    />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="供应商:" prop="providerId">
+                <el-select v-model="createTemp5.providerId"  filterable placeholder="供应商" style="width:100%" @change="changeProvider5">
+                  <el-option v-for="item in findAllProvider5" :key="item.id" clearable :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureId">
+                <el-select v-model="createTemp5.pastureId"   placeholder="牧场" class="filter-item" style="width:100%">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="录入人:" prop="employeId">
+                <el-select v-model="createTemp5.employeId" placeholder="录入人" class="filter-item" style="width:100%"  >
+                  <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+           
+          </el-row>
+          <el-row>
+            <el-col :span="15">
+              <el-form-item label="备件:" prop="partCode">
+                <el-autocomplete
+                  v-model="createTemp5.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="sparePartSearch5"
+                  placeholder="请输入备件编号或备件名称或备件规格"
+                  style="width:100%"
+                  @select="handleSelectSparePart5"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
+                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
+                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+            
+          </el-row>
+        </el-form>
+ 
+         <el-table
+        
+          element-loading-text="给我一点时间"
+          :data="listAdd5"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+        >
+ 
+          <el-table-column label="序号" align="center" type="index" width="50px" />
+          <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brand }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="库存数" prop="reportery" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货数量" min-width="120px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <el-form :model="scope.row"  >
+                <el-form-item prop="amount">
+                  <el-input v-model="scope.row.amount" style="margin-top:15px"  />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price }}</span>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column label="总价" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price * parseFloat(scope.row.amount) | keepTwoNum }}</span>
+            </template>
+          </el-table-column> -->
+          <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete5(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>  
+        <div slot="footer" class="dialog-footer" style="bottom:10px">
+          <el-button type="primary" :disabled="isokDisable" @click="add_dialog_save5()">保存并关闭</el-button>
+          <el-button @click="dialogFormVisible5 = false;get_table_data5()">取消并关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+
+
   </div>
 </template>
 
+
+
+
 <script>
 // 引入
 import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, failproccess, checkButtons, GetAccount,SapOrder,SrmOrder } from '@/api/common'
 import waves from '@/directive/waves' // waves directive
 import Pagination from '@/components/Pagination' // secondary package based on el-pagination
 import Cookies from 'js-cookie'
+import { MessageBox } from 'element-ui'
 import { parseTime, sortChange, json2excel } from '@/utils/index.js'
 export default {
   name: 'Purchase',
@@ -1070,7 +1483,9 @@ export default {
       requestParams: [
         { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
         { name: 'getDepartmentNY', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }}
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
+       
       ],
       getdataListParm1: {
         name: 'getbuydetailParts',
@@ -1164,6 +1579,11 @@ export default {
         returntype: 'Map',
         parammaps: {}
       },
+      requestParamStute5: {
+        name: 'shutDownBigrefunddetail',
+        returntype: 'Map',
+        parammaps: {}
+      },
       pageNum3: 0,
       pageSize3: 0,
       temp3: {},
@@ -1203,6 +1623,110 @@ export default {
         returntype: 'Map',
         parammaps: {}
       },
+
+
+      // 退货
+      listLoading5: false,
+      tableKey5: 0,
+      list5: [],
+      pageNum5: 0,
+      pageSize5: 0,
+      total5: 0,
+      getdataListParm5: {
+        name: 'getBigRefunddetailList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          pastureName: Cookies.get('pasturename'),
+          providerName: '',
+          partCode: '',
+          partName: '',
+          matchCode: '',
+          buyeCode: '',
+          isStorage: '',
+          startTime: '',
+          stopTime: '',
+          inputDatetime: ''
+        }
+      },
+ 
+ 
+      dialogFormVisible5: false,
+ 
+      createTemp5: {
+        providerId: '',
+        buyeCode: '',
+        note: '',
+        pastureId: this.$store.state.user.pastureid,
+        employeId: this.$store.state.user.employeid,
+        createTime: parseTime(new Date(), '{y}-{m}-{d}')
+      },
+      rules5: {
+        // useForm: [{ required: true, message: '必填', trigger: 'blur' }],
+        providerId: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+
+      rules55: {
+ 
+        note: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+
+      listSee5: [],
+      getdataListSee5: {
+        name: 'getrefunddetailListbyBig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+
+      
+
+      getParmCreateNumber5: {
+        name: 'autoCreatCode',
+        page: 0,
+        offset: 0,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'CG'
+        }
+      },
+
+      requestSparePart5: {
+        name: 'getPartsListThdd',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+
+      getParmBatchOperation5: {
+        name: 'getStockPastureListBypv',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          providerId: ''
+        }
+      },
+
+      listAdd5:[],
+
+      findAllProvider5: [],
+      temp5: {
+        note: ''
+      }, 
+
+      dialogFormVisibleSee5: false,
+      dialogStatusSee5: '',
+
+
+
+
       activeList: [],
 
       deptNameList: [],
@@ -1226,6 +1750,8 @@ export default {
       },
       statueReason: false,
       dialogFormVisibleClose: false,
+      
+      dialogFormVisibleClose5: false,
       dialogStatusClose: '',
       textMap: {
         confirmation: '确认配单',
@@ -1269,6 +1795,8 @@ export default {
     this.get_table_data2()
     this.get_table_data3()
     this.get_table_data4()
+
+    this.get_table_data5()
     if (this.$route.query.activeName !== undefined) {
       this.activeName = this.$route.query.activeName
     }
@@ -1276,6 +1804,270 @@ export default {
 
   methods: {
 
+
+    form_add5() {
+      this.resetCreateTemp5()
+      this.createTemp5.buyeCode = ''
+      this.dialogFormVisible5 = true
+      this.getCreateNumber5()
+    },
+
+    resetCreateTemp5() {
+      this.createTemp5.pastureId = this.$store.state.user.pastureid
+      this.createTemp5.providerId = ''
+      this.createTemp5.note = ''
+      this.createTemp5.employeId = this.$store.state.user.employeid
+      this.createTemp5.createTime = parseTime(new Date(), '{y}-{m}-{d}')
+      this.createTemp5.buyeCode = ''
+      this.listAdd5 = []
+      this.TotalAmount5 = 0
+    },
+
+    getCreateNumber5() {
+      GetDataByName(this.getParmCreateNumber5).then(response => {
+        this.$nextTick(() => {
+          console.log('新增退货单号', response.data.list[0].orderCode)
+          this.createTemp5.buyeCode = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+
+    sparePartSearch5(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      if (this.createTemp5.providerId !== '') {
+        this.requestSparePart5.parammaps.providerId = this.createTemp5.providerId
+        this.requestSparePart5.parammaps['partCode'] = queryString
+        GetDataByName(this.requestSparePart5).then(response => {
+          console.log('备件模糊查询搜索data', response.data.list)
+          if (response.data.list == null) {
+            cb([])
+          } else {
+            cb(response.data.list)
+          }
+        })
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择供应商',
+          type: 'warning',
+          duration: 2000
+        })
+      }
+    },
+    handleSelectSparePart5(item) {
+      console.log('备件模糊查询选中值', item)
+      console.log('备件模糊查询选中值', item.id)
+    
+      if (this.listAdd5.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd5.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此备件已存在,请重新选择备件'
+          })
+          console.log(this.listAdd5)
+          console.log(this.listAdd5.length)
+           
+          return false
+          
+        } else {
+          this.listAdd5.unshift(item)
+          this.$set(item, 'amount', item.reportery)
+          if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+            this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+            this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+          } else {
+            item.srcpath = ''
+            item.picpath = ''
+          }
+        }
+      } else {
+        this.listAdd5.unshift(item)
+        this.$set(item, 'amount', item.reportery)
+        if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+          this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+          this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+        } else {
+          item.srcpath = ''
+          item.picpath = ''
+        }
+      }
+      this.$forceUpdate()
+      console.log(this.listAdd5)
+       
+    },
+ 
+
+      
+    changeProvider5(val) {
+      console.log(val, '供应商change')
+      this.listAdd5 = []
+      this.getParmBatchOperation5.parammaps.providerId = val
+ 
+    },
+
+    // 新增删除
+    partDelete5(row) {
+      console.log(this.listAdd5)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        for (var i = 0; i < this.listAdd5.length; i++) {
+          console.log(this.listAdd5[i])
+          if (this.listAdd5[i].id === row.id) {
+            var listAddIndex = this.listAdd5.indexOf(this.listAdd5[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd5.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+
+    add_dialog_save5() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp5'].validate(valid => {
+        if (valid) {
+          console.log(this.listAdd5)
+          console.log(this.createTemp5.buyeCode)
+          if (this.createTemp5.buyeCode == '' || this.createTemp5.buyeCode == null || this.createTemp5.buyeCode == undefined) {
+            GetDataByName(this.getParmCreateNumber5).then(response => {
+              this.$nextTick(() => {
+                console.log('退库单号', response.data.list[0].orderCode)
+                this.createTemp5.buyeCode = response.data.list[0].orderCode
+                this.$forceUpdate()
+                this.add_dialog_saveSave5()
+              })
+            })
+          } else {
+            this.add_dialog_saveSave5()
+          }
+        }
+      })
+    },
+    add_dialog_saveSave5() {
+      if (this.listAdd5.length !== 0) {
+        for (var j = 0; j < this.listAdd5.length; j++) {
+          console.log(this.listAdd5[j].amount)
+          // eslint-disable-next-line use-isnan
+          if (this.listAdd5[j].amount == null || this.listAdd5[j].amount === '') {
+            this.$message({
+              type: 'warning',
+              message: '请检查数量是否未填写',
+              duration: 2000
+            })
+            return false
+          } else {
+            var rulesRefundNumber = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+            if (!rulesRefundNumber.test(this.listAdd5[j].amount)) {
+              this.$message({
+                type: 'error',
+                message: '数量请输入正数,最多保留两位小数点',
+                duration: 2000
+              })
+              return false
+            } else if (parseFloat(this.listAdd5[j].amount) > parseFloat(this.listAdd5[j].reportery)) {
+              this.$message({
+                type: 'error',
+                message: '数量不可大于库存数',
+                duration: 2000
+              })
+              return false
+            }
+          }
+        }
+        
+
+//保存发的参数!!!!
+        var send_data = {
+            "common": {
+                "returnmap": "0"
+            },
+            "data": [
+                {
+                    "name": "addBigrefunddetail",
+                    "type": "e",
+                    "parammaps": {
+                        "pastureId": Cookies.get('pastureid'),
+                        "buyeCode": this.createTemp5.buyeCode,
+                        "providerId": this.createTemp5.providerId,
+                        "buyerDate": "",
+                        "buyerPerson": this.createTemp5.employeId,
+                        "note": "",
+                      }
+                },
+                {
+                    "name": "insertSpotList",
+                    "resultmaps": {
+                        "list": this.listAdd5
+                    },
+                    "children": [
+                        {
+                            "name": "addRefunddetail",
+                            "type": "e",
+                            "parammaps": {
+                                "brandId": "@insertSpotList.brandId",
+                                "contractId": "@insertSpotList.contractId",
+                                "contractCode": "@insertSpotList.contractCode",
+                                "bigId": "@insertSpotList.bigId",
+                                "partCode": "@insertSpotList.partCode",
+                                "partId": "@insertSpotList.partId",
+                                "pastureId": "@insertSpotList.pastureId",
+                                "price": "@insertSpotList.price",
+                                "statue": "@insertSpotList.statue",
+                                "remark": "@insertSpotList.remark",
+                                "amount": "@insertSpotList.amount",
+                                "providerId": "@insertSpotList.providerId",
+                                "departmentName": "@insertSpotList.departmentName",
+                                "bigId": "@addBigrefunddetail.LastInsertId",
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+        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.dialogFormVisible5 = false
+            this.getdataListParm5.parammaps.inputDatetime = ''
+            setTimeout(() => {
+              this.get_table_data5()
+         
+            }, 1000)
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+        return true
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择备件',
+          type: 'warning',
+          duration: 2000
+        })
+        return false
+      }
+    },
+
+ 
+
+
+
     change_dept(e){
       console.log(e)
       this.getdataListParm1.parammaps.departmentId = e
@@ -1372,6 +2164,8 @@ export default {
         this.get_table_data2()
       } else if (tab.name === 'third') {
         this.get_table_data3()
+      } else if (tab.name === 'fifth') {
+        this.get_table_data5()
       }
     },
     get_select_list() {
@@ -1379,6 +2173,8 @@ export default {
         this.findAllEmploye = response.data.findAllEmploye.list
         this.findAllPasture = response.data.findAllPasture.list
         this.deptNameList =  response.data.getDepartmentNY.list
+        this.findAllProvider5 = response.data.findAllProvider.list
+        this.findAllProvider = response.data.findAllProvider.list
         console.log(this.deptNameList)
       })
     },
@@ -1945,6 +2741,119 @@ export default {
       this.dialogFormVisibleClose = true
     },
 
+    handleClose5(row) {
+      this.resetCloseTemp5()
+      this.temp5 = Object.assign({}, row)
+  
+      this.dialogFormVisibleClose5 = true
+    },
+
+    resetCloseTemp5() {
+      this.temp2.note = ''
+    },
+
+    closeData5() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      console.log('点击确认关闭', this.temp2)
+      this.$refs['temp5'].validate(valid => {
+        if (valid) {
+          this.requestParamStute5.parammaps.id = this.temp5.id
+          this.requestParamStute5.parammaps.note = this.temp5.note
+          PostDataByName(this.requestParamStute5).then(response => {
+            console.log('新增保存发送参数', this.requestParamStute5)
+            if (response.msg !== 'fail') {
+              this.get_table_data5()
+              this.dialogFormVisibleClose5 = false
+              this.$notify({
+                title: '成功',
+                message: '关闭成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+
+    form_see5(row) {
+      this.temp5 = Object.assign({}, row)
+      if (this.temp5.statu === 0) {
+        this.isStatu = false
+        this.temp5.statu = '未到货'
+ 
+      } else if (this.temp2.statu === 1) {
+        this.isStatu = false
+        this.temp5.statu = '部分到货'
+ 
+      } else if (this.temp2.statu === 2) {
+        this.isStatu = false
+        this.temp5.statu = '按时到货'
+   
+      } else if (this.temp2.statu === 3) {
+        this.isStatu = false
+        this.temp5.statu = '已延期'
+ 
+      } else if (this.temp2.statu === 4) {
+        this.temp5.statu = '已关闭'
+        this.isStatu = true
+      
+      } else if (this.temp2.statu === 5) {
+        this.isStatu = false
+        this.temp5.statu = '部分到货-延期'
+ 
+      } else if (this.temp2.statu === 6) {
+        this.isStatu = false
+        this.temp5.statu = '全部到货-延期'
+     
+      }
+      this.dialogStatusSee5 = 'see'
+      this.dialogFormVisibleSee5 = true
+      this.getdataListSee5.parammaps.id = row.id
+      this.getSeeList5()
+    },
+    getSeeList5() {
+      GetDataByName(this.getdataListSee5).then(response => {
+        this.listSee5 = response.data.list
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              this.listSee5[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              this.listSee5[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+            } else {
+              this.listSee5[i].srcpath = ''
+              this.listSee5[i].picpath = ''
+            }
+          }
+        }
+        console.log('查看下方table数据', response.data.list)
+        // this.pageNum2 = response.data.pageNum
+        // this.pageSize2 = response.data.pageSize
+        var sumArray = []
+        for (var i = 0; i < this.listSee2.length; i++) {
+          console.log()
+          sumArray.push(
+            this.listSee5[i].sumPrice
+          )
+        }
+        console.log('总价', sumArray)
+        var arrvalue = 0
+        for (var i = 0; i < sumArray.length; i++) {
+          console.log('table内总价每一个值', sumArray[i])
+          arrvalue += parseFloat(sumArray[i])// 数组的索引是从0开始的
+        }
+        this.temp5.sumPrices = arrvalue.toFixed(3)
+        setTimeout(() => {
+          this.listLoadingSee = false
+        }, 100)
+      })
+    },
+
     handleCurrentChange(val) {
         this.currentRow = val;
         console.log("currentRow",this.currentRow)
@@ -2227,6 +3136,33 @@ export default {
         json2excel(elecExcelDatas, '采购明细', true, 'xlsx')
       })
     },
+
+
+
+    get_table_data5() {
+      this.listLoading5 = true
+      
+      GetDataByName(this.getdataListParm5).then(response => {
+        this.list5 = response.data.list
+        this.pageNum5 = response.data.pageNum
+        this.pageSize5 = response.data.pageSize
+        if (response.data.total) {
+          this.total5 = response.data.total
+        }
+        // Just to simulate the time of the request
+        setTimeout(() => {
+          this.listLoading5 = false
+        }, 300)
+      })
+    },
+    form_search5() {
+      this.listLoading = true
+    
+      this.getdataListParm5.offset = 1
+      this.get_table_data5()
+    },
+
+
     get_table_data4() {
       this.listLoading4 = true
       if (this.$refs['inputDatetime4'] !== undefined && this.$refs['inputDatetime4'].value !== null) {

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

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

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

@@ -85,7 +85,7 @@
           <el-button v-if="isReceiveDelete && (row.SHStatus == 4 || row.SHStatus == 6 ||row.SHStatus == 8 || row.SHStatus == 10)" style="display:inline-block;width:60px;" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
           <el-button v-if="row.statue === 1 && isReceiveDelete" style="display:none" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
           <!-- 关单 -->
-          <el-button v-if="isReceiveClose && (row.SHStatus == 9 && row.statue < 2)" style="display:inline-block;width:60px;" type="danger" size="mini" @click="handleCustomsDeclaration(row)">关单</el-button>
+          <el-button v-if="isReceiveClose && ( (row.SHStatus == 9 || row.SHStatus == 5 || row.SHStatus == 7 ) && row.statue < 2)" style="display:inline-block;width:60px;" type="danger" size="mini" @click="handleCustomsDeclaration(row)">关单</el-button>
           <el-button v-else style="display:none" type="danger" size="mini" @click="handleCustomsDeclaration(row)">关单</el-button>
         </template>
       </el-table-column>

+ 1786 - 0
src/views/custom/receive/index1.vue

@@ -0,0 +1,1786 @@
+<template>
+  <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.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" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.applyCode" clearable placeholder="领用单号" style="width: 200px;" class="filter-item" />
+      <el-select v-model="getdataListParm.parammaps.applyType" style="width: 120px;" clearable placeholder="领用类型" class="filter-item">
+        <el-option v-for="item in collarType" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.departmentId" style="width: 120px;" clearable placeholder="领用部门" class="filter-item">
+        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.statue" style="width: 120px;" clearable placeholder="审核状态" class="filter-item">
+        <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.bstatue" style="width: 120px;" clearable placeholder="单据状态" class="filter-item">
+        <el-option v-for="item in applystatueList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <div>
+        <el-button v-if="isReceiveAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+        <el-button v-if="isReceiveExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
+        <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+          <el-radio-button label="全部" />
+          <el-badge :value="pending.total" class="item">
+            <el-radio-button label="待处理" />
+          </el-badge>
+          <el-radio-button label="已处理" />
+        </el-radio-group>
+      </div>
+    </div>
+    <el-table
+      :key="tableKey"
+      v-loading="listLoading"
+      element-loading-text="给我一点时间"
+      :data="list"
+      border
+      fit
+      highlight-current-row
+      style="width: 100%;"
+      :row-style="rowStyle"
+      :cell-style="cellStyle"
+      class="elTable"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="领用单号" align="center" min-width="150px" prop="applyCode" />
+      <el-table-column label="领用类型" min-width="90px" align="center" :formatter="applyType" />
+      <el-table-column label="牧场" align="center" min-width="100px" prop="pastureName" />
+      <el-table-column label="领用部门" align="center" min-width="100px" prop="departmentName" />
+      <el-table-column label="领用人" align="center" min-width="100px" prop="empname" />
+      <el-table-column label="领用日期" align="center" min-width="100px" sortable prop="createDate" />
+      <el-table-column label="审核状态" min-width="90px" align="center" :formatter="SHStatus" />
+      <el-table-column label="单据状态" min-width="90px" align="center" :formatter="applystatue" />
+      <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+          <el-button v-if="isReceiveSee" type="primary" size="mini" style="width:60px" @click="form_see(row)">查看</el-button>
+          <el-button v-if="isReceiveUpdate && (row.SHStatus == 4 || row.SHStatus == 6 ||row.SHStatus == 8 || row.SHStatus == 10)" type="success" style="display:inline-block;width:60px;" size="mini" @click="form_edit(row)">编辑</el-button>
+          <el-button v-else type="success" style="display:none;" size="mini" @click="form_edit(row)">编辑</el-button>
+          <!-- 部门审核 -->
+          <el-button v-if="isContractExamineBM && row.SHStatus == 2 && (row.departmentId == getdataListParm.parammaps.logindeptId || depids.filter(function (item) { return item == row.departmentId; }).length != 0)" type="success" style="display:inline-block;width:60px;" size="mini" @click="handleExamine(row)">审核1</el-button>
+          <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine(row)">审核1</el-button>
+
+          <!-- 设备处长审核 -->
+          <el-button v-if="isContractExamineSBCZ && row.SHStatus == 3" type="success" style="display:inline-block;width:60px;" size="mini" @click="handleExamine2(row)">审核2</el-button>
+          <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine2(row)">审核2</el-button>
+
+          <!-- 场长助理审核 -->
+          <el-button v-if="isContractExamineCZZL && row.SHStatus == 5" type="success" style="display:inline-block;width:60px" size="mini" @click="handleExamine3(row)">审核3</el-button>
+          <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine3(row)">审核3</el-button>
+
+          <!-- 场长审核 -->
+          <el-button v-if="isContractExamineCZ && row.SHStatus == 7" type="success" style="display:inline-block;width:60px;" size="mini" @click="handleExamine4(row)">审核4</el-button>
+          <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine4(row)">审核4</el-button>
+          <!-- 删除 -->
+          <el-button v-if="isReceiveDelete && (row.SHStatus == 4 || row.SHStatus == 6 ||row.SHStatus == 8 || row.SHStatus == 10)" style="display:inline-block;width:60px;" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button v-if="row.statue === 1 && isReceiveDelete" style="display:none" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <!-- 关单 -->
+          <el-button v-if="isReceiveClose && (row.SHStatus == 9 && row.statue < 2)" style="display:inline-block;width:60px;" type="danger" size="mini" @click="handleCustomsDeclaration(row)">关单</el-button>
+          <el-button v-else style="display:none" type="danger" size="mini" @click="handleCustomsDeclaration(row)">关单</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    <!-- 新增 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div class="app-add">
+        <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="100px" style="width: 100%;">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="领用单号:" prop="applyCode">
+                <el-input ref="applyCode" v-model="createTemp.applyCode" 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=='update'" @change="changePasture">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用部门:" prop="departmentId">
+                <el-select v-model="createTemp.departmentId" placeholder="领用部门" class="filter-item" style="width: 100%;" :disabled="dialogStatus=='update'" @change="changeDepart">
+                  <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="领用类型:" prop="applyType">
+                <el-radio-group v-model="createTemp.applyType" :disabled="dialogStatus=='update'" @change="changeType">
+                  <el-radio v-model="createTemp.applyType" :label="1">维修</el-radio>
+                  <el-radio v-model="createTemp.applyType" :label="2">保养</el-radio>
+                  <el-radio v-if="dialogStatus !=='create'" v-model="createTemp.applyType" :label="0">非维保</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用人:" prop="empId">
+                <el-select v-model="createTemp.empId" placeholder="领用人" class="filter-item" style="width: 100%;" :disabled="dialogStatus=='update'">
+                  <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用日期:" prop="createDate">
+
+                <el-date-picker v-model="createTemp.createDate" :picker-options="pickerOptions1" type="date" placeholder="领用日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;" :disabled="dialogStatus=='update'" />
+                <!-- <el-date-picker v-model="createTemp.applyDate" :picker-options="pickerOptions1" type="date" placeholder="领用日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;" :disabled="dialogStatus=='update'" /> -->
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="18">
+              <el-form-item label="备件:" prop="partCode">
+                <el-autocomplete v-model="orderPart.partCode" value-key="name" class="inline-input" :fetch-suggestions="sparePartSearch" placeholder="请输入备件编号或备件名称或备件规格" style="width:100%" @select="handleSelectSparePart">
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
+                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
+                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
+                    |  &nbsp;<b>品牌:</b><span class="addr">{{ item.brand }}</span>
+                    |  &nbsp;<b>库存:</b><span class="addr">{{ item.reportery }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable"
+        >
+          <!-- table表格 -->
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="specifications" align="center" min-width="110px">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brand }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column v-if="No1" label="设备名称" prop="eqName" align="center" min-width="250">
+            <template slot-scope="scope">
+              <el-autocomplete
+                v-model="scope.row.eqName"
+                class="inline-input"
+                :fetch-suggestions="querySearchEqName"
+                value-key="eqName"
+                placeholder="设备名称"
+                @select="(value)=>
+                {handleSelectEqName(value, scope.row)}"
+                @blur="(value)=>
+                {blurSelectEqName(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 v-if="No1" label="设备内部编号" prop="eqCode" align="center" min-width="150">
+            <template slot-scope="scope">
+              <el-autocomplete
+                v-model="scope.row.eqCode"
+                class="inline-input"
+                :fetch-suggestions="querySearchCode"
+                value-key="eqCode"
+                placeholder="设备内部编号"
+                @select="(value)=>
+                {handleSelectEqCode(value, scope.row)}"
+                @blur="(value)=>
+                {blurSelectEqCode(value, scope.row)}"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column label="库存数量" prop="reportery" align="center" min-width="80">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="领用数量" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="amount">
+                  <el-input ref="amount" v-model="scope.row.amount" style="margin-top:15px" @blur="(value)=> {blurAmount(value, scope.row)}" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" prop="price" align="center" min-width="70">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="总价" prop="totalPrice" align="center" min-width="70">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price * parseFloat(scope.row.amount) | keepTwoNum }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="note">
+                  <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div slot="footer" class="dialog-footer" style="bottom:10px">
+          <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
+          <el-button @click="dialogFormVisible = false;get_table_data()">取消并关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 查看 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" width="90%">
+      <div class="app-container">
+        <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="100px" style="width: 100%;">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="领用单号:" prop="applyCode">
+                <el-input ref="applyCode" v-model="seeTemp.applyCode" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureName">
+                <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用部门:" prop="departmentName">
+                <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="领用人:" prop="empname">
+                <el-input ref="empname" v-model="seeTemp.empname" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用日期:" prop="createDate">
+                <el-input ref="createDate" v-model="seeTemp.createDate" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用类型:" prop="applyType">
+                <el-input ref="" v-model="seeTemp.applyType" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="seeTemp.applyType=='维修'">
+            <el-col :span="8">
+              <el-form-item label="报修单号:" prop="RUCode">
+                <el-input ref="" v-model="seeTemp.RUCode" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="故障情况:" prop=" detail">
+                <el-input ref="" v-model="seeTemp. detail" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="seeTemp.applyType=='保养'">
+            <el-col :span="8">
+              <el-form-item label="保养单号:" prop="RUCode">
+                <el-input ref="" v-model="seeTemp.RUCode" disabled style="width:100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listSee"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable"
+          @sort-change="tableSort"
+        >
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="120px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" align="center" min-width="120">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" align="center" min-width="110px">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brandName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column v-if="No1" label="设备名称" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.eqName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column v-if="No1" label="设备编号" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.eqCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="库存数量" sortable prop="reportery" align="center" min-width="80">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="领用数量" sortable prop="amount" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.amount }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" sortable prop="price" min-width="70px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="总价" sortable prop="sumPrice" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.sumPrice }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.note }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="已出库数量" sortable prop="useAmount" align="center" min-width="120">
+            <template slot-scope="scope">
+              <span>{{ scope.row.useAmount }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-form
+          ref="seeTemp"
+          :rules="rules"
+          :model="seeTemp"
+          label-position="right"
+          label-width="120px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <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>
+          <el-row>
+            <el-col>
+              <el-form-item label="操作:">
+                <!-- 部门审核 -->
+                <el-button v-if="isContractExamineBM && seeTemp.SHStatus == 2 && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine()">审核1</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine()">审核1</el-button>
+
+                <!-- 设备处长审核 -->
+                <el-button v-if="isContractExamineSBCZ && seeTemp.SHStatus == 3" type="success" style="display:inline-block" @click="handleExamine2()">审核2</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine2()">审核2</el-button>
+
+                <!-- 场长助理审核 -->
+                <el-button v-if="isContractExamineCZZL && seeTemp.SHStatus == 5" type="success" style="display:inline-block" @click="handleExamine3()">审核3</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine3()">审核3</el-button>
+
+                <!-- 场长审核 -->
+                <el-button v-if="isContractExamineCZ && seeTemp.SHStatus == 7" type="success" style="display:inline-block" @click="handleExamine4()">审核4</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine4()">审核4</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:10px">
+        <el-button @click="dialogFormVisible_See = false">关闭</el-button>
+      </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" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
+          <el-row style="width:88%;height:150px;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.statueSH" @change="changeStatue">
+                  <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="isStatueReason" :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="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine4'" type="primary" :disabled="isokDisable" @click="createExamineData4()">确认</el-button>
+        <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// / 引入
+import { GetDataByName, GetDataByNames, PostDataByName, ExecDataByConfig, checkButtons, failproccess, GetAccount } from '@/api/common'
+import waves from '@/directive/waves'
+import { parseTime, json2excel, sortChange } from '@/utils/index.js'
+import { validateEMail } from '@/utils/validate.js'
+import Pagination from '@/components/Pagination'
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+export default {
+  name: 'Receive',
+  components: { Pagination },
+  directives: { waves },
+  filters: {
+    keepTwoNum(value) {
+      value = Number(value)
+      return value.toFixed(2)
+    }
+  },
+  data() {
+    return {
+      findAllPasture: [], findAllDepart: [], findAllEmploye: [], createDepartList: [], edit: 0,
+      requestParams: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }}
+      ],
+      getDepartParam: {
+        name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }
+      },
+      dialogFormVisible: false,
+      dialogStatus: '',
+      isReceiveUpdate: [], isReceiveAdd: [], isReceiveTemplate: [], isReceiveImport: [], isReceiveExport: [], isReceiveSee: [], isReceiveDelete: [],
+      isContractExamineBM: [], isContractExamineSBCZ: [], isContractExamineCZZL: [], isContractExamineCZ: [], isReceiveClose: [],
+      isokDisable: false,
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      rules: {},
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()// 当天之前的时间可选
+        }
+      },
+      textMap: { see: '查看详情', create: '新增', examine: '审核', examine2: '审核', examine3: '审核', update: '编辑' },
+      statues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      applystatueList: [{ id: '0', name: '正常' }, { id: '1', name: '已关闭' }],
+      collarType: [{ id: '0', name: '非维保' }, { id: '1', name: '维修' }, { id: '2', name: '保养' }],
+      radioAll: '全部',
+      getdataListParm: {
+        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        parammaps: { pastureName: Cookies.get('pasturename'), applyCode: this.$route.query.applyCode, applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', loginId: Cookies.get('employeid'), menu: 'Receive', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid') }
+      },
+      tableKey: 0,
+      listLoading: true,
+      total: 0,
+      list: [],
+      dialogFormVisible_See: false,
+      seeTemp: [],
+      listSee: [],
+      totalSee: 0,
+      getdataListSee: {
+        name: 'getpartapplyListBybig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      noMaintenance: true,
+      repair: false,
+      maintain: false,
+      No1: true,
+      createTemp: {
+        applyType: 1,
+        empId: this.$store.state.user.employeid,
+        pastureId: this.$store.state.user.pastureid,
+        createDate: parseTime(new Date(), '{y}-{m}-{d}'),
+        departmentId: this.$store.state.user.departmentid
+      },
+      getParmCreateNumber: {
+        name: 'autoCreatCode', page: 0, offset: 0, pagecount: 0, returntype: 'Map',
+        parammaps: { pastureId: Cookies.get('pastureid'), codeType: 'LY' }
+      },
+      orderPart: {},
+      requestSparePart: {
+        name: 'getPartsListLY', page: 1, offset: 1, pagecount: 20, returntype: 'Map',
+        parammaps: { pastureId: Cookies.get('pastureid') }
+      },
+      listAdd: [],
+      EqNameList: [],
+      requestEqName: {
+        name: 'geteqbyNameCode', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        parammaps: { pastureId: Cookies.get('pastureid') }
+      },
+      EqCodeList: [],
+      postDataPramas: {},
+      activeList: [],
+      active: 3,
+      dialogFormVisible_Examine: false,
+      examineTemp: {},
+      isStatueReason: false,
+      requestParam: {},
+      buttons: [],
+      downloadParam: {},
+      isPercentage: false,
+      percentage: 1,
+      TotalAmount: 0,
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getPartapplyWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {}
+        }
+      },
+      depids: []
+    }
+  },
+
+  watch: {
+ 
+    listAdd: {
+      deep: true,
+      handler: function (item) {
+          
+
+     
+
+          this.listAdd.forEach(function(i){
+
+            if(parseInt(i.amount) > parseFloat(i.reportery)){
+              i.amount = i.reportery
+            }
+            
+          })
+ 
+
+
+          
+
+         
+      }
+    },
+
+
+    
+ 
+  },
+
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+    this.get_select_list()
+    this.get_table_data()
+    this.getPendingList()
+  },
+
+  methods: {
+    tableSort(column) {
+      sortChange(column, this.listSee)
+    },
+    get_auto_buttons() {
+      if (Cookies.get('depids') !== undefined) {
+        this.depids = Cookies.get('depids').split(',')
+      } else {
+        this.depids = []
+      }
+      const ReceiveUpdate = 'customs:basic:update'
+      const isReceiveUpdate = checkButtons(this.$store.state.user.buttons, ReceiveUpdate)
+      this.isReceiveUpdate = isReceiveUpdate
+
+      const ReceiveAdd = 'customs:receive:add'
+      const isReceiveAdd = checkButtons(this.$store.state.user.buttons, ReceiveAdd)
+      this.isReceiveAdd = isReceiveAdd
+
+      const ReceiveTemplate = 'customs:receive:template'
+      const isReceiveTemplate = checkButtons(this.$store.state.user.buttons, ReceiveTemplate)
+      this.isReceiveTemplate = isReceiveTemplate
+
+      const ReceiveImport = 'customs:receive:import'
+      const isReceiveImport = checkButtons(this.$store.state.user.buttons, ReceiveImport)
+      this.isReceiveImport = isReceiveImport
+
+      const ReceiveExport = 'customs:receive:export'
+      const isReceiveExport = checkButtons(this.$store.state.user.buttons, ReceiveExport)
+      this.isReceiveExport = isReceiveExport
+
+      const ReceiveSee = 'customs:receive:see'
+      const isReceiveSee = checkButtons(this.$store.state.user.buttons, ReceiveSee)
+      this.isReceiveSee = isReceiveSee
+
+      const ReceiveDelete = 'customs:receive:delete'
+      const isReceiveDelete = checkButtons(this.$store.state.user.buttons, ReceiveDelete)
+      this.isReceiveDelete = isReceiveDelete
+
+      // 部门审核
+      const ContractExamineBM = 'customs:receive:examineBM'
+      const isContractExamineBM = checkButtons(this.$store.state.user.buttons, ContractExamineBM)
+      this.isContractExamineBM = isContractExamineBM
+
+      // 设备处长审核
+      const ContractExamineSBCZ = 'customs:receive:examineSBCZ'
+      const isContractExamineSBCZ = checkButtons(this.$store.state.user.buttons, ContractExamineSBCZ)
+      this.isContractExamineSBCZ = isContractExamineSBCZ
+
+      // 场长助理审核
+      const ContractExamineCZZL = 'customs:receive:examineCZZL'
+      const isContractExamineCZZL = checkButtons(this.$store.state.user.buttons, ContractExamineCZZL)
+      this.isContractExamineCZZL = isContractExamineCZZL
+
+      // 场长审核
+      const ContractExamineCZ = 'customs:receive:examineCZ'
+      const isContractExamineCZ = checkButtons(this.$store.state.user.buttons, ContractExamineCZ)
+      this.isContractExamineCZ = isContractExamineCZ
+
+      // 关单
+      const ReceiveClose = 'customs:receive:close'
+      const isReceiveClose = checkButtons(this.$store.state.user.buttons, ReceiveClose)
+      this.isReceiveClose = isReceiveClose
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
+      this.pending.getdataListParm.parammaps.applyType = this.getdataListParm.parammaps.applyType
+      this.pending.getdataListParm.parammaps.statue = this.getdataListParm.parammaps.statue
+      this.pending.getdataListParm.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
+      this.pending.getdataListParm.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
+      this.pending.getdataListParm.parammaps.loginId = this.getdataListParm.parammaps.loginId
+      this.pending.getdataListParm.parammaps.menu = this.getdataListParm.parammaps.menu
+      this.pending.getdataListParm.parammaps.logindeptId = this.getdataListParm.parammaps.logindeptId
+      this.pending.getdataListParm.parammaps.loginpastureId = this.getdataListParm.parammaps.loginpastureId
+      this.pending.getdataListParm.parammaps.empId = this.getdataListParm.parammaps.empId
+      this.pending.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
+      this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getBigpartapplyList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: Cookies.get('pasturename'),
+          applyCode: '', applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', menu: 'Receive',
+          loginId: Cookies.get('employeid'),
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getPartapplyWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          applyCode: this.getdataListParm.parammaps.applyCode,
+          applyType: this.getdataListParm.parammaps.applyType,
+          statue: this.getdataListParm.parammaps.statue,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          startTime: this.getdataListParm.parammaps.startTime,
+          stopTime: this.getdataListParm.parammaps.stopTime,
+          loginId: Cookies.get('employeid'),
+          menu: 'Receive',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getPartapplyWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          applyCode: this.getdataListParm.parammaps.applyCode,
+          applyType: this.getdataListParm.parammaps.applyType,
+          statue: this.getdataListParm.parammaps.statue,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          startTime: this.getdataListParm.parammaps.startTime,
+          stopTime: this.getdataListParm.parammaps.stopTime,
+          loginId: Cookies.get('employeid'),
+          menu: 'Receive',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    applyType: function(cellValue) {
+      if (cellValue.applyType === '0') {
+        return '非维保'
+      } else if (cellValue.applyType === '1') {
+        return '维修'
+      } else if (cellValue.applyType === '2') {
+        return '保养'
+      }
+    },
+    SHStatus: function(cellValue) {
+      if (cellValue.SHStatus == '2') {
+        return '审核中'
+      } else if (cellValue.SHStatus == '3') {
+        return '审核中'
+      } else if (cellValue.SHStatus == '4') {
+        return '未通过'
+      } else if (cellValue.SHStatus == '5') {
+        return '审核中'
+      } else if (cellValue.SHStatus == '6') {
+        return '未通过'
+      } else if (cellValue.SHStatus == '7') {
+        return '审核中'
+      } else if (cellValue.SHStatus == '8') {
+        return '未通过'
+      } else if (cellValue.SHStatus == '9') {
+        return '已通过'
+      } else if (cellValue.SHStatus == '10') {
+        return '未通过'
+      }
+    },
+    applystatue: function(cellValue) {
+      if (cellValue.applystatue == '0') {
+        return '正常'
+      } else if (cellValue.applystatue == '1') {
+        return '已关闭'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      this.listLoading = true
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+      this.getPendingList()
+    },
+    changeStatue(val) {
+      console.log(val)
+      if (val == 2) {
+        this.isStatueReason = true
+      } else {
+        this.isStatueReason = false
+      }
+    },
+    form_see(row) {
+      this.TotalAmount = 0
+      this.seeTemp = Object.assign({}, row)
+      if (row.applyType === '0') {
+        this.seeTemp.applyType = '非维保'
+        this.No1 = false
+      } else if (row.applyType === '1') {
+        this.seeTemp.applyType = '维修'
+        this.No1 = true
+      } else {
+        this.seeTemp.applyType = '保养'
+        this.No1 = true
+      }
+      this.dialogStatus = 'see'
+      this.dialogFormVisible_See = true
+      this.getdataListSee.parammaps.id = row.id
+      this.getSeeList()
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      if (this.seeTemp.sumPrices <= 500) {
+        if (this.seeTemp.SHStatus === 2) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }]
+          this.active = 1
+        } else if (this.seeTemp.SHStatus === 3) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 4) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 9) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }]
+          this.active = 3
+        } else if (this.seeTemp.SHStatus === 6) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }]
+          this.active = 3
+        }
+      }
+      if (this.seeTemp.sumPrices > 500 && this.seeTemp.sumPrices <= 3000) {
+        if (this.seeTemp.SHStatus === 2) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核' }, { title: '设备处长审核' }]
+          this.active = 1
+        } else if (this.seeTemp.SHStatus === 3) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核' }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 4) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason }, { title: '设备处长审核' }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 9) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
+          this.active = 3
+        } else if (this.seeTemp.SHStatus === 6) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
+          this.active = 3
+        }
+      }
+      if (this.seeTemp.sumPrices > 3000 && this.seeTemp.sumPrices <= 10000) {
+        if (this.seeTemp.SHStatus === 2) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核' }, { title: '设备处长审核' }, { title: '设备助理审核' }]
+          this.active = 1
+        } else if (this.seeTemp.SHStatus === 3) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核' }, { title: '设备助理审核' }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 4) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason }, { title: '设备处长审核' }, { title: '设备助理审核' }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 5) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核' }]
+          this.active = 3
+        } else if (this.seeTemp.SHStatus === 6) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '设备助理审核' }]
+          this.active = 3
+        } else if (this.seeTemp.SHStatus === 9) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+          this.active = 4
+        } else if (this.seeTemp.SHStatus === 8) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+          this.active = 4
+        }
+      }
+      if (this.seeTemp.sumPrices > 10000) {
+        if (this.seeTemp.SHStatus === 2) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核' }, { title: '设备处长审核' }, { title: '设备助理审核' }, { title: '场长审核' }]
+          this.active = 1
+        } else if (this.seeTemp.SHStatus === 3) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核' }, { title: '设备助理审核' }, { title: '场长审核' }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 4) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason }, { title: '设备处长审核' }, { title: '设备助理审核' }, { title: '场长审核' }]
+          this.active = 2
+        } else if (this.seeTemp.SHStatus === 5) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核' }, { title: '场长审核' }]
+          this.active = 3
+        } else if (this.seeTemp.SHStatus === 6) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '设备助理审核' }, { title: '场长审核' }]
+          this.active = 3
+        } else if (this.seeTemp.SHStatus === 7) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }, { title: '场长审核' }]
+          this.active = 4
+        } else if (this.seeTemp.SHStatus === 8) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }, { title: '场长审核' }]
+          this.active = 4
+        } else if (this.seeTemp.SHStatus === 9) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }, { title: '场长审核', date: this.seeTemp.CZChargeDate, name: this.seeTemp.CZChargePerson }]
+          this.active = 5
+        } else if (this.seeTemp.SHStatus === 10) {
+          this.activeList = [{ title: '领用申请', date: this.seeTemp.createDate, name: this.seeTemp.empname }, { title: '部门审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备处长审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '设备助理审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }, { title: '场长审核', date: this.seeTemp.CZChargeDate, name: this.seeTemp.CZChargePerson, status: 'error', reason: reason }]
+          this.active = 5
+        }
+      }
+    },
+    getSeeList() {
+      GetDataByName(this.getdataListSee).then(response => {
+        console.log('查看下方table数据', response.data.list)
+        this.listSee = response.data.list
+        this.listAdd = response.data.list
+        if (response.data.list !== null) {
+          for (let i = 0; i < this.listAdd.length; i++) {
+            console.log(response.data.list[i].sumPrice)
+            this.TotalAmount += parseFloat(response.data.list[i].sumPrice)
+            this.listAdd[i].brand = this.listAdd[i].brandName
+          }
+          this.TotalAmount = this.TotalAmount.toFixed(2)
+        }
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              this.listSee[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              this.listSee[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+            } else {
+              this.listSee[i].srcpath = ''
+              this.listSee[i].picpath = ''
+            }
+          }
+        }
+        setTimeout(() => {
+          this.listLoadingSee = false
+        }, 100)
+      })
+    },
+    resetCreateTemp() {
+      this.createTemp.applyType = 1
+      this.No1 = true
+      this.createTemp.useType = 1
+      this.createTemp.empId = parseInt(Cookies.get('employeid'))
+      this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
+      this.createTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
+      this.createTemp.receiveTime = parseTime(new Date(), '{y}-{m}-{d}')
+      this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
+      this.createTemp.applyCode = ''
+      this.listAdd = []
+    },
+    form_add() {
+      this.resetCreateTemp()
+      this.edit = 1
+      this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
+      this.getCreateDepartDownList()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.createTemp.pastureId = this.$store.state.user.pastureid
+      this.createTemp.employeId = this.$store.state.user.employeid
+      console.log(this.createTemp)
+      this.TotalAmount = 0
+      this.$nextTick(() => {
+        this.$refs['createTemp'].clearValidate()
+      })
+      this.getCreateNumber()
+    },
+    getCreateNumber() {
+      GetDataByName(this.getParmCreateNumber).then(response => {
+        this.$nextTick(() => {
+          console.log('新增领用单号', response.data.list[0].orderCode)
+          this.createTemp.applyCode = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      this.requestSparePart.parammaps.pastureId = this.createTemp.pastureId
+      this.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.requestSparePart).then(response => {
+        console.log('备件模糊查询搜索data', response.data.list)
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      if (this.listAdd.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此备件已存在,请重新选择备件'
+          })
+        } else {
+          if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+            this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+            this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+          } else {
+            item.srcpath = ''
+            item.picpath = ''
+          }
+          this.listAdd.push(item)
+        }
+      } else {
+        if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+          this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+          this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+        } else {
+          item.srcpath = ''
+          item.picpath = ''
+        }
+        this.listAdd.push(item)
+      }
+      // this.getEqNameList()
+    },
+    querySearchEqName(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)
+      })
+    },
+    handleSelectEqName(item, row) {
+      console.log('备件名称/设备内部编号模糊查询选中值', item.eqName)
+      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
+      this.$set(row, 'eqCode', item.eqCode)
+      this.$forceUpdate()
+    },
+    querySearchCode(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)
+      })
+    },
+    handleSelectEqCode(item, row) {
+      console.log('备件名称/设备内部编号模糊查询选中值', item)
+      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
+      this.$set(row, 'eqName', item.eqName)
+      this.$forceUpdate()
+    },
+    blurSelectEqName(item, row) {
+      this.$set(row, 'eqName', '')
+      this.$set(row, 'eqCode', '')
+    },
+    blurSelectEqCode(item, row) {
+      this.$set(row, 'eqName', '')
+      this.$set(row, 'eqCode', '')
+    },
+    changeType(val) {
+      if (val === 1 || val === 2) {
+        this.No1 = true
+      } else {
+        this.No1 = false
+      }
+    },
+    blurAmount(value, row) {
+      console.log(value, row)
+      this.TotalAmount = 0
+      this.$set(row, 'sumPrice', (parseFloat(row.price) * parseFloat(row.amount)).toFixed(2))
+
+      console.log(this.listAdd)
+      for (let i = 0; i < this.listAdd.length; i++) {
+        this.TotalAmount += parseFloat(this.listAdd[i].sumPrice)
+      }
+      this.TotalAmount = this.TotalAmount.toFixed(2)
+    },
+    add_dialog_save() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp'].validate(valid => {
+        if (valid) {
+          console.log(this.listAdd)
+          if (this.createTemp.applyCode == '' || this.createTemp.applyCode == null || this.createTemp.applyCode == undefined) {
+            GetDataByName(this.getParmCreateNumber).then(response => {
+              this.$nextTick(() => {
+                console.log('新增领用单号', response.data.list[0].orderCode)
+                this.createTemp.applyCode = response.data.list[0].orderCode
+                this.$forceUpdate()
+                this.add_dialog_saveSave()
+              })
+            })
+          } else {
+            this.add_dialog_saveSave()
+          }
+        }
+      })
+    },
+    add_dialog_saveSave() {
+      if (this.listAdd.length !== 0) {
+        var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+        if (this.createTemp.applyType === 0) {
+          for (var j = 0; j < this.listAdd.length; j++) {
+            // 设备名称eqName设备编号eqCode领用数量amount
+            if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
+              this.$message({
+                title: '',
+                message: '请检查领用数量是否未填写',
+                type: 'error',
+                duration: 2000
+              })
+              return false
+            } else {
+              if (!rulesAmount.test(this.listAdd[j].amount)) {
+                this.$message({ type: 'error', message: '请输入正数,最多保留两位小数点', duration: 2000 })
+                return false
+              } else if (parseFloat(this.listAdd[j].amount) > parseFloat(this.listAdd[j].reportery)) {
+                this.$message({ type: 'error', message: '领用数量不可大于库存数量', duration: 2000 })
+                return false
+              }
+            }
+          }
+        } else {
+          for (var j = 0; j < this.listAdd.length; j++) {
+            if (this.listAdd[j].eqName == null || this.listAdd[j].eqCode == null || this.listAdd[j].amount == null || this.listAdd[j].eqName === '' || this.listAdd[j].eqCode === '' || this.listAdd[j].amount === '') {
+              this.$message({ title: '', message: '请检查备件名称或设备内部编号或领用数量是否未填写', type: 'error', duration: 2000 })
+              return false
+            } else {
+              if (!rulesAmount.test(this.listAdd[j].amount)) {
+                this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数点', duration: 2000 })
+                return false
+              } else if (parseFloat(this.listAdd[j].amount) > parseFloat(this.listAdd[j].reportery)) {
+                this.$message({ type: 'error', message: '领用数量不可大于库存数量', duration: 2000 })
+                return false
+              }
+            }
+          }
+        }
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        let mySumPrice = 0
+        for (let i = 0; i < this.listAdd.length; i++) {
+          mySumPrice += parseFloat(this.listAdd[i].price) * parseFloat(this.listAdd[i].amount)
+        }
+        if (mySumPrice > 500) {
+          this.createTemp.SHStatus = 2
+        } else {
+          this.createTemp.SHStatus = 9
+        }
+        this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
+          pastureId: this.createTemp.pastureId,
+          applyCode: this.createTemp.applyCode,
+          applyType: this.createTemp.applyType,
+          departmentId: this.createTemp.departmentId,
+          empId: this.createTemp.empId,
+          applyDate: this.createTemp.createDate,
+          SHStatus: this.createTemp.SHStatus
+        }}
+        // eslint-disable-next-line no-irregular-whitespace
+        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+        this.postDataPramas.data[1].children = []
+        this.postDataPramas.data[1].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
+          bigId: '@insertBigpartapply.LastInsertId',
+          pastureId: '@insertSpotList.pastureId',
+          partId: '@insertSpotList.partId',
+          partCode: '@insertSpotList.partCode',
+          partName: '@insertSpotList.partName',
+          specification: '@insertSpotList.specification',
+          brandId: '@insertSpotList.brandId',
+          price: '@insertSpotList.price',
+          amount: '@insertSpotList.amount',
+          eqName: '@insertSpotList.eqName',
+          eqCode: '@insertSpotList.eqCode',
+          providerId: '@insertSpotList.providerId',
+          note: '@insertSpotList.note',
+          reportery: '@insertSpotList.reportery',
+          contractId: '@insertSpotList.contractId',
+          locationId: '@insertSpotList.locationId'
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg === 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.dialogFormVisible = false
+            this.getdataListParm.parammaps.inputDatetime = ''
+            this.get_table_data()
+            this.getPendingList()
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+        return true
+      } else {
+        this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+        return false
+      }
+    },
+    // 新增删除
+    partDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+        this.getDepartDownList()
+      })
+    },
+    getDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.findAllDepart = response.data.list
+      })
+    },
+    changePastureName(item) {
+      this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+      this.getdataListParm.parammaps.departmentId = ''
+      this.getDepartDownList()
+    },
+    getCreateDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.createDepartList = response.data.list
+        if (this.edit == 1) {
+          if (this.createDepartList.find(obj => obj.id == Cookies.get('departmentid'))) {
+            this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
+            this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == Cookies.get('departmentid')).name
+          } else {
+            this.createTemp.departmentId = response.data.list[0].id
+            this.createTemp.departmentName = response.data.list[0].name
+          }
+        }
+      })
+    },
+    changePasture(item) {
+      this.getDepartParam.parammaps.pastureId = item
+      this.edit = 1
+      this.getCreateDepartDownList()
+    },
+    changeDepart(item) {
+      this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
+    },
+    form_delete(row) {
+      console.log('点击了删除')
+      MessageBox.confirm('确认删除此条信息?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'deleteBigpartapply', 'type': 'e', 'parammaps': {
+          id: row.id
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deletepartapply', 'type': 'e', 'parammaps': {
+          bigId: row.id
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          this.get_table_data()
+          this.getPendingList()
+          this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+    handleDownload() {
+      this.$alert('备件领用正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      this.downloadParam.name = 'downloadpartapply'
+      this.downloadParam.parammaps = this.getdataListParm.parammaps
+      GetAccount(this.downloadParam).then(response => {
+        if (response.data.list !== null) {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.$set(response.data.list[i], 'price', parseFloat(response.data.list[i].price))
+            this.$set(response.data.list[i], 'sumPrice', parseFloat(response.data.list[i].sumPrice))
+            this.$set(response.data.list[i], 'amount', parseFloat(response.data.list[i].amount))
+          }
+        }
+        this.$nextTick(() => {
+          const ExcelDatas = [
+            {
+              tHeader: ['牧场名称', '领用单编号', '领用申请日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '领用数量', '单价', '总价', '设备名称', '牧场设备编号', '领用类型(0非维保,1维修,2保养)', '领用部门', '领用人'],
+              filterVal: ['pastureName', 'applyCode', 'createDate', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'amount', 'price', 'sumPrice', 'eqName', 'eqCode', 'applyType', 'departmentName', 'empname'],
+              tableDatas: response.data.list,
+              sheetName: '备件领用'
+            }
+          ]
+          json2excel(ExcelDatas, '备件领用', true, 'xlsx')
+        })
+      })
+    },
+
+    handleExamine(row) {
+      console.log('点击了部门审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statueSH', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statueSH', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData() {
+      console.log('点击了部门审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'partapplyCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statueSH === 1) {
+            this.requestParam.parammaps.statue = 3
+          } else {
+            this.requestParam.parammaps.statue = 4
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('部门审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.getPendingList()
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleExamine2(row) {
+      console.log('点击了设备处长审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statueSH', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statueSH', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine2'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData2() {
+      console.log('点击了设备处长审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'partapplyCharge3'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statueSH === 1) {
+            if (parseFloat(this.examineTemp.sumPrices) <= 3000) {
+              this.requestParam.parammaps.statue = 9
+            } else {
+              this.requestParam.parammaps.statue = 5
+            }
+          } else {
+            this.requestParam.parammaps.statue = 6
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('设备处长审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.getPendingList()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleExamine3(row) {
+      console.log('点击了场长助理审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statueSH', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statueSH', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine3'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData3() {
+      console.log('点击了场长助理审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'partapplyCharge1'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statueSH === 1) {
+            if (parseFloat(this.examineTemp.sumPrices) <= 10000) {
+              this.requestParam.parammaps.statue = 9
+            } else {
+              this.requestParam.parammaps.statue = 7
+            }
+          } else {
+            this.requestParam.parammaps.statue = 8
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('场长助理审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.getPendingList()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleExamine4(row) {
+      console.log('点击了场长审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statueSH', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statueSH', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine4'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData4() {
+      console.log('点击了场长审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'partapplyCharge2'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statueSH === 1) {
+            this.requestParam.parammaps.statue = 9
+          } else {
+            this.requestParam.parammaps.statue = 10
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('场长审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.getPendingList()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+
+    form_edit(row) {
+      console.log('点击了编辑')
+      this.edit = 0
+      this.getDepartParam.parammaps.pastureId = row.pastureId
+      this.getCreateDepartDownList()
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      console.log(row)
+      row.applyType = parseInt(row.applyType)
+      this.createTemp = Object.assign({}, row)
+      this.listAdd = []
+      if (row.applyType == 0) { this.No1 = false }
+      if (row.applyType == 1 || row.applyType == 2) { this.No1 = true }
+      this.TotalAmount = 0
+      this.getdataListSee.parammaps.id = row.id
+      this.getSeeList()
+    },
+    edit_dialog_save() {
+      console.log('点击了编辑')
+      if (this.listAdd.length !== 0) {
+        var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+        for (var j = 0; j < this.listAdd.length; j++) {
+          // 设备名称eqName设备编号eqCode领用数量amount
+          if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
+            this.$message({ title: '', message: '请检查领用数量是否未填写', type: 'error', duration: 2000 })
+            return false
+          } else {
+            if (!rulesAmount.test(this.listAdd[j].amount)) {
+              this.$message({ type: 'error', message: '请输入正数,最多保留两位小数点', duration: 2000 })
+              return false
+            } else if (parseFloat(this.listAdd[j].amount) > parseFloat(this.listAdd[j].reportery)) {
+              this.$message({ type: 'error', message: '领用数量不可大于库存数量', duration: 2000 })
+              return false
+            }
+          }
+        }
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        let mySumPrice = 0
+        for (let i = 0; i < this.listAdd.length; i++) {
+          mySumPrice += parseFloat(this.listAdd[i].price) * parseFloat(this.listAdd[i].amount)
+        }
+        if (mySumPrice > 500) {
+          this.createTemp.SHStatus = 2
+        } else {
+          this.createTemp.SHStatus = 9
+        }
+
+        this.postDataPramas.data[0] = { 'name': 'updatepartapplyCharge', 'type': 'e', 'parammaps': {
+          id: this.createTemp.id,
+          SHStatus: this.createTemp.SHStatus
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deletePartapply', 'type': 'e', 'parammaps': {
+          bigId: this.createTemp.id
+        }}
+        // eslint-disable-next-line no-irregular-whitespace
+        this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+        this.postDataPramas.data[2].children = []
+        this.postDataPramas.data[2].children[0] = { 'name': 'insertPartapply', 'type': 'e', 'parammaps': {
+          bigId: this.createTemp.id,
+          pastureId: '@insertSpotList.pastureId',
+          partId: '@insertSpotList.partId',
+          partCode: '@insertSpotList.partCode',
+          partName: '@insertSpotList.partName',
+          specification: '@insertSpotList.specification',
+          brandId: '@insertSpotList.brandId',
+          price: '@insertSpotList.price',
+          amount: '@insertSpotList.amount',
+          eqName: '@insertSpotList.eqName',
+          eqCode: '@insertSpotList.eqCode',
+          providerId: '@insertSpotList.providerId',
+          note: '@insertSpotList.note',
+          reportery: '@insertSpotList.reportery',
+          contractId: '@insertSpotList.contractId',
+          locationId: '@insertSpotList.locationId'
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg === 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.dialogFormVisible = false
+            this.getdataListParm.parammaps.inputDatetime = ''
+            this.get_table_data()
+            this.getPendingList()
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+        return true
+      } else {
+        this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+        return false
+      }
+    },
+
+    // 关单
+    handleCustomsDeclaration(row) {
+      MessageBox.confirm('是否确认关单?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'updateBigPartApplystatueV2', 'type': 'e', 'parammaps': { id: row.id }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          if (response.msg === 'fail') {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.getPendingList()
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.get_table_data()
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消' })
+      })
+    }
+
+  }
+}
+
+</script>
+<style lang="scss">
+  .inputDatetime .el-range-separator{
+   padding: 0;
+   margin: 0 10px;
+  }
+  .el-radio__label{
+    padding-left: 2px !important;
+  }
+</style>
+<style lang="scss" scoped>
+  .el-table  {
+    text-align: left !important;
+  }
+  h5{
+    text-align:left;font-size: 14px;line-height:23px;margin:0;padding:0;
+  }
+  .pagination-container{
+    display: block !important;
+  }
+  .el-date-editor--daterange{
+    width: 250px;
+    top:-3px;
+  }
+  .el-radio{
+    margin-right: 5px;
+  }
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>

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

@@ -66,11 +66,11 @@
             </template>
           </el-table-column>
           <el-table-column label="退库日期" sortable prop="quitDate" min-width="80px" align="center" />
-          <el-table-column label="EAS同步状态" min-width="120px" align="center">
+          <!-- <el-table-column label="EAS同步状态" min-width="120px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.easStatus }}</span>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column  prop="ProofCode" label="sap编码" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span>{{scope.row.ProofCode}}</span>

+ 153 - 7
src/views/custom/returngoods/index.vue

@@ -72,11 +72,11 @@
           </el-table-column>
           <el-table-column label="退货日期" sortable prop="createTime1" min-width="80px" align="center" />
           <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
-          <el-table-column label="EAS同步状态" min-width="120px" align="center">
+          <!-- <el-table-column label="EAS同步状态" min-width="120px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.easStatus }}</span>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column  prop="ProofCode" label="sap编码" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span>{{scope.row.ProofCode}}</span>
@@ -275,7 +275,24 @@
             </el-col>
           </el-row>
           <el-row>
-            <el-col :span="15">
+
+            <el-col :span="8">
+              <el-form-item label="退货方式:" prop="laidType">
+                <el-radio-group v-model="createTemp.laidType" @change="changeStorageType">
+                  <el-radio   v-model="createTemp.laidType" :label="0"  >寄售退货</el-radio>
+                  <el-radio   v-model="createTemp.laidType" :label="1"  >自购件退货</el-radio>
+             
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            
+
+          </el-row>
+
+
+
+          <el-row  v-if="No1">
+            <el-col :span="15" >
               <el-form-item label="备件:" prop="partCode">
                 <el-autocomplete
                   v-model="createTemp.partCode"
@@ -298,6 +315,18 @@
               <el-button class="filter-item" type="primary" @click="handleBatchOperation">批量添加</el-button>
             </el-col>
           </el-row>
+          <el-row v-if="No2">
+            <el-col :span="15" >
+              <el-form-item label="采购单号:" prop="buyeCode">
+                <el-autocomplete ref="buyeCode" v-model="createTemp.buyeCode" value-key="name" class="inline-input" :fetch-suggestions="buyeCodeSearch" placeholder="请输入采购单号" style="width:550px" @select="handleSelectBuyeCode">
+                  <template slot-scope="{ item }">
+                    <span>{{ item.buyeCode }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+
+          </el-row>
         </el-form>
         <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
         <el-table
@@ -355,12 +384,15 @@
           </el-table-column>
           <el-table-column label="退货数量" min-width="120px" align="center" valign="middle">
             <template slot-scope="scope">
-              <el-form :model="scope.row" :rules="rules">
+              <el-form :model="scope.row" :rules="rules" v-show="No1">
                 <el-form-item prop="refundNumber">
-                  <el-input v-model="scope.row.refundNumber" style="margin-top:15px" @blur="blurRefundNumber" />
+                  <el-input v-model="scope.row.refundNumber" style="margin-top:15px" @blur="blurRefundNumber"  />
                 </el-form-item>
               </el-form>
+              <span v-show="No2">{{ scope.row.refundNumber }}</span>
             </template>
+
+ 
           </el-table-column>
           <el-table-column label="单价" min-width="110px" align="center" valign="middle">
             <template slot-scope="scope">
@@ -663,7 +695,7 @@ export default {
       },
       rules: {
         // useForm: [{ required: true, message: '必填', trigger: 'blur' }],
-        providerId: [{ required: true, message: '必填', trigger: 'blur' }]
+         //  providerId: [{ required: true, message: '必填', trigger: 'blur' }]
       },
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
@@ -736,6 +768,8 @@ export default {
         providerId: '',
         useForm: '',
         note: '',
+        laidType: 0,
+        buyeCode: '',
         pastureId: this.$store.state.user.pastureid,
         employeId: this.$store.state.user.employeid,
         createTime: parseTime(new Date(), '{y}-{m}-{d}')
@@ -820,7 +854,29 @@ export default {
           name: 'getBigPartrefundWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
           parammaps: {pastureId: Cookies.get('pastureid')}
         }
-      }
+      },
+
+
+      orderCode: {},
+      requestBuyeCode: {
+        name: 'getbigrefunddetailCode',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      getBuyDetailListParm: {
+        name: 'getrefunddetailListbyBig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      No1: true,
+      No2: false,
+
+
     }
   },
 
@@ -860,6 +916,95 @@ export default {
   },
 
   methods: {
+
+    changeStorageType(val) {
+      console.log('入库方式', val)
+ 
+      if (val === 0) { // No1寄售备件 No2 采购
+        this.No2 = false
+        this.No1 = true
+  
+      } else if (val === 1) {
+        this.No2 = true
+        this.No1 = false
+    
+      }  
+
+      this.listAdd = []
+    },
+    buyeCodeSearch(queryString, cb) {
+      console.log('采购单号模糊查询输入值', queryString)
+      console.log(this.$refs['providerId'])
+      if (this.createTemp.providerId !== '') {
+        this.requestBuyeCode.parammaps['buyeCode'] = queryString
+        this.requestBuyeCode.parammaps['providerId'] = this.createTemp.providerId
+        GetDataByName(this.requestBuyeCode).then(response => {
+          console.log('采购单号模糊查询搜索data', response.data.list)
+          if (response.data.list === null) {
+            this.buyeCodeList = []
+          } else {
+            this.buyeCodeList = response.data.list
+          }
+          cb(response.data.list)
+        })
+      } else {
+
+        this.requestBuyeCode.parammaps['buyeCode'] = queryString
+        this.requestBuyeCode.parammaps['providerId'] = ""
+        GetDataByName(this.requestBuyeCode).then(response => {
+          console.log('采购单号模糊查询搜索data', response.data.list)
+          if (response.data.list === null) {
+            this.buyeCodeList = []
+          } else {
+            this.buyeCodeList = response.data.list
+          }
+          cb(response.data.list)
+        })
+        // this.$notify({
+        //   title: '',
+        //   message: '请选择供应商',
+        //   type: 'warning',
+        //   duration: 2000
+        // })
+      }
+    },
+    handleSelectBuyeCode(item) {
+      console.log('采购单号模糊查询选中值', item)
+      this.TotalAmount = 0
+      // this.listAdd.push(item)
+      this.createTemp.orderCode = item.buyeCode
+      this.createTemp.orderCodeId = item.id
+      this.getBuyDetailListParm.parammaps.id = item.id
+      this.getBuyDetailListParm.parammaps.pastureId = Cookies.get('pastureid')
+      this.getBuyDetailList()
+    },
+
+    getBuyDetailList() {
+      GetDataByName(this.getBuyDetailListParm).then(response => {
+        console.log('采购入库table-data', response.data.list)
+        this.listAdd = response.data.list
+        // this.listAdd.forEach(function(val) {
+        //   val.warehoseCode = ''
+        // })
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.$set(this.listAdd[i], 'warehoseCode', response.data.list[i].warehoseCode)
+            this.$set(this.listAdd[i], 'locationId', response.data.list[i].warehoseCodeId)
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              this.listAdd[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              this.listAdd[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+            } else {
+              this.listAdd[i].srcpath = ''
+              this.listAdd[i].picpath = ''
+            }
+          }
+        }
+        this.$forceUpdate()
+      })
+      this.$forceUpdate()
+    },
+
+
     tableSort(column) {
       if (this.activeName == 'first') {
         sortChange(column, this.listSee)
@@ -1371,6 +1516,7 @@ export default {
         this.postDataPramas.data[0] = { 'name': 'insertBigPartrefund', 'type': 'e', 'parammaps': {
           pastureId: this.createTemp.pastureId,
           providerId: this.createTemp.providerId,
+          buyeCode: this.createTemp.orderCode,
           useForm: this.createTemp.useForm,
           employeId: this.createTemp.employeId,
           createTime: this.createTemp.createTime,

+ 1938 - 0
src/views/custom/returngoods/index1.vue

@@ -0,0 +1,1938 @@
+<template>
+  <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="备件退货" name="first">
+        <div 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" />
+          </el-select>
+          <el-input v-model="getdataListParm.parammaps.orderNumber" placeholder="退货单号" style="width: 200px;" class="filter-item" />
+
+          <el-select v-model="getdataListParm.parammaps.statue" clearable style="width: 140px;" placeholder="审核状态" class="filter-item">
+            <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-select v-model="getdataListParm.parammaps.easStatus" style="width: 150px;" clearable placeholder="EAS同步状态" class="filter-item">
+            <el-option v-for="item in easStatus.easStatusList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+          <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+          <div>
+            <el-button v-if="isReturngoodsAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+            <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+              <el-radio-button label="全部" />
+              <el-badge :value="pending.total" class="item">
+                <el-radio-button label="待处理" />
+              </el-badge>
+              <el-radio-button label="已处理" />
+            </el-radio-group>
+            <el-button v-if="isEasSynchronization" class="filter-item" type="primary" style="float: right;" @click="handleEAS">EAS同步</el-button>
+            <el-button v-if="isRetrunsap"  class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
+          </div>
+        </div>
+
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="list"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+          @selection-change="change_table_selection"
+          @current-change="handleCurrentChange"
+        >
+        <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>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货单号" min-width="150px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.useForm }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="牧场" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.pastureName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入人" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.empname }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货日期" sortable prop="createTime1" min-width="80px" align="center" />
+          <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
+          <!-- <el-table-column label="EAS同步状态" min-width="120px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.easStatus }}</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 label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <el-button v-if="isReturngoodsSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+              <el-button v-if="isReturngoodsUpdate && (row.statue == 4 || row.statue == 6)" type="success" style="display:inline-block" size="mini" @click="form_edit(row)">编辑</el-button>
+              <el-button v-else type="success" style="display:none" size="mini" @click="form_edit(row)">编辑</el-button>
+
+              <!-- 主管审核 -->
+              <el-button v-if="isReturngoodsExamineZG && row.statue == 2" type="success" style="display:inline-block" size="mini" @click="handleExamine(row)">审核1</el-button>
+              <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine(row)">审核1</el-button>
+              <!-- 采购审核 -->
+              <el-button v-if="isReturngoodsExamineCG && row.statue == 3" type="success" style="display:inline-block" size="mini" @click="handleExamine2(row)">审核2</el-button>
+              <el-button v-else type="success" style="display:none" size="mini" @click="handleExamine2(row)">审核2</el-button>
+              <el-button v-if="isReturngoodsDelete && (row.statue == 4 || row.statue == 6)" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+              <el-button v-else type="danger" style="display:none" size="mini" @click="form_delete(row)">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset":limit.sync="getdataListParm.pagecount"@pagination="get_table_data" />
+      </el-tab-pane>
+      <el-tab-pane label="退货记录" name="second">
+        <div class="filter-container">
+          <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+            <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+          </el-select>
+          <el-input v-model="getdataListParm2.parammaps.useForm" placeholder="退货单号" style="width: 200px;" class="filter-item" />
+          <el-input v-model="getdataListParm2.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
+          <el-input v-model="getdataListParm2.parammaps.partName" placeholder="备件名称" style="width: 200px;" class="filter-item" />
+          <el-select v-model="getdataListParm2.parammaps.providerId" style="width: 140px;" filterable clearable placeholder="供应商" class="filter-item">
+            <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-date-picker ref="inputDatetime2" v-model="getdataListParm2.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+          <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search2">搜索</el-button>
+          <div>
+            <el-button v-if="isReturngoodsExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
+          </div>
+        </div>
+        <el-table
+          :key="tableKey2"
+          v-loading="listLoading2"
+          element-loading-text="给我一点时间"
+          :data="list2"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+          @sort-change="tableSort"
+        >
+          <el-table-column label="序号" align="center" type="index" width="50px">
+            <template slot-scope="scope">
+              <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="牧场" min-width="130px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.pastureName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货单号" align="center" min-width="150px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.useForm }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件编号" min-width="150px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" align="center" min-width="150px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" min-width="130px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" min-width="130px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brand }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" align="center" min-width="100px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="供应商" min-width="130px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.providerName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="期初库存" sortable prop="reportery" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货数量" sortable prop="refundNumber" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.refundNumber }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" sortable prop="price" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="总价" sortable prop="sumPrice" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.sumPrice }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货原因" align="center" min-width="90px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.note }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入人" align="center" min-width="90px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.empname }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货日期" min-width="120px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.createTime1 }}</span><br>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination v-show="total2>0" :total="total2" :page.sync="getdataListParm2.offset" :limit.sync="getdataListParm2.pagecount" @pagination="get_table_data2" />
+      </el-tab-pane>
+    </el-tabs>
+    <!-- 弹出层新增or修改 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div class="app-container">
+        <el-form
+          ref="createTemp"
+          :rules="rules"
+          :model="createTemp"
+          label-position="right"
+          label-width="100px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="退货单号:" prop="useForm">
+                <el-input ref="useForm" v-model="createTemp.useForm" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="供应商:" prop="providerId">
+                <el-select v-model="createTemp.providerId" :disabled="dialogStatus=='update'" filterable placeholder="供应商" style="width:100%" @change="changeProvider">
+                  <el-option v-for="item in findAllProvider" :key="item.id" clearable :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureId">
+                <el-select v-model="createTemp.pastureId" :disabled="dialogStatus=='update'" placeholder="牧场" class="filter-item" style="width:100%">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="录入人:" prop="employeId">
+                <el-select v-model="createTemp.employeId" placeholder="录入人" class="filter-item" style="width:100%" :disabled="dialogStatus=='update'">
+                  <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="退货日期:" prop="createTime">
+                <el-date-picker v-model="createTemp.createTime" :disabled="dialogStatus=='update'" :picker-options="pickerOptions" type="date" placeholder="退货日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="退货原因:" prop="note">
+                <el-input ref="note" v-model="createTemp.note" placeholder="退货原因" :disabled="dialogStatus=='update'" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="15">
+              <el-form-item label="备件:" prop="partCode">
+                <el-autocomplete
+                  v-model="createTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="sparePartSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格"
+                  style="width:100%"
+                  @select="handleSelectSparePart"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
+                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
+                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="isBatchOperation" :span="3" style="margin-left:20px;">
+              <el-button class="filter-item" type="primary" @click="handleBatchOperation">批量添加</el-button>
+            </el-col>
+          </el-row>
+        </el-form>
+        <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+        >
+          <!-- table表格 -->
+          <el-table-column label="序号" align="center" type="index" width="50px" />
+          <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brand }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="库存数" prop="reportery" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货数量" min-width="120px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="refundNumber">
+                  <el-input v-model="scope.row.refundNumber" style="margin-top:15px" @blur="blurRefundNumber" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="总价" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price * parseFloat(scope.row.refundNumber) | keepTwoNum }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div slot="footer" class="dialog-footer" style="bottom:10px">
+          <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
+          <el-button @click="dialogFormVisible = false;get_table_data()">取消并关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 查看 -->
+    <el-dialog :title="textMap[dialogStatusSee]" :visible.sync="dialogFormVisibleSee" :close-on-click-modal="false" width="90%">
+      <div class="app-containerSee">
+        <el-form
+          ref="seeTemp"
+          :rules="rules"
+          :model="seeTemp"
+          label-position="right"
+          label-width="100px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="退货单号:" prop="useForm">
+                <el-input ref="useForm" v-model="seeTemp.useForm" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="供应商" prop="providerName">
+                <el-input ref="providerName" v-model="seeTemp.providerName" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureName">
+                <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="录入人:" prop="empname">
+                <el-input ref="empname" v-model="seeTemp.empname" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="退货日期:" prop="createTime1">
+                <el-input ref="createTime1" v-model="seeTemp.createTime1" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="退货原因:" prop="note">
+                <el-input ref="note" v-model="seeTemp.note" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoadingSee"
+          element-loading-text="给我一点时间"
+          :data="listSee"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+          @sort-change="tableSort"
+        >
+          <el-table-column label="序号" align="center" type="index" width="50px" />
+          <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brand }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="库存数" sortable prop="reportery" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货数量" sortable prop="refundNumber" min-width="120px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.refundNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="单价" sortable prop="price" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.price }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="总价" sortable prop="sumPrice" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <span>{{ scope.row.sumPrice }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="100px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col>
+              <el-form-item label="流程进度" />
+              <el-steps :active="active" align-center finish-status="success">
+                <el-step
+                  v-for="(item,index) in activeList"
+                  :key="index"
+                  :title="item.title"
+                  :status="item.status"
+                >
+                  <template slot="description">
+                    <div class="step-row">
+                      <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                      <div>{{ item.reason }}</div>
+                    </div>
+                  </template>
+                </el-step>
+              </el-steps>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col>
+              <el-form-item label="操作:">
+                <el-button v-if="isReturngoodsExamineZG && seeTemp.statue == 2" type="success" style="display:inline-block" @click="handleExamine(row)">审核1</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine(row)">审核1</el-button>
+                <!-- 采购审核 -->
+                <el-button v-if="isReturngoodsExamineCG && seeTemp.statue == 3" type="success" style="display:inline-block" @click="handleExamine2(row)">审核2</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine2(row)">审核2</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer" style="bottom:5px;">
+          <el-button @click="dialogFormVisibleSee = false">关闭</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" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
+          <el-row style="width:88%;height:150px;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.statueSH" @change="changeStatue">
+                  <el-radio :label="1" checked>通过</el-radio>
+                  <el-radio :label="2">不通过</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="statueReason" :span="20">
+              <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='examine'?createExamineData():createExamineData2()">确认</el-button>
+        <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- EAS同步 -->
+    <el-dialog :title="textMap[easStatus.dialogStatus]" :visible.sync="easStatus.dialogFormVisible" :close-on-click-modal="false" width="80%">
+      <div class="easStatus">
+        <el-table
+          :key="easStatus.tableKey"
+          v-loading="easStatus.listLoading"
+          element-loading-text="给我一点时间"
+          :data="easStatus.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 + (pageNum-1) * pageSize + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="退货单号" min-width="110px" align="center" prop="useForm" />
+          <el-table-column label="牧场" min-width="110px" align="center" prop="pastureName" />
+          <el-table-column label="录入人" min-width="110px" align="center" prop="empName" />
+          <el-table-column label="退货日期" min-width="110px" align="center" prop="createTime" />
+          <el-table-column label="失败原因" min-width="110px" align="center" prop="failReason" />
+          <el-table-column label="操作" align="center" width="300px" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <el-button v-if="isManualSynchronization" type="primary" size="mini" style="width:70px;" @click="handleManual(row)">手动同步</el-button>
+              <el-button v-if="isCloseSynchronization" type="danger" size="mini" style="width:70px;" @click="handleClose(row)">关闭同步</el-button>
+              <el-button v-if="isIgnoreSynchronization" type="danger" size="mini" style="width:70px;" @click="handleIgnore(row)">忽略同步</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination v-show="easStatus.total>0" :total="easStatus.total" :page.sync="easStatus.getdataListParm.offset" :limit.sync="easStatus.getdataListParm.pagecount" @pagination="get_table_dataEasStatusLst" />
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
+        <el-button @click="easStatus.dialogFormVisible = false;get_table_data()">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// / 引入
+import { GetDataByName, GetDataByNames, ExecDataByConfig, failproccess, PostDataByName, checkButtons, GetAccount, EasSync, SapRef } from '@/api/common'
+import waves from '@/directive/waves' // waves directive
+import { parseTime, json2excel, sortChange } from '@/utils/index.js'
+// eslint-disable-next-line no-unused-vars
+import { validateEMail } from '@/utils/validate.js'
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+export default {
+  name: 'Returngoods',
+  components: { Pagination },
+  directives: { waves },
+  filters: {
+    keepTwoNum(value) {
+      value = Number(value)
+      return value.toFixed(2)
+    }
+  },
+  data() {
+    return {
+      isSap:1,
+      isSrm:1,
+      selectList: [],
+      isRetrunsap: [], 
+      currentRow:{},
+      // 权限
+      isReturngoodsAdd: [], isReturngoodsTemplate: [], isReturngoodsImport: [], isReturngoodsExport: [], isReturngoodsSee: [], isReturngoodsDelete: [], isReturngoodsExamineZG: [], isReturngoodsExamineCG: [], isReturngoodsUpdate: [],
+      isEasSynchronization: [], isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
+      isokDisable: false,
+      findAllProvider: [],
+      findAllPasture: [],
+      findAllDepart: [],
+      findAllEmploye: [],
+      requestParams: [
+        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }}
+      ],
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()// 当天之前的时间可选
+        }
+      },
+      textMap: {
+        update: '编辑',
+        create: '新增',
+        see: '查看',
+        examine: '审核',
+        examine2: '审核',
+        easStatus: 'EAS同步—同步失败数据'
+      },
+      rules: {
+        // useForm: [{ required: true, message: '必填', trigger: 'blur' }],
+        providerId: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      statues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      radioAll: '全部',
+      getdataListParm: {
+        name: 'getBigPartrefundlist',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          pastureName: Cookies.get('pasturename'),
+          pastureId: Cookies.get('pastureid'),
+          useForm: '',
+          inputDatetime: '',
+          startTime: '',
+          stopTime: '',
+          easStatus: ''
+        }
+      },
+      tableKey: 0,
+      listLoading: true,
+      total: 0,
+      list: [],
+
+      activeName: 'first',
+      tableKey2: 0,
+      listLoading2: true,
+      total2: 0,
+      list2: [],
+      getdataListParm2: {
+        name: 'getPartrefundDetaillist',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          inputDatetime: '',
+          orderNumber: '',
+          startTime: '',
+          stopTime: '',
+          partCode: '',
+          partName: '',
+          providerId: '',
+          pastureName: Cookies.get('pasturename')
+        }
+      },
+
+      requestParam: {
+        name: 'insertAsset',
+        offset: 0,
+        pagecount: 0,
+        parammaps: {}
+      },
+      listLoadingSee: true,
+      listSee: [],
+      totalSee: 0,
+      dialogStatusSee: '',
+      dialogFormVisibleSee: false,
+      seeTemp: {},
+      getdataListSee: {
+        name: 'getPartrefundlist',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      dialogFormVisible: false,
+      dialogStatus: '',
+      createTemp: {
+        providerId: '',
+        useForm: '',
+        note: '',
+        pastureId: this.$store.state.user.pastureid,
+        employeId: this.$store.state.user.employeid,
+        createTime: parseTime(new Date(), '{y}-{m}-{d}')
+      },
+      requestSparePart: {
+        name: 'getPartsListTH',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      getParmCreateNumber: {
+        name: 'autoCreatCode',
+        page: 0,
+        offset: 0,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'TH'
+        }
+      },
+      // getParmCreateAmount: {
+      //   name: 'getPartsAmountList',
+      //   page: 0,
+      //   offset: 0,
+      //   pagecount: 0,
+      //   returntype: 'Map',
+      //   parammaps: {
+      //     pastureId: Cookies.get('pastureid')
+      //   }
+      // },
+      listAdd: [],
+      postDataPramas: {},
+      dialogFormVisible_Examine: false,
+      examineTemp: {
+        statueSH: 1
+      },
+      statueReason: false,
+      activeList: [],
+      active: 3,
+      buttons: [],
+      downloadParam: {},
+      isBatchOperation: false,
+      getParmBatchOperation: {
+        name: 'getStockPastureListBypv',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          providerId: ''
+        }
+      },
+      TotalAmount: 0,
+      isPercentage: false,
+      percentage: 1,
+      // EAS同步
+      easStatus: {
+        easStatusList: [{ name: '同步成功', id: '1' }, { name: '同步失败', id: '0' }, { name: '关闭同步', id: '2' }],
+        dialogStatus: '',
+        dialogFormVisible: false,
+        tableKey: 0,
+        total: 0,
+        listLoading: true,
+        list: [],
+        getdataListParm: {
+          name: 'getbigpartrefundSync',
+          page: 1,
+          offset: 1,
+          pagecount: 10,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid')
+          }
+        }
+      },
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getBigPartrefundWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {pastureId: Cookies.get('pastureid')}
+        }
+      }
+    }
+  },
+
+  computed: {
+
+  },
+
+  watch: {
+ 
+    listAdd: {
+      deep: true,
+      handler: function (item) {
+   
+          this.listAdd.forEach(function(i){
+            if(parseInt(i.refundNumber) > parseInt(i.reportery)){
+              i.refundNumber = i.reportery
+            }
+               
+          })
+
+           
+      }
+    },
+ 
+  },
+
+
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+    this.get_select_list()
+    this.get_table_data()
+    this.getPendingList()
+  },
+
+  methods: {
+    tableSort(column) {
+      if (this.activeName == 'first') {
+        sortChange(column, this.listSee)
+      } else if (this.activeName == 'second') {
+        sortChange(column, this.list2)
+      }
+    },
+    get_auto_buttons() {
+
+
+      
+      const Retrunsap = 'customs:returngoods:sap'
+      const isRetrunsap = checkButtons(this.$store.state.user.buttons, Retrunsap)
+      this.isRetrunsap = isRetrunsap
+
+      // 新增
+      const ReturngoodsAdd = 'customs:returngoods:add'
+      const isReturngoodsAdd = checkButtons(this.$store.state.user.buttons, ReturngoodsAdd)
+      this.isReturngoodsAdd = isReturngoodsAdd
+      // 编辑
+      const ReturngoodsUpdate = 'customs:Returngoods:update'
+      const isReturngoodsUpdate = checkButtons(this.$store.state.user.buttons, ReturngoodsUpdate)
+      this.isReturngoodsUpdate = isReturngoodsUpdate
+      // 模板
+      const ReturngoodsTemplate = 'customs:returngoods:template'
+      const isReturngoodsTemplate = checkButtons(this.$store.state.user.buttons, ReturngoodsTemplate)
+      this.isReturngoodsTemplate = isReturngoodsTemplate
+      // 导入
+      const ReturngoodsImport = 'customs:returngoods:import'
+      const isReturngoodsImport = checkButtons(this.$store.state.user.buttons, ReturngoodsImport)
+      this.isReturngoodsImport = isReturngoodsImport
+      // 导出
+      const ReturngoodsExport = 'customs:returngoods:export'
+      const isReturngoodsExport = checkButtons(this.$store.state.user.buttons, ReturngoodsExport)
+      this.isReturngoodsExport = isReturngoodsExport
+      // 查看
+      const ReturngoodsSee = 'customs:returngoods:see'
+      const isReturngoodsSee = checkButtons(this.$store.state.user.buttons, ReturngoodsSee)
+      this.isReturngoodsSee = isReturngoodsSee
+      // 删除
+      const ReturngoodsDelete = 'customs:returngoods:delete'
+      const isReturngoodsDelete = checkButtons(this.$store.state.user.buttons, ReturngoodsDelete)
+      this.isReturngoodsDelete = isReturngoodsDelete
+      // 主管审核
+      const ReturngoodsExamineZG = 'customs:returngoods:examineZG'
+      const isReturngoodsExamineZG = checkButtons(this.$store.state.user.buttons, ReturngoodsExamineZG)
+      this.isReturngoodsExamineZG = isReturngoodsExamineZG
+      // 采购审核
+      const ReturngoodsExamineCG = 'customs:returngoods:examineCG'
+      const isReturngoodsExamineCG = checkButtons(this.$store.state.user.buttons, ReturngoodsExamineCG)
+      this.isReturngoodsExamineCG = isReturngoodsExamineCG
+      const EasSynchronization = 'customs:returngoods:easSynchronization'
+      const isEasSynchronization = checkButtons(this.$store.state.user.buttons, EasSynchronization)
+      this.isEasSynchronization = isEasSynchronization
+
+      const ManualSynchronization = 'customs:returngoods:manualSynchronization'
+      const isManualSynchronization = checkButtons(this.$store.state.user.buttons, ManualSynchronization)
+      this.isManualSynchronization = isManualSynchronization
+
+      const CloseSynchronization = 'customs:returngoods:closeSynchronization'
+      const isCloseSynchronization = checkButtons(this.$store.state.user.buttons, CloseSynchronization)
+      this.isCloseSynchronization = isCloseSynchronization
+
+      const IgnoreSynchronization = 'customs:returngoods:ignoreSynchronization'
+      const isIgnoreSynchronization = checkButtons(this.$store.state.user.buttons, IgnoreSynchronization)
+      this.isIgnoreSynchronization = isIgnoreSynchronization
+    },
+    changePastureName(item) {
+      this.getdataListParm.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
+      this.pending.getdataListParm.parammaps.useForm = this.getdataListParm.parammaps.useForm
+      this.pending.getdataListParm.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
+      this.pending.getdataListParm.parammaps.empId = Cookies.get('employeid')
+      this.pending.getdataListParm.parammaps.pastureId = this.getdataListParm.parammaps.pastureId
+      this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+
+    handleClick(tab, event) {
+      console.log(tab, event)
+      if (tab.name === 'second') {
+        this.get_table_data2()
+      } else {
+        this.get_table_data()
+      }
+    },
+    get_table_data2() {
+      this.listLoading2 = true
+      if (this.$refs['inputDatetime2'] !== undefined && this.$refs['inputDatetime2'].value !== null) {
+        this.getdataListParm2.parammaps.startTime = this.$refs['inputDatetime2'].value[0]
+        this.getdataListParm2.parammaps.stopTime = this.$refs['inputDatetime2'].value[1]
+      } else {
+        this.getdataListParm2.parammaps.startTime = ''
+        this.getdataListParm2.parammaps.stopTime = ''
+      }
+      GetDataByName(this.getdataListParm2).then(response => {
+        console.log('table数据', response.data.list)
+        this.list2 = response.data.list
+        this.pageNum2 = response.data.pageNum
+        this.pageSize2 = response.data.pageSize
+        if (response.data.total) {
+          this.total2 = response.data.total
+        }
+        setTimeout(() => {
+          this.listLoading2 = false
+        }, 100)
+      })
+    },
+    form_search2() {
+      this.listLoading2 = true
+      if (this.getdataListParm2.parammaps.inputDatetime === null) {
+        this.getdataListParm2.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm2.offset = 1
+      this.get_table_data2()
+    },
+
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getBigPartrefundlist'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: Cookies.get('pasturename'),
+          useForm: '',
+          inputDatetime: '',
+          startTime: '',
+          stopTime: ''
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getBigPartrefundWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          useForm: this.getdataListParm.parammaps.useForm,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          startTime: this.getdataListParm.parammaps.startTime,
+          stopTime: this.getdataListParm.parammaps.stopTime,
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getBigPartrefundWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          useForm: this.getdataListParm.parammaps.useForm,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          startTime: this.getdataListParm.parammaps.startTime,
+          stopTime: this.getdataListParm.parammaps.stopTime,
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    statue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.statue == 2) {
+        return '审核中'
+      } else if (cellValue.statue == 3) {
+        return '审核中'
+      } else if (cellValue.statue == 4) {
+        return '未通过'
+      } else if (cellValue.statue == 6) {
+        return '未通过'
+      } else if (cellValue.statue == 5) {
+        return '已通过'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.listLoading = true
+      this.get_table_data()
+      this.getPendingList()
+    },
+    resetCreateTemp() {
+      this.createTemp.pastureId = this.$store.state.user.pastureid
+      this.createTemp.providerId = ''
+      this.createTemp.note = ''
+      this.createTemp.employeId = this.$store.state.user.employeid
+      this.createTemp.createTime = parseTime(new Date(), '{y}-{m}-{d}')
+      this.createTemp.useForm = ''
+      this.listAdd = []
+      this.TotalAmount = 0
+    },
+
+    handleCurrentChange(val) {
+        this.currentRow = val;
+        console.log("currentRow",this.currentRow)
+    },
+
+    checkboxInit(row,index){
+      // console.log(row)
+      if(row.ProofCode){ 
+        return 0 
+      } else {
+
+        var data1 = new Date(row.createTime1)
+        var data2 = new Date('2022-10-25')
+        if(data1 > data2){ return 1 } else {return 0}
+ 
+      }
+
+ 
+    },
+
+    //监听 - 表格 - 勾选
+    change_table_selection(val) {
+      this.selectList = val
+      console.log('勾选数据selectList', this.selectList)
+    },
+
+    sapUpload(){
+      const that = this 
+      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 })
+        return false
+      }
+
+
+      console.log(that.isSap)
+
+      if(that.isSap == 1){
+
+         that.isSap = 0
+         SapRef(send_data).then(response => {
+              console.log('response', response)
+                
+              if (response.msg !== 'fail') {
+                that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
+                that.selectList = []
+                that.get_table_data()
+                
+                } else {
+                  that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
+                }
+            })
+ 
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+     
+
+      //  if(true){
+      // if(this.currentRow.ProofCode){
+      //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")
+      //   //如果有这个值说明已经上传了,不用上传
+      // } else {
+      //   console.log("currentRow ProofCode没有这个值")
+      //   console.log("currentRow ProofCode",this.currentRow.ProofCode)
+      //     const id = this.currentRow.id 
+ 
+      //     console.log("id",id)
+      //       var send_data = {
+      //             "id":id,
+ 
+      //             "pastureid":Cookies.get('pastureid')
+              
+      //       }
+      //       SapRef(send_data).then(response => {
+      //         console.log('response', response)
+                
+      //         if (response.msg !== 'fail') {
+      //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
+      //           that.get_table_data()
+                
+      //           } else {
+      //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
+      //           }
+      //       })
+ 
+      // }
+
+    },
+
+
+    form_add() {
+      this.resetCreateTemp()
+      this.createTemp.useForm = ''
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.getCreateNumber()
+    },
+    changeProvider(val) {
+      console.log(val, '供应商change')
+      this.listAdd = []
+      this.getParmBatchOperation.parammaps.providerId = val
+      this.isBatchOperation = true
+    },
+    getCreateNumber() {
+      GetDataByName(this.getParmCreateNumber).then(response => {
+        this.$nextTick(() => {
+          console.log('新增退货单号', response.data.list[0].orderCode)
+          this.createTemp.useForm = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      if (this.createTemp.providerId !== '') {
+        this.requestSparePart.parammaps.providerId = this.createTemp.providerId
+        this.requestSparePart.parammaps['partCode'] = queryString
+        GetDataByName(this.requestSparePart).then(response => {
+          console.log('备件模糊查询搜索data', response.data.list)
+          if (response.data.list == null) {
+            cb([])
+          } else {
+            cb(response.data.list)
+          }
+        })
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择供应商',
+          type: 'warning',
+          duration: 2000
+        })
+      }
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      console.log('备件模糊查询选中值', item.id)
+      this.TotalAmount = 0
+      if (this.listAdd.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此备件已存在,请重新选择备件'
+          })
+          console.log(this.listAdd)
+          console.log(this.listAdd.length)
+          this.TotalAmount = 0
+          for (let i = 0; i < this.listAdd.length; i++) {
+            console.log(this.TotalAmount)
+            this.TotalAmount += (parseFloat(this.listAdd[i].refundNumber) * parseFloat(this.listAdd[i].price))
+            this.TotalAmount = this.TotalAmount
+            console.log(this.TotalAmount)
+          }
+          console.log(this.TotalAmount)
+          return false
+          // this.TotalAmount = parseFloat((this.TotalAmount).toFixed(2))
+        } else {
+          this.listAdd.unshift(item)
+          this.$set(item, 'refundNumber', item.reportery)
+          if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+            this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+            this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+          } else {
+            item.srcpath = ''
+            item.picpath = ''
+          }
+        }
+      } else {
+        this.listAdd.unshift(item)
+        this.$set(item, 'refundNumber', item.reportery)
+        if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+          this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+          this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+        } else {
+          item.srcpath = ''
+          item.picpath = ''
+        }
+      }
+      this.$forceUpdate()
+      console.log(this.listAdd)
+      for (let i = 0; i < this.listAdd.length; i++) {
+        this.TotalAmount += (parseFloat(this.listAdd[i].refundNumber) * parseFloat(this.listAdd[i].price))
+      }
+      this.TotalAmount = parseFloat((this.TotalAmount).toFixed(2))
+    },
+    handleBatchOperation() {
+      GetDataByName(this.getParmBatchOperation).then(response => {
+        this.$nextTick(() => {
+          console.log('批量添加', response.data.list)
+          if (response.data.list !== null) {
+            for (let i = 0; i < response.data.list.length; i++) {
+              this.$set(response.data.list[i], 'refundNumber', response.data.list[i].reportery)
+              this.TotalAmount += parseFloat(response.data.list[i].refundNumber) * parseFloat(response.data.list[i].price)
+              this.TotalAmount = parseFloat((this.TotalAmount).toFixed(2))
+              if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+                this.$set(response.data.list[i], 'srcpath', process.env.VUE_APP_BASE_API + response.data.list[i].srcpath)
+                this.$set(response.data.list[i], 'picpath', process.env.VUE_APP_BASE_API + response.data.list[i].picpath)
+              } else {
+                response.data.list[i].srcpath = ''
+                response.data.list[i].picpath = ''
+              }
+            }
+            this.listAdd = response.data.list
+          } else {
+            this.listAdd = []
+          }
+        })
+      })
+    },
+    blurRefundNumber() {
+      this.TotalAmount = 0
+      for (let i = 0; i < this.listAdd.length; i++) {
+        this.TotalAmount += parseFloat(this.listAdd[i].refundNumber) * parseFloat(this.listAdd[i].price)
+      }
+      this.TotalAmount = parseFloat((this.TotalAmount).toFixed(2))
+    },
+    add_dialog_save() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp'].validate(valid => {
+        if (valid) {
+          console.log(this.listAdd)
+          console.log(this.createTemp.useForm)
+          if (this.createTemp.useForm == '' || this.createTemp.useForm == null || this.createTemp.useForm == undefined) {
+            GetDataByName(this.getParmCreateNumber).then(response => {
+              this.$nextTick(() => {
+                console.log('退库单号', response.data.list[0].orderCode)
+                this.createTemp.useForm = response.data.list[0].orderCode
+                this.$forceUpdate()
+                this.add_dialog_saveSave()
+              })
+            })
+          } else {
+            this.add_dialog_saveSave()
+          }
+        }
+      })
+    },
+    add_dialog_saveSave() {
+      if (this.listAdd.length !== 0) {
+        for (var j = 0; j < this.listAdd.length; j++) {
+          console.log(this.listAdd[j].refundNumber)
+          // eslint-disable-next-line use-isnan
+          if (this.listAdd[j].refundNumber == null || this.listAdd[j].refundNumber === '') {
+            this.$message({
+              type: 'warning',
+              message: '请检查退货数量是否未填写',
+              duration: 2000
+            })
+            return false
+          } else {
+            var rulesRefundNumber = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+            if (!rulesRefundNumber.test(this.listAdd[j].refundNumber)) {
+              this.$message({
+                type: 'error',
+                message: '退货数量请输入正数,最多保留两位小数点',
+                duration: 2000
+              })
+              return false
+            } else if (parseFloat(this.listAdd[j].refundNumber) > parseFloat(this.listAdd[j].reportery)) {
+              this.$message({
+                type: 'error',
+                message: '退货数量不可大于库存数',
+                duration: 2000
+              })
+              return false
+            }
+          }
+        }
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'insertBigPartrefund', 'type': 'e', 'parammaps': {
+          pastureId: this.createTemp.pastureId,
+          providerId: this.createTemp.providerId,
+          useForm: this.createTemp.useForm,
+          employeId: this.createTemp.employeId,
+          createTime: this.createTemp.createTime,
+          note: this.createTemp.note
+        }}
+        // eslint-disable-next-line no-irregular-whitespace
+        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+        this.postDataPramas.data[1].children = []
+        this.postDataPramas.data[1].children[0] = { 'name': 'insertPartrefund', 'type': 'e', 'parammaps': {
+          bigId: '@insertBigPartrefund.LastInsertId',
+          partId: '@insertSpotList.partId',
+          partCode: '@insertSpotList.partCode',
+          partName: '@insertSpotList.partName',
+          specification: '@insertSpotList.specification',
+          price: '@insertSpotList.price',
+          unit: '@insertSpotList.unit',
+          brand: '@insertSpotList.brand',
+          reportery: '@insertSpotList.reportery',
+          refundNumber: '@insertSpotList.refundNumber',
+          contractId: '@insertSpotList.contractId',
+          location: '@insertSpotList.location'
+        }}
+        // this.postDataPramas.data[1].children[1] = { 'name': 'updatePartRepertoryTH', 'type': 'e', 'parammaps': {
+        //   refundNumber: '@insertSpotList.refundNumber',
+        //   partCode: '@insertSpotList.partCode',
+        //   contractId: '@insertSpotList.contractId',
+        //   providerId: this.createTemp.providerId
+        // }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '保存失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+            this.dialogFormVisible = false
+            this.getdataListParm.parammaps.inputDatetime = ''
+            setTimeout(() => {
+              this.get_table_data()
+              this.getPendingList()
+            }, 1000)
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+        return true
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择备件',
+          type: 'warning',
+          duration: 2000
+        })
+        return false
+      }
+    },
+    partDelete(row) {
+      console.log(row)
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        this.TotalAmount = 0
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+          this.TotalAmount += parseFloat(this.listAdd[i].refundNumber) * parseFloat(this.listAdd[i].price)
+        }
+        this.TotalAmount = parseFloat((this.TotalAmount).toFixed(2))
+        // this.TotalAmount = (this.TotalAmount).toFixed(2)
+      })
+    },
+    // 查看
+    form_see(row) {
+      this.dialogStatusSee = 'see'
+      this.dialogFormVisibleSee = true
+      this.seeTemp = Object.assign({}, row)
+      console.log('查看上方数据(从table读取)', this.seeTemp)
+      this.TotalAmount = 0
+      this.getdataListSee.parammaps.bigId = this.seeTemp.id
+      this.getSeeList()
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      if (this.seeTemp.statue === 2) {
+        this.activeList = [{ title: '退货申请', date: this.seeTemp.createTime1, name: this.seeTemp.empname }, { title: '技术助理审核' }, { title: '采购审核' }]
+        this.active = 1
+      } else if (this.seeTemp.statue === 3) {
+        this.activeList = [{ title: '退货申请', date: this.seeTemp.createTime1, name: this.seeTemp.empname }, { title: '技术助理审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+        this.active = 2
+      } else if (this.seeTemp.statue === 4) {
+        this.activeList = [{ title: '退货申请', date: this.seeTemp.createTime1, name: this.seeTemp.empname }, { title: '技术助理审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
+        this.active = 2
+      } else if (this.seeTemp.statue === 5) {
+        this.activeList = [{ title: '退货申请', date: this.seeTemp.createTime1, name: this.seeTemp.empname }, { title: '技术助理审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+        this.active = 3
+      } else if (this.seeTemp.statue === 6) {
+        this.activeList = [{ title: '退货申请', date: this.seeTemp.createTime1, name: this.seeTemp.empname }, { title: '技术助理审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+        this.active = 3
+      }
+    },
+    getSeeList() {
+      GetDataByName(this.getdataListSee).then(response => {
+        console.log('查看下方table数据', response.data.list)
+        this.listSee = response.data.list
+        this.listAdd = response.data.list
+        if (response.data.list !== null) {
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.TotalAmount += parseFloat(response.data.list[i].sumPrice)
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              this.listSee[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              this.listSee[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+            } else {
+              this.listSee[i].srcpath = ''
+              this.listSee[i].picpath = ''
+            }
+          }
+          this.TotalAmount = this.TotalAmount.toFixed(2)
+        }
+        setTimeout(() => {
+          this.listLoadingSee = false
+        }, 100)
+      })
+    },
+    form_edit(row) {
+      row.createTime = row.createTime1
+      this.createTemp = Object.assign({}, row) // copy obj
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      this.TotalAmount = 0
+      this.listAdd = []
+      this.getdataListSee.parammaps.bigId = this.createTemp.id
+      this.getSeeList()
+    },
+    edit_dialog_save() {
+      if (this.listAdd.length !== 0) {
+        for (var j = 0; j < this.listAdd.length; j++) {
+          console.log(this.listAdd[j].refundNumber)
+          // eslint-disable-next-line use-isnan
+          if (this.listAdd[j].refundNumber == null || this.listAdd[j].refundNumber === '') {
+            this.$message({
+              type: 'warning',
+              message: '请检查退货数量是否未填写',
+              duration: 2000
+            })
+            return false
+          } else {
+            var rulesRefundNumber = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+            if (!rulesRefundNumber.test(this.listAdd[j].refundNumber)) {
+              this.$message({
+                type: 'error',
+                message: '退货数量请输入正数,最多保留两位小数点',
+                duration: 2000
+              })
+              return false
+            } else if (parseFloat(this.listAdd[j].refundNumber) > parseFloat(this.listAdd[j].reportery)) {
+              this.$message({
+                type: 'error',
+                message: '退货数量不可大于库存数',
+                duration: 2000
+              })
+              return false
+            }
+          }
+        }
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'updatepartrefundCharge', 'type': 'e', 'parammaps': {
+          id: this.createTemp.id
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deletePartrefund', 'type': 'e', 'parammaps': {
+          id: this.createTemp.id
+        }}
+        // eslint-disable-next-line no-irregular-whitespace
+        this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+        this.postDataPramas.data[2].children = []
+        this.postDataPramas.data[2].children[0] = { 'name': 'insertPartrefund', 'type': 'e', 'parammaps': {
+          bigId: this.createTemp.id,
+          partId: '@insertSpotList.partId',
+          partCode: '@insertSpotList.partCode',
+          partName: '@insertSpotList.partName',
+          specification: '@insertSpotList.specification',
+          price: '@insertSpotList.price',
+          unit: '@insertSpotList.unit',
+          brand: '@insertSpotList.brand',
+          reportery: '@insertSpotList.reportery',
+          refundNumber: '@insertSpotList.refundNumber',
+          contractId: '@insertSpotList.contractId',
+          location: '@insertSpotList.location'
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '保存失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+            this.dialogFormVisible = false
+            this.getdataListParm.parammaps.inputDatetime = ''
+            this.get_table_data()
+            this.getPendingList()
+            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+        return true
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择备件',
+          type: 'warning',
+          duration: 2000
+        })
+        return false
+      }
+    },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllProvider = response.data.findAllProvider.list
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllDepart = response.data.findAllDepart.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+      })
+    },
+    // 导入
+    handleDownload() {
+      console.log('点击了下载')
+      this.$alert('退货记录正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      this.downloadParam.name = 'getPartrefundDetaillist'
+      this.downloadParam.parammaps = this.getdataListParm2.parammaps
+      GetAccount(this.downloadParam).then(response => {
+        if (response.data.list !== '') {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+        this.$nextTick(() => {
+          const ExcelDatas = [
+            {
+              tHeader: ['牧场', '退货单号', '备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '供应商', '期初库存', '退货数量', '单价', '总价', '退货原因', '录入人', '退货日期'],
+              filterVal: ['pastureName', 'useForm', 'partCode', 'partName', 'specification', 'brand', 'unit', 'providerName', 'reportery', 'refundNumber', 'price', 'sumPrice', 'note', 'empname', 'createTime1'],
+              tableDatas: response.data.list,
+              sheetName: '退货记录'
+            }
+          ]
+          json2excel(ExcelDatas, '退货记录', true, 'xlsx')
+        })
+      })
+    },
+    form_delete(row) {
+      console.log('点击了删除')
+      MessageBox.confirm('确认删除此条信息?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'deleteBigPartrefund', 'type': 'e', 'parammaps': {
+          id: row.id
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deletePartrefund', 'type': 'e', 'parammaps': {
+          bigId: row.id
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          this.get_table_data()
+          this.getPendingList()
+          this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+    changeStatue(val) {
+      if (val == 2) {
+        this.statueReason = true
+      } else {
+        this.statueReason = false
+      }
+    },
+    handleExamine(row) {
+      console.log('点击了库管审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statueSH', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statueSH', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData() {
+      console.log('点击了主管审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'partrefundCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statueSH == 1) {
+            this.requestParam.parammaps.statue = 3
+          } else if (this.examineTemp.statueSH == 2) {
+            this.requestParam.parammaps.statue = 4
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('主管审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              setTimeout(() => {
+                this.get_table_data()
+              }, 1000)
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisibleSee = false
+              this.statueReason = false
+              this.getPendingList()
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleExamine2(row) {
+      console.log('点击了采购审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statueSH', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statueSH', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine2'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData2() {
+      console.log('点击了采购审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          if (this.examineTemp.statueSH == 1) {
+            this.requestParam.common = { 'returnmap': '0' }
+            this.requestParam.data = []
+            this.requestParam.data[0] = { 'name': 'partrefundCharge1', 'type': 'e', 'parammaps': {
+              id: this.examineTemp.id,
+              statue: 5,
+              empId: Cookies.get('employeid')
+            }}
+            // eslint-disable-next-line no-irregular-whitespace
+            this.requestParam.data[1] = { 'name': 'updatePartRepertoryTHS', 'type': 'e', 'parammaps': {
+              id: this.examineTemp.id
+            }}
+            ExecDataByConfig(this.requestParam).then(response => {
+              console.log('采购审核保存发送参数', this.requestParam)
+              if (response.msg === 'fail') {
+                this.$notify({
+                  title: '保存失败',
+                  message: response.data,
+                  type: 'warning',
+                  duration: 2000
+                })
+              } else {
+                this.dialogFormVisible_Examine = false
+                this.dialogFormVisibleSee = false
+                setTimeout(() => {
+                  this.get_table_data()
+                }, 1000)
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              }
+            })
+          } else if (this.examineTemp.statueSH == 2) {
+            this.requestParam.name = 'partrefundCharge1'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 6
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('采购审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                setTimeout(() => {
+                  this.get_table_data()
+                }, 1000)
+                this.dialogFormVisible_Examine = false
+                this.dialogFormVisibleSee = false
+                this.statueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        }
+      })
+    },
+    handleEAS() {
+      this.easStatus.dialogStatus = 'easStatus'
+      this.easStatus.dialogFormVisible = true
+      this.get_table_dataEasStatusLst()
+    },
+    get_table_dataEasStatusLst() {
+      this.easStatus.listLoading = true
+      GetDataByName(this.easStatus.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.easStatus.list = response.data.list
+        } else {
+          this.easStatus.list = []
+        }
+        this.easStatus.pageNum = response.data.pageNum
+        this.easStatus.pageSize = response.data.pageSize
+        if (response.data.total) {
+          this.easStatus.total = response.data.total
+        }
+      })
+      setTimeout(() => {
+        this.easStatus.listLoading = false
+      }, 100)
+    },
+    handleClose(row) {
+      MessageBox.confirm('是否确认关闭同步此数据?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.requestParam = {}
+        this.requestParam.name = 'updatebigpartrefundSync'
+        this.requestParam.parammaps = {}
+        this.requestParam.parammaps.issync = '2'
+        this.requestParam.parammaps.id = row.id
+        PostDataByName(this.requestParam).then((response) => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '关闭同步成功', type: 'success', duration: 2000 })
+            this.get_table_dataEasStatusLst()
+            this.get_table_data()
+            this.getPendingList()
+          } else {
+            this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+            this.get_table_dataEasStatusLst()
+            this.get_table_data()
+            this.getPendingList()
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消关闭同步' })
+      })
+    },
+    handleManual(row) {
+      MessageBox.confirm('是否确认同步此数据至EAS?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.requestParam = {}
+        this.requestParam.typeIn = row.typeIn
+        this.requestParam.billCode = row.billCode
+        EasSync(this.requestParam).then((response) => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '手动同步成功', type: 'success', duration: 2000 })
+            this.get_table_dataEasStatusLst()
+            this.get_table_data()
+            this.getPendingList()
+          } else {
+            this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+            this.get_table_dataEasStatusLst()
+            this.get_table_data()
+            this.getPendingList()
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消手动同步' })
+      })
+    },
+    handleIgnore(row) {
+      MessageBox.confirm('是否确认忽略同步此数据?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.requestParam = {}
+        this.requestParam.name = 'updatebigpartrefundSync'
+        this.requestParam.parammaps = {}
+        this.requestParam.parammaps.issync = '3'
+        this.requestParam.parammaps.id = row.id
+        PostDataByName(this.requestParam).then((response) => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '忽略同步成功', type: 'success', duration: 2000 })
+            this.get_table_dataEasStatusLst()
+            this.get_table_data()
+            this.getPendingList()
+          } else {
+            this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+            this.get_table_dataEasStatusLst()
+            this.get_table_data()
+            this.getPendingList()
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消忽略同步' })
+      })
+    }
+
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .pagination-container{
+    display: block !important;
+  }
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>
+<style lang="scss">
+.el-step__head.is-success {
+    color: #409EFF;
+    border-color: #409EFF;
+}
+.el-step__title.is-success{
+  color: #409EFF;
+}
+.el-step__head.is-process{
+  color: #409EFF;
+  border-color: #409EFF;
+  .el-step__icon.is-text{
+    background: #409EFF;
+    color: #fff;
+  }
+}
+.step-row{
+  color: #000;
+}
+</style>

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

@@ -84,11 +84,11 @@
             </template>
           </el-table-column>
           <el-table-column label="入库日期" sortable prop="creatTime" min-width="110px" align="center" />
-          <el-table-column label="EAS同步状态" min-width="120px" align="center">
+          <!-- <el-table-column label="EAS同步状态" min-width="120px" align="center">
             <template slot-scope="scope">
               <span>{{ scope.row.easStatus }}</span>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column  prop="ProofCode" label="sap编码" min-width="80px" align="center">
               <template slot-scope="scope">
                 <span>{{scope.row.ProofCode}}</span>

+ 105 - 22
src/views/custom/subscribe/index.vue

@@ -85,12 +85,17 @@
           <!-- 库管 -->
           <el-button v-if="isSubscribeExamineKG && row.statue == 2" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核1</el-button>
           <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine(row)">审核1</el-button>
+
+          <!-- 设备 -->
+          <el-button v-if="isSubscribeExamineSBZG && row.statue == 3" style="display:inline-block" type="success" size="mini" @click="handleExamine22(row)">审核2</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine22(row)">审核2</el-button>
+
           <!-- 主管 -->
-          <el-button v-if="isSubscribeExamineZG && row.statue == 3" style="display:inline-block" type="success" size="mini" @click="handleExamine2(row)">审核2</el-button>
-          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine2(row)">审核2</el-button>
+          <el-button v-if="isSubscribeExamineZG && row.statue == 9" style="display:inline-block" type="success" size="mini" @click="handleExamine2(row)">审核3</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine2(row)">审核3</el-button>
           <!-- 采购 -->
-          <el-button v-if="isSubscribeExamineCG && row.statue == 5" style="display:inline-block" type="success" size="mini" @click="handleExamine3(row)">审核3</el-button>
-          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine3(row)">审核3</el-button>
+          <el-button v-if="isSubscribeExamineCG && row.statue == 5" style="display:inline-block" type="success" size="mini" @click="handleExamine3(row)">审核4</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine3(row)">审核4</el-button>
           <el-button v-if="isSubscribeDelete && (row.statue == 4||row.statue == 6||row.statue == 8)" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
           <el-button v-else style="display:none" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
         </template>
@@ -413,12 +418,17 @@
                 <!-- 库管 -->
                 <el-button v-if="isSubscribeExamineKG && seeTemp.statue == 2" type="success" style="display:inline-block" @click="handleExamine(row)">审核1</el-button>
                 <el-button v-else type="success" style="display:none" @click="handleExamine(row)">审核1</el-button>
+               <!-- 设备 -->
+               <el-button v-if="isSubscribeExamineSBZG && seeTemp.statue == 3" type="success" style="display:inline-block" @click="handleExamine22(row)">审核2</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine22(row)">审核2</el-button>
                 <!-- 主管 -->
-                <el-button v-if="isSubscribeExamineZG && seeTemp.statue == 3" type="success" style="display:inline-block" @click="handleExamine2(row)">审核2</el-button>
-                <el-button v-else type="success" style="display:none" @click="handleExamine2(row)">审核2</el-button>
+                <el-button v-if="isSubscribeExamineZG && seeTemp.statue == 9" type="success" style="display:inline-block" @click="handleExamine2(row)">审核3</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine2(row)">审核3</el-button>
                 <!-- 采购 -->
-                <el-button v-if="isSubscribeExamineCG && seeTemp.statue == 5" type="success" style="display:inline-block" @click="handleExamine3(row)">审核3</el-button>
-                <el-button v-else type="success" style="display:none" @click="handleExamine3(row)">审核3</el-button>
+                <el-button v-if="isSubscribeExamineCG && seeTemp.statue == 5" type="success" style="display:inline-block" @click="handleExamine3(row)">审核4</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine3(row)">审核4</el-button>
+ 
+         
               </el-form-item>
             </el-col>
           </el-row>
@@ -450,6 +460,7 @@
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine22'" type="primary" :disabled="isokDisable" @click="createExamineData22()">确认</el-button>
         <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
         <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
         <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
@@ -475,7 +486,7 @@ export default {
   directives: { waves },
   data() {
     return {
-      isSubscribeAdd: [], isSubscribeTemplate: [], isSubscribeImport: [], isSubscribeExport: [], isSubscribeSee: [], isSubscribeDelete: [], isSubscribeExamineKG: [], isSubscribeExamineCG: [], isSubscribeExamineZG: [],
+      isSubscribeAdd: [], isSubscribeExamineSBZG:[],isSubscribeTemplate: [], isSubscribeImport: [], isSubscribeExport: [], isSubscribeSee: [], isSubscribeDelete: [], isSubscribeExamineKG: [], isSubscribeExamineCG: [], isSubscribeExamineZG: [],
       isokDisable: false,
       findAllProvider: [],
       findAllPasture: [],
@@ -502,8 +513,9 @@ export default {
         create: '新增',
         see: '查看',
         examine: '审核1',
-        examine2: '审核2',
-        examine3: '审核3'
+        examine22: '审核2',
+        examine2: '审核3',
+        examine3: '审核4'
       },
       rules: {
         equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
@@ -665,6 +677,12 @@ export default {
       const SubscribeExamineKG = 'customs:subscribe:examineKG'
       const isSubscribeExamineKG = checkButtons(this.$store.state.user.buttons, SubscribeExamineKG)
       this.isSubscribeExamineKG = isSubscribeExamineKG
+// 设备主管审核
+      const SubscribeExamineSBZG = 'customs:subscribe:examineSBZG'
+      const isSubscribeExamineSBZG = checkButtons(this.$store.state.user.buttons, SubscribeExamineSBZG)
+      this.isSubscribeExamineSBZG = isSubscribeExamineSBZG
+
+
       // 主管审核
       // eslint-disable-next-line no-redeclare
       const SubscribeExamineZG = 'customs:subscribe:examineZG'
@@ -794,6 +812,10 @@ export default {
         return '已通过'
       } else if (cellValue.statue == 8) {
         return '未通过'
+      } else if (cellValue.statue == 9) {
+        return '审核中'
+      } else if (cellValue.statue == 10) {
+        return '未通过'
       }
     },
     form_search() {
@@ -1125,26 +1147,32 @@ export default {
       // 流程图
       var reason = '未通过原因:' + this.seeTemp.workflowNote
       if (this.seeTemp.statue === 2) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
         this.active = 1
       } else if (this.seeTemp.statue === 3) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核' }, { title: '采购审核' }]
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
         this.active = 2
       } else if (this.seeTemp.statue === 4) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason }, { title: '供应主管审核' }, { title: '采购审核' }]
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
         this.active = 2
-      } else if (this.seeTemp.statue === 5) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+      } else if (this.seeTemp.statue === 9) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '采购审核' }]
         this.active = 3
-      } else if (this.seeTemp.statue === 6) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
+      } else if (this.seeTemp.statue === 10) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason  }, { title: '供应主管审核' }, { title: '采购审核' }]
         this.active = 3
-      } else if (this.seeTemp.statue === 7) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+      }  else if (this.seeTemp.statue === 5) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
         this.active = 4
-      } else if (this.seeTemp.statue === 8) {
-        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+      } else if (this.seeTemp.statue === 6) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
         this.active = 4
+      } else if (this.seeTemp.statue === 7) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+        this.active = 5
+      } else if (this.seeTemp.statue === 8) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+        this.active = 5
       }
     },
     getSeeList() {
@@ -1468,6 +1496,61 @@ export default {
         }
       })
     },
+
+    handleExamine22(row) {
+      console.log('点击了设备主管审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statue', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statue', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine22'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData22() {
+      console.log('点击了设备主管审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam = {}
+          this.requestParam.name = 'partpurchaseEquipment'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statue == 1) {
+            this.requestParam.parammaps.statue = 9
+          } else if (this.examineTemp.statue == 2) {
+            this.requestParam.parammaps.statue = 10
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.get_table_data()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
     handleExamine2(row) {
       console.log('点击了供应主管审核')
       if (row == undefined) {

+ 1615 - 0
src/views/custom/subscribe/index1.vue

@@ -0,0 +1,1615 @@
+<template>
+  <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.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" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.orderNumber" placeholder="申购单号" style="width: 200px;" class="filter-item" />
+      <el-select v-model="getdataListParm.parammaps.stuteSH" style="width: 140px;" clearable placeholder="审核状态" class="filter-item">
+        <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.departmentId" clearable style="width: 140px;" placeholder="申购部门" class="filter-item">
+        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.empName" placeholder="申购人" style="width: 200px;" class="filter-item" />
+      <!-- <el-select v-model="getdataListParm.parammaps.empName " style="width: 140px;" placeholder="申购人" class="filter-item">
+        <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select> -->
+      <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <div>
+
+        <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+        <el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
+        <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+          <el-radio-button label="全部" />
+          <el-badge :value="pending.total" class="item">
+            <el-radio-button label="待处理" />
+          </el-badge>
+          <el-radio-button label="已处理" />
+        </el-radio-group>
+      </div>
+    </div>
+    <div class="filter-button" />
+
+    <el-table
+      :key="tableKey"
+      v-loading="listLoading"
+      element-loading-text="给我一点时间"
+      :data="list"
+      border
+      fit
+      highlight-current-row
+      style="width: 100%;"
+      :row-style="rowStyle"
+      :cell-style="cellStyle"
+      class="elTable"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="申购单号" min-width="150px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.orderNumber }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="牧场" min-width="90px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.pastureName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="申购部门" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.departmentName }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="申购人" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.empname }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="申购日期" sortable prop="inputTime" min-width="80px" align="center" />
+      <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
+      <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+          <el-button v-if="isSubscribeSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+          <el-button v-if="row.statue == 4||row.statue == 6||row.statue == 8" style="display:inline-block" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
+          <!-- 库管 -->
+          <el-button v-if="isSubscribeExamineKG && row.statue == 2" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核1</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine(row)">审核1</el-button>
+          <!-- 主管 -->
+          <el-button v-if="isSubscribeExamineZG && row.statue == 3" style="display:inline-block" type="success" size="mini" @click="handleExamine2(row)">审核2</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine2(row)">审核2</el-button>
+          <!-- 采购 -->
+          <el-button v-if="isSubscribeExamineCG && row.statue == 5" style="display:inline-block" type="success" size="mini" @click="handleExamine3(row)">审核3</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine3(row)">审核3</el-button>
+          <el-button v-if="isSubscribeDelete && (row.statue == 4||row.statue == 6||row.statue == 8)" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button v-else style="display:none" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    <!-- 弹出层新增or修改 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <div class="app-container">
+        <el-form
+          ref="createTemp"
+          :rules="rules"
+          :model="createTemp"
+          label-position="right"
+          label-width="100px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="申购单号:" prop="orderNumber">
+                <el-input ref="orderNumber" v-model="createTemp.orderNumber" 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==='update'" @change="changePasture">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="申购部门:" prop="departmentId">
+                <el-select v-model="createTemp.departmentId" placeholder="申购部门" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'" @change="changeDepart">
+                  <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="申购人:" prop="employeId">
+                <el-select v-model="createTemp.employeId" placeholder="申购人" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
+                  <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="申购日期:" prop="createTime">
+                <el-date-picker v-model="createTemp.createTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" :disabled="dialogStatus==='update'" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus==='create'" :span="8">
+              <el-form-item label="线上采购:" prop="providerId">
+                <el-select v-model="createTemp.providerId" placeholder="线上采购" clearable class="filter-item" style="width:100%" @change="changeProvider">
+                  <el-option v-for="item in onlineSubscriptionList" :key="item.id" :label="item.providerName" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="dialogStatus==='update'" :span="8">
+              <el-form-item label="线上采购:" prop="providerName">
+                <el-input ref="providerName" v-model="createTemp.providerName" disabled />
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="备件:" prop="partCode">
+                <el-autocomplete
+                  v-model="createTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="sparePartSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格"
+                  style="width:100%"
+                  @select="handleSelectSparePart"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
+                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
+                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable"
+        >
+          <!-- table表格 -->
+          <el-table-column label="序号" align="center" type="index" width="50px" />
+          <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span v-if="dialogStatus==='create'">{{ scope.row.brandName }}</span>
+              <span v-if="dialogStatus==='update'">{{ scope.row.brandName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="现有库存" prop="reportery" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="价格" prop="price" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span v-if="createTemp.providerId == ''">{{ scope.row.price }}</span>
+              <el-form v-else :model="scope.row" :rules="rules">
+                <el-form-item prop="price">
+                  <el-input v-model="scope.row.price" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="申购数量" min-width="120px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="amount">
+                  <el-input v-model="scope.row.amount" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" min-width="110px" align="center" valign="middle">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.purpose" />
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="操作"
+            align="center"
+            width="100"
+            class-name="small-padding fixed-width"
+            fixed="right"
+          >
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div slot="footer" class="dialog-footer" style="bottom:10px">
+          <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
+          <el-button @click="dialogFormVisible = false;get_table_data()">取消并关闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 查看 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisibleSee" :close-on-click-modal="false" width="90%">
+      <div class="app-containerSee">
+        <el-form
+          ref="seeTemp"
+          :rules="rules"
+          :model="seeTemp"
+          label-position="right"
+          label-width="100px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="申购单号:" prop="orderNumber">
+                <el-input ref="orderNumber" v-model="seeTemp.orderNumber" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureId">
+                <el-select v-model="seeTemp.pastureId" placeholder="牧场" class="filter-item" disabled style="width:100%">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="申购部门:" prop="departmentName">
+                <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="申购人:" prop="empname">
+                <el-input ref="empname" v-model="seeTemp.empname" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="申购日期:" prop="createTime">
+                <el-date-picker v-model="seeTemp.createTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="线上采购:" prop="providerName">
+                <el-input ref="providerName" v-model="seeTemp.providerName" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoadingSee"
+          element-loading-text="给我一点时间"
+          :data="listSee"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable"
+          @sort-change="tableSort"
+        >
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" min-width="90px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件品牌" prop="brandName" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.brandName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
+          <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
+          <el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
+          <el-table-column label="备注" min-width="110px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.purpose }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-form
+          ref="seeTemp"
+          :rules="rules"
+          :model="seeTemp"
+          label-position="right"
+          label-width="100px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col>
+              <el-form-item label="流程进度" />
+              <el-steps :active="active" align-center finish-status="success">
+                <el-step
+                  v-for="(item,index) in activeList"
+                  :key="index"
+                  :title="item.title"
+                  :status="item.status"
+                >
+                  <template slot="description">
+                    <div class="step-row">
+                      <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                      <div>{{ item.reason }}</div>
+                    </div>
+                  </template>
+                </el-step>
+              </el-steps>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col>
+              <el-form-item label="操作:">
+                <!-- 库管 -->
+                <el-button v-if="isSubscribeExamineKG && seeTemp.statue == 2" type="success" style="display:inline-block" @click="handleExamine(row)">审核1</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine(row)">审核1</el-button>
+                <!-- 主管 -->
+                <el-button v-if="isSubscribeExamineZG && seeTemp.statue == 3" type="success" style="display:inline-block" @click="handleExamine2(row)">审核2</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine2(row)">审核2</el-button>
+                <!-- 采购 -->
+                <el-button v-if="isSubscribeExamineCG && seeTemp.statue == 5" type="success" style="display:inline-block" @click="handleExamine3(row)">审核3</el-button>
+                <el-button v-else type="success" style="display:none" @click="handleExamine3(row)">审核3</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer" style="bottom:5px;">
+          <el-button @click="dialogFormVisibleSee = false">关闭</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" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
+          <el-row style="width:88%;height:150px;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.statue" @change="changeStatue">
+                  <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="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
+        <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// / 引入
+import { GetDataByName, GetDataByNames, PostDataByName, ExecDataByConfig, checkButtons, failproccess, GetAccount } from '@/api/common'
+import waves from '@/directive/waves' // waves directive
+import { parseTime, sortChange, json2excel } from '@/utils/index.js'
+// eslint-disable-next-line no-unused-vars
+import { validateEMail } from '@/utils/validate.js'
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+import { getToken } from '@/utils/auth'
+export default {
+  name: 'Subscribe',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      isSubscribeAdd: [], isSubscribeTemplate: [], isSubscribeImport: [], isSubscribeExport: [], isSubscribeSee: [], isSubscribeDelete: [], isSubscribeExamineKG: [], isSubscribeExamineCG: [], isSubscribeExamineZG: [],
+      isokDisable: false,
+      findAllProvider: [],
+      findAllPasture: [],
+      findAllDepart: [],
+      findAllEmploye: [],
+      onlineSubscriptionList: [], createDepartList: [], edit: 0,
+      requestParams: [
+        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
+        { 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: 'getflexProviderList', offset: 0, pagecount: 0, parammaps: {}}
+      ],
+      getDepartParam: {
+        name: 'findAllDepart', offset: 0, pagecount: 0,
+        parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
+      },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()// 当天之前的时间可选
+        }
+      },
+      textMap: {
+        update: '编辑',
+        create: '新增',
+        see: '查看',
+        examine: '审核1',
+        examine2: '审核2',
+        examine3: '审核3'
+      },
+      rules: {
+        equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      statues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      radioAll: '全部',
+      getdataListParm: {
+        name: 'getpartpurchaseList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          pastureName: Cookies.get('pasturename'),
+          empId: Cookies.get('employeid'),
+          orderNumber: '',
+          stuteSH: '',
+          departmentId: '',
+          inputDatetime: '',
+          startTime: '',
+          stopTime: '',
+          loginId: Cookies.get('employeid'),
+          menu: 'Subscribe',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+      },
+      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,
+        createTime: parseTime(new Date(), '{y}-{m}-{d}'),
+        providerId: ''
+      },
+      requestSparePart: {
+        name: 'getPartsListSG',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      getParmCreateNumber: {
+        name: 'autoCreatCode',
+        page: 0,
+        offset: 0,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'SG'
+        }
+      },
+      getParmCreateAmount: {
+        name: 'getPartsListSGv2',
+        page: 0,
+        offset: 0,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      listAdd: [],
+      postDataPramas: {},
+      requestParam: {},
+      dialogFormVisible_Examine: false,
+      examineTemp: {
+        statue: 1
+      },
+      statueReason: false,
+      activeList: [],
+      active: 3,
+      buttons: [],
+      downloadParam: {},
+      isPercentage: false,
+      percentage: 1,
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getpartpurchaseWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {
+            loginId: Cookies.get('employeid'),
+            menu: 'Subscribe', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid'),
+            empId: Cookies.get('employeid'), pastureId: Cookies.get('pastureid'), deptId: Cookies.get('departmentid')
+          }
+        }
+      }
+    }
+  },
+
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+    this.get_select_list()
+    this.get_table_data()
+    this.getPendingList()
+  },
+
+  methods: {
+    tableSort(column) {
+      sortChange(column, this.listSee)
+    },
+    get_auto_buttons() {
+      // 新增
+      const SubscribeAdd = 'customs:subscribe:add'
+      const isSubscribeAdd = checkButtons(this.$store.state.user.buttons, SubscribeAdd)
+      this.isSubscribeAdd = isSubscribeAdd
+      // 模板
+      // eslint-disable-next-line no-redeclare
+      const SubscribeTemplate = 'customs:subscribe:template'
+      const isSubscribeTemplate = checkButtons(this.$store.state.user.buttons, SubscribeTemplate)
+      this.isSubscribeTemplate = isSubscribeTemplate
+      // 导入
+      // eslint-disable-next-line no-redeclare
+      const SubscribeImport = 'customs:subscribe:import'
+      const isSubscribeImport = checkButtons(this.$store.state.user.buttons, SubscribeImport)
+      this.isSubscribeImport = isSubscribeImport
+      // 导出
+      // eslint-disable-next-line no-redeclare
+      const SubscribeExport = 'customs:subscribe:export'
+      const isSubscribeExport = checkButtons(this.$store.state.user.buttons, SubscribeExport)
+      this.isSubscribeExport = isSubscribeExport
+      // 查看
+      // eslint-disable-next-line no-redeclare
+      const SubscribeSee = 'customs:subscribe:see'
+      const isSubscribeSee = checkButtons(this.$store.state.user.buttons, SubscribeSee)
+      this.isSubscribeSee = isSubscribeSee
+      // 删除
+      // eslint-disable-next-line no-redeclare
+      const SubscribeDelete = 'customs:subscribe:delete'
+      const isSubscribeDelete = checkButtons(this.$store.state.user.buttons, SubscribeDelete)
+      this.isSubscribeDelete = isSubscribeDelete
+      // 库管审核
+      // eslint-disable-next-line no-redeclare
+      const SubscribeExamineKG = 'customs:subscribe:examineKG'
+      const isSubscribeExamineKG = checkButtons(this.$store.state.user.buttons, SubscribeExamineKG)
+      this.isSubscribeExamineKG = isSubscribeExamineKG
+      // 主管审核
+      // eslint-disable-next-line no-redeclare
+      const SubscribeExamineZG = 'customs:subscribe:examineZG'
+      const isSubscribeExamineZG = checkButtons(this.$store.state.user.buttons, SubscribeExamineZG)
+      this.isSubscribeExamineZG = isSubscribeExamineZG
+      // 采购审核
+      // eslint-disable-next-line no-redeclare
+      const SubscribeExamineCG = 'customs:subscribe:examineCG'
+      const isSubscribeExamineCG = checkButtons(this.$store.state.user.buttons, SubscribeExamineCG)
+      this.isSubscribeExamineCG = isSubscribeExamineCG
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
+      this.pending.getdataListParm.parammaps.orderNumber = this.getdataListParm.parammaps.orderNumber
+      this.pending.getdataListParm.parammaps.stuteSH = this.getdataListParm.parammaps.stuteSH
+      this.pending.getdataListParm.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
+      this.pending.getdataListParm.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
+      this.pending.getdataListParm.parammaps.loginId = this.getdataListParm.parammaps.loginId
+      this.pending.getdataListParm.parammaps.menu = this.getdataListParm.parammaps.menu
+      this.pending.getdataListParm.parammaps.logindeptId = this.getdataListParm.parammaps.logindeptId
+      this.pending.getdataListParm.parammaps.loginpastureId = this.getdataListParm.parammaps.loginpastureId
+      this.pending.getdataListParm.parammaps.empId = this.getdataListParm.parammaps.empId
+      this.pending.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
+      this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getpartpurchaseList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: Cookies.get('pasturename'),
+          orderNumber: '',
+          departmentId: '',
+          inputDatetime: '',
+          startTime: '',
+          stopTime: '',
+          loginId: Cookies.get('employeid'),
+          menu: 'Subscribe',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getpartpurchaseWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          orderNumber: this.getdataListParm.parammaps.orderNumber,
+          stuteSH: this.getdataListParm.parammaps.stuteSH,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          startTime: this.getdataListParm.parammaps.startTime,
+          stopTime: this.getdataListParm.parammaps.stopTime,
+          loginId: Cookies.get('employeid'),
+          menu: 'Subscribe',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getpartpurchaseWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          orderNumber: this.getdataListParm.parammaps.orderNumber,
+          stuteSH: this.getdataListParm.parammaps.stuteSH,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          startTime: this.getdataListParm.parammaps.startTime,
+          stopTime: this.getdataListParm.parammaps.stopTime,
+          loginId: Cookies.get('employeid'),
+          menu: 'Subscribe',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    statue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.statue == 2) {
+        return '审核中'
+      } else if (cellValue.statue == 3) {
+        return '审核中'
+      } else if (cellValue.statue == 4) {
+        return '未通过'
+      } else if (cellValue.statue == 5) {
+        return '审核中'
+      } else if (cellValue.statue == 6) {
+        return '未通过'
+      } else if (cellValue.statue == 7) {
+        return '已通过'
+      } else if (cellValue.statue == 8) {
+        return '未通过'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.listLoading = true
+      this.get_table_data()
+      this.getPendingList()
+    },
+    resetCreateTemp() {
+      this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
+      this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
+      this.createTemp.employeId = parseInt(Cookies.get('employeid'))
+      this.createTemp.createTime = parseTime(new Date(), '{y}-{m}-{d}')
+      this.createTemp.orderNumber = ''
+      this.createTemp.providerId = ''
+      this.listAdd = []
+    },
+    form_add() {
+      this.resetCreateTemp()
+      this.edit = 1
+      this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
+      this.getCreateDepartDownList()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['createTemp'].clearValidate()
+      })
+      this.getCreateNumber()
+    },
+    getCreateNumber() {
+      GetDataByName(this.getParmCreateNumber).then(response => {
+        this.$nextTick(() => {
+          console.log('新增申购单号', response.data.list[0].orderCode)
+          this.createTemp.orderNumber = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+    // getPartsListSG
+    changeProvider(item) {
+      if (item !== '') {
+        this.createTemp.providerName = this.onlineSubscriptionList.find(obj => obj.id == item).providerName
+      }
+      this.listAdd = []
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      if (this.createTemp.providerId == '') {
+        this.requestSparePart.name = 'getPartsListSG'
+      } else {
+        this.requestSparePart.name = 'getPartsListSGFlex'
+        this.requestSparePart.parammaps.providerId = this.createTemp.providerId
+        this.requestSparePart.parammaps.providerName = this.createTemp.providerName
+      }
+      this.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.requestSparePart).then(response => {
+        console.log('备件模糊查询搜索data', response.data.list)
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      console.log('备件模糊查询选中值', item.partId)
+      console.log(this.listAdd)
+      if (this.createTemp.providerId == '') {
+        if (this.listAdd.length > 0) {
+          // eslint-disable-next-line no-redeclare
+          if (this.listAdd.find(obj => obj.partId == item.partId)) {
+            this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
+          } else {
+            // this.getParmCreateAmount.parammaps.partCode = item.partCode
+            // GetDataByName(this.getParmCreateAmount).then(response => {
+            //   this.$nextTick(() => {
+            //     console.log('新增根据编号获取备件库存数量', response.data.list[0].reporteryNum)
+            //     item.reportery = response.data.list[0].reporteryNum
+            //     if (item.srcpath !== null && item.picpath) {
+            //       this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+            //       this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+            //     } else {
+            //       item.srcpath = ''
+            //       item.picpath = ''
+            //     }
+            //     this.listAdd.unshift(item)
+            //     this.$forceUpdate()
+            //   })
+            // })
+            this.getParmCreateAmount.parammaps.partCode = item.partCode
+            GetDataByName(this.getParmCreateAmount).then(response => {
+              this.$nextTick(() => {
+                console.log('新增根据编号获取备件库存数量', response.data.list[0])
+                item = response.data.list[0]
+                if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+                  this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+                  this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+                } else {
+                  item.srcpath = ''
+                  item.picpath = ''
+                }
+                this.$set(item, 'amount', '')
+                this.$set(item, 'purpose', '')
+                this.listAdd.unshift(item)
+                this.$forceUpdate()
+              })
+            })
+          }
+        } else {
+          // this.getParmCreateAmount.parammaps.partCode = item.partCode
+          // GetDataByName(this.getParmCreateAmount).then(response => {
+          //   this.$nextTick(() => {
+          //     console.log('新增根据编号获取备件库存数量', response.data.list[0].reporteryNum)
+          //     item.reportery = response.data.list[0].reporteryNum
+          //     if (item.srcpath !== null && item.picpath) {
+          //       this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+          //       this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+          //     } else {
+          //       item.srcpath = ''
+          //       item.picpath = ''
+          //     }
+          //     this.listAdd.unshift(item)
+          //     this.$forceUpdate()
+          //   })
+          // })
+          this.getParmCreateAmount.parammaps.partCode = item.partCode
+          GetDataByName(this.getParmCreateAmount).then(response => {
+            this.$nextTick(() => {
+              console.log('新增根据编号获取备件库存数量', response.data.list[0])
+              item = response.data.list[0]
+              if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+                this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+                this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+              } else {
+                item.srcpath = ''
+                item.picpath = ''
+              }
+              this.$set(item, 'amount', '')
+              this.$set(item, 'purpose', '')
+              this.listAdd.unshift(item)
+              this.$forceUpdate()
+            })
+          })
+        }
+        this.$forceUpdate()
+      } else {
+        if (this.listAdd.length > 0) {
+          if (this.listAdd.find(obj => obj.partId == item.partId)) {
+            this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
+          } else {
+            if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+              this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+              this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+            } else {
+              item.srcpath = ''
+              item.picpath = ''
+            }
+            this.$set(item, 'amount', '')
+            this.$set(item, 'purpose', '')
+            this.listAdd.unshift(item)
+          }
+        } else {
+          if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
+            this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
+            this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
+          } else {
+            item.srcpath = ''
+            item.picpath = ''
+          }
+          this.$set(item, 'amount', '')
+          this.$set(item, 'purpose', '')
+          this.listAdd.unshift(item)
+          this.$forceUpdate()
+        }
+        this.$forceUpdate()
+      }
+    },
+    add_dialog_save() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['createTemp'].validate(valid => {
+        if (valid) {
+          console.log(this.listAdd)
+          if (this.createTemp.orderNumber == '' || this.createTemp.orderNumber == null || this.createTemp.orderNumber == undefined) {
+            GetDataByName(this.getParmCreateNumber).then(response => {
+              this.$nextTick(() => {
+                console.log('新增申购单号', response.data.list[0].orderCode)
+                this.createTemp.orderNumber = response.data.list[0].orderCode
+                this.$forceUpdate()
+                this.add_dialog_saveSave()
+              })
+            })
+          } else {
+            this.add_dialog_saveSave()
+          }
+        }
+      })
+    },
+    add_dialog_saveSave() {
+      if (this.listAdd.length !== 0) {
+        for (var j = 0; j < this.listAdd.length; j++) {
+          console.log(this.listAdd[j].amount)
+          if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
+            this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
+            return false
+          } else {
+            var rulesAmount = /^[1-9]\d*$/
+            if (!rulesAmount.test(this.listAdd[j].amount)) {
+              this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
+              return false
+            }
+          }
+          if (this.createTemp.providerId !== '') {
+            if (this.listAdd[j].price == '') {
+              this.$message({ type: 'warning', message: '请检查单价是否为空', duration: 2000 })
+              return false
+            } else {
+              if (parseFloat(this.listAdd[j].price) == 0) {
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
+                return false
+              } else {
+                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,5})?$/
+                if (rulesPrice.test(this.listAdd[j].price) == false) {
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
+                  return false
+                }
+              }
+            }
+          }
+        }
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'insertBigPartpurchase', 'type': 'e', 'parammaps': {
+          pastureId: this.createTemp.pastureId,
+          departmentId: this.createTemp.departmentId,
+          orderNumber: this.createTemp.orderNumber,
+          useType: this.createTemp.useType,
+          createTime: this.createTemp.createTime,
+          employeId: this.createTemp.employeId,
+          providerId: this.createTemp.providerId
+        }}
+        // eslint-disable-next-line no-irregular-whitespace
+        this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+        this.postDataPramas.data[1].children = []
+        this.postDataPramas.data[1].children[0] = { 'name': 'insertPartpurchase', 'type': 'e', 'parammaps': {
+          bigId: '@insertBigPartpurchase.LastInsertId',
+          pastureId: '@insertSpotList.pastureId',
+          partId: '@insertSpotList.partId',
+          partCode: '@insertSpotList.partCode',
+          partName: '@insertSpotList.partName',
+          specification: '@insertSpotList.specification',
+          unit: '@insertSpotList.unit',
+          brandId: '@insertSpotList.brandId',
+          storageAmount: '@insertSpotList.reportery',
+          purpose: '@insertSpotList.purpose',
+          amount: '@insertSpotList.amount',
+          price: '@insertSpotList.price',
+          contractId: '@insertSpotList.contractId'
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '保存失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+            this.dialogFormVisible = false
+            this.getdataListParm.parammaps.inputDatetime = ''
+            this.get_table_data()
+            this.getPendingList()
+            this.$notify({
+              title: '',
+              message: '保存成功',
+              type: 'success',
+              duration: 2000
+            })
+          }
+        })
+        return true
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择备件',
+          type: 'warning',
+          duration: 2000
+        })
+        return false
+      }
+    },
+    partDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    // 查看
+    form_see(row) {
+      this.dialogStatus = 'see'
+      this.dialogFormVisibleSee = true
+      this.seeTemp = Object.assign({}, row)
+      console.log('查看上方数据(从table读取)', this.seeTemp)
+      this.listSee = []
+      this.getdataListSee.parammaps.id = this.seeTemp.id
+      this.getSeeList()
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      if (this.seeTemp.statue === 2) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
+        this.active = 1
+      } else if (this.seeTemp.statue === 3) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核' }, { title: '采购审核' }]
+        this.active = 2
+      } else if (this.seeTemp.statue === 4) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason }, { title: '供应主管审核' }, { title: '采购审核' }]
+        this.active = 2
+      } else if (this.seeTemp.statue === 5) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+        this.active = 3
+      } else if (this.seeTemp.statue === 6) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
+        this.active = 3
+      } else if (this.seeTemp.statue === 7) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+        this.active = 4
+      } else if (this.seeTemp.statue === 8) {
+        this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+        this.active = 4
+      }
+    },
+    getSeeList() {
+      GetDataByName(this.getdataListSee).then(response => {
+        if (response.data.list !== null) {
+          console.log('查看下方table数据', response.data.list)
+          this.listSee = response.data.list
+          this.listAdd = response.data.list
+          for (let i = 0; i < response.data.list.length; i++) {
+            if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
+              console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
+              this.listSee[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
+              this.listSee[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
+              this.listAdd[i].srcpath = this.listSee[i].srcpath
+              this.listAdd[i].picpath = this.listSee[i].picpath
+              // this.seeTemp.providerName = response.data.list.providerName
+              this.pageNumSee = response.data.pageNum
+              this.pageSizeSee = response.data.pageSize
+            } else {
+              this.listSee[i].srcpath = ''
+              this.listSee[i].picpath = ''
+              this.listAdd[i].srcpath = ''
+              this.listAdd[i].picpath = ''
+            }
+            console.log(process.env.VUE_APP_BASE_API)
+            console.log(this.listSee, '============')
+          }
+        }
+        if (response.data.total) {
+          this.totalSee = response.data.total
+        }
+        setTimeout(() => {
+          this.listLoadingSee = false
+        }, 100)
+      })
+    },
+    form_edit(row) {
+      this.edit = 0
+      this.getDepartParam.parammaps.pastureId = row.pastureId
+      this.getCreateDepartDownList()
+      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.getdataListSee.parammaps.id = this.createTemp.id
+      this.getSeeList()
+    },
+    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() {
+      if (this.listAdd.length !== 0) {
+        for (var j = 0; j < this.listAdd.length; j++) {
+          console.log(this.listAdd[j].amount)
+          // eslint-disable-next-line use-isnan
+          if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
+            this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
+            return false
+          } else {
+            var rulesAmount = /^[1-9]\d*$/
+            if (!rulesAmount.test(this.listAdd[j].amount)) {
+              this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
+              return false
+            }
+          }
+          if (this.createTemp.providerId !== '') {
+            if (this.listAdd[j].price == '') {
+              this.$message({ type: 'warning', message: '请检查单价是否为空', duration: 2000 })
+              return false
+            } else {
+              if (parseFloat(this.listAdd[j].price) == 0) {
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
+                return false
+              } else {
+                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,5})?$/
+                if (rulesPrice.test(this.listAdd[j].price) == false) {
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
+                  return false
+                }
+              }
+            }
+          }
+        }
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'updatepartpurchaseCharge', 'type': 'e', 'parammaps': {
+          id: this.createTemp.id
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deletePartpurchase', 'type': 'e', 'parammaps': {
+          bigId: this.createTemp.id
+        }}
+        // eslint-disable-next-line no-irregular-whitespace
+        this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+        this.postDataPramas.data[2].children = []
+        this.postDataPramas.data[2].children[0] = { 'name': 'insertPartpurchase', 'type': 'e', 'parammaps': {
+          bigId: this.createTemp.id,
+          pastureId: '@insertSpotList.pastureId',
+          partId: '@insertSpotList.partId',
+          partCode: '@insertSpotList.partCode',
+          partName: '@insertSpotList.partName',
+          specification: '@insertSpotList.specification',
+          unit: '@insertSpotList.unit',
+          brandId: '@insertSpotList.brandId',
+          storageAmount: '@insertSpotList.reportery',
+          purpose: '@insertSpotList.purpose',
+          amount: '@insertSpotList.amount',
+          price: '@insertSpotList.price',
+          contractId: '@insertSpotList.contractId'
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          console.log('新增保存发送参数', this.postDataPramas)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '保存失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+            this.dialogFormVisible = false
+            this.getdataListParm.parammaps.inputDatetime = ''
+            this.get_table_data()
+            this.$notify({
+              title: '',
+              message: '保存成功',
+              type: 'success',
+              duration: 2000
+            })
+          }
+        })
+        return true
+      } else {
+        this.$message({
+          title: '',
+          message: '请选择备件',
+          type: 'warning',
+          duration: 2000
+        })
+        return false
+      }
+    },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllProvider = response.data.findAllProvider.list
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+        this.onlineSubscriptionList = response.data.getflexProviderList.list
+        this.getDepartDownList()
+      })
+    },
+    getDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.findAllDepart = response.data.list
+      })
+    },
+    changePastureName(item) {
+      this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+      this.getdataListParm.parammaps.departmentId = ''
+      this.getDepartDownList()
+    },
+    getCreateDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.createDepartList = response.data.list
+        if (this.edit == 1) {
+          if (this.createDepartList.find(obj => obj.id == Cookies.get('departmentid'))) {
+            this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
+            this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == Cookies.get('departmentid')).name
+          } else {
+            this.createTemp.departmentId = response.data.list[0].id
+            this.createTemp.departmentName = response.data.list[0].name
+          }
+        }
+      })
+    },
+    changePasture(item) {
+      this.getDepartParam.parammaps.pastureId = item
+      this.edit = 1
+      this.getCreateDepartDownList()
+    },
+    changeDepart(item) {
+      this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
+    },
+    handleDownload() {
+      console.log('点击了下载')
+      this.$alert('备件申购正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      this.downloadParam.name = 'downloadPartpurchaseList'
+      this.downloadParam.parammaps = this.getdataListParm.parammaps
+      GetAccount(this.downloadParam).then(response => {
+        if (response.data.list !== '') {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+        this.$nextTick(() => {
+          const ExcelDatas = [
+            {
+              tHeader: ['牧场', '申购单号', '申购时间', '备件编号', '备件名称', '规格型号', '品牌', '单位', '申购数量', '申购部门', '申购人', '备注'],
+              filterVal: ['pastureName', 'orderNumber', 'inputTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'amount', 'departmentName', 'empname', 'purpose'],
+              tableDatas: response.data.list,
+              sheetName: '备件申购'
+            }
+          ]
+          json2excel(ExcelDatas, '备件申购', true, 'xlsx')
+        })
+      })
+    },
+    form_delete(row) {
+      console.log('点击了删除')
+      MessageBox.confirm('确认删除此条信息?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.postDataPramas.common = { 'returnmap': '0' }
+        this.postDataPramas.data = []
+        this.postDataPramas.data[0] = { 'name': 'deleteBigPartpurchase', 'type': 'e', 'parammaps': {
+          id: row.id
+        }}
+        this.postDataPramas.data[1] = { 'name': 'deletePartpurchase', 'type': 'e', 'parammaps': {
+          bigId: row.id
+        }}
+        ExecDataByConfig(this.postDataPramas).then(response => {
+          this.get_table_data()
+          this.$notify({
+            title: '成功',
+            message: '删除成功',
+            type: 'success',
+            duration: 2000
+          })
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+    handleExamine(row) {
+      console.log('点击了库管审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statue', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statue', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    changeStatue(val) {
+      if (val == 2) {
+        this.statueReason = true
+      } else {
+        this.statueReason = false
+      }
+    },
+    createExamineData() {
+      console.log('点击了库管审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam = {}
+          this.requestParam.name = 'partpurchaseCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statue == 1) {
+            this.requestParam.parammaps.statue = 3
+          } else if (this.examineTemp.statue == 2) {
+            this.requestParam.parammaps.statue = 4
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.get_table_data()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleExamine2(row) {
+      console.log('点击了供应主管审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statue', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statue', 1)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine2'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData2() {
+      console.log('点击了供应主管审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam = {}
+          this.requestParam.name = 'partpurchaseCharge3'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          if (this.examineTemp.statue == 1) {
+            this.requestParam.parammaps.statue = 5
+          } else if (this.examineTemp.statue == 2) {
+            this.requestParam.parammaps.statue = 6
+          }
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          PostDataByName(this.requestParam).then(response => {
+            console.log('审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.get_table_data()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.statueReason = false
+              this.$notify({
+                title: '成功',
+                message: '审核成功',
+                type: 'success',
+                duration: 2000
+              })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleExamine3(row) {
+      console.log('点击了采购审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statue', 1)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'statue', 1)
+      }
+      this.dialogStatus = 'examine3'
+      this.dialogFormVisible_Examine = true
+      this.statueReason = false
+    },
+    createExamineData3() {
+      console.log('点击了采购审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam = {}
+          this.requestParam.parammaps = {}
+          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.data = []
+          if (this.examineTemp.statue == 1) {
+            this.requestParam.data[0] = { 'name': 'partpurchaseCharge1', 'type': 'e', 'parammaps': {
+              id: this.examineTemp.id,
+              statue: 7,
+              empId: Cookies.get('employeid'),
+              workflowNote: this.examineTemp.workflowNote
+            }}
+            this.requestParam.data[1] = { 'name': 'createBuydetailBySG', 'type': 'e', 'parammaps': {
+              id: this.examineTemp.id,
+              pastureId: this.examineTemp.pastureId
+            }}
+          } else if (this.examineTemp.statue == 2) {
+            this.requestParam.data[0] = { 'name': 'partpurchaseCharge1', 'type': 'e', 'parammaps': {
+              id: this.examineTemp.id,
+              statue: 8,
+              empId: Cookies.get('employeid'),
+              workflowNote: this.examineTemp.workflowNote
+            }}
+          }
+          ExecDataByConfig(this.requestParam).then(response => {
+            if (response.msg !== 'fail') {
+              this.get_table_data()
+              this.dialogFormVisible_Examine = false
+              this.dialogFormVisible_See = false
+              this.statueReason = false
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .pagination-container{
+    display: block !important;
+  }
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>
+<style lang="scss">
+.el-step__head.is-success {
+    color: #409EFF;
+    border-color: #409EFF;
+}
+.el-step__title.is-success{
+  color: #409EFF;
+}
+.el-step__head.is-process{
+  color: #409EFF;
+  border-color: #409EFF;
+  .el-step__icon.is-text{
+    background: #409EFF;
+    color: #fff;
+  }
+}
+.step-row{
+  color: #000;
+}
+</style>

+ 41 - 33
src/views/maintenance/maintain/index.vue

@@ -78,12 +78,12 @@
       </el-table-column>
       <el-table-column label="责任人" min-width="100px" align="center">
         <template slot-scope="scope">
-          <span>{{ scope.row.employeName }}</span>
+          <span>{{ scope.row.upkeepPerson }}</span>
         </template>
       </el-table-column>
       <el-table-column label="保养人" min-width="100px" align="center">
         <template slot-scope="scope">
-          <span>{{ scope.row.upkeepPerson }}</span>
+          <span>{{ scope.row.useEmpName}}</span>
         </template>
       </el-table-column>
       <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
@@ -120,11 +120,11 @@
           <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
           <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
           <!-- 保养审核3 -->
-          <el-button v-if="(row.SHStatue == 5) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
+          <el-button v-if="(row.SHStatue == 3) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
           <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
           <!-- 保养审核2 -->
-          <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
-          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button>
+          <!-- <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button> -->
         </template>
       </el-table-column>
     </el-table>
@@ -177,8 +177,11 @@
             </el-row>
             <el-row>
               <el-col :span="8">
-                <el-form-item label="保养人:" prop="upkeepPerson">
+                <!-- <el-form-item label="保养人:" prop="upkeepPerson">
                   <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                </el-form-item> -->
+                <el-form-item label="保养人:" prop="useEmpName">
+                  <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -187,8 +190,11 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="使用人:" prop="useEmpName">
+                <!-- <el-form-item label="使用人:" prop="useEmpName">
                   <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                </el-form-item> -->
+                <el-form-item label="使用人:" prop="upkeepPerson">
+                  <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -280,11 +286,11 @@
                   <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
                   <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
                   <!-- 保养审核3 -->
-                  <el-button v-if="(seeTemp.SHStatue == 5) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                  <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
                   <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
                   <!-- 保养审核2 -->
-                  <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
-                  <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button>
+                  <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                  <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
                 </el-form-item>
               </el-col>
             </el-row>
@@ -337,8 +343,11 @@
                 </el-row>
                 <el-row>
                   <el-col :span="8">
-                    <el-form-item label="保养人:" prop="upkeepPerson">
+                    <!-- <el-form-item label="保养人:" prop="upkeepPerson">
                       <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                    </el-form-item> -->
+                    <el-form-item label="保养人:" prop="useEmpName">
+                      <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
                     </el-form-item>
                   </el-col>
                   <el-col :span="8">
@@ -347,8 +356,11 @@
                     </el-form-item>
                   </el-col>
                   <el-col :span="8">
-                    <el-form-item label="使用人:" prop="useEmpName">
+                    <!-- <el-form-item label="使用人:" prop="useEmpName">
                       <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                    </el-form-item> -->
+                    <el-form-item label="使用人:" prop="upkeepPerson">
+                      <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -440,11 +452,11 @@
                       <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
                       <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
                       <!-- 保养审核3 -->
-                      <el-button v-if="(seeTemp.SHStatue == 5) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                      <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
                       <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
                       <!-- 保养审核2 -->
-                      <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
-                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button>
+                      <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -1361,12 +1373,10 @@ export default {
         return '审核中'
       } else if (cellValue.SHStatue == 4) {
         return '未通过'
-      } else if (cellValue.SHStatue == 6) {
-        return '未通过'
+ 
       } else if (cellValue.SHStatue == 8) {
         return '未通过'
-      } else if (cellValue.SHStatue == 5) {
-        return '审核中'
+    
       } else if (cellValue.SHStatue == 7) {
         return '已通过'
       }
@@ -1388,29 +1398,27 @@ export default {
       var reason = '未通过原因:' + this.seeTemp.workflowNote
       var scores = '评分:' + this.seeTemp.scores + '分'
       if (this.seeTemp.SHStatue === 1) {
-        this.activeList = [{ title: '完成保养' }, { title: '使用人审核' }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+        this.activeList = [{ title: '保养人审核' }, { title: '机修审核' },   { title: '设备主管审核' }]
         this.active = 0
+        
       } else if (this.seeTemp.SHStatue === 2) {
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核' }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核' },  { title: '设备主管审核' }]
         this.active = 1
+
       } else if (this.seeTemp.SHStatue === 3) {
         this.active = 2
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },   { title: '设备主管审核' }]
       } else if (this.seeTemp.SHStatue === 4) {
         this.active = 2
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '部门主管审核' }, { title: '设备主管审核' }]
-      } else if (this.seeTemp.SHStatue === 5) {
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson, status: '', reason: '' }, { title: '设备主管审核' }]
-        this.active = 3
-      } else if (this.seeTemp.SHStatue === 6) {
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
-        this.active = 3
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
+        
+
       } else if (this.seeTemp.SHStatue === 7) {
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
-        this.active = 4
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },  { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
+        this.active = 3
       } else if (this.seeTemp.SHStatue === 8) {
-        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
-        this.active = 4
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },   { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
+        this.active = 3
       }
       this.dialogStatus = 'see'
       this.dialogFormVisible_See = true

+ 2194 - 0
src/views/maintenance/maintain/index1.vue

@@ -0,0 +1,2194 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
+        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.upkeepCode" placeholder="保养单号" clearable style="width: 180px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 180px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 180px;" class="filter-item" />
+      <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <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-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <div>
+        <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+          <el-radio-button label="全部" />
+          <el-badge :value="pending.total" class="item">
+            <el-radio-button label="待处理" />
+          </el-badge>
+          <el-radio-button label="已处理" />
+        </el-radio-group>
+      </div>
+    </div>
+    <el-table
+      :key="tableKey"
+      v-loading="listLoading"
+      element-loading-text="给我一点时间"
+      :data="list"
+      border
+      fit
+      highlight-current-row
+      style="width: 100%;"
+      :row-style="rowStyle"
+      :cell-style="tableCellStyle"
+      class="elTable table-fixed"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养单号" min-width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.upkeepCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="牧场" min-width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.pastureName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备内部编号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备名称" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="规格型号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.specification }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="部门" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.departmentName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="责任人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.employeName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.upkeepPerson }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
+      <el-table-column label="处理状态" min-width="100px" align="center" :formatter="statue" />
+      <el-table-column label="领用单状态" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LYStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="旧品录入状态" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LRStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="审核状态" min-width="80px" align="center" :formatter="SHStatue" />
+		<el-table-column prop="img" label="保养过程" width="180" align="center">
+        <template slot-scope="scope">
+          <!-- <el-link @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }} </el-link> -->
+           <a style="border-bottom: 1px solid #333;" @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }}</a>
+          <el-link  v-if="scope.row.videoTxt == '未录制'">未录制 </el-link>
+          <el-link  v-if="scope.row.videoTxt == '已录制未上传'">已录制未上传 </el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" min-width="300" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+          <el-button v-if="isSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+          <!-- 保养及领用-->
+          <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8 ) && row.LYStatue == '未领用' && row.statue !== 0 && isLingYong && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:80px;display:inline-block" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
+          <!-- 完成保养 -->
+          <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8) && row.statue !== 0 && isComplete && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleCompleteMaintenance(row)">完成保养</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
+          <!-- 保养审核 -->
+          <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
+          <!-- 保养审核3 -->
+          <el-button v-if="(row.SHStatue == 5) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
+          <!-- 保养审核2 -->
+          <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    <!-- 查看 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false"  v-if ="dialogFormVisible_See" width="90%">
+      <div class="app-see">
+        <div v-if="statue1" class="see">
+          <el-form
+            ref="seeTemp"
+            :rules="rules"
+            :model="seeTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="保养单号:" prop="upkeepCode">
+                  <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备名称:" prop="eqName">
+                  <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备内部编号:" prop="eqCode">
+                  <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="牧场:" prop="pastureName">
+                  <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="部门:" prop="departmentName">
+                  <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="责任人:" prop="employeName">
+                  <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="保养人:" prop="upkeepPerson">
+                  <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="保养日期:" prop="plantime">
+                  <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="使用人:" prop="useEmpName">
+                  <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="保养内容:" prop="upNameLevel">
+                  <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            :key="tableKey"
+            v-loading="listLoadingMaintenanceContent"
+            element-loading-text="给我一点时间"
+            :data="listMaintenanceContent"
+            border
+            fit
+            highlight-current-row
+            style="width: 90%;margin:0 auto;"
+            :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 + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="部位" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.positionName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="项目" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.program }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="标准" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.standard }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="执行动作" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.active }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-form
+            ref="seeTemp"
+            :rules="rules"
+            :model="seeTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col>
+                <el-form-item label="流程进度" />
+                <el-steps :active="active" align-center finish-status="success">
+                  <el-step
+                    v-for="(item,index) in activeList"
+                    :key="index"
+                    :title="item.title"
+                    :status="item.status"
+                  >
+                    <template slot="description">
+                      <div class="step-row">
+                        <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                        <div>{{ item.reason }}</div>
+                        <div>{{ item.scores }}</div>
+                      </div>
+                    </template>
+                  </el-step>
+                </el-steps>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="操作:">
+                  <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                  <!-- 完成保养 -->
+                  <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
+                  <!-- 保养审核 -->
+                  <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
+                  <!-- 保养审核3 -->
+                  <el-button v-if="(seeTemp.SHStatue == 5) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
+                  <!-- 保养审核2 -->
+                  <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                  <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div v-if="statue2" class="see">
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="保养信息" name="first">
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="保养单号:" prop="upkeepCode">
+                      <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备名称:" prop="eqName">
+                      <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备内部编号:" prop="eqCode">
+                      <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="牧场:" prop="pastureName">
+                      <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="部门:" prop="departmentName">
+                      <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="责任人:" prop="employeName">
+                      <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="保养人:" prop="upkeepPerson">
+                      <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="保养日期:" prop="plantime">
+                      <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="使用人:" prop="useEmpName">
+                      <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="12">
+                    <el-form-item label="保养内容:" prop="upNameLevel">
+                      <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingMaintenanceContent"
+                element-loading-text="给我一点时间"
+                :data="listMaintenanceContent"
+                border
+                fit
+                highlight-current-row
+                style="width: 90%;margin:0 auto;"
+                :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 + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="部位" min-width="140px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.positionName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="项目" min-width="140px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.program }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="标准" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.standard }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="执行动作" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.active }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <el-col>
+                    <el-form-item label="流程进度" />
+                    <el-steps :active="active" align-center finish-status="success">
+                      <el-step
+                        v-for="(item,index) in activeList"
+                        :key="index"
+                        :title="item.title"
+                        :status="item.status"
+                      >
+                        <template slot="description">
+                          <div class="step-row">
+                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                            <div>{{ item.reason }}</div>
+                            <div>{{ item.scores }}</div>
+                          </div>
+                        </template>
+                      </el-step>
+                    </el-steps>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col>
+                    <el-form-item label="操作:">
+                      <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                      <!-- 完成保养 -->
+                      <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
+                      <!-- 保养审核 -->
+                      <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
+                      <!-- 保养审核3 -->
+                      <el-button v-if="(seeTemp.SHStatue == 5) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
+                      <!-- 保养审核2 -->
+                      <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+            </el-tab-pane>
+            <el-tab-pane label="领用记录" name="second">
+              <el-form ref="collarUseTemp" :rules="rules" :model="collarUseTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+                <el-row>
+                  <el-col :span="6">
+                    <el-form-item label="领用单号:" prop="applyCode">
+                      <span>{{ collarUseTemp.applyCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用部门:" prop="departmentName">
+                      <span>{{ collarUseTemp.departmentName }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用日期:" prop="createDate">
+                      <span>{{ collarUseTemp.createDate }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用状态:" prop="statueName">
+                      <span>{{ collarUseTemp.statueName }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingCollarUse"
+                element-loading-text="给我一点时间"
+                :data="listCollarUse"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @cell-click="openDetails"
+                @sort-change="tableSort"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="reportery" label="库存数" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.reportery }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="amount" label="领用数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.amount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="用途" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.note }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+            <el-tab-pane label="旧品录入记录" name="third">
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingOldProducts"
+                element-loading-text="给我一点时间"
+                :data="listOldProducts"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @sort-change="tableSort"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" prop="id" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="acturalAmount" label="录入数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.acturalAmount }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px;">
+        <el-button @click="close_diago()">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 保养及领用 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ReceivingSpareParts" :close-on-click-modal="false" width="90%">
+      <el-tabs v-model="activeName2">
+        <el-tab-pane label="保养" name="first">
+          <el-form
+            ref="maintainTemp"
+            :rules="rules"
+            :model="maintainTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="使用人:" prop="employeeId">
+                  <el-select v-model="maintainTemp.employeeId" placeholder="使用人" class="filter-item" style="width: 120px;">
+                    <el-option v-for="item in empdeptList" :key="item.id" :label="item.empname" :value="item.id" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="保养内容:" prop="upNameLevel">
+                  <el-input ref="upNameLevel" v-model="maintainTemp.upNameLevel" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            :key="tableKey"
+            v-loading="listLoadingMaintenanceContent"
+            element-loading-text="给我一点时间"
+            :data="listMaintenanceContent"
+            border
+            fit
+            highlight-current-row
+            style="width: 90%;margin:0 auto;"
+            :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 + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="部位" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.positionName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="项目" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.program }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="标准" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.standard }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="执行动作" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <el-select v-model="scope.row.active" class="filter-item" style="width: 80%;">
+                  <el-option v-for="item in getDictByName" :key="item.id" :label="item. label" :value="item.value" />
+                </el-select>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="备件领用" name="second">
+          <div class="app-receivingSpareParts">
+            <el-form
+              ref="receivingTemp"
+              :rules="rules"
+              :model="receivingTemp"
+              label-position="right"
+              label-width="120px"
+              style="width: 90%;margin:0 auto;"
+            >
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="领用单号:" prop="applyCode">
+                    <span>{{ receivingTemp.applyCode }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="领用部门:" prop="departmentName">
+                    <span>{{ receivingTemp.departmentName }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="领用日期:" prop="createDate">
+                    <span>{{ receivingTemp.createDate }}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-form-item label="所需备件:" prop="partCode">
+                  <el-autocomplete
+                    v-model="receivingTemp.partCode"
+                    value-key="name"
+                    class="inline-input"
+                    :fetch-suggestions="sparePartSearch"
+                    placeholder="请输入备件编号或备件名称或备件规格"
+                    style="width:100%"
+                    @select="handleSelectSparePart"
+                  >
+                    <template slot-scope="{ item }">
+                      <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                      |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                      |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                    </template>
+                  </el-autocomplete>
+                </el-form-item>
+              </el-row>
+            </el-form>
+            <el-table
+              :key="tableKey"
+              v-loading="listLoadingCollarUse"
+              element-loading-text="给我一点时间"
+              :data="listCollarUse"
+              border
+              fit
+              highlight-current-row
+              style="width: 100%;"
+              :row-style="rowStyle"
+              :cell-style="cellStyle"
+              class="elTable"
+            >
+              <!-- table表格 -->
+              <el-table-column label="序号" align="center" type="index" width="50px">
+                <template slot-scope="scope">
+                  <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件编号" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件名称" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件规格" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.specification }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="库存数" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.reportery }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用数量" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <el-form :model="scope.row">
+                    <el-form-item prop="amount">
+                      <el-input ref="amount" v-model="scope.row.amount" style="margin-top:15px" />
+                    </el-form-item>
+                  </el-form>
+                </template>
+              </el-table-column>
+              <el-table-column label="用途" prop="note" align="center" min-width="60">
+                <template slot-scope="scope">
+                  <el-form :model="scope.row">
+                    <el-form-item prop="note">
+                      <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                    </el-form-item>
+                  </el-form>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+                <template slot-scope="{row}">
+                  <a class="del" @click="sparePartsDelete(row)">删除</a>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+      <div slot="footer" class="dialog-footer" style="bottom: 5px">
+        <el-button v-if="activeName2=='first'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData1()">确认</el-button>
+        <el-button v-if="activeName2=='second'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData2()">确认</el-button>
+        <el-button @click="dialogFormVisible_ReceivingSpareParts = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 完成保养 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_maintainComplete" :close-on-click-modal="false" width="50%">
+      <div class="maintainComplete">
+        <el-form ref="maintainCompleteTemp" :rules="rules" :model="maintainCompleteTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="是否录入旧品:" prop="isOldProducts">
+                <el-radio-group v-model="maintainCompleteTemp.isOldProducts" @change="changeIsOldProducts">
+                  <el-radio :label="0" checked>否</el-radio>
+                  <el-radio :label="1">是</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="No2">
+            <el-col :span="24">
+              <el-form-item label="旧品录入:" prop="partCode">
+                <el-autocomplete
+                  v-model="maintainCompleteTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="oldProductsSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格 "
+                  style="width:100%"
+                  @select="handleSelectOldProducts"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                    |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                    |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          v-if="No2"
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :cell-style="cellStyle"
+          class="elTable"
+          :row-style="rowStyle"
+        >
+          <!-- table表格 -->
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="acturalAmount">
+                  <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="note">
+                  <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintainComplete'?createMaintainCompleteData():createMaintainCompleteData()">确认</el-button>
+        <el-button @click="dialogFormVisible_maintainComplete = false;">关闭</el-button>
+      </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 auto;line-height:50px">请确认保养审核结果:</h3>
+        <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
+          <el-row style="width:88%;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.isStatue" @change="changeIsStatue">
+                  <el-radio :label="3">通过</el-radio>
+                  <el-radio :label="4">不通过</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="isStatueReason" :span="20">
+              <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入保养不通过的原因" />
+            </el-col>
+          </el-row>
+          <el-row v-if="examineTemp.SHStatue == 2 && examineTemp.isStatue == 3" style="width:90%;margin:0 auto;">
+            <el-col :span="24">
+              <el-form-item label="评分:" prop="scores">
+                <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
+        <el-button @click="dialogFormVisible_examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 视频 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_video" :close-on-click-modal="false" width="60%">
+      <div class="app-video">
+        <el-form ref="videoTemp" :rules="rules" :model="videoTemp" label-position="right" style="width: 80%;min-height:150px;margin:0 auto;">
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="" prop="scores">
+                <video :src="videoTemp.videoPath" controls="controls" style="width:90%;height:450px;margin:0 auto;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// 引入
+import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
+// import { mapGetters } from 'vuex'
+import waves from '@/directive/waves' // waves directive
+import { parseTime, sortChange } from '@/utils/index.js'
+// eslint-disable-next-line no-unused-vars
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import Cookies from 'js-cookie'
+import { MessageBox } from 'element-ui'
+export default {
+  name: 'Maintain',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      active: 0,
+      activeList: [],
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      isokDisable: false,
+      rules: {
+        employeeId: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+      findAllPasture: [],
+      findAllDepart: [],
+      findAllEmploye: [],
+      requestParams: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
+        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['保养模板执行动作'] }
+      ],
+      getDepartParam: {
+        name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
+      },
+      statues: [{ id: '0', name: '已逾期' }, { id: '1', name: '保养中' }, { id: '2', name: '保养完成' }],
+      SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      empdeptList: [],
+      getDictByName: [],
+      radio2: '全部',
+      textMap: {
+        see: '查看详情',
+        receivingSpareParts: '保养及领用',
+        maintainComplete: '完成保养',
+        examine: '保养审核',
+        examine2: '保养审核2',
+        examine3: '保养审核3',
+        video: '视频'
+      },
+      dialogStatus: '',
+      radioAll: '全部',
+      getdataListParm: {
+        name: 'getBigupkeepList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          inputDatetime: '',
+          upkeepCode: '',
+          eqName: '',
+          eqCode: '',
+          departmentId: '',
+          statue: '',
+          pastureName: Cookies.get('pasturename'),
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          SHStatue: '',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+      },
+      total: 0,
+      tableKey: 0,
+      listLoading: false,
+      list: [],
+      // 查看
+      dialogFormVisible_See: false,
+      seeTemp: {},
+      statue1: false,
+      statue2: false,
+      activeName: 'first',
+      listLoadingMaintenanceContent: false,
+      listMaintenanceContent: [],
+      getMaintenanceContentParm: {
+        name: 'getUpkeepTemplateListbyeqV2',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      Reason: false,
+      // 查看-领用记录
+      getCollarUseParm: {
+        name: 'getPartsapplybyMt',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      collarUseTemp: {},
+      // 查看-领用记录table
+      getCollarUseListParm: {
+        name: 'getpartapplyListBybig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingCollarUse: false,
+      listCollarUse: [],
+      // 查看-旧品录入记录table
+      getOldProductsParm: {
+        name: 'getMaintainRefuse',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingOldProducts: false,
+      listOldProducts: [],
+      // 保养及领用
+      dialogFormVisible_ReceivingSpareParts: false,
+      activeName2: 'first',
+      maintainTemp: {},
+      receivingTemp: {},
+      getEmpdeptParm: {
+        name: 'getEmpdept',
+        returntype: 'Map',
+        parammaps: {
+          deptId: ''
+        }
+      },
+      getAutoCreatCodeParm: {
+        name: 'autoCreatCode',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'LY'
+        }
+      },
+      requestSparePart: {
+        name: 'getPartsListLY',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+
+      postDataPramas: {},
+      // 完成保养
+      dialogFormVisible_maintainComplete: false,
+      maintainCompleteTemp: {},
+      requestOldProducts: {
+        name: 'getAllPartsListWB',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      No2: false,
+      listAdd: [],
+      // 保养审核
+      dialogFormVisible_examine: false,
+      requestParam: {},
+      examineTemp: {
+        isStatue: 3
+      },
+      isStatueReason: false,
+      // 权限按钮
+      isSee: [],
+      isLingYong: [],
+      isComplete: [],
+      isCharge: [],
+      isLeaderCharge: [],
+      isDepartmentCharge: [],
+      buttons: [],
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getBigupkeepWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {}
+        }
+      },
+      dialogFormVisible_video: false,
+      videoTemp: {},
+      requestParam2: {}
+    }
+  },
+  // computed: {
+  //   ...mapGetters([
+  //     'sidebar',
+  //     'avatar',
+  //     'employeid',
+  //     'pastureid'
+  //   ])
+  // },
+  computed: {
+    space() {
+      const { isSimple, $parent: { space }} = this
+      return isSimple ? '' : space
+    },
+    style: function() {
+      const style = {}
+      const parent = this.$parent
+      const len = parent.steps.length
+
+      const space =
+        typeof this.space === 'number'
+          ? this.space + 'px'
+          : this.space
+            ? this.space
+            : 100 / (len - (this.isCenter ? 0 : 1)) + '%'
+      style.flexBasis = space
+      if (this.isVertical) return style
+      if (this.isLast) {
+        style.maxWidth = 100 / this.stepsCount + '%'
+      } else {
+        style.marginRight = -this.$parent.stepOffset + 'px'
+      }
+      return style
+    }
+  },
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+    if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'MaintenancePlan') {
+      this.getdataListParm.parammaps.eqCode = this.$route.query.eqCode
+      this.getdataListParm.parammaps.inputDatetime = [this.$route.query.time, this.$route.query.time]
+      this.getdataListParm.parammaps.startTime = this.$route.query.time
+      this.getdataListParm.parammaps.stopTime = this.$route.query.time
+    }
+    this.get_select_list()
+    this.get_table_data()
+    this.getPendingList()
+  },
+  methods: {
+    // handleCheck(row) {
+    //   this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
+    //   this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
+    // },
+    tableSort(column) {
+      if (this.activeName == 'second') {
+        sortChange(column, this.listCollarUse)
+      } else if (this.activeName == 'third') {
+        sortChange(column, this.listOldProducts)
+      }
+    },
+    get_auto_buttons() {
+      // 查看
+      const See = 'maintenance:maintain:see'
+      const isSee = checkButtons(JSON.parse(sessionStorage.buttons), See)
+      this.isSee = isSee
+      //  保养及领用
+      const LingYong = 'maintenance:maintain:lingyong'
+      const isLingYong = checkButtons(JSON.parse(sessionStorage.buttons), LingYong)
+      this.isLingYong = isLingYong
+      //  完成保养
+      const Complete = 'maintenance:maintain:complete'
+      const isComplete = checkButtons(JSON.parse(sessionStorage.buttons), Complete)
+      this.isComplete = isComplete
+      //  使用人保养审核
+      const Charge = 'maintenance:maintain:charge'
+      const isCharge = checkButtons(JSON.parse(sessionStorage.buttons), Charge)
+      this.isCharge = isCharge
+      //  主管审核
+      const LeaderCharge = 'maintenance:maintain:leaderCharge'
+      const isLeaderCharge = checkButtons(JSON.parse(sessionStorage.buttons), LeaderCharge)
+      this.isLeaderCharge = isLeaderCharge
+      // 部门审核
+      const DeptCharge = 'maintenance:maintain:deptcharge'
+      const isDepartmentCharge = checkButtons(JSON.parse(sessionStorage.buttons), DeptCharge)
+      this.isDepartmentCharge = isDepartmentCharge
+    },
+    // next() {
+    //   if (this.active++ > 2) this.active = 0
+    //   this.finishStatus = 'error'
+    // },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+        this.getDictByName = response.data.getDictByName.list
+        this.getDepartDownList()
+      })
+    },
+    getDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.findAllDepart = response.data.list
+      })
+    },
+    changePastureName(item) {
+      this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+      this.getdataListParm.parammaps.departmentId = ''
+      this.getDepartDownList()
+    },
+
+    close_diago(){
+      console.log(11111111111111)
+      this.dialogFormVisible_See = false
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps = {
+        inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+        pastureName: this.getdataListParm.parammaps.pastureName,
+        SHStatue: this.getdataListParm.parammaps.SHStatue,
+        upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+        eqName: this.getdataListParm.parammaps.eqName,
+        eqCode: this.getdataListParm.parammaps.eqCode,
+        departmentId: this.getdataListParm.parammaps.departmentId,
+        statue: this.getdataListParm.parammaps.statue,
+        loginId: Cookies.get('employeid'),
+        menu: 'Maintain',
+        logindeptId: Cookies.get('departmentid'),
+        loginpastureId: Cookies.get('pastureid'),
+        empId: Cookies.get('employeid'),
+        pastureId: Cookies.get('pastureid'),
+        deptId: Cookies.get('departmentid')
+      }
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      if (this.getdataListParm.parammaps.inputDatetime !== undefined && this.getdataListParm.parammaps.inputDatetime !== '') {
+        this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
+        this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      this.listLoading = true
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.$set(response.data.list[i], 'img', '视频')
+          }
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+        // Just to simulate the time of the request
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+    tableCellStyle({ row, column, rowIndex, columnIndex }) {
+      if (row.statue == 0 && columnIndex === 10) {
+        return {
+          background: 'red',
+          color: '#fff'
+        }
+      }
+      return {
+        background: ''
+      }
+    },
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getBigupkeepList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: '',
+          upkeepCode: '',
+          eqName: '',
+          eqCode: '',
+          departmentId: '',
+          statue: '',
+          pastureName: Cookies.get('pasturename'),
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          SHStatue: '',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getBigupkeepWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          statue: this.getdataListParm.parammaps.statue,
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getBigupkeepWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          statue: this.getdataListParm.parammaps.statue,
+
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    statue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.statue == 0) {
+        return '已逾期'
+      } else if (cellValue.statue == 1) {
+        return '保养中'
+      } else if (cellValue.statue == 2) {
+        return '已完成'
+      }
+    },
+    SHStatue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.SHStatue == 1) {
+        return ''
+      } else if (cellValue.SHStatue == 2) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 3) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 4) {
+        return '未通过'
+      } else if (cellValue.SHStatue == 6) {
+        return '未通过'
+      } else if (cellValue.SHStatue == 8) {
+        return '未通过'
+      } else if (cellValue.SHStatue == 5) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 7) {
+        return '已通过'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      this.listLoading = true
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+      this.getPendingList()
+    },
+    form_see(row) {
+      this.seeTemp = Object.assign({}, row)
+      console.log('查看', this.seeTemp)
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      var scores = '评分:' + this.seeTemp.scores + '分'
+      if (this.seeTemp.SHStatue === 1) {
+        this.activeList = [{ title: '完成保养' }, { title: '使用人审核' }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+        this.active = 0
+      } else if (this.seeTemp.SHStatue === 2) {
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核' }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+        this.active = 1
+
+      } else if (this.seeTemp.SHStatue === 3) {
+        this.active = 2
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+      } else if (this.seeTemp.SHStatue === 4) {
+        this.active = 2
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '部门主管审核' }, { title: '设备主管审核' }]
+        
+      } else if (this.seeTemp.SHStatue === 5) {
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson, status: '', reason: '' }, { title: '设备主管审核' }]
+        this.active = 3
+      } else if (this.seeTemp.SHStatue === 6) {
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
+        this.active = 3
+      } else if (this.seeTemp.SHStatue === 7) {
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
+        this.active = 4
+      } else if (this.seeTemp.SHStatue === 8) {
+        this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '部门主管审核', date: this.seeTemp.deptChargeDate, name: this.seeTemp.deptChargePerson }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
+        this.active = 4
+      }
+      this.dialogStatus = 'see'
+      this.dialogFormVisible_See = true
+      if (this.seeTemp.SHStatue !== 1) {
+        // 查看显示类型2
+        this.statue1 = false
+        this.statue2 = true
+        this.getMaintenanceContentList()
+      } else {
+        if (this.seeTemp.SHStatue == 1 && this.seeTemp.LYStatue == '未领用' && this.seeTemp.LRStatue == '未录入') {
+          // 查看显示类型1
+          this.statue1 = true
+          this.statue2 = false
+          this.getMaintenanceContentList()
+        } else {
+          // 查看显示类型2
+          this.statue1 = false
+          this.statue2 = true
+          this.getMaintenanceContentList()
+        }
+      }
+      this.collarUseTemp = {}
+      this.listCollarUse = []
+      this.getCollarUse()
+      this.getOldProductsList()
+    },
+    getMaintenanceContentList() {
+      this.getMaintenanceContentParm.parammaps.id = this.seeTemp.id
+      this.listLoadingMaintenanceContent = false
+      GetDataByName(this.getMaintenanceContentParm).then(response => {
+        console.log('保养内容table数据', response.data.list)
+        this.listMaintenanceContent = response.data.list
+        this.$forceUpdate()
+        setTimeout(() => {
+          this.listLoadingMaintenanceContent = false
+        }, 100)
+      })
+    },
+    openDetails(row, column, cell, event) {
+      if (column.label !== '操作') {
+        this.$router.push({ path: '/customs/Receive', query: { applyCode: this.collarUseTemp.applyCode }})
+      }
+    },
+    getCollarUse() {
+      this.getCollarUseParm.parammaps.RUCode = this.seeTemp.upkeepCode
+      GetDataByName(this.getCollarUseParm).then(response => {
+        this.collarUseTemp = response.data.list[0]
+        if (response.data.list.length > 0) {
+          console.log('领用记录数据', response.data.list[0])
+          if (response.data.list[0].statue == 0) {
+            this.$set(this.collarUseTemp, 'statueName', '未领用')
+          } else {
+            this.$set(this.collarUseTemp, 'statueName', '已领用')
+          }
+        }
+        this.getCollarUseList()
+      })
+    },
+    getCollarUseList() {
+      this.getCollarUseListParm.parammaps.id = this.collarUseTemp.id
+      this.listLoadingCollarUse = true
+      GetDataByName(this.getCollarUseListParm).then(response => {
+        console.log('领用table数据', response.data.list)
+        this.listCollarUse = response.data.list
+        setTimeout(() => {
+          this.listLoadingCollarUse = false
+        }, 100)
+      })
+    },
+    getOldProductsList() {
+      this.getOldProductsParm.parammaps.repairCode = this.seeTemp.upkeepCode
+      this.listLoadingOldProducts = true
+      GetDataByName(this.getOldProductsParm).then(response => {
+        console.log('旧品录入记录table数据', response.data.list)
+        this.listOldProducts = response.data.list
+        setTimeout(() => {
+          this.listLoadingOldProducts = false
+        }, 100)
+      })
+    },
+    // 保养及领用
+    handleReceivingSpareParts(row) {
+      console.log('点击了保养及领用')
+      if (row == undefined) {
+        this.receivingTemp = this.seeTemp
+      } else {
+        this.receivingTemp = Object.assign({}, row)
+      }
+      this.maintainTemp = this.receivingTemp
+      this.maintainTemp.employeeId = String(this.maintainTemp.useEmpId)
+      this.seeTemp = this.maintainTemp
+      this.listCollarUse = []
+      this.getAutoCreatCode()
+      this.receivingTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
+      this.getEmpdeptList()
+      this.getCollarUse()
+      this.getMaintenanceContentList()
+      this.dialogStatus = 'receivingSpareParts'
+      this.dialogFormVisible_ReceivingSpareParts = true
+    },
+    getEmpdeptList() {
+      this.getEmpdeptParm.parammaps.deptId = this.maintainTemp.departmentId
+      GetDataByName(this.getEmpdeptParm).then(response => {
+        console.log('保养使用人', response.data.list)
+        if (response.data.list !== null) {
+          this.empdeptList = response.data.list
+        } else {
+          this.empdeptList = []
+        }
+      })
+    },
+    getAutoCreatCode() {
+      GetDataByName(this.getAutoCreatCodeParm).then(response => {
+        console.log('领用领用单号', response.data.list[0])
+        this.receivingTemp.applyCode = response.data.list[0].orderCode
+        this.$forceUpdate()
+      })
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      this.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.requestSparePart).then(response => {
+        console.log('备件模糊查询搜索data', response.data.list)
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      if (this.listCollarUse.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listCollarUse.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此备件已存在,请重新选择备件'
+          })
+        } else {
+          this.listCollarUse.unshift(item)
+        }
+      } else {
+        this.listCollarUse = []
+        this.listCollarUse.unshift(item)
+      }
+    },
+    createReceivingSparePartseData1() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['maintainTemp'].validate(valid => {
+        if (valid) {
+          this.postDataPramas.common = { 'returnmap': '0' }
+          this.postDataPramas.data = []
+          this.postDataPramas.data[0] = { 'name': 'updateEquseEmpId', 'type': 'e', 'parammaps': {
+            employeeId: this.maintainTemp.employeeId,
+            id: this.maintainTemp.id
+          }}
+          this.postDataPramas.data[1] = { 'name': 'deleteutupbyBigid', 'type': 'e', 'parammaps': {
+            id: this.maintainTemp.id
+          }}
+          this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listMaintenanceContent }}
+          this.postDataPramas.data[2].children = []
+          this.postDataPramas.data[2].children[0] = { 'name': 'insertutup', 'type': 'e', 'parammaps': {
+            id: this.maintainTemp.id,
+            positionName: '@insertSpotList.positionName',
+            program: '@insertSpotList.program',
+            standard: '@insertSpotList.standard',
+            active: '@insertSpotList.active'
+          }}
+          ExecDataByConfig(this.postDataPramas).then(response => {
+            console.log('添加领用保存发送参数', this.postDataPramas)
+            if (response.msg === 'fail') {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.dialogFormVisible_ReceivingSpareParts = false
+              this.dialogFormVisible_See = false
+              this.get_table_data()
+              this.getPendingList()
+              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    createReceivingSparePartseData2() {
+      console.log('点击了保养及领用保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['receivingTemp'].validate(valid => {
+        if (valid) {
+          if (this.listCollarUse.length !== 0) {
+            for (var i = 0; i < this.listCollarUse.length; i++) {
+              console.log(this.listCollarUse[i].amount)
+              if (this.listCollarUse[i].amount !== undefined) {
+                var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                if (!rulesAmount.test(this.listCollarUse[i].amount)) {
+                  this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数', duration: 2000 })
+                  return false
+                } else if (parseFloat(this.listCollarUse[i].amount) > parseFloat(this.listCollarUse[i].reportery)) {
+                  this.$message({ type: 'error', message: '领用数量不可大于库存数', duration: 2000 })
+                  return false
+                }
+              } else {
+                this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
+                return false
+              }
+            }
+            let mySumPrice = 0
+            for (let i = 0; i < this.listCollarUse.length; i++) {
+              mySumPrice += parseFloat(this.listCollarUse[i].price) * parseFloat(this.listCollarUse[i].amount)
+            }
+            if (mySumPrice > 500) {
+              this.receivingTemp.SHStatus = 2
+            } else {
+              this.receivingTemp.SHStatus = 9
+            }
+            this.postDataPramas.common = { 'returnmap': '0' }
+            this.postDataPramas.data = []
+            this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
+              pastureId: this.$store.state.user.pastureid,
+              applyCode: this.receivingTemp.applyCode,
+              applyType: 2,
+              departmentId: this.receivingTemp.departmentId,
+              empId: this.receivingTemp.upkeepPersonId,
+              applyDate: this.receivingTemp.createDate,
+              RUCode: this.receivingTemp.upkeepCode,
+              SHStatus: this.receivingTemp.SHStatus
+            }}
+            this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listCollarUse }}
+            this.postDataPramas.data[1].children = []
+            this.postDataPramas.data[1].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
+              bigId: '@insertBigpartapply.LastInsertId',
+              pastureId: '@insertSpotList.pastureId',
+              partId: '@insertSpotList.partId',
+              partCode: '@insertSpotList.partCode',
+              partName: '@insertSpotList.partName',
+              specification: '@insertSpotList.specification',
+              brandId: '@insertSpotList.brandId',
+              price: '@insertSpotList.price',
+              amount: '@insertSpotList.amount',
+              eqName: this.receivingTemp.eqName,
+              eqCode: this.receivingTemp.eqCode,
+              providerId: '@insertSpotList.providerId',
+              note: '@insertSpotList.note',
+              reportery: '@insertSpotList.reportery',
+              contractId: '@insertSpotList.contractId',
+              locationId: '@insertSpotList.locationId'
+            }}
+            ExecDataByConfig(this.postDataPramas).then(response => {
+              console.log('添加领用保存发送参数', this.postDataPramas)
+              if (response.msg === 'fail') {
+                this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              } else {
+                this.dialogFormVisible_ReceivingSpareParts = false
+                this.dialogFormVisible_See = false
+                this.get_table_data()
+                this.getPendingList()
+                this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+              }
+            })
+            // return true
+          } else {
+            this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+            return false
+          }
+        }
+      })
+    },
+    // 完成保养
+    handleCompleteMaintenance(row) {
+      console.log('点击了完成保养', row)
+      if (row == undefined) {
+        this.$set(this.seeTemp, 'isOldProducts', 0)
+        this.maintainCompleteTemp = this.seeTemp
+      } else {
+        this.maintainCompleteTemp = Object.assign({}, row)
+        this.$set(this.maintainCompleteTemp, 'isOldProducts', 0)
+      }
+      this.dialogStatus = 'maintainComplete'
+      this.No2 = false
+      this.dialogFormVisible_maintainComplete = true
+      this.listAdd = []
+    },
+    changeIsOldProducts(val) {
+      console.log(val)
+      if (val == 1) {
+        this.No2 = true
+      } else {
+        this.No2 = false
+      }
+    },
+    oldProductsSearch(queryString, cb) {
+      console.log('旧品录入模糊查询输入值', queryString)
+      this.requestOldProducts.parammaps.partCode = queryString
+      this.requestOldProducts.parammaps.RUCode = this.maintainCompleteTemp.upkeepCode
+      GetDataByName(this.requestOldProducts).then(response => {
+        console.log('旧品录入模糊查询搜索data', response.data.list)
+        cb(response.data.list)
+      })
+    },
+    handleSelectOldProducts(item) {
+      this.maintainCompleteTemp.partCode = ''
+      console.log('旧品录入模糊查询选中值', item)
+      if (this.listAdd.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此旧品已存在,请重新选择旧品'
+          })
+        } else {
+          if (item.checkoutNumber == null) {
+            this.$set(item, 'checkoutNumber', item.reportery)
+          }
+          this.listAdd.unshift(item)
+        }
+      } else {
+        if (item.checkoutNumber == null) {
+          this.$set(item, 'checkoutNumber', item.reportery)
+        }
+        this.listAdd.unshift(item)
+      }
+    },
+    sparePartsDelete(row) {
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listCollarUse.length; i++) {
+          console.log(this.listCollarUse[i])
+          if (this.listCollarUse[i].id === row.id) {
+            var listCollarUseIndex = this.listCollarUse.indexOf(this.listCollarUse[i])
+          }
+          if (listCollarUseIndex > -1) {
+            this.listCollarUse.splice(listCollarUseIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    partDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    // 完成保养-保存
+    createMaintainCompleteData() {
+      console.log('点击了完成保养确认', this.maintainCompleteTemp)
+      console.log('点击了完成保养确认', this.maintainCompleteTemp.laidcou)
+      if (this.maintainCompleteTemp.laidcou == 0) {
+        if (this.maintainCompleteTemp.isOldProducts == 0) {
+          console.log('否')
+          this.requestParam.name = 'completeUpkeep'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.maintainCompleteTemp.id
+          PostDataByName(this.requestParam).then((response) => {
+            if (response.msg !== 'fail') {
+
+
+              //如果有设备记录仪的权限
+              if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
+                // 临时注释
+                  if (this.maintainCompleteTemp.videoTxt == '已录制') {
+                    this.requestParam2.name = 'upkeepChargDone'
+                    this.requestParam2.parammaps = {}
+                    this.requestParam2.parammaps.id = this.maintainCompleteTemp.id
+                    this.requestParam2.parammaps.statue = 7
+                    this.requestParam2.parammaps.orderStatue = 2
+                    this.requestParam2.parammaps.empId = Cookies.get('employeid')
+                    PostDataByName(this.requestParam2).then(response => {
+                      if (response.msg !== 'fail') {
+                        if (this.getdataListParm.parammaps.inputDatetime === null) {
+                          this.getdataListParm.parammaps.inputDatetime = ''
+                        }
+                        this.get_table_data()
+                        this.dialogFormVisible_maintainComplete = false
+                        this.dialogFormVisible_See = false
+                        this.getPendingList()
+                        this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+                      } else {
+                        failproccess(response, this.$notify)
+                      }
+                    })
+                  }
+              // 临时注释
+              }else{
+                //正常流程。没有记录仪权限
+
+                 if (this.getdataListParm.parammaps.inputDatetime === null) {
+                    this.getdataListParm.parammaps.inputDatetime = ''
+                  }
+                  this.dialogFormVisible_maintainComplete = false
+                  this.dialogFormVisible_See = false
+                  this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+                  this.get_table_data()
+                  this.getPendingList()
+              }
+
+
+              
+
+
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        } else {
+          console.log('是')
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          this.$refs['maintainCompleteTemp'].validate(valid => {
+            if (valid) {
+              if (this.listAdd.length !== 0) {
+                for (var i = 0; i < this.listAdd.length; i++) {
+                  if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
+                    this.$message({
+                      type: 'warning',
+                      message: '请录入数量是否未填写',
+                      duration: 2000
+                    })
+                    return false
+                  } else {
+                    var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                    if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
+                      this.$message({
+                        type: 'error',
+                        message: '录入数量请输入正数,最多保留两位小数点',
+                        duration: 2000
+                      })
+                      return false
+                    }
+                  }
+                }
+                this.postDataPramas.common = { 'returnmap': '0' }
+                this.postDataPramas.data = []
+                this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+                this.postDataPramas.data[0].children = []
+                this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
+                  pastureId: Cookies.get('pastureid'),
+                  deptId: this.maintainCompleteTemp.departmentId,
+                  partCode: '@insertSpotList.partCode',
+                  partName: '@insertSpotList.partName',
+                  partId: '@insertSpotList.id',
+                  specification: '@insertSpotList.specification',
+                  unit: '@insertSpotList.unit',
+                  acturalAmount: '@insertSpotList.acturalAmount',
+                  eqId: this.maintainCompleteTemp.eqId,
+                  eqCode: this.maintainCompleteTemp.eqCode,
+                  eqName: this.maintainCompleteTemp.eqName,
+                  repairCode: this.maintainCompleteTemp.upkeepCode,
+                  listType: 1
+                }}
+                this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
+                  id: this.maintainCompleteTemp.id
+                }}
+                ExecDataByConfig(this.postDataPramas).then(response => {
+                  console.log('完成维修-是-保存发送参数', this.postDataPramas)
+                  if (response.msg === 'fail') {
+                    this.$notify({
+                      title: '保存失败',
+                      message: response.data,
+                      type: 'warning',
+                      duration: 2000
+                    })
+                  } else {
+                    this.dialogFormVisible_maintainComplete = false
+                    this.dialogFormVisible_See = false
+                    this.get_table_data()
+                    this.getPendingList()
+                    this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+                  }
+                })
+                return true
+              } else {
+                this.$notify({
+                  title: '',
+                  message: '请完善旧品信息',
+                  type: 'warning',
+                  duration: 2000
+                })
+                return false
+              }
+            }
+          })
+        }
+      } else {
+        this.$notify({ message: '备件未领用不可完成保养', type: 'warning', duration: 2000 })
+      }
+    },
+    // 保养审核
+    handleExamine(row) {
+      console.log('点击了保养审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_examine = true
+    },
+    changeIsStatue(val) {
+      console.log(val)
+      if (val == 4) {
+        this.isStatueReason = true
+      } else {
+        this.isStatueReason = false
+      }
+    },
+    // 保养审核1
+    createExamineData() {
+      console.log('点击了保养审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'upkeepCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          this.requestParam.parammaps.statue = this.examineTemp.isStatue
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          if (this.requestParam.parammaps.statue == 4) {
+            this.requestParam.parammaps.scores = 5
+          } else {
+            this.requestParam.parammaps.scores = this.examineTemp.scores
+          }
+          PostDataByName(this.requestParam).then(response => {
+            console.log('保养审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.dialogFormVisible_examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.getPendingList()
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    // 保养审核2
+    handleExamine2(row) {
+      console.log('点击了保养审核------', row)
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine2'
+      this.dialogFormVisible_examine = true
+    },
+    // 保养审核2-保存
+    createExamineData2() {
+      if (this.examineTemp.isStatue == 3) {
+        console.log('点击了保养审核2确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepChargDone'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 7
+            this.requestParam.parammaps.orderStatue = 2
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了保养审核2确认-不通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge1'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 8
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    // 保养审核2
+    handleExamine3(row) {
+      console.log('点击了保养审核------', row)
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine3'
+      this.dialogFormVisible_examine = true
+    },
+    // 保养审核3-保存
+    createExamineData3() {
+      if (this.examineTemp.isStatue == 3) {
+        console.log('点击了保养审核3确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge3'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 5
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了保养审核3确认-不通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge3'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 6
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    preview(row) {
+      console.log(row, '=====666')
+      this.dialogStatus = 'video'
+      this.dialogFormVisible_video = true
+      // row.videoPath = 'https://sys.mcs8.net:7706' + row.videoPath
+      this.videoTemp = Object.assign({}, row)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>
+<style lang="scss">
+.el-step__head.is-success {
+    color: #409EFF;
+    border-color: #409EFF;
+}
+.el-step__title.is-success{
+  color: #409EFF;
+}
+.el-step__head.is-process{
+  color: #409EFF;
+  border-color: #409EFF;
+  .el-step__icon.is-text{
+    background: #409EFF;
+    color: #fff;
+  }
+}
+.step-row{
+  color: #000;
+}
+</style>

+ 2188 - 0
src/views/maintenance/maintain/index流程改了一半.vue

@@ -0,0 +1,2188 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
+        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.upkeepCode" placeholder="保养单号" clearable style="width: 180px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 180px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 180px;" class="filter-item" />
+      <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <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-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <div>
+        <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+          <el-radio-button label="全部" />
+          <el-badge :value="pending.total" class="item">
+            <el-radio-button label="待处理" />
+          </el-badge>
+          <el-radio-button label="已处理" />
+        </el-radio-group>
+      </div>
+    </div>
+    <el-table
+      :key="tableKey"
+      v-loading="listLoading"
+      element-loading-text="给我一点时间"
+      :data="list"
+      border
+      fit
+      highlight-current-row
+      style="width: 100%;"
+      :row-style="rowStyle"
+      :cell-style="tableCellStyle"
+      class="elTable table-fixed"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养单号" min-width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.upkeepCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="牧场" min-width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.pastureName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备内部编号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备名称" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="规格型号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.specification }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="部门" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.departmentName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="责任人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.employeName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.upkeepPerson }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
+      <el-table-column label="处理状态" min-width="100px" align="center" :formatter="statue" />
+      <el-table-column label="领用单状态" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LYStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="旧品录入状态" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LRStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="审核状态" min-width="80px" align="center" :formatter="SHStatue" />
+		<el-table-column prop="img" label="保养过程" width="180" align="center">
+        <template slot-scope="scope">
+          <!-- <el-link @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }} </el-link> -->
+           <a style="border-bottom: 1px solid #333;" @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }}</a>
+          <el-link  v-if="scope.row.videoTxt == '未录制'">未录制 </el-link>
+          <el-link  v-if="scope.row.videoTxt == '已录制未上传'">已录制未上传 </el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" min-width="300" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+          <el-button v-if="isSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+          <!-- 保养及领用-->
+          <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8 ) && row.LYStatue == '未领用' && row.statue !== 0 && isLingYong && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:80px;display:inline-block" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
+          <!-- 完成保养 -->
+          <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8) && row.statue !== 0 && isComplete && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleCompleteMaintenance(row)">完成保养</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
+          <!-- 保养审核 -->
+          <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
+          <!-- 保养审核3 -->
+          <el-button v-if="(row.SHStatue == 3) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
+          <!-- 保养审核2 -->
+          <!-- <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button> -->
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    <!-- 查看 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false"  v-if ="dialogFormVisible_See" width="90%">
+      <div class="app-see">
+        <div v-if="statue1" class="see">
+          <el-form
+            ref="seeTemp"
+            :rules="rules"
+            :model="seeTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="保养单号:" prop="upkeepCode">
+                  <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备名称:" prop="eqName">
+                  <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备内部编号:" prop="eqCode">
+                  <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="牧场:" prop="pastureName">
+                  <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="部门:" prop="departmentName">
+                  <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="责任人:" prop="employeName">
+                  <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="保养人:" prop="upkeepPerson">
+                  <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="保养日期:" prop="plantime">
+                  <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="使用人:" prop="useEmpName">
+                  <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="保养内容:" prop="upNameLevel">
+                  <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            :key="tableKey"
+            v-loading="listLoadingMaintenanceContent"
+            element-loading-text="给我一点时间"
+            :data="listMaintenanceContent"
+            border
+            fit
+            highlight-current-row
+            style="width: 90%;margin:0 auto;"
+            :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 + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="部位" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.positionName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="项目" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.program }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="标准" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.standard }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="执行动作" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.active }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-form
+            ref="seeTemp"
+            :rules="rules"
+            :model="seeTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col>
+                <el-form-item label="流程进度" />
+                <el-steps :active="active" align-center finish-status="success">
+                  <el-step
+                    v-for="(item,index) in activeList"
+                    :key="index"
+                    :title="item.title"
+                    :status="item.status"
+                  >
+                    <template slot="description">
+                      <div class="step-row">
+                        <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                        <div>{{ item.reason }}</div>
+                        <div>{{ item.scores }}</div>
+                      </div>
+                    </template>
+                  </el-step>
+                </el-steps>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="操作:">
+                  <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                  <!-- 完成保养 -->
+                  <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
+                  <!-- 保养审核 -->
+                  <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
+                  <!-- 保养审核3 -->
+                  <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
+                  <!-- 保养审核2 -->
+                  <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                  <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div v-if="statue2" class="see">
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="保养信息" name="first">
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="保养单号:" prop="upkeepCode">
+                      <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备名称:" prop="eqName">
+                      <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备内部编号:" prop="eqCode">
+                      <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="牧场:" prop="pastureName">
+                      <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="部门:" prop="departmentName">
+                      <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="责任人:" prop="employeName">
+                      <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="保养人:" prop="upkeepPerson">
+                      <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="保养日期:" prop="plantime">
+                      <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="使用人:" prop="useEmpName">
+                      <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="12">
+                    <el-form-item label="保养内容:" prop="upNameLevel">
+                      <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingMaintenanceContent"
+                element-loading-text="给我一点时间"
+                :data="listMaintenanceContent"
+                border
+                fit
+                highlight-current-row
+                style="width: 90%;margin:0 auto;"
+                :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 + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="部位" min-width="140px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.positionName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="项目" min-width="140px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.program }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="标准" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.standard }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="执行动作" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.active }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <el-col>
+                    <el-form-item label="流程进度" />
+                    <el-steps :active="active" align-center finish-status="success">
+                      <el-step
+                        v-for="(item,index) in activeList"
+                        :key="index"
+                        :title="item.title"
+                        :status="item.status"
+                      >
+                        <template slot="description">
+                          <div class="step-row">
+                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                            <div>{{ item.reason }}</div>
+                            <div>{{ item.scores }}</div>
+                          </div>
+                        </template>
+                      </el-step>
+                    </el-steps>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col>
+                    <el-form-item label="操作:">
+                      <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                      <!-- 完成保养 -->
+                      <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
+                      <!-- 保养审核 -->
+                      <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
+                      <!-- 保养审核3 -->
+                      <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
+                      <!-- 保养审核2 -->
+                      <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+            </el-tab-pane>
+            <el-tab-pane label="领用记录" name="second">
+              <el-form ref="collarUseTemp" :rules="rules" :model="collarUseTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+                <el-row>
+                  <el-col :span="6">
+                    <el-form-item label="领用单号:" prop="applyCode">
+                      <span>{{ collarUseTemp.applyCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用部门:" prop="departmentName">
+                      <span>{{ collarUseTemp.departmentName }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用日期:" prop="createDate">
+                      <span>{{ collarUseTemp.createDate }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用状态:" prop="statueName">
+                      <span>{{ collarUseTemp.statueName }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingCollarUse"
+                element-loading-text="给我一点时间"
+                :data="listCollarUse"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @cell-click="openDetails"
+                @sort-change="tableSort"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="reportery" label="库存数" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.reportery }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="amount" label="领用数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.amount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="用途" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.note }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+            <el-tab-pane label="旧品录入记录" name="third">
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingOldProducts"
+                element-loading-text="给我一点时间"
+                :data="listOldProducts"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @sort-change="tableSort"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" prop="id" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="acturalAmount" label="录入数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.acturalAmount }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px;">
+        <el-button @click="close_diago()">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 保养及领用 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ReceivingSpareParts" :close-on-click-modal="false" width="90%">
+      <el-tabs v-model="activeName2">
+        <el-tab-pane label="保养" name="first">
+          <el-form
+            ref="maintainTemp"
+            :rules="rules"
+            :model="maintainTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="使用人:" prop="employeeId">
+                  <el-select v-model="maintainTemp.employeeId" placeholder="使用人" class="filter-item" style="width: 120px;">
+                    <el-option v-for="item in empdeptList" :key="item.id" :label="item.empname" :value="item.id" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="保养内容:" prop="upNameLevel">
+                  <el-input ref="upNameLevel" v-model="maintainTemp.upNameLevel" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            :key="tableKey"
+            v-loading="listLoadingMaintenanceContent"
+            element-loading-text="给我一点时间"
+            :data="listMaintenanceContent"
+            border
+            fit
+            highlight-current-row
+            style="width: 90%;margin:0 auto;"
+            :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 + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="部位" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.positionName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="项目" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.program }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="标准" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.standard }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="执行动作" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <el-select v-model="scope.row.active" class="filter-item" style="width: 80%;">
+                  <el-option v-for="item in getDictByName" :key="item.id" :label="item. label" :value="item.value" />
+                </el-select>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="备件领用" name="second">
+          <div class="app-receivingSpareParts">
+            <el-form
+              ref="receivingTemp"
+              :rules="rules"
+              :model="receivingTemp"
+              label-position="right"
+              label-width="120px"
+              style="width: 90%;margin:0 auto;"
+            >
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="领用单号:" prop="applyCode">
+                    <span>{{ receivingTemp.applyCode }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="领用部门:" prop="departmentName">
+                    <span>{{ receivingTemp.departmentName }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="领用日期:" prop="createDate">
+                    <span>{{ receivingTemp.createDate }}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-form-item label="所需备件:" prop="partCode">
+                  <el-autocomplete
+                    v-model="receivingTemp.partCode"
+                    value-key="name"
+                    class="inline-input"
+                    :fetch-suggestions="sparePartSearch"
+                    placeholder="请输入备件编号或备件名称或备件规格"
+                    style="width:100%"
+                    @select="handleSelectSparePart"
+                  >
+                    <template slot-scope="{ item }">
+                      <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                      |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                      |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                    </template>
+                  </el-autocomplete>
+                </el-form-item>
+              </el-row>
+            </el-form>
+            <el-table
+              :key="tableKey"
+              v-loading="listLoadingCollarUse"
+              element-loading-text="给我一点时间"
+              :data="listCollarUse"
+              border
+              fit
+              highlight-current-row
+              style="width: 100%;"
+              :row-style="rowStyle"
+              :cell-style="cellStyle"
+              class="elTable"
+            >
+              <!-- table表格 -->
+              <el-table-column label="序号" align="center" type="index" width="50px">
+                <template slot-scope="scope">
+                  <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件编号" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件名称" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件规格" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.specification }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="库存数" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.reportery }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用数量" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <el-form :model="scope.row">
+                    <el-form-item prop="amount">
+                      <el-input ref="amount" v-model="scope.row.amount" style="margin-top:15px" />
+                    </el-form-item>
+                  </el-form>
+                </template>
+              </el-table-column>
+              <el-table-column label="用途" prop="note" align="center" min-width="60">
+                <template slot-scope="scope">
+                  <el-form :model="scope.row">
+                    <el-form-item prop="note">
+                      <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                    </el-form-item>
+                  </el-form>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+                <template slot-scope="{row}">
+                  <a class="del" @click="sparePartsDelete(row)">删除</a>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+      <div slot="footer" class="dialog-footer" style="bottom: 5px">
+        <el-button v-if="activeName2=='first'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData1()">确认</el-button>
+        <el-button v-if="activeName2=='second'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData2()">确认</el-button>
+        <el-button @click="dialogFormVisible_ReceivingSpareParts = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 完成保养 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_maintainComplete" :close-on-click-modal="false" width="50%">
+      <div class="maintainComplete">
+        <el-form ref="maintainCompleteTemp" :rules="rules" :model="maintainCompleteTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="是否录入旧品:" prop="isOldProducts">
+                <el-radio-group v-model="maintainCompleteTemp.isOldProducts" @change="changeIsOldProducts">
+                  <el-radio :label="0" checked>否</el-radio>
+                  <el-radio :label="1">是</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="No2">
+            <el-col :span="24">
+              <el-form-item label="旧品录入:" prop="partCode">
+                <el-autocomplete
+                  v-model="maintainCompleteTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="oldProductsSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格 "
+                  style="width:100%"
+                  @select="handleSelectOldProducts"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                    |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                    |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          v-if="No2"
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :cell-style="cellStyle"
+          class="elTable"
+          :row-style="rowStyle"
+        >
+          <!-- table表格 -->
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="acturalAmount">
+                  <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="note">
+                  <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintainComplete'?createMaintainCompleteData():createMaintainCompleteData()">确认</el-button>
+        <el-button @click="dialogFormVisible_maintainComplete = false;">关闭</el-button>
+      </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 auto;line-height:50px">请确认保养审核结果:</h3>
+        <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
+          <el-row style="width:88%;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.isStatue" @change="changeIsStatue">
+                  <el-radio :label="3">通过</el-radio>
+                  <el-radio :label="4">不通过</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="isStatueReason" :span="20">
+              <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入保养不通过的原因" />
+            </el-col>
+          </el-row>
+          <el-row v-if="examineTemp.SHStatue == 2 && examineTemp.isStatue == 3" style="width:90%;margin:0 auto;">
+            <el-col :span="24">
+              <el-form-item label="评分:" prop="scores">
+                <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
+        <el-button @click="dialogFormVisible_examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 视频 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_video" :close-on-click-modal="false" width="60%">
+      <div class="app-video">
+        <el-form ref="videoTemp" :rules="rules" :model="videoTemp" label-position="right" style="width: 80%;min-height:150px;margin:0 auto;">
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="" prop="scores">
+                <video :src="videoTemp.videoPath" controls="controls" style="width:90%;height:450px;margin:0 auto;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// 引入
+import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
+// import { mapGetters } from 'vuex'
+import waves from '@/directive/waves' // waves directive
+import { parseTime, sortChange } from '@/utils/index.js'
+// eslint-disable-next-line no-unused-vars
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import Cookies from 'js-cookie'
+import { MessageBox } from 'element-ui'
+export default {
+  name: 'Maintain',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      active: 0,
+      activeList: [],
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      isokDisable: false,
+      rules: {
+        employeeId: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+      findAllPasture: [],
+      findAllDepart: [],
+      findAllEmploye: [],
+      requestParams: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
+        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['保养模板执行动作'] }
+      ],
+      getDepartParam: {
+        name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
+      },
+      statues: [{ id: '0', name: '已逾期' }, { id: '1', name: '保养中' }, { id: '2', name: '保养完成' }],
+      SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      empdeptList: [],
+      getDictByName: [],
+      radio2: '全部',
+      textMap: {
+        see: '查看详情',
+        receivingSpareParts: '保养及领用',
+        maintainComplete: '完成保养',
+        examine: '保养审核',
+        examine2: '保养审核2',
+        examine3: '保养审核3',
+        video: '视频'
+      },
+      dialogStatus: '',
+      radioAll: '全部',
+      getdataListParm: {
+        name: 'getBigupkeepList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          inputDatetime: '',
+          upkeepCode: '',
+          eqName: '',
+          eqCode: '',
+          departmentId: '',
+          statue: '',
+          pastureName: Cookies.get('pasturename'),
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          SHStatue: '',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+      },
+      total: 0,
+      tableKey: 0,
+      listLoading: false,
+      list: [],
+      // 查看
+      dialogFormVisible_See: false,
+      seeTemp: {},
+      statue1: false,
+      statue2: false,
+      activeName: 'first',
+      listLoadingMaintenanceContent: false,
+      listMaintenanceContent: [],
+      getMaintenanceContentParm: {
+        name: 'getUpkeepTemplateListbyeqV2',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      Reason: false,
+      // 查看-领用记录
+      getCollarUseParm: {
+        name: 'getPartsapplybyMt',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      collarUseTemp: {},
+      // 查看-领用记录table
+      getCollarUseListParm: {
+        name: 'getpartapplyListBybig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingCollarUse: false,
+      listCollarUse: [],
+      // 查看-旧品录入记录table
+      getOldProductsParm: {
+        name: 'getMaintainRefuse',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingOldProducts: false,
+      listOldProducts: [],
+      // 保养及领用
+      dialogFormVisible_ReceivingSpareParts: false,
+      activeName2: 'first',
+      maintainTemp: {},
+      receivingTemp: {},
+      getEmpdeptParm: {
+        name: 'getEmpdept',
+        returntype: 'Map',
+        parammaps: {
+          deptId: ''
+        }
+      },
+      getAutoCreatCodeParm: {
+        name: 'autoCreatCode',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'LY'
+        }
+      },
+      requestSparePart: {
+        name: 'getPartsListLY',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+
+      postDataPramas: {},
+      // 完成保养
+      dialogFormVisible_maintainComplete: false,
+      maintainCompleteTemp: {},
+      requestOldProducts: {
+        name: 'getAllPartsListWB',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      No2: false,
+      listAdd: [],
+      // 保养审核
+      dialogFormVisible_examine: false,
+      requestParam: {},
+      examineTemp: {
+        isStatue: 3
+      },
+      isStatueReason: false,
+      // 权限按钮
+      isSee: [],
+      isLingYong: [],
+      isComplete: [],
+      isCharge: [],
+      isLeaderCharge: [],
+      isDepartmentCharge: [],
+      buttons: [],
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getBigupkeepWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {}
+        }
+      },
+      dialogFormVisible_video: false,
+      videoTemp: {},
+      requestParam2: {}
+    }
+  },
+  // computed: {
+  //   ...mapGetters([
+  //     'sidebar',
+  //     'avatar',
+  //     'employeid',
+  //     'pastureid'
+  //   ])
+  // },
+  computed: {
+    space() {
+      const { isSimple, $parent: { space }} = this
+      return isSimple ? '' : space
+    },
+    style: function() {
+      const style = {}
+      const parent = this.$parent
+      const len = parent.steps.length
+
+      const space =
+        typeof this.space === 'number'
+          ? this.space + 'px'
+          : this.space
+            ? this.space
+            : 100 / (len - (this.isCenter ? 0 : 1)) + '%'
+      style.flexBasis = space
+      if (this.isVertical) return style
+      if (this.isLast) {
+        style.maxWidth = 100 / this.stepsCount + '%'
+      } else {
+        style.marginRight = -this.$parent.stepOffset + 'px'
+      }
+      return style
+    }
+  },
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+    if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'MaintenancePlan') {
+      this.getdataListParm.parammaps.eqCode = this.$route.query.eqCode
+      this.getdataListParm.parammaps.inputDatetime = [this.$route.query.time, this.$route.query.time]
+      this.getdataListParm.parammaps.startTime = this.$route.query.time
+      this.getdataListParm.parammaps.stopTime = this.$route.query.time
+    }
+    this.get_select_list()
+    this.get_table_data()
+    this.getPendingList()
+  },
+  methods: {
+    // handleCheck(row) {
+    //   this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
+    //   this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
+    // },
+    tableSort(column) {
+      if (this.activeName == 'second') {
+        sortChange(column, this.listCollarUse)
+      } else if (this.activeName == 'third') {
+        sortChange(column, this.listOldProducts)
+      }
+    },
+    get_auto_buttons() {
+      // 查看
+      const See = 'maintenance:maintain:see'
+      const isSee = checkButtons(JSON.parse(sessionStorage.buttons), See)
+      this.isSee = isSee
+      //  保养及领用
+      const LingYong = 'maintenance:maintain:lingyong'
+      const isLingYong = checkButtons(JSON.parse(sessionStorage.buttons), LingYong)
+      this.isLingYong = isLingYong
+      //  完成保养
+      const Complete = 'maintenance:maintain:complete'
+      const isComplete = checkButtons(JSON.parse(sessionStorage.buttons), Complete)
+      this.isComplete = isComplete
+      //  使用人保养审核
+      const Charge = 'maintenance:maintain:charge'
+      const isCharge = checkButtons(JSON.parse(sessionStorage.buttons), Charge)
+      this.isCharge = isCharge
+      //  主管审核
+      const LeaderCharge = 'maintenance:maintain:leaderCharge'
+      const isLeaderCharge = checkButtons(JSON.parse(sessionStorage.buttons), LeaderCharge)
+      this.isLeaderCharge = isLeaderCharge
+      // 部门审核
+      const DeptCharge = 'maintenance:maintain:deptcharge'
+      const isDepartmentCharge = checkButtons(JSON.parse(sessionStorage.buttons), DeptCharge)
+      this.isDepartmentCharge = isDepartmentCharge
+    },
+    // next() {
+    //   if (this.active++ > 2) this.active = 0
+    //   this.finishStatus = 'error'
+    // },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+        this.getDictByName = response.data.getDictByName.list
+        this.getDepartDownList()
+      })
+    },
+    getDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.findAllDepart = response.data.list
+      })
+    },
+    changePastureName(item) {
+      this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+      this.getdataListParm.parammaps.departmentId = ''
+      this.getDepartDownList()
+    },
+
+    close_diago(){
+      console.log(11111111111111)
+      this.dialogFormVisible_See = false
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps = {
+        inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+        pastureName: this.getdataListParm.parammaps.pastureName,
+        SHStatue: this.getdataListParm.parammaps.SHStatue,
+        upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+        eqName: this.getdataListParm.parammaps.eqName,
+        eqCode: this.getdataListParm.parammaps.eqCode,
+        departmentId: this.getdataListParm.parammaps.departmentId,
+        statue: this.getdataListParm.parammaps.statue,
+        loginId: Cookies.get('employeid'),
+        menu: 'Maintain',
+        logindeptId: Cookies.get('departmentid'),
+        loginpastureId: Cookies.get('pastureid'),
+        empId: Cookies.get('employeid'),
+        pastureId: Cookies.get('pastureid'),
+        deptId: Cookies.get('departmentid')
+      }
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      if (this.getdataListParm.parammaps.inputDatetime !== undefined && this.getdataListParm.parammaps.inputDatetime !== '') {
+        this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
+        this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      this.listLoading = true
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.$set(response.data.list[i], 'img', '视频')
+          }
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+        // Just to simulate the time of the request
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+    tableCellStyle({ row, column, rowIndex, columnIndex }) {
+      if (row.statue == 0 && columnIndex === 10) {
+        return {
+          background: 'red',
+          color: '#fff'
+        }
+      }
+      return {
+        background: ''
+      }
+    },
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getBigupkeepList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: '',
+          upkeepCode: '',
+          eqName: '',
+          eqCode: '',
+          departmentId: '',
+          statue: '',
+          pastureName: Cookies.get('pasturename'),
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          SHStatue: '',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getBigupkeepWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          statue: this.getdataListParm.parammaps.statue,
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getBigupkeepWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          statue: this.getdataListParm.parammaps.statue,
+
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    statue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.statue == 0) {
+        return '已逾期'
+      } else if (cellValue.statue == 1) {
+        return '保养中'
+      } else if (cellValue.statue == 2) {
+        return '已完成'
+      }
+    },
+    SHStatue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.SHStatue == 1) {
+        return ''
+      } else if (cellValue.SHStatue == 2) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 3) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 4) {
+        return '未通过'
+ 
+      } else if (cellValue.SHStatue == 8) {
+        return '未通过'
+    
+      } else if (cellValue.SHStatue == 7) {
+        return '已通过'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      this.listLoading = true
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+      this.getPendingList()
+    },
+    form_see(row) {
+      this.seeTemp = Object.assign({}, row)
+      console.log('查看', this.seeTemp)
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      var scores = '评分:' + this.seeTemp.scores + '分'
+      if (this.seeTemp.SHStatue === 1) {
+        this.activeList = [{ title: '保养人审核' }, { title: '机修审核' },   { title: '设备主管审核' }]
+        this.active = 0
+        
+      } else if (this.seeTemp.SHStatue === 2) {
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核' },  { title: '设备主管审核' }]
+        this.active = 1
+
+      } else if (this.seeTemp.SHStatue === 3) {
+        this.active = 2
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },   { title: '设备主管审核' }]
+      } else if (this.seeTemp.SHStatue === 4) {
+        this.active = 2
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
+        
+
+      } else if (this.seeTemp.SHStatue === 7) {
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },  { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
+        this.active = 3
+      } else if (this.seeTemp.SHStatue === 8) {
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },   { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
+        this.active = 3
+      }
+      this.dialogStatus = 'see'
+      this.dialogFormVisible_See = true
+      if (this.seeTemp.SHStatue !== 1) {
+        // 查看显示类型2
+        this.statue1 = false
+        this.statue2 = true
+        this.getMaintenanceContentList()
+      } else {
+        if (this.seeTemp.SHStatue == 1 && this.seeTemp.LYStatue == '未领用' && this.seeTemp.LRStatue == '未录入') {
+          // 查看显示类型1
+          this.statue1 = true
+          this.statue2 = false
+          this.getMaintenanceContentList()
+        } else {
+          // 查看显示类型2
+          this.statue1 = false
+          this.statue2 = true
+          this.getMaintenanceContentList()
+        }
+      }
+      this.collarUseTemp = {}
+      this.listCollarUse = []
+      this.getCollarUse()
+      this.getOldProductsList()
+    },
+    getMaintenanceContentList() {
+      this.getMaintenanceContentParm.parammaps.id = this.seeTemp.id
+      this.listLoadingMaintenanceContent = false
+      GetDataByName(this.getMaintenanceContentParm).then(response => {
+        console.log('保养内容table数据', response.data.list)
+        this.listMaintenanceContent = response.data.list
+        this.$forceUpdate()
+        setTimeout(() => {
+          this.listLoadingMaintenanceContent = false
+        }, 100)
+      })
+    },
+    openDetails(row, column, cell, event) {
+      if (column.label !== '操作') {
+        this.$router.push({ path: '/customs/Receive', query: { applyCode: this.collarUseTemp.applyCode }})
+      }
+    },
+    getCollarUse() {
+      this.getCollarUseParm.parammaps.RUCode = this.seeTemp.upkeepCode
+      GetDataByName(this.getCollarUseParm).then(response => {
+        this.collarUseTemp = response.data.list[0]
+        if (response.data.list.length > 0) {
+          console.log('领用记录数据', response.data.list[0])
+          if (response.data.list[0].statue == 0) {
+            this.$set(this.collarUseTemp, 'statueName', '未领用')
+          } else {
+            this.$set(this.collarUseTemp, 'statueName', '已领用')
+          }
+        }
+        this.getCollarUseList()
+      })
+    },
+    getCollarUseList() {
+      this.getCollarUseListParm.parammaps.id = this.collarUseTemp.id
+      this.listLoadingCollarUse = true
+      GetDataByName(this.getCollarUseListParm).then(response => {
+        console.log('领用table数据', response.data.list)
+        this.listCollarUse = response.data.list
+        setTimeout(() => {
+          this.listLoadingCollarUse = false
+        }, 100)
+      })
+    },
+    getOldProductsList() {
+      this.getOldProductsParm.parammaps.repairCode = this.seeTemp.upkeepCode
+      this.listLoadingOldProducts = true
+      GetDataByName(this.getOldProductsParm).then(response => {
+        console.log('旧品录入记录table数据', response.data.list)
+        this.listOldProducts = response.data.list
+        setTimeout(() => {
+          this.listLoadingOldProducts = false
+        }, 100)
+      })
+    },
+    // 保养及领用
+    handleReceivingSpareParts(row) {
+      console.log('点击了保养及领用')
+      if (row == undefined) {
+        this.receivingTemp = this.seeTemp
+      } else {
+        this.receivingTemp = Object.assign({}, row)
+      }
+      this.maintainTemp = this.receivingTemp
+      this.maintainTemp.employeeId = String(this.maintainTemp.useEmpId)
+      this.seeTemp = this.maintainTemp
+      this.listCollarUse = []
+      this.getAutoCreatCode()
+      this.receivingTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
+      this.getEmpdeptList()
+      this.getCollarUse()
+      this.getMaintenanceContentList()
+      this.dialogStatus = 'receivingSpareParts'
+      this.dialogFormVisible_ReceivingSpareParts = true
+    },
+    getEmpdeptList() {
+      this.getEmpdeptParm.parammaps.deptId = this.maintainTemp.departmentId
+      GetDataByName(this.getEmpdeptParm).then(response => {
+        console.log('保养使用人', response.data.list)
+        if (response.data.list !== null) {
+          this.empdeptList = response.data.list
+        } else {
+          this.empdeptList = []
+        }
+      })
+    },
+    getAutoCreatCode() {
+      GetDataByName(this.getAutoCreatCodeParm).then(response => {
+        console.log('领用领用单号', response.data.list[0])
+        this.receivingTemp.applyCode = response.data.list[0].orderCode
+        this.$forceUpdate()
+      })
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      this.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.requestSparePart).then(response => {
+        console.log('备件模糊查询搜索data', response.data.list)
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      if (this.listCollarUse.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listCollarUse.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此备件已存在,请重新选择备件'
+          })
+        } else {
+          this.listCollarUse.unshift(item)
+        }
+      } else {
+        this.listCollarUse = []
+        this.listCollarUse.unshift(item)
+      }
+    },
+    createReceivingSparePartseData1() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['maintainTemp'].validate(valid => {
+        if (valid) {
+          this.postDataPramas.common = { 'returnmap': '0' }
+          this.postDataPramas.data = []
+          this.postDataPramas.data[0] = { 'name': 'updateEquseEmpId', 'type': 'e', 'parammaps': {
+            employeeId: this.maintainTemp.employeeId,
+            id: this.maintainTemp.id
+          }}
+          this.postDataPramas.data[1] = { 'name': 'deleteutupbyBigid', 'type': 'e', 'parammaps': {
+            id: this.maintainTemp.id
+          }}
+          this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listMaintenanceContent }}
+          this.postDataPramas.data[2].children = []
+          this.postDataPramas.data[2].children[0] = { 'name': 'insertutup', 'type': 'e', 'parammaps': {
+            id: this.maintainTemp.id,
+            positionName: '@insertSpotList.positionName',
+            program: '@insertSpotList.program',
+            standard: '@insertSpotList.standard',
+            active: '@insertSpotList.active'
+          }}
+          ExecDataByConfig(this.postDataPramas).then(response => {
+            console.log('添加领用保存发送参数', this.postDataPramas)
+            if (response.msg === 'fail') {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.dialogFormVisible_ReceivingSpareParts = false
+              this.dialogFormVisible_See = false
+              this.get_table_data()
+              this.getPendingList()
+              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    createReceivingSparePartseData2() {
+      console.log('点击了保养及领用保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['receivingTemp'].validate(valid => {
+        if (valid) {
+          if (this.listCollarUse.length !== 0) {
+            for (var i = 0; i < this.listCollarUse.length; i++) {
+              console.log(this.listCollarUse[i].amount)
+              if (this.listCollarUse[i].amount !== undefined) {
+                var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                if (!rulesAmount.test(this.listCollarUse[i].amount)) {
+                  this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数', duration: 2000 })
+                  return false
+                } else if (parseFloat(this.listCollarUse[i].amount) > parseFloat(this.listCollarUse[i].reportery)) {
+                  this.$message({ type: 'error', message: '领用数量不可大于库存数', duration: 2000 })
+                  return false
+                }
+              } else {
+                this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
+                return false
+              }
+            }
+            let mySumPrice = 0
+            for (let i = 0; i < this.listCollarUse.length; i++) {
+              mySumPrice += parseFloat(this.listCollarUse[i].price) * parseFloat(this.listCollarUse[i].amount)
+            }
+            if (mySumPrice > 500) {
+              this.receivingTemp.SHStatus = 2
+            } else {
+              this.receivingTemp.SHStatus = 9
+            }
+            this.postDataPramas.common = { 'returnmap': '0' }
+            this.postDataPramas.data = []
+            this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
+              pastureId: this.$store.state.user.pastureid,
+              applyCode: this.receivingTemp.applyCode,
+              applyType: 2,
+              departmentId: this.receivingTemp.departmentId,
+              empId: this.receivingTemp.upkeepPersonId,
+              applyDate: this.receivingTemp.createDate,
+              RUCode: this.receivingTemp.upkeepCode,
+              SHStatus: this.receivingTemp.SHStatus
+            }}
+            this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listCollarUse }}
+            this.postDataPramas.data[1].children = []
+            this.postDataPramas.data[1].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
+              bigId: '@insertBigpartapply.LastInsertId',
+              pastureId: '@insertSpotList.pastureId',
+              partId: '@insertSpotList.partId',
+              partCode: '@insertSpotList.partCode',
+              partName: '@insertSpotList.partName',
+              specification: '@insertSpotList.specification',
+              brandId: '@insertSpotList.brandId',
+              price: '@insertSpotList.price',
+              amount: '@insertSpotList.amount',
+              eqName: this.receivingTemp.eqName,
+              eqCode: this.receivingTemp.eqCode,
+              providerId: '@insertSpotList.providerId',
+              note: '@insertSpotList.note',
+              reportery: '@insertSpotList.reportery',
+              contractId: '@insertSpotList.contractId',
+              locationId: '@insertSpotList.locationId'
+            }}
+            ExecDataByConfig(this.postDataPramas).then(response => {
+              console.log('添加领用保存发送参数', this.postDataPramas)
+              if (response.msg === 'fail') {
+                this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              } else {
+                this.dialogFormVisible_ReceivingSpareParts = false
+                this.dialogFormVisible_See = false
+                this.get_table_data()
+                this.getPendingList()
+                this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+              }
+            })
+            // return true
+          } else {
+            this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+            return false
+          }
+        }
+      })
+    },
+    // 完成保养
+    handleCompleteMaintenance(row) {
+      console.log('点击了完成保养', row)
+      if (row == undefined) {
+        this.$set(this.seeTemp, 'isOldProducts', 0)
+        this.maintainCompleteTemp = this.seeTemp
+      } else {
+        this.maintainCompleteTemp = Object.assign({}, row)
+        this.$set(this.maintainCompleteTemp, 'isOldProducts', 0)
+      }
+      this.dialogStatus = 'maintainComplete'
+      this.No2 = false
+      this.dialogFormVisible_maintainComplete = true
+      this.listAdd = []
+    },
+    changeIsOldProducts(val) {
+      console.log(val)
+      if (val == 1) {
+        this.No2 = true
+      } else {
+        this.No2 = false
+      }
+    },
+    oldProductsSearch(queryString, cb) {
+      console.log('旧品录入模糊查询输入值', queryString)
+      this.requestOldProducts.parammaps.partCode = queryString
+      this.requestOldProducts.parammaps.RUCode = this.maintainCompleteTemp.upkeepCode
+      GetDataByName(this.requestOldProducts).then(response => {
+        console.log('旧品录入模糊查询搜索data', response.data.list)
+        cb(response.data.list)
+      })
+    },
+    handleSelectOldProducts(item) {
+      this.maintainCompleteTemp.partCode = ''
+      console.log('旧品录入模糊查询选中值', item)
+      if (this.listAdd.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此旧品已存在,请重新选择旧品'
+          })
+        } else {
+          if (item.checkoutNumber == null) {
+            this.$set(item, 'checkoutNumber', item.reportery)
+          }
+          this.listAdd.unshift(item)
+        }
+      } else {
+        if (item.checkoutNumber == null) {
+          this.$set(item, 'checkoutNumber', item.reportery)
+        }
+        this.listAdd.unshift(item)
+      }
+    },
+    sparePartsDelete(row) {
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listCollarUse.length; i++) {
+          console.log(this.listCollarUse[i])
+          if (this.listCollarUse[i].id === row.id) {
+            var listCollarUseIndex = this.listCollarUse.indexOf(this.listCollarUse[i])
+          }
+          if (listCollarUseIndex > -1) {
+            this.listCollarUse.splice(listCollarUseIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    partDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    // 完成保养-保存
+    createMaintainCompleteData() {
+      console.log('点击了完成保养确认', this.maintainCompleteTemp)
+      console.log('点击了完成保养确认', this.maintainCompleteTemp.laidcou)
+      if (this.maintainCompleteTemp.laidcou == 0) {
+        if (this.maintainCompleteTemp.isOldProducts == 0) {
+          console.log('否')
+          this.requestParam.name = 'completeUpkeep'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.maintainCompleteTemp.id
+          PostDataByName(this.requestParam).then((response) => {
+            if (response.msg !== 'fail') {
+
+
+              //如果有设备记录仪的权限
+              if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
+                // 临时注释
+                  if (this.maintainCompleteTemp.videoTxt == '已录制') {
+                    this.requestParam2.name = 'upkeepChargDone'
+                    this.requestParam2.parammaps = {}
+                    this.requestParam2.parammaps.id = this.maintainCompleteTemp.id
+                    this.requestParam2.parammaps.statue = 7
+                    this.requestParam2.parammaps.orderStatue = 2
+                    this.requestParam2.parammaps.empId = Cookies.get('employeid')
+                    PostDataByName(this.requestParam2).then(response => {
+                      if (response.msg !== 'fail') {
+                        if (this.getdataListParm.parammaps.inputDatetime === null) {
+                          this.getdataListParm.parammaps.inputDatetime = ''
+                        }
+                        this.get_table_data()
+                        this.dialogFormVisible_maintainComplete = false
+                        this.dialogFormVisible_See = false
+                        this.getPendingList()
+                        this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+                      } else {
+                        failproccess(response, this.$notify)
+                      }
+                    })
+                  }
+              // 临时注释
+              }else{
+                //正常流程。没有记录仪权限
+
+                 if (this.getdataListParm.parammaps.inputDatetime === null) {
+                    this.getdataListParm.parammaps.inputDatetime = ''
+                  }
+                  this.dialogFormVisible_maintainComplete = false
+                  this.dialogFormVisible_See = false
+                  this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+                  this.get_table_data()
+                  this.getPendingList()
+              }
+
+
+              
+
+
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        } else {
+          console.log('是')
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          this.$refs['maintainCompleteTemp'].validate(valid => {
+            if (valid) {
+              if (this.listAdd.length !== 0) {
+                for (var i = 0; i < this.listAdd.length; i++) {
+                  if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
+                    this.$message({
+                      type: 'warning',
+                      message: '请录入数量是否未填写',
+                      duration: 2000
+                    })
+                    return false
+                  } else {
+                    var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                    if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
+                      this.$message({
+                        type: 'error',
+                        message: '录入数量请输入正数,最多保留两位小数点',
+                        duration: 2000
+                      })
+                      return false
+                    }
+                  }
+                }
+                this.postDataPramas.common = { 'returnmap': '0' }
+                this.postDataPramas.data = []
+                this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+                this.postDataPramas.data[0].children = []
+                this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
+                  pastureId: Cookies.get('pastureid'),
+                  deptId: this.maintainCompleteTemp.departmentId,
+                  partCode: '@insertSpotList.partCode',
+                  partName: '@insertSpotList.partName',
+                  partId: '@insertSpotList.id',
+                  specification: '@insertSpotList.specification',
+                  unit: '@insertSpotList.unit',
+                  acturalAmount: '@insertSpotList.acturalAmount',
+                  eqId: this.maintainCompleteTemp.eqId,
+                  eqCode: this.maintainCompleteTemp.eqCode,
+                  eqName: this.maintainCompleteTemp.eqName,
+                  repairCode: this.maintainCompleteTemp.upkeepCode,
+                  listType: 1
+                }}
+                this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
+                  id: this.maintainCompleteTemp.id
+                }}
+                ExecDataByConfig(this.postDataPramas).then(response => {
+                  console.log('完成维修-是-保存发送参数', this.postDataPramas)
+                  if (response.msg === 'fail') {
+                    this.$notify({
+                      title: '保存失败',
+                      message: response.data,
+                      type: 'warning',
+                      duration: 2000
+                    })
+                  } else {
+                    this.dialogFormVisible_maintainComplete = false
+                    this.dialogFormVisible_See = false
+                    this.get_table_data()
+                    this.getPendingList()
+                    this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+                  }
+                })
+                return true
+              } else {
+                this.$notify({
+                  title: '',
+                  message: '请完善旧品信息',
+                  type: 'warning',
+                  duration: 2000
+                })
+                return false
+              }
+            }
+          })
+        }
+      } else {
+        this.$notify({ message: '备件未领用不可完成保养', type: 'warning', duration: 2000 })
+      }
+    },
+    // 保养审核
+    handleExamine(row) {
+      console.log('点击了保养审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_examine = true
+    },
+    changeIsStatue(val) {
+      console.log(val)
+      if (val == 4) {
+        this.isStatueReason = true
+      } else {
+        this.isStatueReason = false
+      }
+    },
+    // 保养审核1
+    createExamineData() {
+      console.log('点击了保养审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'upkeepCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          this.requestParam.parammaps.statue = this.examineTemp.isStatue
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          if (this.requestParam.parammaps.statue == 4) {
+            this.requestParam.parammaps.scores = 5
+          } else {
+            this.requestParam.parammaps.scores = this.examineTemp.scores
+          }
+          PostDataByName(this.requestParam).then(response => {
+            console.log('保养审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.dialogFormVisible_examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.getPendingList()
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    // 保养审核2
+    handleExamine2(row) {
+      console.log('点击了保养审核------', row)
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine2'
+      this.dialogFormVisible_examine = true
+    },
+    // 保养审核2-保存
+    createExamineData2() {
+      if (this.examineTemp.isStatue == 3) {
+        console.log('点击了保养审核2确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepChargDone'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 7
+            this.requestParam.parammaps.orderStatue = 2
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了保养审核2确认-不通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge1'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 8
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    // 保养审核2
+    handleExamine3(row) {
+      console.log('点击了保养审核------', row)
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine3'
+      this.dialogFormVisible_examine = true
+    },
+    // 保养审核3-保存
+    createExamineData3() {
+      if (this.examineTemp.isStatue == 3) {
+        console.log('点击了保养审核3确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge3'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 5
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了保养审核3确认-不通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge3'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 6
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    preview(row) {
+      console.log(row, '=====666')
+      this.dialogStatus = 'video'
+      this.dialogFormVisible_video = true
+      // row.videoPath = 'https://sys.mcs8.net:7706' + row.videoPath
+      this.videoTemp = Object.assign({}, row)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>
+<style lang="scss">
+.el-step__head.is-success {
+    color: #409EFF;
+    border-color: #409EFF;
+}
+.el-step__title.is-success{
+  color: #409EFF;
+}
+.el-step__head.is-process{
+  color: #409EFF;
+  border-color: #409EFF;
+  .el-step__icon.is-text{
+    background: #409EFF;
+    color: #fff;
+  }
+}
+.step-row{
+  color: #000;
+}
+</style>

+ 2200 - 0
src/views/maintenance/maintain/index流程改完了3.vue

@@ -0,0 +1,2200 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
+        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.upkeepCode" placeholder="保养单号" clearable style="width: 180px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 180px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 180px;" class="filter-item" />
+      <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <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-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <div>
+        <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+          <el-radio-button label="全部" />
+          <el-badge :value="pending.total" class="item">
+            <el-radio-button label="待处理" />
+          </el-badge>
+          <el-radio-button label="已处理" />
+        </el-radio-group>
+      </div>
+    </div>
+    <el-table
+      :key="tableKey"
+      v-loading="listLoading"
+      element-loading-text="给我一点时间"
+      :data="list"
+      border
+      fit
+      highlight-current-row
+      style="width: 100%;"
+      :row-style="rowStyle"
+      :cell-style="tableCellStyle"
+      class="elTable table-fixed"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养单号" min-width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.upkeepCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="牧场" min-width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.pastureName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备内部编号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备名称" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="规格型号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.specification }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="部门" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.departmentName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="责任人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.employeName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.upkeepPerson }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
+      <el-table-column label="处理状态" min-width="100px" align="center" :formatter="statue" />
+      <el-table-column label="领用单状态" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LYStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="旧品录入状态" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LRStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="审核状态" min-width="80px" align="center" :formatter="SHStatue" />
+		<el-table-column prop="img" label="保养过程" width="180" align="center">
+        <template slot-scope="scope">
+          <!-- <el-link @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }} </el-link> -->
+           <a style="border-bottom: 1px solid #333;" @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }}</a>
+          <el-link  v-if="scope.row.videoTxt == '未录制'">未录制 </el-link>
+          <el-link  v-if="scope.row.videoTxt == '已录制未上传'">已录制未上传 </el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" min-width="300" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="{row}">
+          <el-button v-if="isSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+          <!-- 保养及领用-->
+          <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8 ) && row.LYStatue == '未领用' && row.statue !== 0 && isLingYong && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:80px;display:inline-block" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
+          <!-- 完成保养 -->
+          <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8) && row.statue !== 0 && isComplete && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleCompleteMaintenance(row)">完成保养</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
+          <!-- 保养审核 -->
+          <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
+          <!-- 保养审核3 -->
+          <el-button v-if="(row.SHStatue == 3) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
+          <!-- 保养审核2 -->
+          <!-- <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
+          <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button> -->
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    <!-- 查看 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false"  v-if ="dialogFormVisible_See" width="90%">
+      <div class="app-see">
+        <div v-if="statue1" class="see">
+          <el-form
+            ref="seeTemp"
+            :rules="rules"
+            :model="seeTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="保养单号:" prop="upkeepCode">
+                  <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备名称:" prop="eqName">
+                  <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备内部编号:" prop="eqCode">
+                  <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="牧场:" prop="pastureName">
+                  <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="部门:" prop="departmentName">
+                  <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="责任人:" prop="employeName">
+                  <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <!-- <el-form-item label="保养人:" prop="upkeepPerson">
+                  <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                </el-form-item> -->
+                <el-form-item label="保养人:" prop="useEmpName">
+                  <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="保养日期:" prop="plantime">
+                  <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <!-- <el-form-item label="使用人:" prop="useEmpName">
+                  <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                </el-form-item> -->
+                <el-form-item label="使用人:" prop="upkeepPerson">
+                  <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="保养内容:" prop="upNameLevel">
+                  <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            :key="tableKey"
+            v-loading="listLoadingMaintenanceContent"
+            element-loading-text="给我一点时间"
+            :data="listMaintenanceContent"
+            border
+            fit
+            highlight-current-row
+            style="width: 90%;margin:0 auto;"
+            :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 + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="部位" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.positionName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="项目" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.program }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="标准" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.standard }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="执行动作" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.active }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-form
+            ref="seeTemp"
+            :rules="rules"
+            :model="seeTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col>
+                <el-form-item label="流程进度" />
+                <el-steps :active="active" align-center finish-status="success">
+                  <el-step
+                    v-for="(item,index) in activeList"
+                    :key="index"
+                    :title="item.title"
+                    :status="item.status"
+                  >
+                    <template slot="description">
+                      <div class="step-row">
+                        <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                        <div>{{ item.reason }}</div>
+                        <div>{{ item.scores }}</div>
+                      </div>
+                    </template>
+                  </el-step>
+                </el-steps>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="操作:">
+                  <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                  <!-- 完成保养 -->
+                  <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
+                  <!-- 保养审核 -->
+                  <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
+                  <!-- 保养审核3 -->
+                  <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                  <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
+                  <!-- 保养审核2 -->
+                  <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                  <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div v-if="statue2" class="see">
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="保养信息" name="first">
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="保养单号:" prop="upkeepCode">
+                      <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备名称:" prop="eqName">
+                      <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备内部编号:" prop="eqCode">
+                      <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="牧场:" prop="pastureName">
+                      <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="部门:" prop="departmentName">
+                      <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="责任人:" prop="employeName">
+                      <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <!-- <el-form-item label="保养人:" prop="upkeepPerson">
+                      <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                    </el-form-item> -->
+                    <el-form-item label="保养人:" prop="useEmpName">
+                      <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="保养日期:" prop="plantime">
+                      <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <!-- <el-form-item label="使用人:" prop="useEmpName">
+                      <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
+                    </el-form-item> -->
+                    <el-form-item label="使用人:" prop="upkeepPerson">
+                      <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="12">
+                    <el-form-item label="保养内容:" prop="upNameLevel">
+                      <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingMaintenanceContent"
+                element-loading-text="给我一点时间"
+                :data="listMaintenanceContent"
+                border
+                fit
+                highlight-current-row
+                style="width: 90%;margin:0 auto;"
+                :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 + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="部位" min-width="140px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.positionName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="项目" min-width="140px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.program }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="标准" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.standard }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="执行动作" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.active }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <el-col>
+                    <el-form-item label="流程进度" />
+                    <el-steps :active="active" align-center finish-status="success">
+                      <el-step
+                        v-for="(item,index) in activeList"
+                        :key="index"
+                        :title="item.title"
+                        :status="item.status"
+                      >
+                        <template slot="description">
+                          <div class="step-row">
+                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                            <div>{{ item.reason }}</div>
+                            <div>{{ item.scores }}</div>
+                          </div>
+                        </template>
+                      </el-step>
+                    </el-steps>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col>
+                    <el-form-item label="操作:">
+                      <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
+                      <!-- 完成保养 -->
+                      <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
+                      <!-- 保养审核 -->
+                      <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
+                      <!-- 保养审核3 -->
+                      <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
+                      <!-- 保养审核2 -->
+                      <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
+                      <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+            </el-tab-pane>
+            <el-tab-pane label="领用记录" name="second">
+              <el-form ref="collarUseTemp" :rules="rules" :model="collarUseTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+                <el-row>
+                  <el-col :span="6">
+                    <el-form-item label="领用单号:" prop="applyCode">
+                      <span>{{ collarUseTemp.applyCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用部门:" prop="departmentName">
+                      <span>{{ collarUseTemp.departmentName }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用日期:" prop="createDate">
+                      <span>{{ collarUseTemp.createDate }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="领用状态:" prop="statueName">
+                      <span>{{ collarUseTemp.statueName }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingCollarUse"
+                element-loading-text="给我一点时间"
+                :data="listCollarUse"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @cell-click="openDetails"
+                @sort-change="tableSort"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="reportery" label="库存数" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.reportery }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="amount" label="领用数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.amount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="用途" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.note }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+            <el-tab-pane label="旧品录入记录" name="third">
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingOldProducts"
+                element-loading-text="给我一点时间"
+                :data="listOldProducts"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @sort-change="tableSort"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" prop="id" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="acturalAmount" label="录入数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.acturalAmount }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px;">
+        <el-button @click="close_diago()">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 保养及领用 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ReceivingSpareParts" :close-on-click-modal="false" width="90%">
+      <el-tabs v-model="activeName2">
+        <el-tab-pane label="保养" name="first">
+          <el-form
+            ref="maintainTemp"
+            :rules="rules"
+            :model="maintainTemp"
+            label-position="right"
+            label-width="120px"
+            style="width: 90%;margin:0 auto;"
+          >
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="使用人:" prop="employeeId">
+                  <el-select v-model="maintainTemp.employeeId" placeholder="使用人" class="filter-item" style="width: 120px;">
+                    <el-option v-for="item in empdeptList" :key="item.id" :label="item.empname" :value="item.id" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="保养内容:" prop="upNameLevel">
+                  <el-input ref="upNameLevel" v-model="maintainTemp.upNameLevel" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            :key="tableKey"
+            v-loading="listLoadingMaintenanceContent"
+            element-loading-text="给我一点时间"
+            :data="listMaintenanceContent"
+            border
+            fit
+            highlight-current-row
+            style="width: 90%;margin:0 auto;"
+            :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 + (pageNum-1) * pageSize + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="部位" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.positionName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="项目" min-width="140px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.program }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="标准" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.standard }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="执行动作" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <el-select v-model="scope.row.active" class="filter-item" style="width: 80%;">
+                  <el-option v-for="item in getDictByName" :key="item.id" :label="item. label" :value="item.value" />
+                </el-select>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="备件领用" name="second">
+          <div class="app-receivingSpareParts">
+            <el-form
+              ref="receivingTemp"
+              :rules="rules"
+              :model="receivingTemp"
+              label-position="right"
+              label-width="120px"
+              style="width: 90%;margin:0 auto;"
+            >
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="领用单号:" prop="applyCode">
+                    <span>{{ receivingTemp.applyCode }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="领用部门:" prop="departmentName">
+                    <span>{{ receivingTemp.departmentName }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="领用日期:" prop="createDate">
+                    <span>{{ receivingTemp.createDate }}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-form-item label="所需备件:" prop="partCode">
+                  <el-autocomplete
+                    v-model="receivingTemp.partCode"
+                    value-key="name"
+                    class="inline-input"
+                    :fetch-suggestions="sparePartSearch"
+                    placeholder="请输入备件编号或备件名称或备件规格"
+                    style="width:100%"
+                    @select="handleSelectSparePart"
+                  >
+                    <template slot-scope="{ item }">
+                      <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                      |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                      |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                    </template>
+                  </el-autocomplete>
+                </el-form-item>
+              </el-row>
+            </el-form>
+            <el-table
+              :key="tableKey"
+              v-loading="listLoadingCollarUse"
+              element-loading-text="给我一点时间"
+              :data="listCollarUse"
+              border
+              fit
+              highlight-current-row
+              style="width: 100%;"
+              :row-style="rowStyle"
+              :cell-style="cellStyle"
+              class="elTable"
+            >
+              <!-- table表格 -->
+              <el-table-column label="序号" align="center" type="index" width="50px">
+                <template slot-scope="scope">
+                  <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件编号" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件名称" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.partName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="备件规格" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.specification }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="库存数" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.reportery }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用数量" min-width="110px" align="center">
+                <template slot-scope="scope">
+                  <el-form :model="scope.row">
+                    <el-form-item prop="amount">
+                      <el-input ref="amount" v-model="scope.row.amount" style="margin-top:15px" />
+                    </el-form-item>
+                  </el-form>
+                </template>
+              </el-table-column>
+              <el-table-column label="用途" prop="note" align="center" min-width="60">
+                <template slot-scope="scope">
+                  <el-form :model="scope.row">
+                    <el-form-item prop="note">
+                      <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                    </el-form-item>
+                  </el-form>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+                <template slot-scope="{row}">
+                  <a class="del" @click="sparePartsDelete(row)">删除</a>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+      <div slot="footer" class="dialog-footer" style="bottom: 5px">
+        <el-button v-if="activeName2=='first'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData1()">确认</el-button>
+        <el-button v-if="activeName2=='second'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData2()">确认</el-button>
+        <el-button @click="dialogFormVisible_ReceivingSpareParts = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 完成保养 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_maintainComplete" :close-on-click-modal="false" width="50%">
+      <div class="maintainComplete">
+        <el-form ref="maintainCompleteTemp" :rules="rules" :model="maintainCompleteTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="是否录入旧品:" prop="isOldProducts">
+                <el-radio-group v-model="maintainCompleteTemp.isOldProducts" @change="changeIsOldProducts">
+                  <el-radio :label="0" checked>否</el-radio>
+                  <el-radio :label="1">是</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="No2">
+            <el-col :span="24">
+              <el-form-item label="旧品录入:" prop="partCode">
+                <el-autocomplete
+                  v-model="maintainCompleteTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="oldProductsSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格 "
+                  style="width:100%"
+                  @select="handleSelectOldProducts"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                    |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                    |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          v-if="No2"
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :cell-style="cellStyle"
+          class="elTable"
+          :row-style="rowStyle"
+        >
+          <!-- table表格 -->
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="acturalAmount">
+                  <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="note">
+                  <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintainComplete'?createMaintainCompleteData():createMaintainCompleteData()">确认</el-button>
+        <el-button @click="dialogFormVisible_maintainComplete = false;">关闭</el-button>
+      </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 auto;line-height:50px">请确认保养审核结果:</h3>
+        <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
+          <el-row style="width:88%;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.isStatue" @change="changeIsStatue">
+                  <el-radio :label="3">通过</el-radio>
+                  <el-radio :label="4">不通过</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col v-if="isStatueReason" :span="20">
+              <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入保养不通过的原因" />
+            </el-col>
+          </el-row>
+          <el-row v-if="examineTemp.SHStatue == 2 && examineTemp.isStatue == 3" style="width:90%;margin:0 auto;">
+            <el-col :span="24">
+              <el-form-item label="评分:" prop="scores">
+                <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
+        <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
+        <el-button @click="dialogFormVisible_examine = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 视频 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_video" :close-on-click-modal="false" width="60%">
+      <div class="app-video">
+        <el-form ref="videoTemp" :rules="rules" :model="videoTemp" label-position="right" style="width: 80%;min-height:150px;margin:0 auto;">
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="" prop="scores">
+                <video :src="videoTemp.videoPath" controls="controls" style="width:90%;height:450px;margin:0 auto;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// 引入
+import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
+// import { mapGetters } from 'vuex'
+import waves from '@/directive/waves' // waves directive
+import { parseTime, sortChange } from '@/utils/index.js'
+// eslint-disable-next-line no-unused-vars
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import Cookies from 'js-cookie'
+import { MessageBox } from 'element-ui'
+export default {
+  name: 'Maintain',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      active: 0,
+      activeList: [],
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      isokDisable: false,
+      rules: {
+        employeeId: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+      findAllPasture: [],
+      findAllDepart: [],
+      findAllEmploye: [],
+      requestParams: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
+        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['保养模板执行动作'] }
+      ],
+      getDepartParam: {
+        name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
+      },
+      statues: [{ id: '0', name: '已逾期' }, { id: '1', name: '保养中' }, { id: '2', name: '保养完成' }],
+      SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      empdeptList: [],
+      getDictByName: [],
+      radio2: '全部',
+      textMap: {
+        see: '查看详情',
+        receivingSpareParts: '保养及领用',
+        maintainComplete: '完成保养',
+        examine: '保养审核',
+        examine2: '保养审核2',
+        examine3: '保养审核3',
+        video: '视频'
+      },
+      dialogStatus: '',
+      radioAll: '全部',
+      getdataListParm: {
+        name: 'getBigupkeepList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          inputDatetime: '',
+          upkeepCode: '',
+          eqName: '',
+          eqCode: '',
+          departmentId: '',
+          statue: '',
+          pastureName: Cookies.get('pasturename'),
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          SHStatue: '',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+      },
+      total: 0,
+      tableKey: 0,
+      listLoading: false,
+      list: [],
+      // 查看
+      dialogFormVisible_See: false,
+      seeTemp: {},
+      statue1: false,
+      statue2: false,
+      activeName: 'first',
+      listLoadingMaintenanceContent: false,
+      listMaintenanceContent: [],
+      getMaintenanceContentParm: {
+        name: 'getUpkeepTemplateListbyeqV2',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      Reason: false,
+      // 查看-领用记录
+      getCollarUseParm: {
+        name: 'getPartsapplybyMt',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      collarUseTemp: {},
+      // 查看-领用记录table
+      getCollarUseListParm: {
+        name: 'getpartapplyListBybig',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingCollarUse: false,
+      listCollarUse: [],
+      // 查看-旧品录入记录table
+      getOldProductsParm: {
+        name: 'getMaintainRefuse',
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingOldProducts: false,
+      listOldProducts: [],
+      // 保养及领用
+      dialogFormVisible_ReceivingSpareParts: false,
+      activeName2: 'first',
+      maintainTemp: {},
+      receivingTemp: {},
+      getEmpdeptParm: {
+        name: 'getEmpdept',
+        returntype: 'Map',
+        parammaps: {
+          deptId: ''
+        }
+      },
+      getAutoCreatCodeParm: {
+        name: 'autoCreatCode',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'LY'
+        }
+      },
+      requestSparePart: {
+        name: 'getPartsListLY',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+
+      postDataPramas: {},
+      // 完成保养
+      dialogFormVisible_maintainComplete: false,
+      maintainCompleteTemp: {},
+      requestOldProducts: {
+        name: 'getAllPartsListWB',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      No2: false,
+      listAdd: [],
+      // 保养审核
+      dialogFormVisible_examine: false,
+      requestParam: {},
+      examineTemp: {
+        isStatue: 3
+      },
+      isStatueReason: false,
+      // 权限按钮
+      isSee: [],
+      isLingYong: [],
+      isComplete: [],
+      isCharge: [],
+      isLeaderCharge: [],
+      isDepartmentCharge: [],
+      buttons: [],
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getBigupkeepWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {}
+        }
+      },
+      dialogFormVisible_video: false,
+      videoTemp: {},
+      requestParam2: {}
+    }
+  },
+  // computed: {
+  //   ...mapGetters([
+  //     'sidebar',
+  //     'avatar',
+  //     'employeid',
+  //     'pastureid'
+  //   ])
+  // },
+  computed: {
+    space() {
+      const { isSimple, $parent: { space }} = this
+      return isSimple ? '' : space
+    },
+    style: function() {
+      const style = {}
+      const parent = this.$parent
+      const len = parent.steps.length
+
+      const space =
+        typeof this.space === 'number'
+          ? this.space + 'px'
+          : this.space
+            ? this.space
+            : 100 / (len - (this.isCenter ? 0 : 1)) + '%'
+      style.flexBasis = space
+      if (this.isVertical) return style
+      if (this.isLast) {
+        style.maxWidth = 100 / this.stepsCount + '%'
+      } else {
+        style.marginRight = -this.$parent.stepOffset + 'px'
+      }
+      return style
+    }
+  },
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+    if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'MaintenancePlan') {
+      this.getdataListParm.parammaps.eqCode = this.$route.query.eqCode
+      this.getdataListParm.parammaps.inputDatetime = [this.$route.query.time, this.$route.query.time]
+      this.getdataListParm.parammaps.startTime = this.$route.query.time
+      this.getdataListParm.parammaps.stopTime = this.$route.query.time
+    }
+    this.get_select_list()
+    this.get_table_data()
+    this.getPendingList()
+  },
+  methods: {
+    // handleCheck(row) {
+    //   this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
+    //   this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
+    // },
+    tableSort(column) {
+      if (this.activeName == 'second') {
+        sortChange(column, this.listCollarUse)
+      } else if (this.activeName == 'third') {
+        sortChange(column, this.listOldProducts)
+      }
+    },
+    get_auto_buttons() {
+      // 查看
+      const See = 'maintenance:maintain:see'
+      const isSee = checkButtons(JSON.parse(sessionStorage.buttons), See)
+      this.isSee = isSee
+      //  保养及领用
+      const LingYong = 'maintenance:maintain:lingyong'
+      const isLingYong = checkButtons(JSON.parse(sessionStorage.buttons), LingYong)
+      this.isLingYong = isLingYong
+      //  完成保养
+      const Complete = 'maintenance:maintain:complete'
+      const isComplete = checkButtons(JSON.parse(sessionStorage.buttons), Complete)
+      this.isComplete = isComplete
+      //  使用人保养审核
+      const Charge = 'maintenance:maintain:charge'
+      const isCharge = checkButtons(JSON.parse(sessionStorage.buttons), Charge)
+      this.isCharge = isCharge
+      //  主管审核
+      const LeaderCharge = 'maintenance:maintain:leaderCharge'
+      const isLeaderCharge = checkButtons(JSON.parse(sessionStorage.buttons), LeaderCharge)
+      this.isLeaderCharge = isLeaderCharge
+      // 部门审核
+      const DeptCharge = 'maintenance:maintain:deptcharge'
+      const isDepartmentCharge = checkButtons(JSON.parse(sessionStorage.buttons), DeptCharge)
+      this.isDepartmentCharge = isDepartmentCharge
+    },
+    // next() {
+    //   if (this.active++ > 2) this.active = 0
+    //   this.finishStatus = 'error'
+    // },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+        this.getDictByName = response.data.getDictByName.list
+        this.getDepartDownList()
+      })
+    },
+    getDepartDownList() {
+      GetDataByName(this.getDepartParam).then(response => {
+        this.findAllDepart = response.data.list
+      })
+    },
+    changePastureName(item) {
+      this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
+      this.getdataListParm.parammaps.departmentId = ''
+      this.getDepartDownList()
+    },
+
+    close_diago(){
+      console.log(11111111111111)
+      this.dialogFormVisible_See = false
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps = {
+        inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+        pastureName: this.getdataListParm.parammaps.pastureName,
+        SHStatue: this.getdataListParm.parammaps.SHStatue,
+        upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+        eqName: this.getdataListParm.parammaps.eqName,
+        eqCode: this.getdataListParm.parammaps.eqCode,
+        departmentId: this.getdataListParm.parammaps.departmentId,
+        statue: this.getdataListParm.parammaps.statue,
+        loginId: Cookies.get('employeid'),
+        menu: 'Maintain',
+        logindeptId: Cookies.get('departmentid'),
+        loginpastureId: Cookies.get('pastureid'),
+        empId: Cookies.get('employeid'),
+        pastureId: Cookies.get('pastureid'),
+        deptId: Cookies.get('departmentid')
+      }
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      if (this.getdataListParm.parammaps.inputDatetime !== undefined && this.getdataListParm.parammaps.inputDatetime !== '') {
+        this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
+        this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      this.listLoading = true
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          for (let i = 0; i < response.data.list.length; i++) {
+            this.$set(response.data.list[i], 'img', '视频')
+          }
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+        // Just to simulate the time of the request
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+    tableCellStyle({ row, column, rowIndex, columnIndex }) {
+      if (row.statue == 0 && columnIndex === 10) {
+        return {
+          background: 'red',
+          color: '#fff'
+        }
+      }
+      return {
+        background: ''
+      }
+    },
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getBigupkeepList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: '',
+          upkeepCode: '',
+          eqName: '',
+          eqCode: '',
+          departmentId: '',
+          statue: '',
+          pastureName: Cookies.get('pasturename'),
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          SHStatue: '',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getBigupkeepWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          statue: this.getdataListParm.parammaps.statue,
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getBigupkeepWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          upkeepCode: this.getdataListParm.parammaps.upkeepCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          departmentId: this.getdataListParm.parammaps.departmentId,
+          statue: this.getdataListParm.parammaps.statue,
+
+          loginId: Cookies.get('employeid'),
+          menu: 'Maintain',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    statue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.statue == 0) {
+        return '已逾期'
+      } else if (cellValue.statue == 1) {
+        return '保养中'
+      } else if (cellValue.statue == 2) {
+        return '已完成'
+      }
+    },
+    SHStatue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.SHStatue == 1) {
+        return ''
+      } else if (cellValue.SHStatue == 2) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 3) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 4) {
+        return '未通过'
+ 
+      } else if (cellValue.SHStatue == 8) {
+        return '未通过'
+    
+      } else if (cellValue.SHStatue == 7) {
+        return '已通过'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      this.listLoading = true
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+      this.getPendingList()
+    },
+    form_see(row) {
+      this.seeTemp = Object.assign({}, row)
+      console.log('查看', this.seeTemp)
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      var scores = '评分:' + this.seeTemp.scores + '分'
+      if (this.seeTemp.SHStatue === 1) {
+        this.activeList = [{ title: '保养人审核' }, { title: '机修审核' },   { title: '设备主管审核' }]
+        this.active = 0
+        
+      } else if (this.seeTemp.SHStatue === 2) {
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核' },  { title: '设备主管审核' }]
+        this.active = 1
+
+      } else if (this.seeTemp.SHStatue === 3) {
+        this.active = 2
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },   { title: '设备主管审核' }]
+      } else if (this.seeTemp.SHStatue === 4) {
+        this.active = 2
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
+        
+
+      } else if (this.seeTemp.SHStatue === 7) {
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },  { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
+        this.active = 3
+      } else if (this.seeTemp.SHStatue === 8) {
+        this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores },   { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
+        this.active = 3
+      }
+      this.dialogStatus = 'see'
+      this.dialogFormVisible_See = true
+      if (this.seeTemp.SHStatue !== 1) {
+        // 查看显示类型2
+        this.statue1 = false
+        this.statue2 = true
+        this.getMaintenanceContentList()
+      } else {
+        if (this.seeTemp.SHStatue == 1 && this.seeTemp.LYStatue == '未领用' && this.seeTemp.LRStatue == '未录入') {
+          // 查看显示类型1
+          this.statue1 = true
+          this.statue2 = false
+          this.getMaintenanceContentList()
+        } else {
+          // 查看显示类型2
+          this.statue1 = false
+          this.statue2 = true
+          this.getMaintenanceContentList()
+        }
+      }
+      this.collarUseTemp = {}
+      this.listCollarUse = []
+      this.getCollarUse()
+      this.getOldProductsList()
+    },
+    getMaintenanceContentList() {
+      this.getMaintenanceContentParm.parammaps.id = this.seeTemp.id
+      this.listLoadingMaintenanceContent = false
+      GetDataByName(this.getMaintenanceContentParm).then(response => {
+        console.log('保养内容table数据', response.data.list)
+        this.listMaintenanceContent = response.data.list
+        this.$forceUpdate()
+        setTimeout(() => {
+          this.listLoadingMaintenanceContent = false
+        }, 100)
+      })
+    },
+    openDetails(row, column, cell, event) {
+      if (column.label !== '操作') {
+        this.$router.push({ path: '/customs/Receive', query: { applyCode: this.collarUseTemp.applyCode }})
+      }
+    },
+    getCollarUse() {
+      this.getCollarUseParm.parammaps.RUCode = this.seeTemp.upkeepCode
+      GetDataByName(this.getCollarUseParm).then(response => {
+        this.collarUseTemp = response.data.list[0]
+        if (response.data.list.length > 0) {
+          console.log('领用记录数据', response.data.list[0])
+          if (response.data.list[0].statue == 0) {
+            this.$set(this.collarUseTemp, 'statueName', '未领用')
+          } else {
+            this.$set(this.collarUseTemp, 'statueName', '已领用')
+          }
+        }
+        this.getCollarUseList()
+      })
+    },
+    getCollarUseList() {
+      this.getCollarUseListParm.parammaps.id = this.collarUseTemp.id
+      this.listLoadingCollarUse = true
+      GetDataByName(this.getCollarUseListParm).then(response => {
+        console.log('领用table数据', response.data.list)
+        this.listCollarUse = response.data.list
+        setTimeout(() => {
+          this.listLoadingCollarUse = false
+        }, 100)
+      })
+    },
+    getOldProductsList() {
+      this.getOldProductsParm.parammaps.repairCode = this.seeTemp.upkeepCode
+      this.listLoadingOldProducts = true
+      GetDataByName(this.getOldProductsParm).then(response => {
+        console.log('旧品录入记录table数据', response.data.list)
+        this.listOldProducts = response.data.list
+        setTimeout(() => {
+          this.listLoadingOldProducts = false
+        }, 100)
+      })
+    },
+    // 保养及领用
+    handleReceivingSpareParts(row) {
+      console.log('点击了保养及领用')
+      if (row == undefined) {
+        this.receivingTemp = this.seeTemp
+      } else {
+        this.receivingTemp = Object.assign({}, row)
+      }
+      this.maintainTemp = this.receivingTemp
+      this.maintainTemp.employeeId = String(this.maintainTemp.useEmpId)
+      this.seeTemp = this.maintainTemp
+      this.listCollarUse = []
+      this.getAutoCreatCode()
+      this.receivingTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
+      this.getEmpdeptList()
+      this.getCollarUse()
+      this.getMaintenanceContentList()
+      this.dialogStatus = 'receivingSpareParts'
+      this.dialogFormVisible_ReceivingSpareParts = true
+    },
+    getEmpdeptList() {
+      this.getEmpdeptParm.parammaps.deptId = this.maintainTemp.departmentId
+      GetDataByName(this.getEmpdeptParm).then(response => {
+        console.log('保养使用人', response.data.list)
+        if (response.data.list !== null) {
+          this.empdeptList = response.data.list
+        } else {
+          this.empdeptList = []
+        }
+      })
+    },
+    getAutoCreatCode() {
+      GetDataByName(this.getAutoCreatCodeParm).then(response => {
+        console.log('领用领用单号', response.data.list[0])
+        this.receivingTemp.applyCode = response.data.list[0].orderCode
+        this.$forceUpdate()
+      })
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      this.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.requestSparePart).then(response => {
+        console.log('备件模糊查询搜索data', response.data.list)
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      if (this.listCollarUse.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listCollarUse.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此备件已存在,请重新选择备件'
+          })
+        } else {
+          this.listCollarUse.unshift(item)
+        }
+      } else {
+        this.listCollarUse = []
+        this.listCollarUse.unshift(item)
+      }
+    },
+    createReceivingSparePartseData1() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['maintainTemp'].validate(valid => {
+        if (valid) {
+          this.postDataPramas.common = { 'returnmap': '0' }
+          this.postDataPramas.data = []
+          this.postDataPramas.data[0] = { 'name': 'updateEquseEmpId', 'type': 'e', 'parammaps': {
+            employeeId: this.maintainTemp.employeeId,
+            id: this.maintainTemp.id
+          }}
+          this.postDataPramas.data[1] = { 'name': 'deleteutupbyBigid', 'type': 'e', 'parammaps': {
+            id: this.maintainTemp.id
+          }}
+          this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listMaintenanceContent }}
+          this.postDataPramas.data[2].children = []
+          this.postDataPramas.data[2].children[0] = { 'name': 'insertutup', 'type': 'e', 'parammaps': {
+            id: this.maintainTemp.id,
+            positionName: '@insertSpotList.positionName',
+            program: '@insertSpotList.program',
+            standard: '@insertSpotList.standard',
+            active: '@insertSpotList.active'
+          }}
+          ExecDataByConfig(this.postDataPramas).then(response => {
+            console.log('添加领用保存发送参数', this.postDataPramas)
+            if (response.msg === 'fail') {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.dialogFormVisible_ReceivingSpareParts = false
+              this.dialogFormVisible_See = false
+              this.get_table_data()
+              this.getPendingList()
+              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    createReceivingSparePartseData2() {
+      console.log('点击了保养及领用保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['receivingTemp'].validate(valid => {
+        if (valid) {
+          if (this.listCollarUse.length !== 0) {
+            for (var i = 0; i < this.listCollarUse.length; i++) {
+              console.log(this.listCollarUse[i].amount)
+              if (this.listCollarUse[i].amount !== undefined) {
+                var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                if (!rulesAmount.test(this.listCollarUse[i].amount)) {
+                  this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数', duration: 2000 })
+                  return false
+                } else if (parseFloat(this.listCollarUse[i].amount) > parseFloat(this.listCollarUse[i].reportery)) {
+                  this.$message({ type: 'error', message: '领用数量不可大于库存数', duration: 2000 })
+                  return false
+                }
+              } else {
+                this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
+                return false
+              }
+            }
+            let mySumPrice = 0
+            for (let i = 0; i < this.listCollarUse.length; i++) {
+              mySumPrice += parseFloat(this.listCollarUse[i].price) * parseFloat(this.listCollarUse[i].amount)
+            }
+            if (mySumPrice > 500) {
+              this.receivingTemp.SHStatus = 2
+            } else {
+              this.receivingTemp.SHStatus = 9
+            }
+            this.postDataPramas.common = { 'returnmap': '0' }
+            this.postDataPramas.data = []
+            this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
+              pastureId: this.$store.state.user.pastureid,
+              applyCode: this.receivingTemp.applyCode,
+              applyType: 2,
+              departmentId: this.receivingTemp.departmentId,
+              empId: this.receivingTemp.upkeepPersonId,
+              applyDate: this.receivingTemp.createDate,
+              RUCode: this.receivingTemp.upkeepCode,
+              SHStatus: this.receivingTemp.SHStatus
+            }}
+            this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listCollarUse }}
+            this.postDataPramas.data[1].children = []
+            this.postDataPramas.data[1].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
+              bigId: '@insertBigpartapply.LastInsertId',
+              pastureId: '@insertSpotList.pastureId',
+              partId: '@insertSpotList.partId',
+              partCode: '@insertSpotList.partCode',
+              partName: '@insertSpotList.partName',
+              specification: '@insertSpotList.specification',
+              brandId: '@insertSpotList.brandId',
+              price: '@insertSpotList.price',
+              amount: '@insertSpotList.amount',
+              eqName: this.receivingTemp.eqName,
+              eqCode: this.receivingTemp.eqCode,
+              providerId: '@insertSpotList.providerId',
+              note: '@insertSpotList.note',
+              reportery: '@insertSpotList.reportery',
+              contractId: '@insertSpotList.contractId',
+              locationId: '@insertSpotList.locationId'
+            }}
+            ExecDataByConfig(this.postDataPramas).then(response => {
+              console.log('添加领用保存发送参数', this.postDataPramas)
+              if (response.msg === 'fail') {
+                this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              } else {
+                this.dialogFormVisible_ReceivingSpareParts = false
+                this.dialogFormVisible_See = false
+                this.get_table_data()
+                this.getPendingList()
+                this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+              }
+            })
+            // return true
+          } else {
+            this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
+            return false
+          }
+        }
+      })
+    },
+    // 完成保养
+    handleCompleteMaintenance(row) {
+      console.log('点击了完成保养', row)
+      if (row == undefined) {
+        this.$set(this.seeTemp, 'isOldProducts', 0)
+        this.maintainCompleteTemp = this.seeTemp
+      } else {
+        this.maintainCompleteTemp = Object.assign({}, row)
+        this.$set(this.maintainCompleteTemp, 'isOldProducts', 0)
+      }
+      this.dialogStatus = 'maintainComplete'
+      this.No2 = false
+      this.dialogFormVisible_maintainComplete = true
+      this.listAdd = []
+    },
+    changeIsOldProducts(val) {
+      console.log(val)
+      if (val == 1) {
+        this.No2 = true
+      } else {
+        this.No2 = false
+      }
+    },
+    oldProductsSearch(queryString, cb) {
+      console.log('旧品录入模糊查询输入值', queryString)
+      this.requestOldProducts.parammaps.partCode = queryString
+      this.requestOldProducts.parammaps.RUCode = this.maintainCompleteTemp.upkeepCode
+      GetDataByName(this.requestOldProducts).then(response => {
+        console.log('旧品录入模糊查询搜索data', response.data.list)
+        cb(response.data.list)
+      })
+    },
+    handleSelectOldProducts(item) {
+      this.maintainCompleteTemp.partCode = ''
+      console.log('旧品录入模糊查询选中值', item)
+      if (this.listAdd.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd.find(obj => obj.id === item.id)) {
+          this.$message({
+            type: 'warning',
+            message: '此旧品已存在,请重新选择旧品'
+          })
+        } else {
+          if (item.checkoutNumber == null) {
+            this.$set(item, 'checkoutNumber', item.reportery)
+          }
+          this.listAdd.unshift(item)
+        }
+      } else {
+        if (item.checkoutNumber == null) {
+          this.$set(item, 'checkoutNumber', item.reportery)
+        }
+        this.listAdd.unshift(item)
+      }
+    },
+    sparePartsDelete(row) {
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listCollarUse.length; i++) {
+          console.log(this.listCollarUse[i])
+          if (this.listCollarUse[i].id === row.id) {
+            var listCollarUseIndex = this.listCollarUse.indexOf(this.listCollarUse[i])
+          }
+          if (listCollarUseIndex > -1) {
+            this.listCollarUse.splice(listCollarUseIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    partDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    // 完成保养-保存
+    createMaintainCompleteData() {
+      console.log('点击了完成保养确认', this.maintainCompleteTemp)
+      console.log('点击了完成保养确认', this.maintainCompleteTemp.laidcou)
+      if (this.maintainCompleteTemp.laidcou == 0) {
+        if (this.maintainCompleteTemp.isOldProducts == 0) {
+          console.log('否')
+          this.requestParam.name = 'completeUpkeep'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.maintainCompleteTemp.id
+          PostDataByName(this.requestParam).then((response) => {
+            if (response.msg !== 'fail') {
+
+
+              //如果有设备记录仪的权限
+              if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
+                // 临时注释
+                  if (this.maintainCompleteTemp.videoTxt == '已录制') {
+                    this.requestParam2.name = 'upkeepChargDone'
+                    this.requestParam2.parammaps = {}
+                    this.requestParam2.parammaps.id = this.maintainCompleteTemp.id
+                    this.requestParam2.parammaps.statue = 7
+                    this.requestParam2.parammaps.orderStatue = 2
+                    this.requestParam2.parammaps.empId = Cookies.get('employeid')
+                    PostDataByName(this.requestParam2).then(response => {
+                      if (response.msg !== 'fail') {
+                        if (this.getdataListParm.parammaps.inputDatetime === null) {
+                          this.getdataListParm.parammaps.inputDatetime = ''
+                        }
+                        this.get_table_data()
+                        this.dialogFormVisible_maintainComplete = false
+                        this.dialogFormVisible_See = false
+                        this.getPendingList()
+                        this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+                      } else {
+                        failproccess(response, this.$notify)
+                      }
+                    })
+                  }
+              // 临时注释
+              }else{
+                //正常流程。没有记录仪权限
+
+                 if (this.getdataListParm.parammaps.inputDatetime === null) {
+                    this.getdataListParm.parammaps.inputDatetime = ''
+                  }
+                  this.dialogFormVisible_maintainComplete = false
+                  this.dialogFormVisible_See = false
+                  this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+                  this.get_table_data()
+                  this.getPendingList()
+              }
+
+
+              
+
+
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        } else {
+          console.log('是')
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          this.$refs['maintainCompleteTemp'].validate(valid => {
+            if (valid) {
+              if (this.listAdd.length !== 0) {
+                for (var i = 0; i < this.listAdd.length; i++) {
+                  if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
+                    this.$message({
+                      type: 'warning',
+                      message: '请录入数量是否未填写',
+                      duration: 2000
+                    })
+                    return false
+                  } else {
+                    var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                    if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
+                      this.$message({
+                        type: 'error',
+                        message: '录入数量请输入正数,最多保留两位小数点',
+                        duration: 2000
+                      })
+                      return false
+                    }
+                  }
+                }
+                this.postDataPramas.common = { 'returnmap': '0' }
+                this.postDataPramas.data = []
+                this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+                this.postDataPramas.data[0].children = []
+                this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
+                  pastureId: Cookies.get('pastureid'),
+                  deptId: this.maintainCompleteTemp.departmentId,
+                  partCode: '@insertSpotList.partCode',
+                  partName: '@insertSpotList.partName',
+                  partId: '@insertSpotList.id',
+                  specification: '@insertSpotList.specification',
+                  unit: '@insertSpotList.unit',
+                  acturalAmount: '@insertSpotList.acturalAmount',
+                  eqId: this.maintainCompleteTemp.eqId,
+                  eqCode: this.maintainCompleteTemp.eqCode,
+                  eqName: this.maintainCompleteTemp.eqName,
+                  repairCode: this.maintainCompleteTemp.upkeepCode,
+                  listType: 1
+                }}
+                this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
+                  id: this.maintainCompleteTemp.id
+                }}
+                ExecDataByConfig(this.postDataPramas).then(response => {
+                  console.log('完成维修-是-保存发送参数', this.postDataPramas)
+                  if (response.msg === 'fail') {
+                    this.$notify({
+                      title: '保存失败',
+                      message: response.data,
+                      type: 'warning',
+                      duration: 2000
+                    })
+                  } else {
+                    this.dialogFormVisible_maintainComplete = false
+                    this.dialogFormVisible_See = false
+                    this.get_table_data()
+                    this.getPendingList()
+                    this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+                  }
+                })
+                return true
+              } else {
+                this.$notify({
+                  title: '',
+                  message: '请完善旧品信息',
+                  type: 'warning',
+                  duration: 2000
+                })
+                return false
+              }
+            }
+          })
+        }
+      } else {
+        this.$notify({ message: '备件未领用不可完成保养', type: 'warning', duration: 2000 })
+      }
+    },
+    // 保养审核
+    handleExamine(row) {
+      console.log('点击了保养审核')
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      }
+      this.dialogStatus = 'examine'
+      this.dialogFormVisible_examine = true
+    },
+    changeIsStatue(val) {
+      console.log(val)
+      if (val == 4) {
+        this.isStatueReason = true
+      } else {
+        this.isStatueReason = false
+      }
+    },
+    // 保养审核1
+    createExamineData() {
+      console.log('点击了保养审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'upkeepCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          this.requestParam.parammaps.statue = this.examineTemp.isStatue
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          if (this.requestParam.parammaps.statue == 4) {
+            this.requestParam.parammaps.scores = 5
+          } else {
+            this.requestParam.parammaps.scores = this.examineTemp.scores
+          }
+          PostDataByName(this.requestParam).then(response => {
+            console.log('保养审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.dialogFormVisible_examine = false
+              this.dialogFormVisible_See = false
+              this.isStatueReason = false
+              this.getPendingList()
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    // 保养审核2
+    handleExamine2(row) {
+      console.log('点击了保养审核------', row)
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine2'
+      this.dialogFormVisible_examine = true
+    },
+    // 保养审核2-保存
+    createExamineData2() {
+      if (this.examineTemp.isStatue == 3) {
+        console.log('点击了保养审核2确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepChargDone'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 7
+            this.requestParam.parammaps.orderStatue = 2
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了保养审核2确认-不通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge1'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 8
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    // 保养审核2
+    handleExamine3(row) {
+      console.log('点击了保养审核------', row)
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'isStatue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'isStatue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      this.dialogStatus = 'examine3'
+      this.dialogFormVisible_examine = true
+    },
+    // 保养审核3-保存
+    createExamineData3() {
+      if (this.examineTemp.isStatue == 3) {
+        console.log('点击了保养审核3确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge3'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 5
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.getPendingList()
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了保养审核3确认-不通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'upkeepCharge3'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 6
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('保养审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_examine = false
+                this.dialogFormVisible_See = false
+                this.isStatueReason = false
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    preview(row) {
+      console.log(row, '=====666')
+      this.dialogStatus = 'video'
+      this.dialogFormVisible_video = true
+      // row.videoPath = 'https://sys.mcs8.net:7706' + row.videoPath
+      this.videoTemp = Object.assign({}, row)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  /deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>
+<style lang="scss">
+.el-step__head.is-success {
+    color: #409EFF;
+    border-color: #409EFF;
+}
+.el-step__title.is-success{
+  color: #409EFF;
+}
+.el-step__head.is-process{
+  color: #409EFF;
+  border-color: #409EFF;
+  .el-step__icon.is-text{
+    background: #409EFF;
+    color: #fff;
+  }
+}
+.step-row{
+  color: #000;
+}
+</style>

+ 58 - 8
src/views/maintenance/repair/index.vue

@@ -200,16 +200,16 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="故障情况:" prop="details">
+              <!-- <el-form-item label="故障情况:" prop="details">
                 <el-input ref="details" v-model="createTemp.details" />
-              </el-form-item>
+              </el-form-item> -->
                <!-- 这里PC和APP都需要等后端接口出来,是选了设备后带出故障内容。T T -->
-              <!-- <el-form-item label="故障情况:" prop="pickId">
-                <el-select v-model="createTemp.pickId" placeholder="故障情况" filterable class="filter-item" style="width:100%" @change="changePickId">
-                  <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
+              <el-form-item label="故障情况:" prop="details">
+                <el-select v-model="createTemp.details" multiple placeholder="故障情况" filterable class="filter-item" style="width:100%" @change="changeDetails">
+                  <el-option v-for="item in  DetailList" :key="item.describe" :label="item.describe" :value="item.describe" />
                 </el-select>
                 
-              </el-form-item> -->
+              </el-form-item> 
 
 
 
@@ -1425,7 +1425,8 @@ export default {
         requestTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'),
         pickId: '',
         repairCode: '',
-        deptName: ''
+        deptName: '',
+        eqClassId: '',
       },
       requestEqName: {
         name: 'geteqbyNameCode',
@@ -1437,6 +1438,12 @@ export default {
           pastureId: Cookies.get('pastureid')
         }
       },
+      getdataListParmDetail: {
+        name: 'getFaultdescription',
+        parammaps: {   eqClassId: '',  }
+      },
+      DetailList: [],
+
       EqNameList: [],
       EqCodeList: [],
       getRepairNumberParm: {
@@ -1525,7 +1532,8 @@ export default {
         name: 'getRepirsEmp',
         returntype: 'Map',
         parammaps: {
-          pastureId: Cookies.get('pastureid')
+          pastureId: Cookies.get('pastureid'),
+          id: ""
         }
       },
       examineTemp: {
@@ -1900,6 +1908,7 @@ export default {
       this.createTemp.repairCode = ''
       this.createTemp.deptName = ''
       this.createTemp.departmentId = ''
+      this.createTemp.eqClassId = ''
     },
     changePickId(val) {
       if (this.dialogStatus == 'create') {
@@ -1979,6 +1988,13 @@ export default {
     add_dialog_saveSave() {
       this.requestParam.name = 'insertmaintain'
       this.requestParam.parammaps = this.createTemp
+
+      var detailString = this.requestParam.parammaps.details.toString()
+
+      this.requestParam.parammaps.details = detailString
+
+
+      
       PostDataByName(this.requestParam).then(response => {
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
@@ -2008,6 +2024,7 @@ export default {
       console.log('备件名称/设备内部编号模糊查询选中值', item)
       this.$set(this.createTemp, 'eqCode', item.eqCode)
       this.$set(this.createTemp, 'eqId', item.eqId)
+      this.$set(this.createTemp, 'eqClassId', item.eqClassId)
       if (item.deptName !== undefined && item.departmentId !== undefined) {
         this.$set(this.createTemp, 'deptName', item.deptName)
         this.$set(this.createTemp, 'departmentId', item.departmentId)
@@ -2015,6 +2032,13 @@ export default {
         this.$set(this.createTemp, 'deptName', '')
         this.$set(this.createTemp, 'departmentId', '')
       }
+
+      this.getdataListParmDetail.parammaps.eqClassId = item.eqClassId
+      this.getDetail()
+
+      this.getRepirsEmpParm.parammaps.id = item.maintenance
+      this.getRepirsEmp()
+
       this.$forceUpdate()
     },
     querySearchCode(queryString, cb) {
@@ -2035,6 +2059,7 @@ export default {
       console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
       this.$set(this.createTemp, 'eqName', item.eqName)
       this.$set(this.createTemp, 'eqId', item.eqId)
+      this.$set(this.createTemp, 'eqClassId', item.eqClassId)
       if (item.deptName !== undefined && item.departmentId !== undefined) {
         this.$set(this.createTemp, 'deptName', item.deptName)
         this.$set(this.createTemp, 'departmentId', item.departmentId)
@@ -2042,7 +2067,30 @@ export default {
         this.$set(this.createTemp, 'deptName', '')
         this.$set(this.createTemp, 'departmentId', '')
       }
+      
+      
+ 
+     
+      this.getdataListParmDetail.parammaps.eqClassId = item.eqClassId
+      this.getDetail()
       this.$forceUpdate()
+
+      this.getRepirsEmpParm.parammaps.id = item.maintenance
+      this.getRepirsEmp()
+    },
+
+    getDetail(){
+      GetDataByName(this.getdataListParmDetail).then(response => {
+        if (response.data.list !== null) {
+          console.log('DetailList数据', response.data.list)
+          this.DetailList = response.data.list
+        } else {
+          this.DetailList = []
+        }
+      })
+    },
+    changeDetails(e){
+      console.log(e)
     },
     form_see(row) {
       console.log(row)
@@ -2113,6 +2161,7 @@ export default {
       this.dialogStatus = 'distributeLeaflets'
       this.dialogFormVisible_DistributeLeaflets = true
       this.resetDistributeLeafletsTemp()
+      this.getRepirsEmpParm.parammaps.id = ""
       this.getRepirsEmp()
     },
     changeMaintenanceTeam(val) {
@@ -2120,6 +2169,7 @@ export default {
       this.getRepirsEmpParm.parammaps.deptid = val
       this.createTemp.pickId = ''
       this.distributeLeafletsTemp.pickId = ''
+      this.getRepirsEmpParm.parammaps.id = ""
       this.getRepirsEmp()
     },
     getRepirsEmp() {

+ 3253 - 0
src/views/maintenance/repair/index1.vue

@@ -0,0 +1,3253 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+      <el-input v-model="getdataListParm.parammaps.repairCode" placeholder="报修单号" clearable style="width: 130px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 130px;" class="filter-item" />
+      <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 130px;" class="filter-item" />
+      <el-select v-model="getdataListParm.parammaps.orderStatue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
+        <el-option v-for="item in orderStatues" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <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-date-picker
+        ref="inputDatetime"
+        v-model="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>
+      <div>
+        <el-button v-if="isRepair" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">报修</el-button>
+        <!-- 临时注释 -->
+        <el-button v-if="isRepairExport" class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
+        <!-- 临时注释 -->
+        <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
+          <el-radio-button label="全部" />
+          <el-badge :value="pending.total" class="item">
+            <el-radio-button label="待处理" />
+          </el-badge>
+          <el-radio-button label="已处理" />
+        </el-radio-group>
+      </div>
+    </div>
+    <el-table
+      :key="tableKey"
+      v-loading="listLoading"
+      element-loading-text="给我一点时间"
+      :data="list"
+      border
+      fit
+      highlight-current-row
+      style="width: 100%;"
+      :row-style="rowStyle"
+      :cell-style="cellStyle"
+      class="elTable table-fixed"
+    >
+      <el-table-column label="序号" align="center" type="index" width="50px">
+        <template slot-scope="scope">
+          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="报修单号" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.repairCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="牧场" width="140px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.pastureName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备内部编号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqCode }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备名称" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.eqName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="规格型号" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.specification }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="部门" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.departmentName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="故障情况" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.details }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="报修人" min-width="100px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.requesterName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="报修时间" sortable prop="requestTime" min-width="110px" align="center" />
+      <el-table-column label="维修日期" sortable prop="stopTime" min-width="110px" align="center" />
+      <el-table-column label="维修部门" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.repairDeptName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="处理状态" min-width="100px" align="center" :formatter="orderStatue" />
+      <el-table-column label="领用单状态" min-width="80px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LYStatue }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="旧品录入状态" min-width="110px" align="center">
+        <template slot-scope="scope">
+          <span>{{ scope.row.LRStatue }}</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}">
+          <el-button v-if="isMaintenanceSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
+          <!-- 维修审核 -->
+          <el-button v-if="(row.SHStatue == 2) && isMaintenanceAudit && row.requesterId == getdataListParm.parammaps.loginId" style="display:inline-block" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine(row)">维修审核</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine(row)">维修审核</el-button>
+          <!-- 维修审核2 -->
+          <el-button v-if="(row.SHStatue == 3) && isMaintenanceAudit2" style="display:inline-block" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine2(row)">维修审核2</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine2(row)">主管审核</el-button>
+          <!-- 派单 -->
+          <el-button v-if="(row.orderStatue == 0) && isDistributeLeaflets" style="display:inline-block" type="success" size="mini" @click="handleDistributeLeaflets(row)">派单</el-button>
+          <el-button v-else-if="(row.orderStatue == 1 ||row.orderStatue == 2 )" style="display:none" type="success" size="mini" @click="handleDistributeLeaflets(row)">派单</el-button>
+          <!-- 接单 -->
+          <el-button v-if="(row.orderStatue == 0 && isReceipt && (row.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
+          <el-button v-else-if="(row.orderStatue == 1 ||row.orderStatue == 2 )" style="display:none" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
+          <!-- 维修及领用 -->
+          <el-button v-if="(row.orderStatue == 1 && row.SHStatue== 1 || row.SHStatue== 4 || row.SHStatue== 6) && isMaintenanceRequisition && (row.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" size="mini" class="successRequisition" @click="handleMaintenanceRequisition(row)">维修及领用</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" class="successRequisition" @click="handleMaintenanceRequisition(row)">维修及领用</el-button>
+          <!-- 完成维修 -->
+          <el-button v-if="(row.orderStatue == 1 && (row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6)) && isRepairComplete && (row.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" size="mini" class="successMaintenanceAudit" @click="handleRepairComplete(row)">完成维修</el-button>
+          <el-button v-else style="display:none" type="success" size="mini" class="successMaintenanceAudit" @click="handleRepairComplete(row)">完成维修</el-button>
+          <!-- 删除 -->
+          <el-button v-if="((row.orderStatue == 0 && row.SHStatue == 1) && isDelete)" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+          <el-button v-else style="display:none" type="success" size="danger" @click="form_delete(row)">删除</el-button>
+          <!-- 驳回报修 -->
+          <el-button v-if="(row.orderStatue == 0 && isRejectRepair)" style="display:inline-block;" type="success" class="successMaintenanceAudit" size="mini" @click="handleRejectRepair(row)">报修驳回</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+  
+  
+      <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_Create" :close-on-click-modal="false" width="90%">
+      <div class="app-create">
+        <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="报修单号:" prop="repairCode">
+                <el-input ref="repairCode" v-model="createTemp.repairCode" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="设备名称:" prop="eqName">
+                <el-autocomplete
+                  v-model="createTemp.eqName"
+                  class="inline-input"
+                  :fetch-suggestions="querySearchEqName"
+                  value-key="eqName"
+                  placeholder="设备名称"
+                  style="width:100%"
+                  @select="handleSelectEqName"
+                >
+                  <template slot-scope="{ item }">
+                    <b>名称:</b><span>{{ item.eqName }}</span>&nbsp;
+                    |&nbsp;<b>规格:</b><span>{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="设备内部编号:" prop="eqCode">
+                <el-autocomplete
+                  v-model="createTemp.eqCode"
+                  class="inline-input"
+                  :fetch-suggestions="querySearchCode"
+                  style="width:100%"
+                  value-key="eqCode"
+                  placeholder="设备内部编号"
+                  @select="handleSelectEqCode"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="维修人:" prop="pickId">
+                <el-select v-model="createTemp.pickId" placeholder="维修人" filterable class="filter-item" style="width:100%" @change="changePickId">
+                  <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="故障情况:" prop="details">
+                <el-input ref="details" v-model="createTemp.details" />
+              </el-form-item>
+               <!-- 这里PC和APP都需要等后端接口出来,是选了设备后带出故障内容。T T -->
+              <!-- <el-form-item label="故障情况:" prop="pickId">
+                <el-select v-model="createTemp.pickId" placeholder="故障情况" filterable class="filter-item" style="width:100%" @change="changePickId">
+                  <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
+                </el-select>
+                
+              </el-form-item> -->
+
+
+
+
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="牧场:" prop="pastureName">
+                <el-select v-model="createTemp.pastureId" style="width: 100%;" placeholder="牧场" class="filter-item">
+                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="部门:" prop="deptName">
+                <el-input ref="deptName" v-model="createTemp.deptName" disabled />
+              </el-form-item>
+              <!-- <el-form-item label="部门:" prop="departmentId">
+                <el-select v-model="createTemp.departmentId" placeholder="部门" class="filter-item" style="width:100%">
+                  <el-option
+                    v-for="item in findAllDepart"
+                    :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="requesterId">
+                <el-select ref="requesterId" v-model="createTemp.requesterId" placeholder="报修人" class="filter-item" style="width:100%">
+                  <el-option
+                    v-for="item in findAllEmploye"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="报修日期:" prop="requestTime">
+                <el-date-picker
+                  v-model="createTemp.requestTime"
+                  :picker-options="pickerOptions1"
+                  type="datetime"
+                  placeholder="报修日期"
+                  format="yyyy-MM-dd HH:mm"
+                  value-format="yyyy-MM-dd HH:mm"
+                  style="width: 100%;"
+                  disabled
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
+        <el-button @click="dialogFormVisible_Create = false;get_table_data()">关闭</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" width="90%">
+      <div class="app-see">
+        <div v-if="orderStatue1" class="see">
+          <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="130px" style="width: 90%;margin:0 auto;">
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="报修单号:" prop="repairCode">
+                  <el-input ref="repairCode" v-model="seeTemp.repairCode" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备名称:" prop="eqName">
+                  <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="设备内部编号:" prop="eqCode">
+                  <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <!-- <el-col :span="8">
+                <el-form-item label="维修组:" prop="repairDeptName">
+                  <el-input ref="repairDeptName" v-model="seeTemp.repairDeptName" disabled />
+                </el-form-item>
+              </el-col> -->
+              <el-col :span="8">
+                <el-form-item label="维修人:" prop="pickName">
+                  <el-input ref="pickName" v-model="seeTemp.pickName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="故障情况:" prop="details">
+                  <el-input ref="details" v-model="seeTemp.details" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="牧场:" prop="pastureName">
+                  <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="部门:" prop="departmentName">
+                  <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="报修人:" prop="requesterName">
+                  <el-input ref="requesterName" v-model="seeTemp.requesterName" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="报修日期:" prop="requestTime">
+                  <el-input ref="requestTime" v-model="seeTemp.requestTime" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col v-if="seeTemp.orderStatue == 3" :span="8">
+                <el-form-item label="驳回日期:" prop="shutdownDate">
+                  <el-input ref="shutdownDate" v-model="seeTemp.shutdownDate" disabled />
+                </el-form-item>
+              </el-col>
+              <el-col v-if="seeTemp.orderStatue == 3" :span="8">
+                <el-form-item label="驳回原因:" prop="shutdownReason">
+                  <el-input ref="shutdownReason" v-model="seeTemp.shutdownReason" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <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>{{ item.scores }}</div>
+
+                      </div>
+                    </template>
+                  </el-step>
+                </el-steps>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col>
+                <el-form-item label="操作:">
+                  <!-- 维修审核 -->
+                  <el-button v-if="(seeTemp.SHStatue == 2) && isMaintenanceAudit && seeTemp.requesterId == getdataListParm.parammaps.loginId" style="display:inline-block" type="success" @click="handleExamine()">维修审核</el-button>
+                  <el-button v-else style="display:none" type="success" @click="handleExamine()">维修审核</el-button>
+                  <!-- 维修审核2 -->
+                  <el-button v-if="(seeTemp.SHStatue == 3) && isMaintenanceAudit2" style="display:inline-block" type="success" @click="handleExamine2(row)">维修审核2</el-button>
+                  <el-button v-else style="display:none" type="success" @click="handleExamine2()">主管审核</el-button>
+                  <!-- 派单 -->
+                  <el-button v-if="(seeTemp.orderStatue == 0) && isDistributeLeaflets" style="display:inline-block" type="success" @click="handleDistributeLeaflets()">派单</el-button>
+                  <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleDistributeLeaflets()">派单</el-button>
+                  <!-- 接单 -->
+                  <el-button v-if="(seeTemp.orderStatue == 0 && isReceipt && (seeTemp.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" @click="handleReceipt()">接单</el-button>
+                  <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleReceipt()">接单</el-button>
+                  <!-- 维修及领用 -->
+                  <el-button v-if="(seeTemp.orderStatue == 1 && seeTemp.SHStatue== 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6) && isMaintenanceRequisition && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleMaintenanceRequisition()">维修及领用</el-button>
+                  <el-button v-else style="display:none" @click="handleMaintenanceRequisition()">维修及领用</el-button>
+                  <!-- 完成维修 -->
+                  <el-button v-if="(seeTemp.orderStatue == 1 && (seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6)) && isRepairComplete && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleRepairComplete()">完成维修</el-button>
+                  <el-button v-else style="display:none" @click="handleRepairComplete()">完成维修</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <div v-if="orderStatue2" class="see">
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="基础信息" name="first">
+              <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="130px" style="width: 90%;margin:0 auto;">
+                <el-row>
+                  <el-col :span="8">
+                    <h3>报修信息</h3>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="报修单号:" prop="repairCode">
+                      <el-input ref="repairCode" v-model="seeTemp.repairCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备名称:" prop="eqName">
+                      <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="设备内部编号:" prop="eqCode">
+                      <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <!-- <el-col :span="8">
+                    <el-form-item label="维修组:" prop="repairDeptName">
+                      <el-input ref="repairDeptName" v-model="seeTemp.repairDeptName" disabled />
+                    </el-form-item>
+                  </el-col> -->
+                  <el-col :span="8">
+                    <el-form-item label="维修人:" prop="pickName">
+                      <el-input ref="pickName" v-model="seeTemp.pickName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="故障情况:" prop="details">
+                      <el-input ref="details" v-model="seeTemp.details" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="牧场:" prop="pastureName">
+                      <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="部门:" prop="departmentName">
+                      <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="报修人:" prop="requesterName">
+                      <el-input ref="requesterName" v-model="seeTemp.requesterName" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="报修日期:" prop="requestTime">
+                      <el-input ref="requestTime" v-model="seeTemp.requestTime" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <h3>维修信息</h3>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="维修日期:" prop="stopTime">
+                      <el-input ref="stopTime" v-model="seeTemp.stopTime" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <h3>故障诊断</h3>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingFault"
+                element-loading-text="给我一点时间"
+                :data="listFault"
+                border
+                fit
+                highlight-current-row
+                style="width: 90%;margin:0 auto"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="故障部位" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.positionName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="故障详情" prop="appearanceName" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.appearanceName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="故障原因" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.failureCause }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="处理方式" prop="treatmentMethod" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.treatmentMethod }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-form
+                ref="seeTemp"
+                :rules="rules"
+                :model="seeTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto;"
+              >
+                <el-row>
+                  <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" style="font-size:18px">
+                          <div class="step-row">
+                            <div>{{ item.name }}</div>
+                            <div>{{ item.date }}</div>
+                            <div>{{ item.reason }}</div>
+                            <div>{{ item.scores }}</div>
+                          </div>
+                        </template>
+                      </el-step>
+                    </el-steps>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col>
+                    <h3 style="display:inline">操作</h3>
+                    <!-- 维修审核 -->
+                    <el-button v-if="(seeTemp.SHStatue == 2) && isMaintenanceAudit && seeTemp.requesterId == getdataListParm.parammaps.loginId" style="display:inline-block" type="success" @click="handleExamine()">维修审核</el-button>
+                    <el-button v-else style="display:none" type="success" @click="handleExamine()">维修审核</el-button>
+                    <!-- 维修审核2 -->
+                    <el-button v-if="(seeTemp.SHStatue == 3) && isMaintenanceAudit2" style="display:inline-block" type="success" @click="handleExamine2(row)">维修审核2</el-button>
+                    <el-button v-else style="display:none" type="success" @click="handleExamine2()">主管审核</el-button>
+                    <!-- 派单 -->
+                    <el-button v-if="(seeTemp.orderStatue == 0) && isDistributeLeaflets" style="display:inline-block" type="success" @click="handleDistributeLeaflets()">派单</el-button>
+                    <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleDistributeLeaflets()">派单</el-button>
+                    <!-- 接单 -->
+                    <el-button v-if="(seeTemp.orderStatue == 0 && isReceipt && (seeTemp.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" @click="handleReceipt()">接单</el-button>
+                    <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleReceipt()">接单</el-button>
+                    <!-- 维修及领用 -->
+                    <el-button v-if="(seeTemp.orderStatue == 1 && seeTemp.SHStatue== 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6) && isMaintenanceRequisition && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleMaintenanceRequisition()">维修及领用</el-button>
+                    <el-button v-else style="display:none" type="success" @click="handleMaintenanceRequisition()">维修及领用</el-button>
+                    <!-- 完成维修 -->
+                    <el-button v-if="(seeTemp.orderStatue == 1 && (seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6)) && isRepairComplete && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleRepairComplete()">完成维修</el-button>
+                    <el-button v-else style="display:none" type="success" @click="handleRepairComplete()">完成维修</el-button>
+                  </el-col>
+                </el-row>
+              </el-form>
+            </el-tab-pane>
+            <el-tab-pane label="领用记录" name="second">
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingCollarUse"
+                element-loading-text="给我一点时间"
+                :data="listCollarUse"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @cell-click="openDetails"
+              >
+                <!-- table表格 -->
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="领用单号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.applyCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="领用部门" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.departmentName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="领用日期" sortable prop="createDate" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.createDate }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="领用明细" prop="details" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.details }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="领用状态" min-width="110px" align="center" :formatter="statue" />
+                <el-table-column label="操作" min-width="110px" align="center">
+                  <template slot-scope="{row}">
+                    <el-button type="primary" size="mini" @click="handleCollarUseSee(row,0)">查看</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+            <el-tab-pane label="旧品录入记录" name="third">
+              <el-table
+                :key="tableKey"
+                v-loading="listLoadingOldProducts"
+                element-loading-text="给我一点时间"
+                :data="listOldProducts"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable"
+                @sort-change="tableSort1"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" prop="id" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="录入数量" sortable prop="acturalAmount" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.acturalAmount }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px;">
+        <el-button @click="dialogFormVisible_See = false">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 派单 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_DistributeLeaflets" :close-on-click-modal="false" width="50%">
+      <div class="distributeLeaflets">
+        <el-form
+          ref="distributeLeafletsTemp"
+          :rules="rules"
+          :model="distributeLeafletsTemp"
+          label-position="right"
+          label-width="120px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="维修人:" prop="pickId">
+                <el-select v-model="distributeLeafletsTemp.pickId" filterable placeholder="维修人" class="filter-item" style="width:100%" @change="changePickId">
+                  <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="派单人:" prop="chargeId">
+                <el-select v-model="distributeLeafletsTemp.chargeId" placeholder="派单人" class="filter-item" style="width:100%">
+                  <el-option
+                    v-for="item in findAllEmploye"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="派单日期:" prop="chargeDate">
+                <el-date-picker
+                  v-model="distributeLeafletsTemp.chargeDate"
+                  :picker-options="pickerOptions1"
+                  type="date"
+                  placeholder="派单日期"
+                  style="width:100%;"
+                  format="yyyy-MM-dd"
+                  value-format="yyyy-MM-dd"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='distributeLeaflets'?createDistributeLeafletsData():createDistributeLeafletsData()">确认</el-button>
+        <el-button @click="dialogFormVisible_DistributeLeaflets = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 审核 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_MaintenanceAudit" :close-on-click-modal="false" width="30%">
+      <div class="maintenanceAudit">
+        <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认维修审核结果:</h3>
+        <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
+          <el-row style="width:90%;margin:0 auto;">
+            <el-col :span="20">
+              <el-form-item>
+                <el-radio-group v-model="examineTemp.statue" @change="changeStatue">
+                  <el-radio :label="3" checked>通过</el-radio>
+                  <el-radio :label="4">不通过</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-row v-if="examineTemp.SHStatue == 2 && examineTemp.statue== 3" style="width:90%;margin:0 auto;">
+            <el-col :span="24">
+              <el-form-item label="评分:" prop="scores">
+                <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintenanceAudit'?createExamineData():createExamineData2()">确认</el-button>
+        <el-button @click="dialogFormVisible_MaintenanceAudit = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_RepairComplete" :close-on-click-modal="false" width="50%">
+      <div class="repairComplete">
+        <el-form
+          ref="repairCompleteTemp"
+          :rules="rules"
+          :model="repairCompleteTemp"
+          label-position="right"
+          label-width="120px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="是否录入旧品:" prop="isOldProducts">
+                <el-radio-group v-model="repairCompleteTemp.isOldProducts" @change="changeIsOldProducts">
+                  <el-radio :label="0" checked>否</el-radio>
+                  <el-radio :label="1">是</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="No2">
+            <el-col :span="24">
+              <el-form-item label="旧品录入:" prop="partCode">
+                <el-autocomplete
+                  v-model="repairCompleteTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="oldProductsSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格"
+                  style="width:100%"
+                  @select="handleSelectOldProducts"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
+                    |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
+                    |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          v-if="No2"
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listAdd"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :cell-style="cellStyle"
+          class="elTable"
+          :row-style="rowStyle"
+        >
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="60px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row" :rules="rules">
+                <el-form-item prop="acturalAmount">
+                  <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="note">
+                  <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="partDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='repairComplete'?createRepairCompleteData():createRepairCompleteData()">确认</el-button>
+        <el-button @click="dialogFormVisible_RepairComplete = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_MaintenanceRequisition" :close-on-click-modal="false" width="90%">
+      <div style="position: absolute;top:12px;left:120px;font:18px/40px '' ;color:#303133;">
+        <span style="margin:0 10px;">设备名称:{{ maintenanceRequisitionTemp.eqName }}</span>
+        <span>内部编号:{{ maintenanceRequisitionTemp.eqCode }}</span>
+      </div>
+      <div class="maintenanceRequisition" style="width:90%;margin:0 auto;">
+        <el-tabs v-model="activeName2" @tab-click="tabMaintenance">
+          <el-tab-pane label="维修" name="first">
+            <el-form
+              ref="maintenanceRequisitionTemp"
+              :rules="rules"
+              :model="maintenanceRequisitionTemp"
+              label-position="right"
+              label-width="120px"
+              style="width: 90%;margin:0 auto;"
+            >
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="维修日期" prop="repirsTime">
+                    <el-date-picker
+                      v-model="maintenanceRequisitionTemp.repirsTime"
+                      :picker-options="pickerOptions1"
+                      type="date"
+                      placeholder="维修日期"
+                      style="width:100%;"
+                      format="yyyy-MM-dd"
+                      value-format="yyyy-MM-dd"
+                      :clearable="false"
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <div class="newFault">
+              <el-form
+                ref="newFaultTemp"
+                :rules="rules"
+                :model="newFaultTemp"
+                label-position="right"
+                label-width="120px"
+                style="width: 90%;margin:0 auto"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="故障诊断:" prop="positionId">
+                      <el-select v-model="newFaultTemp.positionId" style="width:100%;" filterable placeholder="故障部位" @change="changePosition">
+                        <el-option
+                          v-for="item in positions"
+                          :key="item.id"
+                          :label="item.positionName"
+                          :value="item.id"
+                        />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item>
+                      <el-select v-model="newFaultTemp.appearanceName" style="width:100%;" filterable placeholder="故障详情" @change="changeAppearance">
+                        <el-option
+                          v-for="item in appearances"
+                          :key="item.id"
+                          :label="item.appearanceName"
+                          :value="item.appearanceName"
+                        />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKey"
+                v-loading="listLoading"
+                element-loading-text="给我一点时间"
+                :data="listNewFault"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;margin-bottom:30px"
+                :cell-style="cellStyle"
+                class="elTable"
+                :row-style="rowStyle"
+              >
+                <el-table-column type="index" label="序号" align="center" width="50px" />
+                <el-table-column label="故障部位" min-width="90px" prop="positionName" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.positionName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="故障详情" min-width="60px" align="center" prop="appearanceName">
+                  <template slot-scope="scope">
+                    <el-input ref="appearanceName" v-model="scope.row.appearanceName" />
+                  </template>
+                </el-table-column>
+                <el-table-column label="故障原因" min-width="60px" align="center" prop="failureCause">
+                  <template slot-scope="scope">
+                    <el-input ref="failureCause" v-model="scope.row.failureCause" />
+                  </template>
+                </el-table-column>
+                <el-table-column label="处理方式" min-width="60px" align="center" prop="treatmentMethod">
+                  <template slot-scope="scope">
+                    <el-input ref="treatmentMethod" v-model="scope.row.treatmentMethod" />
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
+                  <template slot-scope="{row}">
+                    <a class="del" @click="newFaultDelete(row)">删除</a>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </el-tab-pane>
+          <el-tab-pane label="备件领用" name="second">
+            <el-button class="filter-item" type="primary" size="mini" style="margin-bottom:10px" @click="handleCollectionSparePartsCreate">添加领用单</el-button>
+            <h4>有库存领用</h4>
+            <el-table
+              :key="tableKey"
+              v-loading="listLoading"
+              element-loading-text="给我一点时间"
+              :data="listCollectionSpareParts"
+              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 + (pageNum-1) * pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用单号" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.applyCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用部门" width="140px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.departmentName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用日期" sortable prop="createDate" min-width="80px" align="center" />
+              <el-table-column label="领用备件" prop="details" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.details }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用状态" min-width="100px" align="center" :formatter="statue" />
+              <el-table-column label="操作" min-width="80px" align="center">
+                <template slot-scope="{row}">
+                  <el-button type="primary" size="mini" @click="handleCollarUseSee(row,0)">查看</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <h4>无库存领用</h4>
+            <el-table
+              :key="tableKey2"
+              v-loading="listLoading"
+              element-loading-text="给我一点时间"
+              :data="listCollectionSpareParts2"
+              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 + (pageNum-1) * pageSize + 1 }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用部门" width="140px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.departmentName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="最新领用日期" sortable prop="createDate" min-width="80px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.createDate }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用备件" prop="details" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.details }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="领用状态" min-width="100px" align="center" :formatter="statue" />
+              <el-table-column label="操作" min-width="80px" align="center">
+                <template slot-scope="{row}">
+                  <el-button type="primary" size="mini" @click="handleCollarUseSee(row,1)">查看</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px">
+        <el-button v-if="rapairBtn" type="primary" :disabled="isokDisable" @click="dialogStatus==='maintenanceRequisition'?createMaintenanceRequisitionteData():createMaintenanceRequisitionteData()">确认</el-button>
+        <el-button @click="dialogFormVisible_MaintenanceRequisition = false;get_table_data();">关闭</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_CollectionSparePartsSee" :close-on-click-modal="false" width="90%">
+      <div class="collectionSparePartsSee">
+        <el-form
+          ref="collectionSparePartsSeeTemp"
+          :rules="rules"
+          :model="collectionSparePartsSeeTemp"
+          label-position="right"
+          label-width="120px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col v-if="collectionSparePartsSeeTemp.isStock !== 1" :span="8">
+              <el-form-item label="领用单号:" prop="applyCode">
+                <el-input ref="applyCode" v-model="collectionSparePartsSeeTemp.applyCode" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="领用部门:" prop="departmentName">
+                <el-input ref="departmentName" v-model="collectionSparePartsSeeTemp.departmentName" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="collectionSparePartsSeeTemp.isStock !== 1" :span="8">
+              <el-form-item label="领用日期:" prop="createDate">
+                <el-input ref="createDate" v-model="collectionSparePartsSeeTemp.createDate" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="isPartCode">
+            <el-col :span="16">
+              <el-form-item label="所需备件:" prop="partCode">
+                <el-autocomplete
+                  v-model="collectionSparePartsSeeTemp.partCode"
+                  value-key="name"
+                  class="inline-input"
+                  :fetch-suggestions="sparePartSearch"
+                  placeholder="请输入备件编号或备件名称或备件规格"
+                  style="width:98%"
+                  @select="handleSelectSparePart"
+                >
+                  <template slot-scope="{ item }">
+                    <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
+                    |  &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
+                    |  &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
+                    |  &nbsp;<b>库存:</b><span class="addr">{{ item.reportery }}</span>
+                    |  &nbsp;<b>是否零库存:</b><span class="addr" v-if="item.isZeroStock==1">是</span>
+                    <span class="addr" v-else>否</span>
+                  </template>
+                </el-autocomplete>
+              </el-form-item>
+            </el-col>
+            <el-col :span="2">
+              <el-button type="primary" @click="handleAddSparePartsToBeCollected">添加待领用备件</el-button>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="listCreateCollectionSpareParts"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+        >
+          <!-- table表格 -->
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件名称" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.partName }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="备件规格" prop="specification" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="库存数" prop="reportery" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reportery }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="领用数量" prop="amount" align="center" min-width="80">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="amount">
+                  <el-input ref="amount" v-model="scope.row.amount" :disabled="dialogStatus==='collectionSparePartsSee'" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column v-if="collectionSparePartsSeeTemp.isStock==1" label="领用时间" prop="date" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.date }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="用途" prop="note" align="center" min-width="60">
+            <template slot-scope="scope">
+              <el-form :model="scope.row">
+                <el-form-item prop="note">
+                  <el-input ref="note" v-model="scope.row.note" :disabled="dialogStatus==='collectionSparePartsSee'" style="margin-top:15px" />
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column v-if="collectionSparePartsSeeTemp.isStock==1" label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="primary" @click="handleViewProgress(row)">查看进度</a>
+            </template>
+          </el-table-column>
+          <el-table-column v-if="isCreatePartDelete" label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
+            <template slot-scope="{row}">
+              <a class="del" @click="createPartDelete(row)">删除</a>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px">
+        <el-button v-if="isPartCode" type="primary" :disabled="isokDisable" @click="dialogStatus==='collectionSparePartsCreate'?createCollectionSparePartsData():createCollectionSparePartsData()">确认</el-button>
+        <el-button @click="dialogFormVisible_CollectionSparePartsSee = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 查看进度 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ViewProgress" :close-on-click-modal="false" width="90%">
+      <div class="viewProgress">
+        <el-form
+          ref="viewProgressTemp"
+          :rules="rules"
+          :model="viewProgressTemp"
+          label-position="right"
+          label-width="120px"
+          style="width: 90%;margin:0 auto;"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="本次领用数量:" prop="amountY">
+                <span> {{ numbersList.amountY }} </span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="其他领用数量:" prop="amountQT">
+                <span> {{ numbersList.amountQT }} </span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="未出库数量:" prop="amountLY">
+                <span> {{ numbersList.amountLY }} </span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <h4>申购情况:</h4>
+        <el-table
+          :key="tableKey"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="purchaseapplicationList"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+          @sort-change="tableSort2"
+        >
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="申购单号" min-width="90px" prop="orderNumber" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.orderNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column sortable prop="amount" label="申购数量" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.amount }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="申购时间" sortable prop="createTime" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.createTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="申购部门" prop="deptName" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.deptName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="申购人" prop="amount" align="center" min-width="80">
+            <template slot-scope="scope">
+              <span>{{ scope.row.empName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="是否配单" prop="buyStatu" align="center" min-width="80">
+            <template slot-scope="scope">
+              <span>{{ scope.row.buyStatu }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="配单号" prop="matchCode" align="center" min-width="80">
+            <template slot-scope="scope">
+              <span>{{ scope.row.matchCode }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <h4>采购情况:</h4>
+        <el-table
+          :key="tableKey2"
+          v-loading="listLoading"
+          element-loading-text="给我一点时间"
+          :data="procurementList"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;margin-bottom:30px"
+          :row-style="rowStyle"
+          :cell-style="cellStyle"
+          class="elTable table-fixed"
+          @sort-change="tableSort3"
+        >
+          <el-table-column type="index" label="序号" align="center" width="50px" />
+          <el-table-column label="采购单号" min-width="90px" prop="buyeCode" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.buyeCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column sortable prop="amount" label="采购数量" min-width="80px" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.amount }}</span><br>
+            </template>
+          </el-table-column>
+          <el-table-column label="配单号" prop="specification" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.matchCode }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="提交时间" prop="buyerDate" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.buyerDate }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column sortable prop="receiveAmount" label="入库数量" align="center" min-width="100">
+            <template slot-scope="scope">
+              <span>{{ scope.row.receiveAmount }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom:5px">
+        <el-button @click="dialogFormVisible_ViewProgress = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报修驳回 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="rejectRepair.dialogFormVisible" :close-on-click-modal="false" width="30%">
+      <div class="maintenanceAudit">
+        <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请输入报修驳回原因:</h3>
+        <el-form ref="rejectRepair" :rules="rules" :model="rejectRepair.temp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
+          <el-row>
+            <el-col :span="20">
+              <el-form-item prop="shutdownReason">
+                <el-input v-model="rejectRepair.temp.shutdownReason" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入报修驳回原因" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" :disabled="isokDisable" @click="rejectRepairData()">确认</el-button>
+        <el-button @click="rejectRepair.dialogFormVisible = false;">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// 引入
+import { GetDataByName, GetDataByNames,GetAccount, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
+import { mapGetters } from 'vuex'
+import waves from '@/directive/waves' // waves directive
+import { parseTime, sortChange,json2excel } from '@/utils/index.js'
+// eslint-disable-next-line no-unused-vars
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+export default {
+  name: 'Repair',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      isokDisable: false,
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      findAllPasture: [],
+      findAllDepart: [],
+      findAllEmploye: [],
+      requestParams: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+        { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }}
+      ],
+      orderStatues: [{ id: '0', name: '待接单' }, { id: '1', name: '维修中' }, { id: '2', name: '维修完成' }],
+      SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
+      rules: {
+        repairDept: [{ required: true, message: '必填', trigger: 'blur' }],
+        pickId: [{ required: true, message: '必填', trigger: 'blur' }],
+        chargeDate: [{ required: true, message: '必填', trigger: 'blur' }],
+        chargeId: [{ required: true, message: '必填', trigger: 'blur' }],
+        repirsTime: [{ required: true, message: '必填', trigger: 'blur' }],
+        positionId: [{ required: true, message: '必填', trigger: 'blur' }],
+        repairCode: [{ required: true, message: '必填', trigger: 'blur' }],
+        eqName: [{ required: true, message: '必填', trigger: 'blur' }],
+        eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
+        deptName: [{ required: true, message: '必填', trigger: 'blur' }],
+        details: [{ required: true, message: '必填', trigger: 'blur' }],
+        shutdownReason: [{ required: true, message: '必填', trigger: 'blur' }]
+      },
+      getdataListParm: {
+        name: 'getRepirsList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          pastureName: Cookies.get('pasturename'),
+          repairCode: '',
+          eqName: '',
+          eqCode: '',
+          orderStatue: '',
+          SHStatue: '',
+          inputDatetime: '',
+
+          loginId: Cookies.get('employeid'),
+          menu: 'Repair',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+      },
+
+      isCanSubmit:false,
+      total: 0,
+      tableKey: 0,
+      listLoading: false,
+      list: [],
+      dialogFormVisible_Create: false,
+      createTemp: {
+        pastureId: '',
+        departmentId: '',
+        eqId: '',
+        eqCode: '',
+        eqName: '',
+        repairDept: '',
+        details: '',
+        requesterId: '',
+        requestTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'),
+        pickId: '',
+        repairCode: '',
+        deptName: ''
+      },
+      requestEqName: {
+        name: 'geteqbyNameCode',
+        page: 1,
+        offset: 1,
+        pagecount: '',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      EqNameList: [],
+      EqCodeList: [],
+      getRepairNumberParm: {
+        name: 'autoCreatCode',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'BX'
+        }
+      },
+      radioAll: '全部',
+      dialogFormVisible_See: false,
+      dialogStatus: '',
+      textMap: {
+        create: '报修',
+        see: '查看详情',
+        distributeLeaflets: '派单',
+        maintenanceAudit: '维修审核',
+        maintenanceAudit2: '维修审核',
+        repairComplete: '完成维修',
+        maintenanceRequisition: '维修及领用',
+        collectionSparePartsSee: '查看领用',
+        collectionSparePartsCreate: '添加领用',
+        ViewProgress: '查看进度', rejectRepair: '报修驳回', update: '修改报修'
+      },
+      activeList: [],
+      active: 3,
+      seeTemp: {},
+      activeName: 'first',
+      orderStatue1: false,
+      orderStatue2: false,
+      // Reason: false,
+      // MaintenanceAudit: false,
+      listLoadingFault: false,
+      listFault: [],
+      getFaultListParm: {
+        name: 'getmaintainappearance',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingCollarUse: false,
+      listCollarUse: [],
+      getCollarUseListParm: {
+        name: 'getPartsapplybyMt',
+        page: 1,
+        offset: 1,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      getCollarUseListParm2: {
+        name: 'getPartsapplybyMt_m',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoadingOldProducts: false,
+      listOldProducts: [],
+      getOldProductsListParm: {
+        name: 'getMaintainRefuse',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      dialogFormVisible_DistributeLeaflets: false,
+      distributeLeafletsTemp: {
+        repairDept: '',
+        pickId: '',
+        chargeId: this.$store.state.user.employeid,
+        chargeDate: parseTime(new Date(), '{y}-{m}-{d}')
+      },
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()// 当天之前的时间可选
+        }
+      },
+      receiptTemp: {},
+      requestParam: {},
+      maintainers: [],
+      getRepirsEmpParm: {
+        name: 'getRepirsEmp',
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      examineTemp: {
+        statue: 3
+      },
+      statueReason: false,
+      dialogFormVisible_MaintenanceAudit: false,
+      dialogFormVisible_RepairComplete: false,
+      repairCompleteTemp: {
+        isOldProducts: 0
+      },
+      requestOldProducts: {
+        name: 'getAllPartsListWB',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      No2: false,
+      listAdd: [],
+      postDataPramas: {},
+      maintenanceRequisitionTemp: {
+        repirsTime: ''
+      },
+      dialogFormVisible_MaintenanceRequisition: false,
+      activeName2: 'first',
+      rowId: 0,
+      listNewFault: [],
+      newFaultTemp: {},
+      appearances: [],
+      positions: [],
+      getPositionsParm: {
+        name: 'geteqPosition',
+        parammaps: {}
+      },
+      getAppearanceParm: {
+        name: 'getAppearancebyPid',
+        parammaps: {}
+      },
+      rapairBtn: true,
+      listCollectionSpareParts: [],
+      tableKey2: 1,
+      listCollectionSpareParts2: [],
+      collectionSparePartsSeeTemp: {
+        isStock: 0
+      },
+      getParmCreateNumber: {
+        name: 'autoCreatCode',
+        page: 0,
+        offset: 0,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'LY'
+        }
+      },
+      requestSparePart: {
+        name: 'getPartsListLY_m',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid')
+        }
+      },
+      addSparePartsToBeCollectedParam: {
+        name: 'getPartapply_mr',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      dialogFormVisible_CollectionSparePartsSee: false,
+      listCreateCollectionSpareParts: [],
+      isCreatePartDelete: false,
+      isPartCode: true,
+      getCollarUseSeeParm: {
+        name: 'getpartapplyListBybig',
+        parammaps: {}
+      },
+      getCollarUseSeeParm2: {
+        name: 'getpartapplyListBybig_m',
+        parammaps: {}
+      },
+      dialogFormVisible_ViewProgress: false,
+      viewProgressTemp: {},
+      getNumbersParm: {
+        name: 'getpartApply_mstatue',
+        page: 1,
+        offset: 1,
+        pagecount: 20,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      numbersList: [],
+      getPurchaseapplicationParm: {
+        name: 'getpartApply_mstatueSG',
+        page: 1,
+        offset: 1,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      purchaseapplicationList: [], // 采购情况
+      getProcurementParm: {
+        name: 'getpartApply_mstatueCG',
+        page: 1,
+        offset: 1,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      procurementList: [], // 采购情况
+      rejectRepair: {
+        dialogFormVisible: false,
+        temp: {}
+      },
+      // 权限按钮
+      isRepair: [],
+      isMaintenanceSee: [],
+      isDistributeLeaflets: [],
+      isReceipt: [],
+      isMaintenanceRequisition: [],
+      isRepairComplete: [],
+      isDelete: [],
+      isMaintenanceAudit: [],
+      isMaintenanceAudit2: [], isRejectRepair: [],
+      isRepairExport:[],
+      buttons: [],
+      pending: {
+        total: 0,
+        getdataListParm: {
+          name: 'getRepirsWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
+          parammaps: {}
+        }
+      },
+      isPercentage: false,
+      percentage: 1,
+      downLoadParm:{},
+      downLoadList:[],
+      resubmit:{}
+    }
+  },
+  // computed: {
+  //   ...mapGetters([
+  //     'buttons'
+  //   ])
+  // },
+  created() {
+    const that = this
+    GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+      that.buttons = response.data.list
+      that.get_auto_buttons()
+    })
+  },
+  methods: {
+    tableSort1(column) {
+      sortChange(column, this.listOldProducts)
+    },
+    tableSort2(column) {
+      sortChange(column, this.purchaseapplicationList)
+    },
+    tableSort3(column) {
+      sortChange(column, this.procurementList)
+    },
+    get_auto_buttons() {
+      // 报修
+      const Repair = 'maintenance:repair:baoxiu'
+      const isRepair = checkButtons(this.buttons, Repair)
+      this.isRepair = isRepair
+      // 派单
+      const DistributeLeaflets = 'maintenance:repair:paidan'
+      const isDistributeLeaflets = checkButtons(this.buttons, DistributeLeaflets)
+      this.isDistributeLeaflets = isDistributeLeaflets
+      // 接单
+      const Receipt = 'maintenance:repair:jiedan'
+      const isReceipt = checkButtons(this.buttons, Receipt)
+      this.isReceipt = isReceipt
+      // 维修及领用
+      const Repairlingyong = 'maintenance:repair:lingyong'
+      const isMaintenanceRequisition = checkButtons(this.buttons, Repairlingyong)
+      this.isMaintenanceRequisition = isMaintenanceRequisition
+      // 维修完成
+      const RepairComplete = 'maintenance:repair:weixiuwancheng'
+      const isRepairComplete = checkButtons(this.buttons, RepairComplete)
+      this.isRepairComplete = isRepairComplete
+      // 删除
+      const Delete = 'maintenance:repair:delete'
+      const isDelete = checkButtons(this.buttons, Delete)
+      this.isDelete = isDelete
+      // 维修审核
+      const MaintenanceAudit = 'maintenance:repair:seeMaintenanceAudit'
+      const isMaintenanceAudit = checkButtons(this.buttons, MaintenanceAudit)
+      this.isMaintenanceAudit = isMaintenanceAudit
+      // 查看
+      const See = 'maintenance:repair:see'
+      const isMaintenanceSee = checkButtons(this.buttons, See)
+      this.isMaintenanceSee = isMaintenanceSee
+      // 主管审核
+      const MaintenanceAudit2 = 'maintenance:repair:shenhe2'
+      const isMaintenanceAudit2 = checkButtons(this.buttons, MaintenanceAudit2)
+      this.isMaintenanceAudit2 = isMaintenanceAudit2
+      // 报修驳回
+      const RejectRepair = 'maintenance:repair:rejectRepair'
+      const isRejectRepair = checkButtons(this.buttons, RejectRepair)
+      this.isRejectRepair = isRejectRepair
+      // 导出
+      const RejectExport = 'maintenance:repair:rejectExport'
+      const isRepairExport = checkButtons(this.buttons, RejectExport)
+      this.isRepairExport = isRepairExport
+      this.get_select_list()
+      this.get_table_data()
+      this.getPendingList()
+    },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllDepart = response.data.findAllDepart1.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+      })
+    },
+    getPendingList() {
+      this.pending.getdataListParm.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
+      this.pending.getdataListParm.parammaps.repairCode = this.getdataListParm.parammaps.repairCode
+      this.pending.getdataListParm.parammaps.eqName = this.getdataListParm.parammaps.eqName
+      this.pending.getdataListParm.parammaps.eqCode = this.getdataListParm.parammaps.eqCode
+      this.pending.getdataListParm.parammaps.SHStatue = this.getdataListParm.parammaps.SHStatue
+      this.pending.getdataListParm.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
+      this.pending.getdataListParm.parammaps.loginId = this.getdataListParm.parammaps.loginId
+      this.pending.getdataListParm.parammaps.menu = this.getdataListParm.parammaps.menu
+      this.pending.getdataListParm.parammaps.logindeptId = this.getdataListParm.parammaps.logindeptId
+      this.pending.getdataListParm.parammaps.loginpastureId = this.getdataListParm.parammaps.loginpastureId
+      this.pending.getdataListParm.parammaps.empId = Cookies.get('employeid')
+      this.pending.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
+      this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
+      GetDataByName(this.pending.getdataListParm).then(response => {
+        this.pending.total = response.data.total3
+      })
+    },
+    get_table_data() {
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      this.listLoading = true
+      GetDataByName(this.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          this.list = response.data.list
+          this.pageNum = response.data.pageNum
+          this.pageSize = response.data.pageSize
+        } else {
+          this.list = []
+        }
+        this.total = response.data.total
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+    changeAll() {
+      console.log(this.radioAll)
+      if (this.radioAll === '全部') {
+        this.getdataListParm.name = 'getRepirsList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: Cookies.get('pasturename'),
+          inputDatetime: '',
+          loginId: Cookies.get('employeid'),
+          menu: 'Repair',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '待处理') {
+        this.getdataListParm.name = 'getRepirsWebListNO'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          repairCode: this.getdataListParm.parammaps.repairCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          orderStatue: this.getdataListParm.parammaps.orderStatue,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+
+          loginId: Cookies.get('employeid'),
+          menu: 'Repair',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      } else if (this.radioAll === '已处理') {
+        this.getdataListParm.name = 'getRepirsWebList'
+        this.getdataListParm.offset = 1
+        this.getdataListParm.parammaps = {
+          pastureName: this.getdataListParm.parammaps.pastureName,
+          repairCode: this.getdataListParm.parammaps.repairCode,
+          eqName: this.getdataListParm.parammaps.eqName,
+          eqCode: this.getdataListParm.parammaps.eqCode,
+          orderStatue: this.getdataListParm.parammaps.orderStatue,
+          SHStatue: this.getdataListParm.parammaps.SHStatue,
+          inputDatetime: this.getdataListParm.parammaps.inputDatetime,
+          loginId: Cookies.get('employeid'),
+          menu: 'Repair',
+          logindeptId: Cookies.get('departmentid'),
+          loginpastureId: Cookies.get('pastureid'),
+          empId: Cookies.get('employeid'),
+          pastureId: Cookies.get('pastureid'),
+          deptId: Cookies.get('departmentid')
+        }
+        this.get_table_data()
+      }
+    },
+    orderStatue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.orderStatue == 0) {
+        return '待接单'
+      } else if (cellValue.orderStatue == 1) {
+        return '维修中'
+      } else if (cellValue.orderStatue == 2) {
+        return '维修完成'
+      } else if (cellValue.orderStatue == 3) {
+        return '已驳回'
+      }
+    },
+    SHStatue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.SHStatue == 1) {
+        return ''
+      } else if (cellValue.SHStatue == 2) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 3) {
+        return '审核中'
+      } else if (cellValue.SHStatue == 4) {
+        return '未通过'
+      } else if (cellValue.SHStatue == 6) {
+        return '未通过'
+      } else if (cellValue.SHStatue == 5) {
+        return '已通过'
+      }
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      this.listLoading = true
+      if (this.getdataListParm.parammaps.inputDatetime === null) {
+        this.getdataListParm.parammaps.inputDatetime = ''
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+      this.getPendingList()
+    },
+    resetCreateTemp() {
+      this.createTemp.pastureId = this.$store.state.user.pastureid
+      this.createTemp.departmentId = this.$store.state.user.departmentid
+      this.createTemp.eqId = ''
+      this.createTemp.eqCode = ''
+      this.createTemp.eqName = ''
+      this.createTemp.repairDept = ''
+      this.createTemp.details = ''
+      this.createTemp.requesterId = this.$store.state.user.employeid
+      this.createTemp.requestTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}')
+      this.createTemp.pickId = ''
+      this.createTemp.repairCode = ''
+      this.createTemp.deptName = ''
+      this.createTemp.departmentId = ''
+    },
+    changePickId(val) {
+      if (this.dialogStatus == 'create') {
+        this.createTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
+      } else {
+        this.distributeLeafletsTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
+      }
+    },
+    form_add() {
+      this.dialogStatus = 'create'
+      this.dialogFormVisible_Create = true
+
+      this.resetCreateTemp()
+      this.getRepairNumber()
+      this.getRepirsEmp()
+    },
+    isToDayrResubmit(){
+      //一天同一牧场同一设备同一故障是否重复提交
+
+      this.resubmit.name = 'checkMaintain'
+      this.resubmit.parammaps = {
+        pastureId : this.createTemp.pastureId,
+        eqId : this.createTemp.eqId,
+        eqName : this.createTemp.eqName,
+        eqCode : this.createTemp.eqCode,
+        details : this.createTemp.details,
+        requestTime : parseTime(new Date(), '{y}-{m}-{d}')
+      }
+      
+    },
+    getRepairNumber() {
+      GetDataByName(this.getRepairNumberParm).then(response => {
+        this.$nextTick(() => {
+          console.log('新增报修单号', response.data.list[0].orderCode)
+          this.createTemp.repairCode = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+    add_dialog_save() {
+      this.isToDayrResubmit()
+      GetDataByName(this.resubmit).then(response => {
+        console.log('今天已提交,请勿重复提交', this.requestParam,this.resubmit,response)
+        if (response.msg !== 'fail') {
+          if(response.data.total > 0){
+            this.$notify({ title: '提交失败', message: '今天已提交,请勿重复提交', type: 'warning', duration: 2000 })
+            this.isCanSubmit = false
+            return false
+          }
+          this.isCanSubmit = true
+          // 可以提交
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          this.$refs['createTemp'].validate(valid => {
+            if (valid) {
+              if (this.createTemp.repairCode == '' || this.createTemp.repairCode == null || this.createTemp.repairCode == undefined) {
+                GetDataByName(this.getRepairNumberParm).then(response => {
+                  this.$nextTick(() => {
+                    console.log('新增报修单号', response.data.list[0].orderCode)
+                    this.createTemp.repairCode = response.data.list[0].orderCode
+                    this.$forceUpdate()
+                    this.add_dialog_saveSave()
+                  })
+                })
+              } else {
+                this.add_dialog_saveSave()
+              }
+            }
+          })
+        }else{
+          this.$notify({ title: '请检查接口', message: "name: checkMaintain", type: 'warning', duration: 2000 })
+        }
+      })
+    },
+    add_dialog_saveSave() {
+      this.requestParam.name = 'insertmaintain'
+      this.requestParam.parammaps = this.createTemp
+      PostDataByName(this.requestParam).then(response => {
+        console.log('新增保存发送参数', this.requestParam)
+        if (response.msg !== 'fail') {
+          this.get_table_data()
+          this.getPendingList()
+          this.dialogFormVisible_Create = false
+          this.$notify({ title: '成功', message: '新增成功', type: 'success', duration: 2000 })
+        } else {
+          failproccess(response, this.$notify)
+        }
+      })
+    },
+    querySearchEqName(queryString, cb) {
+      console.log('备件名称/设备内部编号模糊查询输入值', queryString)
+      this.requestEqName.parammaps['eqName'] = queryString
+      GetDataByName(this.requestEqName).then(response => {
+        if (response.data.list !== null) {
+          console.log('备件名称模糊查询搜索data', response.data.list)
+          this.EqNameList = response.data.list
+        } else {
+          this.EqNameList = []
+        }
+        cb(this.EqNameList)
+      })
+    },
+    handleSelectEqName(item) {
+      console.log('备件名称/设备内部编号模糊查询选中值', item)
+      this.$set(this.createTemp, 'eqCode', item.eqCode)
+      this.$set(this.createTemp, 'eqId', item.eqId)
+      if (item.deptName !== undefined && item.departmentId !== undefined) {
+        this.$set(this.createTemp, 'deptName', item.deptName)
+        this.$set(this.createTemp, 'departmentId', item.departmentId)
+      } else {
+        this.$set(this.createTemp, 'deptName', '')
+        this.$set(this.createTemp, 'departmentId', '')
+      }
+      this.$forceUpdate()
+    },
+    querySearchCode(queryString, cb) {
+      console.log('备件名称/设备内部编号模糊查询输入值', queryString)
+      this.requestEqName.parammaps['eqCode'] = queryString
+      GetDataByName(this.requestEqName).then(response => {
+        if (response.data.list !== null) {
+          console.log('备件名称模糊查询搜索data', response.data.list)
+          this.EqNameList = response.data.list
+        } else {
+          this.EqNameList = []
+        }
+        cb(this.EqNameList)
+      })
+    },
+    handleSelectEqCode(item, row) {
+      console.log('备件名称/设备内部编号模糊查询选中值', item)
+      console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
+      this.$set(this.createTemp, 'eqName', item.eqName)
+      this.$set(this.createTemp, 'eqId', item.eqId)
+      if (item.deptName !== undefined && item.departmentId !== undefined) {
+        this.$set(this.createTemp, 'deptName', item.deptName)
+        this.$set(this.createTemp, 'departmentId', item.departmentId)
+      } else {
+        this.$set(this.createTemp, 'deptName', '')
+        this.$set(this.createTemp, 'departmentId', '')
+      }
+      this.$forceUpdate()
+    },
+    form_see(row) {
+      console.log(row)
+      this.seeTemp = Object.assign({}, row)
+      // 流程图
+      var reason = '未通过原因:' + this.seeTemp.workflowNote
+      var scores = '评分:' + this.seeTemp.scores + '分'
+      if (this.seeTemp.orderStatue === 0) {
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单' }, { title: '完成维修' }, { title: '使用人审核' }, { title: '设备主管审核' }]
+        this.active = 1
+      } else if (this.seeTemp.orderStatue == 3) {
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '报修驳回', date: this.seeTemp.shutdownDate, name: this.seeTemp.shutdownPerson }]
+        this.active = 1
+      } else if (this.seeTemp.orderStatue === 1 && this.seeTemp.SHStatue === 1) {
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修' }, { title: '使用人审核' }, { title: '设备主管审核' }]
+        this.active = 2
+      } else if (this.seeTemp.SHStatue === 2) {
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核' }, { title: '设备主管审核' }]
+        this.active = 3
+      } else if (this.seeTemp.SHStatue === 3) {
+        this.active = 4
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, scores: scores }, { title: '设备主管审核' }]
+      } else if (this.seeTemp.SHStatue === 4) {
+        this.active = 4
+        // var reason = '未通过原因:' + this.seeTemp.workflowNote
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
+      } else if (this.seeTemp.SHStatue === 5) {
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
+        this.active = 5
+      } else if (this.seeTemp.SHStatue === 6) {
+        // var reason = '未通过原因:' + this.seeTemp.workflowNote
+        this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
+        this.active = 5
+      }
+      this.seeTemp.requestTime = parseTime(this.seeTemp.requestTime, '{y}-{m}-{d}')
+      this.seeTemp.shutdownDate = parseTime(this.seeTemp.shutdownDate, '{y}-{m}-{d}')
+      this.seeTemp.orderTime = parseTime(this.seeTemp.orderTime, '{y}-{m}-{d}')
+      this.dialogStatus = 'see'
+      this.dialogFormVisible_See = true
+      if (row.orderStatue == 0) {
+        this.orderStatue1 = true
+        this.orderStatue2 = false
+      } else if (row.orderStatue == 3) {
+        this.orderStatue1 = true
+        this.orderStatue2 = false
+      } else {
+        this.orderStatue1 = false
+        this.orderStatue2 = true
+        this.getFaultList()
+        this.getOldProductsList()
+        this.getCollarUseList()
+      }
+    },
+    resetDistributeLeafletsTemp() {
+      this.distributeLeafletsTemp.repairDept = ''
+      this.distributeLeafletsTemp.pickId = ''
+      this.distributeLeafletsTemp.chargeDate = parseTime(new Date(), '{y}-{m}-{d}')
+      this.distributeLeafletsTemp.chargeId = this.$store.state.user.employeid
+    },
+    // 派单
+    handleDistributeLeaflets(row) {
+      if (row == undefined) {
+        this.distributeLeafletsTemp = this.seeTemp
+      } else {
+        this.distributeLeafletsTemp = Object.assign({}, row)
+      }
+      console.log('点击了派单')
+      this.dialogStatus = 'distributeLeaflets'
+      this.dialogFormVisible_DistributeLeaflets = true
+      this.resetDistributeLeafletsTemp()
+      this.getRepirsEmp()
+    },
+    changeMaintenanceTeam(val) {
+      console.log(val)
+      this.getRepirsEmpParm.parammaps.deptid = val
+      this.createTemp.pickId = ''
+      this.distributeLeafletsTemp.pickId = ''
+      this.getRepirsEmp()
+    },
+    getRepirsEmp() {
+      GetDataByName(this.getRepirsEmpParm).then(response => {
+        console.log('维修人数据', response.data.list)
+        this.maintainers = response.data.list
+      })
+    },
+    // 派单-保存
+    createDistributeLeafletsData() {
+      console.log('点击了派单确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['distributeLeafletsTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'setRepirsEmp'
+          this.requestParam.parammaps = this.distributeLeafletsTemp
+          this.requestParam.parammaps.id = this.distributeLeafletsTemp.id
+          PostDataByName(this.requestParam).then(response => {
+            console.log('派单确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.listLoading = true
+              this.get_table_data()
+              this.dialogFormVisible_DistributeLeaflets = false
+              this.dialogFormVisible_See = false
+              this.getPendingList()
+              this.$notify({ title: '成功', message: '派单成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    getFaultList() {
+      this.listLoadingFault = true
+      if (this.dialogStatus == 'repairComplete') {
+        this.getFaultListParm.parammaps.maintainId = this.repairCompleteTemp.id
+      } else {
+        this.getFaultListParm.parammaps.maintainId = this.seeTemp.id
+      }
+      GetDataByName(this.getFaultListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('故障table数据', response.data.list)
+          this.listFault = response.data.list
+        } else {
+          this.listFault = []
+        }
+        setTimeout(() => {
+          this.listLoadingFault = false
+        }, 100)
+      })
+    },
+    getCollarUseList() {
+      this.listLoadingCollarUse = true
+      this.getCollarUseListParm.parammaps.RUCode = this.seeTemp.repairCode
+      GetDataByName(this.getCollarUseListParm).then(response => {
+        console.log('领用记录table数据', response.data.list)
+        this.listCollarUse = response.data.list
+        setTimeout(() => {
+          this.listLoadingCollarUse = false
+        }, 100)
+      })
+    },
+    statue: function(cellValue) {
+      // console.log(cellValue.isZeroStock)
+      if (cellValue.statue == 0) {
+        return '未领用'
+      } else if (cellValue.statue == 1) {
+        return '已领用'
+      }
+    },
+    getOldProductsList() {
+      this.listLoadingOldProducts = true
+      this.getOldProductsListParm.parammaps.repairCode = this.seeTemp.repairCode
+      GetDataByName(this.getOldProductsListParm).then(response => {
+        console.log('旧品录入记录table数据', response.data.list)
+        this.listOldProducts = response.data.list
+        setTimeout(() => {
+          this.listLoadingOldProducts = false
+        }, 100)
+      })
+    },
+    // 维修及审核
+    handleExamine(row) {
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+        this.$set(this.seeTemp, 'scores', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+        this.$set(this.examineTemp, 'scores', '')
+      }
+      console.log('点击了维修审核')
+      this.dialogStatus = 'maintenanceAudit'
+      this.dialogFormVisible_MaintenanceAudit = true
+    },
+    changeStatue(val) {
+      if (val == 4) {
+        this.statueReason = true
+      } else {
+        this.statueReason = false
+      }
+    },
+    // 维修审核-保存
+    createExamineData() {
+      console.log('点击了维修审核确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['examineTemp'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'maintainCharge'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.id = this.examineTemp.id
+          this.requestParam.parammaps.statue = this.examineTemp.statue
+          this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+          this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+          if (this.requestParam.parammaps.statue == 4) {
+            this.requestParam.parammaps.scores = 5
+          } else {
+            this.requestParam.parammaps.scores = this.examineTemp.scores
+          }
+          PostDataByName(this.requestParam).then(response => {
+            console.log('维修审核确认发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              if (this.getdataListParm.parammaps.inputDatetime === null) {
+                this.getdataListParm.parammaps.inputDatetime = ''
+              }
+              this.get_table_data()
+              this.getPendingList()
+              this.dialogFormVisible_MaintenanceAudit = false
+              this.dialogFormVisible_See = false
+              this.statueReason = false
+              this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    // 维修审核2
+    handleExamine2(row) {
+      if (row == undefined) {
+        this.examineTemp = this.seeTemp
+        this.$set(this.seeTemp, 'statue', 3)
+        this.$set(this.seeTemp, 'workflowNote', '')
+      } else {
+        this.examineTemp = Object.assign({}, row)
+        this.$set(this.examineTemp, 'statue', 3)
+        this.$set(this.examineTemp, 'workflowNote', '')
+      }
+      console.log('点击了维修审核')
+      this.dialogStatus = 'maintenanceAudit2'
+      this.dialogFormVisible_MaintenanceAudit = true
+    },
+    // 维修审核2-保养
+    createExamineData2() {
+      if (this.examineTemp.statue == 3) {
+        console.log('点击了维修审核确认-通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'maintainChargDone'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 5
+            this.requestParam.parammaps.orderStatue = 2
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('维修审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_MaintenanceAudit = false
+                this.dialogFormVisible_See = false
+                this.statueReason = false
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      } else {
+        console.log('点击了维修审核确认-未通过')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.$refs['examineTemp'].validate(valid => {
+          if (valid) {
+            this.requestParam.name = 'maintainCharge1'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.examineTemp.id
+            this.requestParam.parammaps.statue = 6
+            this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+            this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+            PostDataByName(this.requestParam).then(response => {
+              console.log('维修审核确认发送参数', this.requestParam)
+              if (response.msg !== 'fail') {
+                if (this.getdataListParm.parammaps.inputDatetime === null) {
+                  this.getdataListParm.parammaps.inputDatetime = ''
+                }
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_MaintenanceAudit = false
+                this.dialogFormVisible_See = false
+                this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          }
+        })
+      }
+    },
+    // 接单
+    handleReceipt(row) {
+      if (row == undefined) {
+        this.receiptTemp = this.seeTemp
+      } else {
+        this.receiptTemp = Object.assign({}, row)
+      }
+      MessageBox.confirm('是否确认接单', {
+        title: '接单',
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.requestParam.name = 'takeRepirsEmp'
+        this.requestParam.parammaps = {}
+        this.requestParam.parammaps.id = this.receiptTemp.id
+        PostDataByName(this.requestParam).then((response) => {
+          if (response.msg !== 'fail') {
+            this.get_table_data()
+            this.getPendingList()
+            this.dialogFormVisible_See = false
+            this.$notify({ title: '成功', message: '接单成功', type: 'success', duration: 2000 })
+          } else {
+            failproccess(response, this.$notify)
+          }
+        })
+      })
+    },
+    // 完成维修
+    handleRepairComplete(row) {
+      console.log('点击了完成维修', row)
+      if (row == undefined) {
+        this.$set(this.seeTemp, 'isOldProducts', 0)
+        this.repairCompleteTemp = this.seeTemp
+      } else {
+        this.repairCompleteTemp = Object.assign({}, row)
+        this.$set(this.repairCompleteTemp, 'isOldProducts', 0)
+      }
+      this.No2 = false
+      this.dialogStatus = 'repairComplete'
+      this.dialogFormVisible_RepairComplete = true
+      this.getFaultList()
+    },
+    changeIsOldProducts(val) {
+      console.log(val)
+      if (val == 1) {
+        this.No2 = true
+      } else {
+        this.No2 = false
+      }
+    },
+    // 完成维修保存
+    createRepairCompleteData() {
+      console.log('点击了完成维修确认')
+      if (this.listFault.length > 0) {
+        if (this.repairCompleteTemp.laidcou == 0) {
+          if (this.repairCompleteTemp.isOldProducts == 0) {
+            console.log('否')
+            this.requestParam.name = 'completeRepirs'
+            this.requestParam.parammaps = {}
+            this.requestParam.parammaps.id = this.repairCompleteTemp.id
+            PostDataByName(this.requestParam).then((response) => {
+              if (response.msg !== 'fail') {
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_RepairComplete = false
+                this.dialogFormVisible_See = false
+                this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+              } else {
+                failproccess(response, this.$notify)
+              }
+            })
+          } else {
+            console.log('是')
+            this.isokDisable = true
+            setTimeout(() => {
+              this.isokDisable = false
+            }, 1000)
+            this.$refs['repairCompleteTemp'].validate(valid => {
+              if (valid) {
+                if (this.listAdd.length !== 0) {
+                  for (var i = 0; i < this.listAdd.length; i++) {
+                    if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
+                      this.$message({
+                        type: 'warning',
+                        message: '请录入数量是否未填写',
+                        duration: 2000
+                      })
+                      return false
+                    } else {
+                      var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                      if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
+                        this.$message({ type: 'error', message: '录入数量请输入正数,最多保留两位小数点', duration: 2000 })
+                        return false
+                      }
+                    }
+                  }
+                  this.postDataPramas.common = { 'returnmap': '0' }
+                  this.postDataPramas.data = []
+                  this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
+                  this.postDataPramas.data[0].children = []
+                  this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
+                    pastureId: this.repairCompleteTemp.pastureId,
+                    deptId: this.repairCompleteTemp.departmentId,
+                    partCode: '@insertSpotList.partCode',
+                    partName: '@insertSpotList.partName',
+                    partId: '@insertSpotList.id',
+                    specification: '@insertSpotList.specification',
+                    unit: '@insertSpotList.unit',
+                    acturalAmount: '@insertSpotList.acturalAmount',
+                    eqId: this.repairCompleteTemp.eqId,
+                    eqCode: this.repairCompleteTemp.eqCode,
+                    eqName: this.repairCompleteTemp.eqName,
+                    repairCode: this.repairCompleteTemp.repairCode,
+                    listType: 0
+                  }}
+                  this.postDataPramas.data[1] = { 'name': 'completeRepirs', 'type': 'e', 'parammaps': {
+                    id: this.repairCompleteTemp.id
+                  }}
+                  ExecDataByConfig(this.postDataPramas).then(response => {
+                    console.log('完成维修-是-保存发送参数', this.postDataPramas)
+                    if (response.msg === 'fail') {
+                      this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+                    } else {
+                      this.listAdd = []
+                      this.dialogFormVisible_RepairComplete = false
+                      this.dialogFormVisible_See = false
+                      this.get_table_data()
+                      this.getPendingList()
+                      this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+                    }
+                  })
+                  return true
+                } else {
+                  this.$notify({ title: '', message: '请完善旧品信息', type: 'warning', duration: 2000 })
+                  return false
+                }
+              }
+            })
+          }
+        } else {
+          this.$notify({ message: '备件未领用不可完成维修', type: 'warning', duration: 2000 })
+        }
+      } else {
+        this.$message({ type: 'warning', message: '请完善故障信息!' })
+      }
+    },
+    oldProductsSearch(queryString, cb) {
+      console.log('旧品录入模糊查询输入值', queryString)
+      this.requestOldProducts.parammaps['partCode'] = queryString
+      this.requestOldProducts.parammaps['RUCode'] = this.repairCompleteTemp.repairCode
+      GetDataByName(this.requestOldProducts).then(response => {
+        console.log('旧品录入模糊查询搜索data', response.data.list)
+        cb(response.data.list)
+      })
+    },
+    handleSelectOldProducts(item) {
+      this.repairCompleteTemp.partCode = ''
+      console.log('旧品录入模糊查询选中值', item)
+      if (this.listAdd.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listAdd.find(obj => obj.id === item.id)) {
+          this.$message({ type: 'warning', message: '此旧品已存在,请重新选择旧品' })
+        } else {
+          if (item.checkoutNumber == null) {
+            this.$set(item, 'checkoutNumber', item.reportery)
+          }
+          this.listAdd.unshift(item)
+        }
+      } else {
+        if (item.checkoutNumber == null) {
+          this.$set(item, 'checkoutNumber', item.reportery)
+        }
+        this.listAdd.unshift(item)
+      }
+    },
+    partDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listAdd.length; i++) {
+          console.log(this.listAdd[i])
+          if (this.listAdd[i].id === row.id) {
+            var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
+          }
+          if (listAddIndex > -1) {
+            this.listAdd.splice(listAddIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    // 维修及领用
+    handleMaintenanceRequisition(row) {
+      console.log('点击了维修及领用')
+      if (row == undefined) {
+        this.maintenanceRequisitionTemp = this.seeTemp
+        this.$set(this.maintenanceRequisitionTemp, 'repirsTime', parseTime(new Date(), '{y}-{m}-{d}'))
+      } else {
+        this.maintenanceRequisitionTemp = Object.assign({}, row)
+        this.$set(this.maintenanceRequisitionTemp, 'repirsTime', parseTime(new Date(), '{y}-{m}-{d}'))
+      }
+      this.dialogStatus = 'maintenanceRequisition'
+      this.dialogFormVisible_MaintenanceRequisition = true
+      this.getNewFaultList()
+      this.getPosition()
+      this.getCollectionSpareParts()
+      this.getCollectionSpareParts2()
+    },
+    getNewFaultList() {
+      this.listLoadingFault = true
+      this.getFaultListParm.parammaps.maintainId = this.maintenanceRequisitionTemp.id
+      GetDataByName(this.getFaultListParm).then(response => {
+        console.log('故障table数据', response.data.list)
+        if (response.data.list !== null) {
+          this.listNewFault = response.data.list
+        } else {
+          this.listNewFault = []
+        }
+        setTimeout(() => {
+          this.listLoadingFault = false
+        }, 100)
+      })
+    },
+    getNewCollarUseList() {
+      this.listLoadingCollarUse = true
+      this.getCollarUseListParm.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
+      GetDataByName(this.getCollarUseListParm).then(response => {
+        console.log('领用记录table数据', response.data.list)
+        this.listCollarUse = response.data.list
+        setTimeout(() => {
+          this.listLoadingCollarUse = false
+        }, 100)
+      })
+    },
+    tabMaintenance(tab, event) {
+      console.log(tab.name)
+      if (tab.name == 'first') {
+        this.rapairBtn = true
+      } else {
+        this.rapairBtn = false
+      }
+    },
+    getPosition() {
+      this.getPositionsParm.parammaps.eqId = this.maintenanceRequisitionTemp.eqId
+      GetDataByName(this.getPositionsParm).then(response => {
+        console.log('故障部位数据', response.data.list)
+        this.positions = response.data.list
+      })
+    },
+    changePosition(val) {
+      console.log('故障部位输入值', val)
+      console.log(this.positions.find(obj => obj.id == val).positionName)
+      this.newFaultTemp.positionName = this.positions.find(obj => obj.id == val).positionName
+      this.getAppearanceParm.parammaps.id = val
+      this.getAppearance()
+    },
+    getAppearance() {
+      GetDataByName(this.getAppearanceParm).then(response => {
+        console.log('故障详情数据', response.data.list)
+        this.appearances = response.data.list
+      })
+    },
+    changeAppearance(val) {
+      console.log('故障详情输入值', val)
+      if (this.newFaultTemp.positionId == '') {
+        this.$message({
+          type: 'warning',
+          message: '请选择故障部位'
+        })
+      }
+      if (this.listNewFault == null) {
+        this.listNewFault = []
+        this.listNewFault.push({ 'rowId': this.rowId++, positionId: this.newFaultTemp.positionId, positionName: this.newFaultTemp.positionName, appearanceName: val, failureCause: this.newFaultTemp.failureCause, treatmentMethod: this.newFaultTemp.treatmentMethod })
+        this.newFaultTemp = {}
+        this.appearances = []
+      } else {
+        this.listNewFault.push({ 'rowId': this.rowId++, positionId: this.newFaultTemp.positionId, positionName: this.newFaultTemp.positionName, appearanceName: val, failureCause: this.newFaultTemp.failureCause, treatmentMethod: this.newFaultTemp.treatmentMethod })
+        this.newFaultTemp = {}
+        this.appearances = []
+      }
+    },
+    newFaultDelete(row) {
+      console.log(row)
+      MessageBox.confirm('确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        for (var i = 0; i < this.listNewFault.length; i++) {
+          console.log(this.listNewFault[i])
+          if (this.listNewFault[i].rowId === row.rowId) {
+            var listNewFaultIndex = this.listNewFault.indexOf(this.listNewFault[i])
+          }
+          if (listNewFaultIndex > -1) {
+            this.listNewFault.splice(listNewFaultIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    // 维修及领用-维修确认
+    createMaintenanceRequisitionteData() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['maintenanceRequisitionTemp'].validate(valid => {
+        if (valid) {
+          console.log(this.newFaultTemp.positionId)
+          if (this.listNewFault.length == 0) {
+            this.$notify({ title: '', message: '请输入故障诊断', type: 'warning', duration: 2000 })
+            return false
+          } else {
+            for (let i = 0; i < this.listNewFault.length; i++) {
+              if (this.listNewFault[i].failureCause == '' || this.listNewFault[i].failureCause == undefined) {
+                this.$notify({ title: '', message: '请输入故障原因', type: 'warning', duration: 2000 })
+                return false
+              }
+            }
+          }
+          if (this.listNewFault.length !== 0) {
+            this.postDataPramas.common = { 'returnmap': '0' }
+            this.postDataPramas.data = []
+            this.postDataPramas.data[0] = { 'name': 'deleteMaintainAppearance', 'type': 'e', 'parammaps': {
+              maintainId: this.maintenanceRequisitionTemp.id
+            }}
+            this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listNewFault }}
+            this.postDataPramas.data[1].children = []
+            this.postDataPramas.data[1].children[0] = { 'name': 'insertMaintainAppearance', 'type': 'e', 'parammaps': {
+              appearanceName: '@insertSpotList.appearanceName',
+              positionId: '@insertSpotList.positionId',
+              positionName: '@insertSpotList.positionName',
+              repirsTime: this.maintenanceRequisitionTemp.repirsTime,
+              maintainId: this.maintenanceRequisitionTemp.id,
+              failureCause: '@insertSpotList.failureCause',
+              treatmentMethod: '@insertSpotList.treatmentMethod'
+            }}
+            ExecDataByConfig(this.postDataPramas).then(response => {
+              console.log('维修及领用-维修确认保存发送参数', this.postDataPramas)
+              if (response.msg === 'fail') {
+                this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              } else {
+                this.get_table_data()
+                this.getPendingList()
+                this.dialogFormVisible_MaintenanceRequisition = false
+                this.dialogFormVisible_See = false
+                this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+              }
+            })
+          } else {
+            this.$notify({ title: '', message: '请选择故障', type: 'warning', duration: 2000 })
+            return false
+          }
+        }
+      })
+    },
+    getCollectionSpareParts() {
+      this.getCollarUseListParm.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
+      GetDataByName(this.getCollarUseListParm).then(response => {
+        console.log('备件领用table数据', response.data.list)
+        this.listCollectionSpareParts = response.data.list
+      })
+    },
+    getCollectionSpareParts2() {
+      this.getCollarUseListParm2.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
+      GetDataByName(this.getCollarUseListParm2).then(response => {
+        console.log('备件领用无库存table数据', response.data.list)
+        this.listCollectionSpareParts2 = response.data.list
+      })
+    },
+    openDetails(row, column, cell, event) {
+      if (column.label !== '操作') {
+        this.$router.push({ path: '/customs/Receive', query: { applyCode: row.applyCode }})
+      }
+    },
+    handleCollarUseSee(row, isStock) {
+      this.collectionSparePartsSeeTemp = Object.assign({}, row)
+      this.dialogStatus = 'collectionSparePartsSee'
+      this.dialogFormVisible_CollectionSparePartsSee = true
+      this.isCreatePartDelete = false
+      this.isPartCode = false
+      if (isStock == 0) {
+        this.collectionSparePartsSeeTemp.isStock = 0
+        this.getCollarUseSeeList()
+      } else if (isStock == 1) {
+        this.collectionSparePartsSeeTemp.isStock = 1
+        this.getCollarUseSeeList2()
+      }
+    },
+    getCollarUseSeeList() {
+      this.getCollarUseSeeParm.parammaps.id = this.collectionSparePartsSeeTemp.id
+      GetDataByName(this.getCollarUseSeeParm).then(response => {
+        this.listCreateCollectionSpareParts = response.data.list
+      })
+    },
+    getCollarUseSeeList2() {
+      // console.log(this.collectionSparePartsSeeTemp)
+      this.getCollarUseSeeParm2.parammaps.bigId = this.maintenanceRequisitionTemp.repairCode
+      GetDataByName(this.getCollarUseSeeParm2).then(response => {
+        this.listCreateCollectionSpareParts = response.data.list
+      })
+    },
+    handleCollectionSparePartsCreate() {
+      this.collectionSparePartsSeeTemp = this.maintenanceRequisitionTemp
+      this.collectionSparePartsSeeTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
+      this.dialogStatus = 'collectionSparePartsCreate'
+      this.dialogFormVisible_CollectionSparePartsSee = true
+      this.isCreatePartDelete = true
+      this.listCreateCollectionSpareParts = []
+      this.isPartCode = true
+      this.getCreateNumber()
+    },
+    getCreateNumber() {
+      GetDataByName(this.getParmCreateNumber).then(response => {
+        this.$nextTick(() => {
+          console.log('新增领用单号', response.data.list[0].orderCode)
+          this.collectionSparePartsSeeTemp.applyCode = response.data.list[0].orderCode
+          this.$forceUpdate()
+        })
+      })
+    },
+    sparePartSearch(queryString, cb) {
+      console.log('备件模糊查询输入值', queryString)
+      this.requestSparePart.parammaps['partCode'] = queryString
+      GetDataByName(this.requestSparePart).then(response => {
+        console.log('备件模糊查询搜索data', response.data.list)
+        if (response.data.list == null) {
+          cb([])
+        } else {
+          cb(response.data.list)
+        }
+      })
+    },
+    handleSelectSparePart(item) {
+      console.log('备件模糊查询选中值', item)
+      if (this.listCreateCollectionSpareParts.length > 0) {
+        // eslint-disable-next-line no-redeclare
+        if (this.listCreateCollectionSpareParts.find(obj => obj.partId === item.partId)) {
+          this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
+        } else {
+          this.listCreateCollectionSpareParts.unshift(item)
+        }
+      } else {
+        this.listCreateCollectionSpareParts.unshift(item)
+      }
+    },
+    handleAddSparePartsToBeCollected() {
+      console.log('添加待领用备件')
+      this.addSparePartsToBeCollectedParam.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
+      GetDataByName(this.addSparePartsToBeCollectedParam).then(response => {
+        if (response.data.list == null) {
+          this.$message({ type: 'warning', message: '无可添加待领用备件' })
+        } else {
+          if (this.listCreateCollectionSpareParts.length > 0) {
+            console.log(this.filtersArr(this.listCreateCollectionSpareParts, response.data.list))
+            this.listCreateCollectionSpareParts = this.filtersArr(this.listCreateCollectionSpareParts, response.data.list)
+          } else {
+            this.listCreateCollectionSpareParts = response.data.list
+          }
+        }
+      })
+    },
+    filtersArr(list, list2) {
+      for (var i = 0; i < list.length; i++) {
+        for (var j = 0; j < list2.length; j++) {
+          if (list[i].partId == list2[j].partId) {
+            list[i] = list2[j]
+            list2.splice(j, 1)
+          }
+        }
+      }
+      return list.concat(list2)
+    },
+    createPartDelete(row) {
+      console.log(this.listAdd)
+      MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // console.log(this.list2)
+        for (var i = 0; i < this.listCreateCollectionSpareParts.length; i++) {
+          console.log(this.listCreateCollectionSpareParts[i])
+          if (this.listCreateCollectionSpareParts[i].id === row.id) {
+            var listCreateCollectionSparePartsIndex = this.listCreateCollectionSpareParts.indexOf(this.listCreateCollectionSpareParts[i])
+          }
+          if (listCreateCollectionSparePartsIndex > -1) {
+            this.listCreateCollectionSpareParts.splice(listCreateCollectionSparePartsIndex, 1)
+            return
+          }
+        }
+      })
+    },
+    handleViewProgress(row) {
+      console.log('查看进度', row)
+      console.log(this.maintenanceRequisitionTemp)
+      this.viewProgressTemp = Object.assign({}, row)
+      this.dialogStatus = 'ViewProgress'
+      this.dialogFormVisible_ViewProgress = true
+      this.getNumbers()
+      this.getPurchaseapplicationList()
+      this.getProcurementList()
+    },
+    getNumbers() {
+      this.getNumbersParm.parammaps.contractId = this.viewProgressTemp.contractId
+      this.getNumbersParm.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
+      GetDataByName(this.getNumbersParm).then(response => {
+        this.numbersList = response.data.list[0]
+      })
+    },
+    // 申购情况
+    getPurchaseapplicationList() {
+      this.getPurchaseapplicationParm.parammaps.createDate = this.viewProgressTemp.date
+      this.getPurchaseapplicationParm.parammaps.partCode = this.viewProgressTemp.partCode
+      this.getPurchaseapplicationParm.parammaps.pastureId = this.viewProgressTemp.pastureId
+      GetDataByName(this.getPurchaseapplicationParm).then(response => {
+        if (response.data.list !== null) {
+          this.purchaseapplicationList = response.data.list
+        } else {
+          this.purchaseapplicationList = []
+        }
+      })
+    },
+    // 采购情况
+    getProcurementList() {
+      this.getProcurementParm.parammaps.createDate = this.viewProgressTemp.date
+      this.getProcurementParm.parammaps.partCode = this.viewProgressTemp.partCode
+      this.getProcurementParm.parammaps.pastureId = this.viewProgressTemp.pastureId
+      GetDataByName(this.getProcurementParm).then(response => {
+        if (response.data.list !== null) {
+          this.procurementList = response.data.list
+        } else {
+          this.procurementList = []
+        }
+      })
+    },
+    // 添加领用保存
+    createCollectionSparePartsData() {
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['collectionSparePartsSeeTemp'].validate(valid => {
+        if (valid) {
+          if (this.listCreateCollectionSpareParts.length !== 0) {
+            for (var i = 0; i < this.listCreateCollectionSpareParts.length; i++) {
+              console.log(this.listCreateCollectionSpareParts[i].amount)
+              if (this.listCreateCollectionSpareParts[i].amount !== undefined && this.listCreateCollectionSpareParts[i].amount !== '') {
+                var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
+                if (!rulesAmount.test(this.listCreateCollectionSpareParts[i].amount)) {
+                  this.$message({
+                    type: 'error',
+                    message: '领用数量请输入正数,最多保留两位小数',
+                    duration: 2000
+                  })
+                  return false
+                } else {
+                  var listCreateCollectionSpareParts1 = [] // >库存
+                  var listCreateCollectionSpareParts2 = [] // <=库存
+                  var amountList = []
+                  var amount2List = []
+                  for (let i = 0; i < this.listCreateCollectionSpareParts.length; i++) {
+                    var obj = {}
+                    var obj2 = {}
+                    obj.amount = this.listCreateCollectionSpareParts[i].amount
+                    obj.bigId = this.listCreateCollectionSpareParts[i].bigId
+                    obj.brand = this.listCreateCollectionSpareParts[i].brand
+                    obj.brandId = this.listCreateCollectionSpareParts[i].brandId
+                    obj.contractId = this.listCreateCollectionSpareParts[i].contractId
+                    obj.enable = this.listCreateCollectionSpareParts[i].enable
+                    obj.id = this.listCreateCollectionSpareParts[i].id
+                    obj.inventoryType = this.listCreateCollectionSpareParts[i].inventoryType
+                    obj.isZeroStock = this.listCreateCollectionSpareParts[i].isZeroStock
+                    obj.partCode = this.listCreateCollectionSpareParts[i].partCode
+                    obj.partId = this.listCreateCollectionSpareParts[i].partId
+                    obj.partName = this.listCreateCollectionSpareParts[i].partName
+                    obj.partRepId = this.listCreateCollectionSpareParts[i].partRepId
+                    obj.pastureId = this.listCreateCollectionSpareParts[i].pastureId
+                    obj.pastureName = this.listCreateCollectionSpareParts[i].pastureName
+                    obj.planAmount = this.listCreateCollectionSpareParts[i].planAmount
+                    obj.price = this.listCreateCollectionSpareParts[i].price
+                    obj.providerId = this.listCreateCollectionSpareParts[i].providerId
+                    obj.providerName = this.listCreateCollectionSpareParts[i].providerName
+                    obj.remark = this.listCreateCollectionSpareParts[i].remark
+                    obj.reportery = this.listCreateCollectionSpareParts[i].reportery
+                    obj.specification = this.listCreateCollectionSpareParts[i].specification
+                    obj.unit = this.listCreateCollectionSpareParts[i].unit
+                    obj.prid = this.listCreateCollectionSpareParts[i].prid
+                    obj.mr = this.listCreateCollectionSpareParts[i].mr
+                    obj.locationId = this.listCreateCollectionSpareParts[i].locationId
+                    amountList.push(obj)
+                    obj2.amount = this.listCreateCollectionSpareParts[i].amount
+                    obj2.bigId = this.listCreateCollectionSpareParts[i].bigId
+                    obj2.brand = this.listCreateCollectionSpareParts[i].brand
+                    obj2.brandId = this.listCreateCollectionSpareParts[i].brandId
+                    obj2.contractId = this.listCreateCollectionSpareParts[i].contractId
+                    obj2.enable = this.listCreateCollectionSpareParts[i].enable
+                    obj2.id = this.listCreateCollectionSpareParts[i].id
+                    obj2.inventoryType = this.listCreateCollectionSpareParts[i].inventoryType
+                    obj2.isZeroStock = this.listCreateCollectionSpareParts[i].isZeroStock
+                    obj2.partCode = this.listCreateCollectionSpareParts[i].partCode
+                    obj2.partId = this.listCreateCollectionSpareParts[i].partId
+                    obj2.partName = this.listCreateCollectionSpareParts[i].partName
+                    obj2.partRepId = this.listCreateCollectionSpareParts[i].partRepId
+                    obj2.pastureId = this.listCreateCollectionSpareParts[i].pastureId
+                    obj2.pastureName = this.listCreateCollectionSpareParts[i].pastureName
+                    obj2.planAmount = this.listCreateCollectionSpareParts[i].planAmount
+                    obj2.price = this.listCreateCollectionSpareParts[i].price
+                    obj2.providerId = this.listCreateCollectionSpareParts[i].providerId
+                    obj2.providerName = this.listCreateCollectionSpareParts[i].providerName
+                    obj2.remark = this.listCreateCollectionSpareParts[i].remark
+                    obj2.reportery = this.listCreateCollectionSpareParts[i].reportery
+                    obj2.specification = this.listCreateCollectionSpareParts[i].specification
+                    obj2.unit = this.listCreateCollectionSpareParts[i].unit
+                    obj2.prid = this.listCreateCollectionSpareParts[i].prid
+                    obj.mr = this.listCreateCollectionSpareParts[i].mr
+                    obj2.locationId = this.listCreateCollectionSpareParts[i].locationId
+                    amount2List.push(obj2)
+                  }
+                  for (let i = 0; i < amountList.length; i++) {
+                    if (parseFloat(amountList[i].amount) > parseFloat(amountList[i].reportery)) {
+                      var amount = String(parseFloat(amountList[i].amount) - parseFloat(amountList[i].reportery))
+                      amountList[i].amount = amount
+                      listCreateCollectionSpareParts1.push(amountList[i])
+                      if (parseFloat(amountList[i].reportery) > 0) {
+                        amount2List[i].amount = String(amount2List[i].reportery)
+                        listCreateCollectionSpareParts2.push(amount2List[i])
+                      }
+                    } else {
+                      listCreateCollectionSpareParts2.push(amountList[i])
+                    }
+                  }
+                  console.log(this.listCreateCollectionSpareParts, 'this.listCreateCollectionSpareParts')
+                  console.log(listCreateCollectionSpareParts1, '>库存listCreateCollectionSpareParts1')
+                  console.log(listCreateCollectionSpareParts2, '<=库存listCreateCollectionSpareParts2')
+                  let mySumPrice = 0
+                  for (let i = 0; i < listCreateCollectionSpareParts2.length; i++) {
+                    mySumPrice += parseFloat(listCreateCollectionSpareParts2[i].price) * parseFloat(listCreateCollectionSpareParts2[i].amount)
+                  }
+                  if (mySumPrice > 500) {
+                    this.collectionSparePartsSeeTemp.SHStatus = 2
+                  } else {
+                    this.collectionSparePartsSeeTemp.SHStatus = 9
+                  }
+                  this.postDataPramas.common = { 'returnmap': '0' }
+                  this.postDataPramas.data = []
+                  this.postDataPramas.data[0] = { 'name': 'insertSpotList3', 'resultmaps': { 'list': this.listCreateCollectionSpareParts }}
+                  this.postDataPramas.data[0].children = []
+                  this.postDataPramas.data[0].children[0] = { 'name': 'updatePartapplyuseAmount_m', 'type': 'e', 'parammaps': {
+                    amount: '@insertSpotList3.amount',
+                    paid: '@insertSpotList3.contractId',
+                    RUCode: this.collectionSparePartsSeeTemp.repairCode
+                  }}
+                  this.postDataPramas.data[1] = { 'name': 'insertBigpartapply_m', 'type': 'e', 'parammaps': {
+                    pastureId: this.collectionSparePartsSeeTemp.pastureId,
+                    applyCode: this.collectionSparePartsSeeTemp.applyCode,
+                    applyType: 1,
+                    departmentId: this.collectionSparePartsSeeTemp.departmentId,
+                    empId: this.collectionSparePartsSeeTemp.pickId,
+                    applyDate: this.collectionSparePartsSeeTemp.createDate,
+                    RUCode: this.collectionSparePartsSeeTemp.repairCode
+                  }}
+                  this.postDataPramas.data[2] = { 'name': 'insertSpotList2', 'resultmaps': { 'list': listCreateCollectionSpareParts1 }}
+                  this.postDataPramas.data[2].children = []
+                  this.postDataPramas.data[2].children[0] = { 'name': 'insertpartapply_m', 'type': 'e', 'parammaps': {
+                    bigId: this.collectionSparePartsSeeTemp.repairCode,
+                    prid: '@insertSpotList2.prid',
+                    pastureId: '@insertSpotList2.pastureId',
+                    partId: '@insertSpotList2.partId',
+                    partCode: '@insertSpotList2.partCode',
+                    partName: '@insertSpotList2.partName',
+                    specification: '@insertSpotList2.specification',
+                    brandId: '@insertSpotList2.brandId',
+                    price: '@insertSpotList2.price',
+                    amount: '@insertSpotList2.amount',
+                    eqName: this.collectionSparePartsSeeTemp.eqName,
+                    eqCode: this.collectionSparePartsSeeTemp.eqCode,
+                    providerId: '@insertSpotList2.providerId',
+                    note: '@insertSpotList2.note',
+                    reportery: '@insertSpotList2.reportery',
+                    contractId: '@insertSpotList2.contractId'
+                  }}
+                  if (listCreateCollectionSpareParts2.length > 0) {
+                    this.postDataPramas.data[3] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
+                      pastureId: this.collectionSparePartsSeeTemp.pastureId,
+                      applyCode: this.collectionSparePartsSeeTemp.applyCode,
+                      applyType: 1,
+                      departmentId: this.collectionSparePartsSeeTemp.departmentId,
+                      empId: this.collectionSparePartsSeeTemp.pickId,
+                      applyDate: this.collectionSparePartsSeeTemp.createDate,
+                      RUCode: this.collectionSparePartsSeeTemp.repairCode,
+                      SHStatus: this.collectionSparePartsSeeTemp.SHStatus
+                    }}
+                    this.postDataPramas.data[4] = { 'name': 'insertSpotList', 'resultmaps': { 'list': listCreateCollectionSpareParts2 }}
+                    this.postDataPramas.data[4].children = []
+                    this.postDataPramas.data[4].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
+                      bigId: '@insertBigpartapply.LastInsertId',
+                      pastureId: '@insertSpotList.pastureId',
+                      partId: '@insertSpotList.partId',
+                      partCode: '@insertSpotList.partCode',
+                      partName: '@insertSpotList.partName',
+                      specification: '@insertSpotList.specification',
+                      brandId: '@insertSpotList.brandId',
+                      price: '@insertSpotList.price',
+                      amount: '@insertSpotList.amount',
+                      eqName: this.collectionSparePartsSeeTemp.eqName,
+                      eqCode: this.collectionSparePartsSeeTemp.eqCode,
+                      providerId: '@insertSpotList.providerId',
+                      note: '@insertSpotList.note',
+                      reportery: '@insertSpotList.reportery',
+                      contractId: '@insertSpotList.contractId',
+                      locationId: '@insertSpotList.locationId'
+                    }}
+                  }
+                  ExecDataByConfig(this.postDataPramas).then(response => {
+                    console.log('添加领用保存发送参数', this.postDataPramas)
+                    if (response.msg === 'fail') {
+                      this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+                    } else {
+                      this.dialogFormVisible_CollectionSparePartsSee = false
+                      this.getCollectionSpareParts()
+                      this.getCollectionSpareParts()
+                      this.getCollectionSpareParts2()
+                      this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+                    }
+                  })
+                  return true
+                }
+              } else {
+                this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
+                return false
+              }
+            }
+          } else {
+            this.$notify({ title: '', type: 'warning', message: '请选择备件', duration: 2000 })
+            return false
+          }
+        }
+      })
+    },
+    form_delete(row) {
+      MessageBox.confirm('确认删除?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.requestParam.name = 'deleteMaintain'
+        this.requestParam.parammaps = {}
+        this.requestParam.parammaps.id = row.id
+        PostDataByName(this.requestParam).then((response) => {
+          if (response.msg !== 'fail') {
+            this.get_table_data()
+            this.getPendingList()
+            this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+          } else {
+            failproccess(response, this.$notify)
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+    handleRejectRepair(row) {
+      console.log('报修驳回')
+      this.rejectRepair.temp = Object.assign({}, row)
+      this.dialogStatus = 'rejectRepair'
+      this.rejectRepair.dialogFormVisible = true
+    },
+    rejectRepairData() {
+      console.log('报修驳回确认')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['rejectRepair'].validate(valid => {
+        if (valid) {
+          this.requestParam.name = 'updateMaintain'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.shutdownPerson = Cookies.get('employeid')
+          this.requestParam.parammaps.id = this.rejectRepair.temp.id
+          this.requestParam.parammaps.shutdownReason = this.rejectRepair.temp.shutdownReason
+          PostDataByName(this.requestParam).then((response) => {
+            if (response.msg !== 'fail') {
+              this.get_table_data()
+              this.getPendingList()
+              this.rejectRepair.dialogFormVisible = false
+              this.$notify({ title: '成功', message: '驳回成功', type: 'success', duration: 2000 })
+            } else {
+              failproccess(response, this.$notify)
+            }
+          })
+        }
+      })
+    },
+    handleDownload() {
+      this.$alert('设备维修正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      this.downLoadParm = {}
+      this.downLoadParm.name = 'loadRepirsList'
+      this.downLoadParm.offset = 0
+      this.downLoadParm.page = 1
+      this.downLoadParm.returntype = 'Map'
+      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+        this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+        this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+        this.getdataListParm.parammaps.startTime = ''
+        this.getdataListParm.parammaps.stopTime = ''
+      }
+      this.downLoadParm.parammaps = this.getdataListParm.parammaps
+      GetAccount(this.downLoadParm).then(response => {
+        if(response.data.list !== null && response.data.list !== ''){
+          for(let i=0;i<response.data.list.length;i++){
+            if(response.data.list[i].orderStatue == 0){
+              this.$set(response.data.list[i],'orderStatue','待接单')
+            }else if(response.data.list[i].orderStatue == 1){
+              this.$set(response.data.list[i],'orderStatue','维修中')
+            }else if(response.data.list[i].orderStatue == 2){
+              this.$set(response.data.list[i],'orderStatue','维修完成')
+            }else if(response.data.list[i].orderStatue == 3){
+              this.$set(response.data.list[i],'orderStatue','已驳回')
+            }
+            if (response.data.list[i].SHStatue == 1) {
+              this.$set(response.data.list[i],'SHStatue','')
+            } else if (response.data.list[i].SHStatue == 2 || response.data.list[i].SHStatue == 3) {
+              this.$set(response.data.list[i],'SHStatue','审核中')
+            } else if (response.data.list[i].SHStatue == 4 || response.data.list[i].SHStatue == 6) {
+              this.$set(response.data.list[i],'SHStatue','未通过')
+            } else if (response.data.list[i].SHStatue == 5) {
+              this.$set(response.data.list[i],'SHStatue','已通过')
+            }
+          }
+        }else{
+          response.data.list = []
+        }
+        this.downLoadList = response.data.list
+        console.log(this.downLoadList)
+        if (response.data.list !== '') {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+        const elecExcelDatas = [
+          {
+            tHeader: ['报修单号', '牧场', '设备内部编号', '设备名称', '规格型号', '部门', '故障情况','报修人','报修时间','维修日期','维修部门','处理状态','领用单状态','旧品录入状态','审核状态','故障部位','故障详情','故障原因','处理方式'],
+            filterVal: ['repairCode', 'pastureName', 'eqCode', 'eqName', 'specification', 'departmentName', 'details','requesterName','requestTime','stopTime','repairDeptName','orderStatue','LYStatue','LRStatue','SHStatue','positionName','appearanceName','failureCause','treatmentMethod'],
+            tableDatas: this.downLoadList,
+            sheetName: '设备维修'
+          }
+        ]
+        json2excel(elecExcelDatas, '设备维修', true, 'xlsx')
+      })
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+.successMaintenanceAudit{
+  width: 70px;
+  color: #fff;
+}
+.successRequisition{
+  width: 80px;
+  color: #fff;
+}
+/deep/ .el-badge__content.is-fixed{
+    z-index: 1;
+  }
+</style>
+<style lang="scss">
+.el-step__head.is-success {
+    color: #409EFF;
+    border-color: #409EFF;
+}
+.el-step__title.is-success{
+  color: #409EFF;
+}
+.el-step__head.is-process{
+  color: #409EFF;
+  border-color: #409EFF;
+  .el-step__icon.is-text{
+    background: #409EFF;
+    color: #fff;
+  }
+}
+.step-row{
+  color: #000;
+}
+</style>

+ 171 - 0
src/views/report/inventoryTurnover/index.vue

@@ -0,0 +1,171 @@
+<template>
+  <div class="app-container">
+ 
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+      <el-date-picker v-model="getdataListParm.parammaps.month" type="month" style="width: 250px;top:-3px;" placeholder="选择月份" format="yyyy-MM" value-format="yyyy-MM" />
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+      <el-button class="filter-item" style="position:absolute;right:10px" type="success" icon="el-icon-edit" @click="handleDownload">导出</el-button>
+      <el-table
+        :key="tableKey"
+        v-loading="listLoading"
+        element-loading-text="给我一点时间"
+        :data="list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable table-fixed"
+        @sort-change="tableSort"
+      >
+        <el-table-column label="序号" align="center" type="index" width="50px">
+          <template slot-scope="scope">
+            <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+          </template>
+        </el-table-column>
+     
+        <el-table-column label="牧场" prop="name" min-width="130px" align="center" />
+        <el-table-column label="月份" sortable prop="date" align="center" min-width="150px" />
+        <el-table-column label="库存周转率" min-width="130px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.rateofturnover }}</span><br>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    </div>
+  </div>
+</template>
+<script>
+// 引入
+import { GetDataByName, GetDataByNames, GetAccount } from '@/api/common'
+import Pagination from '@/components/Pagination'
+import waves from '@/directive/waves' // waves directive
+import Cookies from 'js-cookie'
+import { parseTime, json2excel, sortChange } from '@/utils/index.js'
+import { } from '@/utils/index.js'
+export default {
+  name: 'InventoryTurnover',
+  components: { Pagination },
+  directives: { waves },
+  data() {
+    return {
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      rules: {},
+      findAllPasture: [],
+      requestParams: [
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }}
+      ],
+      getdataListParm: {
+        name: 'getRateOfTurnover',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {
+          pastureName: Cookies.get('pasturename'),
+          month: ''
+        }
+      },
+      listLoading: false,
+      total: 0,
+      tableKey: 0,
+      list: [],
+      downLoadParm: {},
+      downLoadList: [],
+      isPercentage: false,
+      percentage: 1
+    }
+  },
+  created() {
+    this.get_select_list()
+    this.get_table_data()
+  },
+  methods: {
+    tableSort(column) {
+      sortChange(column, this.list)
+    },
+    get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      GetDataByName(this.getdataListParm).then(response => {
+        console.log('table数据', response.data.list)
+        this.list = response.data.list
+        this.pageNum = response.data.pageNum
+        this.pageSize = response.data.pageSize
+        if (response.data.total) {
+          this.total = response.data.total
+        }
+        // Just to simulate the time of the request
+        setTimeout(() => {
+          this.listLoading = false
+        }, 100)
+      })
+    },
+    form_search() {
+      console.log('点击了table搜索')
+      if (this.getdataListParm.parammaps.month == null) {
+        this.getdataListParm.parammaps.month = ''
+      }
+      this.getdataListParm.offset = 1
+      this.get_table_data()
+    },
+    handleDownload() {
+      this.$alert('正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.isPercentage = true
+      this.percentage = 1
+      var timer = setInterval(() => {
+        this.percentage += 5
+        if (this.percentage > 95) {
+          this.percentage = 99
+          clearInterval(timer)
+        }
+        this.percentage = this.percentage
+      }, 1000)
+      this.downLoadParm.name = 'getRateOfTurnover'
+      this.downLoadParm.returntype = 'Map'
+      this.downLoadParm.parammaps = this.getdataListParm.parammaps
+      GetAccount(this.downLoadParm).then(response => {
+        if (response.data.list !== '') {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+
+
+       
+
+
+
+        this.$nextTick(() => {
+          this.downLoadList = response.data.list
+          console.log(this.downLoadList)
+          const ExcelDatas = [
+            {
+              tHeader: ['月份', '月份', '库存周转率' ],
+              filterVal: ['name', 'date', 'rateofturnover' ],
+              tableDatas: this.downLoadList,
+              sheetName: '库存周转率报表'
+            }
+          ]
+          json2excel(ExcelDatas, '库存周转率报表', true, 'xlsx')
+        })
+      })
+    }
+  }
+}
+</script>

+ 19 - 11
src/views/report/maintenanceCycle/index.vue

@@ -5,7 +5,7 @@
       <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
     </div>
     <div class="filter-container">
-      <el-select v-if="tableIputShow1" v-model="table.getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;">
+      <el-select   v-model="table.getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;">
         <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
       </el-select>
       <el-date-picker v-if="tableIputShow1"
@@ -122,12 +122,12 @@
         </template>
       </el-table-column>
       <el-table-column label="牧场" min-width="90px" align="center" prop="pastureName" />
-      <el-table-column label="月份" min-width="90px" align="center" prop="repairCode" />
+ 
       <el-table-column label="设备名称" min-width="90px" align="center" prop="eqClassName" />
       <el-table-column label="维修次数" min-width="90px" align="center" prop="count" />
-      <el-table-column label="平均维修时间" min-width="70px" align="center" prop="mttr" />
-      <el-table-column label="无故障时间" min-width="90px" sortable align="center" prop="mttf" />
-      <el-table-column label="平均故障间隔时间" min-width="90px" sortable align="center" prop="mtbf" />
+      <el-table-column label="平均维修时间(MTTR)" min-width="70px" align="center" prop="mttr" />
+      <el-table-column label="无故障时间(MTTF)" min-width="90px" sortable align="center" prop="mttf" />
+      <el-table-column label="平均故障间隔时间(MTBF)" min-width="90px" sortable align="center" prop="mtbf" />
     </el-table> 
 
   </div>
@@ -298,6 +298,9 @@ export default {
     form_search() {
       this.table.listLoading = true
       this.table.getdataListParm.offset = 1
+
+
+      
       if (this.table.getdataListParm.parammaps.BXinputDatetime !== [] && this.table.getdataListParm.parammaps.BXinputDatetime !== '' && this.table.getdataListParm.parammaps.BXinputDatetime !== null) {
         if (this.table.getdataListParm.parammaps.BXinputDatetime.length !== 0) {
           this.table.getdataListParm.parammaps.BXTimeStart = parseTime(this.table.getdataListParm.parammaps.BXinputDatetime[0], '{y}-{m}-{d}')
@@ -342,32 +345,37 @@ export default {
         this.table2.getdataListParm.parammaps.endTime = ''
       }
 
+
+      this.table2.getdataListParm.parammaps.pastureName = this.table.getdataListParm.parammaps.pastureName
+
       //选了类别,就执行第二个表格
       //等后端接口 
       console.log(this.table2.getdataListParm.parammaps.eqClassId)
       if(this.table2.getdataListParm.parammaps.eqClassId != ""){
         this.tableShow2 = true
         this.tableShow1 = false
+        this.tableIputShow1 = false
         this.get_table_data2()
       } else {
         this.tableShow2 = false
         this.tableShow1 = true
+        this.tableIputShow1 = true
         this.get_table_data()
       }
       
     },
 
     change_eqClass(e){
-      console.log(e)
-      if(e != ""){
+      // console.log(e)
+      // if(e != ""){
       
-        this.tableIputShow1 = false
+      //   this.tableIputShow1 = false
 
-      } else {
+      // } else {
  
-        this.tableIputShow1 = true
+      //   this.tableIputShow1 = true
 
-      }
+      // }
     },
     handleDownload() {
       this.$alert('维修周期效率统计正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})

+ 4 - 4
src/views/report/queryCombustion/index.vue

@@ -359,7 +359,7 @@ export default {
         legend: {
           data: ['今年用量', '去年同期用量']
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '8%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data2.months, name: '月份', axisLabel: { interval: 0, rotate: 30 }}],
         yAxis: [{ type: 'value', name: '升', axisLabel: { formatter: '{value}' }}],
@@ -411,7 +411,7 @@ export default {
         legend: {
           data: ['今年日用量', '去年同期']
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data3.day, name: '日期', axisLabel: { interval: 0, rotate: 30 }}],
         yAxis: [{ type: 'value', name: '升', axisLabel: { formatter: '{value}' }}],
@@ -454,7 +454,7 @@ export default {
         legend: {
           data: chart_data4.name, top: 40
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         series: [
           {
@@ -498,7 +498,7 @@ export default {
         legend: {
           data: ['柴油用量']
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data5.typeName, name: '设备', axisLabel: { interval: 0, rotate: 30 }}],
         yAxis: [{ type: 'value', name: '升', axisLabel: { formatter: '{value}' }}],

+ 4 - 4
src/views/report/queryElec/index.vue

@@ -345,7 +345,7 @@ export default {
           data: ['今年用量', '去年同期用量'],
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data2.months, name: '月份', axisLabel: { interval: 0, rotate: 30 }}],
         yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}万' }}],
@@ -398,7 +398,7 @@ export default {
           data: ['今年日用量', '去年同期'],
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data3.day, name: '日期', axisLabel: { interval: 0 }}],
         yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}' }}],
@@ -441,7 +441,7 @@ export default {
         legend: {
           data: chart_data4.name, top: 40, x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: ['#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         series: [
           {
@@ -486,7 +486,7 @@ export default {
           data: ['用电量'],
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data5.typeName, name: '电表名称', axisLabel: { interval: 0 }}],
         yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}万' }}],

+ 4 - 4
src/views/report/queryWater/index.vue

@@ -347,7 +347,7 @@ export default {
           data: ['今年用量', '去年同期用量'],
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: ['#769cfc', '#FFB800'],
         grid: { left: '3%', right: '8%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data2.months, name: '月份', axisLabel: { interval: 0, rotate: 30 }}],
         yAxis: [{ type: 'value', name: '水(m³)', axisLabel: { formatter: '{value}' }}],
@@ -400,7 +400,7 @@ export default {
           data: ['今年日用量', '去年同期'],
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: ['#769cfc', '#FFB800'],
         grid: { left: '3%', right: '8%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data3.day, name: '日期', axisLabel: { interval: 0 }}],
         yAxis: [{ type: 'value', name: '水(m³)', axisLabel: { formatter: '{value}' }}],
@@ -444,7 +444,7 @@ export default {
           data: chart_data4.name, top: 40,
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: ['#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         series: [
           {
@@ -489,7 +489,7 @@ export default {
           data: ['用水量'],
           x: 'right'
         },
-        color: ['#42b983', '#769cfc', '#FFB800'],
+        color: ['#769cfc', '#FFB800'],
         grid: { left: '3%', right: '15%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data5.typeName, name: '水表名称', axisLabel: { interval: 0, rotate: 30 }}],
         yAxis: [{ type: 'value', name: '水(m³)', axisLabel: { formatter: '{value}' }}],

+ 90 - 20
src/views/report/stopRecord/index.vue

@@ -1,13 +1,70 @@
 <template>
   <div class="app-container">
+
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
   
-     开发中
+    <div class="filter-container">
+      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
+        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+      </el-select>
+     
+
+      <el-date-picker
+            ref="inputDatetime"
+            v-model="getdataListParm.parammaps.inputDatetime"
+            class="inputDatetime"
+            type="datetimerange"
+            style="width: 280px;top:-3px;"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="时间"
+            end-placeholder="时间"
+            :picker-options="pickerOptions"
+          />
+      <el-input v-model="getdataListParm.parammaps.eqName" placeholder="请输入设备名称" style="width: 200px;" class="filter-item" />
+ 
+ 
+      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+
+      <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
+  
+
+      <el-table
+        :key="tableKey"
+        v-loading="listLoading"
+        element-loading-text="给我一点时间"
+        :data="list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="tableCellStyle"
+        class="elTable"
+ 
+      >
+        <el-table-column label="序号" align="center" type="index" width="50px">
+          <template slot-scope="scope">
+            <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="牧场" align="center" prop="pastureName" />
+        <el-table-column label="设备名称" align="center" prop="eqName" />
+        <el-table-column label="运行时间" align="center" prop="run" />
+        <el-table-column label="停机时间" align="center" prop="stop" />
+      </el-table>
+      <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+    </div>
   </div>
 </template>
 
 <script>
 // 引入
-import { GetDataByName, GetDataByNames, getRecuData, GetAccount } from '@/api/common'
+import { GetDataByName, GetDataByNames, getRecuData, GetAccount,startStopRecord } from '@/api/common'
 import waves from '@/directive/waves'
  
 import { parseTime, json2excel, sortChange } from '@/utils/index.js'
@@ -59,9 +116,9 @@ export default {
       total: 0,
       listLoading: true,
       getdataListParm: {
-        name: 'getRecordsOfRepairman', page: 1, offset: 1, pagecount: 10, returntype: 'Map',inputDatetime: '',
-        parammaps: { pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), departmentName: '', eqClassId: '', startTime: "",
-        stopTime: "",departmentId: "" ,inputDatetime: [parseTime(new Date().getTime() - 30 * 24 * 60 * 60 * 1000, '{y}-{m}-{d}'), parseTime(new Date().getTime() - 24 * 60 * 60 * 1000, '{y}-{m}-{d}')],}
+        name: 'startStopRecord', page: 1, offset: 1, pagecount: 10, returntype: 'Map',inputDatetime: [parseTime(new Date().getTime() - 30 * 24 * 60 * 60 * 1000, '{y}-{m}-{d}'), parseTime(new Date().getTime() - 24 * 60 * 60 * 1000, '{y}-{m}-{d}')],
+        parammaps: { pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), departmentName: '', eqClassId: '', eqName: '',startTime: "",
+        endTime: "",departmentId: "" ,inputDatetime: [parseTime(new Date().getTime() - 30 * 24 * 60 * 60 * 1000, '{y}-{m}-{d}'), parseTime(new Date().getTime() - 24 * 60 * 60 * 1000, '{y}-{m}-{d}')], page: 1, offset: 1, pagecount: 10,}
       },
       requestParam: { name: 'insertAsset', offset: 0, pagecount: 0, parammaps: {}}, statueReason: false,
       downLoadParm: {},
@@ -76,8 +133,8 @@ export default {
     }
   },
   created() {
-    // this.get_select_list()
-    //  this.get_table_data()
+    this.get_select_list()
+     this.get_table_data()
  
   },
   methods: {
@@ -136,14 +193,21 @@ export default {
         this.getdataListParm.parammaps.pastureId = ''
       }
 
-      if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
-        this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
-        this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
-      } else {
+      if (this.getdataListParm.parammaps.inputDatetime == null) {
         this.getdataListParm.parammaps.startTime = ''
-        this.getdataListParm.parammaps.stopTime = ''
+        this.getdataListParm.parammaps.endTime = ''
+      } else {
+        
+
+        this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
+        this.getdataListParm.parammaps.endTime = this.getdataListParm.parammaps.inputDatetime[1]
       }
-      GetDataByName(this.getdataListParm).then(response => {
+
+
+      this.getdataListParm.parammaps.offset = this.getdataListParm.offset
+      this.getdataListParm.parammaps.pagecount = this.getdataListParm.pagecount
+      this.getdataListParm.parammaps.page = this.getdataListParm.page
+      startStopRecord(this.getdataListParm.parammaps).then(response => {
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
           this.list = response.data.list
@@ -180,7 +244,7 @@ export default {
    
 
     handleDownload() {
-      this.$alert('报修人记录正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+      this.$alert('启停记录正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
       this.isPercentage = true
       this.percentage = 1
       var timer = setInterval(() => {
@@ -191,9 +255,15 @@ export default {
         }
         this.percentage = this.percentage
       }, 1000)
-      this.downLoadParm.name = 'getRecordsOfRepairman'
+      this.downLoadParm.name = 'startStopRecord'
+      
+
+      
       this.downLoadParm.parammaps = this.getdataListParm.parammaps
-      GetAccount(this.downLoadParm).then(response => {
+      this.downLoadParm.parammaps.pagecount = 0
+      this.downLoadParm.parammaps.page = 0
+      this.downLoadParm.parammaps.offset = 0
+      startStopRecord(this.downLoadParm.parammaps).then(response => {
         this.downLoadList = response.data.list
         if (response.data.list !== '') {
           this.percentage = 99
@@ -204,13 +274,13 @@ export default {
         console.log(this.downLoadList)
         const elecExcelDatas = [
           {
-            tHeader: ['牧场', '月份', '部门', '姓名', '报修次数'],
-            filterVal: ['pasturename', 'date', 'departmentName', 'empname', 'count' ],
+            tHeader: ['牧场', '设备名称', '运行时间', '停机时间' ],
+            filterVal: ['pastureName', 'eqName', 'run', 'stop' ],
             tableDatas: this.downLoadList,
-            sheetName: '报修人记录'
+            sheetName: '启停记录'
           }
         ]
-        json2excel(elecExcelDatas, '报修人记录', true, 'xlsx')
+        json2excel(elecExcelDatas, '启停记录', true, 'xlsx')
       })
     }
  

+ 3 - 55
src/views/report/stopRecord/index1.vue → src/views/report/stopRecord/index2.vue

@@ -1,59 +1,7 @@
 <template>
   <div class="app-container">
   
-    <div class="filter-container">
-      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
-        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-      </el-select>
-     
-
-      <el-date-picker
-            ref="inputDatetime"
-            v-model="getdataListParm.parammaps.inputDatetime"
-            class="inputDatetime"
-            type="datetimerange"
-            style="width: 280px;top:-3px;"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd"
-            range-separator="至"
-            start-placeholder="时间"
-            end-placeholder="时间"
-            :picker-options="pickerOptions"
-          />
-      <el-input v-model="getdataListParm.parammaps.empname" placeholder="请输入设备名称" style="width: 200px;" class="filter-item" />
- 
- 
-      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
-  
-
-      <el-table
-        :key="tableKey"
-        v-loading="listLoading"
-        element-loading-text="给我一点时间"
-        :data="list"
-        border
-        fit
-        highlight-current-row
-        style="width: 100%;"
-        :row-style="rowStyle"
-        :cell-style="tableCellStyle"
-        class="elTable"
- 
-      >
-        <el-table-column label="序号" align="center" type="index" width="50px">
-          <template slot-scope="scope">
-            <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="牧场" align="center" prop="pasturename" />
-        <el-table-column label="月份" align="center" prop="date" />
- 
-        <el-table-column label="设备名称" align="center" prop="departmentName" />
-        <el-table-column label="运行时间" align="center" prop="empname" />
-        <el-table-column label="停机时间" align="center" prop="count" />
-      </el-table>
-      <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
-    </div>
+     开发中
   </div>
 </template>
 
@@ -128,8 +76,8 @@ export default {
     }
   },
   created() {
-    this.get_select_list()
-     this.get_table_data()
+    // this.get_select_list()
+    //  this.get_table_data()
  
   },
   methods: {

Some files were not shown because too many files changed in this diff