角色删除问题

prod
anthonywj 2 years ago
parent f2aaf3aff5
commit 07017c3802

@ -434,13 +434,18 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除biz编号为"' + ids + '"的数据项').then(() => {
this.$modal.confirm('是否确认删除').then(() => {
this.loading = true;
return delOrderUploadLog(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).then((res) => {
if (res.code == 20000) {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
} else {
this.$modal.msgError(res.message);
}
}).catch(() => {
}).finally(() => {
this.loading = false;

@ -164,6 +164,15 @@
>撤回
</el-button
>
<el-button
type="text"
size="small"
@click.native="generOrder(scope.row)"
>复制
</el-button>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
@ -355,6 +364,22 @@
</el-tab-pane>
</el-tabs>
<el-dialog
title="根据当前单据生成新单据"
:visible.sync="stockChangeVisible"
width="85%"
v-if="stockChangeVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<DialogcChangeNewOrder
:closeDialog="closeDialog"
:curRow="curRow"
></DialogcChangeNewOrder>
</el-dialog>
</div>
</template>
@ -371,6 +396,7 @@ import {getResultDetailList} from "@/api/inout/orderDetailResult";
import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getCodeList} from "@/api/inout/code";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import DialogcChangeNewOrder from "@/views/inout/DialogcChangeNewOrder";
const formJson = {
@ -499,9 +525,11 @@ export default {
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
stockChangeVisible: false,
curRow: null,
};
},
components: {},
components: {DialogcChangeNewOrder},
methods: {
onReset() {
this.$router.push({
@ -833,6 +861,21 @@ export default {
// this.$message.info('退');
});
},
generOrder(row) {
this.stockChangeVisible = true;
this.curRow = row;
},
closeDialog(type) {
this.stockChangeVisible = false;
this.getList();
if (this.$isNotBlank(type)) {
this.detailList = [];
}
},
statusFilterType(status) {
const statusMap = {
5: "warning",

@ -694,7 +694,7 @@ export default {
page: 1,
limit: 10
};
if(!isBlank(this.currentRow.billNo)) {
if (!isBlank(this.currentRow.billNo)) {
this.getBizDetailList();
}
},
@ -733,7 +733,7 @@ export default {
limit: 10
};
if(!isBlank(this.currentRow.billNo)) {
if (!isBlank(this.currentRow.billNo)) {
this.getCodeDetailList();
}
},
@ -774,7 +774,7 @@ export default {
limit: 10
};
if(!isBlank(this.currentRow.billNo)) {
if (!isBlank(this.currentRow.billNo)) {
this.getResultDetailList();
}
},
@ -838,8 +838,7 @@ export default {
},
},
filters: {
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();

@ -121,7 +121,7 @@
<el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0"/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio label="0">正常</el-radio>
<el-radio label="1">禁用</el-radio>
@ -293,7 +293,7 @@ export default {
// roleKey: [
// {required: true, message: "", trigger: "blur"}
// ],
menuOptions:[
menuOptions: [
{required: true, message: "角色列表不能为空", trigger: "blur"}
],
roleSort: [
@ -378,8 +378,13 @@ export default {
let text = row.status === "0" ? "启用" : "禁用";
this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function () {
return changeRoleStatus(row.roleId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).then((res) => {
if (res.code == 20000) {
this.$modal.msgSuccess(text + "成功");
} else {
this.$modal.msgError(res.message);
}
}).catch(function () {
row.status = row.status === "0" ? "1" : "0";
});
@ -538,22 +543,22 @@ export default {
if (valid) {
if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys();
if( this.form.menuIds.length==0){
if (this.form.menuIds.length == 0) {
this.$message.error("菜单权限不能为空");
return
}
updateRole(this.form).then(response => {
if(response.code === 20000){
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}else{
if (response.code === 20000) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.$message.error(response.message);
}
});
} else {
this.form.menuIds = this.getMenuAllCheckedKeys();
if(this.form.menuIds.length==0){
if (this.form.menuIds.length == 0) {
this.$message.error("菜单权限不能为空");
return
}
@ -582,9 +587,14 @@ export default {
const roleIds = row.roleId || this.ids;
this.$modal.confirm('是否确认删除该角色?').then(function () {
return delRole(roleIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).then((res) => {
if (res.code == 20000) {
this.getList();
this.$modal.msgSuccess("删除成功");
} else {
this.$modal.msgError(res.message);
}
}).catch(() => {
});
},

Loading…
Cancel
Save