This commit is contained in:
liushuai
2018-12-12 18:07:53 +08:00
25 changed files with 2052 additions and 519 deletions

View File

@@ -149,14 +149,14 @@ export function editMarketingManager(MarketingManagerId, AdressID) {
}
})
}
export function addCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark) {
export function addCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark, OpeningBank) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '客户关系管理系统_客户_增加数据_MESWORK',
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark + '&开户行=' + OpeningBank
}
})
}
@@ -171,14 +171,14 @@ export function selectAdressOfID(AdressID) {
}
})
}
export function editCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark, ID) {
export function editCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark, ID, OpeningBank) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '客户关系管理系统_客户_修改数据_MESWORK',
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark + '&客户流水号=' + ID
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark + '&客户流水号=' + ID + '&开户行=' + OpeningBank
}
})
}

View File

@@ -0,0 +1,112 @@
import request from '@/utils/request'
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_项目名称_总_查询'
}
})
}
export function searchTableData1(pageCurrent, pageSize, num1, num2, num3, num4, num5, num6, num7, num8) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同资金管理_开票记录_合同信息统计_查询',
param: '合同ID=' + num1 + '=int&人员ID=' + num2 + '=int&项目流水号_check=' + num3 + '=int&营销经理流水号_check=' + num4 + '=int&开始日期_check=' + num5 + '=int&结束日期_check=' + num6 + '=int&开始日期=' + num7 + '=date&结束日期=' + num8 + '=date',
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchTableData2(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_开票记录_查询',
param: '项目流水号=' + num1 + '=int'
}
})
}
export function revisionOfTaxRate(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '合同信息管理_开票记录_税率修改',
param: '项目流水号=' + num1 + '=int&税率=' + num2 + '=float'
}
})
}
export function selectProvince() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '发货管理_省份查询'
}
})
}
export function SelectMarketingManager(code) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '客户关系管理系统_按地区查询_营销经理',
param: '省份流水号=' + code
}
})
}
export function fetchCustomerData(PageCurrent, PageSize, name) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '创建合同_客户信息查询',
param: '客户名称=' + name + '=string',
Pagination: PageCurrent + '&' + PageSize
}
})
}
export function addSubmit(num1, num2, num3, num4, num5) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '合同信息管理_开票记录_增加',
param: '项目流水号=' + num1 + '=int&客户流水号=' + num2 + '=int&开票金额=' + num3 + '=float&开票时间=' + num4 + '=string&备注=' + num5 + '=string'
}
})
}
export function editSubmit(num2, num3, num4, num5, num6) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '合同信息管理_开票记录_修改',
param: '客户流水号=' + num2 + '=int&开票金额=' + num3 + '=float&开票时间=' + num4 + '=string&备注=' + num5 + '=string&开票记录流水号=' + num6 + '=string'
}
})
}
export function delSubmit(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '合同信息管理_开票记录_删除',
param: '开票记录流水号=' + num1 + '=int'
}
})
}

View File

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

View File

