fix:el-drawer缓存显示问题-采购计划

This commit is contained in:
shijing 2024-05-30 09:53:17 +08:00
parent c2034fc737
commit 4843e7a6d1
4 changed files with 266 additions and 239 deletions

View File

@ -125,9 +125,13 @@
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
></save-dialog> ></save-dialog>
<el-drawer title="订单详情" v-model="dialog.detail" :size="'90%'"> <detail-dialog
<detail-dialog :orderId="orderId" ref="detailDialogs"> </detail-dialog> ref="detailDialogs"
</el-drawer> v-if="dialog.detail"
:orderId="orderId"
@closed="dialog.detail = false"
>
</detail-dialog>
</template> </template>
<script> <script>
import saveDialog from "./order_form.vue"; import saveDialog from "./order_form.vue";
@ -177,14 +181,9 @@ export default {
table_detail(row) { table_detail(row) {
this.orderId = row.id; this.orderId = row.id;
this.dialog.detail = true; this.dialog.detail = true;
// this.$nextTick(() => { this.$nextTick(() => {
// this.$router.push({ this.$refs.detailDialogs.open();
// name: "orderitem", });
// query: {
// pu_order: row.id,
// },
// });
// });
}, },
table_submit(row) { table_submit(row) {
this.$API.pum.order.submit.req(row.id).then((res) => { this.$API.pum.order.submit.req(row.id).then((res) => {

View File

@ -1,4 +1,11 @@
<template> <template>
<el-drawer
v-model="visible"
title="订单详情"
:size="'90%'"
destroy-on-close
@closed="$emit('closed')"
>
<div style="padding: 8px"> <div style="padding: 8px">
<div> <div>
<el-card style="width: 100%" header="基本信息" shadow="hover"> <el-card style="width: 100%" header="基本信息" shadow="hover">
@ -68,7 +75,10 @@
</el-table-column> </el-table-column>
<el-table-column label="所需数量" prop="count"> <el-table-column label="所需数量" prop="count">
</el-table-column> </el-table-column>
<el-table-column label="已到货数量" prop="delivered_count"> <el-table-column
label="已到货数量"
prop="delivered_count"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="创建时间" label="创建时间"
@ -113,6 +123,7 @@
</el-card> </el-card>
</div> </div>
</div> </div>
</el-drawer>
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"
@ -163,6 +174,7 @@ export default {
30: "到货中", 30: "到货中",
40: "已完成", 40: "已完成",
}, },
visible: false,
}; };
}, },
mounted() { mounted() {
@ -172,6 +184,9 @@ export default {
this.getOrder(); this.getOrder();
}, },
methods: { methods: {
open() {
this.visible = true;
},
getOrder() { getOrder() {
this.$API.pum.order.item.req(this.puOrder).then((res) => { this.$API.pum.order.item.req(this.puOrder).then((res) => {
this.orderObj = res; this.orderObj = res;

View File

@ -107,9 +107,13 @@
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
></save-dialog> ></save-dialog>
<el-drawer title="计划详情" v-model="dialog.detail" :size="'90%'"> <detail-dialog
<detail-dialog :planId="planId" ref="detailDialogs"> </detail-dialog> ref="detailDialogs"
</el-drawer> v-if="dialog.detail"
:planId="planId"
@closed="dialog.detail = false"
>
</detail-dialog>
</template> </template>
<script> <script>
import saveDialog from "./plan_form.vue"; import saveDialog from "./plan_form.vue";
@ -155,12 +159,9 @@ export default {
table_detail(row) { table_detail(row) {
this.planId = row.id; this.planId = row.id;
this.dialog.detail = true; this.dialog.detail = true;
// this.$nextTick(() => { this.$nextTick(() => {
// this.$router.push({ this.$refs.detailDialogs.open();
// name: "planitem", });
// query: { pu_plan: row.id },
// });
// });
}, },
// //
table_edit(row) { table_edit(row) {

View File

@ -1,4 +1,11 @@
<template> <template>
<el-drawer
v-model="visible"
title="计划详情"
:size="'90%'"
destroy-on-close
@closed="$emit('closed')"
>
<div style="padding: 8px"> <div style="padding: 8px">
<div> <div>
<el-card style="width: 100%" header="基本信息" shadow="hover"> <el-card style="width: 100%" header="基本信息" shadow="hover">
@ -105,6 +112,7 @@
</el-card> </el-card>
</div> </div>
</div> </div>
</el-drawer>
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"
@ -146,16 +154,20 @@ export default {
40: "下单完成", 40: "下单完成",
40: "已完成", 40: "已完成",
}, },
visible: false,
}; };
}, },
mounted() { mounted() {
this.puPlan = this.planId; this.puPlan = this.planId;
this.query.pu_plan = this.planId; this.query.pu_plan = this.planId;
this.apiObj = this.$API.pum.planitem.list; this.apiObj = this.$API.pum.planitem.list;
this.$refs.table.refresh(); // this.$refs.table.refresh();
this.getOrder(); this.getOrder();
}, },
methods: { methods: {
open() {
this.visible = true;
},
getOrder() { getOrder() {
this.$API.pum.plan.item.req(this.puPlan).then((res) => { this.$API.pum.plan.item.req(this.puPlan).then((res) => {
this.orderObj = res; this.orderObj = res;