bugfix 0703反馈

This commit is contained in:
lb 2023-07-04 17:05:12 +08:00
parent 9c3133aa29
commit 0ec0e4bed0
17 changed files with 95 additions and 70 deletions

View File

@ -38,7 +38,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>

View File

@ -128,8 +128,9 @@ export default {
},
handleSuccess(response, file, fileList) {
// console.log("success response", response);
console.log("success response", response);
try {
if ("code" in response && response.code === 500) {
this.$message({
message: response.msg,
@ -150,12 +151,20 @@ export default {
}
this.handleClose();
this.$emit("uploadSuccess");
this.$message({
message,
type: isError ? "error" : "info",
duration: 2000,
});
} catch (err) {
this.$message({
message: response,
type: "error",
duration: 2500,
});
return;
}
},
handleError(err, file, fileList) {

View File

@ -70,6 +70,7 @@ export default {
},
// 表单提交
dataFormSubmit() {
console.log('in minxin basic-page dataformsubmit')
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;

View File

@ -115,8 +115,8 @@ export default {
type: "warning",
})
.then(() => {
// this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
this.$http.delete(this.urlOptions.deleteURL + `/${id}`).then(({ data }) => {
this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
// this.$http.delete(this.urlOptions.deleteURL + `/${id}`).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",

View File

@ -28,7 +28,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"

View File

@ -48,7 +48,9 @@
v-if="uploadDialogVisible"
title="导入配方"
filename="bomTemplate.xlsx"
@refresh-list="getList" />
@refresh-list="getList"
@uploadSuccess="getList"
@destroy-dialog="() => { uploadDialogVisible = false }" />
<Overlay v-if="overlayVisible" />
</div>
</template>

View File

@ -18,7 +18,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>

View File

@ -20,7 +20,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"

View File

@ -19,7 +19,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>

View File

@ -20,7 +20,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"

View File

@ -23,7 +23,7 @@
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page.sync="page"
:page-sizes="[1, 5, 10, 20, 50, 100]"
:page-sizes="[10, 20, 50, 100]"
:page-size="size"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
@ -48,7 +48,13 @@
v-if="uploadDialogVisible"
title="导入原料"
filename="bomTemplate.xlsx"
@refresh-list="getList" />
@refresh-list="getList"
@uploadSuccess="getList"
@destroy-dialog="
() => {
uploadDialogVisible = false;
}
" />
</div>
</template>
@ -181,7 +187,7 @@ export default {
],
},
},
cachedSearchCondition: {}
cachedSearchCondition: {},
};
},
inject: ["urls"],
@ -280,9 +286,7 @@ export default {
if (res.code === 0) {
this.$message.success("删除成功!");
this.page = 1;
this.size = 10;
this.getList();
this.getList(this.cachedSearchCondition);
}
});
})
@ -343,7 +347,7 @@ export default {
this.openDialog();
break;
case "查询": {
Object.assign(this.cachedSearchCondition, payload)
Object.assign(this.cachedSearchCondition, payload);
this.getList(this.cachedSearchCondition);
break;
}

View File

@ -36,7 +36,7 @@
fullscreen
:configs="dialogConfig"
@destroy-dialog="renderDialog = false"
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params))" />
<DialogWithMenu
modal-append-to-body
@ -45,14 +45,18 @@
fullscreen
:configs="dialogConfig"
@destroy-dialog="renderMenuDialog = false"
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params))" />
<DialogUpload
ref="uploadDialog"
v-if="uploadDialogVisible"
title="导入订单"
@destroy-dialog="uploadDialogVisible = false"
@refresh-list="handleRefreshList" />
@destroy-dialog="
() => {
uploadDialogVisible = false;
}
"
@uploadSuccess="handleRefreshList" />
<Overlay v-if="overlayVisible" />
</section>

View File

@ -569,7 +569,7 @@ export default function () {
finishedOrder: "/pms/order/pageEnd",
unConfirmedOrder: "/pms/order/pageUnCom",
base: "/pms/order",
importUrl: "/pms-am/pms/order/importExcelOrder",
importUrl: "/pms/order/importExcelOrder",
templateUrl: "/importTemplates/orderImport.xlsx",
payload: "/pms/carHandle",
},

View File

@ -1,5 +1,5 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px">
<el-form-item prop="name" :label="$t('role.name')">
<el-input v-model="dataForm.name" :placeholder="$t('role.name')"></el-input>
</el-form-item>
@ -117,7 +117,8 @@ export default {
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
dataFormSubmit: debounce(function () {
console.log('in role-add-or-update.vue dataformsubmit')
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
@ -127,6 +128,9 @@ export default {
...this.$refs.menuListTree.getCheckedKeys()
]
this.dataForm.deptIdList = this.$refs.deptListTree.getCheckedKeys()
// console.log('this.dataForm', this.dataForm)
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)

View File

@ -2,36 +2,36 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
:before-close="handleCancel">
<add-or-update
ref="addOrUpdate"
@refreshDataList="
() => {
getDataList();
addOrUpdateVisible = false;
}
"
@successSubmit="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
@ -39,7 +39,7 @@
<script>
import basicPage from "@/mixins/basic-page";
import AddOrUpdate from './role-add-or-update'
import AddOrUpdate from "./role-add-or-update";
import i18n from "@/i18n";
const tableProps = [
{
@ -70,8 +70,8 @@ export default {
data() {
return {
urlOptions: {
getDataListURL: '/sys/role/page',
deleteURL: '/sys/role',
getDataListURL: "/sys/role/page",
deleteURL: "/sys/role",
},
tableProps,
tableBtn,
@ -111,14 +111,14 @@ export default {
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
this.addOrUpdateHandle();
break;
default:
console.log(val)
console.log(val);
}
},
}
},
};
</script>

View File

@ -69,6 +69,9 @@ export default {
}
}
},
mounted() {
console.log('use user-add-or-update.vue')
},
computed: {
dataRule () {
var validatePassword = (rule, value, callback) => {
@ -186,13 +189,11 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
console.log('========= HERE ===========')
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
console.log('========= THERE ===========')
this.visible = false
this.$emit('refreshDataList')
}

View File

@ -29,7 +29,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel">
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
<add-or-update ref="addOrUpdate" @refreshDataList="() => { getDataList(); addOrUpdateVisible = false; }" @successSubmit="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>