@@ -1,27 +1,27 @@
import request from '@/utils/request'
// 查询审核/审批/付款
// 查询审批/付款
export function initApproval(pageCurrent, pageSize, state) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_请款表_查询数据_审核审批',
param: `核_审批_付款状态=${state}`,
name: '采购管理_请款表_查询数据_审批付款',
param: `审批_付款状态=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 执行审核/审批/付款
// 执行审批/付款
export function execApproval(num1, num2, reason, person, state) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_请款表_修改数据_审核审批',
param: `采购请款流水号=${num1}&审核_审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审核_审批_付款状态=${state}`
name: '采购管理_请款表_修改数据_审批付款',
param: `采购请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
}
})
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,98 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_采购部采购_查询数据'
}
})
}
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款情况_查询数据'
}
})
}
// 发票查询
export function searchInvoice(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购发票_查询数据',
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&采购合同流水号_check=${params[4]}&采购合同流水号=${params[5]}`,
Pagination: params[0] + '&' + params[1]
}
})
}
// 发票详情查询
export function searchInvoiceDetail(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购发票_查询数据',
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&采购合同流水号_check=${params[4]}&采购合同流水号=${params[5]}`,
Pagination: params[0] + '&' + params[1]
}
})
}
// 发票增加(后台调用)
export function addInvoice(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购发票_增加数据',
param: `采购合同流水号=${params[0]}&开票金额=${params[1]}&传送人流水号=${params[2]}`
}
})
}
// 发票编辑
export function editInvoice(num1, num2, num3, time1, money, send, receive, remark) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票_修改数据',
param: '发票流水号=' + num1 + '&采购合同流水号=' + num2 + '&发票号=' + num3 + '&开票时间=' + time1 + '&开票金额=' + money + '&传送人=' + send + '&接收人=' + receive + '&备注=' + remark
}
})
}
// 发票删除
export function deleteInvoice(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票_删除数据',
param: '发票流水号=' + num1
}
})
}
// 传送人初始化 采购科改16
export function initSender() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.sfont.cn -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.sfont.cn </metadata>
<g><path d="M288.3,732.6l54.7,60.6c-96.1,59-192.8,114.6-290.2,167c-11.3-19.9-25.5-43.1-42.7-69.6C116.7,840.9,209.4,788.2,288.3,732.6z M25.9,649.1H990v61.6H554.7v131.2c0,78.2-38.8,117.6-116.3,118.3c-35.1,0-78.5-0.3-130.2-1c-2.7-21.9-7-48-12.9-78.5c50.4,4.6,90.8,7,121.3,7c41.7,0,62.6-20.5,62.6-61.6V710.7H25.9V649.1z M96.5,193.9h248.5v-92.4H43.8V39.8h926.3v61.6H667v92.4h249.5v276.3h-69.6v-31.8l-680.8,0v31.8H96.5L96.5,193.9L96.5,193.9z M97.5,512.9h821v61.6h-821V512.9z M166,378.7h178.9V253.5H166V378.7z M416.5,193.9h178.9v-92.4H416.5V193.9z M416.5,378.7h178.9V253.5H416.5V378.7z M648.1,799.2l41.7-61.6C783.3,782.6,881.3,832,984,885.6l-46.7,73.5C833.3,898.2,736.9,844.9,648.1,799.2z M846.9,253.5H667v125.2h179.9L846.9,253.5L846.9,253.5z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 752 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -33,7 +33,7 @@
stripe
tooltip-effect="dark"
style="width: 100%"
height="730"
height="744"
border>
<el-table-column align="center" label="序号" width="80">
<template slot-scope="scope">
@@ -118,7 +118,7 @@
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" width="140px">
<el-table-column label="开票电话" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
@@ -138,6 +138,11 @@
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column label="开户行" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="银行账号" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
@@ -260,8 +265,8 @@
</el-form>
</el-col>
<el-col :span="12">
<el-form-item label="传真:" prop="传真">
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入传真"/>
<el-form-item label="开票电话:" prop="传真">
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入开票电话"/>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -295,9 +300,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="开户行:" prop="开户行">
<el-input v-model="form2.开户行" clearable size="small" style="width:200px" placeholder="请输入开户行"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注:" prop="备注">
<el-input v-model="form2.备注" clearable size="small" style="width:530px" placeholder="请输入备注"/>
<el-input v-model="form2.备注" clearable size="small" style="width:200px" placeholder="请输入备注"/>
</el-form-item>
</el-col>
</el-row>
@@ -363,7 +373,8 @@ export default {
税号: '',
银行账号: '',
信用等级: 1,
备注: ''
备注: '',
开户行: ''
},
rules1: { // 表单验证规则
营销经理: [{ required: true, message: '请选择营销经理', trigger: 'change' }]
@@ -548,6 +559,7 @@ export default {
this.form2.信用等级 = parseInt(row.价值评估流水号)
this.form2.备注 = row.备注
this.c = row.客户流水号
this.form2.开户行 = row.开户行
},
submit2() {
function a() {
@@ -555,9 +567,9 @@ export default {
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
}
if (this.flag1 === 1) {
this.addTable(addCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注], 'form2', a)
this.addTable(addCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.form2.开户行], 'form2', a)
} else {
this.editTable(editCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.c], 'form2', a)
this.editTable(editCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.c, this.form2.开户行], 'form2', a)
}
}
}

View File

