Selaa lähdekoodia

Merge branch 'ssotest' of https://git.steerinfo.com/XTEMS/xt-ems-front into ssotest

lirl 3 vuotta sitten
vanhempi
commit
e6931dbe46

+ 39 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectAudit.vue

@@ -201,6 +201,21 @@
                                 >{{ 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="tag"
+                            label="订单类型"
+                            align="center"
+                            fixed="left"
+                            width="88px"
+                            :show-overflow-tooltip="true"
+                        >
+                         <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                        </template>
+                        </el-table-column>
                         <el-table-column
                            sortable
                             prop="grades"
@@ -517,6 +532,28 @@ export default {
                 chemicalStandard: {
                     obj: {},
                     arr: []
+                },
+                tag: {
+                    obj: {
+                        '0': {
+                            name: '正常',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '应急',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '正常'
+                        },
+                        {
+                            id: '1',
+                            name: '应急'
+                        }
+                    ]
                 }
             },
             butPrivilege: {
@@ -907,7 +944,8 @@ export default {
                                 createTime: item.createTime,
                                 planWeight: item.planWeight,
                                 gmReviewer: item.gmReviewer,
-                                gmReviewerTime: item.gmReviewerTime
+                                gmReviewerTime: item.gmReviewerTime,
+                                tag: item.tag ? item.tag : '0'
                             });
                         }
                         that.total = res.data.total;

+ 7 - 6
src/views/energyPlan/components/supplyAndDemand/planProjectBuildingMaterialsWaterSlag.vue

@@ -178,7 +178,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                         <span>{{ nameObj.unitid.obj[scope.row.unit] ? nameObj.unitid.obj[scope.row.unit] : scope.row.unit }}</span>
@@ -187,7 +187,7 @@
                         <el-table-column
                             prop="weight"
                             label="矿渣粉"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -213,32 +213,33 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
                             :show-overflow-tooltip="true"
+                            width="280px"
                         >
                             <template slot-scope="scope">
                                 <el-form-item

+ 124 - 11
src/views/energyPlan/components/supplyAndDemand/planProjectCBD.vue

@@ -61,6 +61,42 @@
                             </el-select>
                             </el-form-item>
                       </el-col>
+                      <el-col :span="3"
+                      >
+                          <el-form-item label="状态">
+                            <el-select
+                            filterable clearable
+                            v-model="filterForm.data.state"
+                            placeholder=""
+                            style="width: 100%;"
+                            >
+                            <el-option
+                            v-for="item of  nameObj.state.arr"
+                            :key="item.id"
+                            :value="item.id"
+                            :label="item.name"
+                            ></el-option>
+                            </el-select>
+                            </el-form-item>
+                      </el-col>
+                      <el-col :span="3"
+                      >
+                          <el-form-item label="订单类型">
+                            <el-select
+                            filterable clearable
+                            v-model="filterForm.data.tag"
+                            placeholder=""
+                            style="width: 100%;"
+                            >
+                            <el-option
+                            v-for="item of  nameObj.tag.arr"
+                            :key="item.id"
+                            :value="item.id"
+                            :label="item.name"
+                            ></el-option>
+                            </el-select>
+                            </el-form-item>
+                      </el-col>
                       <!-- <el-col :span="6"
                       v-if="filterForm.data.gx==='XG'"
                       >
@@ -259,6 +295,21 @@
                         </template>
                         </el-table-column>
                         <el-table-column
+                        sortable
+                            prop="tag"
+                            label="订单类型"
+                            align="center"
+                            fixed="left"
+                            width="88px"
+                            :show-overflow-tooltip="true"
+                        >
+                         <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
                         sortable
                             prop="grades"
                             label="钢种"
@@ -364,7 +415,7 @@
                             width="600"
                             :ref="'popover-' + scope.row.id"
                             trigger="click"
-                            @show="gethxcfDate(scope.row)" 
+                            @show="gethxcfDate(scope.row)"
                         >
                               <div style="float:left">
                                  <el-button
@@ -422,7 +473,7 @@
                                                     :rules="hxcfRules.chemcode"
                                                    >
                                                    <el-select
-                                                   filterable 
+                                                   filterable
                                                    collapse-tags
                                                    v-model="hxcfDataObj[scope.row.seq].chemcode"
                                                    >
@@ -744,6 +795,26 @@
             </el-col>
         </el-row>
         <el-row>
+          <el-col :span="12">
+           <el-form-item
+           label="订单类型"
+           prop="tag"
+               >
+          <el-select
+                   filterable
+                   v-model="dialog.editorBox.form.data.tag"
+                   placeholder=""
+                  style="width: 100%;"
+                  >
+                  <el-option
+                  v-for="item of nameObj.tag.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="钢种"
@@ -995,7 +1066,8 @@ export default {
                     kxf_weight: '',
                     yxf_weight: '',
                     gx: '',
-                    workproc_type: ''
+                    workproc_type: '',
+                    tag: ''
                 },
                 rules: {
                 },
@@ -1029,7 +1101,8 @@ export default {
                             dimension: '',
                             lengthTimesWidth: '',
                             iateralArea: '',
-                            deliveryDate: ''
+                            deliveryDate: '',
+                            tag: '0',
                         },
                          rules: {
                              planWeight: [
@@ -1281,6 +1354,28 @@ export default {
                 chemicalStandard: {
                     obj: {},
                     arr: []
+                },
+                tag: {
+                    obj: {
+                        '0': {
+                            name: '正常',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '应急',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '正常'
+                        },
+                        {
+                            id: '1',
+                            name: '应急'
+                        }
+                    ]
                 }
             },
             butPrivilege: {
@@ -1459,11 +1554,11 @@ export default {
                                 message: '保存成功',
                                 type: 'success'
                                 });
-                            that.gethxcfDate(row);    
+                            that.gethxcfDate(row);
                             } else {
                               that.$message.error(res.message);
                             }
-                          that.gridDataLoading = false;   
+                          that.gridDataLoading = false;
                          }).catch(function () {
                              that.gridDataLoading = false;
                          });
