This commit is contained in:
lb 2023-03-24 16:06:29 +08:00
parent 766de83deb
commit 13561c2acc
9 changed files with 78 additions and 55 deletions

View File

@ -6,6 +6,7 @@
@close="handleClose" @close="handleClose"
:destroy-on-close="false" :destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? true" :close-on-click-modal="configs.clickModalToClose ?? true"
:width="configs.dialogWidth ?? '50%'"
> >
<!-- main content --> <!-- main content -->
<BaseListTable <BaseListTable

View File

@ -5,6 +5,7 @@
@close="handleClose" @close="handleClose"
:destroy-on-close="false" :destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? true" :close-on-click-modal="configs.clickModalToClose ?? true"
:width="configs.dialogWidth ?? '50%'"
> >
<!-- title --> <!-- title -->
<div slot="title" class="dialog-title"> <div slot="title" class="dialog-title">
@ -373,7 +374,7 @@ export default {
httpPayload = { httpPayload = {
...httpPayload, ...httpPayload,
startTime: startTime ? moment(startTime).format("YYYY-MM-DDTHH:mm:ss") : moment().format("YYYY-MM-DDTHH:mm:ss"), startTime: startTime ? moment(startTime).format("YYYY-MM-DDTHH:mm:ss") : moment().format("YYYY-MM-DDTHH:mm:ss"),
endTime: endTime ? moment(endTime).format("YYYY-MM-DDTHH:mm:ss") : moment().format("YYYY-MM-DDTHH:mm:ss"), endTime: endTime ? moment(endTime).format("YYYY-MM-DDTHH:mm:ss") : null, // moment().format("YYYY-MM-DDTHH:mm:ss"),
}; };
} }
@ -438,7 +439,7 @@ export default {
break; break;
} }
case "add-car-payload": { case "add-car-payload": {
console.log('edit-car-payload', payload) console.log("edit-car-payload", payload);
this.addOrUpdate("POST", this.urls.payloadFormUrl); this.addOrUpdate("POST", this.urls.payloadFormUrl);
break; break;
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="state-select"> <div class="state-select">
<select name="state" id="state" @change.stop.prevent="handleChange" :key="selectKey" style="color: #606266;"> <select name="state" id="state" @change.stop.prevent="handleChange" :key="selectKey" style="color: #606266">
<option v-for="(opt, index) in options" :key="index" :value="opt.value" :selected="chosen === opt.value"> <option v-for="(opt, index) in options" :key="index" :value="opt.value" :selected="chosen === opt.value">
{{ opt.label }} {{ opt.label }}
</option> </option>
@ -86,5 +86,12 @@ export default {
width: 100%; width: 100%;
/* appearance: unset; */ /* appearance: unset; */
border: none; border: none;
cursor: pointer;
border: 1px solid transparent;
transition: border .3s ease-out;
}
.state-select >>> #state:hover {
border: 1px solid #ccc;
} }
</style> </style>

View File

