Kaynağa Gözat

过程分析翻译

Shan9312 1 yıl önce
ebeveyn
işleme
7b936f56c1

+ 2 - 2
.env.development

@@ -5,9 +5,9 @@ ENV = 'development'
 # base api
 # 测试线
 # VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
-VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
+# VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 # 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.56:8081/'
+VUE_APP_BASE_API = 'http://192.168.1.56:8081/'
 # VUE_APP_BASE_API = 'http://192.168.1.93/'
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

+ 16 - 14
src/lang/en/langModule/processAnalysis.js

@@ -32,26 +32,28 @@ export default {
   lastactualweight:"Starting Weight",
   actualweight:"Ending Weight",
 
-  watchPlan:"Monitoring Chart"
-
-
-
-
-
-
-
-
-
-
-
-
-
+  watchPlan:"Monitoring Chart",
 
+  planTypeList: [{ lable: 'Pre-mixed Plan', value: '4' }, { lable: 'Feed Distribution Plan', value: '0' }, { lable: 'Leftover Material Plan', value: '3' }, { lable: 'Feed Distribution Plan-mixing', value: '1' }, { lable: 'Feed Distribution Plan-Spreading Feed', value: '2' }, { lable: 'Pre-weighing Plan', value: '5' }],
 
+  workingConditionList: [{ id: '0', name: 'In Progress' }, { id: '1', name: 'Completed' }],
 
+  errorList:[{ value: '有误差', label: 'There are errors' }, { value: '无误差', label: 'There are no errors' }],
+    粗料:'Forage',
+    精料:'Concentrate',
+    其他:'Other',
+    饲料:'Feed',
+    剩料:'Leftover Feed',
 
 
+    designName:'Designed Weight',
+    actureName:'Actual Weight',
+    startWright:'Starting Weight',
+    endWright:"Ending Weight",
 
+    pastureName:'Ranch',
+    total:'Total of',
+    tiao:'Items'
 
 
 

+ 21 - 1
src/lang/zn/langModule/processAnalysis.js

@@ -32,7 +32,27 @@ buttontype:"跳转方式",
 lastactualweight:"开始重量",
 actualweight:"结束重量",
 
-watchPlan:"监控图"
+watchPlan:"监控图",
 
+planTypeList: [{ lable: '预混计划', value: '4' }, { lable: '撒料计划', value: '0' }, { lable: '剩料计划', value: '3' }, { lable: '撒料计划-混料', value: '1' }, { lable: '撒料计划-撒料', value: '2' }, { lable: '预称重计划', value: '5' }],
+
+workingConditionList: [{ id: '0', name: '进行中' }, { id: '1', name: '已完成' }],
+
+errorList:[{ value: '有误差', label: '有误差' }, { value: '无误差', label: '无误差' }],
+
+  粗料:'粗料',
+  精料:'精料',
+  其他:'其他',
+  饲料:'饲料',
+  剩料:'剩料',
+
+  designName:'设计重量',
+  actureName:'实际重量',
+  startWright:'开始重量',
+  endWright:"结束重量",
+
+  pastureName:'牧场',
+  total:'共',
+  tiao:'条'
 
 }

+ 2055 - 2054
src/views/basicData/feedTable/index.vue

