Переглянути джерело

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

QuietShadow 3 роки тому
батько
коміт
a304612082

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

@@ -68,12 +68,12 @@
                         icon="el-icon-add-outline"
                         @click="issue()"
                     >下发</el-button>
-                    <el-button
+                    <!-- <el-button
                         type="primary"
                         size="mini"
                         icon="el-icon-add-outline"
                         @click="audit()"
-                    >审核</el-button>
+                    >审核</el-button> -->
                     <el-button
                         type="primary"
                         size="mini"
@@ -305,19 +305,6 @@
                                  </template>
                                 </el-table-column>
                                 <el-table-column
-                                sortable
-                                    prop="auditState"
-                                    label="审核状态"
-                                    min-width="100px"
-                                    :show-overflow-tooltip="true"
-                                >
-                                <template slot-scope="scope">
-                                <span
-                                    :style="{color: nameObj.auditState.obj[scope.row.auditState] ? nameObj.auditState.obj[scope.row.auditState].color : ''}"
-                                >{{ nameObj.auditState.obj[scope.row.auditState] ? nameObj.auditState.obj[scope.row.auditState].name : scope.row.auditState }}</span>
-                                 </template>
-                                </el-table-column>
-                                <el-table-column
                                 sortable
                                     prop="grades"
                                     label="钢种"
@@ -880,44 +867,6 @@ export default {
                     ]
                     }
                 },
-                auditState: {
-                    obj: {
-                        '0': {
-                            name: '未审核',
-                            color: '#7a7a7a'
-                        },
-                        '1': {
-                            name: '正在审核',
-                            color: 'rgb(28, 111, 217)'
-                        },
-                        '2': {
-                            name: '已通过',
-                            color: 'green'
-                        },
-                        '3': {
-                            name: '未通过',
-                            color: 'red'
-                        }
-                    },
-                    arr: [
-                         {
-                            id: '0',
-                            name: '未审核'
-                        },
-                        {
-                            id: '1',
-                            name: '正在审核'
-                        },
-                        {
-                            id: '2',
-                            name: '审核通过'
-                        },
-                        {
-                            id: '3',
-                            name: '审核失败'
-                        }
-                    ]
-                },
                 grades: {
                     obj: {},
                     arr: []
@@ -1614,19 +1563,6 @@ export default {
                         sqno: that.rightTableObj[key].sqno
                    });
                 }
-                 let id = '';
-                for (let key in SubmitData) {
-                     if (SubmitData[key].auditState === '0') {
-                         auditStates[key] = SubmitData[key];
-                         id += SubmitData[key].roundid + ',';
-                     }
-                }
-                if (id !== '') {
-                that.$confirm('编号为[' + id + ']未审核,是否强制下发?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    state: 'warning'
-                }).then(() => {
                 that.loading = true;
                 that.axios.post('pass/ems/v1/emsprodplanrounds/issue', SubmitData, {
                     contentType: 'application/json'
@@ -1636,38 +1572,16 @@ export default {
                    that.$message({
                     message: '操作成功',
                     type: 'success'
-                     });
-                    that.getTableData();
-                   that.getTableDetailDatas();
-                } else {
-                that.$message.error(res.message);
-            }
-                that.loading = false;
-                }).catch(function () {
-                 that.loading = false;
-                });
-                });
-                } else {
-                that.loading = true;
-                that.axios.post('pass/ems/v1/emsprodplanrounds/issue', SubmitData, {
-                    contentType: 'application/json'
-                })
-                .then(function (res) {
-                if (res.code === '0') {
-                   that.$message({
-                    message: '操作成功',
-                    type: 'success'
-                     });
+                    });
                     that.getTableData();
-                   that.getTableDetailDatas();
-                } else {
+                    that.getTableDetailDatas();
+                 } else {
                 that.$message.error(res.message);
             }
                 that.loading = false;
                 }).catch(function () {
                  that.loading = false;
                 });
