From 4bb99949c611df97fb1978a9e755a80ade48ebab Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 21 Sep 2021 16:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BAbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/config.js | 2 +- public/config.json | 2 +- src/api/itextpdf/itextpdf.js | 95 +++ src/api/param/getBasrUrl.js | 4 +- src/api/param/systemPDFTemplate.js | 62 ++ src/router/index.js | 367 +++++---- src/views/basic/CorpExport.vue | 54 +- src/views/basic/CorpExportSmp.vue | 5 - src/views/basic/UdiinfoExport.vue | 45 +- src/views/home/Empty.vue | 13 + src/views/inout/IOWaitOrder.vue | 2 +- src/views/other/showText.vue | 45 ++ src/views/thrsys/ThrCorpsExport.vue | 50 +- src/views/thrsys/ThrInvProductsExport.vue | 46 +- src/views/thrsys/ThrOrder.vue | 11 +- src/views/thrsys/ThrOrderExport.vue | 44 +- src/views/thrsys/ThrOrderImport.vue | 12 - src/views/thrsys/ThrProducts.vue | 5 +- src/views/thrsys/ThrProductsExport.vue | 44 +- .../userManage/param/systemPDFTemplate.vue | 727 ++++++++++++++++++ 20 files changed, 1309 insertions(+), 326 deletions(-) create mode 100644 src/api/itextpdf/itextpdf.js create mode 100644 src/api/param/systemPDFTemplate.js create mode 100644 src/views/home/Empty.vue create mode 100644 src/views/other/showText.vue create mode 100644 src/views/userManage/param/systemPDFTemplate.vue diff --git a/public/config.js b/public/config.js index bcb5a56..cc11403 100644 --- a/public/config.js +++ b/public/config.js @@ -1,5 +1,5 @@ window.global_config = { "BASE_URL":"http://139.159.187.130:8080/UDI_WMS_MC", // "BASE_URL":"http://127.0.0.1:9991", - }; +}; diff --git a/public/config.json b/public/config.json index b8ad19b..efdb12d 100644 --- a/public/config.json +++ b/public/config.json @@ -1,4 +1,4 @@ { "BASE_URL":"http://127.0.0.1:9991", - "BASE_URL2": "ws://127.0.0.1:9991/api/websocket/" + "BASE_URL2": "ws://139.159.187.130:8080/api/websocket/" } diff --git a/src/api/itextpdf/itextpdf.js b/src/api/itextpdf/itextpdf.js new file mode 100644 index 0000000..4f9c0db --- /dev/null +++ b/src/api/itextpdf/itextpdf.js @@ -0,0 +1,95 @@ +import axios from "../../utils/axios"; + +export function codeList(query) { + return axios({ + url: "/admin/warehouse/inout/findByOrderId", + method: "get", + params: query + }); +} + +export function downloadInoutOrderSuccessPDF(query) { + return axios({ + url: "/udiwms/pdf/download/inout/order/success", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + +export function orderDetailPDFFromTemplateCode(query) { + return axios({ + url: "/udiwms/pdf/template/order/detail/code", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + +export function orderDetailPDFFromTemplateFile(query) { + return axios({ + url: "/udiwms/pdf/template/order/detail/file", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + +export function inspectionOrderDetailPDFFromTemplateCode(query) { + return axios({ + url: "/udiwms/pdf/template/inspection/order/detail/code", + method: "post", + data: query, + }); +} + +export function inspectionOrderDetailPDFFromTemplateFile(query) { + return axios({ + url: "/udiwms/pdf/template/inspection/order/detail/file", + method: "post", + data: query, + }); +} + +//---------打印码 +export function inspectionStockQRCodeTextPDFFromTemplateFile(query) { + return axios({ + url: "/udiwms/pdf/template/inspection/stock/qrcode/text/file", + method: "post", + data: query, + }); +} +export function stockQRCodeTextPDFFromTemplateFile(query) { + return axios({ + url: "/udiwms/pdf/template/stock/qrcode/text/file", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + +//---------打印订单 +export function inspectionStockOrderPDFFromTemplateFile(query) { + return axios({ + url: "/udiwms/pdf/template/inspection/stock/order/file", + method: "post", + data: query, + }); +} +export function stockOrderPDFFromTemplateFile(query) { + return axios({ + url: "/udiwms/pdf/template/stock/order/file", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + + + + diff --git a/src/api/param/getBasrUrl.js b/src/api/param/getBasrUrl.js index 6a01f30..01dabb4 100644 --- a/src/api/param/getBasrUrl.js +++ b/src/api/param/getBasrUrl.js @@ -1,9 +1,9 @@ import axios from "axios"; export function getBaseUrl() { - axios.get("./config.json").then(res => { + axios.get("/config.json").then(res => { // 基础地址 - console.log( res.data.BASE_URL+"\n"+ res.data.BASE_URL2) + console.log(res.data.BASE_URL + "\n" + res.data.BASE_URL2) return res.data.BASE_URL; }); } diff --git a/src/api/param/systemPDFTemplate.js b/src/api/param/systemPDFTemplate.js new file mode 100644 index 0000000..b451f85 --- /dev/null +++ b/src/api/param/systemPDFTemplate.js @@ -0,0 +1,62 @@ +/** + * Created by lk on 17/6/4. + */ +import axios from "../../utils/axios"; + +// 获取列表 +export function systemPDFTemplateList(query) { + return axios({ + url: "/system/pdf/template/list", + method: "get", + params: query + }); +} +export function systemPDFModuleList(query) { + return axios({ + url: "/system/pdf/module/list", + method: "get", + params: query + }); +} + +export function getSystemPDFModules(query) { + return axios({ + url: "/system/pdf/module/pdfModules", + method: "get", + params: query + }); +} + +export function getSystemPDFTemplates(query) { + return axios({ + url: "/system/pdf/template/pdfTemplates", + method: "get", + params: query + }); +} + +export function systemPDFTemplateSave(data, formName, method = "post") { + let url = formName === "add" ? "/system/pdf/template/save" : "/system/pdf/template/update"; + return axios({ + url: url, + method: method, + data: data + }); +} + +export function systemPDFModuleSave(data, formName, method = "post") { + let url = formName === "add" ? "/system/pdf/module/save" : "/system/pdf/module/update"; + return axios({ + url: url, + method: method, + data: data + }); +} + +export function systemPDFTemplateDeleteById(query) { + return axios({ + url: "/system/pdf/template/delete", + method: "get", + params: query + }); +} diff --git a/src/router/index.js b/src/router/index.js index b3a560b..a49fff5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,14 +8,17 @@ if (process.env.NODE_ENV === "development") { import {ROUTER_MODE} from "../config/app"; import Home from "../views/home/index.vue"; +import Empty from "../views/home/Empty.vue"; // 管理组相关 import authAdmin from "../views/userManage/admin/authAdmin.vue"; import authRole from "../views/userManage/admin/authRole.vue"; import authPermissionRule from "../views/userManage/admin/authPermissionRule.vue"; import systemParamConfig from "../views/userManage/param/systemParamConfig.vue"; +import systemPDFTemplate from "../views/userManage/param/systemPDFTemplate"; import thirdSysApi from "../views/userManage/param/ThirdSysApiUpload.vue"; import thirdSysApiDownload from "../views/userManage/param/ThirdSysApiDownload.vue"; +import showText from "../views/other/showText"; //基础数据维护 import BussinessType from "../views/basic/BussinessType.vue"; @@ -186,6 +189,15 @@ export const asyncRouterMap = [ authRule: ["admin/systemParamConfig"] } }, + { + path: "systemPDFTemplate", + component: systemPDFTemplate, + name: "打印模板管理", + icon: "", + meta: { + authRule: ["admin/system_pdf_template"] + } + }, { path: "bussinessType", name: "单据类型", @@ -338,58 +350,74 @@ export const asyncRouterMap = [ authRule: ["product"] }, children: [ - - - { - path: "productinfo", - name: "医疗器械信息维护", - component: UdiInfoManage, - meta: { - authRule: ["product/productinfo"] - } - }, { - path: "udiImport", - name: "医疗器械信息导入", - component: UdiInfoImport, + path: "/udiinfo", + redirect: "/udiinfo/udiinfomg", + name: "医疗器械信息", + component: Empty, meta: { - authRule: ["product/udiImport"] - } - }, - { - path: "udiinfoExport", - name: "医疗器械信息导出", - component: udiinfoExport, - meta: { - authRule: ["product/udiinfoExport"] - } - }, - - - { - path: "unitMaintain", - name: "往来单位信息维护", - component: basicUnitMaintain, - meta: { - authRule: ["basic/basicUnitMaintain"] - } - }, - { - path: "corpImport", - name: "往来单位信息导入", - component: corpImport, - meta: { - authRule: ["basic/corpImport"] - } - }, - - { - path: "corpExport", - name: "往来单位信息导出", - component: corpExport, + authRule: ["thrsys/thrProducts"] + }, + children: [ + { + path: "udiinfomg", + name: "医疗器械信息维护", + component: UdiInfoManage, + meta: { + authRule: ["product/productinfo"] + } + }, + { + path: "udiImport", + name: "医疗器械信息导入", + component: UdiInfoImport, + meta: { + authRule: ["product/udiImport"] + } + }, + { + path: "udiinfoExport", + name: "医疗器械信息导出", + component: udiinfoExport, + meta: { + authRule: ["product/udiinfoExport"] + } + },] + }, + { + path: "/unit", + redirect: "/unit/unitMaintain", + name: "往来单位信息", + component: Empty, meta: { - authRule: ["basic/corpExport"] - } + authRule: ["thrsys/thrProducts"] + }, + children: [ + { + path: "unitMaintain", + name: "往来单位信息维护", + component: basicUnitMaintain, + meta: { + authRule: ["basic/basicUnitMaintain"] + } + }, + { + path: "corpImport", + name: "往来单位信息导入", + component: corpImport, + meta: { + authRule: ["basic/corpImport"] + } + }, + + { + path: "corpExport", + name: "往来单位信息导出", + component: corpExport, + meta: { + authRule: ["basic/corpExport"] + } + },] }, { @@ -414,105 +442,144 @@ export const asyncRouterMap = [ authRule: ["thrsys"] }, children: [ - - { - path: "thrProducts", - name: "产品信息查询", - component: thrProducts, + path: "/products", + redirect: "/thrsys/thrProducts", + name: "产品信息", + component: Empty, meta: { authRule: ["thrsys/thrProducts"] - } - }, - { - path: "thrProductsImport", - name: "产品信息导入", - component: thrProductsImport, - meta: { - authRule: ["thrsys/thrProductsImport"] - } - }, - { - path: "thrProductsExport", - name: "产品信息导出", - component: thrProductsExport, - meta: { - authRule: ["thrsys/thrProductsExport"] - } - }, - { - path: "ThrCorps", - name: "往来单位查询", - component: ThrCorps, + }, + children: [ + { + path: "thrProducts", + name: "产品信息查询", + component: thrProducts, + meta: { + authRule: ["thrsys/thrProducts"] + }, + }, + { + path: "thrProductsImport", + name: "产品信息导入", + component: thrProductsImport, + meta: { + authRule: ["thrsys/thrProductsImport"] + } + }, + { + path: "thrProductsExport", + name: "产品信息导出", + component: thrProductsExport, + meta: { + authRule: ["thrsys/thrProductsExport"] + } + }, + ] + }, + { + path: "/corps", + redirect: "/thrsys/ThrCorps", + name: "往来单位", + component: Empty, meta: { - authRule: ["thrsys/ThrCorps"] - } - }, - { - path: "thrCorpsExport", - name: "往来单位导出", - component: thrCorpsExport, - meta: { - authRule: ["thrsys/thrCorpsExport"] - } - }, - - { - path: "thrCorpsImport", - name: "往来单位导入", - component: thrCorpsImport, - meta: { - authRule: ["thrsys/thrCorpsImport"] - } - }, - - { - path: "ThrOrders", - name: "业务单据查询", - component: ThrOrders, - meta: { - authRule: ["thrsys/ThrOrders"] - } - }, - { - path: "thrOrderImport", - name: "业务单据导入", - component: thrOrderImport, - meta: { - authRule: ["thrsys/thrOrderImport"] - } - }, - { - path: "thrOrderExport", - name: "业务单据导出", - component: thrOrderExport, - meta: { - authRule: ["thrsys/thrOrderExport"] - } - }, - { - path: "ThrInvProducts", - name: "库存信息查询", - component: ThrInvProducts, - meta: { - authRule: ["thrsys/ThrInvProducts"] - } - }, - { - path: "thrInvProductsImport", - name: "库存信息导入", - component: thrInvProductsImport, + authRule: ["thrsys/thrProducts"] + }, + children: [ + { + path: "ThrCorps", + name: "往来单位查询", + component: ThrCorps, + meta: { + authRule: ["thrsys/ThrCorps"] + } + }, + { + path: "thrCorpsExport", + name: "往来单位导出", + component: thrCorpsExport, + meta: { + authRule: ["thrsys/thrCorpsExport"] + } + }, + + { + path: "thrCorpsImport", + name: "往来单位导入", + component: thrCorpsImport, + meta: { + authRule: ["thrsys/thrCorpsImport"] + } + }], + }, + { + path: "/orders", + redirect: "/thrsys/ThrOrders", + name: "业务单据", + component: Empty, meta: { - authRule: ["thrsys/thrInvProductsImport"] - } - }, - { - path: "thrInvProductsExport", - name: "库存信息导出", - component: thrInvProductsExport, + authRule: ["thrsys/thrProducts"] + }, + children: [ + { + path: "ThrOrders", + name: "业务单据查询", + component: ThrOrders, + meta: { + authRule: ["thrsys/ThrOrders"] + } + }, + { + path: "thrOrderImport", + name: "业务单据导入", + component: thrOrderImport, + meta: { + authRule: ["thrsys/thrOrderImport"] + } + }, + { + path: "thrOrderExport", + name: "业务单据导出", + component: thrOrderExport, + meta: { + authRule: ["thrsys/thrOrderExport"] + } + },], + }, + { + path: "/invProducts", + redirect: "/thrsys/ThrOrders", + name: "库存信息", + component: Empty, meta: { - authRule: ["thrsys/thrInvProductsExport"] - } + authRule: ["thrsys/thrProducts"] + }, + children: [ + + { + path: "ThrInvProducts", + name: "库存信息查询", + component: ThrInvProducts, + meta: { + authRule: ["thrsys/ThrInvProducts"] + } + }, + { + path: "thrInvProductsImport", + name: "库存信息导入", + component: thrInvProductsImport, + meta: { + authRule: ["thrsys/thrInvProductsImport"] + } + }, + { + path: "thrInvProductsExport", + name: "库存信息导出", + component: thrInvProductsExport, + meta: { + authRule: ["thrsys/thrInvProductsExport"] + } + },] }, { @@ -660,4 +727,20 @@ export const asyncRouterMap = [ ] }, + { + path: "/", + icon: "showText", + component: showText, + redirect: "showText", + name: "文本", + hidden: true, + noDropdown: true, + children: [ + { + path: "showText", + component: showText, + name: "文本", + }, + ] + }, ]; diff --git a/src/views/basic/CorpExport.vue b/src/views/basic/CorpExport.vue index 1e1b53f..206d6a0 100644 --- a/src/views/basic/CorpExport.vue +++ b/src/views/basic/CorpExport.vue @@ -79,7 +79,7 @@ width="85%" v-if="corpImportDetailVisible" > - @@ -93,10 +93,9 @@ + + diff --git a/src/views/inout/IOWaitOrder.vue b/src/views/inout/IOWaitOrder.vue index 35d3061..9007489 100644 --- a/src/views/inout/IOWaitOrder.vue +++ b/src/views/inout/IOWaitOrder.vue @@ -217,7 +217,7 @@ import { repeatCheck } from "../../api/inout/erpOrder"; import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain" import draggable from "vuedraggable"; - import codeDetail from "./IONewCode"; + import codeDetail from "./IOFinishCode"; const formJson = { site_id: "", diff --git a/src/views/other/showText.vue b/src/views/other/showText.vue new file mode 100644 index 0000000..8248adf --- /dev/null +++ b/src/views/other/showText.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/views/thrsys/ThrCorpsExport.vue b/src/views/thrsys/ThrCorpsExport.vue index 80e6688..7d32a53 100644 --- a/src/views/thrsys/ThrCorpsExport.vue +++ b/src/views/thrsys/ThrCorpsExport.vue @@ -79,7 +79,7 @@ width="85%" v-if="thrCorpSelectVisible" > - @@ -95,7 +95,7 @@ diff --git a/src/views/thrsys/ThrOrderExport.vue b/src/views/thrsys/ThrOrderExport.vue index 3490838..06cd96d 100644 --- a/src/views/thrsys/ThrOrderExport.vue +++ b/src/views/thrsys/ThrOrderExport.vue @@ -95,6 +95,7 @@ diff --git a/src/views/thrsys/ThrProductsExport.vue b/src/views/thrsys/ThrProductsExport.vue index 8c516a5..c6086c7 100644 --- a/src/views/thrsys/ThrProductsExport.vue +++ b/src/views/thrsys/ThrProductsExport.vue @@ -95,7 +95,7 @@ + +