This commit is contained in:
lb 2023-03-10 15:59:56 +08:00
parent c4b8a642ea
commit 8e5f668a41
2 changed files with 106 additions and 94 deletions

View File

@ -23,8 +23,8 @@ function changeOrderSort(orderId, location) {
export default function () { export default function () {
const operations = { const operations = {
ongoing: [ ongoing: [
// { name: 'view-detail', label: '查看详情' },
// { name: 'confirm-order', label: '确认', icon: 'success', showText: true }, // { name: 'confirm-order', label: '确认', icon: 'success', showText: true },
{ name: 'view', label: '查看详情' },
{ name: "end-order", label: "结束", icon: "error", showText: true }, { name: "end-order", label: "结束", icon: "error", showText: true },
{ name: "move-up", label: "上移", icon: "caret-top", showText: true }, { name: "move-up", label: "上移", icon: "caret-top", showText: true },
{ name: "move-down", label: "下移", icon: "caret-bottom", showText: true }, { name: "move-down", label: "下移", icon: "caret-bottom", showText: true },
@ -34,6 +34,7 @@ export default function () {
], ],
pending: [ pending: [
"edit", "edit",
{ name: 'view', label: '查看详情' },
{ name: "confirm-order", label: "确认订单", icon: "success", showText: true }, { name: "confirm-order", label: "确认订单", icon: "success", showText: true },
{ name: "move-up", label: "上移", icon: "caret-top", showText: true }, { name: "move-up", label: "上移", icon: "caret-top", showText: true },
{ name: "move-down", label: "下移", icon: "caret-bottom", showText: true }, { name: "move-down", label: "下移", icon: "caret-bottom", showText: true },
@ -42,6 +43,8 @@ export default function () {
{ name: "delete", emitFull: true, permission: "" }, { name: "delete", emitFull: true, permission: "" },
], ],
finished: [ finished: [
{ name: 'view', label: '查看详情' },
{} // 占位
// { name: 'view', label: '查看详情' } // { name: 'view', label: '查看详情' }
// { name: 'end-order', label: '结束订单', icon: 'error', showText: true }, // { name: 'end-order', label: '结束订单', icon: 'error', showText: true },
], ],
@ -75,102 +78,111 @@ export default function () {
{ width: 120, prop: "deliveryTime", label: "发货时间" }, { width: 120, prop: "deliveryTime", label: "发货时间" },
{ width: 120, prop: "customerCode", label: "客户" }, { width: 120, prop: "customerCode", label: "客户" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ prop: "description", label: "详情", subcomponent: TableTextComponent }, // { prop: "description", label: "详情", subcomponent: TableTextComponent },
{ width: 200, prop: "remark", label: "备注" }, { width: 200, prop: "remark", label: "备注" },
type !== "finished" {
? { prop: "operations",
prop: "operations", name: "操作",
name: "操作", fixed: "right",
fixed: "right", subcomponent: TableOperaionComponent,
subcomponent: TableOperaionComponent, options: operations[type],
options: operations[type], width: operations[type].length * 64,
width: operations[type].length * 64, }
}
: {}, // type !== "finished"
// ? {
// prop: "operations",
// name: "操作",
// fixed: "right",
// subcomponent: TableOperaionComponent,
// options: operations[type],
// width: operations[type].length * 64,
// }
// : {},
]; ];
const genHeadFormFields = (type) => const genHeadFormFields = (type) =>
({ ({
ongoing: [ ongoing: [
{ {
label: "订单号", label: "订单号",
prop: "code", prop: "code",
input: true, input: true,
default: { value: "" }, default: { value: "" },
bind: { placeholder: "请输入订单号" }, bind: { placeholder: "请输入订单号" },
},
{
// 时间段
timerange: true,
prop: "timerange",
label: "时间段",
bind: {
placeholder: "选择日期时间",
type: "datetimerange",
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
}, },
{ },
// 时间段 {
timerange: true, // 查询
prop: "timerange", button: {
label: "时间段", type: "primary",
bind: { name: "查询",
placeholder: "选择日期时间",
type: "datetimerange",
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
}, },
{ },
// 查询 ],
button: { pending: [
type: "primary", {
name: "查询", label: "订单号",
}, prop: "code",
input: true,
bind: { placeholder: "请输入订单号" },
},
{
// 查询
button: {
type: "primary",
name: "查询",
}, },
], },
pending: [ {
{ // 新增订单
label: "订单号", button: {
prop: "code", type: "primary",
input: true, name: "新增",
bind: { placeholder: "请输入订单号" }, permission: "",
}, },
{ bind: {
// 查询 plain: true,
button: {
type: "primary",
name: "查询",
},
}, },
{ },
// 新增订单 {
button: { // 导入订单 - TODO: 需完善具体接口和功能
type: "primary", button: {
name: "新增", type: "success",
permission: "", name: "导入订单",
},
bind: {
plain: true,
},
}, },
{ bind: {
// 导入订单 - TODO: 需完善具体接口和功能 plain: true,
button: {
type: "success",
name: "导入订单",
},
bind: {
plain: true,
},
}, },
], },
finished: [ ],
{ finished: [
label: "订单号", {
prop: "code", label: "订单号",
input: true, prop: "code",
bind: { placeholder: "请输入订单号" }, input: true,
bind: { placeholder: "请输入订单号" },
},
{
// 查询
button: {
type: "primary",
name: "查询",
}, },
{ },
// 查询 ],
button: { }[type]);
type: "primary",
name: "查询",
},
},
],
}[type]);
const textOnlyComponent = { const textOnlyComponent = {
props: { props: {
@ -294,7 +306,7 @@ export default function () {
{ {
input: true, input: true,
label: "Add on", label: "Add on",
prop: "addon", prop: "sapParam1",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请输入addon" }, elparams: { placeholder: "请输入addon" },
}, },
@ -325,15 +337,15 @@ export default function () {
{ {
select: true, select: true,
label: "牌号", label: "牌号",
prop: "brand", prop: "bomId",
options: [], options: [],
// optionLabel: '', // optionLabel: '',
fetchData: () => this.$http.get("/pms/bom/page", { params: { limit: 999, page: 1, key: "", externalCode: "" } }), fetchData: () => this.$http.get("/pms/bom/page", { params: { limit: 999, page: 1, key: "", externalCode: "" } }),
elparams: { placeholder: "请选择牌号", filterable: true }, elparams: { placeholder: "请选择牌号", filterable: true },
// TODO: 选择后,需要带出一些数据 // TODO: 选择后,需要带出一些数据
injectTo: [ injectTo: [
[ 'bomCode', 'code' ], ['bomCode', 'code'],
[ 'ai', 'externalCode' ] ['ai', 'externalCode']
] ]
}, },
{ {
@ -381,7 +393,7 @@ export default function () {
{ {
input: true, input: true,
label: "烧成温度 ℃", label: "烧成温度 ℃",
prop: "ktmp", prop: "sapParam6",
rules: [ rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" }, { required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) }, { type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },
@ -389,7 +401,7 @@ export default function () {
elparams: { placeholder: "请输入烧成温度" }, elparams: { placeholder: "请输入烧成温度" },
}, },
// { // {
// input: true, // input: true,
// label: "版本号", // label: "版本号",
// prop: "ai", // prop: "ai",
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, // rules: { required: true, message: "必填项不能为空", trigger: "blur" },
@ -400,7 +412,7 @@ export default function () {
{ {
input: true, input: true,
label: "烧成时间 H", label: "烧成时间 H",
prop: "tt", prop: "sapParam7",
rules: [ rules: [
{ required: true, message: "必填项不能为空", trigger: "blur" }, { required: true, message: "必填项不能为空", trigger: "blur" },
{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) }, { type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) },

View File

@ -147,7 +147,7 @@ export default {
.inner-sidebar { .inner-sidebar {
position: fixed; position: fixed;
width: 240px; width: 128px;
margin-right: 16px; margin-right: 16px;
padding: 8px 0; padding: 8px 0;
/* min-height: inherit; */ /* min-height: inherit; */
@ -181,7 +181,7 @@ export default {
.list-view-with-head-list { .list-view-with-head-list {
width: 1px; width: 1px;
margin-left: 256px; margin-left: 144px;
flex-grow: 1; flex-grow: 1;
} }
</style> </style>