浏览代码

修改了撒料计划,日执行的顺序新bug,新增了一个校验,替换了过程分析接口

duanxiaoduan 3 年之前
父节点
当前提交
9e503d6bd4

二进制
dist.zip


+ 8 - 0
src/api/common.js

@@ -7,6 +7,14 @@ export function GetDataByName(data) {
     method: 'post',
     data
   })
+}
+
+export function processAnalysist(data) {
+  return request({
+    url: '/authdata/processAnalysist',
+    method: 'post',
+    data
+  })
 }
 
 export function ExeSqlJiade(data) {

+ 60 - 2
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -4,6 +4,7 @@
       <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="isRoleEdit" class="success" style="float: left;" @click="handleCheck">校验</el-button>
       <el-button v-if="isRoleEdit" class="success" icon="el-icon-download" style="float:left;" @click="handleAutomaticGeneration">自动生成</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;">
@@ -354,6 +355,25 @@
         </div>
       </div>
     </el-dialog>
+    <!-- 校验 -->
+    <el-dialog :title="textMap[check.dialogStatus]" :destroy-on-close="true" :visible.sync="check.dialogFormVisible" :close-on-click-modal="false" width="30%">
+      <div class="check">
+        <p v-if="check.temp.isDistribution == 0">当前有未分配栏舍,未分配栏舍如下:</p>
+        <p v-else>已分配完:当前栏舍已分配完善</p>
+        <!-- {{ check.temp }} -->
+        <div v-for="(item,index) in check.temp.ftlist" :key="index">
+          <b v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">{{item.ftname}}:</b>
+          <span v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">
+            <span v-for="(item2,index2) in item.arrList" :key="index2">
+              {{item2.barname}}
+            </span>
+          </span>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
+        <el-button class="save" @click="check.dialogFormVisible=false;">确认</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -421,7 +441,16 @@ export default {
         automaticGeneration: '提示',
         historyRecord: '历史记录',
         create: '新增',
-        update: '编辑'
+        update: '编辑',
+        check: '提示'
+      },
+      check: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp: {
+          ftlist:[],
+          isDistribution: ''
+        }
       },
       dialogFull: false,
       isOrder: true,
@@ -1417,7 +1446,36 @@ export default {
       const vue = this
       var myComponent = () => import('./historyRecord.vue')
       return vue.historyRecord.myComponent = myComponent
-    }
+    },
+    handleCheck() {
+      console.log('点击了校验')
+      this.check.dialogStatus = 'check'
+      this.check.dialogFormVisible = true
+      this.getCheckList()
+    },
+    getCheckList() {
+      const url = 'authdata/spillage'
+      const data = {
+        page: 1,
+        offset: 1,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          times: this.table.getdataListParm.parammaps.times,
+          refresh: 2
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.data.ftlist !== undefined && response.data.ftlist !== null) {
+          this.$set(this.check.temp,'isDistribution',0)
+          this.check.temp.ftlist = response.data.ftlist
+        } else {
+          this.check.temp = {}
+          this.$set(this.check.temp,'isDistribution',1)
+        }
+      })
+    },
   }
 }
 </script>

+ 2 - 2
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -496,7 +496,7 @@
 import echarts from 'echarts'
 
 require('echarts/theme/macarons')
-import { GetDataByName, GetReportform, formatNum } from '@/api/common'
+import { GetDataByName, GetReportform, formatNum,processAnalysist } from '@/api/common'
 import Cookies from 'js-cookie'
 import { parseTime } from '@/utils/index.js'
 export default {
@@ -684,7 +684,7 @@ export default {
     // TMR设备列表
     getList() {
       this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
+      processAnalysist(this.table.getdataListParm).then(response => {
         // console.log('TMR设备列表table数据', response.data.list)
         if (response.data.list !== null) {
           this.table.list = response.data.list