|
@@ -1140,6 +1140,32 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- Cost Fr Ethylene -->
|
|
|
+ <div class="editDiv">
|
|
|
+ <el-button
|
|
|
+ :disabled="costFrEthyleneUpdating"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ @click="handleCostFrEthyleneUpdate"
|
|
|
+ v-hasPermi="['production:monthly:edit']"
|
|
|
+ >{{ $t('编辑Cost Fr Ethylene') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="!costFrEthyleneUpdating"
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-check"
|
|
|
+ size="mini"
|
|
|
+ @click="handleConfirmCostFrEthyleneUpdate"
|
|
|
+ v-hasPermi="['production:monthly:edit']"
|
|
|
+ >{{ $t('保存') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="!costFrEthyleneUpdating"
|
|
|
+ type="info"
|
|
|
+ icon="el-icon-close"
|
|
|
+ size="mini"
|
|
|
+ @click="handleCancelCostFrEthyleneUpdate"
|
|
|
+ v-hasPermi="['production:monthly:edit']"
|
|
|
+ >{{ $t('取消') }}</el-button>
|
|
|
+ </div>
|
|
|
<el-table border :data="tableCostFrEthylene" style="width: 100%;">
|
|
|
<el-table-column label="Cost fr Ethylene">
|
|
|
<el-table-column width="150" prop="title" label="">
|
|
@@ -1149,18 +1175,102 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="unit" label="unit"></el-table-column>
|
|
|
<el-table-column prop="currently" label="currently"></el-table-column>
|
|
|
- <el-table-column prop="jan" :label="this.monthList[0]"></el-table-column>
|
|
|
- <el-table-column prop="feb" :label="this.monthList[1]"></el-table-column>
|
|
|
- <el-table-column prop="mar" :label="this.monthList[2]"></el-table-column>
|
|
|
- <el-table-column prop="apr" :label="this.monthList[3]"></el-table-column>
|
|
|
- <el-table-column prop="may" :label="this.monthList[4]"></el-table-column>
|
|
|
- <el-table-column prop="jun" :label="this.monthList[5]"></el-table-column>
|
|
|
- <el-table-column prop="jul" :label="this.monthList[6]"></el-table-column>
|
|
|
- <el-table-column prop="aug" :label="this.monthList[7]"></el-table-column>
|
|
|
- <el-table-column prop="sep" :label="this.monthList[8]"></el-table-column>
|
|
|
- <el-table-column prop="oct" :label="this.monthList[9]"></el-table-column>
|
|
|
- <el-table-column prop="nov" :label="this.monthList[10]"></el-table-column>
|
|
|
- <el-table-column prop="dec" :label="this.monthList[11]"></el-table-column>
|
|
|
+ <el-table-column prop="jan" :label="this.monthList[0]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.jan}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.jan" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="feb" :label="this.monthList[1]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.feb}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.feb" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="mar" :label="this.monthList[2]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.mar}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.mar" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="apr" :label="this.monthList[3]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.apr}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.apr" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="may" :label="this.monthList[4]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.may}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.may" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jun" :label="this.monthList[5]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.jun}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.jun" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jul" :label="this.monthList[6]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.jul}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.jul" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="aug" :label="this.monthList[7]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.aug}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.aug" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sep" :label="this.monthList[8]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.sep}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.sep" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="oct" :label="this.monthList[9]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.oct}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.oct" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="nov" :label="this.monthList[10]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.nov}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.nov" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="dec" :label="this.monthList[11]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!costFrEthyleneUpdating">{{row.dec}}</div>
|
|
|
+ <div v-if="costFrEthyleneUpdating">
|
|
|
+ <el-input v-model="row.dec" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="total" label="total"></el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -1835,7 +1945,8 @@ import {
|
|
|
updateAromaticsUtilityConsumption,
|
|
|
updateShoudownHour,
|
|
|
updateRuningRate,
|
|
|
- updateChemicalConsume
|
|
|
+ updateChemicalConsume,
|
|
|
+ updateCostFrEthylene
|
|
|
} from "@/api/production/monthly";
|
|
|
|
|
|
export default {
|
|
@@ -1843,6 +1954,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
// 修改中
|
|
|
+ costFrEthyleneUpdating: false,
|
|
|
chemicalConsumeUpdating: false,
|
|
|
runingRateUpdating: false,
|
|
|
shoudownHourUpdating: false,
|
|
@@ -1901,9 +2013,7 @@ export default {
|
|
|
tableAromaticsUtilityConsumption: [],
|
|
|
tableAromaticsEnergyConsumption: [],
|
|
|
tablePlantLoad: [],
|
|
|
- tableCostFrEthylene: [
|
|
|
- {title: "the cost"},
|
|
|
- ],
|
|
|
+ tableCostFrEthylene: [],
|
|
|
tableRuningRate: [],
|
|
|
tableShoudownHour: [],
|
|
|
tableOtherside: [],
|
|
@@ -2027,6 +2137,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
/** 编辑按钮操作 */
|
|
|
+ handleCostFrEthyleneUpdate(row) {
|
|
|
+ this.costFrEthyleneUpdating = true;
|
|
|
+ },
|
|
|
handleChemicalConsumeUpdate(row) {
|
|
|
this.chemicalConsumeUpdating = true;
|
|
|
},
|
|
@@ -2046,6 +2159,22 @@ export default {
|
|
|
this.eligibleProductRateUpdating = true;
|
|
|
},
|
|
|
/** 确定修改按钮操作 */
|
|
|
+ handleConfirmCostFrEthyleneUpdate(row) {
|
|
|
+ this.costFrEthyleneUpdating = false;
|
|
|
+ updateCostFrEthylene({
|
|
|
+ tableData: this.tableCostFrEthylene,
|
|
|
+ year: this.year.getFullYear()
|
|
|
+ }).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ } else {
|
|
|
+ this.$message.error("未知错误,请联系管理员。");
|
|
|
+ }
|
|
|
+ getCostFrEthylene(year).then(response => {
|
|
|
+ this.tableCostFrEthylene = response.data;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
handleConfirmChemicalConsumeUpdate(row) {
|
|
|
this.chemicalConsumeUpdating = false;
|
|
|
updateChemicalConsume({
|
|
@@ -2182,6 +2311,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
/** 取消修改按钮操作 */
|
|
|
+ handleCancelCostFrEthyleneUpdate(row) {
|
|
|
+ this.costFrEthyleneUpdating = false;
|
|
|
+ getCostFrEthylene(year).then(response => {
|
|
|
+ this.tableCostFrEthylene = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
handleCancelChemicalConsumeUpdate(row) {
|
|
|
this.chemicalConsumeUpdating = false;
|
|
|
getChemicalConsume(year).then(response => {
|
|
@@ -2388,9 +2523,9 @@ export default {
|
|
|
getPlantLoad(year).then(response => {
|
|
|
this.tablePlantLoad = response.data;
|
|
|
});
|
|
|
- // getCostFrEthylene(year).then(response => {
|
|
|
- // this.tableCostFrEthylene = response.data;
|
|
|
- // });
|
|
|
+ getCostFrEthylene(year).then(response => {
|
|
|
+ this.tableCostFrEthylene = response.data;
|
|
|
+ });
|
|
|
getRuningRate(year).then(response => {
|
|
|
this.tableRuningRate = response.data;
|
|
|
});
|