Browse Source

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

QuietShadow 3 years ago
parent
commit
754656d75c

+ 39 - 19
src/views/basicInformation/components/measurementPlace.vue

@@ -89,20 +89,20 @@
                     </el-row>
                     <el-row>
                         <el-col :span="6">
-                            <el-form-item label="位置">
+                            <el-form-item label="工序">
                                 <el-select
                                     filterable clearable
-                                    v-model="filterForm.data.locateid"
-                                    placeholder="位置"
+                                    v-model="filterForm.data.costid"
+                                    placeholder="工序"
                                     multiple
                                     collapse-tags
                                     style="width: 100%;"
                                 >
                                     <el-option
-                                        v-for="item of nameObj.locateid.arr"
-                                        :key="item.id"
-                                        :value="item.id"
-                                        :label="item.name"
+                                      v-for="item of nameObj.workprocid.arr"
+                                      :key="item.id"
+                                      :value="item.id"
+                                      :label="item.name"
                                     ></el-option>
                                 </el-select>
                             </el-form-item>
@@ -165,6 +165,25 @@
                                 </el-select>
                             </el-form-item>
                         </el-col> -->
+                        <el-col :span="6">
+                            <el-form-item label="位置">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.locateid.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="TAG点别名">
                                 <el-input clearable
@@ -195,18 +214,6 @@
                                 ></el-input>
                             </el-form-item>
                         </el-col>
-                        <el-col :span="6">
-                            <el-form-item label="公式版本">
-                                <el-date-picker
-                                    type="month"
-                                    v-model="filterForm.data.version"
-                                    placeholder="公式版本"
-                                    style="width: 100%;"
-                                    format="yyyyMM"
-                                    value-format="yyyyMM00"
-                                ></el-date-picker>
-                            </el-form-item>
-                        </el-col>
                     </el-row>
                     <!-- <div style="text-align: right;margin-bottom: 13px;">
                     </div> -->
@@ -324,6 +331,17 @@
                             <span>{{ nameObj.itemtype.obj[scope.row.itemtype] ? nameObj.itemtype.obj[scope.row.itemtype] : scope.row.itemtype }}</span>
                         </template>
                     </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="costid"
+                        label="工序"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.workprocid.obj[scope.row.costid] ? nameObj.workprocid.obj[scope.row.costid] : scope.row.costid }}</span>
+                        </template>
+                    </el-table-column>
                     <el-table-column
                         sortable
                         prop="locateid"