-                }
             }
           });
              } else {

+ 288 - 238
src/views/energyPlan/components/supplyAndDemand/weightAdjustment.vue

@@ -16,12 +16,35 @@
                                     v-model="filterForm.data.may"
                                     style="width: 100%;"
                                     :type="'daterange'"
-                                    :timegranId="filterForm.data.timegranid"
-                                    :oneFoo="getTableData"
                                 ></zj-timegran-date>
                             </el-form-item>
                         </el-col>
-                        <el-col :span="3">
+                            <el-col :span="6">
+                           <el-form-item label="编号">
+                                <el-input
+                                    v-model="filterForm.data.id"
+                                    style="width: 100%;"
+                                    refcous="true"
+                                    ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="工序">
+                            <el-select
+                            filterable clearable
+                            v-model="filterForm.data.workprocType"
+                            multiple
+                            placeholder=""
+                            style="width: 100%;"
+                            >
+                            <el-option
+                            v-for="item of nameObj.workprocid.arr"
+                            :key="item.id"
+                            :value="item.id"
+                            :label="item.name"
+                            ></el-option>
+                            </el-select>
+                            </el-form-item>
                         </el-col>
                     </el-row>
                 </el-form>
@@ -37,6 +60,30 @@
                                      v-privilege="activeMenu + 'audit'"
                                     :loading="loading"
                                 >提交审核</el-button>
+                                <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'approve'"
+                                    @click="approval()"
+                                    >批准</el-button>
+                                    <el-button
+                                    type="danger"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'approve'"
+                                    @click="nopass()"
+                                    >不通过</el-button>
+                                    <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'AGREE'"
+                                    @click="agreement()"
+                                   >同意</el-button>
+                                   <el-button
+                                    type="danger"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'reject'"
+                                    @click="rejected()"
+                                    >驳回</el-button>
                             </el-col>
                             <el-col :span="8" style="float:right; text-align: right;">
                                 <div>
@@ -179,12 +226,12 @@
                             type="selection"
                             width="40"
                             align="center"
-                            v-if="checkstate"
                             :selectable='checkboxT'
                             fixed="left"
                             class-name="cnspicuous"
                         ></el-table-column>
                         <el-table-column
+                        sortable
                             prop="id"
                             label="国贸订单编号"
                             fixed="left"
@@ -192,18 +239,20 @@
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
+                        sortable
                             prop="workprocType"
                             label="工序"
                             align="center"
                             fixed="left"
-                            width="120px"
+                            width="69px"
                             :show-overflow-tooltip="true"
                         >
                         <template slot-scope="scope">
-                              <span>{{ nameObj.workprocid.obj[scope.row.workprocType] ? nameObj.workprocid.obj[scope.row.workprocType] : scope.row.workprocType }}</span>
+                              <span>{{ nameObj.workprocid.obj[scope.row.workprocType] ? nameObj.workprocid.obj[scope.row.workprocType].name : scope.row.workprocType }}</span>
                         </template>
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="jhTime"
                             label="排产日期"
                             align="center"
@@ -212,6 +261,7 @@
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
+                        sortable
                             prop="deliveryDate"
                             label="交货日期"
                             align="center"
@@ -220,6 +270,7 @@
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
+                        sortable
                             prop="grades"
                             label="钢种"
                             align="center"
@@ -229,6 +280,7 @@
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="specifications"
                             label="规格"
                             fixed="left"
@@ -239,6 +291,7 @@
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="lengths"
                             label="长度"
                             align="center"
@@ -247,6 +300,7 @@
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="lengthtimesWidth"
                             label="高度*宽度"
                             align="center"
@@ -255,7 +309,8 @@
                         >
                         </el-table-column>
                         <el-table-column
-                            prop="planWeight"
+                        sortable
+                            prop="planweight"
                             label="计划量"
                             align="center"
                             width="110px"
@@ -278,20 +333,25 @@
                         </template>
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="planWeightOld"
+                            align="center"
                             label="原计划量"
-                            width="54px"
+                            width="74px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="tzl"
+                            align="center"
                             label="调整量"
-                            width="54px"
+                            width="74px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
                             prop="submitter"
                             label="提交人"
                             align="center"
@@ -300,6 +360,7 @@
                         >
                         </el-table-column>
                          <el-table-column
+                         sortable
                             prop="submitTime"
                             label="提交时间"
                             align="center"
@@ -308,14 +369,43 @@
                         >
                         </el-table-column>
                         <el-table-column
+                        sortable
+                            prop="gmReviewer"
+                            label="审核人(国贸)"
+                            align="center"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="gmReviewerTime"
+                            label="审核时间(国贸)"
+                            align="center"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                        sortable
                             prop="reviewer"
-                            label="审核人"
+                            label="审核人(生产部)"
+                            align="center"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                        sortable
+                            prop="reviewerTime"
+                            label="审核时间(生产部)"
                             align="center"
                             width="120px"
                             :show-overflow-tooltip="true"
                         >
                         </el-table-column>
                          <el-table-column
+                         sortable
                             prop="state"
                             label="审核状态"
                             align="center"
@@ -328,15 +418,7 @@
                                 >{{ nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].name : scope.row.state }}</span>
                         </template>
                         </el-table-column>
