update docs_0825
This commit is contained in:
parent
7de3355106
commit
847b2c787c
@ -11,8 +11,7 @@
|
||||
row-key="id"
|
||||
:cell-style="{ padding: 0 }"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
border>
|
||||
<!-- :cell-style="{ padding: 0 }" -->
|
||||
<!-- @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)"> -->
|
||||
@ -34,8 +33,7 @@
|
||||
}
|
||||
: null
|
||||
"
|
||||
v-bind="head.more"
|
||||
></el-table-column>
|
||||
v-bind="head.more"></el-table-column>
|
||||
<!-- 普通的表头 -->
|
||||
<el-table-column
|
||||
v-else
|
||||
@ -50,8 +48,7 @@
|
||||
:align="head.align || null"
|
||||
:class-name="head.className ?? 'initial-column-class'"
|
||||
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" -->
|
||||
<!-- 子组件 -->
|
||||
<template v-if="head.prop" slot-scope="scope">
|
||||
@ -60,15 +57,17 @@
|
||||
:is="head.subcomponent"
|
||||
:key="idx + 'sub'"
|
||||
:inject-data="{ ...scope.row, head }"
|
||||
@emit-data="handleSubEmitData"
|
||||
/>
|
||||
@emit-data="handleSubEmitData" />
|
||||
<!-- 直接展示数据或应用过滤器 -->
|
||||
<span v-else>{{ scope.row[head.prop] | commonFilter(head.filter) }}</span>
|
||||
</template>
|
||||
|
||||
<!-- 多级表头 -->
|
||||
<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>
|
||||
</el-table-column>
|
||||
</template>
|
||||
@ -109,12 +108,16 @@ export default {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
selectProps: {
|
||||
type: Array,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
// inject: ["urls"],
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
selections: []
|
||||
selections: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -129,9 +132,25 @@ export default {
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
// this.selections = val;
|
||||
console.log('selections change: ', val)
|
||||
this.$emit('select', val.map(item => item.id))
|
||||
}
|
||||
console.log("selections change: ", val);
|
||||
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>
|
||||
@ -145,7 +164,7 @@ export default {
|
||||
text-shadow: unset;
|
||||
}
|
||||
|
||||
.base-list-table >>> .no-padding-class .cell {
|
||||
.base-list-table >>> .no-padding-class .cell {
|
||||
line-height: 1.75;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
cate: item.cate, // 订单子号
|
||||
id: item.id, // 订单 id
|
||||
}));
|
||||
}
|
||||
} else this.$message.error(res.msg);
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
@ -86,12 +86,20 @@ export default {
|
||||
|
||||
async handleConfirm() {
|
||||
this.loading = true;
|
||||
const { data: res } = await this.$http.post("/pms/pallet/newPallet", this.dataForm);
|
||||
this.loading = false;
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功");
|
||||
this.$emit("refresh-list");
|
||||
this.close();
|
||||
try {
|
||||
const { data: res } = await this.$http.post("/pms/pallet/newPallet", {
|
||||
...this.dataForm,
|
||||
ids: this.ids.map((item) => item.id),
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功");
|
||||
this.$emit("refresh-list");
|
||||
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-size="size"
|
||||
@select="handleTableSelect"
|
||||
:select-props="tableConfig.selectProps ?? []"
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
<el-pagination
|
||||
|
@ -1,7 +1,7 @@
|
||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||
// import switchBtn from "@/components/noTemplateComponents/switchBtn";
|
||||
import QuillRichInput from "@/components/noTemplateComponents/richInput";
|
||||
import request from "@/utils/request";
|
||||
// import QuillRichInput from "@/components/noTemplateComponents/richInput";
|
||||
// import request from "@/utils/request";
|
||||
import { timeFilter } from "@/utils/filters";
|
||||
|
||||
export default function () {
|
||||
@ -10,11 +10,12 @@ export default function () {
|
||||
{ type: "selection", width: 60, align: "center" },
|
||||
{ width: 128, prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||
{ 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: "orderCate", label: "订单子号" },
|
||||
{ width: 128, prop: "shapeCode", label: "砖型" },
|
||||
{ width: 128, prop: "brand", label: "配方" },
|
||||
{ width: 88, prop: "orderCate", label: "订单子号" },
|
||||
{ width: 72, prop: "shapeCode", label: "砖型" },
|
||||
{ width: 256, prop: "brand", label: "配方" },
|
||||
{ width: 128, prop: "goodqty", label: "合格数量" },
|
||||
{ width: 128, prop: "badqty", label: "报废数量" },
|
||||
// { prop: "typeDictValue", label: "过渡车", filter: val => ['否', '是'][val] },
|
||||
@ -39,7 +40,7 @@ export default function () {
|
||||
width: 90,
|
||||
subcomponent: TableOperaionComponent,
|
||||
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",
|
||||
// icon: "delete",
|
||||
@ -81,7 +82,7 @@ export default function () {
|
||||
],
|
||||
default: { value: "" },
|
||||
bind: {
|
||||
placeholder: "请输入班次",
|
||||
placeholder: "请选择班次",
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -93,7 +94,18 @@ export default function () {
|
||||
],
|
||||
default: { value: "0" },
|
||||
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",
|
||||
page: "/pms/carOrderReport/pageView",
|
||||
pageIsPostApi: true,
|
||||
reportPre: '/pms/workReport/pressReportPre',
|
||||
report: '/pms/workReport/pressReport',
|
||||
reportPre: "/pms/workReport/pressReportPre",
|
||||
report: "/pms/workReport/pressReport",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ export default {
|
||||
dialogConfigs,
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
now() {
|
||||
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[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: {},
|
||||
|
@ -167,6 +167,7 @@ export default function () {
|
||||
tableConfig: {
|
||||
table: null, // 此处可省略,el-table 上的配置项
|
||||
column: tableProps, // el-column-item 上的配置项
|
||||
selectProps: ['id', 'orderCode']
|
||||
},
|
||||
headFormConfigs: {
|
||||
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||
|
Loading…
Reference in New Issue
Block a user