|  | @@ -38,35 +38,46 @@
 | 
	
		
			
				|  |  |          <el-table-column label="栏舍名称" min-width="100px" align="center" class-name="small-padding fixed-width" fixed="left">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |          
 | 
	
		
			
				|  |  | -            <span v-if="scope.row.NoEdit">{{ scope.row.barname }}</span>
 | 
	
		
			
				|  |  | -            <el-input v-if="scope.row.Edit" v-model="scope.row.barname" style="width:95%;padding:10px 0;"   />
 | 
	
		
			
				|  |  | +            <span  >{{ scope.row.bname }}</span>
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column :key="2" label="推料车名称" min-width="70px" align="center">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <span v-if="scope.row.NoEdit">{{ scope.row.barname }}</span>
 | 
	
		
			
				|  |  | -            <el-input v-if="scope.row.Edit" v-model="scope.row.barname" style="width:95%;padding:10px 0;"   />
 | 
	
		
			
				|  |  | +            <span v-if="scope.row.NoEdit">{{ scope.row.tmrname }}</span>
 | 
	
		
			
				|  |  | +            <el-select v-if="scope.row.Edit" v-model="scope.row.tmrid" filterable placeholder="推料车名称" class="filter-item" style="width:95%;padding:10px 0;" @change="changeTmrCode(scope.$index, scope.row)">
 | 
	
		
			
				|  |  | +                  <el-option v-for="item in tmrCodeList" :key="item.id" :label="item.name" :value="item.id" />
 | 
	
		
			
				|  |  | +            </el-select>  
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column :key="3" label="推料车编号" min-width="90px" 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" style="width:95%;padding:10px 0;"   />
 | 
	
		
			
				|  |  | +            <span  >{{ scope.row.tmrcode }}</span>
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  |            </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:95%;padding:10px 0;"   />
 | 
	
		
			
				|  |  | +            <span v-if="scope.row.NoEdit">{{ scope.row.times }}</span>
 | 
	
		
			
				|  |  | +            
 | 
	
		
			
				|  |  | +            <el-tag v-if="scope.row.Edit" v-for="tag  in  scope.row.timesArr" :key="tag" closable @close="tag_close(scope.$index,row,tag)" type="success">{{tag}}</el-tag>
 | 
	
		
			
				|  |  | +         
 | 
	
		
			
				|  |  |            </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:95%;padding:10px 0;"   />
 | 
	
		
			
				|  |  | +            <span v-if="scope.row.NoEdit">{{ scope.row.allowableerror }}</span>
 | 
	
		
			
				|  |  | +            <el-input v-if="scope.row.Edit" v-model="scope.row.allowableerror" type="number" style="width:95%;padding:10px 0;"   />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <el-table-column label="是否启用" min-width="90px" align="center">
 | 
	
		
			
				|  |  | +              <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"  />
 | 
	
		
			
				|  |  | +              </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="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
 | 
	
	
		
			
				|  | @@ -123,7 +134,7 @@
 | 
	
		
			
				|  |  |          </el-form>
 | 
	
		
			
				|  |  |          <div slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |            <el-button class="cancelClose" @click="create1.dialogFormVisible = false;getList()">关闭</el-button>
 | 
	
		
			
				|  |  | -          <el-button class="save"  @click="handleCreate1">确认</el-button>
 | 
	
		
			
				|  |  | +          <el-button class="save"  @click="create_sure1">确认</el-button>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
	
		
			
				|  | @@ -199,20 +210,21 @@ export default {
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +      tmrCodeList:[
 | 
	
		
			
				|  |  | +        // {Code: "001", id: 46, name: "一号推料车"},
 | 
	
		
			
				|  |  | +        //  {Code: "002", id: 47, name: "二号推料车"}
 | 
	
		
			
				|  |  | +      ],
 | 
	
		
			
				|  |  |        table: {
 | 
	
		
			
				|  |  |          getdataListParm: {
 | 
	
		
			
				|  |  | -          name: 'getFPList',
 | 
	
		
			
				|  |  | +          name: 'getPushingList',
 | 
	
		
			
				|  |  |            page: 1,
 | 
	
		
			
				|  |  |            offset: 1,
 | 
	
		
			
				|  |  | -          // pagecount: parseInt(Cookies.get('pageCount')),
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |            pagecount: '',
 | 
	
		
			
				|  |  |            returntype: 'Map',
 | 
	
		
			
				|  |  |            parammaps: {
 | 
	
		
			
				|  |  |              pastureid: Cookies.get('pastureid'),
 | 
	
		
			
				|  |  | -            enable: '',
 | 
	
		
			
				|  |  | -            barid: '',
 | 
	
		
			
				|  |  | -            tname: ''
 | 
	
		
			
				|  |  | +         
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          tableKey: 0,
 | 
	
	
		
			
				|  | @@ -328,6 +340,8 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  |      this.getButtons()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    this.getTMRlist()
 | 
	
		
			
				|  |  |      this.getList()
 | 
	
		
			
				|  |  |     
 | 
	
		
			
				|  |  |    },
 | 
	
	
		
			
				|  | @@ -339,44 +353,20 @@ export default {
 | 
	
		
			
				|  |  |        this.isRoleEdit = isRoleEdit
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    getTimeList() {
 | 
	
		
			
				|  |  | -      GetDataByName(this.getTimeListParm).then(response => {
 | 
	
		
			
				|  |  | +    getTMRlist() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      var send_data = {"name":"getPushingTmrList","page":1,"offset":1,"pagecount":"","returntype":"Map","parammaps":{"dictname":"推料车"}}
 | 
	
		
			
				|  |  | +      GetDataByName(send_data).then(response => {
 | 
	
		
			
				|  |  |          if (response.data.list !== null) {
 | 
	
		
			
				|  |  | -          this.timeList = response.data.list
 | 
	
		
			
				|  |  | +          this.tmrCodeList = response.data.list
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -          this.timeList = []
 | 
	
		
			
				|  |  | +          this.tmrCodeList = []
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        console.log("tmrCodeList",this.tmrCodeList)
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -     
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -     // 新增
 | 
	
		
			
				|  |  | -    handleCreate1() {
 | 
	
		
			
				|  |  | -      console.log('点击了新增')
 | 
	
		
			
				|  |  | -      this.resetTemp1()
 | 
	
		
			
				|  |  | -      this.dialogFull = false
 | 
	
		
			
				|  |  | -      this.create1.dialogStatus = 'create'
 | 
	
		
			
				|  |  | -      this.create1.dialogFormVisible = true
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -     resetTemp1() {
 | 
	
		
			
				|  |  | -      this.create1.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    handleCreate2() {
 | 
	
		
			
				|  |  | -      console.log('点击了新增')
 | 
	
		
			
				|  |  | -      this.resetTemp2()
 | 
	
		
			
				|  |  | -      this.dialogFull = false
 | 
	
		
			
				|  |  | -      this.create2.dialogStatus = 'create'
 | 
	
		
			
				|  |  | -      this.create2.dialogFormVisible = true
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -     resetTemp2() {
 | 
	
		
			
				|  |  | -      this.create2.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  |      getList() {
 | 
	
		
			
				|  |  |        this.table.listLoading = true
 | 
	
		
			
				|  |  |        GetDataByName(this.table.getdataListParm).then(response => {
 | 
	
	
		
			
				|  | @@ -387,7 +377,15 @@ 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) // 编辑保存
 | 
	
		
			
				|  |  | +           
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          response.data.list.forEach(function(item){
 | 
	
		
			
				|  |  | +            if(item.times !== ""){
 | 
	
		
			
				|  |  | +              item.timesArr = item.times.split(',')
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |            // console.log(response.data.list, sumr)
 | 
	
		
			
				|  |  |        
 | 
	
		
			
				|  |  |            this.table.list = response.data.list
 | 
	
	
		
			
				|  | @@ -403,11 +401,54 @@ export default {
 | 
	
		
			
				|  |  |          }, 100)
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    handleSearch() {
 | 
	
		
			
				|  |  | -      this.getList()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    // 推料车
 | 
	
		
			
				|  |  | +    changeTmrCode(index,row) {
 | 
	
		
			
				|  |  | +      console.log("推料车:====",index,row)
 | 
	
		
			
				|  |  | +      var Code   = this.tmrCodeList.find(obj => obj.id === row.tmrid).Code
 | 
	
		
			
				|  |  | +      console.log( "推料车编号:====",Code)
 | 
	
		
			
				|  |  | +      this.table.list[index].tmrcode = Code
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +     
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +     // 新增
 | 
	
		
			
				|  |  | +    handleCreate1() {
 | 
	
		
			
				|  |  | +      console.log('点击了新增')
 | 
	
		
			
				|  |  | +      this.resetTemp1()
 | 
	
		
			
				|  |  | +      this.dialogFull = false
 | 
	
		
			
				|  |  | +      this.create1.dialogStatus = 'create'
 | 
	
		
			
				|  |  | +      this.create1.dialogFormVisible = true
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +     resetTemp1() {
 | 
	
		
			
				|  |  | +      this.create1.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    create_sure1(){
 | 
	
		
			
				|  |  | +        console.log(this.timetags1)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    handleCreate2() {
 | 
	
		
			
				|  |  | +      console.log('点击了新增')
 | 
	
		
			
				|  |  | +      this.resetTemp2()
 | 
	
		
			
				|  |  | +      this.dialogFull = false
 | 
	
		
			
				|  |  | +      this.create2.dialogStatus = 'create'
 | 
	
		
			
				|  |  | +      this.create2.dialogFormVisible = true
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +     resetTemp2() {
 | 
	
		
			
				|  |  | +      this.create2.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      change_time1(tag){
 | 
	
		
			
				|  |  |        console.log("tag", tag)
 | 
	
		
			
				|  |  |          console.log("timetags1", this.timetags1)
 | 
	
	
		
			
				|  | @@ -424,7 +465,13 @@ export default {
 | 
	
		
			
				|  |  |          console.log("timetags1", this.timetags1)
 | 
	
		
			
				|  |  |          this.timetags1.splice(this.timetags1.indexOf(tag), 1);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    tag_close(index,row,tag){
 | 
	
		
			
				|  |  | +        console.log("tag", index,row,tag)
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  | +        this.timetags1.splice(this.timetags1.indexOf(tag), 1);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -448,67 +495,70 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      handleTakeEffect() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      console.log(this.selectList)
 | 
	
		
			
				|  |  |        if (this.selectList.length == 0) {
 | 
	
		
			
				|  |  | -        this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
 | 
	
		
			
				|  |  | +        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
 | 
	
		
			
				|  |  |            confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
 | 
	
		
			
				|  |  |          }).then(() => {
 | 
	
		
			
				|  |  | -          for (let i = 0; i < this.selectList.length; i++) {
 | 
	
		
			
				|  |  | -            // this.$set(this.selectList[i], 'enable', '1')
 | 
	
		
			
				|  |  | -            this.selectList[i].enable = 1
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          var selectArr = this.selectList
 | 
	
		
			
				|  |  | +          var idsArr = []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          selectArr.forEach(function(item){
 | 
	
		
			
				|  |  | +            idsArr.push(item.id)
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          var send_data =  {
 | 
	
		
			
				|  |  | +            "name":"updateEnableByIds",
 | 
	
		
			
				|  |  | +            "parammaps":{"enable":"1","ids":idsArr.join(",")}
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          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': 'updateRemainplanEnable', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -            enable: '@insertSpotList.enable',
 | 
	
		
			
				|  |  | -            id: '@insertSpotList.id',
 | 
	
		
			
				|  |  | -            pastureid: '@insertSpotList.pastureid'
 | 
	
		
			
				|  |  | -          }}
 | 
	
		
			
				|  |  | -          ExecDataByConfig(this.requestParam).then(response => {
 | 
	
		
			
				|  |  | -            console.log('生效保存发送参数', this.requestParam)
 | 
	
		
			
				|  |  | -            if (response.msg === 'fail') {
 | 
	
		
			
				|  |  | +          GetDataByName(send_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.getList()
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +             
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  | +  
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      handleDisable() {
 | 
	
		
			
				|  |  |        if (this.selectList.length == 0) {
 | 
	
		
			
				|  |  | -        this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
 | 
	
		
			
				|  |  | +        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
 | 
	
		
			
				|  |  |            confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
 | 
	
		
			
				|  |  |          }).then(() => {
 | 
	
		
			
				|  |  | -          for (let i = 0; i < this.selectList.length; i++) {
 | 
	
		
			
				|  |  | -            // this.$set(this.selectList[i], 'enable', '1')
 | 
	
		
			
				|  |  | -            this.selectList[i].enable = 0
 | 
	
		
			
				|  |  | +          var selectArr = this.selectList
 | 
	
		
			
				|  |  | +          var idsArr = []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          selectArr.forEach(function(item){
 | 
	
		
			
				|  |  | +            idsArr.push(item.id)
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          var send_data =  {
 | 
	
		
			
				|  |  | +            "name":"updateEnableByIds",
 | 
	
		
			
				|  |  | +            "parammaps":{"enable":"0","ids":idsArr.join(",")}
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          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': 'updateRemainplanEnable', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -            enable: '@insertSpotList.enable',
 | 
	
		
			
				|  |  | -            id: '@insertSpotList.id',
 | 
	
		
			
				|  |  | -            pastureid: '@insertSpotList.pastureid'
 | 
	
		
			
				|  |  | -          }}
 | 
	
		
			
				|  |  | -          ExecDataByConfig(this.requestParam).then(response => {
 | 
	
		
			
				|  |  | -            console.log('禁用保存发送参数', this.requestParam)
 | 
	
		
			
				|  |  | -            if (response.msg === 'fail') {
 | 
	
		
			
				|  |  | +          GetDataByName(send_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.getList()
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +             
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |        }
 | 
	
	
		
			
				|  | @@ -574,188 +624,85 @@ export default {
 | 
	
		
			
				|  |  |        // 编辑false,编辑保存true
 | 
	
		
			
				|  |  |        row.isUpdate = false
 | 
	
		
			
				|  |  |        row.isUpdateSave = true
 | 
	
		
			
				|  |  | -      row.ftid = String(row.ftid)
 | 
	
		
			
				|  |  | -      if (row.ptsfid == '-1') {
 | 
	
		
			
				|  |  | -        row.ptsfid = ''
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      row.ptsfid = String(row.ptsfid)
 | 
	
		
			
				|  |  | -      // dryweight
 | 
	
		
			
				|  |  | -      this.table.temp.ftid = row.ftid
 | 
	
		
			
				|  |  | -      this.table.temp.ftname = row.ftname
 | 
	
		
			
				|  |  | -      this.table.temp.ptsfid = row.ptsfid
 | 
	
		
			
				|  |  | -      this.table.temp.ptsfname = row.ptsfname
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      updateData(row) {
 | 
	
		
			
				|  |  |        
 | 
	
		
			
				|  |  | -      var arr = []
 | 
	
		
			
				|  |  | -      for (let i = 1; i <= this.table.RWLength; i++) {
 | 
	
		
			
				|  |  | -        var obj = {}
 | 
	
		
			
				|  |  | -        obj['times'] = i
 | 
	
		
			
				|  |  | -        obj['pastureid'] = row.pastureid
 | 
	
		
			
				|  |  | -        obj['barid'] = row.barid
 | 
	
		
			
				|  |  | -        obj['cowcount'] = row.ccount
 | 
	
		
			
				|  |  | -        obj['ccountradio'] = row.ccountradio
 | 
	
		
			
				|  |  | -        obj['ptid'] = row.ftid
 | 
	
		
			
				|  |  | -        if (row.ptsfid !== '') {
 | 
	
		
			
				|  |  | -          obj['ptsid'] = row.ptsfid
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          obj['ptsid'] = '-1'
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        obj['weight'] = row['w' + i]
 | 
	
		
			
				|  |  | -        if(row['bw' + i] == ""){
 | 
	
		
			
				|  |  | -          obj['supplement'] = 0
 | 
	
		
			
				|  |  | -        }else{
 | 
	
		
			
				|  |  | -          obj['supplement'] = row['bw' + i]
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        obj['tratio'] = Math.round(row['r' + i])
 | 
	
		
			
				|  |  | -        obj['todaysupplement'] = row.todaysupplement
 | 
	
		
			
				|  |  | -        obj['todayweight'] = row.todayweight
 | 
	
		
			
				|  |  | -        arr.push(obj)
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (this.table.isPtsfname == 0) {
 | 
	
		
			
				|  |  | -        row.ptsfid = '-1'
 | 
	
		
			
				|  |  | -        row.ptsfname = ''
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        if (row.ptsfid == '') {
 | 
	
		
			
				|  |  | -          row.ptsfid = '-1'
 | 
	
		
			
				|  |  | -          row.ptsfname = ''
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (row.supplyweight == '') {
 | 
	
		
			
				|  |  | -        row.supplyweight = '0'
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      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
 | 
	
		
			
				|  |  | -      //   }
 | 
	
		
			
				|  |  | -      // }
 | 
	
		
			
				|  |  | -      this.table.rwList = arr
 | 
	
		
			
				|  |  | +     
 | 
	
		
			
				|  |  |        console.log('点击了编辑保存', row)
 | 
	
		
			
				|  |  | -      this.table.temp.pastureid = row.pastureid
 | 
	
		
			
				|  |  | -      this.table.temp.id = row.id
 | 
	
		
			
				|  |  | -      this.table.temp.barname = row.barname
 | 
	
		
			
				|  |  | -      this.table.temp.barid = row.barid
 | 
	
		
			
				|  |  | -      this.table.temp.ccount = row.ccount
 | 
	
		
			
				|  |  | -      this.table.temp.ratio = row.ratio
 | 
	
		
			
				|  |  | -      this.table.temp.ccountratio = row.ccountratio
 | 
	
		
			
				|  |  | -      this.table.temp.ftid = row.ftid
 | 
	
		
			
				|  |  | -      this.table.temp.ftname = row.ftname
 | 
	
		
			
				|  |  | -      this.table.temp.ptsfid = row.ptsfid
 | 
	
		
			
				|  |  | -      this.table.temp.ptsfname = row.ptsfname
 | 
	
		
			
				|  |  | -      this.table.temp.ftweight = row.ftweight
 | 
	
		
			
				|  |  | -      this.table.temp.supplyweight = row.supplyweight
 | 
	
		
			
				|  |  | -      this.table.temp.feedweight = row.feedweight
 | 
	
		
			
				|  |  | -      this.table.temp.owner = row.owner
 | 
	
		
			
				|  |  | -      this.table.temp.sumr = row.sumr
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  | -      console.log(row, '===========')
 | 
	
		
			
				|  |  | -      this.table.temp.softccount = row.softccount
 | 
	
		
			
				|  |  |     
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      var obj = {}
 | 
	
		
			
				|  |  | -      obj.pastureid = row.pastureid
 | 
	
		
			
				|  |  | -      obj.id = row.id
 | 
	
		
			
				|  |  | -      obj.data = []
 | 
	
		
			
				|  |  | -       
 | 
	
		
			
				|  |  | +       row.pastureid =  Cookies.get('pastureid')
 | 
	
		
			
				|  |  |         
 | 
	
		
			
				|  |  |   
 | 
	
		
			
				|  |  | -      if (this.table.temp.ccount === '') {
 | 
	
		
			
				|  |  | -        this.$message({ type: 'error', message: '实际牛头数不能为空', duration: 2000 })
 | 
	
		
			
				|  |  | -        return false
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      // if (this.table.temp.ccount === '') {
 | 
	
		
			
				|  |  | +      //   this.$message({ type: 'error', message: '实际牛头数不能为空', duration: 2000 })
 | 
	
		
			
				|  |  | +      //   return false
 | 
	
		
			
				|  |  | +      // }
 | 
	
		
			
				|  |  |       
 | 
	
		
			
				|  |  | -      const positiveInteger = /^[0-9]\d*$/
 | 
	
		
			
				|  |  | -      if (!positiveInteger.test(parseFloat(this.table.temp.ccount))) {
 | 
	
		
			
				|  |  | -        this.$message({
 | 
	
		
			
				|  |  | -          type: 'error',
 | 
	
		
			
				|  |  | -          message: '实际牛头数请输入正整数',
 | 
	
		
			
				|  |  | -          duration: 2000
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -        return false
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      // const positiveInteger = /^[0-9]\d*$/
 | 
	
		
			
				|  |  | +      // if (!positiveInteger.test(parseFloat(this.table.temp.ccount))) {
 | 
	
		
			
				|  |  | +      //   this.$message({
 | 
	
		
			
				|  |  | +      //     type: 'error',
 | 
	
		
			
				|  |  | +      //     message: '实际牛头数请输入正整数',
 | 
	
		
			
				|  |  | +      //     duration: 2000
 | 
	
		
			
				|  |  | +      //   })
 | 
	
		
			
				|  |  | +      //   return false
 | 
	
		
			
				|  |  | +      // }
 | 
	
		
			
				|  |  |        this.isokDisable = true
 | 
	
		
			
				|  |  |        setTimeout(() => {
 | 
	
		
			
				|  |  |          this.isokDisable = false
 | 
	
		
			
				|  |  |        }, 1000)
 | 
	
		
			
				|  |  | -      // this.requestParam.parammaps = this.table.temp
 | 
	
		
			
				|  |  | -      this.requestParam.common = {
 | 
	
		
			
				|  |  | -        'returnmap': '0'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      if(id == 0){
 | 
	
		
			
				|  |  | +         var send_data =  {
 | 
	
		
			
				|  |  | +           "common":{"returnmap":"0"},
 | 
	
		
			
				|  |  | +           "data":[
 | 
	
		
			
				|  |  | +              {"name":"insertPushing","type":"e",
 | 
	
		
			
				|  |  | +               "parammaps": row
 | 
	
		
			
				|  |  | +               },
 | 
	
		
			
				|  |  | +							{"name":"insertPushingDetail",
 | 
	
		
			
				|  |  | +              "resultmaps":{
 | 
	
		
			
				|  |  | +                "list":[
 | 
	
		
			
				|  |  | +										 {"time":"10:00"},{"time":"12:00"}
 | 
	
		
			
				|  |  | +                     ]
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +							"children":[
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                  "name":"insertPushingDetail","type":"e","parammaps":
 | 
	
		
			
				|  |  | +										 {
 | 
	
		
			
				|  |  | +                       "pastureid":Cookies.get('pastureid'),
 | 
	
		
			
				|  |  | +                       "barid":row.barid,"time":"@insertPushingDetail.time","type":0}}]}
 | 
	
		
			
				|  |  | +										 ]}
 | 
	
		
			
				|  |  | +      }else {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      this.requestParam.data = []
 | 
	
		
			
				|  |  | -      this.requestParam.data[0] = { 'name': 'updateBigFP', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -        pastureid: row.pastureid,
 | 
	
		
			
				|  |  | -        id: row.id,
 | 
	
		
			
				|  |  | -        barname: row.barname,
 | 
	
		
			
				|  |  | -        barid: row.barid,
 | 
	
		
			
				|  |  | -        softccount: row.softccount,
 | 
	
		
			
				|  |  | -        ccount: row.ccount,
 | 
	
		
			
				|  |  | -        ratio: row.ratio,
 | 
	
		
			
				|  |  | -        ccountratio: row.ccountratio,
 | 
	
		
			
				|  |  | -        ftid: row.ftid,
 | 
	
		
			
				|  |  | -        ftname: row.ftname,
 | 
	
		
			
				|  |  | -        ptsfid: row.ptsfid,
 | 
	
		
			
				|  |  | -        ptsfname: row.ptsfname,
 | 
	
		
			
				|  |  | -        ftweight: row.ftweight,
 | 
	
		
			
				|  |  | -        supplyweight: row.supplyweight,
 | 
	
		
			
				|  |  | -        feedweight: row.feedweight,
 | 
	
		
			
				|  |  | -        owner: row.owner,
 | 
	
		
			
				|  |  | -        sumr: row.sumr
 | 
	
		
			
				|  |  | -      }}
 | 
	
		
			
				|  |  | -      this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.table.rwList }}
 | 
	
		
			
				|  |  | -      this.requestParam.data[1].children = []
 | 
	
		
			
				|  |  | -      this.requestParam.data[1].children[0] = { 'name': 'updateBigFPDetail', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -        pastureid: '@insertSpotList.pastureid',
 | 
	
		
			
				|  |  | -        barname: row.barname,
 | 
	
		
			
				|  |  | -        barid: '@insertSpotList.barid',
 | 
	
		
			
				|  |  | -        times: '@insertSpotList.times',
 | 
	
		
			
				|  |  | -        tratio: '@insertSpotList.tratio',
 | 
	
		
			
				|  |  | -        weight: '@insertSpotList.weight',
 | 
	
		
			
				|  |  | -        cowcount: '@insertSpotList.cowcount',
 | 
	
		
			
				|  |  | -        ccountradio: row.ccountratio,
 | 
	
		
			
				|  |  | -        ptid: '@insertSpotList.ptid',
 | 
	
		
			
				|  |  | -        ptsid: '@insertSpotList.ptsid',
 | 
	
		
			
				|  |  | -        supplement: '@insertSpotList.supplement',
 | 
	
		
			
				|  |  | -        feedweight: row.feedweight,
 | 
	
		
			
				|  |  | -        supplyweight: row.supplyweight,
 | 
	
		
			
				|  |  | -        ratio: row.ratio
 | 
	
		
			
				|  |  | -      }}
 | 
	
		
			
				|  |  | -      this.requestParam.data[2] = { 'name': 'updateLPPbyFPChange', 'type': 'e', 'parammaps': {
 | 
	
		
			
				|  |  | -        pastureid: row.pastureid,
 | 
	
		
			
				|  |  | -        fpid: row.id
 | 
	
		
			
				|  |  | -      }}
 | 
	
		
			
				|  |  | -      ExecDataByConfig(this.requestParam).then(response => {
 | 
	
		
			
				|  |  | -        console.log('编辑保存发送参数', this.requestParam)
 | 
	
		
			
				|  |  | -        if (response.msg === 'fail') {
 | 
	
		
			
				|  |  | -          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          if(obj.data.length>0){
 | 
	
		
			
				|  |  | -            const url = 'authdata/fpdetail/edit'
 | 
	
		
			
				|  |  | -            const data = obj
 | 
	
		
			
				|  |  | -            postJson(url, data).then(response => {
 | 
	
		
			
				|  |  | -              if(response.msg !== 'fail'){
 | 
	
		
			
				|  |  | -                this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -          }else{
 | 
	
		
			
				|  |  | -            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -          this.getList()
 | 
	
		
			
				|  |  | -          for (let i = 0; i < this.headerList.length; i++) {
 | 
	
		
			
				|  |  | -            if (this.headerList[i].target.className == 'el-icon-lock') {
 | 
	
		
			
				|  |  | -              this.headerList[i].target.className = 'el-icon-unlock'
 | 
	
		
			
				|  |  | -              this.$set(this.headerList[i].target, 'className', 'el-icon-unlock')
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +       
 | 
	
		
			
				|  |  | +      // ExecDataByConfig(this.requestParam).then(response => {
 | 
	
		
			
				|  |  | +      //   console.log('编辑保存发送参数', this.requestParam)
 | 
	
		
			
				|  |  | +      //   if (response.msg === 'fail') {
 | 
	
		
			
				|  |  | +      //     this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
 | 
	
		
			
				|  |  | +      //   } else {
 | 
	
		
			
				|  |  | +      //     if(obj.data.length>0){
 | 
	
		
			
				|  |  | +      //       const url = 'authdata/fpdetail/edit'
 | 
	
		
			
				|  |  | +      //       const data = obj
 | 
	
		
			
				|  |  | +      //       postJson(url, data).then(response => {
 | 
	
		
			
				|  |  | +      //         if(response.msg !== 'fail'){
 | 
	
		
			
				|  |  | +      //           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
 | 
	
		
			
				|  |  | +      //         }
 | 
	
		
			
				|  |  | +      //       })
 | 
	
		
			
				|  |  | +      //     }else{
 | 
	
		
			
				|  |  | +      //       this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
 | 
	
		
			
				|  |  | +      //     }
 | 
	
		
			
				|  |  | +      //     this.getList()
 | 
	
		
			
				|  |  | +      //     for (let i = 0; i < this.headerList.length; i++) {
 | 
	
		
			
				|  |  | +      //       if (this.headerList[i].target.className == 'el-icon-lock') {
 | 
	
		
			
				|  |  | +      //         this.headerList[i].target.className = 'el-icon-unlock'
 | 
	
		
			
				|  |  | +      //         this.$set(this.headerList[i].target, 'className', 'el-icon-unlock')
 | 
	
		
			
				|  |  | +      //       }
 | 
	
		
			
				|  |  | +      //     }
 | 
	
		
			
				|  |  | +      //   }
 | 
	
		
			
				|  |  | +      // })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      updateCancel(row) {
 | 
	
		
			
				|  |  |        console.log('点击了编辑取消')
 |