-                        <el-table-column
-                            prop="reviewerTime"
-                            label="审核时间"
-                            align="center"
-                            width="120px"
-                            :show-overflow-tooltip="true"
-                        >
-                        </el-table-column>
-                        <el-table-column
+                        <!-- <el-table-column
                         class-name="gn-TableDownloadExcel-none"
                         label="操作"
                         v-if="czstate"
@@ -350,7 +432,7 @@
                                     type="primary"
                                     size="mini"
                                     v-privilege="activeMenu + 'approve'"
-                                    @click="approval(scope.row)"
+                                    @click="approval()"
                                 >批准</el-button>
                                 <el-button
                                     type="primary"
@@ -366,7 +448,7 @@
                                 >驳回</el-button>
                             </div>
                         </template>
-                    </el-table-column>
+                    </el-table-column> -->
                     </el-table>
                 </el-form>
                 <el-pagination
@@ -410,32 +492,19 @@ export default {
                 show: true,
                 data: {
                     show: false,
+                    id: '',
                     clock: '',
                     clockc: '',
-                    workprocid: [],
+                    workprocType: [],
                     location: [],
                     networkid: [],
+                    auditStatus: [],
                     state: '',
-                    itemname: '',
-                    searchtype: '0',
-                    measureid: '',
-                    productid: '',
                     may: '',
-                    weightMonth: '',
-                    weightDay: '',
                     unit: '',
-                    jxdays: '',
-                    createtime: '',
-                    createman: '',
-                    updatetime: '',
-                    updateman: '',
                     memo: '',
                     startTime: '',
-                    endTime: '',
-                    kxf_weight: '',
-                    yxf_weight: '',
-                    gx: '',
-                    workproc_type: ''
+                    endTime: ''
                 },
                 rules: {
                 },
@@ -443,85 +512,6 @@ export default {
                     networkid: false
                 }
             },
-            dialog: {
-                fRow: null,
-                editorBox: {
-                    show: false,
-                    type: '',
-                    form: {
-                        default: {
-                            workprocid: ''
-                        },
-                        data: {
-                            workprocid: '',
-                            unitid: '',
-                            jxdays: '',
-                            memo: '',
-                            grades: '',
-                            specifications: '',
-                            transportType: '',
-                            chemicalStandard: '',
-                            purpose: '',
-                            planWeight: '',
-                            jhTime: '',
-                            lengths: '',
-                            surfaceStandard: '',
-                            dimension: '',
-                            lengthTimesWidth: '',
-                            iateralArea: '',
-                            deliveryDate: ''
-                        },
-                         rules: {
-                             planWeight: [
-                                { required: true, message: '该项不能为空', trigger: 'change' },
-                                { validator: zCheckNumber1, trigger: 'change' }
-                            ],
-                            lengths: [
-                                { validator: zCheckNumber1, trigger: 'change' }
-                                ],
-                            weightDay: [
-                                { required: true, message: '该项不能为空', trigger: 'change' },
-                                { validator: zCheckNumber1, trigger: 'change' }
-                            ],
-                            specifications: [
-                                { required: true, message: '该项不能为空', trigger: 'change' }
-                                ],
-                            may: [
-                                { required: true, message: '该项不能为空', trigger: 'change' }
-                            ],
-                            grades: [
-                                { required: true, message: '该项不能为空', trigger: 'change' }
-                                ],
-                            unitid: [
-                                { required: true, message: '该项不能为空', trigger: 'change' }
-                                ],
-                            memo: [
-                                { required: true, message: '该项不能为空', trigger: 'change' }
-                                ],
-                            kxf_weight: [
-                                { required: true, message: '该项不能为空', trigger: 'change' },
-                                { validator: zCheckNumber1, trigger: 'change' }
-                            ],
-                            yxf_weight: [
-                                { required: true, message: '该项不能为空', trigger: 'change' },
-                                { validator: zCheckNumber1, trigger: 'change' }
-                            ]
-                        }
-                    }
-                },
-                editorBox2: {
-                    show: false,
-                    type: '',
-                    form: {
-                      data: {
-                          may: ''
-                      },
-                      rules: {
-                            may: [{ required: true, message: '该项不能为空', trigger: 'change' }]
-                        }
-                    }
-                }
-            },
             pageNum: 1,
             pageSize: 100,
             total: 0,
