Przeglądaj źródła

2021/07/24 -lrl

lirl 3 lat temu
rodzic
commit
9ad94938ce

+ 22 - 12
src/views/energyPlan/components/supplyAndDemand/planProjectDataMonth.vue

@@ -94,7 +94,7 @@
                                         size="mini"
                                         icon="el-icon-search"
                                         v-if="butPrivilege.QUERY"
-                                        @click="getTableData(1)"
+                                        @click="getTableData()"
                                     >查询</el-button>
                                     <el-button
                                         size="mini"
@@ -145,7 +145,7 @@
                             class-name="cnspicuous"
                         ></el-table-column>
                         <el-table-column
-                            prop="index"
+                            prop="sqno"
                             label="序号"
                             fixed="left"
                             width="50px"
@@ -433,7 +433,6 @@
                     v-model="dialog.editorBox.form.data.may"
                     style="width: 100%;"
                     :timegranId="'MONTH'"
-                    :defaultOffset="-1"
                     ></zj-timegran-date>
                 </el-form-item>
             </el-col>
@@ -706,7 +705,8 @@ export default {
                             jxdays: '',
                             memo: '',
                             kxf_weight: '',
-                            yxf_weight: ''
+                            yxf_weight: '',
+                            sqno: ''
                         },
                          rules: {
                              weightMonth: [
@@ -1004,7 +1004,6 @@ export default {
                 kxf_weight: that.dialog.editorBox.form.data.kxf_weight,
                 yxf_weight: that.dialog.editorBox.form.data.yxf_weight
             });
-            console.log(SubmitData)
             that.$refs['dialog_form'].validate((valid) => {
                if (valid) {
                         that.loading = true;
@@ -1052,7 +1051,6 @@ export default {
                     yxf_weight: that.tableFormDataObj[key].yxf_weight
                             });
                         }
-                        console.log(SubmitData)
                    that.$refs['dialog_form2'].validate((valid) => {
                       if (valid) {
                         that.loading = true;
@@ -1155,12 +1153,12 @@ export default {
                                 memo: item.memo,
                                 state: item.state,
                                 kxf_weight: item.kxf_weight,
-                                yxf_weight: item.yxf_weight
+                                yxf_weight: item.yxf_weight,
+                                sqno: item.sqno
                             });
                         }
                         that.total = res.data.total;
                         that.tableData = arr;
-                        console.log('表格数据', arr)
                         that.getAdds();
                     } else {
                         that.$message.error(res.message);
@@ -1277,6 +1275,16 @@ export default {
         },
         but_add () {
             let that = this;
+            that.dialog.editorBox.form.data.productid = '';
+            that.dialog.editorBox.form.data.workprocid = '';
+            that.dialog.editorBox.form.data.weightMonth = '';
+            that.dialog.editorBox.form.data.weightDay = '';
+            that.dialog.editorBox.form.data.unitid = '';
+            that.dialog.editorBox.form.data.jxdays = '';
+            that.dialog.editorBox.form.data.memo = '';
+            that.dialog.editorBox.form.data.kxf_weight = '';
+            that.dialog.editorBox.form.data.yxf_weight = '';
+            that.dialog.editorBox.form.data.memo = '';
             that.dialog.editorBox.show = true;
              setTimeout(() => {
                 that.$refs['dialog_form'].clearValidate();
@@ -1520,8 +1528,8 @@ export default {
                                 workprocid: that.tableFormDataObj[key].workprocid,
                                 may: that.tableFormDataObj[key].may,
                                 networkid: that.tableFormDataObj[key].networkid,
-                                weightMonth: that.tableFormDataObj[key].weightMonth,
-                                weightDay: that.tableFormDataObj[key].weightDay,
+                                weightMonth: that.tableFormDataObj[key].weightMonth.toString(),
+                                weightDay: that.tableFormDataObj[key].weightDay.toString(),
                                 unit: that.tableFormDataObj[key].unit,
                                 jxdays: that.tableFormDataObj[key].jxdays,
                                 createtime: that.tableFormDataObj[key].createtime,
@@ -1531,7 +1539,8 @@ export default {
                                 state: that.tableFormDataObj[key].state,
                                 memo: that.tableFormDataObj[key].memo,
                                 kxf_weight: that.tableFormDataObj[key].kxf_weight,
-                                yxf_weight: that.tableFormDataObj[key].yxf_weight
+                                yxf_weight: that.tableFormDataObj[key].yxf_weight,
+                                sqno: that.tableFormDataObj[key].sqno
                             });
                         }
                         that.loading = true;
@@ -1568,7 +1577,8 @@ export default {
                         return;
                     }
                     SubmitData.push({
-                        id: item.id
+                        id: item.id,
+                        sqno: item.sqno
                     });
                 }
                 that.$confirm('是否删除已选数据?', '提示', {

+ 287 - 110
src/views/energyPlan/components/supplyAndDemand/planProjectRoundGx.vue

@@ -14,7 +14,7 @@
                                  <zj-timegran-date
                                     v-model="filterForm.data.clock"
                                     style="width: 100%;"
-                                    :timegranId="filterForm.data.timegranid"
+                                    :timegranId="'MONTH'"
                                     :oneFoo="getTableData"
                                 ></zj-timegran-date>
                             </el-form-item>
@@ -64,13 +64,13 @@
                         type="primary"
                         size="mini"
                         icon="el-icon-add-outline"
-                        @click="issue(1)"
+                        @click="issue()"
                     >下发</el-button>
                     <el-button
                         type="primary"
                         size="mini"
                         icon="el-icon-add-outline"
-                        @click="issue(0)"
+                        @click="offissue()"
                     >取消下发</el-button>
                     <div style="float:right; text-align: right;">
                         <el-button
@@ -118,6 +118,7 @@
                                 @current-change="getTableDetailData"
                             >
                                 <el-table-column
+                                sortable
                                 prop="sqno"
                                 label="序号"
                                 fixed="left"
@@ -125,16 +126,18 @@
                                 :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="may"
                                     label="月份"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="workprocid"
                                     label="工序"
                                     min-width="100px"
-                                    :show-overflow-tooltip="true"
+                                   :show-overflow-tooltip="true"
                                 >
                                 <template slot-scope="scope">
                                         <span>{{ nameObj.workprocid.obj[scope.row.workprocid] ? nameObj.workprocid.obj[scope.row.workprocid].name : scope.row.workprocid }}</span>
@@ -153,17 +156,17 @@
                                 </el-table-column>
                                 <el-table-column
                                 sortable
-                                    prop="weightMonth"
-                                    label="年度计划量(月)"
-                                    min-width="115px"
+                                    prop="kxf_weight"
+                                    label="可下发量"
+                                    min-width="100px"
                                     :show-overflow-tooltip="true"
                                 >
                                 </el-table-column>
                                 <el-table-column
-                                sortable
-                                    prop="kxf_weight"
-                                    label="可下发量"
-                                    min-width="100px"
+                                   sortable
+                                    prop="weightMonth"
+                                    label="年度计划量(月)"
+                                    min-width="115px"
                                     :show-overflow-tooltip="true"
                                 >
                                 </el-table-column>
@@ -211,6 +214,7 @@
                                  @selection-change="handleSelectionChange"
                             >
                                 <el-table-column
+                                sortable
                                 type="selection"
                                 width="40"
                                 align="center"
@@ -219,6 +223,7 @@
                                 class-name="cnspicuous"
                             ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="sqno"
                                     label="月序号"
                                     min-width="100px"
@@ -226,6 +231,7 @@
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="may"
                                     label="月份"
                                     min-width="100px"
@@ -233,13 +239,29 @@
                                 >
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="describe"
                                     label="轮次描述"
-                                    min-width="100px"
+                                    min-width="160px"
                                     :show-overflow-tooltip="true"
                                 >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.describe'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.describe"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].describe"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.describe}}</span>
+                                </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="state"
                                     label="状态"
                                     min-width="100px"
@@ -252,6 +274,7 @@
                                  </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="grades"
                                     label="钢种"
                                     min-width="100px"
@@ -264,14 +287,16 @@
                                     :rules="tableFormRules.grades"
                                   >
                                     <el-select
-                                    filterable clearable
+                                    allow-create
+                                    filterable
+                                    clearable
                                     v-model="rightTableObj[scope.row.seq].grades"
                                     placeholder=""
                                     >
                                     <el-option
                                     v-for="item of nameObj.grades.arr"
                                     :key="item.id"
-                                    :value="item.id"
+                                    :value="item.name"
                                     :label="item.name"
                                     ></el-option>
                                     </el-select>
@@ -280,6 +305,7 @@
                                 </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="planWeight"
                                     label="计划量"
                                     min-width="100px"
@@ -301,6 +327,7 @@
                             </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="specifications"
                                     label="规格"
                                     min-width="100px"
@@ -313,14 +340,16 @@
                                    :rules="tableFormRules.specifications"
                                   >
                                     <el-select
-                                    filterable clearable
+                                    allow-create
+                                    filterable
+                                    clearable
                                     v-model="rightTableObj[scope.row.seq].specifications"
                                     placeholder=""
                                     >
                                     <el-option
                                     v-for="item of nameObj.specifications.arr"
                                     :key="item.id"
-                                    :value="item.id"
+                                    :value="item.name"
                                     :label="item.name"
                                     ></el-option>
                                     </el-select>
@@ -329,6 +358,7 @@
                                 </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="transportType"
                                     label="运输方式"
                                     min-width="100px"
@@ -341,7 +371,9 @@
                                      :rules="tableFormRules.transportType"
                                   >
                                     <el-select
-                                    filterable clearable
+                                    allow-create
+                                    filterable
+                                    clearable
                                     v-model="rightTableObj[scope.row.seq].transportType"
                                     placeholder=""
                                     >
@@ -357,6 +389,7 @@
                                 </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="purpose"
                                     label="用途"
                                     min-width="100px"
@@ -369,7 +402,9 @@
                                      v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
                                   >
                                     <el-select
-                                    filterable clearable
+                                    allow-create
+                                    filterable
+                                    clearable
                                     v-model="rightTableObj[scope.row.seq].purpose"
                                     placeholder=""
                                     >
@@ -385,6 +420,7 @@
                                 </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="chemicalStandard"
                                     label="执行标准"
                                     min-width="100px"
@@ -397,7 +433,9 @@
                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
                                   >
                                     <el-select
-                                    filterable clearable
+                                    allow-create
+                                    filterable
+                                    clearable
                                     v-model="rightTableObj[scope.row.seq].chemicalStandard"
                                     placeholder=""
 
@@ -414,40 +452,60 @@
                                 </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="memo"
                                     label="备注"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 >
+                                <template slot-scope="scope">
+                                 <el-form-item
+                                 :prop="scope.row.seq + '.memo'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.memo"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].memo"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.memo}}</span>
+                                </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="issuedTime"
                                     label="下发时间"
-                                    min-width="100px"
+                                    min-width="130px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="createman"
                                     label="创建人"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="createtime"
                                     label="创建时间"
-                                    min-width="100px"
+                                    min-width="130px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="updateman"
                                     label="修改人"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
                                     prop="updatetime"
                                     label="修改时间"
-                                    min-width="100px"
+                                    min-width="130px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
@@ -533,7 +591,7 @@
                     <zj-timegran-date
                     v-model="dialog.editorBox.form.data.may"
                     style="width: 100%;"
-                    :timegranId="filterForm.data.timegranid"
+                    :timegranId="'MONTH'"
                     :oneFoo="getTableData"
                     ></zj-timegran-date>
                 </el-form-item>
@@ -560,16 +618,18 @@
                prop="grades"
                >
                    <el-select
-                     filterable clearable
+                     filterable
+                     clearable
+                     allow-create
                      v-model="dialog.editorBox.form.data.grades"
                      placeholder=""
-                    style="width: 100%;"
-                    :rules="tableFormRules.grades"
+                     style="width: 100%;"
+                     :rules="tableFormRules.grades"
                     >
                     <el-option
                     v-for="item of nameObj.grades.arr"
                     :key="item.id"
-                    :value="item.id"
+                    :value="item.name"
                     :label="item.name"
                     ></el-option>
                     </el-select>
@@ -583,7 +643,9 @@
             prop="specifications"
                 >
             <el-select
-                     filterable clearable
+                     allow-create
+                     filterable
+                     clearable
                      v-model="dialog.editorBox.form.data.specifications"
                      placeholder=""
                     style="width: 100%;"
@@ -592,7 +654,7 @@
                     <el-option
                     v-for="item of nameObj.specifications.arr"
                     :key="item.id"
-                    :value="item.id"
+                    :value="item.name"
                     :label="item.name"
                     ></el-option>
                     </el-select>
@@ -604,7 +666,9 @@
             prop="transportType"
                 >
              <el-select
-                     filterable clearable
+                     allow-create
+                     filterable
+                     clearable
                      v-model="dialog.editorBox.form.data.transportType"
                      placeholder=""
                     style="width: 100%;"
@@ -613,7 +677,7 @@
                     <el-option
                     v-for="item of nameObj.transportType.arr"
                     :key="item.id"
-                    :value="item.id"
+                    :value="item.name"
                     :label="item.name"
                     ></el-option>
             </el-select>
@@ -628,7 +692,9 @@
                 :rules="tableFormRules.chemicalStandard"
                 >
                <el-select
-                     filterable clearable
+                     allow-create
+                     filterable
+                     clearable
                      v-model="dialog.editorBox.form.data.chemicalStandard"
                      placeholder=""
                      style="width: 100%;"
@@ -666,7 +732,9 @@
                  :rules="dialog.editorBox.form.purpose"
                 >
                <el-select
-                     filterable clearable
+                     allow-create
+                     filterable
+                     clearable
                      v-model="dialog.editorBox.form.data.purpose"
                      placeholder=""
                      style="width: 100%;"
@@ -681,6 +749,20 @@
             </el-select>
                 </el-form-item>
             </el-col>
+             <el-col :span="12">
+                <el-form-item
+                 label="备注"
+                 prop="memo"
+                 :rules="dialog.editorBox.form.memo"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.memo"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
         </el-row>
          </el-form>
          </div>
@@ -756,13 +838,14 @@ export default {
             pageNum: 1,
             pageSize: 20,
             total: 0,
-            rightTableData: [],
             singleTableHeight: 100,
             leftTableData: [],
             leftTableLoading: false,
             leftTableWidth: 550,
             difference: 0,
-            rightTableObj: {},
+             rightTableData: [],
+            rightTableObj: {
+            },
             multipleSelection: [],
             tableFormDataObj: {},
             tableFormRules: {
@@ -854,36 +937,12 @@ export default {
                     }
                 },
                 grades: {
-                    obj: {
-                        '0': {name: 'Q235'},
-                        '1': {name: 'Q195'}
-                    },
-                    arr: [
-                        {
-                            id: '0',
-                            name: 'Q235'
-                        },
-                        {
-                            id: '1',
-                            name: 'Q195'
-                        }
-                    ]
+                    obj: {},
+                    arr: []
                 },
                 specifications: {
-                    obj: {
-                        '0': {name: '6.5'},
-                        '1': {name: '20'}
-                    },
-                    arr: [
-                        {
-                            id: '0',
-                            name: '6.5'
-                        },
-                        {
-                            id: '1',
-                            name: '20'
-                        }
-                    ]
+                    obj: {},
+                    arr: []
                 },
                 transportType: {
                     obj: {'0': {name: '火运'}, '1': {name: '汽运'}},
@@ -899,25 +958,8 @@ export default {
                     ]
                 },
                 chemicalStandard: {
-                    obj: {
-                        '0': {name: 'Q/JXT017-2021'},
-                        '1': {name: 'GB/T 700-2006'},
-                        '2': {name: 'GB/T 701-2008'}
-                        },
-                    arr: [
-                        {
-                            id: '0',
-                            name: 'Q/JXT017-2021'
-                        },
-                        {
-                            id: '1',
-                            name: 'GB/T 700-2006'
-                        },
-                        {
-                            id: '2',
-                            name: 'GB/T 701-2008'
-                        }
-                    ]
+                    obj: {},
+                    arr: []
                 },
                 purpose: {
                     obj: {
@@ -1035,6 +1077,9 @@ export default {
         that.getTimeGranData();
         that.getEnergyIdData();
         that.getPropertyIdData();
+        that.getGrades();
+        that.getSpecifications();
+        that.getStandards();
         that.getUnitIdData();
     },
     methods: {
@@ -1190,7 +1235,6 @@ export default {
                             })
                         }
                         that.leftTableData = arr;
-                        that.rightTableObj.tableData = [];
                         that.dialog.fRow = null;
                         that.total = res.data.total;
                     } else {
@@ -1210,13 +1254,11 @@ export default {
         // 点击查询
         getTableDetailData (row) {
             let that = this;
-            let params = {
-            parentid: row.id
-        };
+            if (row) {
             that.tableLoading = true;
             let url = 'pass/ems/v1/emsprodplanrounds/';
             that.axios.get(url, {
-                params: params
+                params: {parentid: row.id}
             })
             .then(function (res) {
                 if (res.code === '0') {
@@ -1255,12 +1297,14 @@ export default {
                     }).catch(function () {
                     that.tableLoading = false;
             });
+            }
         },
-        getTableDetailDatas () {
+        getTableDetailDatas (workprocType, sqno) {
             let that = this;
             let params = {
             may: that.filterForm.data.clock,
-            workprocType: that.filterForm.data.workprocid ? that.nameObj.workprocid.obj['AT2005'].id : 'AT2005'
+            workprocType: workprocType,
+            sqno: sqno
          };
             that.tableLoading = true;
             let url = 'pass/ems/v1/emsprodplanrounds/';
@@ -1290,7 +1334,9 @@ export default {
                     createman: item.createman,
                     createtime: item.createtime,
                     updateman: item.updateman,
-                    updatetime: item.updatetime
+                    sqno: item.sqno,
+                    updatetime: item.updatetime,
+                    workprocType: item.workprocType
                  });
                     }
                     that.rightTableData = arr;
@@ -1394,7 +1440,6 @@ export default {
                                 createtime: that.rightTableObj[key].createtime
                             });
                         }
-                        console.log(SubmitData)
                         that.loading = true;
                         that.axios.put('pass/ems/v1/emsprodplanrounds/batchUpdate', SubmitData)
                             .then(function (res) {
@@ -1403,8 +1448,7 @@ export default {
                                         message: '保存成功',
                                         type: 'success'
                                     });
-                                     that.getTableDetailDatas();
-                                    that.getTableData();
+                                     that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
                                 } else {
                                     that.$message.error(res.message);
                                 }
@@ -1419,7 +1463,79 @@ export default {
                 this.$message.error('至少要选择一条数据');
             }
         },
-        issue (sate) {
+        getGrades () {
+            let that = this
+            let url = 'pass/product/v1/emssteel/getGrades/?type=' + '高线';
+
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.steelName
+                            })
+                                obj[item.id] = {
+                                name: item.steelName,
+                                id: item.id
+                            }
+                        }
+                        that.nameObj.grades.arr = arr;
+                        that.nameObj.grades.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        getSpecifications () {
+            let that = this
+            let url = 'pass/product/v1/emssteel/getSpecifications/?type=' + '高线';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.specName
+                            })
+                            obj[item.id] = {
+                                name: item.specName,
+                                unitid: item.id
+                            }
+                        }
+                        that.nameObj.specifications.arr = arr;
+                        that.nameObj.specifications.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        getStandards () {
+            let that = this
+            let url = 'pass/product/v1/emsstandard/getStandards';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.basecode,
+                                name: item.basename
+                            })
+                        }
+                        that.nameObj.chemicalStandard.arr = arr;
+                        that.nameObj.chemicalStandard.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        issue () {
             let that = this;
             if (that.multipleSelection.length > 0) {
             that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
@@ -1446,8 +1562,7 @@ export default {
                         updatetime: that.rightTableObj[key].updatetime,
                         id: that.rightTableObj[key].roundid,
                         state: that.rightTableObj[key].state,
-                        sqno: that.rightTableObj[key].sqno,
-                        isxf: sate
+                        sqno: that.rightTableObj[key].sqno
                    });
                 }
                 that.loading = true;
@@ -1461,7 +1576,7 @@ export default {
                     type: 'success'
                      });
                     that.getTableData();
-                   that.getTableDetailDatas();
+                   that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
                 } else {
                 that.$message.error(res.message);
             }