@@ -1,2054 +1,2055 @@
-<template>
-  <div class="app-container">
-    <div class="search" ref="search">
-      <el-input v-model="table.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
-      <el-select v-model="table.getdataListParm.parammaps.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 150px;" clearable>
-        <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
-      </el-select>
-      <el-select v-model="table.getdataListParm.parammaps.source" filterable placeholder="饲料来源" class="filter-item" style="width: 120px;" clearable>
-        <el-option v-for="item in feedSourcesList" :key="item.id" :label="item.name" :value="item.id" />
-      </el-select>
-      <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
-        <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
-      </el-select>
-      <div ref="selectInput" class="filter-item selectInput">
-        <el-input type="text" name="" value="" placeholder="请点击选择搜索条件" class="Input" />
-        <i v-if="arrowDown" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
-        <i v-if="arrowUp" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
-        <ul v-if="arrowUp" class="selectUl">
-          <li><a>允许误差数</a><el-input v-model="table.getdataListParm.parammaps.allowratio"type="text" style="width: 245px;" /></li>
-          <li><a>跳转重量域</a><el-input v-model="table.getdataListParm.parammaps.autozone" type="text" style="width: 245px;" /></li>
-          <li>
-            <a>跳转延时</a>
-            <el-select v-model="table.getdataListParm.parammaps.autosecond" filterable placeholder="跳转延时" class="filter-item" style="width: 245px;" clearable>
-              <el-option v-for="item in jumpDelayList" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-          </li>
-          <li>
-            <div style="float: right;">
-              <el-button class="downminCancel" @click="arrowUp=false;arrowDown=true;">取消</el-button>
-              <el-button class="miniPrimary" @click="form_search">搜索</el-button>
-            </div>
-          </li>
-        </ul>
-      </div>
-      <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
-      <el-button class="successBorder" @click="handleRefresh">{{$t('common.reset')}}</el-button>
-    </div>
-    <div class="operation" ref="operation">
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleSet">设置</el-button>
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button>
-      <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="form_delete">删除</el-button>
-      <el-button class="success" icon="el-icon-receiving" @click="handleFeedBank">饲料库</el-button>
-      <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" class="success" @click="handleChangeOrder">更改顺序</el-button>
-       <div v-else style="display: inline-block;">
-        <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
-        <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
-      </div>
-      <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">获取UD饲料</el-button>
-      <el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
-        <el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
-      </el-upload>
-      <el-dropdown style="float: right;margin-right: 10px;">
-        <el-button class="export" icon="el-icon-upload2">导出</el-button>
-        <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item @click.native="handleExport(1)">导出模板</el-dropdown-item>
-          <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
-        </el-dropdown-menu>
-      </el-dropdown>
-    </div>
-
-    <div class="table">
-      <u-table
-        id="table"
-        ref="table"
-        :key="table.tableKey"
-        v-loading="table.listLoading"
-        element-loading-text="给我一点时间"
-        border
-        fit
-        highlight-current-row
-        style="width: 100%;"
-        :row-style="rowStyle"
-        :cell-style="cellStyle"
-        class="elTable table-fixed"
-        row-key="id"
-        @selection-change="handleSelectionChange"
-        :max-height="myHeight"
-        use-virtual
-        @table-body-scroll="tableScroll"
-        :row-height="rowHeight"
-      >
-        <u-table-column type="selection" align="center" width="50" fixed="left" />
-        <u-table-column label="序号" type="index" align="center" width="50" fixed="left"/>
-        <u-table-column label="饲料名称" min-width="80px" align="center" prop="fname" fixed="left"/>
-        <u-table-column label="饲料分类" min-width="80px" align="center" prop="fclass" fixed="left"/>
-        <u-table-column label="物料类型" min-width="90px" align="center" prop="sapMaterialtypeName" />
-        <!-- <u-table-column label="SAP货位" min-width="90px" align="center" prop="goods" /> -->
-        <u-table-column label="唯一编码" min-width="80px" align="center" prop="feedcode" />
-        <u-table-column label="UD名称" min-width="80px" align="center" prop="udname" />
-        <!-- <u-table-column label="SAP编码" min-width="90px" align="center" prop="sapCode" /> -->
-        <u-table-column label="饲料来源" min-width="80px" align="center" prop="source" />
-        <u-table-column label="计划类型" min-width="80px" align="center" prop="printgroup" />
-        <u-table-column v-if="isInforvalue" label="小料秤" min-width="90px" align="center" prop="smtmrname" />
-        <u-table-column label="允许误差数(kg)" min-width="80px" align="center" prop="allowratio" />
-        <u-table-column label="包装单位重量(kg)" min-width="80px" align="center" prop="unitweight" />
-        <u-table-column label="单价" min-width="80px" align="center" prop="uprice" />
-        <u-table-column label="跳转重量域(kg)" min-width="80px" align="center" prop="autozone" />
-        <u-table-column label="跳转延时" min-width="80px" align="center" prop="autosecondname" />
-        <u-table-column label="确认开始" min-width="80px" align="center" prop="confirmstartname" />
-        <u-table-column label="继电器位置" min-width="80px" align="center" prop="trgaddress" />
-        <u-table-column label="无上域" min-width="60px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.jmp == 0">否</span>
-            <span v-else>是</span>
-          </template>
-        </u-table-column>
-        <u-table-column label="备用字段01" min-width="90px" align="center" prop="backup1" />
-        <u-table-column label="备用字段02" min-width="90px" align="center" prop="backup2" />
-        <u-table-column label="备用字段03" min-width="90px" align="center" prop="backup3" />
-        <u-table-column label="是否启用" min-width="80px" align="center">
-          <template slot-scope="scope">
-            <el-switch v-model="scope.row.enable" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
-          </template>
-        </u-table-column>
-        <u-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
-          <template slot-scope="{row}">
-            <a class="correcting" @click="handleNutritive (row)">营养价值</a>
-            <span class="centerSpan">|</span>
-            <a v-if="isRoleEdit" class="correcting" @click="handleRelation(row)">关联</a>
-            <span v-if="isRoleEdit" class="centerSpan">|</span>
-            <el-button v-if="isRoleEdit" icon="el-icon-edit-outline" class="miniSuccess" @click="handleUpdate(row)" />
-            <span v-if="isRoleEdit" class="centerSpan">|</span>
-            <el-button v-if="isRoleEdit" icon="el-icon-delete" class="miniDanger" @click="handleRowDelete(row)" />
-          </template>
-        </u-table-column>
-      </u-table>
-
-      <!-- <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" /> -->
-
-         <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
-    </div>
-
-    <!-- 新增/编辑 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="create.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            {{ textMap[create.dialogStatus] }}
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
-          <el-row>
-            <el-col :span="24">
-              <h3 style="width: 160px;text-align: right;">基础信息</h3>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="饲料名称:" prop="fname">
-                <el-input ref="fname" v-model="create.temp.fname" class="filter-item" placeholder="请输入饲料名称" type="textarea" :autosize="{ minRows:1}" maxlength="32" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="饲料类别:" prop="fclassid">
-                <el-select v-model="create.temp.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 100%;" @change="changeFeedList">
-                  <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
-                </el-select>
-              </el-form-item>
-              </el-col>
-            <el-col :span="6">
-              <el-form-item label="唯一编码:" prop="feedcode">
-                <el-input ref="feedcode" v-model="create.temp.feedcode" class="filter-item" placeholder="请输入唯一编码" type="text" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="饲料来源:" prop="source">
-                <el-input ref="source" v-model="create.temp.source" class="filter-item" disabled placeholder="用户自定义" type="text" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="计划类型:" prop="printgroupid">
-                <el-select v-model="create.temp.printgroupid" filterable placeholder="计划类型" class="filter-item" style="width: 100%;" @change="changePlanList">
-                  <el-option v-for="item in planTypeList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="包装单位重量(kg):" prop="unitweight">
-                <el-input ref="unitweight" v-model="create.temp.unitweight" class="filter-item" placeholder="正整数" type="number" style="width: 100%;" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="单价:" prop="uprice">
-                <el-input ref="uprice" v-model="create.temp.uprice"  class="filter-item" placeholder="最多俩位小数" type="number" step="0.01" style="width: 100%;" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="物料类型:" prop="sapMaterialtype">
-                <el-select v-model="create.temp.sapMaterialtype" filterable placeholder="物料类型" class="filter-item" style="width: 100%;">
-                  <el-option v-for="item in materialtypeList" :key="item.id" :label="item.distName" :value="item.distCode" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="SAP货位:" prop="sapGoods">
-                <el-select v-model="create.temp.sapGoods" filterable placeholder="SAP货位" class="filter-item" style="width: 100%;">
-                  <el-option v-for="item in sapGoodsList" :key="item.id" :label="item.distName" :value="item.distCode" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="SAP编码:" prop="sapCode">
-                <el-input ref="sapCode" v-model="create.temp.sapCode" class="filter-item" disabled placeholder="SAP编码" type="text" />
-                <!-- <el-select v-model="create.temp.sapcode" filterable placeholder="SAP编码" class="filter-item" style="width: 100%;">
-                  <el-option v-for="item in sapCodeList" :key="item.id" :label="item.mixname" :value="item.id" />
-                </el-select> -->
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24">
-              <h3 style="width: 160px;text-align: right;">搅拌参数</h3>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="允许误差数(kg):" prop="allowratio">
-                <el-input ref="allowratio" v-model="create.temp.allowratio" class="filter-item" placeholder="正整数" type="text" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="跳转重量域(kg):" prop="autozone">
-                <el-input ref="autozone" v-model="create.temp.autozone" :disabled="create.temp.autosecond=='0'" class="filter-item" placeholder="0-50之间的整数" type="text" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="跳转延时:" prop="autosecond">
-                <el-select v-model="create.temp.autosecond" filterable placeholder="跳转延时" class="filter-item" style="width: 100%;" @change="changeAutosecond">
-                  <el-option v-for="item in jumpDelayList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="确认开始:" prop="confirmstart">
-                <el-select v-model="create.temp.confirmstart" filterabler placeholde="确认开始" class="filter-item" style="width: 100%;" @change="changeConfirmstart">
-                  <el-option v-for="item in confirmStartList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="是否启用:" prop="enable">
-                <el-select v-model="create.temp.enable" filterable placeholder="是否启用" class="filter-item" style="width: 100%;">
-                  <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="继电器位置:" prop="trgaddress">
-                <el-input ref="trgaddress" v-model="create.temp.trgaddress" class="filter-item" placeholder="继电器位置" type="number" />
-              </el-form-item>
-            </el-col>
-            <el-col v-if="isInforvalue" :span="6">
-              <el-form-item label="小料秤:" prop="smtmrid">
-                <el-select v-model="create.temp.smtmrid" filterable placeholder="小料秤" clearable class="filter-item" style="width: 100%;" @change="changeSmallMaterial">
-                  <el-option v-for="item in smallMaterialList" :key="item.id" :label="item.tname" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="无上域:" prop="jmp">
-                <el-select v-model="create.temp.jmp" placeholder="无上域" class="filter-item" style="width: 100%;" @change="changeSmallMaterial">
-                  <el-option v-for="item in jmpList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row>
-            <h3 style="width: 160px;text-align: right;">备用字段</h3>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="备用字段01:" prop="backup1">
-                <el-input ref="backup1" v-model="create.temp.backup1" class="filter-item" placeholder="备用字段01" type="text" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="备用字段02:" prop="backup2">
-                <el-input ref="backup2" v-model="create.temp.backup2" class="filter-item" placeholder="备用字段02" type="text" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="备用字段03:" prop="backup3">
-                <el-input ref="backup3" v-model="create.temp.backup3" class="filter-item" placeholder="备用字段03" type="text" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
-          <el-button v-if="create.dialogStatus==='create' || create.dialogStatus==='update'" class="save" :disabled="isokDisable" @click="create.dialogStatus==='create'?createData():updateData()">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- 饲料库 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="feedBank.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            {{ textMap[feedBank.dialogStatus] }}
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <div class="search">
-          <el-input v-model="feedBank.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
-          <el-select v-model="feedBank.getdataListParm.parammaps.statue" filterabler placeholder="关联状态" class="filter-item" style="width: 120px;" clearable>
-            <el-option v-for="item in associationStatusList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
-          <el-button class="successBorder" @click="handleFeedBankSearch">{{$t('common.query')}}</el-button>
-          <el-button class="successBorder" @click="handleFeedBankRefresh">{{$t('common.reset')}}</el-button>
-        </div>
-        <div class="table">
-          <el-table
-            :key="feedBank.tableKey"
-            v-loading="feedBank.listLoading"
-            element-loading-text="给我一点时间"
-            :data="feedBank.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;margin: 0 auto 50px;"
-            :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="50" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sources }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="中国饲料号" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.feedcode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="饲料名称" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.fname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="价格" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="样品说明" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.remark }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="干物质(DM%)" min-width="65px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.dry }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="淀粉(%DM)" min-width="59px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.starch }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="粗蛋白(CP%DM)" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.cp }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="钙(Ca%DM)" min-width="85px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ca }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="磷(P%DM)" min-width="85px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.p }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="产奶净能(%DM)" min-width="75px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.n }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="脂肪(%DM)" min-width="59px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.fat }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="ADF(%DM)" min-width="60px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.adf }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="NDF(%DM)" min-width="60px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ndf }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="NDIP%" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ndip }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="粗灰分(Ash%)" min-width="65px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ash }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="粗料" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.iscu }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="关联状态" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.statue==0">否</span>
-                <span v-if="scope.row.statue==1">是</span>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose cancelClose1" @click="feedBank.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- 关联 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="relation.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            {{ textMap[relation.dialogStatus] }}
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <div class="search">
-          <el-input v-model="relation.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
-          <el-button class="successBorder" @click="handleRelationSearch">{{$t('common.query')}}</el-button>
-        </div>
-        <div class="table">
-          <el-table
-            :key="relation.tableKey"
-            v-loading="relation.listLoading"
-            element-loading-text="给我一点时间"
-            :data="relation.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;margin: 0 auto 50px;"
-            :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="50" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sources }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="中国饲料号" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.feedcode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="饲料名称" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.fname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="价格" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="样品说明" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.remark }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="干物质(DM%)" min-width="65px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.dry }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="淀粉(%DM)" min-width="59px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.starch }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="粗蛋白(CP%DM)" min-width="75px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.cp }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="钙(Ca%DM)" min-width="83px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ca }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="磷(P%DM)" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.p }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="产奶净能(%DM)" min-width="75px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.n }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="脂肪(%DM)" min-width="59px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.fat }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="ADF(%DM)" min-width="60px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.adf }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="NDF(%DM)" min-width="60px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ndf }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="NDIP%" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ndip }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="粗灰分(Ash%)" min-width="65px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.ash }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="粗料" min-width="50px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.iscu }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" min-width="50px" align="center" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <a v-if="row.statueRelation == '1'" class="correcting" :disabled="isokDisable" @click="disassociateData(row)">取消关联</a>
-                <a v-if="row.statueRelation == '0'" class="correcting" :disabled="isokDisable" @click="relationData(row)">关联</a>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose cancelClose1" @click="relation.dialogFormVisible = false;getList() ">{{$t('common.closed')}}</el-button>
-        </div>
-      </div>
-    </el-dialog>
-    <!-- 营养价值 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="nutritive.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            {{ textMap[nutritive.dialogStatus] }}
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <el-form ref="temp" :rules="nutritive.rules" :model="nutritive.temp" label-position="right" label-width="160px" style="width: 100%;margin:0 auto 50px">
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="干物质(DM%):" prop="dry">
-                <el-input ref="dry" v-model="nutritive.temp.dry"  :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入干物质" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="淀粉(%DM):" prop="starch">
-                <el-input ref="starch" v-model="nutritive.temp.starch" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入淀粉" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="粗蛋白(CP%DM):" prop="cp">
-                <el-input ref="cp" v-model="nutritive.temp.cp" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入粗蛋白" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="钙(Ca%DM):" prop="ca">
-                <el-input ref="ca" v-model="nutritive.temp.ca" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入钙" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="磷(P%DM):" prop="p">
-                <el-input ref="p" v-model="nutritive.temp.p" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入磷" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="产奶净能(%DM):" prop="n">
-                <el-input ref="n" v-model="nutritive.temp.n" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入产奶净能" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="脂肪(%DM):" prop="fat">
-                <el-input ref="fat" v-model="nutritive.temp.fat" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入脂肪" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="ADF(%DM):" prop="adf">
-                <el-input ref="adf" v-model="nutritive.temp.adf" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入ADF" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="6">
-              <el-form-item label="NDF(%DM):" prop="ndf">
-                <el-input ref="ndf" v-model="nutritive.temp.ndf" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入NDF" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="NDIP(%):" prop="ndip">
-                <el-input ref="ndip" v-model="nutritive.temp.ndip" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入NDIP" type="number" step="0.01" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="粗灰分(Ash%):" prop="ash">
-                <el-input ref="ash" v-model="nutritive.temp.ash" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入粗灰分" type="number" min="0.00" step="0.01" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="nutritive.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
-          <el-button v-if="nutritive.dialogStatus==='nutritive' && isRoleEdit" class="save" :disabled="isokDisable" @click="nutritiveData()">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-    <!-- 设置 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="sapCode.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            {{ textMap[sapCode.dialogStatus] }}
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <div class="search" ref="search">
-          <el-input v-model="sapCode.table.getdataListParm.parammaps.MAKTX" placeholder="原料名称" style="width: 130px;" class="filter-item" clearable />
-          <el-button class="successBorder" @click="handleSapCodeSearch">{{$t('common.query')}}</el-button>
-        </div>
-        <div class="table">
-          <u-table
-            id="saptable"
-            ref="saptable"
-            :key="sapCode.table.tableKey"
-            v-loading="sapCode.table.listLoading"
-            element-loading-text="给我一点时间"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            row-key="id"
-            @selection-change="handleSapCodeSelectionChange"
-            :max-height="myHeight"
-            use-virtual
-            @table-body-scroll="tableScroll"
-            :row-height="rowHeight"
-          >
-            <u-table-column type="selection" align="center" width="50"/>
-            <u-table-column label="物料号" min-width="80px" align="center" prop="MATNR"/>
-            <u-table-column label="物料类型" min-width="90px" align="center" prop="MTART" />
-            <u-table-column label="物料组" min-width="80px" align="center" prop="MATKL"/>
-            <u-table-column label="物料描述" min-width="90px" align="center" prop="MAKTX" />
-            <u-table-column label="最后修改日期" min-width="80px" align="center" prop="LAEDA" />
-          </u-table>
-        </div>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="sapCode.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
-          <el-button v-if="sapCode.dialogStatus==='sapCode' && isRoleEdit" class="save" :disabled="isokDisable" @click="sapCodeData()">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- 获取SAP编码 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="sapCode2.dialogFormVisible" :close-on-click-modal="false" width="50%">
-      <template slot="title">
-        <div class="avue-crud__dialog__header">
-          <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-            {{ textMap[sapCode2.dialogStatus] }}
-          </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-            <svg-icon v-else icon-class="fullscreen" />
-          </div>
-        </div>
-      </template>
-      <div class="app-add">
-        <el-form ref="sapCode2" :rules="sapCode2.rules" :model="sapCode2.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
-          <el-row>
-            <el-col :span="18">
-              <el-form-item label="时间范围:" prop="inputDatetime">
-                <el-date-picker v-model="sapCode2.temp.inputDatetime" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')"  :start-placeholder="$t('common.startTime')"" :end-placeholder="$t('common.endTime')" style="width: 100%;" :clearable="false" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="18">
-              <el-form-item label="物料类型:" prop="sapMaterialtype">
-                <el-select v-model="sapCode2.temp.sapMaterialtype" filterable placeholder="物料类型" class="filter-item" style="width: 100%;">
-                  <el-option v-for="item in materialtypeList" :key="item.id" :label="item.distName" :value="item.distCode" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="sapCode2.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
-          <el-button v-if="sapCode2.dialogStatus==='sapCode2' && isRoleEdit" class="save" :disabled="isokDisable" @click="sapCodeData2()">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-
-</template>
-
-<script>
-import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons,postJson } from '@/api/common'
-import Cookies from 'js-cookie'
-import Sortable from 'sortablejs'
-import Pagination from '@/components/Pagination'
-import axios from 'axios'
-import { getToken } from '@/utils/auth'
-import { parseTime, json2excel, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
-import { MessageBox } from 'element-ui'
-export default {
-  name: 'FeedTable',
-  components: { Pagination },
-  directives: {
-    limit: {
-      // 指令的定义
-      update: function(el) {
-        el.onkeypress = function(e) {
-          var code = e.charCode
-          if (code != 0) {
-            if (!String.fromCharCode(code).match(/[0-9\.]/)) {
-              return false
-            }
-          }
-        }
-        el.addEventListener('textInput', function(e) {
-          e.target.value = e.target.value.replace(/[^0-9\.]/g, '')
-        })
-        el.onkeyup = function(e) {
-          e.target.value = e.target.value.replace(/[^0-9\.]/g, '')
-        }
-      }
-    }
-  },
-  data() {
-    return {
-      rowHeight: 30,
-      dialogFull: false,
-      isInforvalue: false,
-      isRoleEdit: [],
-      download: {
-        getdataListParm: {
-          name: 'getFeedList',
-          page: 1,
-          offset: 1,
-          pagecount: 0,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            fname: '',
-            fclassid: '',
-            source: '',
-            autozone: '',
-            autosecond: '',
-            allowratio: '',
-            printgroup: '',
-            enable: ''
-          }
-        },
-        list: []
-      },
-      requestParams: [
-        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['跳转延时'] },
-        { name: 'getFeedclassByBig', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
-        { name: 'getDictByName2', offset: 0, pagecount: 0, params: ['计划类型'] },
-        { name: 'getTMRListEnableTypeFeed', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'), eqtype: '4' }},
-        { name: 'getDistMateriel', offset: 0, pagecount: 0, params: [] },
-        { name: 'getDistGoods', offset: 0, pagecount: 0, params: [] },
-      ],
-      requestParams2: {
-        name: 'getSysoptEnable', offset: 0, parammaps: { pastureid: Cookies.get('pastureid'), inforname: 'isSmallMaterial' }
-      },
-      enableList: [{ id: '1', name: '是' }, { id: '0', name: '否' }], // 是否启用
-      feedSourcesList: [{ id: '0', name: '系统内置' }, { id: '1', name: '用户自定义' }], // 饲料来源
-      confirmStartList: [{ id: '0', name: '禁用' }, { id: '1', name: '启用' }], // 确认开始
-      associationStatusList: [{ id: '1', name: '是' }, { id: '0', name: '否' }], // 关联状态
-      jumpDelayList: [], // 跳转延时
-      feedTypeList: [], // 饲料分类
-      planTypeList: [], // 计划类型
-      smallMaterialList: [], // 小料秤
-      jmpList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 无上域
-      materialtypeList:[],//物料类型
-      sapGoodsList:[],//sap货位
-      sapCodeList:[],//sap编码
-      table: {
-        tableKey: 0,
-        list: [],
-        total: 0,
-        listLoading: true,
-        getdataListParm: {
-          name: 'getFeedList',
-          page: 1,
-          offset: 1,
-          pagecount: '',
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            fname: '',
-            fclassid: '',
-            source: '',
-            autozone: '',
-            autosecond: '',
-            allowratio: '',
-            printgroup: '',
-            enable: ''
-          }
-        }
-      },
-
-      // 多项搜索显示隐藏
-      arrowDown: true,
-      arrowUp: false,
-
-      // 新增/编辑
-      create: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), fname: '', fclassid: '', fclass: '', feedcode: '', source: '用户自定义', printgroupid: '1', printgroup: '无', unitweight: '', uprice: '', allowratio: '', autozone: '', autosecond: '0', autosecondname: '禁用', confirmstart: '0', confirmstartname: '禁用', enable: '1', trgaddress: '', backup1: '', backup2: '', backup3: '',feedgroupid:'',sapMaterialtype:'',sapGoods:'',sapCode:''},
-        rules: {
-          printgroupid :[{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          fname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          fclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
-          feedcode: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
-        }
-      },
-
-      // 饲料库
-      feedBank: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp: {},
-        rules: {},
-        tableKey: 0,
-        list: [],
-        total: 0,
-        listLoading: true,
-        getdataListParm: {
-          name: 'getFeednurList',
-          page: 1,
-          offset: 1,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            fname: '',
-            statue: ''
-          }
-        }
-      },
-      // 关联
-      relation: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp: {},
-        rules: {},
-        tableKey: 0,
-        list: [],
-        total: 0,
-        listLoading: true,
-        getdataListParm: {
-          name: 'getFeednurRelation',
-          page: 1,
-          offset: 1,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            fname: ''
-          }
-        }
-      },
-
-      // 营养价值
-      nutritive: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp: {},
-        rules: {}
-      },
-
-      sapCode:{
-        dialogFormVisible: false,
-        dialogStatus: '',
-        selectList:[],
-        table: {
-          tableKey: 0,
-          list: [],
-          total: 0,
-          listLoading: false,
-          getdataListParm: {
-            name: 'getFeedSap',
-            page: 1,
-            offset: 1,
-            pagecount: '',
-            returntype: 'Map',
-            parammaps: {
-              MAKTX:''
-            }
-          }
-        }
-      },
-      sapCode2:{
-        dialogFormVisible: false,
-        dialogStatus: '',
-        materialtypeList:[],
-        temp:{
-          inputDatetime: [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')],
-          sapMaterialtype:'',
-        },
-        rules: {
-          inputDatetime :[{required: true, message: '必填', trigger: 'blur' }],
-          sapMaterialtype: [{ required: true, message: '必填', trigger: 'blur' }],
-        }
-      },
-
-      textMap: {
-        create: '新增',
-        update: '编辑',
-        feedBank: '饲料库',
-        relation: '关联',
-        nutritive: '营养价值',
-        sapCode: '设置',
-        sapCode2: '获取SAP编码',
-      },
-
-      isokDisable: false,
-      selectList: [],
-      requestParam: {},
-      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      dropState: false,
-      isOrder: true,
-      ispalyUd: true,
-      myHeight:document.documentElement.clientHeight - 85- 150
-    }
-  },
-
-
-  computed: {
-    // 设置请求头
-    headers() {
-      return {
-        token: getToken()
-      }
-    },
-    uploadData() {
-      return {
-        name: 'checkFeedName,checkProjectType, checkFeedCode, checkFeedType, importFeed,updateFeedSortByCode',
-        importParams: '饲料名称,饲料类别,唯一编码,计划类型,包装单位重量,单价,允许误差数,跳转延时,确认开始,是否启用,继电器位置,无上域',
-        sheetname: 'Sheet1',
-        // 登录牧场
-        pastureid: Cookies.get('pastureid'),
-        // 日期参数
-        dateParams: '',
-        // 必填参数
-        requiredParams: '饲料名称,饲料分类',
-        // 为数值的参数
-        numParams: ''
-      }
-    },
-    // 设置上传地址
-    uploadExcelUrl() {
-      return Cookies.get('url') + 'authdata/ImportExcel'
-    }
-  },
-
-
-  mounted() {
-    document.addEventListener('click', (e) => {
-      if (this.$refs.selectInput !== undefined) {
-        if (!this.$refs.selectInput.contains(e.target)) {
-          this.arrowDown = true
-          this.arrowUp = false
-        } else {
-          this.arrowDown = false
-          this.arrowUp = true
-        }
-      }
-    })
-  },
-  created() {
-    this.getIspalyUd()
-    this.getList()
-    this.getDownList()
-    this.getButtons()
-    this.getInforvalueList()
-  },
-
-  methods: {
-
-    beforeImport(file) {
-      const isLt2M = file.size / 1024 / 1024 < 2
-      if (!isLt2M) {
-        this.$message.error('上传文件大小不能超过 2MB!')
-      }
-      return isLt2M
-    },
-    handleImportSuccess(res, file) {
-      this.getList()
-      if (res.msg === 'ok') {
-        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
-        if (res.data.err_count > 0) {
-          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
-           import('@/vendor/Export2Excel').then(excel => {
-             const list1 = res.data.result
-             const tHeader = [
-               '饲料名称', '饲料分类', '唯一编码', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03', '错误信息'
-             ]
-
-
-             const filterVal = [
-               '饲料名称', '饲料分类', '唯一编码', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03',  'error_msg'
-             ]
-             const data1 = this.formatJson(filterVal, list1)
-             excel.export_json_to_excel({ header: tHeader, data: data1, filename: '饲料表导入报错信息', autoWidth: true, bookType: 'xlsx' })
-           })
-        }
-      } else {
-        this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
-      }
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j === 'timestamp') {
-            return parseTime(v[j])
-          } else {
-            return v[j]
-          }
-        })
-      )
-    },
-    handleExport(item) {
-      if (item == 1) {
-
-        console.log('点击了导出模板')
-        this.download.getdataListParm.parammaps = this.table.getdataListParm.parammaps
-        console.log('点击了导出模板',this.download.getdataListParm)
-
-        GetDataByName(this.download.getdataListParm).then(response => {
-          if (response.data.list !== null) {
-            this.download.list = response.data.list
-          } else {
-            this.download.list = []
-          }
-
-          console.log(this.download.list)
-          var downloadList = [
-            { 'obj1': '1、文件类型为xlsx类型,对应表格文件名格式为:文件名称.xlsx;' },
-            { 'obj1': '2、底部工作表名称不可更改,默认为:Sheet1;' },
-            // { 'obj1': '3、栏舍名称,实际牛头数,系数(%),系数头数,配方模板,补料配方字体为必填;' },
-            // { 'obj1': '4、第一列栏舍名称默认为系统中栏舍,不可修改;' },
-            // { 'obj1': '5、实际牛头数为正整数,系数为正数,至多保留俩位小数;' },
-            // { 'obj1': '6、配方模板名称必须与系统中配方计划—配方模板中的饲喂配方匹配;若补料配方开启,需与配方模板中的补料配方匹配;' },
-            // { 'obj1': '7、数据最多可导入200条,超过200条请分多个文件导入。' }
-          ]
-          var excelDatas = [
-            {
-              tHeader: [
-               '饲料名称', '饲料分类', '唯一编码',  '饲料来源', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03'
-             ],
-              filterVal:  ['', '', '', '', '','', '', '', '', '', '', '', '', '', '', ''],
-              tableDatas: this.download.list,
-              sheetName: 'Sheet1'
-            }, {
-              tHeader: ['填写规范:'],
-              filterVal: ['obj1'],
-              tableDatas: downloadList,
-              sheetName: 'Sheet2'
-            }
-          ]
-          json2excel(excelDatas, '饲料表导入模板', true, 'xlsx')
-        })
-
-
-        // console.log('点击了导出模板')
-        // const requestParam = this.requestParam
-        // const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/库存管理/饲料表导入模板.xlsx' // 请求下载文件的地址
-        // console.log(url)
-        // axios({
-        //   method: 'GET',
-        //   url: url,
-        //   data: requestParam,
-        //   headers: { token: getToken(), optname: 'insertcustomdoc' },
-        //   responseType: 'blob'
-        // }).then(res => {
-        //   if (!res) return
-        //   this.percentage = 99
-        //   setTimeout(() => {
-        //     this.isPercentage = false
-        //   }, 2000)
-        //   const blob = new Blob([res.data], {
-        //     type: 'application/octet-stream;charset=utf-8'
-        //   })
-        //   const url = window.URL.createObjectURL(blob)
-        //   const aLink = document.createElement('a')
-        //   aLink.style.display = 'none'
-        //   aLink.href = url
-        //   const docname = '饲料表导入模板.xlsx'
-        //   aLink.setAttribute('download', docname) // 下载的文件
-        //   document.body.appendChild(aLink)
-        //   aLink.click()
-        //   document.body.removeChild(aLink)
-        //   window.URL.revokeObjectURL(url)
-        // })
-      } else {
-        console.log('点击了导出数据')
-        this.download.getdataListParm.parammaps = this.table.getdataListParm.parammaps
-
-        GetDataByName(this.download.getdataListParm).then(response => {
-          if (response.data.list !== null) {
-            this.download.list = response.data.list
-          } else {
-            this.download.list = []
-          }
-          var excelDatas = [
-            {
-              tHeader: [
-               '饲料名称', '饲料分类', '唯一编码',  '饲料来源', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03'
-             ],
-              filterVal: ['fname', 'fclass', 'feedcode', 'source', 'printgroup', 'allowratio', 'unitweight', 'uprice', 'autozone', 'autosecondnam', 'onfirmstartname', 'trgaddress', 'jmp', 'backup1', 'backup2', 'backup3'],
-              tableDatas: this.download.list,
-              sheetName: 'Sheet1'
-            }
-          ]
-          json2excel(excelDatas, '饲料表', true, 'xlsx')
-        })
-      }
-    },
-    getButtons() {
-      const Edit = 'FeedTable'
-      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
-      this.isRoleEdit = isRoleEdit
-    },
-
-    getInforvalueList() {
-      GetDataByName(this.requestParams2).then(response => {
-        if (response.data !== null) {
-          if (response.data.list[0].inforvalue == 0) {
-            this.isInforvalue = false
-          } else {
-            this.isInforvalue = true
-          }
-        } else {
-          this.isInforvalue = false
-        }
-      })
-    },
-    getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
-        this.jumpDelayList = response.data.getDictByName.list
-        this.feedTypeList = response.data.getFeedclassByBig.list
-        this.planTypeList = response.data.getDictByName2.list
-        this.smallMaterialList = response.data.getTMRListEnableTypeFeed.list
-        this.materialtypeList = response.data.getDistMateriel	.list
-        this.sapGoodsList = response.data.getDistGoods.list
-      })
-    },
-
-    getList() {
-      this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.table.list = response.data.list
-          this.table.pageNum = response.data.pageNum
-          this.table.pageSize = response.data.pageSize
-        } else {
-          this.table.list = []
-        }
-        this.$refs.table.reloadData( this.table.list)
-        this.table.total = response.data.total
-        setTimeout(() => {
-          this.table.listLoading = false
-        }, 100)
-      })
-    },
-    tableScroll ({scrollTop, scrollLeft, table, judgeFlse}) {
-      // {scrollTop, scrollLeft, table, judgeFlse: 这个参数返回一个boolean值,为true则代表表格滚动到了底部了,false没有滚动到底部,必须开起大数据渲染模式才能有值哦}, event
-      console.log(scrollTop, scrollLeft, table, judgeFlse)
-    },
-    form_search() {
-      console.log('点击了查询')
-      this.table.getdataListParm.offset = 1
-      this.getList()
-      this.arrowDown = true
-      this.arrowUp = false
-    },
-    handleRefresh() {
-      console.log('点击了重置')
-      this.table.getdataListParm.parammaps.fname = ''
-      this.table.getdataListParm.parammaps.fclassid = ''
-      this.table.getdataListParm.parammaps.source = ''
-      this.table.getdataListParm.parammaps.autozone = ''
-      this.table.getdataListParm.parammaps.autosecond = ''
-      this.table.getdataListParm.parammaps.allowratio = ''
-      this.table.getdataListParm.parammaps.printgroup = ''
-      this.table.getdataListParm.parammaps.enable = ''
-      this.table.getdataListParm.offset = 1
-      this.getList()
-    },
-
-    resetTemp() {
-      this.create.temp = { pastureid: Cookies.get('pastureid'), fname: '', fclassid: '', fclass: '', feedcode: '', source: '用户自定义', printgroupid: '1', printgroup: '无', unitweight: '', uprice: '', allowratio: '', autozone: '', autosecond: '0', autosecondname: '禁用', confirmstart: '0', confirmstartname: '禁用', enable: '1', trgaddress: '', backup1: '', backup2: '', backup3: '', jmp: '0',feedgroupid:'' }
-    },
-    // 计划类型
-    changePlanList(item) {
-      console.log(item, '======')
-      this.create.temp.printgroup = this.planTypeList.find(obj => obj.value === item).label
-    },
-    // 饲料类型
-    changeFeedList(item) {
-      this.create.temp.fclass = this.feedTypeList.find(obj => obj.id === item).mixname
-    },
-    // 跳转延时
-    changeAutosecond(item) {
-      this.create.temp.autosecondname = this.jumpDelayList.find(obj => obj.value === item).label
-    },
-    // 确认开始
-    changeConfirmstart(item) {
-      this.create.temp.confirmstartname = this.confirmStartList.find(obj => obj.id === item).name
-    },
-    changeSmallMaterial(item) {
-      if (item !== '') {
-        this.create.temp.smtmrname = this.smallMaterialList.find(obj => obj.id === item).tname
-      } else {
-        this.create.temp.smtmrname = ''
-      }
-    },
-    // 新增
-    handleCreate() {
-      console.log('点击了新增')
-      this.resetTemp()
-      this.dialogFull = false
-      this.create.dialogStatus = 'create'
-      this.create.dialogFormVisible = true
-    },
-    createData() {
-      console.log('点击了新增保存')
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['temp'].validate(valid => {
-        if (valid) {
-          const unitweight = /^[1-9]\d*$/
-          if (this.create.temp.unitweight !== '') {
-            if (!unitweight.test(parseFloat(this.create.temp.unitweight))) {
-              this.$message({ type: 'error', message: '包装单位重量请输入正整数', duration: 2000 })
-              return false
-            }
-          }
-          // const uprice = /^\d+(\.\d{1,2})?$/
-           const uprice =  /^(\d+|\d+\.\d{1,2})$/
-          if (this.create.temp.uprice !== '') {
-            if (!uprice.test(parseFloat(this.create.temp.uprice))) {
-              this.$message({ type: 'error', message: '单价请保留两位小数', duration: 2000 })
-              return false
-            }
-          }
-          if (this.create.temp.autozone !== '') {
-            const autozone = /^([0-9]|(1[0-9]|2[0-9]|3[0-9]|4[0-9]|(50)))$/
-            if (!autozone.test(parseFloat(this.create.temp.autozone))) {
-              this.$message({ type: 'error', message: '跳转重量域请输入大于等于0小于等于50的整数', duration: 2000 })
-              return false
-            }
-          } else {
-            this.create.temp.autozone = '0'
-          }
-          if (this.create.temp.trgaddress.length > 8) {
-            this.$message({ type: 'error', message: '继电器位置请输入1-8位数字', duration: 2000 })
-            return false
-          }
-          const allowratio = /^[0-9]\d*$/
-          if (this.create.temp.allowratio !== '') {
-            if (!allowratio.test(parseFloat(this.create.temp.allowratio))) {
-              this.$message({ type: 'error', message: '允许误差数请输入大于等于0的整数', duration: 2000 })
-              return false
-            }
-          }
-          this.isokDisable = true
-          setTimeout(() => {
-            this.isokDisable = false
-          }, 1000)
-          this.requestParam.name = 'insertFeed'
-          this.requestParam.parammaps = this.create.temp
-          if (this.create.temp.allowratio == '') { this.create.temp.allowratio = '0' }
-          if (this.create.temp.uprice == '') { this.create.temp.uprice = '0' }
-          if (this.create.temp.unitweight == '') { this.create.temp.unitweight = '0' }
-          if (this.create.temp.autozone == '') { this.create.temp.autozone = '0' }
-          if (this.create.temp.trgaddress == '') { this.create.temp.trgaddress = '0' }
-          let url = 'authdata/feedbackup/check'
-          let data = {
-            fclassid:this.create.temp.fclassid,
-            backup1:this.create.temp.backup1
-          }
-          postJson(url,data).then(response => {
-            if(response.msg == 'fail'){
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-              if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
-              if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
-              if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
-              if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
-              if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
-            }else{
-              PostDataByName(this.requestParam).then(response => {
-                console.log('新增保存发送参数', this.requestParam)
-                if (response.msg !== 'fail') {
-                  this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-                  this.create.dialogFormVisible = false
-                  this.getList()
-                } else {
-                  this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-                  if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
-                  if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
-                  if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
-                  if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
-                  if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
-                }
-              })
-            }
-          })
-        }
-      })
-    },
-
-    // 编辑
-    handleUpdate(row) {
-      console.log('点击了编辑', row)
-      this.create.dialogStatus = 'update'
-      this.dialogFull = false
-      this.create.dialogFormVisible = true
-      row.fclassid = String(row.fclassid)
-      row.printgroupid = String(row.printgroupid)
-      row.autosecond = String(row.autosecond)
-      row.confirmstart = String(row.confirmstart)
-      row.enable = String(row.enable)
-      row.jmp = String(row.jmp)
-      if (row.printgroupid !== '') {
-        row.printgroup = this.planTypeList.find(obj => obj.value == row.printgroupid).label
-      }
-
-      this.create.temp = Object.assign({}, row)
-      if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
-      if (this.create.temp.uprice == '0.00') { this.create.temp.uprice = '' }
-      if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
-      if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
-      if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
-      if (this.create.temp.smtmrid == '-1') { this.create.temp.smtmrid = '' }
-      console.log(this.create.temp, '=====123')
-    },
-    updateData() {
-      console.log('点击了编辑保存')
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['temp'].validate(valid => {
-        if (valid) {
-          const unitweight = /^[1-9]\d*$/
-          if (this.create.temp.unitweight !== '') {
-            if (!unitweight.test(parseFloat(this.create.temp.unitweight))) {
-              this.$message({ type: 'error', message: '包装单位重量请输入正整数', duration: 2000 })
-              return false
-            }
-          }
-          // const uprice = /^\d+(\.\d{1,2})?$/
-           const uprice =  /^(\d+|\d+\.\d{1,2})$/
-          if (this.create.temp.uprice !== '') {
-            if (!uprice.test(parseFloat(this.create.temp.uprice))) {
-              this.$message({ type: 'error', message: '单价请保留两位小数', duration: 2000 })
-              return false
-            }
-          }
-          if (this.create.temp.autozone !== '') {
-            const autozone = /^([0-9]|(1[0-9]|2[0-9]|3[0-9]|4[0-9]|(50)))$/
-            if (!autozone.test(parseFloat(this.create.temp.autozone))) {
-              this.$message({ type: 'error', message: '跳转重量域请输入大于等于0小于等于50的整数', duration: 2000 })
-              return false
-            }
-          } else {
-            this.create.temp.autozone = '0'
-          }
-
-          if (this.create.temp.trgaddress.length > 8) {
-            this.$message({ type: 'error', message: '继电器位置请输入1-8位数字', duration: 2000 })
-            return false
-          }
-          const allowratio = /^[0-9]\d*$/
-          if (this.create.temp.allowratio !== '') {
-            if (!allowratio.test(parseFloat(this.create.temp.allowratio))) {
-              this.$message({ type: 'error', message: '允许误差数请输入大于等于0的整数', duration: 2000 })
-              return false
-            }
-          }
-          this.isokDisable = true
-          setTimeout(() => {
-            this.isokDisable = false
-          }, 1000)
-          this.requestParam.name = 'updateFeed'
-          this.requestParam.parammaps = this.create.temp
-          if (this.create.temp.allowratio == '') { this.create.temp.allowratio = '0' }
-          if (this.create.temp.uprice == '') { this.create.temp.uprice = '0' }
-          if (this.create.temp.unitweight == '') { this.create.temp.unitweight = '0' }
-          if (this.create.temp.autozone == '') { this.create.temp.autozone = '0' }
-          if (this.create.temp.trgaddress == '') { this.create.temp.trgaddress = '0' }
-          let url = 'authdata/feedbackup/check'
-          let data = {
-            fclassid:this.create.temp.fclassid,
-            feedId:this.create.temp.id,
-            backup1:this.create.temp.backup1
-          }
-          postJson(url,data).then(response => {
-            if(response.msg == 'fail'){
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-              if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
-              if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
-              if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
-              if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
-              if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
-            }else{
-              PostDataByName(this.requestParam).then(response => {
-                console.log('新增保存发送参数', this.requestParam)
-                if (response.msg !== 'fail') {
-                  this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-                  this.create.dialogFormVisible = false
-                  this.getList()
-                } else {
-                  this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-                  if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
-                  if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
-                  if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
-                  if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
-                  if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
-                }
-              })
-            }
-          })
-        }
-      })
-    },
-
-    // 饲料库
-    handleFeedBank() {
-      console.log('点击了饲料库')
-      this.dialogFull = false
-      this.feedBank.dialogStatus = 'feedBank'
-      this.feedBank.dialogFormVisible = true
-      this.getFeedBankList()
-    },
-    getFeedBankList() {
-      this.feedBank.listLoading = true
-      GetDataByName(this.feedBank.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.feedBank.list = response.data.list
-          this.feedBank.pageNum = response.data.pageNum
-          this.feedBank.pageSize = response.data.pageSize
-          this.feedBank.total = response.data.total
-        } else {
-          this.feedBank.list = []
-        }
-        setTimeout(() => {
-          this.feedBank.listLoading = false
-        }, 100)
-      })
-    },
-    handleFeedBankSearch() {
-      console.log('点击了饲料库搜索')
-      this.getFeedBankList()
-      this.feedBank.getdataListParm.offset = 1
-    },
-    handleFeedBankRefresh() {
-      console.log('点击了饲料库重置')
-      this.feedBank.getdataListParm.parammaps.fname = ''
-      this.feedBank.getdataListParm.parammaps.statue = ''
-      this.getFeedBankList()
-    },
-
-    // 关联
-    handleRelation(row) {
-      console.log('点击了关联')
-      this.dialogFull = false
-      this.relation.dialogStatus = 'relation'
-      this.relation.dialogFormVisible = true
-      this.relation.temp = Object.assign({}, row)
-      this.relation.getdataListParm.parammaps.fid = this.relation.temp.id
-      this.getRelationList()
-    },
-    getRelationList() {
-      this.relation.listLoading = true
-      GetDataByName(this.relation.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.relation.list = response.data.list
-          this.relation.pageNum = response.data.pageNum
-          this.relation.pageSize = response.data.pageSize
-          this.relation.total = response.data.total
-        } else {
-          this.relation.list = []
-        }
-        setTimeout(() => {
-          this.relation.listLoading = false
-        }, 100)
-      })
-    },
-    handleRelationSearch() {
-      console.log('点击了关联搜索')
-      this.relation.getdataListParm.offset = 1
-      this.getRelationList()
-    },
-    disassociateData(row) {
-      console.log('点击了取消关联')
-      MessageBox.confirm('是否确认取消关联?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.isokDisable = true
-        setTimeout(() => {
-          this.isokDisable = false
-        }, 1000)
-        this.requestParam.name = 'updateFeedrelation'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.pastureid = this.relation.temp.pastureid
-        this.requestParam.parammaps.fid = this.relation.temp.id
-        this.requestParam.parammaps.id = row.id
-        PostDataByName(this.requestParam).then(response => {
-          console.log('取消关联保存发送参数', this.requestParam)
-          if (response.msg !== 'fail') {
-            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-            this.getRelationList()
-            this.getList()
-          } else {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消' })
-      })
-    },
-    relationData(row) {
-      console.log('点击了关联保存')
-      MessageBox.confirm('是否确认关联?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.isokDisable = true
-        setTimeout(() => {
-          this.isokDisable = false
-        }, 1000)
-        this.requestParam.name = 'insertFeednur'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.pastureid = this.relation.temp.pastureid
-        this.requestParam.parammaps.fid = this.relation.temp.id
-        this.requestParam.parammaps.fname = this.relation.temp.fname
-        this.requestParam.parammaps.feedcode = this.relation.temp.feedcode
-        this.requestParam.parammaps.price = row.price
-        this.requestParam.parammaps.remark = row.remark
-        this.requestParam.parammaps.dry = row.dry
-        this.requestParam.parammaps.starch = row.starch
-        this.requestParam.parammaps.cp = row.cp
-        this.requestParam.parammaps.ca = row.ca
-        this.requestParam.parammaps.p = row.p
-        this.requestParam.parammaps.n = row.n
-        this.requestParam.parammaps.fat = row.fat
-        this.requestParam.parammaps.adf = row.adf
-        this.requestParam.parammaps.ndf = row.ndf
-        this.requestParam.parammaps.ndip = row.ndip
-        this.requestParam.parammaps.ash = row.ash
-        this.requestParam.parammaps.fpercent = row.fpercent
-        this.requestParam.parammaps.iscu = row.iscu
-        this.requestParam.parammaps.feednurid = row.id
-        PostDataByName(this.requestParam).then(response => {
-          console.log('关联保存发送参数', this.requestParam)
-          if (response.msg !== 'fail') {
-            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-            this.getRelationList()
-            this.getList()
-          } else {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消' })
-      })
-    },
-    // 营养价值
-    handleNutritive(row) {
-      console.log('点击了营养价值', row)
-      this.dialogFull = false
-      this.nutritive.dialogStatus = 'nutritive'
-      this.nutritive.dialogFormVisible = true
-      this.nutritive.temp = Object.assign({}, row)
-    },
-    nutritiveData() {
-      console.log('点击了营养价值保存')
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      if (this.nutritive.temp.dry == undefined) { this.$set(this.nutritive.temp, 'dry', '') }
-      if (this.nutritive.temp.starch == undefined) { this.$set(this.nutritive.temp, 'starch', '') }
-      if (this.nutritive.temp.cp == undefined) { this.$set(this.nutritive.temp, 'cp', '') }
-      if (this.nutritive.temp.ca == undefined) { this.$set(this.nutritive.temp, 'ca', '') }
-      if (this.nutritive.temp.p == undefined) { this.$set(this.nutritive.temp, 'p', '') }
-      if (this.nutritive.temp.n == undefined) { this.$set(this.nutritive.temp, 'n', '') }
-      if (this.nutritive.temp.fat == undefined) { this.$set(this.nutritive.temp, 'fat', '') }
-      if (this.nutritive.temp.adf == undefined) { this.$set(this.nutritive.temp, 'adf', '') }
-      if (this.nutritive.temp.ndf == undefined) { this.$set(this.nutritive.temp, 'ndf', '') }
-      if (this.nutritive.temp.ndip == undefined) { this.$set(this.nutritive.temp, 'ndip', '') }
-      if (this.nutritive.temp.ash == undefined) { this.$set(this.nutritive.temp, 'ash', '') }
-      var positiveNumber = /^\d+(\.\d{1,2})?$/
-      if (this.nutritive.temp.dry !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.dry))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-      console.log(this.nutritive.temp.starch)
-      if (this.nutritive.temp.starch !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.starch))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.cp !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.cp))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.ca !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ca))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.p !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.p))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.n !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.n))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.fat !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.fat))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.adf !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.adf))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.ndf !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ndf))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.ndip !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ndip))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-
-      if (this.nutritive.temp.ash !== '') {
-        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ash))) {
-          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
-          return false
-        }
-      }
-      this.requestParam.name = 'insertFeednur'
-      this.requestParam.parammaps = {}
-      this.requestParam.parammaps.pastureid = this.nutritive.temp.pastureid
-      this.requestParam.parammaps.fid = this.nutritive.temp.id
-      this.requestParam.parammaps.fname = this.nutritive.temp.fname
-      this.requestParam.parammaps.feedcode = this.nutritive.temp.feedcode
-      this.requestParam.parammaps.price = this.nutritive.temp.uprice
-      this.requestParam.parammaps.remark = this.nutritive.temp.remark
-      this.requestParam.parammaps.dry = this.nutritive.temp.dry
-      this.requestParam.parammaps.starch = this.nutritive.temp.starch
-      this.requestParam.parammaps.cp = this.nutritive.temp.cp
-      this.requestParam.parammaps.ca = this.nutritive.temp.ca
-      this.requestParam.parammaps.p = this.nutritive.temp.p
-      this.requestParam.parammaps.n = this.nutritive.temp.n
-      this.requestParam.parammaps.fat = this.nutritive.temp.fat
-      this.requestParam.parammaps.adf = this.nutritive.temp.adf
-      this.requestParam.parammaps.ndf = this.nutritive.temp.ndf
-      this.requestParam.parammaps.ndip = this.nutritive.temp.ndip
-      this.requestParam.parammaps.ash = this.nutritive.temp.ash
-      this.requestParam.parammaps.fpercent = this.nutritive.temp.fpercent
-      this.requestParam.parammaps.iscu = this.nutritive.temp.iscu
-      this.requestParam.parammaps.feednurid = '-1'
-      PostDataByName(this.requestParam).then(response => {
-        console.log('关联保存发送参数', this.requestParam)
-        if (response.msg !== 'fail') {
-          this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-          this.getList()
-          this.nutritive.dialogFormVisible = false
-        } else {
-          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-        }
-      })
-    },
-
-    // 行内删除
-    handleRowDelete(row) {
-      console.log('点击了行内删除')
-      MessageBox.confirm('是否确认删除此信息?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.selectList = []
-        this.requestParam = {}
-        this.requestParam.common = { 'returnmap': '0' }
-        this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'checkDeleteFeed', 'type': 'v', 'parammaps': {
-          'pastureid': row.pastureid,
-          'id': row.id
-        }}
-        this.requestParam.data[1] = { 'name': 'deleteFeed', 'type': 'e', 'parammaps': {
-          'pastureid': row.pastureid,
-          'id': row.id
-        }}
-        ExecDataByConfig(this.requestParam).then(response => {
-          console.log('删除保存发送参数', this.requestParam)
-          if (response.msg === 'fail') {
-            this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
-            this.getList()
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消删除' })
-      })
-    },
-    handleSelectionChange(val) {
-      console.log('勾选数据', val)
-      this.selectList = val
-    },
-    // 多项删除
-    form_delete() {
-      console.log('点击了删除')
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择饲料表信息', duration: 2000 })
-      } else {
-        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否删除?', {
-          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-        }).then(() => {
-          this.requestParam = {}
-          this.requestParam.common = { 'returnmap': '0' }
-          this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
-          this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = { 'name': 'checkDeleteFeed', 'type': 'v', 'parammaps': {
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          this.requestParam.data[0].children[1] = { 'name': 'deleteFeed', 'type': 'e', 'parammaps': {
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          ExecDataByConfig(this.requestParam).then(response => {
-            console.log('删除保存发送参数', this.requestParam)
-            if (response.msg === 'fail') {
-              this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
-              this.getList()
-            }
-          })
-        })
-      }
-    },
-
-    handleChangeOrder() {
-      this.isOrder = false
-      this.rowDrop()
-    },
-
-    saveChangeOrder() {
-      // 保存顺序
-      var sortArr = []
-      for (let i = 0; i < this.table.list.length; i++) {
-        var obj = {}
-        obj.sort = i + 1
-        obj.id = this.table.list[i].id
-        obj.pastureid = this.table.list[i].pastureid
-        sortArr.push(obj)
-      }
-      this.requestParam = {}
-      this.requestParam.common = { 'returnmap': '0' }
-      this.requestParam.data = []
-      this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': sortArr }}
-      this.requestParam.data[0].children = []
-      this.requestParam.data[0].children[0] = { 'name': 'updateFeedSort', 'type': 'e', 'parammaps': {
-        id: '@insertSpotList.id',
-        pastureid: '@insertSpotList.pastureid',
-        sort: '@insertSpotList.sort'
-      }}
-      ExecDataByConfig(this.requestParam).then(response => {
-        console.log('顺序切换保存发送参数', this.requestParam)
-        if (response.msg === 'fail') {
-          this.$notify({ title: '顺序切换失败', message: response.data, type: 'warning', duration: 2000 })
-        } else {
-          this.$notify({ title: '', message: '顺序切换成功', type: 'success', duration: 2000 })
-          this.getList()
-          this.isOrder = true
-        }
-      })
-    },
-    cancelChangeOrder() {
-      // 取消顺序
-      this.getList()
-      this.isOrder = true
-    },
-
-     // 行拖拽
-    rowDrop() {
-      console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
-      const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
-      const that = this
-      var sortable = Sortable.create(tbody, {
-        disabled: that.dropState,
-        onChoose({ newIndex, oldIndex }) {
-          if (that.dropState == true) {
-            sortable.destroy()
-          }
-        },
-        onEnd({ newIndex, oldIndex }) {
-          const currRow = that.table.list.splice(oldIndex, 1)[0]
-          that.table.list.splice(newIndex, 0, currRow)
-          console.log('索引', newIndex)
-          console.log('拖动数据', currRow)
-          console.log('上', that.table.list[newIndex - 1])
-          console.log('下', that.table.list[newIndex + 1])
-        }
-      })
-    },
-    handleSet(){
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择一条信息', duration: 2000 })
-      } else {
-        this.dialogFull = false
-        this.sapCode.dialogStatus = 'sapCode'
-        this.sapCode.dialogFormVisible = true
-        this.sapCode.table.getdataListParm.parammaps.MAKTX = this.selectList[0].sapCode
-        this.getsapCodeList()
-      }
-    },
-    getsapCodeList(){
-      GetDataByName(this.sapCode.table.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.sapCode.table.list = response.data.list
-        } else {
-          this.sapCode.table.list = []
-        }
-         this.$refs.saptable.reloadData(this.sapCode.table.list)
-      })
-    },
-    handleSapCodeSearch(){
-      this.getsapCodeList()
-    },
-    sapCodeData(){
-      if(this.sapCode.selectList.length>1 || this.sapCode.selectList.length == 0){
-        this.$message({ type: 'error', message: '请选择一条信息', duration: 2000 })
-      }else{
-        this.requestParam.name = 'updateFeedSapCode'
-        let data = {
-          name:'updateFeedSapCode',
-          parammaps:{
-            sapCode:this.sapCode.selectList[0].MATNR,
-            id:this.selectList[0].id
-          }
-        }
-        PostDataByName(data).then(response => {
-          console.log('新增保存发送参数', data)
-          if (response.msg !== 'fail') {
-            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-            this.sapCode.dialogFormVisible = false
-            this.getList()
-          } else {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
-            if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
-            if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
-            if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
-            if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
-          }
-        })
-      }
-    },
-    handleSapCodeSelectionChange(val){
-      this.sapCode.selectList = val
-      console.log(this.sapCode.selectList,'this.sapCode.selectList')
-    },
-    handleGetSapCode(){
-        this.dialogFull = false
-        this.sapCode2.dialogStatus = 'sapCode2'
-        this.sapCode2.dialogFormVisible = true
-    },
-    sapCodeData2(){
-      this.$refs['sapCode2'].validate(valid => {
-        if (valid) {
-          let url = 'authdata/sap/feed'
-          let data = {
-            startTime:parseTime(this.sapCode2.temp.inputDatetime[0],'{y}-{m}-{d}'),
-            endTime:parseTime(this.sapCode2.temp.inputDatetime[1],'{y}-{m}-{d}'),
-            mtart:this.sapCode2.temp.sapMaterialtype,
-            pastureId:Cookies.get('pastureid')
-          }
-          postJson(url,data).then(response => {
-            if (response.msg !== 'fail') {
-              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-              this.sapCode2.dialogFormVisible = false
-              this.getList()
-            } else {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            }
-          })
-        }
-      })
-    },
-    getIspalyUd(){
-      let url = 'authdata/GetDataByName'
-      let data = {
-        "name":"getSysoptEnable","page":1,"offset":1,"pagecount":1,"returntype":"Map",
-        "parammaps":{"pastureid":Cookies.get('pastureid'),"inforname":"gmUdSync"}
-      }
-      postJson(url,data).then(response => {
-        if (response.msg !== 'fail') {
-          if(response.data.list[0].inforvalue == 0){
-            this.ispalyUd = false
-          }else{
-            this.ispalyUd = true
-          }
-        } else {
-          this.$notify({ title: '请求失败', message: response.data, type: 'warning', duration: 2000 })
-        }
-      })
-    },
-    handleGetUd(){
-      MessageBox.confirm('是否获取UD饲料?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        let url = 'authdata/gm/udfeed'
-        let data = {
-          pastureId:Cookies.get('pastureid')
-        }
-        postJson(url,data).then(response => {
-          if (response.msg !== 'fail') {
-            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-            this.getList()
-          } else {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          }
-        })
-      })
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-  .search{margin-top:10px;}
-  $width:350px;
-  $left:325px;
-  .selectInput{
-    position: relative;
-    display: inline-block;
-    .Input{width: $width;position: relative;}
-    .el-icon-arrow-down{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
-    .el-icon-arrow-up{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
-    .selectUl{
-      z-index: 111;width: $width;background: #fff;border: 1px solid #E4E7ED;box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);margin: -1px 0 0 0;padding: 6px 0; margin: 0;box-sizing: border-box;position: absolute;
-      li{
-        list-style: none;font-size: 14px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #606266; height: 50px; line-height: 50px; box-sizing: border-box; cursor: pointer;
-        a{float:left;width: 80px;}
-        a:hover{color: rgba(0, 204, 102, 0.71); font-weight: 700;}
-      }
-    }
-  }
- </style>
+<template>
+  <div class="app-container">
+    <div class="search" ref="search">
+      <el-input v-model="table.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
+      <el-select v-model="table.getdataListParm.parammaps.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 150px;" clearable>
+        <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
+      </el-select>
+      <el-select v-model="table.getdataListParm.parammaps.source" filterable placeholder="饲料来源" class="filter-item" style="width: 120px;" clearable>
+        <el-option v-for="item in feedSourcesList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
+        <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <div ref="selectInput" class="filter-item selectInput">
+        <el-input type="text" name="" value="" placeholder="请点击选择搜索条件" class="Input" />
+        <i v-if="arrowDown" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
+        <i v-if="arrowUp" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
+        <ul v-if="arrowUp" class="selectUl">
+          <li><a>允许误差数</a><el-input v-model="table.getdataListParm.parammaps.allowratio"type="text" style="width: 245px;" /></li>
+          <li><a>跳转重量域</a><el-input v-model="table.getdataListParm.parammaps.autozone" type="text" style="width: 245px;" /></li>
+          <li>
+            <a>跳转延时</a>
+            <el-select v-model="table.getdataListParm.parammaps.autosecond" filterable placeholder="跳转延时" class="filter-item" style="width: 245px;" clearable>
+              <el-option v-for="item in jumpDelayList" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </li>
+          <li>
+            <div style="float: right;">
+              <el-button class="downminCancel" @click="arrowUp=false;arrowDown=true;">取消</el-button>
+              <el-button class="miniPrimary" @click="form_search">搜索</el-button>
+            </div>
+          </li>
+        </ul>
+      </div>
+      <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
+      <el-button class="successBorder" @click="handleRefresh">{{$t('common.reset')}}</el-button>
+    </div>
+    <div class="operation" ref="operation">
+      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
+      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleSet">设置</el-button>
+      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button>
+      <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="form_delete">删除</el-button>
+      <el-button class="success" icon="el-icon-receiving" @click="handleFeedBank">饲料库</el-button>
+      <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" class="success" @click="handleChangeOrder">更改顺序</el-button>
+       <div v-else style="display: inline-block;">
+        <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
+        <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
+      </div>
+      <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">获取UD饲料</el-button>
+      <el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
+        <el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
+      </el-upload>
+      <el-dropdown style="float: right;margin-right: 10px;">
+        <el-button class="export" icon="el-icon-upload2">导出</el-button>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item @click.native="handleExport(1)">导出模板</el-dropdown-item>
+          <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+
+    <div class="table">
+      <u-table
+        id="table"
+        ref="table"
+        :key="table.tableKey"
+        v-loading="table.listLoading"
+        element-loading-text="给我一点时间"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable table-fixed"
+        row-key="id"
+        @selection-change="handleSelectionChange"
+        :max-height="myHeight"
+        use-virtual
+        @table-body-scroll="tableScroll"
+        :row-height="rowHeight"
+      >
+        <u-table-column type="selection" align="center" width="50" fixed="left" />
+        <u-table-column label="序号" type="index" align="center" width="50" fixed="left"/>
+        <u-table-column label="饲料名称" min-width="80px" align="center" prop="fname" fixed="left"/>
+        <u-table-column label="饲料分类" min-width="80px" align="center" prop="fclass" fixed="left"/>
+        <u-table-column label="物料类型" min-width="90px" align="center" prop="sapMaterialtypeName" />
+        <!-- <u-table-column label="SAP货位" min-width="90px" align="center" prop="goods" /> -->
+        <u-table-column label="唯一编码" min-width="80px" align="center" prop="feedcode" />
+        <u-table-column label="UD名称" min-width="80px" align="center" prop="udname" />
+        <!-- <u-table-column label="SAP编码" min-width="90px" align="center" prop="sapCode" /> -->
+        <u-table-column label="饲料来源" min-width="80px" align="center" prop="source" />
+        <u-table-column label="计划类型" min-width="80px" align="center" prop="printgroup" />
+        <u-table-column v-if="isInforvalue" label="小料秤" min-width="90px" align="center" prop="smtmrname" />
+        <u-table-column label="允许误差数(kg)" min-width="80px" align="center" prop="allowratio" />
+        <u-table-column label="包装单位重量(kg)" min-width="80px" align="center" prop="unitweight" />
+        <u-table-column label="单价" min-width="80px" align="center" prop="uprice" />
+        <u-table-column label="跳转重量域(kg)" min-width="80px" align="center" prop="autozone" />
+        <u-table-column label="跳转延时" min-width="80px" align="center" prop="autosecondname" />
+        <u-table-column label="确认开始" min-width="80px" align="center" prop="confirmstartname" />
+        <u-table-column label="继电器位置" min-width="80px" align="center" prop="trgaddress" />
+        <u-table-column label="无上域" min-width="60px" align="center">
+          <template slot-scope="scope">
+            <span v-if="scope.row.jmp == 0">否</span>
+            <span v-else>是</span>
+          </template>
+        </u-table-column>
+        <u-table-column label="备用字段01" min-width="90px" align="center" prop="backup1" />
+        <u-table-column label="备用字段02" min-width="90px" align="center" prop="backup2" />
+        <u-table-column label="备用字段03" min-width="90px" align="center" prop="backup3" />
+        <u-table-column label="是否启用" min-width="80px" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.enable" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+          </template>
+        </u-table-column>
+        <u-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <a class="correcting" @click="handleNutritive (row)">营养价值</a>
+            <span class="centerSpan">|</span>
+            <a v-if="isRoleEdit" class="correcting" @click="handleRelation(row)">关联</a>
+            <span v-if="isRoleEdit" class="centerSpan">|</span>
+            <el-button v-if="isRoleEdit" icon="el-icon-edit-outline" class="miniSuccess" @click="handleUpdate(row)" />
+            <span v-if="isRoleEdit" class="centerSpan">|</span>
+            <el-button v-if="isRoleEdit" icon="el-icon-delete" class="miniDanger" @click="handleRowDelete(row)" />
+          </template>
+        </u-table-column>
+      </u-table>
+
+      <!-- <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" /> -->
+
+         <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
+    </div>
+
+    <!-- 新增/编辑 -->
+    <el-dialog :fullscreen="dialogFull" :visible.sync="create.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[create.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-add">
+        <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
+          <el-row>
+            <el-col :span="24">
+              <h3 style="width: 160px;text-align: right;">基础信息</h3>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="饲料名称:" prop="fname">
+                <el-input ref="fname" v-model="create.temp.fname" class="filter-item" placeholder="请输入饲料名称" type="textarea" :autosize="{ minRows:1}" maxlength="32" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="饲料类别:" prop="fclassid">
+                <el-select v-model="create.temp.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 100%;" @change="changeFeedList">
+                  <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
+                </el-select>
+              </el-form-item>
+              </el-col>
+            <el-col :span="6">
+              <el-form-item label="唯一编码:" prop="feedcode">
+                <el-input ref="feedcode" v-model="create.temp.feedcode" class="filter-item" placeholder="请输入唯一编码" type="text" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="饲料来源:" prop="source">
+                <el-input ref="source" v-model="create.temp.source" class="filter-item" disabled placeholder="用户自定义" type="text" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="计划类型:" prop="printgroupid">
+                <el-select v-model="create.temp.printgroupid" filterable
+:placeholder="$t('processAnalysis.planType')"class="filter-item" style="width: 100%;" @change="changePlanList">
+                  <el-option v-for="item in planTypeList" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="包装单位重量(kg):" prop="unitweight">
+                <el-input ref="unitweight" v-model="create.temp.unitweight" class="filter-item" placeholder="正整数" type="number" style="width: 100%;" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="单价:" prop="uprice">
+                <el-input ref="uprice" v-model="create.temp.uprice"  class="filter-item" placeholder="最多俩位小数" type="number" step="0.01" style="width: 100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="物料类型:" prop="sapMaterialtype">
+                <el-select v-model="create.temp.sapMaterialtype" filterable placeholder="物料类型" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in materialtypeList" :key="item.id" :label="item.distName" :value="item.distCode" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="SAP货位:" prop="sapGoods">
+                <el-select v-model="create.temp.sapGoods" filterable placeholder="SAP货位" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in sapGoodsList" :key="item.id" :label="item.distName" :value="item.distCode" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="SAP编码:" prop="sapCode">
+                <el-input ref="sapCode" v-model="create.temp.sapCode" class="filter-item" disabled placeholder="SAP编码" type="text" />
+                <!-- <el-select v-model="create.temp.sapcode" filterable placeholder="SAP编码" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in sapCodeList" :key="item.id" :label="item.mixname" :value="item.id" />
+                </el-select> -->
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <h3 style="width: 160px;text-align: right;">搅拌参数</h3>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="允许误差数(kg):" prop="allowratio">
+                <el-input ref="allowratio" v-model="create.temp.allowratio" class="filter-item" placeholder="正整数" type="text" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="跳转重量域(kg):" prop="autozone">
+                <el-input ref="autozone" v-model="create.temp.autozone" :disabled="create.temp.autosecond=='0'" class="filter-item" placeholder="0-50之间的整数" type="text" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="跳转延时:" prop="autosecond">
+                <el-select v-model="create.temp.autosecond" filterable placeholder="跳转延时" class="filter-item" style="width: 100%;" @change="changeAutosecond">
+                  <el-option v-for="item in jumpDelayList" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="确认开始:" prop="confirmstart">
+                <el-select v-model="create.temp.confirmstart" filterabler placeholde="确认开始" class="filter-item" style="width: 100%;" @change="changeConfirmstart">
+                  <el-option v-for="item in confirmStartList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="是否启用:" prop="enable">
+                <el-select v-model="create.temp.enable" filterable placeholder="是否启用" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="继电器位置:" prop="trgaddress">
+                <el-input ref="trgaddress" v-model="create.temp.trgaddress" class="filter-item" placeholder="继电器位置" type="number" />
+              </el-form-item>
+            </el-col>
+            <el-col v-if="isInforvalue" :span="6">
+              <el-form-item label="小料秤:" prop="smtmrid">
+                <el-select v-model="create.temp.smtmrid" filterable placeholder="小料秤" clearable class="filter-item" style="width: 100%;" @change="changeSmallMaterial">
+                  <el-option v-for="item in smallMaterialList" :key="item.id" :label="item.tname" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="无上域:" prop="jmp">
+                <el-select v-model="create.temp.jmp" placeholder="无上域" class="filter-item" style="width: 100%;" @change="changeSmallMaterial">
+                  <el-option v-for="item in jmpList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <h3 style="width: 160px;text-align: right;">备用字段</h3>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="备用字段01:" prop="backup1">
+                <el-input ref="backup1" v-model="create.temp.backup1" class="filter-item" placeholder="备用字段01" type="text" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="备用字段02:" prop="backup2">
+                <el-input ref="backup2" v-model="create.temp.backup2" class="filter-item" placeholder="备用字段02" type="text" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="备用字段03:" prop="backup3">
+                <el-input ref="backup3" v-model="create.temp.backup3" class="filter-item" placeholder="备用字段03" type="text" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
+          <el-button v-if="create.dialogStatus==='create' || create.dialogStatus==='update'" class="save" :disabled="isokDisable" @click="create.dialogStatus==='create'?createData():updateData()">确认</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <!-- 饲料库 -->
+    <el-dialog :fullscreen="dialogFull" :visible.sync="feedBank.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[feedBank.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-add">
+        <div class="search">
+          <el-input v-model="feedBank.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
+          <el-select v-model="feedBank.getdataListParm.parammaps.statue" filterabler placeholder="关联状态" class="filter-item" style="width: 120px;" clearable>
+            <el-option v-for="item in associationStatusList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-button class="successBorder" @click="handleFeedBankSearch">{{$t('common.query')}}</el-button>
+          <el-button class="successBorder" @click="handleFeedBankRefresh">{{$t('common.reset')}}</el-button>
+        </div>
+        <div class="table">
+          <el-table
+            :key="feedBank.tableKey"
+            v-loading="feedBank.listLoading"
+            element-loading-text="给我一点时间"
+            :data="feedBank.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;margin: 0 auto 50px;"
+            :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="50" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.sources }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="中国饲料号" min-width="70px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.feedcode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="饲料名称" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.fname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="价格" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.price }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="样品说明" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.remark }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="干物质(DM%)" min-width="65px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.dry }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="淀粉(%DM)" min-width="59px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.starch }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="粗蛋白(CP%DM)" min-width="70px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.cp }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="钙(Ca%DM)" min-width="85px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ca }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="磷(P%DM)" min-width="85px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.p }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="产奶净能(%DM)" min-width="75px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.n }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="脂肪(%DM)" min-width="59px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.fat }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="ADF(%DM)" min-width="60px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.adf }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="NDF(%DM)" min-width="60px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ndf }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="NDIP%" min-width="70px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ndip }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="粗灰分(Ash%)" min-width="65px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ash }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="粗料" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.iscu }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="关联状态" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.statue==0">否</span>
+                <span v-if="scope.row.statue==1">是</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose cancelClose1" @click="feedBank.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <!-- 关联 -->
+    <el-dialog :fullscreen="dialogFull" :visible.sync="relation.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[relation.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-add">
+        <div class="search">
+          <el-input v-model="relation.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
+          <el-button class="successBorder" @click="handleRelationSearch">{{$t('common.query')}}</el-button>
+        </div>
+        <div class="table">
+          <el-table
+            :key="relation.tableKey"
+            v-loading="relation.listLoading"
+            element-loading-text="给我一点时间"
+            :data="relation.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;margin: 0 auto 50px;"
+            :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="50" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.sources }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="中国饲料号" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.feedcode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="饲料名称" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.fname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="价格" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.price }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="样品说明" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.remark }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="干物质(DM%)" min-width="65px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.dry }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="淀粉(%DM)" min-width="59px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.starch }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="粗蛋白(CP%DM)" min-width="75px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.cp }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="钙(Ca%DM)" min-width="83px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ca }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="磷(P%DM)" min-width="80px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.p }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="产奶净能(%DM)" min-width="75px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.n }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="脂肪(%DM)" min-width="59px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.fat }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="ADF(%DM)" min-width="60px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.adf }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="NDF(%DM)" min-width="60px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ndf }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="NDIP%" min-width="70px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ndip }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="粗灰分(Ash%)" min-width="65px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.ash }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="粗料" min-width="50px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.iscu }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" min-width="50px" align="center" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="{row}">
+                <a v-if="row.statueRelation == '1'" class="correcting" :disabled="isokDisable" @click="disassociateData(row)">取消关联</a>
+                <a v-if="row.statueRelation == '0'" class="correcting" :disabled="isokDisable" @click="relationData(row)">关联</a>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose cancelClose1" @click="relation.dialogFormVisible = false;getList() ">{{$t('common.closed')}}</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 营养价值 -->
+    <el-dialog :fullscreen="dialogFull" :visible.sync="nutritive.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[nutritive.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-add">
+        <el-form ref="temp" :rules="nutritive.rules" :model="nutritive.temp" label-position="right" label-width="160px" style="width: 100%;margin:0 auto 50px">
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="干物质(DM%):" prop="dry">
+                <el-input ref="dry" v-model="nutritive.temp.dry"  :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入干物质" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="淀粉(%DM):" prop="starch">
+                <el-input ref="starch" v-model="nutritive.temp.starch" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入淀粉" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="粗蛋白(CP%DM):" prop="cp">
+                <el-input ref="cp" v-model="nutritive.temp.cp" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入粗蛋白" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="钙(Ca%DM):" prop="ca">
+                <el-input ref="ca" v-model="nutritive.temp.ca" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入钙" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="磷(P%DM):" prop="p">
+                <el-input ref="p" v-model="nutritive.temp.p" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入磷" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="产奶净能(%DM):" prop="n">
+                <el-input ref="n" v-model="nutritive.temp.n" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入产奶净能" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="脂肪(%DM):" prop="fat">
+                <el-input ref="fat" v-model="nutritive.temp.fat" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入脂肪" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="ADF(%DM):" prop="adf">
+                <el-input ref="adf" v-model="nutritive.temp.adf" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入ADF" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="NDF(%DM):" prop="ndf">
+                <el-input ref="ndf" v-model="nutritive.temp.ndf" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入NDF" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="NDIP(%):" prop="ndip">
+                <el-input ref="ndip" v-model="nutritive.temp.ndip" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入NDIP" type="number" step="0.01" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="粗灰分(Ash%):" prop="ash">
+                <el-input ref="ash" v-model="nutritive.temp.ash" v-limit :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入粗灰分" type="number" min="0.00" step="0.01" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose" @click="nutritive.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
+          <el-button v-if="nutritive.dialogStatus==='nutritive' && isRoleEdit" class="save" :disabled="isokDisable" @click="nutritiveData()">确认</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 设置 -->
+    <el-dialog :fullscreen="dialogFull" :visible.sync="sapCode.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[sapCode.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-add">
+        <div class="search" ref="search">
+          <el-input v-model="sapCode.table.getdataListParm.parammaps.MAKTX" placeholder="原料名称" style="width: 130px;" class="filter-item" clearable />
+          <el-button class="successBorder" @click="handleSapCodeSearch">{{$t('common.query')}}</el-button>
+        </div>
+        <div class="table">
+          <u-table
+            id="saptable"
+            ref="saptable"
+            :key="sapCode.table.tableKey"
+            v-loading="sapCode.table.listLoading"
+            element-loading-text="给我一点时间"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            row-key="id"
+            @selection-change="handleSapCodeSelectionChange"
+            :max-height="myHeight"
+            use-virtual
+            @table-body-scroll="tableScroll"
+            :row-height="rowHeight"
+          >
+            <u-table-column type="selection" align="center" width="50"/>
+            <u-table-column label="物料号" min-width="80px" align="center" prop="MATNR"/>
+            <u-table-column label="物料类型" min-width="90px" align="center" prop="MTART" />
+            <u-table-column label="物料组" min-width="80px" align="center" prop="MATKL"/>
+            <u-table-column label="物料描述" min-width="90px" align="center" prop="MAKTX" />
+            <u-table-column label="最后修改日期" min-width="80px" align="center" prop="LAEDA" />
+          </u-table>
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose" @click="sapCode.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
+          <el-button v-if="sapCode.dialogStatus==='sapCode' && isRoleEdit" class="save" :disabled="isokDisable" @click="sapCodeData()">确认</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <!-- 获取SAP编码 -->
+    <el-dialog :fullscreen="dialogFull" :visible.sync="sapCode2.dialogFormVisible" :close-on-click-modal="false" width="50%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[sapCode2.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-add">
+        <el-form ref="sapCode2" :rules="sapCode2.rules" :model="sapCode2.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
+          <el-row>
+            <el-col :span="18">
+              <el-form-item label="时间范围:" prop="inputDatetime">
+                <el-date-picker v-model="sapCode2.temp.inputDatetime" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')"  :start-placeholder="$t('common.startTime')"" :end-placeholder="$t('common.endTime')" style="width: 100%;" :clearable="false" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="18">
+              <el-form-item label="物料类型:" prop="sapMaterialtype">
+                <el-select v-model="sapCode2.temp.sapMaterialtype" filterable placeholder="物料类型" class="filter-item" style="width: 100%;">
+                  <el-option v-for="item in materialtypeList" :key="item.id" :label="item.distName" :value="item.distCode" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button class="cancelClose" @click="sapCode2.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
+          <el-button v-if="sapCode2.dialogStatus==='sapCode2' && isRoleEdit" class="save" :disabled="isokDisable" @click="sapCodeData2()">确认</el-button>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons,postJson } from '@/api/common'
+import Cookies from 'js-cookie'
+import Sortable from 'sortablejs'
+import Pagination from '@/components/Pagination'
+import axios from 'axios'
+import { getToken } from '@/utils/auth'
+import { parseTime, json2excel, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
+import { MessageBox } from 'element-ui'
+export default {
+  name: 'FeedTable',
+  components: { Pagination },
+  directives: {
+    limit: {
+      // 指令的定义
+      update: function(el) {
+        el.onkeypress = function(e) {
+          var code = e.charCode
+          if (code != 0) {
+            if (!String.fromCharCode(code).match(/[0-9\.]/)) {
+              return false
+            }
+          }
+        }
+        el.addEventListener('textInput', function(e) {
+          e.target.value = e.target.value.replace(/[^0-9\.]/g, '')
+        })
+        el.onkeyup = function(e) {
+          e.target.value = e.target.value.replace(/[^0-9\.]/g, '')
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      rowHeight: 30,
+      dialogFull: false,
+      isInforvalue: false,
+      isRoleEdit: [],
+      download: {
+        getdataListParm: {
+          name: 'getFeedList',
+          page: 1,
+          offset: 1,
+          pagecount: 0,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            fname: '',
+            fclassid: '',
+            source: '',
+            autozone: '',
+            autosecond: '',
+            allowratio: '',
+            printgroup: '',
+            enable: ''
+          }
+        },
+        list: []
+      },
+      requestParams: [
+        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['跳转延时'] },
+        { name: 'getFeedclassByBig', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
+        { name: 'getDictByName2', offset: 0, pagecount: 0, params: ['计划类型'] },
+        { name: 'getTMRListEnableTypeFeed', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'), eqtype: '4' }},
+        { name: 'getDistMateriel', offset: 0, pagecount: 0, params: [] },
+        { name: 'getDistGoods', offset: 0, pagecount: 0, params: [] },
+      ],
+      requestParams2: {
+        name: 'getSysoptEnable', offset: 0, parammaps: { pastureid: Cookies.get('pastureid'), inforname: 'isSmallMaterial' }
+      },
+      enableList: [{ id: '1', name: '是' }, { id: '0', name: '否' }], // 是否启用
+      feedSourcesList: [{ id: '0', name: '系统内置' }, { id: '1', name: '用户自定义' }], // 饲料来源
+      confirmStartList: [{ id: '0', name: '禁用' }, { id: '1', name: '启用' }], // 确认开始
+      associationStatusList: [{ id: '1', name: '是' }, { id: '0', name: '否' }], // 关联状态
+      jumpDelayList: [], // 跳转延时
+      feedTypeList: [], // 饲料分类
+      planTypeList: [], // 计划类型
+      smallMaterialList: [], // 小料秤
+      jmpList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 无上域
+      materialtypeList:[],//物料类型
+      sapGoodsList:[],//sap货位
+      sapCodeList:[],//sap编码
+      table: {
+        tableKey: 0,
+        list: [],
+        total: 0,
+        listLoading: true,
+        getdataListParm: {
+          name: 'getFeedList',
+          page: 1,
+          offset: 1,
+          pagecount: '',
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            fname: '',
+            fclassid: '',
+            source: '',
+            autozone: '',
+            autosecond: '',
+            allowratio: '',
+            printgroup: '',
+            enable: ''
+          }
+        }
+      },
+
+      // 多项搜索显示隐藏
+      arrowDown: true,
+      arrowUp: false,
+
+      // 新增/编辑
+      create: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp: { pastureid: Cookies.get('pastureid'), fname: '', fclassid: '', fclass: '', feedcode: '', source: '用户自定义', printgroupid: '1', printgroup: '无', unitweight: '', uprice: '', allowratio: '', autozone: '', autosecond: '0', autosecondname: '禁用', confirmstart: '0', confirmstartname: '禁用', enable: '1', trgaddress: '', backup1: '', backup2: '', backup3: '',feedgroupid:'',sapMaterialtype:'',sapGoods:'',sapCode:''},
+        rules: {
+          printgroupid :[{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
+          fname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
+          fclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
+          feedcode: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
+        }
+      },
+
+      // 饲料库
+      feedBank: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp: {},
+        rules: {},
+        tableKey: 0,
+        list: [],
+        total: 0,
+        listLoading: true,
+        getdataListParm: {
+          name: 'getFeednurList',
+          page: 1,
+          offset: 1,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            fname: '',
+            statue: ''
+          }
+        }
+      },
+      // 关联
+      relation: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp: {},
+        rules: {},
+        tableKey: 0,
+        list: [],
+        total: 0,
+        listLoading: true,
+        getdataListParm: {
+          name: 'getFeednurRelation',
+          page: 1,
+          offset: 1,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            fname: ''
+          }
+        }
+      },
+
+      // 营养价值
+      nutritive: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp: {},
+        rules: {}
+      },
+
+      sapCode:{
+        dialogFormVisible: false,
+        dialogStatus: '',
+        selectList:[],
+        table: {
+          tableKey: 0,
+          list: [],
+          total: 0,
+          listLoading: false,
+          getdataListParm: {
+            name: 'getFeedSap',
+            page: 1,
+            offset: 1,
+            pagecount: '',
+            returntype: 'Map',
+            parammaps: {
+              MAKTX:''
+            }
+          }
+        }
+      },
+      sapCode2:{
+        dialogFormVisible: false,
+        dialogStatus: '',
+        materialtypeList:[],
+        temp:{
+          inputDatetime: [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')],
+          sapMaterialtype:'',
+        },
+        rules: {
+          inputDatetime :[{required: true, message: '必填', trigger: 'blur' }],
+          sapMaterialtype: [{ required: true, message: '必填', trigger: 'blur' }],
+        }
+      },
+
+      textMap: {
+        create: '新增',
+        update: '编辑',
+        feedBank: '饲料库',
+        relation: '关联',
+        nutritive: '营养价值',
+        sapCode: '设置',
+        sapCode2: '获取SAP编码',
+      },
+
+      isokDisable: false,
+      selectList: [],
+      requestParam: {},
+      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      dropState: false,
+      isOrder: true,
+      ispalyUd: true,
+      myHeight:document.documentElement.clientHeight - 85- 150
+    }
+  },
+
+
+  computed: {
+    // 设置请求头
+    headers() {
+      return {
+        token: getToken()
+      }
+    },
+    uploadData() {
+      return {
+        name: 'checkFeedName,checkProjectType, checkFeedCode, checkFeedType, importFeed,updateFeedSortByCode',
+        importParams: '饲料名称,饲料类别,唯一编码,计划类型,包装单位重量,单价,允许误差数,跳转延时,确认开始,是否启用,继电器位置,无上域',
+        sheetname: 'Sheet1',
+        // 登录牧场
+        pastureid: Cookies.get('pastureid'),
+        // 日期参数
+        dateParams: '',
+        // 必填参数
+        requiredParams: '饲料名称,饲料分类',
+        // 为数值的参数
+        numParams: ''
+      }
+    },
+    // 设置上传地址
+    uploadExcelUrl() {
+      return Cookies.get('url') + 'authdata/ImportExcel'
+    }
+  },
+
+
+  mounted() {
+    document.addEventListener('click', (e) => {
+      if (this.$refs.selectInput !== undefined) {
+        if (!this.$refs.selectInput.contains(e.target)) {
+          this.arrowDown = true
+          this.arrowUp = false
+        } else {
+          this.arrowDown = false
+          this.arrowUp = true
+        }
+      }
+    })
+  },
+  created() {
+    this.getIspalyUd()
+    this.getList()
+    this.getDownList()
+    this.getButtons()
+    this.getInforvalueList()
+  },
+
+  methods: {
+
+    beforeImport(file) {
+      const isLt2M = file.size / 1024 / 1024 < 2
+      if (!isLt2M) {
+        this.$message.error('上传文件大小不能超过 2MB!')
+      }
+      return isLt2M
+    },
+    handleImportSuccess(res, file) {
+      this.getList()
+      if (res.msg === 'ok') {
+        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
+        if (res.data.err_count > 0) {
+          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
+           import('@/vendor/Export2Excel').then(excel => {
+             const list1 = res.data.result
+             const tHeader = [
+               '饲料名称', '饲料分类', '唯一编码', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03', '错误信息'
+             ]
+
+
+             const filterVal = [
+               '饲料名称', '饲料分类', '唯一编码', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03',  'error_msg'
+             ]
+             const data1 = this.formatJson(filterVal, list1)
+             excel.export_json_to_excel({ header: tHeader, data: data1, filename: '饲料表导入报错信息', autoWidth: true, bookType: 'xlsx' })
+           })
+        }
+      } else {
+        this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
+      }
+    },
+    formatJson(filterVal, jsonData) {
+      return jsonData.map(v =>
+        filterVal.map(j => {
+          if (j === 'timestamp') {
+            return parseTime(v[j])
+          } else {
+            return v[j]
+          }
+        })
+      )
+    },
+    handleExport(item) {
+      if (item == 1) {
+
+        console.log('点击了导出模板')
+        this.download.getdataListParm.parammaps = this.table.getdataListParm.parammaps
+        console.log('点击了导出模板',this.download.getdataListParm)
+
+        GetDataByName(this.download.getdataListParm).then(response => {
+          if (response.data.list !== null) {
+            this.download.list = response.data.list
+          } else {
+            this.download.list = []
+          }
+
+          console.log(this.download.list)
+          var downloadList = [
+            { 'obj1': '1、文件类型为xlsx类型,对应表格文件名格式为:文件名称.xlsx;' },
+            { 'obj1': '2、底部工作表名称不可更改,默认为:Sheet1;' },
+            // { 'obj1': '3、栏舍名称,实际牛头数,系数(%),系数头数,配方模板,补料配方字体为必填;' },
+            // { 'obj1': '4、第一列栏舍名称默认为系统中栏舍,不可修改;' },
+            // { 'obj1': '5、实际牛头数为正整数,系数为正数,至多保留俩位小数;' },
+            // { 'obj1': '6、配方模板名称必须与系统中配方计划—配方模板中的饲喂配方匹配;若补料配方开启,需与配方模板中的补料配方匹配;' },
+            // { 'obj1': '7、数据最多可导入200条,超过200条请分多个文件导入。' }
+          ]
+          var excelDatas = [
+            {
+              tHeader: [
+               '饲料名称', '饲料分类', '唯一编码',  '饲料来源', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03'
+             ],
+              filterVal:  ['', '', '', '', '','', '', '', '', '', '', '', '', '', '', ''],
+              tableDatas: this.download.list,
+              sheetName: 'Sheet1'
+            }, {
+              tHeader: ['填写规范:'],
+              filterVal: ['obj1'],
+              tableDatas: downloadList,
+              sheetName: 'Sheet2'
+            }
+          ]
+          json2excel(excelDatas, '饲料表导入模板', true, 'xlsx')
+        })
+
+
+        // console.log('点击了导出模板')
+        // const requestParam = this.requestParam
+        // const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/库存管理/饲料表导入模板.xlsx' // 请求下载文件的地址
+        // console.log(url)
+        // axios({
+        //   method: 'GET',
+        //   url: url,
+        //   data: requestParam,
+        //   headers: { token: getToken(), optname: 'insertcustomdoc' },
+        //   responseType: 'blob'
+        // }).then(res => {
+        //   if (!res) return
+        //   this.percentage = 99
+        //   setTimeout(() => {
+        //     this.isPercentage = false
+        //   }, 2000)
+        //   const blob = new Blob([res.data], {
+        //     type: 'application/octet-stream;charset=utf-8'
+        //   })
+        //   const url = window.URL.createObjectURL(blob)
+        //   const aLink = document.createElement('a')
+        //   aLink.style.display = 'none'
+        //   aLink.href = url
+        //   const docname = '饲料表导入模板.xlsx'
+        //   aLink.setAttribute('download', docname) // 下载的文件
+        //   document.body.appendChild(aLink)
+        //   aLink.click()
+        //   document.body.removeChild(aLink)
+        //   window.URL.revokeObjectURL(url)
+        // })
+      } else {
+        console.log('点击了导出数据')
+        this.download.getdataListParm.parammaps = this.table.getdataListParm.parammaps
+
+        GetDataByName(this.download.getdataListParm).then(response => {
+          if (response.data.list !== null) {
+            this.download.list = response.data.list
+          } else {
+            this.download.list = []
+          }
+          var excelDatas = [
+            {
+              tHeader: [
+               '饲料名称', '饲料分类', '唯一编码',  '饲料来源', '计划类型', '允许误差数(kg)', '包装单位重量(kg)', '单价', '跳转重量域(kg)', '跳转延时', '确认开始', '继电器位置', '无上域', '备用字段01', '备用字段02', '备用字段03'
+             ],
+              filterVal: ['fname', 'fclass', 'feedcode', 'source', 'printgroup', 'allowratio', 'unitweight', 'uprice', 'autozone', 'autosecondnam', 'onfirmstartname', 'trgaddress', 'jmp', 'backup1', 'backup2', 'backup3'],
+              tableDatas: this.download.list,
+              sheetName: 'Sheet1'
+            }
+          ]
+          json2excel(excelDatas, '饲料表', true, 'xlsx')
+        })
+      }
+    },
+    getButtons() {
+      const Edit = 'FeedTable'
+      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
+      this.isRoleEdit = isRoleEdit
+    },
+
+    getInforvalueList() {
+      GetDataByName(this.requestParams2).then(response => {
+        if (response.data !== null) {
+          if (response.data.list[0].inforvalue == 0) {
+            this.isInforvalue = false
+          } else {
+            this.isInforvalue = true
+          }
+        } else {
+          this.isInforvalue = false
+        }
+      })
+    },
+    getDownList() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.jumpDelayList = response.data.getDictByName.list
+        this.feedTypeList = response.data.getFeedclassByBig.list
+        this.planTypeList = response.data.getDictByName2.list
+        this.smallMaterialList = response.data.getTMRListEnableTypeFeed.list
+        this.materialtypeList = response.data.getDistMateriel	.list
+        this.sapGoodsList = response.data.getDistGoods.list
+      })
+    },
+
+    getList() {
+      this.table.listLoading = true
+      GetDataByName(this.table.getdataListParm).then(response => {
+        console.log('table数据', response.data.list)
+        if (response.data.list !== null) {
+          this.table.list = response.data.list
+          this.table.pageNum = response.data.pageNum
+          this.table.pageSize = response.data.pageSize
+        } else {
+          this.table.list = []
+        }
+        this.$refs.table.reloadData( this.table.list)
+        this.table.total = response.data.total
+        setTimeout(() => {
+          this.table.listLoading = false
+        }, 100)
+      })
+    },
+    tableScroll ({scrollTop, scrollLeft, table, judgeFlse}) {
+      // {scrollTop, scrollLeft, table, judgeFlse: 这个参数返回一个boolean值,为true则代表表格滚动到了底部了,false没有滚动到底部,必须开起大数据渲染模式才能有值哦}, event
+      console.log(scrollTop, scrollLeft, table, judgeFlse)
+    },
+    form_search() {
+      console.log('点击了查询')
+      this.table.getdataListParm.offset = 1
+      this.getList()
+      this.arrowDown = true
+      this.arrowUp = false
+    },
+    handleRefresh() {
+      console.log('点击了重置')
+      this.table.getdataListParm.parammaps.fname = ''
+      this.table.getdataListParm.parammaps.fclassid = ''
+      this.table.getdataListParm.parammaps.source = ''
+      this.table.getdataListParm.parammaps.autozone = ''
+      this.table.getdataListParm.parammaps.autosecond = ''
+      this.table.getdataListParm.parammaps.allowratio = ''
+      this.table.getdataListParm.parammaps.printgroup = ''
+      this.table.getdataListParm.parammaps.enable = ''
+      this.table.getdataListParm.offset = 1
+      this.getList()
+    },
+
+    resetTemp() {
+      this.create.temp = { pastureid: Cookies.get('pastureid'), fname: '', fclassid: '', fclass: '', feedcode: '', source: '用户自定义', printgroupid: '1', printgroup: '无', unitweight: '', uprice: '', allowratio: '', autozone: '', autosecond: '0', autosecondname: '禁用', confirmstart: '0', confirmstartname: '禁用', enable: '1', trgaddress: '', backup1: '', backup2: '', backup3: '', jmp: '0',feedgroupid:'' }
+    },
+    // 计划类型
+    changePlanList(item) {
+      console.log(item, '======')
+      this.create.temp.printgroup = this.planTypeList.find(obj => obj.value === item).label
+    },
+    // 饲料类型
+    changeFeedList(item) {
+      this.create.temp.fclass = this.feedTypeList.find(obj => obj.id === item).mixname
+    },
+    // 跳转延时
+    changeAutosecond(item) {
+      this.create.temp.autosecondname = this.jumpDelayList.find(obj => obj.value === item).label
+    },
+    // 确认开始
+    changeConfirmstart(item) {
+      this.create.temp.confirmstartname = this.confirmStartList.find(obj => obj.id === item).name
+    },
+    changeSmallMaterial(item) {
+      if (item !== '') {
+        this.create.temp.smtmrname = this.smallMaterialList.find(obj => obj.id === item).tname
+      } else {
+        this.create.temp.smtmrname = ''
+      }
+    },
+    // 新增
+    handleCreate() {
+      console.log('点击了新增')
+      this.resetTemp()
+      this.dialogFull = false
+      this.create.dialogStatus = 'create'
+      this.create.dialogFormVisible = true
+    },
+    createData() {
+      console.log('点击了新增保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['temp'].validate(valid => {
+        if (valid) {
+          const unitweight = /^[1-9]\d*$/
+          if (this.create.temp.unitweight !== '') {
+            if (!unitweight.test(parseFloat(this.create.temp.unitweight))) {
+              this.$message({ type: 'error', message: '包装单位重量请输入正整数', duration: 2000 })
+              return false
+            }
+          }
+          // const uprice = /^\d+(\.\d{1,2})?$/
+           const uprice =  /^(\d+|\d+\.\d{1,2})$/
+          if (this.create.temp.uprice !== '') {
+            if (!uprice.test(parseFloat(this.create.temp.uprice))) {
+              this.$message({ type: 'error', message: '单价请保留两位小数', duration: 2000 })
+              return false
+            }
+          }
+          if (this.create.temp.autozone !== '') {
+            const autozone = /^([0-9]|(1[0-9]|2[0-9]|3[0-9]|4[0-9]|(50)))$/
+            if (!autozone.test(parseFloat(this.create.temp.autozone))) {
+              this.$message({ type: 'error', message: '跳转重量域请输入大于等于0小于等于50的整数', duration: 2000 })
+              return false
+            }
+          } else {
+            this.create.temp.autozone = '0'
+          }
+          if (this.create.temp.trgaddress.length > 8) {
+            this.$message({ type: 'error', message: '继电器位置请输入1-8位数字', duration: 2000 })
+            return false
+          }
+          const allowratio = /^[0-9]\d*$/
+          if (this.create.temp.allowratio !== '') {
+            if (!allowratio.test(parseFloat(this.create.temp.allowratio))) {
+              this.$message({ type: 'error', message: '允许误差数请输入大于等于0的整数', duration: 2000 })
+              return false
+            }
+          }
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          this.requestParam.name = 'insertFeed'
+          this.requestParam.parammaps = this.create.temp
+          if (this.create.temp.allowratio == '') { this.create.temp.allowratio = '0' }
+          if (this.create.temp.uprice == '') { this.create.temp.uprice = '0' }
+          if (this.create.temp.unitweight == '') { this.create.temp.unitweight = '0' }
+          if (this.create.temp.autozone == '') { this.create.temp.autozone = '0' }
+          if (this.create.temp.trgaddress == '') { this.create.temp.trgaddress = '0' }
+          let url = 'authdata/feedbackup/check'
+          let data = {
+            fclassid:this.create.temp.fclassid,
+            backup1:this.create.temp.backup1
+          }
+          postJson(url,data).then(response => {
+            if(response.msg == 'fail'){
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
+              if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
+              if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
+              if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
+              if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
+            }else{
+              PostDataByName(this.requestParam).then(response => {
+                console.log('新增保存发送参数', this.requestParam)
+                if (response.msg !== 'fail') {
+                  this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+                  this.create.dialogFormVisible = false
+                  this.getList()
+                } else {
+                  this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+                  if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
+                  if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
+                  if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
+                  if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
+                  if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
+                }
+              })
+            }
+          })
+        }
+      })
+    },
+
+    // 编辑
+    handleUpdate(row) {
+      console.log('点击了编辑', row)
+      this.create.dialogStatus = 'update'
+      this.dialogFull = false
+      this.create.dialogFormVisible = true
+      row.fclassid = String(row.fclassid)
+      row.printgroupid = String(row.printgroupid)
+      row.autosecond = String(row.autosecond)
+      row.confirmstart = String(row.confirmstart)
+      row.enable = String(row.enable)
+      row.jmp = String(row.jmp)
+      if (row.printgroupid !== '') {
+        row.printgroup = this.planTypeList.find(obj => obj.value == row.printgroupid).label
+      }
+
+      this.create.temp = Object.assign({}, row)
+      if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
+      if (this.create.temp.uprice == '0.00') { this.create.temp.uprice = '' }
+      if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
+      if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
+      if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
+      if (this.create.temp.smtmrid == '-1') { this.create.temp.smtmrid = '' }
+      console.log(this.create.temp, '=====123')
+    },
+    updateData() {
+      console.log('点击了编辑保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.$refs['temp'].validate(valid => {
+        if (valid) {
+          const unitweight = /^[1-9]\d*$/
+          if (this.create.temp.unitweight !== '') {
+            if (!unitweight.test(parseFloat(this.create.temp.unitweight))) {
+              this.$message({ type: 'error', message: '包装单位重量请输入正整数', duration: 2000 })
+              return false
+            }
+          }
+          // const uprice = /^\d+(\.\d{1,2})?$/
+           const uprice =  /^(\d+|\d+\.\d{1,2})$/
+          if (this.create.temp.uprice !== '') {
+            if (!uprice.test(parseFloat(this.create.temp.uprice))) {
+              this.$message({ type: 'error', message: '单价请保留两位小数', duration: 2000 })
+              return false
+            }
+          }
+          if (this.create.temp.autozone !== '') {
+            const autozone = /^([0-9]|(1[0-9]|2[0-9]|3[0-9]|4[0-9]|(50)))$/
+            if (!autozone.test(parseFloat(this.create.temp.autozone))) {
+              this.$message({ type: 'error', message: '跳转重量域请输入大于等于0小于等于50的整数', duration: 2000 })
+              return false
+            }
+          } else {
+            this.create.temp.autozone = '0'
+          }
+
+          if (this.create.temp.trgaddress.length > 8) {
+            this.$message({ type: 'error', message: '继电器位置请输入1-8位数字', duration: 2000 })
+            return false
+          }
+          const allowratio = /^[0-9]\d*$/
+          if (this.create.temp.allowratio !== '') {
+            if (!allowratio.test(parseFloat(this.create.temp.allowratio))) {
+              this.$message({ type: 'error', message: '允许误差数请输入大于等于0的整数', duration: 2000 })
+              return false
+            }
+          }
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          this.requestParam.name = 'updateFeed'
+          this.requestParam.parammaps = this.create.temp
+          if (this.create.temp.allowratio == '') { this.create.temp.allowratio = '0' }
+          if (this.create.temp.uprice == '') { this.create.temp.uprice = '0' }
+          if (this.create.temp.unitweight == '') { this.create.temp.unitweight = '0' }
+          if (this.create.temp.autozone == '') { this.create.temp.autozone = '0' }
+          if (this.create.temp.trgaddress == '') { this.create.temp.trgaddress = '0' }
+          let url = 'authdata/feedbackup/check'
+          let data = {
+            fclassid:this.create.temp.fclassid,
+            feedId:this.create.temp.id,
+            backup1:this.create.temp.backup1
+          }
+          postJson(url,data).then(response => {
+            if(response.msg == 'fail'){
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
+              if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
+              if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
+              if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
+              if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
+            }else{
+              PostDataByName(this.requestParam).then(response => {
+                console.log('新增保存发送参数', this.requestParam)
+                if (response.msg !== 'fail') {
+                  this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+                  this.create.dialogFormVisible = false
+                  this.getList()
+                } else {
+                  this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+                  if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
+                  if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
+                  if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
+                  if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
+                  if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
+                }
+              })
+            }
+          })
+        }
+      })
+    },
+
+    // 饲料库
+    handleFeedBank() {
+      console.log('点击了饲料库')
+      this.dialogFull = false
+      this.feedBank.dialogStatus = 'feedBank'
+      this.feedBank.dialogFormVisible = true
+      this.getFeedBankList()
+    },
+    getFeedBankList() {
+      this.feedBank.listLoading = true
+      GetDataByName(this.feedBank.getdataListParm).then(response => {
+        console.log('table数据', response.data.list)
+        if (response.data.list !== null) {
+          this.feedBank.list = response.data.list
+          this.feedBank.pageNum = response.data.pageNum
+          this.feedBank.pageSize = response.data.pageSize
+          this.feedBank.total = response.data.total
+        } else {
+          this.feedBank.list = []
+        }
+        setTimeout(() => {
+          this.feedBank.listLoading = false
+        }, 100)
+      })
+    },
+    handleFeedBankSearch() {
+      console.log('点击了饲料库搜索')
+      this.getFeedBankList()
+      this.feedBank.getdataListParm.offset = 1
+    },
+    handleFeedBankRefresh() {
+      console.log('点击了饲料库重置')
+      this.feedBank.getdataListParm.parammaps.fname = ''
+      this.feedBank.getdataListParm.parammaps.statue = ''
+      this.getFeedBankList()
+    },
+
+    // 关联
+    handleRelation(row) {
+      console.log('点击了关联')
+      this.dialogFull = false
+      this.relation.dialogStatus = 'relation'
+      this.relation.dialogFormVisible = true
+      this.relation.temp = Object.assign({}, row)
+      this.relation.getdataListParm.parammaps.fid = this.relation.temp.id
+      this.getRelationList()
+    },
+    getRelationList() {
+      this.relation.listLoading = true
+      GetDataByName(this.relation.getdataListParm).then(response => {
+        console.log('table数据', response.data.list)
+        if (response.data.list !== null) {
+          this.relation.list = response.data.list
+          this.relation.pageNum = response.data.pageNum
+          this.relation.pageSize = response.data.pageSize
+          this.relation.total = response.data.total
+        } else {
+          this.relation.list = []
+        }
+        setTimeout(() => {
+          this.relation.listLoading = false
+        }, 100)
+      })
+    },
+    handleRelationSearch() {
+      console.log('点击了关联搜索')
+      this.relation.getdataListParm.offset = 1
+      this.getRelationList()
+    },
+    disassociateData(row) {
+      console.log('点击了取消关联')
+      MessageBox.confirm('是否确认取消关联?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.requestParam.name = 'updateFeedrelation'
+        this.requestParam.parammaps = {}
+        this.requestParam.parammaps.pastureid = this.relation.temp.pastureid
+        this.requestParam.parammaps.fid = this.relation.temp.id
+        this.requestParam.parammaps.id = row.id
+        PostDataByName(this.requestParam).then(response => {
+          console.log('取消关联保存发送参数', this.requestParam)
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.getRelationList()
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消' })
+      })
+    },
+    relationData(row) {
+      console.log('点击了关联保存')
+      MessageBox.confirm('是否确认关联?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        this.requestParam.name = 'insertFeednur'
+        this.requestParam.parammaps = {}
+        this.requestParam.parammaps.pastureid = this.relation.temp.pastureid
+        this.requestParam.parammaps.fid = this.relation.temp.id
+        this.requestParam.parammaps.fname = this.relation.temp.fname
+        this.requestParam.parammaps.feedcode = this.relation.temp.feedcode
+        this.requestParam.parammaps.price = row.price
+        this.requestParam.parammaps.remark = row.remark
+        this.requestParam.parammaps.dry = row.dry
+        this.requestParam.parammaps.starch = row.starch
+        this.requestParam.parammaps.cp = row.cp
+        this.requestParam.parammaps.ca = row.ca
+        this.requestParam.parammaps.p = row.p
+        this.requestParam.parammaps.n = row.n
+        this.requestParam.parammaps.fat = row.fat
+        this.requestParam.parammaps.adf = row.adf
+        this.requestParam.parammaps.ndf = row.ndf
+        this.requestParam.parammaps.ndip = row.ndip
+        this.requestParam.parammaps.ash = row.ash
+        this.requestParam.parammaps.fpercent = row.fpercent
+        this.requestParam.parammaps.iscu = row.iscu
+        this.requestParam.parammaps.feednurid = row.id
+        PostDataByName(this.requestParam).then(response => {
+          console.log('关联保存发送参数', this.requestParam)
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.getRelationList()
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消' })
+      })
+    },
+    // 营养价值
+    handleNutritive(row) {
+      console.log('点击了营养价值', row)
+      this.dialogFull = false
+      this.nutritive.dialogStatus = 'nutritive'
+      this.nutritive.dialogFormVisible = true
+      this.nutritive.temp = Object.assign({}, row)
+    },
+    nutritiveData() {
+      console.log('点击了营养价值保存')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      if (this.nutritive.temp.dry == undefined) { this.$set(this.nutritive.temp, 'dry', '') }
+      if (this.nutritive.temp.starch == undefined) { this.$set(this.nutritive.temp, 'starch', '') }
+      if (this.nutritive.temp.cp == undefined) { this.$set(this.nutritive.temp, 'cp', '') }
+      if (this.nutritive.temp.ca == undefined) { this.$set(this.nutritive.temp, 'ca', '') }
+      if (this.nutritive.temp.p == undefined) { this.$set(this.nutritive.temp, 'p', '') }
+      if (this.nutritive.temp.n == undefined) { this.$set(this.nutritive.temp, 'n', '') }
+      if (this.nutritive.temp.fat == undefined) { this.$set(this.nutritive.temp, 'fat', '') }
+      if (this.nutritive.temp.adf == undefined) { this.$set(this.nutritive.temp, 'adf', '') }
+      if (this.nutritive.temp.ndf == undefined) { this.$set(this.nutritive.temp, 'ndf', '') }
+      if (this.nutritive.temp.ndip == undefined) { this.$set(this.nutritive.temp, 'ndip', '') }
+      if (this.nutritive.temp.ash == undefined) { this.$set(this.nutritive.temp, 'ash', '') }
+      var positiveNumber = /^\d+(\.\d{1,2})?$/
+      if (this.nutritive.temp.dry !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.dry))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+      console.log(this.nutritive.temp.starch)
+      if (this.nutritive.temp.starch !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.starch))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.cp !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.cp))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.ca !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ca))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.p !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.p))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.n !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.n))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.fat !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.fat))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.adf !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.adf))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.ndf !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ndf))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.ndip !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ndip))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+
+      if (this.nutritive.temp.ash !== '') {
+        if (!positiveNumber.test(parseFloat(this.nutritive.temp.ash))) {
+          this.$message({ type: 'error', message: '请输入自然数,最多保留俩位小数', duration: 2000 })
+          return false
+        }
+      }
+      this.requestParam.name = 'insertFeednur'
+      this.requestParam.parammaps = {}
+      this.requestParam.parammaps.pastureid = this.nutritive.temp.pastureid
+      this.requestParam.parammaps.fid = this.nutritive.temp.id
+      this.requestParam.parammaps.fname = this.nutritive.temp.fname
+      this.requestParam.parammaps.feedcode = this.nutritive.temp.feedcode
+      this.requestParam.parammaps.price = this.nutritive.temp.uprice
+      this.requestParam.parammaps.remark = this.nutritive.temp.remark
+      this.requestParam.parammaps.dry = this.nutritive.temp.dry
+      this.requestParam.parammaps.starch = this.nutritive.temp.starch
+      this.requestParam.parammaps.cp = this.nutritive.temp.cp
+      this.requestParam.parammaps.ca = this.nutritive.temp.ca
+      this.requestParam.parammaps.p = this.nutritive.temp.p
+      this.requestParam.parammaps.n = this.nutritive.temp.n
+      this.requestParam.parammaps.fat = this.nutritive.temp.fat
+      this.requestParam.parammaps.adf = this.nutritive.temp.adf
+      this.requestParam.parammaps.ndf = this.nutritive.temp.ndf
+      this.requestParam.parammaps.ndip = this.nutritive.temp.ndip
+      this.requestParam.parammaps.ash = this.nutritive.temp.ash
+      this.requestParam.parammaps.fpercent = this.nutritive.temp.fpercent
+      this.requestParam.parammaps.iscu = this.nutritive.temp.iscu
+      this.requestParam.parammaps.feednurid = '-1'
+      PostDataByName(this.requestParam).then(response => {
+        console.log('关联保存发送参数', this.requestParam)
+        if (response.msg !== 'fail') {
+          this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+          this.getList()
+          this.nutritive.dialogFormVisible = false
+        } else {
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    },
+
+    // 行内删除
+    handleRowDelete(row) {
+      console.log('点击了行内删除')
+      MessageBox.confirm('是否确认删除此信息?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.selectList = []
+        this.requestParam = {}
+        this.requestParam.common = { 'returnmap': '0' }
+        this.requestParam.data = []
+        this.requestParam.data[0] = { 'name': 'checkDeleteFeed', 'type': 'v', 'parammaps': {
+          'pastureid': row.pastureid,
+          'id': row.id
+        }}
+        this.requestParam.data[1] = { 'name': 'deleteFeed', 'type': 'e', 'parammaps': {
+          'pastureid': row.pastureid,
+          'id': row.id
+        }}
+        ExecDataByConfig(this.requestParam).then(response => {
+          console.log('删除保存发送参数', this.requestParam)
+          if (response.msg === 'fail') {
+            this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
+            this.getList()
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+    handleSelectionChange(val) {
+      console.log('勾选数据', val)
+      this.selectList = val
+    },
+    // 多项删除
+    form_delete() {
+      console.log('点击了删除')
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择饲料表信息', duration: 2000 })
+      } else {
+        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否删除?', {
+          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+        }).then(() => {
+          this.requestParam = {}
+          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.data = []
+          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+          this.requestParam.data[0].children = []
+          this.requestParam.data[0].children[0] = { 'name': 'checkDeleteFeed', 'type': 'v', 'parammaps': {
+            id: '@insertSpotList.id',
+            pastureid: '@insertSpotList.pastureid'
+          }}
+          this.requestParam.data[0].children[1] = { 'name': 'deleteFeed', 'type': 'e', 'parammaps': {
+            id: '@insertSpotList.id',
+            pastureid: '@insertSpotList.pastureid'
+          }}
+          ExecDataByConfig(this.requestParam).then(response => {
+            console.log('删除保存发送参数', this.requestParam)
+            if (response.msg === 'fail') {
+              this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
+              this.getList()
+            }
+          })
+        })
+      }
+    },
+
+    handleChangeOrder() {
+      this.isOrder = false
+      this.rowDrop()
+    },
+
+    saveChangeOrder() {
+      // 保存顺序
+      var sortArr = []
+      for (let i = 0; i < this.table.list.length; i++) {
+        var obj = {}
+        obj.sort = i + 1
+        obj.id = this.table.list[i].id
+        obj.pastureid = this.table.list[i].pastureid
+        sortArr.push(obj)
+      }
+      this.requestParam = {}
+      this.requestParam.common = { 'returnmap': '0' }
+      this.requestParam.data = []
+      this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': sortArr }}
+      this.requestParam.data[0].children = []
+      this.requestParam.data[0].children[0] = { 'name': 'updateFeedSort', 'type': 'e', 'parammaps': {
+        id: '@insertSpotList.id',
+        pastureid: '@insertSpotList.pastureid',
+        sort: '@insertSpotList.sort'
+      }}
+      ExecDataByConfig(this.requestParam).then(response => {
+        console.log('顺序切换保存发送参数', this.requestParam)
+        if (response.msg === 'fail') {
+          this.$notify({ title: '顺序切换失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '顺序切换成功', type: 'success', duration: 2000 })
+          this.getList()
+          this.isOrder = true
+        }
+      })
+    },
+    cancelChangeOrder() {
+      // 取消顺序
+      this.getList()
+      this.isOrder = true
+    },
+
+     // 行拖拽
+    rowDrop() {
+      console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
+      const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
+      const that = this
+      var sortable = Sortable.create(tbody, {
+        disabled: that.dropState,
+        onChoose({ newIndex, oldIndex }) {
+          if (that.dropState == true) {
+            sortable.destroy()
+          }
+        },
+        onEnd({ newIndex, oldIndex }) {
+          const currRow = that.table.list.splice(oldIndex, 1)[0]
+          that.table.list.splice(newIndex, 0, currRow)
+          console.log('索引', newIndex)
+          console.log('拖动数据', currRow)
+          console.log('上', that.table.list[newIndex - 1])
+          console.log('下', that.table.list[newIndex + 1])
+        }
+      })
+    },
+    handleSet(){
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择一条信息', duration: 2000 })
+      } else {
+        this.dialogFull = false
+        this.sapCode.dialogStatus = 'sapCode'
+        this.sapCode.dialogFormVisible = true
+        this.sapCode.table.getdataListParm.parammaps.MAKTX = this.selectList[0].sapCode
+        this.getsapCodeList()
+      }
+    },
+    getsapCodeList(){
+      GetDataByName(this.sapCode.table.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          this.sapCode.table.list = response.data.list
+        } else {
+          this.sapCode.table.list = []
+        }
+         this.$refs.saptable.reloadData(this.sapCode.table.list)
+      })
+    },
+    handleSapCodeSearch(){
+      this.getsapCodeList()
+    },
+    sapCodeData(){
+      if(this.sapCode.selectList.length>1 || this.sapCode.selectList.length == 0){
+        this.$message({ type: 'error', message: '请选择一条信息', duration: 2000 })
+      }else{
+        this.requestParam.name = 'updateFeedSapCode'
+        let data = {
+          name:'updateFeedSapCode',
+          parammaps:{
+            sapCode:this.sapCode.selectList[0].MATNR,
+            id:this.selectList[0].id
+          }
+        }
+        PostDataByName(data).then(response => {
+          console.log('新增保存发送参数', data)
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.sapCode.dialogFormVisible = false
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            if (this.create.temp.allowratio == '0') { this.create.temp.allowratio = '' }
+            if (this.create.temp.uprice == '0') { this.create.temp.uprice = '' }
+            if (this.create.temp.unitweight == '0') { this.create.temp.unitweight = '' }
+            if (this.create.temp.autozone == '0') { this.create.temp.autozone = '' }
+            if (this.create.temp.trgaddress == '0') { this.create.temp.trgaddress = '' }
+          }
+        })
+      }
+    },
+    handleSapCodeSelectionChange(val){
+      this.sapCode.selectList = val
+      console.log(this.sapCode.selectList,'this.sapCode.selectList')
+    },
+    handleGetSapCode(){
+        this.dialogFull = false
+        this.sapCode2.dialogStatus = 'sapCode2'
+        this.sapCode2.dialogFormVisible = true
+    },
+    sapCodeData2(){
+      this.$refs['sapCode2'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/sap/feed'
+          let data = {
+            startTime:parseTime(this.sapCode2.temp.inputDatetime[0],'{y}-{m}-{d}'),
+            endTime:parseTime(this.sapCode2.temp.inputDatetime[1],'{y}-{m}-{d}'),
+            mtart:this.sapCode2.temp.sapMaterialtype,
+            pastureId:Cookies.get('pastureid')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapCode2.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    getIspalyUd(){
+      let url = 'authdata/GetDataByName'
+      let data = {
+        "name":"getSysoptEnable","page":1,"offset":1,"pagecount":1,"returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"inforname":"gmUdSync"}
+      }
+      postJson(url,data).then(response => {
+        if (response.msg !== 'fail') {
+          if(response.data.list[0].inforvalue == 0){
+            this.ispalyUd = false
+          }else{
+            this.ispalyUd = true
+          }
+        } else {
+          this.$notify({ title: '请求失败', message: response.data, type: 'warning', duration: 2000 })
+        }
+      })
+    },
+    handleGetUd(){
+      MessageBox.confirm('是否获取UD饲料?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        let url = 'authdata/gm/udfeed'
+        let data = {
+          pastureId:Cookies.get('pastureid')
+        }
+        postJson(url,data).then(response => {
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .search{margin-top:10px;}
+  $width:350px;
+  $left:325px;
+  .selectInput{
+    position: relative;
+    display: inline-block;
+    .Input{width: $width;position: relative;}
+    .el-icon-arrow-down{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
+    .el-icon-arrow-up{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
+    .selectUl{
+      z-index: 111;width: $width;background: #fff;border: 1px solid #E4E7ED;box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);margin: -1px 0 0 0;padding: 6px 0; margin: 0;box-sizing: border-box;position: absolute;
+      li{
+        list-style: none;font-size: 14px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #606266; height: 50px; line-height: 50px; box-sizing: border-box; cursor: pointer;
+        a{float:left;width: 80px;}
+        a:hover{color: rgba(0, 204, 102, 0.71); font-weight: 700;}
+      }
+    }
+  }
+ </style>

+ 3 - 2
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -9,7 +9,8 @@
         <el-date-picker v-model="table.getdataListParm.parammaps.mydate" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :clearable="false" @change="changeDate" />
         <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore" />
         <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
-        <el-select v-model="table.getdataListParm.parammaps.lpplantype" filterable placeholder="计划类型" class="filter-item" clearable style="width: 120px;" @change="changePlanType">
+        <el-select v-model="table.getdataListParm.parammaps.lpplantype" filterable
+:placeholder="$t('processAnalysis.planType')"class="filter-item" clearable style="width: 120px;" @change="changePlanType">
           <el-option v-for="item in planTypeList" :key="item.value" :label="item.lable" :value="item.value" />
         </el-select>
         <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" clearable @change="changeFrequency">
@@ -24,7 +25,7 @@
         <el-select v-model="table.getdataListParm.parammaps.enable3" filterable placeholder="导出类型" class="filter-item" style="width: 120px;" :clearable="false">
           <el-option v-for="item in exportTypeList" :key="item.value" :label="item.lable" :value="item.value" />
         </el-select>
-        <el-select v-model="table.getdataListParm.parammaps.tmrname" filterable placeholder="TMR名称" class="filter-item" style="width: 120px;" :clearable="false">
+        <el-select v-model="table.getdataListParm.parammaps.tmrname" filterable  :placeholder="$t('processAnalysis.tmrName')"   class="filter-item" style="width: 120px;" :clearable="false">
           <el-option v-for="item in tmrDownList" :key="item.tmrname" :label="item.tmrname" :value="item.tmrtname" />
         </el-select>
         <el-select v-model="table.getdataListParm.parammaps.iscompleted" filterable placeholder="执行状态" class="filter-item" style="width: 120px;" :clearable="false">

+ 1 - 1
src/views/statisticalAnalysis/errorAnalysis/group/tab1.vue

@@ -348,7 +348,7 @@
           <el-input v-if="pasture.isLivestockType" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="牲畜名称" />
           <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.sort" class="filter-item" style="width: 150px;" placeholder="车次" />
           <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.times" class="filter-item" style="width: 150px;" placeholder="班次" />
-          <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 150px;" placeholder="TMR名称" />
+          <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 150px;"  :placeholder="$t('processAnalysis.tmrName')"   />
           <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
         </div>
         <div class="table">

+ 1 - 1
src/views/statisticalAnalysis/errorAnalysis/group/tab2.vue

@@ -10,7 +10,7 @@
         <el-select v-model="table.getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 120px;float: left;">
           <el-option v-for="item in pastureList" :key="item.pastureid" :label="item.pasturename" :value="item.pastureid" />
         </el-select>
-        <el-input v-model="table.getdataListParm.parammaps.tmrtname" style="width: 110px;float: left;" placeholder="TMR名称" class="filter-item" clearable />
+        <el-input v-model="table.getdataListParm.parammaps.tmrtname" style="width: 110px;float: left;"  :placeholder="$t('processAnalysis.tmrName')"   class="filter-item" clearable />
         <el-input v-model="table.getdataListParm.parammaps.projname" style="width: 100px;float: left;" placeholder="车次" class="filter-item" clearable />
         <el-select v-model="table.getdataListParm.parammaps.times" style="width: 100px;float: left;" filterable placeholder="班次" class="filter-item" clearable>
           <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />

+ 1 - 1
src/views/statisticalAnalysis/errorAnalysis/group/tab3.vue

@@ -10,7 +10,7 @@
         <el-select v-model="table.getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 110px;float: left;">
           <el-option v-for="item in pastureList" :key="item.pastureid" :label="item.pasturename" :value="item.pastureid" />
         </el-select>
-        <el-input v-model="table.getdataListParm.parammaps.tmrtname" style="width: 110px;float: left;" placeholder="TMR名称" class="filter-item" clearable />
+        <el-input v-model="table.getdataListParm.parammaps.tmrtname" style="width: 110px;float: left;"  :placeholder="$t('processAnalysis.tmrName')"   class="filter-item" clearable />
         <el-input v-model="table.getdataListParm.parammaps.projname" style="width: 110px;float: left;" placeholder="车次" class="filter-item" clearable />
         <el-select v-model="table.getdataListParm.parammaps.times" style="width: 110px;float: left;" filterable placeholder="班次" class="filter-item" clearable>
           <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />

+ 1 - 1
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -21,7 +21,7 @@
           <el-select v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" clearable>
             <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
-          <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 100px;" placeholder="TMR名称" />
+          <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 100px;"  :placeholder="$t('processAnalysis.tmrName')"   />
           <el-select v-if="tab.isTMRName" v-model="tab.table.getdataListParm.parammaps.fname" placeholder="请选择TMR设备" class="filter-item" style="width: 150px;">
             <el-option v-for="(item,index) in tab.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
           </el-select>

+ 231 - 167
src/views/statisticalAnalysis/processAnalysis/group/index.vue

@@ -3,17 +3,18 @@
   <div class="app-container">
     <!-- <h1>集团</h1> -->
     <div class="search">
-      <el-select v-model="table.getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 120px;">
+      <el-select v-model="table.getdataListParm.parammaps.pastureid" :placeholder="$t('processAnalysis.pastureName')" class="filter-item" style="width: 120px;">
         <el-option v-for="item in pastureList" :key="item.pastureid" :label="item.pasturename" :value="item.pastureid" />
       </el-select>
       <el-date-picker v-model="table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')"  :start-placeholder="$t('common.startTime')"" :end-placeholder="$t('common.endTime')" style="width: 250px;" :picker-options="pickerOptions" />
       <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
       <el-button class="el-icon-arrow-right elIconArrowRight" :disabled="Nextdisabled" @click="handleNext" />
-      <el-select v-model="table.getdataListParm.parammaps.lpplantype" placeholder="计划类型" class="filter-item" style="width: 120px;" clearable>
+      <el-select v-model="table.getdataListParm.parammaps.lpplantype"
+:placeholder="$t('processAnalysis.planType')" class="filter-item" style="width: 120px;" clearable>
         <el-option v-for="item in planTypeList" :key="item.value" :label="item.lable" :value="item.value" />
       </el-select>
-      <el-input v-model="table.getdataListParm.parammaps.tmrtname" placeholder="TMR名称" style="width: 180px;" class="filter-item" clearable />
-      <el-select v-model="table.getdataListParm.parammaps.iscompleted" placeholder="工作状态" class="filter-item" style="width: 120px;" clearable>
+      <el-input v-model="table.getdataListParm.parammaps.tmrtname"  :placeholder="$t('processAnalysis.tmrName')"   style="width: 180px;" class="filter-item" clearable />
+      <el-select v-model="table.getdataListParm.parammaps.iscompleted"  :placeholder="$t('processAnalysis.workStatus')"   class="filter-item" style="width: 120px;" clearable>
         <el-option v-for="item in workingConditionList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
@@ -21,7 +22,7 @@
     </div>
     <el-row :gutter="20">
       <el-col :span="8">
-        <h4>TMR设备列表</h4>
+        <h4>{{$t('processAnalysis.tmrName1')}}</h4>
         <div class="table">
           <el-table
             :key="table.tableKey"
@@ -38,44 +39,44 @@
             height="970px"
             @row-click="rowClick"
           >
-            <el-table-column sortable label="牧场" min-width="80px" align="center" prop="pastureName" />
-            <el-table-column sortable label="开始时间" min-width="100px" align="center" prop="intime" />
-            <el-table-column sortable label="计划类型" min-width="80px" align="center" prop="lpplantype" />
-            <el-table-column sortable label="描述" min-width="90px" align="center" prop="remark" />
-            <el-table-column sortable label="TMR名称" min-width="80px" align="center" prop="tmrtname" />
+            <el-table-column sortable :label="$t('processAnalysis.pastureName')" min-width="80px" align="center" prop="pastureName" />
+            <el-table-column sortable :label="$t('processAnalysis.startDate')"min-width="100px" align="center" prop="intime" />
+            <el-table-column sortable :label="$t('processAnalysis.planType')"  min-width="80px" align="center" prop="lpplantype" />
+            <el-table-column sortable :label="$t('processAnalysis.remark')"min-width="90px" align="center" prop="remark" />
+            <el-table-column sortable :label="$t('processAnalysis.tmrName')" min-width="80px" align="center" prop="tmrtname" />
           </el-table>
         </div>
       </el-col>
-      <!-- 预混计划 -->
-      <el-col v-if="isPremixedPlan" :span="16">
+    <!-- 预混计划 -->
+    <el-col v-if="isPremixedPlan" :span="16">
         <div class="title">
-          <b>过程详情</b>
+          <b>{{$t('processAnalysis.processdel')}}</b>
           <span>&nbsp;({{ title }})</span>
         </div>
-        <div class="detail">
+        <div class="detail" :lang="$i18n.locale">
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>过程时间</span>
+            <span>{{$t('processAnalysis.proesstime')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>混料时间</span>
+            <span>{{$t('processAnalysis.proesstime1')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].iscompleted }}</b>
-            <span>工作状态</span>
+            <span>{{$t('processAnalysis.workStatus')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
-            <b>{{ table2.list[0].Hdif }}kg</b>
-            <span>混料误差值</span>
+            <b>{{ table2.list[0].Hdif }}</b>
+            <span>{{$t('processAnalysis.hlwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].HdifRate }}</b>
-            <span>混料准确率</span>
+            <span>{{$t('processAnalysis.hlzq')}}</span>
           </div>
         </div>
         <div class="Mixture">
-          <h4>混料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table3.tableKey"
             v-loading="table3.listLoading"
@@ -84,64 +85,69 @@
             border
             fit
             highlight-current-row
-            style="width: 100%;"
+            style="width: 98%;"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
             max-height="270px"
           >
-            <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
-            <el-table-column label="饲料名称" min-width="70px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="50px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="70px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="70px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="70px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="70px" align="center" prop="actualweight" />
+            <el-table-column :label="$t('processAnalysis.sort')" min-width="60px" align="center" prop="sort" />
+            <el-table-column :label="$t('processAnalysis.fname')" min-width="60px" align="center" prop="fname" />
+            <el-table-column :label="$t('processAnalysis.lweight')" min-width="60px" align="center" prop="lweight" />
+            <el-table-column :label="$t('processAnalysis.actualweightminus')" min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column :label="$t('processAnalysis.diff')" min-width="60px" align="center" prop="diff" />
+            <el-table-column :label="$t('processAnalysis.diffRate')" min-width="60px" align="center" prop="diffRate" />
+            <el-table-column :label="$t('processAnalysis.intime')" min-width="60px" align="center" prop="intime" />
+            <el-table-column :label="$t('processAnalysis.proesstime')" min-width="60px" align="center" prop="proesstime" />
+            <el-table-column :label="$t('processAnalysis.buttontype')" min-width="60px" align="center" prop="buttontype" />
+            <el-table-column :label="$t('processAnalysis.lastactualweight')" min-width="60px" align="center" prop="lastactualweight" />
+            <el-table-column :label="$t('processAnalysis.actualweight')" min-width="60px" align="center" prop="actualweight" />
           </el-table>
         </div>
       </el-col>
       <!-- 撒料计划 -->
       <el-col v-if="isSpreadingPlan" :span="16">
         <div class="title">
-          <b>过程详情</b>
+          <b>{{$t('processAnalysis.processdel')}}</b>
           <span>&nbsp;({{ title }})</span>
         </div>
         <div class="detail">
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>过程时间</span>
+            <span>{{$t('processAnalysis.proesstime')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>混料时间</span>
+            <span>{{$t('processAnalysis.proesstime1')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].iscompleted }}</b>
-            <span>工作状态</span>
+            <span>{{$t('processAnalysis.workStatus')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].Hdif }}kg</b>
-            <span>混料误差值</span>
+            <span>{{$t('processAnalysis.hlwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].HdifRate }}</b>
-            <span>混料准确率</span>
+            <span>{{$t('processAnalysis.hlzq')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].Sdif }}kg</b>
-            <span>撒料误差值</span>
+            <span>{{$t('processAnalysis.slwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].SdifRate }}</b>
-            <span>撒料准确率</span>
+            <span>{{$t('processAnalysis.slzq')}}</span>
           </div>
         </div>
         <div class="Mixture">
-          <h4>混料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table3.tableKey"
             v-loading="table3.listLoading"
@@ -150,28 +156,33 @@
             border
             fit
             highlight-current-row
-            style="width: 100%;"
+            style="width: 98%;"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
-            max-height="200px"
+            max-height="270px"
           >
-            <el-table-column label="操作编号" min-width="110px" align="center" prop="sort" />
-            <el-table-column label="饲料名称" min-width="110px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="110px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="110px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="110px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="110px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="110px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="110px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="110px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="110px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="110px" align="center" prop="actualweight" />
+            <el-table-column :label="$t('processAnalysis.sort')" min-width="70px" align="center" prop="sort" />
+            <el-table-column :label="$t('processAnalysis.fname')" min-width="70px" align="center" prop="fname" />
+            <el-table-column :label="$t('processAnalysis.lweight')" min-width="50px" align="center" prop="lweight" />
+            <el-table-column :label="$t('processAnalysis.actualweightminus')"  min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column :label="$t('processAnalysis.diff')"  min-width="70px" align="center" prop="diff" />
+            <el-table-column :label="$t('processAnalysis.diffRate')"  min-width="70px" align="center" prop="diffRate" />
+            <el-table-column :label="$t('processAnalysis.intime')"  min-width="70px" align="center" prop="intime" />
+            <el-table-column :label="$t('processAnalysis.proesstime')"  min-width="70px" align="center" prop="proesstime" />
+            <el-table-column :label="$t('processAnalysis.buttontype')"  min-width="70px" align="center" prop="buttontype" />
+            <el-table-column :label="$t('processAnalysis.lastactualweight')"  min-width="70px" align="center" prop="lastactualweight" />
+            <el-table-column :label="$t('processAnalysis.actualweight')"  min-width="70px" align="center" prop="actualweight" />
           </el-table>
         </div>
 
         <div class="SpreadingMaterials">
-          <h4>撒料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table4.tableKey"
             v-loading="table4.listLoading"
@@ -180,44 +191,49 @@
             border
             fit
             highlight-current-row
-            style="width: 100%;"
+            style="width: 98%;"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
-            height="200px"
+            max-height="260px"
           >
-            <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
-            <el-table-column label="栏舍名称" min-width="70px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="70px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="70px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="70px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="70px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="70px" align="center" prop="actualweight" />
+            <el-table-column :label="$t('processAnalysis.sort')" min-width="70px" align="center" prop="sort" />
+            <el-table-column :label="栏舍名称" min-width="70px" align="center" prop="fname" />
+            <el-table-column :label="$t('processAnalysis.lweight')" min-width="70px" align="center" prop="lweight" />
+            <el-table-column :label="$t('processAnalysis.actualweightminus')"  min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column :label="$t('processAnalysis.diff')"  min-width="70px" align="center" prop="diff" />
+            <el-table-column :label="$t('processAnalysis.diffRate')"  min-width="70px" align="center" prop="diffRate" />
+            <el-table-column :label="$t('processAnalysis.intime')"  min-width="70px" align="center" prop="intime" />
+            <el-table-column :label="$t('processAnalysis.proesstime')"  min-width="70px" align="center" prop="proesstime" />
+            <el-table-column :label="$t('processAnalysis.buttontype')"  min-width="70px" align="center" prop="buttontype" />
+            <el-table-column :label="$t('processAnalysis.lastactualweight')"  min-width="70px" align="center" prop="lastactualweight" />
+            <el-table-column :label="$t('processAnalysis.actualweight')"  min-width="70px" align="center" prop="actualweight" />
           </el-table>
         </div>
         <div class="ControlChart">
-          <h4>监控图</h4>
+          <h4>{{$t('processAnalysis.watchPlan')}}</h4>
           <div id="chartLine" style="width: 100%;height:300px;" />
         </div>
       </el-col>
       <!-- 剩料计划 -->
       <el-col v-if="isResidualMaterialPlan" :span="16">
         <div class="title">
-          <b>过程详情</b>
+          <b>{{$t('processAnalysis.processdel')}}</b>
           <span>&nbsp;({{ title }})</span>
         </div>
         <div class="detail">
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>过程时间</span>
+            <span>{{$t('processAnalysis.proesstime')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].iscompleted }}</b>
-            <span>工作状态</span>
+            <span>{{$t('processAnalysis.workStatus')}}</span>
           </div>
         </div>
         <div class="Mixture">
@@ -230,20 +246,32 @@
             border
             fit
             highlight-current-row
-            style="width: 100%;"
+            style="width: 98%;"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
-            height="200px"
+            max-height="260px"
           >
-            <el-table-column label="操作编号" min-width="110px" align="center" prop="sort" />
-            <el-table-column label="栏舍名称" min-width="110px" align="center" prop="fname" />
-            <el-table-column label="剩料采集重量(kg)" min-width="110px" align="center" prop="sweight" />
+            <el-table-column label="$t('processAnalysis.sort')" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.sort }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="栏舍名称" min-width="90px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.fname }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="剩料采集重量(kg)" min-width="110px" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.row.sweight }}</span>
+              </template>
+            </el-table-column>
           </el-table>
         </div>
 
         <div class="SpreadingMaterials">
-          <h4>撒料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table4.tableKey"
             v-loading="table4.listLoading"
@@ -253,13 +281,13 @@
             border
             fit
             highlight-current-row
-            style="width: 100%;"
+            style="width: 98%;"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
-            height="200px"
+            max-height="260px"
           >
-            <el-table-column label="操作编号" min-width="110px" align="center" prop="sort" />
+            <el-table-column label="$t('processAnalysis.sort')" min-width="110px" align="center" prop="sort" />
             <el-table-column label="转投栏舍" min-width="110px" align="center" prop="fname" />
             <el-table-column label="允许分配剩料量" min-width="110px" align="center" prop="lweight" />
             <el-table-column label="实际分配重量(kg)" min-width="110px" align="center" prop="actualweightminus" />
@@ -270,41 +298,41 @@
       <!-- 撒料计划-混料 -->
       <el-col v-if="isSpreadingPlanSH" :span="16">
         <div class="title">
-          <b>过程详情</b>
+          <b>{{$t('processAnalysis.processdel')}}</b>
           <span>&nbsp;({{ title }})</span>
         </div>
         <div class="detail">
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>过程时间</span>
+            <span>{{$t('processAnalysis.proesstime')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>混料时间</span>
+            <span>{{$t('processAnalysis.proesstime1')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].iscompleted }}</b>
-            <span>工作状态</span>
+            <span>{{$t('processAnalysis.workStatus')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].Hdif }}kg</b>
-            <span>混料误差值</span>
+            <span>{{$t('processAnalysis.hlwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].HdifRate }}</b>
-            <span>混料准确率</span>
+            <span>{{$t('processAnalysis.hlzq')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].Sdif }}kg</b>
-            <span>撒料误差值</span>
+            <span>{{$t('processAnalysis.slwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].SdifRate }}</b>
-            <span>撒料准确率</span>
+            <span>{{$t('processAnalysis.slzq')}}</span>
           </div>
         </div>
         <div class="Mixture">
-          <h4>混料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table3.tableKey"
             v-loading="table3.listLoading"
@@ -318,23 +346,29 @@
             :cell-style="cellStyle"
             class="elTable table-fixed"
             max-height="270px"
+
           >
-            <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
-            <el-table-column label="饲料名称" min-width="60px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="60px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="60px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="60px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="60px" align="center" prop="actualweight" />
+            <el-table-column :label="$t('processAnalysis.sort')" min-width="60px" align="center" prop="sort" />
+            <el-table-column :label="$t('processAnalysis.fname')" min-width="60px" align="center" prop="fname" />
+            <el-table-column :label="$t('processAnalysis.lweight')" min-width="60px" align="center" prop="lweight" />
+            <el-table-column :label="$t('processAnalysis.actualweightminus')"  min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column :label="$t('processAnalysis.diff')"  min-width="60px" align="center" prop="diff" />
+            <el-table-column :label="$t('processAnalysis.diffRate')"  min-width="60px" align="center" prop="diffRate" />
+            <el-table-column :label="$t('processAnalysis.intime')"  min-width="60px" align="center" prop="intime" />
+            <el-table-column :label="$t('processAnalysis.proesstime')"  min-width="60px" align="center" prop="proesstime" />
+            <el-table-column :label="$t('processAnalysis.buttontype')"  min-width="60px" align="center" prop="buttontype" />
+            <el-table-column :label="$t('processAnalysis.lastactualweight')"  min-width="60px" align="center" prop="lastactualweight" />
+            <el-table-column :label="$t('processAnalysis.actualweight')"  min-width="60px" align="center" prop="actualweight" />
           </el-table>
         </div>
 
         <div class="SpreadingMaterials">
-          <h4>撒料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table4.tableKey"
             v-loading="table4.listLoading"
@@ -347,64 +381,69 @@
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
-            max-height="200px"
+            max-height="260px"
           >
-            <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
+            <el-table-column label="$t('processAnalysis.sort')" min-width="60px" align="center" prop="sort" />
             <el-table-column label="撒料车辆" min-width="60px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="60px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="60px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="60px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="60px" align="center" prop="actualweight" />
+            <el-table-column label="$t('processAnalysis.lweight')" min-width="60px" align="center" prop="lweight" />
+            <el-table-column label="$t('processAnalysis.actualweightminus')"  min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column label="$t('processAnalysis.diff')"  min-width="60px" align="center" prop="diff" />
+            <el-table-column label="$t('processAnalysis.diffRate')"  min-width="60px" align="center" prop="diffRate" />
+            <el-table-column label="$t('processAnalysis.intime')"  min-width="60px" align="center" prop="intime" />
+            <el-table-column label="$t('processAnalysis.proesstime')"  min-width="60px" align="center" prop="proesstime" />
+            <el-table-column label="$t('processAnalysis.buttontype')"  min-width="60px" align="center" prop="buttontype" />
+            <el-table-column label="$t('processAnalysis.lastactualweight')"  min-width="60px" align="center" prop="lastactualweight" />
+            <el-table-column label="$t('processAnalysis.actualweight')"  min-width="60px" align="center" prop="actualweight" />
           </el-table>
         </div>
         <div class="ControlChart">
-          <h4>监控图</h4>
+          <h4>{{$t('processAnalysis.watchPlan')}}</h4>
           <div id="chartLine" style="width: 100%;height:300px;" />
         </div>
       </el-col>
       <!-- 撒料计划-撒料 -->
       <el-col v-if="isSpreadingPlanSS" :span="16">
         <div class="title">
-          <b>过程详情</b>
+          <b>{{$t('processAnalysis.processdel')}}</b>
           <span>&nbsp;({{ title }})</span>
         </div>
         <div class="detail">
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>过程时间</span>
+            <span>{{$t('processAnalysis.proesstime')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
-            <span>混料时间</span>
+            <span>{{$t('processAnalysis.proesstime1')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].iscompleted }}</b>
-            <span>工作状态</span>
+            <span>{{$t('processAnalysis.workStatus')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].Hdif }}kg</b>
-            <span>混料误差值</span>
+            <span>{{$t('processAnalysis.hlwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].HdifRate }}</b>
-            <span>混料准确率</span>
+            <span>{{$t('processAnalysis.hlzq')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].Sdif }}kg</b>
-            <span>撒料误差值</span>
+            <span>{{$t('processAnalysis.slwc')}}</span>
           </div>
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].SdifRate }}</b>
-            <span>撒料准确率</span>
+            <span>{{$t('processAnalysis.slzq')}}</span>
           </div>
         </div>
         <div class="Mixture">
-          <h4>混料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table3.tableKey"
             v-loading="table3.listLoading"
@@ -419,22 +458,27 @@
             class="elTable table-fixed"
             max-height="270px"
           >
-            <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
+            <el-table-column label="$t('processAnalysis.sort')" min-width="60px" align="center" prop="sort" />
             <el-table-column label="撒料车辆" min-width="60px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="60px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="60px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="60px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="60px" align="center" prop="actualweight" />
+            <el-table-column label="$t('processAnalysis.lweight')" min-width="60px" align="center" prop="lweight" />
+            <el-table-column label="$t('processAnalysis.actualweightminus')"  min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column label="$t('processAnalysis.diff')"  min-width="60px" align="center" prop="diff" />
+            <el-table-column label="$t('processAnalysis.diffRate')"  min-width="60px" align="center" prop="diffRate" />
+            <el-table-column label="$t('processAnalysis.intime')"  min-width="60px" align="center" prop="intime" />
+            <el-table-column label="$t('processAnalysis.proesstime')"  min-width="60px" align="center" prop="proesstime" />
+            <el-table-column label="$t('processAnalysis.buttontype')"  min-width="60px" align="center" prop="buttontype" />
+            <el-table-column label="$t('processAnalysis.lastactualweight')"  min-width="60px" align="center" prop="lastactualweight" />
+            <el-table-column label="$t('processAnalysis.actualweight')"  min-width="60px" align="center" prop="actualweight" />
           </el-table>
         </div>
 
         <div class="SpreadingMaterials">
-          <h4>撒料详情</h4>
+          <h4>{{$t('processAnalysis.hlxq')}}</h4>
           <el-table
             :key="table4.tableKey"
             v-loading="table4.listLoading"
@@ -447,23 +491,28 @@
             :row-style="rowStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
-            max-height="200px"
+            max-height="260px"
           >
-            <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
+            <el-table-column :label="$t('processAnalysis.sort')" min-width="70px" align="center" prop="sort" />
             <el-table-column label="撒料车辆" min-width="70px" align="center" prop="fname" />
-            <el-table-column label="计划重量" min-width="70px" align="center" prop="lweight" />
-            <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
-            <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
-            <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
-            <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
-            <el-table-column label="过程时间" min-width="70px" align="center" prop="proesstime" />
-            <el-table-column label="跳转方式" min-width="70px" align="center" prop="buttontype" />
-            <el-table-column label="开始重量" min-width="70px" align="center" prop="lastactualweight" />
-            <el-table-column label="结束重量" min-width="70px" align="center" prop="actualweight" />
+            <el-table-column :label="$t('processAnalysis.lweight')" min-width="70px" align="center" prop="lweight" />
+            <el-table-column :label="$t('processAnalysis.actualweightminus')"  min-width="60px" align="center" prop="actualweightminus">
+              <template slot-scope="{row}">
+                <a v-if="row.actualweightminus == 0" style="color: red;">{{ row.actualweightminus }}</a>
+                <a v-else>{{ row.actualweightminus }}</a>
+              </template>
+            </el-table-column>
+            <el-table-column :label="$t('processAnalysis.diff')"  min-width="70px" align="center" prop="diff" />
+            <el-table-column :label="$t('processAnalysis.diffRate')"  min-width="70px" align="center" prop="diffRate" />
+            <el-table-column :label="$t('processAnalysis.intime')"  min-width="70px" align="center" prop="intime" />
+            <el-table-column :label="$t('processAnalysis.proesstime')"  min-width="70px" align="center" prop="proesstime" />
+            <el-table-column :label="$t('processAnalysis.buttontype')"  min-width="70px" align="center" prop="buttontype" />
+            <el-table-column :label="$t('processAnalysis.lastactualweight')"  min-width="70px" align="center" prop="lastactualweight" />
+            <el-table-column :label="$t('processAnalysis.actualweight')"  min-width="70px" align="center" prop="actualweight" />
           </el-table>
         </div>
         <div class="ControlChart">
-          <h4>监控图</h4>
+          <h4>{{$t('processAnalysis.watchPlan')}}</h4>
           <div id="chartLine" style="width: 100%;height:300px;" />
         </div>
       </el-col>
@@ -1150,23 +1199,22 @@ export default {
       })
     },
     roadChartLine1(chartLine_data) {
-      console.log(chartLine_data, 'chartLine_data')
+      console.log(chartLine_data.data5, 'chartLine_data')
       if (this.chartLine != null) {
         this.chartLine.dispose()
       }
       this.chartLine = echarts.init(document.getElementById('chartLine'))
-
       var option = {
         title: { text: '', subtext: '' },
-        color: ['#38c193', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
+        color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
         legend: [{
           itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量' }]
+          data: [{ name:this.$t('processAnalysis.designName') }, { name: this.$t('processAnalysis.actureName')  }]
         }, {
-          itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
+          itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
           data: [
-            { name: '开始重量' },
-            { name: '结束重量' },
+            { name: this.$t('processAnalysis.startWright')  },
+            { name: this.$t('processAnalysis.endWright')  }
           ]
         }],
         tooltip: {
@@ -1175,35 +1223,51 @@ export default {
             // console.log(params, 'params')
             var tip = params[0].name
             for (let i = 0; i < params.length; i++) {
-              tip += '<br>' + params[i].seriesName + ': '
-              if (params[i].value[0] == params[0].name) {
-                tip += params[i].value[1]
-              } else {
-                tip += params[i].value
+              if (params[i].seriesName == this.$t('processAnalysis.designName')) {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == this.$t('processAnalysis.actureName')) {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == this.$t('processAnalysis.startWright')) {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == this.$t('processAnalysis.endWright') ){
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
               }
             }
-            tip += '<br>' + params[0].data[2] + params[0].data[3]
-            console.log(tip, 'tip')
             return tip
           }
         },
         calculable: true,
         xAxis: [
-          { type: 'category', splitLine: { show: false }, name: '时间', data: chartLine_data.data1, axisLabel: { show: true, textStyle: { color: '#666' }}}
+          { type: 'category' }
+          // { type: 'category', splitLine: { show: false }, name: '时间', data: chartLine_data.data1, axisLabel: { show: true, textStyle: { color: '#666' }}}
         ],
         yAxis: [{ type: 'value' }],
+        toolbox: {
+          show: false,
+          feature: {
+            dataZoom: { realtime: false, yAxisIndex: 'none', },
+            restore: {},
+          }
+        },
+        dataZoom:  [
+          {type: 'inside'},        //用于添加滚轮缩放
+          {type:'slider' },  //用于添加滑动条缩放,
+        ],
         series: [
-          { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, smooth: true, barWidth: '37', itemStyle: { normal: { lineStyle: { color: '#38c193' }}}},
-          { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 },
-          { name: '开始重量', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
+          { symbol: 'none', name:this.$t('processAnalysis.actureName'), type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
+          { symbol: 'none', name: this.$t('processAnalysis.designName'), type: 'line', step: 'middle', data: chartLine_data.data2 , itemStyle: { normal: { lineStyle: {  width:2}}}},
+          { name:  this.$t('processAnalysis.startWright'), symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
+          { name: this.$t('processAnalysis.endWright'), symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
       this.chartLine.setOption(option)
       window.onresize = function() {
         this.chartLine.resize()
       }
-    }
+    },
 
   }
 }

+ 32 - 19
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -7,7 +7,7 @@
       <el-select v-model="table.getdataListParm.parammaps.lpplantype" :placeholder="$t('processAnalysis.planType')" class="filter-item" style="width: 120px;" clearable>
         <el-option v-for="item in planTypeList" :key="item.value" :label="item.lable" :value="item.value" />
       </el-select>
-      <el-select v-model="table.getdataListParm.parammaps.tmrtname" :placeholder="$t('processAnalysis.tmrName')" class="filter-item" style="width: 180px;" clearable multiple>
+      <el-select v-model="table.getdataListParm.parammaps.tmrtname" :placeholder="$t('processAnalysis.tmrName')"  class="filter-item" style="width: 180px;" clearable multiple>
         <el-option v-for="item in TMRList" :key="item.tmrtname" :label="item.tmrtname" :value="item.tmrtname" />
       </el-select>
       <el-select v-model="table.getdataListParm.parammaps.error" :placeholder="$t('processAnalysis.errorRange')" class="filter-item" style="width: 140px;" clearable>
@@ -28,7 +28,7 @@
         <el-input-number :controls="false" :precision="2" v-model="hlzq2" :placeholder="$t('processAnalysis.hlzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
       </div>
       <el-select v-model="table.getdataListParm.parammaps.fclassid" :placeholder="$t('processAnalysis.fclassid')" class="filter-item" style="width: 120px;" clearable>
-        <el-option v-for="item in cixCategoryList" :key="item.id" :label="item.fcname" :value="item.id" />
+        <el-option v-for="item in cixCategoryList" :key="item.id" :label="menusTitle(item.fcname)" :value="item.id" />
       </el-select>
       <div style="display: inline-block;" class="filter-item1">
         <el-input-number :controls="false" :precision="2" v-model="slwc1" :placeholder="$t('processAnalysis.slwc')" style="width: 120px;" class="filter-item" clearable />
@@ -76,7 +76,7 @@
             <el-table-column sortable :label="$t('processAnalysis.minproesstime')" min-width="80px" align="center" prop="proesstime" />
           </el-table>
         </div>
-        <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
+        <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">{{"$t('processAnalysis.total')"}}{{ table.total }}{{"$t('processAnalysis.tiao')"}}</span>
       </el-col>
       <!-- 预混计划 -->
       <el-col v-if="isPremixedPlan" :span="16">
@@ -84,7 +84,7 @@
           <b>{{$t('processAnalysis.processdel')}}</b>
           <span>&nbsp;({{ title }})</span>
         </div>
-        <div class="detail">
+        <div class="detail" :lang="$i18n.locale">
           <div v-if="table2.list.length !== 0">
             <b>{{ table2.list[0].proesstime }}</b>
             <span>{{$t('processAnalysis.proesstime')}}</span>
@@ -560,6 +560,7 @@ require('echarts/theme/macarons')
 import { GetDataByName, GetReportform, formatNum,processAnalysist } from '@/api/common'
 import Cookies from 'js-cookie'
 import { parseTime } from '@/utils/index.js'
+
 export default {
   name: 'PastureProcessAnalysis',
   data() {
@@ -617,8 +618,8 @@ export default {
         name: 'getFeedclassList', offset: 0, pagecount: 0,
         parammaps: { 'pastureid': Cookies.get('pastureid') }
       },
-      planTypeList: [{ lable: '预混计划', value: '4' }, { lable: '撒料计划', value: '0' }, { lable: '剩料计划', value: '3' }, { lable: '撒料计划-混料', value: '1' }, { lable: '撒料计划-撒料', value: '2' }, { lable: '预称重计划', value: '5' }], // 计划类型
-      workingConditionList: [{ id: '0', name: '进行中' }, { id: '1', name: '已完成' }], // 工作状态
+      planTypeList: this.$t('processAnalysis.planTypeList'), // 计划类型
+      workingConditionList: this.$t('processAnalysis.workingConditionList'), // 工作状态
       cixCategoryList: [], // 混料类别
 
       // TMR设备列表
@@ -723,9 +724,9 @@ export default {
       chartName: '',
       // rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
-
+      errorList: this.$t('processAnalysis.errorList'),
       TMRList:[],
-      errorList:[{ value: '有误差', label: '有误差' }, { value: '无误差', label: '无误差' }],
+      // errorList:,
 
       downTMR: { name: 'getDownloadedplanTmrName', offset: 0, pagecount: 0,
        parammaps: {
@@ -741,6 +742,13 @@ export default {
     this.getList()
   },
   methods: {
+    // CixCategoryList 根据后端返回的中文展示英文
+    menusTitle(item) {
+      if (this.$te('processAnalysis.' + item)) {
+      return this.$t('processAnalysis.' + item)
+      }
+      return item
+    },
     change_date(e){
       console.log(e)
       this.getDownList()
@@ -1313,12 +1321,12 @@ export default {
         color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
         legend: [{
           itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量'  }]
+          data: [{ name:this.$t('processAnalysis.designName') }, { name: this.$t('processAnalysis.actureName')  }]
         }, {
           itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
           data: [
-            { name: '开始重量' },
-            { name: '结束重量' }
+            { name: this.$t('processAnalysis.startWright')  },
+            { name: this.$t('processAnalysis.endWright')  }
           ]
         }],
         tooltip: {
@@ -1327,16 +1335,16 @@ export default {
             // console.log(params, 'params')
             var tip = params[0].name
             for (let i = 0; i < params.length; i++) {
-              if (params[i].seriesName == '设计重量') {
+              if (params[i].seriesName == this.$t('processAnalysis.designName')) {
                 tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
               }
-              if (params[i].seriesName == '实际重量') {
+              if (params[i].seriesName == this.$t('processAnalysis.actureName')) {
                 tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
               }
-              if (params[i].seriesName == '开始重量') {
+              if (params[i].seriesName == this.$t('processAnalysis.startWright')) {
                 tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
               }
-              if (params[i].seriesName == '结束重量') {
+              if (params[i].seriesName == this.$t('processAnalysis.endWright') ){
                 tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
               }
             }
@@ -1361,10 +1369,10 @@ export default {
           {type:'slider' },  //用于添加滑动条缩放,
         ],
         series: [
-          { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
-          { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 , itemStyle: { normal: { lineStyle: {  width:2}}}},
-          { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
-          { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
+          { symbol: 'none', name:this.$t('processAnalysis.actureName'), type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
+          { symbol: 'none', name: this.$t('processAnalysis.designName'), type: 'line', step: 'middle', data: chartLine_data.data2 , itemStyle: { normal: { lineStyle: {  width:2}}}},
+          { name:  this.$t('processAnalysis.startWright'), symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
+          { name: this.$t('processAnalysis.endWright'), symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
       this.chartLine.setOption(option)
@@ -1462,6 +1470,11 @@ export default {
   }
   .detail{
     height:84px;padding:0 10px;font:16px/32px '';color:#333;background: #F9F9F9;display: flex; align-items: center;text-align: center;
+    &:lang(en){
+      font:12px/16px;
+      padding:0 4px;
+      height:120px;
+    }
     div{
       height: 15px;width: 20%;border-right: 1px solid #E0E0E0;color: #333;
       b{line-height: 20px;font-size: 16px;display: block;margin-top: -10px;height: 20px;color: #009A69;}