零件导入,零件分配,车间采购系统

This commit is contained in:
liushuai
2018-12-10 19:42:03 +08:00
parent 081758df73
commit 4581c2db7a
21 changed files with 497 additions and 371 deletions

View File

@@ -156,6 +156,17 @@ export function purchaseRequisition1(RequisitionList, projectName, projectFloatV
} }
}) })
} }
export function purchaseRequisition2(projectFloatValue, machineFloatValue, groupFloatValue, BasicPartsNumber, NumberOfParts, time) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_采购部采购_基本件_传递数据',
param: `组件流水号=${groupFloatValue}&基本件流水号组=${BasicPartsNumber}&项目流水号=${projectFloatValue}&机床流水号=${machineFloatValue}&物料计划到货时间=${time}&零件数量组=${NumberOfParts}`
}
})
}
export function MoveOut(num, num1) { export function MoveOut(num, num1) {
return request({ return request({
url: '', url: '',

View File

@@ -279,26 +279,26 @@ export function searchGroupNum1(project, name) {
}) })
} }
// 传递零件 // 传递零件
export function transferMX(num1, name, num2, remark, mark, num3, num4, num5, type, transmit, num6, id) { export function transferMX(num1, name, num2, remark, mark, num3, num4, num5, num7, type, transmit, num6, id) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: 'PDM_零件明细表_基本件_大量导入', name: 'PDM_零件明细表_基本件_大量导入',
param: '图号或者型号=' + num1 + '&零件名称=' + name + '&零件数量=' + num2 + '&零件备注=' + remark + '&标记=' + mark + '&设计者编号=' + num3 + '&组件流水号=' + num4 + '&材料流水号=' + num5 + '&数据类型=' + type + '&是否传递=' + transmit + '&序号=' + num6 + '&id=' + id param: '图号或者型号=' + num1 + '&零件名称=' + name + '&零件数量=' + num2 + '&零件备注=' + remark + '&标记=' + mark + '&设计者编号=' + num3 + '&组件流水号=' + num4 + '&材料流水号=' + num5 + '&规格\\=' + num7 + '&数据类型=' + type + '&是否传递=' + transmit + '&序号=' + num6 + '&id=' + id
} }
}) })
} }
// 传递零件 // 传递零件
export function transferMX1(num1, name, num2, remark, mark, num3, num4, num5, type, transmit, num6, id, oldId) { export function transferMX1(num1, name, num2, remark, mark, num3, num4, num5, num7, type, transmit, num6, id, oldId, oldNum) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: 'PDM_零件明细表_整改件_大量导入', name: 'PDM_零件明细表_整改件_大量导入',
param: '图号或者型号=' + num1 + '&零件名称=' + name + '&零件数量=' + num2 + '&零件备注=' + remark + '&标记=' + mark + '&设计者编号=' + num3 + '&组件流水号=' + num4 + '&材料流水号=' + num5 + '&数据类型=' + type + '&是否传递=' + transmit + '&序号=' + num6 + '&id=' + id + '&前id=' + oldId param: '图号或者型号=' + num1 + '&零件名称=' + name + '&零件数量=' + num2 + '&零件备注=' + remark + '&标记=' + mark + '&设计者编号=' + num3 + '&组件流水号=' + num4 + '&材料流水号=' + num5 + '&规格\\=' + num7 + '&数据类型=' + type + '&是否传递=' + transmit + '&序号=' + num6 + '&id=' + id + '&前id=' + oldId + '&前图号或者型号=' + oldNum
} }
}) })
} }

View File

