Browse Source

更新8-8

duanxiaoduan 2 years ago
parent
commit
4471d763c2

BIN
dist.zip


+ 112 - 34
src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue

@@ -391,6 +391,29 @@
           </div>
         </div>
       </div>
+    </el-dialog>
+
+    <!-- 更改TMR编号 -->
+    <el-dialog 
+    :title="textMap[tmrNumber.dialogStatus]" 
+    :destroy-on-close="true" 
+    :visible.sync="tmrNumber.dialogFormVisible"
+    :before-close="close"
+    :close-on-click-modal="false" 
+    width="30%"
+    :modal-append-to-body="false"
+    :append-to-body="true">
+        <h3 style="text-align: center;">是否要改变TMR设备?</h3>
+      <div class="tmrNumber" style="padding: 10px 30px;">
+        <p>注:更换TMR撒料设备,变更后的装载重量不同,请选择处理方式</p>
+        <el-radio v-model="tmrNumber.radio" label="0">1、多出的饲料平均从已分配的各栏舍中扣减。</el-radio><br/><br/>
+        <el-radio v-model="tmrNumber.radio" label="1">2、多出的饲料从最后一个栏舍依次往前扣减。</el-radio><br/><br/>
+        <el-radio v-model="tmrNumber.radio" label="2">3、清空已分配的撒料车。</el-radio>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
+        <el-button class="cancelClose" :disabled="isokDisable" @click="closeTmrNumber">否</el-button>
+        <el-button class="save" :disabled="isokDisable" @click="tmrNumberData()">是</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -475,7 +498,8 @@ export default {
       selectList: [],
       textMap: {
         create: '新增',
-        update: '编辑'
+        update: '编辑',
+        tmrNumber:''
       },
       dialogFull: false,
       isOrder: true,
@@ -528,7 +552,13 @@ export default {
       equipmentList: [], // 撒料设备
       templateFormulationList: [], // 模板配方
       isDispaly: false,
-      isDropState:false
+      isDropState:false,
+      tmrNumber:{
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp:{},
+        radio:'0'
+      }
     }
   },
   watch: {
@@ -769,37 +799,42 @@ export default {
     // TMR编号
     changeTMRNumber(item) {
       console.log(this.create.temp.tmrid,'this.create.temp.tmrid111')
-      if (this.create.list2.length > 0) {
-        MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
-          confirmButtonText: '是',
-          cancelButtonText: '否',
-          type: 'warning'
-        }).then(() => {
-          this.create.temp.tmrid = this.create.temp.tmrid2
-          this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
-          this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
-          this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
-          this.create.temp.mytmrid = this.create.temp.tmrid
-          this.create.temp.mytmrname = this.create.temp.tmrname
-          console.log('tmrname==>', this.create.temp)
-          if (this.isDispaly || this.create.dialogStatus == 'update') {
-            this.getClearList()
-          }
-        }).catch(() => {
-          console.log(this.create.temp,'====')
-          if(this.create.temp.tclassname == '固定式'){
-            console.log( this.create.temp,'====')
-            this.create.temp.tmrid = this.create.temp.mytmrid
-          }
-          this.create.temp.tmrid2 = this.create.temp.tmrid
-          this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
-          this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
-          this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
-          this.create.temp.mytmrid = this.create.temp.tmrid2
-          this.create.temp.mytmrname = this.create.temp.tmrname
-          console.log(this.create.temp)
-          this.$message({ type: 'info', message: '已取消' })
-        })
+      if (this.create.list2.length > 0) {
+        // 备份
+        // MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
+        //   confirmButtonText: '是',
+        //   cancelButtonText: '否',
+        //   type: 'warning'
+        // }).then(() => {
+        //   this.create.temp.tmrid = this.create.temp.tmrid2
+        //   this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
+        //   this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
+        //   this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
+        //   this.create.temp.mytmrid = this.create.temp.tmrid
+        //   this.create.temp.mytmrname = this.create.temp.tmrname
+        //   console.log('tmrname==>', this.create.temp)
+        //   if (this.isDispaly || this.create.dialogStatus == 'update') {
+        //     this.getClearList()
+        //   }
+        // }).catch(() => {
+        //   console.log(this.create.temp,'====')
+        //   if(this.create.temp.tclassname == '固定式'){
+        //     console.log( this.create.temp,'====')
+        //     this.create.temp.tmrid = this.create.temp.mytmrid
+        //   }
+        //   this.create.temp.tmrid2 = this.create.temp.tmrid
+        //   this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
+        //   this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
+        //   this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+        //   this.create.temp.mytmrid = this.create.temp.tmrid2
+        //   this.create.temp.mytmrname = this.create.temp.tmrname
+        //   console.log(this.create.temp)
+        //   this.$message({ type: 'info', message: '已取消' })
+        // })
+        // 备份
+        this.tmrNumber.dialogFormVisible = true
+        this.tmrNumber.dialogStatus = 'tmrNumber'
+        this.tmrNumber.radio = '0'
       } else {
         this.create.temp.tmrid = this.create.temp.tmrid2
         this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
@@ -810,6 +845,49 @@ export default {
         console.log('TMR编号item==>', item)
         console.log('tmrname==>', this.create.temp)
       }
+    },
+    tmrNumberData(){
+      if(this.tmrNumber.radio == '0'){
+        console.log('1、多出的饲料平均从已分配的各栏舍中扣减。')
+      }else if(this.tmrNumber.radio == '1'){
+        console.log('2、多出的饲料从最后一个栏舍依次往前扣减。')
+      }else if(this.tmrNumber.radio == '2'){
+        console.log('3、清空已分配的撒料车。')
+      }
+      const url = 'authdata/materialtmr/date/edit'
+      const data = {
+        tmrid:this.create.temp.tmrid2,
+        tmrtype: this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassid,
+        lppid:this.create.temp.id,
+        times:this.create.temp.times,
+        pastureid:Cookies.get('pastureid'),
+        status:this.tmrNumber.radio,
+        date:this.date
+      }
+      postJson(url, data).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
+          this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
+          this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+          this.tmrNumber.dialogFormVisible = false
+          this.getCreateList1()
+        }
+      })
+    },
+    closeTmrNumber(){
+      if(this.create.temp.tclassname == '固定式'){
+        console.log( this.create.temp,'====')
+        this.create.temp.tmrid = this.create.temp.mytmrid
+      }
+      this.create.temp.tmrid2 = this.create.temp.tmrid
+      this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
+      this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
+      this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+      this.create.temp.mytmrid = this.create.temp.tmrid2
+      this.create.temp.mytmrname = this.create.temp.tmrname
+      this.tmrNumber.dialogFormVisible = false
     },
     getClearList() {
       const url = 'authdata/lpplandtl/del/day'
@@ -1264,7 +1342,7 @@ export default {
           this.create.temp.sumcowcount = 0
           this.create.temp.date = this.date
           data.parammaps = this.create.temp
-          data.parammaps.tmrid = this.create.temp.mytmrid
+          data.parammaps.tmrid = this.create.temp.tmrid2
           data.parammaps.tmrname = this.create.temp.mytmrname
           postJson(url, data).then(response => {
             console.log('新增保存发送参数', this.requestParam)

+ 99 - 32
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -373,6 +373,21 @@
         <el-button class="save" @click="check.dialogFormVisible=false;">确认</el-button>
       </div>
     </el-dialog>
+
+    <!-- 更改TMR编号 -->
+    <el-dialog :title="textMap[tmrNumber.dialogStatus]" :destroy-on-close="true" :visible.sync="tmrNumber.dialogFormVisible" :close-on-click-modal="false" width="30%">
+        <h3 style="text-align: center;">是否要改变TMR设备?</h3>
+      <div class="tmrNumber" style="padding: 10px 30px;">
+        <p>注:更换TMR撒料设备,变更后的装载重量不同,请选择处理方式</p>
+        <el-radio v-model="tmrNumber.radio" label="0">1、多出的饲料平均从已分配的各栏舍中扣减。</el-radio><br/><br/>
+        <el-radio v-model="tmrNumber.radio" label="1">2、多出的饲料从最后一个栏舍依次往前扣减。</el-radio><br/><br/>
+        <el-radio v-model="tmrNumber.radio" label="2">3、清空已分配的撒料车。</el-radio>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
+        <el-button class="cancelClose" :disabled="isokDisable" @click="closeTmrNumber">否</el-button>
+        <el-button class="save" :disabled="isokDisable" @click="tmrNumberData()">是</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -441,7 +456,8 @@ export default {
         historyRecord: '历史记录',
         create: '新增',
         update: '编辑',
-        check: '提示'
+        check: '提示',
+        tmrNumber:''
       },
       check: {
         dialogFormVisible: false,
@@ -474,7 +490,13 @@ export default {
       templateFormulationList: [], // 模板配方
       isDispaly: false,
       dropState: false,
-      isDropState:false
+      isDropState:false,
+      tmrNumber:{
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp:{},
+        radio:'0'
+      }
     }
   },
   created() {
@@ -664,33 +686,38 @@ export default {
     // TMR编号
     changeTMRNumber(item) {
       if (this.create.list2.length > 0) {
-        MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
-          confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
-        }).then(() => {
-          this.create.temp.tmrid = this.create.temp.tmrid2
-          this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
-          this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
-          this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
-          this.create.temp.mytmrid = this.create.temp.tmrid
-          this.create.temp.mytmrname = this.create.temp.tmrname
-          console.log('tmrname==>', this.create.temp)
-          if (this.isDispaly || this.create.dialogStatus == 'update') {
-            this.getClearList()
-          }
-        }).catch(() => {
-          if(this.create.temp.tclassname == '固定式'){
-            console.log( this.create.temp,'====')
-            this.create.temp.tmrid = this.create.temp.mytmrid
-          }
-          this.create.temp.tmrid2 = this.create.temp.tmrid
-          this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
-          this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
-          this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
-          this.create.temp.mytmrid = this.create.temp.tmrid2
-          this.create.temp.mytmrname = this.create.temp.tmrname
-          console.log(this.create.temp)
-          this.$message({ type: 'info', message: '已取消' })
-        })
+        // 备份
+        // MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
+        //   confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
+        // }).then(() => {
+        //   this.create.temp.tmrid = this.create.temp.tmrid2
+        //   this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
+        //   this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
+        //   this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
+        //   this.create.temp.mytmrid = this.create.temp.tmrid
+        //   this.create.temp.mytmrname = this.create.temp.tmrname
+        //   console.log('tmrname==>', this.create.temp)
+        //   if (this.isDispaly || this.create.dialogStatus == 'update') {
+        //     this.getClearList()
+        //   }
+        // }).catch(() => {
+        //   if(this.create.temp.tclassname == '固定式'){
+        //     console.log( this.create.temp,'====')
+        //     this.create.temp.tmrid = this.create.temp.mytmrid
+        //   }
+        //   this.create.temp.tmrid2 = this.create.temp.tmrid
+        //   this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
+        //   this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
+        //   this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+        //   this.create.temp.mytmrid = this.create.temp.tmrid2
+        //   this.create.temp.mytmrname = this.create.temp.tmrname
+        //   console.log(this.create.temp)
+        //   this.$message({ type: 'info', message: '已取消' })
+        // })
+        // 备份
+        this.tmrNumber.dialogFormVisible = true
+        this.tmrNumber.dialogStatus = 'tmrNumber'
+        this.tmrNumber.radio = '0'
       } else {
         this.create.temp.tmrid = this.create.temp.tmrid2
         this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
@@ -701,9 +728,49 @@ export default {
         if (this.isDispaly || this.create.dialogStatus == 'update') {
           this.getClearList()
         }
-        console.log('TMR编号item==>', item)
       }
-        console.log('tmrname==>', this.create.temp)
+    },
+    tmrNumberData(){
+      if(this.tmrNumber.radio == '0'){
+        console.log('1、多出的饲料平均从已分配的各栏舍中扣减。')
+      }else if(this.tmrNumber.radio == '1'){
+        console.log('2、多出的饲料从最后一个栏舍依次往前扣减。')
+      }else if(this.tmrNumber.radio == '2'){
+        console.log('3、清空已分配的撒料车。')
+      }
+      const url = 'authdata/materialtmr/edit'
+      const data = {
+        tmrid:this.create.temp.tmrid2,
+        tmrtype: this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassid,
+        lppid:this.create.temp.id,
+        times:this.create.temp.times,
+        pastureid:Cookies.get('pastureid'),
+        status:this.tmrNumber.radio
+      }
+      postJson(url, data).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
+          this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
+          this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+          this.tmrNumber.dialogFormVisible = false
+          this.getCreateList1()
+        }
+      })
+    },
+    closeTmrNumber(){
+      if(this.create.temp.tclassname == '固定式'){
+        console.log( this.create.temp,'====')
+        this.create.temp.tmrid = this.create.temp.mytmrid
+      }
+      this.create.temp.tmrid2 = this.create.temp.tmrid
+      this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
+      this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
+      this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+      this.create.temp.mytmrid = this.create.temp.tmrid2
+      this.create.temp.mytmrname = this.create.temp.tmrname
+      this.tmrNumber.dialogFormVisible = false
     },
     getClearList() {
       const url = 'authdata/lpplandtl/del'
@@ -1059,7 +1126,7 @@ export default {
           this.create.temp.pastureid = Cookies.get('pastureid')
           this.create.temp.times = parseInt(this.create.temp.times)
           data.parammaps = this.create.temp
-          data.parammaps.tmrid = this.create.temp.mytmrid
+          data.parammaps.tmrid = this.create.temp.tmrid2
           data.parammaps.tmrname = this.create.temp.mytmrname
           data.old = this.create.temp.arrList
           postJson(url, data).then(response => {

+ 37 - 11
src/views/formulationPlan/recipeTemplate/index.vue

@@ -1020,6 +1020,7 @@ export default {
 
       requestParam: {},
       requestParam2: {},
+      requestParam3:{},
       download: {
         getdataListParm: {
           name: 'getFTList',
@@ -1485,6 +1486,7 @@ export default {
       setTimeout(() => {
         this.isokDisable = false
       }, 1000)
+      this.requestParam2 = {}
       this.requestParam2.name = 'checkNumber'
       this.requestParam2.parammaps = {}
       this.requestParam2.parammaps.number = this.table.temp.tcode
@@ -1498,13 +1500,32 @@ export default {
       })
     },
     saveUpdateData() {
+      this.requestParam = {}
       this.requestParam.name = 'updateFT'
       this.requestParam.parammaps = this.table.temp
       PostDataByName(this.requestParam).then(response => {
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
-          this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-          this.getList()
+          this.requestParam3 = {}
+          this.requestParam3.name = 'insertFTHistory'
+          this.requestParam3.type = 'e'
+          this.requestParam3.parammaps = {}
+          this.requestParam3.parammaps.id = this.table.temp.id
+          this.requestParam3.parammaps.createdate = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
+          PostDataByName(this.requestParam3).then(response => {
+            console.log('新增保存发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.getList()
+            } else {
+              const isRepeat = new RegExp('Duplicate entry :feedtemplet.tCode')
+              if (isRepeat.test(response.data)) {
+                this.$notify({ type: 'error', message: '配方编码不可重复,请重新录入', duration: 2000 })
+              } else {
+                this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+              }
+            }
+          })
         } else {
           const isRepeat = new RegExp('Duplicate entry :feedtemplet.tCode')
           if (isRepeat.test(response.data)) {
@@ -2330,7 +2351,8 @@ export default {
         ftid: this.table2.getdataListParm.parammaps.ftid,
         dateTime: dateTime,
         slid: 0,
-        fid: row.fid
+        fid: row.fid,
+        autosecond: row.autosecond
       }}
       this.requestParam.data[4] = { 'name': 'insertFTHistory', 'type': 'e', 'parammaps': {
         id:this.table2.getdataListParm.parammaps.ftid,
@@ -2502,7 +2524,8 @@ export default {
             preftid: this.table2.temp.preftid,
             dateTime: dateTime,
             slid: this.table2.temp.id,
-            fid: row.fid
+            fid: row.fid,
+            autosecond: row.autosecond
           }}
           this.requestParam.data[1] = { 'name': 'updateFTdetail', 'type': 'e', 'parammaps': {
             pastureid: row.pastureid,
@@ -2596,7 +2619,8 @@ export default {
             preftid: row.preftid,
             dateTime: dateTime,
             slid: row.id,
-            fid: row.fid
+            fid: row.fid,
+            autosecond: row.autosecond
           }}
           this.requestParam.data[1] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
             pastureid: row.pastureid,
@@ -2620,6 +2644,10 @@ export default {
           this.requestParam.common = { 'returnmap': '0' }
           this.requestParam.createdate = dateTime
           this.requestParam.data = []
+          // this.requestParam.data[1] = { 'name': 'checkdeleteFT', 'type': 'v', 'parammaps': {
+          //   pastureid: this.table2.getdataListParm.parammaps.pastureid,
+          //   id: this.table2.getdataListParm.parammaps.ftid
+          // }}
           this.requestParam.data[0] = { 'name': 'insertFitHistory', 'type': 'e', 'parammaps': {
             pastureid: row.pastureid,
             ftid: this.table2.getdataListParm.parammaps.ftid,
@@ -2627,12 +2655,9 @@ export default {
             preftid: row.preftid,
             dateTime: dateTime,
             slid: row.id,
-            fid: row.fid
+            fid: row.fid,
+            autosecond: row.autosecond
           }}
-          // this.requestParam.data[1] = { 'name': 'checkdeleteFT', 'type': 'v', 'parammaps': {
-          //   pastureid: this.table2.getdataListParm.parammaps.pastureid,
-          //   id: this.table2.getdataListParm.parammaps.ftid
-          // }}
           this.requestParam.data[1] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
             pastureid: row.pastureid,
             id: row.id
@@ -2708,7 +2733,8 @@ export default {
               preftid: '@insertSpotList.preftid',
               dateTime: dateTime,
               slid: '@insertSpotList.id',
-              fid: '@insertSpotList.fid'
+              fid: '@insertSpotList.fid',
+              autosecond: '@insertSpotList.autosecond'
             }}
             this.requestParam.data[0].children[1] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
               id: '@insertSpotList.id',

+ 64 - 32
src/views/shedProduction/materialRemainingRecord/index.vue

@@ -6,11 +6,17 @@
       <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
       <el-select v-model="table.getdataListParm.parammaps.barid" filterable placeholder="栏舍名称" class="filter-item" style="width: 120px;" clearable>
         <el-option v-for="item in houseNameList" :key="item.id" :label="item.bname" :value="item.id" />
+      </el-select>
+      <el-select v-model="record" filterable placeholder="记录" class="filter-item" style="width: 150px;">
+        <el-option v-for="item in recordList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
+      <el-select v-if="record== '1'" v-model="table.getdataListParm.parammaps.barid" filterable placeholder="TMR编号" class="filter-item" style="width: 120px;" clearable>
+        <el-option v-for="item in houseNameList" :key="item.id" :label="item.bname" :value="item.id" />
       </el-select>
       <el-button class="successBorder" @click="handleSearch">查询</el-button>
       <el-button class="successBorder" @click="handleRefresh">重置</el-button>
     </div>
-    <div class="operation">
+    <div class="operation" v-if="record== '0'">
       <el-button v-if="isRoleEdit" icon="el-icon-plus" class="success"  @click="handleCreate">新增</el-button>
       <el-button v-if="isRoleEdit" icon="el-icon-delete" class="danger"  @click="handleDelete">删除</el-button>
       <el-button v-if="isRoleEdit" icon="el-icon-copy-document" class="copy"  @click="handleCopy">复制</el-button>
@@ -24,8 +30,21 @@
           <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
-    </div>
-    <div class="table">
+    </div>
+    <div class="operation" v-else>
+      <el-upload v-if="isRoleEdit" style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
+        <el-button class="import" icon="el-icon-download" style="float: right;">导入</el-button>
+      </el-upload>
+      <el-dropdown style="float: right;margin-right: 10px;">
+        <el-button class="export" icon="el-icon-upload2">导出</el-button>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item @click.native="handleExport(1)">导出模板</el-dropdown-item>
+          <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+    <!-- 手动记录 -->
+    <div class="table" v-if="record== '0'">
       <el-table
         :key="table.tableKey"
         v-loading="table.listLoading"
@@ -46,32 +65,12 @@
           <template slot-scope="scope">
             <span>{{ scope.$index + (table.pageNum-1) * table.pageSize + 1 }}</span>
           </template>
-        </el-table-column>
-        <el-table-column label="栏舍名称" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.barname }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="剩料量(kg)" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.remain }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="班次" min-width="90px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.timesstr }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="收集时间" min-width="100px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.operatetime }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作人" min-width="90px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.emp }}</span>
-          </template>
-        </el-table-column>
+        </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="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" />
         <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" :disabled="row.emp == '设备采集'" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
@@ -81,6 +80,35 @@
         </el-table-column>
       </el-table>
       <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
+    </div>
+    <!-- TMR设备自动记录 -->
+    <div class="table" v-else>
+      <el-table
+        :key="table.tableKey2"
+        v-loading="table.listLoading2"
+        element-loading-text="给我一点时间"
+        :data="table.list"
+        border
+        fit
+        highlight-current-row
+        style="width: 98%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable table-fixed"
+        :height="myHeight"
+      >
+        <el-table-column type="selection" align="center" width="50" />
+        <el-table-column label="TMR设备编号" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="TMR设备名称" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="TMR设备类型" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="栏舍名称" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="收集时间" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="剩料重量(kg)" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="开始重量(kg)" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="结束重量(kg)" min-width="150px" align="center" prop="remain" />
+        <el-table-column label="驾驶员" min-width="150px" align="center" prop="remain" />
+      </el-table>
+      <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
     </div>
 
     <!-- 新增/编辑 -->
@@ -178,8 +206,9 @@ export default {
         { name: 'getSysoptEnable', offset: 0, pagecount: 0, parammaps: { 'pastureid': Cookies.get('pastureid'), 'inforname': 'times' }}
       ],
       houseNameList: [], // 栏舍名称
-      frequencyList: [], // 班次
-
+      frequencyList: [], // 班次
+      recordList:[{id:'0',name:'手动记录'},{id:'1',name:'TMR设备自动记录'}],
+      record:'0',
       table: {
         getdataListParm: {
           name: 'getBarfeedremainList',
@@ -199,7 +228,10 @@ export default {
         list: [],
         total: 0,
         listLoading: true,
-        temp: {}
+        temp: {},
+        tableKey2:0,
+        listLoading2: false,
+        list2:[]
       },
 
       // 新增/编辑

File diff suppressed because it is too large
+ 357 - 234
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue


+ 14 - 14
src/views/statisticalAnalysis/errorAnalysis/pasture/see.vue

@@ -141,10 +141,10 @@ export default {
       title: '',
       pid: '',
       methodname:'',
-      optdevice:'',
-      startTime:'',
-      stopTime:'',
-      error:'',
+      optdevice1:'',
+      startTime1:'',
+      stopTime1:'',
+      error1:'',
       table1: {
         getdataListParm: {
           name: '', page: 1, offset: 1, pagecount: '', returntype: 'Map',
@@ -220,28 +220,28 @@ export default {
       immediate: true,
       handler(newVal, oldVal) {
         console.log(newVal, 'optdevice')
-        this.optdevice = newVal
+        this.optdevice1 = newVal
       }
     },
     startTime: {
       immediate: true,
       handler(newVal, oldVal) {
         console.log(newVal, 'startTime')
-        this.startTime = newVal
+        this.startTime1 = newVal
       }
     },
     stopTime: {
       immediate: true,
       handler(newVal, oldVal) {
         console.log(newVal, 'stopTime')
-        this.stopTime = newVal
+        this.stopTime1 = newVal
       }
     },
     error: {
       immediate: true,
       handler(newVal, oldVal) {
         console.log(newVal, 'error')
-        this.error = newVal
+        this.error1 = newVal
       }
     },
   },
@@ -260,11 +260,11 @@ export default {
     getList1() {
       this.table1.listLoading = true
       this.table1.getdataListParm.name = this.methodname
-      this.table1.getdataListParm.parammaps.optdevice = this.optdevice
-      this.table1.getdataListParm.parammaps.startTime = this.startTime
-      this.table1.getdataListParm.parammaps.stopTime = this.stopTime
+      this.table1.getdataListParm.parammaps.optdevice = this.optdevice1
+      this.table1.getdataListParm.parammaps.startTime = this.startTime1
+      this.table1.getdataListParm.parammaps.stopTime = this.stopTime1
       this.table1.getdataListParm.parammaps.pid = this.pid
-      this.table1.getdataListParm.parammaps.error = this.error
+      this.table1.getdataListParm.parammaps.error = this.error1
       this.table1.getdataListParm.parammaps.pastureid = Cookies.get('pastureid')
       GetDataByName(this.table1.getdataListParm).then(response => {
         console.log('车次信息数据', response.data.list)
@@ -440,8 +440,8 @@ export default {
         ]
       }
       this.chartLine.setOption(option)
-      if (this.chartLine != null) {
-        window.onresize = function() {
+      if (this.chartLine != null ) {
+        window.onresize = ()=> {
           this.chartLine.resize()
         }
       }

+ 3 - 1
src/views/systemManagement/reminderSettings/index.vue

@@ -530,7 +530,9 @@
         this.temp.triggerCondition = row.trigger //触发条件
         this.temp.sendTime = row.data.push_time //发送时间
         this.selectList1 = []
-        this.selectList2 = row.user.split(',')
+        if(row.user){
+          this.selectList2 = row.user.split(',')
+        }
         console.log(this.selectList2,'this.selectList211')
         // 立即
         this.temp.sendingMethod = String(row.data.remind_type) //发送方式

+ 1 - 1
src/views/systemManagement/user/index.vue

@@ -493,7 +493,7 @@ export default {
     handleScanningCode(row){
       this.QRcode.dialogStatus = 'QRcode'
       this.QRcode.dialogFormVisible = true
-      this.imgUrl = 'http://tmrwatch.cn/wx/code?scene_str=tmrwatch.'+ Cookies.get('pastureid')+'.'+ row.username + '.'+row.empname
+      this.imgUrl = 'http://tmrwatch.cn/wx/code?scene_str=tmrwatch_test.'+ Cookies.get('pastureid')+'.'+ row.username + '.'+row.empname
       console.log(this.imgUrl)
     }
   }

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