Browse Source

update 子订单进度-查看批次-批次详情

docs_0727
lb 1 year ago
parent
commit
c71c49151c
2 changed files with 15 additions and 23 deletions
  1. +10
    -21
      src/views/modules/pms/order/components/BatchDialog--detail.vue
  2. +5
    -2
      src/views/modules/pms/order/components/BatchDialog.vue

+ 10
- 21
src/views/modules/pms/order/components/BatchDialog--detail.vue View File

@@ -2,17 +2,17 @@
<el-dialog <el-dialog
class="batch-dialog" class="batch-dialog"
title="批次详情" title="批次详情"
width="85%"
width="65%"
:visible="visible" :visible="visible"
@close="handleClose" @close="handleClose"
@closed="$emit('destroy')" @closed="$emit('destroy')"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-row>
<!-- <el-row>
<el-col style="text-align: right"> <el-col style="text-align: right">
<el-button type="text" @click="handleOperate({ type: 'create' })" icon="el-icon-plus">新增</el-button> <el-button type="text" @click="handleOperate({ type: 'create' })" icon="el-icon-plus">新增</el-button>
</el-col> </el-col>
</el-row>
</el-row> -->
<!-- list --> <!-- list -->
<BaseListTable <BaseListTable
:key="Math.random()" :key="Math.random()"
@@ -21,7 +21,6 @@
:table-data="dataList" :table-data="dataList"
:current-page="page" :current-page="page"
:current-size="limit" :current-size="limit"
@operate-event="handleOperate"
:refresh-layout-key="refreshLayoutKey" /> :refresh-layout-key="refreshLayoutKey" />


<el-pagination <el-pagination
@@ -41,26 +40,16 @@


<script> <script>
import BaseListTable from "@/components/BaseListTable.vue"; import BaseListTable from "@/components/BaseListTable.vue";
import TableTextComponent from "@/components/noTemplateComponents/detailComponent";
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
import { timeFilter } from "@/utils/filters"; import { timeFilter } from "@/utils/filters";


export default { export default {
name: "BatchDialog--detail", name: "BatchDialog--detail",
components: { BaseListTable }, components: { BaseListTable },
props: {
configs: {
type: Object,
default: () => ({
clickModalToClose: false,
forms: null,
}),
},
},
props: [],
data() { data() {
return { return {
visible: false, visible: false,
blenderOrderId: null, // 用来获取批次列表
batchId: null,
loading: false, loading: false,
limit: 20, limit: 20,
page: 1, page: 1,
@@ -92,7 +81,7 @@ export default {
init(id) { init(id) {
this.visible = true; this.visible = true;
console.log("[BatchDialog--detail] init", id); console.log("[BatchDialog--detail] init", id);
this.blenderOrderId = id;
this.batchId = id;
this.getBatchDetailList(); this.getBatchDetailList();
}, },


@@ -102,11 +91,11 @@ export default {
try { try {
const { const {
data: { code, data, msg }, data: { code, data, msg },
} = await this.$http.get("/pms/blenderBatch/pageView", {
} = await this.$http.get("/pms/blenderDetail/pageView", {
params: { params: {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
blenderOrderId: this.blenderOrderId,
batchId: this.batchId,
}, },
}); });
console.log("[BatchDialog] getBatchList", data); console.log("[BatchDialog] getBatchList", data);
@@ -119,7 +108,7 @@ export default {
// this.dataList = data; // this.dataList = data;
this.tableLoading = false; this.tableLoading = false;
} catch (err) { } catch (err) {
this.$message.error("message" in err ? err.message : err);
this.$message.error(typeof err == "object" && "message" in err ? err.message : err);
} }
}, },


@@ -132,6 +121,6 @@ export default {


<style scoped> <style scoped>
.batch-dialog >>> .el-dialog__body { .batch-dialog >>> .el-dialog__body {
padding: 0 20px;
padding: 8px 20px !important;
} }
</style> </style>

+ 5
- 2
src/views/modules/pms/order/components/BatchDialog.vue View File

@@ -45,7 +45,6 @@
<BatchDialogDetail <BatchDialogDetail
v-if="detailDialogVisible" v-if="detailDialogVisible"
ref="batchDialogDetail" ref="batchDialogDetail"
:blender-order-id="blenderOrderId"
@refreshDataList="getBatchList" @refreshDataList="getBatchList"
@destroy="detailDialogVisible = false" /> @destroy="detailDialogVisible = false" />


@@ -194,7 +193,11 @@ export default {
this.$refs.batchDialogEdit.init(); this.$refs.batchDialogEdit.init();
}); });
break; break;
case "查看详情":
case "view-blender-batch-details":
this.detailDialogVisible = true;
this.$nextTick(() => {
this.$refs.batchDialogDetail.init(data);
});
break; break;
case "edit": case "edit":
this.editDialogVisible = true; this.editDialogVisible = true;


Loading…
Cancel
Save