Преглед на файлове

Merge branch 'master' into feature/repair-optimize

# Conflicts:
#	dist/index.html
duanxiaoduan преди 10 месеца
родител
ревизия
350ea4493f

+ 2 - 2
.env.development

@@ -7,9 +7,9 @@ ENV = 'development'
 #  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
 #  白少后台本地
 # 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
+VUE_APP_BASE_API = 'http://192.168.1.56:8082/'
 # 线上测试
-VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 # VUE_APP_BASE_API = 'http://127.0.0.1:8082/'
 
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'

BIN
dist.zip


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/datas/myMap.json


BIN
dist/favicon.ico


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/index.html


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/css/chunk-elementUI.45ab9bc1.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/css/chunk-libs.2e418612.css


BIN
dist/static/fonts/element-icons.535877f5.woff


BIN
dist/static/fonts/element-icons.732389de.ttf


BIN
dist/static/img/1.1ddf085a.png


BIN
dist/static/img/404.a57b6f31.png


BIN
dist/static/img/404_cloud.0f4bc32b.png


BIN
dist/static/img/cow.3495de2a.jpg


BIN
dist/static/img/login-bg1.1f1602f0.jpg


BIN
dist/static/img/logo1.d2343c0f.png


BIN
dist/static/img/logo_u3.34a9ffae.png


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/chunk-elementUI.1e8908f6.js


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

