fix:el-drawer缓存显示问题-订单管理
This commit is contained in:
parent
4843e7a6d1
commit
c7887fc5f2
|
@ -31,6 +31,7 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:params="query"
|
:params="query"
|
||||||
|
:query="query"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="订单编号" prop="number">
|
<el-table-column label="订单编号" prop="number">
|
||||||
|
@ -119,9 +120,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>
|
v-model="dialog.detail"
|
||||||
</el-drawer>
|
:orderId="orderId"
|
||||||
|
ref="detailDialogs"
|
||||||
|
@closed="dialog.detail = false"
|
||||||
|
>
|
||||||
|
</detail-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./order_form.vue";
|
import saveDialog from "./order_form.vue";
|
||||||
|
@ -184,11 +189,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.$router.push({
|
this.$nextTick(() => {
|
||||||
// name: "samOrderitem",
|
this.$refs.detailDialogs.open();
|
||||||
// query: { order: row.id }
|
});
|
||||||
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
|
@ -208,7 +211,6 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
|
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
if (mode == "add") {
|
if (mode == "add") {
|
||||||
|
|
|
@ -1,97 +1,108 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="padding: 8px">
|
<el-drawer
|
||||||
<div>
|
v-model="visible"
|
||||||
<el-card style="width: 100%" header="基本信息" shadow="hover">
|
title="订单详情"
|
||||||
<el-descriptions>
|
:size="'90%'"
|
||||||
<el-descriptions-item label="订单编号">{{
|
destroy-on-close
|
||||||
orderObj.number
|
@closed="$emit('closed')"
|
||||||
}}</el-descriptions-item>
|
>
|
||||||
<el-descriptions-item label="客户">{{
|
<div style="padding: 8px">
|
||||||
orderObj.customer_name
|
<div>
|
||||||
}}</el-descriptions-item>
|
<el-card style="width: 100%" header="基本信息" shadow="hover">
|
||||||
<el-descriptions-item label="订单状态">{{
|
<el-descriptions>
|
||||||
orderObj.state
|
<el-descriptions-item label="订单编号">{{
|
||||||
}}</el-descriptions-item>
|
orderObj.number
|
||||||
<el-descriptions-item label="截止交货">{{
|
}}</el-descriptions-item>
|
||||||
orderObj.delivery_date
|
<el-descriptions-item label="客户">{{
|
||||||
}}</el-descriptions-item>
|
orderObj.customer_name
|
||||||
</el-descriptions>
|
}}</el-descriptions-item>
|
||||||
</el-card>
|
<el-descriptions-item label="订单状态">{{
|
||||||
</div>
|
orderObj.state
|
||||||
<div style="height: 8px"></div>
|
}}</el-descriptions-item>
|
||||||
<div>
|
<el-descriptions-item label="截止交货">{{
|
||||||
<el-card style="width: 100%" header="订单明细" shadow="hover">
|
orderObj.delivery_date
|
||||||
<div>
|
}}</el-descriptions-item>
|
||||||
<el-button
|
</el-descriptions>
|
||||||
type="primary"
|
</el-card>
|
||||||
icon="el-icon-plus"
|
</div>
|
||||||
@click="table_add"
|
<div style="height: 8px"></div>
|
||||||
v-auth="'order.update'"
|
<div>
|
||||||
></el-button>
|
<el-card style="width: 100%" header="订单明细" shadow="hover">
|
||||||
</div>
|
<div>
|
||||||
<scTable
|
<el-button
|
||||||
ref="table"
|
type="primary"
|
||||||
:apiObj="apiObj"
|
icon="el-icon-plus"
|
||||||
row-key="id"
|
@click="table_add"
|
||||||
stripe
|
v-auth="'order.update'"
|
||||||
:params="params"
|
></el-button>
|
||||||
hidePagination
|
</div>
|
||||||
>
|
<scTable
|
||||||
<el-table-column type="index" width="50" />
|
ref="table"
|
||||||
<el-table-column
|
:apiObj="apiObj"
|
||||||
label="所需产品"
|
row-key="id"
|
||||||
prop="material"
|
stripe
|
||||||
show-overflow-tooltip
|
:params="params"
|
||||||
|
hidePagination
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<el-table-column type="index" width="50" />
|
||||||
<span v-if="scope.row.material_">
|
<el-table-column
|
||||||
{{ scope.row.material_.name }}</span
|
label="所需产品"
|
||||||
>
|
prop="material"
|
||||||
</template>
|
show-overflow-tooltip
|
||||||
</el-table-column>
|
>
|
||||||
<!-- <el-table-column label="关联订单" prop="order" show-overflow-tooltip>
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_">
|
||||||
|
{{ scope.row.material_.name }}</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="关联订单" prop="order" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.order_"> {{ scope.row.order_.name }}</span>
|
<span v-if="scope.row.order_"> {{ scope.row.order_.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</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
|
||||||
</el-table-column>
|
label="已交货数量"
|
||||||
<el-table-column
|
prop="delivered_count"
|
||||||
label="创建时间"
|
>
|
||||||
prop="create_time"
|
</el-table-column>
|
||||||
show-overflow-tooltip
|
<el-table-column
|
||||||
>
|
label="创建时间"
|
||||||
</el-table-column>
|
prop="create_time"
|
||||||
<el-table-column
|
show-overflow-tooltip
|
||||||
label="操作"
|
>
|
||||||
fixed="right"
|
</el-table-column>
|
||||||
align="center"
|
<el-table-column
|
||||||
width="100px"
|
label="操作"
|
||||||
>
|
fixed="right"
|
||||||
<template #default="scope">
|
align="center"
|
||||||
<el-link
|
width="100px"
|
||||||
type="primary"
|
>
|
||||||
@click="table_edit(scope.row)"
|
<template #default="scope">
|
||||||
v-auth="'order.update'"
|
<el-link
|
||||||
>
|
type="primary"
|
||||||
编辑
|
@click="table_edit(scope.row)"
|
||||||
</el-link>
|
v-auth="'order.update'"
|
||||||
<el-divider direction="vertical"></el-divider>
|
>
|
||||||
<el-link
|
编辑
|
||||||
type="danger"
|
</el-link>
|
||||||
@click="table_del(scope.row)"
|
<el-divider direction="vertical"></el-divider>
|
||||||
v-auth="'order.delete'"
|
<el-link
|
||||||
>
|
type="danger"
|
||||||
删除
|
@click="table_del(scope.row)"
|
||||||
</el-link>
|
v-auth="'order.delete'"
|
||||||
</template>
|
>
|
||||||
</el-table-column>
|
删除
|
||||||
</scTable>
|
</el-link>
|
||||||
</el-card>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</el-drawer>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
|
@ -128,14 +139,17 @@ export default {
|
||||||
30: "在修",
|
30: "在修",
|
||||||
40: "禁用",
|
40: "禁用",
|
||||||
},
|
},
|
||||||
|
visible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
this.params.order = this.orderId;
|
|
||||||
this.apiObj = this.$API.sam.orderitem.list;
|
|
||||||
this.getOrder();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.visible = true;
|
||||||
|
this.params.order = this.orderId;
|
||||||
|
this.apiObj = this.$API.sam.orderitem.list;
|
||||||
|
this.getOrder();
|
||||||
|
},
|
||||||
getOrder() {
|
getOrder() {
|
||||||
this.$API.sam.order.item.req(this.orderId).then((res) => {
|
this.$API.sam.order.item.req(this.orderId).then((res) => {
|
||||||
this.orderObj = res;
|
this.orderObj = res;
|
||||||
|
|
Loading…
Reference in New Issue