This commit is contained in:
zhangdingyu
2019-03-07 09:40:18 +08:00
21 changed files with 1545 additions and 154 deletions

View File

@@ -171,3 +171,15 @@ export function editInquirySheet(num1, num2, num3) {
}
})
}
// 编辑询价单
export function saveOrder(num1, num2, num3) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单明细_保存数据',
param: `询价单明细流水号组=${num1}&数量组=${num2}&备注组=${num3}`
}
})
}

View File

@@ -32,7 +32,7 @@ export function doneContract(...params) {
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]}`
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

@@ -0,0 +1,111 @@
import request from '@/utils/request'
// 根据条件查发票结算申请单
export function searchTable1(...group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_查询数据',
param: `发票号_check=${group[0]}&发票号=${group[1]}`,
Pagination: group[2] + '&' + group[3]
}
})
}
// 编辑发票结算申请单
export function submitEdit(...group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_修改数据',
param: `发票号=${group[0]}&发票金额=${group[1]}&已付款项=${group[2]}&尚欠金额=${group[3]}&税额=${group[4]}&是否费用类=${group[5]}&备注=${group[6]}&发票结算申请单流水号=${group[7]}`
}
})
}
// 删除发票结算申请单
export function submitDelete(...group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_删除数据',
param: `发票结算申请单流水号=${group[0]}`
}
})
}
// 提交申请 发票结算申请单
export function submitApply(...group) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单_提交申请',
param: `发票结算申请单流水号=${group[0]}&申请人=${group[1]}`
}
})
}
// 发票结算申请单明细列表
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}`
}
})
}
// 入库单查询
export function searchInboundCard(data1, data2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单查询',
param: '入库单号_check=' + data1 + '&入库单号=' + data2
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
}
})
}
// 发票结算申请单明细增加
export function addTable2(data, group) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单明细_增加数据',
param: '发票结算申请单流水号=' + data + '&采购入库单流水号组=' + group
}
})
}
// 发票结算申请单明细删除
export function deleteTable2(group) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单明细_删除数据',
param: '发票结算申请单明细流水号组=' + group
}
})
}

View File

@@ -0,0 +1,51 @@
import request from '@/utils/request'
// 根据条件查发票结算申请单
export function searchTable1(...group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_查询数据',
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1`,
Pagination: group[3] + '&' + group[4]
}
})
}
// 发票结算申请单明细列表
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}`
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
}
})
}
// 执行审批
export function excuteApprove(...data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_执行审批',
param: `发票结算申请单流水号=${data[0]}&人员编号=${data[1]}&审批代号=${data[2]}`
}
})
}

View File

@@ -82,7 +82,7 @@ export function addData(MaterialVariety, MaterialName, FullNameOfMaterial, Mater
data: {
type: '2',
name: '库存管理_物料主文件_基本_增加数据',
param: '物料品种流水号=' + MaterialVariety + '&物料名称=' + MaterialName + '&物料全名=' + FullNameOfMaterial + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
param: '物料品种流水号=' + MaterialVariety + '&物料名称\\=' + MaterialName + '&物料全名\\=' + FullNameOfMaterial + '&物料规格\\=' + MaterialSpecification + '&物料型号\\=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
}
})
}
@@ -93,7 +93,7 @@ export function editData(MaterialValue, MaterialVariety, MaterialName, FullNameO
data: {
type: '2',
name: '库存管理_物料主文件_基本_修改数据',
param: '物料流水号=' + MaterialValue + '&物料品种流水号=' + MaterialVariety + '&物料名称=' + MaterialName + '&物料全名=' + FullNameOfMaterial + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
param: '物料流水号=' + MaterialValue + '&物料品种流水号=' + MaterialVariety + '&物料名称\\=' + MaterialName + '&物料全名\\=' + FullNameOfMaterial + '&物料规格\\=' + MaterialSpecification + '&物料型号\\=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
}
})
}

View File

