更新
This commit is contained in:
@@ -6,7 +6,7 @@ export function projectSelect() {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: 'PDM_项目名称_查询数据'
|
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,52 +1,63 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询审核/审批/付款
|
// 查询审批/付款
|
||||||
export function initApproval(pageCurrent, pageSize, state) {
|
export function initApproval(pageCurrent, pageSize, state) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '采购管理_请款表_查询数据_审核审批',
|
name: '车间采购管理_采购合同_审批付款_查询数据',
|
||||||
param: `审核_审批_付款状态=${state}`,
|
param: `审批_付款状态=${state}`,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 执行审核/审批/付款
|
// 执行审批/付款
|
||||||
export function execApproval(num1, num2, reason, person, state) {
|
export function execApproval(num1, num2, reason, person, state) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_请款表_修改数据_审核审批',
|
name: '车间采购管理_采购合同_审批付款_修改数据',
|
||||||
param: `采购科请款流水号=${num1}&审核_审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审核_审批_付款状态=${state}`
|
param: `采购合同请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询车间合同审核/审批/付款
|
// 查询车间合同审批/付款
|
||||||
export function initApproval1(pageCurrent, pageSize, state) {
|
export function initApproval1(pageCurrent, pageSize, state) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间采购管理_请款表_查询数据_审核审批',
|
name: '车间采购管理_采购合同_审批付款_查询数据',
|
||||||
param: `审核_审批_付款状态=${state}`,
|
param: `审批_付款状态=${state}`,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 执行车间合同审核/审批/付款
|
export function searchRequsetFundDetail3(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同_请款明细_查询数据',
|
||||||
|
param: `采购合同请款流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 执行车间合同审批/付款
|
||||||
export function execApproval1(num1, num2, reason, person, state) {
|
export function execApproval1(num1, num2, reason, person, state) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_请款表_修改数据_审核审批',
|
name: '车间采购管理_采购合同_审批付款_修改数据',
|
||||||
param: `采购科请款流水号=${num1}&审核_审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审核_审批_付款状态=${state}`
|
param: `采购合同请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
146
src/api/WorkshopProcurement/InvoiceSettlementApplication1.js
Normal file
146
src/api/WorkshopProcurement/InvoiceSettlementApplication1.js
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询供应商
|
||||||
|
export function searchSupplier() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_供应商_查询数据_根据条件'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 根据条件查发票结算申请单
|
||||||
|
export function searchTable1(...group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单_查询数据',
|
||||||
|
param: `发票号_check=${group[0]}&发票号=${group[1]}`,
|
||||||
|
Pagination: group[2] + '&' + group[3]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 编辑发票结算申请单
|
||||||
|
export function submitEdit(...group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单_修改数据',
|
||||||
|
param: `发票号=${group[0]}&发票金额=${group[1]}&已付款项=${group[2]}&尚欠金额=${group[3]}&税额=${group[4]}&是否费用类=${group[5]}&备注=${group[6]}&发票结算申请单流水号=${group[7]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除发票结算申请单
|
||||||
|
export function submitDelete(...group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单_删除数据',
|
||||||
|
param: `发票结算申请单流水号=${group[0]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 提交申请 发票结算申请单
|
||||||
|
export function submitApply(...group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间采购管理_发票结算申请单_提交申请',
|
||||||
|
param: `发票结算申请单流水号=${group[0]}&申请人=${group[1]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发票结算申请单明细列表
|
||||||
|
export function searchTable2(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单明细_查询数据',
|
||||||
|
param: `发票结算申请单流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 根据供应商查询采购合同
|
||||||
|
export function searchPurchase(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同_查询数据',
|
||||||
|
param: '供应商流水号_check=1&供应商流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 根据供应商查询离线合同
|
||||||
|
export function searchOffline(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_离线合同_查询数据',
|
||||||
|
param: '供应商流水号_check=1&供应商流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询采购合同明细
|
||||||
|
export function searchPurchaseDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同明细_查询数据',
|
||||||
|
param: '采购合同流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询离线合同明细
|
||||||
|
export function searchOfflineDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_离线合同明细_查询数据',
|
||||||
|
param: '离线合同流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发票结算申请单明细增加-1采购/2离线
|
||||||
|
export function addTable2(data, group1, group2, type) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间采购管理_发票结算申请单明细_增加数据',
|
||||||
|
param: '发票结算申请单流水号=' + data + '&合同明细流水号组=' + group1 + '&到票数量组=' + group2 + '&合同类型=' + type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发票结算申请单明细删除
|
||||||
|
export function deleteTable2(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间采购管理_发票结算申请单明细_删除数据',
|
||||||
|
param: '发票结算申请单明细流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
39
src/api/WorkshopProcurement/InvoiceSettlementApprove1.js
Normal file
39
src/api/WorkshopProcurement/InvoiceSettlementApprove1.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 根据条件查发票结算申请单
|
||||||
|
export function searchTable1(...group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单_查询数据',
|
||||||
|
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1`,
|
||||||
|
Pagination: group[3] + '&' + group[4]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发票结算申请单明细列表
|
||||||
|
export function searchTable2(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单明细_查询数据',
|
||||||
|
param: `发票结算申请单流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 执行审批
|
||||||
|
export function excuteApprove(...data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_发票结算申请单_执行审批',
|
||||||
|
param: `发票结算申请单流水号=${data[0]}&人员编号=${data[1]}&审批代号=${data[2]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1,27 +1,38 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询请款表
|
// 查询请款表
|
||||||
export function searchRequestFund(pageCurrent, pageSize, check1, start, end) {
|
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, num) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间采购管理_离线合同_请款_查询数据',
|
name: '车间采购管理_离线合同_请款_查询数据',
|
||||||
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}`,
|
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询离线合同待请款信息
|
// 查询供应商
|
||||||
export function searchOfflineContract(num) {
|
export function searchSupplier() {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间采购管理_离线合同_待请款_查询数据',
|
name: '采购管理_供应商_查询数据_根据条件'
|
||||||
param: `供应商流水号=${num}`
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询离线合同待请款信息
|
||||||
|
export function searchOfflineContract(check, num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_离线合同_查询数据',
|
||||||
|
param: `供应商流水号_check=${check}&供应商流水号=${num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
73
src/api/WorkshopProcurement/PurchaseContractRequestFund1.js
Normal file
73
src/api/WorkshopProcurement/PurchaseContractRequestFund1.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询请款表
|
||||||
|
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同_请款_查询数据',
|
||||||
|
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询供应商
|
||||||
|
export function searchSupplier() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_供应商_查询数据_根据条件'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function submitRequestFund(contractGroup, sumGroup, supplier, money, person) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间采购管理_采购合同_请款_增加数据',
|
||||||
|
param: `采购合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询离线合同待请款信息
|
||||||
|
export function searchRequsetFundDetail(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同_请款明细_查询数据',
|
||||||
|
param: `采购合同请款流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 取消请款
|
||||||
|
export function cancelRequestFund(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同_请款_删除数据',
|
||||||
|
param: `采购合同请款流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询离线合同待请款信息
|
||||||
|
export function searchPurchaseContract(check, num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间采购管理_采购合同_查询数据',
|
||||||
|
param: `供应商流水号_check=${check}&供应商流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
1
src/icons/svg/InvoiceSettlementApplication1.svg
Normal file
1
src/icons/svg/InvoiceSettlementApplication1.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551691047116" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2055" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M864 128h-704a128 128 0 0 0-128 128v512a128 128 0 0 0 128 128h704a128 128 0 0 0 128-128V256a128 128 0 0 0-128-128z m64 640a64 64 0 0 1-64 64h-704a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64h704a64 64 0 0 1 64 64v512z" fill="" p-id="2056"></path><path d="M512 512a32 32 0 0 0 0-64H400.32l-1.024-1.088 102.4-102.4a33.472 33.472 0 0 0-47.296-47.296l-102.4 102.4-102.4-102.4a33.472 33.472 0 0 0-47.296 47.296l102.4 102.4L303.68 448H192a32 32 0 0 0 0 64h128v64H192a32 32 0 0 0 0 64h128v96a32 32 0 0 0 64 0V640h128a32 32 0 0 0 0-64H384V512h128zM832 480h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 608h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 352h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64z" fill="" p-id="2057"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/icons/svg/InvoiceSettlementApprove1.svg
Normal file
1
src/icons/svg/InvoiceSettlementApprove1.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551698748547" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2829" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M896 928H128c-17.6 0-32-14.4-32-32s14.4-32 32-32h768c17.6 0 32 14.4 32 32s-14.4 32-32 32z m0-128H128c-17.6 0-32-14.4-32-32V608c0-52.8 43.2-96 96-96h204.8c-6.4-38.4-25.6-75.2-52.8-107.2-36.8-41.6-56-94.4-56-148.8 0-60.8 24-118.4 68.8-161.6 44.8-43.2 102.4-64 164.8-62.4C636.8 36.8 734.4 136 736 251.2c1.6 57.6-20.8 113.6-59.2 156.8-27.2 28.8-43.2 64-49.6 104H832c52.8 0 96 43.2 96 96v160c0 17.6-14.4 32-32 32z m-736-64h704V608c0-17.6-14.4-32-32-32H592c-17.6 0-32-14.4-32-32 0-67.2 24-131.2 68.8-179.2 28.8-30.4 43.2-70.4 43.2-112-1.6-83.2-70.4-153.6-153.6-156.8-44.8-1.6-86.4 14.4-116.8 44.8-32 30.4-49.6 72-49.6 115.2 0 38.4 14.4 76.8 40 105.6 46.4 52.8 72 116.8 72 182.4 0 17.6-14.4 32-32 32H192c-17.6 0-32 14.4-32 32v128z" p-id="2830"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/icons/svg/PurchaseContractRequestFund1.svg
Normal file
1
src/icons/svg/PurchaseContractRequestFund1.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M504.954 1023.366c-278.057 0-503.461-225.452-503.461-503.46 0-278.058 225.404-503.46 503.46-503.46 278.01 0 503.462 225.402 503.462 503.46 0 278.008-225.452 503.46-503.461 503.46zm0-943.988c-243.294 0-440.527 197.234-440.527 440.528 0 243.293 197.233 440.48 440.527 440.48 243.294 0 440.48-197.187 440.48-440.48 0-243.294-197.186-440.528-440.48-440.528zm31.467 755.191h-62.934V677.19H284.691v-62.884h188.796v-94.399H284.691v-62.934h153.598L284.206 239.326l53.964-34.133 156.022 220.313h35.733l139.488-208.531 52.315 35.006-137.163 204.99h140.653v62.935H542.481l-6.061 9.017v85.382h188.797v62.884H536.421v157.38z"/></svg>
|
||||||
|
After Width: | Height: | Size: 752 B |
@@ -13,6 +13,7 @@ export const upload = `http://192.168.1.231:8411/submit/uploadFile.ashx` // Cont
|
|||||||
export const upload2 = `http://192.168.1.231:8411/submit/upload2.ashx` // delivery
|
export const upload2 = `http://192.168.1.231:8411/submit/upload2.ashx` // delivery
|
||||||
export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // performancebond
|
export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // performancebond
|
||||||
export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoiceScan.ashx` // invoice
|
export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoiceScan.ashx` // invoice
|
||||||
|
export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop)
|
||||||
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
|
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
||||||
|
|||||||
@@ -112,7 +112,6 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading1"
|
|
||||||
:data="tableDataPurchase"
|
:data="tableDataPurchase"
|
||||||
border
|
border
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@@ -154,12 +153,17 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件数量" align="center" min-width="80">
|
<el-table-column label="零件数量" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.货位存量 }}
|
{{ scope.row.数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件类型" align="center" min-width="80">
|
<el-table-column label="到货数量" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.类型名称 }}
|
{{ scope.row.实际到货数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="到货时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到货时间 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -177,7 +181,6 @@
|
|||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading2"
|
|
||||||
:data="tableData1"
|
:data="tableData1"
|
||||||
border
|
border
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@@ -543,15 +546,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||||
console.log(response)
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
|
if (response.data.rows[i].到货时间 !== '' || response.data.rows[i].到货时间 !== null) {
|
||||||
|
response.data.rows[i].到货时间 = response.data.rows[i].到货时间.split(' ', 2)[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
this.tableDataPurchase = response.data.rows
|
this.tableDataPurchase = response.data.rows
|
||||||
this.listLoading1 = false
|
|
||||||
this.total4 = parseInt(response.data.total)
|
this.total4 = parseInt(response.data.total)
|
||||||
})
|
})
|
||||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||||
console.log(response)
|
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.listLoading2 = false
|
|
||||||
this.total5 = parseInt(response.data.total)
|
this.total5 = parseInt(response.data.total)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -946,22 +950,6 @@ export default {
|
|||||||
sums[index] = '入库数量'
|
sums[index] = '入库数量'
|
||||||
} else if (index === 7) {
|
} else if (index === 7) {
|
||||||
sums[index] = this.totalNum + ' 件'
|
sums[index] = this.totalNum + ' 件'
|
||||||
// const values = data.map(item => item['入库时间'])
|
|
||||||
// console.log(values)
|
|
||||||
// if (!values.every(value => value !== '')) {
|
|
||||||
// sums[index] = values.reduce((prev, curr) => {
|
|
||||||
// const value = curr
|
|
||||||
// console.log(value)
|
|
||||||
// if (value !== '') {
|
|
||||||
// return this.totalNum1 + 1
|
|
||||||
// } else {
|
|
||||||
// return this.totalNum1
|
|
||||||
// }
|
|
||||||
// }, '')
|
|
||||||
// sums[index] += '件'
|
|
||||||
// } else {
|
|
||||||
// sums[index] = 'N/A'
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return sums
|
return sums
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
@current-change="handleCurrentChange"/>
|
@current-change="handleCurrentChange"/>
|
||||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
||||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||||
<el-button type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -350,6 +350,7 @@ export default {
|
|||||||
jieguo: 0,
|
jieguo: 0,
|
||||||
value: '',
|
value: '',
|
||||||
title: null,
|
title: null,
|
||||||
|
listLoading3: false,
|
||||||
temp: 0,
|
temp: 0,
|
||||||
ComponentflowNumber: '', // 组件零件基本件流水号
|
ComponentflowNumber: '', // 组件零件基本件流水号
|
||||||
TypeflowNumber: '',
|
TypeflowNumber: '',
|
||||||
@@ -787,6 +788,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 投产
|
// 投产
|
||||||
production() {
|
production() {
|
||||||
|
this.listLoading3 = true
|
||||||
this.result = 0
|
this.result = 0
|
||||||
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
|
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
|
||||||
this.$message.error('请输入加工结束时间')
|
this.$message.error('请输入加工结束时间')
|
||||||
@@ -836,7 +838,9 @@ export default {
|
|||||||
this.checked_baitu = false
|
this.checked_baitu = false
|
||||||
this.checked_gaonandu = false
|
this.checked_gaonandu = false
|
||||||
this.tableData1 = []
|
this.tableData1 = []
|
||||||
|
this.listLoading3 = false
|
||||||
} else if (response.data[0].result === '0') {
|
} else if (response.data[0].result === '0') {
|
||||||
|
this.listLoading3 = false
|
||||||
this.$message.error('投产失败')
|
this.$message.error('投产失败')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1087,7 +1087,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
console.log(val)
|
|
||||||
if (this.PartType === '基本件') {
|
if (this.PartType === '基本件') {
|
||||||
this.MaterialNum = []
|
this.MaterialNum = []
|
||||||
this.BasicPartsNumber = []
|
this.BasicPartsNumber = []
|
||||||
@@ -1144,7 +1143,6 @@ export default {
|
|||||||
},
|
},
|
||||||
purchaseRequisition() {
|
purchaseRequisition() {
|
||||||
if (this.RequisitionList !== '') {
|
if (this.RequisitionList !== '') {
|
||||||
console.log(this.time)
|
|
||||||
if (this.time !== '' && this.time !== null) {
|
if (this.time !== '' && this.time !== null) {
|
||||||
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
|
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
|
||||||
this.result = 0
|
this.result = 0
|
||||||
@@ -1152,9 +1150,7 @@ export default {
|
|||||||
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
|
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
|
||||||
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
|
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
|
||||||
this.result += parseInt(response.data[0].result)
|
this.result += parseInt(response.data[0].result)
|
||||||
console.log(this.result)
|
|
||||||
if (this.result === this.BasicPartsNumber.length) {
|
if (this.result === this.BasicPartsNumber.length) {
|
||||||
console.log(1111)
|
|
||||||
this.$message.success('请购成功')
|
this.$message.success('请购成功')
|
||||||
searchPart(this.groupFloatValue).then(response => {
|
searchPart(this.groupFloatValue).then(response => {
|
||||||
this.tableData1 = response.data
|
this.tableData1 = response.data
|
||||||
|
|||||||
@@ -3,58 +3,44 @@
|
|||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||||
<el-table-column label="采购合同编号" align="center" min-width="150">
|
<el-table-column label="供应商" align="center" min-width="170">
|
||||||
<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.规定到货时间.split(' ')[0] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="供应商" align="center" min-width="250">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="预付款" align="center" min-width="100">
|
<el-table-column label="请款时间" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.预付款 }}
|
{{ scope.row.请款时间 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购员" align="center" min-width="70">
|
<el-table-column label="请款人" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.姓名 }}
|
{{ scope.row.姓名 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总金额" align="center" min-width="70">
|
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||||
<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">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.请款金额 }}
|
{{ scope.row.请款金额 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审核" align="center" min-width="200">
|
<el-table-column label="审核" align="center" width="320">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="right" width="400" trigger="click">
|
||||||
|
<el-table :data="gridData2" stripe size="mini" show-summary>
|
||||||
|
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||||
|
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.请款金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable01(scope.row)">查看详情</el-button>
|
||||||
|
</el-popover>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -195,7 +181,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials } from '@/api/WorkshopProcurement/FundApproval'
|
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials, searchRequsetFundDetail3 } from '@/api/WorkshopProcurement/FundApproval'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -215,7 +201,8 @@ export default {
|
|||||||
pageCurrent3: 1,
|
pageCurrent3: 1,
|
||||||
total3: 0,
|
total3: 0,
|
||||||
gridData: [],
|
gridData: [],
|
||||||
gridData1: []
|
gridData1: [],
|
||||||
|
gridData2: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -236,7 +223,7 @@ export default {
|
|||||||
this.searchTable3()
|
this.searchTable3()
|
||||||
},
|
},
|
||||||
searchTable() {
|
searchTable() {
|
||||||
initApproval1(this.pageCurrent, this.pageSize, 2).then(response => {
|
initApproval1(this.pageCurrent, this.pageSize, 1).then(response => {
|
||||||
for (let j = 0; j < response.data.rows.length; j++) {
|
for (let j = 0; j < response.data.rows.length; j++) {
|
||||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||||
@@ -245,6 +232,11 @@ export default {
|
|||||||
this.total = response.data.total
|
this.total = response.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||||
|
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
|
||||||
|
this.gridData2 = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageSize = val
|
this.pageSize = val
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
@@ -302,7 +294,7 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
execApproval(row.采购科请款流水号, 1, '通过', this.id, 2).then(response => {
|
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('执行成功')
|
this.$message.success('执行成功')
|
||||||
this.searchTable()
|
this.searchTable()
|
||||||
@@ -320,7 +312,7 @@ export default {
|
|||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消'
|
cancelButtonText: '取消'
|
||||||
}).then(({ value }) => {
|
}).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') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('执行成功')
|
this.$message.success('执行成功')
|
||||||
this.searchTable()
|
this.searchTable()
|
||||||
|
|||||||
@@ -3,58 +3,44 @@
|
|||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||||
<el-table-column label="采购合同编号" align="center" min-width="150">
|
<el-table-column label="供应商" align="center" min-width="170">
|
||||||
<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.规定到货时间.split(' ')[0] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="供应商" align="center" min-width="250">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="预付款" align="center" min-width="100">
|
<el-table-column label="请款时间" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.预付款 }}
|
{{ scope.row.请款时间 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购员" align="center" min-width="70">
|
<el-table-column label="请款人" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.姓名 }}
|
{{ scope.row.姓名 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总金额" align="center" min-width="70">
|
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||||
<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">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.请款金额 }}
|
{{ scope.row.请款金额 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审核" align="center" min-width="200">
|
<el-table-column label="审核" align="center" width="320">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="right" width="400" trigger="click">
|
||||||
|
<el-table :data="gridData1" stripe size="mini" show-summary>
|
||||||
|
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||||
|
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.请款金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable01(scope.row)">查看详情</el-button>
|
||||||
|
</el-popover>
|
||||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -195,7 +181,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials } from '@/api/WorkshopProcurement/FundApproval'
|
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials, searchRequsetFundDetail3 } from '@/api/WorkshopProcurement/FundApproval'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -236,7 +222,7 @@ export default {
|
|||||||
this.searchTable3()
|
this.searchTable3()
|
||||||
},
|
},
|
||||||
searchTable() {
|
searchTable() {
|
||||||
initApproval1(this.pageCurrent, this.pageSize, 3).then(response => {
|
initApproval1(this.pageCurrent, this.pageSize, 2).then(response => {
|
||||||
for (let j = 0; j < response.data.rows.length; j++) {
|
for (let j = 0; j < response.data.rows.length; j++) {
|
||||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||||
@@ -245,6 +231,11 @@ export default {
|
|||||||
this.total = response.data.total
|
this.total = response.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||||
|
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
|
||||||
|
this.gridData1 = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageSize = val
|
this.pageSize = val
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
@@ -302,7 +293,7 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
execApproval(row.采购科请款流水号, 1, '通过', this.id, 3).then(response => {
|
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('执行成功')
|
this.$message.success('执行成功')
|
||||||
this.searchTable()
|
this.searchTable()
|
||||||
@@ -320,7 +311,7 @@ export default {
|
|||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消'
|
cancelButtonText: '取消'
|
||||||
}).then(({ value }) => {
|
}).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') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('执行成功')
|
this.$message.success('执行成功')
|
||||||
this.searchTable()
|
this.searchTable()
|
||||||
|
|||||||
@@ -0,0 +1,704 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<span>发票号:</span>
|
||||||
|
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
||||||
|
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||||
|
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 300px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form label-position="left" inline class="demo-table-expand">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<viewer>
|
||||||
|
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||||
|
</viewer>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="已付款项">
|
||||||
|
<span>{{ scope.row.已付款项 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
<el-form-item label="尚欠金额">
|
||||||
|
<span>{{ scope.row.尚欠金额 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<span>{{ scope.row.备注 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="是否费用类发票">
|
||||||
|
<span>{{ scope.row.是否费用类 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
<el-form-item label="税额">
|
||||||
|
<span>{{ scope.row.税额 }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供应商名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发票号" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.发票号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发票金额" align="center" min-width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.发票金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请人" align="center" min-width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请时间" align="center" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购审批" align="center" min-width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="财务审批" align="center" min-width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="300">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||||
|
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="danger" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent1"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize1"
|
||||||
|
:total="total1"
|
||||||
|
style="display:inline-block;width:50%"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange1"
|
||||||
|
@current-change="handleCurrentChange1"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
|
||||||
|
<span>发票号:</span>
|
||||||
|
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||||
|
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
|
||||||
|
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||||
|
<el-table-column label="名称" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || 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.采购合同编号 || scope.row.离线合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到票数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button :disabled="disabled" type="danger" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="650px">
|
||||||
|
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="90px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="发票号" prop="invoiceNum">
|
||||||
|
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="发票金额" prop="money">
|
||||||
|
<el-input v-model="form1.money" size="small" placeholder="发票金额"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供应商" prop="supplierValue">
|
||||||
|
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑发票结算申请单'" placeholder="供应商" filterable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplier"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="尚欠金额">
|
||||||
|
<el-input v-model="form1.unpaid" size="small" placeholder="尚欠金额"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="税额">
|
||||||
|
<el-input v-model="form1.tax" size="small" placeholder="税额"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="已付款项">
|
||||||
|
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否费用类">
|
||||||
|
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
|
||||||
|
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
|
||||||
|
<el-upload
|
||||||
|
id="invoiceScan"
|
||||||
|
ref="upload"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-success="uploadSuccess"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:on-exceed="warningExceed"
|
||||||
|
:limit="limit"
|
||||||
|
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
|
||||||
|
list-type="picture-card">
|
||||||
|
<i class="el-icon-plus"/>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||||
|
<el-button v-if="title1 === '创建发票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
|
||||||
|
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
||||||
|
<span>供应商:</span>
|
||||||
|
<el-input v-model="supplierName" size="small" placeholder="请选择供应商发票" style="margin: 0 5px 10px 0;" readonly/>
|
||||||
|
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
|
||||||
|
<el-radio label="采购合同" border/>
|
||||||
|
<el-radio label="离线合同" border/>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02">
|
||||||
|
<el-table-column label="供应商" align="center" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供应商名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合同编号" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合同名称" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同名称 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column :selectable="selectable" type="selection" align="center" width="35"/>
|
||||||
|
<el-table-column label="名称" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购数量" align="center" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已到货数量" align="center" width="90">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.已到货数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已到票数量" align="center" width="90">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到票数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="本次到票数量" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||||
|
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
|
||||||
|
addTable2, deleteTable2 } from '@/api/WorkshopProcurement/InvoiceSettlementApplication1'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { uploadInvoiceScan1, readFile } from '@/utils/request'
|
||||||
|
import request from '@/utils/request'
|
||||||
|
export default {
|
||||||
|
name: '', // 发票结算申请
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
disabled: false,
|
||||||
|
contractType: '采购合同',
|
||||||
|
invoiceNum: '',
|
||||||
|
total1: 0,
|
||||||
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 10,
|
||||||
|
tableData1: [],
|
||||||
|
applyOrderNum: '',
|
||||||
|
invoiceNumber: '',
|
||||||
|
title2: '',
|
||||||
|
dialogVisible2: false,
|
||||||
|
tableData2: [],
|
||||||
|
dialogVisible1: false,
|
||||||
|
title1: '',
|
||||||
|
supplier: [],
|
||||||
|
supplierName: '',
|
||||||
|
supplierValue: '',
|
||||||
|
form1: {
|
||||||
|
invoiceNum: '',
|
||||||
|
money: '',
|
||||||
|
supplierValue: '',
|
||||||
|
paid: '',
|
||||||
|
unpaid: '',
|
||||||
|
tax: '',
|
||||||
|
isCost: '',
|
||||||
|
remark: '',
|
||||||
|
applyOrderNum: ''
|
||||||
|
},
|
||||||
|
rules1: {
|
||||||
|
invoiceNum: [
|
||||||
|
{ required: true, message: '请输入发票号' }
|
||||||
|
],
|
||||||
|
money: [
|
||||||
|
{ required: true, message: '请输入开票金额' }
|
||||||
|
],
|
||||||
|
supplierValue: [
|
||||||
|
{ required: true, message: '请选择供应商' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
upload: uploadInvoiceScan1,
|
||||||
|
limit: 1,
|
||||||
|
tableData01: [],
|
||||||
|
tableData02: [],
|
||||||
|
inboundCardNumber: '', // 入库单号
|
||||||
|
group: [] // 发票结算申请单明细流水号组
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'sidebar',
|
||||||
|
'name',
|
||||||
|
'id' // 人员编号
|
||||||
|
])
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchData() {
|
||||||
|
this.supplier = []
|
||||||
|
searchSupplier().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.supplier.push({
|
||||||
|
label: response.data[i].供应商名称,
|
||||||
|
value: response.data[i].供应商流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
createOrder() {
|
||||||
|
if (this.$refs['form1'] !== undefined) {
|
||||||
|
this.$refs['form1'].resetFields()
|
||||||
|
}
|
||||||
|
this.form1.invoiceNum = ''
|
||||||
|
this.form1.money = ''
|
||||||
|
this.form1.supplierValue = ''
|
||||||
|
this.form1.paid = ''
|
||||||
|
this.form1.unpaid = ''
|
||||||
|
this.form1.tax = ''
|
||||||
|
this.form1.isCost = ''
|
||||||
|
this.form1.remark = ''
|
||||||
|
this.title1 = '创建发票结算申请单'
|
||||||
|
this.dialogVisible1 = true
|
||||||
|
},
|
||||||
|
searchTable1() {
|
||||||
|
let check1
|
||||||
|
this.invoiceNum ? check1 = 1 : check1 = 0
|
||||||
|
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
||||||
|
this.tableData1 = response.data.rows
|
||||||
|
this.tableData1.map(v => {
|
||||||
|
this.$set(v, 'scanSrc', '')
|
||||||
|
return v
|
||||||
|
})
|
||||||
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
|
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||||
|
}
|
||||||
|
this.total1 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitAdd1() { // 提交新增
|
||||||
|
this.$refs['form1'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.upload.submit() // 上传图片
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitEdit() { // 提交编辑
|
||||||
|
this.$refs['form1'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
||||||
|
if (response.data[0].result === '修改成功') {
|
||||||
|
this.$message.success('编辑成功')
|
||||||
|
this.dialogVisible1 = false
|
||||||
|
this.searchTable1()
|
||||||
|
} else if (response.data[0].result === '修改失败') {
|
||||||
|
this.$message.error('已提交申请,编辑失败')
|
||||||
|
} else { this.$message.error('编辑失败') }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleEdit(row) {
|
||||||
|
if (this.$refs['form1'] !== undefined) {
|
||||||
|
this.$refs['form1'].resetFields()
|
||||||
|
}
|
||||||
|
this.form1.invoiceNum = row.发票号
|
||||||
|
this.form1.money = row.发票金额
|
||||||
|
this.form1.supplierValue = Number(row.供应商流水号)
|
||||||
|
this.form1.paid = row.已付款项
|
||||||
|
this.form1.unpaid = row.尚欠金额
|
||||||
|
this.form1.tax = row.税额
|
||||||
|
this.form1.isCost = row.是否费用类
|
||||||
|
this.form1.remark = row.备注
|
||||||
|
this.form1.applyOrderNum = row.发票结算申请单流水号
|
||||||
|
this.title1 = '编辑发票结算申请单'
|
||||||
|
this.dialogVisible1 = true
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
submitDelete(row.发票结算申请单流水号).then(response => {
|
||||||
|
if (response.data[0].result === '删除成功') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.searchTable1()
|
||||||
|
} else if (response.data[0].result === '删除失败') {
|
||||||
|
this.$message.error('已提交申请,删除失败')
|
||||||
|
} else { this.$message.error('删除失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async searchPic(row, i) {
|
||||||
|
const { data } = await request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '3',
|
||||||
|
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||||
|
console.log(this.tableData1[i].scanSrc)
|
||||||
|
},
|
||||||
|
warningExceed() {
|
||||||
|
this.$message.error('仅可上传一张发票')
|
||||||
|
},
|
||||||
|
beforeUpload(file) { // 上传前检测
|
||||||
|
const isJPG = /^image\/.*/.test(file.type)
|
||||||
|
const isLt4M = file.size / 1024 / 1024 < 4
|
||||||
|
if (!isJPG) {
|
||||||
|
this.$message.error('只能上传图片。。')
|
||||||
|
}
|
||||||
|
if (!isLt4M) {
|
||||||
|
this.$message.error('上传头像图片大小不能超过 4MB!')
|
||||||
|
}
|
||||||
|
return isJPG && isLt4M
|
||||||
|
},
|
||||||
|
uploadSuccess(res) { // 上传成功回调
|
||||||
|
if (res[0].result === '1') {
|
||||||
|
this.$message.success('增加成功')
|
||||||
|
this.dialogVisible1 = false
|
||||||
|
this.searchTable1()
|
||||||
|
this.$refs.upload.clearFiles()
|
||||||
|
} else {
|
||||||
|
this.$message.error('增加失败')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
submitApply(row) {
|
||||||
|
if (this.tableData2.length === 0) {
|
||||||
|
this.$message.warning('发票结算申请明细为空!')
|
||||||
|
} else {
|
||||||
|
this.$confirm('确认提交申请吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
submitApply(row.发票结算申请单流水号, this.id).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('提交成功')
|
||||||
|
this.searchTable1()
|
||||||
|
this.tableData2 = []
|
||||||
|
} else { this.$message.error('提交失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchTable2(row) {
|
||||||
|
this.applyOrderNum = row.发票结算申请单流水号
|
||||||
|
this.invoiceNumber = row.发票号
|
||||||
|
this.supplierName = row.供应商名称
|
||||||
|
this.supplierValue = row.供应商流水号
|
||||||
|
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
|
||||||
|
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||||
|
console.log(response.data)
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addInStoreRecord() {
|
||||||
|
if (this.applyOrderNum) {
|
||||||
|
this.searchTable01()
|
||||||
|
this.title2 = '追加入库单'
|
||||||
|
this.dialogVisible2 = true
|
||||||
|
} else {
|
||||||
|
this.$message.error('请选择发票!')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchTable01() {
|
||||||
|
this.tableData01 = []
|
||||||
|
this.tableData02 = []
|
||||||
|
if (this.contractType === '采购合同') {
|
||||||
|
searchPurchase(this.supplierValue).then(response => {
|
||||||
|
this.tableData01 = response.data
|
||||||
|
})
|
||||||
|
} else if (this.contractType === '离线合同') {
|
||||||
|
searchOffline(this.supplierValue).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
if (Number(data.离线合同状态) === 2) {
|
||||||
|
this.tableData01.push(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchTable02(row) {
|
||||||
|
this.tableData02 = []
|
||||||
|
if (this.contractType === '采购合同') {
|
||||||
|
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
this.$set(data, '本次到票数量', 0)
|
||||||
|
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||||
|
this.tableData02.push(data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else if (this.contractType === '离线合同') {
|
||||||
|
searchOfflineDetail(row.离线合同流水号).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
this.$set(data, '本次到票数量', 0)
|
||||||
|
data.本次到票数量 = data.到货数量 - data.到票数量
|
||||||
|
this.tableData02.push(data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.group = val
|
||||||
|
},
|
||||||
|
submitAdd2() { // 追加入库单
|
||||||
|
if (this.group.length === 0) {
|
||||||
|
this.$message.warning('请选择零件或物料')
|
||||||
|
} else {
|
||||||
|
const group1 = []
|
||||||
|
const group2 = []
|
||||||
|
if (this.contractType === '采购合同') {
|
||||||
|
for (let i = 0; i < this.group.length; i++) {
|
||||||
|
group1.push(this.group[i].采购合同明细流水号)
|
||||||
|
group2.push(this.group[i].本次到票数量)
|
||||||
|
}
|
||||||
|
addTable2(this.applyOrderNum, group1, group2, 1).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('追加成功')
|
||||||
|
this.dialogVisible2 = false
|
||||||
|
searchTable2(this.applyOrderNum).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
} else { this.$message.error('追加失败') }
|
||||||
|
})
|
||||||
|
} else if (this.contractType === '离线合同') {
|
||||||
|
for (let i = 0; i < this.group.length; i++) {
|
||||||
|
group1.push(this.group[i].离线合同明细流水号)
|
||||||
|
group2.push(this.group[i].本次到票数量)
|
||||||
|
}
|
||||||
|
addTable2(this.applyOrderNum, group1, group2, 2).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('追加成功')
|
||||||
|
this.dialogVisible2 = false
|
||||||
|
searchTable2(this.applyOrderNum).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
} else { this.$message.error('追加失败') }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteTable2(row) {
|
||||||
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteTable2(row.发票结算申请单明细流水号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
searchTable2(this.applyOrderNum).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
} else { this.$message.error('删除失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectable(row) {
|
||||||
|
return Number(row.本次到票数量) > 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-card{
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.el-select{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
.el-input{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
margin: 10px 0 10px 10px;
|
||||||
|
}
|
||||||
|
#expandTable .el-form-item{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,281 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<span>申请时间:</span>
|
||||||
|
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/> ~
|
||||||
|
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
|
||||||
|
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||||
|
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form label-position="left" inline class="demo-table-expand">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<viewer>
|
||||||
|
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||||
|
</viewer>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="已付款项">
|
||||||
|
<span>{{ scope.row.已付款项 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
<el-form-item label="尚欠金额">
|
||||||
|
<span>{{ scope.row.尚欠金额 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<span>{{ scope.row.备注 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="是否费用类发票">
|
||||||
|
<span>{{ scope.row.是否费用类 }}</span>
|
||||||
|
</el-form-item><br>
|
||||||
|
<el-form-item label="税额">
|
||||||
|
<span>{{ scope.row.税额 }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供应商名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发票号" align="center" min-width="90">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.发票号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发票金额" align="center" min-width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.发票金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请人" align="center" min-width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购审批" align="center" min-width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="财务审批" align="center" min-width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批时间" align="center" min-width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent1"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize1"
|
||||||
|
:total="total1"
|
||||||
|
style="display:inline-block;width:50%"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange1"
|
||||||
|
@current-change="handleCurrentChange1"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
|
||||||
|
<span>发票号:</span>
|
||||||
|
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||||
|
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||||
|
<el-table-column label="名称" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" min-width="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.采购合同编号 || scope.row.离线合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到票数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchTable1, searchTable2, excuteApprove } from '@/api/WorkshopProcurement/InvoiceSettlementApprove1'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { readFile } from '@/utils/request'
|
||||||
|
import request from '@/utils/request'
|
||||||
|
export default {
|
||||||
|
name: '', // 发票结算审批
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
date1: '',
|
||||||
|
date2: '',
|
||||||
|
tableData1: [],
|
||||||
|
total1: 0,
|
||||||
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 10,
|
||||||
|
invoiceNumber: '',
|
||||||
|
tableData2: [],
|
||||||
|
tableData3: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'token',
|
||||||
|
'sidebar',
|
||||||
|
'name',
|
||||||
|
'id' // 人员编号
|
||||||
|
])
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchData() {
|
||||||
|
console.log(this.token)
|
||||||
|
},
|
||||||
|
searchTable1() {
|
||||||
|
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
|
||||||
|
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
|
||||||
|
this.tableData1 = response.data.rows
|
||||||
|
this.tableData1.map(v => {
|
||||||
|
this.$set(v, 'scanSrc', '')
|
||||||
|
return v
|
||||||
|
})
|
||||||
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
|
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||||
|
}
|
||||||
|
this.total1 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async searchPic(row, i) {
|
||||||
|
const { data } = await request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '3',
|
||||||
|
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||||
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
excuteApprove(row) {
|
||||||
|
this.$confirm('确认审批签字?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
|
||||||
|
if (response.data[0].result === '审批成功') {
|
||||||
|
this.$message.success('审批成功')
|
||||||
|
this.searchTable1()
|
||||||
|
} else if (response.data[0].result === '已完成审批') {
|
||||||
|
this.$message.warning('已完成审批,不可重复审批')
|
||||||
|
} else { this.$message.error('审批失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消审批'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTable2(row) {
|
||||||
|
this.invoiceNumber = row.发票号
|
||||||
|
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-card{
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.el-select{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
.el-input{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
margin: 10px 0 10px 10px;
|
||||||
|
}
|
||||||
|
#expandTable .el-form-item{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -14,6 +14,14 @@
|
|||||||
range-separator="~"
|
range-separator="~"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"/>
|
end-placeholder="结束日期"/>
|
||||||
|
<span>供应商:</span>
|
||||||
|
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplier"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -24,7 +32,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
|
||||||
<el-table-column label="供应商" align="center" min-width="250">
|
<el-table-column label="供应商" align="center" min-width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
@@ -73,15 +81,20 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="250">
|
<el-table-column label="操作" align="center" width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popover placement="right" width="400" trigger="click">
|
<el-popover placement="right" width="500" trigger="click">
|
||||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
|
||||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.离线合同编号 }}
|
{{ scope.row.离线合同编号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.已付金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.请款金额 }}
|
{{ scope.row.请款金额 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -103,25 +116,26 @@
|
|||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="handleSizeChange1"
|
@size-change="handleSizeChange1"
|
||||||
@current-change="handleCurrentChange1"/>
|
@current-change="handleCurrentChange1"/>
|
||||||
|
<span v-show="supplierValue">累计合同总额:</span>
|
||||||
|
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||||
|
<span v-show="supplierValue">累计付款:</span>
|
||||||
|
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||||
|
<span v-show="supplierValue">累计欠款:</span>
|
||||||
|
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1000px">
|
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1200px">
|
||||||
<span>供应商:</span>
|
<span>供应商:</span>
|
||||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small">
|
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplier"
|
v-for="item in supplier"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>
|
||||||
type="success"
|
<el-table v-loading="" :data="tableData01" highlight-current-row border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||||
size="small"
|
|
||||||
icon="el-icon-search"
|
|
||||||
style="margin: 0 10px 10px 10px"
|
|
||||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable01()">查询</el-button>
|
|
||||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||||
<el-table-column label="离线合同编号" align="center" min-width="120">
|
<el-table-column label="离线合同编号" align="center" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -133,42 +147,49 @@
|
|||||||
{{ scope.row.离线合同名称 }}
|
{{ scope.row.离线合同名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商" align="center" min-width="250">
|
<el-table-column label="供应商" align="center" min-width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购员" align="center" min-width="100">
|
<el-table-column label="采购员" align="center" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.采购员 }}
|
{{ scope.row.采购员 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="付款方式" align="center" min-width="100">
|
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.付款方式内容 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="合同总额" align="center" min-width="100" prop="合同总额" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.合同总额 }}
|
{{ scope.row.合同总额 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.已付金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number :max="scope.row.合同总额 - scope.row.已付金额" :disabled="(scope.row.合同总额 - scope.row.已付金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width: 100%;"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>import { searchRequestFund, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/OfflineContractRequestFund1'
|
<script>
|
||||||
|
import { searchRequestFund, searchSupplier, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/OfflineContractRequestFund1'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: '', // 离线合同
|
name: '', // 离线合同
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
check1: 0,
|
totalSum: 0,
|
||||||
check2: 0,
|
totalPay: 0,
|
||||||
|
totalDebt: 0,
|
||||||
dateRange: '',
|
dateRange: '',
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
shortcuts: [{
|
shortcuts: [{
|
||||||
@@ -205,10 +226,12 @@ export default {
|
|||||||
pageSize1: 10,
|
pageSize1: 10,
|
||||||
total1: 0,
|
total1: 0,
|
||||||
tableData1: [],
|
tableData1: [],
|
||||||
|
tableData2: [],
|
||||||
pageCurrent2: 1,
|
pageCurrent2: 1,
|
||||||
pageSize2: 10,
|
pageSize2: 10,
|
||||||
total2: 0,
|
total2: 0,
|
||||||
tableData01: [],
|
tableData01: [],
|
||||||
|
tableData02: [],
|
||||||
dialogVisible2: false,
|
dialogVisible2: false,
|
||||||
SUM: 0,
|
SUM: 0,
|
||||||
contractGroup: [],
|
contractGroup: [],
|
||||||
@@ -231,7 +254,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.supplier = []
|
this.supplier = []
|
||||||
searchOfflineContract().then(response => {
|
searchSupplier().then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.supplier.push({
|
this.supplier.push({
|
||||||
label: response.data[i].供应商名称,
|
label: response.data[i].供应商名称,
|
||||||
@@ -241,11 +264,23 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchTable1() { // 查询请款表
|
searchTable1() { // 查询请款表
|
||||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
this.tableData2 = []
|
||||||
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
|
let check1, check2
|
||||||
|
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||||
|
this.supplierValue ? check2 = 1 : check2 = 0
|
||||||
|
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.total1 = response.data.total
|
this.total1 = response.data.total
|
||||||
})
|
})
|
||||||
|
this.totalSum = 0
|
||||||
|
this.totalPay = 0
|
||||||
|
searchOfflineContract(check2, this.supplierValue).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
this.totalSum += data.合同总额
|
||||||
|
this.totalPay += data.已付金额
|
||||||
|
})
|
||||||
|
this.totalDebt = this.totalSum - this.totalPay
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleSizeChange1(val) {
|
handleSizeChange1(val) {
|
||||||
this.pageSize1 = val
|
this.pageSize1 = val
|
||||||
@@ -261,12 +296,50 @@ export default {
|
|||||||
this.supplierValue = ''
|
this.supplierValue = ''
|
||||||
this.fetchData() // 重新获取供应商
|
this.fetchData() // 重新获取供应商
|
||||||
this.tableData01 = []
|
this.tableData01 = []
|
||||||
|
this.tableData02 = []
|
||||||
|
},
|
||||||
|
getSummaries(param) { // 合计
|
||||||
|
const { columns, data } = param
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '总价'
|
||||||
|
} else if (index === 7) {
|
||||||
|
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||||
|
if (!values.every(value => isNaN(value))) {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
sums[index] += ' 元'
|
||||||
|
} else {
|
||||||
|
sums[index] = 'N/A'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
},
|
},
|
||||||
searchTable01() { // 查询待请款
|
searchTable01() { // 查询待请款
|
||||||
|
this.tableData01 = []
|
||||||
if (this.supplierValue) {
|
if (this.supplierValue) {
|
||||||
this.contractGroup = []
|
this.contractGroup = []
|
||||||
searchOfflineContract(this.supplierValue).then(response => {
|
let check
|
||||||
this.tableData01 = response.data
|
this.supplierValue ? check = 1 : check = 0
|
||||||
|
searchOfflineContract(check, this.supplierValue).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
if (Number(data.离线合同状态) === 2) {
|
||||||
|
this.tableData01.push(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableData01.map(v => {
|
||||||
|
this.$set(v, '请款金额', 0)
|
||||||
|
v.请款金额 = v.合同总额 - v.已付金额
|
||||||
|
return v
|
||||||
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择供应商')
|
this.$message.error('请选择供应商')
|
||||||
@@ -276,10 +349,11 @@ export default {
|
|||||||
this.SUM = 0
|
this.SUM = 0
|
||||||
this.contractGroup = []
|
this.contractGroup = []
|
||||||
this.sumGroup = []
|
this.sumGroup = []
|
||||||
|
console.log(val)
|
||||||
for (let i = 0; i < val.length; i++) {
|
for (let i = 0; i < val.length; i++) {
|
||||||
this.SUM += parseFloat(val[i].合同总额)
|
this.SUM += parseFloat(val[i].请款金额)
|
||||||
this.contractGroup.push(val[i].离线合同流水号)
|
this.contractGroup.push(val[i].离线合同流水号)
|
||||||
this.sumGroup.push(val[i].合同总额)
|
this.sumGroup.push(val[i].请款金额)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectable(row, index) { // 控制某行是否可选
|
selectable(row, index) { // 控制某行是否可选
|
||||||
@@ -311,9 +385,12 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
cancelRequestFund(row.离线合同请款流水号).then(response => {
|
cancelRequestFund(row.离线合同请款流水号).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('取消成功')
|
this.$message.success('操作成功')
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
} else { this.$message.error('取消失败') }
|
} else if (response.data[0].result === '已审批') {
|
||||||
|
this.searchTable1()
|
||||||
|
this.$message.error('已审批,操作失败')
|
||||||
|
} else { this.$message.error('操作失败') }
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|||||||
@@ -0,0 +1,409 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<span>时间段:</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
size="small"
|
||||||
|
type="daterange"
|
||||||
|
align="center"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
range-separator="~"
|
||||||
|
style="width:300px"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"/>
|
||||||
|
<span>供应商:</span>
|
||||||
|
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplier"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-search"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
|
||||||
|
<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="150">
|
||||||
|
<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="90" prop="请款金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.请款金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="请款付款情况" align="center">
|
||||||
|
<el-table-column label="审批情况内容" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="付款情况" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="未付款原因" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="250">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="right" width="500" trigger="click">
|
||||||
|
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
|
||||||
|
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||||
|
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.已付金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.请款金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||||
|
</el-popover>
|
||||||
|
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent1"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize1"
|
||||||
|
:total="total1"
|
||||||
|
style="display:inline-block;width:50%"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange1"
|
||||||
|
@current-change="handleCurrentChange1"/>
|
||||||
|
<span v-show="supplierValue">累计合同总额:</span>
|
||||||
|
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||||
|
<span v-show="supplierValue">累计付款:</span>
|
||||||
|
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||||
|
<span v-show="supplierValue">累计欠款:</span>
|
||||||
|
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px">
|
||||||
|
<span>供应商:</span>
|
||||||
|
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplier"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>
|
||||||
|
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||||
|
<el-table-column label="采购合同编号" align="center" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购合同名称" align="center" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购合同名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" min-width="180">
|
||||||
|
<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" width="100" prop="合同总额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.含税总金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.已付金额 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number :max="scope.row.含税总金额 - scope.row.已付金额" :disabled="(scope.row.含税总金额 - scope.row.已付金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width: 100%;"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||||
|
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/PurchaseContractRequestFund1'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { timeToStamp } from '@/utils/tool'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
getDate: null,
|
||||||
|
tableData0: [],
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [{
|
||||||
|
text: '未来一周',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '未来一个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '未来两个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 2)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '未来三个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 3)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '未来半年',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 6)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
dateRange: '',
|
||||||
|
tableData1: [],
|
||||||
|
total1: 0,
|
||||||
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 10,
|
||||||
|
returns: '',
|
||||||
|
supplierValue: '',
|
||||||
|
supplier: [],
|
||||||
|
totalSum: 0,
|
||||||
|
totalPay: 0,
|
||||||
|
totalDebt: 0,
|
||||||
|
tableData2: [],
|
||||||
|
dialogVisible2: false,
|
||||||
|
tableData01: [],
|
||||||
|
SUM: 0,
|
||||||
|
contractGroup: [],
|
||||||
|
gridData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'sidebar',
|
||||||
|
'name',
|
||||||
|
'id'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
timeToStamp(param) { // 转时间戳
|
||||||
|
return timeToStamp(param)
|
||||||
|
},
|
||||||
|
fetchData() {
|
||||||
|
this.supplier = []
|
||||||
|
searchSupplier().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.supplier.push({
|
||||||
|
label: response.data[i].供应商名称,
|
||||||
|
value: response.data[i].供应商流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
searchTable1() { // 查请款信息
|
||||||
|
let check1, check2
|
||||||
|
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||||
|
this.supplierValue ? check2 = 1 : check2 = 0
|
||||||
|
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
|
||||||
|
this.tableData1 = response.data.rows
|
||||||
|
this.total1 = response.data.total
|
||||||
|
})
|
||||||
|
this.totalSum = 0
|
||||||
|
this.totalPay = 0
|
||||||
|
searchPurchaseContract(check2, this.supplierValue).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
this.totalSum += data.含税总金额
|
||||||
|
this.totalPay += data.已付金额
|
||||||
|
})
|
||||||
|
this.totalDebt = this.totalSum - this.totalPay
|
||||||
|
})
|
||||||
|
},
|
||||||
|
requestFund() { // 请款
|
||||||
|
this.dialogVisible2 = true
|
||||||
|
this.supplierValue = ''
|
||||||
|
this.fetchData() // 重新获取供应商
|
||||||
|
this.tableData01 = []
|
||||||
|
},
|
||||||
|
searchTable01() { // 查询待请款
|
||||||
|
if (this.supplierValue) {
|
||||||
|
this.contractGroup = []
|
||||||
|
let check
|
||||||
|
this.supplierValue ? check = 1 : check = 0
|
||||||
|
searchPurchaseContract(check, this.supplierValue).then(response => {
|
||||||
|
this.tableData01 = response.data
|
||||||
|
this.tableData01.map(v => {
|
||||||
|
this.$set(v, '请款金额', 0)
|
||||||
|
v.请款金额 = v.含税总金额 - v.已付金额
|
||||||
|
return v
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error('请选择供应商')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectable(row, index) { // 控制某行是否可选
|
||||||
|
return parseInt(row.已请款) !== 1 // 已经请款
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.SUM = 0
|
||||||
|
this.contractGroup = []
|
||||||
|
this.sumGroup = []
|
||||||
|
for (let i = 0; i < val.length; i++) {
|
||||||
|
this.SUM += parseFloat(val[i].请款金额)
|
||||||
|
this.contractGroup.push(val[i].采购合同流水号)
|
||||||
|
this.sumGroup.push(val[i].请款金额)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submitRequestFund() { // 确认请款
|
||||||
|
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||||
|
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('请款成功')
|
||||||
|
this.searchTable1()
|
||||||
|
this.dialogVisible2 = false
|
||||||
|
} else { this.$message.error('请款失败') }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error('请选择需要请款的合同')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||||
|
searchRequsetFundDetail(row.采购合同请款流水号).then(response => {
|
||||||
|
this.gridData = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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 if (response.data[0].result === '已审批') {
|
||||||
|
this.searchTable1()
|
||||||
|
this.$message.error('已审批,操作失败')
|
||||||
|
} else { this.$message.error('操作失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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-bottom: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -281,6 +281,11 @@ export default {
|
|||||||
this.contractGroup = []
|
this.contractGroup = []
|
||||||
searchOfflineContract(this.supplierValue).then(response => {
|
searchOfflineContract(this.supplierValue).then(response => {
|
||||||
this.tableData01 = response.data
|
this.tableData01 = response.data
|
||||||
|
this.tableData01.map(v => {
|
||||||
|
this.$set(v, '请款金额', 0)
|
||||||
|
v.请款金额 = v.总价 - v.已付金额
|
||||||
|
return v
|
||||||
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择供应商')
|
this.$message.error('请选择供应商')
|
||||||
|
|||||||
Reference in New Issue
Block a user