duanxiaoduan 2 gadi atpakaļ
vecāks
revīzija
065bd76d19

BIN
dist.zip


+ 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>

+ 1 - 1
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -16,7 +16,7 @@
       <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;float: left;margin-left: 10px;" @change="changeFrequency">
         <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
-      <el-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录 </el-button>
+      <el-button class="export" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录 </el-button>
     </div>
     <!-- <div class="search">
       <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" @change="changeFrequency">

+ 6 - 6
src/views/formulationPlan/recipeTemplate/index.vue

@@ -399,7 +399,7 @@
           <div class="recipeTemplate">
             <p>配方模板表</p>
           </div>
-          <div class="operation">
+          <div class="operation1">
             <el-date-picker v-model="template.table.getdataListParm.parammaps.date" type="date" placeholder="请选择历史记录时间" :clearable="false" style="width: 180px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeDate" />
             <!-- <el-button class="successBorder" @click="handleApplication">应用</el-button> -->
           </div>
@@ -411,7 +411,7 @@
             <el-select v-model="template.table.getdataListParm.parammaps.fttype" placeholder="配方类型" class="filter-item" style="width: 120px;" clearable>
               <el-option v-for="item in formulaTypeList" :key="item.value" :label="item.label" :value="item.label" />
             </el-select>
-            <el-select v-model="template.table.getdataListParm.parammaps.enable" placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
+            <el-select v-model="template.table.getdataListParm.parammaps.enable" placeholder="是否启用" class="filter-item" style="margin-left:10px;width: 120px;" clearable>
               <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
             </el-select>
             <div ref="selectInput" class="filter-item selectInput">
@@ -430,8 +430,8 @@
                 </li>
               </ul>
             </div>
-            <el-button class="successBorder" @click="handleDialogSearch">查询</el-button>
-            <el-button class="successBorder" @click="handleDialogRefresh">重置</el-button>
+            <el-button class="successBorder" @click="handleDialogSearch" style="margin-left:10px;">查询</el-button>
+            <el-button class="successBorder" @click="handleDialogRefresh" style="margin-left:10px;">重置</el-button>
           </div>
 
           <div class="table">
@@ -3124,8 +3124,8 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-  .search{margin-top:10px;height: 40px;}
-  .operation{height: 50px;}
+  // .search{margin-top:10px;height: 40px;}
+  // .operation{height: 50px;}
   .table{margin-top:5px;}
   .table2{margin-top:10px;}
   $width:350px;

+ 0 - 3117
src/views/formulationPlan/recipeTemplate/index备.vue

