duanxiaoduan vor 3 Jahren
Ursprung
Commit
273f2eeae1

BIN
dist.zip


+ 39 - 11
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -531,7 +531,8 @@
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
-        </el-form>
+        </el-form>
+        <!-- <div>{{tipsList}}</div> -->
         <div slot="footer" class="dialog-footer" style="bottom:20px">
         <div slot="footer" class="dialog-footer" style="bottom:20px">
           <el-button class="cancelClose" @click="newGeneration.dialogFormVisible = false;getList()">取消</el-button>
           <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>
           <el-button v-if="newGeneration.dialogStatus== 'newGeneration'" class="save" :disabled="isokDisable" @click="newGenerationData()">确认</el-button>
@@ -580,7 +581,7 @@
 </template>
 </template>
 
 
 <script>
 <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 RevisePlan from './revisePlan.vue'
 import { parseTime, json2excel } from '@/utils/index.js'
 import { parseTime, json2excel } from '@/utils/index.js'
 import Cookies from 'js-cookie'
 import Cookies from 'js-cookie'
@@ -804,7 +805,8 @@ export default {
           mydate:  parseTime(new Date(), '{y}-{m}-{d}')
           mydate:  parseTime(new Date(), '{y}-{m}-{d}')
         }
         }
       },
       },
-
+      myMaxTimes:'',
+      tipsList:[]
     }
     }
   },
   },
 
 
@@ -830,8 +832,8 @@ export default {
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           console.log('11111111',response)
           console.log('11111111',response)
           this.tmrDownList = response.data.list
           this.tmrDownList = response.data.list
-           
-        }  
+
+        }
       })
       })
 
 
 
 
