Przeglądaj źródła

配方模板及栏舍配方接口个别接口已重调

duanxiaoduan 3 lat temu
rodzic
commit
90694a6a8e

BIN
dist.zip


+ 36 - 3
src/views/formulationPlan/dhedFormula/index.vue

@@ -1053,7 +1053,8 @@ export default {
       isokDisable: false,
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
-      myHeight: document.documentElement.clientHeight - 85 - 140
+      myHeight: document.documentElement.clientHeight - 85 - 140,
+      oldRowList:{}
     }
   },
   computed: {
@@ -4193,6 +4194,7 @@ export default {
     // 编辑
     handleUpdate(row) {
       console.log(row)
+      this.oldRowList = {...row}
       for (let i = 0; i < this.table.list.length; i++) {
         if (this.table.list[i].Edit == true) {
           this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
@@ -4335,6 +4337,28 @@ export default {
       this.table.temp.w3 = row.w3
       this.table.temp.w4 = row.w4
 
+      var obj = {}
+      obj.pastureid = row.pastureid
+      obj.id = row.id
+      obj.data = []
+      if(this.oldRowList.w1 !== row.w1){
+        obj.data.push({'old':this.oldRowList.w1,'new':row.w1,times:1,'ptid':row.ftid,'ptsid':row.ptsfid})
+      }
+      if(this.oldRowList.w2 !== row.w2){
+        obj.data.push({'old':this.oldRowList.w2,'new':row.w2,times:2,'ptid':row.ftid,'ptsid':row.ptsfid})
+      }
+      if(this.oldRowList.w3 !== row.w3){
+        obj.data.push({'old':this.oldRowList.w3,'new':row.w3,times:3,'ptid':row.ftid,'ptsid':row.ptsfid})
+      }
+      if(this.oldRowList.bw1 !== row.bw1){
+        obj.data.push({'old':this.oldRowList.bw1,'new':row.bw1,times:1,'ptid':row.ftid,'ptsid':row.ptsfid})
+      }
+      if(this.oldRowList.bw2 !== row.bw2){
+        obj.data.push({'old':this.oldRowList.bw2,'new':row.bw2,times:2,'ptid':row.ftid,'ptsid':row.ptsfid})
+      }
+      if(this.oldRowList.bw3 !== row.bw3){
+        obj.data.push({'old':this.oldRowList.bw3,'new':row.bw3,times:3,'ptid':row.ftid,'ptsid':row.ptsfid})
+      }
       if (this.table.temp.ccount == '' && this.table.temp.ratio == '' && this.table.temp.ccountratio == '' && this.table.temp.ftid == '') {
         this.$message({ type: 'error', message: '实际牛头数/系数/系数头数/配方模版不能为空', duration: 2000 })
         return false
@@ -4428,8 +4452,17 @@ export default {
         if (response.msg === 'fail') {
           this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
         } else {
-          this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-          // this.reload()
+          if(obj.data.length>0){
+            const url = 'authdata/fpdetail/edit'
+            const data = obj
+            postJson(url, data).then(response => {
+              if(response.msg !== 'fail'){
+                this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              }
+            })
+          }else{
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+          }
           this.getList()
           for (let i = 0; i < this.headerList.length; i++) {
             if (this.headerList[i].target.className == 'el-icon-lock') {

+ 0 - 2875
src/views/formulationPlan/materialIssuancePlan/index - 副本.vue

@@ -1,2875 +0,0 @@
-<template>
-  <div v-loading="fullscreenLoading" element-loading-text="给我一点时间" class="app-container">
-    <div class="menuList">
-      <div class="menuList-t">
-        <div class="menuList-t-l">
-          <span>班次:</span>
-          <el-radio-group v-model="menuRadio" size="small" @change="changeMenu">
-            <el-radio-button v-if="maxTime.isTime1" label="一班">一班</el-radio-button>
-            <el-radio-button v-if="maxTime.isTime2" label="二班">二班</el-radio-button>
-            <el-radio-button v-if="maxTime.isTime3" label="三班">三班</el-radio-button>
-            <el-radio-button v-if="maxTime.isTime4" label="四班">四班</el-radio-button>
-          </el-radio-group>
-        </div>
-        <div class="menuList-t-r">
-          <div v-if="!isBarracks" class="menuList-t-r-l" @click="clickBarracks(2);">栏舍计划统计-展开<i
-            class="el-icon-arrow-down"
-          /></div>
-          <div v-if="isBarracks" class="menuList-t-r-r" @click="clickBarracks(1);">栏舍计划统计-收起<i
-            class="el-icon-arrow-up"
-          /></div>
-          <div v-if="isBarracks" class="columnHouse">
-            <div class="smallTable">
-              <el-table
-                :list-loading="smallMenu.listLoading"
-                element-loading-text="给我一点时间"
-                :data="smallMenu.list"
-                :row-style="rowStyle2"
-                :cell-style="cellStyle2"
-                :header-row-style="headerRowStyle2"
-                :header-cell-style="headerCellStyle2"
-                show-summary
-                sum-text="总栏舍"
-                class="elTable"
-              >
-                <el-table-column label="配方/班次" min-width="80px" align="center" prop="tname" />
-                <el-table-column label="总数" min-width="50px" align="center" prop="usedsum" />
-                <el-table-column
-                  v-if="maxTime.isTime1"
-                  label="第一班未分配"
-                  min-width="105px"
-                  align="center"
-                  prop="onetime"
-                />
-                <el-table-column
-                  v-if="maxTime.isTime2"
-                  label="第二班未分配"
-                  min-width="105px"
-                  align="center"
-                  prop="twotime"
-                />
-                <el-table-column
-                  v-if="maxTime.isTime3"
-                  label="第三班未分配"
-                  min-width="105px"
-                  align="center"
-                  prop="threetime"
-                />
-                <el-table-column
-                  v-if="maxTime.isTime4"
-                  label="第四班未分配"
-                  min-width="105px"
-                  align="center"
-                  prop="fourtime"
-                />
-              </el-table>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="menuList-b">
-        <ul v-loading="listLoadingTimes" class="draggableList">
-          <li v-for="element in MenuList" :key="element.arrid">
-            <span v-if="element.isShowTitle" class="draggableTitle">{{ element.ftname }}:</span>
-            <draggable
-              v-if="dropState== false && isRoleEdit"
-              id="1"
-              data-source="juju1"
-              :list="element.arrList"
-              class="list-group1"
-              draggable=".item"
-              group="a"
-              animation="500"
-              force-fallback="true"
-              :move="move"
-              @change="changeLog"
-              @start="start"
-              @end="end"
-            >
-              <div
-                v-for="item in element.arrList"
-                id="item1"
-                :key="item.id"
-                class="list-group-item1 item"
-                style="width: 88px;float: left;margin:5px 5px;height: 36px;"
-              >
-                <div style="position: relative;">
-                  <el-tooltip
-                    placement="top"
-                    style="height: 18px;line-height: 18px;"
-                    :style="{'background':item.background}"
-                  >
-                    <div slot="content">{{ item.barname }}</div>
-                    <div class="draggableName not-select">{{ item.barname }}</div>
-                  </el-tooltip>
-                  <div class="draggableWeight not-select" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
-                    <!-- <span v-if="item.isfill==1" style="background: #009C69;color:#fff;position: absolute;left: 0;top: 0;">补</span> -->
-                    {{ item.weight }}
-                  </div>
-                </div>
-              </div>
-            </draggable>
-            <div
-              v-else
-              id="1"
-              data-source="juju1"
-              :list="element.arrList"
-              class="list-group1"
-              draggable=".item"
-              group="a"
-              animation="500"
-              force-fallback="true"
-              :move="move"
-              @change="changeLog"
-              @start="start"
-              @end="end"
-            >
-              <div
-                v-for="item in element.arrList"
-                :key="item.id"
-                class="list-group-item1 item"
-                style="width: 88px;float: left;margin:5px 5px;height: 36px;"
-              >
-                <div style="position: relative">
-                  <el-tooltip
-                    placement="top"
-                    style="height: 18px;line-height: 18px;"
-                    :style="{'background':item.background}"
-                  >
-                    <div slot="content">{{ item.barname }}</div>
-                    <div class="draggableName not-select">{{ item.barname }}</div>
-                  </el-tooltip>
-                  <div class="draggableWeight not-select" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
-                    {{ item.weight }} </div>
-                  <!-- <span v-if="item.isfill==1" style="background: #009C69;color:#fff;position: absolute;left: 0;top: 18px;">补</span> -->
-                </div>
-              </div>
-            </div>
-          </li>
-        </ul>
-      </div>
-    </div>
-    <div ref="list" class="list">
-      <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="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;">
-          <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-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录
-        </el-button>
-      </div>
-
-      <div class="table">
-        <el-table
-          id="table"
-          :key="table.tableKey"
-          ref="table"
-          v-loading="table.listLoading"
-          v-loadmore="loadMore"
-          element-loading-text="给我一点时间"
-          :data="table.list"
-          border
-          highlight-current-row
-          style="width: 100%;"
-          :height="height"
-          :row-style="rowStyle"
-          :cell-style="cellStyle"
-          class="elTable"
-          row-key="id"
-          @selection-change="handleSelect"
-        >
-          <el-table-column type="selection" width="50" />
-          <el-table-column label="车次" width="80px" align="center" class-name="small-padding fixed-width" fixed="">
-            <template slot-scope="scope">
-              <span v-show="scope.row.NoEdit">{{ scope.row.sort }}</span>
-              <el-input
-                v-show="scope.row.Edit"
-                v-model="scope.row.sort"
-                type="number"
-                placeholder="车次"
-                class="filter-item"
-                style="display: inline-block;width: 95%;"
-              />
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="TMR编号"
-            width="110px"
-            align="center"
-            class-name="small-padding fixed-width"
-            fixed="left"
-          >
-            <template slot-scope="scope">
-              <span v-show="scope.row.NoEdit">{{ scope.row.tmrname }}</span>
-              <el-select
-                v-show="scope.row.Edit"
-                v-model="scope.row.tmrid"
-                placeholder="TMR编号"
-                class="filter-item"
-                style="width:95%;"
-                @change="(value)=> {changeTMRNumber(value, scope.row)}"
-              >
-                <el-option v-for="item in TMRNumberList" :key="item.id" :label="item.eqcode" :value="item.id" />
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column label="描述" width="110px" align="center">
-            <template slot-scope="scope">
-              <span v-show="scope.row.NoEdit">{{ scope.row.display }}</span>
-              <el-input
-                v-show="scope.row.Edit"
-                v-model="scope.row.display"
-                type="textarea"
-                :autosize="{ minRows: 1.3, maxRows: 4}"
-                placeholder="描述"
-                maxlength="255"
-                class="filter-item"
-                style="display: inline-block;width: 95%;"
-              />
-            </template>
-          </el-table-column>
-          <el-table-column label="生效" width="80px" align="center">
-            <template slot-scope="scope">
-              <el-switch
-                v-model="scope.row.sel"
-                :disabled="scope.row.NoEdit"
-                active-color="#13ce66"
-                inactive-color="#ff4949"
-                :active-value="1"
-                :inactive-value="0"
-                @change="handleTakeEffectChange(scope.$index, scope.row)"
-              />
-            </template>
-          </el-table-column>
-          <el-table-column label="班次" width="100px" align="center">
-            <template slot-scope="scope">
-              <span v-show="scope.row.NoEdit">{{ scope.row.timesstr }}</span>
-              <el-select
-                v-show="scope.row.Edit"
-                v-model="scope.row.times"
-                :disabled="scope.row.Disabled"
-                placeholder="班次"
-                class="filter-item"
-                style="width:95%;"
-              >
-                <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column label="时间" width="125px" align="center">
-            <template slot-scope="scope">
-              <span v-show="scope.row.NoEdit">{{ scope.row.begintime }}</span>
-              <el-time-picker
-                v-show="scope.row.Edit"
-                v-model="scope.row.begintime"
-                type="datetime"
-                placeholder="选择时间"
-                format="HH:mm"
-                value-format="HH:mm"
-                style="display: inline-block;width: 95%;"
-              />
-            </template>
-          </el-table-column>
-          <el-table-column label="最大重量" width="75px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.maxweight }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="合计重量" width="80px" align="center">
-            <template slot-scope="scope">
-              <span>{{ scope.row.sumweight }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="模板配方" width="120px" align="center">
-            <template slot-scope="scope">
-              <span v-show="scope.row.NoEdit">{{ scope.row.ftname }}</span>
-              <el-select
-                v-show="scope.row.Edit"
-                v-model="scope.row.ftid"
-                :disabled="scope.row.Disabled"
-                placeholder="模板配方"
-                class="filter-item"
-                style="width:95%;"
-                @change="(value)=> {changeTemplateFormulation(value, scope.row)}"
-              >
-                <el-option
-                  v-for="item in templateFormulationList"
-                  :key="item.id"
-                  :label="item.tname"
-                  :value="item.id"
-                />
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="80px" align="center">
-            <template slot-scope="scope">
-              <el-switch
-                v-model="scope.row.issplit"
-                :disabled="scope.row.NoEdit"
-                active-color="#13ce66"
-                inactive-color="#ff4949"
-                :active-value="1"
-                :inactive-value="0"
-                @change="handleIssplitChange(scope.$index, scope.row)"
-              />
-            </template>
-          </el-table-column>
-          <el-table-column label="撒料" width="950px" align="center">
-            <template slot-scope="scope">
-              <draggable
-                v-if="dropState== false && isRoleEdit"
-                id="2"
-                data-source="juju"
-                :list="scope.row.arrList"
-                class="list-group2"
-                draggable=".item"
-                group="a"
-                animation="500"
-                force-fallback="true"
-                :move="move2"
-                @change="changeLog2(scope.row)"
-                @start="start2"
-                @end="end2(scope.row)"
-              >
-                <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item">
-                  <div class="arr-l" :style="{'background':element.tbackground}">
-                    <div class="arr-l-t">
-                      <div class="arr-l-t-t" />
-                      <el-select
-                        v-model="element.tmrid"
-                        placeholder="撒料设备"
-                        class="arr-l-t-b el-icon-arrow-down"
-                        @change="(value)=> {changeEquipment(value, scope.row,element.fttype,element.id)}"
-                      >
-                        <el-option
-                          v-for="item in equipmentList"
-                          :key="item.id"
-                          :disabled="table.myTemp.isUpdateSave"
-                          :label="item.tmrmix"
-                          :value="item.id"
-                        />
-                      </el-select>
-                    </div>
-                    <div class="arr-l-b">
-                      <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
-                        <div slot="content">{{ element.tmrname }}</div>
-                        <div class="tmrname">{{ element.tmrname }}</div>
-                      </el-tooltip>
-                    </div>
-                    <!-- <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div> -->
-                  </div>
-                  <div class="arr-r">
-                    <div class="arr-r-l">
-                      <el-tooltip placement="top">
-                        <div slot="content">{{ element.barname }}</div>
-                        <div class="barname">{{ element.barname }}</div>
-                      </el-tooltip>
-                    </div>
-                    <div class="arr-r-c">-</div>
-                    <div class="arr-r-r">
-                      <el-tooltip v-show="!element.isWeight" placement="top">
-                        <div slot="content">{{ element.weight }}</div>
-                        <div class="weight" @dblclick="dbclickWeight(element)">{{ element.weight }}</div>
-                      </el-tooltip>
-                      <el-tooltip v-show="element.isWeight && isRoleEdit" placement="top">
-                        <div slot="content">{{ element.weight }}</div>
-                        <input
-                          ref="weight"
-                          v-model="element.weight"
-                          v-focus="element.focusState"
-                          :disabled="table.myTemp.isUpdateSave"
-                          type="number"
-                          placeholder="重量"
-                          step="0.01"
-                          class="filter-item2"
-                          style="display: inline-block;height:25px;padding:4px 0px; font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
-                          @blur="(value)=> {blurWeight(scope.row,element.fttype,element.id)}"
-                        >
-                      </el-tooltip>
-                      <el-tooltip v-show="element.isWeight && isRoleEdit" placement="top">
-                        <div slot="content">{{ element.weight }}</div>
-                        <div class="weight" @dblclick="dbclickWeight(element)">{{ element.weight }}</div>
-                      </el-tooltip>
-                    </div>
-                  </div>
-                  <div class="arr-t" :style="{'background':element.background}">
-                    <i
-                      class="el-icon-close"
-                      style="position: absolute;right: 0;"
-                      @click="handleFLDelete(element,scope.row)"
-                    />
-                  </div>
-                </div>
-              </draggable>
-              <!-- <div v-else id="2" data-source="juju" :list="scope.row.arrList" class="list-group2" draggable=".item" group="a"> -->
-              <div v-else :list="scope.row.arrList" class="list-group2">
-                <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item">
-                  <div class="arr-l" :style="{'background':element.tbackground}">
-                    <div class="arr-l-t">
-                      <div class="arr-l-t-t" />
-                      <el-select
-                        v-model="element.tmrid"
-                        placeholder="撒料设备"
-                        :disabled="!isRoleEdit"
-                        class="arr-l-t-b el-icon-arrow-down"
-                        @change="(value)=> {changeEquipment(value, scope.row,element.fttype,element.id)}"
-                      >
-                        <el-option
-                          v-for="item in equipmentList"
-                          :key="item.id"
-                          :disabled="table.myTemp.isUpdateSave"
-                          :label="item.tmrmix"
-                          :value="item.id"
-                        />
-                      </el-select>
-                    </div>
-                    <div class="arr-l-b">
-                      <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
-                        <div slot="content">{{ element.tmrname }}</div>
-                        <div class="tmrname">{{ element.tmrname }}</div>
-                      </el-tooltip>
-                    </div>
-                    <!-- <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div> -->
-                  </div>
-                  <div class="arr-r">
-                    <div class="arr-r-l">
-                      <el-tooltip placement="top">
-                        <div slot="content">{{ element.barname }}</div>
-                        <div class="barname">{{ element.barname }}</div>
-                      </el-tooltip>
-                    </div>
-                    <div class="arr-r-c">-</div>
-                    <div class="arr-r-r">
-                      <el-tooltip v-show="!element.isWeight" placement="top">
-                        <div slot="content">{{ element.weight }}</div>
-                        <div class="weight" @dblclick="dbclickWeight(element)">{{ element.weight }}</div>
-                      </el-tooltip>
-                      <el-tooltip v-show="element.isWeight && isRoleEdit" placement="top">
-                        <div slot="content">{{ element.weight }}</div>
-                        <input
-                          ref="weight"
-                          v-model="element.weight"
-                          v-focus="element.focusState"
-                          type="number"
-                          placeholder="重量1"
-                          step="0.01"
-                          class="filter-item2"
-                          style="display: inline-block;height:25px;padding:4px 0px; font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
-                          @blur="(value)=> {blurWeight(scope.row,element.fttype,element.id)}"
-                        >
-                      </el-tooltip>
-                      <el-tooltip v-show="element.isWeight && !isRoleEdit" placement="top">
-                        <div slot="content">{{ element.weight }}</div>
-                        <div class="weight">{{ element.weight }}</div>
-                      </el-tooltip>
-                    </div>
-                  </div>
-                  <div class="arr-t" :style="{'background':element.background}">
-                    <i
-                      v-if="isRoleEdit"
-                      class="el-icon-close"
-                      style="position: absolute;right: 0;"
-                      @click="handleFLDelete(element,scope.row)"
-                    />
-                  </div>
-                </div>
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
-            <template slot-scope="{row}">
-              <el-button
-                v-if="row.isCreate && isRoleEdit"
-                :disabled="isokDisable"
-                icon="el-icon-folder-checked"
-                class="miniSuccess"
-                @click="createData(row)"
-              />
-              <span v-if="row.isCreate && isRoleEdit" class="centerSpan">|</span>
-              <el-button
-                v-if="row.isCreate && isRoleEdit"
-                class="minCancel"
-                icon="el-icon-close"
-                @click="createCancel(row)"
-              />
-              <el-button
-                v-if="row.isUpdate && isRoleEdit"
-                class="miniSuccess"
-                icon="el-icon-edit-outline"
-                @click="handleUpdate(row)"
-              />
-              <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
-              <el-button
-                v-if="row.isUpdate && isRoleEdit"
-                class="miniDanger"
-                icon="el-icon-delete"
-                @click="handleRowDelete(row)"
-              />
-              <el-button
-                v-if="row.isUpdateSave && isRoleEdit"
-                :disabled="isokDisable"
-                icon="el-icon-folder-checked"
-                class="miniSuccess"
-                @click="updateData(row)"
-              />
-              <span v-if="row.isUpdateSave && isRoleEdit" class="centerSpan">|</span>
-              <el-button
-                v-if="row.isUpdateSave && isRoleEdit"
-                class="minCancel"
-                icon="el-icon-close"
-                @click="updateCancel(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>
-
-      <!-- 自动生成 -->
-      <el-dialog
-        :fullscreen="dialogFull"
-        :destroy-on-close="true"
-        :visible.sync="automaticGeneration.dialogFormVisible"
-        :close-on-click-modal="false"
-        width="30%"
-      >
-        <template slot="title">
-          <div class="avue-crud__dialog__header">
-            <span class="el-dialog__title">
-              <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-              {{ textMap[automaticGeneration.dialogStatus] }}
-            </span>
-            <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-              <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-              <svg-icon v-else icon-class="fullscreen" />
-            </div>
-          </div>
-        </template>
-        <div class="app-automaticGeneration" style="margin: 0 auto;">
-          <div style="width: 210px;margin:60px auto 120px;font-weight: 16px;">
-            请选择自动生成方式:<br>
-            清空计划并生成新计划;<br>
-            当前计划基础上继续生成计划;<br>
-          </div>
-          <div slot="footer" class="dialog-footer">
-            <el-button
-              style="right:240px;"
-              class="cancelClose"
-              @click="automaticGeneration.dialogFormVisible = false; "
-            >关闭</el-button>
-            <el-button style="right:130px;" class="save" :disabled="isokDisable" @click="continueData(0)">继续生成
-            </el-button>
-            <el-button style="right:20px;" class="save" :disabled="isokDisable" @click="continueData(1)">重新生成
-            </el-button>
-          </div>
-        </div>
-      </el-dialog>
-      <!-- 历史记录 -->
-      <el-dialog
-        :fullscreen="dialogFull"
-        :destroy-on-close="true"
-        :visible.sync="historyRecord.dialogFormVisible"
-        :close-on-click-modal="false"
-        width="90%"
-      >
-        <template slot="title">
-          <div class="avue-crud__dialog__header">
-            <span class="el-dialog__title">
-              <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-              {{ textMap[historyRecord.dialogStatus] }}
-            </span>
-            <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-              <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-              <svg-icon v-else icon-class="fullscreen" />
-            </div>
-          </div>
-        </template>
-        <div class="historyRecord">
-          <keep-alive>
-            <component :is="historyRecord.myComponent" ref="historyRecord" />
-          </keep-alive>
-        </div>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose cancelClose1" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
-        </div>
-      </el-dialog>
-    </div>
-
-  </div>
-  </div>
-</template>
-
-<script>
-import {
-  GetDataByName,
-  postJson,
-  PostDataByName,
-  Autogeneration,
-  ExecDataByConfig,
-  checkButtons
-} from '@/api/common'
-import draggable from 'vuedraggable'
-import Sortable from 'sortablejs'
-import Cookies from 'js-cookie'
-import {
-  MessageBox
-} from 'element-ui'
-  // const id = 1
-export default {
-  inject: ['reload'],
-  name: 'MaterialIssuancePlan',
-  display: 'Two list header slot',
-  order: 14,
-  components: {
-    draggable
-  },
-  directives: {
-    focus: {
-      update: function(el, {
-        value
-      }) {
-        if (value) {
-          el.focus()
-        }
-      }
-    }
-  },
-  data() {
-    return {
-      pagindex: 1, // 页码
-      pagesize: 300, // 页/条数
-      pagetotal: 0, // 一共要请求的次数
-      intertimer: null, // 定时器
-      dialogFull: false,
-      isRoleEdit: [],
-      isInforvalue: false,
-      isBarracks: false,
-      requestParams: {
-        name: 'getTMRListEnableType',
-        offset: 0,
-        parammaps: {
-          pastureid: Cookies.get('pastureid'),
-          eqtype: '1'
-        }
-      },
-      requestParams2: {
-        name: 'getTMRListEnableTypeAll',
-        offset: 0,
-        parammaps: {
-          pastureid: Cookies.get('pastureid'),
-          eqtype: '1'
-        }
-      },
-      requestParams3: {
-        name: 'getFTSWList',
-        offset: 0,
-        parammaps: {
-          pastureid: Cookies.get('pastureid')
-        }
-      },
-      requestParams4: {
-        name: 'getSysoptEnable',
-        offset: 0,
-        parammaps: {
-          pastureid: Cookies.get('pastureid'),
-          inforname: 'isSmallMaterial'
-        }
-      },
-      equipmentList: [], // 撒料设备
-      TMRNumberList: [], // TMR编号
-      frequencyList: [], // 班次
-      templateFormulationList: [], // 模板配方
-
-      // 班次
-      maxTime: {
-        getMaxTimesParm: {
-          name: 'getSysoptEnable',
-          page: 1,
-          offset: 1,
-          pagecount: 1,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            inforname: 'times'
-          }
-        },
-        // 班次
-        isTime1: false,
-        isTime2: false,
-        isTime3: false,
-        isTime4: false
-      },
-
-      table: {
-        getdataListParm: {
-          name: 'getLppList',
-          name1: 'getLppdList',
-          page: 1,
-          offset: 1,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid')
-          }
-        },
-        list: [],
-        list2: [],
-        total: 0,
-        tableKey: 0,
-        listLoading: false,
-        tabClickIndex: null, // 点击的单元格
-        tabClickLabel: '', // 当前点击的列名
-        temp: {},
-        move1: '',
-        changeList: [],
-        startObj: {},
-        isGoing: false,
-        myTemp: {}
-      },
-      selectList: [], // 选中数据
-
-      // 班次
-      menuRadio: '一班',
-      MenuList: [], // 配单列表
-      listLoadingTimes: false,
-
-      // 栏舍统计
-      isLeftButton: true, // 向左
-      isRightButton: false, // 向右
-      rowStyle2: {
-        maxHeight: 20 + 'px',
-        height: 20 + 'px'
-      },
-      cellStyle2: {
-        padding: 0 + 'px'
-      },
-      headerRowStyle2: {
-        maxHeight: 20 + 'px',
-        height: 20 + 'px'
-      },
-      headerCellStyle2: {
-        padding: 0 + 'px'
-      },
-      smallMenu: {
-        getdataListParm: {
-          name: 'getLppUseSUMList',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid')
-          }
-        },
-        total: 0,
-        tableKey: 0,
-        listLoading: false,
-        list: []
-      },
-      // 自动生成
-      automaticGeneration: {
-        dialogFormVisible: false,
-        dialogStatus: ''
-      },
-      historyRecord: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        myComponent: null
-      },
-      textMap: {
-        automaticGeneration: '提示',
-        historyRecord: '历史记录'
-      },
-
-      isokDisable: false,
-      requestParam: {},
-      height: document.body.clientHeight - 350 - 50, // table高度
-      rowStyle: {
-        maxHeight: 50 + 'px',
-        height: 50 + 'px'
-      },
-      cellStyle: {
-        padding: 0 + 'px'
-      },
-      dropState: false,
-      isOrder: true,
-      fullscreenLoading: false,
-      getdataListParmAll: {
-        page: 1,
-        offset: 1,
-        pagecount: 0,
-        returntype: 'Map',
-        parammaps: {
-          pastureid: Cookies.get('pastureid'),
-          times: '1',
-          refresh: 0
-        }
-      }
-    }
-  },
-  doLayout() {
-    this.$nextTick(() => {
-      this.$refs.table.doLayout()
-    })
-  },
-  created() {
-    this.getButtons()
-    this.getIsDisplay()
-    this.getDownList()
-    this.table.list.forEach(val => {
-
-    })
-  },
-  methods: {
-    getButtons() {
-      const Edit = 'MaterialIssuancePlan'
-      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
-      this.isRoleEdit = isRoleEdit
-    },
-    clickBarracks(item) {
-      this.isBarracks = !this.isBarracks
-    },
-    // 下拉列表
-    getDownList() {
-      GetDataByName(this.requestParams).then(response => {
-        if (response.data !== null) {
-          this.TMRNumberList = response.data.list
-        } else {
-          this.TMRNumberList = []
-        }
-      })
-      GetDataByName(this.requestParams2).then(response => {
-        if (response.data !== null) {
-          this.equipmentList = response.data.list
-        } else {
-          this.equipmentList = []
-        }
-      })
-      GetDataByName(this.requestParams3).then(response => {
-        if (response.data !== null) {
-          this.templateFormulationList = response.data.list
-        } else {
-          this.templateFormulationList = []
-        }
-      })
-      GetDataByName(this.requestParams4).then(response => {
-        if (response.data !== null) {
-          if (response.data.list[0].inforvalue == 0) {
-            this.isInforvalue = false
-          } else {
-            this.isInforvalue = true
-          }
-        } else {
-          this.isInforvalue = false
-        }
-      })
-    },
-
-    // 显示班次
-    getIsDisplay() {
-      GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
-        console.log(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) {
-          this.frequencyList = [{
-            id: '1',
-            name: '第一班'
-          }, {
-            id: '2',
-            name: '第二班'
-          }]
-        } else if (response.data.list[0].inforvalue == 3) {
-          this.frequencyList = [{
-            id: '1',
-            name: '第一班'
-          }, {
-            id: '2',
-            name: '第二班'
-          }, {
-            id: '3',
-            name: '第三班'
-          }]
-        } else if (response.data.list[0].inforvalue == 4) {
-          this.frequencyList = [{
-            id: '1',
-            name: '第一班'
-          }, {
-            id: '2',
-            name: '第二班'
-          }, {
-            id: '3',
-            name: '第三班'
-          }, {
-            id: '4',
-            name: '第四班'
-          }]
-        }
-        if (response.data.list !== null) {
-          if (response.data.list[0].inforvalue == 1) {
-            this.maxTime.isTime1 = true
-            this.maxTime.isTime2 = false
-            this.maxTime.isTime3 = false
-            this.maxTime.isTime4 = false
-          } else if (response.data.list[0].inforvalue == 2) {
-            this.maxTime.isTime1 = true
-            this.maxTime.isTime2 = true
-            this.maxTime.isTime3 = false
-            this.maxTime.isTime4 = false
-          } else if (response.data.list[0].inforvalue == 3) {
-            this.maxTime.isTime1 = true
-            this.maxTime.isTime2 = true
-            this.maxTime.isTime3 = true
-            this.maxTime.isTime4 = false
-          } else if (response.data.list[0].inforvalue == 4) {
-            this.maxTime.isTime1 = true
-            this.maxTime.isTime2 = true
-            this.maxTime.isTime3 = true
-            this.maxTime.isTime4 = true
-          }
-        } else {
-          this.maxTime.isTime1 = false
-          this.maxTime.isTime2 = false
-          this.maxTime.isTime3 = false
-          this.maxTime.isTime4 = false
-        }
-      })
-      this.getSmallMenuList() // 栏舍统计
-      this.getdataListParmAll.parammaps.refresh = 0
-      this.getAllList() // 头部跟表格
-    },
-    getAllList() {
-      const url = 'authdata/spillage'
-      const data = this.getdataListParmAll
-      postJson(url, data).then(response => {
-        console.log(response)
-        if (response.data.ftlist !== undefined) {
-          if (response.data.ftlist !== null) {
-            for (let i = 0; i < response.data.ftlist.length; i++) {
-              this.$set(response.data.ftlist[i], 'isShowTitle', true)
-              if (response.data.ftlist[i].arrList == null) {
-                this.$set(response.data.ftlist[i], 'isShowTitle', false)
-              } else {
-                for (let j = 0; j < response.data.ftlist[i].arrList.length; j++) {
-                  this.$set(response.data.ftlist[i].arrList[j], 'background2', this.colorRgb(response.data.ftlist[
-                    i].arrList[j].background))
-                }
-              }
-            }
-            this.MenuList = response.data.ftlist
-          } else {
-            this.MenuList = []
-          }
-        }
-        if (response.data.list !== undefined) {
-          if (response.data.list !== null) {
-            console.log('table数据', response.data.list)
-            for (let i = 0; i < response.data.list.length; i++) {
-              this.$set(response.data.list[i], 'Edit', false) // 编辑
-              this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
-              this.$set(response.data.list[i], 'isCreate', false) // 新增操作
-              this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
-              this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
-              this.$set(response.data.list[i], 'Disabled', true) // 班次/模板配方不可输入
-              if (response.data.list[i].arrList == null) {
-                this.$set(response.data.list[i], 'Disabled', false)
-                this.$set(response.data.list[i], 'arrList', [])
-              } else {
-                for (let j = 0; j < response.data.list[i].arrList.length; j++) {
-                  this.$set(response.data.list[i].arrList[j], 'isWeight', false)
-                  this.$set(response.data.list[i].arrList[j], 'focusState', false)
-                }
-              }
-            }
-            // this.table.list = response.data.list
-            var arr = []
-            for (let a = 0; a < response.data.list.length; a++) {
-              if (a < 5) {
-                arr.push(response.data.list[a])
-              }
-              // response.data.list.splice(5, response.data.list.length - 1)
-            }
-            this.table.list = arr
-            this.table.list2 = response.data.list
-            console.log(this.table.list2, 'this.table.list2 ')
-            this.table.changeList = []
-            this.table.startObj = {}
-            this.table.total = response.data.list.length
-            setTimeout(() => {
-              this.$refs.table.doLayout()
-            }, 100)
-            this.getPageInter(this.table.list2)
-          } else {
-            this.table.list = []
-          }
-        }
-        // this.listLoadingTimes = false
-        // this.table.listLoading = false
-      })
-    },
-    loadMore() {
-      this.getPageInter(this.table.list2)
-    },
-    getPageInter(map) {
-      this.intertimer = setInterval(() => {
-        this.intervalData(map) // 每三秒调用一次方法
-      }, 1000)
-    },
-    intervalData(map) {
-      if (this.pagindex * 5 < this.table.total) {
-        this.pagindex += 1
-        const arr = []
-        for (let i = 0; i < map.length; i++) {
-          if (i < this.pagindex * 5) {
-            arr.push(map[i])
-          }
-        }
-        this.table.list = arr
-      } else {
-        clearInterval(this.intertimer)
-      }
-      console.log(123)
-    },
-    colorRgb(sColor) {
-      sColor = sColor.toLowerCase()
-      var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
-      // 如果是16进制颜色
-      if (sColor && reg.test(sColor)) {
-        if (sColor.length === 4) {
-          var sColorNew = '#'
-          for (var i = 1; i < 4; i += 1) {
-            sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
-          }
-          sColor = sColorNew
-        }
-        // 处理六位的颜色值
-        var sColorChange = []
-        for (var i = 1; i < 7; i += 2) {
-          sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
-        }
-        return sColorChange.join(',')
-      }
-      return 'rgba(' + sColorChange.join(',') + ')'
-    },
-    // 切换班次
-    changeMenu(val) {
-      console.log(val)
-      if (this.menuRadio === '一班') {
-        this.getdataListParmAll.parammaps.times = '1'
-        this.getdataListParmAll.parammaps.refresh = 2
-        this.pagindex = 1
-        this.getAllList()
-      } else if (this.menuRadio === '二班') {
-        this.getdataListParmAll.parammaps.times = '2'
-        this.getdataListParmAll.parammaps.refresh = 2
-        this.pagindex = 1
-        this.getAllList()
-        this.MenuList = this.twoMenuList
-      } else if (this.menuRadio === '三班') {
-        this.getdataListParmAll.parammaps.times = '3'
-        this.getdataListParmAll.parammaps.refresh = 2
-        this.getAllList()
-      } else if (this.menuRadio === '四班') {
-        this.getdataListParmAll.parammaps.times = '4'
-        this.getdataListParmAll.parammaps.refresh = 2
-        this.pagindex = 1
-        this.getAllList()
-      }
-    },
-    // 右侧栏舍统计
-    getSmallMenuList() {
-      this.smallMenu.listLoading = true
-      GetDataByName(this.smallMenu.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            if (response.data.list[i].onetime == undefined) {
-              this.$set(response.data.list[i], 'onetime', 0)
-            } else {
-              response.data.list[i].onetime = parseFloat(response.data.list[i].onetime)
-            }
-            if (response.data.list[i].twotime == undefined) {
-              this.$set(response.data.list[i], 'twotime', 0)
-            } else {
-              response.data.list[i].twotime = parseFloat(response.data.list[i].twotime)
-            }
-            if (response.data.list[i].threetime == undefined) {
-              this.$set(response.data.list[i], 'threetime', 0)
-            } else {
-              response.data.list[i].threetime = parseFloat(response.data.list[i].threetime)
-            }
-            if (response.data.list[i].fourtime == undefined) {
-              this.$set(response.data.list[i], 'fourtime', 0)
-            } else {
-              response.data.list[i].fourtime = parseFloat(response.data.list[i].fourtime)
-            }
-            this.$set(response.data.list[i], 'usedsum', response.data.list[i].onetime + response.data.list[i]
-              .twotime + response.data.list[i].threetime + response.data.list[i].fourtime)
-            this.$set(response.data.list[i], 'all', '')
-          }
-          this.smallMenu.list = response.data.list
-          this.smallMenu.total = response.data.total
-        } else {
-          this.smallMenu.list = []
-        }
-        console.log('smallMenu数据', response.data.list)
-
-        setTimeout(() => {
-          this.smallMenu.listLoading = false
-        }, 100)
-      })
-    },
-    handleChangeOrder() {
-      this.isOrder = false
-      this.rowDrop()
-    },
-    // 行拖拽
-    rowDrop() {
-      console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
-      const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
-      const that = this
-      var sortable = Sortable.create(tbody, {
-        disabled: that.dropState,
-        onChoose({
-          newIndex,
-          oldIndex
-        }) {
-          console.log(that.isOrder, 'that.isOrder == false')
-          console.log(that.dropState, 'that.dropState')
-          if (that.dropState == true || that.isOrder == true) {
-            sortable.destroy()
-          }
-        },
-        onEnd({
-          newIndex,
-          oldIndex
-        }) {
-          const currRow = that.table.list.splice(oldIndex, 1)[0]
-          that.table.list.splice(newIndex, 0, currRow)
-          console.log('索引', newIndex)
-          console.log('拖动数据', currRow)
-          console.log('上', that.table.list[newIndex - 1])
-          console.log('下', that.table.list[newIndex + 1])
-        }
-      })
-    },
-    saveChangeOrder() {
-      // 保存顺序
-      var sortArr = []
-      for (let i = 0; i < this.table.list.length; i++) {
-        var obj = {}
-        obj.sort = i + 1
-        obj.id = this.table.list[i].id
-        obj.pastureid = this.table.list[i].pastureid
-        sortArr.push(obj)
-      }
-      this.requestParam = {}
-      this.requestParam.common = {
-        'returnmap': '0'
-      }
-      this.requestParam.data = []
-      this.requestParam.data[0] = {
-        'name': 'insertSpotList',
-        'resultmaps': {
-          'list': sortArr
-        }
-      }
-      this.requestParam.data[0].children = []
-      this.requestParam.data[0].children[0] = {
-        'name': 'updateLppSort',
-        'type': 'e',
-        'parammaps': {
-          id: '@insertSpotList.id',
-          pastureid: '@insertSpotList.pastureid',
-          sort: '@insertSpotList.sort'
-        }
-      }
-      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.getdataListParmAll.parammaps.refresh = 1
-          this.pagindex = 1
-          this.getAllList()
-          this.isOrder = true
-        }
-      })
-    },
-    cancelChangeOrder() {
-      // 取消顺序
-      this.getdataListParmAll.parammaps.refresh = 1
-      this.pagindex = 1
-      this.getAllList()
-      this.isOrder = true
-    },
-    // TMR编号
-    changeTMRNumber(item, row) {
-      row.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
-      row.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
-    },
-    // 配方模板
-    changeTemplateFormulation(item, row) {
-      row.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
-    },
-    // 增加车次
-    handleCreate() {
-      for (let i = 0; i < this.table.list.length; i++) {
-        if (this.table.list2[i].Edit === true) {
-          this.$message({
-            type: 'error',
-            message: '当前内容未保存,请点击取消或保存继续进行操作',
-            duration: 2000
-          })
-          return false
-        }
-      }
-      if (this.table.list.length == 0) {
-        this.table.list.unshift({
-          'myId': (new Date()).valueOf(),
-          'Edit': true,
-          'NoEdit': false,
-          'isCreate': true,
-          'isUpdate': false,
-          'isUpdateSave': false,
-          'tmrname': '',
-          'tmrid': '',
-          'sort': 1,
-          'sel': 1,
-          'issplit': 1,
-          'times': '',
-          'display': '',
-          'begintime': '',
-          'ftname': '',
-          'ftid': '',
-          'sumweight': '',
-          'sumcowcount': '',
-          'maxweight': '',
-          'arrList': []
-        })
-      } else {
-        this.table.list.unshift({
-          'myId': (new Date()).valueOf(),
-          'Edit': true,
-          'NoEdit': false,
-          'isCreate': true,
-          'isUpdate': false,
-          'isUpdateSave': false,
-          'tmrname': '',
-          'tmrid': '',
-          'sort': parseInt(this.table.list2[this.table.list2.length - 1].sort) + 1,
-          'sel': 1,
-          'issplit': 1,
-          'times': '',
-          'display': '',
-          'begintime': '',
-          'ftname': '',
-          'ftid': '',
-          'sumweight': '',
-          'sumcowcount': '',
-          'maxweight': '',
-          'arrList': []
-        })
-      }
-      // this.$refs.box.scrollTop = 0
-      this.$refs.table.bodyWrapper.scrollTop = 0
-      this.dropState = true
-      console.log('点击了新增')
-    },
-    createData(row) {
-      console.log('点击了新增保存', row)
-      if (row.begintime == null || row.begintime == 'null') {
-        row.begintime = ''
-      }
-      this.table.temp.pastureid = Cookies.get('pastureid')
-      this.table.temp.tmrname = row.tmrname
-      this.table.temp.tmrid = row.tmrid
-      this.table.temp.sort = row.sort
-      this.table.temp.sel = row.sel
-      this.table.temp.issplit = row.issplit
-      this.table.temp.times = row.times
-      this.table.temp.display = row.display
-      this.table.temp.begintime = row.begintime
-      this.table.temp.ftname = row.ftname
-      this.table.temp.ftid = row.ftid
-      this.table.temp.sumweight = 0
-      this.table.temp.maxweight = row.maxweight
-
-      if (this.table.temp.sort == '' && this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp
-        .ftid == '') {
-        this.$message({
-          type: 'error',
-          message: '车次/TMR编号/班次/模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp.ftid == '') {
-        this.$message({
-          type: 'error',
-          message: 'TMR编号/班次/模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.times == '' && this.table.temp.ftid == '') {
-        this.$message({
-          type: 'error',
-          message: '班次/模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.ftid == '') {
-        this.$message({
-          type: 'error',
-          message: '模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.times == '') {
-        this.$message({
-          type: 'error',
-          message: '班次不能为空',
-          duration: 2000
-        })
-        return false
-      }
-      for (let i = 0; i < this.table.list2.length; i++) {
-        if (row.sort == this.table.list2[i].sort) {
-          if (row.myId !== this.table.list2[i].myId) {
-            this.$message({
-              type: 'error',
-              message: '车次不可重复',
-              duration: 2000
-            })
-            return false
-          }
-        }
-      }
-      var isInteger = /^\d+$/
-      if (this.table.temp.sort !== '') {
-        if (!isInteger.test(parseFloat(this.table.temp.sort))) {
-          this.$message({
-            type: 'error',
-            message: '车次请输入整数',
-            duration: 2000
-          })
-          return false
-        }
-      }
-
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.requestParam = {}
-      this.requestParam.name = 'insertLpp'
-      this.requestParam.parammaps = this.table.temp
-      PostDataByName(this.requestParam).then(response => {
-        console.log('新增保存发送参数', this.requestParam)
-        if (response.msg !== 'fail') {
-          this.$notify({
-            title: '成功',
-            message: '保存成功',
-            type: 'success',
-            duration: 2000
-          })
-          this.getdataListParmAll.parammaps.refresh = 1
-          this.pagindex = 1
-          this.getAllList()
-          this.dropState = false
-        } else {
-          this.$notify({
-            title: '保存失败',
-            message: response.data,
-            type: 'warning',
-            duration: 2000
-          })
-        }
-      })
-    },
-    createCancel(row) {
-      this.dropState = false
-      for (let i = 0; i < this.table.list.length; i++) {
-        if (row.myId === this.table.list[i].myId) {
-          var listIndex = this.table.list.indexOf(this.table.list[i])
-        }
-        if (listIndex > -1) {
-          this.table.list.splice(listIndex, 1)
-          this.table.list2.splice(listIndex, 1)
-          return
-        }
-      }
-      // for (let i = 0; i < this.table.list2.length; i++) {
-      //   if (row.myId === this.table.list2[i].myId) {
-      //     var listIndex2 = this.table.list2.indexOf(this.table.list2[i])
-      //   }
-      //   if (listIndex2 > -1) {
-      //     this.table.list2.splice(listIndex2, 1)
-      //     return
-      //   }
-      // }
-      console.log('点击了新增取消')
-    },
-
-    // 编辑
-    handleUpdate(row) {
-      console.log(row, '点击了行编辑')
-      for (let i = 0; i < this.table.list.length; i++) {
-        if (this.table.list[i].Edit == true) {
-          this.$message({
-            type: 'error',
-            message: '当前内容未保存,请点击取消或保存继续进行操作',
-            duration: 2000
-          })
-          return false
-        }
-      }
-      // 编辑true,不可编辑false
-      row.Edit = true
-      row.NoEdit = false
-      // 新增false,编辑false,编辑保存true
-      row.isCreate = false
-      row.isUpdate = false
-      row.isUpdateSave = true
-      row.times = String(row.times)
-      if (row.sort == undefined) {
-        row.sort = ''
-      }
-      if (row.tmrid == undefined || row.tmrname == undefined) {
-        row.tmrid = ''
-        row.tmrname = ''
-      }
-      if (row.display == undefined) {
-        row.display = ''
-      }
-      if (row.times == undefined) {
-        row.times = ''
-      }
-      if (row.begintime == undefined) {
-        row.begintime = ''
-      }
-      if (row.ftid == undefined || row.ftname == undefined) {
-        row.ftid = ''
-        row.ftname = ''
-      }
-      this.dropState = true
-      this.table.myTemp = Object.assign({}, row)
-    },
-    updateData(row) {
-      console.log('点击了编辑保存', row)
-      this.table.myTemp = Object.assign({}, row)
-      if (row.begintime == null || row.begintime == 'null') {
-        row.begintime = ''
-      }
-      this.table.temp.pastureid = row.pastureid
-      this.table.temp.id = row.id
-      this.table.temp.tmrname = row.tmrname
-      this.table.temp.tmrid = row.tmrid
-      this.table.temp.sort = row.sort
-      this.table.temp.sel = row.sel
-      this.table.temp.issplit = row.issplit
-      this.table.temp.times = row.times
-      this.table.temp.display = row.display
-      this.table.temp.begintime = row.begintime
-      this.table.temp.ftname = row.ftname
-      this.table.temp.ftid = row.ftid
-      this.table.temp.sumweight = row.sumweight
-      this.table.temp.sumcowcount = row.sumcowcount
-      this.table.temp.maxweight = row.maxweight
-      if (this.table.temp.sort == '' && this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp
-        .ftid == '') {
-        this.$message({
-          type: 'error',
-          message: '车次/TMR编号/班次/模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp.ftid == '') {
-        this.$message({
-          type: 'error',
-          message: 'TMR编号/班次/模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.times == '' && this.table.temp.ftid == '') {
-        this.$message({
-          type: 'error',
-          message: '班次/模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      } else if (this.table.temp.ftid == '') {
-        this.$message({
-          type: 'error',
-          message: '模板配方不能为空',
-          duration: 2000
-        })
-        return false
-      }
-      for (let i = 0; i < this.table.list.length; i++) {
-        if (row.sort == this.table.list[i].sort) {
-          if (row.id !== this.table.list[i].id) {
-            this.$message({
-              type: 'error',
-              message: '车次不可重复',
-              duration: 2000
-            })
-            return false
-          }
-        }
-      }
-      var isInteger = /^\d+$/
-      if (this.table.temp.sort !== '') {
-        if (!isInteger.test(parseFloat(this.table.temp.sort))) {
-          this.$message({
-            type: 'error',
-            message: '车次请输入整数',
-            duration: 2000
-          })
-          return false
-        }
-      }
-
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.requestParam = {}
-      this.requestParam.name = 'updateLpp'
-      this.requestParam.parammaps = this.table.temp
-      PostDataByName(this.requestParam).then(response => {
-        console.log('编辑保存发送参数', this.requestParam)
-        if (response.msg !== 'fail') {
-          this.$notify({
-            title: '成功',
-            message: '保存成功',
-            type: 'success',
-            duration: 2000
-          })
-          this.getdataListParmAll.parammaps.refresh = 1
-          this.pagindex = 1
-          this.getAllList()
-          this.table.myTemp.isUpdateSave = false
-          this.dropState = false
-        } else {
-          this.$notify({
-            title: '保存失败',
-            message: response.data,
-            type: 'warning',
-            duration: 2000
-          })
-        }
-      })
-    },
-    updateCancel(row) {
-      console.log('点击了编辑取消')
-      // 编辑false,不可编辑true
-      row.Edit = false
-      row.NoEdit = true
-      // 新增false,编辑true,编辑保存false
-      row.isCreate = false
-      row.isUpdate = true
-      row.isUpdateSave = false
-      this.dropState = false
-      this.getdataListParmAll.parammaps.refresh = 1
-      this.pagindex = 1
-      this.getAllList()
-      this.table.myTemp = Object.assign({}, row)
-    },
-
-    // 自动生成
-    handleAutomaticGeneration() {
-      this.dialogFull = false
-      this.automaticGeneration.dialogStatus = 'automaticGeneration'
-      this.automaticGeneration.dialogFormVisible = true
-    },
-    continueData(item) {
-      if (item == 0) {
-        console.log('点击继续生成')
-        this.requestParam = {}
-        this.requestParam.pastureid = Cookies.get('pastureid')
-        this.requestParam.type = 0
-        Autogeneration(this.requestParam).then(response => {
-          console.log('新增保存发送参数', this.requestParam)
-          if (response.msg !== 'fail') {
-            this.$notify({
-              title: '成功',
-              message: '保存成功',
-              type: 'success',
-              duration: 2000
-            })
-            this.automaticGeneration.dialogFormVisible = false
-            this.getIsDisplay()
-            this.getDownList()
-          } else {
-            this.$notify({
-              title: '保存失败',
-              message: response.data,
-              type: 'warning',
-              duration: 2000
-            })
-          }
-        })
-      } else {
-        console.log('点击重新生成')
-        MessageBox.confirm('重新生成计划会将原有计划清空再生成,是否确认重新生成?', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.automaticGeneration.dialogFormVisible = false
-          // const loading = this.$loading({
-          //   lock: true,
-          //   text: 'Loading',
-          //   spinner: 'el-icon-loading'
-          // })
-          this.fullscreenLoading = true
-          this.requestParam = {}
-          this.requestParam.pastureid = Cookies.get('pastureid')
-          this.requestParam.type = 1
-          Autogeneration(this.requestParam).then(response => {
-            console.log('新增保存发送参数', this.requestParam)
-            if (response.msg !== 'fail') {
-              // loading.close()
-              this.fullscreenLoading = false
-              this.$notify({
-                title: '成功',
-                message: '保存成功',
-                type: 'success',
-                duration: 2000
-              })
-              this.automaticGeneration.dialogFormVisible = false
-              this.getIsDisplay()
-              this.getDownList()
-            } else {
-              this.fullscreenLoading = false
-              // loading.close()
-              this.$notify({
-                title: '保存失败',
-                message: response.data,
-                type: 'warning',
-                duration: 2000
-              })
-            }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消重新生成'
-          })
-        })
-      }
-    },
-    // 检验
-    // handleCheck() {
-    //   console.log('点击检验')
-    // },
-    // 历史记录
-    handleHistoryRecord() {
-      console.log('点击历史记录')
-      this.dialogFull = false
-      this.historyRecord.dialogStatus = 'historyRecord'
-      this.historyRecord.dialogFormVisible = true
-      const vue = this
-      var myComponent = () => import('./historyRecord.vue')
-      return vue.historyRecord.myComponent = myComponent
-    },
-
-    // 配方
-    changeLog: function(evt) {
-      console.log('change1', evt)
-    },
-    start(evt) {
-      console.log('start1===>', evt)
-      this.$set(this.table.startObj, 'from', evt.from.className)
-      this.$set(this.table.startObj, 'to', evt.from.className)
-    },
-    end(evt) {
-      console.log('end1===>', evt)
-    },
-    move(evt, originalEvent) {
-      console.log('move1===>', evt, originalEvent)
-      if (originalEvent.target.className === 'list-group-item1 item' || originalEvent.target.className ===
-          'draggableWeight') {
-        return false
-      }
-      if (evt.from._prevClass == evt.to._prevClass) {
-        return false
-      }
-      this.table.move1 = evt.draggedContext.element
-    },
-
-    start2(evt) {
-      console.log('start2===>', evt)
-      this.$set(this.table.startObj, 'from', evt.from.className)
-      this.$set(this.table.startObj, 'to', evt.from.className)
-    },
-    move2(evt, originalEvent) {
-      console.log('move2===>', evt, originalEvent)
-      if (originalEvent.target.className === 'list-group-item1 item' || originalEvent.target.className ===
-          'draggableWeight') {
-        return false
-      }
-      this.table.move1 = evt.draggedContext.element
-    },
-    end2(evt) {
-      // console.log(evt)
-      console.log('end2===》', evt)
-    },
-    // 撒料位
-    changeLog2(evt) {
-      // console.log(this.table.startObj)
-      console.log('changeLog2===>', evt)
-      // var _evt = [...evt]
-      this.table.changeList.push(evt)
-      evt = this.table.changeList[0]
-      if (evt.arrList.length == 1) {
-        evt.arrList[0].sort = 0
-      } else if (evt.arrList.length > 1) {
-        for (let i = 0; i < evt.arrList.length; i++) {
-          if (evt.arrList[i].id == this.table.move1.id && evt.arrList[i].fttype == this.table.move1.fttype) {
-            if (evt.arrList[i - 1] == undefined) {
-              evt.arrList[i].sort = 0
-              evt.sort = 0
-            } else {
-              evt.arrList[i].sort = parseFloat(evt.arrList[i - 1].sort) + 1
-              evt.sort = parseFloat(evt.arrList[i - 1].sort) + 1
-            }
-          }
-        }
-      }
-      console.log(evt.arrList, '==========1')
-      console.log(evt, '==========2')
-      console.log(this.table.move1.times, 'this.table.move1.times-------')
-      if (this.table.startObj.from == 'list-group1' && this.table.startObj.to == 'list-group1') {
-        if (parseFloat(evt.maxweight) - parseFloat(evt.sumweight) < parseFloat(this.table.move1.weight)) {
-          this.$set(this.table.move1, 'weight', parseFloat(evt.maxweight) - parseFloat(evt.sumweight))
-        }
-        console.log('this.table.move1.weight===>', this.table.move1.weight)
-        this.requestParam = {}
-        this.requestParam.common = {
-          'returnmap': '0'
-        }
-        this.requestParam.data = []
-        this.requestParam.data[0] = {
-          'name': 'checkLLPDetailInsert',
-          'type': 'v',
-          'parammaps': {
-            pastureid: this.table.move1.pastureid,
-            barid: this.table.move1.barid,
-            lppid: evt.id,
-            times: evt.times,
-            ftid: this.table.move1.ftid,
-            ptsid: this.table.move1.ptsid,
-            ptid: this.table.move1.ptid,
-            fttype: this.table.move1.fttype,
-            timesTem: this.table.move1.times
-          }
-        }
-        this.requestParam.data[1] = {
-          'name': 'updateLpplandtlSorts',
-          'type': 'e',
-          'parammaps': {
-            pastureid: evt.pastureid,
-            sort: evt.sort,
-            lppid: evt.id
-          }
-        }
-        this.requestParam.data[2] = {
-          'name': 'insertLppd',
-          'type': 'e',
-          'parammaps': {
-            pastureid: evt.pastureid,
-            lppid: evt.id,
-            barid: this.table.move1.barid,
-            barname: this.table.move1.barname,
-            fpdid: this.table.move1.id,
-            fttype: this.table.move1.fttype,
-            lweight: this.table.move1.weight,
-            sort: evt.sort,
-            tmrid: evt.tmrid,
-            tmrname: evt.tmrname,
-            background: this.table.move1.background,
-            ccountradio: this.table.move1.ccountradio,
-            cowcount: this.table.move1.cowcount
-          }
-        }
-        this.requestParam.data[3] = {
-          'name': 'updateFpdetailUse',
-          'type': 'e',
-          'parammaps': {
-            pastureid: this.table.move1.pastureid,
-            id: this.table.move1.id,
-            fttype: this.table.move1.fttype,
-            lweight: this.table.move1.weight
-          }
-        }
-
-        console.log('撒料位上-下新增', this.requestParam)
-        ExecDataByConfig(this.requestParam).then(response => {
-          console.log('撒料位新增保存发送参数', this.requestParam)
-          if (response.msg === 'fail') {
-            this.$notify({
-              title: '保存失败',
-              message: response.data,
-              type: 'warning',
-              duration: 2000
-            })
-            this.getSmallMenuList()
-            this.getdataListParmAll.parammaps.refresh = 0
-            this.pagindex = 1
-            this.getAllList()
-          } else {
-            this.$notify({
-              title: '',
-              message: '保存成功',
-              type: 'success',
-              duration: 2000
-            })
-            this.getIsDisplay()
-            this.getSmallMenuList()
-            this.getdataListParmAll.parammaps.refresh = 0
-            this.pagindex = 1
-            this.getAllList()
-          }
-        })
-      } else if (this.table.startObj.from == 'list-group2' && this.table.startObj.to == 'list-group2') {
-        if (this.table.changeList.length == 1) {
-          this.requestParam = {}
-          this.requestParam.common = {
-            'returnmap': '0'
-          }
-          this.requestParam.data = []
-          this.requestParam.data[0] = {
-            'name': 'checkLLPDetailInsert',
-            'type': 'v',
-            'parammaps': {
-              pastureid: this.table.move1.pastureid,
-              barid: this.table.move1.barid,
-              lppid: evt.id,
-              times: evt.times,
-              ftid: this.table.move1.ftid,
-              ptsid: this.table.move1.ptsid,
-              ptid: this.table.move1.ptid,
-              fttype: this.table.move1.fttype,
-              timesTem: this.table.move1.times
-            }
-          }
-          this.requestParam.data[1] = {
-            'name': 'updateLpplandtlSorts',
-            'type': 'e',
-            'parammaps': {
-              pastureid: evt.pastureid,
-              sort: evt.sort,
-              lppid: evt.id
-            }
-          }
-          this.requestParam.data[2] = {
-            'name': 'deleteLppd',
-            'type': 'e',
-            'parammaps': {
-              pastureid: evt.pastureid,
-              id: this.table.move1.id
-            }
-          }
-          this.requestParam.data[3] = {
-            'name': 'insertLppd',
-            'type': 'e',
-            'parammaps': {
-              pastureid: evt.pastureid,
-              lppid: evt.id,
-              barid: this.table.move1.barid,
-              barname: this.table.move1.barname,
-              fpdid: this.table.move1.fpdid,
-              fttype: this.table.move1.fttype,
-              lweight: this.table.move1.weight,
-              sort: evt.sort,
-              tmrid: evt.tmrid,
-              tmrname: evt.tmrname,
-              background: this.table.move1.background,
-              ccountradio: this.table.move1.ccountradio,
-              cowcount: this.table.move1.cowcount
-            }
-          }
-          console.log('撒料位下-下新增', this.requestParam)
-          ExecDataByConfig(this.requestParam).then(response => {
-            console.log('撒料位新增保存发送参数', this.requestParam)
-            if (response.msg === 'fail') {
-              this.$notify({
-                title: '保存失败',
-                message: response.data,
-                type: 'warning',
-                duration: 2000
-              })
-              this.getSmallMenuList()
-              this.getdataListParmAll.parammaps.refresh = 0
-              this.pagindex = 1
-              this.getAllList()
-            } else {
-              this.$notify({
-                title: '',
-                message: '保存成功',
-                type: 'success',
-                duration: 2000
-              })
-              this.getSmallMenuList()
-              this.getdataListParmAll.parammaps.refresh = 0
-              this.pagindex = 1
-              this.getAllList()
-              this.getIsDisplay()
-            }
-          })
-        } else if (this.table.changeList.length == 1) {
-          if (this.table.isGoing == true) {
-            console.log(11111)
-            this.requestParam.common = {
-              'returnmap': '0'
-            }
-            this.requestParam.data = []
-            this.requestParam.data[0] = {
-              'name': 'checkLLPDetailInsert',
-              'type': 'e',
-              'parammaps': {
-                pastureid: evt.pastureid,
-                sort: evt.sort,
-                lppid: evt.id
-              }
-            }
-            this.requestParam.data[1] = {
-              'name': 'deleteLppd',
-              'type': 'e',
-              'parammaps': {
-                pastureid: evt.pastureid,
-                id: this.table.move1.id
-              }
-            }
-            this.requestParam.data[2] = {
-              'name': 'insertLppd',
-              'type': 'e',
-              'parammaps': {
-                pastureid: evt.pastureid,
-                lppid: evt.id,
-                barid: this.table.move1.barid,
-                barname: this.table.move1.barname,
-                fpdid: this.table.move1.id,
-                fttype: this.table.move1.fttype,
-                lweight: this.table.move1.weight,
-                sort: evt.sort,
-                tmrid: evt.tmrid,
-                tmrname: evt.tmrname,
-                background: this.table.move1.background
-              }
-            }
-            this.requestParam.data[3] = {
-              'name': 'updateFpdetailUse',
-              'type': 'e',
-              'parammaps': {
-                pastureid: this.table.move1.pastureid,
-                id: this.table.move1.id,
-                fttype: this.table.move1.fttype,
-                statue: 1
-              }
-            }
-
-            console.log('撒料位新增', this.requestParam)
-            ExecDataByConfig(this.requestParam).then(response => {
-              console.log('撒料位新增保存发送参数', this.requestParam)
-              if (response.msg === 'fail') {
-                this.$notify({
-                  title: '保存失败',
-                  message: response.data,
-                  type: 'warning',
-                  duration: 2000
-                })
-                this.getdataListParmAll.parammaps.refresh = 0
-                this.pagindex = 1
-                this.getAllList()
-              } else {
-                this.$notify({
-                  title: '',
-                  message: '保存成功',
-                  type: 'success',
-                  duration: 2000
-                })
-                this.getSmallMenuList()
-                this.getdataListParmAll.parammaps.refresh = 0
-                this.pagindex = 1
-                this.getAllList()
-                this.getIsDisplay()
-              }
-            })
-            this.table.isGoing = false
-          } else {
-            this.table.isGoing = true
-          }
-        }
-      }
-    },
-    // 编辑-撒料设备
-    changeEquipment(item, row, fttype, myid) {
-      var objList = {}
-      for (let i = 0; i < row.arrList.length; i++) {
-        row.arrList[i].tmrname = this.equipmentList.find(obj => obj.id === item).tname
-        if (row.arrList[i].fttype == fttype && row.arrList[i].id == myid) {
-          objList = row.arrList[i]
-        }
-        console.log(item, 'item')
-        console.log(row, 'row')
-        // if (row.tmrid == row.arrList[i].tmrid) {
-        //   if (row.tmrid !== item) {
-        //     this.$message({ type: 'warning', message: '混料设备不可与其它撒料设备同时选择1', duration: 2000 })
-        // this.getdataListParmAll.parammaps.refresh = 1
-        // this.getAllList()
-        //     return false
-        //   }
-        // } else {
-        //   if (row.tmrid == item) {
-        //     this.$message({ type: 'warning', message: '混料设备不可与其它撒料设备同时选择2', duration: 2000 })
-        // this.getdataListParmAll.parammaps.refresh = 1
-        // this.getAllList()
-        //     return false
-        //   }
-        // }
-      }
-      console.log(row)
-      this.requestParam = {}
-      this.requestParam.common = {
-        'returnmap': '0'
-      }
-      this.requestParam.data = []
-      this.requestParam.data[0] = {
-        'name': 'updateLppd',
-        'type': 'e',
-        'parammaps': {
-          pastureid: row.pastureid,
-          lppid: row.id,
-          barid: objList.barid,
-          barname: objList.barname,
-          fpdid: objList.fpdid,
-          fttype: objList.fttype,
-          lweight: objList.weight,
-          sort: objList.sort,
-          tmrid: objList.tmrid,
-          tmrname: objList.tmrname,
-          background: objList.background,
-          id: objList.id
-        }
-      }
-      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.getdataListParmAll.parammaps.refresh = 0
-          this.pagindex = 1
-          this.getAllList()
-        }
-      })
-    },
-    dbclickWeight(row) {
-      if (this.table.myTemp.isUpdateSave == true) {
-        return false
-      }
-      console.log(row, this.isRoleEdit, '=====')
-      row.isWeight = true
-      row.focusState = true
-      this.dropState = true
-      this.myStart2 = false
-      this.myMove2 = false
-      this.myEnd2 = false
-    },
-
-    // 编辑-重量
-    blurWeight(row, fttype, myid) {
-      var objList = {}
-      for (let i = 0; i < row.arrList.length; i++) {
-        if (row.arrList[i].fttype == fttype && row.arrList[i].id == myid) {
-          objList = row.arrList[i]
-        }
-      }
-      if (objList.weight !== '') {
-        if (parseFloat(objList.weight) <= 0) {
-          this.$message({
-            type: 'error',
-            message: '重量不可输入小于0的数据',
-            duration: 2000
-          })
-          return false
-        }
-      }
-      if (objList.weight == '') {
-        objList.weight = 0
-      }
-      this.requestParam = {}
-      this.requestParam.common = {
-        'returnmap': '0'
-      }
-      this.requestParam.data = []
-      this.requestParam.data[0] = {
-        'name': 'checkFPdLeftW',
-        'type': 'v',
-        'parammaps': {
-          pastureid: objList.pastureid,
-          fpdid: objList.fpdid,
-          fttype: objList.fttype,
-          lweight: String(parseFloat(objList.weight) - parseFloat(objList.lweight))
-        }
-      }
-      this.requestParam.data[1] = {
-        'name': 'updateLppd',
-        'type': 'e',
-        'parammaps': {
-          pastureid: row.pastureid,
-          lppid: row.id,
-          barid: objList.barid,
-          barname: objList.barname,
-          fpdid: objList.fpdid,
-          fttype: objList.fttype,
-          lweight: objList.weight,
-          sort: objList.sort,
-          tmrid: objList.tmrid,
-          tmrname: objList.tmrname,
-          background: objList.background,
-          id: objList.id
-        }
-      }
-      this.requestParam.data[2] = {
-        'name': 'updateFpdetailUse',
-        'type': 'e',
-        'parammaps': {
-          pastureid: objList.pastureid,
-          id: objList.fpdid,
-          fttype: objList.fttype,
-          lweight: String(parseFloat(objList.weight) - parseFloat(objList.lweight))
-        }
-      }
-
-      ExecDataByConfig(this.requestParam).then(response => {
-        console.log('编辑保存发送参数', this.requestParam)
-        if (response.msg === 'fail') {
-          this.$notify({
-            title: '保存失败',
-            message: response.data,
-            type: 'warning',
-            duration: 2000
-          })
-          this.getdataListParmAll.parammaps.refresh = 0
-          this.pagindex = 1
-          this.getAllList()
-        } else {
-          this.$notify({
-            title: '',
-            message: '保存成功',
-            type: 'success',
-            duration: 2000
-          })
-          this.getdataListParmAll.parammaps.refresh = 0
-          this.pagindex = 1
-          this.getAllList()
-          this.isWeight = false
-        }
-      })
-    },
-    handleTakeEffectChange() {
-      console.log('点击了生效')
-    },
-    handleIssplitChange() {
-      console.log('是否提前小料拆分')
-    },
-
-    // 撒料位删除
-    handleFLDelete(ele, row) {
-      if (this.table.myTemp.isUpdateSave == true) {
-        return false
-      }
-      console.log(ele, row, '点击了撒料删除')
-      this.selectList = []
-      this.requestParam = {}
-      this.requestParam.common = {
-        'returnmap': '0'
-      }
-      this.requestParam.data = []
-      this.requestParam.data[0] = {
-        'name': 'deleteLppd',
-        'type': 'e',
-        'parammaps': {
-          pastureid: ele.pastureid,
-          id: ele.id
-        }
-      }
-      this.requestParam.data[1] = {
-        'name': 'updateFpdetailUse',
-        'type': 'e',
-        'parammaps': {
-          pastureid: ele.pastureid,
-          id: ele.fpdid,
-          fttype: ele.fttype,
-          lweight: '-' + parseFloat(ele.weight)
-        }
-      }
-      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.reload()
-          // this.getdataListParmAll.parammaps.refresh = 0
-          // this.pagindex = 1
-          // this.getAllList()
-          // this.getSmallMenuList()
-        }
-      })
-    },
-
-    handleSelect(val) {
-      console.log('勾选数据', val)
-      this.selectList = val
-    },
-    // 减少车次
-    handleReduceTrains() {
-      if (this.selectList.length == 0) {
-        this.$message({
-          type: 'error',
-          message: '请选择车次',
-          duration: 2000
-        })
-        return false
-      } else {
-        // 减少对应车次
-        for (let i = 0; i < this.selectList.length; i++) {
-          if (this.selectList[i].arrList.length > 0) {
-            this.$message({
-              type: 'error',
-              message: '本车次已添加栏舍不可删除',
-              duration: 2000
-            })
-            return false
-          }
-        }
-        MessageBox.confirm('是否确认删除此信息?', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          console.log(this.selectList)
-          this.requestParam = {}
-          this.requestParam.common = {
-            'returnmap': '0'
-          }
-          this.requestParam.data = []
-          this.requestParam.data[0] = {
-            'name': 'insertSpotList',
-            'resultmaps': {
-              'list': this.selectList
-            }
-          }
-          this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = {
-            'name': 'deleteLpp',
-            'type': 'e',
-            'parammaps': {
-              id: '@insertSpotList.id',
-              pastureid: '@insertSpotList.pastureid'
-            }
-          }
-          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.getdataListParmAll.parammaps.refresh = 1
-              this.pagindex = 1
-              this.getAllList()
-            }
-          })
-        })
-      }
-    },
-
-    // 行内删除
-    handleRowDelete(row) {
-      console.log(row, '点击了行删除')
-      if (row.arrList.length == 0) {
-        MessageBox.confirm('是否确认删除此信息?', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.selectList = []
-          this.requestParam = {}
-          this.requestParam.name = 'deleteLpp'
-          this.requestParam.parammaps = {}
-          this.requestParam.parammaps.pastureid = row.pastureid
-          this.requestParam.parammaps.id = row.id
-          PostDataByName(this.requestParam).then(response => {
-            if (response.msg === 'fail') {
-              this.$notify({
-                title: '删除失败',
-                message: response.data,
-                type: 'warning',
-                duration: 2000
-              })
-            } else {
-              this.$notify({
-                title: '成功',
-                message: '删除成功',
-                type: 'success',
-                duration: 2000
-              })
-              this.getdataListParmAll.parammaps.refresh = 1
-              this.pagindex = 1
-              this.getAllList()
-            }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消删除'
-          })
-        })
-      } else {
-        this.$message({
-          type: 'error',
-          message: '本车次已添加栏舍不可删除',
-          duration: 2000
-        })
-        return false
-      }
-    },
-    handleLeftButton() { // 向左
-      console.log('向左', this.isLeftButton)
-      this.isLeftButton = false
-      this.isRightButton = true
-      this.$refs.listR.style.width = '46%'
-      this.$refs.listR.style.zIndex = 4
-      // this.$refs.listRight.style.zIndex = 4
-      // this.$refs.listRight2.style.zIndex = 4
-      this.getSmallMenuList()
-    },
-    handleRightButton() { // 向右
-      console.log('向右', this.isLeftButton)
-      this.isLeftButton = true
-      this.isRightButton = false
-      this.$refs.list.style.zIndex = 1
-      this.$refs.listR.style.width = '50px'
-      this.$refs.listR.style.zIndex = 1
-      this.$nextTick(() => {
-        this.$refs.listRight.style.zIndex = 1
-        this.$refs.listRight2.style.zIndex = 1
-      })
-    },
-    handleTakeEffect() {
-      if (this.selectList.length == 0) {
-        this.$message({
-          type: 'error',
-          message: '请选择车次信息',
-          duration: 2000
-        })
-      } else {
-        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          for (let i = 0; i < this.selectList.length; i++) {
-            // this.$set(this.selectList[i], 'enable', '1')
-            this.selectList[i].sel = 1
-          }
-          console.log('生效', this.selectList)
-          this.requestParam.common = {
-            'returnmap': '0'
-          }
-          this.requestParam.data = []
-          this.requestParam.data[0] = {
-            'name': 'insertSpotList',
-            'resultmaps': {
-              'list': this.selectList
-            }
-          }
-          this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = {
-            'name': 'updatelpplanEnable',
-            'type': 'e',
-            'parammaps': {
-              sel: '@insertSpotList.sel',
-              id: '@insertSpotList.id',
-              pastureid: '@insertSpotList.pastureid'
-            }
-          }
-          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.getdataListParmAll.parammaps.refresh = 1
-              this.pagindex = 1
-              this.getAllList()
-            }
-          })
-        })
-      }
-    },
-    handleDisable() {
-      if (this.selectList.length == 0) {
-        this.$message({
-          type: 'error',
-          message: '请选择车次信息',
-          duration: 2000
-        })
-      } else {
-        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          for (let i = 0; i < this.selectList.length; i++) {
-            // this.$set(this.selectList[i], 'enable', '1')
-            this.selectList[i].sel = 0
-          }
-          console.log('禁用', this.selectList)
-          this.requestParam.common = {
-            'returnmap': '0'
-          }
-          this.requestParam.data = []
-          this.requestParam.data[0] = {
-            'name': 'insertSpotList',
-            'resultmaps': {
-              'list': this.selectList
-            }
-          }
-          this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = {
-            'name': 'updatelpplanEnable',
-            'type': 'e',
-            'parammaps': {
-              sel: '@insertSpotList.sel',
-              id: '@insertSpotList.id',
-              pastureid: '@insertSpotList.pastureid'
-            }
-          }
-          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.getdataListParmAll.parammaps.refresh = 1
-              this.pagindex = 1
-              this.getAllList()
-            }
-          })
-        })
-      }
-    }
-
-  }
-}
-</script>
-<style lang="scss" scoped>
-  /deep/ .el-radio-button__orig-radio:checked+.el-radio-button__inner {
-    color: #fff;
-    background-color: #009C69;
-    border-color: #009C69;
-    -webkit-box-shadow: -1px 0 0 0 #009C69;
-    box-shadow: -1px 0 0 0 #009C69;
-  }
-
-  .not-select {
-    -moz-user-select: none;
-    /*火狐*/
-    -webkit-user-select: none;
-    /*webkit浏览器*/
-    -ms-user-select: none;
-    /*IE10*/
-    -khtml-user-select: none;
-    /*早期浏览器*/
-    user-select: none;
-    position: relative;
-  }
-</style>
-
-<style lang="scss">
-  /deep/ :focus {
-    outline: 0;
-  }
-
-  :focus-visible {
-    outline: 0 !important;
-  }
-
-  // 下拉框
-  .filter-item2 .el-input--suffix .el-input__inner {
-    height: 30px !important;
-    font-size: 8px;
-    padding: 0 2px;
-  }
-
-  .filter-item2 .el-input--suffix .el-input__suffix .el-input__suffix-inner .el-input__icon {
-    line-height: 30px !important;
-  }
-
-  // 输入框
-  .filter-item2 .el-input__inner {
-    height: 30px !important;
-    font-size: 8px;
-    padding: 0 2px;
-  }
-</style>
-
-<style lang="scss">
-  // /deep/ .el-table__body .el-table__row{
-  //   max-height:50px!important;
-  //   height: 50px!important;
-  // }
-  .menuList {
-    height: 190px;
-    background: red;
-    border-bottom: 2px solid #d8dce5;
-    box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
-
-    .menuList-t {
-      height: 60px;
-      background: #fff;
-      display: flex;
-      justify: center;
-      align-items: center;
-      display: -webkit-flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-      justify-content: space-between;
-
-      .menuList-t-l {}
-
-      .menuList-t-r {
-        display: flex;
-        flex-direction: row;
-        flex-wrap: wrap;
-        justify-content: space-between;
-        position: relative;
-
-        .menuList-t-r-l {
-          margin-right: 10px;
-          cursor: pointer;
-          width: 150px;
-          height: 20px;
-          line-height: 20px;
-          text-align: center;
-          background: rgba(25, 138, 244, 0);
-          border: 1px solid #1BBD89;
-          border-radius: 2px;
-          font-size: 12px;
-          color: #1BBD89;
-        }
-
-        .menuList-t-r-r {
-          margin-right: 10px;
-          cursor: pointer;
-          width: 150px;
-          height: 20px;
-          line-height: 20px;
-          text-align: center;
-          background: rgba(25, 138, 244, 0);
-          border: 1px solid #1BBD89;
-          border-radius: 2px;
-          font-size: 12px;
-          color: #1BBD89;
-        }
-
-        .columnHouse {
-          width: 650px;
-          background: #fff;
-          box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.04), 0 0 6px 6px rgba(0, 0, 0, 0.04);
-          position: absolute;
-          right: 0;
-          top: 25px;
-          z-index: 5;
-
-          .el-table {
-            height: 250px;
-            overflow: auto;
-          }
-        }
-      }
-
-    }
-
-    .menuList-b {
-      height: 130px;
-      background: #fff;
-      position: relative;
-
-      ::-webkit-scrollbar {
-        width: 7px;
-        height: 7px;
-        background-color: #F5F5F5;
-      }
-
-      ::-webkit-scrollbar-track {
-        box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-        border-radius: 10px;
-        background-color: #F5F5F5;
-      }
-
-      ::-webkit-scrollbar-thumb {
-        border-radius: 10px;
-        box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
-        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
-        background-color: #c8c8c8;
-      }
-
-      .draggableList {
-        position: absolute;
-        width: 100%;
-        margin: 0 0;
-        height: 130px;
-        list-style: none;
-        padding: 0 0;
-        overflow: auto;
-        font-size: 12px;
-
-        .draggableTitle {
-          float: left;
-          width: 105px;
-          white-space: nowrap;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          margin: 5px 5px;
-          border-radius: 7px;
-          text-align: center;
-          color: #000;
-          height: 36px;
-          line-height: 36px;
-        }
-
-        li {
-          text-align: center;
-          color: #fff;
-
-          .draggableName {
-            display: block;
-            width: 100%;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-          }
-        }
-      }
-    }
-  }
-
-  .list-group2 {
-    .list-group-item2 {
-      width: 220px;
-      height: 50px;
-      overflow: hidden;
-      float: left;
-      margin: 5px 5px;
-      position: relative;
-      color: #fff;
-
-      .arr-t {
-        height: 50px;
-        border-radius: 5px 5px;
-      }
-
-      .arr-l {
-        float: left;
-        width: 60px;
-        height: 50px;
-        overflow: hidden;
-        border-radius: 5px 50% 50% 5px;
-
-        .arr-l-t {
-          position: relative;
-
-          .arr-l-t-t {
-            width: 0;
-            height: 0;
-            border-top: 26px solid #3479f2;
-            border-right: 26px solid transparent;
-          }
-
-          .arr-l-t-b {
-            position: absolute;
-            top: 4px;
-            left: 1px;
-            color: #fff;
-            width: 10px;
-            height: 10px;
-
-            .el-input--suffix {
-              opacity: 0;
-
-              .el-input__inner {
-                height: 10px;
-              }
-            }
-          }
-        }
-
-        .arr-l-b {
-          width: 45px;
-          position: absolute;
-          top: 15px;
-          left: 10px;
-          color: #fff !important;
-          font-size: 12px;
-
-          .tmrname {
-            width: 100%;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-          }
-        }
-      }
-
-      .arr-c {
-        position: absolute;
-        top: 0px;
-        left: 0;
-      }
-
-      .arr-r {
-        float: right;
-        width: 160px;
-        height: 50px;
-        overflow: hidden;
-        line-height: 50px;
-
-        .arr-r-l {
-          float: left;
-          width: 85px;
-
-          .barname {
-            width: 100%;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-            font-size: 14px;
-          }
-        }
-
-        .arr-r-c {
-          float: left;
-          width: 10px;
-        }
-
-        .arr-r-r {
-          float: left;
-          width: 65px;
-
-          .weight {
-            width: 100%;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-            font-size: 14px;
-          }
-        }
-      }
-    }
-  }
-</style>
-<style>
-  .draggableWeight {
-    display: block;
-    line-height: 18px;
-    height: 18px;
-    color: #000;
-    width: 100%;
-    margin: 0 auto;
-  }
-</style>