@@ -654,8 +644,25 @@ export default {
                     ]
                 },
                 workprocid: {
-                    obj: {},
-                    arr: []
+                    obj: {'AT2004': {name: '炼钢'}, 'AT2005': {name: '一高线'}, 'AT2006': {name: '二高线'}, 'AT2007': {name: '型钢'}},
+                    arr: [
+                        {
+                         id: 'AT2004',
+                         name: '炼钢'
+                        },
+                        {
+                         id: 'AT2005',
+                         name: '一高线'
+                        },
+                        {
+                         id: 'AT2006',
+                         name: '二高线'
+                        },
+                        {
+                         id: 'AT2007',
+                         name: '型钢'
+                        }
+                        ]
                 },
                 location: {
                     obj: {},
@@ -767,36 +774,10 @@ export default {
         if (that.butPrivilege.CHECK || that.butPrivilege.UNDOCHECK) {
             that.isCheck = true;
         }
-        // 管理员在这里录入数据
-        if (that.loginName === 'admin' && that.filterForm.disabled.networkid) {
-            that.isCheck = false;
-        }
-        // 接收路由参数
-        if (that.$route.query.gx) {
-            that.filterForm.data.gx = that.$route.query.gx;
-            let its = that.filterForm.data.gx.split(',');
-            if (its && its.length > 10) {
-                that.pageSize = 50;
-                that.custom = 0;
-            }
-        }
-        if (that.$route.query.gx !== 'LG') {
-             that.getGrades();
-             that.getSpecifications();
-             that.getStandards();
-        }
-        if (that.$route.query.gx === 'LG') {
-            that.getGradesASLg();
-            that.getSpecificationsAsLg();
-            that.getStandardsAsLg();
-        }
-        that.getNodeData();
-        // that.getLocation();
+         that.getRoles();
         that.getUnitIdData();
         that.getLocateIdData();
-        // that.getTableData();
         that.getlengthTimesWidth();
-        that.getRoles();
     },
     methods: {
         //  计算树区域高度
@@ -805,7 +786,7 @@ export default {
         },
         // 自定义的表格合计方法:只给指定列进行合计
         getSummaries (param) {
-            const prop = ['planWeight', 'planWeightOld', 'tzl']; // 合计列绑定的prop
+            const prop = ['planweight', 'planWeightOld', 'tzl']; // 合计列绑定的prop
             return commonSummaries(param, prop);
         },
         rowClick (row) {
@@ -1010,30 +991,6 @@ export default {
                     }
                 });
         },
