标签打印、入库单和出库单打印完成
This commit is contained in:
1183
pages/print/index.vue
Normal file
1183
pages/print/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,7 @@ import { objectToQuery, getBillType } from '../../../until';
|
||||
|
||||
import { stockOutDetail } from '@/api/stockOut';
|
||||
import { stockInDetail, inboundBillVoid } from '@/api/stockIn';
|
||||
import { BASE_URL } from '@/api/request';
|
||||
|
||||
import DetailInfo from '../../../components/DetailInfo.vue';
|
||||
import Navigation from '../../../components/Navigation.vue';
|
||||
@@ -73,7 +74,21 @@ const OPERATE_CONFIG = {
|
||||
}
|
||||
const flag = computed(() => _.includes(pathParams.value.type, 'stockIn') ? 0 : 1)
|
||||
// 打印
|
||||
const onPrinter = () => { }
|
||||
const onPrinter = () => {
|
||||
uni.downloadFile({
|
||||
url: BASE_URL + (flag.value == 1 ? '/worn/outboundBill/print/' : '/worn/inboundBill/print/') + detailInfo.value?.billId,
|
||||
header:{
|
||||
authorization: uni.getStorageSync("app_token"),
|
||||
},
|
||||
success: (res) => {
|
||||
let filePath = res.tempFilePath
|
||||
uni.openDocument({
|
||||
filePath: filePath,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取详情 - 将isDelete写入
|
||||
const getDetailInfo = () => {
|
||||
if (flag.value == 1) {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom">
|
||||
<uv-button type="primary" text="唯一码打印"></uv-button>
|
||||
<uv-button type="primary" text="唯一码打印" @tap="goPrint"></uv-button>
|
||||
<uv-button type="success" text="溯源" @click="toTraceability"></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -129,6 +129,12 @@ const getDetailInfo = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const goPrint = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/print/index"
|
||||
})
|
||||
}
|
||||
|
||||
// 溯源
|
||||
const toTraceability = () => {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user