@@ -1475,7 +1590,7 @@ export default {
                   this.$message.error('至少要选择一条数据');
              }
         },
-        but_del_plural () {
+        offissue () {
             let that = this;
             if (that.multipleSelection.length > 0) {
             that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
@@ -1483,12 +1598,68 @@ export default {
                 let SubmitData = [];
                 for (let key in that.rightTableObj) {
                    SubmitData.push({
+                        parentid: that.rightTableObj[key].parentid,
+                        may: that.rightTableObj[key].may,
+                        roundid: that.rightTableObj[key].roundid,
+                        describe: that.rightTableObj[key].describe,
+                        grades: that.rightTableObj[key].grades,
+                        planWeight: that.rightTableObj[key].planWeight,
+                        specifications: that.rightTableObj[key].specifications,
+                        transportType: that.rightTableObj[key].transportType,
+                        workprocType: that.rightTableObj[key].workprocType,
+                        purpose: that.rightTableObj[key].purpose,
+                        chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                        memo: that.rightTableObj[key].memo,
+                        issuedTime: that.rightTableObj[key].issuedTime,
+                        createman: that.rightTableObj[key].createman,
+                        createtime: that.rightTableObj[key].createtime,
+                        updateman: that.rightTableObj[key].updateman,
+                        updatetime: that.rightTableObj[key].updatetime,
                         id: that.rightTableObj[key].roundid,
-                        state: that.rightTableObj[key].state
+                        state: that.rightTableObj[key].state,
+                        sqno: that.rightTableObj[key].sqno
                    });
                 }
-                console.log(SubmitData)
                 that.loading = true;
+                that.axios.post('pass/ems/v1/emsprodplanrounds/offissue', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                   that.$message({
+                    message: '操作成功',
+                    type: 'success'
+                     });
+                   that.getTableData();
+                   that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                } else {
+                that.$message.error(res.message);
+            }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+            }
+          });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        but_del_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state
+                   });
+                }
+                 that.$confirm('是否删除已选数据?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    state: 'warning'
+                }).then(() => {
                 that.axios.post('pass/ems/v1/emsprodplanrounds/delete', SubmitData, {
                     contentType: 'application/json'
                 })
@@ -1496,10 +1667,9 @@ export default {
                 if (res.code === '0') {
                     that.$message({
                     message: '删除成功',
-                   type: 'success'
+                    type: 'success'
                  });
-                that.getTableData();
-                that.getTableDetailDatas();
+                that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
                 that.dialog.editorBox.show = false;
                 } else {
                 that.$message.error(res.message);
@@ -1508,8 +1678,7 @@ export default {
                 }).catch(function () {
                  that.loading = false;
                 });
-            }
-          });
+                });
              } else {
                   this.$message.error('至少要选择一条数据');
              }
@@ -1525,9 +1694,9 @@ export default {
                 chemicalStandard: that.dialog.editorBox.form.data.chemicalStandard,
                 workprocType: that.dialog.editorBox.form.data.workprocid,
                 planWeight: that.dialog.editorBox.form.data.planWeight,
-                purpose: that.dialog.editorBox.form.data.purpose
+                purpose: that.dialog.editorBox.form.data.purpose,
+                memo: that.dialog.editorBox.form.data.memo
             };
