This commit is contained in:
lixin
2018-12-11 19:38:56 +08:00
32 changed files with 1125 additions and 761 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

@@ -24,3 +24,15 @@ export function searchSheetContract(num1) {
} }
}) })
} }
// 生成采购合同
export function doneContract(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购合同_增加数据',
param: `采购合同编号=${params[0]}&采购合同名称=${params[1]}&交货日期=${params[2]}&支付日期=${params[3]}&支付方式=${params[4]}&开票信息=${params[5]}&其他说明=${params[6]}&合同总额=${params[7]}&采购员流水号=${params[8]}&供应商流水号=${params[9]}&单价是否含税=${params[10]}&组件零件流水号组=${params[11]}&组件零件基本件流水号组=${params[12]}&数量组=${params[13]}&单价组=${params[14]}&交货期组=${params[15]}&合同内容\\=${params[16]}`
}
})
}

View File

@@ -55,7 +55,7 @@ export function searchTable2(num) {
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '采购管理_采购合同明细_查询数据', name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num param: '采购合同流水号=' + num
} }
}) })
@@ -67,7 +67,7 @@ export function submitApproval(num, num1, num2) {
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '采购管理_合同审批_修改数据', name: '采购管理_合同审批_采购部_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2 param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
} }
}) })

View File

@@ -0,0 +1,73 @@
import request from '@/utils/request'
// 初始化合同
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_查询数据'
}
})
}
// 查询表1
export function searchTable1(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_查询数据',
param: '采购合同流水号_check=' + params[2] + '&采购合同流水号=' + params[3] + '&供应商名称_check=' + params[4] + '&供应商名称=' + params[5],
Pagination: params[0] + '&' + params[1]
}
})
}
// 查询请款进度
export function searchCondition(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_请款进度_查询数据',
param: '采购合同流水号=' + num1
}
})
}
// 请款
export function requestFund(num1, money, time, id) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购请款表_增加数据',
param: `采购合同流水号=${num1}&请款金额=${money}&请款人=${id}&请款时间=${time}`
}
})
}
// 取消请款
export function cancelRequestFund(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购请款表_删除数据',
param: '采购请款流水号=' + num1
}
})
}
// 采购合同内容查询
export function searchContract(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})
}

View File

@@ -48,14 +48,14 @@ export function searchTable1(pageCurrent, pageSize, check1, start, end, check2,
} }
}) })
} }
// 采购合同明细查询 // 采购合同内容查询
export function searchTable2(num) { export function searchTable2(num) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '采购管理_采购合同明细_查询数据', name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num param: '采购合同流水号=' + num
} }
}) })

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

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 752 B

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