@@ -1545,7 +1640,7 @@ export default {
               let SubmitData = [];
               for (let item of that.hxcfSelection) {
                     SubmitData.push({
-                        gmid: item.gmid, 
+                        gmid: item.gmid,
                         chemCode: item.chemcode,
                         nkStdMin: item.nkstdmin,
                         nkStdMax: item.nkstdmax
@@ -1792,6 +1887,7 @@ export default {
                 lengthTimesWidth: that.dialog.editorBox.form.data.lengthTimesWidth,
                 dimension: that.dialog.editorBox.form.data.dimension,
                 surfaceStandard: that.dialog.editorBox.form.data.surfaceStandard,
+                tag: that.dialog.editorBox.form.data.tag,
                 state: '0'
             };
             that.$refs['dialog_form'].validate((valid) => {
@@ -1851,8 +1947,20 @@ export default {
                    endTime: that.filterForm.data.may[1],
                    grades: that.filterForm.data.grades.toString(),
                    specifications: that.filterForm.data.specifications.toString(),
-                   lengthTimesWidth: that.filterForm.data.lengthTimesWidth.toString()
+                   lengthTimesWidth: that.filterForm.data.lengthTimesWidth.toString(),
+                   tag: that.filterForm.data.tag,
+                   state: that.filterForm.data.state
                 };
+                if (that.filterForm.data.tag === '1') {
+                  pData = {
+                     workprocType: that.filterForm.data.workproc_type,
+                     grades: that.filterForm.data.grades.toString(),
+                     specifications: that.filterForm.data.specifications.toString(),
+                     lengthTimesWidth: that.filterForm.data.lengthTimesWidth.toString(),
+                     tag: that.filterForm.data.tag,
+                     state: that.filterForm.data.state
+                  };
+                }
                 for (let key in pData) {
                     if (pData[key]) {
                         params[key] = pData[key];
@@ -1895,7 +2003,8 @@ export default {
                                 dimension: item.dimension,
                                 deliveryDate: item.deliveryDate,
                                 gmReviewer: item.gmReviewer,
-                                gmReviewerTime: item.gmReviewerTime
+                                gmReviewerTime: item.gmReviewerTime,
+                                tag: item.tag ? item.tag : '0'
                             });
                         }
                         that.total = res.data.total;
@@ -1953,6 +2062,7 @@ export default {
             that.dialog.editorBox.form.data.lengths = '';
             that.dialog.editorBox.form.data.lengthTimesWidth = '';
             that.dialog.editorBox.form.data.memo = '';
+            that.dialog.editorBox.form.data.tag = '0';
             that.dialog.editorBox.show = true;
              setTimeout(() => {
                 that.$refs['dialog_form'].clearValidate();
@@ -2269,7 +2379,8 @@ export default {
                                 surfaceStandard: that.tableFormDataObj[key].surfacestandard,
                                 dimension: that.tableFormDataObj[key].dimension,
                                 iateralArea: that.tableFormDataObj[key].iateralarea,
-                                lengthTimesWidth: that.tableFormDataObj[key].lengthtimeswidth
+                                lengthTimesWidth: that.tableFormDataObj[key].lengthtimeswidth,
+                                tag: that.tableFormDataObj[key].tag ? that.tableFormDataObj[key].tag : '0'
                             });
                         }
                         that.loading = true;
@@ -2346,7 +2457,8 @@ export default {
                                 lengths: that.tableFormDataObj[key].lengths,
                                 grades: that.tableFormDataObj[key].grades,
                                 specifications: that.tableFormDataObj[key].specifications,
-                                planWeight: that.tableFormDataObj[key].planweight
+                                planWeight: that.tableFormDataObj[key].planweight,
+                                tag: that.tableFormDataObj[key].tag ? that.tableFormDataObj[key].tag : '0'
                             });
                         }
                         that.loading = true;
@@ -2454,6 +2566,7 @@ export default {
           }).then(res => {
             if (res.code === '200') {
               this.$message.success('操作成功')
+              _this.getTableData();
             } else {
               this.$message.error(res.message)
             }

+ 1505 - 0
src/views/energyPlan/components/supplyAndDemand/planProjectCleanCoal.vue

@@ -0,0 +1,1505 @@
+<template>
+<!-- 年度计划编制(机焦厂-洗煤-精煤) -->
+<!-- 当有审核与取消审核权限时,默认其为审核人,审核人无法修改数据 -->
+    <div class="outElectricity">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="75px"
+                >
+                    <el-row>
+                        <el-col :span="5">
+                            <!-- <el-form-item label="工序">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.networkid"
+                                    multiple
+                                    collapse-tags
+                                    placeholder="轧钢厂 "
+                                    style="width: 100%;"
+                                    disabled
+                                    @change="connn()"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.networkid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item> -->
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="年份">
+                                <zj-timegran-date
+                                    v-model="filterForm.data.yearmonth"
+                                    style="width: 100%;"
+                                    :timegranId="'YEAR'"
+                                    :oneFoo="getTableData"
+                                    :custom="1"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                        </el-col>
+                        <el-col :span="5">
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-form size="mini" label-width="75px">
+                        <el-row>
+                            <el-col :span="16">
+                                <el-button
+                                    class="button"
+                                    type="primary"
+                                    size="mini"
+                                    icon="el-icon-plus"
+                                    @click="but_add"
+                                    :loading="loading"
+                                >新增</el-button>
+                                   <el-button
+                                    class="button"
+                                    type="primary"
+                                    size="mini"
+                                    icon="el-icon-plus"
+                                    @click="but_copy"
+                                    :loading="loading"
+                                    v-if="butPrivilege.PUT && !isCheck"
+                                >复制</el-button>
+                                <el-button
+                                    class="button"
+                                    type="primary"
+                                    size="mini"
+                                    icon="el-icon-edit-outline"
+                                    @click="but_edit_plural()"
+                                    :loading="loading"
+                                    v-if="butPrivilege.PUT && !isCheck"
+                                >修改</el-button>
+                                <el-button
+                                    class="button"
+                                    type="danger"
+                                    size="mini"
+                                    icon="el-icon-delete"
+                                    v-if="butPrivilege.PUT && !isCheck"
+                                    @click="but_del_plural()"
+                                    :loading="loading"
+                                >删除</el-button>
+                            </el-col>
+                            <el-col :span="8">
+                                <div style="float:right; text-align: right;">
+                                    <el-button
+                                        class="button"
+                                        type="primary"
+                                        size="mini"
+                                        icon="el-icon-search"
+                                        v-if="butPrivilege.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['singleTable'].$el) - 45;
+                                            }
+                                        );"
+                                    >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                                </div>
+                            </el-col>
+                        </el-row>
+                    </el-form>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                        :span-method="arraySpanMethod"
+                        :row-class-name="tableRowClassName"
+                        @cell-click="cellClick"
+                    >
+                        <el-table-column
+                            type="selection"
+                            width="40"
+                            align="center"
+                            :selectable='checkboxT'
+                            fixed="left"
+                            class-name="cnspicuous"
+                        ></el-table-column>
+                        <el-table-column
+                           sortable
+                            prop="index"
+                            type="index"
+                            label="序号"
+                            fixed="left"
+                            width="50px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            prop="yearmonth"
+                            label="月份"
+                            fixed="left"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <!-- <el-table-column
+                            prop="productid"
+                            label="产品名称"
+                            fixed="left"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        >
+                        <template slot-scope="scope">
+                                        <span>{{ nameObj.workprocid.obj[scope.row.productid] ? nameObj.workprocid.obj[scope.row.productid].name : scope.row.productid }}</span>
+                        </template>
+                        </el-table-column> -->
+                         <el-table-column
+                            fixed="left"
+                            prop="unit"
+                            label="计量单位"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                                        <span>{{ nameObj.unitid.obj[scope.row.unit] ? nameObj.unitid.obj[scope.row.unit] : scope.row.unit }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                            prop="weight"
+                            label="精煤"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :prop="scope.row.seq + '.weight'"
+                                    :rules="tableFormRules.weight"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.seq].weight"
+                                        refcous="true"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        @change="chnageSecondVal(scope.row.seq, tableFormDataObj[scope.row.seq].secondVal, scope.$index)"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.weight}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            prop="cjsj"
+                            label="创建时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                         <el-table-column
+                            prop="cjr"
+                            label="创建人"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                         <el-table-column
+                            prop="xgsj"
+                            label="修改时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                            prop="xgr"
+                            label="修改人"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            prop="memo"
+                            label="备注"
+                            :show-overflow-tooltip="true"
+                            width="280px"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :prop="scope.row.seq + '.memo'"
+                                    :rules="tableFormRules.memo"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.seq].memo"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.memo}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            prop="id"
+                            label="ID"
+                            width="140px"
+                            v-if="filterForm.data.show"
+                        ></el-table-column>
+                    </el-table>
+                </el-form>
+                <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: right;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
+         :model="dialog.editorBox.form.data"
+         ref="dialog_form"
+         size="mini"
+         label-width="95px"
+         :rules="dialog.editorBox.form.rules"
+         >
+         <el-row>
+             <el-col :span="12">
+               <el-form-item
+               label="产品名称"
+               prop="productid"
+               >
+                   <el-select
+                     placeholder=""
+                     prop="productid"
+                     v-model="dialog.editorBox.form.data.productid"
+                     style="width: 100%;"
+                     :rules="dialog.editorBox.form.productid"
+                    >
+                    <el-option
+                    v-for="item in 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="yearmonth"
+                    >
+                    <zj-timegran-date
+                    v-model="dialog.editorBox.form.data.yearmonth"
+                    style="width: 100%;"
+                    :timegranId="'MONTH'"
+                    :defaultOffset="-1"
+                    :rules="dialog.editorBox.form.yearmonth"
+                    ></zj-timegran-date>
+                </el-form-item>
+            </el-col>
+            </el-row>
+            <el-row>
+            <el-col :span="12">
+          <el-form-item
+                 label="计划量"
+                 prop="weight"
+                >
+               <el-input
+                clearable
+                v-model="dialog.editorBox.form.data.weight"
+                style="width: 100%;"
+                :rules="dialog.editorBox.form.weight"
+               >
+               </el-input>
+        </el-form-item>
+            </el-col>
+            <el-col :span="12">
+                <el-form-item
+                 label="备注"
+                 prop="memo"
+                >
+               <el-input
+                clearable
+                v-model="dialog.editorBox.form.data.memo"
+                style="width: 100%;"
+               >
+               </el-input>
+                </el-form-item>
+            </el-col>
+        </el-row>
+         </el-form>
+         </div>
+         <span
+        slot="footer"
+        class="dialog-footer"
+            >
+        <el-button
+        :loading="loading"
+        @click="dialog.editorBox.show = false"
+        >取 消</el-button>
+        <el-button
+        type="primary"
+        @click="dataSave"
+        :loading="loading"
+        >保 存</el-button>
+    </span>
+    </el-dialog>
+     <el-dialog
+       title="年计划编制-机焦厂(洗煤-精煤)复制"
+       :visible.sync="dialog.editorBox2.show"
+        width="400px"
+       :close-on-click-modal="false"
+       :show-close="!loading"
+     >
+         <div>
+        <el-form
+         :model="dialog.editorBox2.form.data"
+         ref="dialog_form2"
+         size="mini"
+         label-width="300px"
+         :rules="dialog.editorBox2.form.rules"
+         >
+         <el-row>
+             <el-col>
+                 <el-col :span="12">
+                  <el-form-item
+                    label="月份"
+                    prop="yearmonth"
+                    label-width="100px"
+                    >
+                    <zj-timegran-date
+                    v-model="dialog.editorBox2.form.data.yearmonth"
+                    style="width: 150%;"
+                    :timegranId="'MONTH'"
+                    :rules="dialog.editorBox2.form.yearmonth"
+                    ></zj-timegran-date>
+                </el-form-item>
+            </el-col>
+             </el-col>
+         </el-row>
+         </el-form>
+         </div>
+         <span
+        slot="footer"
+        class="dialog-footer"
+            >
+        <el-button
+        :loading="loading"
+        @click="dialog.editorBox2.show = false"
+        >取 消</el-button>
+        <el-button
+        type="primary"
+        @click="but_copy_plural"
+        :loading="loading"
+        >保 存</el-button>
+    </span>
+     </el-dialog>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '~/utils/validator.js'
+import timegranDate from '~/components/zg/timegranDate.vue'
+import {formatDate, XtcommonSummaries, getCookie} from '@/utils/util.js';
+export default {
+    name: 'outElectricity',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        let setDate = new Date();
+        setDate.setDate(15);
+        setDate.setMonth((setDate.getMonth() - 1));
+        return {
+            rowIndex: '',
+            columnId: '',
+            focusTarget: null,
+            seqArr: [],
+            editSetFlag: '',
+            isCheck: false, // 是否为审核人
+            filterForm: {
+                show: true,
+                data: {
+                    clock: '',
+                    clockc: '',
+                    workprocid: [],
+                    location: [],
+                    networkid: [],
+                    state: '',
+                    itemname: '',
+                    searchtype: '0',
+                    measureid: '',
+                    line: 'AT2012',
+                    unit: '',
+                    yearmonth: '',
+                    weight: '',
+                    cjr: '',
+                    xgr: '',
+                    xgsj: '',
+                    memo: '',
+                    cp: '',
+                    prproductid: '',
+                    sysl: '',
+                    wxsy: '',
+                    parentid: 'JJH',
+                    cjsj: '',
+                    jzsj: '',
+                    zt: '',
+                    show: false
+                },
+                rules: {
+                },
+                disabled: {
+                    networkid: false
+                }
+            },
+            pageNum: 1,
+            pageSize: 100,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [
+            ],
+            loading: false,
+            tableLoading: false,
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                mintvalue: [
+                    // { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                mendvalue: [
+                    // { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                weight: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                wxsy: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                sysl: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                productid: [
+                    { required: true, message: '该项不能为空', trigger: 'change' }
+                ],
+                wastage: [
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                secondVal: [
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                memo: [
+
+                ]
+            },
+            nameObj: {
+                state: {
+                    obj: {
+                        '0': {
+                            name: '未编辑',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '已编辑',
+                            color: 'rgb(28, 111, 217)'
+                        },
+                        '2': {
+                            name: '已审核',
+                            color: 'red'
+                        },
+                        '3': {
+                            name: '已接收',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '未编辑'
+                        },
+                        {
+                            id: '1',
+                            name: '已编辑'
+                        },
+                        {
+                            id: '2',
+                            name: '已审核'
+                        },
+                        {
+                            name: '已接收',
+                            color: 'red'
+                        }
+                    ]
+                },
+                type: {
+                    obj: {
+                        '0': '否',
+                        '1': '是'
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '否'
+                        },
+                        {
+                            id: '1',
+                            name: '是'
+                        }
+                    ]
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                workprocid: {
+                    obj: {
+                        'AT2012': {
+                          id: 'AT2012',
+                          name: '精煤'
+                         }},
+                    arr: [{
+                           id: 'AT2012',
+                           name: '精煤'
+                        }]
+                },
+                location: {
+                    obj: {},
+                    arr: [],
+                    showDataArr: []
+                },
+                locateid: {
+                    obj: {},
+                    arr: []
+                },
+                networkid: {
+                    obj: {},
+                    arr: []
+                },
+                userId: {
+                    obj: {},
+                    arr: []
+                }
+            },
+         dialog: {
+                fRow: null,
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        default: {
+                            workprocid: ''
+                        },
+                        data: {
+                            unitid: '',
+                            line: 'AT2012',
+                            yearmonth: '',
+                            weight: '',
+                            memo: '',
+                            sysl: '',
+                            wxsy: '',
+                            productid: ''
+                        },
+                         rules: {
+                            weight: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            workprocid: [{ required: true, message: '该项不能为空', trigger: 'change' }],
+                            yearmonth: [{ required: true, message: '该项不能为空', trigger: 'change' }],
+                            unitid: [{ required: true, message: '该项不能为空', trigger: 'change' }],
+                            line: [{ required: true, message: '该项不能为空', trigger: 'change' }],
+                            productid: [{ required: true, message: '该项不能为空', trigger: 'change' }],
+                            sysl: [
+                                 { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            wxsy: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ]
+                        }
+                    }
+                },
+                editorBox2: {
+                    show: false,
+                    type: '',
+                    form: {
+                      data: {
+                          yearmonth: ''
+                      },
+                    rules: {
+                            yearmonth: [{ required: true, message: '该项不能为空', trigger: 'change' }]
+                        }
+                    }
+                }
+            },
+            butPrivilege: {
+                QUERY: false,
+                PUT: false,
+                CHECK: false,
+                UNDOCHECK: false
+            },
+            loginName: getCookie('loginName')
+        }
+    },
+    created () {
+        // 获取按钮权限
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+        for (let key in this.butPrivilege) {
+            this.butPrivilege[key] = this.checkPrivilege(this.activeMenu + key);
+        }
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        // 接收路由参数
+        if (that.$route.query.networkid) {
+            that.filterForm.disabled.networkid = true;
+            that.filterForm.data.networkid = that.$route.query.networkid.split(',');
+        }
+        // 当有审核与取消审核权限时,默认其为审核人,审核人无法修改数据
+        if (that.butPrivilege.CHECK || that.butPrivilege.UNDOCHECK) {
+            that.isCheck = true;
+        }
+        // 管理员在这里录入数据
+        if (that.loginName === 'admin' && that.filterForm.disabled.networkid) {
+            that.isCheck = false;
+        }
+        // that.getLocation();
+        that.getLocateIdData();
+        that.getNetworkIdData();
+        // that.getTableData();
+        that.getUnitIdData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['apportvalue', 'realvalue', 'wastage', 'weight']; // 合计列绑定的prop
+            return XtcommonSummaries(param, prop);
+        },
+        // 获取工序列表
+        // getNodeData () {
+        //     let that = this
+        //     let url = 'pass/ems/v1/trmworkprocs/getIdAndName?issettle=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.workprocid.arr = arr;
+        //                 that.nameObj.workprocid.obj = obj;
+        //                 that.connn();
+        //             } 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.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取站所
+        getNetworkIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmstations/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.networkid.arr = arr;
+                        that.nameObj.networkid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+     but_copy_plural () {
+            let that = this;
+            let SubmitData = [];
+            for (let key in that.tableFormDataObj) {
+                SubmitData.push({
+                    weight: that.tableFormDataObj[key].weight,
+                    cjr: that.tableFormDataObj[key].cjr,
+                    memo: that.tableFormDataObj[key].memo,
+                    line: that.tableFormDataObj[key].line,
+                    unit: that.tableFormDataObj[key].unit,
+                    parentid: that.filterForm.data.parentid,
+                    yearmonth: that.dialog.editorBox2.form.data.yearmonth,
+                    wxsy: that.tableFormDataObj[key].wxsy,
+                    sysl: that.tableFormDataObj[key].wxsy,
+                    productid: that.tableFormDataObj[key].productid
+                            });
+                        }
+                   that.$refs['dialog_form2'].validate((valid) => {
+                      if (valid) {
+                        that.loading = true;
+                        that.axios.post('pass/ems/v1/emsprodplanyears/', SubmitData, {
+                             contentType: 'application/json'
+                        })
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '复制成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox2.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                } else {
+                    this.$message.error('至少选择一条数据');
+                }
+                   });
+        },
+        connn () {
+            let that = this;
+            if (!that.filterForm.data.networkid || that.filterForm.data.networkid.length === 0) {
+                that.nameObj.location.showDataArr = that.nameObj.workprocid.arr;
+            } else {
+                let url = 'pass/ems/v1/trmelectricitylocations/getWorkprocs?workshop=' + that.filterForm.data.networkid.toString();
+                that.axios.get(url)
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            let arr = [];
+                            for (let item of res.data) {
+                                arr.push({
+                                    id: item.id,
+                                    name: item.name
+                                })
+                            }
+                            that.nameObj.location.showDataArr = arr;
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                    });
+            }
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/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.locateid.arr = arr;
+                        that.nameObj.locateid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {},
+                pData = {
+                    yearmonth: that.filterForm.data.yearmonth,
+                    workprocid: that.filterForm.data.workprocid.toString(),
+                    location: that.filterForm.data.location.toString(),
+                    networkid: that.filterForm.data.networkid.toString(),
+                    itemname: that.filterForm.data.itemname,
+                    zt: that.filterForm.data.zt,
+                    measureid: that.filterForm.data.measureid,
+                    exactsearch: that.filterForm.data.searchtype,
+                    parentid: that.filterForm.data.parentid
+                };
+                for (let key in pData) {
+                    if (pData[key]) {
+                        params[key] = pData[key];
+                    }
+                }
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            // let url = 'pass/ems/v1/trmtransfereactvalues/getDateEditForPage/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            // if (that.isCheck) {
+            //     url = 'pass/ems/v1/trmtransfereactvalues/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            // }
+            let url = 'pass/ems/v1/emsprodplanyears/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            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,
+                                unit: item.unit,
+                                line: item.line,
+                                yearmonth: item.yearmonth,
+                                weight: item.weight,
+                                cjr: item.cjr,
+                                cjsj: item.cjsj,
+                                jzsj: item.jzsj,
+                                xgr: item.xgr,
+                                xgsj: item.xgsj,
+                                cp: item.cp,
+                                sysl: item.sysl,
+                                wxsy: item.wxsy,
+                                zt: item.zt,
+                                parentid: item.parentid,
+                                no: item.no,
+                                id: item.id,
+                                memo: item.memo,
+                                productid: item.productid
+                            });
+                        }
+                        that.total = res.data.total;
+                        that.tableData = arr;
+                        that.getAdds();
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 获取表格中的数据
+        getTableDataEdit () {
+            let that = this,
+                params = {},
+                pData = {
+                    yearmonth: that.filterForm.data.yearmonth,
+                    workprocid: that.filterForm.data.workprocid.toString(),
+                    location: that.filterForm.data.location.toString(),
+                    networkid: that.filterForm.data.networkid.toString(),
+                    itemname: that.filterForm.data.itemname,
+                    exactsearch: that.filterForm.data.searchtype,
+                    parentid: that.filterForm.data.parentid
+                };
+                for (let key in pData) {
+                    if (pData[key]) {
+                        params[key] = pData[key];
+                    }
+                }
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/emsprodplanyears/getDateEditForPage/?pageNum=1&pageSize=' + that.pageSize;
+            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,
+                                unit: item.unit,
+                                line: item.line,
+                                yearmonth: item.yearmonth,
+                                weight: item.weight,
+                                cjr: item.cjr,
+                                cjsj: item.cjsj,
+                                jzsj: item.jzsj,
+                                xgr: item.xgr,
+                                xgsj: item.xgsj,
+                                cp: item.cp,
+                                sysl: item.sysl,
+                                zt: item.zt,
+                                wxsy: item.wxsy
+                            });
+                        }
+                        that.total = res.data.total;
+                        that.tableData = arr;
+                        that.getAdds();
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 合并相同的用电地点
+        arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
+            let that = this;
+            let tableData = this.$refs.singleTable.tableData
+            let c1 = row.workprocid;
+            let c2 = row.location;
+            let c3 = row.workshop;
+            let c4 = row.clock;
+            let c5 = row.clocke;
+            let rowsPan = 1;
+            // let adds = this.$refs.singleTable.tableData[rowIndex].realvalue;
+            if (column['property'] === 'workprocid' || column['property'] === 'adds') {
+                if (rowIndex > 0 && c1 === tableData[rowIndex - 1].workprocid && c2 === tableData[rowIndex - 1].location &&
+                c3 === tableData[rowIndex - 1].workshop && c4 === tableData[rowIndex - 1].clock && c5 === tableData[rowIndex - 1].clocke) {
+                    return {
+                        rowspan: 0,
+                        colspan: 0
+                    };
+                };
+                while (tableData[rowIndex + rowsPan] && c1 === tableData[rowIndex + rowsPan].workprocid && c2 === tableData[rowIndex + rowsPan].location &&
+                    c3 === tableData[rowIndex + rowsPan].workshop && c4 === tableData[rowIndex + rowsPan].clock && c5 === tableData[rowIndex + rowsPan].clocke) {
+                    rowsPan += 1
+                }
+                return {
+                    rowspan: rowsPan,
+                    colspan: 1
+                };
+            }
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            that.getTableData(1);
+        },
+        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();
+            }
+        },
+        // 只允许对未接受的数据进行操作
+        checkboxT (row, index) {
+            if (row.zt === '2' && !this.isCheck) {
+                return false;
+            } else {
+                return true;
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+             let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.seq;
+                if (that.tableFormDataObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    tableFormDataObj[xId] = that.tableFormDataObj[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;
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            for (let item of that.tableData) {
+                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.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+            this.getAdds();
+        },
+        // 当上月底码发生改变时计算抄度与实际电量
+        getApportValue (seq, value, rowIndex, event) {
+            let that = this;
+            if (!isNaN(Number(value))) {
+                if (!isNaN(Number(that.tableFormDataObj[seq].mintvalue)) && !isNaN(Number(that.tableFormDataObj[seq].mendvalue)) && that.tableFormDataObj[seq].mintvalue !== null && that.tableFormDataObj[seq].mendvalue !== null) {
+                    let poor = that.floatComputed(Number(that.tableFormDataObj[seq].mendvalue), Number(that.tableFormDataObj[seq].mintvalue), '-');
+                    that.tableFormDataObj[seq].apportvalue = that.floatComputed(poor, Number(that.tableFormDataObj[seq].mods), '*').toFixed(0);
+                    let rv1 = that.floatComputed(Number(that.tableFormDataObj[seq].apportvalue), Number(that.tableFormDataObj[seq].wastage), '+');
+                    that.tableFormDataObj[seq].realvalue = that.floatComputed(rv1, Number(that.tableFormDataObj[seq].secondVal), '-').toFixed(0);
+                    that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
+                }
+            }
+        },
+        // 手动修改抄度后计算实际电量
+        chnageApportvalue (seq, value, rowIndex) {
+            let that = this;
+            if (!isNaN(Number(value)) && !isNaN(Number(that.tableFormDataObj[seq].wastage))) {
+                that.tableFormDataObj[seq].realvalue = that.floatComputed(Number(value), Number(that.tableFormDataObj[seq].wastage), '+').toFixed(0);
+            }
+            that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
+        },
+        // 手动修改损耗后计算实际电量
+        chnageWastage (seq, value, rowIndex) {
+            let that = this;
+            if (!isNaN(Number(value)) && !isNaN(Number(that.tableFormDataObj[seq].apportvalue)) && that.tableFormDataObj[seq].apportvalue !== null) {
+                let rv1 = that.floatComputed(Number(value), Number(that.tableFormDataObj[seq].apportvalue), '+');
+                that.tableFormDataObj[seq].realvalue = that.floatComputed(rv1, Number(that.tableFormDataObj[seq].secondVal), '-').toFixed(0);
+                that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
+            }
+        },
+        // 手动修改二次转供电后计算实际电量
+        chnageSecondVal (seq, value, rowIndex) {
+            let that = this;
+            if (!isNaN(Number(value)) && !isNaN(Number(that.tableFormDataObj[seq].apportvalue)) && that.tableFormDataObj[seq].apportvalue !== null) {
+                let val1 = that.floatComputed(Number(that.tableFormDataObj[seq].apportvalue), Number(that.tableFormDataObj[seq].wastage), '+');
+                that.tableFormDataObj[seq].realvalue = that.floatComputed(val1, Number(value), '-').toFixed(0);
+                that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
+            }
+        },
+        // 统计合计值
+        getAdds () {
+            let that = this;
+            let wlarr = [];
+            for (var i = 0; i < that.tableData.length; i++) {
+               wlarr.push(that.tableData[i].workprocid + '-' + that.tableData[i].location + '-' + that.tableData[i].workshop + '-' + that.tableData[i].clock + '-' + that.tableData[i].clocke);
+            }
+            let wls = [...new Set(wlarr)]
+            let arrs = [];
+            for (let wl of wls) {
+                let adds = 0;
+                for (let item of that.tableData) {
+                    if (wl === item.workprocid + '-' + item.location + '-' + item.workshop + '-' + item.clock + '-' + item.clocke) {
+                        adds = that.floatComputed(Number(item.realvalue), adds, '+');
+                    }
+                }
+                for (let i = 0; i < that.tableData.length; i++) {
+                    if (wl === that.tableData[i].workprocid + '-' + that.tableData[i].location + '-' + that.tableData[i].workshop + '-' + that.tableData[i].clock + '-' + that.tableData[i].clocke) {
+                        that.tableData[i].adds = adds;
+                    }
+                }
+            }
+        },
+        // 展示实际电量
+        showRealValue (rowIndex, value) {
+            let that = this;
+            for (let i = 0; i < that.tableData.length; i++) {
+                if (i === rowIndex) {
+                    that.tableData[i].realvalue = value;
+                }
+            }
+            this.getAdds();
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid, obj) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData.push({
+                                no: that.tableFormDataObj[key].no,
+                                weight: that.tableFormDataObj[key].weight,
+                                cjr: that.tableFormDataObj[key].cjr,
+                                memo: that.tableFormDataObj[key].memo,
+                                cjsj: that.tableFormDataObj[key].cjsj,
+                                jzsj: that.tableFormDataObj[key].jzsj,
+                                productid: that.tableFormDataObj[key].productid,
+                                xgr: that.tableFormDataObj[key].xgr,
+                                xgsj: that.tableFormDataObj[key].xgsj,
+                                cp: that.tableFormDataObj[key].cp,
+                                sysl: that.tableFormDataObj[key].sysl,
+                                zt: that.tableFormDataObj[key].zt,
+                                wxsy: that.tableFormDataObj[key].wxsy,
+                                unit: that.tableFormDataObj[key].unit,
+                                parentid: that.filterForm.data.parentid,
+                                yearmonth: that.tableFormDataObj[key].yearmonth
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanyears/batchupdateList', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '修改成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    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 = [];
+            SubmitData.push({
+               yearmonth: that.dialog.editorBox.form.data.yearmonth,
+                weight: that.dialog.editorBox.form.data.weight,
+                unit: that.dialog.editorBox.form.data.unitid,
+                parentid: that.filterForm.data.parentid,
+                memo: that.dialog.editorBox.form.data.memo,
+                sysl: that.dialog.editorBox.form.data.sysl,
+                wxsy: that.dialog.editorBox.form.data.wxsy,
+                productid: that.dialog.editorBox.form.data.productid
+            });
+            that.$refs['dialog_form'].validate((valid) => {
+               if (valid) {
+                        that.loading = true;
+                        that.axios.post('pass/ems/v1/emsprodplanyears/', SubmitData, {
+                        contentType: 'application/json'
+                })
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '新增成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                }
+            }
+            );
+        },
+        // 批量删除
+        but_del_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                let SubmitData = [];
+                for (let item of that.multipleSelection) {
+                    if (item.zt === '2') {
+                        this.$message.error('已经审核的数据不能删除');
+                        return;
+                    }
+                    SubmitData.push({
+                        no: item.no
+                    });
+                }
+                that.$confirm('是否删除已选数据?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    state: 'warning'
+                }).then(() => {
+                    that.axios.delete('pass/ems/v1/emsprodplanyears/delete', {
+                        data: SubmitData,
+                        contentType: 'application/json;charset=UTF-8'
+                    })
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                that.$message({
+                                    message: '删除成功',
+                                    type: 'success'
+                                });
+                                that.getTableData();
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                        }).catch(function () {
+                        });
+                }).catch(() => {
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        upState (state = '2') {
+            let that = this;
+            let dataArr = [];
+            for (let item of that.multipleSelection) {
+                if (item.state !== state) {
+                    dataArr.push(item);
+                }
+            }
+            if (dataArr.length > 0) {
+                that.$confirm('本次将要' + (state === '2' ? '审核' : '撤销审核') + dataArr.length + '条数据,是否确定?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    state: 'warning'
+                }).then(() => {
+                    let SubmitData = [];
+                    for (let item of dataArr) {
+                        SubmitData.push({
+                            state: state,
+                            id: item.id
+                        });
+                    }
+                    that.loading = true;
+                    that.axios.put('pass/ems/v1/trmtransfereactvalues/batchcheck2', SubmitData)
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                that.$message({
+                                    message: (state === '2' ? '审核' : '撤销') + '成功',
+                                    type: 'success'
+                                });
+                                that.getTableData();
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.loading = false;
+                        }).catch(function () {
+                            that.loading = false;
+                        });
+                }).catch(() => {
+                });
+            } else {
+                if (that.multipleSelection.length > 0) {
+                    this.$message.error('没有需要' + (state === '2' ? '审核' : '撤销') + '的数据');
+                } else {
+                    this.$message.error('至少要选择一条数据');
+                }
+            }
+        },
+    but_add () {
+            let that = this;
+            that.dialog.editorBox.show = true;
+             setTimeout(() => {
+                that.$refs['dialog_form'].clearValidate();
+            }, 100);
+        },
+    but_copy () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+             that.dialog.editorBox2.show = true;
+             setTimeout(() => {
+                that.$refs['dialog_form2'].clearValidate();
+            }, 100);
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+      },
+        tableRowClassName ({row, rowIndex}) {
+            // 把每一行的索引放进row
+            row.index = rowIndex;
+        },
+        cellClick (row, column, cell, event) {
+            let _this = this;
+            this.rowIndex = row.index;
+            this.columnId = column.id;
+            _this.editSetFlag = row.index + column.id;
+            _this.focusTarget = event.target;
+            while (_this.focusTarget.tagName !== 'TD') {
+                _this.focusTarget = _this.focusTarget.parentElement;
+            }
+            _this.$nextTick(() => {
+                let target = this.focusTarget;
+                $(target).find('input').focus();
+            });
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.outElectricity{
+    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;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+            }
+        }
+        .rowDisable td {
+            color: #6bb025 !important;
+        }
+        .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;
+            }
+        }
+    }
+    .color_no {
+        color: #7a7a7a;
+    }
+    .color_yes {
+        color: #1a9f17;
+    }
+    .cnspicuous .el-checkbox__input.is-disabled .el-checkbox__inner {
+        background-color: #dcdfe6;
+        border-color: #babbbf;
+    }
+}
+</style>

