bug修改

fencang
anthonywj 3 years ago
parent e991f114d1
commit 168c7c8fc4

@ -443,15 +443,6 @@ export const asyncRouterMap = [
// {
// path: "systemPDFTemplate",
// component: systemPDFTemplate,
// name: "打印模板管理",
// icon: "",
// meta: {
// authRule: ["param/system_pdf_template"]
// }
// },
]
},

@ -326,6 +326,7 @@ export default {
mounted() {
},
created() {
this.getSyncConfig();
this.getList();
},
};

@ -24,7 +24,7 @@
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" width="120" fixed></el-table-column>
<el-table-column label="序号" type="index" width="60" fixed></el-table-column>
<el-table-column label="业务单据类型名称" prop="name" fixed></el-table-column>
<el-table-column label="业务单据类型代码" prop="action" fixed></el-table-column>
<el-table-column label="第三方单据类型" prop="originAction" fixed></el-table-column>

@ -240,6 +240,19 @@
></el-input>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>备注:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="editQuery.remark"
></el-input>
</div>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm" size="small">取消</el-button>

@ -1,131 +1,131 @@
<template>
<div>
<el-card>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.name"
placeholder="业务类型"
style="width: 400px"
></el-input>
</el-form-item>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.name"
placeholder="业务类型"
style="width: 400px"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="handleAddClick"
:disabled="!configParms.typeThird"
>新增
</el-button
>
<!-- <el-button type="primary" icon="search" @click="updateDownload"></el-button>-->
</el-button-group>
</el-form-item>
</el-form>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="handleAddClick"
:disabled="!configParms.typeThird"
>新增
</el-button
>
<!-- <el-button type="primary" icon="search" @click="updateDownload"></el-button>-->
</el-button-group>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" width="55"></el-table-column>
</el-form-item>
</el-form>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
<el-table-column label="单据类型代码" prop="action"></el-table-column>
<el-table-column label="第三方系统" prop="thirdSys"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="!configParms.typeThird"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
:disabled="!configParms.typeThird"
@click.native.stop="handleDeleteClick(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-dialog
title="新增第三方单据类型"
:visible.sync="addDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
<el-table-column label="单据类型名称" prop="name"></el-table-column>
<el-table-column label="单据类型代码" prop="action"></el-table-column>
<el-table-column label="第三方系统" prop="thirdSys"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="!configParms.typeThird"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
:disabled="!configParms.typeThird"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-dialog
title="编辑第三方单据类型"
:visible.sync="modifyDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="modifyDialogVisible"
<el-button
type="text"
size="small"
:disabled="!configParms.typeThird"
@click.native.stop="handleDeleteClick(scope.row)"
>删除
</el-button
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
:disabled="!configParms.typeThird"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
</div>
</template>
</el-table-column>
</el-table>
<el-dialog
title="新增第三方单据类型"
:visible.sync="addDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
:disabled="!configParms.typeThird"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-dialog
title="编辑第三方单据类型"
:visible.sync="modifyDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="modifyDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
:disabled="!configParms.typeThird"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {
getOriginBusType,
updateBussinessType, delBussinessType,
insertBussinessType, downloadBussinessType
getOriginBusType,
updateBussinessType, delBussinessType,
insertBussinessType, downloadBussinessType
} from "../../api/basic/busOriginType";
import modifyDialog from "./BussinessTypeThirdModify";
@ -134,239 +134,262 @@ import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
export default {
data() {
return {
filterQuery: {
thirdSys: null,
name: "",
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null,
data() {
return {
filterQuery: {
thirdSys: null,
name: "",
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null,
},
enableMap: {
true: "是",
false: "否",
},
thirdSys: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
loading: false,
configParms: {},
};
},
},
enableMap: {
true: "是",
false: "否",
},
thirdSys: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
loading: false,
configParms: {},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thirdSys: "thirdId",
name: null,
enable: null,
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
getOriginBusType(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSys = this.thirdSys[0].thirdId;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
updateDownload() {
let query = {
thirdSys: this.filterQuery.thirdSys,
}
downloadBussinessType(query)
.then((response) => {
this.loading = false;
this.getList();
})
.catch(() => {
this.loading = false;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thirdSys: "thirdId",
name: null,
enable: null,
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
getOriginBusType(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSys = this.thirdSys[0].thirdId;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
updateDownload() {
let query = {
thirdSys: this.filterQuery.thirdSys,
}
downloadBussinessType(query)
.then((response) => {
this.loading = false;
this.getList();
},
onAddSubmit() {
if (this.$isBlank(this.inputQuery.action)) {
this.$message.error("单据类型代码不能为空!");
return;
}
insertBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
onModifySubmit() {
if (this.$isBlank(this.inputQuery.action)) {
this.$message.error("单据类型代码不能为空!");
return;
}
updateBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
})
.catch(() => {
this.loading = false;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleModifyClick(row) {
onAddSubmit() {
this.inputQuery = {
id: row.id,
remark: row.remark,
action: row.action,
name: row.name,
enable: row.enable,
thirdSys: row.thirdSys,
thirdSysName: row.thirdSysName
};
this.modifyDialogVisible = true;
},
if (this.$isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.action)) {
this.$message.error("单据类型代码不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.thirdSys)) {
this.$message.error("所属系统不不能为空!");
return;
}
let numRegExp = '^[0-9]*$';
let numReg = new RegExp(numRegExp);
if (numReg.test(this.inputQuery.name)) {
this.$message.error("单据类型名称不得为纯数字类型!");
return;
}
insertBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
handleDeleteClick(row) {
this.deleteDialog(row.id)
},
onModifySubmit() {
if (this.$isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.action)) {
this.$message.error("单据类型代码不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.thirdSys)) {
this.$message.error("所属系统不不能为空!");
return;
}
updateBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
handleAddClick() {
this.inputQuery = {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null
};
this.addDialogVisible = true;
},
handleModifyClick(row) {
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该单据类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
id: rowId,
}
delBussinessType(query)
.then((response) => {
this.getList();
})
.catch(() => {
});
this.inputQuery = {
id: row.id,
remark: row.remark,
action: row.action,
name: row.name,
enable: row.enable,
thirdSys: row.thirdSys,
thirdSysName: row.thirdSysName
};
this.modifyDialogVisible = true;
},
})
.catch(() => {
});
},
handleDeleteClick(row) {
this.deleteDialog(row.id)
},
thirdSysChange() {
this.getList();
},
handleAddClick() {
this.inputQuery = {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null
};
this.addDialogVisible = true;
},
init() {
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "udiwms/busstiness/file/upload";
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该单据类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
id: rowId,
}
},
getSyncConfig() {
findConfig()
delBussinessType(query)
.then((response) => {
if (response.code == 20000) {
this.configParms = response.data;
}
this.getList();
})
.catch(() => {
});
},
})
.catch(() => {
});
},
components: {
modifyDialog,
thirdSysChange() {
this.getList();
},
mounted() {
init() {
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "udiwms/busstiness/file/upload";
});
},
created() {
this.init();
this.getSyncConfig();
this.getBasicThirdSys();
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
}
},
getSyncConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configParms = response.data;
}
})
.catch(() => {
});
},
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.init();
this.getSyncConfig();
this.getBasicThirdSys();
this.getList();
},
};
</script>