@@ -53,7 +53,7 @@
</el-table-column>
<el-table-column align="center" label="合同编号" width="150">
<template slot-scope="scope">
{{ scope.row.合同编号 }}
<el-tag type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="200">
@@ -229,7 +229,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column align="center" label="时间节点" width="180px">
<el-table-column align="center" label="截止时间" width="180px">
<template slot-scope="scope">
<span></span>
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:50px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)"/>
@@ -247,9 +247,9 @@
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.计划付款时间">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划付款时间 }}进行收款距离计划日期还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划付款时间 }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" slot="reference" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&parseInt(scope.row.未收金额)===0" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='未开始'" slot="reference" type="primary" size="small" style="width: 66px">未开始</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='即将拖期'" slot="reference" type="warning" size="small" style="width: 66px">即将拖期</el-tag>
@@ -689,7 +689,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -746,7 +746,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -919,7 +919,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -994,7 +994,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1065,7 +1065,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1179,7 +1179,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1261,7 +1261,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1331,7 +1331,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1412,7 +1412,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1477,7 +1477,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1555,7 +1555,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false

View File

@@ -0,0 +1,655 @@
<template>
<div>
<!--查询条件-->
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" filterable placeholder="项目名称" style="margin-right: 10px" size="small" clearable>
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clearPeople()"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<!--项目表格-->
<el-card>
<el-table
v-loading="listLoading1"
:data="tableData1"
highlight-current-row
style="width: 100%"
height="300"
border
size="mini"
@row-click="fetchTableData2">
<el-table-column align="center" label="合同编号" width="200">
<template slot-scope="scope">
<el-tag type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="200">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="付款方式" width="120">
<template slot-scope="scope">
{{ scope.row.付款方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="120">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总金额(含税)" width="150">
<template slot-scope="scope">
<el-tag v-if="scope.row.合同总金额===''||scope.row.合同总金额===null" slot="reference" size="small" style="width: 80px" type="warning">无收款计划</el-tag>
<el-tag v-else slot="reference" type="success" size="small" style="width: 80px"> {{ scope.row.合同总金额 }} </el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="已到账金额" width="150">
<template slot-scope="scope">
<el-tag v-if="scope.row.已支付===''||scope.row.已支付===null" slot="reference" size="small" style="width: 80px" type="warning">无收款计划</el-tag>
<el-tag v-else slot="reference" type="success" size="small" style="width: 80px"> {{ scope.row.已支付 }} </el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="税率" width="100">
<template slot-scope="scope">
<el-input :disabled="scope.row.是是否禁用税率编辑" v-model="scope.row.税率" size="mini" style="width:70px" placeholder="请填写税率" @click.native="unlockEditor(scope.row)" @blur="lockEditor(scope.row)" @change="revisionOfTaxRate(scope.row)"/>
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-circle-plus-outline"
@click.stop="openAddInvoiceRecordingDialog(); flag = 1">增加记录</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--开票记录-->
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData2"
:summary-method="getSummaries"
show-summary
style="width: 100%"
height="320"
border
size="mini">
<el-table-column
align="center"
label="序号"
type="index"
width="50"/>
<el-table-column align="center" label="发票抬头" width="180">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="纳税人识别号" width="180">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票电话" width="120">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票地址" width="200">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" width="120">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column align="center" label="银行账号" width="160">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额(含税)" width="150">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" width="150">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click.stop="openEditInvoiceRecordingDialog(scope.row); flag = 2">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click.stop="delInvoiceRecordingDialog(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!--营销经理选择-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="30%">
<span>责权省份</span>
<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">
<el-option
v-for="item in Province"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<div style="margin-top: 15px">
<el-table :data="dataPeople" border style="width: 100%; text-align: center;" highlight-current-row @row-click="handleChange">
<el-table-column label="销售经理" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="offName">取消</el-button>
<el-button type="primary" @click="getName">确认</el-button>
</div>
</el-dialog>
<!--增加开票记录-->
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="750px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="客户名称" prop="客户名称">
<el-input v-model="form.客户名称" readonly size="small" placeholder="请双击选择客户" style="width:200px" clearable @dblclick.native="CustomerChange()" @clear="clearCustomer()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票抬头" prop="发票抬头">
<el-input v-model="form.发票抬头" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="税号" prop="税号">
<el-input v-model="form.税号" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票电话" prop="开票电话">
<el-input v-model="form.开票电话" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票地址" prop="开票地址">
<el-input v-model="form.开票地址" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行" prop="开户行">
<el-input v-model="form.开户行" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行账号" prop="银行账号">
<el-input v-model="form.银行账号" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票金额" prop="开票金额">
<el-input v-model="form.开票金额" clearable size="small" placeholder="请输入开票金额" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票时间" prop="开票时间">
<el-date-picker
v-model="form.开票时间"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开票时间"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="备注">
<el-input v-model="form.备注" clearable size="small" placeholder="请输入备注" style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false">取消</el-button>
<el-button type="primary" @click="submit('form')"> </el-button>
</div>
</el-dialog>
<!--客户选择-->
<el-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="600px">
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @row-click="handleCustomerChange">
<el-table-column label="省份" align="center" width="80">
<template slot-scope="scope">
{{ 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="80">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="PageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
<div slot="footer" class="dialog-footer">
<el-button @click="offCustomerChange">取消</el-button>
<el-button type="primary" @click="getCustomerCode"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { initProject, searchTableData1, searchTableData2, revisionOfTaxRate, selectProvince, SelectMarketingManager, fetchCustomerData, addSubmit, editSubmit, delSubmit } from '@/api/MarketingCenter/InvoiceRecord'
export default {
components: {
elInput
},
data() {
return {
projectid: '', // 项目流水号
entryName: [], // 项目名称数组
entryNameValue_check: '', // 项目名称check
entryNameValue: '', // 项目名称
peopleid_check: '', // 销售经理check
MarketingManagerValue: '', // 销售经理
peopleid: '', // 营销经理流水号
startTime_check: '', // 开始时间check
startTime: '', // 开始时间
endTime_check: '', // 结束时间check
endTime: '', // 结束时间
listLoading1: false, // 合同信息表格加载动画
tableData1: [], // 合同信息表格数据
PageCurrent: 1,
PageCurrent1: 1,
PageSize1: 10,
PageSize: 10,
total1: null,
total: null,
tableData2: [], // 开票记录表格数据
listLoading2: false, // 开票记录表格加载动画
taxRate: '', // 税率
dialogFormVisiblePeople: false, // 营销经理对话框显示隐藏
ProvinceValue: '', // 责权省份
Province: [], // 责权省份数组
dataPeople: [], // 营销经理数组
peoplename: '', // 营销经理姓名
title: '', // 开票记录对话框标题
dialogFormVisible1: false, // 开票记录对话框显示隐藏
dialogCustomerFormVisible: false, // 打开选择客户对话框
flag: '', // 开票记录增加编辑旗帜变量
Customer: '', // 客户选择
CustomerData: [], // 客户信息表格
loading1: false, // 客户信息表加载框
CustomerCode: '',
invoiceRecordingCode: '',
form: {
客户名称: '',
发票抬头: '',
税号: '',
开票电话: '',
开票地址: '',
开户行: '',
银行账号: '',
开票金额: '',
开票时间: '',
备注: ''
},
rules: {
客户名称: [{ required: true, message: '请双击选择客户名称', trigger: 'change' }],
开票金额: [{ required: true, message: '请双击选择客户名称', trigger: 'blur' }],
开票时间: [{ required: true, message: '请双击选择客户名称', trigger: 'change' }]
}
}
},
created() {
this.init()
},
methods: {
// 初始化条件
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
},
// 查询项目信息表格
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.MarketingManagerValue === '' || this.MarketingManagerValue === null) { this.peopleid_check = 0 } else { this.peopleid_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
this.listLoading1 = true
searchTableData1(this.PageCurrent, this.PageSize, this.entryNameValue, this.peopleid, this.entryNameValue_check, this.peopleid_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime).then(response => {
this.listLoading1 = false
const data = response.data
for (let i = 0; i < data.rows.length; i++) {
data.rows[i].是是否禁用税率编辑 = true
data.rows[i].合同签订日期 = data.rows[i].合同签订日期.substring(0, data.rows[i].合同签订日期.length - 8)
}
this.tableData1 = data.rows
this.total = data.total
})
},
// 项目信息表格改变每页显示条数
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
},
// 项目信息表格翻页
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
},
// 查询开票记录表格
fetchTableData2(row) {
this.taxRate = row.税率
this.projectid = row.项目流水号
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
},
// 开票记录合计
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 6) {
sums[index] = '项目开票合计:'
return
} else if (index === 7) {
const values = data.map(item => Number(item['开票金额']))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
} else {
return Number(prev)
}
}, 0)
sums[index] += ' 元(含税)'
} else {
sums[index] = 'N/A'
}
} else if (index === 8) {
sums[index] = this.taxRate * 100 + '% (税率)'
return
} else if (index === 9) {
sums[index] = parseFloat(sums[7]) * this.taxRate + ' 元(税额)'
return
} else if (index === 10) {
sums[index] = parseFloat(sums[7]) - parseFloat(sums[9]) + ' 元(未税)'
return
}
})
return sums
},
// 双击解锁选定行的税率编辑
unlockEditor(row) {
row.是是否禁用税率编辑 = false
},
// 离开锁定选定行的税率编辑
lockEditor(row) {
row.是是否禁用税率编辑 = true
},
// 改变税率
revisionOfTaxRate(row) {
revisionOfTaxRate(row.项目流水号, row.税率).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.fetchTableData1()
this.fetchTableData2(row)
} else {
this.$message.error('修改失败')
}
})
},
// 点击选择营销经理
handleChange(row) {
this.peopleid = row.营销经理流水号
this.peoplename = row.姓名
},
// 营销经理对话框确定
getName() {
this.dialogFormVisiblePeople = false
this.MarketingManagerValue = this.peoplename
},
// 营销经理对话框取消
offName() {
this.dialogFormVisiblePeople = false
this.peopleid = ''
this.peoplename = ''
},
// 通过省份查对应的营销经理
changeProvince() {
SelectMarketingManager(this.ProvinceValue).then(response => {
this.dataPeople = response.data
})
},
// 清空营销经理输入框
clearPeople() {
this.peopleid = ''
},
// 打开增加开票记录对话框
openAddInvoiceRecordingDialog() {
this.addForm('form')
this.title = '增加'
this.dialogFormVisible1 = true
},
// 打开选择
CustomerChange() {
this.dialogCustomerFormVisible = true
},
offCustomerChange() {
this.dialogCustomerFormVisible = false
},
fetchCustomerData() {
this.loading1 = true
this.getTable(fetchCustomerData, [this.PageCurrent1, this.PageSize1, this.Customer], ['CustomerData', 'total1', 'loading1'])
},
handleSizeChange1(val) {
this.PageCurrent1 = 1
this.PageSize1 = val
this.fetchCustomerData()
},
handleCurrentChange1(val) {
this.PageCurrent1 = val
this.fetchCustomerData()
},
handleCustomerChange(row) {
this.CustomerCode = row.客户流水号
this.form.客户名称 = row.客户名称
this.form.发票抬头 = row.客户名称
this.form.税号 = row.税号
this.form.开票电话 = row.传真
this.form.开票地址 = row.地址
this.form.开户行 = row.开户行
this.form.银行账号 = row.银行账号
},
getCustomerCode() {
this.dialogCustomerFormVisible = false
},
clearCustomer() {
this.CustomerCode = ''
this.form.客户名称 = ''
this.form.发票抬头 = ''
this.form.税号 = ''
this.form.开票电话 = ''
this.form.开票地址 = ''
this.form.开户行 = ''
this.form.银行账号 = ''
},
// 提交增加或编辑
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag === 1) {
this.addSubmit()
} else if (this.flag === 2) {
this.editSubmit()
}
}
})
},
// 增加开票记录
addSubmit() {
addSubmit(this.projectid, this.CustomerCode, this.form.开票金额, this.form.开票时间, this.form.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible1 = false
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
} else {
this.$message.error('增加失败')
}
})
},
openEditInvoiceRecordingDialog(row) {
this.editForm(row, 'form')
this.title = '编辑'
this.dialogFormVisible1 = true
this.CustomerCode = row.客户流水号
this.form.客户名称 = row.客户名称
this.form.发票抬头 = row.客户名称
this.form.税号 = row.税号
this.form.开票电话 = row.传真
this.form.开票地址 = row.地址
this.form.开户行 = row.开户行
this.form.银行账号 = row.银行账号
this.form.开票金额 = row.开票金额
this.form.开票时间 = row.开票时间
this.form.备注 = row.备注
this.invoiceRecordingCode = row.开票记录流水号
},
editSubmit() {
editSubmit(this.CustomerCode, this.form.开票金额, this.form.开票时间, this.form.备注, this.invoiceRecordingCode).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.dialogFormVisible1 = false
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
} else {
this.$message.error('修改失败')
}
})
},
delInvoiceRecordingDialog(row) {
function a() {
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
}
this.deleteRow(delSubmit, row.开票记录流水号, a)
}
}
}
</script>
<style scoped>
</style>

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<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>
@@ -12,39 +12,19 @@
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<el-table-column label="请款人" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
{{ scope.row.请款人 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<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="70">
<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="70">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
@@ -168,7 +148,8 @@ export default {
this.searchTable2()
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 2).then(response => {
initApproval(this.pageCurrent1, this.pageSize1, 1).then(response => {
console.log(response.data)
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -209,7 +190,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 2).then(response => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
@@ -227,7 +208,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购请款流水号, 2, value, this.id, 2).then(response => {
execApproval(row.采购请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<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>
@@ -12,39 +12,19 @@
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<el-table-column label="请款人" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
{{ scope.row.请款人 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<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="70">
<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="70">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
@@ -94,7 +74,7 @@
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="320">
<el-table-column label="付款" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
@@ -168,7 +148,7 @@ export default {
this.searchTable2()
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 3).then(response => {
initApproval(this.pageCurrent1, this.pageSize1, 2).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -209,7 +189,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 3).then(response => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
// 记录付款金额及时间
@@ -228,7 +208,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购请款流水号, 2, value, this.id, 3).then(response => {
execApproval(row.采购请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()

View File

@@ -24,57 +24,67 @@
<el-card>
<el-table v-loading="" :data="tableData1" stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
<el-table-column label="采购合同号" align="center" min-width="100">
<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="120">
<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.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<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="70">
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ Number(scope.row.总金额).toFixed(2) }}
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" align="center" min-width="70">
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ Number(scope.row.欠款金额).toFixed(2) }}
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70">
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ Number(scope.row.总金额 - scope.row.欠款金额).toFixed(2) }}
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="付款情况" align="center" min-width="150">
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="70" fixed="right">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" align="center" min-width="70" fixed="right">
<template slot-scope="scope">
{{ (Number(scope.row.合同总额)-Number(scope.row.已付金额)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70" fixed="right">
<template slot-scope="scope">
{{ Number(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="付款进度" align="center" min-width="150" fixed="right">
<template slot-scope="scope">
<el-progress
:text-inside="true"
:stroke-width="18"
:percentage="parseFloat((100*(scope.row.总金额 - scope.row.欠款金额)/scope.row.总金额).toFixed(2))"
:percentage="100*(Number(scope.row.已付金额))/scope.row.合同总额"
status="success"/>
</template>
</el-table-column>
@@ -124,6 +134,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
@@ -142,6 +153,7 @@ export default {
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchPayState(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
this.tableData1 = response.data.rows
console.log(response.data.rows)
this.total1 = response.data.total
})
},

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,441 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>采购合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<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="handleAdd()">增加</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border @row-click="searchPic">
<el-table-column align="center" label="采购合同编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="150px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.项目名称 ? scope.row.项目名称 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="传送人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.传送人 }}
</template>
</el-table-column>
<el-table-column align="center" label="传送时间" min-width="135px">
<template slot-scope="scope">
{{ scope.row.传送时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="交接状态" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.接收人" type="success" size="small">已接收</el-tag>
<el-tag v-else type="warning" size="small">未接收</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="接收人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="接收时间" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon="el-icon-edit"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
type="danger"
size="mini"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<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-table v-loading="" :data="tableData2" size="mini" stripe border>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" min-width="120px">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 ? scope.row.开票时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
</el-table>
<img :src="scanSrc" alt="发票扫描件" width="100%">
</el-card>
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="460px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="90px">
<el-row>
<el-form-item label="合同编号" prop="contractNumValue">
<el-select v-model="form1.contractNumValue" placeholder="合同编号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="开票金额" prop="money">
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
</el-form-item>
<el-form-item label="传送人">
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled>
<el-option
v-for="item in sender"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="发票扫描件">
<el-upload
id="invoiceScan"
ref="upload"
:auto-upload="false"
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue"
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-show="title1==='增加'" size="small" type="primary" @click="submitAdd('form1')">确定</el-button>
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit('form1')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchInvoice, editInvoice, deleteInvoice, initSender, initProject, initContract } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
import { mapGetters } from 'vuex'
import { upload } from '@/utils/request'
import request from '@/utils/request'
export default {
name: '', // 采购发票交接
data() {
return {
scanSrc: '',
upload: `http://localhost:8411/submit/uploadInvoiceScan.ashx`,
limit: 1,
sender: [],
contractNumValue: '',
contractNum: [],
projectValue: '',
project: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
tableData2: [],
dialogVisible1: false,
title1: '',
form1: {
contractNumValue: '',
money: '',
sendPersonValue: ''
},
rules1: {
contractNumValue: [
{ required: true, message: '请选择合同号' }
],
money: [
{ required: true, message: '请填写金额' }
]
}
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() { // 初始化数据
console.log(upload)
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
initSender().then(response => { // 传送人
for (let i = 0; i < response.data.length; i++) {
this.sender.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() { // 查询表1
this.projectValue ? this.check1 = 1 : this.check1 = 0
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.contractNumValue).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
this.scanSrc = ''
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
handleAdd() { // 执行新增
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '增加'
this.form1.projectValue = ''
this.form1.contractNumValue = ''
this.form1.money = ''
this.form1.sendPersonValue = Number(this.id)
this.form1.remark = ''
this.dialogVisible1 = true
},
warningExceed() {
this.$message.error('仅可上传一张发票')
},
submitAdd(formName) { // 提交新增
this.$refs[formName].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
return false
}
})
},
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()
} else {
this.$message.error('增加失败')
}
},
handleEdit(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '编辑'
this.dialogVisible1 = true
this.form1.contractNum = parseInt(row.采购合同流水号)
this.form1.invoiceNum = row.发票号
this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间
this.form1.money = row.开票金额
this.form1.sendPersonValue = parseInt(row.传送人)
this.form1.receivePersonValue = parseInt(row.接收人)
this.form1.remark = row.备注
console.log(row.开票时间)
if (row.开票时间 === '1900/1/1') {
this.form1.invoiceTime = null
}
if (parseInt(row.传送人) === 0) {
this.form1.sendPersonValue = ''
}
if (parseInt(row.接收人) === 0) {
this.form1.receivePersonValue = ''
}
},
submitEdit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
editInvoice(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark).then(response => {
console.log(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark)
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleDelete(row) {
console.log(row)
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInvoice(row.发票流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
async searchPic(row) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票交接流水号}`
}
})
this.scanSrc = 'http://localhost:8411/webpage/file/' + data[0].文件标识 + '.' + data[0].文件后缀
console.log(this.scanSrc)
}
}
}
</script>
<style scoped>
.el-tag{
margin: 0
}
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-top: 1px;
margin-bottom: 1px;
}
</style>

View File

@@ -9,13 +9,12 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button :disabled="disabled" type="success" size="small" icon="el-icon-circle-plus-outline" @click="addReceipt">增加</el-button>
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addReceipt">增加</el-button>
<el-button type="warning" size="small" icon="el-icon-download">导出</el-button>
<div class="title">总装箱单</div>
<el-table
v-loading="loading"
:data="receiptData"
highlight-current-row
border
style="margin-top:20px">
<el-table-column
@@ -67,13 +66,13 @@
</el-table-column>
</el-table>
</el-card>
<el-card style="margin-top: 10px">
<el-button :disabled="!disabled" type="primary" size="small" icon="el-icon-search" @click="addMachine">添加主机</el-button>
<el-button :disabled="!disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addMachine">添加主机</el-button>
<div class="title">主机</div>
<el-table
v-loading="loading"
:data="machineTableData"
highlight-current-row
border
style="margin-top:20px">
<el-table-column type="expand">
@@ -82,17 +81,16 @@
:data="props.row.groupData"
border
style="width: 90%">
<el-table-column
fixed
align="center"
prop="类别"
label="类别"
/>
<el-table-column
label="序号"
type="index"
align="center"
width="100px"/>
<el-table-column
align="center"
prop="类别"
label="类别"
/>
<el-table-column
align="center"
prop="代号"
@@ -167,12 +165,11 @@
</el-card>
<el-card style="margin-top: 10px">
<el-button :disabled="!disabled" type="primary" size="small" icon="el-icon-search" @click="addSpare">添加备件</el-button>
<el-button :disabled="!disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addSpare">添加备件</el-button>
<div class="title">随机供应的备件</div>
<el-table
v-loading="loading"
:data="spareData"
highlight-current-row
border
style="margin-top:20px">
<el-table-column
@@ -225,12 +222,11 @@
</el-card>
<el-card style="margin-top: 10px">
<el-button :disabled="!disabled" type="primary" size="small" icon="el-icon-search" @click="addFile">添加文件</el-button>
<el-button :disabled="!disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addFile">添加文件</el-button>
<div class="title">随机技术文件</div>
<el-table
v-loading="fileLoading"
:data="fileData"
highlight-current-row
border
style="margin-top:20px">
<el-table-column