+ 68 - 15
src/views/energyPlan/components/supplyAndDemand/planProjectCoke.vue

@@ -185,7 +185,7 @@
                             prop="line"
                             label="产品"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -196,7 +196,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -206,7 +206,7 @@
                         <el-table-column
                             prop="weight"
                             label="焦油"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -236,7 +236,7 @@
                         <el-table-column
                             prop="weight"
                             label="粗苯"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -266,7 +266,7 @@
                         <el-table-column
                             prop="weight"
                             label="硫铵"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -292,45 +292,76 @@
                                 </el-form-item>
                                 <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['AT3010']}}</span>
                             </template>
+                        </el-table-column>
+                        <el-table-column
+                            prop="weight"
+                            label="硫酸"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :prop="scope.row.seq + '.weight'"
+                                >
+                                    <el-input clearable
+                                        v-for="(itemform, key) in tableFormDataObj[scope.row.seq].weight"
+                                        style="width: 100%;"
+                                        v-model="itemform['AT3025']"
+                                        v-if="!isNaN(Number(itemform['AT3025']))"
+                                        refcous="true"
+                                        :rules="tableFormRules.weight"
+                                        oninput="this.value = this.value.replace(/[^\d.]/g,'');"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        @change="chnageSecondVal(scope.row.seq, tableFormDataObj[scope.row.seq].secondVal, scope.$index)"
+                                        :key="key"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['AT3025']}}</span>
+                            </template>
                         </el-table-column>
