update order/DialogJustForm

This commit is contained in:
lb 2023-04-24 11:03:51 +08:00
parent a1ee2214b5
commit 2af219d37a
2 changed files with 336 additions and 336 deletions

View File

@ -65,7 +65,7 @@
:disabled="detailMode" :disabled="detailMode"
v-bind="col.elparams" /> v-bind="col.elparams" />
<div class="" v-if="col.component" style="margin: 42px 0 0"> <div class="" v-if="col.component" style="margin: 32px 0 0">
<!-- 下面这个 component 几乎是为 富文本 quill 定制的了... TODO后续可能会根据业务需求创建新的版本 --> <!-- 下面这个 component 几乎是为 富文本 quill 定制的了... TODO后续可能会根据业务需求创建新的版本 -->
<component <component
:is="col.component" :is="col.component"
@ -75,7 +75,6 @@
:mode="detailMode ? 'detail' : dataForm.id ? 'edit' : 'create'" :mode="detailMode ? 'detail' : dataForm.id ? 'edit' : 'create'"
v-bind="col.bind" /> v-bind="col.bind" />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -126,8 +125,11 @@ export default {
const watchList = []; const watchList = [];
const cachedList = {}; const cachedList = {};
this.configs.form.rows.forEach((row) => { this.configs.form.field.forEach((field) => {
field.rows.forEach((row) => {
row.forEach((col) => { row.forEach((col) => {
if (!col.prop) return;
dataForm[col.prop] = col.default ?? null; dataForm[col.prop] = col.default ?? null;
if (col.fetchData) if (col.fetchData)
@ -178,6 +180,8 @@ export default {
} }
}); });
}); });
});
return { return {
loadingStatus: false, loadingStatus: false,
dataForm, dataForm,
@ -190,7 +194,8 @@ export default {
}, },
mounted() { mounted() {
/** 处理 injectTo 选项 */ /** 处理 injectTo 选项 */
this.configs.form.rows.forEach((row) => { this.configs.form.field.forEach((field) => {
field.rows.forEach((row) => {
row.forEach((col) => { row.forEach((col) => {
if ("injectTo" in col && Array.isArray(col.injectTo)) { if ("injectTo" in col && Array.isArray(col.injectTo)) {
// console.log("watching options ..... ", col); // console.log("watching options ..... ", col);
@ -213,6 +218,7 @@ export default {
} }
}); });
}); });
});
}, },
computed: { computed: {
uploadHeaders() { uploadHeaders() {

View File

@ -270,6 +270,8 @@ export default function () {
{ {
title: '设备与参数', title: '设备与参数',
rows: [ rows: [
[
{ {
input: true, input: true,
label: "生产订单类型", label: "生产订单类型",
@ -306,6 +308,9 @@ export default function () {
fetchData: () => this.$http.get("/pms/equipment/search", { params: { equipmentTypeCode: 'Kiln' } }), fetchData: () => this.$http.get("/pms/equipment/search", { params: { equipmentTypeCode: 'Kiln' } }),
elparams: { placeholder: "请选择隧道窑号", filterable: true }, elparams: { placeholder: "请选择隧道窑号", filterable: true },
}, },
],
[
{ {
select: true, select: true,
label: "牌号", label: "牌号",
@ -358,6 +363,9 @@ export default function () {
// options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })), // options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
elparams: { placeholder: "请选择物料", filterable: true }, elparams: { placeholder: "请选择物料", filterable: true },
}, },
],
[
{ {
select: true, select: true,
label: "砖型", label: "砖型",
@ -402,11 +410,14 @@ export default function () {
// options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })), // options: dictList["unit"].map((u) => ({ label: u.dictLabel, value: u.dictValue })),
elparams: { placeholder: "请选择物料", filterable: true }, elparams: { placeholder: "请选择物料", filterable: true },
}, },
],
] ]
}, },
{ {
title: '其他', title: '其他',
rows: [ rows: [
[
{ {
input: true, input: true,
label: "生产订单砖数", label: "生产订单砖数",
@ -445,6 +456,9 @@ export default function () {
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入addon" }, elparams: { placeholder: "请输入addon" },
}, },
],
[
{ {
input: true, input: true,
label: "销售订单号", label: "销售订单号",
@ -477,6 +491,8 @@ export default function () {
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择销售时间" }, elparams: { placeholder: "请选择销售时间" },
}, },
],
[
{ {
select: true, select: true,
label: "客户", label: "客户",
@ -487,26 +503,6 @@ export default function () {
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择客户" }, elparams: { placeholder: "请选择客户" },
}, },
]
}
],
rows: [
[
],
[
],
[
// { // {
// input: true, // input: true,
// label: "版本号", // label: "版本号",
@ -514,12 +510,6 @@ export default function () {
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, // rules: { required: true, message: "必填项不能为空", trigger: "blur" },
// elparams: { placeholder: "请输入版本号" }, // elparams: { placeholder: "请输入版本号" },
// }, // },
],
[
],
[
// { // {
// input: true, // input: true,
// label: "物料号销售文本", // label: "物料号销售文本",
@ -535,10 +525,11 @@ export default function () {
useBuiltin: false, useBuiltin: false,
}, },
}, },
{},
{},
], ],
[
// 备注 { input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }
[{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
// { // {
// select: true, // select: true,
// label: "原料类别", // label: "原料类别",
@ -548,6 +539,9 @@ export default function () {
// // autoDisabled: true // // autoDisabled: true
// }, // },
], ],
]
}
],
operations: [ operations: [
{ name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false }, { name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
{ name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true }, { name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },