|
@@ -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;
|
|
|
}
|
|
|
}
|
|
|
}
|