-                        <el-table-column
+<!--                        <el-table-column
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
                             <span v-else>{{ scope.row.total }}</span>
-                        </template></el-table-column>
+                        </template></el-table-column> -->
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            :show-overflow-tooltip="true"
+                            :show-overflow-tooltip="true"
+                            width="280px"
                         >
                             <template slot-scope="scope">
                                 <el-form-item
@@ -716,6 +747,10 @@ export default {
                         'AT3010': {
                            id: 'AT3010',
                            name: '硫铵'
+                        },
+                        'AT3025': {
+                           id: 'AT3025',
+                           name: '硫酸'
                         }},
                     arr: [{
                              id: 'AT3024',
@@ -728,6 +763,10 @@ export default {
                         {
                         id: 'AT3010',
                         name: '硫铵'
+                       },
+                       {
+                        id: 'AT3025',
+                        name: '硫酸'
                        }]
                 },
                 line: {
@@ -743,6 +782,10 @@ export default {
                         'AT3010': {
                            id: 'AT3010',
                            name: '硫铵'
+                        },
+                        'AT3025': {
+                           id: 'AT3025',
+                           name: '硫酸'
                         }},
                     arr: [{
                            id: 'AT3024',
@@ -755,6 +798,10 @@ export default {
                         {
                         id: 'AT3010',
                         name: '硫铵'
+                       },
+                       {
+                        id: 'AT3025',
+                        name: '硫酸'
                        }]
                 },
                 location: {
@@ -897,15 +944,21 @@ export default {
                 switch (0) {
                     case index % 7:
                     that.tableData[i].weight.forEach((item, key) => {
-                        weiItem = (isNaN(item['AT3010']) ? 0 : item['AT3010']);
+                        weiItem = (isNaN(item['AT3025']) ? 0 : item['AT3025']);
                         lineTotal += Number(weiItem);
                     });
                     break;
                     case index % 6:
                     that.tableData[i].weight.forEach((item, key) => {
-                        weiItem = (isNaN(item['AT3009']) ? 0 : item['AT3009']);
+                        weiItem = (isNaN(item['AT3010']) ? 0 : item['AT3010']);
                         lineTotal += Number(weiItem);
                     });
+                    break;
+                    case index % 5:
+                    that.tableData[i].weight.forEach((item, key) => {
+                        weiItem = (isNaN(item['AT3009']) ? 0 : item['AT3009']);
+                        lineTotal += Number(weiItem);
+                    });
                     break;
                     default:
                     that.tableData[i].weight.forEach((item, key) => {

+ 1 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectDataMonth.vue

@@ -18,7 +18,7 @@
                                     :type="'daterange'"
                                     :timegranId="'MONTH'"
                                     :oneFoo="getTableData"
-                                    :defaultOffset="-1"
+                                    :defaultOffset="0"
                                 ></zj-timegran-date>
                             </el-form-item>
                         </el-col>

+ 88 - 47
src/views/energyPlan/components/supplyAndDemand/planProjectGeneration.vue

@@ -185,7 +185,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
@@ -196,7 +196,7 @@
                             prop="weight"
                             label="40MW"
                             fixed="left"
-                            width="160ox"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -226,7 +226,7 @@
                             prop="weight"
                             label="25MW"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -253,10 +253,40 @@
                             </template>
                         </el-table-column>
                         <el-table-column
+                            prop="weight"
+                            label="45MW"
+                            fixed="left"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                                <el-form-item
+                                    v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :prop="scope.row.seq + '.weight'"
+                                >
+                                    <el-input clearable
+                                        v-for="(itemform, key) in tableFormDataObj[scope.row.seq].weight"
+                                        style="width: 100%;"
+                                        v-model="itemform['AT4003']"
+                                        v-if="!isNaN(Number(itemform['AT4003']))"
+                                        refcous="true"
+                                        :rules="tableFormRules.weight"
+                                        oninput="this.value = this.value.replace(/[^\d.]/g,'');"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        @change="chnageSecondVal(scope.row.seq, tableFormDataObj[scope.row.seq].secondVal, scope.$index)"
+                                        :key="key"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['AT4003']}}</span>
+                            </template>
+                        </el-table-column>
+<!--                        <el-table-column
                             prop="weight"
                             label="6MW"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -285,7 +315,7 @@
                         <el-table-column
                             prop="weight"
                             label="3MW"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -310,12 +340,12 @@
                                 </el-form-item>
                                 <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['AT2022']}}</span>
                             </template>
-                        </el-table-column>
+                        </el-table-column> -->
                         </el-table-column>
                         <el-table-column
                             prop="weight"
-                            label="12MW干熄焦"
-                            width="160px"
+                            label="15MW干熄焦"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -343,7 +373,7 @@
                         <el-table-column
                             prop="weight"
                             label="TRT发电"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -353,8 +383,8 @@
                                     <el-input clearable
                                         v-for="(itemform, key) in tableFormDataObj[scope.row.seq].weight"
                                         style="width: 100%;"
-                                        v-model="itemform['3022']"
-                                        v-if="!isNaN(Number(itemform['3022']))"
+                                        v-model="itemform['AT3022']"
+                                        v-if="!isNaN(Number(itemform['AT3022']))"
                                         refcous="true"
                                         :rules="tableFormRules.weight"
                                         oninput="this.value = this.value.replace(/[^\d.]/g,'');"
@@ -365,13 +395,13 @@
                                         <p class="error" :title="scope.error">{{ scope.error }}</p>
                                     </template>
                                 </el-form-item>
-                                <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['3022']}}</span>
+                                <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['AT3022']}}</span>
                             </template>
                         </el-table-column>
                         <el-table-column
                             prop="total"
                             label="产量合计"
