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

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

View File

@@ -101,7 +101,7 @@
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
{{ scope.row.零件备注 }}
</template>
</el-table-column>
</el-table>
@@ -275,6 +275,11 @@
{{ scope.row.组号 }}
</template>
</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">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
@@ -329,6 +334,11 @@
{{ scope.row.组号 }}
</template>
</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">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
@@ -380,7 +390,7 @@
</template>
<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'
export default {
inject: ['reload'],
@@ -669,7 +679,7 @@ export default {
this.PartToolNumber[i] = val[i].零件图号
this.Material[i] = val[i].材料
this.NumberOfParts[i] = val[i].零件数量
this.ReMarks[i] = val[i].备注
this.ReMarks[i] = val[i].零件备注
}
} else if (this.PartType === '外购件') {
this.MaterialNum = []
@@ -708,117 +718,141 @@ export default {
purchaseRequisition() {
if (this.RequisitionList !== '') {
if (this.time !== '') {
this.result = 0
if (this.PartType === '基本件') {
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
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 => {
this.result += parseInt(response.data[0].result)
console.log(this.result)
if (this.result === this.BasicPartsNumber.length) {
console.log(1111)
this.$message.success('请购成功')
searchPart(this.groupFloatValue).then(response => {
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]
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
this.result = 0
if (this.PartType === '基本件') {
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
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 => {
this.result += parseInt(response.data[0].result)
console.log(this.result)
if (this.result === this.BasicPartsNumber.length) {
console.log(1111)
this.$message.success('请购成功')
searchPart(this.groupFloatValue).then(response => {
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 if (this.PartType === '外购件') {
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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
searchPart1(this.groupFloatValue, 2).then(response => {
this.tableData2 = response.data
})
searchDetailed(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 if (this.PartType === '外购件') {
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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
searchPart1(this.groupFloatValue, 2).then(response => {
this.tableData2 = response.data
})
searchDetailed(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.tableData5 = response.data
})
}
})
}
} else if (this.PartType === '标准件') {
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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
searchPart1(this.groupFloatValue, 1).then(response => {
this.tableData3 = response.data
})
searchDetailed(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.tableData5 = response.data
})
}
})
}
} else if (this.PartType === '标准件') {
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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
searchPart1(this.groupFloatValue, 1).then(response => {
this.tableData3 = response.data
})
searchDetailed(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.tableData5 = response.data
})
}
})
this.tableData5 = response.data
})
}
})
}
}
} else {
this.$message.warning('请选择零件或物料')
}
} else {
this.$message.warning('请选择计划到货时间')
this.$message.warning('请选择交货期')
}
} else {
this.$message.warning('请先选择请购单')
}
},
PurchasingDepartment() {
this.result = 0
if (this.time !== '') {
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.time, this.MaterialNum[i], this.NumberOfParts[i], this.projectFloatValue, this.machineFloatValue).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
if (this.PartType === '外购件') {
searchPart1(this.groupFloatValue, 2).then(response => {
this.tableData2 = response.data
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
if (this.PartType === '基本件') {
purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => {
if (response.data[0].result !== '0') {
console.log(response.data[0].result)
this.$message.success('请购成功')
searchPart(this.groupFloatValue).then(response => {
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 {
searchPart1(this.groupFloatValue, 1).then(response => {
this.tableData3 = response.data
})
this.$message.success('请购失败')
}
}
})
})
} 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 {
this.$message.warning('请选择计划到货时间')
this.$message.warning('请选择交货期')
}
},
Production() {
this.result = 0
if (this.PartType === '基本件' && this.BasicPartsNumber.length !== 0) {
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
Production(this.groupFloatValue, this.BasicPartsNumber[i], this.projectFloatValue, this.machineFloatValue).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.BasicPartsNumber.length) {
this.$message.success('投产成功')
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
})
} else {
this.$message.error('投产失败')
}
})
}
Production(this.groupFloatValue, this.BasicPartsNumber, this.projectFloatValue, this.machineFloatValue).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('投产成功')
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
})
} else {
this.$message.error('投产失败')
}
})
} else {
this.$message.warning('请选择基本件')
}

View File

@@ -161,7 +161,6 @@ export default {
classificationCode
console.log(this.worksheet[j].M2.v.substring(0, 1))
if (this.worksheet[j].M2.v.substring(0, 1) === '9') {
console.log('哈哈哈哈哈')
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
const res = response.data
if (res[0].Column1 === 0) {
@@ -198,9 +197,6 @@ export default {
} 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 {
this.loading = false
@@ -232,9 +228,13 @@ export default {
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 res = response.data
console.log(res)
if (res[0].result === '0') {
this.$notify.error(`${drawingNum}导入失败`)
}
if (res[0].result === '2') {
this.$notify.error(`${drawingNum}导入重复`)
}
} 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 res = response.data

View File

@@ -544,7 +544,8 @@ export default {
for (let i = 0; i < this.tableDataAll.length; i++) {
const data = this.tableDataAll[i]
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)
if (resp.data[0].result === '0') {
this.err++

View File

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

View File

@@ -487,8 +487,9 @@ export default {
if (this.groupValue.indexOf('MX') > -1) {
for (let i = 0; i < this.tableDataAll.length; i++) {
const data = this.tableDataAll[i]
console.log(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)
if (resp.data[0].result === '0') {
this.err++

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,9 +23,9 @@
{{ 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">
{{ scope.row.付款方式内容 }}
{{ scope.row.付款 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">

View File

@@ -23,9 +23,9 @@
{{ 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">
{{ scope.row.付款方式内容 }}
{{ scope.row.付款 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">

View File

@@ -23,9 +23,9 @@
{{ 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">
{{ scope.row.付款方式内容 }}
{{ scope.row.付款 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">

View File

@@ -51,7 +51,7 @@
</el-table-column>
<el-table-column align="center" label="到票情况" min-width="200px">
<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>
</el-table-column>
</el-table>

View File

@@ -44,9 +44,9 @@
{{ 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">
{{ scope.row.付款方式内容 }}
{{ scope.row.付款 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">

View File

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

View File

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

View File

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