Prechádzať zdrojové kódy

Merge branch 'release/v1.0.2' into feature/pushMaterialPlan-redo

# Conflicts:
#	.env.development
duanxiaoduan 1 rok pred
rodič
commit
f803dd614d

+ 1 - 1
.env.development

@@ -6,7 +6,7 @@ ENV = 'development'
 # VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
 # VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
+VUE_APP_BASE_API = 'http://192.168.1.77: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.

+ 1 - 0
src/icons/svg/clear.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706089269266" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2548" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="42"><path d="M901.3 504.8l-76.3-150c-13.4-26.3-40-42.6-69.5-42.6H639c-1.1 0-2-0.9-2-2V120.6c0-31.1-25.3-56.3-56.3-56.3h-90c-31.1 0-56.3 25.3-56.3 56.3v189.6c0 1.1-0.9 2-2 2H315.8c-29.5 0-56.1 16.3-69.5 42.6l-76.3 150c-9.2 18.1-8.4 39.3 2.2 56.6 10.3 16.8 27.9 27 47.4 27.6-4.8 101-38.3 205.9-90.2 279.5-12.5 17.8-14.1 40.8-4.1 60.1 10 19.3 29.7 31.3 51.5 31.3h601.5c35 0 66-23.6 75.2-57.4 15.5-56.5 28.4-107.9 29.4-164.9C884 685 874 636 852.9 589c19-1.1 36.1-11.2 46.2-27.6 10.6-17.3 11.4-38.5 2.2-56.6z m-681.4 25.4l76.3-150c3.8-7.4 11.3-12 19.6-12h116.4c32 0 58-26 58-58V120.6c0-0.1 0.2-0.3 0.3-0.3h90c0.1 0 0.3 0.2 0.3 0.3v189.6c0 32 26 58 58 58h116.4c8.3 0 15.8 4.6 19.6 12l76.3 150c0.2 0.3 0.5 1-0.1 2s-1.3 1-1.7 1H221.7c-0.4 0-1.1 0-1.7-1-0.6-1-0.3-1.7-0.1-2zM827 736.6c-0.9 50.5-12.9 98.3-27.4 151.1-2.6 9.5-11.3 16.2-21.2 16.2H651.8c11.3-22.3 18.5-44 23.1-61.2 7.1-26.7 10.7-53.5 10.6-78-0.1-17.1-15.5-30.1-32.4-27.4-13.6 2.2-23.6 14-23.6 27.8 0.1 42.7-14.1 98.2-42.7 138.8H406.2c15.2-21.7 26.1-43.8 33.6-61.9 10-24.3 17.4-49.7 21.2-72.5 2.8-17-10.4-32.5-27.6-32.5-13.6 0-25.3 9.8-27.6 23.3-2.8 16.6-8.3 37.7-17.7 60.4-10.1 24.6-27.8 58.1-55.6 83.3H176.9c-0.5 0-1.2 0-1.8-1.1-0.6-1.1-0.2-1.6 0.1-2 29.7-42.1 54.8-94.5 72.5-151.4 16.2-52.1 25.7-106.9 28-160.3h514.6C816 635.6 828 684 827 736.6z" fill="" p-id="2549"></path></svg>

+ 4 - 1
src/utils/request.js

@@ -117,7 +117,10 @@ service.interceptors.response.use(
     console.log('config==>', config) // for debug
     console.log('config.__retryCount==>', config.__retryCount) // for debug
     // 设置请求超时次数
-    config.__retryCount = config.__retryCount || 0
+    config.__retryCount = config.__retryCount || 0
+    // 君盛牧场不需要多次请求
+    // if (config.__retryCount >= 0) {
+    // 其他牧场失败后需要多次尝试
     if (config.__retryCount >= 3) {
       // Message({ message:error.message, type: 'error', duration: 5 * 1000 })
       Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })

+ 43 - 3
src/views/basicData/feedTable/index.vue

@@ -45,7 +45,8 @@
        <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>
+      </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>
@@ -86,6 +87,7 @@
         <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" />
@@ -984,7 +986,8 @@ export default {
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       dropState: false,
-      isOrder: true,
+      isOrder: true,
+      ispalyUd: true,
       myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
@@ -1032,7 +1035,8 @@ export default {
       }
     })
   },
-  created() {
+  created() {
+    this.getIspalyUd()
     this.getList()
     this.getDownList()
     this.getButtons()
@@ -1988,6 +1992,42 @@ export default {
           })
         }
       })
+    },
+    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 })
+          }
+        })
+      })
     }
   }
 }

+ 80 - 3
src/views/basicData/groupColumn/index.vue

@@ -38,7 +38,8 @@
         <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" class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button>
+      <el-button v-if="isRoleEdit && sapUpload.isSap" class="success" icon="el-icon-plus" @click="handleGetSapCode">获取SAP编码</el-button>
+      <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">获取UD栏舍</el-button>
     </div>
     <div class="table">
       <u-table
@@ -111,6 +112,16 @@
           <template slot-scope="scope">
             <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
           </template>
+        </el-table-column>
+        <el-table-column label="ud编码" min-width="110px" align="center">
+          <template slot-scope="scope">
+            <span>{{scope.row.udcode}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="ud名称" min-width="110px" align="center">
+          <template slot-scope="scope">
+            <span>{{scope.row.udname}}</span>
+          </template>
         </el-table-column>
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
@@ -230,6 +241,20 @@ export default {
       textMap: {
         sapCode2: '获取SAP编码',
       },
+      sapUpload:{
+        getdataListParm: {
+          name: 'getSysoptEnable',
+          page: 1,
+          offset: 1,
+          pagecount: 1,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            inforname: 'xdmyBarSync'
+          }
+        },
+        isSap: false
+      },
       requestParam: {},
       isokDisable: false,
       selectList: [],
@@ -238,15 +263,18 @@ export default {
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       dropState: false,
-      isOrder: true,
+      isOrder: true,
+      ispalyUd: true,
       myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
 
-  created() {
+  created() {
+    this.getIspalyUd()
     this.getList()
     this.getDownList()
     this.getButtons()
+    this.getIsSap()
   },
   mounted() {
     document.addEventListener('click', (e) => {
@@ -262,6 +290,19 @@ export default {
     })
   },
   methods: {
+    getIsSap() {
+      GetDataByName(this.sapUpload.getdataListParm).then(response => {
+        // console.log()
+        if(response.data.list !== null){
+          if(response.data.list[0].inforvalue == 1){
+            this.sapUpload.isSap = true
+          }else{
+            this.sapUpload.isSap = false
+          }
+          console.log(this.sapUpload.isSap)
+        }
+      })
+    },
     getButtons() {
       const Edit = 'GroupColumn'
       const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
@@ -702,6 +743,42 @@ export default {
           })
         }
       })
+    },
+    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/udbar'
+        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 })
+          }
+        })
+      })
     }
   }
 }

+ 174 - 8
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -51,6 +51,9 @@
         <el-button v-if="dataSynchronization3.isDataSynchronization&&isRoleEdit" class="success" @click="handleDataUpload">数据上传</el-button>
         <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
         <el-button v-if="isRoleEdit && sapUpload.isSap" class="success" icon="el-icon-upload2" @click="handleSAPUpload">SAP上传</el-button>
+        <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd1">搅拌数据上传</el-button>
+        <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd2">剩料上传</el-button>
+        <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd3">撒料上传</el-button>
       </div>
       <!-- 日执行计划 -->
       <div class="table">
@@ -97,8 +100,8 @@
           </el-table-column>
           <el-table-column label="已执行" min-width="70px" align="center">
             <template slot-scope="scope">
-              <span v-if="scope.row.havebutton == 0">否</span>
-              <span v-else>是</span>
+              <div v-if="scope.row.havebutton == 0" style="background: #009A69;color:#fff;line-height:30px;">否</div>
+              <div v-else style="background: #c7c7ca ;line-height:30px;">是</div>
             </template>
           </el-table-column>
           <el-table-column label="班次" min-width="80px" align="center">
@@ -124,7 +127,7 @@
           </el-table-column>
           <el-table-column label="配方名称" min-width="100px" align="center">
             <template slot-scope="scope">
-              <span>{{ scope.row.ftname }}</span>
+              <b style="font-size: 28px;line-height: 30px;">{{ scope.row.ftname }}</b>
             </template>
           </el-table-column>
           <el-table-column label="牛头数" min-width="80px" align="center">
@@ -204,6 +207,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -264,6 +271,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -312,6 +323,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData3(row,'1')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel3(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <e<el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,1)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -456,6 +471,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -504,6 +523,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData3(row,'1')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel3(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,1)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -563,6 +586,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData3(row,'0')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel3(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,0)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -611,6 +638,10 @@
                     <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row,'1')" />
                     <span v-if="row.isUpdateSave" class="centerSpan">|</span>
                     <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
+                    <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+                    <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleRowEmpty(row,1)">
+                      <svg-icon icon-class="clear" />
+                    </el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -852,7 +883,10 @@
         </el-form>
         <div slot="footer" class="dialog-footer" style="bottom:20px">
           <el-button class="cancelClose" @click="sapUpload.dialogFormVisible = false;getList()">取消</el-button>
-          <el-button class="save" :disabled="isokDisable" @click="sapUploadData()">确认</el-button>
+          <el-button class="save" v-if="sapUpload.dialogStatus == 'sapUpload'" :disabled="isokDisable" @click="sapUploadData()">确认</el-button>
+          <el-button class="save" v-else-if="sapUpload.dialogStatus == 'udload1'" :disabled="isokDisable" @click="udData1()">确认</el-button>
+          <el-button class="save" v-else-if="sapUpload.dialogStatus == 'udload2'" :disabled="isokDisable" @click="udData2()">确认</el-button>
+          <el-button class="save" v-else-if="sapUpload.dialogStatus == 'udload3'" :disabled="isokDisable" @click="udData3()">确认</el-button>
         </div>
       </div>
     </el-dialog>
@@ -1082,7 +1116,10 @@ export default {
         revisePlan: '修改计划',
         copy: '复制计划',
         deleteRecord:'删除记录',
-        sapUpload:'SAP上传'
+        sapUpload:'SAP上传',
+        udload1:'搅拌数据上传',
+        udload2:'剩料上传',
+        udload3:'撒料上传',
       },
       isokDisable: false,
       requestParam: {},
@@ -1155,12 +1192,14 @@ export default {
             inforname: 'xdmysapupload'
           }
         },
-        isSap: false
-      }
+        isSap: false,
+      },
+      ispalyUd: false
     }
   },
 
-  created() {
+  created() {
+    this.getIspalyUd()
     this.parentDate = this.table.getdataListParm.parammaps.mydate
     console.log(this.parentDate, 'this.parentDate')
     this.getDataSynchronization()
@@ -2921,6 +2960,133 @@ export default {
           })
         }
       })