-                            width="200px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
@@ -380,32 +410,32 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            width="380px"
+                            width="280px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -759,6 +789,10 @@ export default {
                 },
                 workprocid: {
                     obj: {
+                        'AT4003': {
+                            id: 'AT4003',
+                            name: '煤气机组45MW'
+                        },
                         'AT4002': {
                             id: 'AT4002',
                             name: '煤气机组40MW'
@@ -767,23 +801,27 @@ export default {
                             id: 'AT4001',
                             name: '煤气机组25MW'
                         },
-                        'AT4008': {
-                            id: 'AT4008',
-                            name: '煤气机组6MW'
-                         },
-                         'AT2022': {
-                             id: 'AT2022',
-                             name: '煤气机组3MW'
-                         },
+                        // 'AT4008': {
+                        //     id: 'AT4008',
+                        //     name: '煤气机组6MW'
+                        //  },
+                        //  'AT2022': {
+                        //      id: 'AT2022',
+                        //      name: '煤气机组3MW'
+                        //  },
                          'AT4004': {
                              id: 'AT4004',
-                             name: '12MW干熄焦'
+                             name: '15MW干熄焦'
                          },
-                        '3022': {
-                            id: '3022',
+                        'AT3022': {
+                            id: 'AT3022',
                             name: 'TRT发电'
                         }},
                     arr: [{
+                            id: 'AT4003',
+                            name: '煤气机组45MW'
+                        },
+                        {
                             id: 'AT4002',
                             name: '煤气机组40MW'
                         },
@@ -791,20 +829,20 @@ export default {
                             id: 'AT4001',
                             name: '煤气机组25MW'
                         },
-                        {
-                            id: 'AT4008',
-                            name: '煤气机组6MW'
-                        },
-                        {
-                            id: 'AT2022',
-                            name: '煤气机组3MW'
-                        },
+                        // {
+                        //     id: 'AT4008',
+                        //     name: '煤气机组6MW'
+                        // },
+                        // {
+                        //     id: 'AT2022',
+                        //     name: '煤气机组3MW'
+                        // },
                         {
                             id: 'AT4004',
-                            name: '12MW干熄焦'
+                            name: '15MW干熄焦'
                         },
                         {
-                            id: '3022',
+                            id: 'AT3022',
                             name: 'TRT发电'
                         }]
                 },
@@ -964,22 +1002,25 @@ export default {
                     weiItem = (isNaN(item['AT4008']) ? 0 : item['AT4008']);
                     lineTotal2 += Number(weiItem);
                 });
+                // that.tableData[i].weight.forEach((item, key) => {
+                //     weiItem = (isNaN(item['AT2022']) ? 0 : item['AT2022']);
+                //     lineTotal3 += Number(weiItem);
+                // });
                 that.tableData[i].weight.forEach((item, key) => {
-                    weiItem = (isNaN(item['AT2022']) ? 0 : item['AT2022']);
-                    lineTotal3 += Number(weiItem);
-                });
-                that.tableData[i].weight.forEach((item, key) => {
-                    weiItem = (isNaN(item['3022']) ? 0 : item['3022']);
+                    weiItem = (isNaN(item['AT3022']) ? 0 : item['AT3022']);
                     lineTotal5 += Number(weiItem);
                 });
                 that.tableData[i].weight.forEach((item, key) => {
                     weiItem = (isNaN(item['AT4004']) ? 0 : item['AT4004']);
                     lineTotal4 += Number(weiItem);
                 });
+                that.tableData[i].weight.forEach((item, key) => {
+                    weiItem = (isNaN(item['AT4003']) ? 0 : item['AT4003']);
+                    lineTotal3 += Number(weiItem);
+                });
             };