@@ -1184,6 +1202,7 @@ export default {
                     itemid: '',
                     itemname: '',
                     networkid: '',
+                    costid: '',
                     hierarchy: '',
                     tagAlias: '',
                     version: formatDate(new Date(), 'yyyyMM00'),
@@ -1691,6 +1710,7 @@ export default {
                     itemid: that.filterForm.data.itemid,
                     itemname: that.filterForm.data.itemname,
                     networkid: that.filterForm.data.networkid.join(','),
+                    costid: that.filterForm.data.costid.join(','),
                     node: that.filterForm.data.hierarchy,
                     tagAlias: that.filterForm.data.tagAlias,
                     version: that.filterForm.data.version,

+ 769 - 0
src/views/energyBalance/components/foldvalue.vue

@@ -0,0 +1,769 @@
+<template>
+<!-- 折算系数维护 -->
+    <div class="sourcecode">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-row>
+                        <!-- <el-col :span="6">
+                            <el-form-item label="能介" label-width="40px">
+                                <el-select
+                                filterable clearable
+                                multiple
+                                collapse-tags
+                                    v-model="filterForm.data.energyid"
+                                    placeholder=""
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.energyid.arr"
+                                        :key="item.id"
+                                        :value="item.name"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col> -->
+                        <el-col :span="6">
+                            <el-form-item label="公式版本">
+                                <el-date-picker
+                                    v-model="filterForm.data.clock"
+                                    type="date"
+                                    placeholder=""
+                                    style="width: 100%;"
+                                    value-format="yyyyMMdd"
+                                ></el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="能介编码">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.energyid"
+                                    placeholder="能介编码"
+                                    style="width: 100%;"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-save"
+                        @click="but_more()"
+                    >保存</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</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>
+                </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">
+                    >
+                        <el-table-column
+                            sortable
+                            type="selection"
+                            width="40"
+                            align="center"
+                            fixed="left"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                            prop="id"
+                            width="40"
+                            align="center"
+                            fixed="left"
+                            v-if="filterForm.id_show"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="materialsource"
+                            label="物料来源"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        >
+                         <template slot-scope="scope">
+                              <span>{{ nameObj.materialsource.obj[scope.row.materialsource] ? nameObj.materialsource.obj[scope.row.materialsource].name : scope.row.materialsource }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="energyid"
+                            label="能介编码"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            :sort-by="function(row, index) { return sortFoo(row, index, 'energyid') }"
+                            prop="energyname"
+                            label="能介名称"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.energyid.obj[scope.row.energyid] ? nameObj.energyid.obj[scope.row.energyid] : scope.row.energyid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="clock"
+                            label="公式版本"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="code"
+                            label="折标值"
+                            width="125px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.id + '.code'"
+                                    :rules="dialog.editorBox.form.rules.sourcecode"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.id].code"
+                                        refcous="true"
+                                    ></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.code}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="unitid"
+                            label="单位"
+                            width="145px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.id + '.unitid'"
+                                    :rules="dialog.editorBox.form.rules.unitid"
+                                >
+                                    <el-select
+                                        filterable
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.id].unitid"
+                                    >
+                                        <el-option
+                                            v-for="item of nameObj.unitid.arr"
+                                            :key="item.id"
+                                            :value="item.id"
+                                            :label="item.name"
+                                        ></el-option>
+                                    </el-select>
+                                </el-form-item>
+                                <span v-else>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="description"
+                            label="描述"
+                            width="180px"
+                            :show-overflow-tooltip="true"
+                        >
+                        <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.id + '.description'"
+                                    :rules="dialog.editorBox.form.rules.description"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.id].description"
+                                        refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.description}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            min-width="150px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.id + '.bz'"
+                                    :rules="dialog.editorBox.form.rules.bz"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.id].bz"
+                                        refcous="true"
+                                    ></el-input>
+                                </el-form-item>
+                                <span v-else>{{scope.row.bz}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="revisor"
+                            label="修改人"
+                            width="80px"
+                            :show-overflow-tooltip="true">
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="revisetime"
+                            label="修改时间"
+                            width="125px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <!-- <el-table-column
+                            class-name="gn-TableDownloadExcel-none"
+                            label="操作"
+                            align="center"
+                            width="75px"
+                            fixed="right"
+                        >
+                            <template slot-scope="scope">
+                                <div>
+                                    <el-button
+                                        type="primary"
+                                        size="mini"
+                                        v-privilege="activeMenu + 'PUT'"
+                                        @click="but_edit(scope.row)"
+                                    >修改</el-button>
+                                </div>
+                            </template>
+                        </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="'折算系数信息 - ' + (dialog.editorBox.type === 'add' ? '新增' : '修改')"
+            :visible.sync="dialog.editorBox.show"
+            width="300px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <el-form
+                    ref="dialog_form"
+                    :model="dialog.editorBox.form.data"
+                    :rules="dialog.editorBox.form.rules"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-form-item label="折算系数" prop="sourcecode">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.sourcecode"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="描述" prop="description">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.description"
+                            disabled
+                        ></el-input>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="dialog.editorBox.show = false" :loading="loading">取 消</el-button>
+                <el-button
+                    type="primary"
+                    @click="dataSave"
+                    :loading="loading"
+                >保 存</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '@/utils/validator.js'
+import { formatDate } from '@/utils/util.js';
+export default {
+    name: 'sourcecode',
+    data () {
+        return {
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                id_show: false,
+                data: {
+                    code: '',
+                    energyid: '',
+                    timegranid: 'MONTH',
+                    clock: formatDate(new Date(), 'yyyyMMdd')
+                },
+                rules: {
+                }
+            },
+            pageNum: 1,
+            pageSize: 50,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [
+                // {
+                //     energyid: '液化石油气',
+                //     clock: '20180400000000',
+                //     sourcecode: '1427',
+                //     description: '液化石油气'
+                // }
+            ],
+            tableFormDataObj: {},
+            nameObj: {
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                materialsource: {
+                    obj: {
+                        '1011GL1': {
+                           name: '一体系1780高炉'
+                        },
+                        '1011GL2': {
+                           name: '二体系1#1250高炉'
+                        },
+                        '1011GL3': {
+                           name: '二体系2#1250高炉'
+                        },
+                        '1011JH1': {
+                          name: '一焦化'
+                        },
+                        '1011JH2': {
+                          name: '二焦化'
+                        },
+                        '1011LG1': {
+                          name: '一炼钢'
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '1011GL1',
+                            name: '一体系1780高炉'
+                        },
+                        {
+                            id: '1011GL2',
+                            name: '二体系1#1250高炉'
+                        },
+                        {
+                            id: '1011GL3',
+                            name: '二体系2#1250高炉'
+                        },
+                        {
+                            id: '1011JH1',
+                            name: '一焦化'
+                        },
+                        {
+                            id: '1011JH2',
+                            name: '二焦化'
+                        },
+                        {
+                            id: '1011LG1',
+                            name: '一炼钢'
+                        }
+                    ]
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        data: {
+                            id: '',
+                            energyid: '',
+                            clock: '',
+                            sourcecode: '',
+                            description: '',
+                            tablename: '',
+                            analyzecode: '',
+                            isavailable: '',
+                            revisetime: '',
+                            revisor: ''
+                        },
+                        rules: {
+                            sourcecode: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ]
+                        }
+                    }
+                }
+            },
+            multipleSelection: []
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    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);
+        });
+        that.getEnergyIdData();
+        that.getTableData();
+        that.getUnitIdData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 获取标准计量单位
+        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;
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 用于表格特殊列的过滤方法(:sort-by="function(row, index) { return sortFoo() }")
+        sortFoo (row, index, objName, name) {
+            name = name || objName;
+            let s = this.nameObj[objName].obj[row[name]] ? this.nameObj[objName].obj[row[name]] : row[name];
+            return s;
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    energyid: that.filterForm.data.energyid,
+                    clock: that.filterForm.data.clock
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/foldthevaluess/getDateForPage?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                id: item.ID,
+                                energyid: item.ENERGYID,
+                                energyname: item.ENERGYNAME,
+                                clock: item.CLOCK,
+                                description: item.DESCRIPTION,
+                                code: item.CODE,
+                                isavailable: item.ISAVAILABLE,
+                                revisetime: item.REVISETIME,
+                                materialsource: item.MATERIALSOURCE,
+                                revisor: item.REVISOR,
+                                unitid: item.UNITID,
+                                bz: item.BZ
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            that.filterForm.data.code = '';
+            that.filterForm.data.energyid = '';
+            that.filterForm.data.timegranid = '';
+            that.filterForm.data.clock = '';
+            that.getTableData(1);
+        },
+        but_edit (row) {
+            let that = this;
+            for (let key in that.dialog.editorBox.form.data) {
+                if (typeof row[key] !== 'undefined') {
+                    that.dialog.editorBox.form.data[key] = row[key];
+                } else {
+                    console.log(key);
+                }
+            }
+            that.dialog.editorBox.type = 'edit';
+            that.dialog.editorBox.show = true;
+        },
+        but_more () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (var name in that.tableFormDataObj) {
+                            SubmitData.push({
+                                id: that.tableFormDataObj[name].id,
+                                code: that.tableFormDataObj[name].code,
+                                clock: that.tableFormDataObj[name].clock,
+                                sourcecode: that.tableFormDataObj[name].sourcecode,
+                                analyzecode: that.tableFormDataObj[name].analyzecode,
+                                description: that.tableFormDataObj[name].description,
+                                isavailable: that.tableFormDataObj[name].isavailable,
+                                materialsource: that.tableFormDataObj[name].materialsource,
+                                revisor: that.tableFormDataObj[name].revisor,
+                                revisetime: that.tableFormDataObj[name].revisetime,
+                                materialno: that.tableFormDataObj[name].materialno,
+                                unitid: that.tableFormDataObj[name].unitid,
+                                bz: that.tableFormDataObj[name].bz
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/foldthevaluess/', 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 {
+                        that.$message.error('请输入正确的折标系数');
+                    }
+                });
+            }
+        },
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                id: that.dialog.editorBox.form.data.id,
+                code: that.dialog.editorBox.form.data.energyid,
+                clock: that.dialog.editorBox.form.data.clock,
+                sourcecode: that.dialog.editorBox.form.data.sourcecode,
+                tablename: that.dialog.editorBox.form.data.tablename,
+                analyzecode: that.dialog.editorBox.form.data.analyzecode,
+                description: that.dialog.editorBox.form.data.description,
+                isavailable: that.dialog.editorBox.form.data.isavailable,
+                revisetime: that.dialog.editorBox.form.data.revisetime,
+                revisor: that.dialog.editorBox.form.data.revisor,
+                bz: that.dialog.editorBox.form.data.bz
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/formulas/updateMula/' + SubmitData.id, 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;
+                            });
+                    // }
+                }
+            });
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.id;
+                if (that.tableFormDataObj[xId]) {
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            this.multipleSelection = val;
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.sourcecode {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                // margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+    }
+    .el-table__body .el-form-item--mini.el-form-item {
+        margin: 0px;
+        .error {
+            overflow: hidden;
+            color: #f56c6c;
+            font-size: 12px;
+            line-height: 1;
+        }
+    }
+}
+</style>

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

@@ -16,6 +16,8 @@ import balanceData from '@/views/energyBalance/components/balanceData.vue'
 import balanceSheetData from '@/views/energyBalance/components/balanceSheetData.vue'
 // 工序与原材料数据维护
 import processAndRawMaterials from '@/views/energyBalance/components/processAndRawMaterials.vue'
+// 折标值信息维护
+import foldvalue from '@/views/energyBalance/components/foldvalue.vue'
 
 Vue.use(Router)
 
@@ -57,6 +59,11 @@ export default new Router({
                 path: 'balanceData',
                 name: 'balanceData',
                 component: balanceData
+            },
+            {
+                path: 'foldvalue',
+                name: 'foldvalue',
+                component: foldvalue
             }
         ]
     }]

