|  | @@ -99,11 +99,10 @@
 | 
	
		
			
				|  |  |                <el-col :span="6">
 | 
	
		
			
				|  |  |                  <el-form-item label="设置时间:" prop="useinbarid">
 | 
	
		
			
				|  |  |                     <el-time-picker
 | 
	
		
			
				|  |  | -                    v-model="value1"
 | 
	
		
			
				|  |  | -                    :picker-options="{
 | 
	
		
			
				|  |  | -                      selectableRange: '00:00:00 - 23:59:59'
 | 
	
		
			
				|  |  | -                    }"
 | 
	
		
			
				|  |  | +                    v-model="timevalue1"
 | 
	
		
			
				|  |  | +                    :picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
 | 
	
		
			
				|  |  |                       value-format="HH:mm"
 | 
	
		
			
				|  |  | +                     @change="change_time1"
 | 
	
		
			
				|  |  |      format="HH:mm"
 | 
	
		
			
				|  |  |                      placeholder="任意时间点">
 | 
	
		
			
				|  |  |                    </el-time-picker>
 | 
	
	
		
			
				|  | @@ -111,6 +110,12 @@
 | 
	
		
			
				|  |  |                </el-col>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            </el-row>
 | 
	
		
			
				|  |  | +           <el-row>
 | 
	
		
			
				|  |  | +               <el-tag v-for="tag in timetags1" :key="tag.name" closable @close="tag_close1(tag)" type="success">{{tag}}</el-tag>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            </el-row>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +         
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |   
 | 
	
		
			
				|  |  |    
 | 
	
	
		
			
				|  | @@ -166,77 +171,23 @@ export default {
 | 
	
		
			
				|  |  |          total: 0,
 | 
	
		
			
				|  |  |          listLoading: true,
 | 
	
		
			
				|  |  |          temp: {},
 | 
	
		
			
				|  |  | -        rwList: [],
 | 
	
		
			
				|  |  | -        isPtsfname: false, // 补料配方/补料重量
 | 
	
		
			
				|  |  | -        getdataListParm2: {
 | 
	
		
			
				|  |  | -          name: 'getSysoptEnable',
 | 
	
		
			
				|  |  | -          page: 1,
 | 
	
		
			
				|  |  | -          offset: 1,
 | 
	
		
			
				|  |  | -          pagecount: 1,
 | 
	
		
			
				|  |  | -          returntype: 'Map',
 | 
	
		
			
				|  |  | -          parammaps: {
 | 
	
		
			
				|  |  | -            pastureid: Cookies.get('pastureid'),
 | 
	
		
			
				|  |  | -            inforname: 'isEnableSupplyFeed'
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | -        getdataListParm3: {
 | 
	
		
			
				|  |  | -          name: 'getSysoptEnable1',
 | 
	
		
			
				|  |  | -          page: 1,
 | 
	
		
			
				|  |  | -          offset: 1,
 | 
	
		
			
				|  |  | -          pagecount: 1,
 | 
	
		
			
				|  |  | -          returntype: 'Map',
 | 
	
		
			
				|  |  | -          parammaps: {
 | 
	
		
			
				|  |  | -            pastureid: Cookies.get('pastureid'),
 | 
	
		
			
				|  |  | -            inforname: 'times'
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        RWLength: '' // 班次长度
 | 
	
		
			
				|  |  | +  
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      value1: new Date(2016, 9, 10, 18, 40),
 | 
	
		
			
				|  |  | +      timevalue1: new Date(2016, 9, 10, 18, 40),
 | 
	
		
			
				|  |  | +      timetags1: ['8:40','9:00','10:00'],
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        dialogFull: false,
 | 
	
		
			
				|  |  |        isRoleEdit: [],
 | 
	
		
			
				|  |  |        headerList: [],
 | 
	
		
			
				|  |  |        pickerMinDate: '',
 | 
	
		
			
				|  |  | -      pickerOptions: {
 | 
	
		
			
				|  |  | -        onPick: ({ maxDate, minDate }) => {
 | 
	
		
			
				|  |  | -          this.pickerMinDate = minDate.getTime()
 | 
	
		
			
				|  |  | -          if (maxDate) {
 | 
	
		
			
				|  |  | -            this.pickerMinDate = ''
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        // 限制不能选择今天之后的日期
 | 
	
		
			
				|  |  | -        disabledDate: (time) => {
 | 
	
		
			
				|  |  | -          if (this.pickerMinDate !== '') {
 | 
	
		
			
				|  |  | -            const one = 31 * 24 * 3600 * 1000
 | 
	
		
			
				|  |  | -            const minTime = this.pickerMinDate - one
 | 
	
		
			
				|  |  | -            let maxTime = this.pickerMinDate + one
 | 
	
		
			
				|  |  | -            if (maxTime > new Date()) {
 | 
	
		
			
				|  |  | -              maxTime = new Date()
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            return time.getTime() < minTime - 8.64e7 || time.getTime() > maxTime - 8.64e7
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -          return time.getTime() > Date.now() - 8.64e7
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      requestParams: [
 | 
	
		
			
				|  |  | -        { 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') }}
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | -      getFeedTempletNameListParm: {
 | 
	
		
			
				|  |  | -        name: 'getFeedTempletName',
 | 
	
		
			
				|  |  | -        page: 1,
 | 
	
		
			
				|  |  | -        offset: 1,
 | 
	
		
			
				|  |  | -        // pagecount: parseInt(Cookies.get('pageCount')),
 | 
	
		
			
				|  |  | -        pagecount: '',
 | 
	
		
			
				|  |  | -        returntype: 'Map',
 | 
	
		
			
				|  |  | -        parammaps: {}
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |        tnameList: [], // 配方名 称
 | 
	
		
			
				|  |  |        recipeTemplateList: [], // 配方模板
 | 
	
		
			
				|  |  |        feedingFormulaList: [], // 补料配方
 | 
	
	
		
			
				|  | @@ -314,6 +265,16 @@ export default {
 | 
	
		
			
				|  |  |        const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
 | 
	
		
			
				|  |  |        this.isRoleEdit = isRoleEdit
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    getTimeList() {
 | 
	
		
			
				|  |  | +      GetDataByName(this.getTimeListParm).then(response => {
 | 
	
		
			
				|  |  | +        if (response.data.list !== null) {
 | 
	
		
			
				|  |  | +          this.timeList = response.data.list
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.tnameList = []
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |       
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |       // 新增
 | 
	
	
		
			
				|  | @@ -361,6 +322,18 @@ export default {
 | 
	
		
			
				|  |  |      handleSearch() {
 | 
	
		
			
				|  |  |        this.getList()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    change_time1(e){
 | 
	
		
			
				|  |  | +console.log(e)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    tag_close1(e){
 | 
	
		
			
				|  |  | +console.log(e)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      renderHeader(h, { column, $index }) { // h即为cerateElement的简写,具体可看vue官方文档
 | 
	
		
			
				|  |  |        return h(
 | 
	
		
			
				|  |  |          'div',
 | 
	
	
		
			
				|  | @@ -378,20 +351,7 @@ export default {
 | 
	
		
			
				|  |  |      headerClick(column, event) {
 | 
	
		
			
				|  |  |        console.log(column, event)
 | 
	
		
			
				|  |  |        this.headerList.push(event)
 | 
	
		
			
				|  |  | -      if (column.label == '第一班重量') {
 | 
	
		
			
				|  |  | -        for (let i = 0; i < this.table.list.length; i++) {
 | 
	
		
			
				|  |  | -          if (this.table.list[i].Edit == true) {
 | 
	
		
			
				|  |  | -            if (event.target.outerHTML == '<i class="el-icon-unlock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  | -              event.target.className = 'el-icon-lock'
 | 
	
		
			
				|  |  | -              this.$set(this.table.list[i], 'isOneWeight', true) // 锁住不可编辑
 | 
	
		
			
				|  |  | -            } else if (event.target.outerHTML == '<i class="el-icon-lock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  | -              event.target.className = 'el-icon-unlock'
 | 
	
		
			
				|  |  | -              this.$set(this.table.list[i], 'isOneWeight', false) // 解锁可编辑
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      } else if (column.label == '第二班重量') {
 | 
	
		
			
				|  |  | -        for (let i = 0; i < this.table.list.length; i++) {
 | 
	
		
			
				|  |  | +      for (let i = 0; i < this.table.list.length; i++) {
 | 
	
		
			
				|  |  |            if (this.table.list[i].Edit == true) {
 | 
	
		
			
				|  |  |              if (event.target.outerHTML == '<i class="el-icon-unlock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  |                event.target.className = 'el-icon-lock'
 | 
	
	
		
			
				|  | @@ -402,31 +362,6 @@ export default {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      } else if (column.label == '第三班重量') {
 | 
	
		
			
				|  |  | -        for (let i = 0; i < this.table.list.length; i++) {
 | 
	
		
			
				|  |  | -          if (this.table.list[i].Edit == true) {
 | 
	
		
			
				|  |  | -            if (event.target.outerHTML == '<i class="el-icon-unlock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  | -              event.target.className = 'el-icon-lock'
 | 
	
		
			
				|  |  | -              this.$set(this.table.list[i], 'isThreeWeight', true) // 锁住不可编辑
 | 
	
		
			
				|  |  | -            } else if (event.target.outerHTML == '<i class="el-icon-lock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  | -              event.target.className = 'el-icon-unlock'
 | 
	
		
			
				|  |  | -              this.$set(this.table.list[i], 'isThreeWeight', false) // 解锁可编辑
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      } else if (column.label == '第四班重量') {
 | 
	
		
			
				|  |  | -        for (let i = 0; i < this.table.list.length; i++) {
 | 
	
		
			
				|  |  | -          if (this.table.list[i].Edit == true) {
 | 
	
		
			
				|  |  | -            if (event.target.outerHTML == '<i class="el-icon-unlock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  | -              event.target.className = 'el-icon-lock'
 | 
	
		
			
				|  |  | -              this.$set(this.table.list[i], 'isFourWeight', true) // 锁住不可编辑
 | 
	
		
			
				|  |  | -            } else if (event.target.outerHTML == '<i class="el-icon-lock" style="margin-left: 5px;"></i>') {
 | 
	
		
			
				|  |  | -              event.target.className = 'el-icon-unlock'
 | 
	
		
			
				|  |  | -              this.$set(this.table.list[i], 'isFourWeight', false) // 解锁可编辑
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |   
 | 
	
		
			
				|  |  |   
 | 
	
	
		
			
				|  | @@ -538,14 +473,7 @@ export default {
 | 
	
		
			
				|  |  |        
 | 
	
		
			
				|  |  |        console.log(row, '===========')
 | 
	
		
			
				|  |  |        this.table.temp.softccount = row.softccount
 | 
	
		
			
				|  |  | -      this.table.temp.r1 = Math.round(row.r1)
 | 
	
		
			
				|  |  | -      this.table.temp.r2 = Math.round(row.r2)
 | 
	
		
			
				|  |  | -      this.table.temp.r3 = Math.round(row.r3)
 | 
	
		
			
				|  |  | -      this.table.temp.r4 = Math.round(row.r4)
 | 
	
		
			
				|  |  | -      this.table.temp.w1 = row.w1
 | 
	
		
			
				|  |  | -      this.table.temp.w2 = row.w2
 | 
	
		
			
				|  |  | -      this.table.temp.w3 = row.w3
 | 
	
		
			
				|  |  | -      this.table.temp.w4 = row.w4
 | 
	
		
			
				|  |  | +   
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        var obj = {}
 | 
	
		
			
				|  |  |        obj.pastureid = row.pastureid
 |