bugfix 0706 zentao

This commit is contained in:
lb
2023-07-06 09:59:08 +08:00
parent b8765af77f
commit eac4976304
6 changed files with 62 additions and 28 deletions

View File

@@ -15,6 +15,7 @@
:refresh-layout-key="refreshLayoutKey" />
<el-pagination
v-if="navigator"
class="mt-5 flex justify-end"
@size-change="handleSizeChange"
@current-change="handlePageChange"
@@ -50,7 +51,11 @@
filename="bomTemplate.xlsx"
@refresh-list="getList"
@uploadSuccess="getList"
@destroy-dialog="() => { uploadDialogVisible = false }" />
@destroy-dialog="
() => {
uploadDialogVisible = false;
}
" />
<Overlay v-if="overlayVisible" />
</div>
</template>
@@ -81,6 +86,10 @@ export default {
Overlay,
},
props: {
navigator: {
type: Boolean,
default: true
},
tableConfig: {
type: Object,
default: () => ({
@@ -126,11 +135,11 @@ export default {
this.refreshLayoutKey = this.layoutTable();
},
watch: {
page: val => {
console.log('page changed:', val)
page: (val) => {
console.log("page changed:", val);
},
size: val => {
console.log('size changed:', val)
size: (val) => {
console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@@ -157,7 +166,7 @@ export default {
refreshLayoutKey: null,
uploadDialogVisible: false,
overlayVisible: false,
cachedSearchCondition: {}
cachedSearchCondition: {},
};
},
inject: ["urls"],
@@ -177,7 +186,7 @@ export default {
? { ...queryParams, page: this.page, limit: this.size }
: {
page: this.page,
limit: this.size
limit: this.size,
};
if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) {
@@ -189,7 +198,7 @@ export default {
});
}
});
this.cachedSearchCondition = Object.assign({}, params)
this.cachedSearchCondition = Object.assign({}, params);
}
this.$http[this.urls.pageIsPostApi ? "post" : "get"](
@@ -231,6 +240,8 @@ export default {
id: item._id ?? item.id,
}));
this.totalPage = res.data.total;
} else if (Array.isArray(res.data)) {
this.dataList = res.data
} else {
this.dataList.splice(0);
this.totalPage = 0;
@@ -273,7 +284,7 @@ export default {
promptName = data[deleteConfig.promptField];
}
let currenPageListLength = this.dataList.length
let currenPageListLength = this.dataList.length;
// 确认是否删除
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
confirmButtonText: "确认",
@@ -296,8 +307,8 @@ export default {
// this.page = 1;
// this.size =
// "defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
this.getList();
} else {
this.$message({
@@ -359,7 +370,7 @@ export default {
break;
}
case "view-attachment-justform-version": {
console.log(data)
console.log(data);
break;
}
case "view-recipe": {
@@ -573,7 +584,7 @@ export default {
this.openDialog();
return;
}
case "查询": {
case "查询": {
if (typeof payload === "object") {
// BaseSearchForm 给这个组件传递了数据
Object.assign(this.cachedSearchCondition, payload);

View File

@@ -4,7 +4,8 @@
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:listQueryExtra="['']" />
:listQueryExtra="['']"
:navigator="false" />
</template>
<script>

View File

@@ -39,7 +39,7 @@ export default function () {
const headFormFields = [
{
prop: "orderId",
prop: "order",
label: "订单号",
fieldOptionLabel: 'code',
// fieldOptionValue: 'id',
@@ -253,7 +253,7 @@ export default function () {
operations: [
{ name: "add", label: "保存", type: "primary", permission: "", showOnEdit: false },
{ name: "update", label: "更新", type: "primary", permission: "", showOnEdit: true },
{ name: "reset", label: "重置", type: "warning", showAlways: true },
{ name: "resetSpecific", label: "重置", type: "warning", showAlways: true },
],
},
};

View File

@@ -6,11 +6,11 @@ import { timeFilter } from "@/utils/filters";
export default function () {
const tableProps = [
{ type: "index", label: "序号" },
{ prop: "kilnCode", label: "窑炉" },
// { prop: "kilnCode", label: "窑炉" },
{ width: 120, prop: "orderCode", label: "主订单号" },
{ width: 60, prop: "orderCate", label: "子号" },
{ width: 210, prop: "code", label: "检测包装订单号" },
{ width: 60, prop: "percent", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
{ width: 60, prop: "percent1", label: "进度", filter: (val) => (val !== null && val !== undefined ? val + " %" : "-") },
// {
// prop: "statusDictValue",
// label: "订单状态",
@@ -18,7 +18,7 @@ export default function () {
// },
// { width: 120, prop: "startTime", label: "开始时间" },
{ width: 120, prop: "shapeCode", label: "砖型" },
{ width: 90, prop: "ai", label: "版本号" },
{ width: 90, prop: "packTech", label: "版本号" },
{ width: 90, prop: "qty1", label: "检测量" },
{ width: 120, prop: "qty1Complete", label: "完成量" },
{ width: 120, prop: "goodqty1", label: "检测合格量" },