update docs_0825
This commit is contained in:
parent
7de3355106
commit
847b2c787c
@ -11,8 +11,7 @@
|
|||||||
row-key="id"
|
row-key="id"
|
||||||
:cell-style="{ padding: 0 }"
|
:cell-style="{ padding: 0 }"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
border
|
border>
|
||||||
>
|
|
||||||
<!-- :cell-style="{ padding: 0 }" -->
|
<!-- :cell-style="{ padding: 0 }" -->
|
||||||
<!-- @cell-mouse-enter="(row, col, cell, event) => $emit('cell-mouse-enter', row, col, cell, event)"> -->
|
<!-- @cell-mouse-enter="(row, col, cell, event) => $emit('cell-mouse-enter', row, col, cell, event)"> -->
|
||||||
<!-- @cell-mouse-leave="(row, col, cell, event) => $emit('cell-mouse-leave', row, col, cell, event)"> -->
|
<!-- @cell-mouse-leave="(row, col, cell, event) => $emit('cell-mouse-leave', row, col, cell, event)"> -->
|
||||||
@ -34,8 +33,7 @@
|
|||||||
}
|
}
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
v-bind="head.more"
|
v-bind="head.more"></el-table-column>
|
||||||
></el-table-column>
|
|
||||||
<!-- 普通的表头 -->
|
<!-- 普通的表头 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else
|
v-else
|
||||||
@ -50,8 +48,7 @@
|
|||||||
:align="head.align || null"
|
:align="head.align || null"
|
||||||
:class-name="head.className ?? 'initial-column-class'"
|
:class-name="head.className ?? 'initial-column-class'"
|
||||||
v-bind="head.more"
|
v-bind="head.more"
|
||||||
:show-overflow-tooltip="head.showOverflowTooltip ?? !(head.prop === 'operations')"
|
:show-overflow-tooltip="head.showOverflowTooltip ?? !(head.prop === 'operations')">
|
||||||
>
|
|
||||||
<!-- :show-overflow-tooltip="head.showOverflowTooltip || true" -->
|
<!-- :show-overflow-tooltip="head.showOverflowTooltip || true" -->
|
||||||
<!-- 子组件 -->
|
<!-- 子组件 -->
|
||||||
<template v-if="head.prop" slot-scope="scope">
|
<template v-if="head.prop" slot-scope="scope">
|
||||||
@ -60,15 +57,17 @@
|
|||||||
:is="head.subcomponent"
|
:is="head.subcomponent"
|
||||||
:key="idx + 'sub'"
|
:key="idx + 'sub'"
|
||||||
:inject-data="{ ...scope.row, head }"
|
:inject-data="{ ...scope.row, head }"
|
||||||
@emit-data="handleSubEmitData"
|
@emit-data="handleSubEmitData" />
|
||||||
/>
|
|
||||||
<!-- 直接展示数据或应用过滤器 -->
|
<!-- 直接展示数据或应用过滤器 -->
|
||||||
<span v-else>{{ scope.row[head.prop] | commonFilter(head.filter) }}</span>
|
<span v-else>{{ scope.row[head.prop] | commonFilter(head.filter) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 多级表头 -->
|
<!-- 多级表头 -->
|
||||||
<template v-if="!head.prop && head.children">
|
<template v-if="!head.prop && head.children">
|
||||||
<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" />
|
<TableHead
|
||||||
|
v-for="(subhead, subindex) in head.children"
|
||||||
|
:key="'subhead-' + idx + '-subindex-' + subindex"
|
||||||
|
:opt="subhead" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
@ -109,12 +108,16 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
selectProps: {
|
||||||
|
type: Array,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// inject: ["urls"],
|
// inject: ["urls"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
selections: []
|
selections: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -129,10 +132,26 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
// this.selections = val;
|
// this.selections = val;
|
||||||
console.log('selections change: ', val)
|
console.log("selections change: ", val);
|
||||||
this.$emit('select', val.map(item => item.id))
|
if (this.selectProps.length == 0)
|
||||||
|
this.$emit(
|
||||||
|
"select",
|
||||||
|
val.map((item) => item.id)
|
||||||
|
);
|
||||||
|
else {
|
||||||
|
this.$emit(
|
||||||
|
"select",
|
||||||
|
val.map((item) => {
|
||||||
|
const payload = {};
|
||||||
|
this.selectProps.forEach((key) => {
|
||||||
|
payload[key] = item[key];
|
||||||
|
});
|
||||||
|
return payload;
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -145,7 +164,7 @@ export default {
|
|||||||
text-shadow: unset;
|
text-shadow: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.base-list-table >>> .no-padding-class .cell {
|
.base-list-table >>> .no-padding-class .cell {
|
||||||
line-height: 1.75;
|
line-height: 1.75;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ export default {
|
|||||||
cate: item.cate, // 订单子号
|
cate: item.cate, // 订单子号
|
||||||
id: item.id, // 订单 id
|
id: item.id, // 订单 id
|
||||||
}));
|
}));
|
||||||
}
|
} else this.$message.error(res.msg);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -86,12 +86,20 @@ export default {
|
|||||||
|
|
||||||
async handleConfirm() {
|
async handleConfirm() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const { data: res } = await this.$http.post("/pms/pallet/newPallet", this.dataForm);
|
try {
|
||||||
this.loading = false;
|
const { data: res } = await this.$http.post("/pms/pallet/newPallet", {
|
||||||
|
...this.dataForm,
|
||||||
|
ids: this.ids.map((item) => item.id),
|
||||||
|
});
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success("提交成功");
|
this.$message.success("提交成功");
|
||||||
this.$emit("refresh-list");
|
this.$emit("refresh-list");
|
||||||
this.close();
|
this.close();
|
||||||
|
this.loading = false;
|
||||||
|
} else throw new Error(res.msg);
|
||||||
|
} catch (err) {
|
||||||
|
this.$message.error('message' in err ? err.message : err);
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
:current-page="page"
|
:current-page="page"
|
||||||
:current-size="size"
|
:current-size="size"
|
||||||
@select="handleTableSelect"
|
@select="handleTableSelect"
|
||||||
|
:select-props="tableConfig.selectProps ?? []"
|
||||||
:refresh-layout-key="refreshLayoutKey" />
|
:refresh-layout-key="refreshLayoutKey" />
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||||
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
|
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
|
||||||
import QuillRichInput from "@/components/noTemplateComponents/richInput";
|
// import QuillRichInput from "@/components/noTemplateComponents/richInput";
|
||||||
import request from "@/utils/request";
|
// import request from "@/utils/request";
|
||||||
import { timeFilter } from "@/utils/filters";
|
import { timeFilter } from "@/utils/filters";
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
@ -10,11 +10,12 @@ export default function () {
|
|||||||
{ type: "selection", width: 60, align: "center" },
|
{ type: "selection", width: 60, align: "center" },
|
||||||
{ width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
|
{ width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||||
{ width: 128, prop: "updaterName", label: "更改人" },
|
{ width: 128, prop: "updaterName", label: "更改人" },
|
||||||
{ width: 128, prop: "code", label: "窑车号" },
|
{ width: 128, prop: "posCode", label: "位置" },
|
||||||
|
{ width: 72, prop: "code", label: "窑车号" },
|
||||||
{ width: 128, prop: "orderCode", label: "订单号" },
|
{ width: 128, prop: "orderCode", label: "订单号" },
|
||||||
{ width: 128, prop: "orderCate", label: "订单子号" },
|
{ width: 88, prop: "orderCate", label: "订单子号" },
|
||||||
{ width: 128, prop: "shapeCode", label: "砖型" },
|
{ width: 72, prop: "shapeCode", label: "砖型" },
|
||||||
{ width: 128, prop: "brand", label: "配方" },
|
{ width: 256, prop: "brand", label: "配方" },
|
||||||
{ width: 128, prop: "goodqty", label: "合格数量" },
|
{ width: 128, prop: "goodqty", label: "合格数量" },
|
||||||
{ width: 128, prop: "badqty", label: "报废数量" },
|
{ width: 128, prop: "badqty", label: "报废数量" },
|
||||||
// { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] },
|
// { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] },
|
||||||
@ -39,7 +40,7 @@ export default function () {
|
|||||||
width: 90,
|
width: 90,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: "edit", label: "编辑", icon: "edit-outline", enable: row => row.report == 0 },
|
{ name: "edit", label: "编辑", icon: "edit-outline", enable: (row) => row.report == 0 },
|
||||||
// {
|
// {
|
||||||
// name: "delete",
|
// name: "delete",
|
||||||
// icon: "delete",
|
// icon: "delete",
|
||||||
@ -81,7 +82,7 @@ export default function () {
|
|||||||
],
|
],
|
||||||
default: { value: "" },
|
default: { value: "" },
|
||||||
bind: {
|
bind: {
|
||||||
placeholder: "请输入班次",
|
placeholder: "请选择班次",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -93,7 +94,18 @@ export default function () {
|
|||||||
],
|
],
|
||||||
default: { value: "0" },
|
default: { value: "0" },
|
||||||
bind: {
|
bind: {
|
||||||
placeholder: "请输入报工状态",
|
placeholder: "请选择报工状态",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "pos",
|
||||||
|
label: "压机",
|
||||||
|
select: [
|
||||||
|
{ label: "压机1", value: "1" },
|
||||||
|
{ label: "压机2", value: "7" },
|
||||||
|
],
|
||||||
|
bind: {
|
||||||
|
placeholder: "请选择压机",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -239,8 +251,8 @@ export default function () {
|
|||||||
base: "/pms/carOrderReport",
|
base: "/pms/carOrderReport",
|
||||||
page: "/pms/carOrderReport/pageView",
|
page: "/pms/carOrderReport/pageView",
|
||||||
pageIsPostApi: true,
|
pageIsPostApi: true,
|
||||||
reportPre: '/pms/workReport/pressReportPre',
|
reportPre: "/pms/workReport/pressReportPre",
|
||||||
report: '/pms/workReport/pressReport',
|
report: "/pms/workReport/pressReport",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ export default {
|
|||||||
dialogConfigs,
|
dialogConfigs,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
now() {
|
now() {
|
||||||
const curr = this.headFormConfigs.fields.find((item) => item.prop == "timerange").default.value;
|
const curr = this.headFormConfigs.fields.find((item) => item.prop == "timerange").default.value;
|
||||||
@ -36,12 +35,6 @@ export default {
|
|||||||
moment(curr[0]).format("YYYY-MM-DDTHH:mm:ss"),
|
moment(curr[0]).format("YYYY-MM-DDTHH:mm:ss"),
|
||||||
moment(curr[1]).format("YYYY-MM-DDTHH:mm:ss"),
|
moment(curr[1]).format("YYYY-MM-DDTHH:mm:ss"),
|
||||||
]
|
]
|
||||||
// const start = new Date(curr[0]);
|
|
||||||
// const end = new Date(curr[1]);
|
|
||||||
// return [
|
|
||||||
// start.toLocaleString().replace(' ', 'T').replace(/\//g, '-'),
|
|
||||||
// end.toLocaleString().replace(' ', 'T').replace(/\//g, '-'),
|
|
||||||
// ]
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
|
@ -167,6 +167,7 @@ export default function () {
|
|||||||
tableConfig: {
|
tableConfig: {
|
||||||
table: null, // 此处可省略,el-table 上的配置项
|
table: null, // 此处可省略,el-table 上的配置项
|
||||||
column: tableProps, // el-column-item 上的配置项
|
column: tableProps, // el-column-item 上的配置项
|
||||||
|
selectProps: ['id', 'orderCode']
|
||||||
},
|
},
|
||||||
headFormConfigs: {
|
headFormConfigs: {
|
||||||
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||||
|
Loading…
Reference in New Issue
Block a user