@@ -149,14 +149,14 @@ export function searchSheetContract(num1) {
}) })
} }
// 生成采购合同 // 生成采购合同
export function doneContract(num1, RequisitionNumber, name1, time1, time2, method, num2, text, freight, num3, partsNum, priceGroup, payGroup, planGroup, taxGroup, currency, num4, id) { export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2, text, freight, num3, partsNum, priceGroup, taxGroup, currency, num4, id, AdvanceCharge) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间管理_基本件采购_请购单和请购单明细_增加数据', name: '车间管理_基本件采购_请购单和请购单明细_增加数据',
param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&付款方式=${method}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&付款比例组=${payGroup}&计划付款时间组=${planGroup}&税率组=${taxGroup}&币种流水号组=${currency}` param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&税率组=${taxGroup}&币种流水号组=${currency}&预付款=${AdvanceCharge}`
} }
}) })
} }

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1544235859959" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="561" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M953.274192 628.793006l-21.366633-21.325701c-5.910617-5.880941-15.507182-5.880941-21.391193 0l-32.075533 31.949666 42.75885 42.652426 32.075533-31.949666C959.186855 644.23879 959.186855 634.704646 953.274192 628.793006zM728.751602 788.699949l-14.251585 56.841589 56.979736-14.21884L728.751602 788.699949zM739.51576 778.022773l42.72815 42.621726 128.300085-127.927601-42.756803-42.652426L739.51576 778.022773zM839.594083 865.172645c0 38.442544-27.164686 52.501748-65.626673 52.501748L157.075455 917.674393c-16.229636 0.966001-52.501748-33.390481-52.501748-52.501748L104.573707 156.403143c1.426489-19.86135 34.018791-52.501748 52.501748-52.501748l616.891955 0c30.474059-0.665149 65.626673 31.57002 65.626673 52.501748L839.594083 589.540004c0 10.377348 39.375799 10.377348 39.375799 0L878.969882 169.528068c0-53.803393-47.801702-105.002472-101.634772-105.002472L162.815179 64.525596c-53.827953 0-97.617271 43.767829-97.617271 97.571223l0 697.383174c0 53.80237 43.789319 97.570199 97.617271 97.570199l614.519931 0c53.834092 0 101.634772-38.075177 101.634772-91.877547C878.969882 846.096171 839.594083 846.096171 839.594083 865.172645zM252.739235 240.400209c-5.16565-5.158487-12.421914-8.162914-19.723204-8.162914-7.30129 0-14.557554 3.004427-19.718087 8.162914-5.164626 5.16258-8.172123 12.413727-8.172123 19.713994 0 7.297197 3.007497 14.549368 8.172123 19.711947 5.160533 5.15951 12.416797 8.162914 19.718087 8.162914 7.30129 0 14.557554-3.003404 19.723204-8.162914 5.164626-5.16258 8.170077-12.413727 8.170077-19.711947C260.909311 252.813936 257.903861 245.562788 252.739235 240.400209zM629.588115 235.154741 288.328801 235.154741c-15.683191 0-15.244192 38.895869 0.440022 38.895869l340.819293 0.479931C645.457548 274.531564 645.457548 235.154741 629.588115 235.154741zM252.739235 342.627475c-5.16565-5.158487-12.421914-8.162914-19.723204-8.162914-7.30129 0-14.557554 3.004427-19.718087 8.162914-5.164626 5.16258-8.172123 12.413727-8.172123 19.712971 0 7.299243 3.007497 14.550391 8.172123 19.712971 5.160533 5.15951 12.416797 8.163937 19.718087 8.163937 7.30129 0 14.557554-3.004427 19.723204-8.163937 5.164626-5.16258 8.170077-12.413727 8.170077-19.712971C260.909311 355.041202 257.903861 347.789031 252.739235 342.627475zM629.588115 340.158237 288.328801 340.158237c-15.868409 0-15.868409 39.375799 0 39.375799l341.259314 0C645.457548 379.534036 645.457548 340.158237 629.588115 340.158237zM252.739235 444.853717c-5.16565-5.158487-12.421914-8.162914-19.723204-8.162914-7.30129 0-14.557554 3.004427-19.718087 8.162914-5.164626 5.16258-8.172123 12.413727-8.172123 19.712971 0 7.299243 3.007497 14.550391 8.172123 19.713994 5.160533 5.16258 12.416797 8.162914 19.718087 8.162914 7.30129 0 14.557554-3.000334 19.723204-8.162914 5.164626-5.163603 8.170077-12.415774 8.170077-19.713994C260.909311 457.267445 257.903861 450.016297 252.739235 444.853717zM233.016031 538.88737c-7.30129 0-14.557554 3.004427-19.718087 8.167007-5.164626 5.158487-8.172123 12.413727-8.172123 19.712971s3.007497 14.552437 8.172123 19.708877c5.160533 5.163603 12.416797 8.167007 19.718087 8.167007 7.30129 0 14.557554-3.003404 19.723204-8.167007 5.164626-5.15644 8.170077-12.409634 8.170077-19.708877s-3.00545-14.554484-8.170077-19.712971C247.573585 541.891797 240.317321 538.88737 233.016031 538.88737zM629.588115 445.160709 288.328801 445.160709c-15.683191 0-15.244192 38.895869 0.440022 38.895869l340.819293 0.479931C645.457548 484.537532 645.457548 445.160709 629.588115 445.160709zM629.588115 550.164205 288.328801 550.164205c-15.868409 0-15.868409 39.375799 0 39.375799l341.259314 0C645.457548 589.540004 645.457548 550.164205 629.588115 550.164205z" p-id="562"></path></svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -101,7 +101,7 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.零件备注 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -275,6 +275,11 @@
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right"> <el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button> <el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
@@ -329,6 +334,11 @@
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right"> <el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button> <el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
@@ -380,7 +390,7 @@
</template> </template>
<script> <script>
import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, MoveOut, MoveOut1, PurchasingDepartment, Production } from '@/api/ManufacturingCenter/PartAssignment' import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production } from '@/api/ManufacturingCenter/PartAssignment'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
inject: ['reload'], inject: ['reload'],
@@ -669,7 +679,7 @@ export default {
this.PartToolNumber[i] = val[i].零件图号 this.PartToolNumber[i] = val[i].零件图号
this.Material[i] = val[i].材料 this.Material[i] = val[i].材料
this.NumberOfParts[i] = val[i].零件数量 this.NumberOfParts[i] = val[i].零件数量
this.ReMarks[i] = val[i].备注 this.ReMarks[i] = val[i].零件备注
} }
} else if (this.PartType === '外购件') { } else if (this.PartType === '外购件') {
this.MaterialNum = [] this.MaterialNum = []
@@ -708,117 +718,141 @@ export default {
purchaseRequisition() { purchaseRequisition() {
if (this.RequisitionList !== '') { if (this.RequisitionList !== '') {
if (this.time !== '') { if (this.time !== '') {
this.result = 0 if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
if (this.PartType === '基本件') { this.result = 0
for (let i = 0; i < this.BasicPartsNumber.length; i++) { if (this.PartType === '基本件') {
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => { for (let i = 0; i < this.BasicPartsNumber.length; i++) {
this.result += parseInt(response.data[0].result) purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
console.log(this.result) this.result += parseInt(response.data[0].result)
if (this.result === this.BasicPartsNumber.length) { console.log(this.result)
console.log(1111) if (this.result === this.BasicPartsNumber.length) {
this.$message.success('请购成功') console.log(1111)
searchPart(this.groupFloatValue).then(response => { this.$message.success('请购成功')
this.tableData1 = response.data searchPart(this.groupFloatValue).then(response => {
}) this.tableData1 = response.data
searchDetailed1(this.RequisitionList).then(response => { })
for (let i = 0; i < response.data.length; i++) { searchDetailed1(this.RequisitionList).then(response => {
if (response.data[i].物料计划到货时间 !== '') { for (let i = 0; i < response.data.length; i++) {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0] if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
} }
} this.tableData6 = response.data
this.tableData6 = response.data })
}) }
} })
}) }
} } else if (this.PartType === '外购件') {
} else if (this.PartType === '外购件') { for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => { this.result += parseInt(response.data[0].result)
this.result += parseInt(response.data[0].result) if (this.result === this.StandardPartsAndOutsourcing.length) {
if (this.result === this.StandardPartsAndOutsourcing.length) { this.$message.success('请购成功')
this.$message.success('请购成功') searchPart1(this.groupFloatValue, 2).then(response => {
searchPart1(this.groupFloatValue, 2).then(response => { this.tableData2 = response.data
this.tableData2 = response.data })
}) searchDetailed(this.RequisitionList).then(response => {
searchDetailed(this.RequisitionList).then(response => { for (let i = 0; i < response.data.length; i++) {
for (let i = 0; i < response.data.length; i++) { if (response.data[i].物料计划到货时间 !== '') {
if (response.data[i].物料计划到货时间 !== '') { response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0] }
} }
} this.tableData5 = response.data
this.tableData5 = response.data })
}) }
} })
}) }
} } else if (this.PartType === '标准件') {
} else if (this.PartType === '标准件') { for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => { this.result += parseInt(response.data[0].result)
this.result += parseInt(response.data[0].result) if (this.result === this.StandardPartsAndOutsourcing.length) {
if (this.result === this.StandardPartsAndOutsourcing.length) { this.$message.success('请购成功')
this.$message.success('请购成功') searchPart1(this.groupFloatValue, 1).then(response => {
searchPart1(this.groupFloatValue, 1).then(response => { this.tableData3 = response.data
this.tableData3 = response.data })
}) searchDetailed(this.RequisitionList).then(response => {
searchDetailed(this.RequisitionList).then(response => { for (let i = 0; i < response.data.length; i++) {
for (let i = 0; i < response.data.length; i++) { if (response.data[i].物料计划到货时间 !== '') {
if (response.data[i].物料计划到货时间 !== '') { response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0] }
} }
} this.tableData5 = response.data
this.tableData5 = response.data })
}) }
} })
}) }
} }
} else {
this.$message.warning('请选择零件或物料')
} }
} else { } else {
this.$message.warning('请选择计划到货时间') this.$message.warning('请选择交货期')
} }
} else { } else {
this.$message.warning('请先选择请购单') this.$message.warning('请先选择请购单')
} }
}, },
PurchasingDepartment() { PurchasingDepartment() {
this.result = 0
if (this.time !== '') { if (this.time !== '') {
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.time, this.MaterialNum[i], this.NumberOfParts[i], this.projectFloatValue, this.machineFloatValue).then(response => { if (this.PartType === '基本件') {
this.result += parseInt(response.data[0].result) purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => {
if (this.result === this.StandardPartsAndOutsourcing.length) { if (response.data[0].result !== '0') {
this.$message.success('请购成功') console.log(response.data[0].result)
if (this.PartType === '外购件') { this.$message.success('请购成功')
searchPart1(this.groupFloatValue, 2).then(response => { searchPart(this.groupFloatValue).then(response => {
this.tableData2 = response.data this.tableData1 = response.data
})
searchDetailed1(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData6 = response.data
}) })
} else { } else {
searchPart1(this.groupFloatValue, 1).then(response => { this.$message.success('请购失败')
this.tableData3 = response.data
})
} }
} })
}) } else {
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('请购成功')
if (this.PartType === '外购件') {
searchPart1(this.groupFloatValue, 2).then(response => {
this.tableData2 = response.data
})
} else {
searchPart1(this.groupFloatValue, 1).then(response => {
this.tableData3 = response.data
})
}
} else {
this.$message.success('请购失败')
}
})
}
} else {
this.$message.warning('请选择零件或物料')
} }
} else { } else {
this.$message.warning('请选择计划到货时间') this.$message.warning('请选择交货期')
} }
}, },
Production() { Production() {
this.result = 0
if (this.PartType === '基本件' && this.BasicPartsNumber.length !== 0) { if (this.PartType === '基本件' && this.BasicPartsNumber.length !== 0) {
for (let i = 0; i < this.BasicPartsNumber.length; i++) { Production(this.groupFloatValue, this.BasicPartsNumber, this.projectFloatValue, this.machineFloatValue).then(response => {
Production(this.groupFloatValue, this.BasicPartsNumber[i], this.projectFloatValue, this.machineFloatValue).then(response => { if (response.data[0].result !== '0') {
this.result += parseInt(response.data[0].result) this.$message.success('投产成功')
if (this.result === this.BasicPartsNumber.length) { searchPart(this.groupFloatValue).then(response => {
this.$message.success('投产成功') this.tableData1 = response.data
searchPart(this.groupFloatValue).then(response => { })
this.tableData1 = response.data } else {
}) this.$message.error('投产失败')
} else { }
this.$message.error('投产失败') })
}
})
}
} else { } else {
this.$message.warning('请选择基本件') this.$message.warning('请选择基本件')
} }

View File

@@ -161,7 +161,6 @@ export default {
classificationCode classificationCode
console.log(this.worksheet[j].M2.v.substring(0, 1)) console.log(this.worksheet[j].M2.v.substring(0, 1))
if (this.worksheet[j].M2.v.substring(0, 1) === '9') { if (this.worksheet[j].M2.v.substring(0, 1) === '9') {
console.log('哈哈哈哈哈')
const response = await isExit(this.projectValue, this.worksheet[j].F2.v) const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
const res = response.data const res = response.data
if (res[0].Column1 === 0) { if (res[0].Column1 === 0) {
@@ -198,9 +197,6 @@ export default {
} else { } else {
if (machineNum && groupNum) { if (machineNum && groupNum) {
await sleep(50) await sleep(50)
if (classificationCode) {
drawingNum += '-' + classificationCode
}
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else { } else {
this.loading = false this.loading = false
@@ -232,9 +228,13 @@ export default {
if (groupNum.indexOf('MX') > -1) { if (groupNum.indexOf('MX') > -1) {
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data const res = response.data
console.log(res)
if (res[0].result === '0') { if (res[0].result === '0') {
this.$notify.error(`${drawingNum}导入失败`) this.$notify.error(`${drawingNum}导入失败`)
} }
if (res[0].result === '2') {
this.$notify.error(`${drawingNum}导入重复`)
}
} else { } else {
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data const res = response.data

View File

@@ -544,7 +544,8 @@ export default {
for (let i = 0; i < this.tableDataAll.length; i++) { for (let i = 0; i < this.tableDataAll.length; i++) {
const data = this.tableDataAll[i] const data = this.tableDataAll[i]
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量) const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
const resp = await transferMX1(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id, data.id) console.log(data.id, data.图号或者型号)
const resp = await transferMX1(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id, data.前id, data.前图号或者型号)
await sleep(10) await sleep(10)
if (resp.data[0].result === '0') { if (resp.data[0].result === '0') {
this.err++ this.err++

View File

@@ -167,54 +167,57 @@ export default {
this.disabled = false this.disabled = false
return return
} else { } else {
console.log(this.worksheet[j], 2222) if (this.worksheet[j].M2.v.substring(0, 1) !== '9') {
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = '' this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = '' this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = '' this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = '' this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = '' this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = '' this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = '' this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = '' this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = '' this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = '' this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = '' this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = '' this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
for (let i = 0; i < 999; i++) { for (let i = 0; i < 999; i++) {
const attr = i + 4 const attr = i + 4
drawingNum = this.worksheet[j][`B${attr}`] ? this.worksheet[j][`B${attr}`].v : '' drawingNum = this.worksheet[j][`B${attr}`] ? this.worksheet[j][`B${attr}`].v : ''
name = this.worksheet[j][`D${attr}`] ? this.worksheet[j][`D${attr}`].v : '' name = this.worksheet[j][`D${attr}`] ? this.worksheet[j][`D${attr}`].v : ''
type = this.worksheet[j][`F${attr}`] ? this.worksheet[j][`F${attr}`].v : '' type = this.worksheet[j][`F${attr}`] ? this.worksheet[j][`F${attr}`].v : ''
material = this.worksheet[j][`J${attr}`] ? this.worksheet[j][`J${attr}`].v : '' material = this.worksheet[j][`J${attr}`] ? this.worksheet[j][`J${attr}`].v : ''
spareNum = this.worksheet[j][`L${attr}`] ? this.worksheet[j][`L${attr}`].v : '' spareNum = this.worksheet[j][`L${attr}`] ? this.worksheet[j][`L${attr}`].v : ''
useNum = this.worksheet[j][`M${attr}`] ? this.worksheet[j][`M${attr}`].v : '' useNum = this.worksheet[j][`M${attr}`] ? this.worksheet[j][`M${attr}`].v : ''
manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : '' manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : ''
remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : '' remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : ''
classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : '' classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : ''
console.log(drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode, 2222222222) if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据
if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据 break
break
} else {
if (machineNum && groupNum) {
await sleep(50)
if (classificationCode) {
drawingNum += '-' + classificationCode
}
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else { } else {
this.loading = false if (machineNum && groupNum) {
this.disabled = false await sleep(50)
this.$notify.error(`请确认导入文件是否正确`) if (classificationCode) {
return drawingNum += '-' + classificationCode
}
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
this.disabled = false
this.$notify.error(`请确认导入文件是否正确`)
return
}
} }
} }
} else {
this.$notify.error('禁止导入整改组')
break
} }
} }
this.itemFile.splice(j, 1) this.itemFile.splice(j, 1)
this.worksheet.splice(j, 1) this.worksheet.splice(j, 1)
this.err === 0 ? this.$message.success(`导入完成`) : this.$message.error(`导入失败零件个数为${this.err},请检查文件是否正确`)
} }
this.loading = false this.loading = false
this.err === 0 ? this.$message.success(`导入完成`) : this.$message.error(`导入失败零件个数为${this.err},请检查文件是否正确`)
this.projectChange(this.projectName) // 调用查询机床方法通过watch属性检测变化会自动得到下面表格的值。 this.projectChange(this.projectName) // 调用查询机床方法通过watch属性检测变化会自动得到下面表格的值。
} catch (e) { } catch (e) {
console.log(e) console.log(e)

View File

@@ -487,8 +487,9 @@ export default {
if (this.groupValue.indexOf('MX') > -1) { if (this.groupValue.indexOf('MX') > -1) {
for (let i = 0; i < this.tableDataAll.length; i++) { for (let i = 0; i < this.tableDataAll.length; i++) {
const data = this.tableDataAll[i] const data = this.tableDataAll[i]
console.log(data)
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量) const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id) const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id)
await sleep(10) await sleep(10)
if (resp.data[0].result === '0') { if (resp.data[0].result === '0') {
this.err++ this.err++

View File

@@ -28,7 +28,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-button icon="el-icon-search" type="success" size="small" @click="getTableData">查询</el-button> <el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button>
</el-card> </el-card>
<el-card v-if="groupName && groupName.indexOf('MX') > -1"> <el-card v-if="groupName && groupName.indexOf('MX') > -1">
<el-table <el-table
@@ -158,7 +158,6 @@
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
disabled
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -244,6 +243,10 @@ export default {
}, },
groupValue(val) { groupValue(val) {
if (val) { if (val) {
this.pageCurrentWB = 1
this.pageSizeWB = 10
this.pageCurrent = 1
this.pageSize = 10
this.getTableData() this.getTableData()
} }
} }

View File

@@ -14,6 +14,9 @@
</el-select> </el-select>
<span>供应商:</span> <span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/> <el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<span>提前</span>
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
<span>天预警</span>
<el-button <el-button
type="success" type="success"
size="small" size="small"
@@ -70,7 +73,7 @@
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="18" :stroke-width="18"
:percentage="100*(parseInt(scope.row.合同物料到货总数)/parseInt(scope.row.合同物料采购总数)).toFixed(4)" :percentage="parseFloat((100*scope.row.合同物料到货总数/scope.row.合同物料采购总数).toFixed(2))"
status="success"/> status="success"/>
</template> </template>
</el-table-column> </el-table-column>
@@ -162,6 +165,7 @@ export default {
name: '', // 项目总价查询 name: '', // 项目总价查询
data() { data() {
return { return {
warningValue: 3,
check1: 0, check1: 0,
check2: 0, check2: 0,
contractNumValue: '', contractNumValue: '',
@@ -202,6 +206,7 @@ export default {
}) })
}, },
searchTable1() { searchTable1() {
this.warningValue ? this.warningValue : this.warningValue = 1
this.arrival = [] // 规定到货时间数组 this.arrival = [] // 规定到货时间数组
this.now = new Date() this.now = new Date()
this.contractNumValue ? this.check1 = 1 : this.check1 = 0 this.contractNumValue ? this.check1 = 1 : this.check1 = 0
@@ -210,13 +215,13 @@ export default {
for (let i = 0; i < response.data.rows.length; i++) { for (let i = 0; i < response.data.rows.length; i++) {
this.arrival.push(new Date(response.data.rows[i].规定到货时间)) this.arrival.push(new Date(response.data.rows[i].规定到货时间))
if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) { if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) {
this.judge[i] = 1 this.judge[i] = 1 // 全部到货
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 0 && (this.now - this.arrival[i]) < 86400000) { } else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
this.judge[i] = 2 this.judge[i] = 2 // 即将拖期
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 86400000) { } else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) < 0) {
this.judge[i] = 3 this.judge[i] = 3 // 已拖期
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) < 0) { } else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
this.judge[i] = 4 this.judge[i] = 4 // 进度正常
} }
} }
this.tableData1 = response.data.rows this.tableData1 = response.data.rows

View File

@@ -26,13 +26,14 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="预付款"> <el-form-item label="预付款">
<el-select v-model="payMethodValue" placeholder="预付款" size="small" @change="payMethodChange"> <el-input v-model="AdvanceCharge" size="small" placeholder="预付款"/>
<el-option <!--<el-select v-model="payMethodValue" placeholder="预付款" size="small" @change="payMethodChange">-->
v-for="item in payMethod" <!--<el-option-->
:key="item.value" <!--v-for="item in payMethod"-->
:label="item.label" <!--:key="item.value"-->
:value="item.value"/> <!--:label="item.label"-->
</el-select> <!--:value="item.value"/>-->
<!--</el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -355,7 +356,7 @@
</template> </template>
<script> <script>
import { searchSupplier, initPayMethod, initPayTimeNode, update, doneContract, initPurchaseOrder, searchData, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts' import { searchSupplier, update, doneContract, initPurchaseOrder, searchData, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
inject: ['reload'], inject: ['reload'],
@@ -370,6 +371,7 @@ export default {
} }
} }
}, },
AdvanceCharge: '',
loading: false, loading: false,
dialogVisible1: false, dialogVisible1: false,
disable2: true, disable2: true,
@@ -545,14 +547,14 @@ export default {
} }
}, },
searchDemo(row = this.paramRow) { searchDemo(row = this.paramRow) {
for (let i = 0; i < this.payMethod.length; i++) { // for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) { // if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label // this.payMethodName = this.payMethod[i].label
} // }
} // }
this.paramRow = row this.paramRow = row
searchContractDemo(this.paramRow.合同模板流水号).then(response => { searchContractDemo(this.paramRow.合同模板流水号).then(response => {
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName) this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('AdvanceCharge', this.AdvanceCharge)
}) })
}, },
contractChange() { contractChange() {
@@ -562,49 +564,49 @@ export default {
searchContractDemo().then(response => { // 初始化合同模板 searchContractDemo().then(response => { // 初始化合同模板
this.tableData2 = response.data this.tableData2 = response.data
}) })
this.payMethod = [] // this.payMethod = []
initPayMethod().then(response => { // initPayMethod().then(response => {
for (let i = 0; i < response.data.length; i++) { // for (let i = 0; i < response.data.length; i++) {
this.payMethod.push({ // this.payMethod.push({
label: response.data[i].付款方式内容, // label: response.data[i].付款方式内容,
value: response.data[i].付款方式流水号 // value: response.data[i].付款方式流水号
}) // })
} // }
}) // })
this.payTime1 = [] // this.payTime1 = []
this.payTime2 = [] // this.payTime2 = []
this.payTime3 = [] // this.payTime3 = []
this.payTime4 = [] // this.payTime4 = []
this.payTime5 = [] // this.payTime5 = []
this.payTime6 = [] // this.payTime6 = []
initPayTimeNode().then(response => { // initPayTimeNode().then(response => {
for (let i = 0; i < response.data.length; i++) { // for (let i = 0; i < response.data.length; i++) {
this.payTime1.push({ // this.payTime1.push({
label: response.data[i].付款时间节点名称, // label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号 // value: response.data[i].付款时间节点流水号
}) // })
this.payTime2.push({ // this.payTime2.push({
label: response.data[i].付款时间节点名称, // label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号 // value: response.data[i].付款时间节点流水号
}) // })
this.payTime3.push({ // this.payTime3.push({
label: response.data[i].付款时间节点名称, // label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号 // value: response.data[i].付款时间节点流水号
}) // })
this.payTime4.push({ // this.payTime4.push({
label: response.data[i].付款时间节点名称, // label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号 // value: response.data[i].付款时间节点流水号
}) // })
this.payTime5.push({ // this.payTime5.push({
label: response.data[i].付款时间节点名称, // label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号 // value: response.data[i].付款时间节点流水号
}) // })
this.payTime6.push({ // this.payTime6.push({
label: response.data[i].付款时间节点名称, // label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号 // value: response.data[i].付款时间节点流水号
}) // })
} // }
}) // })
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum') this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
}, },
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据 searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
@@ -676,8 +678,8 @@ export default {
this.group1 = '' this.group1 = ''
this.group2 = '' this.group2 = ''
this.group3 = '' this.group3 = ''
this.group5 = '' // this.group5 = ''
this.group6 = '' // this.group6 = ''
this.group7 = '' this.group7 = ''
this.group8 = '' this.group8 = ''
this.group9 = '' this.group9 = ''
@@ -703,50 +705,50 @@ export default {
this.RequisitionNumber = this.contractNum[i].label this.RequisitionNumber = this.contractNum[i].label
} }
} }
for (let i = 0; i < this.payMethod.length; i++) { // for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) { // if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label // this.payMethodName = this.payMethod[i].label
} // }
} // }
const payTimeNum = this.payMethodName.split(':') // const payTimeNum = this.payMethodName.split(':')
if (payTimeNum.length > 1) { // if (payTimeNum.length > 1) {
for (let i = 0; i < payTimeNum.length; i++) { // for (let i = 0; i < payTimeNum.length; i++) {
switch (i) { // switch (i) {
case 0: // case 0:
this.group6 += this.payTime1Value + ',' // this.group6 += this.payTime1Value + ','
break // break
case 1: // case 1:
this.group6 += this.payTime2Value + ',' // this.group6 += this.payTime2Value + ','
break // break
case 2: // case 2:
this.group6 += this.payTime3Value + ',' // this.group6 += this.payTime3Value + ','
break // break
case 3: // case 3:
this.group6 += this.payTime4Value + ',' // this.group6 += this.payTime4Value + ','
break // break
case 4: // case 4:
this.group6 += this.payTime5Value + ',' // this.group6 += this.payTime5Value + ','
break // break
case 5: // case 5:
this.group6 += this.payTime6Value + ',' // this.group6 += this.payTime6Value + ','
break // break
} // }
this.group5 += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划 // this.group5 += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
} // }
} else { // } else {
this.group5 = '10,' // 付款比例 付款方式 付款计划 // this.group5 = '10,' // 付款比例 付款方式 付款计划
this.group6 = this.payTime1Value + ',' // 付款时间 // this.group6 = this.payTime1Value + ',' // 付款时间
} // }
this.group1 = this.group1.substr(0, this.group1.length - 1) this.group1 = this.group1.substr(0, this.group1.length - 1)
this.group2 = this.group2.substr(0, this.group2.length - 1) this.group2 = this.group2.substr(0, this.group2.length - 1)
this.group3 = this.group3.substr(0, this.group3.length - 1) this.group3 = this.group3.substr(0, this.group3.length - 1)
this.group5 = this.group5.substr(0, this.group5.length - 1) // this.group5 = this.group5.substr(0, this.group5.length - 1)
this.group6 = this.group6.substr(0, this.group6.length - 1) // this.group6 = this.group6.substr(0, this.group6.length - 1)
this.group7 = this.group7.substr(0, this.group7.length - 1) // this.group7 = this.group7.substr(0, this.group7.length - 1)
this.group8 = this.group8.substr(0, this.group8.length - 1) // this.group8 = this.group8.substr(0, this.group8.length - 1)
this.group9 = this.group9.substr(0, this.group9.length - 1) // this.group9 = this.group9.substr(0, this.group9.length - 1)
this.group10 = this.group10.substr(0, this.group10.length - 1) // this.group10 = this.group10.substr(0, this.group10.length - 1)
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group5, this.group6, this.group7, this.group8, this.group9, this.id).then(response => { doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.AdvanceCharge).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('生成合同成功') this.$message.success('生成合同成功')
this.reload() this.reload()
@@ -754,59 +756,59 @@ export default {
}) })
} }
}, },
payMethodChange() { // 付款方式改变 // payMethodChange() { // 付款方式改变
for (let i = 0; i < this.payMethod.length; i++) { // for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) { // if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label // this.payMethodName = this.payMethod[i].label
} // }
} // }
const payTimeNum = this.payMethodName.split(':') // const payTimeNum = this.payMethodName.split(':')
switch (payTimeNum.length) { // switch (payTimeNum.length) {
case 1: // case 1:
this.disable2 = true // this.disable2 = true
this.disable3 = true // this.disable3 = true
this.disable4 = true // this.disable4 = true
this.disable5 = true // this.disable5 = true
this.disable6 = true // this.disable6 = true
break // break
case 2: // case 2:
this.disable2 = false // this.disable2 = false
this.disable3 = true // this.disable3 = true
this.disable4 = true // this.disable4 = true
this.disable5 = true // this.disable5 = true
this.disable6 = true // this.disable6 = true
break // break
case 3: // case 3:
this.disable2 = false // this.disable2 = false
this.disable3 = false // this.disable3 = false
this.disable4 = true // this.disable4 = true
this.disable5 = true // this.disable5 = true
this.disable6 = true // this.disable6 = true
break // break
case 4: // case 4:
this.disable2 = false // this.disable2 = false
this.disable3 = false // this.disable3 = false
this.disable4 = false // this.disable4 = false
this.disable5 = true // this.disable5 = true
this.disable6 = true // this.disable6 = true
break // break
case 5: // case 5:
this.disable2 = false // this.disable2 = false
this.disable3 = false // this.disable3 = false
this.disable4 = false // this.disable4 = false
this.disable5 = false // this.disable5 = false
this.disable6 = true // this.disable6 = true
break // break
case 6: // case 6:
this.disable2 = false // this.disable2 = false
this.disable3 = false // this.disable3 = false
this.disable4 = false // this.disable4 = false
this.disable5 = false // this.disable5 = false
this.disable6 = false // this.disable6 = false
break // break
} // }
this.fetchData() // this.fetchData()
}, // },
exportExcel() {} exportExcel() {}
} }
} }

