diff --git a/favicon.ico b/favicon.ico index 34b63ac6..8f486dbb 100644 Binary files a/favicon.ico and b/favicon.ico differ diff --git a/package.json b/package.json index 8618c4a3..02b3cafd 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,10 @@ "echarts": "^4.2.0-rc.2", "element-ui": "2.4.6", "file-saver": "^1.3.8", + "html2canvas": "^1.0.0-alpha.12", "jquery": "^3.3.1", "js-cookie": "2.2.0", + "jspdf": "^1.5.2", "node-sass": "^4.10.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/Inventory/DirectPart.js b/src/api/Inventory/DirectPart.js index 29b413fc..944d2ea0 100644 --- a/src/api/Inventory/DirectPart.js +++ b/src/api/Inventory/DirectPart.js @@ -72,14 +72,14 @@ export function searchDirectPart(pageCurrent, pageSize, project_check, project, }) } // 人员查询 需要在部门确定之后修改 -export function searchPeople() { +export function searchPeople(data1) { return request({ url: '', method: 'post', data: { type: '1', - name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=18' + name: '库存管理_人员查询_库存部门', + param: '角色编号=' + data1 } }) } diff --git a/src/api/Inventory/InboundCard.js b/src/api/Inventory/InboundCard.js index a57066c3..96afedc3 100644 --- a/src/api/Inventory/InboundCard.js +++ b/src/api/Inventory/InboundCard.js @@ -10,6 +10,17 @@ export function searchContract() { } }) } +export function searchShopContract() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_库存管理_车间采购合同查询' + } + }) +} + // 仓库查询 export function searchInventory() { return request({ @@ -33,7 +44,7 @@ export function searchInbound(data1, data2, data3) { } }) } -// 入库记录查询 +// 车间采购查询 export function searchShopInbound(data1, data2, data3) { return request({ url: '', @@ -45,3 +56,78 @@ export function searchShopInbound(data1, data2, data3) { } }) } +// 入库单查询 +export function searchInboundCard(data1, data2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_采购入库单_入库单查询', + param: '入库单号_check=' + data1 + '&入库单号=' + data2 + } + }) +} +// 入库单增加 +export function addInboundCard(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_采购入库单_入库单增加', + param: '入库日期=' + data1 + '&仓库流水号=' + data2 + '&合同流水号=' + data3 + '&到货单号=' + data4 + '&业务员=' + data5 + '&业务号=' + data6 + '&到货日期=' + data7 + '&业务类型=' + data8 + '&采购类型=' + data9 + '&入库类别=' + data10 + '&备注=' + data11 + } + }) +} + +// 库存角色查询 +export function searchAffairPeople(data1) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_人员查询_库存部门', + param: '角色编号=' + data1 + } + }) +} + +// 入库单明细查询 +export function searchInboundCardDetail(data1) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_采购入库单_入库单明细_查询数据', + param: '采购入库单流水号=' + data1 + } + }) +} +// 入库单明细增加 +export function addInboundCardDetail(data1, data2, data3, data4, data5, data6, data7) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_采购入库单_批量增加入库单明细', + param: '采购入库单流水号=' + data1 + '&名称组=' + data2 + '&型号组=' + data3 + '&规格组=' + data4 + '&图号组=' + data5 + '&数量组=' + data6 + '&本币单价组=' + data7 + } + }) +} + +// 入库单明细查询 +export function deleteInboundCardDetail(data1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_采购入库单_采购入库单明细删除', + param: '采购入库单明细流水号=' + data1 + } + }) +} diff --git a/src/api/Inventory/OfflinePartOut.js b/src/api/Inventory/OfflinePartOut.js index 16b6745d..0d22e669 100644 --- a/src/api/Inventory/OfflinePartOut.js +++ b/src/api/Inventory/OfflinePartOut.js @@ -47,14 +47,14 @@ export function searchPart() { }) } // 人员查询 需要在部门确定之后修改 -export function searchPeople() { +export function searchPeople(data1) { return request({ url: '', method: 'post', data: { type: '1', - name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=' + 18 + name: '库存管理_人员查询_库存部门', + param: '角色编号=' + data1 } }) } diff --git a/src/api/ManufacturingCenter/MachiningSequenceAdjustment.js b/src/api/ManufacturingCenter/MachiningSequenceAdjustment.js index b6543ae1..2cbc42e0 100644 --- a/src/api/ManufacturingCenter/MachiningSequenceAdjustment.js +++ b/src/api/ManufacturingCenter/MachiningSequenceAdjustment.js @@ -1,6 +1,6 @@ import request from '@/utils/request' // 初始化 项目名称 -export function getEntryNameValue() { +export function searchtable() { return request({ url: '', method: 'post', diff --git a/src/api/ManufacturingCenter/ProcessPlanning.js b/src/api/ManufacturingCenter/ProcessPlanning.js index 11e3e6ca..72d253a9 100644 --- a/src/api/ManufacturingCenter/ProcessPlanning.js +++ b/src/api/ManufacturingCenter/ProcessPlanning.js @@ -8,7 +8,7 @@ export function initCraftmen() { data: { type: '1', name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=17' + param: '考核部门编号=9' } }) } diff --git a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js index d400c370..b3cbc855 100644 --- a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js +++ b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js @@ -67,9 +67,45 @@ export function getParts(Number, pageCurrent, pageSize) { method: 'post', data: { type: '1', - name: '车间生产管理_外协加工任务单明细_查询数据', + name: '车间生产管理工艺_外协发票管理_查询数据', param: '外协加工任务单流水号=' + Number + '=int', Pagination: pageCurrent + '&' + pageSize } }) } +// 增加 +export function edittype(num1, num2, num3, num4, num5, num6, num7, num8) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_外协发票管理_增加数据', + param: '外协加工任务单流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8 + } + }) +} +// 编辑 +export function handlechange(num, num2, num3, num4, num5, num6, num7, num8) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_外协发票管理_编辑数据', + param: 'id=' + num + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8 + } + }) +} +// 删除 +export function handledelete(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_外协发票管理_删除数据', + param: 'id=' + num + } + }) +} diff --git a/src/api/PurchasingCenter/PurchaseInvoiceDelivery.js b/src/api/PurchasingCenter/PurchaseInvoiceDelivery.js index 60be8648..563a0ef3 100644 --- a/src/api/PurchasingCenter/PurchaseInvoiceDelivery.js +++ b/src/api/PurchasingCenter/PurchaseInvoiceDelivery.js @@ -60,15 +60,14 @@ export function deleteInvoice(num1) { } }) } -// 传送人初始化 采购科改16 +// 传送人初始化 export function initSender() { return request({ url: '', method: 'post', data: { type: '1', - name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=16' + name: '人事档案管理_人员与角色_查询数据_采购员' } }) } diff --git a/src/main.js b/src/main.js index df82ab70..487c94b2 100644 --- a/src/main.js +++ b/src/main.js @@ -16,8 +16,10 @@ import '@/permission' // permission control import curd from '@/utils/curd' import time from 'time-formater' -Vue.use(curd) +import htmlToPdf from '@/vendor/htmlToPdf' +Vue.use(curd) +Vue.use(htmlToPdf) Vue.use(ElementUI) // 处理时间字符串格式全局过滤器 '2018/1/23 00:00:00' to '2018-01-23' Vue.filter('formatTime', function(value) { diff --git a/src/vendor/htmlToPdf.js b/src/vendor/htmlToPdf.js index 3cef9ee3..9007b346 100644 --- a/src/vendor/htmlToPdf.js +++ b/src/vendor/htmlToPdf.js @@ -1,78 +1,35 @@ -// // /* eslint-disable */ -// // import html2Canvas from 'html2canvas' -// // import JsPDF from 'jspdf' -// // export default{ -// // install (Vue, options) { -// // Vue.prototype.getPdf = function (id) { -// // let title = this.htmlTitle -// // html2Canvas(document.querySelector(`#${id}`), { -// // allowTaint: true -// // }).then(function (canvas) { -// // let contentWidth = canvas.width -// // let contentHeight = canvas.height -// // let pageHeight = contentWidth / 592.28 * 841.89 //一页pdf显示html页面生成的canvas高度; -// // let leftHeight = contentHeight //未生成pdf的html页面高度 -// // let position = 0 //页面偏移 -// // let imgWidth = 595.28 //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高 -// // let imgHeight = 592.28 / contentWidth * contentHeight -// // let pageData = canvas.toDataURL('image/jpeg', 1.0) -// // window.print(pageData) -// // let PDF = new JsPDF('', 'pt', 'a4') -// // if (leftHeight < pageHeight) { //当内容未超过pdf一页显示的范围,无需分页 -// // PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight) -// // } else { -// // while (leftHeight > 0) { -// // PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) -// // leftHeight -= pageHeight -// // position -= 841.89 -// // if (leftHeight > 0) { //避免添加空白页 -// // PDF.addPage() -// // } -// // } -// // } -// // PDF.save(title + '.pdf') -// // } -// // ) -// // } -// // } -// // } -// -// /* eslint-disable */ -// import html2Canvas from 'html2canvas' -// import JsPDF from 'jspdf' -// export default{ -// install (Vue, options) { -// Vue.prototype.getPdf = function (id) { -// let title = this.htmlTitle -// html2Canvas(document.querySelector(`#${id}`), { -// allowTaint: true -// }).then(function (canvas) { -// let contentWidth = canvas.width -// let contentHeight = canvas.height -// let pageHeight = contentWidth / 592.28 * 841.89 //一页pdf显示html页面生成的canvas高度; -// let leftHeight = contentHeight //未生成pdf的html页面高度 -// let position = 0 //页面偏移 -// let imgWidth = 595.28 //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高 -// let imgHeight = 592.28 / contentWidth * contentHeight -// let pageData = canvas.toDataURL('image/jpeg', 1.0) -// window.print(pageData) -// let PDF = new JsPDF('', 'pt', 'a4') -// if (leftHeight < pageHeight) { //当内容未超过pdf一页显示的范围,无需分页 -// PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight) -// } else { -// while (leftHeight > 0) { -// PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) -// leftHeight -= pageHeight -// position -= 841.89 -// if (leftHeight > 0) { //避免添加空白页 -// PDF.addPage() -// } -// } -// } -// PDF.save(title + '.pdf') -// } -// ) -// } -// } -// } -// +import html2Canvas from 'html2canvas' +import JsPDF from 'jspdf' +export default { + install(Vue, options) { + Vue.prototype.getPdf = function(id, title) { + html2Canvas(document.querySelector(`#${id}`), { + allowTaint: true + }).then(function(canvas) { + const contentWidth = canvas.width + const contentHeight = canvas.height + const pageHeight = contentWidth / 592.28 * 841.89 + let leftHeight = contentHeight + let position = 0 + const imgWidth = 595.28 + const imgHeight = 592.28 / contentWidth * contentHeight + const pageData = canvas.toDataURL('image/jpeg', 1.0) + const PDF = new JsPDF('', 'pt', 'a4') + if (leftHeight < pageHeight) { + PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight) + } else { + while (leftHeight > 0) { + PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) + leftHeight -= pageHeight + position -= 841.89 + if (leftHeight > 0) { + PDF.addPage() + } + } + } + PDF.save(title + '.pdf') + } + ) + } + } +} diff --git a/src/views/Inventory/DirectPart/index.vue b/src/views/Inventory/DirectPart/index.vue index efda0f78..fc4a7f6d 100644 --- a/src/views/Inventory/DirectPart/index.vue +++ b/src/views/Inventory/DirectPart/index.vue @@ -250,7 +250,8 @@ export default { }, computed: { ...mapGetters([ - 'id' + 'id', + 'token' ]) }, created() { @@ -292,7 +293,7 @@ export default { }, searchPeopleData() { // 查询人员 this.People = [] - searchPeople().then(response => { + searchPeople(this.token).then(response => { for (let i = 0; i < response.data.length; i++) { this.People.push({ label: response.data[i].姓名, diff --git a/src/views/Inventory/InboundCard/index.vue b/src/views/Inventory/InboundCard/index.vue index 067f423c..8551d4ab 100644 --- a/src/views/Inventory/InboundCard/index.vue +++ b/src/views/Inventory/InboundCard/index.vue @@ -37,7 +37,9 @@ size="mini" border style="width: 100%;" - height="400"> + height="400" + @selection-change="handleSelectionChange"> + - + + + + + + + - + + + + + + + + + 采购合同编号: + + + + 入库日期 + + 仓库: + + + + 查询 + + + + + + + + + + + + + + + + + + + + + + + + - - - - 配置管理 + + 入库单编号 + + 查询 + 创建 + 选入 + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/MarketingCenter/DeliveryManagement/htmlToPdf.js b/src/views/MarketingCenter/DeliveryManagement/htmlToPdf.js new file mode 100644 index 00000000..1db779a7 --- /dev/null +++ b/src/views/MarketingCenter/DeliveryManagement/htmlToPdf.js @@ -0,0 +1,38 @@ +import html2Canvas from 'html2canvas' +import JsPDF from 'jspdf' +export default { + install(Vue, options) { + Vue.prototype.getPdf = function() { + console.log(document) + var title = '12' // this.htmlTitle + html2Canvas(document.querySelector('#pdfDom'), { + allowTaint: true + }).then(function(canvas) { + const contentWidth = canvas.width + const contentHeight = canvas.height + const pageHeight = contentWidth / 592.28 * 841.89 + let leftHeight = contentHeight + let position = 0 + const imgWidth = 595.28 + const imgHeight = 592.28 / contentWidth * contentHeight + const pageData = canvas.toDataURL('image/jpeg', 1.0) + const PDF = new JsPDF('', 'pt', 'a4') + console.log(PDF, 99) + if (leftHeight < pageHeight) { + PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight) + } else { + while (leftHeight > 0) { + PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) + leftHeight -= pageHeight + position -= 841.89 + if (leftHeight > 0) { + PDF.addPage() + } + } + } + PDF.save(title + '.pdf') + } + ) + } + } +} diff --git a/src/views/MarketingCenter/DeliveryManagement/index.vue b/src/views/MarketingCenter/DeliveryManagement/index.vue index 57db7c49..6029c209 100644 --- a/src/views/MarketingCenter/DeliveryManagement/index.vue +++ b/src/views/MarketingCenter/DeliveryManagement/index.vue @@ -87,7 +87,7 @@ size="mini" type="warning" icon="el-icon-edit" - @click.stop="exportTable()">导出 + @click.stop="exportTable(scope.row)">导出 - + @@ -527,81 +527,86 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
江苏高精机电装备有限公司二维码
{{ 装箱单名称 }}发货单
发货单号{{ 发货单号 }}收货人{{ 收货人 }}联系电话{{ 联系电话 }}
收货地址{{ 收货地址 }}委托车辆{{ 委托车辆 }}发货日期{{ 发货日期 }}
序号代号名称规格数量备注确认
{{ index + 1 }}{{ list.代号 }}{{ list.名称 }}{{ list.规格 }}{{ list.数量 }}{{ list.备注 }} -
本清单一式两份:一份请收货人清点货物;一份请签收人签收后交还司机带回本公司。请签收人在货物卸车后立即清点!签收人签字: -
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
江苏高精机电装备有限公司
{{ 装箱单名称 }}发货单
发货单号{{ 发货单号 }}收货人{{ 收货人 }}联系电话{{ 联系电话 }}
收货地址{{ 收货地址 }}委托车辆{{ 委托车辆 }}发货日期{{ 发货日期 }}
序号代号名称规格数量备注确认
{{ index + 1 }}{{ list.代号 }}{{ list.名称 }}{{ list.规格 }}{{ list.数量 }}{{ list.备注 }} +
本清单一式两份:一份请收货人清点货物;一份请签收人签收后交还司机带回本公司。请签收人在货物卸车后立即清点!签收人签字: +
+
+
+ - +
diff --git a/src/views/PurchasingCenter/PurchaseContractApproval/index.vue b/src/views/PurchasingCenter/PurchaseContractApproval/index.vue index dc00616f..944bf4ed 100644 --- a/src/views/PurchasingCenter/PurchaseContractApproval/index.vue +++ b/src/views/PurchasingCenter/PurchaseContractApproval/index.vue @@ -40,6 +40,37 @@ height="300px" highlight-current-row @row-click="searchTable2"> + + + - - - - - - - - - - - - - - -