@@ -854,7 +856,8 @@ export default {
     },
     },
     getIsDisplay() {
     getIsDisplay() {
       GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
       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) {
         if (response.data.list[0].inforvalue == 1) {
           this.frequencyList = [{ id: '1', name: '第一班' }]
           this.frequencyList = [{ id: '1', name: '第一班' }]
         } else if (response.data.list[0].inforvalue == 2) {
         } else if (response.data.list[0].inforvalue == 2) {
@@ -882,7 +885,7 @@ export default {
         this.parentDate = this.table.getdataListParm.parammaps.mydate
         this.parentDate = this.table.getdataListParm.parammaps.mydate
         this.getTMRList()
         this.getTMRList()
         this.getList()
         this.getList()
-        
+
       }
       }
       var d = this.table.getdataListParm.parammaps.mydate
       var d = this.table.getdataListParm.parammaps.mydate
       var curDate = parseTime(new Date(), '{y}-{m}-{d}')
       var curDate = parseTime(new Date(), '{y}-{m}-{d}')
@@ -1300,17 +1303,42 @@ export default {
     handleCreate() {
     handleCreate() {
       console.log('点击了新生成')
       console.log('点击了新生成')
       this.newGeneration.temp.inputDatetime = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')]
       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 => {
       GetDataByName(this.newGeneration.getdataListParm).then(response => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           if (response.data.list[0].vmsg == '存在未分配') {
           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) {
     DateDiff(sDate1, sDate2) {
       console.log(sDate1, sDate2)
       console.log(sDate1, sDate2)

+ 9 - 9
src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue

@@ -197,7 +197,7 @@
                   placeholder="TMR编号"
                   placeholder="TMR编号"
                   @change="changeTMRNumber"
                   @change="changeTMRNumber"
                 >
                 >
-                  <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" />
+                  <el-option v-for="item in TMRNumberList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" />
                 </el-select>
                 </el-select>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
@@ -804,8 +804,8 @@ export default {
           type: 'warning'
           type: 'warning'
         }).then(() => {
         }).then(() => {
           this.create.temp.tmrid = this.create.temp.tmrid2
           this.create.temp.tmrid = this.create.temp.tmrid2
-          this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === item).eqcode
-          this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === item).maxstirfeed
+          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.mytmrid = this.create.temp.tmrid
           this.create.temp.mytmrid = this.create.temp.tmrid
           this.create.temp.mytmrname = this.create.temp.tmrname
           this.create.temp.mytmrname = this.create.temp.tmrname
           console.log('tmrname==>', this.create.temp)
           console.log('tmrname==>', this.create.temp)
@@ -814,9 +814,9 @@ export default {
           }
           }
         }).catch(() => {
         }).catch(() => {
           this.create.temp.tmrid2 = this.create.temp.tmrid
           this.create.temp.tmrid2 = this.create.temp.tmrid
-          this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
-          this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
-          this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+          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.mytmrid = this.create.temp.tmrid2
           this.create.temp.mytmrname = this.create.temp.tmrname
           this.create.temp.mytmrname = this.create.temp.tmrname
           console.log(this.create.temp)
           console.log(this.create.temp)
@@ -827,9 +827,9 @@ export default {
         })
         })
       } else {
       } else {
         this.create.temp.tmrid = this.create.temp.tmrid2
         this.create.temp.tmrid = this.create.temp.tmrid2
-        this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === item).eqcode
-        this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === item).maxstirfeed
-        this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === item).tclassname
+        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.mytmrid = this.create.temp.tmrid
         this.create.temp.mytmrname = this.create.temp.tmrname
         this.create.temp.mytmrname = this.create.temp.tmrname
         console.log('TMR编号item==>', item)
         console.log('TMR编号item==>', item)

+ 15 - 12
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -13,13 +13,16 @@
       </div>
       </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="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-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;float: left;margin-left: 10px;" @change="changeFrequency">
+        <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
+      </el-select>
       <el-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录 </el-button>
       <el-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录 </el-button>
     </div>
     </div>
-    <div class="search">
+    <!-- <div class="search">
       <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" @change="changeFrequency">
       <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-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       </el-select>
-    </div>
+    </div> -->
     <div class="table">
     <div class="table">
       <el-table
       <el-table
         id="table"
         id="table"
@@ -191,7 +194,7 @@
               <el-form-item label="TMR编号:" prop="tmrid2">
               <el-form-item label="TMR编号:" prop="tmrid2">
                 <el-select v-model="create.temp.tmrid2" style="width: 100%;" placeholder="TMR编号" @change="changeTMRNumber">
                 <el-select v-model="create.temp.tmrid2" style="width: 100%;" placeholder="TMR编号" @change="changeTMRNumber">
                   <!-- <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" /> -->
                   <!-- <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" /> -->
-                    <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" />
+                    <el-option v-for="item in TMRNumberList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" />
                 </el-select>
                 </el-select>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
@@ -667,9 +670,9 @@ export default {
           confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
           confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
         }).then(() => {
         }).then(() => {
           this.create.temp.tmrid = this.create.temp.tmrid2
           this.create.temp.tmrid = this.create.temp.tmrid2
-          this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === item).eqcode
-          this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === item).maxstirfeed
-          this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === item).tclassname
+          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.mytmrid = this.create.temp.tmrid
           this.create.temp.mytmrname = this.create.temp.tmrname
           this.create.temp.mytmrname = this.create.temp.tmrname
           console.log('tmrname==>', this.create.temp)
           console.log('tmrname==>', this.create.temp)
@@ -678,9 +681,9 @@ export default {
           }
           }
         }).catch(() => {
         }).catch(() => {
           this.create.temp.tmrid2 = this.create.temp.tmrid
           this.create.temp.tmrid2 = this.create.temp.tmrid
-          this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
-          this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
-          this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
+          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.mytmrid = this.create.temp.tmrid2
           this.create.temp.mytmrname = this.create.temp.tmrname
           this.create.temp.mytmrname = this.create.temp.tmrname
           console.log(this.create.temp)
           console.log(this.create.temp)
@@ -688,9 +691,9 @@ export default {
         })
         })
       } else {
       } else {
         this.create.temp.tmrid = this.create.temp.tmrid2
         this.create.temp.tmrid = this.create.temp.tmrid2
-        this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === item).eqcode
-        this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === item).maxstirfeed
-        this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === item).tclassname
+        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.mytmrid = this.create.temp.tmrid
         this.create.temp.mytmrname = this.create.temp.tmrname
         this.create.temp.mytmrname = this.create.temp.tmrname
         console.log('TMR编号item==>', item)
         console.log('TMR编号item==>', item)