+ 1 - 0
src/views/energyOperationSupport/components/startStopDocuments/SSDApproval.vue

@@ -315,6 +315,7 @@
                         <el-col :span="8">
                             <el-form-item label="编制时间" prop="creattime">
                                 <el-date-picker
+                                    value-format="yyyy-MM-dd HH:mm:ss"
                                     type="datetime"
                                     v-model="dialog.editorBox.form.data.creattime"
                                     placeholder=""

+ 0 - 9
src/views/energyPlan/components/supplyAndDemand/planProjectAudit.vue

@@ -381,10 +381,6 @@ export default {
                         '3': {
                             name: '已接收',
                             color: 'red'
-                        },
-                        '4': {
-                            name: '审核失败',
-                            color: 'red'
                         }
                     },
                     arr: [
@@ -402,11 +398,6 @@ export default {
                             id: '3',
                             name: '已接收',
                             color: 'red'
-                        },
-                        {
-                            id: '4',
-                            name: '审核失败',
-                            color: 'red'
                         }
                     ]
                 },

+ 0 - 8
src/views/energyPlan/components/supplyAndDemand/planProjectCBD.vue

@@ -1015,10 +1015,6 @@ export default {
                         '3': {
                             name: '已接收',
                             color: 'red'
-                        },
-                        '4': {
-                            name: '审核失败',
-                            color: 'red'
                         }
                     },
                     arr: [
@@ -1037,10 +1033,6 @@ export default {
                         {
                             id: '3',
                             name: '已接收'
-                        },
-                        {
-                            id: '4',
-                            name: '审核失败'
                         }
                     ]
                 },

+ 93 - 58
src/views/energyPlan/components/supplyAndDemand/planProjectRoundGx.vue

@@ -32,14 +32,14 @@
                     </el-row>
                 </el-form>
                <div class="box-top-gjl">
-                        <el-button
+                        <!-- <el-button
                             class="button"
                             type="primary"
                             size="mini"
                             icon="el-icon-plus"
                             v-privilege="activeMenu + 'ADD'"
                             @click="but_addNBJH()"
-                        >新增内部计划</el-button>
+                        >新增内部计划</el-button> -->
                         <el-button
                             class="button"
                             type="primary"
@@ -47,8 +47,14 @@
                             icon="el-icon-plus"
                             v-privilege="activeMenu + 'ADD'"
                             @click="but_add(1)"
-                        >新增子计划</el-button>
-                    <div style="float:right; text-align: right;">
+                        >新增计划</el-button>
+                     <div style="float:right; text-align: right;">
+                        <el-button
+                        type="danger"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="edit_plural()"
+                    >强制修改</el-button>
                         <el-button
                         type="primary"
                         size="mini"
@@ -61,7 +67,7 @@
                         size="mini"
                         icon="el-icon-add-outline"
                         @click="but_edit_plural()"
-                    >修改</el-button>
+                    >保存</el-button>
                     <el-button
                         type="primary"
                         size="mini"
