bufix 0705 zentao
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
row-key="id"
|
||||
:lazy="true"
|
||||
:load="loadSubClassFn"
|
||||
border
|
||||
>
|
||||
border>
|
||||
<!-- @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)"> -->
|
||||
<!-- 表格头定义 -->
|
||||
@@ -33,10 +32,9 @@
|
||||
return val + 1 + (page - 1) * size;
|
||||
}
|
||||
: null
|
||||
"
|
||||
"
|
||||
:fixed="head.fixed || null"
|
||||
v-bind="head.more"
|
||||
></el-table-column>
|
||||
v-bind="head.more"></el-table-column>
|
||||
<!-- 普通的表头 -->
|
||||
<el-table-column
|
||||
v-else
|
||||
@@ -51,8 +49,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">
|
||||
@@ -61,15 +58,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>
|
||||
@@ -108,12 +107,18 @@ export default {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
size: {
|
||||
type: Number,
|
||||
default: 20,
|
||||
},
|
||||
},
|
||||
inject: ["urls"],
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
size: 20, // 默认20
|
||||
dataList: [],
|
||||
};
|
||||
},
|
||||
@@ -143,7 +148,7 @@ export default {
|
||||
text-shadow: unset;
|
||||
}
|
||||
|
||||
.base-list-table >>> .no-padding-class:not(th) .cell {
|
||||
.base-list-table >>> .no-padding-class:not(th) .cell {
|
||||
line-height: 1.75;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
:table-config="tableConfig.table"
|
||||
:column-config="tableConfig.column"
|
||||
:table-data="dataList"
|
||||
:page="listQuery.page"
|
||||
:size="listQuery.limit"
|
||||
@operate-event="handleOperate"
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
@@ -311,6 +313,7 @@ export default {
|
||||
});
|
||||
}
|
||||
case "delete": {
|
||||
let currenPageListLength = this.dataList.length;
|
||||
// 确认是否删除
|
||||
return this.$confirm(`确定要删除 "${data.code ?? data.id}" 吗?`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
@@ -327,6 +330,7 @@ export default {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("删除成功!");
|
||||
// 获取数据
|
||||
if (currenPageListLength == 1) this.listQuery.page = this.listQuery.page > 1 ? this.listQuery.page - 1 : 1;
|
||||
this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
<BaseSearchForm
|
||||
head-title="进行中的订单"
|
||||
:head-config="{ fields: headConfigs.ongoingTableSearch }"
|
||||
@btn-click="handleBtnClick('ongoing', $event)"
|
||||
/>
|
||||
@btn-click="handleBtnClick('ongoing', $event)" />
|
||||
<BaseListTable
|
||||
key="confirmed"
|
||||
v-loading="tableLoadings.ongoing"
|
||||
@@ -19,8 +18,7 @@
|
||||
:column-config="tableConfigs.ongoingTable"
|
||||
:table-data="dataLists.ongoing"
|
||||
@operate-event="handleOperate('ongoing', $event)"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@@ -30,16 +28,14 @@
|
||||
:page-sizes="[1, 5, 10, 20]"
|
||||
:page-size="conditions.ongoing.limit"
|
||||
:total="totalPage.ongoing"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</section>
|
||||
|
||||
<section class="pending-order" id="pending">
|
||||
<BaseSearchForm
|
||||
head-title="等待中的订单"
|
||||
:head-config="{ fields: headConfigs.pendingTableSearch }"
|
||||
@btn-click="handleBtnClick('pending', $event)"
|
||||
/>
|
||||
@btn-click="handleBtnClick('pending', $event)" />
|
||||
<BaseListTable
|
||||
key="unconfirmed"
|
||||
v-loading="tableLoadings.pending"
|
||||
@@ -47,8 +43,7 @@
|
||||
:column-config="tableConfigs.pendingTable"
|
||||
:table-data="dataLists.pending"
|
||||
@operate-event="handleOperate(type, $event)"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@size-change="handleSizeChange('pending', $event)"
|
||||
@@ -57,16 +52,14 @@
|
||||
:page-sizes="[1, 5, 10, 20]"
|
||||
:page-size="conditions.pending.limit"
|
||||
:total="totalPage.pending"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</section>
|
||||
|
||||
<section class="finished-order" id="finished">
|
||||
<BaseSearchForm
|
||||
head-title="已完成订单"
|
||||
:head-config="{ fields: headConfigs.finishedTableSearch }"
|
||||
@btn-click="handleBtnClick('finished', $event)"
|
||||
/>
|
||||
@btn-click="handleBtnClick('finished', $event)" />
|
||||
<BaseListTable
|
||||
key="ended"
|
||||
v-loading="tableLoadings.finished"
|
||||
@@ -74,8 +67,7 @@
|
||||
:column-config="tableConfigs.finishedTable"
|
||||
:table-data="dataLists.finished"
|
||||
@operate-event="handleOperate(type, $event)"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@@ -85,8 +77,7 @@
|
||||
:page-sizes="[1, 5, 10, 20]"
|
||||
:page-size="conditions.finished.limit"
|
||||
:total="totalPage.finished"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</section>
|
||||
|
||||
<!-- <DialogWithMenu
|
||||
@@ -374,6 +365,7 @@ export default {
|
||||
// payload: { type: string, data: string | number | object }
|
||||
switch (type) {
|
||||
case "delete": {
|
||||
let currenPageListLength = this.dataList.length;
|
||||
// 确认是否删除
|
||||
return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
@@ -390,8 +382,10 @@ export default {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("删除成功!");
|
||||
|
||||
this.page = 1;
|
||||
this.size = 10;
|
||||
// this.page = 1;
|
||||
// this.size = 10;let currenPageListLength = this.dataList.length;
|
||||
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
|
||||
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
@@ -500,8 +494,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
|
||||
section {
|
||||
padding: 16px;
|
||||
padding-bottom: 3.125rem;
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
v-if="!!temperatureDialogVisible"
|
||||
:dialog-visible.sync="temperatureDialogVisible"
|
||||
@refreshDataList="getAList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -75,7 +74,7 @@ export default {
|
||||
width: 90,
|
||||
subcomponent: TableOperaionComponent,
|
||||
options: [
|
||||
{ name: "temperature", label: "烧制温度", icon: "odometer", color: '#ff4d00' },
|
||||
{ name: "temperature", label: "烧制温度", icon: "odometer", color: "#ff4d00" },
|
||||
{ name: "to-car-payload", label: "装载详情", icon: "shopping-cart-full" }, // or el-icon-box
|
||||
// { name: "delete", label: "删除", icon: "delete", emitFull: true, promptField: "code" },
|
||||
],
|
||||
@@ -143,6 +142,7 @@ export default {
|
||||
if (deleteConfig && "promptField" in deleteConfig) {
|
||||
promptName = data[deleteConfig.promptField];
|
||||
}
|
||||
let currenPageListLength = this.dataList.length;
|
||||
// 确认是否删除
|
||||
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
@@ -163,8 +163,9 @@ export default {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("删除成功!");
|
||||
|
||||
this.page = 1;
|
||||
this.size = 10;
|
||||
// this.page = 1;
|
||||
// this.size = 10;let currenPageListLength = this.dataList.length;
|
||||
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message({
|
||||
|
||||
@@ -50,15 +50,15 @@ export default function () {
|
||||
};
|
||||
|
||||
const startTimeProp = (type) =>
|
||||
({
|
||||
ongoing: [
|
||||
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter }, // "订单砖数" },
|
||||
],
|
||||
pending: [],
|
||||
finished: [
|
||||
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter }, // "订单砖数" },
|
||||
],
|
||||
}[type]);
|
||||
({
|
||||
ongoing: [
|
||||
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter }, // "订单砖数" },
|
||||
],
|
||||
pending: [],
|
||||
finished: [
|
||||
{ width: 120, prop: "startTime", label: "开始时间", filter: timeFilter }, // "订单砖数" },
|
||||
],
|
||||
}[type]);
|
||||
|
||||
const genTableProps = (type /** ongoing, pending, finished */) => [
|
||||
{ width: 60, type: "index", label: "序号", fixed: true },
|
||||
@@ -72,21 +72,21 @@ export default function () {
|
||||
{ width: 100, prop: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable
|
||||
{ width: 120, prop: "brand", label: "牌号" }, // select, filterable
|
||||
{ width: 60, prop: "ai", label: "版本" }, // "版本号" }, // auto display according to the 配方
|
||||
{ width: 65, prop: "addon", label: "addon" },
|
||||
{ width: 65, prop: "sapParam1", label: "addon" },
|
||||
{ width: 200, prop: "shortDesc", label: "物料号销售文本" },
|
||||
{ width: 100, prop: "bomCode", label: "配方编码" },
|
||||
{ width: 80, prop: "pressCode", label: "压机号" }, // select, filterable
|
||||
{ width: 80, prop: "blenderCode", label: "混料机号" }, // select, filterable
|
||||
{ width: 80, prop: "kilnCode", label: "隧道窑号" }, // select, filterable
|
||||
{ width: 120, prop: "ktmp", label: "烧成温度" },
|
||||
{ width: 120, prop: "tt", label: "烧成时间" },
|
||||
{ width: 120, prop: "sapParam6", label: "烧成温度" },
|
||||
{ width: 120, prop: "sapParam7", label: "烧成时间(h)" },
|
||||
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
|
||||
{ width: 120, prop: "soqty", label: "销售订单数" },
|
||||
{ width: 200, prop: "saleNo", label: "销售订单号" },
|
||||
{ width: 200, prop: "saleOrderItem", label: "销售订单item号" },
|
||||
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable
|
||||
{ width: 120, prop: "specifications", label: "生产订单类型" },
|
||||
{ width: 120, prop: "deliveryTime", label: "销售时间" },
|
||||
{ width: 120, prop: "deliveryTime", label: "销售时间", filter: timeFilter },
|
||||
{ width: 120, prop: "customerCode", label: "客户" },
|
||||
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
|
||||
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
|
||||
@@ -114,87 +114,87 @@ export default function () {
|
||||
];
|
||||
|
||||
const genHeadFormFields = (type) =>
|
||||
({
|
||||
ongoing: [
|
||||
{
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
input: true,
|
||||
default: { value: "" },
|
||||
bind: { placeholder: "输入订单号" },
|
||||
({
|
||||
ongoing: [
|
||||
{
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
input: true,
|
||||
default: { value: "" },
|
||||
bind: { placeholder: "输入订单号" },
|
||||
},
|
||||
{
|
||||
// 时间段
|
||||
timerange: true,
|
||||
prop: "timerange",
|
||||
label: "时间段",
|
||||
bind: {
|
||||
placeholder: "选择日期时间",
|
||||
type: "datetimerange",
|
||||
"start-placeholder": "开始时间",
|
||||
"end-placeholder": "结束时间",
|
||||
},
|
||||
{
|
||||
// 时间段
|
||||
timerange: true,
|
||||
prop: "timerange",
|
||||
label: "时间段",
|
||||
bind: {
|
||||
placeholder: "选择日期时间",
|
||||
type: "datetimerange",
|
||||
"start-placeholder": "开始时间",
|
||||
"end-placeholder": "结束时间",
|
||||
},
|
||||
},
|
||||
{
|
||||
// 查询
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
{
|
||||
// 查询
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
},
|
||||
],
|
||||
pending: [
|
||||
{
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
input: true,
|
||||
bind: { placeholder: "输入订单号" },
|
||||
},
|
||||
{
|
||||
// 查询
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
],
|
||||
pending: [
|
||||
{
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
input: true,
|
||||
bind: { placeholder: "输入订单号" },
|
||||
},
|
||||
{
|
||||
// 新增订单
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "新增",
|
||||
permission: "",
|
||||
},
|
||||
{
|
||||
// 查询
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
bind: {
|
||||
plain: true,
|
||||
},
|
||||
{
|
||||
// 新增订单
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "新增",
|
||||
permission: "",
|
||||
},
|
||||
bind: {
|
||||
plain: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
// 导入订单 - TODO: 需完善具体接口和功能
|
||||
button: {
|
||||
type: "success",
|
||||
name: "导入订单",
|
||||
},
|
||||
{
|
||||
// 导入订单 - TODO: 需完善具体接口和功能
|
||||
button: {
|
||||
type: "success",
|
||||
name: "导入订单",
|
||||
},
|
||||
bind: {
|
||||
plain: true,
|
||||
},
|
||||
bind: {
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
finished: [
|
||||
{
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
input: true,
|
||||
bind: { placeholder: "输入订单号" },
|
||||
},
|
||||
],
|
||||
finished: [
|
||||
{
|
||||
label: "订单号",
|
||||
prop: "code",
|
||||
input: true,
|
||||
bind: { placeholder: "输入订单号" },
|
||||
},
|
||||
{
|
||||
// 查询
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
{
|
||||
// 查询
|
||||
button: {
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
},
|
||||
],
|
||||
}[type]);
|
||||
},
|
||||
],
|
||||
}[type]);
|
||||
|
||||
const textOnlyComponent = {
|
||||
props: {
|
||||
@@ -219,8 +219,8 @@ export default function () {
|
||||
this.useBuiltin
|
||||
? this.orderStatusMap[this.modelValue] ?? "-"
|
||||
: this.modelValue.toString().trim() === ""
|
||||
? "-"
|
||||
: this.modelValue.toString()
|
||||
? "-"
|
||||
: this.modelValue.toString()
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user