View File

@@ -78,9 +78,9 @@
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" width="80" align="center"> <el-table-column label="付款" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="欠款金额" min-width="70" align="center"> <el-table-column label="欠款金额" min-width="70" align="center">
@@ -226,9 +226,9 @@
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" min-width="80" align="center"> <el-table-column label="付款" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="欠款金额" min-width="80" align="center"> <el-table-column label="欠款金额" min-width="80" align="center">

View File

@@ -23,9 +23,9 @@
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center" min-width="100"> <el-table-column label="付款" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购员" align="center" min-width="70"> <el-table-column label="采购员" align="center" min-width="70">

View File

@@ -23,9 +23,9 @@
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center" min-width="100"> <el-table-column label="付款" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购员" align="center" min-width="70"> <el-table-column label="采购员" align="center" min-width="70">

View File

@@ -23,9 +23,9 @@
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center" min-width="100"> <el-table-column label="付款" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购员" align="center" min-width="70"> <el-table-column label="采购员" align="center" min-width="70">

View File

@@ -51,7 +51,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="到票情况" min-width="200px"> <el-table-column align="center" label="到票情况" min-width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-progress :text-inside="true" :stroke-width="18" :percentage="100*(scope.row.到票总金额/scope.row.合同总金额).toFixed(4)" status="success"/> <el-progress :text-inside="true" :stroke-width="18" :percentage="100*(scope.row.到票总金额/scope.row.合同总金额).toFixed(2)" status="success"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -44,9 +44,9 @@
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center" min-width="100"> <el-table-column label="付款" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购员" align="center" min-width="70"> <el-table-column label="采购员" align="center" min-width="70">