@@ -88,13 +94,6 @@
                         @click="but_del_plural()"
                     >删除</el-button>
                     <el-button
-                    type="primary"
-                    size="mini"
-                    icon="el-icon-search"
-                    v-privilege="activeMenu + 'QUERY'"
-                    @click="getTableData(1)"
-                    >查询</el-button>
-                    <el-button
                     size="mini"
                     :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
                     :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
@@ -130,8 +129,9 @@
                                 :summary-method="getSummaries"
                                 @current-change="getTableDetailData"
                                 @selection-change="handleSelectionChangeAsleft"
+                                @row-click="openDetails"
                             >
-                            <el-table-column
+                            <!-- <el-table-column
                             sortable
                             type="selection"
                             width="40"
@@ -141,13 +141,13 @@
                             :selectable="checkboxTLeft"
                             fixed="left"
                             class-name="cnspicuous"
-                        ></el-table-column>
+                        ></el-table-column> -->
                         <el-table-column
                            sortable
                             prop="id"
                             label="编号"
                             fixed="left"
-                            width="118px"
+                            width="141px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
@@ -155,7 +155,7 @@
                             prop="jhTime"
                             label="排产日期"
                             align="center"
-                            width="76px"
+                            width="95px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
@@ -266,7 +266,7 @@
                                 prop="roundid"
                                 label="编号"
                                 fixed="left"
-                                min-width="127px"
+                                min-width="141px"
                                 v-model="filterForm.data.sqno"
                                 :show-overflow-tooltip="true"
                             ></el-table-column>
@@ -485,7 +485,6 @@
                                 <template slot-scope="scope">
                                    <el-form-item
                                    :prop="scope.row.seq + '.chemicalStandard'"
-                                   :rules="tableFormRules.chemicalStandard"
                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
                                   >
                                     <el-select