-            sums[index] = (index % 9 === 0) ? lineTotal5 : (
-            (index % 8 === 0) ? lineTotal4 : (index % 7 === 0) ? lineTotal3 : (
-            index % 6 === 0) ? lineTotal2 : (index % 5 === 0) ? lineTotal1 : lineTotal);
+            sums[index] = (index % 8 === 0) ? lineTotal5 : (
+            (index % 7 === 0) ? lineTotal4 : (index % 6 === 0) ? lineTotal3 : (index % 5 === 0) ? lineTotal1 : lineTotal);
             break;
             default:
             break;

+ 12 - 12
src/views/energyPlan/components/supplyAndDemand/planProjectIronMill.vue

@@ -184,7 +184,7 @@
                             prop="line"
                             label="工序"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -195,7 +195,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -205,7 +205,7 @@
                         <el-table-column
                             prop="weight"
                             label="供高线一车间方坯"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -235,7 +235,7 @@
                         <el-table-column
                             prop="weight"
                             label="供高线二车间方坯"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -265,7 +265,7 @@
                         <el-table-column
                             prop="weight"
                             label="异形坯"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -295,7 +295,7 @@
                         <el-table-column
                             prop="weight"
                             label="外销方坯"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -326,7 +326,7 @@
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
                             <span v-else>{{ scope.row.total }}</span>
@@ -334,32 +334,32 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            width="350px"
+                            width="280px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">

+ 8 - 8
src/views/energyPlan/components/supplyAndDemand/planProjectLimePowder.vue

@@ -222,7 +222,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -263,7 +263,7 @@
                         <el-table-column
                             prop="weight"
                             label="1#回转窑"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -293,7 +293,7 @@
                         <el-table-column
                             prop="weight"
                             label="2#回转窑"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -325,7 +325,7 @@
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
                             <span v-else>{{ scope.row.total }}</span>
@@ -333,26 +333,26 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column

+ 111 - 30
src/views/energyPlan/components/supplyAndDemand/planProjectMachineCoke.vue

@@ -203,7 +203,7 @@
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
@@ -217,7 +217,7 @@
                             prop="weight"
                             rowsPan="3"
                             fixed="left"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -244,7 +244,7 @@
                         <el-table-column
                             prop="weight1"
                             label="高炉用量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -271,7 +271,7 @@
                         <el-table-column
                             prop="weight2"
                             label="外销数量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -299,7 +299,7 @@
                             label="生产合计"
                             prop="subtotal"
                             fixed="left"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <template
@@ -316,7 +316,7 @@
                         <el-table-column
                             prop="weight1"
                             label="高炉用量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -343,7 +343,7 @@
                         <el-table-column
                             prop="weight2"
                             label="外销数量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -371,7 +371,7 @@
                             label="生产合计"
                             prop="subtotal"
                             fixed="left"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <template
@@ -388,7 +388,7 @@
                         ><el-table-column
                             prop="weight1"
                             label="烧结用量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -415,7 +415,7 @@
                         <el-table-column
                             prop="weight2"
                             label="外销数量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -439,18 +439,45 @@
                             </el-form-item>
                         <span v-else v-for="(item, index) in tableData[scope.row.index].weight2" :key="index">{{item['焦粉']}}</span>
                         </template></el-table-column>
+                        <el-table-column
+                            prop="weight"
+                            label="外购数量"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <el-form-item
+                                    v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'"
+                                    :prop="scope.row.seq + '.weight'"
+                            ><el-input clearable
+                                        v-for="(itemform, key) in tableFormDataObj[scope.row.seq].weight"
+                                        style="width: 100%;"
+                                        v-model="itemform['焦粉']"
+                                        v-if="!isNaN(Number(itemform['焦粉']))"
+                                        refcous="true"
+                                        oninput="this.value = this.value.replace(/[^\d.]/g,'');"
+                                        :rules="tableFormRules.weight"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        @change="chnageSecondVal(scope.row.seq, tableFormDataObj[scope.row.seq].secondVal, scope.$index)"
+                                        :key="key"
+                                ></el-input>
+                                <template slot="error" slot-scope="scope">
+                                    <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                </template>
+                            </el-form-item>
+                        <span v-else v-for="(item, index) in tableData[scope.row.index].weight" :key="index">{{item['焦粉']}}</span>
+                        </template></el-table-column>
                         <el-table-column
                             label="生产合计"
                             prop="subtotal"
                             fixed="left"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <template
                                     v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'"
                             ><span
                             v-for="(itemform, key) in tableFormDataObj[scope.row.seq].weight1" v-if="!isNaN(Number(itemform['焦粉']))"
-                            :key="key">{{ Number(itemform['焦粉']) + Number(tableData[scope.row.index].weight2[key]['焦粉']) }}</span>
+                            :key="key">{{ Number(itemform['焦粉']) + Number(tableData[scope.row.index].weight2[key]['焦粉']) - Number(tableData[scope.row.index].weight[key]['焦粉']) }}</span>
                             </template>
                         <span v-else v-for="(item, index) in tableData[scope.row.index].subtotal" :key="index">{{item['焦粉']}}</span>
                         </template></el-table-column>
@@ -461,7 +488,7 @@
                         <el-table-column
                             prop="weight1"
                             label="高炉用量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -488,7 +515,7 @@
                         <el-table-column
                             prop="weight2"
                             label="外销数量"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <el-form-item
@@ -516,7 +543,7 @@
                             label="生产合计"
                             prop="subtotal"
                             fixed="left"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                             <template
@@ -531,32 +558,32 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            width="350px"
+                            width="280px"
                             :show-overflow-tooltip="true"
                         ><template slot-scope="scope">
                                 <el-form-item
@@ -724,6 +751,21 @@
                </el-col>
        </el-row>
         <el-row>
+          <el-col :span="12">
+           <el-form-item
+                  label="外购数量"
+                  prop="weight"
+                  v-if="dialog.editorBox.form.data.productid === '焦粉'"
+                 >
+                <el-input
+                 clearable
+                 v-model="dialog.editorBox.form.data.weight"
+                 style="width: 100%;"
+                 :rules="dialog.editorBox.form.weight"
+                >
+                </el-input>
+                 </el-form-item>
+             </el-col>
             <el-col :span="12">
             <el-form-item
                    label="备注"
@@ -1066,6 +1108,7 @@ export default {
                             weight: '',
                             weight1: '',
                             weight2: '',
+                            weight3: '',
                             productid: '',
                             memo: ''
                         },
@@ -1082,6 +1125,10 @@ export default {
                                 { required: true, message: '该项不能为空', trigger: 'change' },
                                 { validator: zCheckNumber1, trigger: 'change' }
                             ],
+                            weight3: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
                             productid: [{ required: true, message: '该项不能为空', trigger: 'change' }],
                             yearmonth: [{ required: true, message: '该项不能为空', trigger: 'change' }],
                             unitid: [{ required: true, message: '该项不能为空', trigger: 'change' }],
@@ -1207,8 +1254,8 @@ export default {
                     priductIdTotal3 += Number(weiItem);
                 });
             };
-            sums[index] = (index % 16 === 0) ? priductIdTotal3 : (
-            (index % 13 === 0) ? priductIdTotal2 : (index % 10 === 0) ? priductIdTotal1 : priductIdTotal);
+            sums[index] = (index % 17 === 0) ? priductIdTotal3 : (
+            (index % 14 === 0) ? priductIdTotal2 : (index % 10 === 0) ? priductIdTotal1 : priductIdTotal);
             break;
             case 'weight1':
             priductIdTotal = 0;
@@ -1233,7 +1280,7 @@ export default {
                     priductIdTotal3 += Number(weiItem);
                 });
             };
-            sums[index] = (index % 14 === 0) ? priductIdTotal3 : (
+            sums[index] = (index % 15 === 0) ? priductIdTotal3 : (
             (index % 11 === 0) ? priductIdTotal2 : (index % 8 === 0) ? priductIdTotal1 : priductIdTotal);
             break;
             case 'weight2':
@@ -1259,9 +1306,35 @@ export default {
                         priductIdTotal3 += Number(weiItem);
                     });
                 };
-            sums[index] = (index % 15 === 0) ? priductIdTotal3 : (
+            sums[index] = (index % 16 === 0) ? priductIdTotal3 : (
             (index % 12 === 0) ? priductIdTotal2 : (index % 9 === 0) ? priductIdTotal1 : priductIdTotal);
             break;
+            case 'weight':
+            priductIdTotal = 0;
+            priductIdTotal1 = 0;
+            priductIdTotal2 = 0;
+            priductIdTotal3 = 0;
+            for (let i = 0; i < that.tableData.length; i++) {
+                    that.tableData[i].weight.forEach((item, key) => {
+                        weiItem = (isNaN(item['成品焦']) ? 0 : item['成品焦']);
+                        priductIdTotal += Number(weiItem);
+                    });
+                    that.tableData[i].weight.forEach((item, key) => {
+                        weiItem = (isNaN(item['小粒焦']) ? 0 : item['小粒焦']);
+                        priductIdTotal1 += Number(weiItem);
+                    });
+                    that.tableData[i].weight.forEach((item, key) => {
+                        weiItem = (isNaN(item['焦粉']) ? 0 : item['焦粉']);
+                        priductIdTotal2 += Number(weiItem);
+                    });
+                    that.tableData[i].weight.forEach((item, key) => {
+                        weiItem = (isNaN(item['除尘焦粉']) ? 0 : item['除尘焦粉']);
+                        priductIdTotal3 += Number(weiItem);
+                    });
+                };
+            sums[index] = (index % 13 === 0) ? priductIdTotal2 : (
+            (index % 13 === 0) ? priductIdTotal2 : (index % 9 === 0) ? priductIdTotal1 : priductIdTotal);
+            break;
             default:
             break;
             }
