From efd8bca957454c828066163ec7ed91484d6795ca Mon Sep 17 00:00:00 2001 From: "DESKTOP-8FGKA8Q\\chunfen" Date: Sat, 11 Oct 2025 15:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=89=93=E5=8D=B0=20?= =?UTF-8?q?=E5=90=88=E5=90=8C=E6=94=B9=E4=B8=BA=E5=8F=AF=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=A4=9A=E4=BB=BD=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 102 +++++- package.json | 2 + src/components/approval/detail.vue | 495 ++++++++++++++++++----------- src/main.js | 2 + src/views/purchase/approval.vue | 2 +- src/views/purchase/supplier.vue | 25 +- 6 files changed, 437 insertions(+), 191 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1cd3df1..e92e9b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -286,6 +286,11 @@ "@babel/types": "^7.16.0" } }, + "@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==" + }, "@babel/helper-validator-identifier": { "version": "7.15.7", "resolved": "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.15.7.tgz?cache=0&sync_timestamp=1631920000984&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.15.7.tgz", @@ -1172,6 +1177,11 @@ "resolved": "https://registry.npmmirror.com/@element-plus/icons/-/icons-0.0.11.tgz", "integrity": "sha512-iKQXSxXu131Ai+I9Ymtcof9WId7kaXvB1+WRfAfpQCW7UiAMYgdNDqb/u0hgTo2Yq3MwC4MWJnNuTBEpG8r7+A==" }, + "@element-plus/icons-vue": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.2.tgz", + "integrity": "sha512-OzIuTaIfC8QXEPmJvB4Y4kw34rSXdCJzxcD1kFStBvr8bK6X1zQAYDo0CNMjojnfTqRQCJ0I7prlErcoRiET2A==" + }, "@floating-ui/core": { "version": "1.6.8", "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.8.tgz", @@ -5168,6 +5178,7 @@ "integrity": "sha512-ZlVAdUOoJliv4kW3ntWnnSHMT+u/Os7mXJjk2xzOlqNeHaI2/ozlF+R58ZCEak8ZnDi6+5A2viWEYRsq64IuiA==", "requires": { "@ctrl/tinycolor": "^3.4.1", + "@element-plus/icons-vue": "^2.3.1", "@floating-ui/dom": "^1.0.1", "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7", "@types/lodash": "^4.14.182", @@ -9976,7 +9987,6 @@ "version": "2.4.1", "resolved": "https://registry.nlark.com/prettier/download/prettier-2.4.1.tgz?cache=0&sync_timestamp=1631777167012&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprettier%2Fdownload%2Fprettier-2.4.1.tgz", "integrity": "sha1-Zx4RyJwUpM/Ids5WQQbEpnJsn1w=", - "dev": true, "optional": true }, "pretty-error": { @@ -12968,6 +12978,88 @@ } } }, + "vue-print-nb": { + "version": "1.7.5", + "resolved": "https://registry.npmmirror.com/vue-print-nb/-/vue-print-nb-1.7.5.tgz", + "integrity": "sha512-iNbNyUVRWz0Ha1UTiCKxMPtHLUDGgNI8e8xmD3xqm9RlXIUeX9bT7DgNAfY8vPzqyFRHqGjxLI1rycKH366ziQ==", + "requires": { + "vue": "^2.6.11" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==" + }, + "@babel/parser": { + "version": "7.28.4", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "requires": { + "@babel/types": "^7.28.4" + } + }, + "@babel/types": { + "version": "7.28.4", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "requires": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + } + }, + "@vue/compiler-sfc": { + "version": "2.7.16", + "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", + "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", + "requires": { + "@babel/parser": "^7.23.5", + "postcss": "^8.4.14", + "prettier": "^1.18.2 || ^2.0.0", + "source-map": "^0.6.1" + } + }, + "nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==" + }, + "picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "requires": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==" + }, + "vue": { + "version": "2.7.16", + "resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz", + "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==", + "requires": { + "@vue/compiler-sfc": "2.7.16", + "csstype": "^3.1.0" + } + } + } + }, "vue-router": { "version": "4.0.12", "resolved": "https://registry.npmmirror.com/vue-router/download/vue-router-4.0.12.tgz?cache=0&sync_timestamp=1635262041312&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fvue-router%2Fdownload%2Fvue-router-4.0.12.tgz", @@ -13000,6 +13092,14 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, + "vue3-print-nb": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/vue3-print-nb/-/vue3-print-nb-0.1.4.tgz", + "integrity": "sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==", + "requires": { + "vue": "^3.0.5" + } + }, "vue3-treeselect": { "version": "0.1.10", "resolved": "https://registry.npmmirror.com/vue3-treeselect/-/vue3-treeselect-0.1.10.tgz", diff --git a/package.json b/package.json index c333c08..ff161a9 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,9 @@ "sass": "^1.43.4", "sortablejs": "^1.15.0", "vue": "^3.0.0", + "vue-print-nb": "^1.7.5", "vue-router": "^4.0.0-0", + "vue3-print-nb": "^0.1.4", "vue3-treeselect": "^0.1.10", "vuex": "^4.1.0", "wangeditor": "^4.7.9", diff --git a/src/components/approval/detail.vue b/src/components/approval/detail.vue index 89647a7..83822a5 100644 --- a/src/components/approval/detail.vue +++ b/src/components/approval/detail.vue @@ -1,186 +1,234 @@ \ No newline at end of file + .bvan{ + width: 100%; + &.on{ + // width: auto; + } + } + ::v-deep .bvan table { + table-layout: auto !important; + } + ::v-deep .bvan .el-table__header { + width: 100% !important; + } + ::v-deep .bvan .el-table__body { + width: 100% !important; + } + ::v-deep .bvan #pagetable table{ + table-layout: fixed !important; + } + .normal{ + width: 100%; + table { + font-family: Arial, sans-serif; + font-size: 14px; + background-color: #f0f2f5; + border-collapse: collapse; + color: #454545; + table-layout: auto; + width: 100%; + text-align: center; + border-color: #ebeef5; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #ebeef5; + thead { + border-top-width: 1px; + border-top-style: solid; + border-top-color: #ebeef5; + line-height: 40px; + font-weight: bold; + color: #333; + } + tr { + border-top-width: 1px; + border-top-style: solid; + border-top-color: #ebeef5; + line-height: 23px; + } + td{ + padding: 12px 10px; + font-size: 14px; + font-family: Verdana; + width: 100px; + word-break: break-all; // 元素换行 + } + // 斑马纹效果stripe + tr:nth-child(even) { + background: #F5F7F9; + } + tr:nth-child(odd) { + background: #FFF; + } + } + } + + diff --git a/src/main.js b/src/main.js index c301045..62650a5 100644 --- a/src/main.js +++ b/src/main.js @@ -7,9 +7,11 @@ import 'element-plus/dist/index.css' import zhCn from 'element-plus/es/locale/lang/zh-cn' import '@/assets/icon/iconfont.css' import '@/assets/main.scss' +import print from 'vue3-print-nb' createApp(App) .use(store) + .use(print) .use(router) .use(ElementPlus, { locale: zhCn, zIndex: 3000, size: 'default' }) .mount('#app') diff --git a/src/views/purchase/approval.vue b/src/views/purchase/approval.vue index 04b726b..91808ac 100644 --- a/src/views/purchase/approval.vue +++ b/src/views/purchase/approval.vue @@ -156,7 +156,7 @@ - + diff --git a/src/views/purchase/supplier.vue b/src/views/purchase/supplier.vue index 34c856e..784aa08 100644 --- a/src/views/purchase/supplier.vue +++ b/src/views/purchase/supplier.vue @@ -34,8 +34,10 @@ @@ -108,6 +110,7 @@ :on-error="handleUploadError" :on-preview="previewFile" :headers="headers" + multiple :file-list="fileList" :show-file-list="true"> 上传附件 @@ -229,7 +232,12 @@ export default { data.itemInfo = JSON.parse(JSON.stringify(item)) data.yyzzList = item.business_license_path ? [{url: item.business_license_path}] : [] data.xkzList = item.production_license_path ? [{url: item.production_license_path}] : [] - data.fileList = item.contract_path ? [{name: '合同附件', url: item.contract_path}] : [] + data.fileList = [] + if(item.contract_path && item.contract_path.length) { + item.contract_path.forEach(it => { + data.fileList.push({name: '合同附件', url: it}) + }) + } data.showDialog = true } @@ -248,11 +256,16 @@ export default { return ElMessage.info('请输入银行开户名') } data.opa_loading = true + let imgs = [] + for (let index = 0; index < data.fileList.length; index++) { + const obj = data.fileList[index] + imgs.push(obj.url) + } let params = { supplier_name: data.itemInfo.supplier_name, business_license_path: data.yyzzList[0].url, production_license_path: data.xkzList[0] && data.xkzList[0].url || '', - contract_path: data.fileList[0].url, + contract_path: imgs, bank_account: data.itemInfo.bank_account, bank_account_holder: data.itemInfo.bank_account_holder, bank_branch_name: data.itemInfo.bank_branch_name @@ -312,9 +325,7 @@ export default { } function handleFileSuccess(res, ress) { - if (res.code === 0) { - data.fileList = [{ name: ress.name, url: res.data.link }] - } + data.fileList.push({ url: res.data.link }) } function handleFileRemove(res, ress) { data.fileList = ress -- 2.47.2