Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0

This commit is contained in:
caoxinyu
2019-03-26 13:46:55 +08:00
46 changed files with 3000 additions and 705 deletions

View File

@@ -12,14 +12,14 @@ export function initProject() {
})
}
// 机床查询
export function searchmachine(check, num) {
export function searchmachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '&项目流水号=' + num
param: '项目流水号_check=1&项目流水号=' + num
}
})
}
@@ -36,14 +36,15 @@ export function searchTeam(machineNumber) {
})
}
// 初始化物料
export function searchPart(data1) {
export function searchPart(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_离线外购件_出库查询',
param: '离线合同编号=' + data1
param: `物料名称_check=${params[0]}&物料名称=${params[1]}&物料规格_check=${params[2]}&物料规格=${params[3]}&物料型号_check=${params[4]}&物料型号=${params[5]}`,
Pagination: params[6] + '&' + params[7]
}
})
}
@@ -60,26 +61,27 @@ export function searchPeople(data1) {
})
}
// 离线件出库
export function outlinePartOut(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10) {
export function outlinePartOut(data2, data3, data4, data5, data6, data7, data8, data9, data10) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_离线采购件_零件出库',
param: '离线合同明细流水号=' + data1 + '&领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5 + '&项目流水号=' + data6 + '&机床流水号=' + data7 + '&组件流水号=' + data8 + '&物料流水号=' + data9 + '&出库人员流水号=' + data10
param: '领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5 + '&项目流水号=' + data6 + '&机床流水号=' + data7 + '&组件流水号=' + data8 + '&物料流水号=' + data9 + '&出库人员流水号=' + data10
}
})
}
// 查询出库记录
export function outRecord(data1) {
export function outRecord(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_离线外购件出库_出库记录',
param: '离线合同明细流水号=' + data1
param: '物料流水号=' + params[0],
Pagination: params[1] + '&' + params[2]
}
})
}

View File

@@ -1,14 +1,15 @@
import request from '@/utils/request'
// 领料单查询
export function searchList(listNumber_check, listNumber) {
export function searchList(listNumber_check, listNumber, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_领料单_领料单查询',
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -49,14 +49,14 @@ export function getTable(stepNumber, a, b, c, d, e, f, g, i, j, k, l, m, pageCur
})
}
export function getTable2(stepNumber, a, b, c, d, e, g, i) {
export function getTable2(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序',
param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=1=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=' + i + '=string&考核状态=6=int'
name: '车间生产管理工艺_加工进度查询_查询',
param: '工艺计划流水号=' + stepNumber
}
})
}

View File

@@ -47,14 +47,14 @@ export function getTable(stepNumber, a, b, c, d, e, f, g, h, i, j, k, pageCurren
})
}
export function getTable2(stepNumber, a, b, c, d, e, g) {
export function getTable2(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_加工进度修改',
param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=1=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=0'
name: '车间生产管理工艺_加工进度修改2_查询',
param: '工艺计划流水号=' + stepNumber
}
})
}

View File

@@ -0,0 +1,28 @@
import request from '@/utils/request'
// 查询人员总工工时
export function searchtable(num1, num2, num3, num4, num5, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计_查询数据',
param: '操作者_check=' + num1 + '&操作者=' + num2 + '&时间_check=' + num3 + '&开始时间=' + num4 + '&结束时间=' + num5,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询人员具体工序
export function searchtable2(num1, num2, num3, num4, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_工时统计按人员查询_查询数据',
param: '工作者编号=' + num1 + '&时间_check=' + num2 + '&开始时间=' + num3 + '&结束时间=' + num4,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -11,15 +11,39 @@ export function initProject() {
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=1&项目流水号=' + num
}
})
}
// 分组查询
export function searchGroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 初始化项目金额统计表
export function searchProjectTotal(num) {
export function searchProjectTotal(check1, num1, check2, num2, check3, num3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_项目采购总价_查询数据',
param: `项目流水号=${num}`
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}`
}
})
}

View File

@@ -11,15 +11,39 @@ export function initProject() {
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=1&项目流水号=' + num
}
})
}
// 分组查询
export function searchGroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 初始化项目金额统计表
export function searchReceiveCheck(check, num) {
export function searchReceiveCheck(check1, num1, check2, num2, check3, num3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_领用核算_查询数据',
param: `项目流水号_check=${check}&项目流水号=${num}`
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}`
}
})
}

View File

@@ -6,7 +6,7 @@ export function projectSelect() {
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
name: 'PDM_项目名称_查询数据_按时间排序'
}
})
}

View File

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

View 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
}
})
}

View 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]}`
}
})
}

View File

@@ -1,27 +1,38 @@
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({
url: '',
method: 'post',
data: {
type: '1',
name: '车间采购管理_离线合同_请款_查询数据',
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}`,
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询离线合同待请款信息
export function searchOfflineContract(num) {
// 查询供应商
export function searchSupplier() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间采购管理_离线合同_待请款_查询数据',
param: `供应商流水号=${num}`
name: '采购管理_供应商_查询数据_根据条件'
}
})
}
// 查询离线合同待请款信息
export function searchOfflineContract(check, num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间采购管理_离线合同_查询数据',
param: `供应商流水号_check=${check}&供应商流水号=${num}`
}
})
}

