1.添加补单设置页面和弹窗及对应接口文件

2.移除业务单据类型接口js文件,迁移第三方系统单据类型关联查询接口位置
prod
x_z 2 years ago
parent 8ee9b4d497
commit 098a117217

@ -1,75 +0,0 @@
import axios from "../../utils/request";
export function getLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/filter",
method: "get",
params: query
});
}
export function getLocalJoinBusType(query) {
return axios({
url: "/udiwms/localBusType/filterJoin",
method: "get",
params: query
});
}
export function getLocalJoinByUser(query) {
return axios({
url: "/udiwms/localBusType/filterJoinByUser",
method: "get",
params: query
});
}
export function getLocalJoinNoUse(query) {
return axios({
url: "/udiwms/localBusType/filterUnUse",
method: "get",
params: query
});
}
export function filterByBus(query) {
return axios({
url: "/udiwms/localBusType/filterByBus",
method: "get",
params: query
});
}
export function addLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/add",
method: "post",
data: query
});
}
export function deleteLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/delete",
method: "post",
data: query
});
}
export function updateLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/update",
method: "post",
data: query
});
}
export function filterForThirdSys() {
return axios({
url: "/udiwms/localBusType/filterForThirdSys",
method: "get",
param: null
})
}

@ -30,8 +30,6 @@ export function delBussinessType(query) {
});
}
export function downloadBussinessType(query) {
return axios({
url: "/udiwms/originBusType/download",

@ -57,3 +57,11 @@ export function exportFile(query) {
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}
export function filterForThirdSys() {
return axios({
url: "/udiwms/bussinessType/filterForThirdSys",
method: "get",
params: null
})
}

@ -0,0 +1,49 @@
import axios from "../../utils/request";
export function getBusTypePreResList(params) {
return axios({
url: "/spms/busTypePre/filterList",
method: "get",
params: params
});
}
export function getBusTypePreList(params) {
return axios({
url: "/spms/busTypePre/filter",
method: "get",
params: params
});
}
export function removeBusTypePre(data) {
return axios({
url: "/spms/busTypePre/remove",
method: "post",
data: data
});
}
export function deleteBusTypePre(data) {
return axios({
url: "/spms/busTypePre/delete",
method: "post",
data: data
});
}
export function updateBusTypePre(data) {
return axios({
url: "/spms/busTypePre/update",
method: "post",
data: data
});
}
export function addBusTypePre(data) {
return axios({
url: "/spms/busTypePre/insert",
method: "post",
data: data
});
}

@ -0,0 +1,435 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型名称:">
<el-input
v-model="filterQuery.name"
placeholder="单据类型名称"
></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="单据类型代码:">
<el-input
v-model="filterQuery.originAction"
placeholder="单据类型代码"
></el-input>
</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="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick">
</el-button
>
<el-button type="primary" icon="el-icon-download" @click="exportJsonFile"></el-button>
<el-upload
:action="uploadFileUrl"
multiple
:limit="3"
:headers="headers"
:show-file-list="false"
:on-success="handleChange"
:file-list="fileList"
>
<el-button icon="el-icon-upload2" type="primary">导入单据类型</el-button>
</el-upload>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="单据类型" prop="name"></el-table-column>
<el-table-column label="出入库类型" prop="mainAction">
<template slot-scope="scope">
<span>{{ mainActionMap[scope.row.mainAction] }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="扫码单据类型代码" prop="action" fixed></el-table-column>-->
<el-table-column label="是否启用" prop="enable">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.enable] }}</span>
</template>
</el-table-column>
<el-table-column label="一次校验" prop="checkEnable">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.checkEnable] }}</span>
</template>
</el-table-column>
<el-table-column label="二次核对" prop="secCheckEnable">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.secCheckEnable] }}</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
:disabled="!configParams.typeScan"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="新增扫码单据类型"
:visible.sync="addDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
class="dialog-two"
width="60%"
top="5vh"
>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="onAddSubmit"
:disabled="!configParams.typeScan"
>提交
</el-button
>
<el-button size="small" @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"
>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
:disabled="!configParams.typeScan"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
</div>
</template>
<script>
import {getBusTypeList, deleteBusType, updateBusType, insertBusType, exportFile} from "@/api/basic/busType";
import axios from "axios";
import store from "@/store";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
export default {
data() {
return {
filterQuery: {
name: null,
mainAction: null,
enable: "1",
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
action: "",
name: "",
enable: null,
remark: "",
mainAction: "",
thirdSysFk: "",
id: "",
checkEnable: false,
genUnit: false,
innerOrder: false,
spUse: null,
secCheckEnable: null,
checkUdims: null,
checkPdaEd: null,
checkPdaUn: null,
checkPc: null,
checkWebNew: null,
checkChange: null,
checkCopy: null,
secCheckUdims: null,
secCheckPdaEd: null,
secCheckPdaUn: null,
secCheckPc: null,
secCheckWebNew: null,
secCheckChange: null,
thirdAction: null,
secCheckSp: null,
checkSp: null,
checkBalacne: null,
secCheckBalacne: null,
secCheckCopy: null,
corpType: null,
storageCode: null,
supplementOrderType: null,
defaultUnit: null,
useDyCount: null,
expireTip: true,
prefix: null,
outTospms: null,
ullageFill: null,
scanPreIn: null,
vailInv: null,
entrutSpms: null,
codeFillCheck: null,
defaultInv: null,
defaultSubInv: null,
orderVisibleType: 0,
advanceType: null,
preIn: null,
originAction: null,
comments: null,
},
enableMap: {
true: "是",
false: "否",
},
mainActionMap: {
WareHouseIn: "入库",
WareHouseOut: "出库"
},
fileList: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
headers: {},
configParams: {},
loading: false,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: null,
mainAction: null,
enable: "1",
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
search() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
getBusTypeList(this.filterQuery)
.then((response) => {
if (response.code === 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
onAddSubmit() {
if (isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.corpType)) {
this.$message.error("往来信息类型不能为空!");
return;
}
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
this.inputQuery.enable = 1;
insertBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
onModifySubmit() {
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
updateBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
exportJsonFile() {
exportFile().then((response) => {
const binaryData = [];
binaryData.push(response);
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/json"})
);
this.loading = false;
const eleLink = document.createElement('a');
// var timestamp = "yyyy-MM-dd_hh:mm";
eleLink.download = "扫码单据类型导出" + ".json";
eleLink.style.display = 'none';
eleLink.href = url;
document.body.appendChild(eleLink)
eleLink.click()
document.body.removeChild(eleLink)
}).catch(() => {
this.loading = false;
});
},
handleAddClick() {
this.inputQuery = {enable: false, expireTip: true};
this.addDialogVisible = true;
},
handleModifyClick(row) {
this.inputQuery = row;
this.modifyDialogVisible = true;
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该扫码类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
deleteOrders(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deleteBusType(tquery)
.then((response) => {
this.getList();
if (response.code == 20000) {
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleChange(response, files, fileList) {
if (response.code != 20000) {
this.$message.error(response.message);
} else {
this.$message.success(response.data);
this.getList();
}
},
init() {
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/busstiness/file/upload";
});
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
},
getSyncConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configParams = response.data;
}
})
.catch(() => {
});
},
},
mounted() {
},
created() {
this.init();
this.getSyncConfig();
this.getList();
},
};
</script>
<style scoped>
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style>

@ -0,0 +1,339 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型名称:">
<el-input
v-model="filterQuery.name"
placeholder="请输入单据类型名称"
></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="单据类型代码:">
<el-input
v-model="filterQuery.originAction"
placeholder="请输入单据类型代码"
></el-input>
</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="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick"></el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="补单类型名称" prop="originName"></el-table-column>
<el-table-column label="补单类型代码" prop="originAction"></el-table-column>
<el-table-column label="目标单据类型" prop="targetBusName"></el-table-column>
<el-table-column label="类型" prop="type">
<template slot-scope="scope">
<span>{{ typeMap[scope.row.type] }}</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="enable">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.enable] }}</span>
</template>
</el-table-column>
<el-table-column label="是否启用" prop="enable">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.enable] }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
:disabled="scope.row.systemDefault"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
:title="formMap[formName]"
:visible.sync="addDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
class="dialog-two"
width="60%"
top="5vh"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="onAddSubmit"
:disabled="!configParams.typeScan"
>提交
</el-button
>
<el-button size="small" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
</div>
</template>
<script>
import {getBusTypeList, deleteBusType, updateBusType, insertBusType} from "@/api/basic/busType";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import modifyDialog from "@/views/system/param/busTypePreModify.vue";
import {
getBusTypePreResList,
getBusTypePreList,
addBusTypePre,
updateBusTypePre,
deleteBusTypePre,
removeBusTypePre
} from "@/api/basic/busTypePre";
export default {
data() {
return {
filterQuery: {
name: null,
originAction: null,
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
id: null,
originName: null,
originAction: null,
targetBusAction: null,
targetBusName: null,
systemDefault: null,
enable: null,
remark: null
},
enableMap: {
true: "禁用",
false: "启用",
},
mainActionMap: {
WareHouseIn: "入库",
WareHouseOut: "出库"
},
fileList: [],
total: 0,
multipleSelection: [],
headers: {},
configParams: {},
loading: false,
typeMap: {
1: "耗材领用",
2: "产品申购",
3: "采购计划",
},
formMap: {
add: "新增补单设置",
edit: "编辑补单设置",
},
formName: null,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: null,
originAction: 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;
getBusTypeList(this.filterQuery)
.then((response) => {
if (response.code === 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
onAddSubmit() {
if (isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.corpType)) {
this.$message.error("往来信息类型不能为空!");
return;
}
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
this.inputQuery.enable = 1;
insertBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
onModifySubmit() {
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
updateBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
handleAddClick() {
this.formName = 'add';
this.inputQuery = {enable: false, expireTip: true};
this.addDialogVisible = true;
},
handleModifyClick(row) {
this.inputQuery = row;
this.modifyDialogVisible = true;
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该扫码类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
deleteOrders(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deleteBusType(tquery)
.then((response) => {
this.getList();
if (response.code == 20000) {
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleChange(response, files, fileList) {
if (response.code != 20000) {
this.$message.error(response.message);
} else {
this.$message.success(response.data);
this.getList();
}
},
getSyncConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configParams = response.data;
}
})
.catch(() => {
});
},
},
components: {
modifyDialog
},
created() {
this.init();
this.getSyncConfig();
this.getList();
},
};
</script>
<style scoped>
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style>

@ -0,0 +1,134 @@
<template>
<div>
<el-form :model="inputQuery" :rules="formRules" ref="dataForm" label-width="120px" border>
<el-row type="flex">
<el-col :span="11">
<el-form-item label="补单类型名称" prop="originName">
<el-input v-model="inputQuery.originName" :disabled="!isAdd" size="small" placeholder="请输入内容" style="width: 90%"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="补单类型代码" prop="originAction">
<el-input v-model="inputQuery.originAction" :disabled="!isAdd" size="small" placeholder="请输入内容" style="width: 90%"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11">
<el-form-item label="目标单据类型" prop="targetBusAction">
<el-select v-model="inputQuery.targetBusAction" placeholder="请选择" clearable size="small" style="width: 90%">
<el-option
v-for="item in busTypes"
:key="item.action"
:label="item.name"
:value="item.action">
<span style="float: left"> {{item.name}}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{item.action}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="启用状态" prop="enable">
<el-select v-model="inputQuery.enable"
size="small"
:disabled="inputQuery.systemDefault"
placeholder="启用状态"
style="width: 90%"
clearable
>
<el-option label="启用" :value="false"></el-option>
<el-option label="禁用" :value="true"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" type="flex">
<el-form-item prop="comments">
<label slot="label">&emsp;&emsp;</label>
<el-input v-model="inputQuery.remark" size="small" style="width: 90%" type="textarea"
row="3"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
export default {
name: "BusTypePreModify",
props: {
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
filterQuery: {
enabled: true,
isBuType: true,
},
busTypes: [],
isAdd: false,
formRules: {
originName: [
{
required: true,
message: "单据类型名称不能为空",
trigger: "blur"
}
],
originAction: [
{
required: true,
message: "单据类型代码不能为空",
trigger: "blur"
}
],
targetBusAction: [
{
required: true,
message: "目标单据类型不能为空",
trigger: "blur"
}
],
enable: [
{
required: true,
message: "请选择启用状态",
trigger: "blur"
}
],
},
}
},
methods: {
getBusType() {
}
},
created() {
if (this.inputQuery.originAction == null) {
this.isAdd = true;
}
this.getBusType();
}
}
</script>
<style scoped>
</style>

@ -382,7 +382,7 @@ import {
import {getOriginBusType} from "@/api/basic/busOriginType";
import modifyDialog from "./BasicThirdSysModify";
import modifyDetailDialog from "./BasicThirdSysDetailModify";
import {filterForThirdSys} from "@/api/basic/busLocalType";
import {filterForThirdSys} from "@/api/basic/busType";
import {isBlank} from "@/utils/strUtil";
export default {

@ -75,10 +75,6 @@ import {
getBasicThirdSys,
} from "@/api/thrsys/basicThirdSys";
import {
getLocalBusType,
} from "@/api/basic/busLocalType";
export default {
name: "inputQuery",
props: {

@ -101,7 +101,7 @@
</template>
<script>
import {delThrOrders, delAll, downloadAll} from "@/api/thrsys/thrOrder";
import {getLocalJoinBusType} from "@/api/basic/busLocalType";
import {getBussinessType} from "@/api/basic/bussinessType";
import {getOriginBusType} from "@/api/basic/busOriginType";
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
import {selectIp} from "@/api/param/systemParamConfig";
@ -364,7 +364,7 @@ export default {
let query = {
enabled: true,
};
getLocalJoinBusType(query)
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.getList();

Loading…
Cancel
Save