@ -8,7 +8,7 @@ export const dictFilter = dictTypeId => {
} }
export const timeFilter = (val) => { export const timeFilter = (val) => {
return moment(val).format('YYYY-MM-DD HH:mm:ss') return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
export const pick = (obj, paths) => { export const pick = (obj, paths) => {

View File

@ -6,7 +6,7 @@ import { timeFilter } from '@/utils/filters'
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: 'index', label: '序号' }, { type: 'index', label: '序号' },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "code", label: "窑车号" }, { prop: "code", label: "窑车号" },
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect }, { prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent // { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent
@ -68,6 +68,7 @@ export default function () {
const dialogJustFormConfigs = null; const dialogJustFormConfigs = null;
const carPayloadDialogConfigs = { const carPayloadDialogConfigs = {
dialogWidth: '70%',
carPayloadDialog: true, carPayloadDialog: true,
clickModalToClose: true, clickModalToClose: true,
tableConfig: { tableConfig: {
@ -75,15 +76,16 @@ export default function () {
column: [ column: [
// 窑车的 装载详情 // 窑车的 装载详情
// tableProps // tableProps
{ type: "index", label: "序号" }, { width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" }, { prop: "orderCode", label: "订单号" },
{ prop: "bomCode", label: "配方号" }, { width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "shapeCode", label: "砖型编码" }, { prop: "bomCode", label: "配方" },
{ width: 160, prop: "qty", label: "订单对应数量" }, { prop: "shapeCode", label: "砖型" },
{ prop: "goodqty", label: "合格数量" }, { width: 80, prop: "qty", label: "订单数量" },
{ prop: "badqty", label: "废砖数量" }, { width: 72, prop: "goodqty", label: "合格数" },
{ prop: "startTime", label: "开始时间" }, { width: 72, prop: "badqty", label: "废砖数" },
{ prop: "endTime", label: "结束时间" }, // { prop: "startTime", label: "开始时间" },
// { prop: "endTime", label: "结束时间" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
], ],
}, },

View File

@ -7,7 +7,7 @@ import StateSelect from '@/components/StateSelect.vue';
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: "index", label: "序号" }, { type: "index", label: "序号" },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "code", label: "窑车号" }, { prop: "code", label: "窑车号" },
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect }, { prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", filter: (v) => (v !== null && v !== undefined ? ["没有数据", "正常", "判废", "过渡"][v] : "-") }, // subcomponent // { prop: "stateDictValue", label: "状态", filter: (v) => (v !== null && v !== undefined ? ["没有数据", "正常", "判废", "过渡"][v] : "-") }, // subcomponent
@ -62,6 +62,7 @@ export default function () {
const dialogJustFormConfigs = null; const dialogJustFormConfigs = null;
const carPayloadDialogConfigs = { const carPayloadDialogConfigs = {
dialogWidth: '70%',
carPayloadDialog: true, carPayloadDialog: true,
clickModalToClose: true, clickModalToClose: true,
tableConfig: { tableConfig: {
@ -69,21 +70,23 @@ export default function () {
column: [ column: [
// 窑车的 装载详情 // 窑车的 装载详情
// tableProps // tableProps
{ type: "index", label: "序号" }, { width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" }, { prop: "orderCode", label: "订单号" },
{ prop: "bomCode", label: "配方号" }, { width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "shapeCode", label: "砖型编码" }, { prop: "bomCode", label: "配方" },
{ width: 160, prop: "qty", label: "订单对应数量" }, { prop: "shapeCode", label: "砖型" },
{ prop: "goodqty", label: "合格数量" }, { width: 80, prop: "qty", label: "订单数量" },
{ prop: "badqty", label: "废砖数量" }, { width: 72, prop: "goodqty", label: "合格数" },
{ prop: "startTime", label: "开始时间" }, { width: 72, prop: "badqty", label: "废砖数" },
{ prop: "endTime", label: "结束时间" }, // { prop: "startTime", label: "开始时间" },
// { prop: "endTime", label: "结束时间" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
], ],
}, },
}; };
return { return {
carPayloadDialogConfigs, carPayloadDialogConfigs,
dialogConfigs: dialogJustFormConfigs, dialogConfigs: dialogJustFormConfigs,

View File

@ -7,7 +7,7 @@ import { getDictDataList } from '@/utils'
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: 'index', label: '序号' }, { type: 'index', label: '序号' },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "code", label: "窑车号" }, { prop: "code", label: "窑车号" },
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect }, { prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent // { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent
@ -98,7 +98,7 @@ export default function () {
label: "开始时间", label: "开始时间",
prop: "startTime", prop: "startTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择开始时间" }, elparams: { placeholder: "请选择开始时间", type: 'datetime' },
}, },
{ {
datetime: true, datetime: true,
@ -106,7 +106,7 @@ export default function () {
prop: "endTime", prop: "endTime",
default: null, default: null,
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, // rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择结束时间" }, elparams: { placeholder: "请选择结束时间", type: 'datetime' },
}, },
], ],
[ [
@ -206,6 +206,7 @@ export default function () {
}; };
const carPayloadDialogConfigs = { const carPayloadDialogConfigs = {
dialogWidth: '70%',
carPayloadDialog: true, carPayloadDialog: true,
clickModalToClose: true, clickModalToClose: true,
tableConfig: { tableConfig: {
@ -213,21 +214,23 @@ export default function () {
column: [ column: [
// 窑车的 装载详情 // 窑车的 装载详情
// tableProps // tableProps
{ type: "index", label: "序号" }, { width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" }, { prop: "orderCode", label: "订单号" },
{ prop: "bomCode", label: "配方号" }, { width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "shapeCode", label: "砖型编码" }, { prop: "bomCode", label: "配方" },
{ width: 160, prop: "qty", label: "订单对应数量" }, { prop: "shapeCode", label: "砖型" },
{ prop: "goodqty", label: "合格数量" }, { width: 80, prop: "qty", label: "订单数量" },
{ prop: "badqty", label: "废砖数量" }, { width: 72, prop: "goodqty", label: "合格数" },
{ prop: "startTime", label: "开始时间" }, { width: 72, prop: "badqty", label: "废砖数" },
{ prop: "endTime", label: "结束时间" }, // { prop: "startTime", label: "开始时间" },
// { prop: "endTime", label: "结束时间" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
], ],
}, },
}; };
return { return {
carPayloadAddConfigs, carPayloadAddConfigs,
carPayloadDialogConfigs, carPayloadDialogConfigs,

View File

@ -7,7 +7,7 @@ import { getDictDataList } from '@/utils'
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: 'index', label: '序号' }, { type: 'index', label: '序号' },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "code", label: "窑车号" }, { prop: "code", label: "窑车号" },
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect }, { prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent // { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent
@ -98,7 +98,7 @@ export default function () {
label: "开始时间", label: "开始时间",
prop: "startTime", prop: "startTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择开始时间" }, elparams: { placeholder: "请选择开始时间", type: 'datetime' },
}, },
{ {
datetime: true, datetime: true,
@ -106,7 +106,7 @@ export default function () {
prop: "endTime", prop: "endTime",
default: null, default: null,
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, // rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择结束时间" }, elparams: { placeholder: "请选择结束时间", type: 'datetime' },
}, },
], ],
[ [
@ -197,6 +197,7 @@ export default function () {
// }; // };
const carPayloadDialogConfigs = { const carPayloadDialogConfigs = {
dialogWidth: '70%',
carPayloadDialog: true, carPayloadDialog: true,
clickModalToClose: true, clickModalToClose: true,
tableConfig: { tableConfig: {
@ -204,21 +205,23 @@ export default function () {
column: [ column: [
// 窑车的 装载详情 // 窑车的 装载详情
// tableProps // tableProps
{ type: "index", label: "序号" }, { width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" }, { prop: "orderCode", label: "订单号" },
{ prop: "bomCode", label: "配方号" }, { width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "shapeCode", label: "砖型编码" }, { prop: "bomCode", label: "配方" },
{ width: 160, prop: "qty", label: "订单对应数量" }, { prop: "shapeCode", label: "砖型" },
{ prop: "goodqty", label: "合格数量" }, { width: 80, prop: "qty", label: "订单数量" },
{ prop: "badqty", label: "废砖数量" }, { width: 72, prop: "goodqty", label: "合格数" },
{ prop: "startTime", label: "开始时间" }, { width: 72, prop: "badqty", label: "废砖数" },
{ prop: "endTime", label: "结束时间" }, // { prop: "startTime", label: "开始时间" },
// { prop: "endTime", label: "结束时间" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
], ],
}, },
}; };
return { return {
carPayloadAddConfigs, carPayloadAddConfigs,
carPayloadDialogConfigs, carPayloadDialogConfigs,

View File

@ -7,7 +7,7 @@ import { getDictDataList } from '@/utils'
export default function () { export default function () {
const tableProps = [ const tableProps = [
{ type: 'index', label: '序号' }, { type: 'index', label: '序号' },
{ prop: "createTime", label: "添加时间", filter: timeFilter }, // { prop: "createTime", label: "添加时间", filter: timeFilter },
{ prop: "code", label: "窑车号" }, { prop: "code", label: "窑车号" },
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect }, { prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
// { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent // { prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent
@ -98,7 +98,7 @@ export default function () {
label: "开始时间", label: "开始时间",
prop: "startTime", prop: "startTime",
rules: { required: true, message: "必填项不能为空", trigger: "blur" }, rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择开始时间" }, elparams: { placeholder: "请选择开始时间", type: 'datetime' },
}, },
{ {
datetime: true, datetime: true,
@ -106,7 +106,7 @@ export default function () {
prop: "endTime", prop: "endTime",
default: null, default: null,
// rules: { required: true, message: "必填项不能为空", trigger: "blur" }, // rules: { required: true, message: "必填项不能为空", trigger: "blur" },
elparams: { placeholder: "请选择结束时间" }, elparams: { placeholder: "请选择结束时间", type: 'datetime' },
}, },
], ],
[ [
@ -196,6 +196,7 @@ export default function () {
}; };
const carPayloadDialogConfigs = { const carPayloadDialogConfigs = {
dialogWidth: '70%',
carPayloadDialog: true, carPayloadDialog: true,
clickModalToClose: true, clickModalToClose: true,
tableConfig: { tableConfig: {
@ -203,21 +204,23 @@ export default function () {
column: [ column: [
// 窑车的 装载详情 // 窑车的 装载详情
// tableProps // tableProps
{ type: "index", label: "序号" }, { width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" }, { prop: "orderCode", label: "订单号" },
{ prop: "bomCode", label: "配方号" }, { width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "shapeCode", label: "砖型编码" }, { prop: "bomCode", label: "配方" },
{ width: 160, prop: "qty", label: "订单对应数量" }, { prop: "shapeCode", label: "砖型" },
{ prop: "goodqty", label: "合格数量" }, { width: 80, prop: "qty", label: "订单数量" },
{ prop: "badqty", label: "废砖数量" }, { width: 72, prop: "goodqty", label: "合格数" },
{ prop: "startTime", label: "开始时间" }, { width: 72, prop: "badqty", label: "废砖数" },
{ prop: "endTime", label: "结束时间" }, // { prop: "startTime", label: "开始时间" },
// { prop: "endTime", label: "结束时间" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
], ],
}, },
}; };
return { return {
carPayloadAddConfigs, carPayloadAddConfigs,
carPayloadDialogConfigs, carPayloadDialogConfigs,