diff --git a/src/api/print/index.js b/src/api/print/index.js
new file mode 100644
index 0000000..792c148
--- /dev/null
+++ b/src/api/print/index.js
@@ -0,0 +1,22 @@
+import request from '@/utils/request'
+
+function generateUniqueId() {
+ const timestamp = Date.now().toString(36); // 使用36进制,避免出现数字开头的问题
+ const randomNum = Math.random().toString(36).substr(2, 9); // 获取随机数的36进制表示,并截取后9位
+ return timestamp + randomNum;
+}
+
+export function sendPostRequestApi(funcId, funcName, data) {
+ const params = JSON.stringify({
+ version: "1.0",
+ seqNo: generateUniqueId(),
+ funcName: funcId,
+ inParams: data,
+ });
+ console.log(params)
+ return request({
+ url: 'http://127.0.0.1:9001/',
+ method: 'post',
+ data: params
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 7ca8a66..d34a188 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -40,12 +40,17 @@ export const constantRoutes = [{
path: '/404',
component: () => import('@/views/404'),
hidden: true
-},
+},
{
path: '/leader',
component: () => import('@/views/jsc/leader'),
hidden: true
},
+{
+ path: '/myprint',
+ component: () => import('@/views/myprint/index'),
+ hidden: true
+},
{
path: '/stocks',
component: () => import('@/views/stocks/index'),
diff --git a/src/views/myprint/index copy.vue b/src/views/myprint/index copy.vue
new file mode 100644
index 0000000..6baf915
--- /dev/null
+++ b/src/views/myprint/index copy.vue
@@ -0,0 +1,422 @@
+
+
+
+
+
+
+ 批量打印
+ 打印日志
+
+
打印预览
+
+
![]()
+
+
+
+
+
+
+
+
打印机序号:{{ prtSN }}
+
固件版本:{{ prtFWVer }}
+
打印状态:{{ prtStatusDesc }}
+
+
+
+ {{ log.time }}
+ {{ log.text }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/myprint/index.vue b/src/views/myprint/index.vue
new file mode 100644
index 0000000..b66d97c
--- /dev/null
+++ b/src/views/myprint/index.vue
@@ -0,0 +1,534 @@
+
+
+
+
+
+
+ 批量打印
+ 打印日志
+
+
打印预览
+
+
![]()
+
+
+
+
+
+
+
+
打印机序号:{{ prtSN }}
+
固件版本:{{ prtFWVer }}
+
打印状态:{{ prtStatusDesc }}
+
+
+
+ {{ log.time }}
+ {{ log.text }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/stocks/component/showRuku.vue b/src/views/stocks/component/showRuku.vue
index 513af73..2ce510d 100644
--- a/src/views/stocks/component/showRuku.vue
+++ b/src/views/stocks/component/showRuku.vue
@@ -37,10 +37,9 @@
diff --git a/src/views/stocks/index.vue b/src/views/stocks/index.vue
index 07b6fbd..0892382 100644
--- a/src/views/stocks/index.vue
+++ b/src/views/stocks/index.vue
@@ -101,8 +101,8 @@
} from '@/api/system/baseForm.js'
import addRuku from './component/addRuku.vue'
import showRuku from './component/showRuku.vue'
- import {
- delStock
+ import {
+ delStock
} from '@/api/stocks.js'
import {
getOatoken
@@ -261,15 +261,15 @@
]
}
},
- mounted() {
- if(this.$route.query.oaType==='wuzi'){
- this.editorRuku('','add',this.$route.query.rukuType)
+ mounted() {
+ if(this.$route.query.oaType==='wuzi'){
+ this.editorRuku('','add',this.$route.query.rukuType)
}
this.getUserName()
this.getindex()
getOatoken().then(res => {
this.wuziguanli_oatoken = res.oatoken
- })
+ })
},
methods: {
@@ -341,25 +341,25 @@
if (k == type) {
typeid = parseInt(typeObj[k])
}
- }
+ }
- let default_json = {
- stocks_id:res.id,
- xiangguanliucheng:res.xiangguanliucheng,
+ let default_json = {
+ stocks_id:res.id,
+ xiangguanliucheng:res.xiangguanliucheng,
// xiangguanliucheng:res.link_id,
- rukuriqi:res.rukushijian,
- jingbanren:res.jingbanren,
- jiluren:res.jilurenyuan,
- baoguanren:res.baoguanrenyuan,
- remark:res.beizhu,
+ rukuriqi:res.rukushijian,
+ jingbanren:res.jingbanren,
+ jiluren:res.jilurenyuan,
+ baoguanren:res.baoguanrenyuan,
+ remark:res.beizhu,
huowudan:res.zuozhengwenjian.join(",")
}
const url =
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?wuziguanli_oatoken=${this.wuziguanli_oatoken}&stocks_id=${res.id}&default_json=${JSON.stringify(default_json)}`
- const seeBuy = window.open(url, '_blank')
- if(this.$route.query.oaType==='wuzi'){
- window.history.back()
+ const seeBuy = window.open(url, '_blank')
+ if(this.$route.query.oaType==='wuzi'){
+ window.history.back()
}
},
deleteRuku(row) {
@@ -388,4 +388,4 @@
margin-right: 10px;
}
}
-
+
diff --git a/vue.config.js b/vue.config.js
index 3167c68..0785982 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -58,6 +58,13 @@ module.exports = {
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: process.env.VUE_APP_BASE_API
}
+ },
+ '/print': {
+ target: 'http://127.0.0.1:9001', // 目标接口地址
+ changeOrigin: true, // 开启代理,模拟同源请求
+ pathRewrite: {
+ '^/print': '' // 去掉请求路径中的 /print 前缀(如果接口本身没有 /print
+ }
}
}
},