add 混料批次详情页面
This commit is contained in:
parent
a94d5c2715
commit
d3bb18dd62
84
src/views/modules/pms/blenderBatchDetails/config.js
Normal file
84
src/views/modules/pms/blenderBatchDetails/config.js
Normal file
@ -0,0 +1,84 @@
|
||||
// import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||
// import TableTextComponent from "@/components/noTemplateComponents/detailComponent";
|
||||
// import StatusComponent from "@/components/noTemplateComponents/statusComponent";
|
||||
import { timeFilter } from "@/utils/filters";
|
||||
|
||||
export default function () {
|
||||
const tableProps = [
|
||||
{ type: "index", label: "序号" },
|
||||
{ width: 160, prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||
{ prop: "batchId", label: "混料批次ID" },
|
||||
{ prop: "materialCode", label: "原料编码" },
|
||||
{ prop: "qty", label: "计算用量" },
|
||||
{ prop: "realqty", label: "实际用量" },
|
||||
// {
|
||||
// prop: "operations",
|
||||
// name: "操作",
|
||||
// fixed: "right",
|
||||
// width: 120,
|
||||
// subcomponent: TableOperaionComponent,
|
||||
// options: [{ name: 'edit', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }] // 只有 injectRow.task 为手动时,才允许编辑
|
||||
// },
|
||||
];
|
||||
|
||||
const headFormFields = [
|
||||
{
|
||||
label: '批次详情'
|
||||
},
|
||||
// {
|
||||
// button: {
|
||||
// type: "plain",
|
||||
// name: "新增",
|
||||
// permission: "",
|
||||
// },
|
||||
// },
|
||||
];
|
||||
|
||||
// const dialogJustFormConfigs = {
|
||||
// // extra blenderOrderId
|
||||
// // extraIds: {},
|
||||
// form: {
|
||||
// rows: [
|
||||
// [
|
||||
// {
|
||||
// input: true,
|
||||
// label: "批次编码",
|
||||
// prop: "batchNo",
|
||||
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
// elparams: { placeholder: "请输入批次编码" },
|
||||
// },
|
||||
// {
|
||||
// input: true,
|
||||
// label: "批次重量",
|
||||
// prop: "batchSize",
|
||||
// rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
// elparams: { placeholder: "请输入批次重量" },
|
||||
// },
|
||||
// ],
|
||||
// ],
|
||||
// operations: [
|
||||
// { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
|
||||
// { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },
|
||||
// { name: "reset", label: "重置", type: "warning", showAlways: true },
|
||||
// ],
|
||||
// },
|
||||
// };
|
||||
|
||||
return {
|
||||
dialogConfigs: null,
|
||||
tableConfig: {
|
||||
table: null, // 此处可省略,el-table 上的配置项
|
||||
column: tableProps, // el-column-item 上的配置项
|
||||
},
|
||||
headFormConfigs: {
|
||||
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||
},
|
||||
urls: {
|
||||
base: "/pms/blenderDetail",
|
||||
page: "/pms/blenderDetail/page",
|
||||
// pageIsPostApi: true, // 使用post接口来获取page数据,极少用,目前基本上只有工艺管理模块里在用
|
||||
// subase: "/pms/equipmentTechParam",
|
||||
},
|
||||
};
|
||||
}
|
57
src/views/modules/pms/blenderBatchDetails/index.vue
Normal file
57
src/views/modules/pms/blenderBatchDetails/index.vue
Normal file
@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<ListViewWithHead
|
||||
:table-config="tableConfig"
|
||||
:head-config="headFormConfigs"
|
||||
:dialog-configs="dialogConfigs"
|
||||
:trigger-update="triggerUpdateKey"
|
||||
:list-query-extra="[{ batchId: id }]"
|
||||
/>
|
||||
<!-- attach-list-query-extra="blenderOrderId" -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initConfig from "./config";
|
||||
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
|
||||
|
||||
export default {
|
||||
name: "BlenderBatchView",
|
||||
components: { ListViewWithHead },
|
||||
provide() {
|
||||
return {
|
||||
urls: this.allUrls,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 混料订单id
|
||||
id() {
|
||||
return this.$route.query.batchId || "";
|
||||
},
|
||||
},
|
||||
data() {
|
||||
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
|
||||
return {
|
||||
tableConfig,
|
||||
headFormConfigs,
|
||||
allUrls: urls,
|
||||
dialogConfigs,
|
||||
triggerUpdateKey: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (route) {
|
||||
if (route.query.batchId) {
|
||||
this.triggerUpdateKey = Math.random().toString()
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
Loading…
Reference in New Issue
Block a user