bugfix 0703反馈
Этот коммит содержится в:
родитель
9c3133aa29
Коммит
0ec0e4bed0
@ -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>
|
||||
|
@ -128,34 +128,43 @@ export default {
|
||||
},
|
||||
|
||||
handleSuccess(response, file, fileList) {
|
||||
// console.log("success response", response);
|
||||
console.log("success response", response);
|
||||
|
||||
if ("code" in response && response.code === 500) {
|
||||
try {
|
||||
if ("code" in response && response.code === 500) {
|
||||
this.$message({
|
||||
message: response.msg,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let message = "";
|
||||
let isError = false;
|
||||
|
||||
if (typeof response === "object" && "msg" in response) message = response.msg;
|
||||
if (typeof response === "object" && "data" in response) message = response.data.toString();
|
||||
if (typeof response === "string") {
|
||||
message = response;
|
||||
isError = true;
|
||||
}
|
||||
|
||||
this.handleClose();
|
||||
this.$emit("uploadSuccess");
|
||||
this.$message({
|
||||
message: response.msg,
|
||||
message,
|
||||
type: isError ? "error" : "info",
|
||||
duration: 2000,
|
||||
});
|
||||
} catch (err) {
|
||||
this.$message({
|
||||
message: response,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
duration: 2500,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let message = "";
|
||||
let isError = false;
|
||||
|
||||
if (typeof response === "object" && "msg" in response) message = response.msg;
|
||||
if (typeof response === "object" && "data" in response) message = response.data.toString();
|
||||
if (typeof response === "string") {
|
||||
message = response;
|
||||
isError = true;
|
||||
}
|
||||
|
||||
this.handleClose();
|
||||
|
||||
this.$message({
|
||||
message,
|
||||
type: isError ? "error" : "info",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
|
||||
handleError(err, file, fileList) {
|
||||
|
@ -70,6 +70,7 @@ export default {
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
console.log('in minxin basic-page dataformsubmit')
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
|
@ -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: "操作成功",
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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",
|
||||
},
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
//search-bar点击
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
@ -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>
|
||||
|
@ -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')
|
||||
}
|
||||
|
@ -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>
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user