@@ -122,15 +122,27 @@ export function deleteMateriel(num) {
}
})
}
// 保存离线合同
export function saveOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_保存合同',
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}`
}
})
}
// 生成离线合同
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup) {
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_生成合同',
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}`
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}`
}
})
}

View File

@@ -55,7 +55,7 @@ export function cancelRequestFund(num) {
url: '',
method: 'post',
data: {
type: '2',
type: '1',
name: '采购管理_离线合同_请款_删除数据',
param: `离线合同请款流水号=${num}`
}

View File

@@ -65,7 +65,7 @@ export function cancelRequestFund(num1) {
url: '',
method: 'post',
data: {
type: '2',
type: '1',
name: '采购管理_采购请款表_删除数据',
param: '采购请款流水号=' + num1
}

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="1551691047116" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2055" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M864 128h-704a128 128 0 0 0-128 128v512a128 128 0 0 0 128 128h704a128 128 0 0 0 128-128V256a128 128 0 0 0-128-128z m64 640a64 64 0 0 1-64 64h-704a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64h704a64 64 0 0 1 64 64v512z" fill="" p-id="2056"></path><path d="M512 512a32 32 0 0 0 0-64H400.32l-1.024-1.088 102.4-102.4a33.472 33.472 0 0 0-47.296-47.296l-102.4 102.4-102.4-102.4a33.472 33.472 0 0 0-47.296 47.296l102.4 102.4L303.68 448H192a32 32 0 0 0 0 64h128v64H192a32 32 0 0 0 0 64h128v96a32 32 0 0 0 64 0V640h128a32 32 0 0 0 0-64H384V512h128zM832 480h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 608h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 352h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64z" fill="" p-id="2057"></path></svg>

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="1551698748547" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2829" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M896 928H128c-17.6 0-32-14.4-32-32s14.4-32 32-32h768c17.6 0 32 14.4 32 32s-14.4 32-32 32z m0-128H128c-17.6 0-32-14.4-32-32V608c0-52.8 43.2-96 96-96h204.8c-6.4-38.4-25.6-75.2-52.8-107.2-36.8-41.6-56-94.4-56-148.8 0-60.8 24-118.4 68.8-161.6 44.8-43.2 102.4-64 164.8-62.4C636.8 36.8 734.4 136 736 251.2c1.6 57.6-20.8 113.6-59.2 156.8-27.2 28.8-43.2 64-49.6 104H832c52.8 0 96 43.2 96 96v160c0 17.6-14.4 32-32 32z m-736-64h704V608c0-17.6-14.4-32-32-32H592c-17.6 0-32-14.4-32-32 0-67.2 24-131.2 68.8-179.2 28.8-30.4 43.2-70.4 43.2-112-1.6-83.2-70.4-153.6-153.6-156.8-44.8-1.6-86.4 14.4-116.8 44.8-32 30.4-49.6 72-49.6 115.2 0 38.4 14.4 76.8 40 105.6 46.4 52.8 72 116.8 72 182.4 0 17.6-14.4 32-32 32H192c-17.6 0-32 14.4-32 32v128z" p-id="2830"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -26,8 +26,8 @@
:data="tableData11"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 300px;"
height="300px"
style="width: 100%;max-height: 600px;"
height="600px"
size="mini"
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/>
@@ -48,11 +48,21 @@
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="150">
<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">
<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.物料类别 }}
@@ -130,8 +140,8 @@
:data="tableData12"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 300px;"
height="300px"
style="width: 100%;max-height: 600px;"
height="600px"
size="mini"
@selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/>
@@ -152,11 +162,21 @@
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="150">
<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">
<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.零件图号 }}
@@ -260,11 +280,10 @@
{{ scope.row.电子信箱 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="editInquirySheet(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteInquirySheet(scope.row)">删除</el-button>
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportInquirySheet(scope.row)">导出</el-button>
</template>
</el-table-column>
</el-table>
@@ -278,33 +297,55 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button type="warning" size="mini" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
<el-button type="success" size="mini" style="float: right" @click="saveOrder()">保存</el-button>
</div>
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="图号" align="center" min-width="200">
<el-table v-loading="" :data="tableData3" border style="max-height: 500px;" height="500px" size="mini">
<el-table-column label="图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="150">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</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.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="90">
<el-table-column label="技术下达数量" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.数量 }}
{{ scope.row.技术下达数量 }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="150">
<el-table-column label="实际采购数量" align="center" width="110">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="询价备注" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="120">
<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="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="outInquirySheet(scope.row)">移出</el-button>
@@ -523,7 +564,7 @@
<script>
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange } from '@/api/PurchasingCenter/CreateInquirySheet'
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
import { exportExcelMethod } from './exportExcel'
@@ -613,7 +654,9 @@ export default {
materialNewValue: '',
groupPartNumValue: '', // 组件零件流水号
standardAndPurchaseValue: '', // 标准件和外购件流水号
title2: ''
title2: '',
orderExport: '',
supplierExport: ''
}
},
computed: {
@@ -629,6 +672,21 @@ export default {
this.searchTable2() // 查表2
},
methods: {
saveOrder() { // 保存询价单
const orderNumGroup = []
const numGroup = []
const remarkGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
orderNumGroup.push(this.tableData3[i].询价单明细流水号)
numGroup.push(this.tableData3[i].数量)
remarkGroup.push(this.tableData3[i].备注)
}
saveOrder(orderNumGroup, numGroup, remarkGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功')
} else { this.$message.error('保存失败') }
})
},
selectable(row, index) { // 控制某行是否可选
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) === 1 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
},
@@ -791,38 +849,43 @@ export default {
}
})
},
exportInquirySheet(row) { // 导出询价单
this.$confirm('确认导出询价单' + row.询价单编号 + '?', '提示', {
exportInquirySheet() { // 导出询价单
this.$confirm('确认导出询价单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const children = document.getElementsByClassName('tableData')
const parent = document.getElementsByClassName('inquirySheet')[0]
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
if (this.tableData3.length === 0 && !this.supplierExport) {
this.$message.error('请选择正确的询价单导出')
} else {
const children = document.getElementsByClassName('tableData')
const parent = document.getElementsByClassName('inquirySheet')[0]
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
let length = 0
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
document.getElementById('tablehead').after(tr[i])
}
for (let j = 0; j < this.tableData3.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData3[j].物料型号 || this.tableData3[j].零件图号
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料名称 || this.tableData3[j].零件名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料规格 || this.tableData3[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].备注
}
document.getElementById('inquirySheetNum').innerHTML = this.orderExport
document.getElementById('supplier').innerHTML = this.supplierExport
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
}
const tr = []
let length = 0
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
document.getElementById('tablehead').after(tr[i])
}
for (let j = 0; j < this.tableData3.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData3[j].物料型号 || this.tableData3[j].零件图号
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料名称 || this.tableData3[j].零件名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料规格 || this.tableData3[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
}
document.getElementById('inquirySheetNum').innerHTML = row.询价单编号
document.getElementById('supplier').innerHTML = row.供应商名称
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
}).catch(res => {
console.log(res)
this.$message({
@@ -981,7 +1044,10 @@ export default {
searchTable3(row) { // 查询该询价单中的物料和零件
this.tableData3 = []
this.inquirySheetFlowNum = row.询价单流水号
this.supplierExport = row.供应商名称
this.orderExport = row.询价单编号
searchSheetDetail(row.询价单流水号).then(response => {
console.log(response.data)
this.tableData3 = response.data
})
},

View File

@@ -75,7 +75,7 @@
</el-form>
<el-table :data="tableData1" border style="margin: 10px 0;max-height: 300px;" height="300px" size="mini" show-summary>
<el-table-column label="序号" align="center" width="50" type="index"/>
<el-table-column label="交货期" align="center" min-width="130">
<el-table-column label="交货期" align="center" width="150">
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.交货期"
@@ -83,7 +83,7 @@
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 130px"/>
style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="150">
@@ -91,7 +91,7 @@
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="150">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
@@ -101,20 +101,20 @@
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<el-table-column label="数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" min-width="100">
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
<template slot-scope="scope">
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:70px"/>
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%"/>
<span v-show="hasTax!=='未税'"></span>
</template>
</el-table-column>
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" min-width="100">
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
<template slot-scope="scope">
<el-input v-show="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:70px"/>
<el-input v-show="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%"/>
<span v-show="hasTax!=='含税'"></span>
</template>
</el-table-column>
@@ -136,11 +136,11 @@
<el-radio-button label="模板3"/>
<el-radio-button label="自定义"/>
</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>
<span>合同总额</span>
<el-input v-model="actualTotal" size="small" style="width: 100px"/>
<el-button type="primary" size="small" @click="submitTotal()">确定总额</el-button>
<div style="float: right">
<span>合同总额</span>
<el-input v-model="actualTotal" size="small" style="width: 100px"/>
<el-button type="primary" size="small" @click="submitTotal()">确定总额</el-button>
<el-button type="success" size="small" @click="generateContract()">递交审批</el-button>
</div>
<hr>
@@ -252,7 +252,6 @@ export default {
searchContractDetail() { // 查询合同明细
this.tableData1 = []
searchSheetContract(this.contractNumValue).then(response => {
console.log(response.data, 111)
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
组件零件流水号: response.data[i].组件零件流水号,
@@ -265,11 +264,11 @@ export default {
未税单价: 0,
未税总额: 0,
含税单价: 0,
含税总额: 0
含税总额: 0,
备注: response.data[i].备注
})
}
})
console.log(this.tableData1, 222)
},
demoChange() { // 模板change
switch (this.demoRadio) {
@@ -289,9 +288,9 @@ export default {
},
demo1() { // 选择合同模板1
this.content = `
<h1 style="text-align: center;">
<h2 style="text-align: center;">
<strong>采购合同</strong>
</h1>
</h2>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
@@ -360,9 +359,7 @@ export default {
</tr>
<tr>
<td style="width: 25%;">交货日期:</td>
<td style="width: 25%;" colspan="3">
<p id="deliveryDate"></p>
</td>
<td id="deliveryDate" style="width: 25%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;" rowspan="3">交货地点:</td>
@@ -379,27 +376,19 @@ export default {
</tr>
<tr>
<td style="width: 25%;">开票信息:</td>
<td style="width: 25%;" colspan="3">
<p id="invoiceInfo"></p>
</td>
<td id="invoiceInfo" style="width: 25%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">支付日期:</td>
<td style="width: 25%;" colspan="3">
<p id="payDate"></p>
</td>
<td id="payDate" style="width: 25%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">支付方式:</td>
<td style="width: 25%;" colspan="3">
<p id="payMethod"></p>
</td>
<td id="payMethod" style="width: 25%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">其他说明:</td>
<td style="width: 25%;" colspan="3">
<p id="otherInfo"></p>
</td>
<td id="otherInfo" style="width: 25%;" colspan="3"></td>
</tr>
</tbody>
</table>
@@ -410,15 +399,11 @@ export default {
<p>买方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<p></p>
<p></p>
</td>
<td style="width: 50%;">
<p>卖方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<p></p>
<p></p>
</td>
</tr>
</tbody>
@@ -432,15 +417,17 @@ export default {
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody id="tbody">
<tr id="tableHead">
<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>
<td>序号</td>
<td>产品名称</td>
<td>产品规格型号</td>
<td>图号</td>
<td>名称</td>
<td>规格型号</td>
<td>数量</td>
<td >单价</td>
<td>合计</td>
<td>交货时间</td>
<td>备注</td>
</tr>
</tbody>
</table>
@@ -481,7 +468,7 @@ export default {
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>'
tr[i].innerHTML = '<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>'
document.getElementById('tableHead') ? document.getElementById('tableHead').after(tr[i]) : ''
}
this.actualTotal = 0
@@ -493,14 +480,14 @@ export default {
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.hasTax === '含税' ? 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].数量)).toFixed(2)
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
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData1[j].图号
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData1[j].名称
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].规格
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData1[j].数量
this.hasTax === '含税' ? document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].含税单价 : document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].未税单价
document.getElementsByClassName('tableData')[j].children[8].innerHTML = (Number(document.getElementsByClassName('tableData')[j].children[7].innerHTML) * Number(this.tableData1[j].数量)).toFixed(2)
this.tableData1[j].交货期 ? document.getElementsByClassName('tableData')[j].children[9].innerHTML = this.tableData1[j].交货期.split(' ')[0] : document.getElementsByClassName('tableData')[j].children[9].innerHTML = ''
document.getElementsByClassName('tableData')[j].children[10].innerHTML = this.tableData1[j].备注
}
}
this.actualTotal = this.actualTotal.toFixed(2)

