diff --git a/.env.production b/.env.production index a702bf97..c7a22f1e 100644 --- a/.env.production +++ b/.env.production @@ -3,8 +3,8 @@ VUE_APP_TITLE = UDI管理系统 # 生产环境配置 ENV = 'production' -VUE_APP_BASE_API = 'http://116.204.71.86:9150/UDI_WMS_MC/' -# VUE_APP_BASE_API = 'http://192.168.0.62:9150/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://116.204.71.86:9150/UDI_WMS_MC/' +VUE_APP_BASE_API = 'http://192.168.0.62:9150/UDI_WMS_MC/' # 应用访问路径 例如使用前缀 /admin/ VUE_APP_CONTEXT_PATH = '/UDI_WMS_NEW/' diff --git a/public/config.json b/public/config.json index 70cf7727..68967846 100644 --- a/public/config.json +++ b/public/config.json @@ -1,4 +1,4 @@ { - "BASE_URL": "http://192.168.0.166:9991", + "BASE_URL": "http://127.0.0.1:9991", "hosp_name": "平和县医院" } diff --git a/src/api/basic/busType.js b/src/api/basic/busType.js index 0d18c7e9..b156622d 100644 --- a/src/api/basic/busType.js +++ b/src/api/basic/busType.js @@ -8,6 +8,15 @@ export function getBusTypeList(params) { }); } +export function getLocalJoinByUser(params) { + return axios({ + url: "/udiwms/localBusType/filterJoinByUser", + method: "get", + params: params + }); +} + + export function insertBusType(data) { return axios({ url: "/udiwms/bussinessType/insert", @@ -65,3 +74,11 @@ export function filterForThirdSys() { params: null }) } + +export function getBusTypeListByUser(params) { + return axios({ + url: "/udiwms/localBusType/filterByUser", + method: "get", + params: params + }); +} diff --git a/src/api/basic/busTypePre.js b/src/api/basic/busTypePre.js index 990e874a..8d5dfe96 100644 --- a/src/api/basic/busTypePre.js +++ b/src/api/basic/busTypePre.js @@ -8,6 +8,14 @@ export function getBusTypePreResList(params) { }); } +export function getBusTypePreResList2(params) { + return axios({ + url: "/spms/busTypePre/filterBusTypePreRes", + method: "get", + params: params + }); +} + export function getBusTypePreList(params) { return axios({ url: "/spms/busTypePre/filter", diff --git a/src/api/inout/order.js b/src/api/inout/order.js new file mode 100644 index 00000000..415dbfa6 --- /dev/null +++ b/src/api/inout/order.js @@ -0,0 +1,387 @@ +import axios from '@/utils/request' + + +export function getDraft(query) { + return axios({ + url: "/udiwms/inout/order/draft", + method: "get", + params: query + }); +} + + +export function orderList(query) { + return axios({ + url: "/admin/warehouse/inout/order/list", + method: "get", + params: query + }); +} + +export function orderGetUdi(query) { + return axios({ + url: "/udiwms/inout/order/getUdi", + method: "get", + params: query + }); +} + +export function deleteCodesTempById(query) { + return axios({ + url: "/warehouse/inout/deleteCodesTempById", + method: "get", + params: query + }); +} + +export function submitOrderWeb(query) { + return axios({ + url: "/warehouse/inout/submitOrderWeb", + method: "get", + params: query + }); +} + + +export function saveOrderWeb(query) { + return axios({ + url: "/warehouse/inout/saveOrderWeb", + method: "post", + data: query + }); +} + + +export function orderListError(query) { + return axios({ + url: "/udiwms/inout/order/error", + method: "get", + params: query + }); +} + +export function orderListRepeat(query) { + return axios({ + url: "/admin/warehouse/inout/order/listRepeat", + method: "get", + params: query + }); +} + +export function codeList(query) { + return axios({ + url: "/admin/warehouse/inout/findByOrderId", + method: "get", + params: query + }); +} + +export function addOrderWeb(query) { + return axios({ + url: "/warehouse/inout/addOrderWeb", + method: "post", + data: query + }); +} + +export function enterCodeWeb(query) { + return axios({ + url: "/warehouse/inout/enterCode", + method: "post", + data: query + }); +} + + +export function postOrdersWeb(query) { + return axios({ + url: "/warehouse/inout/postOrdersWeb", + method: "post", + data: query + }); +} + +export function mergeOrder(query) { + return axios({ + url: "/warehouse/inout/order/mergeOrder", + method: "post", + data: query + }); +} + +export function updateUnit(query) { + return axios({ + url: "/udiwms/inout/order/updateUnit", + method: "post", + data: query + }); +} + +export function filterOrder(query) { + return axios({ + url: "/udiwms/inout/order/filter", + method: "get", + params: query + }); +} + +export function selectNew(query) { + return axios({ + url: "/admin/warehouse/inout/order/selectNew", + method: "get", + params: query + }); +} + +export function selectWait(query) { + return axios({ + url: "/sale/inout/order/selectWait", + method: "get", + params: query + }); +} + +export function selectStatus(query) { + return axios({ + url: "/sale/inout/order/selectStatus", + method: "get", + params: query + }); +} + +export function selectDownload(query) { + return axios({ + url: "/sale/inout/order/selectDownload", + method: "get", + params: query + }); +} + +export function selectFinish(query) { + return axios({ + url: "/sale/inout/order/selectFinish", + method: "get", + params: query + }); +} + +export function selectSubOrders(query) { + return axios({ + url: "/sale/inout/order/selectSubOrders", + method: "get", + params: query + }); +} + + +export function errorCodeList(query) { + return axios({ + url: "/admin/warehouse/inout/findErrorByOrderId", + method: "get", + params: query + }); +} + +export function deleteByOrderId(query) { + return axios({ + url: "/udiwms/inout/order/delete", + method: "post", + data: query + }); +} + +export function deleteCodes(query) { + return axios({ + url: "/warehouse/inout/code/deleteCodes", + method: "post", + data: query + }); +} + +export function commitOrder(query) { + return axios({ + url: "/warehouse/inout/commit", + method: "post", + data: query + }); +} + +export function addCommitOrder(query) { + return axios({ + url: "/warehouse/inout/addCommit", + method: "post", + data: query + }); +} + + +export function updateExportStatus(query) { + return axios( + { + url: "/warehouse/inout/order/updateExportStatus", + method: "post", + data: query + } + ) +} + +export function orderDetail(query) { + return axios( + { + url: "/warehouse/inout/order/detail", + method: "get", + params: query + } + ) +} + +export function updateBind(query) { + return axios( + { + url: "/udiwms/erpOrder/updateBind", + method: "post", + data: query + } + ) +} + +export function updateBindSup(query) { + return axios( + { + url: "/udiwms/erpOrder/updateBindSup", + method: "post", + data: query + } + ) +} + +export function updateCodeBindSup(query) { + return axios( + { + url: "/udiwms/addCode/updateBindSup", + method: "post", + data: query + } + ) +} + +export function backStock(query) { + return axios( + { + url: "/sale/inout/order/backStock", + method: "get", + params: query + } + ) +} + +export function uploadOrder(query) { + return axios( + { + url: "/warehouse/inout/order/uploadOrder", + method: "post", + data: query + } + ) +} + +export function moveStock(query) { + return axios( + { + url: "/sale/inout/order/moveStock", + method: "post", + data: query + } + ) +} + + +export function findAllByOrderId(query) { + return axios({ + url: "/admin/warehouse/inout/findAllByOrderId", + method: "get", + params: query + }); +} + +export function revokeOredr(query) { + return axios({ + url: "/spms/inout/order/revoke", + method: "get", + params: query + }); +} + +export function exportJson(query) { + return axios({ + url: "/warehouse/inout/order/exportXml", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + + +export function expireTimeCheck(query) { + return axios( + { + url: "/warehouse/inout/expireTimeCheck", + method: "post", + data: query + } + ) +} + +export function filterOrderForDelete(params) { + return axios({ + url: "/udiwms/inout/order/filterOrderForDelete", + method: "get", + params: params + }); +} + +export function updateOrderInfo(data) { + return axios({ + url: "/udiwms/inout/order/updateOrderInfo", + method: "post", + data: data + }) +} + + +export function getOrderById(params) { + return axios({ + url: "/udiwms/inout/order/getOrderById", + method: "get", + params: params + }) +} + + +export function updateOrder(data) { + return axios({ + url: "/udiwms/inout/order/updateOrder", + method: "post", + data: data + }) +} + + +export function uploadSpms(query) { + return axios( + { + url: "/warehouse/inout/order/uploadSpms", + method: "post", + data: query + } + ); +} + +export function updateOrderPrintRemark(data) { + return axios({ + url: "/udiwms/inout/order/updateOrderPrintRemark", + method: "post", + data: data + }); +} diff --git a/src/api/inout/orderDetailCode.js b/src/api/inout/orderDetailCode.js new file mode 100644 index 00000000..69abeaa9 --- /dev/null +++ b/src/api/inout/orderDetailCode.js @@ -0,0 +1,48 @@ +import axios from '@/utils/request' + + +export function getDetailCodes(query) { + return axios({ + url: "/udiwms/inout/order/draft/detailCode", + method: "get", + params: query + }); +} + +//获取业务明细 +export function getDetailBizs(query) { + return axios({ + url: "/udiwms/inout/order/draft/biz", + method: "get", + params: query + }); +} + + +//业务明细添加产品 +export function addBizProduct(query) { + return axios({ + url: "/udiwms/inout/order/addBizProduct", + method: "post", + data: query + }); +} + +export function updateBizProduct(query) { + return axios({ + url: "/udiwms/inout/order/updateBizProduct", + method: "post", + data: query + }); +} + +export function delBizProduct(query) { + return axios({ + url: "/udiwms/inout/order/delBizProduct", + method: "post", + data: query + }); +} + + + diff --git a/src/api/system/invSubWarehouse.js b/src/api/system/invSubWarehouse.js index 9415aac6..e6c4f20b 100644 --- a/src/api/system/invSubWarehouse.js +++ b/src/api/system/invSubWarehouse.js @@ -9,6 +9,33 @@ export function filterSubAll(query) { }); } +export function findByInvUser(query) { + return axios({ + url: "/udiwms/busType/findByInvUser", + method: "get", + params: query + }); +} + +//获取用户所有关联仓库 +export function findInvByUser(query) { + return axios({ + url: "/spms/inv/warehouse/findByUser", + method: "get", + params: query + }); +} + +//获取除了自己所有其他仓库 +export function findByFrom(query) { + return axios({ + url: "/spms/inv/warehouse/findByFrom", + method: "get", + params: query + }); +} + + export function filterSubByInv(query) { return axios({ url: "/spms/sub/inv/warehouse/findByInv", @@ -17,6 +44,16 @@ export function filterSubByInv(query) { }); } + +export function findByDeptUser(query) { + return axios({ + url: "/spms/inv/warehouse/findByDeptUser", + method: "get", + params: query + }); +} + + export function filterSub(query) { return axios({ url: "/spms/sub/inv/warehouse/filterSub", diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 221d983b..d7877fdf 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -123,9 +123,11 @@ .el-button [class*="el-icon-"] + span { margin-left: 1px; } + td { padding: 0px; } + tr.current-row > td, .el-table__body tr:hover > td { background: #ecd1cf; @@ -330,7 +332,7 @@ width: 100%; } -.el-divider{ +.el-divider { margin: 0px 0px 15px 0px; background: 0 0; border-top: 1px solid #E6EBF5; diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 6f5aa109..f99e5cdc 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,50 +1,106 @@ - + - - - - - - - - - - - + + 平和县医院 + ({{ inv }}) + + + - + - + - - - + + + 布局设置 + + 切换仓库 + 退出登录 + + + + + + + + + + {{ item.name }} + + + + + + + + + + + {{ item.name }} + + + + + + + + 提示:进入系统请先选择您当前所在部门与仓库 + + + 提交 + 取消 + + + + @@ -113,7 +276,7 @@ export default { overflow: hidden; position: relative; background: #fff; - box-shadow: 0 1px 4px rgba(0,21,41,.08); + box-shadow: 0 1px 4px rgba(0, 21, 41, .08); .hamburger-container { line-height: 46px; @@ -121,7 +284,7 @@ export default { float: left; cursor: pointer; transition: background .3s; - -webkit-tap-highlight-color:transparent; + -webkit-tap-highlight-color: transparent; &:hover { background: rgba(0, 0, 0, .025) @@ -169,6 +332,14 @@ export default { } } + .inv-hos-title { + display: inline-block; + height: 100%; + font-size: 18px; + color: #5a5e66; + vertical-align: text-bottom; + } + .avatar-container { margin-right: 30px; diff --git a/src/plugins/KeyScaner.js b/src/plugins/KeyScaner.js new file mode 100644 index 00000000..ee57b6c7 --- /dev/null +++ b/src/plugins/KeyScaner.js @@ -0,0 +1,115 @@ +"use strict"; +/** + * 浏览器按键处理 + * howay + * 20200421 + * 1.0 + */ +const KeyScaner = /** @class */ (function () { + function KeyScaner(_dom) { + this.keybufs = []; + this.altBuf = []; + this.isShift = false; + this.lastTime = 0; + /** + * 在收集到文本输入时触发 + * @param text 收集到的连续文本 + */ + this.onInput = function (text) { + }; + this.dom = _dom; + _dom.addEventListener('keydown', this.onKeyDown.bind(this)); + _dom.addEventListener('keyup', this.onKeyUp.bind(this)); + this.interval = setInterval(this.onTick.bind(this), 100); + } + + KeyScaner.prototype.appendChar = function (c) { + this.keybufs.push(c); + }; + KeyScaner.prototype.onKeyDown = function (ev) { + this.lastTime = new Date().getTime(); + if (ev.key == "Alt") { + if (ev.shiftKey || ev.ctrlKey || ev.metaKey) { + return; + } + } else if (ev.key == "Shift") { + if (ev.altKey || ev.ctrlKey || ev.metaKey) { + return; + } + this.isShift = true; + } else if (ev.key == "Enter") { + if (ev.shiftKey || ev.altKey || ev.ctrlKey || ev.metaKey) { + return; + } + this.appendChar("\r"); + this.completeInput(); //立即完成输入 + } else if (ev.key == "Delete" || ev.key == "Backspace") { + this.dom.innerTex = ""; + this.appendChar("delete"); + this.completeInput(); //立即完成输入 + } else { + if (ev.key.length == 1) { + var charCode = ev.key.charCodeAt(0); + console.log("key="+charCode); + if (charCode >= 48 && charCode <= 57) { + if (ev.altKey) { + this.altBuf.push(ev.key); + } else { + this.appendChar(ev.key); + } + } else if ((charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122)) { + //忽略大小写锁定键,直接通过SHIFT键判断大小写 + if (ev.shiftKey) { + this.appendChar(ev.key.toUpperCase()); + } else { + this.appendChar(ev.key.toLowerCase()); + } + } else { + this.appendChar(ev.key); + } + } + //忽略其他控制键 + } + }; + KeyScaner.prototype.onKeyUp = function (ev) { + this.lastTime = new Date().getTime(); + if (ev.key == "Alt") { + if (this.altBuf && this.altBuf.length > 0) { + var str = this.altBuf.join(""); + var num = parseInt(str); + var c = String.fromCharCode(num); + this.appendChar(c); + this.altBuf = []; + } + } else if (ev.key == "Shift") { + this.isShift = false; + } + }; + KeyScaner.prototype.completeInput = function () { + var text = this.keybufs.join(""); + this.keybufs = []; + if (this.onInput) { + this.onInput.bind(this)(text); + } + }; + KeyScaner.prototype.onTick = function () { + if (this.keybufs && this.keybufs.length > 0 && (!this.altBuf || this.altBuf.length == 0) && new Date().getTime() - this.lastTime > 500) { + //有缓存的字符,且没有缓存的alt字符 且 与上次按键时间超过500毫秒。 收集输入 + // this.completeInput(); + } + }; + /** + * 释放资源 + */ + KeyScaner.prototype.dispose = function () { + this.dom.removeEventListener('keydown', this.onKeyDown); + this.dom.removeEventListener('keyup', this.onKeyUp); + clearInterval(this.interval); + }; + return KeyScaner; +}()); + +export default { + KeyScaner +} + diff --git a/src/store/getters.js b/src/store/getters.js index b921d03e..b3dedfe4 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -16,5 +16,11 @@ const getters = { defaultRoutes: state => state.permission.defaultRoutes, sidebarRouters: state => state.permission.sidebarRouters, customerId: state => state.user.customerId, + companyName: state => state.user.companyName, + locDeptCode: state => state.user.locDeptCode, + locInvCode: state => state.user.locInvCode, + locDeptName: state => state.user.locDeptName, + locInvName: state => state.user.locInvName, + adminId: state => state.user.adminId, } export default getters diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 1665f010..97d886be 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -3,15 +3,19 @@ import {getToken, setToken, removeToken, removeAdminId, setAdminId} from '@/util const user = { state: { - adminId:"", + adminId: "", token: getToken(), name: '', avatar: '', roles: [], permissions: [], - employeeName:"", - customerId:"", - companyName:"", + employeeName: "", + customerId: "", + companyName: "", + locDeptCode: "", + locInvCode: "", + locDeptName: "", + locInvName: "", }, mutations: { @@ -19,7 +23,6 @@ const user = { SET_ADMINID: (state, adminId) => { state.adminId = adminId }, - SET_TOKEN: (state, token) => { state.token = token }, @@ -45,6 +48,18 @@ const user = { SET_COMPANYNAME: (state, companyName) => { state.companyName = companyName }, + SET_LOCDEPTCODE: (state, locDeptCode) => { + state.locDeptCode = locDeptCode + }, + SET_LOCIVNCODE: (state, locInvCode) => { + state.locInvCode = locInvCode + }, + SET_LOCDEPTNAME: (state, locDeptName) => { + state.locDeptName = locDeptName + }, + SET_LOCIVNNAME: (state, locInvName) => { + state.locInvName = locInvName + }, }, actions: { @@ -84,7 +99,12 @@ const user = { commit('SET_EMPLOYEENAME', user.employeeName) commit('SET_CUSTOMERID', user.customerId) commit('SET_COMPANYNAME', user.companyName) + commit('SET_LOCDEPTCODE', user.locDeptCode) + commit('SET_LOCIVNCODE', user.locInvCode) + commit('SET_LOCDEPTNAME', user.locDeptName) + commit('SET_LOCIVNNAME', user.locInvName) resolve(res) + console.log("获取用户数据成功-=----"); }).catch(error => { reject(error) }) @@ -102,6 +122,10 @@ const user = { commit('SET_EMPLOYEENAME', "") commit('SET_CUSTOMERID', "") commit('SET_COMPANYNAME', "") + commit('SET_LOCDEPTCODE', "") + commit('SET_LOCIVNCODE', "") + commit('SET_LOCDEPTNAME', "") + commit('SET_LOCIVNNAME', "") removeToken() removeAdminId() resolve() @@ -111,16 +135,6 @@ const user = { }) }, - // 前端 登出 - FedLogOut({commit}) { - return new Promise(resolve => { - commit('SET_TOKEN', '') - commit('SET_ADMINID', '') - removeToken() - removeAdminId() - resolve() - }) - } } } diff --git a/src/utils/coTools.js b/src/utils/coTools.js new file mode 100644 index 00000000..03dd60b6 --- /dev/null +++ b/src/utils/coTools.js @@ -0,0 +1,144 @@ +function pluralize(time, label) { + if (time === 1) { + return time + label; + } + return time + label + "s"; +} +export function timeAgo(time) { + const between = Date.now() / 1000 - Number(time); + if (between < 3600) { + return pluralize(~~(between / 60), " minute"); + } else if (between < 86400) { + return pluralize(~~(between / 3600), " hour"); + } else { + return pluralize(~~(between / 86400), " day"); + } +} + +export function parseTime(time, cFormat) { + if (arguments.length === 0) { + return null; + } + + if ((time + "").length === 10) { + time = +time * 1000; + } + + const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}"; + let date; + if (typeof time === "object") { + date = time; + } else { + date = new Date(parseInt(time)); + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + }; + const timeStr = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { + let value = formatObj[key]; + if (key === "a") + return ["一", "二", "三", "四", "五", "六", "日"][value - 1]; + if (result.length > 0 && value < 10) { + value = "0" + value; + } + return value || 0; + }); + return timeStr; +} +export function rTime(date) { + var json_date = new Date(date).toJSON(); + return new Date(new Date(json_date) + 8 * 3600 * 1000) + .toISOString() + .replace(/T/g, " ") + .replace(/\.[\d]{3}Z/, ""); +} +export function formatTime(time, option) { + time = +time * 1000; + const d = new Date(time); + const now = Date.now(); + + const diff = (now - d) / 1000; + + if (diff < 30) { + return "刚刚"; + } else if (diff < 3600) { + // less 1 hour + return Math.ceil(diff / 60) + "分钟前"; + } else if (diff < 3600 * 24) { + return Math.ceil(diff / 3600) + "小时前"; + } else if (diff < 3600 * 24 * 2) { + return "1天前"; + } + if (option) { + return parseTime(time, option); + } else { + return ( + d.getMonth() + + 1 + + "月" + + d.getDate() + + "日" + + d.getHours() + + "时" + + d.getMinutes() + + "分" + ); + } +} + +/* 数字 格式化 */ +export function nFormatter(num, digits) { + const si = [ + { value: 1e18, symbol: "E" }, + { value: 1e15, symbol: "P" }, + { value: 1e12, symbol: "T" }, + { value: 1e9, symbol: "G" }, + { value: 1e6, symbol: "M" }, + { value: 1e3, symbol: "k" } + ]; + for (let i = 0; i < si.length; i++) { + if (num >= si[i].value) { + return ( + (num / si[i].value + 0.1) + .toFixed(digits) + .replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + si[i].symbol + ); + } + } + return num.toString(); +} + +export function html2Text(val) { + const div = document.createElement("div"); + div.innerHTML = val; + return div.textContent || div.innerText; +} + +export function toThousandslsFilter(num) { + return (+num || 0) + .toString() + .replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ",")); +} + +/** + * 格式化文件大小 + * @param value + * @returns {*} + */ +export function renderSize(value) { + if (!value || value === null || value === "") { + return ""; + } + let unitArr = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; + let srcsize = parseFloat(value); + let index = Math.floor(Math.log(srcsize) / Math.log(1024)); + let size = srcsize / Math.pow(1024, index); + size = size.toFixed(0); // 保留的小数位数 + return size + unitArr[index]; +} diff --git a/src/views/basic/busType/busTypeAdvancedSettings.vue b/src/views/basic/busType/busTypeAdvancedSettings.vue index cfd32aa7..6a23d8d8 100644 --- a/src/views/basic/busType/busTypeAdvancedSettings.vue +++ b/src/views/basic/busType/busTypeAdvancedSettings.vue @@ -10,15 +10,15 @@ border>启用单据类型 - + 允许手动输入客户信息 - 允许科室多次使用出库 - 手持终端提交单据至自助平台 + 手持终端提交单据至自助平台 @@ -116,7 +116,7 @@ border>自动补单 - 平衡补单 @@ -183,7 +183,7 @@ border>自动补单 - 平衡补单 diff --git a/src/views/basic/busType/bussinessType.vue b/src/views/basic/busType/bussinessType.vue index 3c718a78..becd9588 100644 --- a/src/views/basic/busType/bussinessType.vue +++ b/src/views/basic/busType/bussinessType.vue @@ -196,8 +196,6 @@ export default { thirdAction: null, secCheckSp: null, checkSp: null, - checkBalacne: null, - secCheckBalacne: null, secCheckCopy: null, corpType: null, storageCode: null, @@ -206,7 +204,7 @@ export default { useDyCount: null, expireTip: true, prefix: null, - outTospms: null, + outToSpms: null, ullageFill: null, scanPreIn: null, vailInv: null, @@ -218,7 +216,8 @@ export default { advanceType: null, preIn: null, originAction: null, - comments: null, + checkBalance: null, + secCheckBalance: null }, enableMap: { true: "是", @@ -256,6 +255,7 @@ export default { cancelDialog() { this.modifyDialogVisible = false; this.addDialogVisible = false; + this.getList(); }, search() { this.filterQuery.page = 1; @@ -309,7 +309,6 @@ export default { }) .catch(() => { this.loading = false; - this.cancelDialog(); }); }, @@ -384,8 +383,8 @@ export default { thirdAction: null, secCheckSp: null, checkSp: null, - checkBalacne: null, - secCheckBalacne: null, + checkBalance: null, + secCheckBalance: null, secCheckCopy: null, corpType: null, storageCode: null, @@ -394,7 +393,7 @@ export default { useDyCount: null, expireTip: true, prefix: null, - outTospms: null, + outToSpms: null, ullageFill: null, scanPreIn: null, vailInv: null, @@ -405,8 +404,7 @@ export default { orderVisibleType: null, advanceType: null, preIn: null, - originAction: null, - comments: null + originAction: null } this.addDialogVisible = true; }, diff --git a/src/views/basic/busType/bussinessTypeModify.vue b/src/views/basic/busType/bussinessTypeModify.vue index 79b4aad3..19f0a8f2 100644 --- a/src/views/basic/busType/bussinessTypeModify.vue +++ b/src/views/basic/busType/bussinessTypeModify.vue @@ -136,9 +136,9 @@ - + 备 注 - @@ -227,7 +227,8 @@ export default { label: '特殊往来' }], twoCheck: false, - settingDialogVisible: false + settingDialogVisible: false, + oldData: {} } }, methods: { @@ -258,6 +259,16 @@ export default { } if (this.inputQuery.corpType === 4) { this.findSpecialMethod(); + } else { + this.inputQuery.defaultUnit = null; + } + + if (this.inputQuery.corpType !== 1) { + this.inputQuery.genUnit = false; + this.inputQuery.useDyCount = false; + } else { + this.inputQuery.genUnit = this.oldData.genUnit; + this.inputQuery.useDyCount = this.oldData.useDyCount; } }, @@ -319,6 +330,7 @@ export default { } this.getList(); this.findSpecialMethod(); + this.oldData = Object.assign({}, this.inputQuery); }, }; diff --git a/src/views/basic/corpMaintain/corpExport.vue b/src/views/basic/corpMaintain/corpExport.vue index 0f70477e..891fb559 100644 --- a/src/views/basic/corpMaintain/corpExport.vue +++ b/src/views/basic/corpMaintain/corpExport.vue @@ -119,7 +119,7 @@ genKey: null, status: null, page: 1, - type: 1, + type: 3, limit: 20, thirdSysFk: null, }; diff --git a/src/views/basic/corpMaintain/corpImport.vue b/src/views/basic/corpMaintain/corpImport.vue index c0d5e916..2b0eb902 100644 --- a/src/views/basic/corpMaintain/corpImport.vue +++ b/src/views/basic/corpMaintain/corpImport.vue @@ -53,12 +53,12 @@ {{ status[scope.row.status] }} - - - 详情 - - - + + + + + + diff --git a/src/views/basic/corpMaintain/corpMaintain.vue b/src/views/basic/corpMaintain/corpMaintain.vue index 76c73596..a99cacf0 100644 --- a/src/views/basic/corpMaintain/corpMaintain.vue +++ b/src/views/basic/corpMaintain/corpMaintain.vue @@ -358,7 +358,6 @@ export default { this.getThirdSysDetail(); }, formSubmit() { - if (this.$isBlank(this.editQuery.corpType)) { this.$message.error("往来单位类型不能为空!"); return; diff --git a/src/views/basic/corpMaintain/corpSingleRelevance.vue b/src/views/basic/corpMaintain/corpSingleRelevance.vue index b17004da..e96b4d2c 100644 --- a/src/views/basic/corpMaintain/corpSingleRelevance.vue +++ b/src/views/basic/corpMaintain/corpSingleRelevance.vue @@ -137,7 +137,7 @@ export default { }, methods: { handlepageChange(val) { - this.unitQuery.page = val; + this.unitQuery.page = val.page; this.getList(); }, handleErppageChange(val) { diff --git a/src/views/inout/IoCreateOrder.vue b/src/views/inout/IoCreateOrder.vue new file mode 100644 index 00000000..3a974b45 --- /dev/null +++ b/src/views/inout/IoCreateOrder.vue @@ -0,0 +1,914 @@ + + + + + + 草稿保存 + + 提交订单 + + + + + + + + + + + + + + + + + + + + + {{ item.name }} + {{ + item.code + }} + + + + + + + + + + {{ item.name }} + + + + + + + + + + + {{ item.name }} + + + + + + + {{ item.name }} + {{ + item.code + }} + + + + + + + + + + + + + + + + + + + + + + + 添加 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/inout/IoCreateOrderBizDetail.vue b/src/views/inout/IoCreateOrderBizDetail.vue new file mode 100644 index 00000000..143669d6 --- /dev/null +++ b/src/views/inout/IoCreateOrderBizDetail.vue @@ -0,0 +1,365 @@ + + + + 产品录入 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + + + 编辑 + + 复制 + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/inout/IoCreateOrderCodeDetail.vue b/src/views/inout/IoCreateOrderCodeDetail.vue new file mode 100644 index 00000000..819b6314 --- /dev/null +++ b/src/views/inout/IoCreateOrderCodeDetail.vue @@ -0,0 +1,101 @@ + + + + + + + + + + {{ convertDateFun(scope.row.productDate) }} + + + + + {{ convertDateFun(scope.row.expireDate) }} + + + + + + + + + + + + + + + + + diff --git a/src/views/inout/IoCreateOrderCodes.vue b/src/views/inout/IoCreateOrderCodes.vue new file mode 100644 index 00000000..5b68e513 --- /dev/null +++ b/src/views/inout/IoCreateOrderCodes.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + 减一 + + 选择产品 + + 选择供应商 + + 编辑 + + + + + + + + + + + + + diff --git a/src/views/inout/IoNewOrder.vue b/src/views/inout/IoNewOrder.vue new file mode 100644 index 00000000..4e46707b --- /dev/null +++ b/src/views/inout/IoNewOrder.vue @@ -0,0 +1,701 @@ + + + + + + + + + + + + + + + + + + + + + + + + {{ item.name }} + + + + + + + + + {{ item.name }} + + + + + + + + + 显示/隐藏搜索栏 + 重置 + + 查询 + + 合并单据 + 新增单据 + 异常单据 + + + + + + + + + + + + + {{ fromTypeMap[scope.row.fromType] }} + + + + + + + + + + + > + + + + + + + {{ scope.row.actDate }} + + + + + {{ + checkStatus[scope.row.status] + }} + + + + + + 编辑 + + 删除 + + 立即处理 + + + + + + {{ errorDetail }} + + 关 闭 + + + + + + + + + 查询 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/inout/stockOrderNewSelectProduct.vue b/src/views/inout/stockOrderNewSelectProduct.vue new file mode 100644 index 00000000..2b409c27 --- /dev/null +++ b/src/views/inout/stockOrderNewSelectProduct.vue @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 确定 + + + + + + + + + + + + + + + + + + + + + + + 详情 + + + + + + + + + + + + + {{ item }} + + + + + + + + + + + + diff --git a/src/views/login.vue b/src/views/login.vue index 4bceb026..916a8a73 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -56,7 +56,7 @@ diff --git a/src/views/system/dept/authDept.vue b/src/views/system/dept/authDept.vue index 43300e0f..30bdf7e4 100644 --- a/src/views/system/dept/authDept.vue +++ b/src/views/system/dept/authDept.vue @@ -99,11 +99,12 @@ - + @@ -164,20 +165,11 @@ 取消 - - {{ currentRow.name }}-用户列表 - 重置 - 查询 - + 帮助 - @@ -219,7 +211,7 @@ label="用户账号" prop="userName" > - + @@ -232,7 +224,6 @@ - @@ -260,7 +251,7 @@ 重置 查询 - + 帮助 @@ -332,13 +324,11 @@ export default { status: 1, companyName: "", checkType: "", - page: 1, - limit: 10, }, - total: 0, + isShow:null, loading: false, formVisible: false, - isExpandAll: true, + isExpandAll: false, refreshTable: true, userflag: { 0: "禁用", @@ -375,6 +365,7 @@ export default { //部门用户 userQuery: { key: null, + deptId: null, page: 1, limit: 10, }, @@ -426,9 +417,7 @@ export default { path: "", }); this.filterQuery = { - name: "", - page: 1, - limit: 10, + name: "" }; this.getList(); }, @@ -488,6 +477,7 @@ export default { this.getList(); }, addDeptDialog() { + this.resetForm(); this.formName = "add"; this.formVisible = true; this.formData = { @@ -502,6 +492,7 @@ export default { subAddDeptDialog(row) { this.formName = "add"; this.formVisible = true; + this.isShow=false; this.formData = { pid: row.id, pcode: row.code, @@ -513,9 +504,20 @@ export default { this.deptOptions = this.handleTree(depList, "code", "pcode"); }); }, + // 刷新表单 + resetForm() { + if (this.$refs["dataForm"]) { + // 清空验证信息表单 + this.$refs["dataForm"].clearValidate(); + // 刷新表单 + this.$refs["dataForm"].resetFields(); + } + }, updateDeptDialog(row) { + this.resetForm(); this.formName = "edit"; this.formVisible = true; + this.isShow=true; this.formData = row; // const roleMenu = this.getDeptStatusMenuTreeselect(this.formData.id); filterList().then(response => { @@ -530,24 +532,16 @@ export default { this.loading = false; let depList = response.data.list || []; this.list = this.handleTree(depList, "code", "pcode"); - this.total = response.data.total || 0; }) .catch(() => { this.loading = false; this.list = []; - this.total = 0; }); }, cancelDialog() { this.formVisible = false; - }, - handleSizeChange(val) { - this.filterQuery.limit = val; - this.getList(); - }, - handleCurrentChange(val) { - this.filterQuery.page = val; - this.getList(); + // 刷新表单 + this.$refs["dataForm"].resetFields(); }, deleteDialog(row) { this.$confirm("是否删除该部门?", "提示", { @@ -635,19 +629,18 @@ export default { onUserReset() { this.userQuery = { key: null, + deptId: this.currentRow.id, page: 1, limit: 10, }; this.getUerList(); }, onUserSubmit() { + this.userQuery.deptId = this.currentRow.id; this.getUerList(); }, getUerList() { - let query = { - deptId: this.currentRow.id, - }; - listDeptUser(query) + listDeptUser(this.userQuery) .then((response) => { this.loading = false; this.userlist = response.data.list || []; @@ -659,6 +652,15 @@ export default { this.userTotal = 0; }); }, + onInvReset() { + this.invQuery = { + key: "", + parentId: this.currentRow.code, + page: 1, + limit: 20 + }; + this.onInvSubmit(); + }, removeUserDialog(row) { this.$confirm("是否确定移除该用户?", "提示", { confirmButtonText: "确定", @@ -685,10 +687,7 @@ export default { //仓库相关 getInvList() { - let query = { - parentId: this.currentRow.code, - }; - filterSubAll(query) + filterSubAll(this.invQuery) .then((response) => { this.loading = false; this.invlist = response.data.list || []; @@ -700,6 +699,7 @@ export default { }); }, onInvSubmit() { + this.invQuery.parentId = this.currentRow.code; this.getInvList(); }, }, diff --git a/src/views/system/dept/invWarehouse.vue b/src/views/system/dept/invWarehouse.vue index e649e57c..52e2f210 100644 --- a/src/views/system/dept/invWarehouse.vue +++ b/src/views/system/dept/invWarehouse.vue @@ -85,7 +85,7 @@ 删除 @@ -132,6 +132,7 @@ @@ -151,6 +152,7 @@ @@ -159,7 +161,7 @@ - + { - this.loading = false; - this.sysSubList = response.data.list || []; + if (!isBlank(this.subData.code)) { + let params = { + id: this.subData.code, + }; + getSubThrsysDetail(params) + .then((response) => { + this.loading = false; + this.sysSubList = response.data.list || []; + }) + .catch(() => { + this.loading = false; + this.sysSubList = []; + }); + } + }, + + + handleDelInv(row) { + if (row.id) { + this.$confirm("确认删除该仓库吗?", "提示", { + type: "warning", }) - .catch(() => { - this.loading = false; - this.sysSubList = []; - }); + .then(() => { + this.deleteLoading = true; + let para = {id: row.id}; + deleteSubWarehouse(para) + .then((response) => { + this.deleteLoading = false; + if (response.code !== 20000) { + this.$message.error(response.message); + return false; + } + this.$message.success("删除成功"); + this.loadSubData(row.parentId); + }) + .catch(() => { + this.deleteLoading = false; + }); + }) + .catch(() => { + this.$message.info("取消删除"); + }); + } }, diff --git a/src/views/system/param/busTypeChange.vue b/src/views/system/param/busTypeChange.vue index 8d151524..9de27d98 100644 --- a/src/views/system/param/busTypeChange.vue +++ b/src/views/system/param/busTypeChange.vue @@ -120,15 +120,7 @@ export default { false: "禁用", true: "启用", }, - mainActionMap: { - WareHouseIn: "入库", - WareHouseOut: "出库" - }, - fileList: [], total: 0, - multipleSelection: [], - headers: {}, - configParams: {}, loading: false, typeMap: { 1: "耗材领用", diff --git a/src/views/system/param/busTypePre.vue b/src/views/system/param/busTypePre.vue index 6a7e860c..964f7c60 100644 --- a/src/views/system/param/busTypePre.vue +++ b/src/views/system/param/busTypePre.vue @@ -25,25 +25,17 @@ - - - - + + + + + + - {{ typeMap[scope.row.type] }} + {{ enableMap[scope.row.supplementAll] }} - - - {{ enableMap[scope.row.enable] }} - - - - - {{ enableMap[scope.row.enable] }} - - - + 删除 @@ -65,10 +57,10 @@ { if (response.code === 20000) { this.list = response.data.list || []; @@ -201,21 +179,20 @@ export default { }, onAddSubmit() { - this.inputQuery.enable = 1; - if (isBlank(this.inputQuery.originName)) { - this.$message.error("补单类型名称不能为空!") - return; - } if (isBlank(this.inputQuery.originAction)) { - this.$message.error("补单类型代码不能为空!"); + this.$message.error("原单据类型不能为空!"); return; } if (isBlank(this.inputQuery.action)) { this.$message.error("目标单据类型不能为空!") return; } - if (isBlank(this.inputQuery.enable)) { - this.$message.error("请选择启用状态!") + if (isBlank(this.inputQuery.invCode)) { + this.$message.error("目标所在仓库不能为空!") + return; + } + if (isBlank(this.inputQuery.defaultInvCode)) { + this.$message.error("目标往来仓库不能为空"); return; } @@ -226,7 +203,6 @@ export default { this.$message.error("单据类型名称不得为纯数字类型!"); return; } - this.inputQuery.type = 1; //默认类型为耗材领用 addBusTypePre(this.inputQuery).then((res) => { if (res.code === 20000) { @@ -260,8 +236,18 @@ export default { handleAddClick() { this.formName = 'add'; - this.inputQuery = {enable: false, expireTip: true}; - this.addDialogVisible = true; + this.inputQuery = { + id: null, + originAction: null, + action: null, + invCode: null, + defaultInvCode: null, + beforeTime: null, + supplementAll: null, + intro: null, + remark: null + }; + this.modifyDialogVisible = true; }, handleModifyClick(row) { @@ -276,7 +262,7 @@ export default { type: "warning", }) .then(() => { - let params = {}; + let params = {id: rowId}; deleteBusTypePre(params).then((res) => { if (res.code === 20000) { this.$message.success("删除成功!"); diff --git a/src/views/system/param/busTypePreModify.vue b/src/views/system/param/busTypePreModify.vue index 33379406..371bbcb5 100644 --- a/src/views/system/param/busTypePreModify.vue +++ b/src/views/system/param/busTypePreModify.vue @@ -3,46 +3,88 @@ - - + + + + {{ item.name }} + {{ item.action }} + + - - + + + + {{ item.name }} + {{ item.action }} + + + - - - + + - {{item.name}} - {{item.action}} + :value="item.code"> + {{ item.name }} + + + + + + + + {{ item.name }} + + + - - - - + + + + + + + + + + @@ -50,9 +92,9 @@ - - 备 注 - + 说 明 + @@ -64,7 +106,8 @@ diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index f7ff9743..e609a7a6 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -16,12 +16,8 @@ placeholder="请选择角色状态" clearable > - + + @@ -102,8 +98,8 @@ @@ -279,8 +275,8 @@ export default { deptOptions: [], // 查询参数 queryParams: { - pageNum: 1, - pageSize: 10, + page: 1, + limit: 10, roleName: undefined, roleKey: undefined, status: undefined @@ -423,7 +419,7 @@ export default { }, /** 搜索按钮操作 */ handleQuery() { - this.queryParams.pageNum = 1; + this.queryParams.page = 1; this.getList(); }, /** 重置按钮操作 */ diff --git a/src/views/system/user/authUser.vue b/src/views/system/user/authUser.vue index 8d64df2e..ca13d387 100644 --- a/src/views/system/user/authUser.vue +++ b/src/views/system/user/authUser.vue @@ -139,7 +139,7 @@ { if (valid) { this.formLoading = true; diff --git a/src/views/thirdSys/busType/index.vue b/src/views/thirdSys/busType/index.vue index 56a8439f..89284b23 100644 --- a/src/views/thirdSys/busType/index.vue +++ b/src/views/thirdSys/busType/index.vue @@ -142,6 +142,7 @@ export default { page: 1, limit: 20, }, + mainThirdSys:'', addDialogVisible: false, modifyDialogVisible: false, list: [], @@ -174,7 +175,7 @@ export default { path: "", }); this.filterQuery = { - thirdSys: "thirdId", + thirdSys: this.mainThirdSys, name: null, enable: null, page: 1, @@ -211,7 +212,12 @@ export default { getBasicThirdSys(query) .then((response) => { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i { @@ -293,7 +299,7 @@ export default { return; } if (this.$isBlank(this.inputQuery.thirdSys)) { - this.$message.error("所属系统不不能为空!"); + this.$message.error("所属系统不能为空!"); return; } let numRegExp = '^[0-9]*$'; @@ -373,6 +379,7 @@ export default { }, thirdSysChange() { + this.filterQuery.page = 1; this.getList(); }, diff --git a/src/views/thirdSys/corps/thrCorpSelect.vue b/src/views/thirdSys/corps/thrCorpSelect.vue index 2644d961..c6c8e471 100644 --- a/src/views/thirdSys/corps/thrCorpSelect.vue +++ b/src/views/thirdSys/corps/thrCorpSelect.vue @@ -105,6 +105,7 @@ export default { limit: 20, isDownThrSys: null, }, + mainThirdSys:'', total: 0, list: [], thirdSys: [], @@ -127,7 +128,7 @@ export default { thrCorpEntities: [], unitId: null, name: null, - thirdSys: null, + thirdSys: this.mainThirdSys, page: 1, limit: 20, isDownThrSys: null, @@ -167,7 +168,12 @@ export default { getBasicThirdSys(query) .then((response) => { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId; + for(var i=0;i { this.subFormVisible = false; }); - + this.resetForm(); }, @@ -588,12 +598,14 @@ export default { } } } + // 刷新表单 this.resetForm(); this.getList(); }) .catch(() => { this.formLoading = false; + this.$refs["dataForm"].resetFields(); }); } }); @@ -643,7 +655,14 @@ export default { getBasicThirdSys(query) .then((response) => { this.thirdSys = response.data.list || []; + for(var i=0;i { this.loading = false; diff --git a/src/views/thirdSys/invProducts/thrInvProducts.vue b/src/views/thirdSys/invProducts/thrInvProducts.vue index d5c2d3df..d75becf1 100644 --- a/src/views/thirdSys/invProducts/thrInvProducts.vue +++ b/src/views/thirdSys/invProducts/thrInvProducts.vue @@ -124,6 +124,7 @@ export default { limit: 100, filterCount: null, }, + mainThirdSys:'', total: 0, list: [], thirdSys: [], @@ -144,7 +145,7 @@ export default { this.filterQuery = { inventoryCode: null, inventoryName: null, - thirdSys: null, + thirdSys: this.mainThirdSys, spec: null, registerCertNo: null, manufactory: null, @@ -250,7 +251,12 @@ export default { getBasicThirdSys(query) .then((response) => { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId; + for(var i=0;i { this.thirdSys = response.data.list || []; - this.filterQuery.thirdSys = this.thirdSys[0].thirdId; + for(var i=0;i