@@ -1,3117 +0,0 @@
-<template>
-  <div ref="appContainer" class="app-container">
-    <div ref="myContainer" class="myContainer">
-      <!-- 配方模板表 -->
-      <div ref="template" class="template">
-        <div class="recipeTemplate">
-          <p>配方模板表</p>
-        </div>
-        <div class="search">
-          <el-select v-model="table.getdataListParm.parammaps.ccname" filterable placeholder="牲畜类别" class="filter-item" clearable>
-            <el-option v-for="item in livestockTypeList" :key="item.value" :label="item.label" :value="item.label" />
-          </el-select>
-          <el-select v-model="table.getdataListParm.parammaps.fttype" filterable placeholder="配方类型" class="filter-item" style="width: 120px;" clearable>
-            <el-option v-for="item in formulaTypeList" :key="item.value" :label="item.label" :value="item.label" />
-          </el-select>
-          <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
-            <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
-          <div ref="selectInput" class="filter-item selectInput">
-            <el-input v-model="table.getdataListParm.parammaps.all" type="text" placeholder="请点击选择搜索条件" class="Input" />
-            <i v-if="arrowDown" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
-            <i v-if="arrowUp" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
-            <ul v-if="arrowUp" class="selectUl">
-              <li><a>配方名称</a><el-input v-model="table.getdataListParm.parammaps.tname" clearable style="width: 245px;" /></li>
-              <li><a>备注</a><el-input v-model="table.getdataListParm.parammaps.remark" clearable style="width: 245px;" /></li>
-              <li><a>来源</a><el-input v-model="table.getdataListParm.parammaps.source" clearable style="width: 245px;" /></li>
-              <li>
-                <div style="float: right;">
-                  <el-button class="downminCancel" @click="arrowUp=false;arrowDown=true;">取消</el-button>
-                  <el-button class="miniPrimary" @click="handleSearch">搜索</el-button>
-                </div>
-              </li>
-            </ul>
-          </div>
-          <el-button class="successBorder" @click="handleSearch">查询</el-button>
-          <el-button class="successBorder" @click="handleRefresh">重置</el-button>
-        </div>
-        <div class="operation">
-          <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
-          <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
-          <el-button v-if="isRoleEdit" class="copy" icon="el-icon-copy-document" @click="handleCopy">复制</el-button>
-          <el-upload style="float: right;margin-right: 15px;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
-            <el-button v-if="isRoleEdit" class="export" icon="el-icon-download" style="float: right;">导入</el-button>
-          </el-upload>
-          <el-dropdown style="float: right;">
-            <el-button class="export" icon="el-icon-upload2">导出</el-button>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item @click.native="handleExport(1)">导出模板</el-dropdown-item>
-              <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-          <el-button class="export" style="float: right;" @click="handleRecipeRecord">配方记录</el-button>
-        </div>
-        <div ref="table" class="table">
-          <el-table
-            :key="table.tableKey"
-            v-loading="table.listLoading"
-            element-loading-text="给我一点时间"
-            :data="table.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 98%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            :height="myheight"
-            @row-click="tableRowClick"
-            @selection-change="handleSelectionChange"
-          >
-            <el-table-column type="selection" align="center" width="50" />
-            <el-table-column label="序号" align="center" type="index" width="50px" />
-            <el-table-column label="配方名称" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.tname }}</span>
-                <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tname" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:98%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="配方编码" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.tcode }}</span>
-                <!-- <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:98%;padding:10px 0;" /> -->
-                <el-input v-if="scope.row.Edit" v-model.trim="scope.row.tcode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" disabled maxlength="32" style="width:98%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="配方颜色" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <el-color-picker v-model="scope.row.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" :disabled="scope.row.NoEdit" />
-              </template>
-            </el-table-column>
-            <el-table-column label="牲畜类别" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.ccname }}</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.ccid" filterable placeholder="牲畜类别" class="filter-item" style="width:95%;padding:10px 0;" @change="changeLivestockType">
-                  <el-option v-for="item in livestockTypeList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="配方类型" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.fttype }}</span>
-                <el-select v-if="scope.row.Edit && scope.row.isCreate == true" v-model="scope.row.fttypeid" filterable placeholder="配方类型" class="filter-item" style="width:95%;padding:10px 0;" @change="changeFormulaType">
-                  <el-option v-for="item in formulaTypeList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-                <el-select v-if="scope.row.Edit && scope.row.isUpdateSave == true" v-model="scope.row.fttypeid" disabled filterable placeholder="配方类型" class="filter-item" style="width:95%;padding:10px 0;" @change="changeFormulaType">
-                  <el-option v-for="item in formulaTypeList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="来源" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.source }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.remark }}</span>
-                <el-input v-if="scope.row.Edit" v-model="scope.row.remark" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="255" style="width:95%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="版本号" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.version }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="是否启用" min-width="90px" align="center">
-              <template slot-scope="scope">
-                <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width" fixed="right">
-              <template slot-scope="{row}">
-                <el-button v-if="row.NoEdit && isRoleEdit && ispastureuse==0" icon="el-icon-tickets" class="miniSuccess" @click="handleRowRecipeRecord(row)" />
-                <span v-if="row.NoEdit && isRoleEdit && ispastureuse ==0" icon="el-icon-data-line" class="centerSpan">|</span>
-                <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)" />
-                <span v-if="row.NoEdit && isRoleEdit && ispastureuse ==0" icon="el-icon-data-line" class="centerSpan">|</span>
-                <el-button v-if="row.NoEdit && isRoleEdit && ispastureuse==0" icon="el-icon-data-line" class="miniSuccess" @click="handleFormulationEvaluation(row)" />
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;margin-bottom: 10px;font-size: 14px;">共{{ table.total }}条</span>
-      </div>
-      <!-- 配方详情表 -->
-      <div v-if="isDetail" ref="detail" class="detail">
-        <div class="recipeTemplate">
-          <p>配方详情表</p>
-        </div>
-        <div class="operation">
-          <el-button v-if="isRoleEdit" style="float: left;" icon="el-icon-plus" class="success" @click="handleCreate2">新增</el-button>
-          <el-button v-if="isRoleEdit" style="float: left;" icon="el-icon-delete" class="danger" @click="handleDelete2">删除</el-button>
-          <el-button v-if="isRoleEdit" style="float: left;" class="success" icon="el-icon-takeaway-box" @click="handleSyntheticPremix">合成预混料</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>
-          <div ref="selectInput2" class="filter-item selectInput" style="margin: 0 10px;">
-            <el-input v-model="table2.getdataListParm.parammaps.all" type="text" name="" value="" placeholder="请点击选择搜索条件" class="Input" />
-            <i v-if="arrowDown2" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
-            <i v-if="arrowUp2" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
-            <ul v-if="arrowUp2" class="selectUl">
-              <li>
-                <a style="width: 130px;">饲料名称</a>
-                <el-select v-model="table2.getdataListParm.parammaps.fname" filterable placeholder="" style="width:190px;">
-                  <el-option v-for="item in feedNameList" :key="item.id" :label="item.fname" :value="item.fname" />
-                </el-select>
-              </li>
-              <li><a style="width: 130px;">饲料组名称</a><el-input v-model="table2.getdataListParm.parammaps.feedgroup" style="width: 190px;" /></li>
-              <li><a style="width: 130px;">重量</a><el-input v-model="table2.getdataListParm.parammaps.fweight" style="width: 190px;" /></li>
-              <li>
-                <a style="width: 130px;">搅拌延时</a>
-                <el-select v-model="table2.getdataListParm.parammaps.autosecondname" filterable placeholder="" style="width:190px;" clearable>
-                  <el-option v-for="item in mixingDelayList" :key="item.id" :label="item.name" :value="item.name" />
-                </el-select>
-              </li>
-              <li>
-                <a style="width: 130px;">是否锁定牛头数比例</a>
-                <el-select v-model="table2.getdataListParm.parammaps.islockcount" placeholder="" style="width:190px;" clearable>
-                  <el-option v-for="item in lockBullsList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </li>
-              <li><a style="width: 130px;">顺序</a><el-input v-model="table2.getdataListParm.parammaps.sort" style="width: 190px;" /></li>
-              <li>
-                <div style="float: right;">
-                  <el-button class="downminCancel" @click="arrowUp2=false;arrowDown2=true;">取消</el-button>
-                  <el-button class="miniPrimary" @click="handleSearch2">搜索</el-button>
-                </div>
-              </li>
-            </ul>
-          </div>
-          <el-button class="successBorder" @click="handleSearch2">查询</el-button>
-          <el-button class="successBorder" @click="handleRefresh2">重置</el-button>
-          <el-button class="hide" @click="handleCloseTable2">隐藏</el-button>
-          <el-button v-if="isEnlarge" class="hide2" @click="handleEnlarge">放大</el-button>
-          <el-button v-else class="hide2" @click="handleNarrow">缩小</el-button>
-        </div>
-        <div v-if="isEnlarge" class="table2">
-          <el-table
-            id="table2"
-            ref="table2"
-            :key="table2.tableKey"
-            v-loading="table2.listLoading"
-            element-loading-text="给我一点时间"
-            :data="table2.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 98%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable"
-            row-key="id"
-            show-summary
-            :max-height="220"
-            :summary-method="getSummaries"
-            @selection-change="handleSelectionChange2"
-            @cell-dblclick="celldblclick"
-          >
-            <el-table-column type="selection" width="50" />
-            <el-table-column label="序号" align="center" type="index" width="50px" />
-            <el-table-column label="饲料组" min-width="120px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.groupNoEdit">{{ scope.row.feedgroup }}</span>
-                <el-input v-if="scope.row.groupEdit" v-model="scope.row.feedgroup" :disabled="scope.row.isGroupDisabled" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="饲料名称" min-width="120px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.fname }}</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.fid" filterable placeholder="" class="filter-item" style="width:95%;padding:10px 0;" @change="(value)=> {changeFname(value, scope.row)}">
-                  <el-option v-for="item in feedNameList" :key="item.id" :label="item.fname" :value="item.id" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="重量(KG)" prop="fweight" width="120px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.fweight }}</span>
-                <el-input v-if="scope.row.Edit" v-model="scope.row.fweight" placeholder="重量" step="0.001" type="number" style="width:95%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="搅拌延时(min)" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.autosecond }}</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.autosecond" filterable placeholder="搅拌延时" class="filter-item" style="width:95%;padding:10px 0;">
-                  <el-option v-for="item in mixingDelayList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column v-if="lockCount.isLockCount" label="是否锁定牛头数比例" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit && scope.row.islockcount == '0'">否</span>
-                <span v-if="scope.row.NoEdit && scope.row.islockcount == '1'">是</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.islockcount" placeholder="" class="filter-item" style="width:95%;padding:10px 0;">
-                  <el-option v-for="item in lockBullsList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="顺序" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.sort }}</span>
-                <el-input v-if="scope.row.Edit" v-model="scope.row.sort" step="0.01" type="number" style="width:95%;padding:10px 0;" min-number="0" @blur="blurSort(scope.row)" />
-              </template>
-            </el-table-column>
-
-            <el-table-column label="操作" align="center" width="120" 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="createData2(row)" />
-                <span v-if="row.isCreate && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="row.isCreate && isRoleEdit" class="minCancel" icon="el-icon-close" @click="createCancel2(row)" />
-                <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate2(row)" />
-                <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete2(row)" />
-                <el-button v-if="row.isUpdateSave && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row)" />
-                <span v-if="row.isUpdateSave && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="row.isUpdateSave && isRoleEdit" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
-                <span v-if="parseInt(row.preftid)>0 && row.isUpdateSave==false && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="parseInt(row.preftid)>0 && row.isUpdateSave==false && isRoleEdit" icon="el-icon-connection" class="miniSuccess" @click="handleSplitPremix(row)" />
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <div v-else class="table2">
-          <el-table
-            id="table2"
-            ref="mytable2"
-            :key="table2.tableKey"
-            v-loading="table2.listLoading"
-            element-loading-text="给我一点时间"
-            :data="table2.list"
-            border
-            fit
-            highlight-current-row
-            style="width: 98%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable"
-            row-key="id"
-            show-summary
-            :max-height="enlargeHeight"
-            :summary-method="getSummaries"
-            @selection-change="handleSelectionChange2"
-            @cell-dblclick="celldblclick"
-          >
-            <el-table-column type="selection" width="50" />
-            <el-table-column label="序号" align="center" type="index" width="50px" />
-            <el-table-column label="饲料组" min-width="120px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.groupNoEdit">{{ scope.row.feedgroup }}</span>
-                <el-input v-if="scope.row.groupEdit" v-model="scope.row.feedgroup" :disabled="scope.row.isGroupDisabled" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="饲料名称" min-width="120px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.fname }}</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.fid" filterable placeholder="" class="filter-item" style="width:95%;padding:10px 0;" @change="(value)=> {changeFname(value, scope.row)}">
-                  <el-option v-for="item in feedNameList" :key="item.id" :label="item.fname" :value="item.id" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="重量(KG)" prop="fweight" width="120px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.fweight }}</span>
-                <el-input v-if="scope.row.Edit" v-model="scope.row.fweight" placeholder="重量" step="0.01" type="number" style="width:95%;padding:10px 0;" />
-              </template>
-            </el-table-column>
-            <el-table-column label="搅拌延时(min)" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.autosecond }}</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.autosecond" filterable placeholder="搅拌延时" class="filter-item" style="width:95%;padding:10px 0;">
-                  <el-option v-for="item in mixingDelayList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column v-if="lockCount.isLockCount" label="是否锁定牛头数比例" min-width="80px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit && scope.row.islockcount == '0'">否</span>
-                <span v-if="scope.row.NoEdit && scope.row.islockcount == '1'">是</span>
-                <el-select v-if="scope.row.Edit" v-model="scope.row.islockcount" placeholder="" class="filter-item" style="width:95%;padding:10px 0;">
-                  <el-option v-for="item in lockBullsList" :key="item.id" :label="item.name" :value="item.id" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="顺序" min-width="70px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.NoEdit">{{ scope.row.sort }}</span>
-                <el-input v-if="scope.row.Edit" v-model="scope.row.sort" step="0.01" type="number" style="width:95%;padding:10px 0;" min-number="0" @blur="blurSort(scope.row)" />
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" align="center" width="120" 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="createData2(row)" />
-                <span v-if="row.isCreate && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="row.isCreate && isRoleEdit" class="minCancel" icon="el-icon-close" @click="createCancel2(row)" />
-                <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate2(row)" />
-                <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete2(row)" />
-                <el-button v-if="row.isUpdateSave && isRoleEdit" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData2(row)" />
-                <span v-if="row.isUpdateSave && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="row.isUpdateSave && isRoleEdit" class="minCancel" icon="el-icon-close" @click="updateCancel2(row)" />
-                <span v-if="parseInt(row.preftid)>0 && row.isUpdateSave==false && isRoleEdit" class="centerSpan">|</span>
-                <el-button v-if="parseInt(row.preftid)>0 && row.isUpdateSave==false && isRoleEdit" icon="el-icon-connection" class="miniSuccess" @click="handleSplitPremix(row)" />
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </div>
-    </div>
-    <!-- 配方模板表 -->
-    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="template.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[template.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="dialogMinHeight" style="overflow-y: auto;margin-bottom: 0px;overflow-x: hidden;">
-        <div ref="templateDialog" class="templateDialog">
-          <div class="recipeTemplate">
-            <p>配方模板表</p>
-          </div>
-          <div class="operation">
-            <el-date-picker v-model="template.table.getdataListParm.parammaps.date" type="date" placeholder="请选择历史记录时间" :clearable="false" style="width: 180px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeDate" />
-            <!-- <el-button class="successBorder" @click="handleApplication">应用</el-button> -->
-          </div>
-
-          <div class="search">
-            <el-select v-model="template.table.getdataListParm.parammaps.ccname" placeholder="牲畜类别" class="filter-item" clearable>
-              <el-option v-for="item in livestockTypeList" :key="item.value" :label="item.label" :value="item.label" />
-            </el-select>
-            <el-select v-model="template.table.getdataListParm.parammaps.fttype" placeholder="配方类型" class="filter-item" style="width: 120px;" clearable>
-              <el-option v-for="item in formulaTypeList" :key="item.value" :label="item.label" :value="item.label" />
-            </el-select>
-            <el-select v-model="template.table.getdataListParm.parammaps.enable" placeholder="是否启用" class="filter-item" style="width: 120px;" clearable>
-              <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
-            </el-select>
-            <div ref="selectInput" class="filter-item selectInput">
-              <el-input type="text" name="" value="" placeholder="请点击选择搜索条件" class="Input" />
-              <i v-if="arrowDown" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
-              <i v-if="arrowUp" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
-              <ul v-if="arrowUp" class="selectUl">
-                <li><a>配方名称</a><el-input v-model="template.table.getdataListParm.parammaps.tname" style="width: 245px;" /></li>
-                <li><a>备注</a><el-input v-model="template.table.getdataListParm.parammaps.remark" style="width: 245px;" /></li>
-                <li><a>来源</a><el-input v-model="template.table.getdataListParm.parammaps.source" style="width: 245px;" /></li>
-                <li>
-                  <div style="float: right;">
-                    <el-button class="downminCancel" @click="arrowUp=false;arrowDown=true;">取消</el-button>
-                    <el-button class="miniPrimary" @click="handleDialogSearch">搜索</el-button>
-                  </div>
-                </li>
-              </ul>
-            </div>
-            <el-button class="successBorder" @click="handleDialogSearch">查询</el-button>
-            <el-button class="successBorder" @click="handleDialogRefresh">重置</el-button>
-          </div>
-
-          <div class="table">
-            <el-table
-              :key="template.table.tableKey"
-              v-loading="template.table.listLoading"
-              element-loading-text="给我一点时间"
-              :data="template.table.list"
-              border
-              fit
-              highlight-current-row
-              style="width: 98%;"
-              :row-style="rowStyle"
-              :height="myheight2"
-              :cell-style="cellStyle"
-              class="elTable table-fixed"
-              @row-click="tableRowClickDialog"
-            >
-              <el-table-column v-if="template.dialogStatus == 'RecipeRecord'" label="序号" align="center" type="index" width="50px" />
-              <el-table-column v-else label="序号" align="center" type="index" width="50px">
-                <template slot-scope="scope">
-                  <span>{{ scope.$index + (template.table.pageNum-1) * template.table.pageSize + 1 }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="配方名称" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.tname }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="配方编码" min-width="90px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.tcode }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="配方颜色" min-width="110px" align="center">
-                <template slot-scope="scope">
-                  <el-color-picker v-model="scope.row.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" />
-                </template>
-              </el-table-column>
-              <el-table-column label="牲畜类别" min-width="110px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.ccname }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="配方类型" min-width="110px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.fttype }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="来源" min-width="90px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.source }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="备注" min-width="90px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.remark }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="版本号" min-width="90px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.version }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="版本时间" min-width="90px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.versiontime }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="是否启用" min-width="90px" align="center">
-                <template slot-scope="scope">
-                  <el-switch v-model="scope.row.enable" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </div>
-
-        <div v-if="isDetailDialog" id="detailDialog2" ref="detailDialog2" class="detailDialog" style="margin-top: 30px;height: 200px;overflow-y: auto;overflow-x: hidden;">
-          <div class="recipeTemplate">
-            <p>配方详情表</p>
-          </div>
-          <div class="operation">
-            <div ref="selectInput2" class="filter-item selectInput">
-              <el-input type="text" name="" value="" placeholder="请点击选择搜索条件" class="Input" />
-              <i v-if="arrowDown2" icon="el-icon-arrow-down" class="el-icon-arrow-down" />
-              <i v-if="arrowUp2" icon="el-icon-arrow-up" class="el-icon-arrow-up" />
-              <ul v-if="arrowUp2" class="selectUl">
-                <li>
-                  <a style="width: 130px;">饲料名称</a>
-                  <el-select v-model="template.table2.getdataListParm.parammaps.fname" filterable placeholder="" style="width:245px;">
-                    <el-option v-for="item in feedNameList" :key="item.id" :label="item.fname" :value="item.fname" />
-                  </el-select>
-                </li>
-                <li><a style="width: 130px;">饲料组名称</a><el-input v-model="template.table2.getdataListParm.parammaps.feedgroup" style="width: 245px;" /></li>
-                <li><a style="width: 130px;">重量</a><el-input v-model="template.table2.getdataListParm.parammaps.fweight" style="width: 245px;" /></li>
-                <li>
-                  <a style="width: 130px;">搅拌延时</a>
-                  <el-select v-model="template.table2.getdataListParm.parammaps.autosecondname" filterable placeholder="" style="width:245px;">
-                    <el-option v-for="item in mixingDelayList" :key="item.id" :label="item.name" :value="item.name" />
-                  </el-select>
-                </li>
-                <li>
-                  <a style="width: 130px;">是否锁定牛头数比例</a>
-                  <el-select v-model="template.table2.getdataListParm.parammaps.islockcount" placeholder="" style="width:245px;">
-                    <el-option v-for="item in lockBullsList" :key="item.id" :label="item.name" :value="item.id" />
-                  </el-select>
-                </li>
-                <li><a style="width: 130px;">顺序</a><el-input v-model="template.table2.getdataListParm.parammaps.sort" style="width: 245px;" /></li>
-                <li>
-                  <div style="float: right;">
-                    <el-button class="downminCancel" @click="arrowUp2=false;arrowDown2=true;">取消</el-button>
-                    <el-button class="miniPrimary" @click="handleDialogSearch2">搜索</el-button>
-                  </div>
-                </li>
-              </ul>
-            </div>
-            <el-button class="successBorder" @click="handleDialogSearch2">查询</el-button>
-            <el-button class="successBorder" @click="handleDialogRefresh2">重置</el-button>
-            <el-button class="hide" @click="handleDialogCloseTable2">隐藏</el-button>
-          </div>
-
-          <div class="table2">
-            <el-table
-              id="templateTable2"
-              :key="template.table2.tableKey"
-              v-loading="template.table2.listLoading"
-              element-loading-text="给我一点时间"
-              :data="template.table2.list"
-              border
-              fit
-              highlight-current-row
-              style="width: 98%;"
-              :summary-method="getTemplateTable2Summaries"
-              show-summary
-              :row-style="rowStyle"
-              :cell-style="cellStyle"
-              class="elTable table-fixed"
-              row-key="id"
-            >
-              <el-table-column label="饲料组" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.feedgroup }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="饲料名称" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.fname }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="重量(KG)" prop="fweight" min-width="200px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.fweight }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="搅拌延时(min)" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.autosecondname }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="是否锁定牛头数比例" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span v-if="scope.row.islockcount == '0'">否</span>
-                  <span v-if="scope.row.islockcount == '1'">是</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="顺序" min-width="130px" align="center">
-                <template slot-scope="scope">
-                  <span>{{ scope.row.sort }}</span>
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </div>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button class="cancelClose cancelClose1" @click="template.dialogFormVisible = false; ">关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 合成预混料 -->
-    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="detail.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[detail.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="detailDialog">
-        <h2>饲料</h2>
-        <div class="table1">
-          <el-table
-            :key="detail.tableKey"
-            v-loading="detail.listLoading"
-            element-loading-text="给我一点时间"
-            :data="detail.list"
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-            show-summary
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px" />
-            <el-table-column label="饲料名称" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.fname }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="fweight" label="重量(KG)" />
-            <el-table-column label="搅拌延时(min)" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.autosecond }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column v-if="lockCount.isLockCount" label="是否锁定牛头数比例" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <span v-if="scope.row.islockcount == '0'">否</span>
-                <span v-if="scope.row.islockcount == '1'">是</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="顺序" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.sort }}</span>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <h2>合成预混料</h2>
-        <div class="table2" style="margin-bottom: 50px;">
-          <el-table
-            :key="detail.tableKey2"
-            v-loading="detail.listLoading2"
-            element-loading-text="给我一点时间"
-            :data="detail.list2"
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-          >
-            <el-table-column label="配方名称" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.tname" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" :disabled="detail.disabled" />
-              </template>
-            </el-table-column>
-            <el-table-column label="配方颜色" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <el-color-picker v-model="scope.row.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" :disabled="detail.disabled" />
-              </template>
-            </el-table-column>
-            <el-table-column label="牲畜类别" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <el-select v-model="scope.row.ccid" placeholder="选择牲畜父类" class="filter-item" style="width:95%;padding:10px 0;" :disabled="detail.disabled" @change="changeLivestockType2">
-                  <el-option v-for="item in livestockTypeList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column label="配方类型" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.fttype }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="来源" min-width="110px" align="center">
-              <template slot-scope="scope">
-                <span>{{ scope.row.source }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.remark" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" :disabled="detail.disabled" />
-              </template>
-            </el-table-column>
-            <el-table-column label="是否启用" min-width="130px" align="center">
-              <template slot-scope="scope">
-                <el-switch v-model="scope.row.enable" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" :disabled="detail.disabled" />
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <div slot="footer" class="dialog-footer">
-          <el-button class="cancelClose" @click="detail.dialogFormVisible = false; ">关闭</el-button>
-          <el-button class="save" :disabled="isokDisable" @click="syntheticPremixData()">确认</el-button>
-        </div>
-      </div>
-    </el-dialog>
-    <!-- 历史记录 -->
-    <el-dialog :title="textMap[historyRecord.dialogStatus]" :destroy-on-close="true" :visible.sync="historyRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <div class="historyRecord">
-        <keep-alive>
-          <component :is="historyRecord.myComponent" ref="historyRecord" />
-        </keep-alive>
-      </div>
-      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
-        <el-button class="cancelClose1" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 行内配方记录 -->
-    <el-dialog :title="textMap[rowRecipeRecord.dialogStatus]" :destroy-on-close="true" :visible.sync="rowRecipeRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
-      <div class="rowRecipeRecord">
-        <div class="search">
-          <el-date-picker ref="inputDatetime" v-model="rowRecipeRecord.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-          <el-button class="successBorder" @click="handleRowRecipeRecordSearch">查询</el-button>
-        </div>
-        <div class="table">
-          <el-table
-            :key="rowRecipeRecord.tableKey"
-            v-loading="rowRecipeRecord.listLoading"
-            element-loading-text="给我一点时间"
-            :data="rowRecipeRecord.list"
-            border
-            highlight-current-row
-            style="width: 100%;"
-            :row-style="rowStyle"
-            :cell-style="cellStyle"
-            class="elTable table-fixed"
-          >
-            <el-table-column label="序号" align="center" type="index" width="50px">
-              <template slot-scope="scope">
-                <span>{{ scope.$index + (rowRecipeRecord.pageNum-1) * rowRecipeRecord.pageSize + 1 }}</span>
-              </template>
-            </el-table-column>
-            <!-- <el-table-column label="序号" width="60px" align="center" prop="sort" /> -->
-            <el-table-column label="修改时间" width="100px" align="center" prop="datetime1" />
-            <el-table-column label="饲料名称(单位:kg)" min-width="800px" align="center">
-              <template slot-scope="scope">
-                <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item" style="width:150px;float: left;margin: 5px 5px;padding: 0;height: 30px;">
-                  <el-tooltip v-if="element.change== 'red'" placement="top">
-                    <div slot="content">{{ element.name }}( {{ element.weight }} / {{ element.Eweight }} )</div>
-                    <span :style="{'color':element.change}" style="display: block;height:30px;line-height: 30px;">
-                      {{ element.name }}( {{ element.weight }} / {{ element.Eweight }} )
-                    </span>
-                  </el-tooltip>
-                  <el-tooltip v-else placement="top">
-                    <div slot="content">{{ element.name }}( {{ element.weight }} )</div>
-                    <span :style="{'color':element.change}" style="display: block;height:30px;line-height: 30px;">
-                      {{ element.name }}( {{ element.weight }})
-                    </span>
-                  </el-tooltip>
-                </div>
-              </template>
-            </el-table-column>
-          </el-table>
-          <pagination v-show="rowRecipeRecord.total>=0" :total="rowRecipeRecord.total" :page.sync="rowRecipeRecord.getdataListParm.offset" :limit.sync="rowRecipeRecord.getdataListParm.pagecount" @pagination="getRowRecipeRecordList()" />
-        </div>
-      </div>
-      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
-        <el-button class="cancelClose1" @click="rowRecipeRecord.dialogFormVisible = false; ">关闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { GetDataByName, GetDataByNames, PostDataByName, failproccess, checkButtons, postJson, ExecDataByConfig, formatNum } from '@/api/common'
-import Sortable from 'sortablejs'
-import { MessageBox } from 'element-ui'
-import Cookies from 'js-cookie'
-import { json2excel } from '@/utils/index.js'
-import axios from 'axios'
-import { getToken } from '@/utils/auth'
-import { parseTime } from '@/utils/index.js'
-import Pagination from '@/components/Pagination'
-export default {
-  name: 'RecipeTemplate',
-  components: { Pagination },
-  data() {
-    return {
-      dialogFull: false,
-      predefineColors: [
-        '#E57373', '#F06292', '#BA68C8', '#9575CD', '#7986CB', '#64B5F6', '#4FC3F7', '#4DD0E1', '#4DB6AC', '#81C784', '#AED581', '#DCE775', '#FFF176', '#FFD54F', '#FFB74D', '#FF8A65', '#A1887F', '#E0E0E0', '#90A4AE'
-      ],
-      isRoleEdit: [],
-      myheight: '',
-      requestParams: [
-        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] },
-        { name: 'getDictByName2', offset: 0, pagecount: 0, params: ['配方类型'] },
-        { name: 'getFeedAndPre', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
-      ],
-      enableList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 是否启用
-      lockBullsList: [{ id: '0', name: '否' }, { id: '1', name: '是' }], // 是否锁定牛头数比例
-      livestockTypeList: [], // 牲畜类别
-      formulaTypeList: [], // 配方类型
-      feedNameList: [], // 饲料名称
-      mixingDelayList: [{ id: '0', name: '0' }, { id: '1', name: '1' }, { id: '2', name: '2' }, { id: '3', name: '3' }, { id: '4', name: '4' }, { id: '5', name: '5' }, { id: '6', name: '6' }, { id: '7', name: '7' }, { id: '8', name: '8' }, { id: '9', name: '9' }, { id: '10', name: '10' }, { id: '11', name: '11' }, { id: '12', name: '12' }, { id: '13', name: '13' }, { id: '14', name: '14' }, { id: '15', name: '15' }], // 搅拌延时
-      selectHistoryTimeList: [{ id: 0, name: '2020-06-10' }, { id: 1, name: '2020-06-11' }, { id: 2, name: '2020-06-12' }, { id: 3, name: '2020-06-13' }], // 请选择历史记录时间
-      sourceList: [{ id: 0, name: '自定义' }, { id: 1, name: '集团下发' }, { id: 2, name: '导入' }], // 导入
-
-      arrowDown: true,
-      arrowUp: false,
-      ispastureuse: Cookies.get('ispastureuse'),
-      table: {
-        getdataListParm: {
-          name: 'getFTList',
-          page: 1,
-          offset: 1,
-          pagecount: '',
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            tname: '',
-            ccid: '',
-            ccname: '',
-            fttypeid: '',
-            fttype: '',
-            remark: '',
-            enable: '',
-            source: ''
-          }
-        },
-        tableKey: 0,
-        list: [],
-        total: 0,
-        listLoading: true,
-        temp: {}
-      },
-      lockCount: {
-        getdataListParm: {
-          name: 'getSysoptEnable',
-          page: 1,
-          offset: 1,
-          pagecount: 30,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            inforname: 'isLockCount'
-          }
-        },
-        isLockCount: false // 是否显示是否锁定牛头数比例
-      },
-      isDetail: false,
-      arrowDown2: true,
-      arrowUp2: false,
-      table2: {
-        getDryweightParm: {
-          name: 'getFTdryweight',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: '',
-            ftid: ''
-          }
-        },
-        dryweight: '',
-        getdataListParm: {
-          name: 'getFTdetailList',
-          page: 1,
-          offset: 1,
-          pagecount: '',
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            fname: '',
-            feedgroup: '',
-            fweight: '',
-            autosecondname: '',
-            islockcount: '',
-            sort: ''
-          }
-        },
-        tableKey: 0,
-        list: [],
-        total: 0,
-        listLoading: true,
-        temp: {},
-        updateList: {}
-      },
-      isDetailDialog: false,
-      template: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        table: {
-          getdataListParm: {
-            name: 'getFTListDate',
-            page: 1,
-            offset: 1,
-            pagecount: '',
-            returntype: 'Map',
-            parammaps: {
-              pastureid: Cookies.get('pastureid'),
-              tname: '',
-              ccid: '',
-              ccname: '',
-              fttype: '',
-              remark: '',
-              enable: '',
-              date: '',
-              source: ''
-            }
-          },
-          tableKey: 0,
-          total: 0,
-          listLoading: true,
-          list: []
-        },
-        table2: {
-          getdataListParm: {
-            name: 'getFTdetailListDate',
-            page: 1,
-            offset: 1,
-            pagecount: 10,
-            returntype: 'Map',
-            parammaps: {
-              pastureid: Cookies.get('pastureid'),
-              fname: '',
-              fweight: '',
-              islockcount: '',
-              sort: '',
-              feedgroup: '',
-              autosecondname: ''
-            }
-          },
-          tableKey: 0,
-          total: 0,
-          listLoading: true,
-          list: []
-        },
-        // 历史日期
-        getdataDateParm: {
-          name: 'getFTMaxDate',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid')
-          }
-        }
-      },
-
-      isOrder: true,
-      detail: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        tableKey: 0,
-        total: 0,
-        listLoading: true,
-        list: [],
-        tableKey2: 0,
-        total2: 0,
-        listLoading2: false,
-        list2: [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }],
-        getdataListParm: {
-          name: 'getFTDetailCompare',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {}
-        },
-        list3: [],
-        disabled: false,
-        getdataListParm2: {
-          name: 'getFTCompare',
-          page: 1,
-          offset: 1,
-          pagecount: 10,
-          returntype: 'Map',
-          parammaps: {}
-        }
-      },
-      selectList: [],
-      selectList2: [],
-      textMap: {
-        RecipeRecord: '配方记录',
-        SyntheticPremix: '合成预混料',
-        historyRecord: '历史记录',
-        detail: '饲料详情',
-        rowRecipeRecordTxt: '配方修改记录'
-      },
-
-      requestParam: {},
-      requestParam2: {},
-      download: {
-        getdataListParm: {
-          name: 'getFTList',
-          page: 1,
-          offset: 1,
-          pagecount: 0,
-          returntype: 'Map',
-          parammaps: {
-            pastureid: Cookies.get('pastureid'),
-            tname: '',
-            ccid: '',
-            ccname: '',
-            fttypeid: '',
-            fttype: '',
-            remark: '',
-            enable: ''
-          }
-        },
-        list: []
-      },
-      historyRecord: {
-        dialogStatus: '',
-        dialogFormVisible: false
-      },
-      isokDisable: false,
-      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      dropState: false,
-      myheight2: 0,
-      height: 0,
-      rowRecipeRecord: {
-        dialogStatus: '',
-        dialogFormVisible: false,
-        getdataListParm: {
-          name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
-          parammaps: { inputDatetime: '', pastureid: '', fitid: '' }
-        },
-        tableKey: 0, total: 0, listLoading: true, list: []
-      },
-      isEnlarge: true,
-      // enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
-      enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
-      getTcodeParm: {
-        name: 'getTcode', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
-        parammaps: { pastureid: '', fttypeid: '' }
-      }
-    }
-  },
-  computed: {
-    // 设置请求头
-    headers() {
-      return {
-        token: getToken()
-      }
-    },
-    uploadData() {
-      return {
-        name: 'checkfttype,checkbigcowclass,checkFeed,insertFTUpload,insertFTdetailUpload',
-        importParams: '配方名称,牲畜类别,配方类型,备注,饲料组,饲料名称,重量(kg),搅拌延时(min),是否锁定牛头数比例',
-        sheetname: 'Sheet1',
-        // 登录牧场
-        pastureid: Cookies.get('pastureid'),
-        // 日期参数
-        dateParams: '',
-        // 必填参数
-        requiredParams: '配方名称,牲畜类别,配方类型,饲料名称,重量(kg),搅拌延时(min),是否锁定牛头数比例',
-        // 为数值的参数
-        numParams: '重量(kg),搅拌延时(min)'
-      }
-    },
-    // 设置上传地址
-    uploadExcelUrl() {
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
-    }
-  },
-  mounted() {
-    document.addEventListener('click', (e) => {
-      if (this.$refs.selectInput !== undefined) {
-        if (!this.$refs.selectInput.contains(e.target)) {
-          this.arrowDown = true
-          this.arrowUp = false
-        } else {
-          this.arrowDown = false
-          this.arrowUp = true
-        }
-      }
-      if (this.$refs.selectInput2 !== undefined) {
-        if (!this.$refs.selectInput2.contains(e.target)) {
-          this.arrowDown2 = true
-          this.arrowUp2 = false
-        } else {
-          this.arrowDown2 = false
-          this.arrowUp2 = true
-        }
-      }
-    })
-  },
-  created() {
-    this.getList()
-    this.getButtons()
-    this.getDownList()
-    this.getIsLockCount()
-  },
-  methods: {
-    getButtons() {
-      const Edit = 'FormulationEvaluation'
-      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
-      this.isRoleEdit = isRoleEdit
-    },
-    getSummaries(param) {
-      const { columns, data } = param
-      const sums = []
-      columns.forEach((column, index) => {
-        if (index === 0) {
-          sums[index] = '合计'
-          return
-        }
-        if (column.property !== undefined) {
-          // 加了prop属性的el-table-column 才能找到column.property
-          const values = data.map(item => Number(item[column.property]))
-          if (!values.every(value => isNaN(value))) {
-            sums[index] = values.reduce((prev, curr) => {
-              const value = Number(curr)
-              if (!isNaN(value)) {
-                return prev + curr // 多行相加
-              } else {
-                return prev
-              }
-            }, 0)
-            sums[index] = sums[index].toFixed(3) + '(干物质量:' + this.table2.dryweight + ')'
-          } else {
-            sums[index] = ''
-          }
-        }
-      })
-      // console.log(sums, 'sums[index]')
-      return sums
-    },
-    getDryWeight() {
-      GetDataByName(this.table2.getDryweightParm).then(response => {
-        console.log('干物质数据', response.data.list)
-        if (response.data.list[0].dryweight !== undefined) {
-          this.table2.dryweight = response.data.list[0].dryweight
-        } else {
-          this.table2.dryweight = ''
-        }
-      })
-    },
-    getTemplateTable2Summaries(param) {
-      const { columns, data } = param
-      const sums = []
-      columns.forEach((column, index) => {
-        if (index === 0) {
-          sums[index] = '合计'
-          return
-        }
-        const values = data.map(item => Number(item[column.property]))
-        if (!values.every(value => isNaN(value))) {
-          sums[index] = values.reduce((prev, curr) => {
-            const value = Number(curr)
-            if (!isNaN(value)) {
-              return prev + curr
-            } else {
-              return prev
-            }
-          }, 0)
-          // 后台待发
-          sums[index] += '(干物质量:' + this.template.table2.getdataListParm.parammaps.dryweight + ')'
-        } else {
-          sums[index] = ''
-        }
-      })
-      return sums
-    },
-    getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
-        this.livestockTypeList = response.data.getDictByName.list
-        this.formulaTypeList = response.data.getDictByName2.list
-        this.feedNameList = response.data.getFeedAndPre.list
-      })
-    },
-    // -------------------模板-----------------------------
-    getList() {
-      this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
-        console.log('配方模板table数据', response.data.list)
-        if (response.data.list !== null) {
-          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.table.list = response.data.list
-          this.table.pageNum = response.data.pageNum
-          this.table.pageSize = response.data.pageSize
-          this.table.total = response.data.total
-        } else {
-          this.table.list = []
-          this.isDetail = false
-        }
-        setTimeout(() => {
-          this.table.listLoading = false
-        }, 100)
-      })
-    },
-    getList3() {
-      this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          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.table.list = response.data.list
-          this.table.pageNum = response.data.pageNum
-          this.table.pageSize = response.data.pageSize
-          this.table.total = response.data.total
-        } else {
-          this.table.list = []
-          this.isDetail = false
-        }
-        setTimeout(() => {
-          this.table.listLoading = false
-        }, 100)
-      })
-    },
-    handleSearch() {
-      console.log('点击了查询')
-      this.table.getdataListParm.offset = 1
-      this.getList()
-      this.table.getdataListParm.parammaps.all = ''
-      var obj = {}
-      obj.tname = this.table.getdataListParm.parammaps.tname
-      obj.remark = this.table.getdataListParm.parammaps.remark
-      obj.source = this.table.getdataListParm.parammaps.source
-      Object.getOwnPropertyNames(obj).forEach((key) => {
-        console.log(key, obj[key])
-        if (obj[key] !== '') {
-          this.table.getdataListParm.parammaps.all += obj[key] + '/'
-        }
-      })
-      if (this.table.getdataListParm.parammaps.all.charAt(this.table.getdataListParm.parammaps.all.length - 1) == '/') {
-        this.table.getdataListParm.parammaps.all = this.table.getdataListParm.parammaps.all.slice(0, this.table.getdataListParm.parammaps.all.length - 1)
-      }
-      this.arrowDown = true
-      this.arrowUp = false
-    },
-    handleRefresh() {
-      console.log('点击了重置')
-      this.table.getdataListParm.offset = 1
-      this.table.getdataListParm.parammaps.ccid = ''
-      this.table.getdataListParm.parammaps.ccname = ''
-      this.table.getdataListParm.parammaps.fttype = ''
-      this.table.getdataListParm.parammaps.tname = ''
-      this.table.getdataListParm.parammaps.remark = ''
-      this.table.getdataListParm.parammaps.enable = ''
-      this.table.getdataListParm.parammaps.source = ''
-      this.table.getdataListParm.parammaps.all = ''
-      this.getList()
-    },
-
-    // 模板新增
-    handleCreate() {
-      // 编辑true/不可编辑false
-      // 新增操true,编辑false,编辑保存false
-      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
-        }
-      }
-      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'tname': '', tcode: '', 'tcolor': '#ccc', 'ccid': '', 'ccname': '', 'fttype': '', 'fttypeid': '', 'source': '自定义', 'remark': '' })
-      console.log('点击了新增this.table.list====>', this.table.list)
-      this.table.temp = this.table.list[0]
-      this.getTcodeList()
-    },
-    getTcodeList() {
-      this.getTcodeParm.parammaps.pastureid = Cookies.get('pastureid')
-      console.log(this.table.temp, 'this.table.temp')
-      GetDataByName(this.getTcodeParm).then(response => {
-        if (response.data.list !== null) {
-          this.table.temp.tcode = response.data.list[0].tcode
-        } else {
-          this.table.temp.tcode = ''
-        }
-      })
-    },
-    // 畜生类别
-    changeLivestockType(item) {
-      this.table.temp.ccname = this.livestockTypeList.find(obj => obj.value === item).label
-    },
-    // 配方类型
-    changeFormulaType(item) {
-      this.table.temp.fttype = this.formulaTypeList.find(obj => obj.value === item).label
-    },
-    createData(row) {
-      console.log('点击了新增保存', row)
-      this.table.temp.tname = row.tname
-      this.table.temp.tcode = row.tcode
-      this.table.temp.tcolor = row.tcolor
-      this.table.temp.ccid = row.ccid
-      this.table.temp.ccname = this.table.temp.ccname
-      this.table.temp.fttype = this.table.temp.fttype
-      this.table.temp.fttypeid = row.fttypeid
-      this.table.temp.source = row.source
-      this.table.temp.remark = row.remark
-      this.table.temp.enable = row.enable
-      this.table.temp.pastureid = Cookies.get('pastureid')
-      if (this.table.temp.tname == '' && this.table.temp.ccid == '' && this.table.temp.fttypeid == '') {
-        this.$message({ type: 'error', message: '配方名称/牲畜类别/配方类型不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.ccid == '' && this.table.temp.fttypeid == '') {
-        this.$message({ type: 'error', message: '牲畜类别/配方类型不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.tname == '') {
-        this.$message({ type: 'error', message: '配方名称不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.ccid == '') {
-        this.$message({ type: 'error', message: '牲畜类别不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.fttypeid == '') {
-        this.$message({ type: 'error', message: '配方类型不能为空', duration: 2000 })
-        return false
-      }
-      const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
-      // if (pattern.test(this.table.temp.tname)) {
-      //   this.$message({ type: 'error', message: '配方名称不可输入特殊字符', duration: 2000 })
-      //   return false
-      // }
-      if (pattern.test(this.table.temp.tcode)) {
-        this.$message({ type: 'error', message: '配方编码不可输入特殊字符', duration: 2000 })
-        return false
-      }
-      console.log(this.table.temp)
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.requestParam2.name = 'checkNumber'
-      this.requestParam2.parammaps = {}
-      this.requestParam2.parammaps.number = this.table.temp.tcode
-      GetDataByName(this.requestParam2).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list[0].vmsg !== '输入非法字符') {
-          this.saveCreateData()
-        } else {
-          this.$notify({ type: 'error', message: '配方编码不可输入特殊字符', duration: 2000 })
-        }
-      })
-    },
-    saveCreateData() {
-      this.requestParam.name = 'insertFT'
-      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.getList()
-        } else {
-          const isRepeat = new RegExp('Duplicate entry :feedtemplet.tCode')
-          if (isRepeat.test(response.data)) {
-            this.$notify({ type: 'error', message: '配方编码不可重复,请重新录入', duration: 2000 })
-          } else {
-            this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-          }
-        }
-      })
-    },
-    createCancel(row) {
-      console.log('点击了新增取消')
-      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)
-          return
-        }
-      }
-    },
-
-    // 模板编辑
-    handleUpdate(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
-      if (row.ccname !== undefined) {
-        row.ccid = String(row.ccid)
-      }
-      this.table.temp.ccname = row.ccname
-      row.fttypeid = String(row.fttypeid)
-      this.table.temp.fttype = row.fttype
-    },
-    updateData(row) {
-      console.log('点击了编辑保存', row)
-      this.table.temp.tname = row.tname
-      this.table.temp.tcode = row.tcode
-      this.table.temp.tcolor = row.tcolor
-      this.table.temp.ccid = row.ccid
-      this.table.temp.fttypeid = row.fttypeid
-      this.table.temp.source = row.source
-      this.table.temp.remark = row.remark
-      this.table.temp.enable = row.enable
-      this.table.temp.ccname = this.table.temp.ccname
-      this.table.temp.fttype = this.table.temp.fttype
-      this.table.temp.pastureid = row.pastureid
-      this.table.temp.id = row.id
-      if (this.table.temp.tname == '' && this.table.temp.ccid == '' && this.table.temp.fttypeid == '') {
-        this.$message({ type: 'error', message: '配方名称/牲畜类别/配方类型不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.ccid == '' && this.table.temp.fttypeid == '') {
-        this.$message({ type: 'error', message: '牲畜类别/配方类型不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.tname == '') {
-        this.$message({ type: 'error', message: '配方名称不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.ccid == '') {
-        this.$message({ type: 'error', message: '牲畜类别不能为空', duration: 2000 })
-        return false
-      } else if (this.table.temp.fttypeid == '') {
-        this.$message({ type: 'error', message: '配方类型不能为空', duration: 2000 })
-        return false
-      }
-      const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
-      // if (pattern.test(this.table.temp.tname)) {
-      //   this.$message({ type: 'error', message: '配方名称不可输入特殊字符', duration: 2000 })
-      //   return false
-      // }
-      if (pattern.test(this.table.temp.tcode)) {
-        this.$message({ type: 'error', message: '配方编码不可输入特殊字符', duration: 2000 })
-        return false
-      }
-      console.log(this.table.temp)
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.requestParam2.name = 'checkNumber'
-      this.requestParam2.parammaps = {}
-      this.requestParam2.parammaps.number = this.table.temp.tcode
-      GetDataByName(this.requestParam2).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list[0].vmsg !== '输入非法字符') {
-          this.saveUpdateData()
-        } else {
-          this.$notify({ type: 'error', message: '配方编码不可输入特殊字符', duration: 2000 })
-        }
-      })
-    },
-    saveUpdateData() {
-      this.requestParam.name = 'updateFT'
-      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.getList()
-        } else {
-          const isRepeat = new RegExp('Duplicate entry :feedtemplet.tCode')
-          if (isRepeat.test(response.data)) {
-            this.$notify({ type: 'error', message: '配方编码不可重复,请重新录入', duration: 2000 })
-          } 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.getList()
-    },
-
-    // 删除
-    handleRowDelete(row) {
-      console.log('点击了行内删除')
-      MessageBox.confirm('是否确认删除此信息?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.requestParam.common = { 'returnmap': '0' }
-        this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'checkdeleteFT', 'type': 'v', 'parammaps': {
-          pastureid: row.pastureid,
-          id: row.id
-        }}
-        this.requestParam.data[1] = { 'name': 'deleteFT', 'type': 'e', 'parammaps': {
-          pastureid: row.pastureid,
-          id: row.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.getList()
-            this.isDetail = false
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消删除' })
-      })
-    },
-    handleSelectionChange(val) {
-      console.log('勾选数据', val)
-      this.selectList = val
-    },
-    handleDelete() {
-      console.log('点击了删除')
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择配方', duration: 2000 })
-      } else {
-        MessageBox.confirm('是否确认删除此信息?', {
-          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-        }).then(() => {
-          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': 'checkdeleteFT', 'type': 'v', 'parammaps': {
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          this.requestParam.data[0].children[1] = { 'name': 'deleteFT', '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.getList()
-            }
-          })
-        })
-      }
-    },
-
-    // 复制
-    handleCopy() {
-      if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: '请选择配方', duration: 2000 })
-      } else {
-        MessageBox.confirm('是否确认复制此信息?', {
-          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-        }).then(() => {
-          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': 'copyFT', 'type': 'e', 'parammaps': {
-            ftid: '@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.getList()
-            }
-          })
-        })
-      }
-    },
-
-    // 配方记录
-    handleRecipeRecord() {
-      console.log('点击了配方记录')
-      this.template.dialogStatus = 'RecipeRecord'
-      this.dialogFull = false
-      this.template.dialogFormVisible = true
-      this.template.table.getdataListParm.parammaps.ccname = ''
-      this.template.table.getdataListParm.parammaps.fttype = ''
-      this.template.table.getdataListParm.parammaps.enable = ''
-      this.template.table.getdataListParm.parammaps.tname = ''
-      this.template.table.getdataListParm.parammaps.remark = ''
-      this.template.table.getdataListParm.parammaps.source = ''
-      this.template.table.getdataListParm.offset = 1
-      this.getDateList()
-      this.isDetailDialog = false
-      this.myheight2 = document.documentElement.clientHeight - 85 - 265
-    },
-    // 历史时间
-    getDateList() {
-      GetDataByName(this.template.getdataDateParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.template.table.getdataListParm.parammaps.date = response.data.list[0].maxdate
-          this.getTemplateDialogList()
-        } else {
-          this.template.table.getdataListParm.parammaps.date = ''
-        }
-      })
-    },
-    // 配方记录-模板
-    getTemplateDialogList() {
-      this.template.table.listLoading = true
-      GetDataByName(this.template.table.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.template.table.list = response.data.list
-          this.template.table.pageNum = response.data.pageNum
-          this.template.table.pageSize = response.data.pageSize
-          this.template.table.total = response.data.total
-        } else {
-          this.template.table.list = []
-          this.template.table2.list = []
-        }
-        setTimeout(() => {
-          this.template.table.listLoading = false
-        }, 100)
-      })
-    },
-    handleDialogSearch() {
-      this.template.table.getdataListParm.offset = 1
-      this.getTemplateDialogList()
-      this.arrowDown = true
-      this.arrowUp = false
-    },
-    handleDialogRefresh() {
-      this.template.table.getdataListParm.parammaps.ccname = ''
-      this.template.table.getdataListParm.parammaps.fttype = ''
-      this.template.table.getdataListParm.parammaps.enable = ''
-      this.template.table.getdataListParm.parammaps.tname = ''
-      this.template.table.getdataListParm.parammaps.remark = ''
-      this.template.table.getdataListParm.parammaps.source = ''
-      this.template.table.getdataListParm.offset = 1
-      this.getTemplateDialogList()
-    },
-
-    // 配方记录-模板行点击
-    tableRowClickDialog(row, column, event) {
-      console.log('配方记录-模板行点击')
-      this.isDetailDialog = true
-      this.template.table2.getdataListParm.parammaps.date = this.template.table.getdataListParm.parammaps.date
-      this.template.table2.getdataListParm.parammaps.version = row.version
-      this.template.table2.getdataListParm.parammaps.ftid = row.id
-      this.template.table2.getdataListParm.parammaps.dryweight = row.dryweight
-      this.myheight2 = document.documentElement.clientHeight - 85 - 265 - 185
-      this.getDialogList()
-      this.getDownList()
-      // aiaiaiai
-    },
-
-    getDialogList() {
-      this.template.table2.listLoading = true
-      GetDataByName(this.template.table2.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.template.table2.list = response.data.list
-          this.template.table2.pageNum = response.data.pageNum
-          this.template.table2.pageSize = response.data.pageSize
-          this.template.table2.total = response.data.total
-        } else {
-          this.template.table2.list = []
-        }
-        this.$nextTick(function() {
-          document.querySelector('#detailDialog2').scrollIntoView()
-          // window.scrollTo({
-          //   'top': this.$refs.detailDialog2.clientHeight
-          // })
-        })
-        setTimeout(() => {
-          this.template.table2.listLoading = false
-        }, 100)
-      })
-    },
-    handleDialogSearch2() {
-      console.log('点击了查询')
-      this.arrowDown2 = true
-      this.arrowUp2 = false
-      this.template.table2.getdataListParm.offset = 1
-      this.getDialogList2()
-    },
-    handleDialogRefresh2() {
-      console.log('点击了重置')
-      this.template.table2.getdataListParm.parammaps.fname = ''
-      this.template.table2.getdataListParm.parammaps.feedgroup = ''
-      this.template.table2.getdataListParm.parammaps.fweight = ''
-      this.template.table2.getdataListParm.parammaps.autosecondname = ''
-      this.template.table2.getdataListParm.parammaps.islockcount = '0'
-      this.template.table2.getdataListParm.parammaps.sort = ''
-      this.template.table2.getdataListParm.offset = 1
-      this.getDialogList2()
-    },
-    getDialogList2() {
-      this.template.table2.listLoading = true
-      GetDataByName(this.template.table2.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.template.table2.list = response.data.list
-          this.template.table2.pageNum = response.data.pageNum
-          this.template.table2.pageSize = response.data.pageSize
-          this.template.table2.total = response.data.total
-        } else {
-          this.template.table2.list = []
-        }
-        this.$nextTick(function() {
-          window.scrollTo({
-            'top': this.$refs.templateDialog.clientHeight
-          })
-        })
-        setTimeout(() => {
-          this.template.table2.listLoading = false
-        }, 100)
-      })
-    },
-    // 导出
-    handleExport(item) {
-      if (item == 1) {
-        console.log('点击了导出模板')
-        const requestParam = this.requestParam
-        const url = process.env.VUE_APP_BASE_API + 'file/导入导出模板/配方计划/配方模板导入模板.xlsx' // 请求下载文件的地址
-        console.log(url)
-        axios({
-          method: 'GET',
-          url: url,
-          data: requestParam,
-          headers: { token: getToken(), optname: 'insertcustomdoc' },
-          responseType: 'blob'
-        }).then(res => {
-          if (!res) return
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-          const blob = new Blob([res.data], {
-            type: 'application/octet-stream;charset=utf-8'
-          })
-          const url = window.URL.createObjectURL(blob)
-          const aLink = document.createElement('a')
-          aLink.style.display = 'none'
-          aLink.href = url
-          const docname = '配方模板导入模板.xlsx'
-          aLink.setAttribute('download', docname) // 下载的文件
-          document.body.appendChild(aLink)
-          aLink.click()
-          document.body.removeChild(aLink)
-          window.URL.revokeObjectURL(url)
-        })
-      } else {
-        console.log('点击了导出数据')
-        this.download.getdataListParm.name = 'downloadFTList'
-        this.download.getdataListParm.parammaps = this.table.getdataListParm.parammaps
-        GetDataByName(this.download.getdataListParm).then(response => {
-          if (response.data.list !== null) {
-            for (let i = 0; i < response.data.list.length; i++) {
-              if (response.data.list[i].islockcount == 0) {
-                this.$set(response.data.list[i], 'islockcount', '否')
-              } else {
-                this.$set(response.data.list[i], 'islockcount', '是')
-              }
-              if (response.data.list[i].enable == 0) {
-                this.$set(response.data.list[i], 'enable', '否')
-              } else {
-                this.$set(response.data.list[i], 'enable', '是')
-              }
-            }
-            this.download.list = response.data.list
-          } else {
-            this.download.list = []
-          }
-          var excelDatas = [
-            {
-              tHeader: ['配方名称', '配方编码', '牲畜类别', '配方类型', '来源', '备注', '是否启用', '饲料组', '饲料名称', '重量(kg)', '搅拌延时(min)', '是否锁定牛头数比例', '顺序'],
-              filterVal: ['tname', 'tcode', 'ccname', 'fttype', 'source', 'remark', 'enable', 'feedgroup', 'fname', 'fweight', 'autosecond', 'islockcount', 'sort'],
-              tableDatas: this.download.list,
-              sheetName: 'Sheet1'
-            }
-          ]
-          json2excel(excelDatas, '配方模板', true, 'xlsx')
-        })
-      }
-    },
-
-    beforeImport(file) {
-      const isLt2M = file.size / 1024 / 1024 < 2
-      if (!isLt2M) {
-        this.$message.error('上传文件大小不能超过 2MB!')
-      }
-      return isLt2M
-    },
-    handleImportSuccess(res, file) {
-      this.getList()
-      if (res.msg === 'ok') {
-        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
-        if (res.data.err_count > 0) {
-          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
-           import('@/vendor/Export2Excel').then(excel => {
-             const list1 = res.data.result
-             const tHeader = [
-               '配方名称', '牲畜类别', '配方类型', '备注', '饲料组', '饲料名称', '重量(kg)', '搅拌延时(min)', '是否锁定牛头数比例', '错误信息'
-             ]
-             const filterVal = [
-               '配方名称', '牲畜类别', '配方类型', '备注', '饲料组', '饲料名称', '重量(kg)', '搅拌延时(min)', '是否锁定牛头数比例', 'error_msg'
-             ]
-             const data1 = this.formatJson(filterVal, list1)
-             excel.export_json_to_excel({ header: tHeader, data: data1, filename: '配方模板导入报错信息', autoWidth: true, bookType: 'xlsx' })
-           })
-        }
-      } else {
-        const isRepeat = new RegExp('Duplicate entry :feedtemplet_tname')
-        if (isRepeat.test(res.data)) {
-          this.$notify({ type: 'error', message: '配方名称不可重复,请重新录入', duration: 2000 })
-          return false
-        }
-        this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
-      }
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j === 'timestamp') {
-            return parseTime(v[j])
-          } else {
-            return v[j]
-          }
-        })
-      )
-    },
-    changeDate() {
-      this.getTemplateDialogList()
-    },
-    // 应用
-    handleApplication() {
-      console.log('点击了应用')
-      MessageBox.confirm('是否确认将' + this.template.table.getdataListParm.parammaps.date + '的数据应用到当前?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        this.requestParam.name = 'applyFTdate'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
-        this.requestParam.parammaps.date = this.template.table.getdataListParm.parammaps.date
-        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.getTemplateDialogList()
-            this.getList()
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消应用' })
-      })
-    },
-    // 模板行点击
-    tableRowClick(row, column, event) {
-      for (let i = 0; i < this.table.list.length; i++) {
-        if (this.table.list[i].Edit == true) {
-          return false
-        }
-      }
-      if (this.isOrder == false) {
-        this.$message({ type: 'error', message: '请保存或取消当前更改顺序操作', duration: 2000 })
-      } else {
-        if (column.label !== '操作') {
-          this.isDetail = true // 点击行显示详情
-          this.table2.getdataListParm.parammaps.ftid = row.id
-          this.table2.getdataListParm.parammaps.fttypeid = row.fttypeid
-          this.table2.getdataListParm.parammaps.dryweight = row.dryweight
-          if (row.fttype == '预混配方') {
-            this.requestParams[2].parammaps.type = '1'
-          } else {
-            this.requestParams[2].parammaps.type = ''
-          }
-          this.myheight = document.documentElement.clientHeight - 85 - 265 - 185
-          this.getList2()
-          this.getDownList()
-        }
-      }
-    },
-    handleCloseTable2() {
-      this.isDetail = false
-      this.myheight = ''
-      this.isEnlarge = true
-    },
-    handleDialogCloseTable2() {
-      this.isDetailDialog = false
-      this.myheight2 = document.documentElement.clientHeight - 85 - 265
-    },
-    // -------------------详情-----------------------------
-    // 获取是否显示是否锁定牛头数
-    getIsLockCount() {
-      GetDataByName(this.lockCount.getdataListParm).then(response => {
-        console.log(response.data.list)
-        if (response.data.list[0].inforvalue == 0) {
-          this.lockCount.isLockCount = false
-        } else {
-          this.lockCount.isLockCount = true
-        }
-      })
-    },
-    // 详情
-    getList2() {
-      this.table2.listLoading = true
-      GetDataByName(this.table2.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          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], 'groupEdit', false) // 饲料组编辑
-            this.$set(response.data.list[i], 'isGroupDisabled', false) // 饲料组编辑禁止编辑
-            this.$set(response.data.list[i], 'groupNoEdit', 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.table2.getDryweightParm.parammaps = this.table2.getdataListParm.parammaps
-          this.getDryWeight()
-
-          // for (let i = 0; i < response.data.list.length; i++) {
-          //   console.log(response.data.list[i].fweight, '===12333')
-          // }
-          this.table2.list = response.data.list
-          this.table2.pageNum = response.data.pageNum
-          this.table2.pageSize = response.data.pageSize
-          this.table2.total = response.data.total
-        } else {
-          this.table2.list = []
-        }
-        setTimeout(() => {
-          this.table2.listLoading = false
-        }, 100)
-      })
-    },
-    // 行拖拽
-    rowDrop() {
-      console.log(document.querySelector('#table2 .el-table__body-wrapper tbody'))
-      const tbody = document.querySelector('#table2 .el-table__body-wrapper tbody')
-      // this.sorTable()
-      const that = this
-
-      // Sortable.create(tbody, {
-      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.table2.list.splice(oldIndex, 1)[0]
-          that.table2.list.splice(newIndex, 0, currRow)
-          console.log('索引', newIndex)
-          console.log('拖动数据', currRow)
-          console.log('上', that.table2.list[newIndex - 1])
-          console.log('下', that.table2.list[newIndex + 1])
-          if (that.table2.list[newIndex - 1] === undefined) { // 拖动至最上方无值 // 顺序等于0,其他+1 // 饲料组等于饲料名称
-            for (let i = 0; i < that.table2.list.length; i++) {
-              that.table2.list[i].sort = parseInt(that.table2.list[i].sort) + 1 // 其他的顺序+1
-            }
-            currRow.sort = 0
-            currRow.feedgroup = currRow.fname
-            console.log('拖动至最上方无值')
-          } else if (currRow.sort == that.table2.list[newIndex - 1].sort) { // 拖动值顺序等于上值顺序
-            currRow.sort = that.table2.list[newIndex - 1].sort
-            console.log('拖动值顺序等于上值顺序')
-          } else if (that.table2.list[newIndex + 1] == undefined) { // 拖动至最下方无值 // 顺序等于上方顺序+1 // 饲料组等于饲料名称
-            currRow.sort = parseInt(that.table2.list[newIndex - 1].sort) + 1
-            currRow.feedgroup = currRow.fname
-            console.log('拖动至最下方无值')
-          } else if (currRow.sort == that.table2.list[newIndex + 1].sort) { // 拖动值顺序等于下值顺序
-            currRow.sort == that.table2.list[newIndex + 1].sort
-            console.log('拖动值顺序等于下值顺序')
-          } else if (that.table2.list[newIndex - 1].sort == that.table2.list[newIndex + 1].sort) { // 拖动至上下顺序一致,顺序/饲料组与上下保持一致
-            currRow.sort = that.table2.list[newIndex - 1].sort
-            currRow.feedgroup = that.table2.list[newIndex - 1].feedgroup
-            console.log('拖动至上下顺序一致')
-          } else if (that.table2.list[newIndex - 1].sort !== undefined && that.table2.list[newIndex + 1].sort !== undefined) { // 拖动至上下都有值
-            console.log('上下')
-            if (parseInt(that.table2.list[newIndex - 1].sort) + 1 == that.table2.list[newIndex + 1].sort) {
-              console.log(newIndex)
-              for (let i = newIndex; i < that.table2.list.length; i++) {
-                that.table2.list[i].sort = parseInt(that.table2.list[i].sort) + 1
-              }
-            }
-            currRow.sort = parseInt(that.table2.list[newIndex - 1].sort) + 1
-            currRow.feedgroup = currRow.fname
-            console.log(that.table2.list[newIndex + 1].sort)
-          }
-        }
-      })
-      console.log(sortable.option('disabled'))
-    },
-    handleChangeOrder() {
-      this.isOrder = false
-      this.rowDrop()
-    },
-    saveChangeOrder() {
-      // 保存顺序
-      console.log(this.table2.list)
-      this.requestParam = {}
-      this.requestParam.common = { 'returnmap': '0' }
-      this.requestParam.data = []
-      this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.table2.list }}
-      this.requestParam.data[0].children = []
-      this.requestParam.data[0].children[0] = { 'name': 'updateFTdetailSort', 'type': 'e', 'parammaps': {
-        id: '@insertSpotList.id',
-        pastureid: '@insertSpotList.pastureid',
-        sort: '@insertSpotList.sort',
-        feedgroup: '@insertSpotList.feedgroup'
-      }}
-      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.getList2()
-          this.getList3()
-          this.isOrder = true
-        }
-      })
-    },
-    cancelChangeOrder() {
-      // 取消顺序
-      this.getList2()
-      this.isOrder = true
-    },
-    handleSearch2() {
-      console.log('点击了查询')
-      this.arrowDown2 = true
-      this.arrowUp2 = false
-      this.table2.getdataListParm.offset = 1
-      // fname, feedgroup, fweight, autosecondname, islockcount, sort
-      // this.table2.getdataListParm.parammaps.all = this.table2.getdataListParm.parammaps.fname + ' ' + this.table2.getdataListParm.parammaps.feedgroup + ' ' + this.table2.getdataListParm.parammaps.fweight + ' ' + this.table2.getdataListParm.parammaps.autosecondname + ' ' + this.table2.getdataListParm.parammaps.islockcount + ' ' + this.table2.getdataListParm.parammaps.sort
-      this.table2.getdataListParm.parammaps.all = ''
-      var obj = {}
-      obj.fname = this.table2.getdataListParm.parammaps.fname
-      obj.feedgroup = this.table2.getdataListParm.parammaps.feedgroup
-      obj.fweight = this.table2.getdataListParm.parammaps.fweight
-      obj.autosecondname = this.table2.getdataListParm.parammaps.autosecondname
-      if (this.table2.getdataListParm.parammaps.islockcount !== '') {
-        if (this.table2.getdataListParm.parammaps.islockcount == 0) {
-          this.table2.getdataListParm.parammaps.islockcount = '否'
-        } else {
-          this.table2.getdataListParm.parammaps.islockcount = '是'
-        }
-      }
-      obj.islockcount = this.table2.getdataListParm.parammaps.islockcount
-      obj.sort = this.table2.getdataListParm.parammaps.sort
-      Object.getOwnPropertyNames(obj).forEach((key) => {
-        console.log(key, obj[key])
-        if (obj[key] !== '') {
-          this.table2.getdataListParm.parammaps.all += obj[key] + '/'
-        }
-      })
-      if (this.table2.getdataListParm.parammaps.all.charAt(this.table2.getdataListParm.parammaps.all.length - 1) == '/') {
-        this.table2.getdataListParm.parammaps.all = this.table2.getdataListParm.parammaps.all.slice(0, this.table2.getdataListParm.parammaps.all.length - 1)
-      }
-      this.getList2()
-    },
-    handleRefresh2() {
-      console.log('点击了重置')
-      this.table2.getdataListParm.parammaps.fname = ''
-      this.table2.getdataListParm.parammaps.feedgroup = ''
-      this.table2.getdataListParm.parammaps.fweight = ''
-      this.table2.getdataListParm.parammaps.autosecondname = ''
-      this.table2.getdataListParm.parammaps.islockcount = '0'
-      this.table2.getdataListParm.parammaps.sort = ''
-      this.table2.getdataListParm.parammaps.all = ''
-      this.table2.getdataListParm.offset = 1
-      this.getList2()
-    },
-
-    // 详情新增
-    handleCreate2() {
-      console.log('点击了详情新增', this.table2.list)
-      // 编辑true/不可编辑false
-      // 新增操true,编辑false,编辑保存false
-      console.log(11)
-      for (let i = 0; i < this.table2.list.length; i++) {
-        if (this.table2.list[i].Edit === true) {
-          console.log(123)
-          this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
-          return false
-        }
-      }
-      console.log(this.table2.list)
-      if (this.table2.list.length == 0) {
-        var mysort = 0
-      } else {
-        var mysort = parseInt(this.table2.list[this.table2.list.length - 1].sort) + 1
-      }
-      this.table2.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'groupEdit': false, 'groupNoEdit': true, 'enable': 1, 'feedgroup': '', 'fid': '', 'fname': '', 'fweight': '', 'autosecond': '0', 'islockcount': '0', 'sort': mysort })
-      console.log(this.table2.list)
-    },
-    changeFname(item, row) {
-      console.log(item, row)
-      this.table2.temp.fname = this.feedNameList.find(obj => obj.id == item).fname
-      row.fname = this.feedNameList.find(obj => obj.id == item).fname
-      if (this.feedNameList.find(obj => obj.id == item).ispreft == '0') {
-        this.table2.temp.preftid = '0'
-      } else {
-        this.table2.temp.preftid = item
-      }
-      if (row.sort == '') {
-        row.feedgroup = this.table2.temp.fname
-      } else {
-        if (row.isCreate == true) { // 新增状态下
-          for (let i = 1; i < this.table2.list.length; i++) {
-            if (this.table2.list[i].sort == row.sort) {
-              console.log(this.table2.list[i])
-              row.feedgroup = this.table2.list[i].feedgroup
-              break
-            } else {
-              row.feedgroup = this.table2.temp.fname
-            }
-          }
-        } else if (row.isUpdateSave == true) { // 编辑状态下
-          var Arr = []
-          for (let i = 0; i < this.table2.list.length; i++) {
-            Arr.push(this.table2.list[i].sort)
-          }
-          var Count = 0
-          for (let i = 0; i < Arr.length; i++) {
-            if (Arr[i] == row.sort) {
-              Count++
-            }
-          }
-          for (let i = 0; i < this.table2.list.length; i++) {
-            if (Count > 1) {
-              row.feedgroup = this.table2.list[i].feedgroup
-              console.log(this.table2.list[i].feedgroup)
-              break
-            } else if (Count == 1) {
-              row.feedgroup = this.table2.temp.fname
-              console.log(222, this.table2.temp.fname)
-            }
-          }
-        }
-      }
-    },
-
-    bort(row) {
-      if (row.isCreate == true) {
-        if (row.sort !== '') {
-          for (let i = 1; i < this.table2.list.length; i++) {
-            if (this.table2.list[i].sort == parseInt(row.sort)) {
-              row.feedgroup = this.table2.list[i].feedgroup
-              return false
-            } else {
-              row.feedgroup = row.fname
-            }
-          }
-        } else {
-          row.feedgroup = row.fname
-        }
-      } else if (row.isUpdateSave == true) {
-        if (row.sort !== '') {
-          for (let i = 0; i < this.table2.list.length; i++) {
-            if (this.table2.list[i].sort == row.sort) {
-              console.log('失去焦点,行内顺序与表格某顺序相同时', this.table2.list[i])
-              if (this.table2.list[i].id !== row.id) {
-                row.isGroupDisabled = true
-                row.feedgroup = this.table2.list[i].feedgroup
-                break
-              }
-            } else {
-              console.log('失去焦点,行内顺序与表格某顺序不相同时')
-              row.isGroupDisabled = true
-              row.feedgroup = row.fname
-            }
-          }
-        } else {
-          row.feedgroup = row.fname
-        }
-      }
-    },
-    createData2(row) {
-      console.log('点击了详情新增保存1', row)
-      this.table2.temp.pastureid = Cookies.get('pastureid')
-      this.table2.temp.ftid = this.table2.getdataListParm.parammaps.ftid
-      this.table2.temp.fid = row.fid
-      this.table2.temp.fname = this.table2.temp.fname
-      this.table2.temp.fweight = row.fweight
-      this.table2.temp.islockcount = row.islockcount
-      this.table2.temp.sort = row.sort
-      this.table2.temp.feedgroup = row.feedgroup
-      this.table2.temp.preftid = this.table2.temp.preftid
-      this.table2.temp.autosecond = row.autosecond
-      if (this.table2.temp.fid == '' && this.table2.temp.fweight == '' && this.table2.temp.autosecond == '') {
-        this.$message({ type: 'error', message: '饲料名称/重量/搅拌延时不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.fweight == '' && this.table2.temp.autosecond == '') {
-        this.$message({ type: 'error', message: '重量/搅拌延时不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.fid == '') {
-        this.$message({ type: 'error', message: '饲料名称不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.fweight == '') {
-        this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.autosecond == '') {
-        this.$message({ type: 'error', message: '搅拌延时不能为空', duration: 2000 })
-        return false
-      }
-      if (this.table2.temp.sort !== '') {
-        this.table2.temp.sort = this.table2.temp.sort
-      } else {
-        console.log(this.table2.list.length)
-        if (this.table2.list.length == 1) {
-          this.table2.temp.sort = 0
-        } else {
-          this.table2.temp.sort = parseInt(this.table2.list[this.table2.list.length - 1].sort) + 1
-          row.sort = parseInt(this.table2.list[this.table2.list.length - 1].sort) + 1
-        }
-      }
-      if (this.table2.getdataListParm.parammaps.fttypeid == 2) {
-        if (parseInt(this.table2.temp.preftid) > 0) {
-          this.$message({ type: 'error', message: '饲料名称不能选择预混配方', duration: 2000 })
-          return false
-        }
-      }
-      // 校验顺序是否>=0
-      var ruleSort = /^\d+$/
-      if (!ruleSort.test(this.table2.temp.sort)) {
-        this.$message({ type: 'error', message: '饲料顺序不可为负数或小数', duration: 2000 })
-        return false
-      }
-      // 检验重量>0
-      this.table2.temp.fweight = formatNum(this.table2.temp.fweight, 3) // 根据默认参数设置小数位数
-      row.fweight = formatNum(row.fweight, 3)
-      // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-      if (this.table2.temp.fweight == 0) {
-        this.$message({ type: 'error', message: '重量请输入正数,最多保留三位小数', duration: 2000 })
-        return false
-      }
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.requestParam.common = { 'returnmap': '0' }
-      this.requestParam.data = []
-      this.requestParam.data[0] = { 'name': 'insertFTdetail', 'type': 'e', 'parammaps': {
-        pastureid: this.table2.temp.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        fid: row.fid,
-        fname: this.table2.temp.fname,
-        fweight: String(row.fweight),
-        islockcount: row.islockcount,
-        sort: row.sort,
-        feedgroup: row.feedgroup,
-        preftid: this.table2.temp.preftid,
-        autosecond: row.autosecond
-      }}
-      this.requestParam.data[1] = { 'name': 'updateFPbyFTChange', 'type': 'e', 'parammaps': {
-        pastureid: this.table2.temp.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        type: this.table2.getdataListParm.parammaps.fttypeid,
-        status: 0
-      }}
-      this.requestParam.data[2] = { 'name': 'updateftversion', 'type': 'e', 'parammaps': {
-        pastureid: this.table2.getdataListParm.parammaps.pastureid,
-        id: this.table2.getdataListParm.parammaps.ftid
-      }}
-      this.requestParam.data[3] = { 'name': 'insertFitHistory', 'type': 'e', 'parammaps': {
-        weight: row.fweight,
-        preftid: this.table2.temp.preftid,
-        pastureid: this.table2.getdataListParm.parammaps.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        dateTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
-        slid: 0,
-        fid: row.fid
-      }}
-      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()
-        } else {
-          this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-        }
-      })
-    },
-    createCancel2(row) {
-      console.log('点击了详情新增取消')
-      for (let i = 0; i < this.table2.list.length; i++) {
-        if (row.myId === this.table2.list[i].myId) {
-          var listIndex = this.table2.list.indexOf(this.table2.list[i])
-        }
-        if (listIndex > -1) {
-          this.table2.list.splice(listIndex, 1)
-          return
-        }
-      }
-      this.getDialogList()
-    },
-
-    // 详情编辑
-    handleUpdate2(row) {
-      console.log('详情编辑', row)
-      this.dropState = true
-      row.isGroupDisabled = false
-      row.islockcount = String(row.islockcount)
-      row.fid = String(row.fid)
-      row.autosecond = String(row.autosecond)
-      this.table2.temp.fname = row.fname
-      this.table2.temp.preftid = row.preftid
-      const rowArr = []
-      for (let i = 0; i < this.table2.list.length; i++) {
-        if (this.table2.list[i].Edit == true) {
-          this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
-          return false
-        }
-        rowArr.push(this.table2.list[i].sort)
-      }
-      var count = 0
-      for (let i = 0; i < rowArr.length; i++) {
-        if (rowArr[i] == row.sort) {
-          count++
-        }
-      }
-      // 判断是否有相同顺序,如果没有饲料组不可编辑,若有饲料组可编辑
-      if (count == 1) {
-        // 饲料组编辑false,不可编辑true
-        row.groupEdit = false
-        row.groupNoEdit = true
-        // 编辑true,不可编辑false
-        row.Edit = true
-        row.NoEdit = false
-        // 新增false,编辑false,编辑保存true
-        row.isCreate = false
-        row.isUpdate = false
-        row.isUpdateSave = true
-      } else if (count > 1) {
-        // 饲料组编辑true,不可编辑false
-        row.groupEdit = true
-        row.groupNoEdit = false
-        console.log(222)
-        // 编辑true,不可编辑false
-        row.Edit = true
-        row.NoEdit = false
-        // 新增false,编辑false,编辑保存true
-        row.isCreate = false
-        row.isUpdate = false
-        row.isUpdateSave = true
-        return false
-      }
-      this.table2.updateList = Object.assign({}, row)
-    },
-    updateData2(row) {
-      console.log('点击了详情编辑保存', row)
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.table2.temp.pastureid = row.pastureid
-      this.table2.temp.ftid = this.table2.getdataListParm.parammaps.ftid
-      this.table2.temp.fid = row.fid
-      this.table2.temp.fname = this.table2.temp.fname
-      this.table2.temp.fweight = row.fweight
-      this.table2.temp.islockcount = row.islockcount
-      this.table2.temp.sort = row.sort
-      this.table2.temp.feedgroup = row.feedgroup
-      this.table2.temp.preftid = this.table2.temp.preftid
-      this.table2.temp.autosecond = row.autosecond
-      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
-      // }
-      if (this.table2.temp.fid == '' && this.table2.temp.fweight == '' && this.table2.temp.autosecond == '') {
-        this.$message({ type: 'error', message: '饲料名称/重量/搅拌延时不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.fweight == '' && this.table2.temp.autosecond == '') {
-        this.$message({ type: 'error', message: '重量/搅拌延时不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.fid == '') {
-        this.$message({ type: 'error', message: '饲料名称不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.fweight == '') {
-        this.$message({ type: 'error', message: '重量不能为空', duration: 2000 })
-        return false
-      } else if (this.table2.temp.autosecond == '') {
-        this.$message({ type: 'error', message: '搅拌延时不能为空', duration: 2000 })
-        return false
-      }
-      if (this.table2.temp.sort !== '') {
-        this.table2.temp.sort = this.table2.temp.sort
-      } else {
-        this.table2.temp.sort = parseInt(this.table2.list[this.table2.list.length - 1].sort) + 1
-      }
-      if (this.table2.getdataListParm.parammaps.fttypeid == 2) {
-        if (parseInt(this.table2.temp.preftid) > 0) {
-          this.$message({ type: 'error', message: '饲料名称不能选择预混配方', duration: 2000 })
-          return false
-        }
-      }
-      // 校验顺序是否>=0
-      var ruleSort = /^\d+$/
-      if (!ruleSort.test(this.table2.temp.sort)) {
-        this.$message({ type: 'error', message: '饲料顺序不可为负数或小数', duration: 2000 })
-        return false
-      }
-      this.table2.temp.fweight = formatNum(this.table2.temp.fweight, 3) // 根据默认参数设置小数位数
-      row.fweight = formatNum(row.fweight, 3)
-      // 检验重量>0
-      // var ruleWeight = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
-      if (this.table2.temp.fweight == 0) {
-        this.$message({ type: 'error', message: '重量请输入正数,最多保留三位小数', duration: 2000 })
-        return false
-      }
-      this.requestParam.common = { 'returnmap': '0' }
-      this.requestParam.data = []
-      this.requestParam.data[0] = { 'name': 'insertFitHistory', 'type': 'e', 'parammaps': {
-        pastureid: row.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        weight: String(row.fweight),
-        preftid: this.table2.temp.preftid,
-        dateTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
-        slid: this.table2.temp.id,
-        fid: row.fid
-      }}
-      this.requestParam.data[1] = { 'name': 'updateFTdetail', 'type': 'e', 'parammaps': {
-        pastureid: row.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        fid: row.fid,
-        fname: this.table2.temp.fname,
-        fweight: String(row.fweight),
-        islockcount: row.islockcount,
-        sort: row.sort,
-        feedgroup: row.feedgroup,
-        preftid: this.table2.temp.preftid,
-        autosecond: row.autosecond,
-        id: row.id
-      }}
-      this.requestParam.data[2] = { 'name': 'updateFPbyFTChange', 'type': 'e', 'parammaps': {
-        pastureid: row.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        type: this.table2.getdataListParm.parammaps.fttypeid,
-        // status: status
-      }}
-      this.requestParam.data[3] = { 'name': 'updateFTdetailbySort', 'type': 'e', 'parammaps': {
-        pastureid: row.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid,
-        sort: row.sort,
-        feedgroup: row.feedgroup
-      }}
-      this.requestParam.data[4] = { 'name': 'updateFTdetailGroup', 'type': 'e', 'parammaps': {
-        pastureid: this.table2.getdataListParm.parammaps.pastureid,
-        ftid: this.table2.getdataListParm.parammaps.ftid
-      }}
-      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()
-          this.getList3()
-          this.dropState = false
-        } else {
-          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('点击了详情编辑取消')
-      // 饲料组编辑false,不可编辑true
-      row.groupEdit = false
-      row.groupNoEdit = true
-      // 编辑false,不可编辑true
-      row.Edit = false
-      row.NoEdit = true
-      // 新增false,编辑true,编辑保存false
-      row.isCreate = false
-      row.isUpdate = true
-      row.isUpdateSave = false
-      this.getList2()
-      this.dropState = false
-    },
-
-    // 详情删除
-    handleRowDelete2(row) {
-      console.log('点击了行内删除')
-      MessageBox.confirm('是否确认删除此信息?', {
-        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-      }).then(() => {
-        console.log(this.table2.list.length)
-        if (this.table2.list.length > 1) {
-          this.requestParam.common = { 'returnmap': '0' }
-          this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertFitHistory', 'type': 'e', 'parammaps': {
-            pastureid: row.pastureid,
-            ftid: this.table2.getdataListParm.parammaps.ftid,
-            weight: 0,
-            preftid: row.preftid,
-            dateTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
-            slid: row.id,
-            fid: row.fid
-          }}
-          this.requestParam.data[1] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
-            pastureid: row.pastureid,
-            id: row.id
-          }}
-          this.requestParam.data[2] = { 'name': 'updateFPbyFTChange', 'type': 'e', 'parammaps': {
-            pastureid: row.pastureid,
-            ftid: this.table2.getdataListParm.parammaps.ftid,
-            type: this.table2.getdataListParm.parammaps.fttypeid,
-            status: 1
-          }}
-          this.requestParam.data[3] = { 'name': 'updateftversion', 'type': 'e', 'parammaps': {
-            pastureid: this.table2.getdataListParm.parammaps.pastureid,
-            id: this.table2.getdataListParm.parammaps.ftid
-          }}
-        } else {
-          this.requestParam.common = { 'returnmap': '0' }
-          this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertFitHistory', 'type': 'e', 'parammaps': {
-            pastureid: row.pastureid,
-            ftid: this.table2.getdataListParm.parammaps.ftid,
-            weight: 0,
-            preftid: row.preftid,
-            dateTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
-            slid: row.id,
-            fid: row.fid
-          }}
-          this.requestParam.data[1] = { 'name': 'checkdeleteFT', 'type': 'v', 'parammaps': {
-            pastureid: this.table2.getdataListParm.parammaps.pastureid,
-            id: this.table2.getdataListParm.parammaps.ftid
-          }}
-          this.requestParam.data[2] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
-            pastureid: row.pastureid,
-            id: row.id
-          }}
-          this.requestParam.data[3] = { 'name': 'updateFPbyFTChange', 'type': 'e', 'parammaps': {
-            pastureid: row.pastureid,
-            ftid: this.table2.getdataListParm.parammaps.ftid,
-            type: this.table2.getdataListParm.parammaps.fttypeid,
-            status: 1
-          }}
-          this.requestParam.data[4] = { 'name': 'updateftversion', 'type': 'e', 'parammaps': {
-            pastureid: this.table2.getdataListParm.parammaps.pastureid,
-            id: this.table2.getdataListParm.parammaps.ftid
-          }}
-        }
-        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.getList2()
-            this.getList3()
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消删除' })
-      })
-    },
-    handleSelectionChange2(val) {
-      console.log('勾选数据', val)
-      this.selectList2 = val
-    },
-    celldblclick(row, column, cell, event) {
-      console.log(row, '=====')
-      this.handleUpdate2(row)
-    },
-    handleDelete2() {
-      console.log('点击了删除')
-      if (this.selectList2.length == 0) {
-        this.$message({ type: 'error', message: '请选择配方详情', duration: 2000 })
-      } else {
-        MessageBox.confirm('是否确认删除此信息?', {
-          confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
-        }).then(() => {
-          console.log(this.table2.list.length - this.selectList2.length)
-          if (this.table2.list.length - this.selectList2.length > 0) {
-            this.requestParam.common = { 'returnmap': '0' }
-            this.requestParam.data = []
-            this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList2 }}
-            this.requestParam.data[0].children = []
-            this.requestParam.data[0].children[0] = { 'name': 'insertFitHistory', 'type': 'e', 'parammaps': {
-              pastureid: '@insertSpotList.pastureid',
-              ftid: '@insertSpotList.ftid',
-              weight: 0,
-              preftid: '@insertSpotList.preftid',
-              dateTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
-              slid: '@insertSpotList.id',
-              fid: '@insertSpotList.fid'
-            }}
-            this.requestParam.data[0].children[1] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
-              id: '@insertSpotList.id',
-              pastureid: '@insertSpotList.pastureid'
-            }}
-            this.requestParam.data[1] = { 'name': 'updateftversion', 'type': 'e', 'parammaps': {
-              pastureid: this.table2.getdataListParm.parammaps.pastureid,
-              id: this.table2.getdataListParm.parammaps.ftid
-            }}
-          } else {
-            this.requestParam.common = { 'returnmap': '0' }
-            this.requestParam.data = []
-            this.requestParam.data[0] = { 'name': 'checkdeleteFT', 'type': 'v', 'parammaps': {
-              pastureid: this.table2.getdataListParm.parammaps.pastureid,
-              id: this.table2.getdataListParm.parammaps.ftid
-            }}
-            this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList2 }}
-            this.requestParam.data[1].children = []
-            this.requestParam.data[1].children[0] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
-              id: '@insertSpotList.id',
-              pastureid: '@insertSpotList.pastureid'
-            }}
-            this.requestParam.data[2] = { 'name': 'updateftversion', 'type': 'e', 'parammaps': {
-              pastureid: this.table2.getdataListParm.parammaps.pastureid,
-              id: this.table2.getdataListParm.parammaps.ftid
-            }}
-          }
-          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.getList2()
-              this.getList3()
-            }
-          })
-        })
-      }
-    },
-
-    // 拆分预混料
-    handleSplitPremix(row) {
-      console.log('点击了拆分预混料')
-      MessageBox.confirm('是否确认拆分当前预混料?', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.requestParam.name = 'splitFTpre'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.ftid = this.table2.getdataListParm.parammaps.ftid
-        this.requestParam.parammaps.preftid = row.preftid
-        this.requestParam.parammaps.ftdid = row.id
-        this.requestParam.parammaps.pastureid = row.pastureid
-        this.requestParam.parammaps.feedgroup = row.feedgroup
-        this.requestParam.parammaps.sort = row.sort
-        this.requestParam.parammaps.fweight = row.fweight
-        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.getList2()
-            this.getList3()
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        })
-      })
-    },
-
-    // 合成预混料
-    handleSyntheticPremix() {
-      console.log('点击了合成预混料', this.selectList2)
-      this.dialogFull = false
-      if (this.table2.getdataListParm.parammaps.fttypeid == 2) {
-        this.$message({ type: 'error', message: '预混配方不可合成预混料', duration: 2000 })
-        return false
-      } else {
-        if (this.selectList2.length > 1) {
-          for (let i = 0; i < this.selectList2.length; i++) {
-            if (parseInt(this.selectList2[i].preftid) > 0) {
-              this.$message({ type: 'error', message: '不可选择预混料', duration: 2000 })
-              return false
-            }
-          }
-
-          if (this.selectList2[0].splitftpreid !== undefined) {
-            this.detail.getdataListParm.parammaps.ftid = this.selectList2[0].splitftpreid
-            this.detail.getdataListParm.parammaps.pastureid = this.selectList2[0].pastureid
-            GetDataByName(this.detail.getdataListParm).then(response => {
-              if (response.data.list !== null) { // 不为空时得到比对数据
-                this.detail.list3 = response.data.list
-                const sortList = [] // 声明排序数组
-                var fweightSum = 0 // 总重量
-                for (let i = 0; i < this.selectList2.length; i++) {
-                  const obj = {}
-                  obj.fid = this.selectList2[i].fid
-                  obj.fweight = this.selectList2[i].fweight
-                  fweightSum = fweightSum + parseFloat(this.selectList2[i].fweight)
-                  sortList.push(obj)
-                }
-                // 排序
-                sortList.sort(function(a, b) {
-                  return a.fid.localeCompare(b.fid)
-                })
-                var a = 0
-                if (this.detail.list3.length == sortList.length) {
-                  for (let i = 0; i < this.detail.list3.length; i++) {
-                    if (this.detail.list3[i].fid == sortList[i].fid && (this.detail.list3[i].fweight / this.detail.list3[i].sumWeight).toFixed(3) == (sortList[i].fweight / fweightSum).toFixed(3)) {
-                      a++
-                    }
-                  }
-                  if (a == this.detail.list3.length) { // 如果相等,则该配方为原预混配方
-                    this.detail.getdataListParm2.parammaps.ftid = this.selectList2[0].splitftpreid
-                    this.detail.getdataListParm2.parammaps.pastureid = this.selectList2[0].pastureid
-                    GetDataByName(this.detail.getdataListParm2).then(response => {
-                      if (response.data.list !== null) {
-                        this.detail.dialogStatus = 'SyntheticPremix'
-                        this.detail.dialogFormVisible = true
-                        this.detail.list = this.selectList2
-                        this.detail.list2 = response.data.list
-                        this.detail.disabled = true
-                        setTimeout(() => {
-                          this.detail.listLoading = false
-                        }, 100)
-                      } else {
-                        this.detail.list2 = []
-                      }
-                    })
-                  } else {
-                    this.detail.dialogStatus = 'SyntheticPremix'
-                    this.detail.dialogFormVisible = true
-                    this.detail.list = this.selectList2
-                    this.detail.disabled = false
-                    this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
-                    setTimeout(() => {
-                      this.detail.listLoading = false
-                    }, 100)
-                  }
-                } else {
-                  this.detail.dialogStatus = 'SyntheticPremix'
-                  this.detail.dialogFormVisible = true
-                  this.detail.list = this.selectList2
-                  this.detail.disabled = false
-                  this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
-                  setTimeout(() => {
-                    this.detail.listLoading = false
-                  }, 100)
-                }
-              } else {
-                this.detail.list3 = []
-                this.detail.dialogStatus = 'SyntheticPremix'
-                this.detail.dialogFormVisible = true
-                this.detail.list = this.selectList2
-                this.detail.disabled = false
-                this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
-                setTimeout(() => {
-                  this.detail.listLoading = false
-                }, 100)
-              }
-            })
-          } else {
-            this.detail.dialogStatus = 'SyntheticPremix'
-            this.detail.dialogFormVisible = true
-            this.detail.list = this.selectList2
-            this.detail.disabled = false
-            this.detail.list2 = [{ tname: '', tcolor: '#ccc', ccid: '', fttype: '预混配方', fttypeid: '2', source: '自定义', remark: '', 'enable': 1 }]
-            setTimeout(() => {
-              this.detail.listLoading = false
-            }, 100)
-          }
-        } else {
-          this.$message({ type: 'error', message: '请选择俩条及以上饲料进行合成', duration: 2000 })
-          return false
-        }
-      }
-    },
-    // 畜生类别
-    changeLivestockType2(item) {
-      this.detail.list2[0].ccname = this.livestockTypeList.find(obj => obj.value === item).label
-    },
-    syntheticPremixData() {
-      console.log('点击了合成预混料确认')
-      if (this.detail.disabled == true) { // 原预混料
-        let sumFweight = 0
-        for (let i = 0; i < this.detail.list.length; i++) {
-          sumFweight += parseFloat(this.detail.list[i].fweight)
-        }
-        sumFweight = sumFweight.toFixed(3)
-        this.isokDisable = true
-        setTimeout(() => {
-          this.isokDisable = false
-        }, 1000)
-        this.requestParam.common = { 'returnmap': '0' }
-        this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.detail.list }}
-        this.requestParam.data[0].children = []
-        this.requestParam.data[0].children[0] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList.pastureid',
-          id: '@insertSpotList.id'
-        }}
-        this.requestParam.data[1] = { 'name': 'insertSpotList2', 'resultmaps': { 'list': this.detail.list2 }}
-        this.requestParam.data[1].children = []
-        this.requestParam.data[1].children[0] = { 'name': 'insertFTdetail', 'type': 'e', 'parammaps': {
-          pastureid: Cookies.get('pastureid'),
-          ftid: this.table2.getdataListParm.parammaps.ftid,
-          fid: this.detail.list2[0].id,
-          fname: '@insertSpotList2.tname',
-          fweight: sumFweight,
-          islockcount: '0',
-          sort: parseInt(this.table2.list[this.table2.list.length - 1].sort) + 1,
-          feedgroup: '@insertSpotList2.tname',
-          preftid: this.detail.list2[0].id,
-          autosecond: this.detail.list[0].autosecond
-        }}
-        ExecDataByConfig(this.requestParam).then(response => {
-          console.log('合成预混料保存发送参数', this.requestParam)
-          if (response.msg === 'fail') {
-            const tname = new RegExp("key 'tname'")
-            if (tname.test(response.data)) {
-              this.$message({ type: 'error', message: '预混配方已存在,不可重复生成', duration: 2000 })
-            } else {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            }
-          } else {
-            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-            this.detail.dialogFormVisible = false
-            this.getList3()
-            this.getList2()
-            this.getDownList()
-          }
-        })
-      } else { // 现生成预混料
-        if (this.detail.list2[0].tname == '' && this.detail.list2[0].ccid == '') {
-          this.$message({ type: 'error', message: '配方名称/牲畜类别/不能为空', duration: 2000 })
-          return false
-        } else if (this.detail.list2[0].tname == '') {
-          this.$message({ type: 'error', message: '配方名称不能为空', duration: 2000 })
-          return false
-        } else if (this.detail.list2[0].ccid == '') {
-          this.$message({ type: 'error', message: '牲畜类别不能为空', duration: 2000 })
-          return false
-        }
-        const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
-        if (pattern.test(this.detail.list2[0].tname)) {
-          this.$message({ type: 'error', message: '配方名称不可输入特殊字符', duration: 2000 })
-          return false
-        }
-        let sumFweight = 0
-        for (let i = 0; i < this.detail.list.length; i++) {
-          sumFweight += parseFloat(this.detail.list[i].fweight)
-        }
-        sumFweight = sumFweight.toFixed(3)
-        console.log(sumFweight)
-        this.isokDisable = true
-        setTimeout(() => {
-          this.isokDisable = false
-        }, 1000)
-        if (this.detail.list2[0].tcolor == null) {
-          this.detail.list2[0].tcolor = '#CCCCCC'
-        }
-        this.requestParam.common = { 'returnmap': '0' }
-        this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'insertFT', 'type': 'e', 'parammaps': {
-          pastureid: Cookies.get('pastureid'),
-          tcode: this.detail.list2[0].tcode,
-          tname: this.detail.list2[0].tname,
-          tcolor: this.detail.list2[0].tcolor,
-          ccid: this.detail.list2[0].ccid,
-          ccname: this.detail.list2[0].ccname,
-          fttype: this.detail.list2[0].fttype,
-          fttypeid: this.detail.list2[0].fttypeid,
-          source: this.detail.list2[0].source,
-          remark: this.detail.list2[0].remark,
-          enable: this.detail.list2[0].enable
-        }}
-        this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.detail.list }}
-        this.requestParam.data[1].children = []
-        this.requestParam.data[1].children[0] = { 'name': 'insertFTdetail', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList.pastureid',
-          ftid: '@insertFT.LastInsertId',
-          fid: '@insertSpotList.fid',
-          fname: '@insertSpotList.fname',
-          fweight: '@insertSpotList.fweight',
-          islockcount: '@insertSpotList.islockcount',
-          sort: '@insertSpotList.sort',
-          feedgroup: '@insertSpotList.feedgroup',
-          preftid: '@insertSpotList.preftid',
-          autosecond: '@insertSpotList.autosecond'
-        }}
-        this.requestParam.data[1].children[1] = { 'name': 'deleteFTdetail', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList.pastureid',
-          id: '@insertSpotList.id'
-        }}
-        this.requestParam.data[2] = { 'name': 'insertSpotList2', 'resultmaps': { 'list': this.detail.list2 }}
-        this.requestParam.data[2].children = []
-        this.requestParam.data[2].children[0] = { 'name': 'insertFTdetail', 'type': 'e', 'parammaps': {
-          pastureid: Cookies.get('pastureid'),
-          ftid: this.table2.getdataListParm.parammaps.ftid,
-          fid: '@insertFT.LastInsertId',
-          fname: '@insertSpotList2.tname',
-          fweight: sumFweight,
-          islockcount: '0',
-          sort: parseInt(this.table2.list[this.table2.list.length - 1].sort) + 1,
-          feedgroup: '@insertSpotList2.tname',
-          preftid: '@insertFT.LastInsertId',
-          autosecond: this.detail.list[0].autosecond
-        }}
-        ExecDataByConfig(this.requestParam).then(response => {
-          console.log('合成预混料保存发送参数', this.requestParam)
-          if (response.msg === 'fail') {
-            const tname = new RegExp("key 'tname'")
-            if (tname.test(response.data)) {
-              this.$message({ type: 'error', message: '预混配方已存在,不可重复生成', duration: 2000 })
-            } else {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            }
-          } else {
-            this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-            this.detail.dialogFormVisible = false
-            this.getList3()
-            this.getList2()
-            this.getDownList()
-          }
-        })
-      }
-    },
-    handleFormulationEvaluation(row) {
-      console.log(row)
-      // this.$router.push({ path: '/statisticalAnalysis/FormulationEvaluation', query: { tname: row.tname }})
-      this.$router.push({
-        name: 'FormulationEvaluation',
-        params: {
-          tname: row.tname,
-          ftid: row.id,
-          pastureid: row.pastureid,
-          startTime: parseTime(new Date(), '{y}-{m}-{d}'),
-          inputDatetime: [new Date('startTime'), new Date('startTime')], // 日期后台待传
-          stopTime: parseTime(new Date(), '{y}-{m}-{d}')
-        }
-      })
-    },
-    // 配方记录
-    handleRowRecipeRecord(row) {
-      console.log(row)
-      this.rowRecipeRecord.temp = Object.assign({}, row)
-      this.rowRecipeRecord.dialogFormVisible = true
-      this.textMap.rowRecipeRecordTxt = '配方修改记录——配方:' + row.tname
-      this.rowRecipeRecord.dialogStatus = 'rowRecipeRecordTxt'
-      this.rowRecipeRecord.getdataListParm.parammaps.pastureid = row.pastureid
-      this.rowRecipeRecord.getdataListParm.parammaps.fitid = row.id
-      this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime = []
-      this.getRowRecipeRecordList()
-    },
-    getRowRecipeRecordList() {
-      this.rowRecipeRecord.listLoading = true
-      this.rowRecipeRecord.getdataListParm.parammaps.fitid = this.rowRecipeRecord.temp.id
-      if (this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime == null) {
-        this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime = ''
-        this.rowRecipeRecord.getdataListParm.parammaps.startTime = ''
-        this.rowRecipeRecord.getdataListParm.parammaps.stopTime = ''
-      } else {
-        this.rowRecipeRecord.getdataListParm.parammaps.startTime = this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime[0]
-        this.rowRecipeRecord.getdataListParm.parammaps.stopTime = this.rowRecipeRecord.getdataListParm.parammaps.inputDatetime[1]
-      }
-      const url = 'authdata/GetArrList'
-      const data = this.rowRecipeRecord.getdataListParm
-      postJson(url, data).then(response => {
-        if (response.data.list !== null) {
-          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.rowRecipeRecord.list = response.data.list
-          this.rowRecipeRecord.pageNum = response.data.pageNum
-          this.rowRecipeRecord.pageSize = response.data.pageSize
-          this.rowRecipeRecord.total = response.data.total
-        } else {
-          this.rowRecipeRecord.list = []
-          this.rowRecipeRecord.total = 0
-        }
-        console.log(response.data, 'response.data')
-        setTimeout(() => {
-          this.rowRecipeRecord.listLoading = false
-        }, 100)
-      })
-    },
-    handleRowRecipeRecordSearch() {
-      this.getRowRecipeRecordList()
-    },
-    handleEnlarge() {
-      var height = (document.documentElement.clientHeight - 165 + 50).toString() + 'px'
-      // var height = (document.documentElement.clientHeight - 165 + 80).toString() + 'px'
-      // var height2 = '-' + (document.documentElement.clientHeight - 400).toString() + 'px'
-      var height2 = '-' + (this.$refs.template.offsetHeight).toString() + 'px'
-      console.log(this.$refs.detail.offsetHeight)
-      console.log(height2, 'height2')
-      this.isEnlarge = false
-      this.$refs.detail.style.top = height2
-      this.$refs.detail.style.height = height
-      this.$refs.appContainer.style.height = height
-      this.$refs.table2.style.height = 0
-      this.$refs.myContainer.style.posiiton = 'relative'
-      this.$refs.detail.style.posiiton = 'absolute'
-    },
-    handleNarrow() {
-      this.isEnlarge = true
-      this.$refs.detail.style.top = 0
-      this.$refs.detail.style.height = '300px'
-      this.$refs.myContainer.style.posiiton = ''
-      this.$refs.detail.style.posiiton = ''
-      this.$refs.detail.style.zIndex = ''
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-  .search{margin-top:10px;height: 40px;}
-  .operation{height: 50px;}
-  .table{margin-top:5px;}
-  .table2{margin-top:10px;}
-  $width:350px;
-  $left:325px;
-  .selectInput{
-    position: relative;
-    display: inline-block;
-    .Input{width: $width;position: relative;}
-    .el-icon-arrow-down{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
-    .el-icon-arrow-up{width: 30px;height: 30px;position: absolute;left: $left;top:10px;color:#C0C4CC;}
-    .selectUl{
-      height:220px;overflow-y: auto;z-index: 111;width: $width;background: #fff;border: 1px solid #E4E7ED;box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);margin: -1px 0 0 0;padding: 6px 0; margin: 0;box-sizing: border-box;position: absolute;
-      li{
-        list-style: none;font-size: 14px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #606266; height: 50px; line-height: 50px; box-sizing: border-box; cursor: pointer;
-        a{float:left;width: 80px;}
-        a:hover{color: rgba(0, 204, 102, 0.71); font-weight: 700;}
-      }
-    }
-  }
-  .template{
-    background: #fff;
-    position: relative;
-  }
-  .app-container{background: #fff;}
-  .detail{
-    background: #fff;
-    overflow-y: hidden;
-    overflow-x: hidden;
-    // position: fixed;
-    // bottom: 0;
-    // right:0;
-    z-index: 3;
-    // width: calc(100% - 210px);
-    position: relative;
-  }
-  .hide2{float: right;right:0;}
-  .templateDialog{
-    background: #fff;
-    position: relative;
-  }
- .detailDialog{
-    background: #fff;
-    position: relative;
-  }
-  .hide{float: right;margin-right: 60px;}
- </style>
- <style>
-  .el-color-dropdown__main-wrapper{display: none !important;}
-  .el-color-dropdown__value{display: none !important;}
-  .el-color-dropdown__btns .el-button--text{display: none !important;}
- </style>

+ 207 - 115
src/views/systemManagement/dataSynchronization/index.vue

@@ -3,100 +3,47 @@
 
     <el-form ref="form" :model="form" label-width="180px">
         <el-form-item label="每日自动同步:">
-          
-
-          <el-col :span="20">
-            <el-switch v-model="form.delivery"></el-switch>
-          </el-col>
-       
-          <el-col :span="4">
-           <el-select v-model="form.cmo"  >
-            <el-option  v-for="item in companyArr" :key="item.id" :label="item.name" :value="item.name"/> 
-          </el-select>
- 
-          </el-col>
-
-
-
-        </el-form-item>
-
-
-   
-
-
-
-        
-
-        <el-form-item label="">
-          <el-col :span="6">
-            <el-select v-model="form.region" placeholder=""  @change="change_select">
-              <el-option v-for="item in selectArr"  :key="item.id" :label="item.name" :value="item.id" /> 
+          <el-row>
+            <el-col :span="20">
+              <el-switch v-model="form.delivery" :disabled="form.cmo == ''" active-value="1" inactive-value="0" active-color="#169bd5" inactive-color="#8c8c8c" @change="changeEnable"></el-switch>
+            </el-col>
+            <el-col :span="4">
+             <el-select v-model="form.cmo" placeholder="已对接公司" @change="change_company">
+              <el-option  v-for="(item,index) in companyArr" :key="index" :label="item.company" :value="item.company"/>
             </el-select>
-
-          
-          </el-col>
-          <el-col :span="6">
-              <el-time-picker
-                v-model="time1"
-                :picker-options="{
-                  selectableRange: '00:00:00 - 23:59:59'
-                }"
-                @change = "change_time1"
-                placeholder="任意时间点">
-              </el-time-picker>
-
-          </el-col>
+            </el-col>
+          </el-row>
         </el-form-item>
-        <!-- <el-form-item label="活动时间">
-          <el-col :span="11">
-            <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
-          </el-col>
-          <el-col class="line" :span="2">-</el-col>
-          <el-col :span="11">
-            <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
-          </el-col>
-        </el-form-item> -->
-       
         <el-form-item label="同步内容:">
-          下载数据
-          <el-checkbox-group v-model="form.type" @change="change_auto1">
-              <el-checkbox v-for="item in autoArr1" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
-          </el-checkbox-group>
           上传数据
-          <el-checkbox-group v-model="form.type" @change="change_auto1">
-              <el-checkbox v-for="item in autoArr2" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          <el-radio-group v-model="form.type1" @change="changeEnable">
+            <el-radio v-for="item in autoArr3"  :disabled="form.cmo == ''" :key="item.id" :label="item.id" :value="item.name">{{ item.name }}</el-radio>
+          </el-radio-group>
+          <el-checkbox-group v-model="form.type2" @change="change_auto1('automatic','0',form.type2,myautoArr2)">
+            <el-checkbox v-for="(item,index) in autoArr2" :key="index" :label="item.name" :value="item.name">{{ item.name }}</el-checkbox>
           </el-checkbox-group>
         </el-form-item>
-
-
         <el-divider></el-divider>
-
         <el-form-item label="手动同步:">
-          <el-button class="successBorder" @click="handleSearch">立刻同步</el-button>
+          <el-button class="successBorder" :disabled="form.cmo == ''" @click="handleSyncNow">立刻同步</el-button>
         </el-form-item>
-
         <el-form-item label="同步内容:">
           下载数据
-          <el-checkbox-group v-model="form.type" @change="change_auto1">
-              <el-checkbox v-for="item in autoArr1" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          <el-checkbox-group v-model="form.type3" @change="change_auto1('manual','1',form.type3,myautoArr3)">
+              <el-checkbox v-for="(item,index) in autoArr1" :key="index" :label="item.name" :value="item.name">{{ item.name }}</el-checkbox>
           </el-checkbox-group>
           上传数据
-          <el-checkbox-group v-model="form.type" @change="change_auto1">
-              <el-checkbox v-for="item in autoArr2" :key="item.id" :label="item" :value="item.name">{{ item.name }}</el-checkbox>
+          <el-checkbox-group v-model="form.type4" @change="change_auto1('manual','0',form.type4,myautoArr2)">
+            <el-checkbox v-for="(item,index) in autoArr2" :key="item.index" :label="item.name" :value="item.name">{{ item.name }}</el-checkbox>
           </el-checkbox-group>
         </el-form-item>
-       
-       
       </el-form>
- 
-
-   
   </div>
 
 </template>
 
 <script>
-import { GetDataByName, PostDataByName, failproccess, checkButtons } from '@/api/common'
+import { postJson,checkButtons } from '@/api/common'
 import Cookies from 'js-cookie'
 import Pagination from '@/components/Pagination'
 export default {
@@ -106,44 +53,54 @@ export default {
     return {
       isRoleEdit: [],
       companyArr: [
-        { id: '公司1', name: '公司1' }, 
-        { id: '公司2', name: '公司2' },
-        { id: '公司3', name: '公司3' } 
+        // { id: '公司1', name: '公司1' },
+        // { id: '公司2', name: '公司2' },
+        // { id: '公司3', name: '公司3' }
       ],
       autoArr1: [
-        { id: '栏舍', name: '栏舍' }, 
-        { id: '配方', name: '配方' },
-        { id: '饲料', name: '饲料' },
-        { id: '饲料分类', name: '饲料分类' },
-        { id: '牲畜类别', name: '牲畜类别' },
-        { id: '驾驶员', name: '驾驶员' }
+        // { id: '栏舍', name: '栏舍' },
+        // { id: '配方', name: '配方' },
+        // { id: '饲料', name: '饲料' },
+        // { id: '饲料分类', name: '饲料分类' },
+        // { id: '牲畜类别', name: '牲畜类别' },
+        // { id: '驾驶员', name: '驾驶员' }
       ],
       autoArr2: [
-        { id: '栏舍', name: '栏舍' }, 
-        { id: '配方', name: '配方' },
-        { id: '搅拌数据', name: '饲料' },
-        { id: '发料数据', name: '饲料分类' },
-        { id: '剩料数据', name: '牲畜类别' },
-        { id: '干物质信息', name: '干物质信息' },
-        { id: '滨州筛', name: '滨州筛' },
-        { id: '粪便筛', name: '粪便筛' },
-        { id: '计划完成车次', name: '计划完成车次' },
-        { id: '实际完成车次', name: '实际完成车次' },
-        { id: '计划重量', name: '计划重量' },
-        { id: '完成重量', name: '完成重量' },
-        { id: '准确率', name: '准确率' },
+        // { id: '栏舍', name: '栏舍' },
+        // { id: '配方', name: '配方' },
+        // { id: '搅拌数据', name: '饲料' },
+        // { id: '发料数据', name: '饲料分类' },
+        // { id: '剩料数据', name: '牲畜类别' },
+        // { id: '干物质信息', name: '干物质信息' },
+        // { id: '滨州筛', name: '滨州筛' },
+        // { id: '粪便筛', name: '粪便筛' },
+        // { id: '计划完成车次', name: '计划完成车次' },
+        // { id: '实际完成车次', name: '实际完成车次' },
+        // { id: '计划重量', name: '计划重量' },
+        // { id: '完成重量', name: '完成重量' },
+        // { id: '准确率', name: '准确率' },
+      ],
+      myautoArr2:[],
+      autoArr3: [
+        { id: '0', name: '每车次结束' },
+        { id: '1', name: '每班次结束' },
+        { id: '2', name: '每天计划完成后' }
       ],
 
       time1:"",
-time2:"",
-time3:"",
+      time2:"",
+      time3:"",
        form: {
+         cmo:'',
           name: '',
           region: '',
           date1: '',
           date2: '',
-          delivery: false,
-          type: [],
+          delivery: '',
+          type1: '',
+          type2: [],
+          type3: [],
+          type4: [],
           resource: '',
           desc: ''
         },
@@ -162,7 +119,7 @@ time3:"",
             'contact': '',
             'address': '',
             'pastureName': '',
-            enable: ''
+            'enable': ''
           }
         },
         tableKey: 0,
@@ -181,11 +138,11 @@ time3:"",
   },
 
   created() {
- 
+    this.getCompanyList()
     this.getButtons()
   },
   mounted() {
-  
+
   },
   methods: {
     getButtons() {
@@ -197,22 +154,12 @@ time3:"",
     onSubmit() {
         console.log('submit!');
       },
-       change_auto1() {
-        console.log('submit!');
-      },
     handleEnableChange() {
       console.log('点击了是否启用')
     },
     handleConfirmStartChange() {
       console.log('点击了确认开始')
     },
-    handleSearch() {
-      console.log('点击了查询')
-      this.getList()
-      this.table.getdataListParm.offset = 1
-      this.arrowDown = true
-      this.arrowUp = false
-    },
 
     change_time1(){
       console.log(this.time1)
@@ -221,11 +168,156 @@ time3:"",
     change_select(){
       console.log(this.time1)
     },
- 
+    getCompanyList(){
+      const url = 'authdata/GetDataByName'
+      const data = {}
+      data.name = 'getCompanyName'
+      postJson(url, data).then(response => {
+        console.log('公司数据', response.data.list)
+        if (response.data.list !== null) {
+          this.companyArr = response.data.list
+        } else {
+          this.companyArr = []
+        }
+      })
+    },
+    change_company(item){
+      console.log(item)
+      this.getUploadCheckedList()
+      this.getDownloadCheckedList()
+      this.getUploadRadioCheckedList()
+    },
+    getUploadCheckedList(){
+      const url = 'authdata/GetDataByName'
+      const data = {}
+      data.name = 'getScheduledUpByCompany'
+      data.parammaps = {}
+      data.parammaps.company = this.form.cmo
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.form.type2 = []
+          this.autoArr2 = []
+          this.myautoArr2 = []
+          for(let i=0;i<response.data.list.length;i++){
+            var obj={}
+            obj.name = response.data.list[i].sname
+            this.autoArr2.push(obj)
+            this.myautoArr2.push(response.data.list[i])
+            if(response.data.list[i].automatic== 1){
+              this.form.type2.push(response.data.list[i].sname)
+            }
+            if(response.data.list[i].manual== 1){
+              this.form.type4.push(response.data.list[i].sname)
+            }
+          }
+        } else {
+          this.companyArr = []
+        }
+      })
+    },
+    getDownloadCheckedList(){
+      const url = 'authdata/GetDataByName'
+      const data = {}
+      data.name = 'getScheduledDownByCompany'
+      data.parammaps = {}
+      data.parammaps.company = this.form.cmo
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.form.type3 = []
+          this.autoArr1 = []
+          this.myautoArr3 = []
+          for(let i=0;i<response.data.list.length;i++){
+            var obj={}
+            obj.name = response.data.list[i].sname
+            this.autoArr1.push(obj)
+            this.myautoArr3.push(response.data.list[i])
+            if(response.data.list[i].manual== 1){
+              this.form.type3.push(response.data.list[i].sname)
+            }
+          }
+          console.log('this.form.type3',this.form.type3)
+          console.log('this.autoArr1',this.autoArr1)
+        } else {
+          this.companyArr = []
+        }
+      })
+    },
+    getUploadRadioCheckedList(){
+      const url = 'authdata/GetDataByName'
+      const data = {}
+      data.name = 'getScheduledUpStatusByCompany'
+      data.parammaps = {}
+      data.parammaps.company = this.form.cmo
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.form.type1 = response.data.list[0].times
+          this.form.delivery = response.data.list[0].enable
+        } else {
+          this.form.type1 = ''
+          this.form.delivery = ''
+        }
+      })
+    },
+    changeEnable(){
+      const url = 'authdata/GetDataByName'
+      const data = {}
+      data.name = 'updateScheduledStatus'
+      data.parammaps = {}
+      data.parammaps.company = this.form.cmo
+      data.parammaps.enable = this.form.delivery
+      data.parammaps.times = this.form.type1
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.$notify({ title: '成功', message: '保存成功', type: 'success',  duration: 2000 })
+        } else {
+          this.$notify({ title: '失败', message: '保存失败', type: 'success',  duration: 2000 })
+        }
+      })
+    },
+    change_auto1(item,type,ids,list) {
+      console.log(ids,'5555555555')
+      // console.log(this.myautoArr2)
+      var myIds = []
+      for(let i=0;i<list.length;i++){
+        for(let j=0;j<ids.length;j++){
+          if(list[i].sname == ids[j]){
+            myIds.push(list[i].scheduledid)
+          }
+        }
+      }
+      const url = 'authdata/scheduled/status/edit'
+      const data = {}
+      data.company = this.form.cmo
+      data.id = myIds
+      if(item == 'automatic'){
+         data.automatic = '1'
+      }else{
+        data.manual = '1'
+      }
+      console.log('myIds',myIds)
+      data.type = type
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.$notify({ title: '成功', message: '保存成功', type: 'success',  duration: 2000 })
+        } else {
+          this.$notify({ title: '失败', message: '保存失败', type: 'success',  duration: 2000 })
+        }
+      })
+    },
+    handleSyncNow() {
+      const url = 'authdata/synchronizeNow'
+      const data = {}
+      data.company = this.form.cmo
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          this.$notify({ title: '成功', message: '保存成功', type: 'success',  duration: 2000 })
+        } else {
+          this.$notify({ title: '失败', message: '保存失败', type: 'success',  duration: 2000 })
+        }
+      })
+    },
   }
 }
 </script>
 <style lang="scss" scoped>
   .search{margin-top:10px;}
-  
-