diff --git a/src/utils/request.js b/src/utils/request.js
index bd0d66b0..3337ad5e 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -7,13 +7,13 @@ export const wsuri = `ws://192.168.1.212:61101//WebMoudule//websocket`
export const name = `OP8888`
// 创建axios实例
-export const readFile = `http://192.168.1.212:8411/webpage/file/` // invoice
-export const readImg = `http://192.168.1.212:8411/webpage/img/` // delivery/MS/performancebond
-export const upload = `http://192.168.1.212:8411/submit/uploadFile.ashx` // ContractInformationManagement
-export const upload2 = `http://192.168.1.212:8411/submit/upload2.ashx` // delivery
-export const upload3 = `http://192.168.1.212:8411/submit/upload3.ashx` // performancebond
-export const uploadInvoiceScan = `http://192.168.1.212:8411/submit/uploadInvoiceScan.ashx` // invoice
-export const download = `http://192.168.1.212:8411/submit/downloadFile.ashx` // ContractInformationManagement
+export const readFile = `192.168.1.212:8411/webpage/file/` // invoice
+export const readImg = `192.168.1.212:8411/webpage/img/` // delivery/MS/performancebond
+export const upload = `192.168.1.212:8411/submit/uploadFile.ashx` // ContractInformationManagement
+export const upload2 = `192.168.1.212:8411/submit/upload2.ashx` // delivery
+export const upload3 = `192.168.1.212:8411/submit/upload3.ashx` // performancebond
+export const uploadInvoiceScan = `192.168.1.212:8411/submit/uploadInvoiceScan.ashx` // invoice
+export const download = `192.168.1.212:8411/submit/downloadFile.ashx` // ContractInformationManagement
const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
diff --git a/src/views/ManufacturingCenter/CreatePreparationBill/index.vue b/src/views/ManufacturingCenter/CreatePreparationBill/index.vue
index cdb8bb53..38eb9858 100644
--- a/src/views/ManufacturingCenter/CreatePreparationBill/index.vue
+++ b/src/views/ManufacturingCenter/CreatePreparationBill/index.vue
@@ -103,14 +103,18 @@ export default {
},
methods: {
exportTable() {
- const htmlNode = $('#BL').html()
- const body = $('body')
- body.children().hide()
- const printNode = $(htmlNode)
- body.append(printNode)
- window.print()
- body.children().not('script').show()
- printNode.remove()
+ if (this.tableData2.length === 0) {
+ this.$message.warning('暂无数据')
+ } else {
+ const htmlNode = $('#BL').html()
+ const body = $('body')
+ body.children().hide()
+ const printNode = $(htmlNode)
+ body.append(printNode)
+ window.print()
+ body.children().not('script').show()
+ printNode.remove()
+ }
},
// 查询表格数据
searchTable() {
diff --git a/src/views/MarketingCenter/DeliveryManagement/index.vue b/src/views/MarketingCenter/DeliveryManagement/index.vue
index b6523571..379ddb83 100644
--- a/src/views/MarketingCenter/DeliveryManagement/index.vue
+++ b/src/views/MarketingCenter/DeliveryManagement/index.vue
@@ -318,11 +318,19 @@
删除
-
- 追溯码
+
+
![]()
+
+
+
+ {{ containerNumber }}
+
+
+
+ 追溯码
- | 江苏高精机电装备有限公司 |
+ 江苏高精机电装备有限公司 |
 |
- | {{ 装箱单名称 }}发货单 |
+ {{ 装箱单名称 }}发货单 |
| 发货单号 |
- {{ 发货单号 }} |
+ {{ 发货单号 }} |
收货人 |
- {{ 收货人 }} |
+ {{ 收货人 }} |
联系电话 |
- {{ 联系电话 }} |
+ {{ 联系电话 }} |
| 收货地址 |
- {{ 收货地址 }} |
+ {{ 收货地址 }} |
委托车辆 |
- {{ 委托车辆 }} |
+ {{ 委托车辆 }} |
发货日期 |
- {{ 发货日期 }} |
+ {{ 发货日期 }} |
| 序号 |
- 代号 |
+ 货箱号 |
名称 |
+ 代号 |
规格 |
数量 |
- 备注 |
+ 备注 |
确认 |
| {{ index + 1 }} |
- {{ list.代号 }} |
+ {{ list.货箱号 }} |
{{ list.名称 }} |
+ {{ list.代号 }} |
{{ list.规格 }} |
{{ list.数量 }} |
- {{ list.备注 }} |
+ {{ list.备注 }} |
|
- | 本清单一式两份:一份请收货人清点货物;一份请签收人签收后交还司机带回本公司。请签收人在货物卸车后立即清点! |
- 签收人签字: |
+ 本清单一式两份:一份请收货人清点货物;一份请签收人签收后交还司机带回本公司。请签收人在货物卸车后立即清点! |
+ 签收人签字: |
|
@@ -610,7 +620,7 @@ import $ from 'jquery'
import { selectDelivery, submitRremove, searchCargoBoxDetailed, submitMoveInto, delCargoBox, addCargoBox, searchCargoBox, editInvoice, delInvoice, addInvoice, editAdress, addAdress, deleteAdress, citySearch, provinceSearch, addressSearch, searchParts, searchHost, searchSparePart, searchProjectName, searchPackingList, searchFile, searchInvoice } from '@/api//MarketingCenter/DeliveryManagement'
import QRCode from 'qrcode'
import { upload2, readImg } from '@/utils/request'
-
+import html2Canvas from 'html2canvas'
export default {
components: {
elInput
@@ -624,6 +634,7 @@ export default {
table: [],
canvas: [],
show: false,
+ show1: false,
num: '',
DeliveryVisiable: false,
fileList: [],
@@ -635,6 +646,8 @@ export default {
发货日期: '',
装箱单名称: '',
运输状态: '',
+ containerNumber: '',
+ dataURL: '',
a: 1, // 嵌套表格交换变量
b: 1, // 嵌套表格交换变量
flag1: '', // 发货单旗帜变量
@@ -883,7 +896,6 @@ export default {
},
// 显示编辑发货单对话框
showEditInvoice(row) {
- console.log(row)
this.dialogFormVisible1 = true
this.form1.收货地址 = row.省份 + row.市名 + row.详细地址
this.form1.车辆牌号 = row.车辆牌号
@@ -1081,7 +1093,6 @@ export default {
if (row.规格 === null) { this.goodsSpecifications = '' } else { this.goodsSpecifications = row.规格 }
if (row.数量 === null) { this.goodsNumber = '' } else { this.goodsNumber = row.数量 }
if (row.备注 === null) { this.goodsRemark = '' } else { this.goodsRemark = row.备注 }
- console.log(this.Spare, this.goodsCodeName, this.goodsName, this.goodsSpecifications, this.goodsNumber, this.goodsRemark)
},
// 选择文件
choiceFile(row) {
@@ -1101,7 +1112,6 @@ export default {
this.goodsSpecifications = ''
if (row.数量 === null) { this.goodsNumber = '' } else { this.goodsNumber = row.数量 }
if (row.备注 === null) { this.goodsRemark = '' } else { this.goodsRemark = row.备注 }
- console.log(this.Spare, this.goodsCodeName, this.goodsName, this.goodsSpecifications, this.goodsNumber, this.goodsRemark)
},
// 选择部件
choiceParts(row) {
@@ -1121,7 +1131,6 @@ export default {
if (row.规格 === null) { this.goodsSpecifications = '' } else { this.goodsSpecifications = row.规格 }
if (row.数量 === null) { this.goodsNumber = '' } else { this.goodsNumber = row.数量 }
if (row.备注 === null) { this.goodsRemark = '' } else { this.goodsRemark = row.备注 }
- console.log(this.Spare, this.goodsCodeName, this.goodsName, this.goodsSpecifications, this.goodsNumber, this.goodsRemark)
},
choiceGoods(row) {
this.maxNum = row.数量
@@ -1157,6 +1166,13 @@ export default {
})
},
searchCargoBoxDetailed() {
+ this.货箱号 = ''
+ this.dataURL = ''
+ for (let i = 0; i < this.cargoBox.length; i++) {
+ if (this.cargoBoxValue === this.cargoBox[i].value) {
+ this.containerNumber = this.cargoBox[i].label
+ }
+ }
this.tableData6Loading = true
searchCargoBoxDetailed(this.cargoBoxValue).then(response => {
this.tableData6Loading = false
@@ -1199,7 +1215,6 @@ export default {
},
useqrcode() {
this.show = true
- console.log(this.cargoBoxValue)
// 生成的二维码内容,可以添加变量
this.QueryDetail = this.cargoBoxValue.toString()
var canvas = document.getElementById('canvas')
@@ -1213,6 +1228,8 @@ export default {
},
clear() {
this.show = false
+ this.货箱号 = ''
+ this.dataURL = ''
},
async getFileList() {
const { data } = await request({
@@ -1279,7 +1296,6 @@ export default {
this.invoiceNum = row.发货单编号
this.DeliveryVisiable = true
selectDelivery(this.invoiceNum).then(response => {
- console.log(response)
this.table = response.data
this.装箱单名称 = response.data[0].装箱单名称
this.发货单号 = response.data[0].发货单号
@@ -1324,6 +1340,23 @@ export default {
},
callOffDownLoadDelivery() {
this.DeliveryVisiable = false
+ },
+ toImage() {
+ this.show = false
+ html2Canvas(this.$refs.imageWrapper, {
+ backgroundColor: '#FFFFFF'
+ }).then((canvas) => {
+ const dataURL = canvas.toDataURL('image/jpeg')
+ this.dataURL = dataURL
+ }).then(() => {
+ // var oCanvas = document.getElementById('canvas')
+ var save_url = this.dataURL
+ var a = document.createElement('a')
+ document.body.appendChild(a)
+ a.href = save_url
+ a.download = this.containerNumber
+ a.click()
+ })
}
}
}
@@ -1335,7 +1368,7 @@ export default {
height: auto!important;
}
#canvas{
- width: 120px !important;
+ width: 170px !important;
height: auto!important;
}
#img{