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"
:destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? true"
:width="configs.dialogWidth ?? '50%'"
>
<!-- main content -->
<BaseListTable

View File

@ -5,6 +5,7 @@
@close="handleClose"
:destroy-on-close="false"
:close-on-click-modal="configs.clickModalToClose ?? true"
:width="configs.dialogWidth ?? '50%'"
>
<!-- title -->
<div slot="title" class="dialog-title">
@ -373,7 +374,7 @@ export default {
httpPayload = {
...httpPayload,
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;
}
case "add-car-payload": {
console.log('edit-car-payload', payload)
console.log("edit-car-payload", payload);
this.addOrUpdate("POST", this.urls.payloadFormUrl);
break;
}

View File

@ -1,6 +1,6 @@
<template>
<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">
{{ opt.label }}
</option>
@ -86,5 +86,12 @@ export default {
width: 100%;
/* appearance: unset; */
border: none;
cursor: pointer;
border: 1px solid transparent;
transition: border .3s ease-out;
}
.state-select >>> #state:hover {
border: 1px solid #ccc;
}
</style>

View File

@ -8,7 +8,7 @@ export const dictFilter = dictTypeId => {
}
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) => {

View File

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

View File

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

View File

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

View File

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

View File

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