|
@@ -3,32 +3,16 @@
|
|
|
<div class="operation">
|
|
|
<el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">新增车次
|
|
|
</el-button>
|
|
|
- <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">
|
|
|
- 减少车次</el-button>
|
|
|
- <el-button
|
|
|
- v-if="isOrder && isRoleEdit"
|
|
|
- icon="el-icon-sort"
|
|
|
- style="float: left;"
|
|
|
- class="success"
|
|
|
- @click="handleChangeOrder"
|
|
|
- >更改顺序</el-button>
|
|
|
+ <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">减少车次</el-button>
|
|
|
+ <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" style="float: left;" class="success" @click="handleChangeOrder" >更改顺序</el-button>
|
|
|
<div v-else style="float: left;margin-left: 10px;">
|
|
|
- <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存
|
|
|
- </el-button>
|
|
|
+ <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-open" style="float: left;" @click="handleTakeEffect">
|
|
|
- 生效</el-button>
|
|
|
- <el-button v-if="isRoleEdit" class="danger" icon="el-icon-turn-off" style="float: left;" @click="handleDisable">
|
|
|
- 禁用</el-button>
|
|
|
- <el-select
|
|
|
- v-model="table.getdataListParm.parammaps.times"
|
|
|
- filterable
|
|
|
- placeholder="班次"
|
|
|
- class="filter-item"
|
|
|
- style="width: 120px;"
|
|
|
- @change="changeFrequency"
|
|
|
- >
|
|
|
+ <el-button v-if="isRoleEdit" class="success" icon="el-icon-open" style="float: left;" @click="handleTakeEffect"> 生效</el-button>
|
|
|
+ <el-button v-if="isRoleEdit" class="danger" icon="el-icon-turn-off" style="float: left;" @click="handleDisable"> 禁用</el-button>
|
|
|
+ <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float: left;" @click="handleAllEmpty"> 清空已分配栏舍</el-button>
|
|
|
+ <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" @change="changeFrequency" >
|
|
|
<el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -1762,6 +1746,26 @@ export default {
|
|
|
}
|
|
|
|
|
|
})
|
|
|
+ },
|
|
|
+ handleAllEmpty(){
|
|
|
+ MessageBox.confirm('执行该操作会将现有车次已分配的撒料栏舍全部清空,是否要执行该操作?', {
|
|
|
+ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.requestParam = {}
|
|
|
+ this.requestParam.common = { 'returnmap': '0' }
|
|
|
+ this.requestParam.data = []
|
|
|
+ this.requestParam.data[0] = { 'name': 'deleteLpplandtl1dateAll', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid'),date:this.date }},
|
|
|
+ this.requestParam.data[1] = { 'name': 'deletefpdetaildateAll', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid'),date:this.date }},
|
|
|
+ ExecDataByConfig(this.requestParam).then(response => {
|
|
|
+ console.log('清空已分配栏舍', this.requestParam)
|
|
|
+ if (response.msg === 'fail') {
|
|
|
+ this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
|
|
|
+ } else {
|
|
|
+ this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|