+ 3 - 0
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -788,6 +788,9 @@ export default {
     handleCreate() {
       console.log('新增车次')
       this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
+      // 注释内容后续版本更
+      // this.create.temp.times = this.table.getdataListParm.parammaps.times
+      // 注释内容后续版本更
       this.getDownList()
       this.isDispaly = false
       this.dialogFull = false

+ 1538 - 0
src/views/formulationPlan/materialIssuancePlan/index备.vue

@@ -0,0 +1,1538 @@
+<template>
+  <div class="app-container">
+    <div class="search">
+      <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>
+    <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="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;">
+        <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-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录 </el-button>
+    </div>
+    <div class="table">
+      <el-table
+        id="table"
+        :key="table.tableKey"
+        ref="table"
+        v-loading="table.listLoading"
+        element-loading-text="给我一点时间"
+        :data="table.list"
+        border
+        highlight-current-row
+        style="width: 100%;"
+        :height="height"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable"
+        row-key="id"
+        @selection-change="handleSelect"
+      >
+        <el-table-column type="selection" width="50" />
+        <el-table-column label="车次" width="50px" align="center" class-name="small-padding fixed-width" fixed="">
+          <template slot-scope="scope">
+            <span>{{ scope.row.sort }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="TMR编号" width="110px" align="center" class-name="small-padding fixed-width" fixed="left">
+          <template slot-scope="scope">
+            <span>{{ scope.row.tmrname }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="描述" width="110px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.display }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="生效" width="70px" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.sel" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+          </template>
+        </el-table-column>
+        <el-table-column label="班次" width="65px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.timesstr }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="时间" width="55px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.begintime }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="最大重量" width="75px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.maxweight }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="合计重量" width="80px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.sumweight }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="模板配方" width="90px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.ftname }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="70px" align="center">
+          <template slot-scope="scope">
+            <el-switch v-model="scope.row.issplit" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+          </template>
+        </el-table-column>
+        <el-table-column label="撒料" min-width="250px" align="left" header-align="center">
+          <template slot-scope="scope">
+            <div v-for="element in scope.row.arrList" :key="element.name" class="list">
+              <el-tooltip placement="top" :open-delay="1000">
+                <div slot="content">
+                  <div> 栏舍全称:{{ element.barname }} </div>
+                  <div> 饲料重量:{{ element.weight }} </div>
+                  <div> 撒料车:{{ element.tmrname }} </div>
+                </div>
+                <div :style="{'background':element.background}" class="tmrname">{{ element.barname }}</div>
+              </el-tooltip>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="70" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <el-button v-if="isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
+            <span v-if="isRoleEdit" class="centerSpan">|</span>
+            <el-button v-if="isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(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>
+
+    <!-- 自动生成 -->
+    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="automaticGeneration.dialogFormVisible" :close-on-click-modal="false" width="30%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[automaticGeneration.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-automaticGeneration" style="margin: 0 auto;">
+        <div style="width: 210px;margin:60px auto 120px;font-weight: 16px;">
+          请选择自动生成方式:<br>
+          清空计划并生成新计划;<br>
+          当前计划基础上继续生成计划;<br>
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button style="right:240px;" class="cancelClose" @click="automaticGeneration.dialogFormVisible = false;">关闭</el-button>
+          <el-button style="right:130px;" class="save" :disabled="isokDisable" @click="continueData(0)">继续生成 </el-button>
+          <el-button style="right:20px;" class="save" :disabled="isokDisable" @click="continueData(1)">重新生成 </el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 历史记录 -->
+    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="historyRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[historyRecord.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="historyRecord">
+        <keep-alive>
+          <component :is="historyRecord.myComponent" ref="historyRecord" />
+        </keep-alive>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button class="cancelClose cancelClose1" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 新增、编辑 -->
+    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="create.dialogFormVisible" :before-close="close" :close-on-click-modal="false" width="90%">
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            {{ textMap[create.dialogStatus] }}
+          </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="create">
+        <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="135px" style="width: 100%;margin:0 auto 10px;">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="生效:" prop="sel">
+                <el-switch v-model="create.temp.sel" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="TMR编号:" prop="tmrid2">
+                <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-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="班次:" prop="times">
+                <el-select v-model="create.temp.times" :disabled="create.list2.length>0" placeholder="班次" style="width:100%;" @change="changeTimes">
+                  <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="提前小料拆分:" prop="issplit">
+                <el-switch v-model="create.temp.issplit" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="时间:" prop="begintime">
+                <el-time-picker v-model="create.temp.begintime" style="width: 100%;" :clearable="false" type="datetime" placeholder="时间" format="HH:mm" value-format="HH:mm" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="模板配方:" prop="ftid">
+                <el-select v-model="create.temp.ftid" :disabled="create.list2.length>0" placeholder="模板配方" style="width:100%;" @change="changeTemplateFormulation">
+                  <el-option v-for="item in templateFormulationList" :key="item.id" :label="item.tname" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="描述:" prop="display">
+                <el-input v-model="create.temp.display" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" placeholder="描述" maxlength="255" style="width: 100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div v-if="create.dialogStatus !=='update' && !isDispaly" slot="footer" class="dialog-footer">
+          <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
+          <el-button v-if="create.dialogStatus==='create'" class="save" :disabled="isokDisable" @click="distributionAndSpreading()">分配撒料</el-button>
+        </div>
+        <!-- 栏舍 -->
+        <div v-if="create.dialogStatus =='update' || isDispaly" class="bottom" style="border-top: 1px solid #009C69;">
+          <el-row>
+            <el-col :span="20">
+              <div class="fenceHouse">
+                <ul v-loading="create.listLoadingTimes" class="fenceHouseList">
+                  <li v-for="element in create.list1" :key="element.arrid">
+                    <span v-if="element.isShowTitle" class="fenceHouseTitle">{{ element.ftname }}:</span>
+                    <div v-for="item in element.arrList" :key="item.id" class="colorBlock">
+                      <div style="position: relative;">
+                        <el-tooltip placement="top" style="height: 18px;line-height: 18px;" :style="{'background':item.background}">
+                          <div slot="content">{{ item.barname }}</div>
+                          <div class="barname">
+                            <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.barname }}</span>
+                            <b style="background: red;float: right;width: 18px;font-size: 18px;" class="el-icon-check" @click="clickBar(item)" />
+                          </div>
+                        </el-tooltip>
+                        <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div>
+                      </div>
+                    </div>
+                  </li>
+                </ul>
+              </div>
+            </el-col>
+            <el-col :span="4">
+              <div style="text-align: center;height: 100px;margin-top: 40px;">
+                <div class="maxweight" style="line-height:20px;"><b>最大重量:</b>{{ create.temp.maxweight }} (KG)</div>
+                <div class="sumweight" style="line-height:20px;margin-top: 10px;"><b>合计重量:</b>{{ create.temp.sumweight }} (KG) </div>
+              </div>
+            </el-col>
+          </el-row>
+          <!-- 撒料 -->
+          <div class="spreadingMaterial">
+            <div>撒料:</div>
+            <div class="spreadingMaterialList">
+              <draggable
+                id="1"
+                data-source="juju"
+                :list="create.list2"
+                class="list-group1"
+                draggable=".item"
+                group="a"
+                animation="500"
+                force-fallback="true"
+                :move="move1"
+                @change="changeLog1(create.temp)"
+                @start="start1"
+                @end="end1(create.temp)"
+              >
+                <div v-for="element in create.list2" :key="element.name" class="list-group-item2 item">
+                  <div class="arr-l" :style="{'background':element.tbackground}">
+                    <div class="arr-l-t">
+                      <div class="arr-l-t-t" />
+                      <el-select
+                        v-model="element.tmrid"
+                        placeholder="撒料设备"
+                        class="arr-l-t-b el-icon-arrow-down"
+                        @change="(value)=> {changeEquipment(value, element.fttype,element.id)}"
+                      >
+                        <el-option
+                          v-for="item in equipmentList"
+                          :key="item.id"
+                          :label="item.tname"
+                          :value="item.id"
+                        />
+                      </el-select>
+                    </div>
+                    <div class="arr-l-b">
+                      <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
+                        <div slot="content">{{ element.tmrname }}</div>
+                        <div class="tmrname">{{ element.tmrname }}</div>
+                      </el-tooltip>
+                    </div>
+                    <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div>
+                  </div>
+                  <div class="arr-r">
+                    <div class="arr-r-l">
+                      <el-tooltip placement="top">
+                        <div slot="content">{{ element.barname }}</div>
+                        <div class="barname">{{ element.barname }}</div>
+                      </el-tooltip>
+                    </div>
+                    <div class="arr-r-c">-</div>
+                    <div class="arr-r-r">
+                      <el-tooltip placement="top">
+                        <div slot="content">{{ element.weight }}</div>
+                        <input
+                          ref="weight"
+                          v-model="element.weight"
+                          :autofocus="element.focusState"
+                          type="number"
+                          placeholder="重量"
+                          step="0.01"
+                          class="filter-item2"
+                          style="display: inline-block;height:25px;padding:4px 4px 4px 0;text-align:right;font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
+                          @keyup.enter="$event.target.blur"
+                          @blur="blurWeight(element)"
+                        >
+                      </el-tooltip>
+                    </div>
+                  </div>
+                  <div class="arr-t" :style="{'background':element.background}">
+                    <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
+                  </div>
+                </div>
+              </draggable>
+            </div>
+          </div>
+          <div slot="footer" class="dialog-footer">
+            <el-button class="cancelClose" :disabled="isokDisable" @click="close()">关闭</el-button>
+            <el-button class="save" :disabled="isokDisable" @click="updateData()">确认</el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Cookies from 'js-cookie'
+import draggable from 'vuedraggable'
+import Sortable from 'sortablejs'
+import { checkButtons, ExecDataByConfig, postJson } from '@/api/common'
+import { MessageBox } from 'element-ui'
+export default {
+  components: {
+    draggable
+  },
+  data() {
+    return {
+      isRoleEdit: [],
+      rowStyle: { maxHeight: 25 + 'px', height: 25 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      height: document.body.clientHeight - 220, // table高度
+      table: {
+        getdataListParm: {
+          page: 1,
+          offset: 1,
+          pagecount: 0,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            times: 1,
+            refresh: 1
+          }
+        },
+        tableKey: 0,
+        list: [],
+        total: 0,
+        listLoading: false
+      },
+      frequencyList: [], // 班次
+      maxTime: {
+        getMaxTimesParm: {
+          name: 'getSysoptEnable',
+          page: 1,
+          offset: 1,
+          pagecount: 1,
+          returntype: 'Map',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            inforname: 'times'
+          }
+        }
+      },
+      // 是否显示小料拆分
+      isInforvalue: false,
+      selectList: [],
+      historyRecord: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        myComponent: null
+      },
+      // 自动生成
+      automaticGeneration: {
+        dialogFormVisible: false,
+        dialogStatus: ''
+      },
+      textMap: {
+        automaticGeneration: '提示',
+        historyRecord: '历史记录',
+        create: '新增',
+        update: '编辑'
+      },
+      dialogFull: false,
+      isOrder: true,
+      requestParam: {},
+      isokDisable: false,
+      create: {
+        dialogFormVisible: false,
+        dialogStatus: '',
+        temp: { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' },
+        rules: {
+          tmrid2: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
+          times: [{ type: 'number', required: true, message: '必填', trigger: 'blur' }],
+          ftid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
+        },
+        listLoadingTimes: false,
+        list1: [],
+        list2: [],
+        checkBarList: []
+      },
+      TMRNumberList: [], // TMR编号
+      equipmentList: [], // 撒料设备
+      templateFormulationList: [], // 模板配方
+      isDispaly: false
+    }
+  },
+  created() {
+    this.getButtons()
+    this.getIsDisplay()
+    this.getList()
+  },
+  methods: {
+    getButtons() {
+      const Edit = 'MaterialIssuancePlan'
+      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
+      this.isRoleEdit = isRoleEdit
+    },
+    // 下拉列表
+    getDownList() {
+      const url = 'authdata/GetDataByName'
+      const data1 = {
+        name: 'getTMRListEnableType',
+        offset: 0,
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          eqtype: '1'
+        }
+      }
+      postJson(url, data1).then(response => {
+        if (response.data !== null) {
+          this.TMRNumberList = response.data.list
+        } else {
+          this.TMRNumberList = []
+        }
+      })
+      const data2 = {
+        name: 'getTMRListEnableTypeAll',
+        offset: 0,
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          eqtype: '1'
+        }
+      }
+      postJson(url, data2).then(response => {
+        if (response.data !== null) {
+          this.equipmentList = response.data.list
+          if(this.create.dialogStatus == 'update'){
+            this.create.temp.tclassname = this.equipmentList.find(obj => obj.id ==  this.create.temp.tmrid).tclassname
+          }
+        } else {
+          this.equipmentList = []
+        }
+      })
+      const data3 = {
+        name: 'getFTSWList',
+        offset: 0,
+        parammaps: {
+          pastureid: Cookies.get('pastureid')
+        }
+      }
+      postJson(url, data3).then(response => {
+        if (response.data !== null) {
+          this.templateFormulationList = response.data.list
+        } else {
+          this.templateFormulationList = []
+        }
+      })
+      const data4 = {
+        name: 'getSysoptEnable',
+        offset: 0,
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          inforname: 'isSmallMaterial'
+        }
+      }
+      postJson(url, data4).then(response => {
+        if (response.data !== null) {
+          if (response.data.list[0].inforvalue == 0) {
+            this.isInforvalue = false
+          } else {
+            this.isInforvalue = true
+          }
+        } else {
+          this.isInforvalue = false
+        }
+      })
+    },
+    getIsDisplay() {
+      const url = 'authdata/GetDataByName'
+      const data = this.maxTime.getMaxTimesParm
+      postJson(url, data).then(response => {
+        console.log(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) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' },
+            { id: 2, name: '第二班' }
+          ]
+        } else if (response.data.list[0].inforvalue == 3) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' },
+            { id: 2, name: '第二班' },
+            { id: 3, name: '第三班' }
+          ]
+        } else if (response.data.list[0].inforvalue == 4) {
+          this.frequencyList = [
+            { id: 1, name: '第一班' },
+            { id: 2, name: '第二班' },
+            { id: 3, name: '第三班' },
+            { id: 4, name: '第四班' }
+          ]
+        }
+      })
+    },
+
+    getList() {
+      this.table.listLoading = true
+      const url = 'authdata/spillage'
+      const data = this.table.getdataListParm
+      postJson(url, data).then(response => {
+        if (response.data.list !== undefined) {
+          if (response.data.list !== null) {
+            console.log('table数据', response.data.list)
+            for (let i = 0; i < response.data.list.length; i++) {
+              if (response.data.list[i].arrList == null) {
+                this.$set(response.data.list[i], 'arrList', [])
+              }
+            }
+            this.table.list = response.data.list
+            this.table.total = response.data.list.length
+            setTimeout(() => {
+              this.$refs.table.doLayout()
+            }, 100)
+          } else {
+            this.table.list = []
+          }
+        }
+        this.table.listLoading = false
+      })
+    },
+    changeFrequency(val) {
+      console.log('选择了班次', val)
+      this.getList()
+    },
+    // 行内删除
+    handleRowDelete(row) {
+      console.log(row, '点击了行删除')
+      if (row.arrList.length == 0) {
+        MessageBox.confirm('是否确认删除此信息?', {
+          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+        }).then(() => {
+          this.selectList = []
+          this.requestParam = {}
+          this.requestParam.name = 'deleteLpp'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.pastureid = row.pastureid
+          this.requestParam.parammaps.id = row.id
+          const url = 'authdata/PostDataByName'
+          const data = this.requestParam
+          postJson(url, data).then(response => {
+            if (response.msg === 'fail') {
+              this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
+            } else {
+              this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+              this.table.getdataListParm.parammaps.refresh = 1
+              this.getList()
+            }
+          })
+        }).catch(() => {
+          this.$message({ type: 'info', message: '已取消删除' })
+        })
+      } else {
+        this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
+        return false
+      }
+    },
+    handleSelect(val) {
+      console.log('勾选数据', val)
+      this.selectList = val
+    },
+    changeTemplateFormulation(item) {
+      this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
+      this.getCreateList1()
+    },
+    changeTimes(item) {
+      this.getCreateList1()
+    },
+    // TMR编号
+    changeTMRNumber(item) {
+      if (this.create.list2.length > 0) {
+        MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
+          confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
+        }).then(() => {
+          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.mytmrid = this.create.temp.tmrid
+          this.create.temp.mytmrname = this.create.temp.tmrname
+          console.log('tmrname==>', this.create.temp)
+          if (this.isDispaly || this.create.dialogStatus == 'update') {
+            this.getClearList()
+          }
+        }).catch(() => {
+          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.mytmrid = this.create.temp.tmrid2
+          this.create.temp.mytmrname = this.create.temp.tmrname
+          console.log(this.create.temp)
+          this.$message({ type: 'info', message: '已取消' })
+        })
+      } else {
+        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.mytmrid = this.create.temp.tmrid
+        this.create.temp.mytmrname = this.create.temp.tmrname
+        console.log('TMR编号item==>', item)
+      }
+        console.log('tmrname==>', this.create.temp)
+    },
+    getClearList() {
+      const url = 'authdata/lpplandtl/del'
+      const data = []
+      this.create.list2.forEach((item, i) => {
+        const obj = {}
+        obj.pastureid = item.pastureid
+        obj.lpplandtlid = item.id
+        obj.fttype = item.fttype
+        obj.lweight = item.lweight
+        obj.fpdid = item.fpdid
+        data.push(obj)
+      })
+      postJson(url, data).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
+          this.getCreateList1()
+        }
+      })
+    },
+    colorRgb(sColor) {
+      sColor = sColor.toLowerCase()
+      var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
+      // 如果是16进制颜色
+      if (sColor && reg.test(sColor)) {
+        if (sColor.length === 4) {
+          var sColorNew = '#'
+          for (var i = 1; i < 4; i += 1) {
+            sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
+          }
+          sColor = sColorNew
+        }
+        // 处理六位的颜色值
+        var sColorChange = []
+        for (var i = 1; i < 7; i += 2) {
+          sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
+        }
+        return sColorChange.join(',')
+      }
+      return 'rgba(' + sColorChange.join(',') + ')'
+    },
+    dbclickWeight(item) {
+      console.log('item==>', item)
+      console.log('isRoleEdit==>', this.isRoleEdit)
+      this.$set(item, 'isWeight', true)
+      this.$set(item, 'focusState', true)
+    },
+    blurWeight(item) {
+      if (parseFloat(item.weight) <= 0) {
+        this.$message({ type: 'error', message: '重量不可输入小于0的数据', duration: 2000 })
+        return false
+      }
+      if (item.weight == '') {
+        item.weight = 0
+      }
+      const lweight = String(parseFloat(item.weight) - parseFloat(item.lweight))
+      let sum = 0
+      this.create.list2.forEach((item, i) => {
+        console.log('item==>', item)
+        sum += parseFloat(item.weight)
+      })
+      if (sum > this.create.temp.maxweight) {
+        this.$message({ type: 'error', message: '撒料车总重量大于最大重量', duration: 2000 })
+        return false
+      }
+      this.requestParam = {}
+      this.requestParam.common = { 'returnmap': '0' }
+      this.requestParam.data = []
+      this.requestParam.data[0] = {
+        'name': 'checkFPdLeftW', 'type': 'v',
+        'parammaps': {
+          pastureid: item.pastureid, fpdid: item.fpdid, fttype: item.fttype,
+          lweight: lweight
+        }
+      }
+      this.requestParam.data[1] = {
+        'name': 'updateLppd', 'type': 'e',
+        'parammaps': {
+          pastureid: this.create.temp.pastureid, lppid: this.create.temp.id, barid: item.barid,
+          barname: item.barname, fpdid: item.fpdid, fttype: item.fttype,
+          lweight: item.weight, sort: item.sort, tmrid: item.tmrid,
+          tmrname: item.tmrname, background: item.background, id: item.id
+        }
+      }
+      this.requestParam.data[2] = {
+        'name': 'updateFpdetailUse', 'type': 'e',
+        'parammaps': {
+          pastureid: item.pastureid, id: item.fpdid,
+          fttype: item.fttype, lweight: lweight
+        }
+      }
+      ExecDataByConfig(this.requestParam).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          // this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+        }
+        this.getCreateList1()
+      })
+    },
+    handleFLDelete(ele) {
+      console.log(ele, '点击了撒料删除')
+      this.requestParam = {}
+      this.requestParam.common = { 'returnmap': '0' }
+      this.requestParam.data = []
+      this.requestParam.data[0] = {
+        'name': 'deleteLppd', 'type': 'e',
+        'parammaps': { pastureid: ele.pastureid, id: ele.id }
+      }
+      this.requestParam.data[1] = {
+        'name': 'updateFpdetailUse', 'type': 'e',
+        'parammaps': { pastureid: ele.pastureid, id: ele.fpdid, fttype: ele.fttype, lweight: '-' + parseFloat(ele.weight) }
+      }
+      const url = 'authdata/ExecDataByConfig'
+      const data = this.requestParam
+      postJson(url, data).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
+          this.getCreateList1()
+        }
+      })
+    },
+    handleCreate() {
+      console.log('新增车次')
+      this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
+      this.getDownList()
+      this.isDispaly = false
+      this.dialogFull = false
+      this.create.dialogStatus = 'create'
+      this.create.dialogFormVisible = true
+      this.create.list1 = []
+      this.create.list2 = []
+      this.create.checkBarList = []
+    },
+    distributionAndSpreading() {
+      console.log('点击了分配撒料')
+      this.$refs['temp'].validate(valid => {
+        if (valid) {
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          const url = 'authdata/lpplan/add'
+          const data = {}
+          this.create.temp.pastureid = Cookies.get('pastureid')
+          this.create.temp.times = parseInt(this.create.temp.times)
+          data.parammaps = this.create.temp
+          postJson(url, data).then(response => {
+            console.log('新增保存发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.create.temp.id = response.data.Id
+              this.isDispaly = true
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+          this.getCreateList1()
+        }
+      })
+    },
+    getCreateList1() {
+      this.create.listLoadingTimes = true
+      const url = 'authdata/spillage'
+      const data = {
+        page: 1,
+        offset: 1,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          times: this.create.temp.times,
+          refresh: 2,
+          ftid: this.create.temp.ftid
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.data.ftlist !== null) {
+          for (let i = 0; i < response.data.ftlist.length; i++) {
+            this.$set(response.data.ftlist[i], 'isShowTitle', true)
+            if (response.data.ftlist[i].arrList == null) {
+              this.$set(response.data.ftlist[i], 'isShowTitle', false)
+            } else {
+              for (let j = 0; j < response.data.ftlist[i].arrList.length; j++) {
+                this.$set(response.data.ftlist[i].arrList[j], 'background2', this.colorRgb(response.data.ftlist[i].arrList[j].background))
+              }
+            }
+          }
+          this.create.list1 = response.data.ftlist
+        } else {
+          this.create.list1 = []
+        }
+        this.create.listLoadingTimes = false
+      })
+      this.getCreateList2()
+    },
+    getCreateList2() {
+      const url = 'authdata/lpplandtl'
+      const data = {}
+      data.parammaps = {}
+      data.parammaps.pastureid = Cookies.get('pastureid'),
+      data.parammaps.id = this.create.temp.id
+      postJson(url, data).then(response => {
+        if (response.data !== null) {
+          this.create.list2 = response.data
+          this.create.temp.sort = response.data.length + 1
+          var sumweight = 0
+          for (let i = 0; i < this.create.list2.length; i++) {
+            sumweight += parseFloat(this.create.list2[i].weight)
+            this.$set(this.create.list2[i], 'isWeight', false)
+            this.$set(this.create.list2[i], 'focusState', false)
+          }
+          console.log('sumweight==>', sumweight)
+          this.create.temp.sumweight = (sumweight).toFixed(2)
+        } else {
+          this.create.list2 = []
+          this.create.temp.sort = 0
+          this.create.temp.sumweight = 0
+        }
+      })
+    },
+    clickBar(item) {
+      console.log('点击了栏舍item==>', item)
+      this.create.temp.sumweight = parseFloat(this.create.temp.sumweight)
+      console.log('temp==>',this.create.temp)
+      console.log('this.equipmentList==>',this.equipmentList)
+      // if(this.create.temp.tclassname == '固定式'){
+      //   if(this.equipmentList.find(obj => obj.tclassname == '撒料设备') !== undefined){
+      //     this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '撒料设备').eqcode
+      //     this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '撒料设备').id
+      //   }else if(this.equipmentList.find(obj => obj.tclassname == '自走式') !== undefined){
+      //     this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '自走式').eqcode
+      //     this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '自走式').id
+      //   }else{
+      //     this.$message({ type: 'error', message: '请先在TMR设备中创建撒料设备', duration: 2000 })
+      //     return
+      //   }
+      // }
+      if(this.create.temp.tclassname == '固定式'){
+        if(this.equipmentList.find(obj => obj.tclassname == '任意车') !== undefined){
+          this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '任意车').eqcode
+          this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '任意车').id
+        }
+      }
+      var evt = this.create.temp
+      if (parseFloat(evt.maxweight) - parseFloat(evt.sumweight) < parseFloat(item.weight)) {
+        if (parseFloat(evt.sumweight) + parseFloat(item.weight) > parseFloat(evt.maxweight)) {
+          this.$set(item, 'weight', (parseFloat(evt.maxweight) - parseFloat(evt.sumweight)).toFixed(2))
+        }
+      }
+      if (parseFloat(evt.maxweight) == parseFloat(evt.sumweight) || parseFloat(evt.maxweight) < parseFloat(evt.sumweight)) {
+        this.$message({ type: 'error', message: '计划配方已经是最大容量', duration: 2000 })
+        this.getCreateList1()
+        return
+      }
+      console.log('item.weight===>', item.weight)
+      this.requestParam = {}
+      this.requestParam.common = { 'returnmap': '0' }
+      this.requestParam.data = []
+      this.requestParam.data[0] = { 'name': 'updateLpplandtlSorts', 'type': 'e',
+        'parammaps': { pastureid: evt.pastureid, sort: evt.sort, lppid: evt.id }
+      }
+      this.requestParam.data[1] = { 'name': 'insertLppd', 'type': 'e',
+        'parammaps': {
+          pastureid: evt.pastureid, lppid: evt.id, barid: item.barid, barname: item.barname, fpdid: item.id, fttype: item.fttype,
+          lweight: item.weight, sort: evt.sort, tmrid: evt.tmrid, tmrname: evt.tmrname,
+          background: item.background, ccountradio: item.ccountradio, cowcount: item.cowcount
+        }
+      }
+      this.requestParam.data[2] = { 'name': 'updateFpdetailUse', 'type': 'e',
+        'parammaps': { pastureid: item.pastureid, id: item.id, fttype: item.fttype, lweight: item.weight }
+      }
+      const url = 'authdata/ExecDataByConfig'
+      const data = this.requestParam
+      postJson(url, data).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+        }
+        this.getCreateList1()
+      })
+    },
+    handleUpdate(row) {
+      console.log(row)
+      console.log("equipmentList",this.equipmentList)
+      this.getDownList()
+      this.dialogFull = false
+      this.create.dialogStatus = 'update'
+      this.create.dialogFormVisible = true
+      row.tmrid2 = row.tmrid
+      this.create.temp = Object.assign({}, row)
+      this.create.temp.mytmrname = row.tmrname
+      this.create.temp.mytmrid = row.tmrid
+      this.create.checkBarList = []
+      console.log(this.create.temp,'this.create.temp')
+      this.getCreateList1()
+    },
+    updateData() {
+      this.$refs['temp'].validate(valid => {
+        if (valid) {
+          this.isokDisable = true
+          setTimeout(() => {
+            this.isokDisable = false
+          }, 1000)
+          const url = 'authdata/lpplan/edit'
+          const data = {}
+          this.create.temp.pastureid = Cookies.get('pastureid')
+          this.create.temp.times = parseInt(this.create.temp.times)
+          data.parammaps = this.create.temp
+          data.parammaps.tmrid = this.create.temp.mytmrid
+          data.parammaps.tmrname = this.create.temp.mytmrname
+          postJson(url, data).then(response => {
+            console.log('新增保存发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.isDispaly = false
+              this.dialogFull = false
+              this.create.dialogFormVisible = false
+              this.getList()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }
+      })
+    },
+    close() {
+      if (this.create.dialogStatus == 'create') {
+        console.log('新增关闭')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        const url = 'authdata/lpplandtl/restore'
+        const data = {}
+        data.old = []
+        data.new = this.create.list2
+        postJson(url, data).then(response => {
+          console.log('新增保存发送参数', this.requestParam)
+          if (response.msg !== 'fail') {
+            this.isDispaly = false
+            this.dialogFull = false
+            this.create.dialogFormVisible = false
+            this.getList()
+          }
+        })
+      } else {
+        console.log('编辑关闭')
+        this.isokDisable = true
+        setTimeout(() => {
+          this.isokDisable = false
+        }, 1000)
+        const url = 'authdata/lpplandtl/restore'
+        const data = {}
+        data.old = this.create.temp.arrList
+        data.new = this.create.list2
+        postJson(url, data).then(response => {
+          console.log('新增保存发送参数', this.requestParam)
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.isDispaly = false
+            this.dialogFull = false
+            this.create.dialogFormVisible = false
+            this.getList()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      }
+    },
+    changeEquipment(item, fttype, myid) {
+      console.log('item==>',item)
+      console.log('fttype==>',fttype)
+      console.log('myid==>',myid)
+      let tclassname = this.equipmentList.find(obj => obj.id == item).tclassname
+      let maxstirfeed = this.equipmentList.find(obj => obj.id == item).maxstirfeed
+      if(tclassname == '固定式'){
+        this.$message({ type: 'error', message: '固定式设备无法撒料,请选择撒料设备', duration: 2000 })
+        this.getCreateList2()
+        return
+      }
+      var objList = {}
+      for (let i = 0; i < this.create.list2.length; i++) {
+        if (this.create.list2[i].fttype == fttype && this.create.list2[i].id == myid) {
+          this.create.list2[i].tmrname = this.equipmentList.find(obj => obj.id === item).tname
+          objList = this.create.list2[i]
+          if(parseFloat(this.create.list2[i].weight) > parseFloat(maxstirfeed)){
+            objList.weight = maxstirfeed
+          }
+        }
+      }
+      this.requestParam = {}
+      this.requestParam.common = {
+        'returnmap': '0'
+      }
+      this.requestParam.data = []
+      this.requestParam.data[0] = {
+        'name': 'updateLppd',
+        'type': 'e',
+        'parammaps': {
+          pastureid: this.create.temp.pastureid,
+          lppid: this.create.temp.id,
+          barid: objList.barid,
+          barname: objList.barname,
+          fpdid: objList.fpdid,
+          fttype: objList.fttype,
+          lweight: objList.weight,
+          sort: objList.sort,
+          tmrid: objList.tmrid,
+          tmrname: objList.tmrname,
+          background: objList.background,
+          id: objList.id
+        }
+      }
+      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.getCreateList2()
+          this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
+        }
+      })
+    },
+    move1(evt, originalEvent){
+      console.log('move1===>', evt, originalEvent)
+    },
+    changeLog1(){},
+    start1(evt){
+      console.log('start1===>', evt)
+      // this.$set(this.table.startObj, 'from', evt.from.className)
+      // this.$set(this.table.startObj, 'to', evt.from.className)
+    },
+    end1(evt){
+      console.log('end1===>', evt)
+    },
+    // 减少车次
+    handleReduceTrains() {
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择车次', duration: 2000 })
+        return false
+      } else {
+        // 减少对应车次
+        for (let i = 0; i < this.selectList.length; i++) {
+          if (this.selectList[i].arrList.length > 0) {
+            this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
+            return false
+          }
+        }
+        MessageBox.confirm('是否确认删除此信息?', {
+          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+        }).then(() => {
+          console.log(this.selectList)
+          this.requestParam = {}
+          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.data = []
+          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+          this.requestParam.data[0].children = []
+          this.requestParam.data[0].children[0] = {
+            'name': 'deleteLpp', 'type': 'e', 'parammaps': { id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
+          }
+          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.table.getdataListParm.parammaps.refresh = 1
+              this.getList()
+            }
+          })
+        })
+      }
+    },
+    // 自动生成
+    handleAutomaticGeneration() {
+      this.dialogFull = false
+      this.automaticGeneration.dialogStatus = 'automaticGeneration'
+      this.automaticGeneration.dialogFormVisible = true
+    },
+    continueData(item) {
+      if (item == 0) {
+        console.log('点击继续生成')
+        this.requestParam = {}
+        this.requestParam.pastureid = Cookies.get('pastureid')
+        this.requestParam.type = 0
+        const url = 'authdata/autogeneration'
+        const data = this.requestParam
+        postJson(url, data).then(response => {
+          console.log('新增保存发送参数', this.requestParam)
+          if (response.msg !== 'fail') {
+            this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+            this.automaticGeneration.dialogFormVisible = false
+            this.getIsDisplay()
+          } else {
+            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          }
+        })
+      } else {
+        console.log('点击重新生成')
+        MessageBox.confirm('重新生成计划会将原有计划清空再生成,是否确认重新生成?', {
+          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+        }).then(() => {
+          this.automaticGeneration.dialogFormVisible = false
+          this.requestParam = {}
+          this.requestParam.pastureid = Cookies.get('pastureid')
+          this.requestParam.type = 1
+          const url = 'authdata/autogeneration'
+          const data = this.requestParam
+          postJson(url, data).then(response => {
+            console.log('新增保存发送参数', this.requestParam)
+            if (response.msg !== 'fail') {
+              this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+              this.automaticGeneration.dialogFormVisible = false
+              this.getIsDisplay()
+            } else {
+              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+            }
+          })
+        }).catch(() => {
+          this.$message({ type: 'info', message: '已取消重新生成' })
+        })
+      }
+    },
+    handleChangeOrder() {
+      console.log('更改顺序')
+      this.isOrder = false
+      this.rowDrop()
+    },
+    // 行拖拽
+    rowDrop() {
+      console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
+      const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
+      const that = this
+      var sortable = Sortable.create(tbody, {
+        disabled: that.dropState,
+        onChoose({ newIndex, oldIndex }) {
+          console.log(that.isOrder, 'that.isOrder == false')
+          console.log(that.dropState, 'that.dropState')
+          if (that.dropState == true || that.isOrder == true) {
+            sortable.destroy()
+          }
+        },
+        onEnd({ newIndex, oldIndex }) {
+          const currRow = that.table.list.splice(oldIndex, 1)[0]
+          that.table.list.splice(newIndex, 0, currRow)
+          console.log('索引', newIndex)
+          console.log('拖动数据', currRow)
+          console.log('上', that.table.list[newIndex - 1])
+          console.log('下', that.table.list[newIndex + 1])
+        }
+      })
+    },
+    saveChangeOrder() {
+      // 保存顺序
+      var sortArr = []
+      for (let i = 0; i < this.table.list.length; i++) {
+        var obj = {}
+        obj.sort = i + 1
+        obj.id = this.table.list[i].id
+        obj.pastureid = this.table.list[i].pastureid
+        sortArr.push(obj)
+      }
+      const url = 'authdata/trains'
+      const data = sortArr
+      postJson(url, data).then(response => {
+        if (response.msg === 'fail') {
+          this.$notify({ title: '顺序切换失败', message: response.data, type: 'warning', duration: 2000 })
+        } else {
+          this.$notify({ title: '', message: '顺序切换成功', type: 'success', duration: 2000 })
+          this.table.getdataListParm.parammaps.refresh = 1
+          this.getList()
+          this.isOrder = true
+        }
+      })
+    },
+    cancelChangeOrder() {
+      console.log('取消顺序')
+      this.table.getdataListParm.parammaps.refresh = 1
+      this.getList()
+      this.isOrder = true
+    },
+    handleTakeEffect() {
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
+      } else {
+        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          for (let i = 0; i < this.selectList.length; i++) {
+            this.selectList[i].sel = 1
+          }
+          console.log('生效', this.selectList)
+          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.data = []
+          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+          this.requestParam.data[0].children = []
+          this.requestParam.data[0].children[0] = {
+            'name': 'updatelpplanEnable', 'type': 'e', 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
+          }
+          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.table.getdataListParm.parammaps.refresh = 1
+              this.getList()
+            }
+          })
+        })
+      }
+    },
+    handleDisable() {
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
+      } else {
+        MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
+          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+        }).then(() => {
+          for (let i = 0; i < this.selectList.length; i++) {
+            this.selectList[i].sel = 0
+          }
+          console.log('禁用', this.selectList)
+          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.data = []
+          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+          this.requestParam.data[0].children = []
+          this.requestParam.data[0].children[0] = {
+            'name': 'updatelpplanEnable',
+            'type': 'e',
+            'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
+          }
+          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.table.getdataListParm.parammaps.refresh = 1
+              this.getList()
+            }
+          })
+        })
+      }
+    },
+    // 历史记录
+    handleHistoryRecord() {
+      console.log('点击历史记录')
+      this.dialogFull = false
+      this.historyRecord.dialogStatus = 'historyRecord'
+      this.historyRecord.dialogFormVisible = true
+      const vue = this
+      var myComponent = () => import('./historyRecord.vue')
+      return vue.historyRecord.myComponent = myComponent
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  .list{width: 60px;display: inline-block;margin: 5px 5px;text-align: center;
+    .tmrname{
+      width:100%;padding: 5px 5px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+    }
+ }
+  .fenceHouse {
+    height: 130px;
+    background: #fff;
+    position: relative;
+    ::-webkit-scrollbar {
+      width: 7px;
+      height: 7px;
+      background-color: #F5F5F5;
+    }
+    ::-webkit-scrollbar-track {
+      box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+      border-radius: 10px;
+      background-color: #F5F5F5;
+    }
+    ::-webkit-scrollbar-thumb {
+      border-radius: 10px;
+      box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
+      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
+      background-color: #c8c8c8;
+    }
+    .fenceHouseList {
+      position: absolute;
+      width: 100%;
+      margin: 0 0;
+      height: 130px;
+      list-style: none;
+      padding: 0 0;
+      overflow: auto;
+      font-size: 12px;
+      .fenceHouseTitle {
+        float: left;
+        width: 105px;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        margin: 5px 5px;
+        border-radius: 7px;
+        text-align: center;
+        color: #000;
+        height: 36px;
+        line-height: 36px;
+      }
+      li {
+        text-align: center;
+        color: #fff;
+        .barname {
+          display: block;
+          width: 100%;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .barWeight{
+          display: block;
+          line-height: 18px;
+          height: 18px;
+          color: #000;
+          width: 100%;
+          margin: 0 auto;
+        }
+        .colorBlock{
+         width: 88px;float: left;margin:5px 5px;height: 36px;
+        }
+       }
+     }
+   }
+</style>
+<style lang="scss" >
+
+  .spreadingMaterial {
+    height: 200px;
+      ::-webkit-scrollbar {
+        width: 7px;
+        height: 7px;
+        background-color: #F5F5F5;
+      }
+      ::-webkit-scrollbar-track {
+        box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+        border-radius: 10px;
+        background-color: #F5F5F5;
+      }
+      ::-webkit-scrollbar-thumb {
+        border-radius: 10px;
+        box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
+        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
+        background-color: #c8c8c8;
+      }
+      .spreadingMaterialList{height: 100%;overflow: auto;}
+      .list-group-item2 {
+        width: 220px;
+        height: 50px;
+        overflow: hidden;
+        float: left;
+        margin: 5px 5px;
+        position: relative;
+        color: #fff;
+
+        .arr-t {
+          height: 50px;
+          border-radius: 5px 5px;
+        }
+
+        .arr-l {
+          float: left;
+          width: 60px;
+          height: 50px;
+          overflow: hidden;
+          border-radius: 5px 50% 50% 5px;
+
+          .arr-l-t {
+            position: relative;
+
+            .arr-l-t-t {
+              width: 0;
+              height: 0;
+              border-top: 26px solid #3479f2;
+              border-right: 26px solid transparent;
+            }
+
+            .arr-l-t-b {
+              position: absolute;
+              top: 4px;
+              left: 1px;
+              color: #fff;
+              width: 10px;
+              height: 10px;
+
+              .el-input--suffix {
+                opacity: 0;
+
+                .el-input__inner {
+                  height: 10px;
+                }
+              }
+            }
+          }
+
+          .arr-l-b {
+            width: 45px;
+            position: absolute;
+            top: 15px;
+            left: 10px;
+            color: #fff !important;
+            font-size: 12px;
+
+            .tmrname {
+              width: 100%;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
+            }
+          }
+        }
+
+        .arr-c {
+          position: absolute;
+          top: 0px;
+          left: 0;
+        }
+
+        .arr-r {
+          float: right;
+          width: 160px;
+          height: 50px;
+          overflow: hidden;
+          line-height: 50px;
+
+          .arr-r-l {
+            float: left;
+            width: 70px;
+
+            .barname {
+              width: 95%;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              font-size: 14px;
+              text-align: center;
+            }
+          }
+
+          .arr-r-c {
+            float: left;
+            width: 10px;
+          }
+
+          .arr-r-r {
+            float: left;
+            width: 65px;
+
+            .weight {
+              width: 100%;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              font-size: 14px;
+            }
+          }
+        }
+      }
+    }
+</style>

+ 21 - 9
src/views/formulationPlan/recipeTemplate/index.vue

@@ -2404,12 +2404,12 @@ export default {
       this.table2.temp.id = row.id
       console.log('this.table2.updateList', this.table2.updateList)
       console.log('temp', this.table2.temp)
-      var status = ''
-      if (parseFloat(this.table2.temp.fweight) > parseFloat(this.table2.updateList.fweight)) {
-        status = 0
-      } else {
-        status = 1
-      }
+      // var status = ''
+      // if (parseFloat(this.table2.temp.fweight) > parseFloat(this.table2.updateList.fweight)) {
+      //   status = 0
+      // } else {
+      //   status = 1
+      // }
       if (this.table2.temp.fid == '' && this.table2.temp.fweight == '' && this.table2.temp.autosecond == '') {
         this.$message({ type: 'error', message: '饲料名称/重量/搅拌延时不能为空', duration: 2000 })
         return false
@@ -2479,7 +2479,7 @@ export default {
         pastureid: row.pastureid,
         ftid: this.table2.getdataListParm.parammaps.ftid,
         type: this.table2.getdataListParm.parammaps.fttypeid,
-        status: status
+        // status: status
       }}
       this.requestParam.data[3] = { 'name': 'updateFTdetailbySort', 'type': 'e', 'parammaps': {
         pastureid: row.pastureid,
@@ -2491,8 +2491,9 @@ export default {
         pastureid: this.table2.getdataListParm.parammaps.pastureid,
         ftid: this.table2.getdataListParm.parammaps.ftid
       }}
-      ExecDataByConfig(this.requestParam).then(response => {
-        console.log('新增保存发送参数', this.requestParam)
+      const url = 'authdata/ftdetail/edit'
+      const data = this.requestParam
+      postJson(url, data).then(response => {
         if (response.msg !== 'fail') {
           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
           this.getList2()
@@ -2502,6 +2503,17 @@ export default {
           this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
         }
       })
+      // ExecDataByConfig(this.requestParam).then(response => {
+      //   console.log('新增保存发送参数', this.requestParam)
+      //   if (response.msg !== 'fail') {
+      //     this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+      //     this.getList2()
+      //     this.getList3()
+      //     this.dropState = false
+      //   } else {
+      //     this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+      //   }
+      // })
     },
     updateCancel2(row) {
       console.log('点击了详情编辑取消')

+ 3 - 0
src/views/statisticalAnalysis/errorAnalysis/pasture/index改.vue

@@ -18,6 +18,9 @@
           <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.projname" class="filter-item" style="width: 100px;" placeholder="车次" />
           <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.times" class="filter-item" style="width: 100px;" placeholder="班次" />
           <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 100px;" placeholder="TMR名称" />
+          <el-select v-if="tab.isTMRName" v-model="tab.table.getdataListParm.parammaps.fname" placeholder="请选择TMR设备" class="filter-item" style="width: 150px;">
+            <el-option v-for="item in statisticalTypeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <el-button class="successBorder" @click="handleSearch">查询</el-button>
           <el-button class="export" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
           <svg-icon icon-class="Up" class="down" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpChart" />