|
@@ -531,7 +531,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-form>
|
|
|
+ </el-form>
|
|
|
+ <!-- <div>{{tipsList}}</div> -->
|
|
|
<div slot="footer" class="dialog-footer" style="bottom:20px">
|
|
|
<el-button class="cancelClose" @click="newGeneration.dialogFormVisible = false;getList()">取消</el-button>
|
|
|
<el-button v-if="newGeneration.dialogStatus== 'newGeneration'" class="save" :disabled="isokDisable" @click="newGenerationData()">确认</el-button>
|
|
@@ -580,7 +581,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, getDorm, GetReportform, checkButtons } from '@/api/common'
|
|
|
+import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, getDorm, GetReportform, checkButtons,postJson } from '@/api/common'
|
|
|
import RevisePlan from './revisePlan.vue'
|
|
|
import { parseTime, json2excel } from '@/utils/index.js'
|
|
|
import Cookies from 'js-cookie'
|
|
@@ -804,7 +805,8 @@ export default {
|
|
|
mydate: parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ myMaxTimes:'',
|
|
|
+ tipsList:[]
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -830,8 +832,8 @@ export default {
|
|
|
if (response.data.list !== null) {
|
|
|
console.log('11111111',response)
|
|
|
this.tmrDownList = response.data.list
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
|
|
@@ -854,7 +856,8 @@ export default {
|
|
|
},
|
|
|
getIsDisplay() {
|
|
|
GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
|
|
|
- console.log(response.data.list[0].inforvalue)
|
|
|
+ console.log(response.data.list[0].inforvalue)
|
|
|
+ this.myMaxTimes = response.data.list[0].inforvalue
|
|
|
if (response.data.list[0].inforvalue == 1) {
|
|
|
this.frequencyList = [{ id: '1', name: '第一班' }]
|
|
|
} else if (response.data.list[0].inforvalue == 2) {
|
|
@@ -882,7 +885,7 @@ export default {
|
|
|
this.parentDate = this.table.getdataListParm.parammaps.mydate
|
|
|
this.getTMRList()
|
|
|
this.getList()
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
var d = this.table.getdataListParm.parammaps.mydate
|
|
|
var curDate = parseTime(new Date(), '{y}-{m}-{d}')
|
|
@@ -1300,17 +1303,42 @@ export default {
|
|
|
handleCreate() {
|
|
|
console.log('点击了新生成')
|
|
|
this.newGeneration.temp.inputDatetime = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')]
|
|
|
- this.newGeneration.dialogStatus = 'newGeneration'
|
|
|
- this.newGeneration.dialogFormVisible = true
|
|
|
-
|
|
|
GetDataByName(this.newGeneration.getdataListParm).then(response => {
|
|
|
console.log('table数据', response.data.list)
|
|
|
if (response.data.list !== null) {
|
|
|
if (response.data.list[0].vmsg == '存在未分配') {
|
|
|
- this.$message({ type: 'warning', message: '撒料计划中存在未分配完栏舍,建议及时进行分配', duration: 2000 })
|
|
|
+ this.$message({ type: 'warning', message: '撒料计划中存在未分配完栏舍,建议及时进行分配', duration: 2000 })
|
|
|
+ this.getTips()
|
|
|
+ }else{
|
|
|
+ this.newGeneration.dialogStatus = 'newGeneration'
|
|
|
+ this.newGeneration.dialogFormVisible = true
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ getTips(){
|
|
|
+ const url = 'authdata/feedp/undistribute'
|
|
|
+ const data = {}
|
|
|
+ data.times = this.myMaxTimes
|
|
|
+ data.pastureid = Cookies.get('pastureid')
|
|
|
+ this.tipsList = []
|
|
|
+ postJson(url, data).then(response => {
|
|
|
+ if(response.data !== null){
|
|
|
+ if(this.myMaxTimes == 1){
|
|
|
+ this.tipsList = response.data.one
|
|
|
+ }else if(this.myMaxTimes == 2){
|
|
|
+ this.tipsList.push(response.data.one,response.data.two)
|
|
|
+ }else if(this.myMaxTimes == 3){
|
|
|
+ this.tipsList.push(response.data.one,response.data.two,response.data.three)
|
|
|
+ }else if(this.myMaxTimes == 4){
|
|
|
+ this.tipsList.push(response.data.one,response.data.two,response.data.three,response.data.four)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.tipsList = []
|
|
|
+ }
|
|
|
+ this.newGeneration.dialogStatus = 'newGeneration'
|
|
|
+ this.newGeneration.dialogFormVisible = true
|
|
|
+ })
|
|
|
},
|
|
|
DateDiff(sDate1, sDate2) {
|
|
|
console.log(sDate1, sDate2)
|