bufix 0705 zentao

This commit is contained in:
lb 2023-07-05 14:52:04 +08:00
parent f076e23a67
commit b8765af77f
23 changed files with 287 additions and 236 deletions

View File

@ -75,6 +75,7 @@ export default {
inject: ["urls"], inject: ["urls"],
data() { data() {
return { return {
// dialogVisible: false,
loadingStatus: false, loadingStatus: false,
page: 1, page: 1,
size: 20, size: 20,
@ -203,6 +204,11 @@ export default {
}, },
handleClose() { handleClose() {
// clear list
setTimeout(() => {
this.dataList.splice(0);
this.totalPage = 0;
}, 300);
this.$emit("update:dialogVisible", false); this.$emit("update:dialogVisible", false);
}, },
}, },

View File

@ -481,7 +481,7 @@ export default {
IsNotAvaliable(col) { IsNotAvaliable(col) {
return this.detailMode || (col.disableOnEdit && this.editMode); return this.detailMode || (col.disableOnEdit && this.editMode);
}, },
handleFilelistUpdate(newFilelist) { handleFilelistUpdate(newFilelist, isDelete=false) {
// TODO: 访 .files // TODO: 访 .files
this.dataForm.files = newFilelist.map((file) => ({ this.dataForm.files = newFilelist.map((file) => ({
id: file.id, id: file.id,
@ -490,9 +490,9 @@ export default {
typeCode: file.typeCode, typeCode: file.typeCode,
})); }));
// //
if ("id" in this.dataForm && this.dataForm.id !== null && this.dataForm.id !== undefined) this.addOrUpdate("PUT"); // if ("id" in this.dataForm && this.dataForm.id != null) this.addOrUpdate("PUT");
else // else
this.$notify({ !isDelete && this.$notify({
title: "等待保存", title: "等待保存",
message: "已添加文件,请手动点击保存!", message: "已添加文件,请手动点击保存!",
type: "warning", type: "warning",

View File

@ -90,7 +90,7 @@ export default {
}) })
.then(() => { .then(() => {
this.uploadedFileList = this.uploadedFileList.filter((file) => file.id.toString() !== fileId.toString()); this.uploadedFileList = this.uploadedFileList.filter((file) => file.id.toString() !== fileId.toString());
this.$emit("update-file-list", this.uploadedFileList); this.$emit("update-file-list", this.uploadedFileList, true); // is delete, set to true
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",

View File

@ -2,9 +2,25 @@
<template> <template>
<div class="list-view"> <div class="list-view">
<el-row> <el-row>
<a style="margin: 0 0 16px 0; color: #0b58ff; display: flex; align-items: center; text-decoration: none; cursor: pointer" title="返回上一页" @click.prevent="$router.go(-1)"> <a
style="
margin: 0 0 16px 0;
color: #0b58ff;
display: flex;
align-items: center;
text-decoration: none;
cursor: pointer;
"
title="返回上一页"
@click.prevent="$router.go(-1)">
<span style="margin-right: 6px"> <span style="margin-right: 6px">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" /> <path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" />
</svg> </svg>
</span> </span>
@ -20,8 +36,7 @@
@operate-event="handleOperate" @operate-event="handleOperate"
:current-page="page" :current-page="page"
:current-size="size" :current-size="size"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@ -31,8 +46,7 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="size" :page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
<!-- :current-page.sync="currentPage" <!-- :current-page.sync="currentPage"
:page-size.sync="pageSize" --> :page-size.sync="pageSize" -->
@ -41,15 +55,13 @@
v-if="!!dialogConfigs && dialogType === DIALOG_WITH_MENU" v-if="!!dialogConfigs && dialogType === DIALOG_WITH_MENU"
:dialog-visible.sync="dialogVisible" :dialog-visible.sync="dialogVisible"
:configs="dialogConfigs" :configs="dialogConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
<DialogJustForm <DialogJustForm
ref="edit-dialog" ref="edit-dialog"
v-if="!!dialogConfigs && dialogType === DIALOG_JUST_FORM" v-if="!!dialogConfigs && dialogType === DIALOG_JUST_FORM"
:dialog-visible.sync="dialogVisible" :dialog-visible.sync="dialogVisible"
:configs="dialogConfigs" :configs="dialogConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
</div> </div>
</template> </template>
@ -221,6 +233,7 @@ export default {
// payload: { type: string, data: string | number | object } // payload: { type: string, data: string | number | object }
switch (type) { switch (type) {
case "delete": { case "delete": {
let currenPageListLength = this.dataList.length
// //
return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -237,8 +250,9 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({
@ -302,10 +316,10 @@ export default {
// console.log('to-bom-detail', data.name) // console.log('to-bom-detail', data.name)
// //
return this.$router.push({ return this.$router.push({
name: 'pms-bomDetails', name: "pms-bomDetails",
query: { query: {
name: data.name name: data.name,
} },
}); });
} }
case "copy": { case "copy": {

View File

@ -19,8 +19,8 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handlePageChange" @current-change="handlePageChange"
:current-page.sync="page" :current-page.sync="page"
:page-size.sync="size"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination> layout="total, sizes, prev, pager, next, jumper"></el-pagination>
@ -126,6 +126,12 @@ export default {
this.refreshLayoutKey = this.layoutTable(); this.refreshLayoutKey = this.layoutTable();
}, },
watch: { watch: {
page: val => {
console.log('page changed:', val)
},
size: val => {
console.log('size changed:', val)
},
triggerUpdate(val, oldVal) { triggerUpdate(val, oldVal) {
if (val && val !== oldVal) { if (val && val !== oldVal) {
// get list // get list
@ -171,7 +177,7 @@ export default {
? { ...queryParams, page: this.page, limit: this.size } ? { ...queryParams, page: this.page, limit: this.size }
: { : {
page: this.page, page: this.page,
limit: this.size, limit: this.size
}; };
if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) { if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) {
@ -183,6 +189,7 @@ export default {
}); });
} }
}); });
this.cachedSearchCondition = Object.assign({}, params)
} }
this.$http[this.urls.pageIsPostApi ? "post" : "get"]( this.$http[this.urls.pageIsPostApi ? "post" : "get"](
@ -201,6 +208,14 @@ export default {
if (res.code === 0) { if (res.code === 0) {
// page : // page :
if ("list" in res.data) { if ("list" in res.data) {
// if (res.data.list.length == 0 && res.data.total != 0) {
// // refresh list
// if (this.page > 1) {
// this.page -= 1
// this.getList()
// return
// } else return
// }
/** 破碎记录的特殊需求:数据要结合单位 material + materialUnitDictValue */ /** 破碎记录的特殊需求:数据要结合单位 material + materialUnitDictValue */
if ("attachDictValue" in this.tableConfig.column) { if ("attachDictValue" in this.tableConfig.column) {
this.dataList = res.data.list.map((row) => { this.dataList = res.data.list.map((row) => {
@ -257,6 +272,8 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -276,9 +293,11 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = // this.size =
"defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20; // "defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -85,7 +85,7 @@ export default {
refreshLayoutKey: null, refreshLayoutKey: null,
dialogBomCode: "", dialogBomCode: "",
overlayVisible: false, overlayVisible: false,
cachedSearchCondition: {} cachedSearchCondition: {},
}; };
}, },
inject: ["urls"], inject: ["urls"],
@ -175,6 +175,7 @@ export default {
// payload: { type: string, data: string | number | object } // payload: { type: string, data: string | number | object }
switch (type) { switch (type) {
case "delete": { case "delete": {
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -191,8 +192,9 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -23,7 +23,7 @@ export default function () {
{ width: 120, prop: "comqty", label: "已完成量 [kg]" }, { width: 120, prop: "comqty", label: "已完成量 [kg]" },
{ width: 60, prop: "ai", label: "版本" }, { width: 60, prop: "ai", label: "版本" },
{ prop: "blenderCode", label: "混料机" }, { prop: "blenderCode", label: "混料机" },
{ width: 160, prop: "", label: "添加时间", filter: timeFilter }, { width: 160, prop: "createTime", label: "添加时间", filter: timeFilter },
// { width: 120, prop: "badqty", label: "不合格数量" }, // { width: 120, prop: "badqty", label: "不合格数量" },
// { prop: "remark", label: "备注" }, // { prop: "remark", label: "备注" },
// { prop: 'version', label: '配方号' }, // { prop: 'version', label: '配方号' },

View File

@ -213,15 +213,11 @@ export default {
switch (type) { switch (type) {
case "detach": { case "detach": {
// //
this.$confirm( this.$confirm(`确定下发订单吗?`, "提示", {
`确定下发订单吗?`,
"提示",
{
confirmButtonText: "确认", confirmButtonText: "确认",
cancelButtonText: "我再想想", cancelButtonText: "我再想想",
type: "warning", type: "warning",
} }).then(() => {
).then(() => {
this.overlayVisible = true; this.overlayVisible = true;
return this.$http return this.$http
.post(this.urls.pressDetach, data /* { id: data } */, { headers: { "Content-Type": "application/json" } }) .post(this.urls.pressDetach, data /* { id: data } */, { headers: { "Content-Type": "application/json" } })
@ -232,7 +228,7 @@ export default {
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.getList(this.cachedSearchCondition, 'press'); this.getList(this.cachedSearchCondition, "press");
}, },
}); });
} else { } else {
@ -256,6 +252,8 @@ export default {
// payload: { type: string, data: string | number | object } // payload: { type: string, data: string | number | object }
switch (type) { switch (type) {
case "delete": { case "delete": {
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -272,8 +270,9 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({
@ -390,7 +389,7 @@ export default {
}); });
console.log("查询", this.cachedSearchCondition); console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition); this.getList(this.cachedSearchCondition);
this.getList(this.cachedSearchCondition, 'press'); this.getList(this.cachedSearchCondition, "press");
break; break;
} }
} }

View File

@ -19,7 +19,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handlePageChange" @current-change="handlePageChange"
:current-page.sync="page" :current-page.sync="page"
:page-sizes="[20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="size" :page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination> layout="total, sizes, prev, pager, next, jumper"></el-pagination>
@ -242,6 +242,8 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -262,8 +264,9 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 100; // this.size = 100;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -25,7 +25,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handlePageChange" @current-change="handlePageChange"
:current-page.sync="page" :current-page.sync="page"
:page-sizes="[20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="size" :page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination> layout="total, sizes, prev, pager, next, jumper"></el-pagination>
@ -93,11 +93,14 @@ export default {
if (res.code === 0) { if (res.code === 0) {
if ("list" in res.data) { if ("list" in res.data) {
this.dataList = res.data.list; this.dataList = res.data.list;
this.totalPage = res.data.total
} else if (Array.isArray(res.data)) { } else if (Array.isArray(res.data)) {
this.dataList = res.data; this.dataList = res.data;
this.totalPage = res.data.length
} // else ... } // else ...
} else { } else {
this.dataList.splice(0); this.dataList.splice(0);
this.totalPage = 0
} }
// this.dataList = [ // this.dataList = [
// { id: 1, code: 1, press1: 1, press2: 1, createTime: "2023-4-21 01:00:00", temp1: 1000 }, // { id: 1, code: 1, press1: 1, press2: 1, createTime: "2023-4-21 01:00:00", temp1: 1000 },

View File

@ -12,8 +12,7 @@
@operate-event="handleOperate" @operate-event="handleOperate"
:current-page="page" :current-page="page"
:current-size="size" :current-size="size"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@ -23,8 +22,7 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="size" :page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
<DialogJustForm <DialogJustForm
ref="edit-dialog" ref="edit-dialog"
@ -32,16 +30,14 @@
v-if="!!dialogConfigs" v-if="!!dialogConfigs"
:dialog-visible.sync="dialogVisible" :dialog-visible.sync="dialogVisible"
:configs="dialogConfigs" :configs="dialogConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
<DialogJustForm <DialogJustForm
ref="car-payload-add-dialog" ref="car-payload-add-dialog"
key="car-payload-add-dialog" key="car-payload-add-dialog"
v-if="!!carPayloadAddConfigs" v-if="!!carPayloadAddConfigs"
:dialog-visible.sync="carPayloadAddVisible" :dialog-visible.sync="carPayloadAddVisible"
:configs="carPayloadAddConfigs" :configs="carPayloadAddConfigs"
@refreshDataList="updateCarPayloadKey = Math.random()" @refreshDataList="updateCarPayloadKey = Math.random()" />
/>
<DialogCarPayload <DialogCarPayload
ref="car-payload-dialog" ref="car-payload-dialog"
key="car-payload-dialog" key="car-payload-dialog"
@ -50,8 +46,7 @@
:configs="carPayloadDialogConfigs" :configs="carPayloadDialogConfigs"
@refreshDataList="getList" @refreshDataList="getList"
:update-key="updateCarPayloadKey" :update-key="updateCarPayloadKey"
@add-record="openCarPayloadAddDialog($event)" @add-record="openCarPayloadAddDialog($event)" />
/>
</div> </div>
</template> </template>
@ -146,7 +141,7 @@ export default {
tableLoading: false, tableLoading: false,
refreshLayoutKey: null, refreshLayoutKey: null,
updateCarPayloadKey: 1, updateCarPayloadKey: 1,
cachedSearchCondition: {} cachedSearchCondition: {},
}; };
}, },
inject: ["urls"], inject: ["urls"],
@ -237,6 +232,8 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -250,13 +247,14 @@ export default {
method: "DELETE", method: "DELETE",
data: data.id, data: data.id,
headers: { headers: {
"Content-Type": "application/json" "Content-Type": "application/json",
} },
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -213,6 +213,7 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -227,8 +228,9 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -30,7 +30,6 @@
v-if="!!temperatureDialogVisible" v-if="!!temperatureDialogVisible"
:dialog-visible.sync="temperatureDialogVisible" :dialog-visible.sync="temperatureDialogVisible"
@refreshDataList="getAList" /> @refreshDataList="getAList" />
</div> </div>
</template> </template>
@ -75,7 +74,7 @@ export default {
width: 90, width: 90,
subcomponent: TableOperaionComponent, subcomponent: TableOperaionComponent,
options: [ 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: "to-car-payload", label: "装载详情", icon: "shopping-cart-full" }, // or el-icon-box
// { name: "delete", label: "", icon: "delete", emitFull: true, promptField: "code" }, // { name: "delete", label: "", icon: "delete", emitFull: true, promptField: "code" },
], ],
@ -143,6 +142,7 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -163,8 +163,9 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;let currenPageListLength = this.dataList.length;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -19,21 +19,21 @@ export default function () {
{ width: 100, prop: "shapeCode", label: "砖型" }, { width: 100, prop: "shapeCode", label: "砖型" },
{ width: 120, prop: "brand", label: "牌号" }, { width: 120, prop: "brand", label: "牌号" },
{ width: 60, prop: "ai", label: "版本" }, { width: 60, prop: "ai", label: "版本" },
{ width: 65, prop: "addon", label: "addon" }, { width: 65, prop: "sapParam1", label: "addon" },
{ width: 200, prop: "shortDesc", label: "物料号销售文本" }, { width: 200, prop: "shortDesc", label: "物料号销售文本" },
{ width: 100, prop: "bomCode", label: "配方编码" }, { width: 100, prop: "bomCode", label: "配方编码" },
{ width: 80, prop: "pressCode", label: "压机号" }, { width: 80, prop: "pressCode", label: "压机号" },
{ width: 80, prop: "blenderCode", label: "混料机号" }, { width: 80, prop: "blenderCode", label: "混料机号" },
{ width: 80, prop: "kilnCode", label: "隧道窑号" }, { width: 80, prop: "kilnCode", label: "隧道窑号" },
{ width: 120, prop: "ktmp", label: "烧成温度" }, { width: 120, prop: "sapParam6", label: "烧成温度" },
{ width: 120, prop: "tt", label: "烧成时间" }, { width: 120, prop: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, { width: 120, prop: "yieldqty", label: "已生产数量" },
{ width: 120, prop: "soqty", label: "销售订单数" }, { width: 120, prop: "soqty", label: "销售订单数" },
{ width: 200, prop: "saleNo", label: "销售订单号" }, { width: 200, prop: "saleNo", label: "销售订单号" },
{ width: 200, prop: "saleOrderItem", label: "销售订单item号" }, { width: 200, prop: "saleOrderItem", label: "销售订单item号" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, { width: 200, prop: "packTechCode", label: "包装工艺代码" },
{ width: 120, prop: "specifications", label: "生产订单类型" }, { 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: "customerCode", label: "客户" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
{ width: 120, prop: "remark", label: "备注" }, { width: 120, prop: "remark", label: "备注" },

View File

@ -12,8 +12,7 @@
@operate-event="handleOperate" @operate-event="handleOperate"
:current-page="page" :current-page="page"
:current-size="size" :current-size="size"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@ -23,8 +22,7 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="size" :page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
<DialogJustForm <DialogJustForm
ref="edit-dialog" ref="edit-dialog"
@ -32,24 +30,21 @@
v-if="!!dialogConfigs" v-if="!!dialogConfigs"
:dialog-visible.sync="dialogVisible" :dialog-visible.sync="dialogVisible"
:configs="dialogConfigs" :configs="dialogConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
<DialogJustForm <DialogJustForm
ref="car-payload-add-dialog" ref="car-payload-add-dialog"
key="car-payload-add-dialog" key="car-payload-add-dialog"
v-if="!!carPayloadAddConfigs" v-if="!!carPayloadAddConfigs"
:dialog-visible.sync="carPayloadAddVisible" :dialog-visible.sync="carPayloadAddVisible"
:configs="carPayloadAddConfigs" :configs="carPayloadAddConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
<DialogCarPayload <DialogCarPayload
ref="car-payload-dialog" ref="car-payload-dialog"
key="car-payload-dialog" key="car-payload-dialog"
v-if="!!carPayloadDialogConfigs" v-if="!!carPayloadDialogConfigs"
:dialog-visible.sync="carPayloadDialogVisible" :dialog-visible.sync="carPayloadDialogVisible"
:configs="carPayloadDialogConfigs" :configs="carPayloadDialogConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
</div> </div>
</template> </template>
@ -143,7 +138,7 @@ export default {
dataList: [], dataList: [],
tableLoading: false, tableLoading: false,
refreshLayoutKey: null, refreshLayoutKey: null,
cachedSearchCondition: {} cachedSearchCondition: {},
}; };
}, },
inject: ["urls"], inject: ["urls"],
@ -234,6 +229,7 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -252,8 +248,9 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;let currenPageListLength = this.dataList.length;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -12,8 +12,7 @@
row-key="id" row-key="id"
:lazy="true" :lazy="true"
:load="loadSubClassFn" :load="loadSubClassFn"
border border>
>
<!-- @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
@ -49,8 +47,7 @@
filter-placement="top" filter-placement="top"
:align="head.align || null" :align="head.align || null"
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">
@ -59,15 +56,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>
@ -106,12 +105,18 @@ export default {
type: Number, type: Number,
default: 0, default: 0,
}, },
page: {
type: Number,
default: 1,
},
size: {
type: Number,
default: 20,
},
}, },
inject: ["urls"], inject: ["urls"],
data() { data() {
return { return {
page: 1,
size: 20, // 20
dataList: [], dataList: [],
}; };
}, },

View File

@ -16,6 +16,8 @@
:table-data="dataList" :table-data="dataList"
@operate-event="handleOperate" @operate-event="handleOperate"
@load-sub="handleLoadSub" @load-sub="handleLoadSub"
:page="page"
:size="size"
:refresh-layout-key="refreshLayoutKey" /> :refresh-layout-key="refreshLayoutKey" />
<el-pagination <el-pagination
@ -270,6 +272,7 @@ export default {
// payload: { type: string, data: string | number | object } // payload: { type: string, data: string | number | object }
switch (type) { switch (type) {
case "delete": { case "delete": {
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", { return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -285,7 +288,7 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(this.cachedSearchCondition); this.getList(this.cachedSearchCondition);
} }
}); });

View File

@ -12,8 +12,7 @@
row-key="id" row-key="id"
:lazy="true" :lazy="true"
:load="loadSubClassFn" :load="loadSubClassFn"
border border>
>
<!-- @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)"> -->
<!-- 表格头定义 --> <!-- 表格头定义 -->
@ -35,8 +34,7 @@
: null : null
" "
:fixed="head.fixed || null" :fixed="head.fixed || 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
@ -51,8 +49,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">
@ -61,15 +58,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>
@ -108,12 +107,18 @@ export default {
type: Number, type: Number,
default: 0, default: 0,
}, },
page: {
type: Number,
default: 1,
},
size: {
type: Number,
default: 20,
},
}, },
inject: ["urls"], inject: ["urls"],
data() { data() {
return { return {
page: 1,
size: 20, // 20
dataList: [], dataList: [],
}; };
}, },
@ -143,7 +148,7 @@ export default {
text-shadow: unset; 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; line-height: 1.75;
padding: 0; padding: 0;
} }

View File

@ -17,6 +17,8 @@
:table-config="tableConfig.table" :table-config="tableConfig.table"
:column-config="tableConfig.column" :column-config="tableConfig.column"
:table-data="dataList" :table-data="dataList"
:page="listQuery.page"
:size="listQuery.limit"
@operate-event="handleOperate" @operate-event="handleOperate"
:refresh-layout-key="refreshLayoutKey" /> :refresh-layout-key="refreshLayoutKey" />
@ -311,6 +313,7 @@ export default {
}); });
} }
case "delete": { case "delete": {
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除 "${data.code ?? data.id}" 吗?`, "提示", { return this.$confirm(`确定要删除 "${data.code ?? data.id}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -327,6 +330,7 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); 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)); this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
} }
}); });

View File

@ -10,8 +10,7 @@
<BaseSearchForm <BaseSearchForm
head-title="进行中的订单" head-title="进行中的订单"
:head-config="{ fields: headConfigs.ongoingTableSearch }" :head-config="{ fields: headConfigs.ongoingTableSearch }"
@btn-click="handleBtnClick('ongoing', $event)" @btn-click="handleBtnClick('ongoing', $event)" />
/>
<BaseListTable <BaseListTable
key="confirmed" key="confirmed"
v-loading="tableLoadings.ongoing" v-loading="tableLoadings.ongoing"
@ -19,8 +18,7 @@
:column-config="tableConfigs.ongoingTable" :column-config="tableConfigs.ongoingTable"
:table-data="dataLists.ongoing" :table-data="dataLists.ongoing"
@operate-event="handleOperate('ongoing', $event)" @operate-event="handleOperate('ongoing', $event)"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@ -30,16 +28,14 @@
:page-sizes="[1, 5, 10, 20]" :page-sizes="[1, 5, 10, 20]"
:page-size="conditions.ongoing.limit" :page-size="conditions.ongoing.limit"
:total="totalPage.ongoing" :total="totalPage.ongoing"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
</section> </section>
<section class="pending-order" id="pending"> <section class="pending-order" id="pending">
<BaseSearchForm <BaseSearchForm
head-title="等待中的订单" head-title="等待中的订单"
:head-config="{ fields: headConfigs.pendingTableSearch }" :head-config="{ fields: headConfigs.pendingTableSearch }"
@btn-click="handleBtnClick('pending', $event)" @btn-click="handleBtnClick('pending', $event)" />
/>
<BaseListTable <BaseListTable
key="unconfirmed" key="unconfirmed"
v-loading="tableLoadings.pending" v-loading="tableLoadings.pending"
@ -47,8 +43,7 @@
:column-config="tableConfigs.pendingTable" :column-config="tableConfigs.pendingTable"
:table-data="dataLists.pending" :table-data="dataLists.pending"
@operate-event="handleOperate(type, $event)" @operate-event="handleOperate(type, $event)"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@size-change="handleSizeChange('pending', $event)" @size-change="handleSizeChange('pending', $event)"
@ -57,16 +52,14 @@
:page-sizes="[1, 5, 10, 20]" :page-sizes="[1, 5, 10, 20]"
:page-size="conditions.pending.limit" :page-size="conditions.pending.limit"
:total="totalPage.pending" :total="totalPage.pending"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
</section> </section>
<section class="finished-order" id="finished"> <section class="finished-order" id="finished">
<BaseSearchForm <BaseSearchForm
head-title="已完成订单" head-title="已完成订单"
:head-config="{ fields: headConfigs.finishedTableSearch }" :head-config="{ fields: headConfigs.finishedTableSearch }"
@btn-click="handleBtnClick('finished', $event)" @btn-click="handleBtnClick('finished', $event)" />
/>
<BaseListTable <BaseListTable
key="ended" key="ended"
v-loading="tableLoadings.finished" v-loading="tableLoadings.finished"
@ -74,8 +67,7 @@
:column-config="tableConfigs.finishedTable" :column-config="tableConfigs.finishedTable"
:table-data="dataLists.finished" :table-data="dataLists.finished"
@operate-event="handleOperate(type, $event)" @operate-event="handleOperate(type, $event)"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@ -85,8 +77,7 @@
:page-sizes="[1, 5, 10, 20]" :page-sizes="[1, 5, 10, 20]"
:page-size="conditions.finished.limit" :page-size="conditions.finished.limit"
:total="totalPage.finished" :total="totalPage.finished"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
</section> </section>
<!-- <DialogWithMenu <!-- <DialogWithMenu
@ -374,6 +365,7 @@ export default {
// payload: { type: string, data: string | number | object } // payload: { type: string, data: string | number | object }
switch (type) { switch (type) {
case "delete": { case "delete": {
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", { return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -390,8 +382,10 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;let currenPageListLength = this.dataList.length;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} }
}); });
@ -500,8 +494,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
section { section {
padding: 16px; padding: 16px;
padding-bottom: 3.125rem; padding-bottom: 3.125rem;

View File

@ -30,7 +30,6 @@
v-if="!!temperatureDialogVisible" v-if="!!temperatureDialogVisible"
:dialog-visible.sync="temperatureDialogVisible" :dialog-visible.sync="temperatureDialogVisible"
@refreshDataList="getAList" /> @refreshDataList="getAList" />
</div> </div>
</template> </template>
@ -75,7 +74,7 @@ export default {
width: 90, width: 90,
subcomponent: TableOperaionComponent, subcomponent: TableOperaionComponent,
options: [ 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: "to-car-payload", label: "装载详情", icon: "shopping-cart-full" }, // or el-icon-box
// { name: "delete", label: "", icon: "delete", emitFull: true, promptField: "code" }, // { name: "delete", label: "", icon: "delete", emitFull: true, promptField: "code" },
], ],
@ -143,6 +142,7 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -163,8 +163,9 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 10; // this.size = 10;let currenPageListLength = this.dataList.length;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({

View File

@ -72,21 +72,21 @@ export default function () {
{ width: 100, prop: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable { width: 100, prop: "shapeCode", label: "砖型" }, // "砖型编号" }, // select, filterable
{ width: 120, prop: "brand", label: "牌号" }, // select, filterable { width: 120, prop: "brand", label: "牌号" }, // select, filterable
{ width: 60, prop: "ai", label: "版本" }, // "版本号" }, // auto display according to the 配方 { 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: 200, prop: "shortDesc", label: "物料号销售文本" },
{ width: 100, prop: "bomCode", label: "配方编码" }, { width: 100, prop: "bomCode", label: "配方编码" },
{ width: 80, prop: "pressCode", label: "压机号" }, // select, filterable { width: 80, prop: "pressCode", label: "压机号" }, // select, filterable
{ width: 80, prop: "blenderCode", label: "混料机号" }, // select, filterable { width: 80, prop: "blenderCode", label: "混料机号" }, // select, filterable
{ width: 80, prop: "kilnCode", label: "隧道窑号" }, // select, filterable { width: 80, prop: "kilnCode", label: "隧道窑号" }, // select, filterable
{ width: 120, prop: "ktmp", label: "烧成温度" }, { width: 120, prop: "sapParam6", label: "烧成温度" },
{ width: 120, prop: "tt", label: "烧成时间" }, { width: 120, prop: "sapParam7", label: "烧成时间(h)" },
{ width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable { width: 120, prop: "yieldqty", label: "已生产数量" }, // uneditable
{ width: 120, prop: "soqty", label: "销售订单数" }, { width: 120, prop: "soqty", label: "销售订单数" },
{ width: 200, prop: "saleNo", label: "销售订单号" }, { width: 200, prop: "saleNo", label: "销售订单号" },
{ width: 200, prop: "saleOrderItem", label: "销售订单item号" }, { width: 200, prop: "saleOrderItem", label: "销售订单item号" },
{ width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable { width: 200, prop: "packTechCode", label: "包装工艺代码" }, // select, filterable
{ width: 120, prop: "specifications", label: "生产订单类型" }, { 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: "customerCode", label: "客户" },
{ width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" }, { width: 120, prop: "pcsKilnCar", label: "托盘码放砖数" },
// { prop: "description", label: "详情", subcomponent: TableTextComponent }, // { prop: "description", label: "详情", subcomponent: TableTextComponent },

View File

@ -12,8 +12,7 @@
@operate-event="handleOperate" @operate-event="handleOperate"
:current-page="page" :current-page="page"
:current-size="size" :current-size="size"
:refresh-layout-key="refreshLayoutKey" :refresh-layout-key="refreshLayoutKey" />
/>
<el-pagination <el-pagination
class="mt-5 flex justify-end" class="mt-5 flex justify-end"
@ -23,8 +22,7 @@
:page-sizes="[20, 50, 100]" :page-sizes="[20, 50, 100]"
:page-size="size" :page-size="size"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
></el-pagination>
<DialogJustForm <DialogJustForm
ref="edit-dialog" ref="edit-dialog"
@ -32,16 +30,14 @@
v-if="!!dialogConfigs" v-if="!!dialogConfigs"
:dialog-visible.sync="dialogVisible" :dialog-visible.sync="dialogVisible"
:configs="dialogConfigs" :configs="dialogConfigs"
@refreshDataList="getList" @refreshDataList="getList" />
/>
<DialogJustForm <DialogJustForm
ref="car-payload-add-dialog" ref="car-payload-add-dialog"
key="car-payload-add-dialog" key="car-payload-add-dialog"
v-if="!!carPayloadAddConfigs" v-if="!!carPayloadAddConfigs"
:dialog-visible.sync="carPayloadAddVisible" :dialog-visible.sync="carPayloadAddVisible"
:configs="carPayloadAddConfigs" :configs="carPayloadAddConfigs"
@refreshDataList="updateCarPayloadKey = Math.random()" @refreshDataList="updateCarPayloadKey = Math.random()" />
/>
<DialogCarPayload <DialogCarPayload
ref="car-payload-dialog" ref="car-payload-dialog"
key="car-payload-dialog" key="car-payload-dialog"
@ -50,8 +46,7 @@
:configs="carPayloadDialogConfigs" :configs="carPayloadDialogConfigs"
@refreshDataList="getList" @refreshDataList="getList"
:update-key="updateCarPayloadKey" :update-key="updateCarPayloadKey"
@add-record="openCarPayloadAddDialog($event)" @add-record="openCarPayloadAddDialog($event)" />
/>
</div> </div>
</template> </template>
@ -146,7 +141,7 @@ export default {
tableLoading: false, tableLoading: false,
refreshLayoutKey: null, refreshLayoutKey: null,
updateCarPayloadKey: 1, updateCarPayloadKey: 1,
cachedSearchCondition: {} cachedSearchCondition: {},
}; };
}, },
inject: ["urls"], inject: ["urls"],
@ -237,6 +232,7 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) { if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField]; promptName = data[deleteConfig.promptField];
} }
let currenPageListLength = this.dataList.length;
// //
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", { return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -255,8 +251,9 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.page = 1; // this.page = 1;
this.size = 100; // this.size = 100;let currenPageListLength = this.dataList.length;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({