+    },
+    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 })
+        }
+      })
+    },
+    handleGetUd1(){
+     this.sapUpload.dialogStatus = 'udload1'
+     this.sapUpload.dialogFormVisible = true
+    },
+    udData1(){
+      this.$refs['sapUpload'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/gm/udutir/push'
+          let data = {
+            pastureId:Cookies.get('pastureid'),
+            date:parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapUpload.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    handleGetUd2(){
+     this.sapUpload.dialogStatus = 'udload2'
+     this.sapUpload.dialogFormVisible = true
+    },
+    udData2(){
+      this.$refs['sapUpload'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/gm/udbarfeedremain/push'
+          let data = {
+            pastureId:Cookies.get('pastureid'),
+            date:parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapUpload.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    handleGetUd3(){
+     this.sapUpload.dialogStatus = 'udload3'
+     this.sapUpload.dialogFormVisible = true
+    },
+    udData3(){
+      this.$refs['sapUpload'].validate(valid => {
+        if (valid) {
+          let url = 'authdata/gm/udmaterialIssue/push'
+          let data = {
+            pastureId:Cookies.get('pastureid'),
+            date:parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
+          }
+          postJson(url,data).then(response => {
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.sapUpload.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    handleRowEmpty(row,plan){
+      console.log(row,'row')
+      MessageBox.confirm('您确定清空该操作序号以下的所有数据,如果您清空的是搅拌车数据,将会同步清空撒料车数据?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        console.log(this.selectList)
+        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': 'delDownloadedplan', 'type': 'e', 'parammaps': {
+          id: '@insertSpotList.id',
+          pastureid: '@insertSpotList.pastureid'
+        }}
+        const url = 'authdata/PostDataByName'
+        const data = {
+          name:'clearDeleteDownloadedplan',
+          parammaps:{
+            pid:row.pid,
+            lpplantype:this.table3.getdataListParm.parammaps.lpplantype,
+            plan:plan,
+            sort:row.sort
+          }
+        }
+        postJson(url,data).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.getList2()
+            this.getList3()
+          }
+        })
+      })
     }
   }
 }

+ 77 - 5
src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue

@@ -86,6 +86,22 @@
           <template slot-scope="scope">
             <span>{{ scope.row.ftname }}</span>
           </template>
+        </el-table-column>
+        <el-table-column label="物料详情" width="90px" align="center">
+          <template slot-scope="scope">
+            <el-popover
+              placement="bottom"
+              width="400"
+              trigger="click">
+              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+              <el-table :data="materialdetailsList" border height="200">
+                <el-table-column min-width="150" property="fname" label="物料" />
+                <el-table-column min-width="100" property="fweight" label="重量" />
+                <el-table-column min-width="100" property="scale" label="占比" />
+              </el-table>
+              <span slot="reference" style="color: blue;" @click="getmaterialdetailsList(scope.row)">详情</span>
+            </el-popover>
+          </template>
         </el-table-column>
         <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="70px" align="center">
           <template slot-scope="scope">
@@ -294,10 +310,29 @@
                             >{{ item.barname }}</span>
                             <button style="background: red;float: right;width: 18px;color: #fff;font-size: 18px;border: none;text-align: center;" :disabled="isokDisable" @click="clickBar(item)">√</button>
                           </div>
+                        </el-tooltip>
+                        <el-tooltip placement="bottom" style="height: 18px;line-height: 18px;" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
+                          <div slot="content">{{ item.weight }}</div>
+                          <div class="barWeight">
+                            <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.weight }}</span>
+                            <el-popover
+                              placement="right"
+                              width="400"
+                              trigger="click">
+                              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                              <el-table :data="materialdetailsList" height="200" border>
+                                <el-table-column min-width="150" property="fname" label="物料" />
+                                <el-table-column min-width="100" property="fweight" label="重量" />
+                                <el-table-column min-width="100" property="scale" label="占比" />
+                              </el-table>
+                              <!-- <span  style="color: blue;">详情</span> -->
+                              <button slot="reference" style="background: #ccc;float: right;color: #fff;width: 18px;height:18px;font-size: 16px;border: none;text-align: center;" :disabled="isokDisable">?</button>
+                            </el-popover>
+                          </div>
                         </el-tooltip>
-                        <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
+                        <!-- <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
                           {{ item.weight }}
-                        </div>
+                        </div> -->
                       </div>
                     </div>
                   </li>
@@ -388,6 +423,19 @@
                   </div>
                   <div class="arr-t" :style="{'background':element.background}">
                     <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
+                    <el-popover
+                      placement="bottom"
+                      width="400"
+                      height="200"
+                      trigger="click">
+                      <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                      <el-table :data="materialdetailsList" height="200" border>
+                       <el-table-column min-width="150" property="fname" label="物料" />
+                       <el-table-column min-width="100" property="fweight" label="重量" />
+                       <el-table-column min-width="100" property="scale" label="占比" />
+                      </el-table>
+                      <i slot="reference" class="el-icon-question" style="position: absolute;right: 0;top: 20px;"/>
+                    </el-popover>
                   </div>
                 </div>
               </draggable>
@@ -469,7 +517,8 @@ export default {
       cellStyle: {
         padding: 0 + 'px'
       },
-      height: document.body.clientHeight - 220, // table高度
+      height: document.body.clientHeight - 220, // table高度
+      materialdetailsList: [],
       table: {
         getdataListParm: {
           page: 1,
@@ -790,7 +839,12 @@ export default {
     changeTemplateFormulation(item) {
       this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
       this.create.temp.ftvolume = this.templateFormulationList.find(obj => obj.id === item).volume
-      this.getCreateList1()
+      this.getCreateList1()
+      var obj = {
+        'pastureid':this.create.temp.pastureid,
+        'ftid':this.create.temp.ftid
+      }
+      this.getmaterialdetailsList(obj)
     },
     changeTimes(item) {
       this.getCreateList1()
@@ -1337,7 +1391,8 @@ export default {
       this.create.temp.mytmrid = row.tmrid
       console.log('this.create.temp', this.create.temp)
       this.create.checkBarList = []
-      this.getCreateList1()
+      this.getCreateList1()
+      this.getmaterialdetailsList(row)
     },
     updateData() {
       this.$refs['temp'].validate(valid => {
@@ -1865,6 +1920,23 @@ export default {
           }
         })
       })
+    },
+    getmaterialdetailsList(item){
+      let url = 'authdata/GetDataByName'
+      let data  = {
+        name:"getFTdetailList",page:1,offset:1,pagecount:"",returntype:"Map",
+        parammaps:{
+          pastureid:item.pastureid,ftid:item.ftid,
+          // fttypeid:item.fttypeid,
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.msg !== 'fail') {
+          this.materialdetailsList = response.data.list
+        } else {
+          this.materialdetailsList = []
+        }
+      })
     }
   }
 }

+ 437 - 155
src/views/formulationPlan/dhedFormula/index.vue

@@ -14,7 +14,10 @@
         <!-- <el-input v-model="table.getdataListParm.parammaps.tname" placeholder="请输入配方名称" style="width: 180px;" class="filter-item" /> -->
         <el-button class="successBorder" @click="form_search">查询</el-button>
         <el-button v-if="isRoleEdit" class="successBorder" @click="handleDryMatterRegulation">干物质调节</el-button>
-        <el-button v-if="isRoleEdit" class="successBorder" @click="handleSynchronous">软件牛头数同步</el-button>
+        <el-button v-if="isRoleEdit && isSynchronous" class="successBorder" @click="handleSynchronous">软件牛头数同步</el-button>
+        <el-button v-if="isRoleEdit && !isproportion" class="successBorder" @click="handle_batchEdit">批量编辑</el-button>
+        <el-button v-if="isRoleEdit && isproportion" icon="el-icon-folder-checked" class="success" @click="handle_batchEdit_save">保存</el-button>
+        <el-button v-if="isRoleEdit && isproportion" icon="el-icon-close" class="sortCancel" @click="cancelChangeEdit">取消</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>
@@ -62,20 +65,20 @@
         </el-table-column>
         <el-table-column :key="3" label="实际牛头数" min-width="80px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.ccount }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.ccount" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurCcount(scope.row)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.ccount }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.ccount" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurCcount(scope.row)" :placeholder="scope.row.placeholder_ccount" />
           </template>
         </el-table-column>
         <el-table-column :key="4" label="系数(%)" min-width="85px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.ratio }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.ratio" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurRatio(scope.row)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.ratio" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurRatio(scope.row)" :placeholder="scope.row.placeholder_ratio" />
           </template>
         </el-table-column>
         <el-table-column :key="5" label="系数头数" min-width="85px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.ccountratio }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.ccountratio" type="number" style="width:100%;padding:10px 0;" @blur="blurCcountratio(scope.row)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.ccountratio" type="number" style="width:100%;padding:10px 0;" @blur="blurCcountratio(scope.row)" :placeholder="scope.row.placeholder_ccountratio" />
           </template>
         </el-table-column>
         <el-table-column :key="6" label="配方模板" min-width="100px" align="center">
@@ -96,110 +99,110 @@
         </el-table-column>
         <el-table-column v-if="table.isRW1" :key="8" label="第一班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.r1 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,1)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r1 }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,1)" :placeholder="scope.row.placeholder_r1" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW1" :key="9" label="第一班重量" min-width="100px" align="center" :render-header="renderHeader">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.w1 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.w1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurWeight(scope.row,1)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.w1" :disabled="scope.row.isOneWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurWeight(scope.row,1)" :placeholder="scope.row.placeholder_w1" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW1 && table.isPtsfname" :key="10" label="第一班补料重量" min-width="100px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.bw1 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.bw1" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.bw1 }}</span>
+            <el-input v-if="scope.row.Edit" v-model="scope.row.bw1" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;"  @blur="blurBw(scope.row)" :placeholder="scope.row.placeholder_bw1" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW2" :key="11" label="第二班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.r2 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,2)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r2 }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r2" step="0.01" type="number" :disabled="scope.row.isTwoWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,2)" :placeholder="scope.row.placeholder_r2" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW2" :key="12" label="第二班重量" min-width="100px" align="center" :render-header="renderHeader">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.w2 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.w2" :disabled="scope.row.isTwoWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurWeight(scope.row,2)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.w2" :disabled="scope.row.isTwoWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurWeight(scope.row,2)" :placeholder="scope.row.placeholder_w2" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW2 && table.isPtsfname" :key="13" label="第二班补料重量" min-width="100px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.bw2 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.bw2" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.bw2" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;"  @blur="blurBw(scope.row)" :placeholder="scope.row.placeholder_bw2" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW3" :key="14" label="第三班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.r3 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,3)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r3 }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r3" step="0.01" type="number" :disabled="scope.row.isThreeWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,3)" :placeholder="scope.row.placeholder_r3"/>
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW3" :key="15" label="第三班重量" min-width="100px" align="center" :render-header="renderHeader">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.w3 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.w3" :disabled="scope.row.isThreeWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurWeight(scope.row,3)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.w3" :disabled="scope.row.isThreeWeight" step="0.01" type="number" style="width:100%;padding:10px 0;" @blur="blurWeight(scope.row,3)" :placeholder="scope.row.placeholder_w3" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW3 && table.isPtsfname" :key="16" label="第三班补料重量" min-width="100px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.bw3 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.bw3" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.bw3" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;"  @blur="blurBw(scope.row)" :placeholder="scope.row.placeholder_bw3" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW4" :key="17" label="第四班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.r4 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,4)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r4 }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r4" step="0.01" type="number" :disabled="scope.row.isFourWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,4)" :placeholder="scope.row.placeholder_r4" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW4" :key="18" label="第四班重量" min-width="100px" align="center" :render-header="renderHeader">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.w4 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.w4" :disabled="scope.row.isFourWeight" step="0.01" type="number" style="width:100%;padding:10px 0;padding:10px 0;" @blur="blurWeight(scope.row,4)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.w4" :disabled="scope.row.isFourWeight" step="0.01" type="number" style="width:100%;padding:10px 0;padding:10px 0;" @blur="blurWeight(scope.row,4)" :placeholder="scope.row.placeholder_w4" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW4 && table.isPtsfname" :key="19" label="第四班补料重量" min-width="90px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.bw4 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.bw4" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.bw4" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;"  @blur="blurBw(scope.row)" :placeholder="scope.row.placeholder_bw4" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW5" :key="20" label="第五班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.r5 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.r5" step="0.01" type="number" :disabled="scope.row.isFiveWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,5)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r5 }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r5" step="0.01" type="number" :disabled="scope.row.isFiveWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,5)" :placeholder="scope.row.placeholder_r5" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW5" :key="21" label="第五班重量" min-width="100px" align="center" :render-header="renderHeader">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.w5 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.w5" :disabled="scope.row.isFiveWeight" step="0.01" type="number" style="width:100%;padding:10px 0;padding:10px 0;" @blur="blurWeight(scope.row,5)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.w5" :disabled="scope.row.isFiveWeight" step="0.01" type="number" style="width:100%;padding:10px 0;padding:10px 0;" @blur="blurWeight(scope.row,5)" :placeholder="scope.row.placeholder_w5" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW5 && table.isPtsfname" :key="22" label="第五班补料重量" min-width="90px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.bw5 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.bw5" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.bw5" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;"  @blur="blurBw(scope.row)" :placeholder="scope.row.placeholder_bw5" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW6" :key="23" label="第六班比例(%)" min-width="85px" align="center">
           <template slot-scope="scope">
-            <span v-if="scope.row.NoEdit">{{ scope.row.r6 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.r6" step="0.01" type="number" :disabled="scope.row.isSixWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,6)" />
+            <span v-if="scope.row.NoEdit && !isproportion">{{ scope.row.r6 }}</span>
+            <el-input v-if="scope.row.Edit || isproportion" v-model="scope.row.r6" step="0.01" type="number" :disabled="scope.row.isSixWeight" style="width:100%;padding:10px 0;" @blur="blurR(scope.row,6)" :placeholder="scope.row.placeholder_r6" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW6" :key="24" label="第六班重量" min-width="100px" align="center" :render-header="renderHeader">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.w6 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.w6" :disabled="scope.row.isSixWeight" step="0.01" type="number" style="width:100%;padding:10px 0;padding:10px 0;" @blur="blurWeight(scope.row,6)" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.w6" :disabled="scope.row.isSixWeight" step="0.01" type="number" style="width:100%;padding:10px 0;padding:10px 0;" @blur="blurWeight(scope.row,6)" :placeholder="scope.row.placeholder_w6" />
           </template>
         </el-table-column>
         <el-table-column v-if="table.isRW6 && table.isPtsfname" :key="25" label="第六班补料重量" min-width="90px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.bw6 }}</span>
-            <el-input v-if="scope.row.Edit" v-model="scope.row.bw6" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;" />
+            <el-input v-if="scope.row.Edit" v-model="scope.row.bw6" :disabled="scope.row.ptsfid == '-1' || scope.row.ptsfid == ''" step="0.01" type="number" style="width:100%;padding:10px 0;"  @blur="blurBw(scope.row)" :placeholder="scope.row.placeholder_bw6" />
           </template>
         </el-table-column>
         <el-table-column :key="26" label="饲喂总比例(%)" min-width="60px" align="center">
@@ -787,8 +790,10 @@ export default {
   components: { Pagination, Pagination2, DryMatterRegulation },
   data() {
     return {
+      isproportion:false,
       dialogFull: false,
       isRoleEdit: [],
+      isSynchronous:[],
       headerList: [],
       pickerMinDate: '',
       pickerOptions: {
@@ -816,7 +821,8 @@ export default {
         { name: 'getFTSWLSList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
         { name: 'getFTBLList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
         { name: 'getCowclassListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
-        { name: 'getBarListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
+        { name: 'getBarListEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
+        { name: 'getSysoptEnable', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'),"inforname":"udFeedpSync" }}
       ],
       getFeedTempletNameListParm: {
         name: 'getFeedTempletName',
@@ -1096,6 +1102,7 @@ export default {
       cellStyle: { padding: 0 + 'px' },
       myHeight: document.documentElement.clientHeight - 85 - 140,
       oldRowList:{},
+      oldList:[],
       decimal: parseInt(Cookies.get('decimal')),
       decimalr: parseInt(Cookies.get('decimalr'))
     }
@@ -1141,6 +1148,11 @@ export default {
     },
     getDownList() {
       GetDataByNames(this.requestParams).then(response => {
+        if(response.data.getSysoptEnable.list[0].inforvalue == 1){
+          this.isSynchronous = true
+        }else{
+          this.isSynchronous = false
+        }
         this.recipeTemplateList = response.data.getFTSWLSList.list
         this.feedingFormulaList = response.data.getFTBLList.list
         this.livestockTypeList = response.data.getCowclassListEnable.list
@@ -1236,13 +1248,13 @@ export default {
             this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
             this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
             this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
-            if (response.data.list[i].ftid !== undefined && response.data.list[i].ftid !== '') {
-              if (this.recipeTemplateList.find(obj => obj.id == response.data.list[i].ftid) !== undefined) {
-                this.$set(response.data.list[i], 'dryweight', this.recipeTemplateList.find(obj => obj.id == response.data.list[i].ftid).dryweight) // 编辑保存
-              } else {
-                this.$set(response.data.list[i], 'dryweight', '')
-              }
-            }
+            // if (response.data.list[i].ftid !== undefined && response.data.list[i].ftid !== '') {
+            //   if (this.recipeTemplateList.find(obj => obj.id == response.data.list[i].ftid) !== undefined) {
+            //     this.$set(response.data.list[i], 'dryweight', this.recipeTemplateList.find(obj => obj.id == response.data.list[i].ftid).dryweight) // 编辑保存
+            //   } else {
+            //     this.$set(response.data.list[i], 'dryweight', '')
+            //   }
+            // }
             if (response.data.list[i].ftid == undefined || response.data.list[i].ftname == '') {
               this.$set(response.data.list[i], 'ftid', '')
               this.$set(response.data.list[i], 'ftname', '')
@@ -1388,8 +1400,22 @@ export default {
               response.data.list[i].r6 = 0
               response.data.list[i].w6 = 0
             }
-            this.$set(response.data.list[i], 'sumr', parseFloat(response.data.list[i].r1) + parseFloat(response.data.list[i].r2) + parseFloat(response.data.list[i].r3) + parseFloat(response.data.list[i].r4))
-            response.data.list[i].sumr = formatNum(response.data.list[i].sumr, parseInt(Cookies.get('decimalr')))
+            // this.$set(response.data.list[i], 'sumr', parseFloat(response.data.list[i].r1) + parseFloat(response.data.list[i].r2) + parseFloat(response.data.list[i].r3) + parseFloat(response.data.list[i].r4))
+            // response.data.list[i].sumr = formatNum(response.data.list[i].sumr, parseInt(Cookies.get('decimalr')))
+            var sumr = 0
+            if(response.data.list[i].r1 && !isNaN(response.data.list[i].r1)){
+              sumr += parseFloat(response.data.list[i].r1) }
+            if(response.data.list[i].r2 && !isNaN(response.data.list[i].r2)){
+              sumr += parseFloat(response.data.list[i].r2) }
+            if(response.data.list[i].r3 && !isNaN(response.data.list[i].r3)){
+              sumr += parseFloat(response.data.list[i].r3) }
+            if(response.data.list[i].r4 && !isNaN(response.data.list[i].r4)){
+              sumr += parseFloat(response.data.list[i].r4) }
+            if(response.data.list[i].r5 && !isNaN(response.data.list[i].r5)){
+              sumr += parseFloat(response.data.list[i].r5) }
+            if(response.data.list[i].r6 && !isNaN(response.data.list[i].r6)){ sumr += parseFloat(response.data.list[i].r6) }
+            console.log(sumr,'sumr')
+            response.data.list[i].sumr = formatNum(sumr, parseInt(Cookies.get('decimalr')))
             // this.$set(response.data.list[i],'feedweight',formatNum(parseFloat(response.data.list[i].feedweight) * parseFloat(response.data.list[i].sumr)/100,2))
             this.$set(response.data.list[i], 'dailyWeight', parseFloat(response.data.list[i].w1) + parseFloat(response.data.list[i].w2) + parseFloat(response.data.list[i].w3) + parseFloat(response.data.list[i].w4))
             response.data.list[i].dailyWeight = formatNum(response.data.list[i].dailyWeight, parseInt(Cookies.get('decimal')))
@@ -1654,12 +1680,12 @@ export default {
         row.Sfweight = this.recipeTemplateList.find(obj => obj.id == row.ftid).Sfweight
         row.SfweightLock = this.recipeTemplateList.find(obj => obj.id == row.ftid).SfweightLock
       }
-      if (row.w1 == '') { row.w1 = 0 }
-      if (row.w2 == '') { row.w2 = 0 }
-      if (row.w3 == '') { row.w3 = 0 }
-      if (row.w4 == '') { row.w4 = 0 }
-      if (row.w5 == '') { row.w5 = 0 }
-      if (row.w6 == '') { row.w6 = 0 }
+      if (row.w1 == '' || row.w1 == undefined || isNaN(row.w1)) { row.w1 = 0 }
+      if (row.w2 == '' || row.w2 == undefined || isNaN(row.w2)) { row.w2 = 0 }
+      if (row.w3 == '' || row.w3 == undefined || isNaN(row.w3)) { row.w3 = 0 }
+      if (row.w4 == '' || row.w4 == undefined || isNaN(row.w4)) { row.w4 = 0 }
+      if (row.w5 == '' || row.w5 == undefined || isNaN(row.w5)) { row.w5 = 0 }
+      if (row.w6 == '' || row.w6 == undefined || isNaN(row.w6)) { row.w6 = 0 }
 
       // 系数不变
       // 系数头数=实际牛头数*系数
@@ -1667,98 +1693,175 @@ export default {
       // 配方重量=实际牛头数*系数*配方模板取Sfweight
       row.ftweight = (row.ccount * row.ratio / 100 * row.Sfweight).toFixed(this.decimal)
       this.public(row)
+      this.placeholder(row)
     },
     blurRatio(row) {
       if (row.ftid !== '-1' && row.ftid !== '') {
         row.Sfweight = this.recipeTemplateList.find(obj => obj.id == row.ftid).Sfweight
         row.SfweightLock = this.recipeTemplateList.find(obj => obj.id == row.ftid).SfweightLock
       }
-      if (row.w1 == '') { row.w1 = 0 }
-      if (row.w2 == '') { row.w2 = 0 }
-      if (row.w3 == '') { row.w3 = 0 }
-      if (row.w4 == '') { row.w4 = 0 }
-      if (row.w5 == '') { row.w5 = 0 }
-      if (row.w6 == '') { row.w6 = 0 }
+      if (row.w1 == '' || row.w1 == undefined || isNaN(row.w1)) { row.w1 = 0 }
+      if (row.w2 == '' || row.w2 == undefined || isNaN(row.w2)) { row.w2 = 0 }
+      if (row.w3 == '' || row.w3 == undefined || isNaN(row.w3)) { row.w3 = 0 }
+      if (row.w4 == '' || row.w4 == undefined || isNaN(row.w4)) { row.w4 = 0 }
+      if (row.w5 == '' || row.w5 == undefined || isNaN(row.w5)) { row.w5 = 0 }
+      if (row.w6 == '' || row.w6 == undefined || isNaN(row.w6)) { row.w6 = 0 }
       // 配方重量=实际牛头数*系数*配方模板取Sfweight
       row.ftweight = (row.ccount * row.ratio / 100 * row.Sfweight).toFixed(this.decimal)
       // 实际牛头数不变
       // 系数头数=实际牛头数*系数
       row.ccountratio = (parseFloat(row.ccount)*(parseFloat(row.ratio) / 100)).toFixed(this.decimal)
       this.public(row)
+      this.placeholder(row)
     },
     blurCcountratio(row) {
       if (row.ftid !== '-1' && row.ftid !== '') {
         row.Sfweight = this.recipeTemplateList.find(obj => obj.id == row.ftid).Sfweight
         row.SfweightLock = this.recipeTemplateList.find(obj => obj.id == row.ftid).SfweightLock
       }
-      if (row.w1 == '') { row.w1 = 0 }
-      if (row.w2 == '') { row.w2 = 0 }
-      if (row.w3 == '') { row.w3 = 0 }
-      if (row.w4 == '') { row.w4 = 0 }
-      if (row.w5 == '') { row.w5 = 0 }
-      if (row.w6 == '') { row.w6 = 0 }
+      if (row.w1 == '' || row.w1 == undefined || isNaN(row.w1)) { row.w1 = 0 }
+      if (row.w2 == '' || row.w2 == undefined || isNaN(row.w2)) { row.w2 = 0 }
+      if (row.w3 == '' || row.w3 == undefined || isNaN(row.w3)) { row.w3 = 0 }
+      if (row.w4 == '' || row.w4 == undefined || isNaN(row.w4)) { row.w4 = 0 }
+      if (row.w5 == '' || row.w5 == undefined || isNaN(row.w5)) { row.w5 = 0 }
+      if (row.w6 == '' || row.w6 == undefined || isNaN(row.w6)) { row.w6 = 0 }
       // 配方重量=实际牛头数*系数*配方模板取Sfweight
       row.ftweight = (row.ccount * row.ratio / 100 * row.Sfweight).toFixed(this.decimal)
       // 实际牛头数不变
       // 系数=系数头数/实际牛头数*100
       row.ratio = (parseFloat(row.ccountratio) / parseFloat(row.ccount) * 100).toFixed(this.decimal)
       this.public(row)
+      this.placeholder(row)
     },
     public(row){
       console.log(row,'row')
       // 未锁定时:各班次比例不变,各班次重量=配方重量*各班次比例
       // 锁定时:未锁定班次比例不变,锁定班次比例=班次重量/配方重量x100%
       if(row.isOneWeight == true){
-        row.r1 = (parseFloat(row.w1) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(row.w1 && row.ftweight && !isNaN(parseFloat(row.w1)) && !isNaN(parseFloat(row.ftweight))){
+          row.r1 = (parseFloat(row.w1) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r1 =  0
+        }
       }else{
-        row.w1 = (parseFloat(row.ftweight) * parseFloat(row.r1) / 100).toFixed(this.decimal)
+        if(row.r1 && row.ftweight && !isNaN(parseFloat(row.r1)) && !isNaN(parseFloat(row.ftweight))){
+          row.w1 = (parseFloat(row.ftweight) * parseFloat(row.r1) / 100).toFixed(this.decimal)
+        }else{
+          row.w1 = 0
+        }
       }
       if(row.isTwoWeight == true){
-        row.r2 = (parseFloat(row.w2) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(row.w2 && row.ftweight && !isNaN(parseFloat(row.w2)) && !isNaN(parseFloat(row.ftweight))){
+          row.r2 = (parseFloat(row.w2) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r2 =  0
+        }
       }else{
-        row.w2 = (parseFloat(row.ftweight) * parseFloat(row.r2) / 100).toFixed(this.decimal)
+        if(row.r2 && row.ftweight && !isNaN(parseFloat(row.r2)) && !isNaN(parseFloat(row.ftweight))){
+          row.w2 = (parseFloat(row.ftweight) * parseFloat(row.r2) / 100).toFixed(this.decimal)
+        }else{
+          row.w2 = 0
+        }
       }
       if(row.isThreeWeight == true){
-        row.r3 = (parseFloat(row.w3) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(row.w3 && row.ftweight && !isNaN(parseFloat(row.w3)) && !isNaN(parseFloat(row.ftweight))){
+          row.r3 = (parseFloat(row.w3) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r3 =  0
+        }
       }else{
-        row.w3 = (parseFloat(row.ftweight) * parseFloat(row.r3) / 100).toFixed(this.decimal)
+        if(row.r3 && row.ftweight && !isNaN(parseFloat(row.r3)) && !isNaN(parseFloat(row.ftweight))){
+          row.w3 = (parseFloat(row.ftweight) * parseFloat(row.r3) / 100).toFixed(this.decimal)
+        }else{
+          row.w3 = 0
+        }
       }
       if(row.isFourWeight == true){
-        row.r4 = (parseFloat(row.w4) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(row.w4 && row.ftweight && !isNaN(parseFloat(row.w4)) && !isNaN(parseFloat(row.ftweight))){
+          row.r4 = (parseFloat(row.w4) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r4 =  0
+        }
       }else{
-        row.w4 = (parseFloat(row.ftweight) * parseFloat(row.r4) / 100).toFixed(this.decimal)
+        if(row.r4 && row.ftweight && !isNaN(parseFloat(row.r4)) && !isNaN(parseFloat(row.ftweight))){
+          row.w4 = (parseFloat(row.ftweight) * parseFloat(row.r4) / 100).toFixed(this.decimal)
+        }else{
+          row.w4 = 0
+        }
       }
       if(row.isFiveWeight == true){
-        row.r5 = (parseFloat(row.w5) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(row.w5 && row.ftweight && !isNaN(parseFloat(row.w5)) && !isNaN(parseFloat(row.ftweight))){
+          row.r5 = (parseFloat(row.w5) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r5 =  0
+        }
       }else{
-        row.w5 = (parseFloat(row.ftweight) * parseFloat(row.r5) / 100).toFixed(this.decimal)
+        if(row.r5 && row.ftweight && !isNaN(parseFloat(row.r5)) && !isNaN(parseFloat(row.ftweight))){
+          row.w5 = (parseFloat(row.ftweight) * parseFloat(row.r5) / 100).toFixed(this.decimal)
+        }else{
+          row.w5 = 0
+        }
       }
       if(row.isSixWeight == true){
-        row.r6 = (parseFloat(row.w6) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(row.w6 && row.ftweight && !isNaN(parseFloat(row.w6)) && !isNaN(parseFloat(row.ftweight))){
+          row.r6 = (parseFloat(row.w6) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r5 =  0
+        }
       }else{
-        row.w6 = (parseFloat(row.ftweight) * parseFloat(row.r6) / 100).toFixed(this.decimal)
+        if(row.r6 && row.ftweight && !isNaN(parseFloat(row.r6)) && !isNaN(parseFloat(row.ftweight))){
+          row.w6 = (parseFloat(row.ftweight) * parseFloat(row.r6) / 100).toFixed(this.decimal)
+        }else{
+          row.w6 = 0
+        }
       }
       console.log(row,'row2')
 
       if(row.isOneWeight || row.isTWoWeight || row.isThreeWeight || row.isFourWeight || row.isFiveWeight || row.isSixWeight){
-        var sumr = (parseFloat(row.r1) + parseFloat(row.r2) + parseFloat(row.r3) + parseFloat(row.r4) + parseFloat(row.r5) + parseFloat(row.r6)).toFixed(this.decimalr)
-        this.$set(row, 'sumr', sumr)
+        var sumr = 0
+        if(row.r1 && !isNaN(row.r1)){ sumr += parseFloat(row.r1) }
+        if(row.r2 && !isNaN(row.r2)){ sumr += parseFloat(row.r2) }
+        if(row.r3 && !isNaN(row.r3)){ sumr += parseFloat(row.r3) }
+        if(row.r4 && !isNaN(row.r4)){ sumr += parseFloat(row.r4) }
+        if(row.r5 && !isNaN(row.r5)){ sumr += parseFloat(row.r5) }
+        if(row.r6 && !isNaN(row.r6)){ sumr += parseFloat(row.r6) }
+        this.$set(row, 'sumr', sumr.toFixed(this.decimalr))
       }else{
         // 总比例不变
-        var sumr = (parseFloat(row.r1) + parseFloat(row.r2) + parseFloat(row.r3) + parseFloat(row.r4) + parseFloat(row.r5) + parseFloat(row.r6)).toFixed(this.decimalr)
-        this.$set(row, 'sumr', sumr)
+        var sumr = 0
+        if(row.r1 && !isNaN(row.r1)){ sumr += parseFloat(row.r1) }
+        if(row.r2 && !isNaN(row.r2)){ sumr += parseFloat(row.r2) }
+        if(row.r3 && !isNaN(row.r3)){ sumr += parseFloat(row.r3) }
+        if(row.r4 && !isNaN(row.r4)){ sumr += parseFloat(row.r4) }
+        if(row.r5 && !isNaN(row.r5)){ sumr += parseFloat(row.r5) }
+        if(row.r6 && !isNaN(row.r6)){ sumr += parseFloat(row.r6) }
+        this.$set(row, 'sumr', sumr.toFixed(this.decimalr))
       }
       // 饲喂投喂量 = 所有班次重量之和
-      var sumw = (parseFloat(row.w1) + parseFloat(row.w2) + parseFloat(row.w3) + parseFloat(row.w4) + parseFloat(row.w5) + parseFloat(row.w6)).toFixed(this.decimal)
-      this.$set(row, 'todayweight', sumw)
+      var sumw = 0
+      if(row.w1 && !isNaN(row.w1)){ sumw += parseFloat(row.w1) }
+      if(row.w2 && !isNaN(row.w2)){ sumw += parseFloat(row.w2) }
+      if(row.w3 && !isNaN(row.w3)){ sumw += parseFloat(row.w3) }
+      if(row.w4 && !isNaN(row.w4)){ sumw += parseFloat(row.w4) }
+      if(row.w5 && !isNaN(row.w5)){ sumw += parseFloat(row.w5) }
+      if(row.w6 && !isNaN(row.w6)){ sumw += parseFloat(row.w6) }
+      this.$set(row, 'sumw', sumw.toFixed(this.decimal))
       // 日投喂量 = 饲喂投喂量+补料
-      if (row.bw1 == 'NaN' || row.bw1 == '') { this.$set(row, 'bw1', 0) }
-      if (row.bw2 == 'NaN' || row.bw2 == '') { this.$set(row, 'bw2', 0) }
-      if (row.bw3 == 'NaN' || row.bw3 == '') { this.$set(row, 'bw3', 0) }
-      if (row.bw4 == 'NaN' || row.bw4 == '') { this.$set(row, 'bw4', 0) }
-      if (row.bw5 == 'NaN' || row.bw5 == '') { this.$set(row, 'bw5', 0) }
-      if (row.bw6 == 'NaN' || row.bw6 == '') { this.$set(row, 'bw6', 0) }
-      var sumbw = (parseFloat(row.bw1) + parseFloat(row.bw2) + parseFloat(row.bw3) + parseFloat(row.bw4) + parseFloat(row.bw5) + parseFloat(row.bw6)).toFixed(this.decimal)
+      if (isNaN(row.bw1) || row.bw1 == '') { this.$set(row, 'bw1', 0) }
+      if (isNaN(row.bw2) || row.bw2 == '') { this.$set(row, 'bw2', 0) }
+      if (isNaN(row.bw3) || row.bw3 == '') { this.$set(row, 'bw3', 0) }
+      if (isNaN(row.bw4) || row.bw4 == '') { this.$set(row, 'bw4', 0) }
+      if (isNaN(row.bw5) || row.bw5 == '') { this.$set(row, 'bw5', 0) }
+      if (isNaN(row.bw6) || row.bw6 == '') { this.$set(row, 'bw6', 0) }
+      // var sumbw = (parseFloat(row.bw1) + parseFloat(row.bw2) + parseFloat(row.bw3) + parseFloat(row.bw4) + parseFloat(row.bw5) + parseFloat(row.bw6)).toFixed(this.decimal)
+      var sumbw = 0
+      if(row.bw1 && !isNaN(row.bw1)){ sumbw += parseFloat(row.bw1) }
+      if(row.bw2 && !isNaN(row.bw2)){ sumbw += parseFloat(row.bw2) }
+      if(row.bw3 && !isNaN(row.bw3)){ sumbw += parseFloat(row.bw3) }
+      if(row.bw4 && !isNaN(row.bw4)){ sumbw += parseFloat(row.bw4) }
+      if(row.bw5 && !isNaN(row.bw5)){ sumbw += parseFloat(row.bw5) }
+      if(row.bw6 && !isNaN(row.bw6)){ sumbw += parseFloat(row.bw6) }
+      this.$set(row, 'sumbw', sumbw.toFixed(this.decimal))
       var todayfeed = parseFloat(sumw) + parseFloat(sumbw)
       this.$set(row, 'todayfeed', todayfeed)
     },
@@ -1769,43 +1872,112 @@ export default {
       }
       // 配方重量=实际牛头数*系数*配方模板取Sfweight
       row.ftweight = (parseFloat(row.ccount) * parseFloat(row.ratio) / 100 * parseFloat(row.Sfweight)).toFixed(this.decimal)
-        console.log(parseFloat(row.ccount))
-        console.log(parseFloat(row.ftweight))
+        console.log(parseFloat(row.ccount),'======ccount')
+        console.log(parseFloat(row.ftweight),'======ftweight')
       if(item == 1){
         // 一班比例
-        row.w1 = (parseFloat(row.r1)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        if(!isNaN(parseFloat(row.r1)) && !isNaN(parseFloat(row.ftweight)) && row.r1 && row.ftweight){
+          row.w1 = (parseFloat(row.r1)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        }else{
+          row.w1 = 0
+        }
       }else if(item == 2){
         // 二班比例
-        row.w2 = (parseFloat(row.r2)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        if(!isNaN(parseFloat(row.r2)) && !isNaN(parseFloat(row.ftweight)) && row.r2 && row.ftweight){
+          row.w2 = (parseFloat(row.r2)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        }else{
+          row.w2 = 0
+        }
       }else if(item == 3){
         // 三班比例
-        row.w3 = (parseFloat(row.r3)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        if(!isNaN(parseFloat(row.r3)) && !isNaN(parseFloat(row.ftweight)) && row.r3 && row.ftweight){
+          row.w3 = (parseFloat(row.r3)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        }else{
+          row.w3 = 0
+        }
       }else if(item == 4){
         // 四班比例
-        row.w4 = (parseFloat(row.r4)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        if(!isNaN(parseFloat(row.r4)) && !isNaN(parseFloat(row.ftweight)) && row.r4 && row.ftweight){
+          row.w4 = (parseFloat(row.r4)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        }else{
+          row.w4 = 0
+        }
       }else if(item == 5){
         // 五班比例
-        row.w5 = (parseFloat(row.r5)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        if(!isNaN(parseFloat(row.r5)) && !isNaN(parseFloat(row.ftweight)) && row.r5 && row.ftweight){
+          row.w5 = (parseFloat(row.r5)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        }else{
+          row.w5 = 0
+        }
       }else if(item == 6){
         // 六班比例
-        row.w6 = (parseFloat(row.r6)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        if(!isNaN(parseFloat(row.r6)) && !isNaN(parseFloat(row.ftweight)) && row.r6 && row.ftweight){
+          row.w6 = (parseFloat(row.r6)/100 * parseFloat(row.ftweight)).toFixed(this.decimal)
+        }else{
+          row.w6 = 0
+        }
       }
       // 总比例=所有比例之和
-      var sumr = (parseFloat(row.r1) + parseFloat(row.r2) + parseFloat(row.r3) + parseFloat(row.r4) + parseFloat(row.r5) + parseFloat(row.r6)).toFixed(this.decimalr)
-      this.$set(row, 'sumr', sumr)
       // 饲喂投喂量 = 所有班次重量之和
-      var sumw = (parseFloat(row.w1) + parseFloat(row.w2) + parseFloat(row.w3) + parseFloat(row.w4) + parseFloat(row.w5) + parseFloat(row.w6)).toFixed(this.decimal)
-      this.$set(row, 'todayweight', sumw)
+      var sumr = 0
+      if(row.r1 && !isNaN(row.r1)){ sumr += parseFloat(row.r1) }
+      if(row.r2 && !isNaN(row.r2)){ sumr += parseFloat(row.r2) }
+      if(row.r3 && !isNaN(row.r3)){ sumr += parseFloat(row.r3) }
+      if(row.r4 && !isNaN(row.r4)){ sumr += parseFloat(row.r4) }
+      if(row.r5 && !isNaN(row.r5)){ sumr += parseFloat(row.r5) }
+      if(row.r6 && !isNaN(row.r6)){ sumr += parseFloat(row.r6) }
+      this.$set(row, 'sumr', sumr.toFixed(this.decimalr))
+      var sumw = 0
+      if(row.w1 && !isNaN(row.w1)){ sumw += parseFloat(row.w1) }
+      if(row.w2 && !isNaN(row.w2)){ sumw += parseFloat(row.w2) }
+      if(row.w3 && !isNaN(row.w3)){ sumw += parseFloat(row.w3) }
+      if(row.w4 && !isNaN(row.w4)){ sumw += parseFloat(row.w4) }
+      if(row.w5 && !isNaN(row.w5)){ sumw += parseFloat(row.w5) }
+      if(row.w6 && !isNaN(row.w6)){ sumw += parseFloat(row.w6) }
+      this.$set(row, 'sumw', sumw.toFixed(this.decimal))
       // 日投喂量 = 饲喂投喂量+补料
-      if (row.bw1 == 'NaN' || row.bw1 == '') { this.$set(row, 'bw1', 0) }
-      if (row.bw2 == 'NaN' || row.bw2 == '') { this.$set(row, 'bw2', 0) }
-      if (row.bw3 == 'NaN' || row.bw3 == '') { this.$set(row, 'bw3', 0) }
-      if (row.bw4 == 'NaN' || row.bw4 == '') { this.$set(row, 'bw4', 0) }
-      if (row.bw5 == 'NaN' || row.bw5 == '') { this.$set(row, 'bw5', 0) }
-      if (row.bw6 == 'NaN' || row.bw6 == '') { this.$set(row, 'bw6', 0) }
-      var sumbw = (parseFloat(row.bw1) + parseFloat(row.bw2) + parseFloat(row.bw3) + parseFloat(row.bw4) + parseFloat(row.bw5) + parseFloat(row.bw6)).toFixed(this.decimal)
+      if (isNaN(row.bw1) || row.bw1 == '' || row.bw1 == undefined) { this.$set(row, 'bw1', 0) }
+      if (isNaN(row.bw2) || row.bw2 == '' || row.bw1 == undefined) { this.$set(row, 'bw2', 0) }
+      if (isNaN(row.bw3) || row.bw3 == '' || row.bw1 == undefined) { this.$set(row, 'bw3', 0) }
+      if (isNaN(row.bw4) || row.bw4 == '' || row.bw1 == undefined) { this.$set(row, 'bw4', 0) }
+      if (isNaN(row.bw5) || row.bw5 == '' || row.bw1 == undefined) { this.$set(row, 'bw5', 0) }
+      if (isNaN(row.bw6) || row.bw6 == '' || row.bw1 == undefined) { this.$set(row, 'bw6', 0) }
+      var sumbw = 0
+      if(row.bw1 && !isNaN(row.bw1)){ sumbw += parseFloat(row.bw1) }
+      if(row.bw2 && !isNaN(row.bw2)){ sumbw += parseFloat(row.bw2) }
+      if(row.bw3 && !isNaN(row.bw3)){ sumbw += parseFloat(row.bw3) }
+      if(row.bw4 && !isNaN(row.bw4)){ sumbw += parseFloat(row.bw4) }
+      if(row.bw5 && !isNaN(row.bw5)){ sumbw += parseFloat(row.bw5) }
+      if(row.bw6 && !isNaN(row.bw6)){ sumbw += parseFloat(row.bw6) }
+      this.$set(row, 'sumbw', sumbw.toFixed(this.decimal))
+      // var sumbw = (parseFloat(row.bw1) + parseFloat(row.bw2) + parseFloat(row.bw3) + parseFloat(row.bw4) + parseFloat(row.bw5) + parseFloat(row.bw6)).toFixed(this.decimal)
       var todayfeed = parseFloat(sumw) + parseFloat(sumbw)
+      console.log(todayfeed,'sumw==')
       this.$set(row, 'todayfeed', todayfeed)
+      this.placeholder(row)
+    },
+    placeholder(row){
+      this.$set(row, 'placeholder_r1', this.oldRowList.r1)
+      this.$set(row, 'placeholder_r2', this.oldRowList.r2)
+      this.$set(row, 'placeholder_r3', this.oldRowList.r3)
+      this.$set(row, 'placeholder_r4', this.oldRowList.r4)
+      this.$set(row, 'placeholder_r5', this.oldRowList.r5)
+      this.$set(row, 'placeholder_r6', this.oldRowList.r6)
+      this.$set(row, 'placeholder_w1', this.oldRowList.w1)
+      this.$set(row, 'placeholder_w2', this.oldRowList.w2)
+      this.$set(row, 'placeholder_w3', this.oldRowList.w3)
+      this.$set(row, 'placeholder_w4', this.oldRowList.w4)
+      this.$set(row, 'placeholder_w5', this.oldRowList.w5)
+      this.$set(row, 'placeholder_w6', this.oldRowList.w6)
+      this.$set(row, 'placeholder_bw1', this.oldRowList.bw1)
+      this.$set(row, 'placeholder_bw2', this.oldRowList.bw2)
+      this.$set(row, 'placeholder_bw3', this.oldRowList.bw3)
+      this.$set(row, 'placeholder_bw4', this.oldRowList.bw4)
+      this.$set(row, 'placeholder_bw5', this.oldRowList.bw5)
+      this.$set(row, 'placeholder_bw6', this.oldRowList.bw6)
+      this.$set(row, 'placeholder_ccount', this.oldRowList.ccount)
+      this.$set(row, 'placeholder_ratio', this.oldRowList.ratio)
+      this.$set(row, 'placeholder_ccountratio', this.oldRowList.ccountratio)
     },
     blurWeight(row,item) {
       // 配方重量=实际牛头数*系数*配方模板取Sfweight
@@ -1814,43 +1986,93 @@ export default {
       }
       if(item == 1){
         // 一班重量
-        row.r1 = (parseFloat(row.w1) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(!isNaN(parseFloat(row.w1)) && !isNaN(parseFloat(row.ftweight)) && row.w1 && row.ftweight){
+          row.r1 = (parseFloat(row.w1) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r1 = 0
+        }
       }else if(item == 2){
         // 二班重量
-        row.r2 = (parseFloat(row.w2) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(!isNaN(parseFloat(row.w2)) && !isNaN(parseFloat(row.ftweight)) && row.w2 && row.ftweight){
+          row.r2 = (parseFloat(row.w2) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r2 = 0
+        }
       }else if(item == 3){
         // 三班重量
-        row.r3 = (parseFloat(row.w3) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(!isNaN(parseFloat(row.w3)) && !isNaN(parseFloat(row.ftweight)) && row.w3 && row.ftweight){
+          row.r3 = (parseFloat(row.w3) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r3 = 0
+        }
       }else if(item == 4){
         // 四班重量
-        row.r4 = (parseFloat(row.w4) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(!isNaN(parseFloat(row.w4)) && !isNaN(parseFloat(row.ftweight)) && row.w4 && row.ftweight){
+          row.r4 = (parseFloat(row.w4) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r4 = 0
+        }
       }else if(item == 5){
         // 五班重量
-        row.r5 = (parseFloat(row.w5) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(!isNaN(parseFloat(row.w5)) && !isNaN(parseFloat(row.ftweight)) && row.w5 && row.ftweight){
+          row.r5 = (parseFloat(row.w5) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r5 = 0
+        }
       }else if(item == 6){
         // 六班重量
-        row.r6 = (parseFloat(row.w6) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        if(!isNaN(parseFloat(row.w6)) && !isNaN(parseFloat(row.ftweight)) && row.w6 && row.ftweight){
+          row.r6 = (parseFloat(row.w6) / parseFloat(row.ftweight) * 100).toFixed(this.decimalr)
+        }else{
+          row.r6 = 0
+        }
       }
       // 总比例=所有比例之和
-      var sumr = (parseFloat(row.r1) + parseFloat(row.r2) + parseFloat(row.r3) + parseFloat(row.r4) + parseFloat(row.r5) + parseFloat(row.r6)).toFixed(this.decimalr)
-      this.$set(row, 'sumr', sumr)
       // 饲喂投喂量 = 所有班次重量之和
-      var sumw = (parseFloat(row.w1) + parseFloat(row.w2) + parseFloat(row.w3) + parseFloat(row.w4) + parseFloat(row.w5) + parseFloat(row.w6)).toFixed(this.decimal)
-      this.$set(row, 'todayweight', sumw)
+      var sumr = 0
+      if(row.r1 && !isNaN(row.r1)){ sumr += parseFloat(row.r1) }
+      if(row.r2 && !isNaN(row.r2)){ sumr += parseFloat(row.r2) }
+      if(row.r3 && !isNaN(row.r3)){ sumr += parseFloat(row.r3) }
+      if(row.r4 && !isNaN(row.r4)){ sumr += parseFloat(row.r4) }
+      if(row.r5 && !isNaN(row.r5)){ sumr += parseFloat(row.r5) }
+      if(row.r6 && !isNaN(row.r6)){ sumr += parseFloat(row.r6) }
+      this.$set(row, 'sumr', sumr.toFixed(this.decimalr))
+      var sumw = 0
+      if(row.w1 && !isNaN(row.w1)){ sumw += parseFloat(row.w1) }
+      if(row.w2 && !isNaN(row.w2)){ sumw += parseFloat(row.w2) }
+      if(row.w3 && !isNaN(row.w3)){ sumw += parseFloat(row.w3) }
+      if(row.w4 && !isNaN(row.w4)){ sumw += parseFloat(row.w4) }
+      if(row.w5 && !isNaN(row.w5)){ sumw += parseFloat(row.w5) }
+      if(row.w6 && !isNaN(row.w6)){ sumw += parseFloat(row.w6) }
+      this.$set(row, 'sumw', sumw.toFixed(this.decimal))
       // 日投喂量 = 饲喂投喂量+补料
-      if (row.bw1 == 'NaN' || row.bw1 == '') { this.$set(row, 'bw1', 0) }
-      if (row.bw2 == 'NaN' || row.bw2 == '') { this.$set(row, 'bw2', 0) }
-      if (row.bw3 == 'NaN' || row.bw3 == '') { this.$set(row, 'bw3', 0) }
-      if (row.bw4 == 'NaN' || row.bw4 == '') { this.$set(row, 'bw4', 0) }
-      if (row.bw5 == 'NaN' || row.bw5 == '') { this.$set(row, 'bw5', 0) }
-      if (row.bw6 == 'NaN' || row.bw6 == '') { this.$set(row, 'bw6', 0) }
-      var sumbw = (parseFloat(row.bw1) + parseFloat(row.bw2) + parseFloat(row.bw3) + parseFloat(row.bw4) + parseFloat(row.bw5) + parseFloat(row.bw6)).toFixed(this.decimal)
+      if (isNaN(row.bw1) || row.bw1 == '' || row.bw1 == undefined) { this.$set(row, 'bw1', 0) }
+      if (isNaN(row.bw2) || row.bw2 == '' || row.bw2 == undefined) { this.$set(row, 'bw2', 0) }
+      if (isNaN(row.bw3) || row.bw3 == '' || row.bw3 == undefined) { this.$set(row, 'bw3', 0) }
+      if (isNaN(row.bw4) || row.bw4 == '' || row.bw4 == undefined) { this.$set(row, 'bw4', 0) }
+      if (isNaN(row.bw5) || row.bw5 == '' || row.bw5 == undefined) { this.$set(row, 'bw5', 0) }
+      if (isNaN(row.bw6) || row.bw6 == '' || row.bw6 == undefined) { this.$set(row, 'bw6', 0) }
+      var sumbw = 0
+      if(row.bw1 && !isNaN(row.bw1)){ sumbw += parseFloat(row.bw1) }
+      if(row.bw2 && !isNaN(row.bw2)){ sumbw += parseFloat(row.bw2) }
+      if(row.bw3 && !isNaN(row.bw3)){ sumbw += parseFloat(row.bw3) }
+      if(row.bw4 && !isNaN(row.bw4)){ sumbw += parseFloat(row.bw4) }
+      if(row.bw5 && !isNaN(row.bw5)){ sumbw += parseFloat(row.bw5) }
+      if(row.bw6 && !isNaN(row.bw6)){ sumbw += parseFloat(row.bw6) }
+      this.$set(row, 'sumbw', sumbw.toFixed(this.decimal))
+      // var sumbw = (parseFloat(row.bw1) + parseFloat(row.bw2) + parseFloat(row.bw3) + parseFloat(row.bw4) + parseFloat(row.bw5) + parseFloat(row.bw6)).toFixed(this.decimal)
       var todayfeed = parseFloat(sumw) + parseFloat(sumbw)
       this.$set(row, 'todayfeed', todayfeed)
+      this.placeholder(row)
+    },
+    blurBw(row){
+      this.placeholder(row)
     },
     celldblclick(row, column, cell, event) {
       console.log(row, '=====')
-      this.handleUpdate(row)
+      if(!this.isproportion){
+        this.handleUpdate(row)
+      }
     },
     // 编辑
     handleUpdate(row) {
@@ -1880,24 +2102,24 @@ export default {
       this.table.temp.ptsfname = row.ptsfname
     },
     updateData(row) {
-      if (row.r1 == 'NaN') { this.$set(row, 'r1', 0) }
-      if (row.r2 == 'NaN') { this.$set(row, 'r2', 0) }
-      if (row.r3 == 'NaN') { this.$set(row, 'r3', 0) }
-      if (row.r4 == 'NaN') { this.$set(row, 'r4', 0) }
-      if (row.r5 == 'NaN') { this.$set(row, 'r5', 0) }
-      if (row.r6 == 'NaN') { this.$set(row, 'r6', 0) }
-      if (row.w1 == 'NaN') { this.$set(row, 'w1', 0) }
-      if (row.w2 == 'NaN') { this.$set(row, 'w2', 0) }
-      if (row.w3 == 'NaN') { this.$set(row, 'w3', 0) }
-      if (row.w4 == 'NaN') { this.$set(row, 'w4', 0) }
-      if (row.w5 == 'NaN') { this.$set(row, 'w5', 0) }
-      if (row.w6 == 'NaN') { this.$set(row, 'w6', 0) }
-      if (row.bw1 == 'NaN') { this.$set(row, 'bw1', 0) }
-      if (row.bw2 == 'NaN') { this.$set(row, 'bw2', 0) }
-      if (row.bw3 == 'NaN') { this.$set(row, 'bw3', 0) }
-      if (row.bw4 == 'NaN') { this.$set(row, 'bw4', 0) }
-      if (row.bw5 == 'NaN') { this.$set(row, 'bw5', 0) }
-      if (row.bw6 == 'NaN') { this.$set(row, 'bw6', 0) }
+      if (isNaN(row.r1)) { this.$set(row, 'r1', 0) }
+      if (isNaN(row.r2)) { this.$set(row, 'r2', 0) }
+      if (isNaN(row.r3)) { this.$set(row, 'r3', 0) }
+      if (isNaN(row.r4)) { this.$set(row, 'r4', 0) }
+      if (isNaN(row.r5)) { this.$set(row, 'r5', 0) }
+      if (isNaN(row.r6)) { this.$set(row, 'r6', 0) }
+      if (isNaN(row.w1)) { this.$set(row, 'w1', 0) }
+      if (isNaN(row.w2)) { this.$set(row, 'w2', 0) }
+      if (isNaN(row.w3)) { this.$set(row, 'w3', 0) }
+      if (isNaN(row.w4)) { this.$set(row, 'w4', 0) }
+      if (isNaN(row.w5)) { this.$set(row, 'w5', 0) }
+      if (isNaN(row.w6)) { this.$set(row, 'w6', 0) }
+      if (isNaN(row.bw1)) { this.$set(row, 'bw1', 0) }
+      if (isNaN(row.bw2)) { this.$set(row, 'bw2', 0) }
+      if (isNaN(row.bw3)) { this.$set(row, 'bw3', 0) }
+      if (isNaN(row.bw4)) { this.$set(row, 'bw4', 0) }
+      if (isNaN(row.bw5)) { this.$set(row, 'bw5', 0) }
+      if (isNaN(row.bw6)) { this.$set(row, 'bw6', 0) }
       var arr = []
       for (let i = 1; i <= this.table.RWLength; i++) {
         var obj = {}
@@ -1919,11 +2141,15 @@ export default {
           obj['supplement'] = row['bw' + i]
         }
         obj['tratio'] = (parseFloat(row['r' + i])).toFixed(parseInt(Cookies.get('decimalr')))
-        // obj['tratio'] = Math.round(row['r' + i])
         obj['todaysupplement'] = row.todaysupplement
         obj['todayweight'] = row.todayweight
         arr.push(obj)
       }
+      arr.forEach((item)=>{
+        if(isNaN(item.tratio)){
+          item.tratio = 0
+        }
+      })
       if (this.table.isPtsfname == 0) {
         row.ptsfid = '-1'
         row.ptsfname = ''
@@ -1939,11 +2165,11 @@ export default {
       if (this.table.isPtsfname == false) {
         row.supplyweight = '0'
       }
-      console.log(row, '============')
       this.$set(row, 'ratio', Math.floor(parseFloat(row.ratio) * 100) / 100)
       this.$set(row, 'ccountratio', Math.floor(parseFloat(row.ccountratio) * 100) / 100)
       row.ccountratio = String(row.ccountratio)
       row.sumr = Math.round(row.sumr)
+
       // for(let i=0;i<arr.length;i++){
       //   if(arr[i].tratio == undefined ||arr[i].tratio =='' || arr[i].tratio == null){
       //     arr[i].tratio = 0
@@ -1973,40 +2199,40 @@ export default {
       if (row.softccount == '') {
         row.softccount = 0
       }
-      if (row.r1 == '') {
+      if (row.r1 == '' || isNaN(row.r1)) {
         row.r1 = 0
       }
-      if (row.r2 == '') {
+      if (row.r2 == '' || isNaN(row.r2)) {
         row.r2 = 0
       }
-      if (row.r3 == '') {
+      if (row.r3 == '' || isNaN(row.r3)) {
         row.r3 = 0
       }
-      if (row.r4 == '') {
+      if (row.r4 == '' || isNaN(row.r4)) {
         row.r4 = 0
       }
-      if (row.r5 == '') {
+      if (row.r5 == '' || isNaN(row.r5)) {
         row.r5 = 0
       }
-      if (row.r6 == '') {
+      if (row.r6 == '' || isNaN(row.r6)) {
         row.r6 = 0
       }
-      if (row.w1 == '') {
+      if (row.w1 == '' || isNaN(row.w1)) {
         row.w1 = 0
       }
-      if (row.w2 == '' || row.w4 == NaN) {
+      if (row.w2 == '' || isNaN(row.w2)) {
         row.w2 = 0
       }
-      if (row.w3 == '' || row.w4 == NaN) {
+      if (row.w3 == '' || isNaN(row.w3)) {
         row.w3 = 0
       }
-      if (row.w4 == '' || row.w4 == NaN) {
+      if (row.w4 == '' || isNaN(row.w4)) {
         row.w4 = 0
       }
-      if (row.w5 == '' || row.w5 == NaN) {
+      if (row.w5 == '' || isNaN(row.w5)) {
         row.w5 = 0
       }
-      if (row.w6 == '' || row.w6 == NaN) {
+      if (row.w6 == '' || isNaN(row.w6)) {
         row.w6 = 0
       }
       console.log(row, '===========')
@@ -3112,14 +3338,70 @@ export default {
       this.$refs.mychild.restTemp()
     },
     handleSynchronous(){
-      const url = 'authdata/ud/feedp/sync'
-      const data = {}
+      MessageBox.confirm('是否进行软件牛头数同步?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        const url = 'authdata/ud/feedp/sync'
+        const data = {}
+        postJson(url, data).then(response => {
+          if(response.msg !== 'fail'){
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消软件牛头数同步' })
+      })
+    },
+    handle_batchEdit(){
+      this.isproportion = true
+      console.log(this.isproportion)
+      this.oldList =  JSON.parse(JSON.stringify(this.table.list));
+      // this.table.list.forEach((item,key)=>{
+      //   item.Edit = true
+      //   item.NoEdit = false
+      // })
+      // row.Edit
+    },
+    handle_batchEdit_save(){
+      const arr = this.table.list.filter(item2 => {
+        console.log(item2,'item2')
+          return !this.oldList.some(item1 => item1.r1 === item2.r1 && item1.r2 === item2.r2 && item1.r3 === item2.r3 && item1.r4 === item2.r4 && item1.r5 === item2.r5 && item1.r6 === item2.r6);
+      });
+      const barList = []
+      arr.forEach((item)=>{
+        let obj = {}
+        obj.barname = item.barname
+        obj.ccount = item.ccount
+        obj.ratio = item.ratio
+        obj.ftname = item.ftname
+        obj.ptsfname = item.ptsfname
+        obj.times1 = item.r1
+        obj.times2 = item.r2
+        obj.times3 = item.r3
+        obj.times4 = item.r4
+        obj.times5 = item.r5
+        obj.times6 = item.r6
+        barList.push(obj)
+      })
+      const url = 'authdata/fpdetail/batch/edit'
+      let data = {
+        pastureId:Cookies.get('pastureid'),
+        barList:barList
+      }
       postJson(url, data).then(response => {
         if(response.msg !== 'fail'){
           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+        }else{
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
         }
+        this.isproportion = false
       })
-    }
+    },
+    cancelChangeEdit() {
+      // 取消顺序
+      this.getList()
+      this.isproportion = false
+    },
   }
 }
 </script>

+ 82 - 3
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -88,6 +88,22 @@
             <span>{{ scope.row.ftname }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="物料详情" width="90px" align="center">
+          <template slot-scope="scope">
+            <el-popover
+              placement="bottom"
+              width="400"
+              trigger="click">
+              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+              <el-table :data="materialdetailsList" border height="200">
+                <el-table-column min-width="150" property="fname" label="物料" />
+                <el-table-column min-width="100" property="fweight" label="重量" />
+                <el-table-column min-width="100" property="scale" label="占比" />
+              </el-table>
+              <span slot="reference" style="color: blue;" @click="getmaterialdetailsList(scope.row)">详情</span>
+            </el-popover>
+          </template>
+        </el-table-column>
         <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="70px" align="center">
           <template slot-scope="scope">
             <el-switch v-model="scope.row.issplit" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
@@ -262,7 +278,27 @@
                             <button style="background: red;float: right;color: #fff;width: 18px;font-size: 18px;border: none;text-align: center;" :disabled="isokDisable" @click="clickBar(item)">√</button>
                           </div>
                         </el-tooltip>
-                        <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div>
+                        <el-tooltip placement="bottom" style="height: 18px;line-height: 18px;" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
+                          <div slot="content">{{ item.weight }}</div>
+                          <div class="barWeight">
+                            <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.weight }}</span>
+                            <el-popover
+                              placement="right"
+                              width="400"
+                              trigger="click">
+                              <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                              <el-table :data="materialdetailsList" height="200" border>
+                                <el-table-column min-width="150" property="fname" label="物料" />
+                                <el-table-column min-width="100" property="fweight" label="重量" />
+                                <el-table-column min-width="100" property="scale" label="占比" />
+                              </el-table>
+                              <!-- <span  style="color: blue;">详情</span> -->
+                              <button slot="reference" style="background: #ccc;float: right;color: #fff;width: 18px;height:18px;font-size: 16px;border: none;text-align: center;" :disabled="isokDisable">?</button>
+                            </el-popover>
+                          </div>
+                        </el-tooltip>
+                        <!-- <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div> -->
+
                       </div>
                     </div>
                   </li>
@@ -280,7 +316,7 @@
           </el-row>
           <!-- 撒料 -->
           <div class="spreadingMaterial">
-            <div>撒料:<el-button type="danger" @click="handleEmpty">清空</el-button></div>
+            <div>撒料:<el-button type="danger" @click="handleEmpty">清空1</el-button></div>
             <div class="spreadingMaterialList">
               <!-- force-fallback="true" -->
               <draggable
@@ -353,6 +389,20 @@
                   </div>
                   <div class="arr-t" :style="{'background':element.background}">
                     <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
+                    <el-popover
+                      placement="bottom"
+                      width="400"
+                      height="200"
+                      trigger="click">
+                      <b style="text-align: center;width:100%;display:inline-block;">物料详情</b>
+                      <el-table :data="materialdetailsList" height="200" border>
+                       <el-table-column min-width="150" property="fname" label="物料" />
+                       <el-table-column min-width="100" property="fweight" label="重量" />
+                       <el-table-column min-width="100" property="scale" label="占比" />
+                      </el-table>
+                      <i slot="reference" class="el-icon-question" style="position: absolute;right: 0;top: 20px;"/>
+                    </el-popover>
+                    <!-- <span style="position: absolute;right: 5px;width: 5px;height: 5px;border-radius: 50%;">?</span> -->
                   </div>
                 </div>
               </draggable>
@@ -449,6 +499,7 @@ export default {
       rowStyle: { maxHeight: 25 + 'px', height: 25 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       height: document.body.clientHeight - 220, // table高度
+      materialdetailsList: [],
       table: {
         getdataListParm: {
           page: 1,
@@ -788,7 +839,15 @@ export default {
     changeTemplateFormulation(item) {
       this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
       this.create.temp.ftvolume = this.templateFormulationList.find(obj => obj.id === item).volume
+      if(this.create.temp.display == ''){
+        this.create.temp.display = this.create.temp.ftname
+      }
       this.getCreateList1()
+      var obj = {
+        'pastureid':this.create.temp.pastureid,
+        'ftid':this.create.temp.ftid
+      }
+      this.getmaterialdetailsList(obj)
     },
     changeTimes(item) {
       this.getCreateList1()
@@ -1243,13 +1302,16 @@ export default {
       this.create.temp.mytmrid = row.tmrid
       this.create.checkBarList = []
       this.create.temp.mytmrid = row.tmrid
+      if(this.create.temp.display == ''){
+        this.create.temp.display = this.create.temp.ftname
+      }
       if(this.create.temp.volume == undefined || this.create.temp.volume == ''){
         console.log(111)
         this.$set(this.create.temp,'volume',0)
       }
       console.log(this.create.temp,'this.create.temp')
       this.getCreateList1()
-
+      this.getmaterialdetailsList(row)
     },
     updateData() {
       this.$refs['temp'].validate(valid => {
@@ -1786,6 +1848,23 @@ export default {
         //   }
         // })
       }
+    },
+    getmaterialdetailsList(item){
+      let url = 'authdata/GetDataByName'
+      let data  = {
+        name:"getFTdetailList",page:1,offset:1,pagecount:"",returntype:"Map",
+        parammaps:{
+          pastureid:item.pastureid,ftid:item.ftid,
+          // fttypeid:item.fttypeid,
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.msg !== 'fail') {
+          this.materialdetailsList = response.data.list
+        } else {
+          this.materialdetailsList = []
+        }
+      })
     }
   }
 }

+ 52 - 6
src/views/formulationPlan/recipeTemplate/index.vue

@@ -41,7 +41,7 @@
         </div>
         <div class="operation">
           <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
-
+          <el-button v-if="isRoleEdit && ispalyUd" class="success" icon="el-icon-plus" @click="handleGetUd">配方上传</el-button>
           <el-upload style="float: right;margin-right: 15px;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
             <el-button v-if="isRoleEdit" class="export" icon="el-icon-download" style="float: right;">导入</el-button>
           </el-upload>
@@ -152,7 +152,7 @@
                 <el-button v-if="row.isCreate && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="createData(row)" />
                 <span v-if="row.isCreate && isRoleEdit" class="centerSpan">|</span>
                 <el-button v-if="row.isCreate && isRoleEdit" class="minCancel" icon="el-icon-close" @click="createCancel(row)" />
-                <el-button v-if="row.isUpdate && isRoleEdit" :disabled="row.is_modify == 1"  class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
+                <el-button v-if="row.isUpdate && isRoleEdit" :disabled="row.is_modify !== 1"  class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
                 <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
                 <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
                 <el-button v-if="row.isUpdateSave && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData(row)" />
@@ -837,7 +837,7 @@ export default {
       dialogFull: false,
       predefineColors: [
         '#E57373', '#F06292', '#BA68C8', '#9575CD', '#7986CB', '#64B5F6', '#4FC3F7', '#4DD0E1', '#4DB6AC', '#81C784', '#AED581', '#DCE775', '#FFF176', '#FFD54F', '#FFB74D', '#FF8A65', '#A1887F', '#E0E0E0', '#90A4AE'
-      ], 
+      ],
       isRoleEdit: [],
       myheight: document.documentElement.clientHeight - 265,
       requestParams: [
@@ -1083,6 +1083,7 @@ export default {
         tableKey: 0, total: 0, listLoading: true, list: []
       },
       isEnlarge: true,
+      ispalyUd: true,
       // enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
       enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
       getTcodeParm: {
@@ -1142,6 +1143,7 @@ export default {
     })
   },
   created() {
+    this.getIspalyUd()
     this.getList()
     this.getButtons()
     this.getDownList()
@@ -1363,7 +1365,7 @@ export default {
       this.table.temp.source = row.source
       this.table.temp.remark = row.remark
       this.table.temp.enable = row.enable
-      if(this.table.temp.volume == ''){
+      if(this.table.temp.volume == '' || this.table.temp.volume == null){
         this.table.temp.volume = 0
       }
       this.table.temp.volume = parseFloat(row.volume)
@@ -1489,7 +1491,7 @@ export default {
       this.table.temp.pastureid = row.pastureid
       this.table.temp.id = row.id
       this.table.temp.cattle = row.cattle
-      if(this.table.temp.volume == ''){
+      if(this.table.temp.volume == '' || this.table.temp.volume == null || this.table.temp.volume == undefined){
         this.table.temp.volume = 0
       }
       this.table.temp.volume = parseFloat(row.volume)
@@ -1539,6 +1541,10 @@ export default {
     saveUpdateData() {
       this.requestParam = {}
       this.requestParam.name = 'updateFT'
+      if(this.table.temp.volume == '' || this.table.temp.volume == null || this.table.temp.volume == undefined  ||  isNaN(this.table.temp.volume)){
+        this.table.temp.volume = 0
+      }
+      console.log( this.table.temp.volume,'----')
       this.requestParam.parammaps = this.table.temp
       PostDataByName(this.requestParam).then(response => {
         console.log('新增保存发送参数', this.requestParam)
@@ -2493,7 +2499,7 @@ export default {
         // 编辑true,不可编辑false
         row.Edit = true
         row.NoEdit = false
-        // 新增false,编辑false,编辑保存true
+        // 新增false,编辑false,编辑保存true 
         row.isCreate = false
         row.isUpdate = false
         row.isUpdateSave = true
@@ -2507,6 +2513,10 @@ export default {
           setTimeout(() => {
             this.isokDisable = false
           }, 1000)
+          console.log(row.autosecond,'======')
+          if(row.autosecond == null || row.autosecond == undefined || isNaN(row.autosecond)){
+            row.autosecond = '0'
+          }
           this.table2.temp.pastureid = row.pastureid
           this.table2.temp.ftid = this.table2.getdataListParm.parammaps.ftid
           this.table2.temp.fid = row.fid
@@ -3328,6 +3338,42 @@ export default {
           })
         })
       }
+    },
+    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('是否上传配方?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        let url = 'authdata/gm/udfeedtemplet/push'
+        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 })
+          }
+        })
+      })
     }
   }
 }

+ 4 - 4
src/views/login/index.vue

@@ -139,7 +139,7 @@ export default {
                 Cookies.remove('accountInfo')
               }
 
-              // 若为本地环境 则手写cookie  
+              // 若为本地环境 则手写cookie
               if (window.location.href.indexOf('localhost') != -1) {
                 Cookies.set('token', getToken(), 1440)
               }
@@ -411,18 +411,18 @@ $bg: #ccc;
 $light_gray: #ccc;
 $cursor: #000;
 .login-container{
-  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;
+  position: relative;height: 100%;width: 100%;background:  url("../../assets/images/nlogin-bg1.jpg") no-repeat;background-size: cover;
     .new-login{
       width: 50%;height: 42%;position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;
       .new-login-l{
-        background: red;float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;
+        float:left;height:100%;width:50%;background:  url("../../assets/images/nlogin-bg2.png") no-repeat;position: relative;background-size: cover;
         img{position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;width: 50%;height:23%;}
       }
       .new-login-r{
         background: #fff;float:left;height:100%;width:50%;position: relative;
         .title{margin-top: 10%;font-size: 20px;font-weight: 600;color: #019969;text-align: center;}
         .login-form{
-          position: relative;width: 520px;max-width: 100%;overflow: hidden;height: 48%;
+          position: relative;width: 520px;overflow: hidden;height: 48%;width: 100%;
           .svg-container{padding: 6px 5px 6px 15px; color: $dark_gray; vertical-align: middle; width: 30px; display: inline-block;}
           .el-input {
             display: inline-block; width: 80%;

+ 21 - 8
src/views/shedProduction/formulaDryMatter/index.vue

@@ -92,7 +92,13 @@
           <template slot-scope="scope">
             <span>{{ scope.row.operatetime }}</span>
           </template>
-        </el-table-column>
+        </el-table-column>
+        <el-table-column label="是否剩料" min-width="100px" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.excess" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+          </template>
+        </el-table-column>
+
         <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
             <el-button v-if="isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
@@ -179,6 +185,13 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="是否剩料:" prop="excess">
+                <el-switch v-model="create.temp.excess"  active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
@@ -262,7 +275,7 @@ export default {
       create: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '' },
+        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '',excess:1 },
         rules: {
           barid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
           times: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
@@ -342,7 +355,7 @@ export default {
     uploadData() {
       return {
         name: 'checkdryfresh,checkbarname,checktimes,insertFtdryUpload',
-        importParams: '栏舍名称,班次,鲜样重量(g),烘干重量(g),操作人,操作日期',
+        importParams: '栏舍名称,班次,鲜样重量(g),烘干重量(g),操作人,操作日期,是否剩料(是/否)',
         sheetname: 'Sheet1',
         // 登录牧场
         pastureid: Cookies.get('pastureid'),
@@ -448,7 +461,7 @@ export default {
 
     // 新增
     resetTemp() {
-      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '' }
+      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '',excess:1 }
     },
     blurEmp(item) {
       this.create.temp.emp = item.target.value
@@ -827,8 +840,8 @@ export default {
           }
           var excelDatas = [
             {
-              tHeader: ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '理论干物质', '实际干物质', '操作人', '操作日期'],
-              filterVal: ['barname', 'timesstr', 'freshweight', 'dryweight', 'thoweight', 'actweight', 'emp', 'operatetime'],
+              tHeader: ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '理论干物质', '实际干物质', '操作人', '操作日期','是否剩料'],
+              filterVal: ['barname', 'timesstr', 'freshweight', 'dryweight', 'thoweight', 'actweight', 'emp', 'operatetime','excess_str'],
               tableDatas: this.download.list,
               sheetName: 'Sheet1'
             }
@@ -853,8 +866,8 @@ export default {
           this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
            import('@/vendor/Export2Excel').then(excel => {
              const list1 = res.data.result
-             const tHeader = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期', '错误信息']
-             const filterVal = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期', 'error_msg']
+             const tHeader = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期','是否剩料(是/否)', '错误信息']
+             const filterVal = ['栏舍名称', '班次', '鲜样重量(g)', '烘干重量(g)', '操作人', '操作日期','是否剩料(是/否)', 'error_msg']
              const data1 = this.formatJson(filterVal, list1)
              excel.export_json_to_excel({ header: tHeader, data: data1, filename: '配方干物质导入报错信息', autoWidth: true, bookType: 'xlsx' })
            })

+ 30 - 9
src/views/shedProduction/materialRemainingRecord/index.vue

@@ -61,6 +61,7 @@
         </el-table-column>
         <el-table-column label="栏舍名称" min-width="150px" align="center" prop="barname" />
         <el-table-column label="剩料量(kg)" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="干物质" min-width="150px" align="center" prop="dry" />
         <el-table-column label="班次" min-width="90px" align="center" prop="timesstr" />
         <el-table-column label="收集时间" min-width="100px" align="center" prop="operatetime" />
         <el-table-column label="操作人" min-width="90px" align="center" prop="emp" />
@@ -142,6 +143,13 @@
                 <el-input ref="remain" v-model="create.temp.remain" class="filter-item" placeholder="剩料量" type="number" />
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="20">
+              <el-form-item label="干物质:" prop="dry">
+                <el-input ref="dry" v-model="create.temp.dry" class="filter-item" placeholder="干物质" type="number"  />
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-row>
             <el-col :span="20">
@@ -233,7 +241,7 @@ export default {
       create: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '', times: '' },
+        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '' },
         rules: {
           barid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
           remain: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
@@ -308,7 +316,7 @@ export default {
     uploadData() {
       return {
         name: 'checkbarname,checktimes,insertBarfeedremainUpload',
-        importParams: '栏舍名称,剩料量(kg),班次(第一班/第二班/第三班),收集时间,操作人',
+        importParams: '栏舍名称,剩料量(kg),干物质,班次(第一班/第二班/第三班),收集时间,操作人',
         sheetname: 'Sheet1',
         // 登录牧场
         pastureid: Cookies.get('pastureid'),
@@ -438,7 +446,7 @@ export default {
 
     // 新增
     resetTemp() {
-      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '', times: '' }
+      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), emp: Cookies.get('employename'), barid: '', barname: '', remain: '',dry:0, times: '' }
     },
     blurEmp(item) {
       this.create.temp.emp = item.target.value
@@ -488,7 +496,11 @@ export default {
             this.$message({ type: 'error', message: '剩料量请输入自然数并保留两位小数', duration: 2000 })
             return false
           }
-
+          if(this.create.temp.dry){
+            this.create.temp.dry = parseFloat(this.create.temp.dry)
+          }else{
+            this.create.temp.dry = 0
+          }
           this.requestParam.name = 'insertBarfeedremain'
           this.requestParam.parammaps = this.create.temp
           if (this.create.temp.emp == '') { this.create.temp.emp = Cookies.get('employename') }
@@ -528,7 +540,11 @@ export default {
             this.$message({ type: 'error', message: '剩料量请输入自然数并保留两位小数', duration: 2000 })
             return false
           }
-
+          if(this.create.temp.dry){
+            this.create.temp.dry = parseFloat(this.create.temp.dry)
+          }else{
+            this.create.temp.dry = 0
+          }
           this.requestParam.name = 'insertBarfeedremain'
           this.requestParam.parammaps = this.create.temp
           if (this.create.temp.emp == '') { this.create.temp.emp = Cookies.get('employename') }
@@ -582,7 +598,12 @@ export default {
             return false
           }
 
-          this.requestParam.name = 'updateBarfeedremain'
+          this.requestParam.name = 'updateBarfeedremain'
+          if(this.create.temp.dry){
+            this.create.temp.dry = parseFloat(this.create.temp.dry)
+          }else{
+            this.create.temp.dry = 0
+          }
           this.requestParam.parammaps = this.create.temp
           if (this.create.temp.emp == '') { this.create.temp.emp = Cookies.get('employename') }
           PostDataByName(this.requestParam).then(response => {
@@ -747,8 +768,8 @@ export default {
            if(item== 2){
               var excelDatas1 = [
                 {
-                  tHeader: ['栏舍名称', '剩料量(kg)', '班次(第一班/第二班/第三班)', '收集时间', '操作人'],
-                  filterVal: ['barname', 'remain', 'timesstr', 'operatetime', 'emp'],
+                  tHeader: ['栏舍名称', '剩料量(kg)','干物质', '班次(第一班/第二班/第三班)', '收集时间', '操作人'],
+                  filterVal: ['barname', 'remain','dry', 'timesstr', 'operatetime', 'emp'],
                   tableDatas: this.download.list,
                   sheetName: 'Sheet1'
                 }
@@ -806,7 +827,7 @@ export default {
       )
     },
     handleDataUpload(){
-      let a = Cookies.get('url') 
+      let a = Cookies.get('url')
       let b = a.search(8081)
       let c = a.substring(0,a.search(8081)) + '8082'
       let d = a.substring(0,a.lastIndexOf('/'))

+ 197 - 106
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -2,6 +2,7 @@
   <div class="app-container1">
     <el-tabs v-model="activeName" @tab-click="handleTabClick">
       <el-tab-pane label="汇总统计" name="first">
+      <div ref="scrollContainer" @scroll="handleScroll" :style="{ height: myHeight1+'px', overflowY: 'auto', overflowX: 'hidden' }">
         <div class="search">
           <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions" />
           <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
@@ -62,7 +63,8 @@
         </div>
         <div id="table" class="table">
           <h4>混料</h4>
-          <el-table
+          <u-table
+            ref="plTable1"
             :key="tab.table.tableKey"
             v-loading="tab.table.listLoading"
             element-loading-text="给我一点时间"
@@ -76,51 +78,58 @@
             class="elTable table-fixed"
             :max-height="myHeight2"
           >
-            <el-table-column v-if="tab.checked" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
-            <el-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-            <el-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
-            <el-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
-            <el-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
-            <el-table-column v-if="tab.isTrainNumber" :key="5" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-            <el-table-column v-if="tab.isTrainNumber" :key="6" sortable label="车次" min-width="70px" align="center" prop="车次" />
-            <el-table-column v-if="tab.isTrainNumber" :key="7" sortable label="班次" min-width="70px" align="center" prop="班次" />
-            <el-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-            <el-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-            <el-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
-            <el-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
-            <el-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-            <el-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="fname" />
-            <el-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
-            <el-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
-            <el-table-column :key="16" sortable label="计划混料操作数" min-width="60px" align="center" prop="计划混料操作数" />
-            <el-table-column :key="17" sortable label="已混料操作数" min-width="50px" align="center" prop="已混料操作数" />
-            <el-table-column :key="18" sortable label="混料操作率" min-width="60px" align="center" prop="混料操作率" />
-            <el-table-column :key="19" sortable label="混料误差值" min-width="60px" align="center" prop="混料误差值" />
-            <el-table-column :key="20" sortable label="混料准确率" min-width="60px" align="center" prop="混料准确率" />
-            <el-table-column v-if="tab.isTrainNumber" :key="21" sortable label="混料时间" min-width="70px" align="center" prop="混料时间" />
-            <el-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
-            <el-table-column :key="23" sortable label="混料自动跳转次数" min-width="65px" align="center" prop="混料自动跳转次数" />
-            <el-table-column :key="24" sortable label="混料手动跳转次数" min-width="65px" align="center" prop="混料手动跳转次数" />
-            <el-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
-            <el-table-column :key="26" sortable label="混料正确数" min-width="70px" align="center" prop="混料正确数" />
-            <el-table-column :key="27" sortable label="混料正确率" min-width="70px" align="center" prop="混料正确率" />
-            <el-table-column :key="28" sortable label="去除取消正确率" min-width="60px" align="center" prop="去除取消正确率" />
-            <el-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
-            <el-table-column v-if="activeName=='first' && tab.table.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
+            <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
+            <u-table-column v-if="tab.isTrainNumber" :key="117" sortable label="日期" min-width="70px" align="center" prop="计划时间1" />
+            <u-table-column v-if="tab.isTrainNumber" :key="113" sortable label="配方名称" min-width="70px" align="center" prop="templetname" />
+            <u-table-column v-if="tab.isTrainNumber" :key="114" sortable label="车辆名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column v-if="tab.isTrainNumber" :key="115" sortable label="开始加料时间" min-width="70px" align="center" prop="startTime" />
+            <u-table-column v-if="tab.isTrainNumber" :key="116" sortable label="结束加料时间" min-width="70px" align="center" prop="endTime" />
+            <u-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+            <u-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
+            <u-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
+            <u-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
+            <u-table-column v-if="tab.isTrainNumber" :key="5" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column v-if="tab.isTrainNumber" :key="6" sortable label="车次" min-width="70px" align="center" prop="车次" />
+            <u-table-column v-if="tab.isTrainNumber" :key="7" sortable label="班次" min-width="70px" align="center" prop="班次" />
+            <u-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+            <u-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
+            <u-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
+            <u-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+            <u-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="fname" />
+            <u-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
+            <u-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
+            <u-table-column :key="16" sortable label="计划混料操作数" min-width="60px" align="center" prop="计划混料操作数" />
+            <u-table-column :key="17" sortable label="已混料操作数" min-width="50px" align="center" prop="已混料操作数" />
+            <u-table-column :key="18" sortable label="混料操作率" min-width="60px" align="center" prop="混料操作率" />
+            <u-table-column :key="19" sortable label="混料误差值" min-width="60px" align="center" prop="混料误差值" />
+            <u-table-column :key="20" sortable label="混料准确率" min-width="60px" align="center" prop="混料准确率" />
+            <u-table-column v-if="tab.isTrainNumber" :key="21" sortable label="混料时间" min-width="70px" align="center" prop="混料时间" />
+            <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="发料开始时间" min-width="70px" align="center" prop="startMaterialTime" />
+            <u-table-column v-if="tab.isTrainNumber" :key="23" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
+            <u-table-column :key="24" sortable label="混料自动跳转次数" min-width="65px" align="center" prop="混料自动跳转次数" />
+            <u-table-column :key="25" sortable label="混料手动跳转次数" min-width="65px" align="center" prop="混料手动跳转次数" />
+            <u-table-column :key="26" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
+            <u-table-column :key="27" sortable label="混料正确数" min-width="70px" align="center" prop="混料正确数" />
+            <u-table-column :key="28" sortable label="混料正确率" min-width="70px" align="center" prop="混料正确率" />
+            <u-table-column :key="29" sortable label="去除取消正确率" min-width="60px" align="center" prop="去除取消正确率" />
+            <u-table-column :key="30" sortable label="标准差" min-width="60px" align="center" prop="方差" />
+            <u-table-column v-if="activeName=='first' && tab.table.list !== null" :key="31" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
               <template slot-scope="{row}">
                 <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
               </template>
-            </el-table-column>
-            <el-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
+            </u-table-column>
+            <u-table-column v-else :key="31" align="center" width="70" label="操作" class-name="small-padding fixed-width">
               <template slot-scope="{row}">
                   <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
               </template>
-            </el-table-column>
-          </el-table>
+            </u-table-column>
+          </u-table>
           <span v-if="tab.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab.table.total }}条</span>
           <div v-if="tab.radio !== '6'">
             <h4>撒料</h4>
-            <el-table
+            <u-table
+              ref="plTable22"
               :key="tab.table2.tableKey"
               v-loading="tab.table2.listLoading"
               element-loading-text="给我一点时间"
@@ -134,47 +143,53 @@
               class="elTable table-fixed"
               :max-height="myHeight2"
             >
-              <el-table-column v-if="tab.checked" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
-              <el-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-              <el-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
-              <el-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
-              <el-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
-              <el-table-column v-if="tab.isTrainNumber" :key="5" sortable label="车次" min-width="70px" align="center" prop="车次" />
-              <el-table-column v-if="tab.isTrainNumber" :key="6" sortable label="班次" min-width="70px" align="center" prop="班次" />
-              <el-table-column v-if="tab.isTrainNumber" :key="7" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-              <el-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-              <el-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
-              <el-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
-              <el-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
-              <el-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
-              <el-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="饲料" />
-              <el-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
-              <el-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
-              <el-table-column :key="16" sortable label="计划撒料操作数" min-width="60px" align="center" prop="计划撒料操作数" />
-              <el-table-column :key="17" sortable label="已撒料操作数" min-width="50px" align="center" prop="已撒料操作数" />
-              <el-table-column :key="18" sortable label="撒料操作率" min-width="60px" align="center" prop="撒料操作率" />
-              <el-table-column :key="19" sortable label="撒料误差值" min-width="60px" align="center" prop="撒料误差值" />
-              <el-table-column :key="20" sortable label="撒料准确率" min-width="60px" align="center" prop="撒料准确率" />
-              <el-table-column v-if="tab.isTrainNumber" :key="21" sortable label="撒料时间" min-width="70px" align="center" prop="撒料时间" />
-              <el-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
-              <el-table-column :key="23" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
-              <el-table-column :key="24" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
-              <el-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
-              <el-table-column :key="26" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
-              <el-table-column :key="27" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
-              <el-table-column :key="28" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
-              <el-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
-              <el-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
+              <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
+              <u-table-column v-if="tab.isTrainNumber" :key="117" sortable label="日期" min-width="70px" align="center" prop="计划时间1" />
+              <u-table-column v-if="tab.isTrainNumber" :key="113" sortable label="配方名称" min-width="70px" align="center" prop="templetname" />
+              <u-table-column v-if="tab.isTrainNumber" :key="114" sortable label="车辆名称" min-width="70px" align="center" prop="TMR名称" />
+              <u-table-column v-if="tab.isTrainNumber" :key="115" sortable label="开始加料时间" min-width="70px" align="center" prop="startTime" />
+              <u-table-column v-if="tab.isTrainNumber" :key="116" sortable label="结束加料时间" min-width="70px" align="center" prop="endTime" />
+              <u-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+              <u-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
+              <u-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
+              <u-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
+              <u-table-column v-if="tab.isTrainNumber" :key="5" sortable label="车次" min-width="70px" align="center" prop="车次" />
+              <u-table-column v-if="tab.isTrainNumber" :key="6" sortable label="班次" min-width="70px" align="center" prop="班次" />
+              <u-table-column v-if="tab.isTrainNumber" :key="7" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+              <u-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+              <u-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+              <u-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
+              <u-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
+              <u-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
+              <u-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="饲料" />
+              <u-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
+              <u-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
+              <u-table-column :key="16" sortable label="计划撒料操作数" min-width="60px" align="center" prop="计划撒料操作数" />
+              <u-table-column :key="17" sortable label="已撒料操作数" min-width="50px" align="center" prop="已撒料操作数" />
+              <u-table-column :key="18" sortable label="撒料操作率" min-width="60px" align="center" prop="撒料操作率" />
+              <u-table-column :key="19" sortable label="撒料误差值" min-width="60px" align="center" prop="撒料误差值" />
+              <u-table-column :key="20" sortable label="撒料准确率" min-width="60px" align="center" prop="撒料准确率" />
+              <u-table-column v-if="tab.isTrainNumber" :key="21" sortable label="撒料时间" min-width="70px" align="center" prop="撒料时间" />
+              <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="发料开始时间" min-width="70px" align="center" prop="startMaterialTime" />
+              <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
+              <u-table-column :key="23" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
+              <u-table-column :key="24" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
+              <u-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
+              <u-table-column :key="26" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
+              <u-table-column :key="27" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
+              <u-table-column :key="28" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
+              <u-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
+              <u-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
                 <template slot-scope="{row}">
                   <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
                 </template>
-              </el-table-column>
-              <el-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
+              </u-table-column>
+              <u-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
                 <template slot-scope="{row}">
                     <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
                   </template>
-                </el-table-column>
-            </el-table>
+                </u-table-column>
+            </u-table>
             <span v-if="tab.table2.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab.table2.total }}条</span>
           </div>
         </div>
@@ -580,6 +595,11 @@
                 <h4>栏舍撒料时间统计</h4>
                 <div v-if="tab.chart7.isChart" class="button">
                   <div class="chartButton">
+                    <!-- 君盛-->
+                    <!-- <el-select v-model="tab.chart7.getdataListParm.parammaps.statisticsList" multiple  placeholder="请选择" collapse-tags @change="changeStatisticChart7">
+                      <el-option v-for="item in tab.chart7.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
+                    </el-select> -->
+                    <!-- 其他牧场  -->
                     <my-select ref="tenantselect" :model="tab.chart7.getdataListParm.parammaps.statisticsList" :option="tab.chart7.statisticsList"  :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart7" />
                     <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart7')">
                       <el-radio-button label="1" border>日</el-radio-button>
@@ -635,6 +655,7 @@
             </el-col>
           </el-row>
         </div>
+      </div>
       </el-tab-pane>
       <el-tab-pane label="混料统计" name="second">
         <div class="search" ref="myHeightSecond">
@@ -668,6 +689,9 @@
             <span>-</span>
             <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzql2" placeholder="混料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
           </div>
+          <el-select v-model="tab2.table.getdataListParm.parammaps.premix" filterable placeholder="是否预混计划" class="filter-item" style="width: 120px;" clearable>
+            <el-option v-for="item in tab2.premixList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <el-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox>
 
           <el-button class="successBorder" style="margin-top: 5px;" @click="form_search2">查询</el-button>
@@ -692,9 +716,10 @@
           >
             <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
             <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column sortable label="操作编号" min-width="70px" align="center" prop="sort" />
             <u-table-column sortable label="车次" min-width="50px" align="center" prop="车次" />
             <u-table-column sortable label="班次" min-width="50px" align="center" prop="班次" />
-           <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
+            <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
               <template slot-scope="{row}">
                 <a @click="clickRecipeName2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
               </template>
@@ -716,6 +741,7 @@
             <u-table-column sortable label="开始重量" min-width="55px" align="center" prop="开始重量" />
             <u-table-column sortable label="结束重量" min-width="55px" align="center" prop="结束重量" />
             <u-table-column sortable label="车次描述" min-width="55px" align="center" prop="remark" />
+            <u-table-column sortable label="是否达标" min-width="70px" align="center" prop="standard" />
           </u-table>
           <span v-if="tab2.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab2.table.total }}条</span>
         </div>
@@ -776,6 +802,7 @@
           >
             <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
             <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
+            <u-table-column sortable label="操作编号" min-width="70px" align="center" prop="sort" />
             <u-table-column sortable label="车次" min-width="45px" align="center" prop="车次" />
             <u-table-column sortable label="班次" min-width="45px" align="center" prop="班次" />
             <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
@@ -797,6 +824,7 @@
             <u-table-column sortable label="跳转方式" min-width="55px" align="center" prop="跳转方式" />
             <u-table-column sortable label="开始重量" min-width="55px" align="center" prop="开始重量" />
             <u-table-column sortable label="结束重量" min-width="55px" align="center" prop="结束重量" />
+            <u-table-column sortable label="是否达标" min-width="70px" align="center" prop="standard" />
           </u-table>
           <span v-if="tab3.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab3.table.total }}条</span>
         </div>
@@ -1687,6 +1715,7 @@ export default {
 
       tab2: {
         TMRNameList:[],
+        premixList:[{id:0,name:'预混'},{id:1,name:'非预混'}],
         table: {
           getdataListParm: {
             name: 'getStatisticsHL',
@@ -1705,7 +1734,8 @@ export default {
               times: '',
               buttontype: '',
               templetname: '',
-              isuse: ''
+              isuse: '',
+              premix:''
             }
           },
           tableKey: 1,
@@ -1776,6 +1806,7 @@ export default {
       },
       isokDisable:false,
       // search
+      myHeight1: document.documentElement.clientHeight - 85 - 80,
       myHeight2: document.documentElement.clientHeight - 85 - 150,
       myHeightSecond: '',
       myHeightThird:'',
@@ -1846,13 +1877,13 @@ export default {
     this.getIsDisplay()
     this.getTabList()
     this.getTabList2()
-    this.getChart1()
-    this.getChart2()
-    this.getChart3()
-    this.getChart4()
-    this.getChart5()
-    this.getChart6()
-    this.getChart7()
+    // 暂时注释
+    // this.getChart1()
+    // this.getChart2()
+    // this.getChart3()
+    // this.getChart4()
+    // this.getChart5()
+    // this.getChart6()
   },
   mounted() {},
   methods: {
@@ -2601,14 +2632,14 @@ export default {
         } else if (this.tab.radio == '4') {
           var excelDatas4 = [
             {
-              tHeader: ['日期', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
               tableDatas: this.tab.table.list,
               sheetName: '混料'
             },
             {
-              tHeader: ['日期', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
               tableDatas: this.tab.table2.list,
               sheetName: '撒料'
             }
@@ -2725,14 +2756,14 @@ export default {
         } else if (this.tab.radio == '4') {
           var excelDatas4 = [
             {
-              tHeader: ['TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
               tableDatas: this.tab.table.list,
               sheetName: '混料'
             },
             {
-              tHeader: ['TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
               tableDatas: this.tab.table2.list,
               sheetName: '撒料'
             }
@@ -2810,7 +2841,6 @@ export default {
         this.getChart4()
         this.getChart5()
         this.getChart6()
-        this.getChart7()
         this.$nextTick(() => {
           this.$refs.plTable3.doLayout()
           this.$refs.plTable3.doLayout()
@@ -3001,9 +3031,11 @@ export default {
       postJson(url, data).then(response => {
         if (response.data !== null) {
           console.log('汇总统计/混料table数据', response.data.list)
+          this.$refs.plTable1.reloadData(response.data.list)
           this.tab.table.list = response.data.list
           this.tab.table.total = response.data.total
         } else {
+          this.$refs.plTable2.reloadData([])
           this.tab.table.list = []
           this.tab.table.total = 0
         }
@@ -3044,9 +3076,11 @@ export default {
       postJson(url, data).then(response => {
         if (response.data !== null) {
           console.log('汇总统计/撒料table数据', response.data.list)
+          this.$refs.plTable22.reloadData(response.data.list)
           this.tab.table2.list = response.data.list
           this.tab.table2.total = response.data.total
         } else {
+          this.$refs.plTable22.reloadData([])
           this.tab.table2.list = []
           this.tab.table2.total = 0
         }
@@ -3433,7 +3467,7 @@ export default {
       if (this.tab.chart1.chartLine != null) {
         this.tab.chart1.chartLine.dispose()
       }
-      this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
+      this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3458,6 +3492,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3544,7 +3588,7 @@ export default {
       if (this.tab.chart2.chartLine != null) {
         this.tab.chart2.chartLine.dispose()
       }
-      this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'))
+      this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3569,6 +3613,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: [
@@ -3677,7 +3731,7 @@ export default {
       if (this.tab.chart3.chartLine != null) {
         this.tab.chart3.chartLine.dispose()
       }
-      this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'))
+      this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3702,6 +3756,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3817,7 +3881,7 @@ export default {
       if (this.tab.chart4.chartLine != null) {
         this.tab.chart4.chartLine.dispose()
       }
-      this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'))
+      this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'),null,{renderer: "svg"})
       var option = {
         title: {
           text: ''
@@ -3842,6 +3906,16 @@ export default {
         },
         xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
+          min:0,  //取0为最小刻度
+          max: 100, //取100为最大刻度
+          min:'min', //取最小值为最小刻度
+          max: 'max', //取最大值为最大刻度
+          min: function(value) {//取最小值向下取整为最小刻度
+            return Math.floor(value.min)
+          },
+          max: function(value) {//取最大值向上取整为最大刻度
+            return  Math.ceil(value.max)
+          },
           type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
         },
         series: (function() {
@@ -3926,7 +4000,7 @@ export default {
       if (this.tab.chart5.chartLine != null) {
         this.tab.chart5.chartLine.dispose()
       }
-      this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'))
+      this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'),null,{renderer: "svg"})
       var option = {
         tooltip: {
           trigger: 'axis',
@@ -4050,7 +4124,7 @@ export default {
       if (this.tab.chart6.chartLine != null) {
         this.tab.chart6.chartLine.dispose()
       }
-      this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'))
+      this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'),null,{renderer: "svg"})
       var option = {
         color: ['#3398DB'],
         tooltip: {
@@ -4127,6 +4201,19 @@ export default {
       // console.log(JSON.parse(this.tab.chart7.statisticsList),'我要看的下拉数据')
       // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
       this.roadChartLine7(this.tab.chart7.chartLine_data)
+    },
+     handleScroll() {
+      // 获取滚动容器的DOM元素
+      const scrollContainer = this.$refs.scrollContainer;
+      // 计算滚动条距离底部的距离
+      const distanceToBottom = scrollContainer.scrollHeight - (scrollContainer.scrollTop + scrollContainer.clientHeight);
+
+      // 如果滚动条已经滚到最下方
+      if (distanceToBottom === 0) {
+        console.log('滚动条已经滚到最下方');
+        this.getChart7()
+        // 在这里可以执行相应的操作
+      }
     },
     getChart7() {
       this.tab.chart7.listLoading = true
@@ -4163,13 +4250,16 @@ export default {
           this.tab.chart7.statisticsList = []
           this.tab.chart7.getdataListParm.parammaps.statisticsList = []
           for (let i = 0; i < response.data.list.data1.length; i++) {
+            // 君盛
             // if (i < 10) {
-              this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
-              var obj = {}
-              obj.id = i
-              obj.name = response.data.list.data1[i]
-              this.tab.chart7.statisticsList.push(obj)
+            //   this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
             // }
+            // 其他牧场
+            this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
+            var obj = {}
+            obj.id = i
+            obj.name = response.data.list.data1[i]
+            this.tab.chart7.statisticsList.push(obj)
           }
 
           console.log("------->",this.tab.chart7)
@@ -4204,8 +4294,9 @@ export default {
       if (this.tab.chart7.chartLine != null) {
         this.tab.chart7.chartLine.dispose()
       }
-      this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'))
+      this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'),null,{renderer: "svg"})
       var option = {
+        useWorker: true,
         title: {
           text: ''
         },
@@ -4533,8 +4624,8 @@ export default {
         }
         var excelDatasTab2 = [
           {
-            tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
-            filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
+            tHeader: ['日期', 'TMR名称', '操作编号','车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间','是否达标',],
+            filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard'],
             tableDatas: exportList,
             sheetName: '混料统计'
           }
@@ -4634,8 +4725,8 @@ export default {
         }
         var excelDatasTab3 = [
           {
-            tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
-            filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
+            tHeader: ['日期', 'TMR名称','操作编号', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','是否达标',],
+            filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard'],
             tableDatas: exportList,
             sheetName: '撒料统计'
           }

+ 234 - 47
src/views/statisticalAnalysis/feedingEfficiency/pasture/index.vue

@@ -48,7 +48,7 @@
             <el-table-column sortable label="撒料量(kg)" min-width="60px" align="center" prop="撒料量" />
             <el-table-column sortable label="平均混料时间" min-width="70px" align="center" prop="混料时间" />
             <el-table-column sortable label="转投剩料量(kg)" min-width="70px" align="center" prop="转投剩料量" />
-            <el-table-column sortable label="日剩料量(kg)" min-width="70px" align="center" prop="今日剩料量" />
+            <el-table-column sortable label="日剩料量(kg)" min-width="70px" align="center" prop="今日剩料量" />
             <el-table-column sortable label="剩料率(%)" min-width="60px" align="center" prop="剩料率" />
             <el-table-column sortable label="TMR干物质(%)" min-width="65px" align="center" prop="TMR干物质" />
             <el-table-column sortable label="配方干物质采食量(kg/头)" min-width="80px" align="center" prop="配方干物质采食量" />
@@ -93,26 +93,31 @@
           <el-row :gutter="10" class="dashboard-editor-container">
             <el-col :span="12">
               <div class="grid-content">
-                <h4 style="text-align:center;">泌乳牛干物质采食量</h4>
+                <h4 style="text-align:center;">干物质采食量</h4>
                 <div v-if="tab.chart1.isChart" class="button">
                   <div class="chartButton">
-                    <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart1')">
+                    <my-select ref="tenantselect" :model="tab.chart1.getdataListParm.parammaps.statisticsList" :option="tab.chart1.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;margin-top: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart1" />
+                    <el-select v-model="tab.chart1.getdataListParm.parammaps.bigcowclass" filterable placeholder="牲畜类别" class="filter-item" clearable style="width: 150px;margin-right: 5px;margin-top: 5px;" @change="changeLivestockType">
+                      <el-option v-for="item in tab.chart1.livestockTypeList" :key="item.value" :label="item.label" :value="item.label" />
+                    </el-select>
+                    <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;margin-right: 10px;" @change="changeChartSpecificDate('chart1')">
                       <el-radio-button label="1" border>日</el-radio-button>
                       <!-- <el-radio-button label="2" border>周</el-radio-button> -->
                       <el-radio-button label="3" border>月</el-radio-button>
                     </el-radio-group>
-                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
+                    <!-- <br/> -->
+                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-top: 5px;">
                       <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                     </div>
-                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
-                      <el-select v-model="tab.chart1.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart1')">
+                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;">
+                      <el-select v-model="tab.chart1.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;margin-top: 5px;" placeholder="年份" @change="changeChartYear('chart1')">
                         <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                       </el-select>
                       <el-select v-model="tab.chart1.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                         <el-option v-for="(item,index) in tab.chart1.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                       </el-select>
                     </div>
-                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
+                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;">
                       <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                     </div>
                     <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart1')">确认</el-button>
@@ -143,8 +148,8 @@
                     class="elTable table-fixed"
                   >
                     <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
-                    <el-table-column label="泌乳牛采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
-                    <el-table-column label="泌乳牛产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
+                    <el-table-column label="采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
+                    <el-table-column label="产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
                   </el-table>
                 </div>
               </div>
@@ -217,6 +222,7 @@
                 <h4 style="text-align:center;">混料时间统计</h4>
                 <div v-if="tab.chart3.isChart" class="button">
                   <div class="chartButton">
+                    <my-select ref="tenantselect" :model="tab.chart3.getdataListParm.parammaps.statisticsList" :option="tab.chart3.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart3" />
                     <el-radio-group v-model="tab.chart3.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart3')">
                       <el-radio-button label="1" border>日</el-radio-button>
                       <!-- <el-radio-button label="2" border>周</el-radio-button> -->
@@ -264,7 +270,8 @@
                     class="elTable table-fixed"
                   >
                     <el-table-column sortable label="日期" min-width="110px" align="center" prop="日期" />
-                    <el-table-column sortable label="混料时间(分钟)" min-width="110px" align="center" prop="field1" />
+                    <el-table-column sortable label="配方名称" min-width="110px" align="center" prop="名称" />
+                    <el-table-column sortable label="准确率" min-width="110px" align="center" prop="准确率" />
                   </el-table>
                 </div>
               </div>
@@ -541,7 +548,7 @@
 import echarts from 'echarts'
 
 require('echarts/theme/macarons')
-import { GetDataByName, postJson, GetReportform, whichWeek } from '@/api/common'
+import { GetDataByName, postJson, GetReportform, whichWeek,GetDataByNames } from '@/api/common'
 import Cookies from 'js-cookie'
 import { parseTime } from '@/utils/index.js'
 import Pagination from '@/components/Pagination'
@@ -678,6 +685,7 @@ export default {
         chart1: {
           chartLine: null,
           chartLine_data: {},
+          livestockTypeList: [], // 牲畜类别
           getdataListParm: {
             name: 'getFeedEffMR',
             page: 1,
@@ -695,13 +703,16 @@ export default {
               chartMonth: '',
               yearList: [],
               weekList: [],
-              status: 0
+              status: 0,
+              ccname:''
             }
           },
           tableKey: 1,
           list: [],
           total: 0,
           listLoading: true,
+          statisticsList:[],
+          chart1Data3:[],
           isChart: true,
           isTable: false,
           table: {
@@ -778,6 +789,8 @@ export default {
           list: [],
           total: 0,
           listLoading: true,
+          statisticsList: [],
+          chart3Data3: [],
           isChart: true,
           isTable: false,
           table: {
@@ -956,6 +969,9 @@ export default {
       tab2Download2List3:[],
       tab2Download2List4:[],
       frequencyList:[],
+      requestParams: [
+        {"name":"getCowclassList","page":1,"offset":1,"pagecount":50,"returntype":"Map","parammaps":{"pastureid":Cookies.get('pastureid'),"classname":"","parentname":"","enable":1}},
+      ],
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       myHeight: document.documentElement.clientHeight - 85 - 210
@@ -963,6 +979,7 @@ export default {
   },
   created() {
     this.getAllYear()
+    this.getDownList()
     this.getTabList()
     this.getTimeFn()
     this.getChart1()
@@ -973,6 +990,15 @@ export default {
     this.getIsDisplay()
   },
   methods: {
+    getDownList() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.tab.chart1.livestockTypeList = response.data.getCowclassList.list
+        for(var i=0;i<this.tab.chart1.livestockTypeList.length;i++){
+        	this.tab.chart1.livestockTypeList[i].label = this.tab.chart1.livestockTypeList[i].classname;
+        	this.tab.chart1.livestockTypeList[i].value = this.tab.chart1.livestockTypeList[i].id;
+        }
+      })
+    },
     getIsDisplay() {
       GetDataByName(this.tab.maxTime.getMaxTimesParm).then(response => {
         console.log(response.data.list[0].inforvalue)
@@ -1892,6 +1918,36 @@ export default {
     handleQuickJumpTop() {
       window.scrollTo(0, 0)
     },
+
+    // 泌乳牛干物质采食量
+    changeStatisticChart1(arr) {
+      console.log(arr,'arr===')
+      var arr1 = []
+      for (let i = 0; i < arr.length; i++) {
+        if (arr[i] !== 'all') {
+          arr1.push(arr[i])
+        }
+      }
+      this.tab.chart1.getdataListParm.parammaps.statisticsList = arr1
+      console.log(this.tab.chart1.getdataListParm.parammaps.statisticsList,'=====0000')
+      var arrData3 = []
+      for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
+        const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
+        for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
+          if (j == myId) {
+            arrData3.push(this.tab.chart1.chart1Data3[j])
+          }
+        }
+      }
+      console.log(arrData3,'arrData3')
+      this.tab.chart1.chartLine_data.data3 = arrData3
+
+      this.tab.chart1.chartLine_data.data3 = this.tab.chart1.getdataListParm.parammaps.statisticsList
+      this.roadChartLine1(this.tab.chart1.chartLine_data)
+    },
+    changeLivestockType(){
+      this.getChart1()
+    },
     // 泌乳牛干物质采食量
     getChart1() {
       this.tab.chart1.listLoading = true
@@ -1909,19 +1965,65 @@ export default {
         data.parammaps.stopTime = this.tab.chart1.getdataListParm.parammaps.stopTime
         data.parammaps.status = this.tab.chart1.getdataListParm.parammaps.status
       }
+      data.parammaps.bigcowclass = this.tab.chart1.getdataListParm.parammaps.bigcowclass
       postJson(url, data).then(response => {
-        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
-          console.log('泌乳牛干物质采食量图表数据', response.data.list)
-          for (let i = 0; i < response.data.data.length; i++) {
-            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
-              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
-            }
-            if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
-              response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
-            }
-          }
+        if (response.data !== null  && response.data.data !== null) {
+          // console.log('泌乳牛干物质采食量图表数据', response.data.list)
+          // for (let i = 0; i < response.data.data.length; i++) {
+          //   if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
+          //     response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
+          //   }
+          //   if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
+          //     response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
+          //   }
+          // }
           this.tab.chart1.table.list = response.data.data
-          this.tab.chart1.chartLine_data = response.data.list
+          // this.tab.chart1.chartLine_data = response.data.list
+          // this.tab.chart1.chartLine_data = {
+          //   chartType:'line_bar',
+          //   date: ['2019-01', '2019-02', '2019-03', '2019-04', '2019-05', '2019-06', '2019-07', '2019-08', '2019-09', '2019-10', '2019-11', '2019-12'],
+          //   legendArr1: ['采食量-数据1', '采食量-数据2', '采食量-数据3', '采食量-数据4' ],
+          //   dataArr1:[
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //     [2, 10, 3, 2, 10, 4, 4, 9, 3, 9, 3, 8],
+          //   ],
+          //   legendArr2: ['产奶量-数据1',  '产奶量-数据2'],
+          //   dataArr2:[
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 5],
+          //     [1, 10, 7, 0, 1, 7, 7, 6, 4, 4, 1, 6],
+          //   ],
+          // }
+          this.tab.chart1.chartLine_data = {}
+          this.tab.chart1.chartLine_data.date = response.data.date
+          this.tab.chart1.chartLine_data.dataArr1 = response.data.dataArr1
+          this.tab.chart1.chartLine_data.dataArr2 = response.data.dataArr2
+          this.tab.chart1.chartLine_data.legendArr1 = []
+          this.tab.chart1.chartLine_data.legendArr2 = []
+          response.data.ftname.forEach((item)=>{
+            var str1 = '采食量-' + item
+            this.tab.chart1.chartLine_data.legendArr1.push(str1)
+          })
+          response.data.ftname.forEach((item)=>{
+            var str2 = '产奶量-' + item
+            this.tab.chart1.chartLine_data.legendArr2.push(str2)
+          })
+          // this.tab.chart1.chartLine_data.legendArr1 = this.tab.chart1.chartLine_data.ftname
+          // this.tab.chart1.chartLine_data.legendArr2 = this.tab.chart1.chartLine_data.ftname
+          var data3 = this.tab.chart1.chartLine_data.legendArr1.concat(this.tab.chart1.chartLine_data.legendArr2)
+
+          this.tab.chart1.chartLine_data.data3 = Array.from(new Set(data3))
+          this.tab.chart1.getdataListParm.parammaps.statisticsList = []
+          this.tab.chart1.statisticsList = []
+          console.log(data3,'data3')
+          for (let i = 0; i < data3.length; i++) {
+            this.tab.chart1.getdataListParm.parammaps.statisticsList.push(data3[i])
+            var obj = {}
+            obj.id = i
+            obj.name = data3[i]
+            this.tab.chart1.statisticsList.push(obj)
+          }
           // this.tab.chart1.total = response.data.total
         } else {
           this.tab.chart1.list = []
@@ -1938,19 +2040,50 @@ export default {
         this.tab.chart1.chartLine.dispose()
       }
       this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
+      console.log(chartLine_data,'chartLine_data')
       var option = {
-        tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' }}},
-        legend: { data: ['泌乳牛干物质采食量', '泌乳牛产奶量'], right: 10, show: true, type: 'scroll' },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: { type: 'cross', crossStyle: { color: '#999' }},
+        },
+        legend: {
+          data:chartLine_data.data3,
+          right: 10, show: true, type: 'scroll' ,
+       },
         grid: { top: '15%', left: '8%', right: '8%', containLabel: true },
-        xAxis: [{ type: 'category', data: chartLine_data.data1 }],
+        xAxis: [{ type: 'category', data: chartLine_data.date }],
         yAxis: [
-          { splitLine: { show: false }, type: 'value', name: '泌乳牛干物质\n采食量', axisLabel: { formatter: '{value} ' }},
-          { splitLine: { show: false }, type: 'value', name: '泌乳牛产奶量', axisLabel: { formatter: '{value} ' }}
+          { splitLine: { show: false }, type: 'value', name: '干物质\n采食量', axisLabel: { formatter: '{value} ' }},
+          { splitLine: { show: false }, type: 'value', name: '产奶量', axisLabel: { formatter: '{value} ' }}
         ],
-        series: [
-          { name: '泌乳牛干物质采食量', type: 'bar', itemStyle: { normal: { color: '#61a5e8' }}, data: chartLine_data.data2 },
-          { name: '泌乳牛产奶量', type: 'line', itemStyle: { normal: { color: '#ff2d2d' }}, yAxisIndex: 1, data: chartLine_data.data3 }
-        ]
+        // series: [
+        //   { name: '泌乳牛干物质采食量', type: 'bar', itemStyle: { normal: { color: '#61a5e8' }}, data: chartLine_data.data2 },
+        //   { name: '泌乳牛产奶量', type: 'line', itemStyle: { normal: { color: '#ff2d2d' }}, yAxisIndex: 1, data: chartLine_data.data3 }
+        // ]
+        series: function (e) {
+           var serie = [];
+           for (var i = 0; i < chartLine_data.date.length; i++) {
+               var item = {
+                 name: chartLine_data.legendArr1[i],
+                 data: chartLine_data.dataArr1[i],
+                 type: 'line',
+                 emphasis: { label: { show: true, position: 'inside' } },
+               }
+             serie.push(item);
+           }
+
+           for (var i = 0; i < chartLine_data.date.length; i++) {
+               var item = {
+                 name: chartLine_data.legendArr2[i],
+                 data: chartLine_data.dataArr2[i],
+                 type: 'bar',
+                 yAxisIndex: 1,
+                 emphasis: { label: { show: true, position: 'inside' } },
+               }
+             serie.push(item);
+           }
+           return serie;
+         }()
       }
       this.tab.chart1.chartLine.setOption(option)
       window.onresize = function() {
@@ -2090,6 +2223,11 @@ export default {
                 type: 'line',
                 data: chartLine_data.data3[i].data
               }
+              var item2 = {
+                name: chartLine_data.data1[i],
+                type: '',
+                data: chartLine_data.data3[i].data
+              }
               serie.push(item)
             }
           }
@@ -2104,6 +2242,27 @@ export default {
       }
     },
 
+    changeStatisticChart3(arr) {
+      var arr1 = []
+      for (let i = 0; i < arr.length; i++) {
+        if (arr[i] !== 'all') {
+          arr1.push(arr[i])
+        }
+      }
+      this.tab.chart3.getdataListParm.parammaps.statisticsList = arr1
+      var arrData3 = []
+      for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
+        const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
+        for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
+          if (j == myId) {
+            arrData3.push(this.tab.chart3.chart3Data3[j])
+          }
+        }
+      }
+      this.tab.chart3.chartLine_data.data3 = arrData3
+      this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
+      this.roadChartLine3(this.tab.chart3.chartLine_data)
+    },
     // 混料时间统计
     getChart3() {
       this.tab.chart3.listLoading = true
@@ -2127,7 +2286,32 @@ export default {
           this.tab.chart3.table.list = response.data.data
           this.tab.chart3.chartLine_data = response.data.list
           this.tab.chart3.total = response.data.total
+          this.tab.chart3.statisticsList = []
+          this.tab.chart3.getdataListParm.parammaps.statisticsList = []
+          for (let i = 0; i < response.data.list.data1.length; i++) {
+            // if (i < 10) {
+              this.tab.chart3.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
+            // }
+            var obj = {}
+            obj.id = i
+            obj.name = response.data.list.data1[i]
+            this.tab.chart3.statisticsList.push(obj)
+          }
+          this.tab.chart3.chart3Data3 = response.data.list.data3
           this.tab.chart3.total = response.data.total
+          console.log('牛栏剩料率图数据', this.tab.chart3.chartLine_data)
+          console.log('牛栏剩料率表数据', this.tab.chart3.table.list)
+          var arrData3 = []
+          for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
+            const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
+            for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
+              if (j == myId) {
+                arrData3.push(this.tab.chart3.chart3Data3[j])
+              }
+            }
+          }
+          this.tab.chart3.chartLine_data.data3 = arrData3
+          this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
         } else {
           this.tab.chart3.list = []
           this.tab.chart3.chartLine_data = {}
@@ -2150,10 +2334,7 @@ export default {
         tooltip: {
           trigger: 'axis'
         },
-        legend: {
-          data: ['混料时间'],
-          right: 10, show: true, type: 'scroll'
-        },
+        legend: { data: chartLine_data.data1, right: 10, show: true, type: 'scroll' },
         grid: {
           top: '15%',
           left: '5%',
@@ -2165,21 +2346,27 @@ export default {
           right: '2%',
           feature: {}
         },
-        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
+        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
         yAxis: {
           type: 'value', name: '分钟',
           axisLabel: {
             formatter: '{value}min'
           }
         },
-        series: [
-          {
-            name: '混料时间',
-            type: 'line',
-            stack: '总量',
-            data: chartLine_data.data2
+        series: (function() {
+          var serie = []
+          if (chartLine_data.data3 !== undefined) {
+            for (var i = 0; i < chartLine_data.data3.length; i++) {
+              var item = {
+                name: chartLine_data.data1[i],
+                type: 'line',
+                data: chartLine_data.data3[i].data
+              }
+              serie.push(item)
+            }
           }
-        ]
+          return serie
+        }())
       }
       this.tab.chart3.chartLine.setOption(option)
       window.onresize = function() {
@@ -2472,8 +2659,8 @@ export default {
         console.log('混料时间统计导出')
         var excelDatasTabChart3 = [
           {
-            tHeader: ['日期', '混料时间(分钟)'],
-            filterVal: ['日期', 'field1'],
+            tHeader: ['日期', '配方名称','准确率'],
+            filterVal: ['日期', '名称','准确率'],
             tableDatas: this.tab.chart3.table.list,
             sheetName: '混料时间统计'
           }
@@ -2646,7 +2833,7 @@ export default {
 </script>
 <style lang="scss" scoped>
   .button{
-    height: 95px;
+    height: 130px;
     .exportTable2{float: right;margin-right: 5px;margin-top: 5px;}
   }
   .app-container1{padding-left: 10px;background-color: #F4F4F4;}

+ 8 - 2
src/views/statisticalAnalysis/inventoryManagement/pasture/index.vue

@@ -57,6 +57,9 @@
             <el-option v-for="item in statisticalTypeList2" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-checkbox v-model="tab2.table.getdataListParm.checked" :true-label="1" :false-label="0" style="margin-right:10px;" @change="changeChecked">误差</el-checkbox>
+          <el-select v-model="tab2.table.getdataListParm.parammaps.ftType" placeholder="是否拆分小料" class="filter-item" style="width: 130px;">
+            <el-option v-for="item in isSplitsmallmaterialsList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <el-input v-if="tab2.isRadio1" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="牲畜类别" />
           <el-input v-if="tab2.isRadio2" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="栏舍名称" />
           <el-input v-if="tab2.isRadio3" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="日期" />
@@ -179,7 +182,8 @@ export default {
         }
       },
       fileComment: [{ 'label': '商务文件评分', 'children': [{ 'label': '1' }, { 'label': '2' }, { 'label': '管理员' }] }],
-      displayList:[{id:'1',name:'理论'},{id:'2',name:'实际'}],//列表显示
+      displayList:[{id:'1',name:'理论'},{id:'2',name:'实际'}],//列表显示
+      isSplitsmallmaterialsList:[{id:'0',name:'拆分'},{id:'1',name:'不拆分'}],
       activeName: 'first',
       tab: {
         chartDate: [],
@@ -223,7 +227,8 @@ export default {
               inputDatetime: [new Date(), new Date()],
               fname: '',
               typea:'',
-              times:''
+              times:'',
+              ftType:'1'
             }
           },
           tableKey: 1,
@@ -361,6 +366,7 @@ export default {
         end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
         this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
         this.tab2.radio = '1'
+        this.tab2.table.getdataListParm.parammaps.ftType = '1'
         this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
         this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
         this.getTab2List()

+ 54 - 9
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -39,6 +39,11 @@
         <el-input-number :controls="false" :precision="2" v-model="slzq1" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
         <span>-</span>
         <el-input-number :controls="false" :precision="2" v-model="slzq2" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
+      </div>
+      <div style="display: inline-block;" class="filter-item1">
+        <el-input-number :controls="false" :precision="2" v-model="minproesstime" placeholder="过程时间" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
+        <span>-</span>
+        <el-input-number :controls="false" :precision="2" v-model="maxproesstime" placeholder="过程时间" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
       </div>
       <el-checkbox v-model="ccys"style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
       <!-- 临时注释 -->
@@ -68,6 +73,7 @@
             <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="过程时间" 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>
@@ -101,7 +107,7 @@
           </div>
         </div>
         <div class="Mixture">
-          <h4>混料详情1</h4>
+          <h4>混料详情</h4>
           <el-table
             :key="table3.tableKey"
             v-loading="table3.listLoading"
@@ -118,7 +124,12 @@
             <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="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="误差值" 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" />
@@ -183,7 +194,12 @@
             <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="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="误差值" 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" />
@@ -213,7 +229,12 @@
             <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="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="误差值" 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" />
@@ -357,7 +378,12 @@
             <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="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="误差值" 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" />
@@ -387,7 +413,12 @@
             <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="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="误差值" 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" />
@@ -456,7 +487,12 @@
             <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="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="误差值" 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" />
@@ -486,7 +522,12 @@
             <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="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="误差值" 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" />
@@ -525,7 +566,9 @@ export default {
       slwc1:undefined ,
       slwc2:undefined ,
       slzq1:undefined ,
-      slzq2:undefined ,
+      slzq2:undefined ,
+      minproesstime:undefined ,
+      maxproesstime:undefined ,
       ccys:false,
       myheight:970,
       title: '',
@@ -891,6 +934,8 @@ export default {
       this.table.getdataListParm.parammaps.slwc2 = this.slwc2
       this.table.getdataListParm.parammaps.slzq1 = this.slzq1
       this.table.getdataListParm.parammaps.slzq2 = this.slzq2
+      this.table.getdataListParm.parammaps.minproesstime = this.minproesstime
+      this.table.getdataListParm.parammaps.maxproesstime = this.maxproesstime
       // if(this.ccys == true){
       //   if(this.table3.getdataListParm.name !== 'getprocessAnalysisHL'){
       //     this.hlwc1 = undefined