-        // 获取工序列表
-        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);
-                    }
-                });
-        },
         connn () {
             let that = this;
             if (!that.filterForm.data.networkid || that.filterForm.data.networkid.length === 0) {
@@ -1131,9 +1088,11 @@ export default {
             let that = this,
             params = {},
                 pData = {
-                   workprocType: that.filterForm.data.id,
+                   id: that.filterForm.data.id,
+                   workprocType: that.filterForm.data.workprocType.toString(),
                    startTime: that.filterForm.data.may[0],
-                   endTime: that.filterForm.data.may[1]
+                   endTime: that.filterForm.data.may[1],
+                   auditStatus: that.filterForm.data.auditStatus.toString()
                 };
                 for (let key in pData) {
                     if (pData[key]) {
@@ -1166,7 +1125,9 @@ export default {
                                 submitTime: item.SUBMIT_TIME,
                                 planweight: item.PLAN_WEIGHT,
                                 planWeightOld: item.PLAN_WEIGHT_OLD,
-                                deliveryDate: item.DELIVERYDATE,
+                                deliveryDate: item.DELIVERY_DATE,
+                                gmReviewer: item.GM_REVIEWER,
+                                gmReviewerTime: item.GM_REVIEWER_TIME,
                                 tzl: item.TZL
                             });
                         }
@@ -1251,20 +1212,6 @@ export default {
             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;
@@ -1534,15 +1481,19 @@ export default {
                     let gmywid = this.nameObj.roleList.obj['国贸-业务人员'].id;
                     let gmldid = this.nameObj.roleList.obj['国贸-部门领导'].id;
                     if (this.qrRole.includes(roleId)) {
+                        this.filterForm.data.auditStatus.push('2', '3', '4');
                         this.spread = true;
                         this.czstate = true;
                     }
                     if (this.qrRole.includes(gmywid)) {
+                        this.filterForm.data.auditStatus.push('0', '1', '2', '3', '4');
                         this.checkstate = true;
                     }
                     if (this.qrRole.includes(gmldid)) {
+                         this.filterForm.data.auditStatus.push('1', '2', '3', '4');
                         this.czstate = true;
                     }
+                    this.getTableData();
         })
             });
             // 获取角色信息
@@ -1648,11 +1599,7 @@ export default {
                                 id: that.tableFormDataObj[key].id,
                                 planWeight: that.tableFormDataObj[key].planweight,
                                 auditStatus: '1',
-                                planWeightOld: that.tableFormDataObj[key].planWeightOld,
-                                submitter: that.tableFormDataObj[key].submitter,
-                                submitTime: that.tableFormDataObj[key].submitTime,
-                                reviewer: that.tableFormDataObj[key].reviewer,
-                                reviewerTime: that.tableFormDataObj[key].reviewerTime
+                                planWeightOld: that.tableFormDataObj[key].planWeightOld
                             });
                            that.loading = true;
                            that.axios.put('pass/ems/v1/emsprodplanweightadjustments/submitaudit', SubmitData)
@@ -1674,58 +1621,161 @@ export default {
                         }
                     }
                 });
+            } else {
+                this.$message.error('至少要选择一条数据');
             }
         },
-        approval (row) {
+        // 批准
+        approval () {
         let that = this;
-        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/approval/' + row.id)
-        .then(function (res) {
-            if (res.code === '0') {
-                that.$message({
-                    message: '操作成功',
-                    type: 'success'
-                });
-                that.getTableData();
-            } else {
-                 that.$message.error(res.message);
-            }
-        }).catch(function () {
-            that.loading = false;
-        });
+        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({
+                            id: that.tableFormDataObj[key].id
+                        });
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/approval/', 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('至少要选择一条数据');
+        }
+        // that.axios.put('pass/ems/v1/emsprodplanweightadjustments/approval/' + row.id)
+        // .then(function (res) {
+        //     if (res.code === '0') {
+        //         that.$message({
+        //             message: '操作成功',
+        //             type: 'success'
+        //         });
+        //         that.getTableData();
+        //     } else {
+        //          that.$message.error(res.message);
+        //     }
+        // }).catch(function () {
+        //     that.loading = false;
+        // });
         },
-        rejected (row) {
+        // 不通过
+        nopass () {
         let that = this;
-        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/rejected/' + row.id)
-        .then(function (res) {
-            if (res.code === '0') {
-                that.$message({
-                    message: '操作成功',
-                    type: 'success'
-                });
-                that.getTableData();
-            } else {
-                 that.$message.error(res.message);
-            }
-        }).catch(function () {
-            that.loading = false;
-        });
+        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({
+                            id: that.tableFormDataObj[key].id
+                        });
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/nopass/', 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('至少要选择一条数据');
+        }
         },
-        agreement (row) {
+        rejected () {
         let that = this;
-        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/agreement/' + row.id)
-        .then(function (res) {
-            if (res.code === '0') {
-                that.$message({
-                    message: '操作成功',
-                    type: 'success'
-                });
-                that.getTableData();
-            } else {
-                 that.$message.error(res.message);
-            }
-        }).catch(function () {
-            that.loading = false;
-        });
+        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({
+                            id: that.tableFormDataObj[key].id
+                        });
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/rejected/', 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('至少要选择一条数据');
+        }
+        },
+        agreement () {
+        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({
+                            id: that.tableFormDataObj[key].id
+                        });
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emsprodplanweightadjustments/agreement/', 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('至少要选择一条数据');
+        }
         },
         // 下发
          issue (state) {