浏览代码

日执行:1.页面显示问题;2.配方名称字体缩小两个字符;3.已执行改为绿色背景白色字体,未执行改为红色背景黑色字体;4.新增行内更改顺序

duanxiaoduan 1 年之前
父节点
当前提交
efe946e3a2
共有 1 个文件被更改,包括 43 次插入8 次删除
  1. 43 8
      src/views/formulationPlan/dailyExecutionPlan/index.vue

+ 43 - 8
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -73,7 +73,7 @@
           :cell-style="cellStyle"
           class="elTable table-fixed"
           :row-class-name="tableRowClassName"
-          :height="370"
+          :height="myheight"
           @row-click="tableRowClick"
           @selection-change="handleSelect"
         >
@@ -101,7 +101,7 @@
           <el-table-column label="已执行" min-width="70px" align="center">
             <template slot-scope="scope">
               <div v-if="scope.row.havebutton == 0" style="background: #009A69;color:#fff;line-height:30px;">否</div>
-              <div v-else style="background: #c7c7ca ;line-height:30px;">是</div>
+              <div v-else style="background: #FC2323;color:#000 ;line-height:30px;">是</div>
             </template>
           </el-table-column>
           <el-table-column label="班次" min-width="80px" align="center">
@@ -127,7 +127,7 @@
           </el-table-column>
           <el-table-column label="配方名称" min-width="100px" align="center">
             <template slot-scope="scope">
-              <b style="font-size: 28px;line-height: 30px;">{{ scope.row.ftname }}</b>
+              <b style="font-size: 26px;line-height: 30px;">{{ scope.row.ftname }}</b>
             </template>
           </el-table-column>
           <el-table-column label="牛头数" min-width="80px" align="center">
@@ -148,13 +148,16 @@
           <el-table-column align="center" width="100" label="操作" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
               <el-button class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
+              <el-button class="miniDanger" icon="el-icon-sort" @click="handleRowSort(row)" />
             </template>
           </el-table-column>
         </el-table>
         <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
       </div>
     </div>
-
+<!-- maxHeight="enlargeHeight -->
+  <div v-if="isDetail" style="position: relative;">
+    <el-button class="hide" @click="handleCloseTable2" style="position: absolute;right: 0;top: -20px;">隐藏</el-button>
     <!-- 预混料 -->
     <div v-if="table3.getdataListParm.parammaps.lpplantype == 4" class="content">
       <el-row :gutter="20">
@@ -219,7 +222,6 @@
         </el-col>
       </el-row>
     </div>
-
     <!-- 撒料 -->
     <div v-if="table3.getdataListParm.parammaps.lpplantype == 0" class="content">
       <el-row :gutter="20">
@@ -650,7 +652,7 @@
         </el-col>
       </el-row>
     </div>
-
+  </div>
     <!-- 新生成 -->
     <el-dialog :title="textMap[newGeneration.dialogStatus]" :destroy-on-close="true" :visible.sync="newGeneration.dialogFormVisible" :close-on-click-modal="false" width="30%">
       <div class="newGeneration" v-loading="newGenerationLoading" >
@@ -907,7 +909,10 @@ export default {
     RevisePlan
   },
   data() {
-    return {
+    return {
+      myheight: document.documentElement.clientHeight - 280,
+      enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
+      isDetail:false,
       newGenerationLoading:false,
       dialogFull: false,
       isRoleEdit: [],
@@ -1582,6 +1587,14 @@ export default {
     tableRowClick(row, column, event) {
       console.log(row, column, event)
       console.log('点击计划类型', row.lpplantype)
+      if (this.isOrder == false) {
+        this.$message({ type: 'error', message: '请保存或取消当前更改顺序操作', duration: 2000 })
+      } else {
+        if (column.label !== '操作') {
+          this.isDetail = true // 点击行显示详情
+          this.myheight = document.documentElement.clientHeight - 85 - 265 - 230
+        }
+      }
       this.table2.getdataListParm.parammaps.havebutton = row.havebutton
       this.table3.getdataListParm.parammaps.havebutton = row.havebutton
       // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4/预称重计划5
@@ -1663,7 +1676,10 @@ export default {
       }
       this.$forceUpdate()
     },
-
+    handleCloseTable2() {
+      this.isDetail = false
+      this.myheight = document.documentElement.clientHeight - 280
+    },
     // 计划内容操作详情
     getList2() {
       this.table2.listLoading = true
@@ -2489,6 +2505,25 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消删除' })
       })
+    },
+    handleRowSort(row){
+      this.$prompt('由于混料车和撒料车是一体的,插入顺序不能隔开', '排序', {
+        inputPlaceholder:'请输入您要插入的位置',
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
+        // inputErrorMessage: '邮箱格式不正确'
+      }).then(({ value }) => {
+        this.$message({
+          type: 'success',
+          message: '插入的位置是: ' + value
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消排序'
+        });
+      });
     },
     handleSpan() {
       this.mergekeys.forEach(key => {