| | |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | label-width="68px" |
| | | label-width="100px" |
| | | label-position="left" |
| | | > |
| | | <el-row type="flex" justify="left"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="选择月份" prop="description"> |
| | | <el-form-item :label="$t('plan.query.selectMonth')" prop="description"> |
| | | <el-date-picker |
| | | clearable |
| | | v-model="queryParams.date" |
| | | type="month" |
| | | value-format="YYYY-MM" |
| | | placeholder="选择月份" |
| | | :placeholder="$t('plan.query.selectMonth')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | <el-col :span="18" style="text-align: right"> |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >查询</el-button |
| | | >{{$t("common.common.query")}}</el-button |
| | | > |
| | | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{$t("common.common.reset")}}</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div class="box_container"> |
| | | <el-row> |
| | | <el-col :span="!clickedTableRef?22:20"> |
| | | <div class="title_text">管路规划产能</div> |
| | | <div class="title_text">{{$t('plan.title.pipePlanCapacity')}}</div> |
| | | </el-col> |
| | | <el-col :span="1" v-if="!clickedTableRef"> |
| | | <el-button |
| | | class="title_btn" |
| | | type="default" |
| | | @click="editRowEvent" >编辑</el-button> |
| | | @click="editRowEvent" >{{$t("common.common.edit")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.8" v-if="clickedTableRef"> |
| | | <el-button |
| | |
| | | @click="saveRowEvent" |
| | | v-hasPermi="['aps:gasPipelineCapacityPlan:add']" |
| | | > |
| | | 保存 |
| | | {{$t("common.common.save")}} |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1" v-if="clickedTableRef"> |
| | | <el-button |
| | | class="title_btn ml20" |
| | | type="default" |
| | | @click="handleCancleStaus">取消</el-button> |
| | | @click="handleCancleStaus">{{$t("common.common.cancel")}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | show-overflow |
| | | :loading="loading" |
| | | :height="height" |
| | | :edit-config="{ trigger: 'click', mode: 'row', showStatus: true }" |
| | | :column-config="{ resizable: true, useKey: true }" |
| | | :data="routePlanList" |
| | | size="small" |
| | | > |
| | | <vxe-column field="processName" title="标准工序名称" min-width="150" fixed="left"> |
| | | <vxe-column field="processName" :width="locale === 'zh' ? '150px' : '200px'" :title="$t('plan.table.satndardProcessName')" fixed="left"> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceType" |
| | | title="日产出类型" |
| | | min-width="160" |
| | | :title="$t('plan.table.dayProduceType')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-select |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceNum" |
| | | title="日产出数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceNum" size="mini" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceUnit" |
| | | title="日产出单位" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceUnit')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input v-model="row.dayProduceUnit" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="personnelNumber" |
| | | title="人员数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.personnelNumber')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.personnelNumber" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceAllNum" |
| | | title="日产出总数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="days" |
| | | title="天数" |
| | | min-width="200" |
| | | :title="$t('plan.table.days')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.days" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="monthProduceAllNum" |
| | | title="月产出数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.monthProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.monthProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="remark" |
| | | title="备注" |
| | | min-width="200" |
| | | :title="$t('plan.table.remark')" |
| | | > |
| | | <!-- :edit-render="{ autoFocus: 'input' }" --> |
| | | <!-- <template #edit="{ row }"> |
| | |
| | | <div class="box_container"> |
| | | <el-row> |
| | | <el-col :span="!clickedTableRefGas?22:20"> |
| | | <div class="title_text">气柜规划产能</div> |
| | | <div class="title_text">{{$t("plan.title.gasPlanCapacity")}}</div> |
| | | </el-col> |
| | | <el-col :span="1" v-if="!clickedTableRefGas"> |
| | | <el-button |
| | | class="title_btn" |
| | | type="default" |
| | | @click="editRowEventGas" >编辑</el-button> |
| | | @click="editRowEventGas" >{{$t("common.common.edit")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.8" v-if="clickedTableRefGas"> |
| | | <el-button |
| | |
| | | @click="saveRowEvent1" |
| | | v-hasPermi="['aps:gasPipelineCapacityPlan:add']" |
| | | > |
| | | 保存 |
| | | {{$t("common.common.save")}} |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1" v-if="clickedTableRefGas"> |
| | | <el-button |
| | | class="title_btn ml20" |
| | | type="default" |
| | | @click="handleCancleStausGas">取消</el-button> |
| | | @click="handleCancleStausGas">{{$t("common.common.cancel")}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="tabel_container"> |
| | |
| | | size="small" |
| | | :loading="loading2" |
| | | :height="height" |
| | | :edit-config="{ mode: 'row', trigger: 'click', showStatus: true }" |
| | | :column-config="{ resizable: true, useKey: true }" |
| | | :data="gasPlanList" |
| | | > |
| | | <vxe-column field="processName" title="标准工序名称" min-width="150" fixed="left"> |
| | | <vxe-column :width="locale === 'zh' ? '150px' : '200px'" field="processName" :title="$t('plan.table.satndardProcessName')" fixed="left"> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceType" |
| | | title="日产出类型" |
| | | min-width="160" |
| | | :title="$t('plan.table.dayProduceType')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-select |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceNum" |
| | | title="日产出数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceNum" size="mini" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceUnit" |
| | | title="日产出单位" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceUnit')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input v-model="row.dayProduceUnit" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="personnelNumber" |
| | | title="人员数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.personnelNumber')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.personnelNumber" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceAllNum" |
| | | title="日产出总数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="days" |
| | | title="天数" |
| | | min-width="200" |
| | | :title="$t('plan.table.days')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.days" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="monthProduceAllNum" |
| | | title="月产出数量" |
| | | min-width="200" |
| | | :title="$t('plan.table.monthProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.monthProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="remark" |
| | | title="备注" |
| | | min-width="200" |
| | | :title="$t('plan.table.remark')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input |
| | |
| | | import { ElMessage } from "element-plus"; |
| | | import { listGasPlan, getGasPlanSave } from "@/api/mainPlan/gasPlanning"; |
| | | const height = ref(document.documentElement.clientHeight - 400 + "px;"); |
| | | import { useI18n } from "vue-i18n"; //要在js中使用国际化 |
| | | const { t, locale } = useI18n(); |
| | | const loading = ref(false); |
| | | const loading2 = ref(false); |
| | | const clickedQuery = ref(false); |
| | |
| | | const $table = tableRef.value; |
| | | if ($table) { |
| | | $table.clearEdit().then(() => { |
| | | // loading.value = true |
| | | loading.value = true |
| | | // setTimeout(() => { |
| | | // loading.value = false |
| | | // VxeUI.modal.message({ content: `保存成功!name=${row.name}`, status: 'success' }) |
| | |
| | | // } |
| | | // }; |
| | | async function getRouteList(year, month) { |
| | | loading.value = true; |
| | | const res = await listGasPlan({ |
| | | major: "管路", |
| | | year, |
| | | month, |
| | | }); |
| | | console.log(res.rows, "getList"); |
| | | routePlanList.value = res.rows; |
| | | routePlanList.value = routePlanList.value.map((item, index) => { |
| | | return { |
| | |
| | | loading.value = false; |
| | | } |
| | | async function getGasList(year, month) { |
| | | loading2.value = true; |
| | | const res = await listGasPlan({ |
| | | major: "气柜", |
| | | year, |
| | |
| | | // row.monthProduceAllNum = row.dayProduceAllNum * row.days; |
| | | // } |
| | | function cellClickEvent(e, row) { |
| | | console.log(row,"cellClickEvent") |
| | | if(row.dayProduceType==="1"){ |
| | | row.dayProduceAllNum = row.dayProduceNum * row.personnelNumber; |
| | | }else{ |
| | |
| | | message: "数据保存成功", |
| | | type: "success", |
| | | }); |
| | | loading.value = false; |
| | | loading2.value = false; |
| | | handleQuery(); |
| | | } |
| | | async function handleSave2(row) { |
| | | const year = queryParams.value.date.split("-")[0]; |
| | | const month = parseInt(queryParams.value.date.split("-")[1]); |
| | | console.log(row, "baocun"); |
| | | // gasPlanList.value = gasPlanList.value.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // major: "气体", |
| | | // year, |
| | | // month, |
| | | // }; |
| | | // }); |
| | | // routePlanList.value = routePlanList.value.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // major: "管路", |
| | | // year, |
| | | // month, |
| | | // }; |
| | | // }); |
| | | const res = await getGasPlanSave([ |
| | | { |
| | | ...row, |
| | | major: "气柜", |
| | | year, |
| | | month, |
| | | }, |
| | | ]); |
| | | ElMessage({ |
| | | message: "数据保存成功", |
| | | type: "success", |
| | | }); |
| | | handleQuery(); |
| | | console.log(res, "akiwjciwj"); |
| | | } |
| | | onMounted(() => { |
| | | // getRouteList(); |
| | | // getGasList(); |
| | | }); |
| | | // async function handleSave2(row) { |
| | | // const year = queryParams.value.date.split("-")[0]; |
| | | // const month = parseInt(queryParams.value.date.split("-")[1]); |
| | | // console.log(row, "baocun"); |
| | | // // gasPlanList.value = gasPlanList.value.map((item) => { |
| | | // // return { |
| | | // // ...item, |
| | | // // major: "气体", |
| | | // // year, |
| | | // // month, |
| | | // // }; |
| | | // // }); |
| | | // // routePlanList.value = routePlanList.value.map((item) => { |
| | | // // return { |
| | | // // ...item, |
| | | // // major: "管路", |
| | | // // year, |
| | | // // month, |
| | | // // }; |
| | | // // }); |
| | | // const res = await getGasPlanSave([ |
| | | // { |
| | | // ...row, |
| | | // major: "气柜", |
| | | // year, |
| | | // month, |
| | | // }, |
| | | // ]); |
| | | // ElMessage({ |
| | | // message: "数据保存成功", |
| | | // type: "success", |
| | | // }); |
| | | // handleQuery(); |
| | | // console.log(res, "akiwjciwj"); |
| | | // } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .box_container { |