@@ -1353,6 +1426,7 @@ export default {
                         // weight: that.tableFormDataObj[key].weight[i][keyname],
                         weight1: that.tableFormDataObj[key].weight1[i][keyname],
                         weight2: that.tableFormDataObj[key].weight2[i][keyname],
+                        weight: that.tableFormDataObj[key].weight[i][keyname] ? '0' : that.tableFormDataObj[key].weight[i][keyname],
                         memo: memoArr[i],
                         unit: that.tableFormDataObj[key].unit,
                         parentid: that.filterForm.data.parentid,
@@ -1477,6 +1551,7 @@ export default {
                             let subtotalArr = [];
                             let weightArr1 = [];
                             let weightArr2 = [];
+                            let weightArr = [];
                             let noArr = [];
                             let memoArr = [];
                             let sumRow = 0;
@@ -1494,6 +1569,9 @@ export default {
                             weightArr2.push({
                                 [item[i].productid]: item[i].weight2
                                 });
+                            weightArr.push({
+                                [item[i].productid]: item[i].weight
+                                });
                             productidArr.push({
                                 [i]: item[i].productid
                                 });
@@ -1510,10 +1588,10 @@ export default {
                                 [i]: [i]
                             });
                             subtotalArr.push({
-                                [item[i].productid]: item[i].weight1 + item[i].weight2
+                                [item[i].productid]: item[i].weight1 + item[i].weight2 - item[i].weight
                                 });
                             // sum += item[i].weight + item[i].weight1 + item[i].weight2;
-                            sum += item[i].weight1 + item[i].weight2;
+                            sum += item[i].weight1 + item[i].weight2 - item[i].weight;
                             };
                             arr.push({
                                 seq: index,
@@ -1535,6 +1613,7 @@ export default {
                                 subtotal: subtotalArr,
                                 weight1: weightArr1,
                                 weight2: weightArr2,
+                                weight: weightArr,
                                 productid: productidArr,
                                 memo: memoLong
                             });
@@ -1743,7 +1822,7 @@ export default {
                 // 取消选择时赋初始值
                 for (let weiIndex in that.tableData[item.seq].weight1) {
                     for (let weiKey in that.tableData[item.seq].weight1[weiIndex]) {
-                        // that.tableData[item.seq].weight[weiIndex][weiKey] = that.originalData[item.seq].weight[weiIndex][weiKey];
+                        that.tableData[item.seq].weight[weiIndex][weiKey] = that.originalData[item.seq].weight[weiIndex][weiKey];
                         that.tableData[item.seq].weight1[weiIndex][weiKey] = that.originalData[item.seq].weight1[weiIndex][weiKey];
                         that.tableData[item.seq].weight2[weiIndex][weiKey] = that.originalData[item.seq].weight2[weiIndex][weiKey];
                     }
@@ -1862,8 +1941,9 @@ export default {
                                 for (let keyname in that.tableFormDataObj[key].weight1[i]) {
                                     SubmitData.push({
                                     // weight: that.tableFormDataObj[key].weight[i][keyname],
-                                    weight1: that.tableFormDataObj[key].weight1[i][keyname],
-                                    weight2: that.tableFormDataObj[key].weight2[i][keyname],
+                                    weight1: that.tableFormDataObj[key].weight1[i][keyname] ? that.tableFormDataObj[key].weight1[i][keyname] : '0',
+                                    weight2: that.tableFormDataObj[key].weight2[i][keyname] ? that.tableFormDataObj[key].weight2[i][keyname] : '0',
+                                    weight: that.tableFormDataObj[key].weight[i][keyname] ? that.tableFormDataObj[key].weight[i][keyname] : '0',
                                     no: that.tableFormDataObj[key].no[i][i],
                                     memo: memoArr[i],
                                     cjsj: that.tableFormDataObj[key].cjsj,
@@ -1913,6 +1993,7 @@ export default {
                 // weight: that.dialog.editorBox.form.data.weight,
                 weight1: that.dialog.editorBox.form.data.weight1,
                 weight2: that.dialog.editorBox.form.data.weight2,
+                weight: that.dialog.editorBox.form.data.weight,
                 unit: that.dialog.editorBox.form.data.unitid,
                 line: that.dialog.editorBox.form.data.line,
                 parentid: that.filterForm.data.parentid,
@@ -2078,7 +2159,7 @@ export default {
             let that = this;
             for (let weiIndex in item.weight1) {
                 for (let weiKey in item.weight1[weiIndex]) {
-                    result += Number(item.weight1[weiIndex][weiKey]) + Number(item.weight2[weiIndex][weiKey]);
+                    result += Number(item.weight1[weiIndex][weiKey]) + Number(item.weight2[weiIndex][weiKey]) - Number(item.weight[weiIndex][weiKey]);
                 }
             }
             return result;

+ 11 - 11
src/views/energyPlan/components/supplyAndDemand/planProjectPuddling.vue

@@ -176,7 +176,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -186,7 +186,7 @@
                         <el-table-column
                             prop="weight"
                             label="1#高炉"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -216,7 +216,7 @@
                         <el-table-column
                             prop="weight"
                             label="2#高炉"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -246,7 +246,7 @@
                         <el-table-column
                             prop="weight"
                             label="3#高炉"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -276,7 +276,7 @@
                         <el-table-column
                             prop="weight"
                             label="4#高炉"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -307,7 +307,7 @@
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="160px"
+                            width="80px"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
                             <span v-else>{{ scope.row.total }}</span>
@@ -315,32 +315,32 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            width="350px"
+                            width="280px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">

+ 59 - 5
src/views/energyPlan/components/supplyAndDemand/planProjectRoundGx.vue

@@ -239,6 +239,20 @@
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
+                            prop="tag"
+                            label="订单类型"
+                            align="center"
+                            width="88px"
+                            :show-overflow-tooltip="true"
+                        >
+                         <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
                         sortable
                             prop="planweight"
                             label="计划量"
@@ -397,6 +411,20 @@
                                  </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
+                                    prop="tag"
+                                    align="center"
+                                    label="订单类型"
+                                    min-width="70px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                                 </template>
+                                </el-table-column>
+                                <el-table-column
                                 sortable
                                     prop="grades"
                                     label="钢种"
@@ -1005,6 +1033,28 @@ export default {
                             name: '钢丝、弹簧'
                         }
                     ]
+                },
+                tag: {
+                    obj: {
+                        '0': {
+                            name: '正常',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '应急',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '正常'
+                        },
+                        {
+                            id: '1',
+                            name: '应急'
+                        }
+                    ]
                 }
             },
             loading: false,
@@ -1279,7 +1329,8 @@ export default {
                                 planweight: item.PLANWEIGHT,
                                 dimension: item.DIMENSION,
                                 kxf_weight: item.PLANWEIGHT - item.YXF_WEIGHT,
-                                yxf_weight: item.YXF_WEIGHT
+                                yxf_weight: item.YXF_WEIGHT,
+                                tag: item.TAG ? item.TAG : '0'
                             })
                         }
                         that.leftTableData = arr;
@@ -1299,7 +1350,7 @@ export default {
             if (that.leftTableShow == true){
                that.getTableDetailDatas(that.pageNum);
             } else {
-               that.getTableDetailAsRadio(that.pageNum) 
+               that.getTableDetailAsRadio(that.pageNum)
             }
         },
         // 改变表格显示条数
@@ -1350,7 +1401,8 @@ export default {
                     deliveryDate: item.deliveryDate,
                     sqno: item.sqno,
                     workprocType: item.workprocType,
-                    auditState: item.auditState
+                    auditState: item.auditState,
+                    tag: item.tag ? item.tag : '0'
                  });
                     }
                     that.rightTableData = arr;
@@ -1463,7 +1515,8 @@ export default {
                     sqno: item.sqno,
                     updatetime: item.updatetime,
                     workprocType: item.workprocType,
-                    auditState: item.auditState
+                    auditState: item.auditState,
+                    tag: item.tag
                  });
                     }
                     that.rightTableData = arr;
@@ -2028,7 +2081,8 @@ export default {
                         planweight: that.tableFormDataObj[key].planweight,
                         createTime: that.tableFormDataObj[key].createtime,
                         deliveryDate: that.tableFormDataObj[key].deliveryDate,
-                        auditState: '0'
+                        auditState: '0',
+                        tag: that.tableFormDataObj[key].tag ? that.tableFormDataObj[key].tag : '0'
                   })
 				  }
                     that.loading = true;

+ 65 - 10
src/views/energyPlan/components/supplyAndDemand/planProjectRoundLG.vue

@@ -232,7 +232,21 @@
                                 min-width="72px"
                                 :show-overflow-tooltip="true"
                             >
-                            </el-table-column>
+                          </el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="tag"
+                            label="订单类型"
+                            align="center"
+                            width="88px"
+                            :show-overflow-tooltip="true"
+                        >
+                        <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                        </template>
+                        </el-table-column>
                         <el-table-column
                         sortable
                             prop="planweight"
@@ -373,6 +387,20 @@
                                  </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
+                                    prop="tag"
+                                    align="center"
+                                    label="订单类型"
+                                    min-width="70px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                                 </template>
+                                </el-table-column>
+                                <el-table-column
                                 sortable
                                     prop="grades"
                                     label="钢种"
@@ -559,10 +587,10 @@
                                <el-form-item
                                 v-if ="filterForm.cf"
                                >