-            console.log(SubmitData)
             that.$refs['dialog_form'].validate((valid) => {
                if (valid) {
                         that.loading = true;
@@ -1540,7 +1709,7 @@ export default {
                                         message: '新增成功',
                                         type: 'success'
                                     });
-                                    that.getTableData();
+                                    that.getTableDetailDatas(that.dialog.editorBox.form.data.workprocid, null);
                                     that.dialog.editorBox.show = false;
                                 } else {
                                     that.$message.error(res.message);
@@ -1639,8 +1808,17 @@ export default {
         },
       but_add () {
             let that = this;
+            that.dialog.editorBox.form.data.describe = '';
+            that.dialog.editorBox.form.data.grades = '';
+            that.dialog.editorBox.form.data.specifications = '';
+            that.dialog.editorBox.form.data.transportType = '';
+            that.dialog.editorBox.form.data.chemicalStandard = '';
+            that.dialog.editorBox.form.data.workprocid = '';
+            that.dialog.editorBox.form.data.planWeight = '';
+            that.dialog.editorBox.form.data.purpose = '';
             that.dialog.editorBox.show = true;
-             setTimeout(() => {
+            that.dialog.editorBox.form.data.planWeight = '';
+            setTimeout(() => {
                 that.$refs['dialog_form'].clearValidate();
             }, 100);
         },
@@ -1667,7 +1845,6 @@ export default {
                                     apportvalue: item.APPORTVALUE
                                 })
                             }
-                            console.log(arr)
                             row.tableData = arr;
                             row.getTable = true;
                         } else {

+ 1966 - 0
src/views/energyPlan/components/supplyAndDemand/planProjectRoundLG.vue

@@ -0,0 +1,1966 @@
+<template>
+    <div class="balanceSheetData">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                             <el-form-item label="月份">
+                                 <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :timegranId="'MONTH'"
+                                    :oneFoo="getTableData"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                           <el-form-item label="产线">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.workprocid"
+                                    placeholder=""
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.workprocid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+               <div class="box-top-gjl">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-plus"
+                            v-privilege="activeMenu + 'ADD'"
+                            @click="but_add"
+                        >新增</el-button>
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="but_edit_plural()"
+                    >修改</el-button>
+                    <el-button
+                        class="button"
+                        type="danger"
+                        size="mini"
+                        icon="el-icon-delete"
+                        @click="but_del_plural()"
+                    >删除</el-button>
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="issue()"
+                    >下发</el-button>
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="offissue()"
+                    >取消下发</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['boxBottom']) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom" ref="boxBottom">
+                <div class="table-box" ref="table_box">
+                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }">
+                        <el-form
+                            size="mini"
+                            ref="dialog_form_arr_1"
+                            label-width="0px"
+                            :model="tableFormDataObj"
+                        >
+                            <el-table stripe
+                                id="singleTable1"
+                                ref="singleTable1"
+                                :data="leftTableData"
+                                v-loading="leftTableLoading"
+                                style="width: 100%;"
+                                :height="singleTableHeight"
+                                border
+                                size="mini"
+                                highlight-current-row
+                                show-summary
+                                :summary-method="getSummaries"
+                                @current-change="getTableDetailData"
+                            >
+                                <el-table-column
+                                prop="sqno"
+                                label="序号"
+                                fixed="left"
+                                width="50px"
+                                :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                    prop="may"
+                                    label="月份"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                    prop="workprocid"
+                                    label="工序"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                        <span>{{ nameObj.workprocid.obj[scope.row.workprocid] ? nameObj.workprocid.obj[scope.row.workprocid].name : scope.row.workprocid }}</span>
+                                    </template>
+                                </el-table-column>
+                              <el-table-column
+                                sortable
+                                    prop="unit"
+                                    label="单位"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                    <template slot-scope="scope">
+                                        <span>{{ nameObj.unit.obj[scope.row.unit] ? nameObj.unit.obj[scope.row.unit] : scope.row.unit }}</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="weightMonth"
+                                    label="年度计划量(月)"
+                                    min-width="115px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="kxf_weight"
+                                    label="可下发量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="yxf_weight"
+                                    label="已下发量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                prop="id"
+                                label="序号"
+                                fixed="left"
+                                width="50px"
+                                :show-overflow-tooltip="true"
+                                v-if="filterForm.data.show"
+                                ></el-table-column>
+                            </el-table>
+                        </el-form>
+                    </div>
+                    <div class="table-tuodong" :style="{ height: singleTableHeight + 'px' }"
+                        @mousedown="tableTDMousedown"
+                    ></div>
+                    <div class="table-right" :style="{ 'margin-left': (leftTableWidth + 7) + 'px' }">
+                        <el-form
+                            size="mini"
+                            ref="dialog_form_arr_2"
+                            label-width="0px"
+                            :model="rightTableObj"
+                        >
+                            <el-table stripe
+                                id="singleTable2"
+                                ref="singleTable2"
+                                :data="rightTableData"
+                                v-loading="tableLoading"
+                                style="width: 100%;"
+                                :height="singleTableHeight"
+                                border
+                                size="mini"
+                                highlight-current-row
+                                show-summary
+                                :summary-method="getSummaries"
+                                 @selection-change="handleSelectionChange"
+                            >
+                                <el-table-column
+                                type="selection"
+                                width="40"
+                                align="center"
+                                :selectable='checkboxT'
+                                fixed="left"
+                                class-name="cnspicuous"
+                            ></el-table-column>
+                                <el-table-column
+                                    prop="sqno"
+                                    label="月序号"
+                                    min-width="100px"
+                                    v-model="filterForm.data.sqno"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="may"
+                                    label="月份"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="describe"
+                                    label="轮次描述"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.describe'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.describe !== '2'"
+                                  :rules="tableFormRules.describe"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].describe"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.describe}}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="state"
+                                    label="状态"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].color : ''}"
+                                >{{ nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].name : scope.row.state }}</span>
+                                 </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="grades"
+                                    label="钢种"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                    <el-form-item
+                                    :prop="scope.row.seq + '.grades'"
+                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :rules="tableFormRules.grades"
+                                  >
+                                    <el-select
+                                    filterable clearable
+                                    v-model="rightTableObj[scope.row.seq].grades"
+                                    placeholder=""
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.grades.arr"
+                                    :key="item.id"
+                                    :value="item.id"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.grades.obj[scope.row.grades] ? nameObj.grades.obj[scope.row.grades].name : scope.row.grades }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="planWeight"
+                                    label="计划量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.planWeight'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.planWeight"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].planWeight"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.planWeight}}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                 sortable
+                                    prop="fetchPlanWeight"
+                                    label="已获取计划量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="specifications"
+                                    label="规格"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                    <el-form-item
+                                  :prop="scope.row.seq + '.specifications'"
+                                   v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                   :rules="tableFormRules.specifications"
+                                  >
+                                    <el-select
+                                    filterable clearable
+                                    v-model="rightTableObj[scope.row.seq].specifications"
+                                    placeholder=""
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.specifications.arr"
+                                    :key="item.id"
+                                    :value="item.id"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.specifications.obj[scope.row.specifications] ? nameObj.specifications.obj[scope.row.specifications].name : scope.row.specifications }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="lengths"
+                                    label="长度"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.lengths'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.lengths"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].lengths"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.lengths}}</span>
+                            </template>
+                                </el-table-column>
+                                <el-table-column
+                                    prop="surfaceStandard"
+                                    label="表面成分执行标准"
+                                    min-width="110px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                    <el-form-item
+                                    :prop="scope.row.seq + '.surfaceStandard'"
+                                    :rules="tableFormRules.surfaceStandard"
+                                     v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  >
+                                    <el-select
+                                    filterable clearable
+                                    v-model="rightTableObj[scope.row.seq].surfaceStandard"
+                                    placeholder=""
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.surfaceStandard.arr"
+                                    :key="item.id"
+                                    :value="item.id"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.surfaceStandard.obj[scope.row.surfaceStandard] ? nameObj.surfaceStandard.obj[scope.row.surfaceStandard].name : scope.row.surfaceStandard }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                    prop="chemicalStandard"
+                                    label="化学成分执行标准"
+                                    min-width="110px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                   <el-form-item
+                                   :prop="scope.row.seq + '.chemicalStandard'"
+                                   :rules="tableFormRules.chemicalStandard"
+                                   v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  >
+                                    <el-select
+                                    filterable clearable
+                                    v-model="rightTableObj[scope.row.seq].chemicalStandard"
+                                    placeholder=""
+
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.chemicalStandard.arr"
+                                    :key="item.id"
+                                    :value="item.name"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                 <span v-else>{{ nameObj.chemicalStandard.obj[scope.row.chemicalStandard] ? nameObj.chemicalStandard.obj[scope.row.chemicalStandard].name : scope.row.chemicalStandard }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="goinfo"
+                                    label="去向"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                  :prop="scope.row.seq + '.goinfo'"
+                                   v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.goinfo"
+                                >
+                                    <el-select
+                                    filterable clearable
+                                    v-model="rightTableObj[scope.row.seq].goinfo"
+                                    placeholder=""
+
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.goinfo.arr"
+                                    :key="item.id"
+                                    :value="item.id"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.goinfo.obj[scope.row.goinfo] ? nameObj.goinfo.obj[scope.row.goinfo].name : scope.row.goinfo }}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="memo"
+                                    label="备注"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.memo'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.memo"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].memo"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.memo}}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="issuedTime"
+                                    label="下发时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="createman"
+                                    label="创建人"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="createtime"
+                                    label="创建时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="updateman"
+                                    label="修改人"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="updatetime"
+                                    label="修改时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="roundid"
+                                    label="轮次序号"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                    v-if="filterForm.data.show"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="parentid"
+                                    label="月序号"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                    v-if="filterForm.data.show"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="workprocType"
+                                    label="工序类别"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                     v-if="filterForm.data.show"
+                                ></el-table-column>
+                            </el-table>
+                        </el-form>
+                    </div>
+                </div>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: left;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+        <el-dialog
+        title="轮次计划-炼钢 新增"
+        :visible.sync="dialog.editorBox.show"
+         width="600px"
+        :close-on-click-modal="false"
+        :show-close="!loading"
+        >
+     <div>
+         <el-form
+          ref="dialog_form"
+         :model="dialog.editorBox.form.data"
+         :rules="dialog.editorBox.form.rules"
+         size="mini"
+         label-width="95px"
+         >
+         <el-row>
+             <el-col :span="12">
+               <el-form-item
+               label="工序"
+               prop="workprocid"
+               :rules="dialog.editorBox.form.workprocid"
+               >
+                   <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.workprocid"
+                     placeholder=""
+                     style="width: 100%;"
+                    >
+                    <el-option
+                    v-for="item of nameObj.workprocid.arr"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    ></el-option>
+                    </el-select>
+               </el-form-item>
+             </el-col>
+             <el-col :span="12">
+                  <el-form-item
+                    label="月份"
+                    prop="may"
+                    :rules="dialog.editorBox.form.may"
+                    >
+                    <zj-timegran-date
+                    v-model="dialog.editorBox.form.data.may"
+                    style="width: 100%;"
+                    :timegranId="'MONTH'"
+                    :oneFoo="getTableData"
+                    ></zj-timegran-date>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                 label="轮次描述"
+                 prop="describe"
+                 :rules="dialog.editorBox.form.describe"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.describe"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="12">
+               <el-form-item
+               label="钢种"
+               prop="grades"
+               >
+                   <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.grades"
+                     placeholder=""
+                    style="width: 100%;"
+                    :rules="tableFormRules.grades"
+                    >
+                    <el-option
+                    v-for="item of nameObj.grades.arr"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    ></el-option>
+                    </el-select>
+              </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+            <el-form-item
+            label="规格"
+            prop="specifications"
+                >
+            <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.specifications"
+                     placeholder=""
+                    style="width: 100%;"
+                    :rules="tableFormRules.specifications"
+                    >
+                    <el-option
+                    v-for="item of nameObj.specifications.arr"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    ></el-option>
+                    </el-select>
+            </el-form-item>
+            </el-col>
+            <el-col :span="12">
+            <el-form-item
+                 label="长度"
+                 prop="lengths"
+                 :rules="dialog.editorBox.form.lengths"
+                >
+               <el-input
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.lengths"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                label="化学成分执行标准"
+                 prop="chemicalStandard"
+                :rules="tableFormRules.chemicalStandard"
+                >
+               <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.chemicalStandard"
+                     placeholder=""
+                     style="width: 100%;"
+                    >
+                    <el-option
+                    v-for="item of nameObj.chemicalStandard.arr"
+                    :key="item.id"
+                    :value="item.name"
+                    :label="item.name"
+                    ></el-option>
+            </el-select>
+                </el-form-item>
+            </el-col>
+             <el-col :span="12">
+                <el-form-item
+                 label="计划量"
+                 prop="planWeight"
+                 :rules="dialog.editorBox.form.planWeight"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.planWeight"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                 label="表面成分执行标准"
+                 prop="surfaceStandard"
+                 :rules="dialog.editorBox.form.surfaceStandard"
+                >
+               <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.surfaceStandard"
+                     placeholder=""
+                     style="width: 100%;"
+                    >
+                    <el-option
+                    v-for="item of nameObj.surfaceStandard.arr"
+                    :key="item.id"
+                    :value="item.name"
+                    :label="item.name"
+                    ></el-option>
+            </el-select>
+                </el-form-item>
+            </el-col>
+            <el-col :span="12">
+                <el-form-item
+                 label="去向"
+                 prop="goinfo"
+                :rules="dialog.editorBox.form.goinfo"
+                >
+               <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.goinfo"
+                     placeholder=""
+                     style="width: 100%;"
+                    >
+                    <el-option
+                    v-for="item of nameObj.goinfo.arr"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    ></el-option>
+            </el-select>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                 label="备注"
+                 prop="memo"
+                 :rules="dialog.editorBox.form.memo"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.memo"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+        </el-row>
+         </el-form>
+         </div>
+         <span
+        slot="footer"
+        class="dialog-footer"
+            >
+        <el-button
+        @click="dialog.editorBox.show = false"
+        :loading="loading"
+        >取 消</el-button>
+        <el-button
+        type="primary"
+        @click="dataSave"
+        :loading="loading"
+        >保 存</el-button>
+    </span>
+    </el-dialog>
+     <zj-formulaEditor :equationEditing="dialog.equationEditing"></zj-formulaEditor>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '@/utils/validator.js';
+import timegranDate from '@/components/zg/timegranDate.vue';
+import formulaEditor from '@/components/zg/formulaEditor.vue';
+import {formatDate, commonSummaries} from '@/utils/util.js';
+export default {
+    name: 'balanceSheetData',
+    components: {
+        'zj-timegran-date': timegranDate,
+        'zj-formulaEditor': formulaEditor
+    },
+    data () {
+        return {
+            activeMenu: '',
+            isCheck: false, // 是否为审核人
+            filterForm: {
+                show: true,
+                data: {
+                    id: '',
+                    timegranid: '',
+                    clock: '',
+                    workprocid: '',
+                    workprocType: '',
+                    energyid: '',
+                    propertyid: '',
+                    itemid: '',
+                    itemname: '',
+                    itemdesc: '',
+                    may: '',
+                    canissue: '',
+                    weightMonth: '',
+                    issue: '',
+                    yxf_weight: '',
+                    kxf_weight: '',
+                    describe: '',
+                    state: '',
+                    grades: '',
+                    specifications: '',
+                    chemicalStandard: '',
+                    surfaceStandard: '',
+                    parentid: '',
+                    sqno: '',
+                    show: false,
+                    memo: '',
+                    goinfo: '',
+                    fetchPlanWeight: ''
+                }
+            },
+             rules: {
+                },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            rightTableData: [],
+            singleTableHeight: 100,
+            leftTableData: [],
+            leftTableLoading: false,
+            leftTableWidth: 550,
+            difference: 0,
+            rightTableObj: {},
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                planWeight: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                grades: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                specifications: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                surfaceStandard: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                chemicalStandard: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                lengths: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                goinfo: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ]
+            },
+            nameObj: {
+                timegranid: {
+                    obj: {},
+                    arr: []
+                },
+                workprocid: {
+                    obj: {
+                        'AT2004': {
+                            id: 'AT2004',
+                           name: '炼钢'
+                         }
+                         },
+                    arr: [ {
+                            id: 'AT2004',
+                            name: '炼钢'
+                         }
+                         ]
+                },
+                goinfo: {
+                    obj: {
+                        '1036WM1': {
+                           id: '1036WM1',
+                           name: '外卖'
+                        },
+                        '1036XG1': {
+                            id: '1036XG1',
+                            name: '型钢厂'
+                        },
+                        '1036GX1': {
+                            id: '1036GX1',
+                            name: '高线一'
+                        },
+                        '1036GX2': {
+                            id: '1036GX2',
+                            name: '高线二'
+                        }
+                    },
+                    arr: [{
+                           id: '1036WM1',
+                           name: '外卖'
+                        },
+                        {
+                            id: '1036XG1',
+                            name: '型钢厂'
+                        },
+                        {
+                            id: '1036GX1',
+                            name: '高线一'
+                        },
+                        {
+                            id: '1036GX2',
+                            name: '高线二'
+                        }
+                        ]
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                propertyid: {
+                    obj: {},
+                    arr: []
+                },
+                unit: {
+                    obj: {},
+                    arr: []
+                },
+                state: {
+                    obj: {
+                        '0': {
+                            name: '已编制',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '已下发',
+                            color: 'rgb(28, 111, 217)'
+                        },
+                        '2': {
+                            name: '已接收',
+                            color: 'red'
+                        },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '已编制'
+                        },
+                        {
+                            id: '1',
+                            name: '已下发'
+                        },
+                        {
+                            id: '2',
+                            name: '已接收'
+                        }
+                    ]
+                    }
+                },
+                grades: {
+                    obj: {},
+                    arr: []
+                },
+                specifications: {
+                    obj: {},
+                    arr: []
+                },
+                lengths: {},
+                chemicalStandard: {
+                    obj: {},
+                    arr: []
+                },
+                surfaceStandard: {
+                    obj: {
+                        '0': {name: 'YB/T 2011—2014'},
+                        '1': {name: 'YB/T 2011—2014'}
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: 'YB/T 2011—2014'
+                        },
+                        {
+                            id: '1',
+                            name: 'YB/T 2011—2014'
+                        }
+                    ]
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                fRow: null,
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        default: {
+                            workprocid: ''
+                        },
+                        data: {
+                            itemid: '',
+                            materialid: '',
+                            workprocid: '',
+                            unitid: '',
+                            seqno: '',
+                            mes_prodline: '',
+                            code: '',
+                            digits: '',
+                            may: '',
+                            canissue: '',
+                            weightMonth: '',
+                            issue: '',
+                            yxf_weight: '',
+                            kxf_weight: '',
+                            describe: '',
+                            state: '',
+                            grades: '',
+                            specifications: '',
+                            lengths: '',
+                            chemicalStandard: '',
+                            surfaceStandard: '',
+                            transportType: '',
+                            workprocType: '',
+                            purpose: '',
+                            planWeight: '',
+                            memo: '',
+                            goinfo: '',
+                            fetchPlanWeight: ''
+                        },
+                         rules: {
+                            planWeight: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            grades: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            specifications: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            transportType: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            surfaceStandard: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            chemicalStandard: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            may: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            workprocid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            lengths: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                                ],
+                            goinfo: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ]
+                        }
+                    }
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '左表格',
+                    id: 'singleTable1'
+                },
+                {
+                    name: '右表格',
+                    id: 'singleTable2'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['boxBottom']) - 45;
+            }, 1);
+        });
+        that.getTimeGranData();
+        that.getEnergyIdData();
+        that.getPropertyIdData();
+        that.getUnitIdData();
+        that.getGrades();
+        that.getSpecifications();
+        that.getStandards();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['kxf_weight', 'weightMonth', 'yxf_weight', 'planWeight']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取时间粒度(平衡表数据维护)
+        getTimeGranData () {
+            let that = this
+            let url = 'pass/ems/v1/tcmdatasourcetimegrans/getTimegranRmBalanceValue';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.ID,
+                                name: item.NAME
+                            })
+                            obj[item.ID] = item.NAME;
+                            that.filterForm.data.timegranid = that.filterForm.data.timegranid ? that.filterForm.data.timegranid : item.ID;
+                        }
+                        that.nameObj.timegranid.arr = arr;
+                        that.nameObj.timegranid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        checkboxT (row, index) {
+            if (row.state === '2' && !this.isCheck) {
+                return false;
+            } else {
+                return true;
+            }
+        },
+        // 获取能介(平衡表)
+        getEnergyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/?isbalance=1';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取属性
+        getPropertyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergypropertys/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.propertyid.arr = arr;
+                        that.nameObj.propertyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unit.defaults = that.nameObj.unit.defaults ? that.nameObj.unit.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unit.arr = arr;
+                        that.nameObj.unit.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    timegranid: that.filterForm.data.timegranid,
+                    may: that.filterForm.data.clock,
+                    workprocid: that.filterForm.data.workprocid,
+                    energyid: that.filterForm.data.energyid,
+                    propertyid: that.filterForm.data.propertyid,
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    itemdesc: that.filterForm.data.itemdesc,
+                    fid: '',
+                    type: 'lg'
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.leftTableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanmonths/getDates/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                unit: item.unit,
+                                canissue: item.canissue,
+                                weightMonth: item.weightMonth,
+                                issue: item.issue,
+                                may: item.may,
+                                workprocid: item.workprocid,
+                                yxf_weight: item.yxf_weight,
+                                kxf_weight: item.kxf_weight,
+                                parentid: item.id,
+                                id: item.id,
+                                sqno: item.sqno
+                            })
+                        }
+                        that.leftTableData = arr;
+                        that.dialog.fRow = null;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.leftTableLoading = false;
+                }).catch(function () {
+                    that.leftTableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 点击查询
+        getTableDetailData (row) {
+            let that = this;
+             if (row) {
+            let params = {
+            parentid: row.id
+        };
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanrounds/';
+            that.axios.get(url, {
+                params: params
+            })
+            .then(function (res) {
+                if (res.code === '0') {
+                let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    updatetime: item.updatetime,
+                    sqno: item.sqno,
+                    workprocType: item.workprocType,
+                    lengths: item.lengths,
+                    surfaceStandard: item.surfaceStandard,
+                    goinfo: item.goinfo,
+                    fetchPlanWeight: item.fetchPlanWeight
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+            });
+             }
+        },
+        getTableDetailDatas (workprocType, sqno) {
+            let that = this;
+            let params = {
+            may: that.filterForm.data.clock,
+            workprocType: workprocType,
+            sqno: sqno
+         };
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanrounds/';
+            that.axios.get(url, {
+                params: params
+            })
+            .then(function (res) {
+                if (res.code === '0') {
+                let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    updatetime: item.updatetime,
+                    lengths: item.lengths,
+                    surfaceStandard: item.surfaceStandard,
+                    sqno: item.sqno,
+                    goinfo: item.goinfo,
+                    fetchPlanWeight: item.fetchPlanWeight
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+            });
+        },
+        jsDifference () {
+            let that = this;
+            let fV = that.dialog.fRow.apportvalue,
+                zV = 0;
+            let xId = that.dialog.fRow.itemid + '-' + that.dialog.fRow.timegranid + '-' + that.dialog.fRow.clock;
+            if (that.tableFormDataObj[xId]) {
+                fV = that.tableFormDataObj[xId].apportvalue;
+            }
+            for (let item of that.rightTableObj.tableData) {
+                zV = that.floatComputed(zV, item.apportvalue, '+');
+            }
+            that.difference = +that.floatComputed(fV, zV, '-').toFixed(3);
+        },
+        upTableFormDataObj () {
+            // 更新右侧表格编辑模式绑定的数据
+            let that = this;
+            let fRow = that.dialog.fRow;
+            if (fRow) {
+                if (!fRow.tableFormDataArr || !fRow.isSelection) {
+                    // 当前选中行被勾选时不更新tableFormDataObj
+                    fRow.tableFormDataArr = JSON.parse(JSON.stringify(fRow.childrenArr));
+                }
+                if (fRow.isSelection) {
+                    that.rightTableObj.tableData = fRow.tableFormDataArr;
+                } else {
+                    that.rightTableObj.tableData = fRow.childrenArr;
+                }
+                that.jsDifference();
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let rightTableObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.rightTableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.seq;
+                if (that.rightTableObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    rightTableObj[xId] = that.rightTableObj[xId];
+                } else {
+                    // 负责则从对应行中获取行内原数据
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
+                    rightTableObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            for (let item of that.rightTableData) {
+                if (item.isSelection === false) {
+                    item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
+                }
+            }
+            that.rightTableObj = rightTableObj;
+            that.multipleSelection = val;
+        },
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr_2'].validate((valid) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.rightTableObj) {
+                            SubmitData.push({
+                                parentid: that.rightTableObj[key].parentid,
+                                may: that.rightTableObj[key].may,
+                                describe: that.rightTableObj[key].describe,
+                                state: that.rightTableObj[key].state,
+                                grades: that.rightTableObj[key].grades,
+                                planWeight: that.rightTableObj[key].planWeight,
+                                specifications: that.rightTableObj[key].specifications,
+                                transportType: that.rightTableObj[key].transportType,
+                                workprocType: that.rightTableObj[key].workprocType,
+                                purpose: that.rightTableObj[key].purpose,
+                                chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                                memo: that.rightTableObj[key].memo,
+                                id: that.rightTableObj[key].roundid,
+                                sqno: that.rightTableObj[key].sqno,
+                                createman: that.rightTableObj[key].createman,
+                                createtime: that.rightTableObj[key].createtime,
+                                lengths: that.rightTableObj[key].lengths,
+                                surfaceStandard: that.rightTableObj[key].surfaceStandard,
+                                goinfo: that.rightTableObj[key].goinfo
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanrounds/batchUpdate', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '修改成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                        } else {
+                        }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        issue () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+            that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
+            if (valid) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        parentid: that.rightTableObj[key].parentid,
+                        may: that.rightTableObj[key].may,
+                        roundid: that.rightTableObj[key].roundid,
+                        describe: that.rightTableObj[key].describe,
+                        grades: that.rightTableObj[key].grades,
+                        planWeight: that.rightTableObj[key].planWeight,
+                        specifications: that.rightTableObj[key].specifications,
+                        transportType: that.rightTableObj[key].transportType,
+                        workprocType: that.rightTableObj[key].workprocType,
+                        purpose: that.rightTableObj[key].purpose,
+                        chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                        memo: that.rightTableObj[key].memo,
+                        issuedTime: that.rightTableObj[key].issuedTime,
+                        createman: that.rightTableObj[key].createman,
+                        createtime: that.rightTableObj[key].createtime,
+                        updateman: that.rightTableObj[key].updateman,
+                        updatetime: that.rightTableObj[key].updatetime,
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state,
+                        sqno: that.rightTableObj[key].sqno,
+                        lengths: that.rightTableObj[key].lengths,
+                        surfaceStandard: that.rightTableObj[key].surfaceStandard,
+                        goinfo: that.rightTableObj[key].goinfo
+                   });
+                }
+                that.loading = true;
+                that.axios.post('pass/ems/v1/emsprodplanrounds/issue', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                   that.$message({
+                    message: '操作成功',
+                    type: 'success'
+                     });
+                    that.getTableData();
+                   that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                } else {
+                that.$message.error(res.message);
+            }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+            }
+          });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        offissue () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+            that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
+            if (valid) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        parentid: that.rightTableObj[key].parentid,
+                        may: that.rightTableObj[key].may,
+                        roundid: that.rightTableObj[key].roundid,
+                        describe: that.rightTableObj[key].describe,
+                        grades: that.rightTableObj[key].grades,
+                        planWeight: that.rightTableObj[key].planWeight,
+                        specifications: that.rightTableObj[key].specifications,
+                        transportType: that.rightTableObj[key].transportType,
+                        workprocType: that.rightTableObj[key].workprocType,
+                        purpose: that.rightTableObj[key].purpose,
+                        chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                        memo: that.rightTableObj[key].memo,
+                        issuedTime: that.rightTableObj[key].issuedTime,
+                        createman: that.rightTableObj[key].createman,
+                        createtime: that.rightTableObj[key].createtime,
+                        updateman: that.rightTableObj[key].updateman,
+                        updatetime: that.rightTableObj[key].updatetime,
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state,
+                        sqno: that.rightTableObj[key].sqno,
+                        lengths: that.rightTableObj[key].lengths,
+                        surfaceStandard: that.rightTableObj[key].surfaceStandard,
+                        goinfo: that.rightTableObj[key].goinfo
+                   });
+                }
+                that.loading = true;
+                that.axios.post('pass/ems/v1/emsprodplanrounds/offissue', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                   that.$message({
+                    message: '操作成功',
+                    type: 'success'
+                     });
+                   that.getTableData();
+                   that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                } else {
+                that.$message.error(res.message);
+            }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+            }
+          });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        // 获取钢种
+        getGrades () {
+            let that = this
+            let url = 'pass/product/v1/emsvqcmbasesteel/getBase'
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                id: item.id
+                            }
+                        }
+                        that.nameObj.grades.arr = arr;
+                        that.nameObj.grades.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取规格
+        getSpecifications () {
+            let that = this
+            let url = 'pass/product/v1/emsvqcmbasespecbillet/getbasespecbillet';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                id: item.id
+                            }
+                        }
+                        that.nameObj.specifications.arr = arr;
+                        that.nameObj.specifications.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        getStandards () {
+            let that = this
+            let url = 'pass/product/v1/emsvqcmstdchem/getstdchem';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.basecode,
+                                name: item.standardgb
+                            })
+                        }
+                        that.nameObj.chemicalStandard.arr = arr;
+                        that.nameObj.chemicalStandard.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        but_del_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state
+                   });
+                }
+                that.$confirm('是否删除已选数据?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    state: 'warning'
+                }).then(() => {
+               that.axios.post('pass/ems/v1/emsprodplanrounds/delete', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                    that.$message({
+                    message: '删除成功',
+                   type: 'success'
+                 });
+                that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                that.dialog.editorBox.show = false;
+                } else {
+                that.$message.error(res.message);
+                }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+                });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                may: that.dialog.editorBox.form.data.may,
+                describe: that.dialog.editorBox.form.data.describe,
+                grades: that.dialog.editorBox.form.data.grades,
+                specifications: that.dialog.editorBox.form.data.specifications,
+                transportType: that.dialog.editorBox.form.data.transportType,
+                chemicalStandard: that.dialog.editorBox.form.data.chemicalStandard,
+                workprocType: that.dialog.editorBox.form.data.workprocid,
+                planWeight: that.dialog.editorBox.form.data.planWeight,
+                surfaceStandard: that.dialog.editorBox.form.data.surfaceStandard,
+                lengths: that.dialog.editorBox.form.data.lengths,
+                memo: that.dialog.editorBox.form.data.memo,
+                goinfo: that.dialog.editorBox.form.data.goinfo,
+                fetchPlanWeight: that.dialog.editorBox.form.data.fetchPlanWeight
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+               if (valid) {
+                        that.loading = true;
+                        that.axios.post('pass/ems/v1/emsprodplanrounds/', SubmitData, {
+                            contentType: 'application/json'
+                        })
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '新增成功',
+                                        type: 'success'
+                                    });
+                                     that.getTableDetailDatas(that.dialog.editorBox.form.data.workprocid, null);
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                }
+            });
+        },
+        correctvalueUpFoo (row) {
+            let that = this;
+            // 防止数据为无效值
+            if (row.correctvalue === '' || !isFinite(row.correctvalue)) {
+                row.correctvalue = 0;
+                row.apportvalue = row.actualvalue;
+            } else {
+                row.apportvalue = that.floatComputed(row.actualvalue, row.correctvalue, '+');
+            }
+            that.jsDifference();
+        },
+        apportvalueUpFoo (row) {
+            let that = this;
+            if (row.apportvalue === '' || !isFinite(row.apportvalue)) {
+                row.correctvalue = 0;
+                row.apportvalue = row.actualvalue;
+            } else {
+                row.correctvalue = that.floatComputed(row.apportvalue, row.actualvalue, '-');
+            }
+            that.jsDifference();
+        },
+        tableTDMousedown (e) {
+            let that = this;
+            let nowPageX = e.pageX,
+                nowWidth = that.leftTableWidth,
+                minWidth = 200,
+                maxWidth = window.innerWidth - 200;
+            that.$refs.table_box.style.userSelect = 'none';
+            that.$refs.table_box.style.cursor = 'col-resize';
+            that.$refs.table_box.onmousemove = function (e) {
+                let bh = e.pageX - nowPageX;
+                if (nowWidth + bh > maxWidth) {
+                    that.leftTableWidth = maxWidth;
+                } else if (nowWidth + bh < minWidth) {
+                    that.leftTableWidth = minWidth;
+                } else {
+                    that.leftTableWidth = nowWidth + bh;
+                }
+            }
+            that.$refs.table_box.onmouseup = function () {
+                that.$refs.table_box.onmousemove = false;
+                that.$refs.table_box.onmouseup = false;
+                that.$refs.table_box.style.userSelect = '';
+                that.$refs.table_box.style.cursor = ''
+            }
+        },
+        // 对proportion的值进行处理,使其符合要求
+        proportionFormat (row) {
+            let that = this;
+            if (row.proportion === '' || !isFinite(row.proportion)) {
+                row.proportion = 0;
+            }
+        },
+        // 重新计算,根据自定义的分配比例来自动调整最终值
+      but_add () {
+            let that = this;
+             that.dialog.editorBox.form.data.describe = '';
+             that.dialog.editorBox.form.data.grades = '';
+             that.dialog.editorBox.form.data.specifications = '';
+             that.dialog.editorBox.form.data.transportType = '';
+             that.dialog.editorBox.form.data.chemicalStandard = '';
+             that.dialog.editorBox.form.data.surfaceStandard = '';
+             that.dialog.editorBox.form.data.workprocid = '';
+             that.dialog.editorBox.form.data.planWeight = '';
+             that.dialog.editorBox.form.data.purpose = '';
+             that.dialog.editorBox.form.data.iateralArea = '';
+             that.dialog.editorBox.form.data.lengthTimesWidth = '';
+             that.dialog.editorBox.form.data.dimension = '';
+             that.dialog.editorBox.form.data.lengths = ''
+            that.dialog.editorBox.show = true;
+             setTimeout(() => {
+                that.$refs['dialog_form'].clearValidate();
+            }, 100);
+        },
+        getChildTable (row, expandedRows) {
+            let that = this;
+            if (!row.getTable) {
+                let params = {
+                        clock: row.clock,
+                        energyid: row.energyid
+                    };
+                row.tableLoading = true;
+                let url = 'pass/ems/v1/trmbalancevalues/getitem';
+                that.axios.get(url, {
+                    params: params
+                })
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            let arr = [];
+                            for (let item of res.data) {
+                                arr.push({
+                                    clock: item.CLOCK,
+                                    itemname: item.ITEMNAME,
+                                    timegranid: item.TIMEGRANID,
+                                    apportvalue: item.APPORTVALUE
+                                })
+                            }
+                            row.tableData = arr;
+                            row.getTable = true;
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                        row.tableLoading = false;
+                    }).catch(function () {
+                        row.tableLoading = false;
+                    });
+            }
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.balanceSheetData {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                // margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .table-box {
+            .table-left {
+                float: left;
+                width: 550px;
+            }
+            .table-tuodong {
+                float: left;
+                width: 5px;
+                margin: 0 1px 0 1px;
+                cursor: col-resize;
+            }
+            .table-right {
+                margin-left: 557px;
+            }
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+        // 隐藏全选按钮
+        thead .el-table-column--selection .cell {
+            display: none;
+        }
+    }
+}
+</style>