View File

@@ -0,0 +1,754 @@
<template>
<div class="app-container">
<el-card>
<span>发票号:</span>
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
<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-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
</el-card>
<el-card>
<h4 style="margin-top: 5px">发票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 400px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-col :span="6">
<viewer>
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
</viewer>
</el-col>
<el-col :span="6">
<el-form-item label="已付款项">
<span>{{ scope.row.已付款项 }}</span>
</el-form-item><br>
<el-form-item label="尚欠金额">
<span>{{ scope.row.尚欠金额 }}</span>
</el-form-item><br>
<el-form-item label="备注">
<span>{{ scope.row.备注 }}</span>
</el-form-item><br>
</el-col>
<el-col :span="6">
<el-form-item label="是否费用类发票">
<span>{{ scope.row.是否费用类 }}</span>
</el-form-item><br>
<el-form-item label="税额">
<span>{{ scope.row.税额 }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="发票号" align="center" min-width="90">
<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="60">
<template slot-scope="scope">
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="采购审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="生产审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="danger" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)">删除</el-button>
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
</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>
<el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreOrder()">追加入库单</el-button>
<el-button :disabled="group2.length === 0" type="danger" size="small" icon="el-icon-delete" style="margin-left:10px" @click="deleteTable2()">移除入库单</el-button>
<el-table ref="multipleTable" :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3" @selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="35"/>
<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">
<template slot-scope="scope">
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
</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">
<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">
<template slot-scope="scope">
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
</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">
<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">
<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">
<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>
<h4>采购入库单明细</h4>
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<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">
<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="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<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" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="650px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="90px">
<el-row>
<el-col :span="12">
<el-form-item label="发票号" prop="invoiceNum">
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票金额" prop="money">
<el-input v-model="form1.money" size="small" placeholder="发票金额"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="已付款项">
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="尚欠金额">
<el-input v-model="form1.unpaid" size="small" placeholder="尚欠金额"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="税额">
<el-input v-model="form1.tax" size="small" placeholder="税额"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否费用类">
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" placeholder="备注" style="width: 500px"/>
</el-form-item>
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
<el-upload
id="invoiceScan"
ref="upload"
:auto-upload="false"
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-if="title1 === '创建发票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="800px">
<span>入库单号</span>
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="searchInboundCard()">查询</el-button>
<el-table ref="multipleTable" :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="35"/>
<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" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
</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">
<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">
<template slot-scope="scope">
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
</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="70">
<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="80">
<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>
<el-table :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<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">
<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="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<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" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button :disabled="group1.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchInboundCard, searchInboundCardDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan, readFile } from '@/utils/request'
import request from '@/utils/request'
export default {
name: '', // 发票结算申请
data() {
return {
invoiceNum: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
tableData1: [],
applyOrderNum: '',
invoiceNumber: '',
title2: '',
dialogVisible2: false,
tableData2: [],
tableData3: [],
dialogVisible1: false,
title1: '',
form1: {
invoiceNum: '',
money: '',
paid: '',
unpaid: '',
tax: '',
isCost: '',
remark: '',
applyOrderNum: ''
},
rules1: {
invoiceNum: [
{ required: true, message: '请输入发票号' }
],
money: [
{ required: true, message: '请输入开票金额' }
]
},
upload: uploadInvoiceScan,
limit: 1,
tableData01: [],
tableData02: [],
inboundCardNumber: '', // 入库单号
group1: [], // 入库单流水号组
group2: [] // 发票结算申请单明细流水号组
}
},
computed: {
...mapGetters([
'sidebar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {},
createOrder() {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.invoiceNum = ''
this.form1.money = ''
this.form1.paid = ''
this.form1.unpaid = ''
this.form1.tax = ''
this.form1.isCost = ''
this.form1.remark = ''
this.title1 = '创建发票结算申请单'
this.dialogVisible1 = true
},
searchTable1() {
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
searchTable1(this.check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')
return v
})
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
}
this.total1 = response.data.total
})
},
handleEdit(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.invoiceNum = row.发票号
this.form1.money = row.发票金额
this.form1.paid = row.已付款项
this.form1.unpaid = row.尚欠金额
this.form1.tax = row.税额
this.form1.isCost = row.是否费用类
this.form1.remark = row.备注
this.form1.applyOrderNum = row.发票结算申请单流水号
this.title1 = '编辑发票结算申请单'
this.dialogVisible1 = true
},
handleDelete(row) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
submitDelete(row.发票结算申请单流水号).then(response => {
if (response.data[0].result === '删除成功') {
this.$message.success('删除成功')
this.searchTable1()
} else if (response.data[0].result === '删除失败') {
this.$message.error('已提交申请,删除失败')
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
async searchPic(row, i) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
}
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
submitApply(row) {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.tableData2.length === 0) {
this.$message.warning('入库单为空')
} else {
submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('提交成功')
this.searchTable1()
} else { this.$message.error('提交失败') }
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
searchInboundCard() {
let check
this.inboundCardNumber ? check = 1 : check = 0
this.tableData01 = []
searchInboundCard(check, this.inboundCardNumber).then(response => {
console.log(response.data)
this.tableData01 = response.data
})
},
searchTable2(row) {
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
searchTable3(row) {
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData3 = response.data
})
},
beforeUpload(file) { // 上船前检测
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
if (!isLt4M) {
this.$message.error('上传头像图片大小不能超过 4MB!')
}
return isJPG && isLt4M
},
uploadSuccess(res) { // 上传成功回调
if (res[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
this.$refs.upload.clearFiles()
} else {
this.$message.error('增加失败')
}
},
warningExceed() {
this.$message.error('仅可上传一张发票')
},
addInStoreOrder() {
if (this.applyOrderNum) {
this.title2 = '追加入库单'
this.dialogVisible2 = true
} else {
this.$message.error('请选择发票!')
}
},
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
return false
}
})
},
submitEdit() { // 提交编辑
this.$refs['form1'].validate((valid) => {
if (valid) {
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
if (response.data[0].result === '修改成功') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else if (response.data[0].result === '修改失败') {
this.$message.error('已提交申请,编辑失败')
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
searchTable02(row) {
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData02 = response.data
})
},
handleSelectionChange(val) {
this.group1 = val
},
submitAdd2() { // 追加入库单
if (this.group1.length === 0) {
this.$message.warning('请选择入库单')
} else {
const group = []
for (let i = 0; i < this.group1.length; i++) {
group.push(this.group1[i].采购入库单流水号)
}
addTable2(this.applyOrderNum, group).then(response => {
if (response.data[0].result === '1') {
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('追加失败') }
})
}
},
handleSelectionChange2(val) {
this.group2 = val
},
deleteTable2() { // 移除入库单
if (this.group2.length === 0) {
this.$message.warning('请选择入库单')
} else {
this.$confirm('此操作将移除入库单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const group = []
for (let i = 0; i < this.group2.length; i++) {
group.push(this.group2[i].发票结算申请单明细流水号)
}
deleteTable2(group).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('移除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
#expandTable .el-form-item{
margin: 0;
}
</style>

View File

@@ -0,0 +1,361 @@
<template>
<div class="app-container">
<el-card>
<span>申请时间:</span>
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/>&nbsp;~
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
<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>
<h4 style="margin-top: 5px">发票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-col :span="6">
<viewer>
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
</viewer>
</el-col>
<el-col :span="6">
<el-form-item label="已付款项">
<span>{{ scope.row.已付款项 }}</span>
</el-form-item><br>
<el-form-item label="尚欠金额">
<span>{{ scope.row.尚欠金额 }}</span>
</el-form-item><br>
<el-form-item label="备注">
<span>{{ scope.row.备注 }}</span>
</el-form-item><br>
</el-col>
<el-col :span="6">
<el-form-item label="是否费用类发票">
<span>{{ scope.row.是否费用类 }}</span>
</el-form-item><br>
<el-form-item label="税额">
<span>{{ scope.row.税额 }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="发票号" align="center" min-width="90">
<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="60">
<template slot-scope="scope">
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="采购审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="生产审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
</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>
<el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3">
<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">
<template slot-scope="scope">
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
</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">
<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">
<template slot-scope="scope">
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
</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">
<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">
<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">
<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>
<h4>采购入库单明细</h4>
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<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">
<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="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<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" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { searchTable1, searchTable2, searchInboundCardDetail, excuteApprove } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { mapGetters } from 'vuex'
import { readFile } from '@/utils/request'
import request from '@/utils/request'
export default {
name: '', // 发票结算审批
data() {
return {
date1: '',
date2: '',
tableData1: [],
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
invoiceNumber: '',
tableData2: [],
tableData3: []
}
},
computed: {
...mapGetters([
'token',
'sidebar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
console.log(this.token)
},
searchTable1() {
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')
return v
})
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
}
this.total1 = response.data.total
})
},
async searchPic(row, i) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
}
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
excuteApprove(row) {
this.$confirm('确认审批签字?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
if (response.data[0].result === '审批成功') {
this.$message.success('审批成功')
this.searchTable1()
} else if (response.data[0].result === '已完成审批') {
this.$message.warning('已完成审批,不可重复审批')
} else { this.$message.error('审批失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消审批'
})
})
},
searchTable2(row) {
console.log(row)
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
searchTable3(row) {
console.log(row)
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData3 = response.data
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
#expandTable .el-form-item{
margin: 0;
}
</style>

View File

@@ -129,7 +129,7 @@
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
</div>
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="460px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column type="expand" fixed="left">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
@@ -176,11 +176,11 @@
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<el-table-column label="操作" align="center" width="240" fixed="right">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)"/>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)"/>
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportExcel(scope.row)"/>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" @click="editOfflineContract(scope.row)">编辑</el-button>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" @click="deleteOfflineContract(scope.row)">删除</el-button>
<el-button type="warning" size="mini" @click="exportExcel(scope.row)">导出</el-button>
</template>
</el-table-column>
</el-table>
@@ -194,9 +194,10 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button :disabled="disable" type="success" size="mini" style="float:right" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
<el-button type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
<el-button type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 300px;" height="300px" size="mini" show-summary>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
@@ -237,6 +238,16 @@
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope">
<el-input v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="150" prop="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
</template>
</el-table-column>
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
@@ -427,30 +438,31 @@
<tr>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td width="80px">合同名称</td>
<td id="contractName" colspan="3" style="text-align: left;"/>
<td id="contractName" colspan="2" style="text-align: left;"/>
<td width="80px">供应商</td>
<td id="supplier" colspan="4" style="text-align: left;"/>
<td id="supplier" colspan="5" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2">二维码粘贴处</td>
</tr>
<tr>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="3" style="text-align: left;"/>
<td id="contractNum" colspan="2" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="4" style="text-align: left;"/>
<td id="buyer" colspan="5" style="text-align: left;"/>
</tr>
<tr id="tablehead">
<td>序号</td>
<td colspan="2">名称</td>
<td colspan="2">规格</td>
<td>规格</td>
<td colspan="2">型号</td>
<td colspan="2">数量</td>
<td>数量</td>
<td colspan="2">单价</td>
<td colspan="2">合计</td>
<td>备注</td>
<td>交货期</td>
<td colspan="2">备注</td>
</tr>
<tr>
<td>总计</td>
<td colspan="10"/>
<td id="remark" colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
</tr>
@@ -461,7 +473,7 @@
<script>
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
addMateriel, deleteMateriel, saveOfflineContact, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
@@ -893,6 +905,42 @@ export default {
})
})
},
saveContract() {
this.$confirm('确定保存合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.totalPrice = 0
this.partGroup = []
this.numGroup = []
this.priceGroup = []
const dateGroup = []
const remarkGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
this.numGroup.push(this.tableData3[i].数量)
this.priceGroup.push(this.tableData3[i].单价)
dateGroup.push(this.tableData3[i].交货期要求)
remarkGroup.push(this.tableData3[i].备注)
}
saveOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同保存成功')
this.searchTable2()
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('离线合同保存失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
doneOfflineContact() { // 生成离线合同
this.$confirm('确定生成合同?', '提示', {
confirmButtonText: '确定',
@@ -903,13 +951,17 @@ export default {
this.partGroup = []
this.numGroup = []
this.priceGroup = []
const dateGroup = []
const remarkGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
this.numGroup.push(this.tableData3[i].数量)
this.priceGroup.push(this.tableData3[i].单价)
dateGroup.push(this.tableData3[i].交货期要求)
remarkGroup.push(this.tableData3[i].备注)
}
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup).then(response => {
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同生成成功')
this.searchTable2()
@@ -945,7 +997,7 @@ export default {
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/>`
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
document.getElementById('tablehead').after(tr[i])
}
let total = 0
@@ -957,7 +1009,8 @@ export default {
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].数量 * this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注
total += this.tableData3[j].数量 * this.tableData3[j].单价
}
document.getElementById('contractNum').innerHTML = row.离线合同编号
@@ -965,6 +1018,7 @@ export default {
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.采购员
document.getElementById('total').innerHTML = total
document.getElementById('remark').innerHTML = row.离线合同备注
$('#qrCode').html(`<img id="img" style="display: block;margin: 0 auto">`)
this.useqrcode(row.离线合同流水号) // 显示二维码
}).then(() => {

View File

@@ -312,9 +312,11 @@ export default {
}).then(() => {
cancelRequestFund(row.离线合同请款流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('取消失败') }
} else if (response.data[0].result === '已审批') {
this.$message.error('已审批,操作失败')
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({

View File

@@ -95,7 +95,7 @@
<el-progress
:text-inside="true"
:stroke-width="18"
:percentage="100*(Number(scope.row.已付金额))/scope.row.合同总额"
:percentage="(100*(Number(scope.row.已付金额))/scope.row.合同总额).toFixed(2)"
status="success"/>
</template>
</el-table-column>

View File

@@ -18,7 +18,7 @@
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" show-summary stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
<el-table v-loading="" :data="tableData1" show-summary stripe border style="width: 100%;max-height: 600px;" height="600px" size="mini">
<el-table-column label="序号" align="center" width="80" type="index"/>
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">

View File

@@ -352,6 +352,9 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else if (response.data[0].result === '已审批') {
this.searchTable1()
this.$message.error('已审批,操作失败')
} else { this.$message.error('操作失败') }
})
}).catch(() => {

View File

@@ -79,7 +79,7 @@
:data="tableData1"
size="mini"
style="max-height: 600px"
height="400px"
height="600px"
border
stripe
@selection-change="handleSelectionChange1">
@@ -213,7 +213,7 @@
:data="tableData2"
size="mini"
style="max-height: 600px"
height="400px"
height="600px"
border
stripe
@selection-change="handleSelectionChange2">