@@ -2348,8 +2348,8 @@ export default {
           this.$nextTick(() => {
             const ExcelDatas = [
               {
-                tHeader: ['备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '计划量', '单价', '备注'],
-                filterVal: ['partCode', 'partName', 'specification', 'brand', 'unit', 'planAmount', 'price', 'remark'],
+                tHeader: ['备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '计划量', '单价', '使用周期', '合同差异项', '备注'],
+                filterVal: ['partCode', 'partName', 'specification', 'brand', 'unit', 'planAmount', 'price','lifeCycle','contractVarianceItem', 'remark'],
                 tableDatas: response.data.list,
                 sheetName: '合同管理-备件明细'
               }

+ 3500 - 3495
src/views/custom/purchase/index.vue

@@ -1,3497 +1,3502 @@
-<template>
-  <div class="app-container">
-    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
-      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
-      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
-    </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane v-if="isDistributionSheet" label="采购配单" name="first">
-        <div class="purchaseDistributionSheet">
-
-          <div class="filter-container">
-            <el-select v-model="getdataListParm1.parammaps.departmentId" style="width: 140px;" placeholder="部门" class="filter-item" @change = "change_dept">
-              <el-option v-for="item in deptNameList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-
-          </div>
-
-          <el-table
-            :key="tableKey1"
-            v-loading="listLoading1"
-            element-loading-text="给我一点时间"
-            :data="list1"
-            border
-            fit
-            :row-style="tableRowStyle"
-            :cell-style="tableCellStyle"
-            highlight-current-row
-            style="width: 100%;"
-            class="elTable table-fixed"
-            @cell-click="cellClick"
-            @sort-change="tableSort"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
+<template>
+  <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane v-if="isDistributionSheet" label="采购配单" name="first">
+        <div class="purchaseDistributionSheet">
+
+          <div class="filter-container">
+            <el-select v-model="getdataListParm1.parammaps.departmentId" style="width: 140px;" placeholder="部门" class="filter-item" @change = "change_dept">
+              <el-option v-for="item in deptNameList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+
+          </div>
+
+          <el-table
+            :key="tableKey1"
+            v-loading="listLoading1"
+            element-loading-text="给我一点时间"
+            :data="list1"
+            border
+            fit
+            :row-style="tableRowStyle"
+            :cell-style="tableCellStyle"
+            highlight-current-row
+            style="width: 100%;"
+            class="elTable table-fixed"
+            @cell-click="cellClick"
+            @sort-change="tableSort"
+            :max-height="myHeight"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件编号" align="center" min-width="150px">
+              <template slot-scope="scope">
+                <span>{{ scope.row.partCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件名称" align="center" min-width="120px">
+              <template slot-scope="scope">
+                <span>{{ scope.row.partName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件规格" align="center" min-width="120px">
+              <template slot-scope="scope">
+                <span>{{ scope.row.specification }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件品牌" min-width="100px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.brand }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="计量单位" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.unit }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="图片" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <el-popover placement="right" title="" trigger="hover">
+                  <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
+                  <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                </el-popover>
+              </template>
+            </el-table-column>
+            <el-table-column label="供应商" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.providerName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column sortable prop="price" label="单价" min-width="70px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.price }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="90px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.sumAmount }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购数量" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <el-form :model="scope.row" :rules="rules">
+                  <el-form-item prop="amount">
+                     <el-input  v-model="scope.row.amount"  style="width:80px;margin-top:25px;height:10px"  />
+                     <!-- 白少让先注释了 -->
+                    <!-- <el-input  v-if ="scope.row.amount == 0"  v-model="scope.row.amount"  style="width:80px;margin-top:25px;height:10px"   disabled/>
+                    <el-input v-else v-model="scope.row.amount"  style="width:80px;margin-top:25px;height:10px"  /> -->
+                  </el-form-item>
+                </el-form>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-button :disabled="confirmationSheetDisabled" type="primary" style="float: right;margin-top: 10px;" @click="confirmationSheet()">确认配单</el-button>
+          <el-dialog :title="textMap[dialogStatusConfirmation]" :visible.sync="dialogFormVisibleConfirmation" :close-on-click-modal="false" style="width:100%;margin: 0 auto;overflow:auto">
+            <div class="app-contentConfirmationSheet">
+              <el-form ref="temp1" :rules="rules" :model="temp1" label-position="right" label-width="90px" style="width:100%;margin-bottom:50px">
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="配单号:" prop="matchCode">
+                      <el-input ref="matchCode" v-model="temp1.matchCode" disabled />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="提交日期:" prop="buyerDate">
+                      <el-date-picker
+                        v-model="temp1.buyerDate"
+                        :picker-options="pickerOptions"
+                        type="date"
+                        placeholder="提交日期"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd"
+                        style="width:170px;"
+                      />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="采购员:" prop="buyerPerson">
+                      <el-select v-model="temp1.buyerPerson" placeholder="采购员" class="filter-item">
+                        <el-option
+                          v-for="item in findAllEmploye"
+                          :key="item.id"
+                          :label="item.name"
+                          :value="item.id"
+                        />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <div v-for="(item,index) in listConfirmationSheet" :key="index" class="app-content">
+                <div class="title">
+                  <div>
+                    <b>采购单号:</b>
+                    <span>{{ item.orderNumber }}</span>
+                  </div>
+                  <div>
+                    <b>供应商:</b>
+                    <span>{{ item.providerName }}</span>
+                  </div>
+                </div>
+                <el-table
+                  :key="tableKey1"
+                  v-loading="listLoading1"
+                  element-loading-text="给我一点时间"
+                  :data="item.list"
+                  border
+                  fit
+                  highlight-current-row
+                  style="width: 97%;margin:0 auto"
+                  :row-style="rowStyle"
+                  :cell-style="cellStyle"
+                  class="elTable table-fixed"
+                >
+                  <!-- table表格 -->
+                  <el-table-column label="序号" align="center" type="index" width="50px">
+                    <template slot-scope="scope">
+                      <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="备件编号" align="center" min-width="150px">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.partCode }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="备件名称" align="center" min-width="120px">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.partName }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="备件规格" align="center" min-width="120px">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.specification }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="图片" min-width="110px" align="center">
+                    <template slot-scope="scope">
+                      <el-popover placement="right" title="" trigger="hover">
+                        <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
+                        <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                      </el-popover>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="备件品牌" min-width="100px" align="center">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.brand }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="计量单位" min-width="80px" align="center">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.unit }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="单价" min-width="70px" align="center">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row. price }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="申购数量" min-width="90px" align="center">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.sumAmount }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="合计采购数量" min-width="90px" align="center">
+                    <template slot-scope="scope">
+                      <span>{{ scope.row.amount }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="总价" min-width="90px" align="center">
+                    <template slot-scope="scope">
+                      <span>{{ (scope.row.sumPrice = scope.row.price * parseFloat(scope.row.amount))| keepTwoNum }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <div ref="total" class="total">
+                  合计:
+                  <span>{{ item.Sum }}</span>
+                </div>
+              </div>
+              <div slot="footer" class="dialog-footer" style="bottom:10px">
+                <el-button type="primary" :disabled="isokDisable" @click="confirmationSheetData()">确认</el-button>
+                <el-button @click="dialogFormVisibleConfirmation= false;get_table_data1();">取消</el-button>
+              </div>
+            </div>
+          </el-dialog>
+        </div>
+      </el-tab-pane>
+      <el-tab-pane v-if="isDistributionManagement" label="配单管理" name="fouth">
+        <div class="DistributionManagement">
+          <div class="filter-container">
+            <el-select v-model="getdataListParm4.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-input v-model="getdataListParm4.parammaps.matchCode" placeholder="配单号" clearable style="width: 200px;" class="filter-item" />
+            <el-select v-model="getdataListParm4.parammaps.statue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in status2" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-date-picker ref="inputDatetime4" v-model="getdataListParm4.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search4">搜索</el-button>
+
+
+
+          </div>
+          <el-table
+            :key="tableKey4"
+            v-loading="listLoading4"
+            element-loading-text="给我一点时间"
+            :data="list4"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            @sort-change="tableSort"
+            @current-change="handleCurrentChange"
+            :max-height="myHeight"
+          >
+
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="牧场" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.pastureName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="配单号" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.matchCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购员" min-width="130px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.empname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="提交日期" sortable prop="dealTime" min-width="110px" align="center" />
+            <el-table-column sortable prop="cou" label="采购单数" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.cou }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
+
+            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="{row}">
+                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see4(row)">查看</el-button>
+                <el-button v-if="parseFloat(row.statue) === 0 && isExamineDM" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
+                <el-button v-else style="display:none;" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
+                <el-button v-if="parseFloat(row.statue) === 2" type="success" style="display:inline-block" size="mini" @click="form_edit(row)">编辑</el-button>
+                <el-button v-else style="display:none;" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination v-show="total4>0" :total="total4" :page.sync="getdataListParm4.offset" :limit.sync="getdataListParm4.pagecount" @pagination="get_table_data4" />
+          <el-dialog :title="textMap[dialogStatusSee4]" :visible.sync="dialogFormVisibleSee4" :close-on-click-modal="false">
+            <div class="app-contentSee">
+              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="80px" style="width: 800px;margin-bottom:30px">
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="配单号:" prop="matchCode">
+                      <span>{{ temp4.matchCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="采购员:" prop="empname">
+                      <span>{{ temp4.empname }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="配单日期:" prop="dealTime">
+                      <span>{{ temp4.dealTime }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKeySee4"
+                v-loading="listLoadingSee4"
+                element-loading-text="给我一点时间"
+                :data="listSee4"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;margin-bottom:100px"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable table-fixed"
+              >
+
+                <el-table-column label="序号" align="center" type="index" width="50px" />
+                <el-table-column label="采购单号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.buyeCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件品牌" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.brand }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="计量单位" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.unit }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="供应商" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.providerName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="price" label="单价" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.price }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.sumAmount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="amount" label="采购数量" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.amount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="sumPrice" label="总价" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.sumPrice }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件图片" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <el-popover placement="right" title="" trigger="hover">
+                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
+                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                    </el-popover>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="SGremark" label="备注" min-width="60px" align="center" />
+              </el-table>
+              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
+                <el-row>
+                  <el-col>
+                    <el-form-item label="流程进度" />
+                    <el-steps :active="active" align-center finish-status="success">
+                      <el-step
+                        v-for="(item,index) in activeList"
+                        :key="index"
+                        :title="item.title"
+                        :status="item.status"
+                      >
+                        <template slot="description">
+                          <div class="step-row">
+                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
+                            <div>{{ item.reason }}</div>
+                          </div>
+                        </template>
+                      </el-step>
+                    </el-steps>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col>
+                    <el-form-item label="操作:">
+                      <!-- 审核 -->
+                      <el-button v-if="isExamineDM && temp4.statue == 0" type="success" style="display:inline-block" @click="handleExamine()">审核</el-button>
+                      <el-button v-else type="success" style="display:none" @click="handleExamine()">审核</el-button>
+
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
+                <el-button @click="dialogFormVisibleSee4 = false;">关闭</el-button>
+              </div>
+            </div>
+          </el-dialog>
+
+          <el-dialog :title="textMap[dialogStatusUpdate4]" width="90%" :visible.sync="dialogFormVisibleUpdate4" :close-on-click-modal="false">
+            <div class="app-contentUpdate">
+              <el-form
+                ref="updateTemp4"
+                :rules="rules"
+                :model="updateTemp4"
+                label-position="right"
+                label-width="80px"
+                style="width:80%;margin-bottom:30px"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="配单号:" prop="matchCode">
+                      <span>{{ updateTemp4.matchCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="采购员:" prop="empname">
+                      <span>{{ updateTemp4.empname }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-form-item label="配单日期:" prop="dealTime">
+                      <span>{{ updateTemp4.dealTime }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKeyUpdate4"
+                v-loading="listLoadingUpdate4"
+                element-loading-text="给我一点时间"
+                :data="listUpdate4"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;margin-bottom:100px"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable table-fixed"
+              >
+                <!-- table表格 -->
+                <el-table-column label="序号" align="center" type="index" width="50px" />
+                <el-table-column label="采购单号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.buyeCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件品牌" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.brand }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="计量单位" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.unit }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="供应商" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.providerName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="单价" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.price }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="申购数量" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.sumAmount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="采购数量" min-width="100px" align="center">
+                  <template slot-scope="scope">
+                    <el-form :model="scope.row" :rules="rules">
+                      <el-form-item prop="amount">
+                        <el-input
+                          v-model="scope.row.amount"
+                          style="width:80px;margin-top:25px;height:10px"
+                        />
+                      </el-form-item>
+                    </el-form>
+                  </template>
+                </el-table-column>
+                <el-table-column label="总价" min-width="60px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ (parseFloat(scope.row.price) * parseFloat(scope.row.amount)) | keepTwoNum2 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件图片" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <el-popover placement="right" title="" trigger="hover">
+                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
+                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                    </el-popover>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
+                <el-button type="primary" :disabled="isokDisable" @click="edit_dialog_save()">确认</el-button>
+                <el-button @click="dialogFormVisibleUpdate4 = false;">关闭</el-button>
+              </div>
+            </div>
+          </el-dialog>
+
+          <el-dialog :title="textMap[dialogStatus_Examine]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
+            <div class="app-examine">
+              <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
+              <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
+                <el-row style="width:88%;height:150px;margin:0 auto;">
+                  <el-col :span="20">
+                    <el-form-item>
+                      <el-radio-group v-model="examineTemp.SHstatue" @change="changeSHStatue">
+                        <el-radio :label="1" checked>通过</el-radio>
+                        <el-radio :label="2">不通过</el-radio>
+                      </el-radio-group>
+                    </el-form-item>
+                  </el-col>
+                  <el-col v-if="statueReason" :span="20">
+                    <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
+                  </el-col>
+                </el-row>
+              </el-form>
+            </div>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="primary" :disabled="isokDisable" @click="dialogStatus_Examine==='examine'?createExamineData():createExamineData()">确认</el-button>
+              <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
+            </div>
+          </el-dialog>
+
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="采购单管理" name="second">
+        <div class="purchaseOrderManagement">
+          <div class="filter-container">
+            <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-input v-model="getdataListParm2.parammaps.buyeCode" placeholder="采购单号" clearable style="width: 200px;" class="filter-item" />
+            <el-select v-model="getdataListParm2.parammaps.statu" clearable placeholder="单据状态" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in status" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-autocomplete v-model="getdataListParm2.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
+            <el-date-picker ref="inputDatetime2" v-model="getdataListParm2.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
+            <el-select v-model="getdataListParm2.parammaps.purchase_type" clearable style="width: 140px;" placeholder="申购类型" class="filter-item">
+              <el-option v-for="item in subscriptionStatusList" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search2">搜索</el-button>
+            <el-button v-waves v-if="isPurchaseSap" class="filter-item" type="primary" @click="sapUpload">SAP上传</el-button>
+            <el-button v-waves  v-if="isPurchaseSrm" class="filter-item" type="primary" @click="srmUpload">SRM上传</el-button>
+          </div>
+          <el-table
+            :key="tableKey2"
+            v-loading="listLoading2"
+            element-loading-text="给我一点时间"
+            :data="list2"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            @sort-change="tableSort"
+            @selection-change="change_table_selection"
+            :max-height="myHeight"
+          >
+          <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" disabled />
+            <el-table-column label="序号1" 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 label="申购类型" min-width="80px" align="center">
               <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
+                <span v-if="scope.row.purchase_type == 1">暂估申购</span>
+                <span v-else-if="scope.row.purchase_type == 3">赠品申购</span>
+                <span v-else-if="scope.row.purchase_type == 4">奶厅申购</span>
+                <span v-else>新增申购</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-input  v-if ="scope.row.amount == 0"  v-model="scope.row.amount"  style="width:80px;margin-top:25px;height:10px"   disabled/>
-                    <el-input v-else v-model="scope.row.amount"  style="width:80px;margin-top:25px;height:10px"  /> -->
-                  </el-form-item>
-                </el-form>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-button :disabled="confirmationSheetDisabled" type="primary" style="float: right;margin-top: 10px;" @click="confirmationSheet()">确认配单</el-button>
-          <el-dialog :title="textMap[dialogStatusConfirmation]" :visible.sync="dialogFormVisibleConfirmation" :close-on-click-modal="false" style="width:100%;margin: 0 auto;overflow:auto">
-            <div class="app-contentConfirmationSheet">
-              <el-form ref="temp1" :rules="rules" :model="temp1" label-position="right" label-width="90px" style="width:100%;margin-bottom:50px">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <el-input ref="matchCode" v-model="temp1.matchCode" disabled />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="提交日期:" prop="buyerDate">
-                      <el-date-picker
-                        v-model="temp1.buyerDate"
-                        :picker-options="pickerOptions"
-                        type="date"
-                        placeholder="提交日期"
-                        format="yyyy-MM-dd"
-                        value-format="yyyy-MM-dd"
-                        style="width:170px;"
-                      />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="buyerPerson">
-                      <el-select v-model="temp1.buyerPerson" placeholder="采购员" class="filter-item">
-                        <el-option
-                          v-for="item in findAllEmploye"
-                          :key="item.id"
-                          :label="item.name"
-                          :value="item.id"
-                        />
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div v-for="(item,index) in listConfirmationSheet" :key="index" class="app-content">
-                <div class="title">
-                  <div>
-                    <b>采购单号:</b>
-                    <span>{{ item.orderNumber }}</span>
-                  </div>
-                  <div>
-                    <b>供应商:</b>
-                    <span>{{ item.providerName }}</span>
-                  </div>
-                </div>
-                <el-table
-                  :key="tableKey1"
-                  v-loading="listLoading1"
-                  element-loading-text="给我一点时间"
-                  :data="item.list"
-                  border
-                  fit
-                  highlight-current-row
-                  style="width: 97%;margin:0 auto"
-                  :row-style="rowStyle"
-                  :cell-style="cellStyle"
-                  class="elTable table-fixed"
-                >
-                  <!-- table表格 -->
-                  <el-table-column label="序号" align="center" type="index" width="50px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.$index + (pageNum1-1) * pageSize1 + 1 }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件编号" align="center" min-width="150px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.partCode }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件名称" align="center" min-width="120px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.partName }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件规格" align="center" min-width="120px">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.specification }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="图片" min-width="110px" align="center">
-                    <template slot-scope="scope">
-                      <el-popover placement="right" title="" trigger="hover">
-                        <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                        <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                      </el-popover>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="备件品牌" min-width="100px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.brand }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="计量单位" min-width="80px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.unit }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="单价" min-width="70px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row. price }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="申购数量" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.sumAmount }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="合计采购数量" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ scope.row.amount }}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="总价" min-width="90px" align="center">
-                    <template slot-scope="scope">
-                      <span>{{ (scope.row.sumPrice = scope.row.price * parseFloat(scope.row.amount))| keepTwoNum }}</span>
-                    </template>
-                  </el-table-column>
-                </el-table>
-                <div ref="total" class="total">
-                  合计:
-                  <span>{{ item.Sum }}</span>
-                </div>
-              </div>
-              <div slot="footer" class="dialog-footer" style="bottom:10px">
-                <el-button type="primary" :disabled="isokDisable" @click="confirmationSheetData()">确认</el-button>
-                <el-button @click="dialogFormVisibleConfirmation= false;get_table_data1();">取消</el-button>
-              </div>
-            </div>
-          </el-dialog>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane v-if="isDistributionManagement" label="配单管理" name="fouth">
-        <div class="DistributionManagement">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm4.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm4.parammaps.matchCode" placeholder="配单号" clearable style="width: 200px;" class="filter-item" />
-            <el-select v-model="getdataListParm4.parammaps.statue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in status2" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="inputDatetime4" v-model="getdataListParm4.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search4">搜索</el-button>
-
-
-
-          </div>
-          <el-table
-            :key="tableKey4"
-            v-loading="listLoading4"
-            element-loading-text="给我一点时间"
-            :data="list4"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            @current-change="handleCurrentChange"
-            :max-height="myHeight"
-          >
-
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.matchCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购员" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="提交日期" sortable prop="dealTime" min-width="110px" align="center" />
-            <el-table-column sortable prop="cou" label="采购单数" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.cou }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
-
-            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see4(row)">查看</el-button>
-                <el-button v-if="parseFloat(row.statue) === 0 && isExamineDM" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
-                <el-button v-else style="display:none;" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
-                <el-button v-if="parseFloat(row.statue) === 2" type="success" style="display:inline-block" size="mini" @click="form_edit(row)">编辑</el-button>
-                <el-button v-else style="display:none;" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="total4>0" :total="total4" :page.sync="getdataListParm4.offset" :limit.sync="getdataListParm4.pagecount" @pagination="get_table_data4" />
-          <el-dialog :title="textMap[dialogStatusSee4]" :visible.sync="dialogFormVisibleSee4" :close-on-click-modal="false">
-            <div class="app-contentSee">
-              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="80px" style="width: 800px;margin-bottom:30px">
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <span>{{ temp4.matchCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ temp4.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="配单日期:" prop="dealTime">
-                      <span>{{ temp4.dealTime }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeySee4"
-                v-loading="listLoadingSee4"
-                element-loading-text="给我一点时间"
-                :data="listSee4"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-              >
-
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="采购单号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.buyeCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="供应商" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.providerName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="price" label="单价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="amount" label="采购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.amount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumPrice" label="总价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumPrice }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="SGremark" label="备注" min-width="60px" align="center" />
-              </el-table>
-              <el-form ref="temp4" :rules="rules" :model="temp4" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
-                <el-row>
-                  <el-col>
-                    <el-form-item label="流程进度" />
-                    <el-steps :active="active" align-center finish-status="success">
-                      <el-step
-                        v-for="(item,index) in activeList"
-                        :key="index"
-                        :title="item.title"
-                        :status="item.status"
-                      >
-                        <template slot="description">
-                          <div class="step-row">
-                            <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
-                            <div>{{ item.reason }}</div>
-                          </div>
-                        </template>
-                      </el-step>
-                    </el-steps>
-                  </el-col>
-                </el-row>
-                <el-row>
-                  <el-col>
-                    <el-form-item label="操作:">
-                      <!-- 审核 -->
-                      <el-button v-if="isExamineDM && temp4.statue == 0" type="success" style="display:inline-block" @click="handleExamine()">审核</el-button>
-                      <el-button v-else type="success" style="display:none" @click="handleExamine()">审核</el-button>
-
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-                <el-button @click="dialogFormVisibleSee4 = false;">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-
-          <el-dialog :title="textMap[dialogStatusUpdate4]" width="90%" :visible.sync="dialogFormVisibleUpdate4" :close-on-click-modal="false">
-            <div class="app-contentUpdate">
-              <el-form
-                ref="updateTemp4"
-                :rules="rules"
-                :model="updateTemp4"
-                label-position="right"
-                label-width="80px"
-                style="width:80%;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="配单号:" prop="matchCode">
-                      <span>{{ updateTemp4.matchCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ updateTemp4.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="8">
-                    <el-form-item label="配单日期:" prop="dealTime">
-                      <span>{{ updateTemp4.dealTime }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeyUpdate4"
-                v-loading="listLoadingUpdate4"
-                element-loading-text="给我一点时间"
-                :data="listUpdate4"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-              >
-                <!-- table表格 -->
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="采购单号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.buyeCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="供应商" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.providerName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="单价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="申购数量" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="采购数量" min-width="100px" align="center">
-                  <template slot-scope="scope">
-                    <el-form :model="scope.row" :rules="rules">
-                      <el-form-item prop="amount">
-                        <el-input
-                          v-model="scope.row.amount"
-                          style="width:80px;margin-top:25px;height:10px"
-                        />
-                      </el-form-item>
-                    </el-form>
-                  </template>
-                </el-table-column>
-                <el-table-column label="总价" min-width="60px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ (parseFloat(scope.row.price) * parseFloat(scope.row.amount)) | keepTwoNum2 }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
-                <el-button type="primary" :disabled="isokDisable" @click="edit_dialog_save()">确认</el-button>
-                <el-button @click="dialogFormVisibleUpdate4 = false;">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-
-          <el-dialog :title="textMap[dialogStatus_Examine]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
-            <div class="app-examine">
-              <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
-              <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
-                <el-row style="width:88%;height:150px;margin:0 auto;">
-                  <el-col :span="20">
-                    <el-form-item>
-                      <el-radio-group v-model="examineTemp.SHstatue" @change="changeSHStatue">
-                        <el-radio :label="1" checked>通过</el-radio>
-                        <el-radio :label="2">不通过</el-radio>
-                      </el-radio-group>
-                    </el-form-item>
-                  </el-col>
-                  <el-col v-if="statueReason" :span="20">
-                    <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
-                  </el-col>
-                </el-row>
-              </el-form>
-            </div>
-            <div slot="footer" class="dialog-footer">
-              <el-button type="primary" :disabled="isokDisable" @click="dialogStatus_Examine==='examine'?createExamineData():createExamineData()">确认</el-button>
-              <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
-            </div>
-          </el-dialog>
-
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="采购单管理" name="second">
-        <div class="purchaseOrderManagement">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm2.parammaps.buyeCode" placeholder="采购单号" clearable style="width: 200px;" class="filter-item" />
-            <el-select v-model="getdataListParm2.parammaps.statu" clearable placeholder="单据状态" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in status" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-autocomplete v-model="getdataListParm2.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
-            <el-date-picker ref="inputDatetime2" v-model="getdataListParm2.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始提交日期" end-placeholder="结束提交日期" />
-            <el-select v-model="getdataListParm2.parammaps.purchase_type" clearable style="width: 140px;" placeholder="申购状态" class="filter-item">
-              <el-option v-for="item in subscriptionStatusList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search2">搜索</el-button>
-            <el-button v-waves v-if="isPurchaseSap" class="filter-item" type="primary" @click="sapUpload">SAP上传</el-button>
-            <el-button v-waves  v-if="isPurchaseSrm" class="filter-item" type="primary" @click="srmUpload">SRM上传</el-button>
-          </div>
-          <el-table
-            :key="tableKey2"
-            v-loading="listLoading2"
-            element-loading-text="给我一点时间"
-            :data="list2"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            @selection-change="change_table_selection"
-            :max-height="myHeight"
-          >
-          <el-table-column type="selection" :selectable="checkboxInit" align="center" width="50" disabled />
-            <el-table-column label="序号1" 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 label="申购状态" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.purchase_type == 1">暂估</span>
-                <span v-else-if="scope.row.purchase_type == 3">赠品</span>
-                <span v-else>正常</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="srm错误"   prop="srmError" min-width="110px" align="center" />
-            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see2(row)">查看</el-button>
-                <el-button v-if="(row.statu === 2 || row.statu === 4) && isPurchaseClose" style="display:none" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
-                <el-button v-else-if="isPurchaseClose" style="display:inline-block" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="total2>0" :total="total2" :page.sync="getdataListParm2.offset" :limit.sync="getdataListParm2.pagecount" @pagination="get_table_data2" />
-          <el-dialog :title="textMap[dialogStatusSee2]" :visible.sync="dialogFormVisibleSee2" :close-on-click-modal="false">
-            <div class="app-contentSee">
-              <el-form
-                ref="temp2"
-                :rules="rules"
-                :model="temp2"
-                label-position="right"
-                label-width="80px"
-                style="width: 800px;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="8">
-                    <el-form-item label="采购单号:" prop="buyeCode">
-                      <span>{{ temp2.buyeCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="6">
-                    <el-form-item label="供应商:" prop="providerName">
-                      <span>{{ temp2.providerName }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="5">
-                    <el-form-item label="采购员:" prop="empname">
-                      <span>{{ temp2.empname }}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="5">
-                    <el-form-item label="提交日期:" prop="buyerDate">
-                      <span>{{ temp2.buyerDate }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <el-table
-                :key="tableKeySee2"
-                v-loading="listLoadingSee2"
-                element-loading-text="给我一点时间"
-                :data="listSee2"
-                border
-                fit
-                highlight-current-row
-                style="width: 100%;margin-bottom:100px"
-                :row-style="rowStyle"
-                :cell-style="cellStyle"
-                class="elTable table-fixed"
-                @sort-change="tableSort2"
-              >
-                <el-table-column label="序号" align="center" type="index" width="50px" />
-                <el-table-column label="备件编号" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partCode }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件名称" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.partName }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件规格" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.specification }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件图片" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <el-popover placement="right" title="" trigger="hover">
-                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
-                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-                    </el-popover>
-                  </template>
-                </el-table-column>
-                <el-table-column label="备件品牌" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.brand }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column label="计量单位" min-width="130px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.unit }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="price" label="单价(元)" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.price }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="amount" label="采购数量" min-width="130px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.amount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="sumPrice" label="总价(元)" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.sumPrice }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.receiveAmount }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="SGremark" label="备注" min-width="110px" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.SGremark }}</span>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <div class="sum" style="right:30px;position:absolute;bottom:90px">
-                <b>总计:{{ temp2.sumPrices }}元</b>
-              </div>
-              <div class="stuts" style="left:30px;position:absolute;bottom:70px">
-                <b>单据状态:{{ temp2.statu }}</b>
-                <b v-if="isStatu">关闭原因:{{ temp2.note }}</b>
-                <div v-if="isExtensionDays">延期天数:{{ temp2.extensionDays }}</div>
-              </div>
-              <div
-                slot="footer"
-                class="dialog-footer"
-                style="right:30px;position:absolute;bottom:10px"
-              >
-                <el-button @click="dialogFormVisibleSee2 = false;get_table_data2()">关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-          <el-dialog :title="textMap[dialogStatusClose]" :visible.sync="dialogFormVisibleClose" :close-on-click-modal="false" style="width:70%;margin: 0 auto">
-            <div class="app-contentClose">
-              <el-form
-                ref="temp2"
-                :rules="rules"
-                :model="temp2"
-                label-position="right"
-                label-width="80px"
-                style="width: 300px;margin-bottom:30px"
-              >
-                <el-row>
-                  <el-col :span="24">
-                    <el-form-item label="采购单号:" prop="orderNo">
-                      <span>{{ temp2.buyeCode }}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-                <el-row>
-                  <el-col :span="24">
-                    <el-form-item label="" prop="note">
-                      <el-input ref="note" v-model="temp2.note" type="textarea" placeholder="请输入关闭该采购单原因" />
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-              <div
-                slot="footer"
-                class="dialog-footer"
-                style="right:30px;position:absolute;bottom:10px"
-              >
-                <el-button @click="dialogFormVisibleClose = false;get_table_data2();">取消</el-button>
-                <el-button type="primary" :disabled="isokDisable" @click="closeData()">确认关闭</el-button>
-              </div>
-            </div>
-          </el-dialog>
-        </div>
-      </el-tab-pane>
-      <el-tab-pane label="采购明细" name="third">
-        <div class="procurementDetails">
-          <div class="filter-container">
-            <el-select v-model="getdataListParm3.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
-              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-            </el-select>
-            <el-input v-model="getdataListParm3.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
-            <el-input v-model="getdataListParm3.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
-            <el-autocomplete v-model="getdataListParm3.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
-            <el-input v-model="getdataListParm3.parammaps.matchCode" placeholder="配单号" style="width: 140px;" class="filter-item" />
-            <el-input v-model="getdataListParm3.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />
-            <el-select v-model="getdataListParm3.parammaps.isStorage" clearable placeholder="到货情况" class="filter-item" style="width: 120px;">
-              <el-option v-for="item in isStorages" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <el-date-picker ref="inputDatetime3" v-model="getdataListParm3.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search3">搜索</el-button>
-            <el-button v-if="isPurchaseExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload3">导出</el-button>
-          </div>
-          <el-table
-            :key="tableKey3"
-            v-loading="listLoading3"
-            element-loading-text="给我一点时间"
-            :data="list3"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            @sort-change="tableSort"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="牧场" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.pastureName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.matchCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.buyeCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件编号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件名称" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.partName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件规格" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备件品牌" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.brand }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="计量单位" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="供应商" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.providerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="price" label="单价" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sumAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="amount" label="采购数量" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.amount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.receiveAmount }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="申购部门" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.departmentName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购人" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.empname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="配单日期" sortable prop="buyerDate" min-width="110px" align="center" />
-            <!-- <el-table-column label="备注" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.note }}</span>
-              </template>
-            </el-table-column> -->
-          </el-table>
-          <pagination v-show="total3>=0" :total="total3" :page.sync="getdataListParm3.offset" :limit.sync="getdataListParm3.pagecount" @pagination="get_table_data3" />
-        </div>
-      </el-tab-pane>
-       <el-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"
-            :max-height="myHeight"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="采购单号" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.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',
-  components: { Pagination },
-  directives: { waves },
-  filters: {
-    keepTwoNum(value) {
-      value = Number(value)
-      return value.toFixed(3)
-    },
-    keepTwoNum2(value) {
-      value = Number(value)
-      return value.toFixed(2)
-    }
-  },
-  data() {
-    return {
-      myHeight:document.documentElement.clientHeight - 85- 150,
-      isSap:1,
-      isSrm:1,
-      selectList: [],
-
-      isPurchaseSap: [],isPurchaseSrm: [],
-      isPurchaseSee: [], isPurchaseClose: [], isPurchaseExport: [], isDistributionSheet: [], isDistributionManagement: [], isExamineDM: [],
-      stripe: true,
-      activeName: 'first',
-      listLoading1: false,
-      tableKey1: 0,
-      list1: [],
-      confirmationSheetDisabled: false,
-      isokDisable: false,
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now() // 当天之前的时间可选
-        }
-      },
-      temp: {},
-      total: 0,
-      total1: 0,
-      listParmConfirmation: [],
-      listConfirmationSheet: null,
-      getParmPurchaseOrderNumber: {
-        name: 'autoCreatCode',
-        page: 1,
-        offset: 1,
-        returntype: 'Map',
-        parammaps: {
-          pastureId: Cookies.get('pastureid'),
-          codeType: 'CG'
-        }
-      },
-      postDataPramas: {},
-      requestProvider: {
-        name: 'getProviderList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {}
-      },
-      listLoading2: false,
-      tableKey2: 0,
-      list2: [],
-      status2: [
-        { id: '0', name: '审核中' },
-        { id: '1', name: '审核通过' },
-        { id: '2', name: '审核驳回' }
-      ],
-      status: [
-        { id: '0', name: '未到货' },
-        { id: '1', name: '部分到货' },
-        { id: '2', name: '按时到货' },
-        { id: '3', name: '已延期' },
-        { id: '4', name: '已关闭' },
-        { id: '5', name: '部分到货-延期' },
-        { id: '6', name: '全部到货-延期' }
-      ],
-      isStorages: [
-        { id: '0', name: '未入库' },
-        { id: '1', name: '已入库' }
-      ],
-      isStatu: false,
-      listLoadingSee2: false,
-      tableKeySee2: 0,
-      total2: 0,
-      total3: 0,
-      listLoading3: false,
-      tableKey3: 0,
-      list3: [],
-      subscriptionStatusList:[{id:0,name:'正常'},{id:1,name:'暂估'},{id:3,name:'赠品'}],//申购状态
-      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') }},
-        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
-
-      ],
-      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'),
-          purchase_type:''
-        }
-      },
-      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: {}
-      },
-      requestParamStute5: {
-        name: 'shutDownBigrefunddetail',
-        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: {}
-      },
-
-
-      // 退货
-      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: [],
-
-      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,
-
-      dialogFormVisibleClose5: 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()
-
-    this.get_table_data5()
-    if (this.$route.query.activeName !== undefined) {
-      this.activeName = this.$route.query.activeName
-    }
-  },
-
-  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
-      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()
-      } else if (tab.name === 'fifth') {
-        this.get_table_data5()
-      }
-    },
-    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
-        this.findAllProvider5 = response.data.findAllProvider.list
-        this.findAllProvider = response.data.findAllProvider.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
-    },
-
-    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)
-  },
-
-    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){
-        if(row.srmstatus !== 0){
-          return 1
-        }else{
-          return 0
-        }
-      } 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_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) {
-        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) {
-          this.isokDisable = true
-          setTimeout(() => {
-            this.isokDisable = false
-          }, 5000)
-          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 => {
-              this.isokDisable = false
-              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>
+            </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="srm错误"   prop="srmError" min-width="110px" align="center" />
+            <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="{row}">
+                <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see2(row)">查看</el-button>
+                <el-button v-if="(row.statu === 2 || row.statu === 4) && isPurchaseClose" style="display:none" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
+                <el-button v-else-if="isPurchaseClose" style="display:inline-block" type="danger" size="mini" @click="handleClose2(row)">关闭</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination v-show="total2>0" :total="total2" :page.sync="getdataListParm2.offset" :limit.sync="getdataListParm2.pagecount" @pagination="get_table_data2" />
+          <el-dialog :title="textMap[dialogStatusSee2]" :visible.sync="dialogFormVisibleSee2" :close-on-click-modal="false">
+            <div class="app-contentSee">
+              <el-form
+                ref="temp2"
+                :rules="rules"
+                :model="temp2"
+                label-position="right"
+                label-width="80px"
+                style="width: 800px;margin-bottom:30px"
+              >
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="采购单号:" prop="buyeCode">
+                      <span>{{ temp2.buyeCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6">
+                    <el-form-item label="供应商:" prop="providerName">
+                      <span>{{ temp2.providerName }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="5">
+                    <el-form-item label="采购员:" prop="empname">
+                      <span>{{ temp2.empname }}</span>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="5">
+                    <el-form-item label="提交日期:" prop="buyerDate">
+                      <span>{{ temp2.buyerDate }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <el-table
+                :key="tableKeySee2"
+                v-loading="listLoadingSee2"
+                element-loading-text="给我一点时间"
+                :data="listSee2"
+                border
+                fit
+                highlight-current-row
+                style="width: 100%;margin-bottom:100px"
+                :row-style="rowStyle"
+                :cell-style="cellStyle"
+                class="elTable table-fixed"
+                @sort-change="tableSort2"
+              >
+                <el-table-column label="序号" align="center" type="index" width="50px" />
+                <el-table-column label="备件编号" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partCode }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件名称" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.partName }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件规格" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.specification }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件图片" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <el-popover placement="right" title="" trigger="hover">
+                      <img v-if="scope.row.picpath !==''" :src="scope.row.picpath">
+                      <img v-if="scope.row.picpath !==''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                    </el-popover>
+                  </template>
+                </el-table-column>
+                <el-table-column label="备件品牌" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.brand }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="计量单位" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.unit }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="price" label="单价(元)" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.price }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.sumAmount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="amount" label="采购数量" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.amount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="sumPrice" label="总价(元)" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.sumPrice }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.receiveAmount }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="SGremark" label="备注" min-width="110px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.SGremark }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <div class="sum" style="right:30px;position:absolute;bottom:90px">
+                <b>总计:{{ temp2.sumPrices }}元</b>
+              </div>
+              <div class="stuts" style="left:30px;position:absolute;bottom:70px">
+                <b>单据状态:{{ temp2.statu }}</b>
+                <b v-if="isStatu">关闭原因:{{ temp2.note }}</b>
+                <div v-if="isExtensionDays">延期天数:{{ temp2.extensionDays }}</div>
+              </div>
+              <div
+                slot="footer"
+                class="dialog-footer"
+                style="right:30px;position:absolute;bottom:10px"
+              >
+                <el-button @click="dialogFormVisibleSee2 = false;get_table_data2()">关闭</el-button>
+              </div>
+            </div>
+          </el-dialog>
+          <el-dialog :title="textMap[dialogStatusClose]" :visible.sync="dialogFormVisibleClose" :close-on-click-modal="false" style="width:70%;margin: 0 auto">
+            <div class="app-contentClose">
+              <el-form
+                ref="temp2"
+                :rules="rules"
+                :model="temp2"
+                label-position="right"
+                label-width="80px"
+                style="width: 300px;margin-bottom:30px"
+              >
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="采购单号:" prop="orderNo">
+                      <span>{{ temp2.buyeCode }}</span>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="" prop="note">
+                      <el-input ref="note" v-model="temp2.note" type="textarea" placeholder="请输入关闭该采购单原因" />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+              <div
+                slot="footer"
+                class="dialog-footer"
+                style="right:30px;position:absolute;bottom:10px"
+              >
+                <el-button @click="dialogFormVisibleClose = false;get_table_data2();">取消</el-button>
+                <el-button type="primary" :disabled="isokDisable" @click="closeData()">确认关闭</el-button>
+              </div>
+            </div>
+          </el-dialog>
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="采购明细" name="third">
+        <div class="procurementDetails">
+          <div class="filter-container">
+            <el-select v-model="getdataListParm3.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
+            </el-select>
+            <el-input v-model="getdataListParm3.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
+            <el-input v-model="getdataListParm3.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
+            <el-autocomplete v-model="getdataListParm3.parammaps.providerName" value-key="providerName" class="inline-input" :fetch-suggestions="providerSearch" placeholder="供应商" style="width:150px;top:-3px;" @select="handleSelectProvider" />
+            <el-input v-model="getdataListParm3.parammaps.matchCode" placeholder="配单号" style="width: 140px;" class="filter-item" />
+            <el-input v-model="getdataListParm3.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />
+            <el-select v-model="getdataListParm3.parammaps.isStorage" clearable placeholder="到货情况" class="filter-item" style="width: 120px;">
+              <el-option v-for="item in isStorages" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+            <el-date-picker ref="inputDatetime3" v-model="getdataListParm3.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 270px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
+            <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search3">搜索</el-button>
+            <el-button v-if="isPurchaseExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload3">导出</el-button>
+          </div>
+          <el-table
+            :key="tableKey3"
+            v-loading="listLoading3"
+            element-loading-text="给我一点时间"
+            :data="list3"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            @sort-change="tableSort"
+            :max-height="myHeight"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="牧场" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.pastureName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="配单号" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.matchCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购单号" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.buyeCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件编号" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.partCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件名称" min-width="130px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.partName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件规格" min-width="130px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.specification }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件品牌" min-width="130px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.brand }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="计量单位" min-width="130px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.unit }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="供应商" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.providerName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column sortable prop="price" label="单价" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.price }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column sortable prop="sumAmount" label="申购数量" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.sumAmount }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column sortable prop="amount" label="采购数量" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.amount }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column sortable prop="receiveAmount" label="入库数" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.receiveAmount }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="申购部门" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.departmentName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购人" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.empname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="配单日期" sortable prop="buyerDate" min-width="110px" align="center" />
+            <!-- <el-table-column label="备注" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.note }}</span>
+              </template>
+            </el-table-column> -->
+          </el-table>
+          <pagination v-show="total3>=0" :total="total3" :page.sync="getdataListParm3.offset" :limit.sync="getdataListParm3.pagecount" @pagination="get_table_data3" />
+        </div>
+      </el-tab-pane>
+       <el-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"
+            :max-height="myHeight"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + (pageNum3-1) * pageSize3 + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="采购单号" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.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',
+  components: { Pagination },
+  directives: { waves },
+  filters: {
+    keepTwoNum(value) {
+      value = Number(value)
+      return value.toFixed(3)
+    },
+    keepTwoNum2(value) {
+      value = Number(value)
+      return value.toFixed(2)
+    }
+  },
+  data() {
+    return {
+      myHeight:document.documentElement.clientHeight - 85- 150,
+      isSap:1,
+      isSrm:1,
+      selectList: [],
+
+      isPurchaseSap: [],isPurchaseSrm: [],
+      isPurchaseSee: [], isPurchaseClose: [], isPurchaseExport: [], isDistributionSheet: [], isDistributionManagement: [], isExamineDM: [],
+      stripe: true,
+      activeName: 'first',
+      listLoading1: false,
+      tableKey1: 0,
+      list1: [],
+      confirmationSheetDisabled: false,
+      isokDisable: false,
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now() // 当天之前的时间可选
+        }
+      },
+      temp: {},
+      total: 0,
+      total1: 0,
+      listParmConfirmation: [],
+      listConfirmationSheet: null,
+      getParmPurchaseOrderNumber: {
+        name: 'autoCreatCode',
+        page: 1,
+        offset: 1,
+        returntype: 'Map',
+        parammaps: {
+          pastureId: Cookies.get('pastureid'),
+          codeType: 'CG'
+        }
+      },
+      postDataPramas: {},
+      requestProvider: {
+        name: 'getProviderList',
+        page: 1,
+        offset: 1,
+        pagecount: 10,
+        returntype: 'Map',
+        parammaps: {}
+      },
+      listLoading2: false,
+      tableKey2: 0,
+      list2: [],
+      status2: [
+        { id: '0', name: '审核中' },
+        { id: '1', name: '审核通过' },
+        { id: '2', name: '审核驳回' }
+      ],
+      status: [
+        { id: '0', name: '未到货' },
+        { id: '1', name: '部分到货' },
+        { id: '2', name: '按时到货' },
+        { id: '3', name: '已延期' },
+        { id: '4', name: '已关闭' },
+        { id: '5', name: '部分到货-延期' },
+        { id: '6', name: '全部到货-延期' }
+      ],
+      isStorages: [
+        { id: '0', name: '未入库' },
+        { id: '1', name: '已入库' }
+      ],
+      isStatu: false,
+      listLoadingSee2: false,
+      tableKeySee2: 0,
+      total2: 0,
+      total3: 0,
+      listLoading3: false,
+      tableKey3: 0,
+      list3: [],
+      subscriptionStatusList:[
+        {id:0,name:'新增申购'},
+        {id:1,name:'暂估申购'},
+        {id:3,name:'赠品申购'},
+        {id:4,name:'奶厅申购'}],//申购状态
+      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') }},
+        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
+
+      ],
+      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'),
+          purchase_type:''
+        }
+      },
+      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: {}
+      },
+      requestParamStute5: {
+        name: 'shutDownBigrefunddetail',
+        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: {}
+      },
+
+
+      // 退货
+      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: [],
+
+      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,
+
+      dialogFormVisibleClose5: 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()
+
+    this.get_table_data5()
+    if (this.$route.query.activeName !== undefined) {
+      this.activeName = this.$route.query.activeName
+    }
+  },
+
+  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
+      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()
+      } else if (tab.name === 'fifth') {
+        this.get_table_data5()
+      }
+    },
+    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
+        this.findAllProvider5 = response.data.findAllProvider.list
+        this.findAllProvider = response.data.findAllProvider.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
+    },
+
+    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)
+  },
+
+    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){
+        if(row.srmstatus !== 0){
+          return 1
+        }else{
+          return 0
+        }
+      } 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_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) {
+        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) {
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 5000)
+          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 => {
+              this.isokDisable = false
+              console.log('审核保存发送参数', this.postDataPramas)
+              if (response.msg === 'fail') {
+                this.$notify({
+                  title: '审核失败',
+                  message: response.data,
+                  type: 'warning',
+                  duration: 2000
+                })
+              } else {
+                this.dialogFormVisible_Examine = false
+                this.get_table_data4()
+                this.$notify({
+                  title: '',
+                  message: '审核成功',
+                  type: 'success',
+                  duration: 2000
+                })
+              }
+            })
+          } else if (this.examineTemp.SHstatue == 2) {
+            console.log('不通过')
+            this.postDataPramas.common = { 'returnmap': '0' }
+            this.postDataPramas.data = []
+            this.postDataPramas.data[0] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
+              'id': this.examineTemp.id,
+              'statue': this.examineTemp.SHstatue,
+              'empId': Cookies.get('employeid'),
+              'workflowNote': this.examineTemp.workflowNote
+            }}
+
+            // this.postDataPramas.data[1] = { 'name': 'updatepartpurchase', 'type': 'e', 'parammaps': {
+            //   'matchCode': this.examineTemp.matchCode
+            // }}
+            ExecDataByConfig(this.postDataPramas).then(response => {
+              console.log('审核保存发送参数', this.postDataPramas)
+              if (response.msg === 'fail') {
+                this.$notify({
+                  title: '审核失败',
+                  message: response.data,
+                  type: 'warning',
+                  duration: 2000
+                })
+              } else {
+                this.dialogFormVisible_Examine = false
+                this.get_table_data4()
+                this.$notify({
+                  title: '',
+                  message: '审核成功',
+                  type: 'success',
+                  duration: 2000
+                })
+              }
+            })
+          }
+        }
+      })
+    },
+    form_edit(row) {
+      this.dialogStatusUpdate4 = 'update'
+      this.dialogFormVisibleUpdate4 = true
+      this.getdataListSee4.parammaps.matchCode = row.matchCode
+      this.updateTemp4 = Object.assign(row, {})
+      this.getSeeList4()
+    },
+    edit_dialog_save() {
+      this.$refs['updateTemp4'].validate(valid => {
+        if (valid) {
+          // for (let i = 0; i < this.listUpdate4.length; i++) {
+          //   var rulesAmount = /^\d+$/
+          //   if ((this.listUpdate4[i].amount == '' || this.listUpdate4[i].amount == undefined) && parseFloat(this.listUpdate4[i].amount) !== 0) {
+          //     this.$message({
+          //       type: 'error',
+          //       message: '采购数量不可为空',
+          //       duration: 2000
+          //     })
+          //     return false
+          //   } else if (!rulesAmount.test(parseFloat(this.listUpdate4[i].amount))) {
+          //     this.$message({
+          //       type: 'error',
+          //       message: '采购数量不可为空',
+          //       duration: 2000
+          //     })
+          //     return false
+          //   }
+          // }
+          for (let i = 0; i < this.listUpdate4.length; i++) {
+            console.log(this.listUpdate4[i].amount)
+            var rulesAmount = /^\d+$/
+            if ((this.listUpdate4[i].amount == '' || this.listUpdate4[i].amount == undefined) && parseFloat(this.listUpdate4[i].amount) !== 0) {
+              this.$message({
+                type: 'error',
+                message: '采购数量不可为空',
+                duration: 2000
+              })
+              return false
+            } else if (!rulesAmount.test(parseFloat(this.listUpdate4[i].amount))) {
+              this.$message({
+                type: 'error',
+                message: '采购数量请输入大于等于0的整数',
+                duration: 2000
+              })
+              return false
+            } else {
+              this.postDataPramas.common = { 'returnmap': '0' }
+              this.postDataPramas.data = []
+              this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listUpdate4 }}
+              this.postDataPramas.data[0].children = []
+              this.postDataPramas.data[0].children[0] = { 'name': 'updatePDbuydetail', 'type': 'e', 'parammaps': {
+                amount: '@insertSpotList.amount',
+                id: '@insertSpotList.id'
+              }}
+              this.postDataPramas.data[1] = { 'name': 'partdealCharge', 'type': 'e', 'parammaps': {
+                id: this.updateTemp4.id,
+                statue: '0',
+                empId: Cookies.get('employeid')
+              }}
+            }
+          }
+          ExecDataByConfig(this.postDataPramas).then(response => {
+            console.log('新增保存发送参数', this.postDataPramas)
+            if (response.msg === 'fail') {
+              this.$notify({
+                title: '保存失败',
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
+            } else {
+              this.dialogFormVisibleUpdate4 = false
+              this.getdataListParm4.parammaps.inputDatetime = ''
+              this.get_table_data4()
+              this.$notify({
+                title: '',
+                message: '保存成功',
+                type: 'success',
+                duration: 2000
+              })
+            }
+          })
+          return true
+        }
+      })
+    }
+
+  }
+}
+</script>
+<style lang="scss" >
+.el-table .warning-row {
+    background: red;
+  }
+  .el-table .color-row {
+    background: #eee;
+  }
+</style>
+<style lang="scss" scoped>
+.app-contentClose .el-form-item__content {
+  margin-left: 0 !important;
+}
+</style>
+<style lang="scss" scoped>
+.app-contentConfirmationSheet {
+  margin-bottom: 50px;
+}
+.app-content {
+  background: #eee;
+  margin-bottom: 50px;
+  .title {
+    line-height: 40px;
+    div {
+      float: left;
+      margin-right: 50px;
+      b {
+        padding-left: 10px;
+      }
+    }
+  }
+  .total {
+    margin-left: 80%;
+    line-height: 30px;
+  }
+}
+</style>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 2457
src/views/custom/storage/index.vue


Файловите разлики са ограничени, защото са твърде много
+ 499 - 152
src/views/custom/subscribe/index.vue


Някои файлове не бяха показани, защото твърде много файлове са промени