@ -13,14 +13,6 @@
<el-option label="未验证" value="2"></el-option>
</el-select>
</el-form-item>
<!--
<el-form-item class="query-form-item">
<el-select v-model="query.roleId" placeholder="角色">
<el-option label="全部角色" value=""></el-option>
<el-option v-for="item in roles" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
-->
<el-form-item>
<el-button-group>
<el-button
@ -41,6 +33,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" fixed></el-table-column>
<el-table-column label="用户账号" prop="userName" fixed></el-table-column>
<el-table-column label="用户名称" prop="employeeName" fixed>
</el-table-column>
@ -71,6 +64,7 @@
type="text"
size="small"
@click.native="handleForm(scope.$index, scope.row)"
:disabled="!configParms.sysUser"
>编辑
</el-button>
<el-button
@ -149,6 +143,17 @@
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col" type="flex">
<div class="text item">
<el-form-item label="备注" prop="comments">
<el-input v-model="formData.comments" size="small"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-form-item label="状态" prop="userFlag">
<el-radio-group v-model="formData.userFlag" :disabled="formData.id === 1">
@ -205,6 +210,7 @@ const formJson = {
checkPassword: "",
employeeName: "",
userFlag: 1,
comments: '',
roles: []
};
export default {
@ -231,7 +237,7 @@ export default {
userName: "",
userFlag: "",
page: 1,
limit: 20,
limit: 10,
roleId: "",
customerId: store.getters.customerId,
},
@ -292,7 +298,7 @@ export default {
userName: "",
userFlag: "",
page: 1,
limit: 20,
limit: 10,
roleId: "",
customerId: store.getters.customerId,
};
@ -354,7 +360,16 @@ export default {
this.resetForm();
this.formData = JSON.parse(JSON.stringify(formJson));
if (row !== null) {
this.formData = Object.assign({}, row);
this.formData = {
id: row.id,
passWord: row.passWord,
userName: row.userName,
checkPassword: "",
employeeName: row.employeeName,
userFlag: 1,
comments: row.comments,
roles: row.roles
};
}
this.formName = "add";
this.formRules = this.addRules;

@ -432,7 +432,7 @@ export default {
this.$router.push({
path: ""
});
this.query = {
this.moduleQuery = {
templateType: null,
moduleId: null,
name: "",

@ -99,37 +99,6 @@
>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="2">-->
<!-- <div class="ao-text">-->
<!-- <span>模板名称</span>-->
<!-- </div>-->
<!-- <div class="ao-text">-->
<!-- <span>模板名称</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item prop="name">-->
<!-- <el-input v-model="formData.name" auto-complete="off" :disabled="false"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="所属模块" prop="type">-->
<!-- <el-select v-model="formData.type" placeholder="所属模块">-->
<!-- <el-option label="订单详情" value="1"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- <div class="ao-text">-->
<!-- <span>备注</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item prop="type">-->
<!-- <el-input type="textarea" v-model="formData.remark" rows=6></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="20">
<el-col :span="2">
@ -149,14 +118,6 @@
</el-col>
<el-col :span="8">
<el-form-item prop="module">
<!-- <el-select v-model="formData.module" placeholder="所属模块">-->
<!-- <el-option-->
<!-- v-for="item in moduleNameList"-->
<!-- :key="item.idStr"-->
<!-- :label="item.name"-->
<!-- :value="item.idStr"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<el-select v-model="formData.module" placeholder="模板类型">
<el-option label="标签" value="0"></el-option>
<el-option label="报表" value="1"></el-option>
@ -421,6 +382,7 @@ export default {
});
this.query = {
name: "",
module: null,
page: 1,
limit: 20
};
@ -635,12 +597,6 @@ export default {
this.submitTemplate();
// if (!this.uploadDisabled) {
// this.$refs.uploadJasper.submit();
// this.$refs.uploadJrxml.submit();
// } else {
// this.submitTemplate();
// }
}
});
},
@ -739,19 +695,7 @@ export default {
}
this.$message.success("操作成功");
this.formVisible = false;
// if (this.formName === "add") {
// //
// if (response.data && response.data.id) {
// data.id = response.data.id;
// this.list.unshift(data);
// }
// } else {
// this.list.splice(this.index, 1, data);
// }
// //
// this.resetForm();
// this.getList();
// this.getModuleList();
this.getList();
})
.catch(() => {
this.formLoading = false;
@ -770,8 +714,6 @@ export default {
console.log(response)
if (response.code === 20000) {
this.$message.success(response.data);
//
// this.resetForm();
this.getList();
} else {
this.$message.error(response.message);

@ -298,6 +298,7 @@ export default {
check(this.checkQuery)
.then((response) => {
if (response.code === 20000) {
this.editDialogVisible = false;
this.getList();
this.$message({
type: "success",

@ -471,6 +471,7 @@
this.loading = true;
checkPass(this.checkQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.getList();
this.$message({
@ -479,7 +480,6 @@
});
} else {
this.$message.warning("更新失败");
this.loading = false;
}
})
.catch(() => {

Loading…
Cancel
Save