@@ -804,7 +804,7 @@ export default {
addInquirySheet() { // 追加物料 addInquirySheet() { // 追加物料
const numGroup1 = [] // 空数组,放该询价单中已有的组件零件流水号 const numGroup1 = [] // 空数组,放该询价单中已有的组件零件流水号
const numGroup2 = [] // 空数组,放该询价单中已有的组件零件基本件流水号 const numGroup2 = [] // 空数组,放该询价单中已有的组件零件基本件流水号
if (this.inquirySheetNum === '' || this.inquirySheetNum === null) { if (this.inquirySheetFlowNum === '' || this.inquirySheetFlowNum === null) {
this.$message.error('请选择一个询价单') this.$message.error('请选择一个询价单')
} else if (this.groupPartNum.length === 0 && this.groupPartBasicNum.length === 0) { } else if (this.groupPartNum.length === 0 && this.groupPartBasicNum.length === 0) {
this.$message.error('请选择待询价物料或零件') this.$message.error('请选择待询价物料或零件')

View File

@@ -30,9 +30,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
<el-tooltip :content="haTtax" placement="top"> <el-tooltip :content="hasTax" placement="top">
<el-switch <el-switch
v-model="haTtax" v-model="hasTax"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="含税" active-value="含税"
@@ -41,6 +41,18 @@
</el-tooltip> </el-tooltip>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="交货日期:">
<el-input v-model="deliveryDate" size="small" type="textarea" rows="1"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票信息:">
<el-input v-model="invoiceInfo" size="small" type="textarea" rows="1"/>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="支付日期:"> <el-form-item label="支付日期:">
@@ -54,12 +66,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="24">
<el-form-item label="开票信息:">
<el-input v-model="invoiceInfo" size="small" type="textarea" rows="1"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他说明:"> <el-form-item label="其他说明:">
<el-input v-model="otherInfo" size="small" type="textarea" rows="1"/> <el-input v-model="otherInfo" size="small" type="textarea" rows="1"/>
</el-form-item> </el-form-item>
@@ -99,26 +106,26 @@
{{ scope.row.数量 }} {{ scope.row.数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-show="haTtax==='未税'" label="单价(未税)" align="center" min-width="100"> <el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-show="haTtax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:70px"/> <el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:70px"/>
<span v-show="haTtax!=='未税'"></span> <span v-show="hasTax!=='未税'"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-show="haTtax==='含税'" label="单价(含税)" align="center" min-width="100"> <el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-show="haTtax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:70px"/> <el-input v-show="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:70px"/>
<span v-show="haTtax!=='含税'"></span> <span v-show="hasTax!=='含税'"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总额(未税)" align="center" min-width="100" prop="未税总额"> <el-table-column label="总额(未税)" align="center" min-width="100" prop="未税总额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ haTtax==='未税' ? scope.row.未税总额 = (Number(scope.row.数量) * Number(scope.row.未税单价)).toFixed(2) : scope.row.未税总额 = (scope.row.含税总额 / (1+taxRate)).toFixed(2) }} {{ hasTax==='未税' ? scope.row.未税总额 = (Number(scope.row.数量) * Number(scope.row.未税单价)).toFixed(2) : scope.row.未税总额 = (scope.row.含税总额 / (1+taxRate)).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总额(含税)" align="center" min-width="100" prop="含税总额"> <el-table-column label="总额(含税)" align="center" min-width="100" prop="含税总额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ haTtax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.含税单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }} {{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.含税单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -130,11 +137,11 @@
<el-radio-button label="自定义"/> <el-radio-button label="自定义"/>
</el-radio-group> </el-radio-group>
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">调整合同</el-button> <el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">调整合同</el-button>
<el-button type="success" size="small" @click="generateContract()">生成合同</el-button>
<div style="float: right"> <div style="float: right">
<span>合同总额</span> <span>合同总额</span>
<el-input v-model="actualTotal" size="small" style="width: 100px"/> <el-input v-model="actualTotal" size="small" style="width: 100px"/>
<el-button type="primary" size="small" @click="submitTotal()">确定总额</el-button> <el-button type="primary" size="small" @click="submitTotal()">确定总额</el-button>
<el-button type="success" size="small" @click="generateContract()">生成合同</el-button>
</div> </div>
<hr> <hr>
<!--html代码--> <!--html代码-->
@@ -151,16 +158,16 @@
<script> <script>
import Tinymce from '@/components/Tinymce' import Tinymce from '@/components/Tinymce'
import QRCode from 'qrcode' import { searchInquirySheet, searchSheetContract, doneContract } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { searchInquirySheet, searchSheetContract } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { convertCurrency } from '@/vendor/int2Chinese' import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
components: { Tinymce }, components: { Tinymce },
inject: ['reload'],
data() { data() {
return { return {
haTtax: '未税', hasTax: '未税',
taxRate: 0.16, taxRate: 0.16,
preview: false, // 预览 preview: false, // 预览
demoRadio: '自定义', // 模板radio demoRadio: '自定义', // 模板radio
@@ -171,7 +178,10 @@ export default {
contractNums: [], // 合同编号数组 contractNums: [], // 合同编号数组
contractNumValue: '', // 合同流水号 contractNumValue: '', // 合同流水号
supplierName: '', // 供应商名称 supplierName: '', // 供应商名称
supplierValue: '', // 供应商流水号
supplierAddress: '', // 供应商地址 supplierAddress: '', // 供应商地址
supplierPhone: '', // 供应商电话
supplierFax: '', // 供应商传真
untaxTotal: '', // 未税合计 untaxTotal: '', // 未税合计
tax: '', // 税额 tax: '', // 税额
taxTotal: '', // 含税合计 taxTotal: '', // 含税合计
@@ -179,9 +189,16 @@ export default {
actualTotal_zh: '', // 实际金额大写 actualTotal_zh: '', // 实际金额大写
payDate: '', // 支付日期 payDate: '', // 支付日期
payMethod: '', // 支付方式 payMethod: '', // 支付方式
deliveryDate: '', // 交货日期
invoiceInfo: '', // 开票信息 invoiceInfo: '', // 开票信息
otherInfo: '', // 其他说明 otherInfo: '', // 其他说明
tableData1: [] tableData1: [],
单价是否含税: '',
组件零件流水号组: [],
组件零件基本件流水号组: [],
数量组: [],
单价组: [],
交货期组: []
} }
}, },
computed: { computed: {
@@ -202,7 +219,11 @@ export default {
this.contractNums.push({ this.contractNums.push({
value: response.data[i].询价单流水号, value: response.data[i].询价单流水号,
label: response.data[i].询价单编号, label: response.data[i].询价单编号,
supplierName: response.data[i].供应商名称 supplierName: response.data[i].供应商名称,
supplierValue: response.data[i].供应商流水号,
supplierAddress: response.data[i].地址,
supplierPhone: response.data[i].电话号码,
supplierFax: response.data[i].传真
}) })
} }
}) })
@@ -219,6 +240,10 @@ export default {
for (let i = 0; i < this.contractNums.length; i++) { for (let i = 0; i < this.contractNums.length; i++) {
if (this.contractNums[i].value === this.contractNumValue) { if (this.contractNums[i].value === this.contractNumValue) {
this.supplierName = this.contractNums[i].supplierName this.supplierName = this.contractNums[i].supplierName
this.supplierValue = this.contractNums[i].supplierValue
this.supplierAddress = this.contractNums[i].supplierAddress
this.supplierPhone = this.contractNums[i].supplierPhone
this.supplierFax = this.contractNums[i].supplierFax
this.contractNum = this.contractNums[i].label this.contractNum = this.contractNums[i].label
} }
} }
@@ -229,7 +254,9 @@ export default {
searchSheetContract(this.contractNumValue).then(response => { searchSheetContract(this.contractNumValue).then(response => {
console.log(response.data, 111) console.log(response.data, 111)
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({ // 组件零件流水号 this.tableData1.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].组件零件流水号 ? response.data[i].物料名称 : response.data[i].零件名称, 名称: response.data[i].组件零件流水号 ? response.data[i].物料名称 : response.data[i].零件名称,
@@ -276,48 +303,48 @@ export default {
<td style="width: 25%;"> <td style="width: 25%;">
<h4 style="text-align: center;">合同名称:</h4> <h4 style="text-align: center;">合同名称:</h4>
</td> </td>
<td id="contractName" style="width: 25%;text-align: center;">&nbsp;</td> <td id="contractName" style="width: 25%;text-align: center;"></td>
<td style="width: 25%;text-align: center;" rowspan="2"><img id="qrCode"></td> <td style="width: 25%;text-align: center;" rowspan="2"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;"> <td style="width: 25%;">
<h4 style="text-align: center;">合同编号:</h4> <h4 style="text-align: center;">合同编号:</h4>
</td> </td>
<td id="contractNum" style="width: 25%;text-align: center;">&nbsp;</td> <td id="contractNum" style="width: 25%;text-align: center;"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table style="border-collapse: collapse; width: 100%;" border="1"> <table style="border-collapse: collapse; width: 100%;" border="1">
<tbody> <tbody>
<tr> <tr>
<td style="width: 25%;">买方:</td> <td style="width: 20%;">买方:</td>
<td style="width: 25%;">江苏高精机电装配有限公司</td> <td style="width: 30%;">江苏高精机电装配有限公司</td>
<td style="width: 25%;">卖方:</td> <td style="width: 20%;">卖方:</td>
<td id="supplierName" style="width: 25%;">&nbsp;</td> <td id="supplierName" style="width: 30%;"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">地址:</td> <td style="width: 20%;">地址:</td>
<td style="width: 25%;">盐城市开放大道666号</td> <td style="width: 30%;">盐城市开放大道666号</td>
<td style="width: 25%;">地址:</td> <td style="width: 20%;">地址:</td>
<td id="supplierAddress" style="width: 25%;">&nbsp;</td> <td id="supplierAddress" style="width: 30%;"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">法定代表人:</td> <td style="width: 20%;">法定代表人:</td>
<td style="width: 25%;">徐秀兵</td> <td style="width: 30%;">徐秀兵</td>
<td style="width: 25%;">法定代表人:</td> <td style="width: 20%;">法定代表人:</td>
<td style="width: 25%;">&nbsp;</td> <td style="width: 30%;"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">电话:</td> <td style="width: 20%;">电话:</td>
<td style="width: 25%;">&nbsp;</td> <td style="width: 30%;"></td>
<td style="width: 25%;">电话:</td> <td style="width: 20%;">电话:</td>
<td style="width: 25%;">&nbsp;</td> <td id="supplierPhone" style="width: 30%;"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">传真:</td> <td style="width: 20%;">传真:</td>
<td style="width: 25%;">&nbsp;</td> <td style="width: 30%;"></td>
<td style="width: 25%;">传真:</td> <td style="width: 20%;">传真:</td>
<td style="width: 25%;">&nbsp;</td> <td id="supplierFax" style="width: 30%;"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -326,50 +353,52 @@ export default {
border="1"> border="1">
<tbody> <tbody>
<tr> <tr>
<td style="width: 25%;">合同总额(人民币含税</td> <td style="width: 25%;">合同总额(RMB</td>
<td class="actualTotal" style="width: 25%;"></td> <td class="actualTotal" style="width: 25%;"></td>
<td style="width: 25%;">大写:</td> <td style="width: 25%;">大写:</td>
<td id="actualTotal_zh" style="width: 25%;"></td> <td id="actualTotal_zh" style="width: 25%;"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">交货日期:</td> <td style="width: 25%;">交货日期:</td>
<td style="width: 25%;" colspan="3">&nbsp;</td> <td style="width: 25%;" colspan="3">
<p id="deliveryDate"></p>
</td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;" rowspan="3">交货地点:</td> <td style="width: 25%;" rowspan="3">交货地点:</td>
<td style="width: 25%;">地址:</td> <td style="width: 25%;">地址:</td>
<td style="width: 25%;" colspan="2">&nbsp;</td> <td style="width: 25%;" colspan="2"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">联系人:</td> <td style="width: 25%;">联系人:</td>
<td style="width: 25%;" colspan="2">&nbsp;</td> <td style="width: 25%;" colspan="2"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">联系电话:</td> <td style="width: 25%;">联系电话:</td>
<td style="width: 25%;" colspan="2">&nbsp;</td> <td style="width: 25%;" colspan="2"></td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">开票信息:</td> <td style="width: 25%;">开票信息:</td>
<td style="width: 25%;" colspan="3"> <td style="width: 25%;" colspan="3">
<p id="invoiceInfo">&nbsp;</p> <p id="invoiceInfo"></p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">支付日期:</td> <td style="width: 25%;">支付日期:</td>
<td style="width: 25%;" colspan="3"> <td style="width: 25%;" colspan="3">
<p id="payDate">&nbsp;</p> <p id="payDate"></p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">支付方式:</td> <td style="width: 25%;">支付方式:</td>
<td style="width: 25%;" colspan="3"> <td style="width: 25%;" colspan="3">
<p id="payMethod">&nbsp;</p> <p id="payMethod"></p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="width: 25%;">其他说明:</td> <td style="width: 25%;">其他说明:</td>
<td style="width: 25%;" colspan="3"> <td style="width: 25%;" colspan="3">
<p id="otherInfo">&nbsp;</p> <p id="otherInfo"></p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -381,15 +410,15 @@ export default {
<p>买方:</p> <p>买方:</p>
<p>(盖章)</p> <p>(盖章)</p>
<p>授权代表人_______________</p> <p>授权代表人_______________</p>
<p>&nbsp;</p> <p></p>
<p>&nbsp;</p> <p></p>
</td> </td>
<td style="width: 50%;"> <td style="width: 50%;">
<p>卖方:</p> <p>卖方:</p>
<p>(盖章)</p> <p>(盖章)</p>
<p>授权代表人_______________&nbsp;</p> <p>授权代表人_______________</p>
<p>&nbsp;</p> <p></p>
<p>&nbsp;</p> <p></p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -398,6 +427,7 @@ export default {
<hr /> <hr />
<p style="text-align: center;"> <p style="text-align: center;">
<strong>明细表</strong> <strong>明细表</strong>
(<strong id="hasTax"></strong>)
</p> </p>
<table style="border-collapse: collapse; width: 100%;" border="1"> <table style="border-collapse: collapse; width: 100%;" border="1">
<tbody id="tbody"> <tbody id="tbody">
@@ -415,86 +445,79 @@ export default {
</tbody> </tbody>
</table> </table>
<br> <br>
<span>未税合计:</span><span id="untaxTotal"></span><br><br> <span>未税合计:</span><span id="untaxTotal"></span><span>元</span><br><br>
<span>税额:</span><span id="tax"></span><br><br> <span>税额:</span><span id="tax"></span><br><br>
<span>含税总价(税率17%</span><span id="taxTotal"></span><br><br> <span>含税总价(税率<span id="taxRate"></span></span><span id="taxTotal"></span><span>元</span><br><br>
<span>优惠后含税总价:</span><span class="actualTotal"></span><br><br> <span>优惠后含税总价:</span><span class="actualTotal"></span><span>元</span><br><br>
` `
}, },
editContract() { // 选择一个询价单,整成合同明细 editContract() { // 选择一个询价单,整成合同明细
this.$refs.tinymce.destroyTinymce() if (this.contractNumValue) {
const opts = { this.$refs.tinymce.destroyTinymce()
errorCorrectionLevel: 'H', document.getElementById('contractName') ? document.getElementById('contractName').innerHTML = this.contractName : ''
type: 'image/jpeg', document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
rendererOpts: { document.getElementById('supplierName') ? document.getElementById('supplierName').innerHTML = this.supplierName : ''
quality: 0.3 document.getElementById('supplierAddress') ? document.getElementById('supplierAddress').innerHTML = this.supplierAddress : ''
document.getElementById('supplierPhone') ? document.getElementById('supplierPhone').innerHTML = this.supplierPhone : ''
document.getElementById('supplierFax') ? document.getElementById('supplierFax').innerHTML = this.supplierFax : ''
document.getElementById('payDate') ? document.getElementById('payDate').innerHTML = this.payDate : ''
document.getElementById('payMethod') ? document.getElementById('payMethod').innerHTML = this.payMethod : ''
document.getElementById('invoiceInfo') ? document.getElementById('invoiceInfo').innerHTML = this.invoiceInfo : ''
document.getElementById('deliveryDate') ? document.getElementById('deliveryDate').innerHTML = this.deliveryDate : ''
document.getElementById('otherInfo') ? document.getElementById('otherInfo').innerHTML = this.otherInfo : ''
document.getElementById('hasTax') ? document.getElementById('hasTax').innerHTML = this.hasTax : ''
document.getElementById('taxRate') ? document.getElementById('taxRate').innerHTML = this.taxRate * 100 + '%' : ''
// 明细表
// 移出旧数据
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('tbody')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
} }
} // 放入新数据
const str = this.contractNumValue.toString() const tr = []
QRCode.toDataURL(str, opts, function(err, url) { for (let i = 0; i < this.tableData1.length; i++) {
if (err) throw err tr[i] = document.createElement('tr')
if (document.getElementById('qrCode')) { tr[i].setAttribute('class', 'tableData')
const img = document.getElementById('qrCode') tr[i].innerHTML = '<td style="width: 5%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 5%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 12%;"></td><td style="width: 10%;"></td>'
img.src = url document.getElementById('tableHead') ? document.getElementById('tableHead').after(tr[i]) : ''
} }
}) this.actualTotal = 0
this.supplierAddress = '无锡市新区新畅南路3号' this.untaxTotal = 0
document.getElementById('contractName') ? document.getElementById('contractName').innerHTML = this.contractName : '' this.taxTotal = 0
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : '' for (let j = 0; j < this.tableData1.length; j++) {
document.getElementById('supplierName') ? document.getElementById('supplierName').innerHTML = this.supplierName : '' this.actualTotal += Number(this.tableData1[j].含税总额)
document.getElementById('supplierAddress') ? document.getElementById('supplierAddress').innerHTML = this.supplierAddress : '' this.untaxTotal += Number(this.tableData1[j].未税总额)
document.getElementById('payDate') ? document.getElementById('payDate').innerHTML = this.payDate : '' this.taxTotal += Number(this.tableData1[j].含税总额)
document.getElementById('payMethod') ? document.getElementById('payMethod').innerHTML = this.payMethod : '' if (document.getElementsByClassName('tableData')[j]) {
document.getElementById('invoiceInfo') ? document.getElementById('invoiceInfo').innerHTML = this.invoiceInfo : '' document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementById('otherInfo') ? document.getElementById('otherInfo').innerHTML = this.otherInfo : '' document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData1[j].图号
// 明细表 document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData1[j].名称
// 移出旧数据 document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData1[j].规格
const children = document.getElementsByClassName('tableData') document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData1[j].数量
const parent = document.getElementById('tbody') this.hasTax === '含税' ? document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].含税单价 : document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].未税单价
if (children.length !== 0) { document.getElementsByClassName('tableData')[j].children[6].innerHTML = (Number(document.getElementsByClassName('tableData')[j].children[5].innerHTML) * Number(this.tableData1[j].数量)).toFixed(2)
for (let i = children.length - 1; i >= 0; i--) { this.tableData1[j].交货期 ? document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].交货期.split(' ')[0] : document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
parent.removeChild(children[i]) document.getElementsByClassName('tableData')[j].children[8].innerHTML = `备注` + j
}
} }
this.actualTotal = this.actualTotal.toFixed(2)
this.untaxTotal = this.untaxTotal.toFixed(2)
this.taxTotal = this.taxTotal.toFixed(2)
this.tax = (this.taxTotal - this.untaxTotal).toFixed(2)
document.getElementById('untaxTotal') ? document.getElementById('untaxTotal').innerHTML = this.untaxTotal : ''
document.getElementById('tax') ? document.getElementById('tax').innerHTML = this.tax : ''
document.getElementById('taxTotal') ? document.getElementById('taxTotal').innerHTML = this.taxTotal : ''
document.getElementsByClassName('actualTotal') ? document.getElementsByClassName('actualTotal')[0].innerHTML = this.actualTotal : ''
document.getElementsByClassName('actualTotal') ? document.getElementsByClassName('actualTotal')[1].innerHTML = this.actualTotal : ''
document.getElementById('actualTotal_zh') ? document.getElementById('actualTotal_zh').innerHTML = this.actualTotal_zh : ''
this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
this.$refs.tinymce.initTinymce()
} else {
this.$message.warning('请先选择合同进行调整')
} }
// 放入新数据
const tr = []
for (let i = 0; i < this.tableData1.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td style="width: 5%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 5%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 12%;"></td><td style="width: 10%;"></td>'
document.getElementById('tableHead') ? document.getElementById('tableHead').after(tr[i]) : ''
}
this.actualTotal = 0
this.untaxTotal = 0
this.taxTotal = 0
for (let j = 0; j < this.tableData1.length; j++) {
this.actualTotal += Number(this.tableData1[j].含税总额)
this.untaxTotal += Number(this.tableData1[j].未税总额)
this.taxTotal += Number(this.tableData1[j].含税总额)
if (document.getElementsByClassName('tableData')[j]) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData1[j].图号
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData1[j].名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData1[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData1[j].数量
this.haTtax === '含税' ? document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].含税单价 : document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].未税单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = Number(document.getElementsByClassName('tableData')[j].children[5].innerHTML) * Number(this.tableData1[j].数量)
this.tableData1[j].交货期 ? document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].交货期.split(' ')[0] : document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
document.getElementsByClassName('tableData')[j].children[8].innerHTML = `备注` + j
}
}
this.actualTotal = this.actualTotal.toFixed(2)
this.actualTotal = this.untaxTotal.toFixed(2)
this.actualTotal = this.taxTotal.toFixed(2)
this.tax = (this.taxTotal - this.untaxTotal).toFixed(2)
document.getElementById('untaxTotal') ? document.getElementById('untaxTotal').innerHTML = this.untaxTotal : ''
document.getElementById('tax') ? document.getElementById('tax').innerHTML = this.tax : ''
document.getElementById('taxTotal') ? document.getElementById('taxTotal').innerHTML = this.taxTotal : ''
document.getElementsByClassName('actualTotal') ? document.getElementsByClassName('actualTotal')[0].innerHTML = this.actualTotal : ''
document.getElementsByClassName('actualTotal') ? document.getElementsByClassName('actualTotal')[1].innerHTML = this.actualTotal : ''
document.getElementById('actualTotal_zh') ? document.getElementById('actualTotal_zh').innerHTML = this.actualTotal_zh : ''
this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
this.$refs.tinymce.initTinymce()
}, },
demo2() { demo2() {
this.content = `demo2` this.content = `demo2`
@@ -506,14 +529,35 @@ export default {
this.content = `自定义` this.content = `自定义`
}, },
generateContract() { // 生成采购合同 generateContract() { // 生成采购合同
this.content = this.contentNew // 更新tinymce中的东西到html中后续会用到 this.content = this.contentNew.replace(/&nbsp;/g, '')
this.content = this.content.replace(/\n/g, '')
this.content = this.content.replace(/==/g, '= =') // 更新tinymce中的东西到html中后续会用到
this.组件零件流水号组 = []
this.组件零件基本件流水号组 = []
this.数量组 = []
this.单价组 = []
this.交货期组 = []
this.hasTax === '含税' ? this.单价是否含税 = 1 : this.单价是否含税 = 0
for (let i = 0; i < this.tableData1.length; i++) {
this.组件零件流水号组.push(this.tableData1[i].组件零件流水号)
this.组件零件基本件流水号组.push(this.tableData1[i].组件零件基本件流水号)
this.数量组.push(this.tableData1[i].数量)
this.hasTax === '含税' ? this.单价组.push(this.tableData1[i].含税单价) : this.单价组.push(this.tableData1[i].未税单价)
this.交货期组.push(this.tableData1[i].交货期)
}
if (this.contractNumValue) { if (this.contractNumValue) {
this.$confirm('此操作将生成采购合同,确认完成编辑?', '提示', { this.$confirm('此操作将生成采购合同,确认完成编辑?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
console.log(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content)
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content).then(response => {
if (response.data[0].result === '1') {
this.$message.success('合同生成成功')
this.reload()
} else { this.$message.error('生成合同失败') }
})
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',

View File

@@ -40,47 +40,57 @@
height="300px" height="300px"
highlight-current-row highlight-current-row
@row-click="searchTable2"> @row-click="searchTable2">
<el-table-column label="采购合同号" align="center" min-width="150"> <el-table-column label="采购合同号" align="center" min-width="130">
<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="150"> <el-table-column label="采购合同名称" align="center" min-width="130">
<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="100"> <el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.预到货时间 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="300">
<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="60">
<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="80"> <el-table-column label="总金额" align="center" min-width="60">
<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="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="100"> <el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button> <el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button>
</template> </template>
@@ -99,53 +109,7 @@
</div> </div>
</el-card> </el-card>
<div style="width:900px;margin: 0 auto"> <div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-card>
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="1" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div> 产品名称型号数量单价品牌</div>
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<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>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="6">运费</td>
<td colspan="1" align="center">{{ freight }}</td>
</tr>
<tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
</tfoot>
</table>
<div id="23"/>
</el-card>
</div>
<el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="370px"> <el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="370px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
@@ -198,7 +162,7 @@ export default {
tableData1: [], tableData1: [],
loading1: false, loading1: false,
dialogVisible3: false, dialogVisible3: false,
returns: [], returns: '',
tableData01: [], tableData01: [],
submitDisable: true, submitDisable: true,
approval: [ approval: [
@@ -258,14 +222,6 @@ export default {
this.supplierName ? this.check4 = 1 : this.check4 = 0 this.supplierName ? this.check4 = 1 : this.check4 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName).then(response => { searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
this.loading1 = false this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].预到货时间 !== null) {
response.data.rows[j].预到货时间 = response.data.rows[j].预到货时间.substring(0, response.data.rows[j].预到货时间.indexOf(' '))
}
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
this.tableData1 = response.data.rows this.tableData1 = response.data.rows
this.total1 = response.data.total this.total1 = response.data.total
}) })
@@ -300,40 +256,9 @@ export default {
this.searchTable1() this.searchTable1()
}, },
searchTable2(row) { searchTable2(row) {
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本
this.TotalAmount = row.总金额
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号) this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => { searchTable2(this.contractValue).then(response => {
this.returns = response.data this.returns = response.data[0].合同内容
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<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])
}
for (let j = 0; j < this.returns.length; 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[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].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[6].innerHTML = response.data[j].金额
}
}) })
} }
} }

View File

@@ -0,0 +1,265 @@
<template>
<div class="app-container">
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input
v-model="supplierName"
placeholder="供应商"
size="small"
clearable
style="width:180px"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table :data="tableData1" size="mini" border style="width: 100%" highlight-current-row @row-click="searchContract">
<el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="合同总额" width="70" align="center">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="本次请款金额" min-width="100" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="请款" min-width="80" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
<el-table-column label="请款付款情况" width="710" align="center">
<template slot-scope="scope">
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
<el-table-column label="取消请款" width="100" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.审批情况流水号!==3"
type="danger"
size="mini"
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
<el-table-column label="次数" min-width="60" align="center" type="index"/>
<el-table-column label="请款金额" width="70" align="center">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款时间" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="审批情况" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.审批情况内容 }}
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.付款情况内容 }}
</template>
</el-table-column>
<el-table-column label="未付款原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
</div>
</template>
<script>
import { initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
import { mapGetters } from 'vuex'
export default {
data() {
return {
tableData11: [],
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
contractNum: [],
contractNumValue: '',
supplierName: '',
tableData1: [],
check1: 0,
check2: 0,
returns: ''
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
value: response.data[i].采购合同流水号
})
}
})
},
searchTable1() { // 查询
this.tableData1 = []
this.returns = ''
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
this.tableData11[j] = []
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
if (response0.data.length === 0) {
this.tableData11[j].push(response0.data)
document.getElementById(j).setAttribute('style', 'display:none')
} else {
for (let i = 0; i < response0.data.length; i++) {
this.tableData11[j].push(response0.data[i])
}
}
})
}
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, '本次应请款', 0)
return v
})
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
requestFund(row) { // 请款
if (row.本次应请款 <= 0) {
this.$message.warning('请输入正确金额')
} else {
const day1 = new Date()
const day2 = day1.getFullYear() + '-' + (day1.getMonth() + 1) + '-' + day1.getDate()
requestFund(row.采购合同流水号, row.本次应请款, day2, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('请款成功')
this.searchTable1()
} else { this.$message.error('请款失败') }
})
}
},
cancelRequestFund(row) { // 取消请款
this.$confirm('确认取消请款吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelRequestFund(row.采购请款流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
searchContract(row) {
searchContract(row.采购合同流水号).then(response => {
this.returns = response.data[0].合同内容
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px!important;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>

View File

@@ -1,16 +1,16 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<span>时间段:</span> <!--<span>时间段:</span>-->
<el-date-picker <!--<el-date-picker-->
v-model="startEndDate" <!--v-model="startEndDate"-->
style="width:250px" <!--style="width:250px"-->
size="small" <!--size="small"-->
type="daterange" <!--type="daterange"-->
value-format="yyyy-MM-dd" <!--value-format="yyyy-MM-dd"-->
format="yyyy-MM-dd" <!--format="yyyy-MM-dd"-->
start-placeholder="开始日期" <!--start-placeholder="开始日期"-->
end-placeholder="结束日期"/> <!--end-placeholder="结束日期"/>-->
<span>合同号:</span> <span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable> <el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option <el-option
@@ -57,48 +57,12 @@
<el-table <el-table
v-loading="loading1" v-loading="loading1"
:data="tableData1" :data="tableData1"
:row-class-name="tableRowClassName"
size="mini" size="mini"
border border
style="width: 100%;max-height: 300px;" style="width: 100%;max-height: 300px;"
height="300px" height="300px"
highlight-current-row highlight-current-row
@row-click="searchTable2"> @row-click="searchTable2">
<el-table-column label="采购合同号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</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">
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag> <el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
@@ -106,6 +70,56 @@
<el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="info" size="small">不通过审批</el-tag> <el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="info" size="small">不通过审批</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购合同号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="未通过原因" align="center" min-width="200"> <el-table-column label="未通过原因" align="center" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未通过原因 }} {{ scope.row.未通过原因 }}
@@ -124,61 +138,11 @@
@current-change="handleCurrentChange1"/> @current-change="handleCurrentChange1"/>
</div> </div>
</el-card> </el-card>
<div style="margin:5px;float: left"> <div style="margin:5px;float: left">
<b>二维码</b><br> <b>二维码</b><br>
<img id="img"> <img id="img">
</div> </div>
<div style="width:900px;margin: 0 auto"> <div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-card>
<div id="print" style="width:860px;">
<table id="1" cellspacing="0px" align="center" border width="100%">
<tr style="height: 40px">
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="4" align="center" style="font-weight: bold">产品销售合同</td>
<td colspan="2" rowspan="3" align="center" style="width: 100px"/>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="2" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="2" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div> 产品名称型号数量单价品牌</div>
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<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>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="6">运费</td>
<td colspan="1" align="center">{{ freight }}</td>
</tr>
<tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
</tfoot>
</table>
<div id="23"/>
</div>
</el-card>
</div>
<el-card v-show="searchView"> <el-card v-show="searchView">
<!--将新一般处理页添加至通讯服务器--> <!--将新一般处理页添加至通讯服务器-->
<div>附件图</div> <div>附件图</div>
@@ -233,7 +197,7 @@ export default {
pageSize1: 10, pageSize1: 10,
tableData1: [], tableData1: [],
loading1: false, loading1: false,
returns: [], returns: '',
tableData01: [], tableData01: [],
tableData02: [], tableData02: [],
submitDisable: true, submitDisable: true,
@@ -318,25 +282,10 @@ export default {
} }
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => { searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
this.loading1 = false this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].操作日期 !== null) {
response.data.rows[j].操作日期 = response.data.rows[j].操作日期.substring(0, response.data.rows[j].操作日期.indexOf(' '))
}
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
this.tableData1 = response.data.rows this.tableData1 = response.data.rows
this.total1 = response.data.total this.total1 = response.data.total
}) })
}, },
tableRowClassName({ row, rowIndex }) {
// if (row.审批情况流水号 === '1') {
// return 'adopt'
// } else if (row.审批情况流水号 === '2') {
// return 'NotThrough'
// }
},
handleSizeChange1(val) { handleSizeChange1(val) {
this.pageCurrent1 = 1 this.pageCurrent1 = 1
this.pageSize1 = val this.pageSize1 = val
@@ -348,40 +297,10 @@ export default {
}, },
searchTable2(row) { searchTable2(row) {
this.useqrcode(row.采购合同流水号) this.useqrcode(row.采购合同流水号)
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
this.searchPic() // 显示图片 this.searchPic() // 显示图片
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本
this.TotalAmount = row.总金额
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号) this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => { searchTable2(this.contractValue).then(response => {
this.returns = response.data this.returns = response.data[0].合同内容
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
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>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; 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[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额
}
}) })
} }
} }

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].金额
} }
}) })
} }