diff --git a/vue/src/components/ImportExcel-base/index.vue b/vue/src/components/ImportExcel-base/index.vue index 1f30a212..fb7631b0 100644 --- a/vue/src/components/ImportExcel-base/index.vue +++ b/vue/src/components/ImportExcel-base/index.vue @@ -301,7 +301,7 @@ export default { vWKanBan: "大众看板结算明细", scrapClaims: "CP7报废和索赔", sparePart: "大众备件结算明细", - + hqHPlatform: "红旗H平台导入", bomdatabase: "产品结构BOM", prebatch: "预批量", secondaryPriceRatio: "二配结算价格比例", @@ -327,6 +327,7 @@ export default { vWKanBan: "/api/settleaccount/VWKanBan/ExcelImport", //大众看板结算明细导入 scrapClaims: "/api/settleaccount/ScrapClaims/ExcelImport", //CP7报废和索赔导入 sparePart: "/api/settleaccount/SparePart/ExcelImport", //大众备件结算明细导入 + hqHPlatform: "/api/settleaccount/HQHPlatform/ExcelImport", //红旗H平台导入 bomdatabase: "/api/settleaccount/bom/ExcelImport", prebatch: "/api/settleaccount/Prebatch/ExcelImport", diff --git a/vue/src/components/PasteExcel/index.vue b/vue/src/components/PasteExcel/index.vue new file mode 100644 index 00000000..948922cf --- /dev/null +++ b/vue/src/components/PasteExcel/index.vue @@ -0,0 +1,85 @@ + + + + + + diff --git a/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue b/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue index cca2e0d0..3bbcffec 100644 --- a/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue +++ b/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue @@ -390,27 +390,6 @@ - - @@ -480,17 +459,30 @@ - + + + + + + @@ -503,7 +495,7 @@ v-model="formCount.chassisNumber" style="width: 450px" type="textarea" - placeholder="请输入内容" + placeholder="只支持粘贴,不支持手输!" @paste.native="pasteExcelTochassisNumber" /> @@ -520,7 +512,7 @@ v-model="formCount.materialCode" style="width: 450px" type="textarea" - placeholder="请输入内容" + placeholder="只支持粘贴,不支持手输!" @paste.native="pasteExcelTomaterialCode" /> @@ -536,7 +528,7 @@ v-model="formCount.sapCode" style="width: 450px" type="textarea" - placeholder="请输入内容" + placeholder="只支持粘贴,不支持手输!" @paste.native="pasteExcelTosapCode" /> @@ -553,6 +545,36 @@ > + + + +
+ + + + + +
+
+ +
@@ -562,20 +584,29 @@ import permission from "@/directive/permission/index.js"; import { downloadFile } from "@/utils/crmindex.js"; import CRMTableHead from "../../components/CRMTableHead"; import moment from "moment"; +import PasteExcel from "@/components/PasteExcel/index.vue"; export default { name: "InvoiceSettledDetailDiff", - components: { Pagination, CRMTableHead }, + components: { Pagination, CRMTableHead, PasteExcel }, directives: { permission }, data() { return { crmType: "backJob", + tableData: [ + { + name: "KEEN号", + }, + ], + paster: "", + pasterValue: "", rules: { versionValue: [ { required: true, message: "必须输入!", trigger: "change" }, ], }, + showModal: false, pickerOptionsCp5: { disabledDate: (time) => { let now = new Date(); @@ -780,13 +811,36 @@ export default { }, }, methods: { - valueChange(data) { - this.getmaterialGroupValue = ""; - this.getmaterialGroupValue += data + ","; - this.getmaterialGroupValue = this.getmaterialGroupValue.substring( + submiteBillNo() { + var getkeenCodeNo = this.pasterValue.substring( 0, - this.getmaterialGroupValue.length - 1 + this.pasterValue.length - 1 ); + this.dataKenCode = getkeenCodeNo; + this.formCount.kennCode=this.dataKenCode; + this.showModal=false; + }, + pasteMe(e) { + let source = e.clipboardData.getData("Text"); + // 首先对源头进行解析 + let rows = source.split("\r\n"); // 拆成很多行 + this.pasterValue = ""; + for (let i = 0; i < rows.length; i++) { + if (rows[i] != "") { + // 如果某一行不是空,再按列拆分 + let columns = rows[i].split("\t"); // 已经按列划分 + let dataone = {}; // 声明一行数组 + for (let j = 0; j < columns.length; j++) { + // 读取tableData里的第j对应的key值 + let keys = Object.keys(this.tableData[j]); // key的名 + dataone[keys[j]] = columns[j]; + this.pasterValue += columns[j] + ","; + } + this.tableData.push(dataone); + console.log(this.tableData); + } + } + alert(JSON.stringify(this.pasterValue)); }, //如果是要获得粘贴excel的内容,需要把粘贴的内容转换成二维数组 pasteExcelToKennCode(e) { @@ -806,6 +860,15 @@ export default { } //alert(this.dataKenCode.trimEnd(",")); }, + valueChange(data) { + this.getmaterialGroupValue = ""; + this.getmaterialGroupValue += data + ","; + this.getmaterialGroupValue = this.getmaterialGroupValue.substring( + 0, + this.getmaterialGroupValue.length - 1 + ); + }, + pasteExcelTochassisNumber(e) { let source = e.clipboardData.getData("Text"); // 首先对源头进行解析 @@ -959,11 +1022,7 @@ export default { this.listExportQuery.sapCode = getsapCode; //厂内物料号 } if (this.formCount.kennCode != "") { - var getgroupValue = this.dataKenCode.substring( - 0, - this.dataKenCode.length - 1 - ); - this.listExportQuery.kenncode = getgroupValue; //KEEN号 + this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN号 } this.listExportQuery.begin = this.cp5startTime ? this.cp5startTime @@ -994,31 +1053,31 @@ export default { "大众发票与结算核对明细表-导出条件:" + JSON.stringify(this.listExportQuery) ); - this.formLoading = false; - this.dialogFormVisible = false; - // this.$axios - // .gets( - // "/api/settleaccount/ReportMakeService/InvoiceSettledDetailDiff-Make", - // this.listExportQuery - // ) - // .then((res) => { - // let taskid = res; - // if (Number.isInteger(taskid)) { - // this.$notify({ - // title: "成功", - // message: "任务生成成功!任务号:" + taskid, - // type: "success", - // duration: 2000, - // }); - // } - // this.getList(); - // this.formLoading = false; - // this.dialogFormVisible = false; - // }) - // .catch(() => { - // this.formLoading = false; - // this.dialogFormVisible = false; - // }); + // this.formLoading = false; + // this.dialogFormVisible = false; + this.$axios + .gets( + "/api/settleaccount/ReportMakeService/InvoiceSettledDetailDiff-Make", + this.listExportQuery + ) + .then((res) => { + let taskid = res; + if (Number.isInteger(taskid)) { + this.$notify({ + title: "成功", + message: "任务生成成功!任务号:" + taskid, + type: "success", + duration: 2000, + }); + } + this.getList(); + this.formLoading = false; + this.dialogFormVisible = false; + }) + .catch(() => { + this.formLoading = false; + this.dialogFormVisible = false; + }); } }); }, diff --git a/vue/src/views/ux/vw/dataInput/hq_h/index.vue b/vue/src/views/ux/vw/dataInput/hq_h/index.vue index 221c8250..b14ebcbe 100644 --- a/vue/src/views/ux/vw/dataInput/hq_h/index.vue +++ b/vue/src/views/ux/vw/dataInput/hq_h/index.vue @@ -1,4 +1,4 @@ - +