-                                 <el-popover 
+                                 <el-popover
                                 trigger="click"
-                                :ref="'popover-' + scope.row.roundid"  
-                                placement="top" 
+                                :ref="'popover-' + scope.row.roundid"
+                                placement="top"
                                 width="400"
                                 @show="gethxcfDate(scope.row)">
                                         <el-table
@@ -1032,6 +1060,28 @@ export default {
                             name: '铁丝'
                         }
                     ]
+                },
+                tag: {
+                    obj: {
+                        '0': {
+                            name: '正常',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '应急',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '正常'
+                        },
+                        {
+                            id: '1',
+                            name: '应急'
+                        }
+                    ]
                 }
             },
             loading: false,
@@ -1340,7 +1390,8 @@ export default {
                                 deliveryDate: item.DELIVERYDATE,
                                 dimension: item.DIMENSION,
                                 kxf_weight: item.PLANWEIGHT - item.YXF_WEIGHT,
-                                yxf_weight: item.YXF_WEIGHT
+                                yxf_weight: item.YXF_WEIGHT,
+                                tag: item.TAG ? item.TAG : '0'
                             })
                         }
                         that.leftTableData = arr;
@@ -1360,7 +1411,7 @@ export default {
             if (that.leftTableShow == true){
                that.getTableDetailDatas(that.pageNum);
             } else {
-               that.getTableDetailAsRadio(that.pageNum) 
+               that.getTableDetailAsRadio(that.pageNum)
             }
         },
         // 改变表格显示条数
@@ -1411,7 +1462,8 @@ export default {
                     workprocType: item.workprocType,
                     lengths: item.lengths,
                     surfaceStandard: item.surfaceStandard,
-                    goinfo: item.goinfo
+                    goinfo: item.goinfo,
+                    tag: item.tag ? item.tag : '0'
                  });
                     }
                     that.rightTableData = arr;
@@ -1497,7 +1549,8 @@ export default {
                     workprocType: item.workprocType,
                     lengths: item.lengths,
                     surfaceStandard: item.surfaceStandard,
-                    goinfo: item.goinfo
+                    goinfo: item.goinfo,
+                    tag: item.tag
                  });
                     }
                     that.rightTableData = arr;
@@ -1971,7 +2024,8 @@ export default {
             let SubmitData = {
                 jhTime: that.dialog.editorBox.form.data.may,
                 planWeight: that.dialog.editorBox.form.data.planWeight,
-                workprocType: that.filterForm.data.workproc_type
+                workprocType: that.filterForm.data.workproc_type,
+                tag: '0'
             };
             that.$refs['dialog_form'].validate((valid) => {
                if (valid) {
@@ -2105,7 +2159,8 @@ export default {
                         lengths: that.tableFormDataObj[key].lengths,
                         goinfo: that.tableFormDataObj[key].id.substring(0, 1) === 'G' ? '1036WM1' : null,
                         surfaceStandard: that.tableFormDataObj[key].surfaceStandard,
-                        type: type
+                        type: type,
+                        tag: that.tableFormDataObj[key].tag ? that.tableFormDataObj[key].tag : '0'
                   })
                   }
                     that.loading = true;

+ 59 - 5
src/views/energyPlan/components/supplyAndDemand/planProjectRoundXG.vue

@@ -246,6 +246,20 @@
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
+                                    prop="tag"
+                                    label="订单类型"
+                                    align="center"
+                                    width="88px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                 <template slot-scope="scope">
+                                        <span
+                                            :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                        >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                                </template>
+                                </el-table-column>
+                                <el-table-column
                                 sortable
                                     prop="planweight"
                                     label="计划量"
@@ -390,6 +404,20 @@
                                  </template>
                                 </el-table-column>
                                 <el-table-column
+                                sortable
+                                    prop="tag"
+                                    align="center"
+                                    label="订单类型"
+                                    min-width="70px"
+                                    :show-overflow-tooltip="true"
+                                >
+                                <template slot-scope="scope">
+                                <span
+                                    :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
+                                >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
+                                 </template>
+                                </el-table-column>
+                                <el-table-column
                                 sortable
                                     prop="grades"
                                     label="钢种"
@@ -1024,6 +1052,28 @@ export default {
                             name: '铁丝'
                         }
                     ]
+                },
+                tag: {
+                    obj: {
+                        '0': {
+                            name: '正常',
+                            color: '#7a7a7a'
+                        },
+                        '1': {
+                            name: '应急',
+                            color: 'red'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '正常'
+                        },
+                        {
+                            id: '1',
+                            name: '应急'
+                        }
+                    ]
                 }
             },
             loading: false,
@@ -1366,7 +1416,8 @@ export default {
                                 planweight: item.PLANWEIGHT,
                                 dimension: item.DIMENSION,
                                 kxf_weight: item.PLANWEIGHT - item.YXF_WEIGHT,
-                                yxf_weight: item.YXF_WEIGHT
+                                yxf_weight: item.YXF_WEIGHT,
+                                tag: item.TAG ? item.TAG : '0'
                             })
                         }
                         that.leftTableData = arr;
@@ -1386,7 +1437,7 @@ export default {
             if (that.leftTableShow == true){
                that.getTableDetailDatas(that.pageNum);
             } else {
-               that.getTableDetailAsRadio(that.pageNum) 
+               that.getTableDetailAsRadio(that.pageNum)
             }
         },
         // 改变表格显示条数
@@ -1438,7 +1489,8 @@ export default {
                     lengthTimesWidth: item.lengthTimesWidth,
                     dimension: item.dimension,
                     iateralArea: item.iateralArea,
-                    lengths: item.lengths
+                    lengths: item.lengths,
+                    tag: item.tag ? item.tag : '0'
                  });
                     }
                     that.rightTableData = arr;
@@ -1500,7 +1552,8 @@ export default {
                     lengthTimesWidth: item.lengthTimesWidth,
                     dimension: item.dimension,
                     iateralArea: item.iateralArea,
-                    lengths: item.lengths
+                    lengths: item.lengths,
+                    tag: item.tag
                  });
                     }
                     that.rightTableData = arr;
@@ -2115,7 +2168,8 @@ export default {
                         planweight: that.tableFormDataObj[key].planweight,
                         iateralArea: that.tableFormDataObj[key].iateralArea,
                         lengths: that.tableFormDataObj[key].lengths,
-                        type: type
+                        type: type,
+                        tag: that.tableFormDataObj[key].tag ? that.tableFormDataObj[key].tag : '0'
                   })
                   }
                     that.loading = true;

+ 11 - 11
src/views/energyPlan/components/supplyAndDemand/planProjectSinter.vue

@@ -185,7 +185,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -197,7 +197,7 @@
                         <el-table-column
                             prop="weight"
                             label="1#烧结"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -227,7 +227,7 @@
                         <el-table-column
                             prop="weight"
                             label="2#烧结"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -257,7 +257,7 @@
                                 prop="subtotal"
                                 label="小计"
                                 fixed="left"
-                                width="100px"
+                                width="80px"
                             ><template slot-scope="scope">
                                 <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSubSum(scope.row) }}</span>
                                 <span v-else>{{ scope.row.subtotal }}</span>
@@ -268,7 +268,7 @@
                         <el-table-column
                             prop="weight"
                             label="3#烧结"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -299,7 +299,7 @@
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="120px"
+                            width="80px"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
                             <span v-else>{{ scope.row.total }}</span>
@@ -307,32 +307,32 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            width="350px"
+                            width="280px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">

+ 10 - 10
src/views/energyPlan/components/supplyAndDemand/planProjectSteelRolling.vue

@@ -185,7 +185,7 @@
                             fixed="left"
                             prop="unit"
                             label="计量单位"
-                            width="100px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
@@ -195,7 +195,7 @@
                         <el-table-column
                             prop="weight"
                             label="一高线"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -225,7 +225,7 @@
                         <el-table-column
                             prop="weight"
                             label="二高线"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -255,7 +255,7 @@
                         <el-table-column
                             prop="weight"
                             label="型钢"
-                            width="120px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">
@@ -286,7 +286,7 @@
                             prop="total"
                             label="合计产量"
                             fixed="left"
-                            width="140px"
+                            width="80px"
                         ><template slot-scope="scope">
                             <span v-if="!isCheck && scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
                             <span v-else>{{ scope.row.total }}</span>
@@ -294,32 +294,32 @@
                         <el-table-column
                             prop="cjsj"
                             label="创建时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="cjr"
                             label="创建人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                          <el-table-column
                             prop="xgsj"
                             label="修改时间"
-                            width="220px"
+                            width="160px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
                             prop="xgr"
                             label="修改人"
-                            width="160px"
+                            width="80px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                             prop="memo"
                             label="备注"
-                            width="350px"
+                            width="280px"
                             :show-overflow-tooltip="true"
                         >
                             <template slot-scope="scope">

+ 7 - 0
src/views/energyPlan/router/index.js

@@ -55,6 +55,8 @@ import planProjectCBD from '../components/supplyAndDemand/planProjectCBD.vue'
 import planProjectAudit from '../components/supplyAndDemand/planProjectAudit.vue'
 // 销售订单重量调整 H:\湖南视拓\安泰能源项目\xt-ems-front\src\views\energyPlan\components\supplyAndDemand\weightAdjustment.vue
 import weightAdjustment from '../components/supplyAndDemand/weightAdjustment.vue'
+// 销售订单重量调整 H:\湖南视拓\安泰能源项目\xt-ems-front\src\views\energyPlan\components\supplyAndDemand\planProjectCleanCoal.vue
+import planProjectCleanCoal from '../components/supplyAndDemand/planProjectCleanCoal.vue'
 
 Vue.use(Router)
 export default new Router({
@@ -190,6 +192,11 @@ export default new Router({
                 path: 'weightAdjustment',
                 name: 'weightAdjustment',
                 component: weightAdjustment
+            },
+            {
+                path: 'planProjectCleanCoal',
+                name: 'planProjectCleanCoal',
+                component: planProjectCleanCoal
             }
         ]
     }]