@@ -800,9 +799,11 @@ export default {
             leftTableLoading: false,
             leftTableWidth: 550,
             difference: 0,
-             rightTableData: [],
+            rightTableData: [],
             rightTableObj: {
             },
+            leftData: {
+            },
             multipleSelection: [],
             multipleSelectionAscLeft: [],
             tableFormDataObj: {},
@@ -1295,7 +1296,7 @@ export default {
             let params = {};
             if (type === 'Add') {
             params = {
-            parentid: that.multipleSelectionAscLeft[0].id
+            parentid: that.leftData.id
            };
             } else {
             params = {
@@ -1480,6 +1481,7 @@ export default {
                                         type: 'success'
                                     });
                                      that.getTableDetailDatas();
+                                     that.getStandards();
                                 } else {
                                     that.$message.error(res.message);
                                 }
@@ -1494,6 +1496,56 @@ export default {
                 this.$message.error('至少要选择一条数据');
             }
         },
+        edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                        let SubmitData = [];
+                        for (let key in that.rightTableObj) {
+                            SubmitData.push({
+                                parentid: that.rightTableObj[key].parentid,
+                                may: that.rightTableObj[key].may,
+                                describe: that.rightTableObj[key].describe,
+                                state: that.rightTableObj[key].state,
+                                grades: that.rightTableObj[key].grades,
+                                planWeight: that.rightTableObj[key].planWeight,
+                                specifications: that.rightTableObj[key].specifications,
+                                transportType: that.rightTableObj[key].transportType,
+                                workprocType: that.rightTableObj[key].workprocType,
+                                purpose: that.rightTableObj[key].purpose,
+                                chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                                memo: that.rightTableObj[key].memo,
+                                id: that.rightTableObj[key].roundid,
+                                sqno: that.rightTableObj[key].sqno,
+                                createman: that.rightTableObj[key].createman,
+                                createtime: that.rightTableObj[key].createtime
+                            });
+                        }
+                                that.loading = true;
+                                that.$confirm('确定要强制修改数据吗?', '提示', {
+                                confirmButtonText: '确定',
+                                cancelButtonText: '取消',
+                                state: 'warning'
+                                }).then(() => {
+                                that.axios.put('pass/ems/v1/emsprodplanrounds/ForcedUpdate', SubmitData)
+                                .then(function (res) {
+                                if (res.code === '0') {
+                                that.$message({
+                                    message: '保存成功',
+                                    type: 'success'
+                                });
+                                that.getTableDetailDatas(1, null);
+                                } else {
+                                that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                                }).catch(function () {
+                                that.loading = false;
+                                });
+                                });
+                        } else {
+                            this.$message.error('至少要选择一条数据');
+                        }
+        },
         getGrades () {
             let that = this
             let url = 'pass/product/v1/emssteel/getGrades/?type=' + '高线';
@@ -1539,7 +1591,7 @@ export default {
         },
         getStandards () {
             let that = this
-            let url = 'pass/product/v1/emsstandard/getStandards';
+            let url = 'pass/ems/v1/emsprodplanrounds/getstdchem';
             that.axios.get(url)
                 .then(function (res) {
                     if (res.code === '0') {
@@ -1547,8 +1599,8 @@ export default {
                         let obj = {};
                         for (let item of res.data) {
                             arr.push({
-                                id: item.basecode,
-                                name: item.basename
+                                id: item.id,
+                                name: item.chemicalStandard
                             })
                         }
                         that.nameObj.chemicalStandard.arr = arr;
@@ -1828,28 +1880,24 @@ export default {
         },
       but_add (type) {
           let that = this;
-          if (that.multipleSelectionAscLeft.length > 0) {
               let SubmitData = [];
-              for (let key in that.tableFormDataObj) {
                   SubmitData.push({
-                        parentid: that.tableFormDataObj[key].id,
-                        may: that.tableFormDataObj[key].jhTime,
-                        describe: that.tableFormDataObj[key].describe,
-                        state: that.tableFormDataObj[key].state,
-                        grades: that.tableFormDataObj[key].grades,
-                        specifications: that.tableFormDataObj[key].specifications,
-                        transportType: that.tableFormDataObj[key].transportType,
-                        workprocType: that.tableFormDataObj[key].workprocType,
-                        purpose: that.tableFormDataObj[key].purpose,
-                        chemicalStandard: that.tableFormDataObj[key].chemicalStandard,
-                        memo: that.tableFormDataObj[key].memo,
-                        createMan: that.tableFormDataObj[key].createman,
-                        createTime: that.tableFormDataObj[key].createtime,
-                        deliveryDate: that.tableFormDataObj[key].deliveryDate,
-                        type: type,
+                        parentid: that.leftData.id,
+                        may: that.leftData.jhTime,
+                        describe: that.leftData.describe,
+                        state: that.leftData.state,
+                        grades: that.leftData.grades,
+                        specifications: that.leftData.specifications,
+                        transportType: that.leftData.transportType,
+                        workprocType: that.leftData.workprocType,
+                        purpose: that.leftData.purpose,
+                        chemicalStandard: that.leftData.chemicalStandard,
+                        memo: that.leftData.memo,
+                        createMan: that.leftData.createman,
+                        createTime: that.leftData.createtime,
+                        deliveryDate: that.leftData.deliveryDate,
                         auditState: '0'
                   })
-              }
                     that.loading = true;
                     that.axios.post('pass/ems/v1/emsprodplanrounds/', SubmitData, {
                             contentType: 'application/json'
@@ -1869,23 +1917,6 @@ export default {
                             }).catch(function () {
                                 that.loading = false;
                     });
-          } else {
-              this.$message.error('至少要选择一条数据');
-          }
-            // let that = this;
-            // that.dialog.editorBox.form.data.describe = '';
-            // that.dialog.editorBox.form.data.grades = '';
-            // that.dialog.editorBox.form.data.specifications = '';
-            // that.dialog.editorBox.form.data.transportType = '';
-            // that.dialog.editorBox.form.data.chemicalStandard = '';
-            // that.dialog.editorBox.form.data.workprocid = '';
-            // that.dialog.editorBox.form.data.planWeight = '';
-            // that.dialog.editorBox.form.data.purpose = '';
-            // that.dialog.editorBox.show = true;
-            // that.dialog.editorBox.form.data.planWeight = '';
-            // setTimeout(() => {
-            //     that.$refs['dialog_form'].clearValidate();
-            // }, 100);
         },
         // 审核
         audit () {
@@ -2030,6 +2061,10 @@ export default {
         tableRowClassName ({row, rowIndex}) {
             // 把每一行的索引放进row
             row.index = rowIndex;
+        },
+        openDetails (row) {
+          let that = this;
+          that.leftData = row;
         }
     }
 }

+ 103 - 48
src/views/energyPlan/components/supplyAndDemand/planProjectRoundLG.vue

@@ -31,14 +31,14 @@
                     </el-row>
                 </el-form>
                <div class="box-top-gjl">
-                        <el-button
+                        <!-- <el-button
                             class="button"
                             type="primary"
                             size="mini"
                             icon="el-icon-plus"
                             v-privilege="activeMenu + 'ADD'"
                             @click="but_addNBJH()"
-                        >新增内部计划</el-button>
+                        >新增内部计划</el-button> -->
                         <el-button
                             class="button"
                             type="primary"
@@ -48,6 +48,12 @@
                             @click="but_add(1)"
                         >新增子计划</el-button>
                     <div style="float:right; text-align: right;">
+                        <el-button
+                        type="danger"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="edit_plural()"
+                       >强制修改</el-button>
                         <el-button
                         type="primary"
                         size="mini"
@@ -60,7 +66,7 @@
                         size="mini"
                         icon="el-icon-add-outline"
                         @click="but_edit_plural()"
-                    >修改</el-button>
+                    >保存</el-button>
                     <el-button
                         type="primary"
                         size="mini"
@@ -116,8 +122,9 @@
                                 :summary-method="getSummaries"
                                 @current-change="getTableDetailData"
                                 @selection-change="handleSelectionChangeAsleft"
+                                @row-click="openDetails"
                             >
-                            <el-table-column
+                            <!-- <el-table-column
                             sortable
                             type="selection"
                             width="40"
@@ -127,14 +134,14 @@
                             :selectable="checkboxTLeft"
                             fixed="left"
                             class-name="cnspicuous"
-                        ></el-table-column>
+                        ></el-table-column> -->
                         <el-table-column
                            sortable
                             prop="id"
                             label="编号"
                             align="center"
                             fixed="left"
-                            width="118px"
+                            width="148px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
@@ -251,7 +258,7 @@
                                     prop="roundid"
                                     label="编号"
                                     align="center"
-                                    min-width="127px"
+                                    min-width="151px"
                                     fixed="left"
                                     v-model="filterForm.data.sqno"
                                     :show-overflow-tooltip="true"
@@ -421,7 +428,6 @@
                                 <template slot-scope="scope">
                                     <el-form-item
                                     :prop="scope.row.seq + '.surfaceStandard'"
-                                    :rules="tableFormRules.surfaceStandard"
                                      v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
                                   >
                                     <el-select
@@ -454,7 +460,6 @@
                                 <template slot-scope="scope">
                                    <el-form-item
                                    :prop="scope.row.seq + '.chemicalStandard'"
-                                   :rules="tableFormRules.chemicalStandard"
                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
                                   >
                                     <el-select
@@ -779,6 +784,8 @@ export default {
              rightTableData: [],
             rightTableObj: {
             },
+            leftData: {
+            },
             multipleSelection: [],
             multipleSelectionAscLeft: [],
             tableFormDataObj: {},
@@ -880,6 +887,10 @@ export default {
                         '1036GX2': {
                             id: '1036GX2',
                             name: '高线二'
+                        },
+                        '1036LG1': {
+                            id: '1036LG1',
+                            name: '炼钢厂'
                         }
                     },
                     arr: [{
@@ -897,6 +908,10 @@ export default {
                         {
                             id: '1036GX2',
                             name: '高线二'
+                        },
+                        {
+                            id: '1036LG1',
+                            name: '炼钢厂'
                         }
                         ]
                 },
@@ -1272,7 +1287,7 @@ export default {
             let params = {};
             if (type === 'Add') {
             params = {
-            parentid: that.multipleSelectionAscLeft[0].id
+            parentid: that.leftData.id
            };
             } else {
             params = {
@@ -1460,6 +1475,8 @@ export default {
                                         type: 'success'
                                     });
                                      that.getTableDetailDatas();
+                                     that.getStandards();
+                                     that.getsurfaceStandard();
                                 } else {
                                     that.$message.error(res.message);
                                 }
@@ -1474,6 +1491,59 @@ export default {
                 this.$message.error('至少要选择一条数据');
             }
         },
+        edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                        let SubmitData = [];
+                        for (let key in that.rightTableObj) {
+                            SubmitData.push({
+                                parentid: that.rightTableObj[key].parentid,
+                                may: that.rightTableObj[key].may,
+                                describe: that.rightTableObj[key].describe,
+                                state: that.rightTableObj[key].state,
+                                grades: that.rightTableObj[key].grades,
+                                planWeight: that.rightTableObj[key].planWeight,
+                                specifications: that.rightTableObj[key].specifications,
+                                transportType: that.rightTableObj[key].transportType,
+                                workprocType: that.rightTableObj[key].workprocType,
+                                purpose: that.rightTableObj[key].purpose,
+                                chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                                memo: that.rightTableObj[key].memo,
+                                id: that.rightTableObj[key].roundid,
+                                sqno: that.rightTableObj[key].sqno,
+                                createman: that.rightTableObj[key].createman,
+                                createtime: that.rightTableObj[key].createtime,
+                                lengths: that.rightTableObj[key].lengths,
+                                surfaceStandard: that.rightTableObj[key].surfaceStandard,
+                                goinfo: that.rightTableObj[key].goinfo
+                            });
+                        }
+                                that.loading = true;
+                                that.$confirm('确定要强制修改数据吗?', '提示', {
+                                confirmButtonText: '确定',
+                                cancelButtonText: '取消',
+                                state: 'warning'
+                                }).then(() => {
+                                that.axios.put('pass/ems/v1/emsprodplanrounds/ForcedUpdate', SubmitData)
+                                .then(function (res) {
+                                if (res.code === '0') {
+                                that.$message({
+                                    message: '保存成功',
+                                    type: 'success'
+                                });
+                                that.getTableDetailDatas(1, null);
+                                } else {
+                                that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                                }).catch(function () {
+                                that.loading = false;
+                                });
+                                });
+                        } else {
+                            this.$message.error('至少要选择一条数据');
+                        }
+        },
         getGrades () {
             let that = this
             let url = 'pass/product/v1/emsvqcmbasesteel/getBase'
@@ -1526,7 +1596,7 @@ export default {
         },
         getStandards () {
             let that = this
-            let url = 'pass/product/v1/emsvqcmstdchem/getstdchem';
+            let url = 'pass/ems/v1/emsprodplanrounds/getstdchem';
             that.axios.get(url)
                 .then(function (res) {
                     if (res.code === '0') {
@@ -1534,8 +1604,8 @@ export default {
                         let obj = {};
                         for (let item of res.data) {
                             arr.push({
-                                id: item.basecode,
-                                name: item.standardgb
+                                id: item.id,
+                                name: item.chemicalStandard
                             })
                         }
                         that.nameObj.chemicalStandard.arr = arr;
@@ -1842,28 +1912,26 @@ export default {
         },
       but_add (type) {
           let that = this;
-          if (that.multipleSelectionAscLeft.length > 0) {
               let SubmitData = [];
-              for (let key in that.tableFormDataObj) {
                   SubmitData.push({
-                        parentid: that.tableFormDataObj[key].id,
-                        may: that.tableFormDataObj[key].jhTime,
-                        describe: that.tableFormDataObj[key].describe,
-                        state: that.tableFormDataObj[key].state,
-                        grades: that.tableFormDataObj[key].grades,
-                        specifications: that.tableFormDataObj[key].specifications,
-                        workprocType: that.tableFormDataObj[key].workprocType,
-                        purpose: that.tableFormDataObj[key].purpose,
-                        chemicalStandard: that.tableFormDataObj[key].chemicalStandard,
-                        memo: that.tableFormDataObj[key].memo,
-                        createMan: that.tableFormDataObj[key].createman,
-                        createTime: that.tableFormDataObj[key].createtime,
-                        lengths: that.tableFormDataObj[key].lengths,
-                         goinfo: that.tableFormDataObj[key].id.substring(0, 1) === 'G' ? '1036WM1' : null,
-                        surfaceStandard: that.tableFormDataObj[key].surfaceStandard,
+                        parentid: that.leftData.id,
+                        may: that.leftData.jhTime,
+                        describe: that.leftData.describe,
+                        state: that.leftData.state,
+                        grades: that.leftData.grades,
+                        specifications: that.leftData.specifications,
+                        workprocType: that.leftData.workprocType,
+                        purpose: that.leftData.purpose,
+                        chemicalStandard: that.leftData.chemicalStandard,
+                        memo: that.leftData.memo,
+                        createMan: that.leftData.createman,
+                        createTime: that.leftData.createtime,
+                        deliveryDate: that.leftData.deliveryDate,
+                        lengths: that.leftData.lengths,
+                        goinfo: that.leftData.id.substring(0, 1) === 'G' ? '1036WM1' : null,
+                        surfaceStandard: that.leftData.surfaceStandard,
                         type: type
                   })
-              }
                     that.loading = true;
                     that.axios.post('pass/ems/v1/emsprodplanrounds/', SubmitData, {
                             contentType: 'application/json'
@@ -1883,23 +1951,6 @@ export default {
                             }).catch(function () {
                                 that.loading = false;
                     });
-          } else {
-              this.$message.error('至少要选择一条数据');
-          }
-            // let that = this;
-            // that.dialog.editorBox.form.data.describe = '';
-            // that.dialog.editorBox.form.data.grades = '';
-            // that.dialog.editorBox.form.data.specifications = '';
-            // that.dialog.editorBox.form.data.transportType = '';
-            // that.dialog.editorBox.form.data.chemicalStandard = '';
-            // that.dialog.editorBox.form.data.workprocid = '';
-            // that.dialog.editorBox.form.data.planWeight = '';
-            // that.dialog.editorBox.form.data.purpose = '';
-            // that.dialog.editorBox.show = true;
-            // that.dialog.editorBox.form.data.planWeight = '';
-            // setTimeout(() => {
-            //     that.$refs['dialog_form'].clearValidate();
-            // }, 100);
         },
         // 用于检索字符串
         getGoinfo (str) {
@@ -2016,6 +2067,10 @@ export default {
         tableRowClassName ({row, rowIndex}) {
             // 把每一行的索引放进row
             row.index = rowIndex;
+        },
+        openDetails (row) {
+          let that = this;
+          that.leftData = row;
         }
     }
 }

+ 95 - 48
src/views/energyPlan/components/supplyAndDemand/planProjectRoundXG.vue

@@ -32,14 +32,14 @@
                     </el-row>
                 </el-form>
                <div class="box-top-gjl">
-                        <el-button
+                        <!-- <el-button
                             class="button"
                             type="primary"
                             size="mini"
                             icon="el-icon-plus"
                             v-privilege="activeMenu + 'ADD'"
                             @click="but_addNBJH()"
-                        >新增内部计划</el-button>
+                        >新增内部计划</el-button> -->
                         <el-button
                             class="button"
                             type="primary"
@@ -49,6 +49,12 @@
                             @click="but_add(1)"
                         >新增子计划</el-button>
                     <div style="float:right; text-align: right;">
+                        <el-button
+                        type="danger"
+                        size="mini"
+                        icon="el-icon-add-outline"
+                        @click="edit_plural()"
+                       >强制修改</el-button>
                         <el-button
                         type="primary"
                         size="mini"
@@ -61,7 +67,7 @@
                         size="mini"
                         icon="el-icon-add-outline"
                         @click="but_edit_plural()"
-                    >修改</el-button>
+                    >保存</el-button>
                     <el-button
                         type="primary"
                         size="mini"
@@ -117,8 +123,9 @@
                                 :summary-method="getSummaries"
                                 @current-change="getTableDetailData"
                                 @selection-change="handleSelectionChangeAsleft"
+                                @row-click="openDetails"
                             >
-                            <el-table-column
+                            <!-- <el-table-column
                             sortable
                             type="selection"
                             width="40"
@@ -128,21 +135,21 @@
                             :selectable="checkboxTLeft"
                             fixed="left"
                             class-name="cnspicuous"
-                        ></el-table-column>
+                        ></el-table-column> -->
                         <el-table-column
                            sortable
                             prop="id"
                             label="编号"
                             align="center"
                             fixed="left"
-                            width="118px"
+                            width="135px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
                            sortable
                             prop="jhTime"
                             label="排产日期"
-                            width="76px"
+                            width="97px"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
@@ -264,7 +271,7 @@
                                     prop="roundid"
                                     label="编号"
                                     fixed="left"
-                                    min-width="127px"
+                                    min-width="143px"
                                     v-model="filterForm.data.sqno"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
@@ -558,7 +565,6 @@
                                 <template slot-scope="scope">
                                    <el-form-item
                                    :prop="scope.row.seq + '.chemicalStandard'"
-                                   :rules="tableFormRules.chemicalStandard"
                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '2'"
                                   >
                                     <el-select
@@ -827,6 +833,8 @@ export default {
              rightTableData: [],
             rightTableObj: {
             },
+            leftData: {
+            },
             multipleSelection: [],
             multipleSelectionAscLeft: [],
             tableFormDataObj: {},
@@ -1392,7 +1400,7 @@ export default {
             let params = {};
             if (type === 'Add') {
             params = {
-            parentid: that.multipleSelectionAscLeft[0].id
+            parentid: that.leftData.id
            };
             } else {
             params = {
@@ -1583,6 +1591,7 @@ export default {
                                         type: 'success'
                                     });
                                      that.getTableDetailDatas();
+                                     that.getStandards();
                                 } else {
                                     that.$message.error(res.message);
                                 }
@@ -1597,6 +1606,60 @@ export default {
                 this.$message.error('至少要选择一条数据');
             }
         },
+        edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                        let SubmitData = [];
+                        for (let key in that.rightTableObj) {
+                            SubmitData.push({
+                                parentid: that.rightTableObj[key].parentid,
+                                may: that.rightTableObj[key].may,
+                                describe: that.rightTableObj[key].describe,
+                                state: that.rightTableObj[key].state,
+                                grades: that.rightTableObj[key].grades,
+                                planWeight: that.rightTableObj[key].planWeight,
+                                specifications: that.rightTableObj[key].specifications,
+                                transportType: that.rightTableObj[key].transportType,
+                                workprocType: that.rightTableObj[key].workprocType,
+                                purpose: that.rightTableObj[key].purpose,
+                                chemicalStandard: that.rightTableObj[key].chemicalStandard,
+                                memo: that.rightTableObj[key].memo,
+                                id: that.rightTableObj[key].roundid,
+                                sqno: that.rightTableObj[key].sqno,
+                                createman: that.rightTableObj[key].createman,
+                                createtime: that.rightTableObj[key].createtime,
+                                lengthTimesWidth: that.rightTableObj[key].lengthTimesWidth,
+                                dimension: that.rightTableObj[key].dimension,
+                                iateralArea: that.rightTableObj[key].iateralArea,
+                                lengths: that.rightTableObj[key].lengths
+                            });
+                        }
+                                that.loading = true;
+                                that.$confirm('确定要强制修改数据吗?', '提示', {
+                                confirmButtonText: '确定',
+                                cancelButtonText: '取消',
+                                state: 'warning'
+                                }).then(() => {
+                                that.axios.put('pass/ems/v1/emsprodplanrounds/ForcedUpdate', SubmitData)
+                                .then(function (res) {
+                                if (res.code === '0') {
+                                that.$message({
+                                    message: '保存成功',
+                                    type: 'success'
+                                });
+                                that.getTableDetailDatas(1, null);
+                                } else {
+                                that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                                }).catch(function () {
+                                that.loading = false;
+                                });
+                                });
+                        } else {
+                            this.$message.error('至少要选择一条数据');
+                        }
+        },
         getGrades () {
             let that = this
             let url = 'pass/product/v1/emssteel/getGrades/?type=' + '型钢';
@@ -1621,7 +1684,7 @@ export default {
         },
         getStandards () {
             let that = this
-            let url = 'pass/product/v1/emsstandard/getStandards';
+            let url = 'pass/ems/v1/emsprodplanrounds/getstdchem';
             that.axios.get(url)
                 .then(function (res) {
                     if (res.code === '0') {
@@ -1917,30 +1980,27 @@ export default {
         },
       but_add (type) {
           let that = this;
-          if (that.multipleSelectionAscLeft.length > 0) {
               let SubmitData = [];
-              for (let key in that.tableFormDataObj) {
                   SubmitData.push({
-                        parentid: that.tableFormDataObj[key].id,
-                        may: that.tableFormDataObj[key].jhTime,
-                        describe: that.tableFormDataObj[key].describe,
-                        state: that.tableFormDataObj[key].state,
-                        grades: that.tableFormDataObj[key].grades,
-                        specifications: that.tableFormDataObj[key].specifications,
-                        transportType: that.tableFormDataObj[key].transportType,
-                        workprocType: that.tableFormDataObj[key].workprocType,
-                        purpose: that.tableFormDataObj[key].purpose,
-                        chemicalStandard: that.tableFormDataObj[key].chemicalStandard,
-                        memo: that.tableFormDataObj[key].memo,
-                        createMan: that.tableFormDataObj[key].createman,
-                        createTime: that.tableFormDataObj[key].createtime,
-                        lengthTimesWidth: that.tableFormDataObj[key].lengthTimesWidth,
-                        dimension: that.tableFormDataObj[key].dimension,
-                        iateralArea: that.tableFormDataObj[key].iateralArea,
-                        lengths: that.tableFormDataObj[key].lengths,
+                        parentid: that.leftData.id,
+                        may: that.leftData.jhTime,
+                        describe: that.leftData.describe,
+                        state: that.leftData.state,
+                        grades: that.leftData.grades,
+                        specifications: that.leftData.specifications,
+                        transportType: that.leftData.transportType,
+                        workprocType: that.leftData.workprocType,
+                        purpose: that.leftData.purpose,
+                        chemicalStandard: that.leftData.chemicalStandard,
+                        memo: that.leftData.memo,
+                        createMan: that.leftData.createman,
+                        createTime: that.leftData.createtime,
+                        lengthTimesWidth: that.leftData.lengthTimesWidth,
+                        dimension: that.leftData.dimension,
+                        iateralArea: that.leftData.iateralArea,
+                        lengths: that.leftData.lengths,
                         type: type
                   })
-              }
                     that.loading = true;
                     that.axios.post('pass/ems/v1/emsprodplanrounds/', SubmitData, {
                             contentType: 'application/json'
@@ -1960,23 +2020,6 @@ export default {
                             }).catch(function () {
                                 that.loading = false;
                     });
-          } else {
-              this.$message.error('至少要选择一条数据');
-          }
-            // let that = this;
-            // that.dialog.editorBox.form.data.describe = '';
-            // that.dialog.editorBox.form.data.grades = '';
-            // that.dialog.editorBox.form.data.specifications = '';
-            // that.dialog.editorBox.form.data.transportType = '';
-            // that.dialog.editorBox.form.data.chemicalStandard = '';
-            // that.dialog.editorBox.form.data.workprocid = '';
-            // that.dialog.editorBox.form.data.planWeight = '';
-            // that.dialog.editorBox.form.data.purpose = '';
-            // that.dialog.editorBox.show = true;
-            // that.dialog.editorBox.form.data.planWeight = '';
-            // setTimeout(() => {
-            //     that.$refs['dialog_form'].clearValidate();
-            // }, 100);
         },
         but_addNBJH () {
             let that = this;
@@ -2085,6 +2128,10 @@ export default {
         tableRowClassName ({row, rowIndex}) {
             // 把每一行的索引放进row
             row.index = rowIndex;
+        },
+        openDetails (row) {
+          let that = this;
+          that.leftData = row;
         }
     }
 }

+ 2 - 1
src/views/energyQuality/components/power/powerMonitoringDayData.vue

@@ -69,7 +69,8 @@
                                     v-model="filterForm.data.monitordate"
                                     style="width: 100%;"
                                     :type="'daterange'"
-                                    :defaultOffset="-1"
+                                    :oneFoo="getTableData"
+                                    :custom ="1"
                                 ></zj-timegran-date>
                             </el-form-item>
                         </el-col>