bugfix 0703反馈
This commit is contained in:
parent
9c3133aa29
commit
0ec0e4bed0
@ -38,7 +38,7 @@
|
|||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handlePageChange"
|
@current-change="handlePageChange"
|
||||||
:current-page.sync="page"
|
:current-page.sync="page"
|
||||||
:page-sizes="[1, 5, 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"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
|
@ -128,34 +128,43 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleSuccess(response, file, fileList) {
|
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({
|
this.$message({
|
||||||
message: response.msg,
|
message,
|
||||||
|
type: isError ? "error" : "info",
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
this.$message({
|
||||||
|
message: response,
|
||||||
type: "error",
|
type: "error",
|
||||||
duration: 1500,
|
duration: 2500,
|
||||||
});
|
});
|
||||||
return;
|
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) {
|
handleError(err, file, fileList) {
|
||||||
|
@ -70,6 +70,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
|
console.log('in minxin basic-page dataformsubmit')
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -115,8 +115,8 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
|
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 + `/${id}`).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: "操作成功",
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handlePageChange"
|
@current-change="handlePageChange"
|
||||||
:current-page.sync="page"
|
:current-page.sync="page"
|
||||||
:page-sizes="[1, 5, 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"
|
||||||
|
@ -48,7 +48,9 @@
|
|||||||
v-if="uploadDialogVisible"
|
v-if="uploadDialogVisible"
|
||||||
title="导入配方"
|
title="导入配方"
|
||||||
filename="bomTemplate.xlsx"
|
filename="bomTemplate.xlsx"
|
||||||
@refresh-list="getList" />
|
@refresh-list="getList"
|
||||||
|
@uploadSuccess="getList"
|
||||||
|
@destroy-dialog="() => { uploadDialogVisible = false }" />
|
||||||
<Overlay v-if="overlayVisible" />
|
<Overlay v-if="overlayVisible" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handlePageChange"
|
@current-change="handlePageChange"
|
||||||
:current-page.sync="page"
|
:current-page.sync="page"
|
||||||
:page-sizes="[1, 5, 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"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handlePageChange"
|
@current-change="handlePageChange"
|
||||||
:current-page.sync="page"
|
:current-page.sync="page"
|
||||||
:page-sizes="[1, 5, 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"
|
||||||
|
@ -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="[1, 5, 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"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handlePageChange"
|
@current-change="handlePageChange"
|
||||||
:current-page.sync="page"
|
:current-page.sync="page"
|
||||||
:page-sizes="[1, 5, 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"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handlePageChange"
|
@current-change="handlePageChange"
|
||||||
:current-page.sync="page"
|
:current-page.sync="page"
|
||||||
:page-sizes="[1, 5, 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"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
@ -48,7 +48,13 @@
|
|||||||
v-if="uploadDialogVisible"
|
v-if="uploadDialogVisible"
|
||||||
title="导入原料"
|
title="导入原料"
|
||||||
filename="bomTemplate.xlsx"
|
filename="bomTemplate.xlsx"
|
||||||
@refresh-list="getList" />
|
@refresh-list="getList"
|
||||||
|
@uploadSuccess="getList"
|
||||||
|
@destroy-dialog="
|
||||||
|
() => {
|
||||||
|
uploadDialogVisible = false;
|
||||||
|
}
|
||||||
|
" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -181,7 +187,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cachedSearchCondition: {}
|
cachedSearchCondition: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ["urls"],
|
inject: ["urls"],
|
||||||
@ -280,9 +286,7 @@ export default {
|
|||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success("删除成功!");
|
this.$message.success("删除成功!");
|
||||||
|
|
||||||
this.page = 1;
|
this.getList(this.cachedSearchCondition);
|
||||||
this.size = 10;
|
|
||||||
this.getList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -343,7 +347,7 @@ export default {
|
|||||||
this.openDialog();
|
this.openDialog();
|
||||||
break;
|
break;
|
||||||
case "查询": {
|
case "查询": {
|
||||||
Object.assign(this.cachedSearchCondition, payload)
|
Object.assign(this.cachedSearchCondition, payload);
|
||||||
this.getList(this.cachedSearchCondition);
|
this.getList(this.cachedSearchCondition);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
fullscreen
|
fullscreen
|
||||||
:configs="dialogConfig"
|
:configs="dialogConfig"
|
||||||
@destroy-dialog="renderDialog = false"
|
@destroy-dialog="renderDialog = false"
|
||||||
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
|
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params))" />
|
||||||
|
|
||||||
<DialogWithMenu
|
<DialogWithMenu
|
||||||
modal-append-to-body
|
modal-append-to-body
|
||||||
@ -45,14 +45,18 @@
|
|||||||
fullscreen
|
fullscreen
|
||||||
:configs="dialogConfig"
|
:configs="dialogConfig"
|
||||||
@destroy-dialog="renderMenuDialog = false"
|
@destroy-dialog="renderMenuDialog = false"
|
||||||
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params));" />
|
@refreshDataList="getAList(Object.assign({}, listQuery, extraSearchConditions, params))" />
|
||||||
|
|
||||||
<DialogUpload
|
<DialogUpload
|
||||||
ref="uploadDialog"
|
ref="uploadDialog"
|
||||||
v-if="uploadDialogVisible"
|
v-if="uploadDialogVisible"
|
||||||
title="导入订单"
|
title="导入订单"
|
||||||
@destroy-dialog="uploadDialogVisible = false"
|
@destroy-dialog="
|
||||||
@refresh-list="handleRefreshList" />
|
() => {
|
||||||
|
uploadDialogVisible = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@uploadSuccess="handleRefreshList" />
|
||||||
|
|
||||||
<Overlay v-if="overlayVisible" />
|
<Overlay v-if="overlayVisible" />
|
||||||
</section>
|
</section>
|
||||||
|
@ -569,7 +569,7 @@ export default function () {
|
|||||||
finishedOrder: "/pms/order/pageEnd",
|
finishedOrder: "/pms/order/pageEnd",
|
||||||
unConfirmedOrder: "/pms/order/pageUnCom",
|
unConfirmedOrder: "/pms/order/pageUnCom",
|
||||||
base: "/pms/order",
|
base: "/pms/order",
|
||||||
importUrl: "/pms-am/pms/order/importExcelOrder",
|
importUrl: "/pms/order/importExcelOrder",
|
||||||
templateUrl: "/importTemplates/orderImport.xlsx",
|
templateUrl: "/importTemplates/orderImport.xlsx",
|
||||||
payload: "/pms/carHandle",
|
payload: "/pms/carHandle",
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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-form-item prop="name" :label="$t('role.name')">
|
||||||
<el-input v-model="dataForm.name" :placeholder="$t('role.name')"></el-input>
|
<el-input v-model="dataForm.name" :placeholder="$t('role.name')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -117,7 +117,8 @@ export default {
|
|||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(function () {
|
dataFormSubmit: debounce(function () {
|
||||||
|
console.log('in role-add-or-update.vue dataformsubmit')
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
@ -127,6 +128,9 @@ export default {
|
|||||||
...this.$refs.menuListTree.getCheckedKeys()
|
...this.$refs.menuListTree.getCheckedKeys()
|
||||||
]
|
]
|
||||||
this.dataForm.deptIdList = this.$refs.deptListTree.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 }) => {
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
|
@ -2,36 +2,36 @@
|
|||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
<div class="mod-sys__user">
|
<div class="mod-sys__user">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
<base-table
|
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||||
:table-props="tableProps"
|
|
||||||
:page="listQuery.page"
|
|
||||||
:limit="listQuery.limit"
|
|
||||||
:table-data="tableData"
|
|
||||||
>
|
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="100"
|
:width="100"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick"
|
@clickBtn="handleClick" />
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination
|
||||||
:limit.sync="listQuery.limit"
|
:limit.sync="listQuery.limit"
|
||||||
:page.sync="listQuery.page"
|
:page.sync="listQuery.page"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList"
|
@pagination="getDataList" />
|
||||||
/>
|
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel">
|
||||||
>
|
<add-or-update
|
||||||
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="
|
||||||
|
() => {
|
||||||
|
getDataList();
|
||||||
|
addOrUpdateVisible = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@successSubmit="successSubmit"></add-or-update>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicPage from "@/mixins/basic-page";
|
import basicPage from "@/mixins/basic-page";
|
||||||
import AddOrUpdate from './role-add-or-update'
|
import AddOrUpdate from "./role-add-or-update";
|
||||||
import i18n from "@/i18n";
|
import i18n from "@/i18n";
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -70,8 +70,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: '/sys/role/page',
|
getDataListURL: "/sys/role/page",
|
||||||
deleteURL: '/sys/role',
|
deleteURL: "/sys/role",
|
||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn,
|
tableBtn,
|
||||||
@ -101,7 +101,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//search-bar点击
|
//search-bar点击
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
@ -111,14 +111,14 @@ export default {
|
|||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case "add":
|
case "add":
|
||||||
this.addOrEditTitle = '新增'
|
this.addOrEditTitle = "新增";
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrUpdateHandle()
|
this.addOrUpdateHandle();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log(val)
|
console.log(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -69,6 +69,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log('use user-add-or-update.vue')
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
dataRule () {
|
dataRule () {
|
||||||
var validatePassword = (rule, value, callback) => {
|
var validatePassword = (rule, value, callback) => {
|
||||||
@ -186,13 +189,11 @@ export default {
|
|||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
console.log('========= HERE ===========')
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('prompt.success'),
|
message: this.$t('prompt.success'),
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 500,
|
duration: 500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
console.log('========= THERE ===========')
|
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel">
|
: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>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
Loading…
Reference in New Issue
Block a user