View File

@@ -64,9 +64,9 @@
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center" width="200"> <el-table-column label="付款" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
@@ -116,6 +116,8 @@
<td colspan="2" align="center">零件名称</td> <td colspan="2" align="center">零件名称</td>
<td colspan="1" align="center">零件图号</td> <td colspan="1" align="center">零件图号</td>
<td colspan="1" align="center">材料</td> <td colspan="1" align="center">材料</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -129,6 +131,8 @@
<td colspan="2" align="center">物料名称</td> <td colspan="2" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td> <td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td> <td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -136,13 +140,17 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">运费</td> <td colspan="8">运费</td>
<td colspan="1" align="center">{{ freight }}</td> <td colspan="1" align="center">{{ freight }}</td>
</tr> </tr>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值) </td> <td colspan="8">总价: (人民币){{ RMB }}() </td>
<td colspan="1" align="center">{{ TotalAmount }}</td> <td colspan="1" align="center">{{ TotalAmount }}</td>
</tr> </tr>
<tr style="height: 40px">
<td colspan="8">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
</tr>
</tfoot> </tfoot>
</table> </table>
<div id="23"/> <div id="23"/>
@@ -235,6 +243,9 @@ export default {
supplier: '', supplier: '',
supplierName: '', supplierName: '',
supplierValue: '', supplierValue: '',
taxRate: '',
TotalAmount1: '',
RMB1: '',
total1: 0, total1: 0,
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 10, pageSize1: 10,
@@ -369,9 +380,12 @@ export default {
this.textarea = row.合同文本 this.textarea = row.合同文本
this.supplier = row.供应商名称 this.supplier = row.供应商名称
this.contract = row.采购合同编号 this.contract = row.采购合同编号
this.taxRate = row.税率
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计) this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本 this.RMB = row.总金额_文本
this.TotalAmount = row.总金额 this.TotalAmount = row.总金额
this.TotalAmount1 = parseInt((row.含税总金额) * 100) / 100
this.RMB1 = row.含税总金额_文本
document.getElementById('23').innerText = this.textarea document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号) this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => { searchTable2(this.contractValue).then(response => {
@@ -388,16 +402,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData') tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i]) document.getElementById('tableHead').after(tr[i])
} }
for (let j = 0; j < this.returns.length; j++) { for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格 document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号 document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
searchTable3(this.contractValue).then(response => { searchTable3(this.contractValue).then(response => {
@@ -414,16 +430,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData1') tr[i].setAttribute('class', 'tableData1')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead1').after(tr[i]) document.getElementById('tableHead1').after(tr[i])
} }
for (let j = 0; j < this.returns1.length; j++) { for (let j = 0; j < this.returns1.length; j++) {
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号 document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料 document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
} }

View File

@@ -73,9 +73,9 @@
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center" width="200"> <el-table-column label="付款" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批情况" align="center" width="100"> <el-table-column label="审批情况" align="center" width="100">
@@ -135,6 +135,8 @@
<td colspan="2" align="center">零件名称</td> <td colspan="2" align="center">零件名称</td>
<td colspan="1" align="center">零件图号</td> <td colspan="1" align="center">零件图号</td>
<td colspan="1" align="center">材料</td> <td colspan="1" align="center">材料</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -148,6 +150,8 @@
<td colspan="2" align="center">物料名称</td> <td colspan="2" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td> <td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td> <td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -155,13 +159,17 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">运费</td> <td colspan="8">运费</td>
<td colspan="1" align="center">{{ freight }}</td> <td colspan="1" align="center">{{ freight }}</td>
</tr> </tr>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值) </td> <td colspan="8">总价: (人民币){{ RMB }}() </td>
<td colspan="1" align="center">{{ TotalAmount }}</td> <td colspan="1" align="center">{{ TotalAmount }}</td>
</tr> </tr>
<tr style="height: 40px">
<td colspan="8">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
</tr>
</tfoot> </tfoot>
</table> </table>
<div id="23"/> <div id="23"/>
@@ -242,6 +250,9 @@ export default {
startEndDate: '', startEndDate: '',
contract: '', contract: '',
freight: '', freight: '',
taxRate: '',
TotalAmount1: '',
RMB1: '',
contractNumValue: '', contractNumValue: '',
contractNum: [], contractNum: [],
ProcurementContractNum: '', ProcurementContractNum: '',
@@ -365,9 +376,12 @@ export default {
this.textarea = row.合同文本 this.textarea = row.合同文本
this.supplier = row.供应商名称 this.supplier = row.供应商名称
this.contract = row.采购合同编号 this.contract = row.采购合同编号
this.taxRate = row.税率
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计) this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本 this.RMB = row.总金额_文本
this.TotalAmount = row.总金额 this.TotalAmount = row.总金额
this.TotalAmount1 = parseInt((row.含税总金额) * 100) / 100
this.RMB1 = row.含税总金额_文本
document.getElementById('23').innerText = this.textarea document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号) this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => { searchTable2(this.contractValue).then(response => {
@@ -384,16 +398,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData') tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i]) document.getElementById('tableHead').after(tr[i])
} }
for (let j = 0; j < this.returns.length; j++) { for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格 document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号 document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
searchTable3(this.contractValue).then(response => { searchTable3(this.contractValue).then(response => {
@@ -410,16 +426,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData1') tr[i].setAttribute('class', 'tableData1')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead1').after(tr[i]) document.getElementById('tableHead1').after(tr[i])
} }
for (let j = 0; j < this.returns1.length; j++) { for (let j = 0; j < this.returns1.length; j++) {
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号 document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料 document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
} }

View File

@@ -59,9 +59,9 @@
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center"> <el-table-column label="付款" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right"> <el-table-column label="操作" align="center" width="100" fixed="right">
@@ -110,6 +110,8 @@
<td colspan="2" align="center">零件名称</td> <td colspan="2" align="center">零件名称</td>
<td colspan="1" align="center">零件图号</td> <td colspan="1" align="center">零件图号</td>
<td colspan="1" align="center">材料</td> <td colspan="1" align="center">材料</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -123,6 +125,8 @@
<td colspan="2" align="center">物料名称</td> <td colspan="2" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td> <td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td> <td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -130,16 +134,16 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">运费</td> <td colspan="8">运费</td>
<td colspan="1" align="center">{{ freight }}</td> <td colspan="1" align="center">{{ freight }}</td>
</tr> </tr>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }} </td> <td colspan="8">总价: (人民币){{ RMB }} </td>
<td colspan="1" align="center">{{ TotalAmount }}</td> <td colspan="1" align="center">{{ TotalAmount }}</td>
</tr> </tr>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td> <td colspan="8">总价: (人民币){{ RMB3 }}({{ taxRate }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td> <td colspan="1" align="center">{{ TotalAmount3 }}</td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
@@ -213,9 +217,9 @@
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款方式" align="center"> <el-table-column label="付款" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式内容 }} {{ scope.row.付款 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="变更原因" align="center"> <el-table-column label="变更原因" align="center">
@@ -269,6 +273,8 @@
<td colspan="2" align="center">零件名称</td> <td colspan="2" align="center">零件名称</td>
<td colspan="1" align="center">零件图号</td> <td colspan="1" align="center">零件图号</td>
<td colspan="1" align="center">材料</td> <td colspan="1" align="center">材料</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -282,6 +288,8 @@
<td colspan="2" align="center">物料名称</td> <td colspan="2" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td> <td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td> <td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td> <td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td> <td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td> <td colspan="1" align="center">总价</td>
@@ -289,13 +297,17 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">运费</td> <td colspan="8">运费</td>
<td colspan="1" align="center">{{ freight1 }}</td> <td colspan="1" align="center">{{ freight1 }}</td>
</tr> </tr>
<tr style="height: 40px"> <tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB1 }}(含0.16增值税) </td> <td colspan="8">总价: (人民币){{ RMB1 }} </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td> <td colspan="1" align="center">{{ TotalAmount1 }}</td>
</tr> </tr>
<tr style="height: 40px">
<td colspan="8">总价: (人民币){{ RMB4 }}({{ taxRate1 }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount4 }}</td>
</tr>
</tfoot> </tfoot>
</table> </table>
<div id="24"/> <div id="24"/>
@@ -367,7 +379,11 @@ export default {
RMB: '', RMB: '',
TotalAmount: '', TotalAmount: '',
RMB1: '', RMB1: '',
RMB3: '',
RMB4: '',
TotalAmount1: '', TotalAmount1: '',
TotalAmount3: '',
TotalAmount4: '',
check1: 0, check1: 0,
check2: 0, check2: 0,
check3: 0, check3: 0,
@@ -380,6 +396,7 @@ export default {
freight: '', freight: '',
freight1: '', freight1: '',
taxRate: '', taxRate: '',
taxRate1: '',
contractNumValue: '', contractNumValue: '',
contractNum: [], contractNum: [],
contractNumValue1: '', contractNumValue1: '',
@@ -567,14 +584,15 @@ export default {
this.textarea = row.合同文本 this.textarea = row.合同文本
this.supplier = row.供应商名称 this.supplier = row.供应商名称
this.contract = row.采购合同编号 this.contract = row.采购合同编号
this.taxRate = row.税率
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计) this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本 this.RMB = row.总金额_文本
this.TotalAmount = row.总金额 this.TotalAmount = row.总金额
this.TotalAmount3 = parseInt((row.含税总金额) * 100) / 100
this.RMB3 = row.含税总金额_文本
document.getElementById('23').innerText = this.textarea document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号) this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => { searchTable2(this.contractValue).then(response => {
console.log(response.data)
this.taxRate = response.data[0].税率
this.returns = response.data this.returns = response.data
const children = document.getElementsByClassName('tableData') const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4') const parent = document.getElementById('4')
@@ -588,16 +606,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData') tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i]) document.getElementById('tableHead').after(tr[i])
} }
for (let j = 0; j < this.returns.length; j++) { for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格 document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号 document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
searchTable5(this.contractValue).then(response => { searchTable5(this.contractValue).then(response => {
@@ -614,16 +634,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData2') tr[i].setAttribute('class', 'tableData2')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead2').after(tr[i]) document.getElementById('tableHead2').after(tr[i])
} }
for (let j = 0; j < this.returns2.length; j++) { for (let j = 0; j < this.returns2.length; j++) {
document.getElementsByClassName('tableData2')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData2')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData2')[j].children[1].innerHTML = response.data[j].零件图号 document.getElementsByClassName('tableData2')[j].children[1].innerHTML = response.data[j].零件图号
document.getElementsByClassName('tableData2')[j].children[2].innerHTML = response.data[j].材料 document.getElementsByClassName('tableData2')[j].children[2].innerHTML = response.data[j].材料
document.getElementsByClassName('tableData2')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData2')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData2')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData2')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData2')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData2')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData2')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData2')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
}, },
@@ -632,9 +654,12 @@ export default {
this.textarea1 = row.合同文本 this.textarea1 = row.合同文本
this.supplier1 = row.供应商名称 this.supplier1 = row.供应商名称
this.contract1 = row.采购合同编号 this.contract1 = row.采购合同编号
this.taxRate1 = row.税率
this.freight1 = parseInt(row.总金额) - parseInt(row.总金额_小计) this.freight1 = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB1 = row.总金额_文本 this.RMB1 = row.总金额_文本
this.TotalAmount1 = row.总金额 this.TotalAmount1 = row.总金额
this.TotalAmount4 = parseInt((row.含税总金额) * 100) / 100
this.RMB4 = row.含税总金额_文本
document.getElementById('24').innerText = this.textarea1 document.getElementById('24').innerText = this.textarea1
this.contractValue1 = parseInt(row.采购合同变更流水号) this.contractValue1 = parseInt(row.采购合同变更流水号)
searchTable4(this.contractValue1).then(response => { searchTable4(this.contractValue1).then(response => {
@@ -651,16 +676,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData1') tr[i].setAttribute('class', 'tableData1')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead1').after(tr[i]) document.getElementById('tableHead1').after(tr[i])
} }
for (let j = 0; j < this.returns1.length; j++) { for (let j = 0; j < this.returns1.length; j++) {
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].物料规格 document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].物料型号 document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
searchTable6(this.contractValue1).then(response => { searchTable6(this.contractValue1).then(response => {
@@ -677,16 +704,18 @@ export default {
tr[i] = document.createElement('tr') tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData3') tr[i].setAttribute('class', 'tableData3')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead3').after(tr[i]) document.getElementById('tableHead3').after(tr[i])
} }
for (let j = 0; j < this.returns3.length; j++) { for (let j = 0; j < this.returns3.length; j++) {
document.getElementsByClassName('tableData3')[j].children[0].innerHTML = response.data[j].物料名称 document.getElementsByClassName('tableData3')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData3')[j].children[1].innerHTML = response.data[j].零件图号 document.getElementsByClassName('tableData3')[j].children[1].innerHTML = response.data[j].零件图号
document.getElementsByClassName('tableData3')[j].children[2].innerHTML = response.data[j].材料 document.getElementsByClassName('tableData3')[j].children[2].innerHTML = response.data[j].材料
document.getElementsByClassName('tableData3')[j].children[3].innerHTML = response.data[j].数量 document.getElementsByClassName('tableData3')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData3')[j].children[4].innerHTML = response.data[j].单价 document.getElementsByClassName('tableData3')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData3')[j].children[5].innerHTML = response.data[j].金额 document.getElementsByClassName('tableData3')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData3')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData3')[j].children[7].innerHTML = response.data[j].金额
} }
}) })
} }