+ 2132 - 0
src/views/energyPlan/components/supplyAndDemand/planProjectRoundXG.vue

@@ -0,0 +1,2132 @@
+<template>
+    <div class="balanceSheetData">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                             <el-form-item label="月份">
+                                 <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :timegranId="'MONTH'"
+                                    :oneFoo="getTableData"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                           <el-form-item label="产线">
+                                <el-select
+                                filterabl clearable
+                                    v-model="filterForm.data.workprocid"
+                                    placeholder=""
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.workprocid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+               <div class="box-top-gjl">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-plus"
+                            v-privilege="activeMenu + 'ADD'"
+                            @click="but_add"
+                        >新增</el-button>
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="but_edit_plural()"
+                    >修改</el-button>
+                    <el-button
+                        class="button"
+                        type="danger"
+                        size="mini"
+                        icon="el-icon-delete"
+                        @click="but_del_plural()"
+                    >删除</el-button>
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="issue()"
+                    >下发</el-button>
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="offissue()"
+                    >取消下发</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['boxBottom']) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom" ref="boxBottom">
+                <div class="table-box" ref="table_box">
+                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }">
+                        <el-form
+                            size="mini"
+                            ref="dialog_form_arr_1"
+                            label-width="0px"
+                            :model="tableFormDataObj"
+                        >
+                            <el-table stripe
+                                id="singleTable1"
+                                ref="singleTable1"
+                                :data="leftTableData"
+                                v-loading="leftTableLoading"
+                                style="width: 100%;"
+                                :height="singleTableHeight"
+                                border
+                                size="mini"
+                                highlight-current-row
+                                show-summary
+                                :summary-method="getSummaries"
+                                @current-change="getTableDetailData"
+                            >
+                                <el-table-column
+                                sortable
+                                prop="sqno"
+                                label="序号"
+                                fixed="left"
+                                width="50px"
+                                :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                   sortable
+                                    prop="may"
+                                    label="月份"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="workprocid"
+                                    label="工序"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                        <span>{{ nameObj.workprocid.obj[scope.row.workprocid] ? nameObj.workprocid.obj[scope.row.workprocid].name : scope.row.workprocid }}</span>
+                                    </template>
+                                </el-table-column>
+                              <el-table-column
+                                sortable
+                                    prop="unit"
+                                    label="单位"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                    <template slot-scope="scope">
+                                        <span>{{ nameObj.unit.obj[scope.row.unit] ? nameObj.unit.obj[scope.row.unit] : scope.row.unit }}</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                 sortable
+                                    prop="kxf_weight"
+                                    label="可下发量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="weightMonth"
+                                    label="年度计划量(月)"
+                                    min-width="115px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="yxf_weight"
+                                    label="已下发量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                prop="id"
+                                label="序号"
+                                fixed="left"
+                                width="50px"
+                                :show-overflow-tooltip="true"
+                                v-if="filterForm.data.show"
+                                ></el-table-column>
+                            </el-table>
+                        </el-form>
+                    </div>
+                    <div class="table-tuodong" :style="{ height: singleTableHeight + 'px' }"
+                        @mousedown="tableTDMousedown"
+                    ></div>
+                    <div class="table-right" :style="{ 'margin-left': (leftTableWidth + 7) + 'px' }">
+                        <el-form
+                            size="mini"
+                            ref="dialog_form_arr_2"
+                            label-width="0px"
+                            :model="rightTableObj"
+                        >
+                            <el-table stripe
+                                id="singleTable2"
+                                ref="singleTable2"
+                                :data="rightTableData"
+                                v-loading="tableLoading"
+                                style="width: 100%;"
+                                :height="singleTableHeight"
+                                border
+                                size="mini"
+                                highlight-current-row
+                                show-summary
+                                :summary-method="getSummaries"
+                                 @selection-change="handleSelectionChange"
+                            >
+                                <el-table-column
+                                type="selection"
+                                width="40"
+                                align="center"
+                                :selectable='checkboxT'
+                                fixed="left"
+                                class-name="cnspicuous"
+                            ></el-table-column>
+                                <el-table-column
+                                  sortable
+                                    prop="sqno"
+                                    label="月序号"
+                                    min-width="100px"
+                                    v-model="filterForm.data.sqno"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="may"
+                                    label="月份"
+                                    min-width="100px"
+                                    :timegranId="'MONTH'"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="describe"
+                                    label="轮次描述"
+                                    min-width="160px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.describe'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.describe"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    v-model="rightTableObj[scope.row.seq].describe"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.describe}}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="state"
+                                    label="状态"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].color : ''}"
+                                >{{ nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].name : scope.row.state }}</span>
+                                 </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="grades"
+                                    label="钢种"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                    <el-form-item
+                                    :prop="scope.row.seq + '.grades'"
+                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :rules="tableFormRules.grades"
+                                  >
+                                    <el-select
+                                    allow-create
+                                    filterable
+                                    clearable
+                                    v-model="rightTableObj[scope.row.seq].grades"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    placeholder=""
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.grades.arr"
+                                    :key="item.id"
+                                    :value="item.name"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.grades.obj[scope.row.grades] ? nameObj.grades.obj[scope.row.grades].name : scope.row.grades }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="lengthTimesWidth"
+                                    label="断面"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.lengthTimesWidth'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.lengthTimesWidth"
+                                >
+                                    <el-input
+                                     style="width: 100%;"
+                                     @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    v-model="rightTableObj[scope.row.seq].lengthTimesWidth"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.lengthTimesWidth}}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="iateralArea"
+                                    label="高度X宽度"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.iateralArea'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                 :rules="tableFormRules.iateralArea"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    v-model="rightTableObj[scope.row.seq].iateralArea"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.iateralArea}}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="planWeight"
+                                    label="计划量"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.planWeight'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.planWeight"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    v-model="rightTableObj[scope.row.seq].planWeight"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.planWeight}}</span>
+                            </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="dimension"
+                                    label="截面尺寸"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <el-form-item
+                                 :prop="scope.row.seq + '.dimension'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.dimension"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    v-model="rightTableObj[scope.row.seq].dimension"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.dimension}}</span>
+                               </template>
+                                </el-table-column>
+                                <el-table-column
+                                    sortable
+                                    prop="lengths"
+                                    label="长度"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                 <el-form-item
+                                 :prop="scope.row.seq + '.lengths'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                 :rules="tableFormRules.lengths"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    v-model="rightTableObj[scope.row.seq].lengths"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.lengths}}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="transportType"
+                                    label="运输方式"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                     <el-form-item
+                                     :prop="scope.row.seq + '.transportType'"
+                                     :rules="tableFormRules.transportType"
+                                     v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  >
+                                    <el-select
+                                    allow-create
+                                    filterable
+                                    clearable
+                                    v-model="rightTableObj[scope.row.seq].transportType"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    placeholder=""
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.transportType.arr"
+                                    :key="item.id"
+                                    :value="item.id"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.transportType.obj[scope.row.transportType] ? nameObj.transportType.obj[scope.row.transportType].name : scope.row.transportType }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="purpose"
+                                    label="用途"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                    <el-form-item
+                                    :prop="scope.row.seq + '.purpose'"
+                                    :rules="tableFormRules.purpose"
+                                     v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  >
+                                    <el-select
+                                    allow-create
+                                    filterable
+                                    clearable
+                                    v-model="rightTableObj[scope.row.seq].purpose"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    placeholder=""
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.purpose.arr"
+                                    :key="item.id"
+                                    :value="item.id"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.purpose.obj[scope.row.purpose] ? nameObj.purpose.obj[scope.row.purpose].name : scope.row.purpose }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="chemicalStandard"
+                                    label="执行标准"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                   <el-form-item
+                                   :prop="scope.row.seq + '.chemicalStandard'"
+                                   :rules="tableFormRules.chemicalStandard"
+                                   v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  >
+                                    <el-select
+                                    allow-create
+                                    filterable
+                                    clearable
+                                    v-model="rightTableObj[scope.row.seq].chemicalStandard"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    placeholder=""
+
+                                    >
+                                    <el-option
+                                    v-for="item of nameObj.chemicalStandard.arr"
+                                    :key="item.id"
+                                    :value="item.name"
+                                    :label="item.name"
+                                    ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                 <span v-else>{{ nameObj.chemicalStandard.obj[scope.row.chemicalStandard] ? nameObj.chemicalStandard.obj[scope.row.chemicalStandard].name : scope.row.chemicalStandard }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="issuedTime"
+                                    label="下发时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="createman"
+                                    label="创建人"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="createtime"
+                                    label="创建时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="updateman"
+                                    label="修改人"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="updatetime"
+                                    label="修改时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="memo"
+                                    label="备注"
+                                    min-width="160px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                 <el-form-item
+                                 :prop="scope.row.seq + '.memo'"
+                                 v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                  :rules="tableFormRules.memo"
+                                >
+                                    <el-input
+                                    style="width: 100%;"
+                                    v-model="rightTableObj[scope.row.seq].memo"
+                                    @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.memo}}</span>
+                                </template>
+                                </el-table-column>
+                                <!-- <el-table-column
+                                    prop="status"
+                                    label="处理状态"
+                                    min-width="100px"
+                                    :timegranId="'MONTH'"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <span :style="{color: nameObj.status.obj[scope.row.status] ? nameObj.status.obj[scope.row.status].color : ''}"
+                                >{{ nameObj.status.obj[scope.row.status] ? nameObj.status.obj[scope.row.status].name : scope.row.status }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
+                                    prop="err_msg"
+                                    label="错误信息"
+                                    min-width="100px"
+                                    :timegranId="'MONTH'"
+                                    :show-overflow-tooltip="true"
+                                >
+                                </el-table-column> -->
+                                <el-table-column
+                                    prop="roundid"
+                                    label="轮次序号"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                    v-if="filterForm.data.show"
+                                ></el-table-column>
+                                <el-table-column
+                                    prop="parentid"
+                                    label="月序号"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                    v-if="filterForm.data.show"
+                                ></el-table-column>
+                                <el-table-column
+                                    prop="workprocType"
+                                    label="工序类别"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                     v-if="filterForm.data.show"
+                                ></el-table-column>
+                            </el-table>
+                        </el-form>
+                    </div>
+                </div>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: left;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+        <el-dialog
+        title="轮次计划-型钢 新增"
+        :visible.sync="dialog.editorBox.show"
+         width="600px"
+        :close-on-click-modal="false"
+        :show-close="!loading"
+        >
+     <div>
+         <el-form
+          ref="dialog_form"
+         :model="dialog.editorBox.form.data"
+         :rules="dialog.editorBox.form.rules"
+         size="mini"
+         label-width="95px"
+         >
+         <el-row>
+             <el-col :span="12">
+               <el-form-item
+               label="工序"
+               prop="workprocid"
+               :rules="dialog.editorBox.form.workprocid"
+               >
+                   <el-select
+                     filterable clearable
+                     v-model="dialog.editorBox.form.data.workprocid"
+                     placeholder=""
+                     style="width: 100%;"
+                    >
+                    <el-option
+                    v-for="item of nameObj.workprocid.arr"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    ></el-option>
+                    </el-select>
+               </el-form-item>
+             </el-col>
+             <el-col :span="12">
+                  <el-form-item
+                    label="月份"
+                    prop="may"
+                    :rules="dialog.editorBox.form.may"
+                    >
+                    <zj-timegran-date
+                    v-model="dialog.editorBox.form.data.may"
+                    style="width: 100%;"
+                    :timegranId="'MONTH'"
+                    :oneFoo="getTableData"
+                    ></zj-timegran-date>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                 label="轮次描述"
+                 prop="describe"
+                 :rules="dialog.editorBox.form.describe"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.describe"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="12">
+               <el-form-item
+               label="钢种"
+               prop="grades"
+               >
+                   <el-select
+                     filterable
+                     clearable
+                     allow-create
+                     v-model="dialog.editorBox.form.data.grades"
+                     placeholder=""
+                    style="width: 100%;"
+                    :rules="tableFormRules.grades"
+                    >
+                    <el-option
+                    v-for="item of nameObj.grades.arr"
+                    :key="item.id"
+                    :value="item.name"
+                    :label="item.name"
+                    ></el-option>
+                    </el-select>
+              </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+            <el-form-item
+            label="断面"
+            prop="lengthTimesWidth"
+                >
+             <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.lengthTimesWidth"
+               >
+               </el-input>
+            </el-form-item>
+            </el-col>
+           <el-col :span="12">
+            <el-form-item
+            label="长度*宽度"
+            prop="iateralArea"
+                >
+             <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.iateralArea"
+               >
+               </el-input>
+            </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+            <el-form-item
+            label="截面尺寸"
+            prop="dimension"
+                >
+             <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.dimension"
+               >
+               </el-input>
+            </el-form-item>
+            </el-col>
+           <el-col :span="12">
+            <el-form-item
+            label="长度"
+            prop="lengths"
+                >
+             <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.lengths"
+               >
+               </el-input>
+            </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+             <el-col :span="12">
+            <el-form-item
+            label="运输方式"
+            prop="transportType"
+                >
+             <el-select
+                     filterable
+                     clearable
+                     allow-create
+                     v-model="dialog.editorBox.form.data.transportType"
+                     placeholder=""
+                    style="width: 100%;"
+                    :rules="tableFormRules.transportType"
+                    >
+                    <el-option
+                    v-for="item of nameObj.transportType.arr"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="item.name"
+                    ></el-option>
+            </el-select>
+            </el-form-item>
+            </el-col>
+            <el-col :span="12">
+                <el-form-item
+                label="执行标准"
+                 prop="chemicalStandard"
+                :rules="tableFormRules.chemicalStandard"
+                >
+               <el-select
+                     allow-create
+                     filterable
+                     clearable
+                     v-model="dialog.editorBox.form.data.chemicalStandard"
+                     placeholder=""
+                     style="width: 100%;"
+                     :rules="dialog.editorBox.form.chemicalStandard"
+                    >
+                    <el-option
+                    v-for="item of nameObj.chemicalStandard.arr"
+                    :key="item.id"
+                    :value="item.name"
+                    :label="item.name"
+                    ></el-option>
+            </el-select>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                 label="计划量"
+                 prop="planWeight"
+                 :rules="dialog.editorBox.form.planWeight"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.planWeight"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+            <el-col :span="12">
+                <el-form-item
+                 label="用途"
+                 prop="purpose"
+                 :rules="dialog.editorBox.form.purpose"
+                >
+               <el-select
+                     filterable
+                     clearable
+                     allow-create
+                     v-model="dialog.editorBox.form.data.purpose"
+                     placeholder=""
+                     style="width: 100%;"
+                     :rules="dialog.editorBox.form.purpose"
+                    >
+                    <el-option
+                    v-for="item of nameObj.purpose.arr"
+                    :key="item.id"
+                    :value="item.name"
+                    :label="item.name"
+                    ></el-option>
+            </el-select>
+                </el-form-item>
+            </el-col>
+        </el-row>
+        <el-row>
+            <el-col :span="12">
+                <el-form-item
+                 label="备注"
+                 prop="memo"
+                 :rules="dialog.editorBox.form.memo"
+                >
+               <el-input
+                clearable
+                style="width: 100%;"
+                v-model="dialog.editorBox.form.data.memo"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+        </el-row>
+         </el-form>
+         </div>
+         <span
+        slot="footer"
+        class="dialog-footer"
+            >
+        <el-button
+        @click="dialog.editorBox.show = false"
+        :loading="loading"
+        >取 消</el-button>
+        <el-button
+        type="primary"
+        @click="dataSave"
+        :loading="loading"
+        >保 存</el-button>
+    </span>
+    </el-dialog>
+     <zj-formulaEditor :equationEditing="dialog.equationEditing"></zj-formulaEditor>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '@/utils/validator.js';
+import timegranDate from '@/components/zg/timegranDate.vue';
+import formulaEditor from '@/components/zg/formulaEditor.vue';
+import {formatDate, commonSummaries} from '@/utils/util.js';
+export default {
+    name: 'balanceSheetData',
+    components: {
+        'zj-timegran-date': timegranDate,
+        'zj-formulaEditor': formulaEditor
+    },
+    data () {
+        return {
+            activeMenu: '',
+            isCheck: false, // 是否为审核人
+            editSetFlag: '',
+            filterForm: {
+                show: true,
+                data: {
+                    id: '',
+                    timegranid: '',
+                    clock: '',
+                    workprocid: '',
+                    workprocType: '',
+                    energyid: '',
+                    propertyid: '',
+                    itemid: '',
+                    itemname: '',
+                    itemdesc: '',
+                    may: '',
+                    canissue: '',
+                    weightMonth: '',
+                    issue: '',
+                    yxf_weight: '',
+                    kxf_weight: '',
+                    describe: '',
+                    state: '',
+                    grades: '',
+                    specifications: '',
+                    lengths: '',
+                    chemicalStandard: '',
+                    surfaceStandard: '',
+                    transportType: '',
+                    parentid: '',
+                    purpose: '',
+                    sqno: '',
+                    show: false,
+                    iateralArea: '',
+                    lengthTimesWidth: '',
+                    dimension: '',
+                    status: '',
+                    err_msg: ''
+                }
+            },
+             rules: {
+                },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            rightTableData: [],
+            singleTableHeight: 100,
+            leftTableData: [],
+            leftTableLoading: false,
+            leftTableWidth: 550,
+            difference: 0,
+            rightTableObj: {},
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                planWeight: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                grades: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                specifications: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                transportType: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                purpose: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                chemicalStandard: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                iateralArea: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                lengthTimesWidth: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                dimension: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                lengths: [
+                     { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ]
+            },
+            nameObj: {
+                timegranid: {
+                    obj: {},
+                    arr: []
+                },
+                workprocid: {
+                   obj: {
+                        'AT2007': {
+                            id: 'AT2007',
+                          name: '型钢'
+                         }
+                         },
+                    arr: [{
+                        id: 'AT2007',
+                        name: '型钢'
+                        }]
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                propertyid: {
+                    obj: {},
+                    arr: []
+                },
+                unit: {
+                    obj: {},
+                    arr: []
+                },
+                state: {
+                    obj: {
+                        '0': {
+                            name: '已编制',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '已下发',
+                            color: 'rgb(28, 111, 217)'
+                        },
+                        '2': {
+                            name: '已接收',
+                            color: 'red'
+                        },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '已编制'
+                        },
+                        {
+                            id: '1',
+                            name: '已下发'
+                        },
+                        {
+                            id: '2',
+                            name: '已接收'
+                        }
+                    ]
+                    }
+                },
+                status: {
+                    obj: {
+                        'Y': {
+                            id: 'Y',
+                            name: '成功',
+                            color: 'rgb(28, 111, 217)'
+                        },
+                        'N': {
+                            id: 'N',
+                            name: '失败',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: 'Y',
+                            name: '成功'
+                        },
+                        {
+                            id: 'N',
+                            name: '失败'
+                        }
+                    ]
+                },
+                grades: {
+                    obj: {},
+                    arr: []
+                },
+                lengths: {
+                    obj: {
+                        '0': {name: '12000'}
+                        },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '12000'
+                        }
+                    ]
+                },
+                specifications: {
+                    obj: {},
+                    arr: []
+                },
+                transportType: {
+                    obj: {'0': {name: '火运'}, '1': {name: '汽运'}},
+                    arr: [
+                        {
+                            id: '0',
+                            name: '火运'
+                        },
+                        {
+                            id: '1',
+                            name: '汽运'
+                        }
+                    ]
+                },
+                chemicalStandard: {
+                    obj: {},
+                    arr: []
+                },
+                purpose: {
+                    obj: {
+                        '0': {name: '标准件'},
+                        '1': {name: '铁丝'}
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '标准件'
+                        },
+                        {
+                            id: '1',
+                            name: '铁丝'
+                        }
+                    ]
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                fRow: null,
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        default: {
+                            workprocid: ''
+                        },
+                        data: {
+                           itemid: '',
+                            materialid: '',
+                            workprocid: '',
+                            unitid: '',
+                            seqno: '',
+                            mes_prodline: '',
+                            code: '',
+                            digits: '',
+                            may: '',
+                            canissue: '',
+                            weightMonth: '',
+                            issue: '',
+                            yxf_weight: '',
+                            kxf_weight: '',
+                            describe: '',
+                            state: '',
+                            grades: '',
+                            specifications: '',
+                            lengths: '',
+                            chemicalStandard: '',
+                            surfaceStandard: '',
+                            transportType: '',
+                            workprocType: '',
+                            purpose: '',
+                            planWeight: '',
+                            iateralArea: '',
+                            lengthTimesWidth: '',
+                            dimension: ''
+                        },
+                         rules: {
+                            planWeight: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            grades: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            specifications: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            transportType: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            purpose: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            chemicalStandard: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            may: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            workprocid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            iateralArea: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                             lengthTimesWidth: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            dimension: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            lengths: [
+                                 { required: true, message: '该项不能为空', trigger: 'change' },
+                                 { validator: zCheckNumber1, trigger: 'change' }
+                            ]
+                        }
+                    }
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '左表格',
+                    id: 'singleTable1'
+                },
+                {
+                    name: '右表格',
+                    id: 'singleTable2'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['boxBottom']) - 45;
+            }, 1);
+        });
+        that.getEnergyIdData();
+        that.getPropertyIdData();
+        that.getGrades();
+        that.getStandards();
+        that.getUnitIdData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['kxf_weight', 'weightMonth', 'yxf_weight', 'planWeight']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        checkboxT (row, index) {
+            if (row.state === '2' && !this.isCheck) {
+                return false;
+            } else {
+                return true;
+            }
+        },
+        // 获取能介(平衡表)
+        getEnergyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/?isbalance=1';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取属性
+        getPropertyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergypropertys/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.propertyid.arr = arr;
+                        that.nameObj.propertyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unit.defaults = that.nameObj.unit.defaults ? that.nameObj.unit.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unit.arr = arr;
+                        that.nameObj.unit.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    timegranid: that.filterForm.data.timegranid,
+                    may: that.filterForm.data.clock,
+                    workprocid: that.filterForm.data.workprocid,
+                    energyid: that.filterForm.data.energyid,
+                    propertyid: that.filterForm.data.propertyid,
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    itemdesc: that.filterForm.data.itemdesc,
+                    fid: '',
+                    type: 'xg'
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.leftTableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanmonths/getDates/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                unit: item.unit,
+                                canissue: item.canissue,
+                                weightMonth: item.weightMonth,
+                                issue: item.issue,
+                                may: item.may,
+                                workprocid: item.workprocid,
+                                yxf_weight: item.yxf_weight,
+                                kxf_weight: item.kxf_weight,
+                                parentid: item.id,
+                                id: item.id,
+                                sqno: item.sqno
+                            })
+                        }
+                        that.leftTableData = arr;
+                        that.dialog.fRow = null;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.leftTableLoading = false;
+                }).catch(function () {
+                    that.leftTableLoading = false;
+                });
+        },
+        keyDown (event1, disabledFlag) {
+            let tdTarget = event1.target;
+            let _this = this;
+            while (tdTarget.tagName !== 'TD') {
+                tdTarget = tdTarget.parentElement;
+            }
+            // 如果按下键盘下键或者回车键
+            if (event.keyCode === 40 || event.keyCode === 13) {
+                let index = parseInt(this.rowIndex);
+                // index++;
+                if (index !== this.seqArr[this.seqArr.length - 1]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i + 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 38) { // 键盘上键
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[0]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i - 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 37) { // 键盘左键
+                $(tdTarget).prevAll().find('input:text').last().click();
+            } else if (event.keyCode === 39) { // 键盘右键
+                $(tdTarget).nextAll().find('input').eq(0).click();
+            }
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 点击查询
+        getTableDetailData (row) {
+            let that = this;
+            if (row) {
+            that.tableLoading = true;
+            let params = {
+            parentid: row.id
+        };
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanrounds/';
+            that.axios.get(url, {
+                params: params
+            })
+            .then(function (res) {
+                if (res.code === '0') {
+                let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    updatetime: item.updatetime,
+                    sqno: item.sqno,
+                    workprocType: item.workprocType,
+                    iateralArea: item.iateralArea,
+                    lengthTimesWidth: item.lengthTimesWidth,
+                    dimension: item.dimension,
+                    lengths: item.lengths,
+                    status: item.status,
+                    err_msg: item.err_msg
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+            });
+            }
+        },
+        getTableDetailDatas (workprocType, sqno) {
+            let that = this;
+            let params = {
+            may: that.filterForm.data.clock,
+            workprocType: workprocType,
+            sqno: sqno
+         };
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanrounds/';
+            that.axios.get(url, {
+                params: params
+            })
+            .then(function (res) {
+                if (res.code === '0') {
+                let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    updatetime: item.updatetime,
+                    sqno: item.sqno,
+                    workprocType: item.workprocType,
+                    iateralArea: item.iateralArea,
+                    lengthTimesWidth: item.lengthTimesWidth,
+                    dimension: item.dimension,
+                    lengths: item.lengths,
+                    status: item.status,
+                    err_msg: item.err_msg
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+            });
+        },
+         getGrades () {
+            let that = this
+            let url = 'pass/product/v1/emssteel/getGrades/?type=' + '型钢';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.steelName
+                            })
+                                obj[item.id] = {
+                                name: item.steelName,
+                                unitid: item.id
+                            }
+                        }
+                        that.nameObj.grades.arr = arr;
+                        that.nameObj.grades.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        getStandards () {
+            let that = this
+            let url = 'pass/product/v1/emsstandard/getStandards';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.basecode,
+                                name: item.basename
+                            })
+                            obj[item.id] = {
+                                name: item.specName,
+                                unitid: item.id
+                            }
+                        }
+                        that.nameObj.chemicalStandard.arr = arr;
+                        that.nameObj.chemicalStandard.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        jsDifference () {
+            let that = this;
+            let fV = that.dialog.fRow.apportvalue,
+                zV = 0;
+            let xId = that.dialog.fRow.itemid + '-' + that.dialog.fRow.timegranid + '-' + that.dialog.fRow.clock;
+            if (that.tableFormDataObj[xId]) {
+                fV = that.tableFormDataObj[xId].apportvalue;
+            }
+            for (let item of that.rightTableObj.tableData) {
+                zV = that.floatComputed(zV, item.apportvalue, '+');
+            }
+            that.difference = +that.floatComputed(fV, zV, '-').toFixed(3);
+        },
+        upTableFormDataObj () {
+            // 更新右侧表格编辑模式绑定的数据
+            let that = this;
+            let fRow = that.dialog.fRow;
+            if (fRow) {
+                if (!fRow.tableFormDataArr || !fRow.isSelection) {
+                    // 当前选中行被勾选时不更新tableFormDataObj
+                    fRow.tableFormDataArr = JSON.parse(JSON.stringify(fRow.childrenArr));
+                }
+                if (fRow.isSelection) {
+                    that.rightTableObj.tableData = fRow.tableFormDataArr;
+                } else {
+                    that.rightTableObj.tableData = fRow.childrenArr;
+                }
+                that.jsDifference();
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let rightTableObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.rightTableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.seq;
+                if (that.rightTableObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    rightTableObj[xId] = that.rightTableObj[xId];
+                } else {
+                    // 负责则从对应行中获取行内原数据
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
+                    rightTableObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            for (let item of that.rightTableData) {
+                if (item.isSelection === false) {
+                    item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
+                }
+            }
+            that.rightTableObj = rightTableObj;
+            that.multipleSelection = val;
+        },
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr_2'].validate((valid) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.rightTableObj) {
+                            SubmitData.push({
+                                parentid: that.rightTableObj[key].parentid,
+                                may: that.rightTableObj[key].may,
+                                describe: that.rightTableObj[key].describe,
+                                state: that.rightTableObj[key].state,
+                                grades: that.rightTableObj[key].grades,
+                                planWeight: that.rightTableObj[key].planWeight,
+                                specifications: that.rightTableObj[key].specifications,
+                                transportType: that.rightTableObj[key].transportType,
+                                workprocType: that.rightTableObj[key].workprocType,
+                                purpose: that.rightTableObj[key].purpose,
+                                chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                                memo: that.rightTableObj[key].memo,
+                                id: that.rightTableObj[key].roundid,
+                                sqno: that.rightTableObj[key].sqno,
+                                createman: that.rightTableObj[key].createman,
+                                createtime: that.rightTableObj[key].createtime,
+                                iateralArea: that.rightTableObj[key].iateralArea,
+                                lengthTimesWidth: that.rightTableObj[key].lengthTimesWidth,
+                                dimension: that.rightTableObj[key].dimension,
+                                lengths: that.rightTableObj[key].lengths
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanrounds/batchUpdate', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '修改成功',
+                                        type: 'success'
+                                    });
+                                that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                                } else {
+                                that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                        } else {
+                        }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        issue () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+            that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
+            if (valid) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        parentid: that.rightTableObj[key].parentid,
+                        may: that.rightTableObj[key].may,
+                        roundid: that.rightTableObj[key].roundid,
+                        describe: that.rightTableObj[key].describe,
+                        grades: that.rightTableObj[key].grades,
+                        planWeight: that.rightTableObj[key].planWeight,
+                        specifications: that.rightTableObj[key].specifications,
+                        transportType: that.rightTableObj[key].transportType,
+                        workprocType: that.rightTableObj[key].workprocType,
+                        purpose: that.rightTableObj[key].purpose,
+                        chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                        memo: that.rightTableObj[key].memo,
+                        issuedTime: that.rightTableObj[key].issuedTime,
+                        createman: that.rightTableObj[key].createman,
+                        createtime: that.rightTableObj[key].createtime,
+                        updateman: that.rightTableObj[key].updateman,
+                        updatetime: that.rightTableObj[key].updatetime,
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state,
+                        sqno: that.rightTableObj[key].sqno,
+                        iateralArea: that.rightTableObj[key].iateralArea,
+                        lengthTimesWidth: that.rightTableObj[key].lengthTimesWidth,
+                        dimension: that.rightTableObj[key].dimension,
+                        lengths: that.rightTableObj[key].lengths
+                   });
+                }
+                that.loading = true;
+                that.axios.post('pass/ems/v1/emsprodplanrounds/issue', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                   that.$message({
+                    message: '操作成功',
+                    type: 'success'
+                     });
+                   that.getTableData();
+                   that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                } else {
+                that.$message.error(res.message);
+                }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+            }
+          });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        offissue () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+            that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
+            if (valid) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        parentid: that.rightTableObj[key].parentid,
+                        may: that.rightTableObj[key].may,
+                        roundid: that.rightTableObj[key].roundid,
+                        describe: that.rightTableObj[key].describe,
+                        grades: that.rightTableObj[key].grades,
+                        planWeight: that.rightTableObj[key].planWeight,
+                        specifications: that.rightTableObj[key].specifications,
+                        transportType: that.rightTableObj[key].transportType,
+                        workprocType: that.rightTableObj[key].workprocType,
+                        purpose: that.rightTableObj[key].purpose,
+                        chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                        memo: that.rightTableObj[key].memo,
+                        issuedTime: that.rightTableObj[key].issuedTime,
+                        createman: that.rightTableObj[key].createman,
+                        createtime: that.rightTableObj[key].createtime,
+                        updateman: that.rightTableObj[key].updateman,
+                        updatetime: that.rightTableObj[key].updatetime,
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state,
+                        sqno: that.rightTableObj[key].sqno,
+                        iateralArea: that.rightTableObj[key].iateralArea,
+                        lengthTimesWidth: that.rightTableObj[key].lengthTimesWidth,
+                        dimension: that.rightTableObj[key].dimension,
+                        lengths: that.rightTableObj[key].lengths
+                   });
+                }
+                that.loading = true;
+                that.axios.post('pass/ems/v1/emsprodplanrounds/offissue', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                   that.$message({
+                    message: '操作成功',
+                    type: 'success'
+                     });
+                   that.getTableData();
+                   that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                } else {
+                that.$message.error(res.message);
+            }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+            }
+          });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        but_del_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                let SubmitData = [];
+                for (let key in that.rightTableObj) {
+                   SubmitData.push({
+                        id: that.rightTableObj[key].roundid,
+                        state: that.rightTableObj[key].state
+                   });
+                }
+                that.$confirm('是否删除已选数据?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    state: 'warning'
+                }).then(() => {
+                that.axios.post('pass/ems/v1/emsprodplanrounds/delete', SubmitData, {
+                    contentType: 'application/json'
+                })
+                .then(function (res) {
+                if (res.code === '0') {
+                    that.$message({
+                    message: '删除成功',
+                   type: 'success'
+                 });
+               that.getTableDetailDatas(that.multipleSelection[0].workprocType, that.multipleSelection[0].sqno);
+                that.dialog.editorBox.show = false;
+                } else {
+                that.$message.error(res.message);
+                }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+                }).catch(() => {
+                });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
+        },
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                may: that.dialog.editorBox.form.data.may,
+                describe: that.dialog.editorBox.form.data.describe,
+                grades: that.dialog.editorBox.form.data.grades,
+                specifications: that.dialog.editorBox.form.data.specifications,
+                transportType: that.dialog.editorBox.form.data.transportType,
+                chemicalStandard: that.dialog.editorBox.form.data.chemicalStandard,
+                workprocType: that.dialog.editorBox.form.data.workprocid,
+                planWeight: that.dialog.editorBox.form.data.planWeight,
+                purpose: that.dialog.editorBox.form.data.purpose,
+                iateralArea: that.dialog.editorBox.form.data.iateralArea,
+                lengthTimesWidth: that.dialog.editorBox.form.data.lengthTimesWidth,
+                dimension: that.dialog.editorBox.form.data.dimension,
+                lengths: that.dialog.editorBox.form.data.lengths
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+               if (valid) {
+                        that.loading = true;
+                        that.axios.post('pass/ems/v1/emsprodplanrounds/', SubmitData, {
+                            contentType: 'application/json'
+                        })
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '新增成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableDetailDatas(that.dialog.editorBox.form.data.workprocid, null);
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                }
+            });
+        },
+        correctvalueUpFoo (row) {
+            let that = this;
+            // 防止数据为无效值
+            if (row.correctvalue === '' || !isFinite(row.correctvalue)) {
+                row.correctvalue = 0;
+                row.apportvalue = row.actualvalue;
+            } else {
+                row.apportvalue = that.floatComputed(row.actualvalue, row.correctvalue, '+');
+            }
+            that.jsDifference();
+        },
+        apportvalueUpFoo (row) {
+            let that = this;
+            if (row.apportvalue === '' || !isFinite(row.apportvalue)) {
+                row.correctvalue = 0;
+                row.apportvalue = row.actualvalue;
+            } else {
+                row.correctvalue = that.floatComputed(row.apportvalue, row.actualvalue, '-');
+            }
+            that.jsDifference();
+        },
+        tableTDMousedown (e) {
+            let that = this;
+            let nowPageX = e.pageX,
+                nowWidth = that.leftTableWidth,
+                minWidth = 200,
+                maxWidth = window.innerWidth - 200;
+            that.$refs.table_box.style.userSelect = 'none';
+            that.$refs.table_box.style.cursor = 'col-resize';
+            that.$refs.table_box.onmousemove = function (e) {
+                let bh = e.pageX - nowPageX;
+                if (nowWidth + bh > maxWidth) {
+                    that.leftTableWidth = maxWidth;
+                } else if (nowWidth + bh < minWidth) {
+                    that.leftTableWidth = minWidth;
+                } else {
+                    that.leftTableWidth = nowWidth + bh;
+                }
+            }
+            that.$refs.table_box.onmouseup = function () {
+                that.$refs.table_box.onmousemove = false;
+                that.$refs.table_box.onmouseup = false;
+                that.$refs.table_box.style.userSelect = '';
+                that.$refs.table_box.style.cursor = ''
+            }
+        },
+        // 对proportion的值进行处理,使其符合要求
+        proportionFormat (row) {
+            let that = this;
+            if (row.proportion === '' || !isFinite(row.proportion)) {
+                row.proportion = 0;
+            }
+        },
+        // 重新计算,根据自定义的分配比例来自动调整最终值
+        againCount () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                for (let item of that.multipleSelection) {
+                    let xId = item.itemid + '-' + item.timegranid + '-' + item.clock;
+                    let objItem = that.tableFormDataObj[xId];
+                    let bl = 0;
+                    for (let dataObj of item.tableFormDataArr) {
+                        bl = +that.floatComputed(bl, dataObj.proportion, '+');
+                    }
+                    if (bl !== 100) {
+                        this.$message.error('所有比例之和不为100%,请调整比例后再执行计算。');
+                        continue;
+                    }
+                    let sum = objItem.apportvalue;
+                    for (let i = 0, ilength = item.tableFormDataArr.length; i < ilength; i++) {
+                        if (i === (ilength - 1)) {
+                            item.tableFormDataArr[i].apportvalue = sum;
+                        } else {
+                            let z = that.floatComputed(objItem.apportvalue, item.tableFormDataArr[i].proportion, '*');
+                            item.tableFormDataArr[i].apportvalue = that.floatComputed(z, 100, '/');
+                            sum = that.floatComputed(sum, item.tableFormDataArr[i].apportvalue, '-');
+                        }
+                        item.tableFormDataArr[i].correctvalue = that.floatComputed(item.tableFormDataArr[i].apportvalue, item.tableFormDataArr[i].actualvalue, '-');
+                    }
+                    that.jsDifference();
+                }
+            } else {
+                this.$message.error('请勾选一条数据');
+            }
+        },
+      but_add () {
+            let that = this;
+             that.dialog.editorBox.form.data.describe = '';
+             that.dialog.editorBox.form.data.grades = '';
+             that.dialog.editorBox.form.data.specifications = '';
+             that.dialog.editorBox.form.data.transportType = '';
+             that.dialog.editorBox.form.data.chemicalStandard = '';
+             that.dialog.editorBox.form.data.workprocid = '';
+             that.dialog.editorBox.form.data.planWeight = '';
+             that.dialog.editorBox.form.data.purpose = '';
+             that.dialog.editorBox.form.data.iateralArea = '';
+             that.dialog.editorBox.form.data.lengthTimesWidth = '';
+             that.dialog.editorBox.form.data.dimension = '';
+             that.dialog.editorBox.form.data.lengths = ''
+             that.dialog.editorBox.show = true;
+             setTimeout(() => {
+                that.$refs['dialog_form'].clearValidate();
+            }, 100);
+        },
+        getChildTable (row, expandedRows) {
+            let that = this;
+            if (!row.getTable) {
+                let params = {
+                        clock: row.clock,
+                        energyid: row.energyid
+                    };
+                row.tableLoading = true;
+                let url = 'pass/ems/v1/trmbalancevalues/getitem';
+                that.axios.get(url, {
+                    params: params
+                })
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            let arr = [];
+                            for (let item of res.data) {
+                                arr.push({
+                                    clock: item.CLOCK,
+                                    itemname: item.ITEMNAME,
+                                    timegranid: item.TIMEGRANID,
+                                    apportvalue: item.APPORTVALUE
+                                })
+                            }
+                            row.tableData = arr;
+                            row.getTable = true;
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                        row.tableLoading = false;
+                    }).catch(function () {
+                        row.tableLoading = false;
+                    });
+            }
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.balanceSheetData {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                // margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .table-box {
+            .table-left {
+                float: left;
+                width: 550px;
+            }
+            .table-tuodong {
+                float: left;
+                width: 5px;
+                margin: 0 1px 0 1px;
+                cursor: col-resize;
+            }
+            .table-right {
+                margin-left: 557px;
+            }
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+        // 隐藏全选按钮
+        thead .el-table-column--selection .cell {
+            display: none;
+        }
+    }
+}
+</style>