This commit is contained in:
lb 2023-03-30 13:38:20 +08:00
parent 0268af8557
commit a5a28de3cf
4 changed files with 37 additions and 33 deletions

View File

@ -445,7 +445,8 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功"); this.$message.success(method === "POST" ? "添加成功" : "更新成功");
this.$emit("refreshDataList"); this.$emit("refreshDataList");
if (method === "POST") this.handleClose(); // if (method === "POST") this.handleClose();
this.handleClose();
} else { } else {
this.$message({ this.$message({
message: `${res.code}: ${res.msg}`, message: `${res.code}: ${res.msg}`,

View File

@ -12,11 +12,11 @@ export default function () {
{ prop: "code", label: "料仓编码" }, { prop: "code", label: "料仓编码" },
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') }, { prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "material", label: "物料" }, // { prop: "material", label: "物料" },
{ prop: "materialTypeDictValue", label: "物料类型", filter: dictFilter('material_category') }, // { prop: "materialTypeDictValue", label: "物料类型", filter: dictFilter('material_category') },
{ prop: "density", label: "物料堆积密度" }, // { prop: "density", label: "物料堆积密度" },
{ prop: "dosLow", label: "加料下限" }, // { prop: "dosLow", label: "加料下限" },
{ prop: "dosHigh", label: "加料上限" }, // { prop: "dosHigh", label: "加料上限" },
{ prop: "description", label: "描述" }, { prop: "description", label: "描述" },
{ prop: "remark", label: "备注" }, { prop: "remark", label: "备注" },
{ {
@ -74,6 +74,8 @@ 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: "料仓编码",
@ -96,15 +98,15 @@ export default function () {
rules: { required: true, message: "必填项不能为空", trigger: "change" }, rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { placeholder: "请选择料仓类型" }, elparams: { placeholder: "请选择料仓类型" },
}, },
{ // {
select: true, // select: true,
label: "物料", // label: "物料",
prop: "materialId", // prop: "materialId",
fetchData: () => this.$http.get("/pms/material/page", { params: { key: '', limit: 999, page: 1 } }), // fetchData: () => this.$http.get("/pms/material/page", { params: { key: '', limit: 999, page: 1 } }),
options: [], // options: [],
rules: { required: true, message: "必填项不能为空", trigger: "change" }, // rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { placeholder: "请选择物料" }, // elparams: { placeholder: "请选择物料" },
}, // },
// { // {
// input: true, // input: true,
// label: "加料下限", // label: "加料下限",

View File

@ -12,9 +12,9 @@ export default function () {
{ prop: "code", label: "料仓编码" }, { prop: "code", label: "料仓编码" },
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') }, { prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
{ prop: "material", label: "料" }, { prop: "material", label: "料" },
{ prop: "materialTypeDictValue", label: "料类型", filter: dictFilter('material_category') }, { prop: "materialTypeDictValue", label: "料类型", filter: dictFilter('material_category') },
{ prop: "density", label: "料堆积密度" }, { prop: "density", label: "料堆积密度" },
{ prop: "dosLow", label: "加料下限" }, { prop: "dosLow", label: "加料下限" },
{ prop: "dosHigh", label: "加料上限" }, { prop: "dosHigh", label: "加料上限" },
{ prop: "description", label: "描述" }, { prop: "description", label: "描述" },
@ -46,16 +46,16 @@ export default function () {
name: "查询", name: "查询",
}, },
}, },
{ // {
button: { // button: {
type: "primary", // type: "primary",
name: "新增", // name: "新增",
permission: "pms:materialStorage:save" // permission: "pms:materialStorage:save"
}, // },
bind: { // bind: {
plain: true, // plain: true,
} // }
}, // },
]; ];
/** /**
@ -98,12 +98,12 @@ export default function () {
}, },
{ {
select: true, select: true,
label: "料", label: "料",
prop: "materialId", prop: "materialId",
fetchData: () => this.$http.get("/pms/material/page", { params: { key: '', limit: 999, page: 1 } }), fetchData: () => this.$http.get("/pms/material/page", { params: { key: '', limit: 999, page: 1 } }),
options: [], options: [],
rules: { required: true, message: "必填项不能为空", trigger: "change" }, rules: { required: true, message: "必填项不能为空", trigger: "change" },
elparams: { placeholder: "请选择料" }, elparams: { placeholder: "请选择料" },
}, },
// { // {
// input: true, // input: true,

View File

@ -12,7 +12,8 @@ export default function () {
{ prop: "endTime", label: "结束上料时间", filter: timeFilter }, { prop: "endTime", label: "结束上料时间", filter: timeFilter },
{ prop: "material", label: "物料" }, { prop: "material", label: "物料" },
{ prop: "qty", label: "上料数量" }, { prop: "qty", label: "上料数量" },
{ prop: "storeCode", label: "料仓" }, // { prop: "storeCode", label: "料仓" },
{ prop: "storeName", label: "料仓" },
{ prop: "upPos", label: "上料位点" }, { prop: "upPos", label: "上料位点" },
// { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] }, // { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] },
// { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent // { prop: "enabled", label: "状态", subcomponent: switchBtn }, // subcomponent
@ -59,13 +60,13 @@ export default function () {
const headFormFields = [ const headFormFields = [
{ {
prop: "materialId", prop: "materialId",
label: "料", label: "料",
// default: { value: "" }, // default: { value: "" },
select: [], select: [],
// 绑定数据获取函数 // 绑定数据获取函数
fn: () => this.$http.get("/pms/material/page", { params: { page: 1, limit: 999 } }), fn: () => this.$http.get("/pms/material/page", { params: { page: 1, limit: 999 } }),
bind: { bind: {
placeholder: "请选择料", placeholder: "请选择料",
filterable: true, filterable: true,
}, },
}, },