diff --git a/package.json b/package.json index ea662239..8618c4a3 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "echarts": "^4.2.0-rc.2", "element-ui": "2.4.6", "file-saver": "^1.3.8", + "jquery": "^3.3.1", "js-cookie": "2.2.0", "node-sass": "^4.10.0", "normalize.css": "7.0.0", diff --git a/src/api/PurchasingCenter/PurchaseContractApproval.js b/src/api/PurchasingCenter/PurchaseContractApproval.js index faa81e5d..8d221734 100644 --- a/src/api/PurchasingCenter/PurchaseContractApproval.js +++ b/src/api/PurchasingCenter/PurchaseContractApproval.js @@ -11,15 +11,14 @@ export function initContract() { } }) } -// 初始化采购员 考核部门编号:采购部16 +// 初始化采购员 export function initBuyer() { return request({ url: '', method: 'post', data: { type: '1', - name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=16' + name: '人事档案管理_人员与角色_查询数据_采购员' } }) } diff --git a/src/api/PurchasingCenter/PurchaseContractSearch.js b/src/api/PurchasingCenter/PurchaseContractSearch.js index a1dff7ac..fe32df30 100644 --- a/src/api/PurchasingCenter/PurchaseContractSearch.js +++ b/src/api/PurchasingCenter/PurchaseContractSearch.js @@ -11,15 +11,14 @@ export function initContract() { } }) } -// 初始化采购员(考核部门编号:采购部:16) +// 初始化采购员 export function initBuyer() { return request({ url: '', method: 'post', data: { type: '1', - name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=16' + name: '人事档案管理_人员与角色_查询数据_采购员' } }) } diff --git a/src/api/PurchasingCenter/PurchaseTaskAllocate.js b/src/api/PurchasingCenter/PurchaseTaskAllocate.js index 431c9047..a5d20d02 100644 --- a/src/api/PurchasingCenter/PurchaseTaskAllocate.js +++ b/src/api/PurchasingCenter/PurchaseTaskAllocate.js @@ -34,15 +34,14 @@ export function initProject() { } }) } -// 初始化采购员 考核部门编号:采购部16 +// 初始化采购员 export function initBuyer() { return request({ url: '', method: 'post', data: { type: '1', - name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=16' + name: '人事档案管理_人员与角色_查询数据_采购员' } }) } diff --git a/src/views/PurchasingCenter/ProjectTotalSearch/index.vue b/src/views/PurchasingCenter/ProjectTotalSearch/index.vue index 369e8a07..c3aa808f 100644 --- a/src/views/PurchasingCenter/ProjectTotalSearch/index.vue +++ b/src/views/PurchasingCenter/ProjectTotalSearch/index.vue @@ -57,7 +57,7 @@ diff --git a/src/views/PurchasingCenter/PurchaseContractSearch/index.vue b/src/views/PurchasingCenter/PurchaseContractSearch/index.vue index 16ed90fb..76caa6b0 100644 --- a/src/views/PurchasingCenter/PurchaseContractSearch/index.vue +++ b/src/views/PurchasingCenter/PurchaseContractSearch/index.vue @@ -142,7 +142,7 @@ 二维码:
-
+
附件图:
@@ -155,7 +155,8 @@ import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch' import { searchFile } from '@/api/PurchasingCenter/CreateContract' import QRCode from 'qrcode' -import { exportExcelMethod } from './exportExcel' +import $ from 'jquery' +// import { exportExcelMethod } from './exportExcel' export default { data() { @@ -212,8 +213,16 @@ export default { }, methods: { download() { - if (this.contract) { - exportExcelMethod('print', '采购合同', '采购合同sheet1') + if (this.contractValue) { + // exportExcelMethod('print', '采购合同', '采购合同sheet1') + const htmlNode = $('#print').html() + const body = $('body') + body.children().hide() + const printNode = $(htmlNode) + body.append(printNode) + window.print() + body.children().show() + printNode.remove() } else { this.$message.error('请选择合同') } @@ -237,7 +246,7 @@ export default { }, searchPic() { // 读取图片时,查找合同流水号,获取其下所有图片id,根据拼接成的路径,查询图片显示出来。 - searchFile(this.contract).then(response => { + searchFile(this.contractValue).then(response => { if (response.data.length !== 0) { this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名 } else { diff --git a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue index f560d976..4b1d0159 100644 --- a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue +++ b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue @@ -84,7 +84,7 @@ stripe @selection-change="handleSelectionChange1"> - +