From 95fb83f7ccabda33297f10ad112dbe0a63155340 Mon Sep 17 00:00:00 2001 From: liushuai Date: Sat, 14 Mar 2020 20:28:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InvoiceSettlementApplication1.js | 3 +- .../OutsourcingTaskExecution/index.vue | 40 ++++- .../CreateInquirySheet/index.vue | 22 +-- .../CreatePurchaseContract/index.vue | 2 +- .../InvoiceSettlementApplication/index.vue | 20 +-- .../OfflineContract/index.vue | 4 +- .../OfflineContractSearch/index.vue | 18 +- .../PurchaseContractSearch/index.vue | 22 ++- .../AccountingPrice/index.vue | 4 +- .../CreatingProcurementContracts/index.vue | 156 ++++++++++++++---- .../CreatingPurchasingMaterials/index.vue | 5 +- .../InvoiceSettlementApplication1/index.vue | 82 ++++----- .../NewArrivalList/index.vue | 116 +++++++------ .../ProcurementContractEnquiry/index.vue | 12 +- .../ProjectTotalSearch/index.vue | 2 +- .../RequestOutsourcingMaterials/index.vue | 8 +- 16 files changed, 326 insertions(+), 190 deletions(-) diff --git a/src/api/WorkshopProcurement/InvoiceSettlementApplication1.js b/src/api/WorkshopProcurement/InvoiceSettlementApplication1.js index 33099047..92649296 100644 --- a/src/api/WorkshopProcurement/InvoiceSettlementApplication1.js +++ b/src/api/WorkshopProcurement/InvoiceSettlementApplication1.js @@ -137,7 +137,8 @@ export function searchPurchaseDetail(data) { UserID: state.state.user.id, ModularID: router.currentRoute.path, type: '1', - name: '车间采购管理_采购合同明细_查询数据NEW', + // name: '车间采购管理_采购合同明细_查询数据NEW', + name: '车间采购管理_采购合同明细_追加入库单_查询数据', param: '采购合同流水号=' + data } }) diff --git a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue index 5aa1627f..c8817402 100644 --- a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue @@ -92,7 +92,7 @@ @@ -499,7 +499,19 @@ export default { this.loading = true this.List3 = [] getParts(this.Number).then(response => { - this.List3 = response.data + if (response.data.length !== 0) { + for (let i = 0; i < response.data.length; i++) { + this.List3.push({ + 外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号, + 加工价格_成交: response.data[i].加工价格_成交.toFixed(2), + 机加工开始时间: response.data[i].机加工开始时间 ? response.data[i].机加工开始时间.split(' ')[0] : '', + 零件图号: response.data[i].零件图号, + 零件名称: response.data[i].零件名称, + 批次数量: response.data[i].批次数量, + 外协工序: response.data[i].外协工序 + }) + } + } this.getList() this.loading = false }) @@ -521,7 +533,19 @@ export default { this.loading = true this.List3 = [] getParts(this.Number).then(response => { - this.List3 = response.data + if (response.data.length !== 0) { + for (let i = 0; i < response.data.length; i++) { + this.List3.push({ + 外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号, + 加工价格_成交: response.data[i].加工价格_成交.toFixed(2), + 机加工开始时间: response.data[i].机加工开始时间 ? response.data[i].机加工开始时间.split(' ')[0] : '', + 零件图号: response.data[i].零件图号, + 零件名称: response.data[i].零件名称, + 批次数量: response.data[i].批次数量, + 外协工序: response.data[i].外协工序 + }) + } + } this.loading = false }) }) @@ -604,6 +628,12 @@ export default { } - diff --git a/src/views/PurchasingCenter/CreateInquirySheet/index.vue b/src/views/PurchasingCenter/CreateInquirySheet/index.vue index 381527ab..956c486c 100644 --- a/src/views/PurchasingCenter/CreateInquirySheet/index.vue +++ b/src/views/PurchasingCenter/CreateInquirySheet/index.vue @@ -46,7 +46,7 @@ - + 选入物料 @@ -625,13 +626,14 @@ - + 查询 @@ -641,7 +643,7 @@ size="mini" style="margin-left: 10px" @click="createInquirySheet">询价单 - 编辑 + 编辑 @@ -649,9 +651,9 @@ - 删除 - 打印 - 导出 + 删除 + 打印 + 导出 diff --git a/src/views/PurchasingCenter/CreatePurchaseContract/index.vue b/src/views/PurchasingCenter/CreatePurchaseContract/index.vue index 3ed3ff9d..e9aa50da 100644 --- a/src/views/PurchasingCenter/CreatePurchaseContract/index.vue +++ b/src/views/PurchasingCenter/CreatePurchaseContract/index.vue @@ -148,7 +148,7 @@ 预览合同 - 递交审批: + 递交审核: 递交 diff --git a/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue b/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue index b3396708..fc02b44c 100644 --- a/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue +++ b/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue @@ -54,7 +54,7 @@ {{ scope.row.发票号 }} - + @@ -196,32 +196,32 @@ - - + + - + - + - + - - + + @@ -436,8 +436,8 @@ export default { if (response.data[0].result === '1') { this.$message.success('增加成功') this.dialogVisible1 = false - this.invoiceNum = this.form1.invoiceNum - this.searchTable1(this.invoiceNum) + this.supperiler = this.form1.invoiceNum + this.searchTable1(this.supperiler) } else { this.$message.error('增加失败') } diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue index 343411db..9781cde0 100644 --- a/src/views/PurchasingCenter/OfflineContract/index.vue +++ b/src/views/PurchasingCenter/OfflineContract/index.vue @@ -284,8 +284,8 @@ diff --git a/src/views/PurchasingCenter/OfflineContractSearch/index.vue b/src/views/PurchasingCenter/OfflineContractSearch/index.vue index e597d689..07043723 100644 --- a/src/views/PurchasingCenter/OfflineContractSearch/index.vue +++ b/src/views/PurchasingCenter/OfflineContractSearch/index.vue @@ -12,13 +12,17 @@ plain style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询 - 打回 + +
+ 打回 +
+
diff --git a/src/views/PurchasingCenter/PurchaseContractSearch/index.vue b/src/views/PurchasingCenter/PurchaseContractSearch/index.vue index 6aaadd0c..152156d0 100644 --- a/src/views/PurchasingCenter/PurchaseContractSearch/index.vue +++ b/src/views/PurchasingCenter/PurchaseContractSearch/index.vue @@ -26,7 +26,7 @@ - + @@ -74,11 +74,11 @@ @click="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()">查询 导出 + @click="download()">打印 @@ -217,7 +217,7 @@ @@ -246,6 +246,7 @@ import { initContract, initBuyer, searchTable1, searchTable2, handleDone, deleteContract } from '@/api/PurchasingCenter/PurchaseContractSearch' import QRCode from 'qrcode' import $ from 'jquery' +import { mapGetters } from 'vuex' // import { exportExcelMethod } from './exportExcel' export default { @@ -343,6 +344,14 @@ export default { contractValue: '' // 显示表2和变更合同用的变量 } }, + computed: { + ...mapGetters([ + 'sidebar', + 'avatar', + 'name', + 'id' + ]) + }, created() { this.fetchData() this.searchTable1() @@ -474,6 +483,8 @@ export default { 未通过审核原因: response.data.rows[i].未通过审核原因, 审核情况内容: response.data.rows[i].审核情况内容, 审批情况内容: response.data.rows[i].审批情况内容, + 审核情况流水号: response.data.rows[i].审核情况流水号, + 审批情况流水号: response.data.rows[i].审批情况流水号, 未通过原因: response.data.rows[i].未通过原因, 合同总额: response.data.rows[i].合同总额, 付款金额: response.data.rows[i].付款金额, @@ -482,6 +493,7 @@ export default { 姓名: response.data.rows[i].姓名, 合同金额: response.data.rows[i].合同金额, 欠款金额: response.data.rows[i].欠款金额, + 采购员流水号: response.data.rows[i].采购员流水号, 采购合同流水号: response.data.rows[i].采购合同流水号 }) } diff --git a/src/views/WorkshopProcurement/AccountingPrice/index.vue b/src/views/WorkshopProcurement/AccountingPrice/index.vue index 6c306e04..d5fead19 100644 --- a/src/views/WorkshopProcurement/AccountingPrice/index.vue +++ b/src/views/WorkshopProcurement/AccountingPrice/index.vue @@ -3,7 +3,7 @@ 合同号: - + diff --git a/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue b/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue index da077a05..747c959d 100644 --- a/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue +++ b/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue @@ -21,7 +21,7 @@ :label="item.label" :value="item.value"/> - + - + + + + + + + 成组采购 @@ -59,9 +59,9 @@
- + @@ -110,14 +110,14 @@ {{ scope.row.零件数量 }} - + @@ -138,15 +138,17 @@ - 计算合同总额 + + + + + 合同总额(未税): + 合同总额(含税): - + + @@ -327,6 +329,7 @@ export default { disable6: true, tableData01: [], tableData2: [], // 合同模板表 + price: [], form1: {}, form2: {}, form3: { @@ -455,9 +458,39 @@ export default { }, methods: { linkGroup() { - console.log(this.form3, 111) this.dialogVisible2 = true }, + filterNuber(val, index, date) { + console.log(index, 6666) + let value = '' + val + value = value + .replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符 + .replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的 + .replace('.', '$#$') + .replace(/\./g, '') + .replace('$#$', '.') + .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 + if (value.indexOf('.') < 0 && value !== '') { + value = parseFloat(value).toFixed(2) + } + console.log(value) + this.tableData4[index][date] = value + }, + filterNuber1(val, index, date) { + let value = '' + val + value = value + .replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符 + .replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的 + .replace('.', '$#$') + .replace(/\./g, '') + .replace('$#$', '.') + .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 + if (value.indexOf('.') < 0 && value !== '') { + value = parseFloat(value).toFixed(2) + } + console.log(value) + this.tableData5[index][date] = value + }, submitGroup() { submitGroup(this.contractNumValue, this.form3.groupNumValue).then(response => { if (response.data[0].result === '1') { @@ -482,6 +515,7 @@ export default { }) }, update1(row) { + this.calculateContractSum() update1(row.组件流水号, row.数量, row.单价, row.物料计划到货时间, row.备注).then(response => { }) }, @@ -503,21 +537,63 @@ export default { this.contractNumType = this.contractNum[i].id } } - console.log(this.contractNumType, 1111) searchData1(this.contractNumValue).then(response => { - console.log(response.datas) - this.tableData5 = response.data + this.tableData5 = [] + console.log(response, 'tableData5') + if (response.data.length !== 0) { + for (let i = 0; i < response.data.length; i++) { + this.tableData5.push({ + 组号: response.data[i].组号, + 组件名称: response.data[i].组件名称, + 数量: response.data[i].数量, + 组件流水号: response.data[i].组件流水号, + 单价: Number(response.data[i].单价).toFixed(2), + 交货期: response.data[i].交货期, + 备注: response.data[i].备注, + 请购单流水号: response.data[i].请购单流水号, + 已到货数量: response.data[i].已到货数量 + }) + } + } }).then(() => { this.groupNum5 = this.tableData5 // 给中间变量,需要时重新push - console.log(this.tableData5) + // console.log(this.tableData5, 'tableData5') }) searchData2(this.contractNumValue).then(response => { - console.log(response, 2233) - this.tableData4 = response.data + this.tableData4 = [] + console.log(response, 'tableData4') + if (response.data.length !== 0) { + for (let i = 0; i < response.data.length; i++) { + this.tableData4.push({ + 请购单明细流水号: response.data[i].请购单明细流水号, + 项目名称: response.data[i].项目名称, + 机床图号: response.data[i].机床图号, + 组号: response.data[i].组号, + 物料名称: response.data[i].物料名称, + 物料代码: response.data[i].物料代码, + 规格或材料: response.data[i].规格或材料, + 图号或型号: response.data[i].图号或型号, + 零件数量: response.data[i].零件数量, + 零件类型: response.data[i].零件类型, + 请购单流水号: response.data[i].请购单流水号, + 基本件流水号: response.data[i].基本件流水号, + 标准件和外购件流水号: response.data[i].标准件和外购件流水号, + 物料流水号: response.data[i].物料流水号, + 物料计划到货时间: response.data[i].物料计划到货时间, + 单价: Number(response.data[i].单价).toFixed(2), + 发货天数: response.data[i].发货天数, + 税率: response.data[i].税率, + 币种流水号: response.data[i].币种流水号, + 备注: response.data[i].备注, + 机床流水号: response.data[i].机床流水号, + 组件流水号: response.data[i].组件流水号, + 金额: response.data[i].金额 ? response.data[i].金额 : (Number(response.data[i].单价) * Number(response.data[i].零件数量)).toFixed(2) + }) + } + } this.machineValue = response.data[0].机床流水号 this.form3.机床 = response.data[0].机床图号 this.form3.groupNumValue = response.data[0].组件流水号 - console.log(this.machineValue, 111) this.groupNum = [] initGroupNum(this.machineValue).then(response => { for (let i = 0; i < response.data.length; i++) { @@ -532,7 +608,7 @@ export default { } }).then(() => { this.groupNum2 = this.tableData4 // 给中间变量,需要时重新push - console.log(this.tableData4) + // console.log(this.tableData4, 'tableData4') }) }, update(row) { @@ -547,15 +623,18 @@ export default { this.riseFallPoint = 0 this.tableData4 = [] for (let i = 0; i < this.groupNum2.length; i++) { + if (this.groupNum2[i].单价 === '') { + this.groupNum2[i].单价 = 0.00 + } this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量) this.contractSum1 += parseFloat(this.groupNum2[i].金额) this.tableData4.push(this.groupNum2[i]) } this.contractSum = (this.contractSum1).toFixed(2) - this.contractSum2 = parseInt(this.contractSum * (1 - parseFloat(this.taxRate)) * 100) / 100 + this.contractSum2 = (parseInt(this.contractSum * (1 - parseFloat(this.taxRate)) * 100) / 100).toFixed(2) this.costAccount = this.contractSum if (parseInt(this.costAccount) === 0) { - this.$message.error('成本核算不可为0') + // this.$message.error('成本核算不可为0') } else { this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount this.riseFallPoint = this.riseFallPoint.toFixed(2) @@ -568,12 +647,11 @@ export default { for (let i = 0; i < this.groupNum5.length; i++) { this.contractSum1 += parseFloat((parseInt(this.groupNum5[i].数量) * parseFloat(this.groupNum5[i].单价)).toFixed(2)) } - console.log(this.contractSum1, this.groupNum5, 898989) this.contractSum = (this.contractSum1).toFixed(2) this.contractSum2 = parseInt(this.contractSum * (1 - parseFloat(this.taxRate)) * 100) / 100 this.costAccount = this.contractSum if (parseInt(this.costAccount) === 0) { - this.$message.error('成本核算不可为0') + // this.$message.error('成本核算不可为0') } else { this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount this.riseFallPoint = this.riseFallPoint.toFixed(2) @@ -668,8 +746,8 @@ export default { doneContract() { // 生成采购合同 if (this.contractNumValue === '') { this.$message.error('请选择生成合同的请购单') - } else if (this.stipulateArrivalTime === '' || this.stipulateArrivalTime === null) { - this.$message.error('请选择规定到货时间!') + } else if (this.supplierValue === '' || this.supplierValue === null) { + this.$message.error('请选择供应商!') } else { if (this.contractNumType === 0) { this.group1 = '' @@ -744,4 +822,12 @@ export default { margin-bottom: 5px; } - + diff --git a/src/views/WorkshopProcurement/CreatingPurchasingMaterials/index.vue b/src/views/WorkshopProcurement/CreatingPurchasingMaterials/index.vue index c1887847..b7bca57f 100644 --- a/src/views/WorkshopProcurement/CreatingPurchasingMaterials/index.vue +++ b/src/views/WorkshopProcurement/CreatingPurchasingMaterials/index.vue @@ -96,10 +96,10 @@ 查询 外购备料 - 选入 + 选入 - 保存 + 保存

到票结算申请单

- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -620,6 +620,7 @@ export default { this.supplierValue = row.供应商流水号 Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false searchTable2(row.发票结算申请单流水号).then(response => { + console.log(response, 123) this.tableData2 = response.data }) }, @@ -690,6 +691,7 @@ export default { }, handleSelectionChange(val) { this.group = val + console.log(this.group, 'group') }, submitAdd2() { // 追加入库单 if (this.group.length === 0) { diff --git a/src/views/WorkshopProcurement/NewArrivalList/index.vue b/src/views/WorkshopProcurement/NewArrivalList/index.vue index bc4d377d..4af80c9d 100644 --- a/src/views/WorkshopProcurement/NewArrivalList/index.vue +++ b/src/views/WorkshopProcurement/NewArrivalList/index.vue @@ -92,7 +92,7 @@ {{ scope.row.材料 }}
- + @@ -116,7 +116,7 @@ - - - + + + + + - + @@ -125,9 +125,9 @@ {{ scope.row.发票号 }} - + @@ -280,7 +280,7 @@ export default { param[2] = ['结束时间', this.dateRange[1]] param[3] = ['供应商名称_check', this.check2] param[4] = ['供应商名称', this.supplierName0] - var Data = this.CreateData('03', '报表_备料管理_请款_查询数据', param) + var Data = this.CreateData('2001', '报表_备料管理_请款_查询数据', param) this.exportExcel_NPOI(Data) }, // dateFormat(row, column) {