View 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}`
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551691047116" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2055" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M864 128h-704a128 128 0 0 0-128 128v512a128 128 0 0 0 128 128h704a128 128 0 0 0 128-128V256a128 128 0 0 0-128-128z m64 640a64 64 0 0 1-64 64h-704a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64h704a64 64 0 0 1 64 64v512z" fill="" p-id="2056"></path><path d="M512 512a32 32 0 0 0 0-64H400.32l-1.024-1.088 102.4-102.4a33.472 33.472 0 0 0-47.296-47.296l-102.4 102.4-102.4-102.4a33.472 33.472 0 0 0-47.296 47.296l102.4 102.4L303.68 448H192a32 32 0 0 0 0 64h128v64H192a32 32 0 0 0 0 64h128v96a32 32 0 0 0 64 0V640h128a32 32 0 0 0 0-64H384V512h128zM832 480h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 608h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 352h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64z" fill="" p-id="2057"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

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

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -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

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552869793988" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="597" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M798 63.82H226.2a67.55 67.55 0 0 0-67.55 67.55V892a67.55 67.55 0 0 0 67.55 67.55H798A67.55 67.55 0 0 0 865.55 892V131.37A67.55 67.55 0 0 0 798 63.82z m10.16 811.85a26.49 26.49 0 0 1-26.49 26.49H242.54A26.49 26.49 0 0 1 216 875.67v-728a26.49 26.49 0 0 1 26.49-26.49h539.17a26.49 26.49 0 0 1 26.49 26.49z" p-id="598"></path><path d="M347.15 717.73m-35.35 0a35.35 35.35 0 1 0 70.7 0 35.35 35.35 0 1 0-70.7 0Z" p-id="599"></path><path d="M429.62 689.04l282.77 0 0 57.39-282.77 0 0-57.39Z" p-id="600"></path><path d="M683.7 298.17H458.32a28.7 28.7 0 1 0 0 57.39H683.7a28.7 28.7 0 0 0 0-57.39zM336.49 347.89a4.48 4.48 0 0 0 3.51 1.31 4.42 4.42 0 0 0 3.51-1.31L378.14 313a4.56 4.56 0 0 0 0-6.45c-1.71-1.73-4.69-1.73-7.85 0l-31.74 32-12.47-14a4.61 4.61 0 0 0-6.4 0 4.55 4.55 0 0 0 0 6.45z" p-id="601"></path><path d="M395.27 270.3H299a8.83 8.83 0 0 0-8.83 8.83v96.25a8.83 8.83 0 0 0 8.83 8.82h96.25a8.83 8.83 0 0 0 8.83-8.83v-96.24a8.83 8.83 0 0 0-8.81-8.83z m-8.83 96.25h-78.58V288h78.59z" p-id="602"></path><path d="M429.62 493.6l282.77 0 0 57.39-282.77 0 0-57.39Z" p-id="603"></path><path d="M336.49 542.93a4.48 4.48 0 0 0 3.52 1.31 4.42 4.42 0 0 0 3.51-1.31l34.62-34.85a4.56 4.56 0 0 0 0-6.45c-1.71-1.73-4.69-1.73-7.85 0l-31.74 32-12.47-14a4.61 4.61 0 0 0-6.4 0 4.55 4.55 0 0 0 0 6.45z" p-id="604"></path><path d="M395.27 465.35H299a8.83 8.83 0 0 0-8.83 8.83v96.25a8.83 8.83 0 0 0 8.83 8.83h96.25a8.83 8.83 0 0 0 8.83-8.83v-96.25a8.83 8.83 0 0 0-8.81-8.83z m-8.83 96.25h-78.58V483h78.59z" p-id="605"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -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 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 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
const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,

View File

@@ -1,16 +1,10 @@
<template>
<div class="app-container">
<el-card>
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">增加</el-button>
</el-card>
<el-card>
<el-table
:data="tableData"
border
size="mini"
style="width: 100%;max-height: 400px"
height="400"
@row-click="getWarehouse">
<div slot="header" class="clearfix">
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">新建仓库</el-button>
</div>
<el-table :data="tableData" border size="mini" style="width: 100%;max-height: 300px" height="300" @row-click="getWarehouse">
<el-table-column label="仓库编号" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.仓库编号 }}
@@ -21,27 +15,27 @@
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="仓库描述" align="center" width="110">
<el-table-column label="仓库描述" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.仓库描述 }}
</template>
</el-table-column>
<el-table-column label="地址" align="center">
<el-table-column label="地址" min-width="180" align="center">
<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">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="备注" width="180" align="center">
<el-table-column label="备注" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<el-table-column label="操作" width="300" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@@ -59,13 +53,7 @@
</el-table>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData2"
border
size="mini"
style="width: 100%;max-height: 400px"
height="400">
<el-table v-loading="listLoading" :data="tableData2" border size="mini" style="width: 100%;max-height: 300px" height="300">
<el-table-column label="货位名称" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
@@ -592,8 +580,20 @@ export default {
</script>
<style scoped>
.code{
width:120px!important;
height: auto!important;
}
.code{
width:120px!important;
height: auto!important;
}
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -1,43 +1,74 @@
<template>
<div class="app-container">
<el-card>
<span style="margin: 5px">离线合同编号</span>
<el-input v-model="offlineContract" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPurchasePartinfo()">查询</el-button>
<span>物料名称</span>
<el-input v-model="materialName" placeholder="物料名称" clearable size="small"/>
<span>物料规格</span>
<el-input v-model="materialSpec" placeholder="物料规格" clearable size="small"/>
<span>物料型号</span>
<el-input v-model="materialModel" placeholder="物料型号" clearable size="small"/>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableDataBasic"
size="mini"
border
style="width: 100%;"
height="200"
@row-click = "searchoutRecord"
>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="离线合同编号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="80">
<el-table v-loading="listLoading" :data="tableDataBasic" size="mini" border style="width: 100%;" height="440">
<el-table-column label="序号" align="center" type="index" 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="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="仓库名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="可出库数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope" align="center">
<el-button size="mini" type="success" icon="el-icon-search" @click="pageCurrent2=1;pageSize2=10;total2=0;searchoutRecord(scope.row)">查看领用情况</el-button>
<el-button :disabled="Number(scope.row.货位存量)===0" size="mini" type="primary" icon="el-icon-sort-up" @click="parOut(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>
<el-table v-loading="listLoading1" :data="tableDataOut" size="mini" border style="width: 100%;" height="250">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="物料名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="80">
@@ -45,77 +76,21 @@
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="parOut(scope.row)">出库</el-button>
<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" width="80">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
<el-table-column label="出库时间" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.出库时间 }}
</template>
</el-table-column>
</el-table>
</el-card>
<!--零件出库对话框-->
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
<el-form ref="form" :model="Project" :rules="rules" label-position="left">
<el-form-item label="项目" prop="TotalContractAmount" label-width="100px">
<el-select v-model="form.ProjectValue" filterable clearable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
<el-option
v-for="item in Project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="机床" prop="TotalContractAmount" label-width="100px">
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="分组" prop="TotalContractAmount" label-width="100px">
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
<el-option
v-for="item in GroupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
<el-option
v-for="item in People"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
</div>
</el-dialog>
<el-card>
<el-table
v-loading="listLoading1"
:data="tableDataOut"
size="mini"
border
style="width: 100%;"
height="350">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -131,28 +106,80 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="80">
<el-table-column label="出库人" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.出库人姓名 }}
</template>
</el-table-column>
<el-table-column label="出库数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
<el-table-column label="出库时间" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.出库时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="80">
<el-table-column label="备注" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<!--零件出库对话框-->
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
<el-form ref="form" :model="form" :rules="rules" label-position="left">
<el-form-item label="项目" prop="ProjectValue" label-width="100px">
<el-select v-model="form.ProjectValue" filterable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
<el-option
v-for="item in Project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="机床" prop="MachineValue" label-width="100px">
<el-select v-model="form.MachineValue" filterable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="分组" prop="GroupNumValue" label-width="100px">
<el-select v-model="form.GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
<el-option
v-for="item in GroupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="出库数量" prop="DirectNumber" label-width="100px" size="small">
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="出库人" prop="PeopleValue" label-width="100px">
<el-select v-model="form.PeopleValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
<el-option
v-for="item in People"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" label-width="100px">
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -163,28 +190,25 @@ export default {
data() {
return {
Project: [],
ProjectValue_check: 1,
MachineValue: ' ',
Machine: [],
MachineValue_check: 1,
GroupNumValue: ' ',
GroupNumValue_check: 1,
GroupNum: [],
tableDataBasic: [],
People: [],
PeopleValue: '',
dialogFormVisible: false,
form: {
ProjectValue: '',
MachineValue: '',
GroupNumValue: '',
DirectNumber: '',
PeopleValue: '',
DirectNote: ''
},
rules: { // 表单验证规则
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
DirectNote: [{ required: true, message: '请输入直达件备注', trigger: 'change' }]
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
GroupNumValue: [{ required: true, message: '请选择分组', trigger: 'blur' }],
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
},
contractNumber: '',
locateNumber: '',
materialNumber: '',
PeopleNumber: '',
@@ -192,7 +216,15 @@ export default {
listLoading: '',
listLoading1: '',
partnumber: '',
offlineContract: null // 离线合同编号
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
materialName: '', // 物料名称
materialSpec: '', // 物料规格
materialModel: '' // 物料型号
}
},
computed: {
@@ -202,7 +234,7 @@ export default {
])
},
created() {
this.searchPurchasePartinfo()
this.searchTable1()
this.fetchData()
this.searchPeopleData()
this.getpeopleid()
@@ -216,10 +248,11 @@ export default {
this.PeopleNumber = this.id
},
searchMachine() { // 查询机床
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
}
searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => {
this.Machine = []
this.form.MachineValue = ''
this.GroupNum = []
this.form.GroupNumValue = ''
searchmachine(this.form.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
@@ -229,44 +262,82 @@ export default {
})
},
searchGroupList() { // 查询组号
searchTeam(this.MachineValue).then(response => {
this.GroupNum = []
this.form.GroupNumValue = ''
searchTeam(this.form.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({
label: response.data[i].件名称,
label: response.data[i].,
value: response.data[i].组件流水号
})
}
})
},
// 离线件查询
searchPurchasePartinfo() {
searchTable1() {
this.listLoading = true
this.tableDataBasic = []
searchPart(this.offlineContract).then(response => {
this.tableDataBasic = response.data
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchPart(check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.pageCurrent1, this.pageSize1).then(response => {
this.tableDataBasic = response.data.rows
this.total1 = response.data.total
this.listLoading = false
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
// 离线记录查询
searchoutRecord(row) {
this.contractNumber = row.离线合同明细流水号
// 物料流水号查
this.materialNumber = row.物料流水号
this.listLoading1 = true
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.listLoading1 = true
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.listLoading1 = true
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
// 打开表单
parOut(row) {
this.form = []
this.MachineValue = ''
this.GroupNumValue = ''
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.form = {}
this.form.MachineValue = ''
this.form.GroupNumValue = ''
this.dialogFormVisible = true
this.contractNumber = row.离线合同明细流水号
this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
this.searchoutRecord()
},
// 重置表单
callOff() {
@@ -287,23 +358,32 @@ export default {
},
// 离线外购件出库
addDirectPartm() {
if (this.partnumber < this.form.DirectNumber) {
console.log(this.partnumber, this.form.DirectNumber)
if (Number(this.partnumber) < Number(this.form.DirectNumber)) {
this.$message.error('请正确输入数量')
} else {
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('零件出库成功')
this.dialogFormVisible = false
this.searchPurchasePartinfo()
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
this.listLoading1 = false
this.$refs['form'].validate((valid) => {
if (valid) {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('零件出库成功')
this.dialogFormVisible = false
this.searchTable1()
// 物料流水号查
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
} else {
this.$message.error('零件出库失败')
}
})
} else {
this.$message.error('零件出库失败')
console.log('error submit!!')
return false
}
})
this.dialogFormVisible = false
}
}
}
@@ -311,5 +391,16 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
span{
margin: 10px 0 10px 10px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
</style>

View File

@@ -1,22 +1,14 @@
<template>
<div class="app-container">
<el-card>
<span style="margin: 5px">领料单编号</span>
<span>领料单编号:</span>
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchListinfor()">查询</el-button>
<el-table
v-loading="listLoading"
:data="tableData1"
border
size="mini"
style="width: 100%;"
height="300"
@row-click = "chooseListinfor">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchListinfor()">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="listLoading" :data="tableData1" highlight-current-row border size="mini" style="width: 100%;" height="300" @row-click = "chooseListinfor">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="领料单编号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
@@ -24,7 +16,7 @@
</el-table-column>
<el-table-column label="领料时间" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料时间 }}
{{ scope.row.领料时间 ? scope.row.领料时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="领料人" align="center" min-width="130">
@@ -33,34 +25,44 @@
</template>
</el-table-column>
</el-table>
<el-table
v-loading="listLoading1"
:data="tableDataPicking"
size="mini"
border
style="width: 100%;"
height="400">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="零件图号" align="center" min-width="200">
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-table v-loading="listLoading1" :data="tableDataPicking" size="mini" border style="width: 100%;" height="400">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="100">
<el-table-column label="图号或型号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.零件图号 || scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="200">
<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" min-width="100">
<el-table-column label="机床图号" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="130">
<el-table-column label="组号" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
@@ -70,12 +72,12 @@
{{ scope.row.出库数量 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<el-table-column label="仓库" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="100">
<el-table-column label="货位" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
@@ -85,32 +87,23 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="130">
<el-table-column label="零件类型" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200">
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.是否出库)" size="mini" type="danger" icon="el-icon-back" style="margin: 0 0 0 0px" @click="ErrorpartOut(scope.row)">异常</el-button>
<el-button :disabled="parseInt(scope.row.是否出库)" size="mini" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
<el-button :disabled="!!scope.row.是否出库" size="mini" type="danger" icon="el-icon-back" @click="ErrorpartOut(scope.row)">异常</el-button>
<el-button :disabled="!!scope.row.是否出库" size="mini" type="primary" icon="el-icon-back" @click="partOut(scope.row)">出库</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<el-table
v-loading="listLoading1"
:data="tableDataExchange"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table v-loading="listLoading1" :data="tableDataExchange" border size="mini" style="width: 100%;" height="200">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="交换单编号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.交换单编号 }}
@@ -212,6 +205,9 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
ProjectValue: ' ',
Project: [],
ProjectValue_check: 1,
@@ -271,23 +267,29 @@ export default {
},
created() {
this.getpeopleid()
this.searchListinfor()
},
methods: {
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchListinfor()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchListinfor()
},
// 获取人员编号
getpeopleid() {
this.picikingPeople = this.id
},
// 查询领料单
searchListinfor() {
if (this.pickingListNumber === null) {
this.pickingListNumber_check = 0
}
this.pickingListNumber ? this.pickingListNumber_check = 1 : this.pickingListNumber_check = 0
this.listLoading = true
searchList(this.pickingListNumber_check, this.pickingListNumber).then(response => {
for (let i = 0; i < response.data.length; i++) {
response.data[i].领料时间 = response.data[i].领料时间.substring(0, response.data[i].领料时间.length - 8)
}
this.tableData1 = response.data
searchList(this.pickingListNumber_check, this.pickingListNumber, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
this.listLoading = false
})
},
@@ -295,7 +297,6 @@ export default {
chooseListinfor(row) {
this.pickingListNumberx = row.领料单流水号
this.getpicikingPeople = row.领料人流水号
console.log(this.pickingListNumberx, 223344)
this.searchListDetailt()
this.searchExchange()
},
@@ -324,34 +325,41 @@ export default {
},
// 出库
partOut(row) {
if (row.出库类型 === 3) {
WorkShopPart(row.请购单明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.物料与货位对照流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else if (row.出库类型 === 2) {
PurchasePart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.物料与货位对照流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else {
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
ListDetailOut(row.领料单明细流水号)
this.searchListDetailt()
} else { this.$message.error('增加失败') }
})
}
this.$confirm('确认出库?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (row.出库类型 === 3) {
WorkShopPart(row.请购单明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.物料与货位对照流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else if (row.出库类型 === 2) {
PurchasePart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.物料与货位对照流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else {
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
ListDetailOut(row.领料单明细流水号)
this.searchListDetailt()
} else { this.$message.error('增加失败') }
})
}
}).catch(() => {
this.$message('已取消操作')
})
},
ErrorpartOut(row) {
console.log(row, 1111)
this.dialogFormVisible = true
this.projectnumber = row.项目流水号
this.machinenumber = row.机床流水号
@@ -363,7 +371,7 @@ export default {
this.partType = row.零件类型
this.partName = row.名称
},
callOff(form) {
callOff() {
this.form = []
this.dialogFormVisible = false
},
@@ -394,5 +402,10 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -8,26 +8,15 @@
</el-card>
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData1"
border
style="width: 100%;"
size="mini"
height="200"
@row-click = "chooseListinfor">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table v-loading="listLoading2" :data="tableData1" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="chooseListinfor">
<el-table-column label="序号" align="center" type="index" width="50"/>
<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="200" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
<template slot-scope="scope">
{{ scope.row.领料时间 }}
</template>
</el-table-column>
@@ -36,13 +25,13 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope" align="center">
<el-button size="mini" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrent2"
:page-sizes="[10, 20, 30, 40]"
@@ -52,18 +41,8 @@
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table
v-loading="listLoading3"
:data="tableDataPicking"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table v-loading="listLoading3" :data="tableDataPicking" border style="width: 100%;" size="mini" height="300">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
@@ -79,22 +58,22 @@
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="130">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="130">
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="130">
<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="50">
<el-table-column label="领用数量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
@@ -114,10 +93,10 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200">
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="scope.row.是否出库" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 10px 10px" @click="editListDetailx(scope.row)">编辑</el-button>
<el-button :disabled="scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropListdetail(scope.row)">删除</el-button>
<!--<el-button :disabled="!!scope.row.是否出库" size="mini" type="primary" icon="el-icon-edit" @click="editListDetailx(scope.row)">编辑</el-button>-->
<el-button :disabled="!!scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" @click="dropListdetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -148,22 +127,13 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button><br>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableDataBasic"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<h4>自制件</h4>
<el-table v-loading="listLoading" :data="tableDataBasic" border style="width: 100%;" size="mini" height="440">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -174,7 +144,7 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<el-table-column label="组号" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
@@ -184,17 +154,17 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="计划数量" align="center" min-width="40">
<el-table-column label="计划数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="库存数量" align="center" min-width="40">
<el-table-column label="库存数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.可出库数量 }}
</template>
</el-table-column>
<el-table-column label="待出库数量" align="center" min-width="40">
<el-table-column label="待出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
@@ -214,18 +184,18 @@
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80">
<el-table-column label="零件类型" align="center" width="80">
<template slot-scope="scope" align="center">
{{ scope.row.零件类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="80">
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button :disabled="scope.row.是否禁用" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicListDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
@@ -235,41 +205,23 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<el-table
v-loading="listLoading1"
:data="tableDataPurchase"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<hr>
<h4>采购部采购件</h4>
<el-table v-loading="listLoading1" :data="tableDataPurchase" highlight-current-row border style="width: 100%;" size="mini" height="440">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="80">
<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">
<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="80">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
{{ scope.row.物料型号 || scope.row.零件图号 || '' }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80">
@@ -277,43 +229,53 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<el-table-column label="组号" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="合同数量" align="center" min-width="80">
<el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80">
<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">
{{ 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" min-width="80">
<el-table-column label="待出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="80">
<el-table-column label="可出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.备注 }}
{{ scope.row.可出库数量 = scope.row.货位存量 - scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80">
<el-table-column label="零件类型" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="80">
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addListDetailinfor(scope.row)">领料</el-button>
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" @click="addListDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrent1"
:page-sizes="[10, 20, 30, 40]"
@@ -323,18 +285,10 @@
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-table
v-loading="listLoadingx"
:data="tableDataHouse"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<hr>
<h4>车间采购件</h4>
<el-table v-loading="listLoadingx" :data="tableDataHouse" border size="mini" style="width: 100%;" height="440">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -350,48 +304,58 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<el-table-column label="组号" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="合同数量" align="center" min-width="80">
<el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80">
<el-table-column label="仓库名称" align="center" width="80">
<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="80">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
</el-table-column>
<el-table-column label="待出库数量" align="center" min-width="80">
<el-table-column label="待出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80">
<el-table-column label="可出库数量" align="center" width="90">
<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" min-width="80">
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addWorkshopDetailinfor(scope.row)">领料</el-button>
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" @click="addWorkshopDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="PageCurrentx"
:page-sizes="[10, 20, 30, 40]"
@@ -420,6 +384,9 @@
<!--外购件领料对话框-->
<el-dialog :visible.sync="dialogFormVisible" title="外购件标准件领料" center width="380px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" class="demo-ruleForm">
<el-form-item label="领料单号" label-width="100px" size="small">
<el-input v-model="pickingListNumber" size="small" placeholder="空" readonly style="width: 200px"/>
</el-form-item>
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
<el-input v-model="form2.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
@@ -435,6 +402,9 @@
<!--车间采购件领料对话框-->
<el-dialog :visible.sync="dialogFormVisibleWork" title="车间采购件领料" center width="380px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" class="demo-ruleForm">
<el-form-item label="领料单号" label-width="100px" size="small">
<el-input v-model="pickingListNumber" size="small" placeholder="空" readonly style="width: 200px"/>
</el-form-item>
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
<el-input v-model="form3.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
@@ -538,8 +508,8 @@ export default {
outNote: '' // 出库备注
},
rules2: { // 表单验证规则
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }]
// outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
},
form3: { // 车间采购出库
OutNumber: '', // 出库数量
@@ -568,19 +538,19 @@ export default {
listLoading3: false,
PageCurrent: 1,
PageSize: 10,
total: null,
total: 0,
PageCurrent1: 1,
PageSize1: 10,
total1: null,
total1: 0,
PageCurrent2: 1,
PageSize2: 10,
total2: null,
total2: 0,
PageCurrent3: 1,
PageSize3: 10,
total3: null,
total3: 0,
PageCurrentx: 1,
PageSizex: 10,
totalx: null,
totalx: 0,
materialName: '',
materialNumber: '',
materialType: '',
@@ -612,6 +582,8 @@ export default {
created() {
this.fetchData()
this.getpeopleid()
this.searchListinfor()
this.searchPartinfo()
},
methods: {
fetchData() {
@@ -621,7 +593,8 @@ export default {
getpeopleid() {
this.picikingPeople = this.id
},
searchMachine() { // 查询机床
// 查询机床
searchMachine() {
this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
@@ -640,7 +613,8 @@ export default {
}
})
},
searchGroupList() { // 查询组号
// 查询组号
searchGroupList() {
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => {
@@ -652,18 +626,13 @@ export default {
}
})
},
// 根据项目机床分组查零件/物料
searchPartinfo() {
this.tableDataPurchase = []
this.tableDataBasic = []
if (this.ProjectValue !== null && this.ProjectValue !== '') {
this.ProjectValue_check = 1
}
if (this.MachineValue !== null && this.MachineValue !== '') {
this.MachineValue_check = 1
}
if (this.GroupNumValue !== null && this.GroupNumValue !== '') {
this.GroupNumValue_check = 1
}
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
this.listLoading = true
this.listLoading1 = true
this.listLoadingx = true
@@ -697,13 +666,12 @@ export default {
this.tableDataBasic = response.data.rows
this.listLoading1 = false
this.total = response.data.total
console.log(response)
})
searchHoursePart(this.PageCurrentx, this.PageSizex, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
console.log(response.data.rows)
this.tableDataHouse = response.data.rows
this.listLoadingx = false
this.totalx = response.data.total
console.log(response)
})
},
handleSizeChange(val) {
@@ -746,7 +714,6 @@ export default {
this.tableData1 = response.data.rows
this.listLoading2 = false
this.total2 = response.data.total
console.log(response)
})
},
handleSizeChange2(val) {
@@ -772,13 +739,21 @@ export default {
},
// 增加领料单
addListinfor() {
addList(this.picikingPeople).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchListinfor()
} else {
this.$message.error('增加失败')
}
this.$confirm('确认创建新的领料单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addList(this.picikingPeople).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchListinfor()
} else {
this.$message.error('增加失败')
}
})
}).catch(() => {
this.$message('已取消操作')
})
},
// 删除领料单
@@ -789,14 +764,18 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropList(this.pickingListNumberx).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListinfor()
} else {
this.$message.error('数据占用')
}
})
if (this.tableDataPicking.length === 0) {
dropList(this.pickingListNumberx).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListinfor()
} else {
this.$message.error('数据占用')
}
})
} else {
this.$message.error('数据占用')
}
}).catch(() => {
this.$message({
type: 'info',
@@ -816,6 +795,7 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
@@ -830,6 +810,7 @@ export default {
// 选择领料单
chooseListinfor(row) {
this.pickingListNumberx = row.领料单流水号
this.pickingListNumber = row.领料单编号
this.searchListDetailt()
},
// 增加基本件领料单明细
@@ -878,7 +859,7 @@ export default {
},
// 增加外购件领料单明细
addListDetailinfor(row) {
this.form2 = []
this.form2 = {}
this.outType = 2
this.partProjectNumber = row.项目流水号
this.partProjectName = row.项目名称
@@ -905,7 +886,6 @@ export default {
if (this.pickingListNumberx === '') {
this.$message.error('请选择领料单')
} else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) {
console.log(this.enableOut)
this.$message.error('请正确输入领用数量')
} else {
this.$refs[formName].validate((valid) => {
@@ -927,9 +907,9 @@ export default {
},
// 增加车间采购领料单明细
addWorkshopDetailinfor(row) {
this.form3 = []
this.outType = 3
console.log(row)
this.form3 = {}
this.outType = 3
this.partProjectNumber = row.项目流水号
this.partMachineNumber = row.机床流水号
this.partGroupNumber = row.组件流水号
@@ -953,10 +933,19 @@ export default {
} else if (this.form3.OutNumber === '' || this.form3.OutNumber > this.enableOut) {
this.$message.error('请正确输入领用数量')
} else {
console.log(this.materialLocate)
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.partPiant, this.material).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchPartinfo()
searchListDetail(this.pickingListNumberx).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataPicking = data
})
this.dialogFormVisibleWork = false
} else {
this.$message.error('增加失败')
}
@@ -964,7 +953,6 @@ export default {
}
}
})
this.dialogFormVisibleWork = false
this.searchListinfor()
this.searchListDetailt()
},
@@ -1035,5 +1023,16 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -112,7 +112,6 @@
</el-card>
<el-card>
<el-table
v-loading="listLoading1"
:data="tableDataPurchase"
border
style="width: 100%;"
@@ -154,12 +153,17 @@
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位存 }}
{{ scope.row. }}
</template>
</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">
{{ scope.row.类型名称 }}
{{ 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>
@@ -177,7 +181,6 @@
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData1"
border
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 => {
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.listLoading1 = false
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 => {
console.log(response)
this.tableData1 = response.data.rows
this.listLoading2 = false
this.total5 = parseInt(response.data.total)
})
} else {
@@ -946,22 +950,6 @@ export default {
sums[index] = '入库数量'
} else if (index === 7) {
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

View File

@@ -186,7 +186,7 @@
@current-change="handleCurrentChange"/>
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</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>
</el-card>
@@ -350,6 +350,7 @@ export default {
jieguo: 0,
value: '',
title: null,
listLoading3: false,
temp: 0,
ComponentflowNumber: '', // 组件零件基本件流水号
TypeflowNumber: '',
@@ -787,6 +788,7 @@ export default {
},
// 投产
production() {
this.listLoading3 = true
this.result = 0
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
this.$message.error('请输入加工结束时间')
@@ -836,7 +838,9 @@ export default {
this.checked_baitu = false
this.checked_gaonandu = false
this.tableData1 = []
this.listLoading3 = false
} else if (response.data[0].result === '0') {
this.listLoading3 = false
this.$message.error('投产失败')
}
})

View File

@@ -189,7 +189,7 @@ export default {
// 自家备料出库
handleChange1(row) {
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, this.id)
handlechange(row.工序流水号, '0000')
}).then(response => {
this.searchTable()
})
@@ -200,7 +200,7 @@ export default {
searchTable2() {
this.loading2 = true
this.tableData2 = []
this.Data = []
this.Data2 = []
if (this.partName2 !== '' && this.partName2 !== null) {
this.partNamecheck2 = 1
} else {
@@ -210,19 +210,19 @@ export default {
if (response.data.total === 0) {
this.loading2 = false
} else {
this.Data = response.data.rows
this.Data2 = response.data.rows
this.total2 = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data.length; i++) {
searchtable2(this.Data[i].工艺计划流水号).then(response => {
for (let i = 0; i < this.Data2.length; i++) {
searchtable2(this.Data2[i].工艺计划流水号).then(response => {
this.tableData2.push({
工艺计划流水号: this.Data[i].工艺计划流水号,
零件名称: this.Data[i].零件名称,
零件图号: this.Data[i].零件图号,
重量1: this.Data[i].重量1,
单价: this.Data[i].单价,
备注1: this.Data[i].备注1,
工艺计划流水号: this.Data2[i].工艺计划流水号,
零件名称: this.Data2[i].零件名称,
零件图号: this.Data2[i].零件图号,
重量1: this.Data2[i].重量1,
单价: this.Data2[i].单价,
备注1: this.Data2[i].备注1,
工序流水号: response.data[0].工序流水号
})
})
@@ -240,7 +240,7 @@ export default {
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
change2(this.bianliang2, this.id, this.bianliang1).then(response => {
change2(this.bianliang2, '0000', this.bianliang1).then(response => {
this.searchTable2()
})
}

View File

@@ -1087,7 +1087,6 @@ export default {
})
},
handleSelectionChange(val) {
console.log(val)
if (this.PartType === '基本件') {
this.MaterialNum = []
this.BasicPartsNumber = []
@@ -1144,7 +1143,6 @@ export default {
},
purchaseRequisition() {
if (this.RequisitionList !== '') {
console.log(this.time)
if (this.time !== '' && this.time !== null) {
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
this.result = 0
@@ -1152,9 +1150,7 @@ export default {
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result)
console.log(this.result)
if (this.result === this.BasicPartsNumber.length) {
console.log(1111)
this.$message.success('请购成功')
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data

View File

@@ -458,6 +458,7 @@ export default {
} else {
this.endTime_check = 1
}
this.num111 = []
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -472,6 +473,7 @@ export default {
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, 1, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize).then(response => {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
this.num111.push(response.data.rows[i].工艺计划流水号)
this.零件图号.push(response.data.rows[i].零件图号)
this.零件名称.push(response.data.rows[i].零件名称)
this.投产数量.push(response.data.rows[i].投产数量)
@@ -484,31 +486,28 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i], 1).then(response => {
this.liushuihao = response.data[0].工艺计划流水号
getTable2(this.num111[i]).then(response => {
for (let k = 0; k < response.data.length; k++) {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工艺编号 === 29) {
response.data[k].员工姓名 = '备料'
}
if (response.data[k].工序间是否外协 === 2) {
response.data[k].员工姓名 = '外协'
}
if (response.data[k].员工姓名 === '超级管理员') {
response.data[k].员工姓名 = '无'
}
this.worker[i][k] = response.data[k].员工姓名
if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工艺编号 === 29) {
response.data[k].员工姓名 = '备料'
}
if (response.data[k].工序间是否外协 === 2) {
response.data[k].员工姓名 = '外协'
}
if (response.data[k].员工姓名 === '超级管理员') {
response.data[k].员工姓名 = '无'
}
this.worker[i][k] = response.data[k].员工姓名
if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
}
}).then(() => {

View File

@@ -372,6 +372,7 @@ import { isMachining, handlechange3, getTable8, getTree, fn, dialogtablevisible,
export default {
data() {
return {
num111: [], // 零件图号去掉P后修改
Num2: '',
gongyijihualiushuihao: [[]],
midd: 0,
@@ -557,6 +558,7 @@ export default {
} else {
this.endTime_check = 1
}
this.num111 = []
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -577,6 +579,7 @@ export default {
} else {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
this.num111.push(response.data.rows[i].工艺计划流水号)
this.零件图号.push(response.data.rows[i].零件图号)
this.零件名称.push(response.data.rows[i].零件名称)
this.投产数量.push(response.data.rows[i].投产数量)
@@ -592,25 +595,22 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i]).then(response => {
this.liushuihao = response.data[0].工艺计划流水号
getTable2(this.num111[i]).then(response => {
for (let k = 0; k < response.data.length; k++) {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.kaoqinbianhao[i][k] = response.data[k].作者考勤编
this.gongxuliushuihao[i][k] = response.data[k].流水号
this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
this.gongxuliushuihao[i][k] = response.data[k].序流水
this.gongyijihualiushuihao[i][k] = response.data[k].艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
}
}).then(() => {

View File

@@ -22,7 +22,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin: 10px" @click="typeChange()">查询</el-button>
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin: 10px" @click="typeChange()">查询</el-button>-->
<span v-if="radio === 1" style="color: #53A3F7;font-size: 14px"> 未编制的数量{{ partNum.length }}</span>
<span v-if="radio === 2" style="color: #53A3F7;font-size: 14px"> {{ shuliang }}</span>
</div>

View File

@@ -0,0 +1,222 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<span>操作者:</span>
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px"/>
<span class="demonstration">完成加工时间:</span>
<el-date-picker
v-model="startTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
</el-row>
</el-card>
<el-card>
<el-col :span="7">
<el-table v-loading="loading" :data="tableData" highlight-current-row height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable2">
<el-table-column
label=" "
type="index"
align="center"
width="50"/>
<el-table-column label="操作者" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.操作者 }}
</template>
</el-table-column>
<el-table-column label="总工时" align="center">
<template slot-scope="scope">
{{ scope.row.工人总工时 }}
</template>
</el-table-column>
</el-table>
<div style="margin: 10px">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-size="pageSize"
:total="total"
layout="total, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
<el-col :span="16" style="margin-left: 30px;">
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column
label=" "
type="index"
align="center"
width="50"/>
<el-table-column label="零件图号" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="工艺名称" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column label="工序工时" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.工序工时 }}
</template>
</el-table-column>
<el-table-column label="完成日期" align="center">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
</template>
</el-table-column>
</el-table>
<div style="margin: 10px">
<el-pagination
v-if="!loading2"
:current-page="pageCurrent2"
:page-size="pageSize2"
:total="total2"
layout="total, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-col>
</el-card>
</div>
</template>
<script>
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/machiningHoursStatistics'
export default {
data() {
return {
workerName: '',
startTime: '',
endTime: '',
loading: false,
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 20, // 每页显示条数
pageCurrent: 1, // 后台获取页
gongzuozhebianhao: '',
loading2: false,
tableData2: [], // 表格数据
total2: null, // 总条数
pageSize2: 20, // 每页显示条数
pageCurrent2: 1 // 后台获取页
}
},
created() {
this.searchTable()
},
methods: {
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
this.tableData2 = []
this.total2 = 0
if (this.startTime !== '' && this.startTime !== null && this.endTime !== null && this.endTime !== null) {
this.timeCheck = 1
} else {
this.startTime = ''
this.endTime = ''
this.timeCheck = 0
}
if (this.workerName !== '' && this.workerName !== null) {
this.workerName_ckeck = 1
} else {
this.workerName_ckeck = 0
}
searchtable(this.workerName_ckeck, this.workerName, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.total = response.data.total
this.tableData = response.data.rows
}
}).then(() => {
this.loading = false
})
},
searchTable2(row) {
this.loading2 = true
this.tableData2 = []
this.pageCurrent2 = 1
this.gongzuozhebianhao = row.工作者编号
searchtable2(row.工作者编号, this.timeCheck, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.total === 0) {
this.loading2 = false
} else {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].完成日期 = response.data.rows[i].完成日期.split(' ')[0]
}
this.total2 = response.data.total
this.tableData2 = response.data.rows
}
}).then(() => {
this.loading2 = false
})
},
searchTable3(row) {
this.loading2 = true
this.tableData2 = []
searchtable2(this.gongzuozhebianhao, this.timeCheck, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.total === 0) {
this.loading2 = false
} else {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].完成日期 = response.data.rows[i].完成日期.split(' ')[0]
}
this.total2 = response.data.total
this.tableData2 = response.data.rows
}
}).then(() => {
this.loading2 = false
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
handleSizeChange2(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.searchTable3()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable3()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 10px;
}
</style>

View File

@@ -184,6 +184,7 @@ import { machine, getToolNum, getNum, searchPartNum1, searchTable, saveWeightAre
export default {
data() {
return {
a: '',
entryNameValue: '',
entryName: [], // 项目名称
toolNumValue: '',
@@ -383,12 +384,16 @@ export default {
if (this.tableData.length === 0) {
this.$message.error('请选择零件')
} else {
this.a = 0
for (let i = 0; i < this.tableData.length; i++) {
saveRowPrice(this.tableData[i].工序流水号, parseFloat(this.tableData[i].外协预算价格_计算), this.tableData[i].工艺计划流水号, this.cailiaofei).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData.length) {
this.$message.success('保存成功')
this.searchPartNum()
}
})
}
this.$message.success('保存成功')
this.searchPartNum()
}
},
handleSizeChange2(val) {

View File

@@ -62,7 +62,7 @@
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<el-table-column label="申请时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
@@ -72,7 +72,7 @@
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
@@ -82,7 +82,7 @@
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
@@ -92,7 +92,7 @@
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>

View File

@@ -62,7 +62,7 @@
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<el-table-column label="申请时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
@@ -72,29 +72,29 @@
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<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姓名 : '未审批' }}
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">

View File

@@ -309,6 +309,11 @@
@click.native="param=1;openSupplier()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="常用符号">
Φ ×
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@@ -194,8 +194,8 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
<el-button type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
<el-button :disabled="disable" type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
@@ -235,7 +235,7 @@
</el-table-column>
<el-table-column label="合计" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
@@ -853,9 +853,9 @@ export default {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
return Number((prev + curr).toFixed(2))
} else {
return prev
return Number((prev).toFixed(2))
}
}, 0)
sums[index] += ' 元'
@@ -1008,11 +1008,12 @@ export default {
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料型号
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].数量 * this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.tableData3[j].数量 * this.tableData3[j].单价).toFixed(2)
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注
total += this.tableData3[j].数量 * this.tableData3[j].单价
total += Number(this.tableData3[j].数量 * this.tableData3[j].单价)
}
total = total.toFixed(2)
document.getElementById('contractNum').innerHTML = row.离线合同编号
document.getElementById('contractName').innerHTML = row.离线合同名称
document.getElementById('supplier').innerHTML = row.供应商名称

View File

@@ -2,13 +2,29 @@
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="machineValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="groupValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
@@ -25,9 +41,14 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="100">
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ scope.row.图号 }}
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 || '—' }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
@@ -35,6 +56,11 @@
{{ 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.规格 }}
@@ -66,7 +92,7 @@
</template>
<script>
import { initProject, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { initProject, searchMachine, searchGroup, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { mapGetters } from 'vuex'
export default {
@@ -75,6 +101,10 @@ export default {
return {
projectValue: '',
project: [],
machineValue: '',
machine: [],
groupValue: '',
group: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
@@ -103,9 +133,38 @@ export default {
}
})
},
projectChange() {
this.machine = []
this.machineValue = ''
this.group = []
this.groupValue = ''
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
value: response.data[i].机床流水号,
label: response.data[i].机床图号
})
}
})
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
value: response.data[i].组件流水号,
label: response.data[i].组号
})
}
})
},
searchTable1() {
if (this.projectValue) {
searchProjectTotal(this.projectValue).then(response => {
let check2, check3
this.machineValue ? check2 = 1 : check2 = 0
this.groupValue ? check3 = 1 : check3 = 0
searchProjectTotal(1, this.projectValue, check2, this.machineValue, check3, this.groupValue).then(response => {
console.log(response.data)
this.tableData1 = response.data
})

View File

@@ -210,6 +210,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable()
},
methods: {
fetchData() {
@@ -267,7 +268,6 @@ export default {
this.searchTable2()
},
searchTable1() { // 查询标准件和外购件
this.total1 = 0
let check1, check2
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
@@ -277,7 +277,6 @@ export default {
})
},
searchTable2() { // 查询基本件
this.total2 = 0
let check1, check2
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0

View File

@@ -2,21 +2,38 @@
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-select v-model="projectValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="machineValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="groupValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="searchProject()">查询</el-button>
</el-card>
<el-card style="margin-top: 15px">
<el-table
:data="tableData1"
:summary-method="getSummaries"
style="width: 100%"
height="440"
height="650"
size="mini"
show-summary
stripe
@@ -27,6 +44,16 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -44,7 +71,7 @@
</el-table-column>
<el-table-column align="center" label="小计(元)" prop="小计">
<template slot-scope="scope">
{{ scope.row.小计 }}
{{ scope.row.小计.toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="单价">
@@ -68,27 +95,21 @@
</template>
<script>
import { initProject, searchReceiveCheck } from '@/api/PurchasingCenter/ReceiveCheck'
import { initProject, searchMachine, searchGroup, searchReceiveCheck } from '@/api/PurchasingCenter/ReceiveCheck'
export default {
data() {
return {
projectValue: '', // 项目名称
project: [],
machineValue: '',
machine: [],
groupValue: '',
group: [],
tableData1: [],
check1: '',
pageCurrent: 1,
pageSize: 10,
total: 0,
form: {
项目名称: '',
物料名称: '',
物料规格: '',
物料型号: '',
数量: '',
单价: '',
小计: ''
}
total: 0
}
},
created() {
@@ -98,11 +119,66 @@ export default {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
projectChange() {
this.machine = []
this.machineValue = ''
this.group = []
this.groupValue = ''
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
value: response.data[i].机床流水号,
label: response.data[i].机床图号
})
}
})
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
value: response.data[i].组件流水号,
label: response.data[i].组号
})
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
return
}
const values = data.map(item => Number(item[column.property]))
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] = sums[index].toFixed(2)
sums[index] += ' 元'
} else {
sums[index] = ''
}
})
return sums
},
searchProject() { // 查询
if (!this.projectValue) {
this.$message.error('请选择项目')
} else {
searchReceiveCheck(1, this.projectValue).then(response => {
let check2, check3
this.machineValue ? check2 = 1 : check2 = 0
this.groupValue ? check3 = 1 : check3 = 0
searchReceiveCheck(1, this.projectValue, check2, this.machineValue, check3, this.groupValue).then(response => {
this.tableData1 = response.data
})
}
@@ -112,5 +188,13 @@ export default {
</script>
<style scoped>
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -476,7 +476,7 @@
<td class="tg-baqh" colspan="3" rowspan="2"/>
</tr>
<tr>
<td class="tg-13pz"></td>
<td class="tg-13pz"></td>
<td class="tg-13pz">净重<br></td>
</tr>
<tbody>
@@ -722,6 +722,11 @@ export default {
},
addReceipt() {
this.addForm('receiptForm')
for (let i = 0; i < this.project.length; i++) {
if (this.projectValue === this.project[i].value) {
this.receiptForm.名称 = this.project[i].label
}
}
this.receiptVisible = true
this.receiptTitle = `新增总装箱单`
},
@@ -905,12 +910,14 @@ export default {
},
exportTable() {
const htmlNode = $('#cjn').html()
const body = $('body')
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.removeAttr('style')
body.children().not('script').show()
body.children().not('#app').hide()
printNode.remove()
}
}

View File

@@ -3,58 +3,44 @@
<el-card>
<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">
<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">
<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">
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.预付款 }}
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<el-table-column label="请款人" align="center" min-width="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.欠款金额 }}
</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">
<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="200">
<el-table-column label="审核" align="center" width="320">
<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="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
@@ -195,7 +181,7 @@
</template>
<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'
export default {
@@ -215,7 +201,8 @@ export default {
pageCurrent3: 1,
total3: 0,
gridData: [],
gridData1: []
gridData1: [],
gridData2: []
}
},
computed: {
@@ -236,7 +223,7 @@ export default {
this.searchTable3()
},
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++) {
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
})
},
searchTable01(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
this.gridData2 = response.data
})
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
@@ -302,7 +294,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 2).then(response => {
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable()
@@ -320,7 +312,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购请款流水号, 2, value, this.id, 2).then(response => {
execApproval(row.采购合同请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable()

View File

@@ -3,58 +3,44 @@
<el-card>
<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">
<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">
<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">
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.预付款 }}
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<el-table-column label="请款人" align="center" min-width="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.欠款金额 }}
</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">
<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="200">
<el-table-column label="审核" align="center" width="320">
<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="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
@@ -195,7 +181,7 @@
</template>
<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'
export default {
@@ -236,7 +222,7 @@ export default {
this.searchTable3()
},
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++) {
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
})
},
searchTable01(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
this.gridData1 = response.data
})
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
@@ -302,7 +293,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 3).then(response => {
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable()
@@ -320,7 +311,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购请款流水号, 2, value, this.id, 3).then(response => {
execApproval(row.采购合同请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable()

View File

@@ -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>

View File

@@ -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="选择开始日期"/>&nbsp;~
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<h4 style="margin-top: 5px">发票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-col :span="6">
<viewer>
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
</viewer>
</el-col>
<el-col :span="6">
<el-form-item label="已付款项">
<span>{{ scope.row.已付款项 }}</span>
</el-form-item><br>
<el-form-item label="尚欠金额">
<span>{{ scope.row.尚欠金额 }}</span>
</el-form-item><br>
<el-form-item label="备注">
<span>{{ scope.row.备注 }}</span>
</el-form-item><br>
</el-col>
<el-col :span="6">
<el-form-item label="是否费用类发票">
<span>{{ scope.row.是否费用类 }}</span>
</el-form-item><br>
<el-form-item label="税额">
<span>{{ scope.row.税额 }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="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>

View File

@@ -14,6 +14,14 @@
range-separator=""
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"
@@ -24,7 +32,7 @@
</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">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
@@ -73,15 +81,20 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<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="请款金额">
<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>
@@ -103,25 +116,26 @@
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="1000px">
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1200px">
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small">
<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="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-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" highlight-current-row 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">
@@ -133,42 +147,49 @@
{{ scope.row.离线合同名称 }}
</template>
</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">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="100">
<el-table-column label="采购员" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="100" prop="合同总额" fixed="right">
<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" 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>
<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 { 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'
export default {
name: '', // 离线合同
data() {
return {
check1: 0,
check2: 0,
totalSum: 0,
totalPay: 0,
totalDebt: 0,
dateRange: '',
pickerOptions: {
shortcuts: [{
@@ -205,10 +226,12 @@ export default {
pageSize1: 10,
total1: 0,
tableData1: [],
tableData2: [],
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
tableData01: [],
tableData02: [],
dialogVisible2: false,
SUM: 0,
contractGroup: [],
@@ -231,7 +254,7 @@ export default {
methods: {
fetchData() {
this.supplier = []
searchOfflineContract().then(response => {
searchSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
@@ -241,11 +264,23 @@ export default {
})
},
searchTable1() { // 查询请款表
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData2 = []
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
searchOfflineContract(check2, this.supplierValue).then(response => {
response.data.map(data => {
this.totalSum += data.合同总额
this.totalPay += data.已付金额
})
this.totalDebt = this.totalSum - this.totalPay
})
},
handleSizeChange1(val) {
this.pageSize1 = val
@@ -261,12 +296,50 @@ export default {
this.supplierValue = ''
this.fetchData() // 重新获取供应商
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() { // 查询待请款
this.tableData01 = []
if (this.supplierValue) {
this.contractGroup = []
searchOfflineContract(this.supplierValue).then(response => {
this.tableData01 = response.data
let check
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 {
this.$message.error('请选择供应商')
@@ -276,10 +349,11 @@ export default {
this.SUM = 0
this.contractGroup = []
this.sumGroup = []
console.log(val)
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].合同总)
this.SUM += parseFloat(val[i].请款金)
this.contractGroup.push(val[i].离线合同流水号)
this.sumGroup.push(val[i].合同总)
this.sumGroup.push(val[i].请款金)
}
},
selectable(row, index) { // 控制某行是否可选
@@ -311,9 +385,12 @@ export default {
}).then(() => {
cancelRequestFund(row.离线合同请款流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('取消失败') }
} else if (response.data[0].result === '已审批') {
this.searchTable1()
this.$message.error('已审批,操作失败')
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({

View File

@@ -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>

View File

@@ -281,6 +281,11 @@ export default {
this.contractGroup = []
searchOfflineContract(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('请选择供应商')