add 砖型“
This commit is contained in:
parent
2dc7550754
commit
4faaf478f4
129
src/views/modules/pms/shape/config.js
Normal file
129
src/views/modules/pms/shape/config.js
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||||
|
import switchBtn from "@/components/noTemplateComponents/switchBtn";
|
||||||
|
import request from "@/utils/request";
|
||||||
|
import { timeFilter } from '@/utils/filters'
|
||||||
|
|
||||||
|
export default function () {
|
||||||
|
const tableProps = [
|
||||||
|
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||||
|
{ prop: "name", label: "砖型名称" },
|
||||||
|
{ prop: "code", label: "砖型编码" },
|
||||||
|
// { prop: "factory", label: "所属工厂" },
|
||||||
|
// { prop: "status", label: "产线状态", subcomponent: switchBtn }, // subcomponent
|
||||||
|
// TODO: 2023.2.3 产线状态切换功能不生效
|
||||||
|
// { prop: "tvalue", label: "每小时下片数量" },
|
||||||
|
{ prop: "specifications", label: "规格" },
|
||||||
|
{ prop: "remark", label: "备注" },
|
||||||
|
{
|
||||||
|
prop: "operations",
|
||||||
|
name: "操作",
|
||||||
|
fixed: "right",
|
||||||
|
width: 120,
|
||||||
|
subcomponent: TableOperaionComponent,
|
||||||
|
options: ["edit", { name: "delete", permission: "pms:shape:delete" }],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const headFormFields = [
|
||||||
|
{
|
||||||
|
prop: 'key',
|
||||||
|
label: "砖型名称/编码",
|
||||||
|
input: true,
|
||||||
|
default: { value: "" },
|
||||||
|
bind: {
|
||||||
|
placeholder: '请输入砖型名称或编码'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "查询",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "新增",
|
||||||
|
permission: "pms:shape:save"
|
||||||
|
},
|
||||||
|
bind: {
|
||||||
|
plain: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件
|
||||||
|
* 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js
|
||||||
|
* 此为后者的配置:
|
||||||
|
*/
|
||||||
|
const dialogJustFormConfigs = {
|
||||||
|
form: {
|
||||||
|
rows: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: "砖型名称",
|
||||||
|
prop: "name",
|
||||||
|
rules: { required: true, message: "not empty", trigger: "blur" },
|
||||||
|
elparams: { placeholder: "请输入砖型名称" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: "砖型编码",
|
||||||
|
prop: "code",
|
||||||
|
rules: { required: true, message: "not empty", trigger: "blur" },
|
||||||
|
elparams: { placeholder: "请输入砖型编码" },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// select: true,
|
||||||
|
// label: "所属工厂",
|
||||||
|
// prop: "factoryId",
|
||||||
|
// fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }),
|
||||||
|
// option: [],
|
||||||
|
// rules: { required: true, message: "not empty", trigger: "change" },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// input: true,
|
||||||
|
// label: "产线TT值",
|
||||||
|
// prop: "tvalue",
|
||||||
|
// rules: [
|
||||||
|
// { required: true, message: "not empty", trigger: "blur" },
|
||||||
|
// { type: "number", message: "数字", trigger: "blur", transform: (val) => Number(val) },
|
||||||
|
// ],
|
||||||
|
// elparams: { placeholder: "设定TT值(每小时下片数量)" },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
[{ input: true, label: "规格", prop: "specifications", elparams: { placeholder: "规格" } }, { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
|
||||||
|
],
|
||||||
|
operations: [
|
||||||
|
{ name: "add", label: "保存", type: "primary", permission: "pms:shape:save", showOnEdit: false },
|
||||||
|
{ name: "update", label: "更新", type: "primary", permission: "pms:shape:update", showOnEdit: true },
|
||||||
|
{ name: "reset", label: "重置", type: "warning", showAlways: true },
|
||||||
|
// { name: 'cancel', label: '取消', showAlways: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
// 备注:弹窗弹出的时间和网速有关......
|
||||||
|
|
||||||
|
return {
|
||||||
|
dialogConfigs: dialogJustFormConfigs,
|
||||||
|
tableConfig: {
|
||||||
|
table: null, // 此处可省略,el-table 上的配置项
|
||||||
|
column: tableProps, // el-column-item 上的配置项
|
||||||
|
},
|
||||||
|
headFormConfigs: {
|
||||||
|
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||||
|
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||||
|
},
|
||||||
|
urls: {
|
||||||
|
base: "/pms/shape",
|
||||||
|
page: "/pms/shape/page",
|
||||||
|
// subase: '/pms/blenderStepParam',
|
||||||
|
// subpage: '/pms/blenderStepParam/page',
|
||||||
|
// more...
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
32
src/views/modules/pms/shape/index.vue
Normal file
32
src/views/modules/pms/shape/index.vue
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<ListViewWithHead :table-config="tableConfig" :head-config="headFormConfigs" :dialog-configs="dialogConfigs" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import initConfig from './config';
|
||||||
|
import ListViewWithHead from '@/views/atomViews/ListViewWithHead.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProductionLineView',
|
||||||
|
components: { ListViewWithHead },
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
urls: this.allUrls
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
|
||||||
|
return {
|
||||||
|
tableConfig,
|
||||||
|
headFormConfigs,
|
||||||
|
allUrls: urls,
|
||||||
|
dialogConfigs,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Reference in New Issue
Block a user