This commit is contained in:
liushuai
2020-07-08 11:05:43 +08:00
parent 120c7c1601
commit fe5d3b70df
53 changed files with 3596 additions and 1220 deletions

View File

@@ -88,7 +88,7 @@ export function submitRework() {
data: { data: {
type: '2', type: '2',
name: '车间装配管理_装配任务_返工', name: '车间装配管理_装配任务_返工',
param: '计划流水号=' + arguments[0] + '&返工原因流水号=' + arguments[1] + '&返工工时=' + arguments[2] param: '计划流水号=' + arguments[0] + '&返工原因=' + arguments[1] + '&返工工时=' + arguments[2]
} }
}) })
} }

View File

@@ -43,7 +43,7 @@ export function searchgroup(num) {
}) })
} }
// 质检管理_质量情况_查询数据 // 质检管理_质量情况_查询数据
export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4) { export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4, check5, time1, time2, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -53,7 +53,8 @@ export function selecttable(check1, value1, check2, value2, check3, value3, chec
type: '1', type: '1',
name: '质检管理_装配质检_质检情况_查询数据', name: '质检管理_装配质检_质检情况_查询数据',
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&检测项_check=' + check3 + '&检测项流水号=' + value3 + param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&检测项_check=' + check3 + '&检测项流水号=' + value3 +
'&质检情况_check=' + check4 + '&质检情况=' + value4 '&质检情况_check=' + check4 + '&质检情况=' + value4 + '&时间段_check=' + check5 + '&开始时间=' + time1 + '&结束时间=' + time2,
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
@@ -72,4 +73,31 @@ export function selecttable22(check1, value1, check2, value2, check3, value3, ch
} }
}) })
} }
// 检测项明细查询
export function searchMX(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '质检管理_装配质检_明细_质检情况_查询数据',
param: '装配质检流水号=' + num
}
})
}
// 检测统计
export function searchTestStatistics(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '质检管理_装配质检_质检情况_统计数据',
param: '机床流水号=' + num
}
})
}

View File

@@ -188,3 +188,16 @@ export function submitOutPeople(num, people) {
} }
}) })
} }
export function submitEdit(num, num1) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '车间装配管理_部件数量_修改',
param: '组件流水号=' + num + '&部件数量=' + num1
}
})
}

View File

@@ -58,3 +58,29 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
} }
}) })
} }
export function submitNumber(num, num1) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '库存管理_入库记录_编辑数据',
param: '采购入库单号=' + num + '&数量=' + num1
}
})
}
export function deletemessage(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '库存管理_入库记录_删除数据',
param: '采购入库单号=' + num
}
})
}

View File

@@ -46,3 +46,55 @@ export function searchRecord(check1, project, check2, machine, check3, group, ch
} }
}) })
} }
export function submitNumber(num, num1, num2, type) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '库存管理_出库记录_编辑数据_新',
param: '零件流水号=' + num + '&数量=' + num1 + '&机床流水号=' + num2 + '&出库类型=' + type
}
})
}
export function deletemessage(type, num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '库存管理_出库记录_删除数据',
param: '出库类型=' + type + '&零件流水号=' + num
}
})
}
export function searchMax(num, num1) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '库存管理_最大货位存量_查询数据',
param: '物料流水号=' + num + '&组件零件基本件流水号=' + num1
}
})
}
export function initMachine() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}

View File

@@ -71,7 +71,7 @@ export function deleteProcess(NUM) {
} }
}) })
} }
export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, k, m, pageCurrent, pageSize) { export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -79,8 +79,8 @@ export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, check
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '1', type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_横向赋值新建存储过程_新', name: '车间生产管理工艺_追溯加工过程_查询',
param: '项目流水号_check=0=string&机床流水号_check=' + checkbox_Machine + '=string&机床流水号=' + Machine + '=string&组件流水号_check=' + checkbox_Group + '=string&组件流水号=' + Group + '=string&零件图号_check=' + checkbox_number + '=string&零件图号=' + number + '=string&是否查询全部数据=1=string&单件是否外协=1=string&考核状态=6=int&开始时间_check=0&开始时间=' + k + '&结束时间_check=0&结束时间=' + m + `&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output` param: `机床流水号_check=${checkbox_Machine}&机床流水号=${Machine}&组件流水号_check=${checkbox_Group}&组件流水号=${Group}&零件图号_check=${checkbox_number}&零件图号=${number}&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
} }
}) })
} }

View File

@@ -200,3 +200,58 @@ export function getPerson_Form3() {
} }
}) })
} }
// 获取工艺
export function initProcessNumber() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '车间管理_工艺_查询数据'
}
})
}
// 加序
export function addProcess(NUM, NUM1, NUM2) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_自制件插序_增加数据',
param: '工艺计划流水号=' + NUM + '&工序顺序=' + NUM1 + '&工艺编号=' + NUM2
}
})
}
// 删除加序
export function deleteProcess(NUM) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_自制件插序_删除数据',
param: '工序流水号=' + NUM
}
})
}
// 判断能否删除加序
export function isDeleteProcess(NUM) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '车间管理_自制件插序_判断加工',
param: '工序流水号=' + NUM
}
})
}

View File

@@ -32,3 +32,16 @@ export function searchtable2(num1, num2, num3, pageCurrent, pageSize) {
} }
}) })
} }
export function searchoperator() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=12'
}
})
}

View File

@@ -36,7 +36,11 @@ export function getGongxu(num) {
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '3', type: '3',
name: `select 姓名,排产时间,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_视图 where 工艺编号 is not null and 工艺编号<>0 and 考核状态 = 6 and 工艺计划流水号=${num} order by 工序顺序` name: `select 姓名,排产时间,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from
(select 姓名,排产时间,convert(nvarchar(10),工序流水号) as 工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_视图 where 工艺编号 is not null and 工艺编号<>0 and 考核状态 = 6 and 工艺计划流水号=${num}
union
select 姓名,排产时间,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_加序_视图 where 工艺编号 is not null and 工艺编号<>0 and 考核状态 = 6 and 工艺计划流水号=${num}) as a
order by a.工序顺序`
} }
}) })
} }
@@ -48,7 +52,11 @@ export function searchTableData2(num) {
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '3', type: '3',
name: `select 工艺计划流水号,姓名,零件图号,零件名称,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_视图 where 排产人员=${num} and 工序状态<>4 order by 工序顺序` name: `select 工艺计划流水号,姓名,零件图号,零件名称,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from
(select 工艺计划流水号,姓名,零件图号,零件名称,convert(nvarchar(10),工序流水号) as 工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_视图 where 排产人员=${num} and (工序状态<>4 or 工序状态 is null)
union
select 工艺计划流水号,姓名,零件图号,零件名称,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_加序_视图 where 排产人员=${num} and (工序状态<>4 or 工序状态 is null)) as a
order by a.工序顺序`
} }
}) })
} }
@@ -59,8 +67,9 @@ export function XuanRu(num, num2) {
data: { data: {
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '4', type: '2',
name: `update 车间生产管理工艺_零件工序 set 排产人员=${num},排产时间= GETDATE() where 工序流水号=${num2}` name: `车间生产工艺管理_车间排产_插入数据`,
param: `排产人员=${num}&工序流水号=${num2}`
} }
}) })
} }
@@ -71,8 +80,9 @@ export function XuanChu(num) {
data: { data: {
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '4', type: '2',
name: `update 车间生产管理工艺_零件工序 set 排产人员= null,排产时间= null where 工序流水号=${num}` name: `车间生产工艺管理_车间排产_移出数据`,
param: `工序流水号=${num}`
} }
}) })
} }

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
import state from '@/store' import state from '@/store'
import router from '@/router' import router from '@/router'
export function insertInto(num2, num3, num4, num5, num6, num7, num8, num9) { export function insertInto(num2, num3, num4, num5, num6, num7, num8, num9, num10) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -11,7 +11,7 @@ export function insertInto(num2, num3, num4, num5, num6, num7, num8, num9) {
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '2', type: '2',
name: '采购管理_发票结算申请单_增加数据', name: '采购管理_发票结算申请单_增加数据',
param: `发票号=${num2}&发票金额=${num3}&供应商流水号=${num4}&已付款项=${num5}&尚欠金额=${num6}&税额=${num7}&是否费用类=${num8}&备注=${num9}` param: `发票号=${num2}&发票金额=${num3}&供应商流水号=${num4}&已付款项=${num5}&尚欠金额=${num6}&税额=${num7}&是否费用类=${num8}&备注=${num9}&人员编号=${num10}`
} }
}) })
} }
@@ -94,11 +94,25 @@ export function searchTable2(num) {
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '1', type: '1',
name: '采购管理_票结算申请单明细_查询数据', name: '采购管理_票结算申请_查询合同_合并后',
param: `发票结算申请单流水号=${num}` param: `发票结算申请单流水号=${num}`
} }
}) })
} }
// 发票结算申请单明细列表
export function searchTable3(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}&采购合同流水号=${num1}&离线合同流水号=${num2}`
}
})
}
// 根据供应商查询采购合同 // 根据供应商查询采购合同
export function searchPurchase(data) { export function searchPurchase(data) {
return request({ return request({
@@ -183,3 +197,17 @@ export function deleteTable2(data) {
} }
}) })
} }
// 发票附件删除
export function deletepic(data) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '采购管理_发票附件_删除数据',
param: '发票结算申请单流水号=' + data
}
})
}

View File

@@ -17,20 +17,20 @@ export function searchTable1(...group) {
} }
}) })
} }
// 发票结算申请单明细列表 // // 发票结算申请单明细列表
export function searchTable2(num) { // export function searchTable2(num) {
return request({ // return request({
url: '', // url: '',
method: 'post', // method: 'post',
data: { // data: {
UserID: state.state.user.id, // UserID: state.state.user.id,
ModularID: router.currentRoute.path, // ModularID: router.currentRoute.path,
type: '1', // type: '1',
name: '采购管理_发票结算申请单明细_查询数据', // name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}` // param: `发票结算申请单流水号=${num}`
} // }
}) // })
} // }
// 执行审批 // 执行审批
export function excuteApprove(...data) { export function excuteApprove(...data) {
return request({ return request({
@@ -59,3 +59,44 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
} }
}) })
} }
// 发票结算申请单明细列表
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_到票结算申请_查询合同_合并后',
param: `发票结算申请单流水号=${num}`
}
})
}
// 发票结算申请单明细列表
export function searchTable3(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}&采购合同流水号=${num1}&离线合同流水号=${num2}`
}
})
}
export function searchPic(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '发票管理_图片_查询数据',
param: '发票结算申请单流水号=' + num
}
})
}

View File

@@ -17,20 +17,20 @@ export function searchTable1(...group) {
} }
}) })
} }
// 发票结算申请单明细列表 // // 发票结算申请单明细列表
export function searchTable2(num) { // export function searchTable2(num) {
return request({ // return request({
url: '', // url: '',
method: 'post', // method: 'post',
data: { // data: {
UserID: state.state.user.id, // UserID: state.state.user.id,
ModularID: router.currentRoute.path, // ModularID: router.currentRoute.path,
type: '1', // type: '1',
name: '采购管理_发票结算申请单明细_查询数据', // name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}` // param: `发票结算申请单流水号=${num}`
} // }
}) // })
} // }
// 执行审批 // 执行审批
export function excuteApprove(...data) { export function excuteApprove(...data) {
return request({ return request({
@@ -73,3 +73,44 @@ export function cancel(...data) {
} }
}) })
} }
// 发票结算申请单明细列表
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_到票结算申请_查询合同_合并后',
param: `发票结算申请单流水号=${num}`
}
})
}
// 发票结算申请单明细列表
export function searchTable3(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}&采购合同流水号=${num1}&离线合同流水号=${num2}`
}
})
}
export function searchPic(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '发票管理_图片_查询数据',
param: '发票结算申请单流水号=' + num
}
})
}

View File

@@ -138,3 +138,31 @@ export function setChakan2() {
} }
}) })
} }
// 采购合同内容查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})
}
// 查询离线合同明细
export function searchOfflineContractContent(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_离线合同明细_查询数据',
param: `离线合同流水号=${num}`
}
})
}

View File

@@ -43,6 +43,20 @@ export function updateNum(num, id) {
} }
}) })
} }
// 替换验证
export function verification(num, project, machine, group) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: 'PDM_零件明细表_外购件和标准件_数据导入保存_更改物料流水号_验证',
param: `物料流水号=${num}&项目=${project}&机床=${machine}&组号=${group}`
}
})
}
export function isExit1(projectNum, machineNum, groupNum) { export function isExit1(projectNum, machineNum, groupNum) {
return request({ return request({
url: '', url: '',

View File

@@ -85,3 +85,31 @@ export function searchPurchaseContract(check, num) {
} }
}) })
} }
// 采购合同明细查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '车间采购管理_采购合同明细_查询数据NEW',
param: '采购合同流水号=' + num
}
})
}
// 采购合同明细查询
export function searchTable3(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '车间采购管理_采购合同明细_成组采购_查询数据',
param: '采购合同流水号=' + num
}
})
}

View File

@@ -58,7 +58,7 @@
<span style="margin-right: 3%;float: right;margin-top: 15px;color: rgb(42,113,203)">{{ nowTime }}</span> <span style="margin-right: 3%;float: right;margin-top: 15px;color: rgb(42,113,203)">{{ nowTime }}</span>
</el-row> </el-row>
<el-row> <el-row>
<el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 5px" height="720px"> <el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 5px" height="470px">
<el-table-column label="状态" align="center" width="70px"> <el-table-column label="状态" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.状态 }} {{ scope.row.状态 }}
@@ -81,7 +81,7 @@
</el-table-column> </el-table-column>
<el-table-column label="部件数" align="center" width="65px"> <el-table-column label="部件数" align="center" width="65px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.部件数 }} {{ scope.row.总数量 }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="总数量" align="center" width="70px">--> <!--<el-table-column label="总数量" align="center" width="70px">-->
@@ -176,7 +176,7 @@
<el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left: 15px" @click="exportExcel()">导出</el-button> <el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left: 15px" @click="exportExcel()">导出</el-button>
</el-row> </el-row>
<el-row> <el-row>
<el-table v-loading="loading1" :data="tableData1" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 5px" height="720px"> <el-table v-loading="loading1" :data="tableData1" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 5px" height="470px">
<el-table-column label="状态" align="center" width="70px"> <el-table-column label="状态" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.状态 }} {{ scope.row.状态 }}
@@ -187,7 +187,7 @@
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }} {{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床组号" align="center" width="140px"> <el-table-column label="机床组号" align="center" min-width="140px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床组号 }} {{ scope.row.机床组号 }}
</template> </template>
@@ -202,12 +202,12 @@
{{ scope.row.部件数 }} {{ scope.row.部件数 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总数量" align="center" width="80px"> <!--<el-table-column label="总数量" align="center" width="80px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.总数量 }} <!--{{ scope.row.总数量 }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column label="装配工" align="center" width="200px" show-overflow-tooltip> <el-table-column label="装配工" align="center" min-width="240px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.装配工 }} {{ scope.row.装配工 }}
</template> </template>
@@ -309,7 +309,7 @@
:visible.sync="dialogFormVisible4" :visible.sync="dialogFormVisible4"
title="返工详情" title="返工详情"
center center
width="600px"> width="432px">
<el-table <el-table
:data="tableData4" :data="tableData4"
stripe stripe
@@ -693,7 +693,7 @@ export default {
<style scoped> <style scoped>
.main { .main {
width: 1260px; width: 1260px;
height: 855px; height: 665px;
background-color: rgb(230,233,238); background-color: rgb(230,233,238);
} }
.el-form--label-left >>> .el-form-item__label { .el-form--label-left >>> .el-form-item__label {
@@ -757,7 +757,7 @@ export default {
background: #e9c5d1 !important; background: #e9c5d1 !important;
} }
.zhuangpeizhong { .zhuangpeizhong {
background: #E6EAEE !important; background: #98D7FC !important;
} }
.zanting { .zanting {
background: #D8E5F6 !important; background: #D8E5F6 !important;

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-row> <el-row>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin:0px 10px" clearable @change="machineChange()"> <el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin:0px 5px;width: 130px" clearable @change="machineChange()">
<el-option <el-option
v-for="item in machineNumber" v-for="item in machineNumber"
:key="item.value" :key="item.value"
@@ -12,60 +12,60 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div> <div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin:0px 10px;width: 100px" size="small" clearable> <el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin:0px 5px;width: 100px" size="small" clearable>
<el-option <el-option
v-for="item in groupNumber" v-for="item in groupNumber"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-select v-model="TestValue" filterable placeholder="组件名称" style="margin:0px 10px;width: 150px;" size="small" clearable> <el-select v-model="TestValue" filterable placeholder="检测项" style="margin:0px 5px;width: 100px;" size="small" clearable>
<el-option <el-option
v-for="item in Test" v-for="item in Test"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" style="margin:0px 10px;width: 100px;" size="small" clearable> <el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" style="margin:0px 5px;width: 100px;" size="small" clearable>
<el-option <el-option
v-for="item in qualityInspection" v-for="item in qualityInspection"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button> <el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
style="width: 220px;margin:0px 5px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 15px" @click="pageSize=20; pageCurrent= 1;selecttable()">查询</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
<el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button> <el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel1()">导出</el-button>
</el-tooltip> </el-tooltip>
<el-button type="success" size="small" plain icon="el-icon-s-data" style="margin-left: 15px" @click="TestStatistics">检测统计</el-button>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row stripe style="width: 100%" height="750px"> <el-table :data="tableData1" border size="mini" highlight-current-row stripe style="width: 1220px" height="705px">
<el-table-column align="center" prop="是否合格" label="检验情况" width="80px"> <el-table-column label="机床图号" prop="机床图号" align="center" width="130px" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否合格)===0||scope.row.是否合格===''" type="primary" size="small" @click="approvalPass(scope.row)">未检验</el-tag>
<el-tag v-if="parseInt(scope.row.是否合格)===1" type="success" size="small">合格</el-tag>
<el-tag v-if="parseInt(scope.row.是否合格)===2" type="error" size="small">不合格</el-tag>
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床名称" prop="机床名称" align="center" width="250px"> <el-table-column label="组号" prop="组号" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部件名称" prop="组件名称" align="center" width="150px"> <el-table-column label="部件名称" prop="组件名称" align="center" width="130px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组件名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测项" prop="检测项" align="center" width="100px"> <el-table-column label="检测项" prop="检测项" align="center" width="100px">
@@ -73,66 +73,231 @@
{{ scope.row.检测项 }} {{ scope.row.检测项 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测项明细" align="center" width="270px"> <el-table-column label="允差" prop="允差" align="center" width="95px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.检测项明细 }} {{ scope.row.允差 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="质检时间" align="center" width="100px"> <el-table-column label="实测" prop="实测" align="center" width="95px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.质检时间 }} {{ scope.row.实测 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="质检员" align="center" width="100px"> <el-table-column align="center" prop="是否合格" label="判定" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.合格情况 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="装配员" align="center" width="90px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.装配员 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="130px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="质检时间" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.质检时间 }}
</template>
</el-table-column>
<el-table-column label="质检员" align="center" width="80px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="110px">
<template slot-scope="scope">
<el-button :disabled="!scope.row.检测项" type="text" size="mini" @click="searchMX(scope.row)">检测明细</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<!-- <div class="block">--> <div class="block">
<!-- <el-pagination--> <el-pagination
<!-- :current-page="pageCurrent"--> :current-page="pageCurrent"
<!-- :page-sizes="[10, 20, 30, 40, 100]"--> :page-sizes="[10, 20, 30, 40, 100]"
<!-- :page-size="pageSize"--> :page-size="pageSize"
<!-- :total="total"--> :total="total"
<!-- layout="total, sizes, prev, pager, next, jumper"--> layout="total, sizes, prev, pager, next, jumper"
<!-- @size-change="handleSizeChange"--> @size-change="handleSizeChange"
<!-- @current-change="handleCurrentChange"/>--> @current-change="handleCurrentChange"/>
<!-- </div>--> </div>
</el-card> </el-card>
<el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisible"
title="检测明细"
center
width="700px">
<el-table
:data="tableData2"
stripe
tooltip-effect="dark"
style="width: 100%"
height="300"
highlight-current-row
border
size="mini">
<el-table-column align="center" type="index" label="序号" width="50"/>
<el-table-column align="center" label="检测项明细" min-width="200">
<template slot-scope="scope">
{{ scope.row.检测项明细 }}
</template>
</el-table-column>
<el-table-column align="center" label="基准值" width="70">
<template slot-scope="scope">
{{ scope.row.基准值 }}
</template>
</el-table-column>
<el-table-column align="center" label="公差" width="60">
<template slot-scope="scope">
{{ scope.row.公差 }}
</template>
</el-table-column>
<el-table-column align="center" label="实测" width="60">
<template slot-scope="scope">
{{ scope.row.实测 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="100">
<template slot-scope="scope">
{{ scope.row.明细备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="检测结果" width="90">
<template slot-scope="scope">
{{ scope.row.质检结果 }}
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisible2"
title="装配质检统计"
center
width="1100px">
<el-row>
<el-select v-model="machineNumberValue1" filterable placeholder="机床编号" size="small" style="margin:0px 5px;width: 130px" clearable @change="searchTest()">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button type="warning" size="small" icon="el-icon-download" plain style="float: right;margin-right: 15px" @click="exportExcel()">导出</el-button>
</el-row>
<el-table
:data="tableData3"
stripe
tooltip-effect="dark"
style="width: 100%"
height="300"
highlight-current-row
border
size="mini">
<el-table-column align="center" type="index" label="序号" width="50"/>
<el-table-column align="center" label="机床图号" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="60">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="部件名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="装配员" width="70" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.装配员 }}
</template>
</el-table-column>
<el-table-column align="center" label="检测日期" width="90">
<template slot-scope="scope">
{{ scope.row.质检时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="交测项" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.检测项 }}
</template>
</el-table-column>
<el-table-column align="center" label="检测结果" width="80">
<template slot-scope="scope">
{{ scope.row.质检次数 }}
</template>
</el-table-column>
<el-table-column align="center" label="试车" width="70">
<template slot-scope="scope">
{{ Number(scope.row.试车) === 1 ? '√' : '' }}
</template>
</el-table-column>
<el-table-column align="center" label="润滑管路" width="80">
<template slot-scope="scope">
{{ scope.row.润滑管路 === 1 ? '√' : '' }}
</template>
</el-table-column>
<el-table-column align="center" label="辅件齐全" width="80">
<template slot-scope="scope">
{{ scope.row.辅件齐全 === 1 ? '√' : '' }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="质检员" width="70" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div> </div>
</template> </template>
<script>import { initProject, searchgroup, selecttable, searchTest, selecttable22 } from '@/api/Assembly/AssemblyQualityInspection' <script>import { initProject, searchgroup, selecttable, searchTest, searchMX, searchTestStatistics } from '@/api/Assembly/AssemblyQualityInspection'
// import { mapGetters } from 'vuex' // import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
dateRange: '',
machineNumberValue: '', machineNumberValue: '',
machineNumberValue1: '',
machineNumber: [], machineNumber: [],
groupNumberValue: '', groupNumberValue: '',
groupNumber: [], groupNumber: [],
TestValue: '', TestValue: '',
dialogFormVisible: false,
dialogFormVisible2: false,
Test: [], Test: [],
qualityInspectionValue: 2, qualityInspectionValue: '',
qualityInspection: [ qualityInspection: [
{ {
value: 1, value: 1,
label: '合格' label: '合格'
}, { }, {
value: 2, value: 0,
label: '不合格' label: '不合格'
} }
], ],
tableData1: [] tableData1: [],
// total: 0, // 总条数 tableData2: [],
// pageSize: 10, // 每页显示条数 tableData3: [],
// pageCurrent: 1 // 后台获取页 total: 0, // 总条数
pageSize: 20, // 每页显示条数
pageCurrent: 1 // 后台获取页
} }
}, },
created() { created() {
@@ -142,6 +307,39 @@ export default {
this.fetchData() this.fetchData()
}, },
methods: { methods: {
exportExcel() {
var param = []
param[0] = ['机床流水号', this.machineNumberValue1]
var Data = this.CreateData('2001', '报表_质检管理_装配质检_质检情况_统计数据', param)
this.exportExcel_NPOI(Data)
},
exportExcel1() {
let check, check1, check2, check3, check4
this.machineNumberValue ? check = 1 : check = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
this.TestValue ? check3 = 1 : check3 = 0
this.qualityInspectionValue ? check4 = 1 : check4 = 0
var param = []
param[0] = ['机床流水号_check', check]
param[1] = ['机床流水号', this.machineNumberValue1]
param[2] = ['时间段_check', check1]
if (check1 === 0) {
param[3] = ['开始时间', '']
param[4] = ['结束时间', '']
} else {
param[3] = ['开始时间', this.dateRange[0]]
param[4] = ['结束时间', this.dateRange[1]]
}
param[5] = ['检测项_check', check3]
param[6] = ['检测项流水号', this.TestValue]
param[7] = ['质检情况_check', check4]
param[8] = ['质检情况', this.qualityInspectionValue]
param[9] = ['组件流水号_check', check2]
param[10] = ['组件流水号', this.groupNumberValue]
var Data = this.CreateData('2001', '报表_质检管理_装配质检_质检情况_查询数据', param)
this.exportExcel_NPOI(Data)
},
initProject() { initProject() {
initProject().then(response => { initProject().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
@@ -169,27 +367,6 @@ export default {
return v[j] return v[j]
})) }))
}, },
exportExcel() {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.TestValue !== '' && this.TestValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue).then(response => {
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['检验情况', '机床图号', '机床名称', '组号', '部件名称', '检测项', '检测项明细', '质检时间', '质检员', '备注']
const filterVal = ['合格情况', '机床图号', '机床名称', '组号', '组件名称', '检测项', '检测项明细', '质检时间', '姓名', '备注']
const list = response.data
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '装配质检情况表',
autoWidth: true,
bookType: 'xlsx'
})
})
})
},
machineChange() { machineChange() {
this.groupNumberValue = '' this.groupNumberValue = ''
this.groupNumber = [] this.groupNumber = []
@@ -202,26 +379,44 @@ export default {
} }
}) })
}, },
TestStatistics() {
this.machineNumberValue1 = ''
this.dialogFormVisible2 = true
this.tableData3 = []
},
searchTest() {
searchTestStatistics(this.machineNumberValue1).then(response => {
this.tableData3 = response.data
})
},
searchMX(row) {
searchMX(row.装配质检流水号).then(response => {
this.tableData2 = response.data
})
this.dialogFormVisible = true
},
selecttable() { selecttable() {
this.tableData1 = [] this.tableData1 = []
let check1
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 } if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 } if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.TestValue !== '' && this.TestValue !== null) { this.check3 = 1 } else { this.check3 = 0 } if (this.TestValue !== '' && this.TestValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check4 = 1 } else { this.check4 = 0 } if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue).then(response => { selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue, check1, this.dateRange[0], this.dateRange[1], this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data this.tableData1 = response.data.rows
this.total = response.data.total
}) })
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.selecttable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.selecttable()
} }
// 分页
// handleSizeChange(val) {
// this.pageCurrent = 1
// this.pageSize = val
// this.selecttable()
// },
// handleCurrentChange(val) {
// this.pageCurrent = val
// this.selecttable()
// }
} }
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="width: 79%"> <el-card style="width: 81%">
<el-row style="margin-top: 10px; margin-bottom: 10px"> <el-row style="margin-top: 10px; margin-bottom: 10px">
<span>机床编号:</span> <span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()"> <el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()">
@@ -17,7 +17,7 @@
<el-button :disabled="!machineNumberValue" size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 200px" @click="addTaskName()">增加装配任务</el-button> <el-button :disabled="!machineNumberValue" size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 200px" @click="addTaskName()">增加装配任务</el-button>
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 40%; float: left"> <el-card style="width: 42%; float: left">
<el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="570px"> <el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="570px">
<el-table-column label="机床组号" align="center" width="120px" show-overflow-tooltip> <el-table-column label="机床组号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -31,7 +31,7 @@
</el-table-column> </el-table-column>
<el-table-column label="部件数" align="center" width="65px" show-overflow-tooltip> <el-table-column label="部件数" align="center" width="65px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.部件数 }} {{ scope.row.总数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="自制" align="center" width="60px"> <el-table-column label="自制" align="center" width="60px">
@@ -54,9 +54,10 @@
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }} {{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="80px"> <el-table-column label="操作" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="openPeople(scope.row)">分配</el-button> <el-button :disabled="Number(scope.row.是否工作) === 2" type="text" size="mini" @click="openPeople(scope.row)">分配</el-button>
<el-button :disabled="!scope.row.组件流水号" type="text" icon="el-icon-edit" size="mini" @click="editData(scope.row)"/>
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/> <el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
@@ -74,7 +75,7 @@
{{ scope.row.组件名称 }} {{ scope.row.组件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="装配" align="center" width="120px" show-overflow-tooltip> <el-table-column label="装配" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.装配工 }} {{ scope.row.装配工 }}
</template> </template>
@@ -96,7 +97,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="80px"> <el-table-column label="操作" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="outPeople(scope.row)">移出</el-button> <el-button :disabled="Number(scope.row.是否工作) === 2" type="text" size="mini" @click="outPeople(scope.row)">移出</el-button>
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteTask(scope.row)"/> <el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteTask(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
@@ -218,10 +219,29 @@
@click="submitOutPeople">确定</el-button> @click="submitOutPeople">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
v-el-drag-dialog
:visible.sync="dialogFormVisible4"
title="单机部件数"
center
width="300px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="50px">
<el-form-item prop="单机部件数">
<el-input-number v-model="form1.单机部件数" :min="0" size="small" style="width: 150px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitEdit">确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script>import { initProject, searchTable, getMachineNames, selectParts, addData, deletedata, searchPeople, submitPeople, searchTable2, searchName, submitOutPeople, deleteTask, searchGroup } from '@/api/Assembly/AssemblyTaskAssignment' <script>import { initProject, searchTable, getMachineNames, selectParts, addData, deletedata, searchPeople, submitPeople, searchTable2, searchName, submitOutPeople, deleteTask, searchGroup, submitEdit } from '@/api/Assembly/AssemblyTaskAssignment'
// import { mapGetters } from 'vuex' // import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -229,12 +249,14 @@ export default {
machineNumberValue: '', machineNumberValue: '',
machineNumber: [], machineNumber: [],
GroupNumberValue: '', GroupNumberValue: '',
groupValue: '',
GroupNumber: [], GroupNumber: [],
machineNum: '', machineNum: '',
dialogFormVisible: false, dialogFormVisible: false,
dialogFormVisible1: false, dialogFormVisible1: false,
dialogFormVisible2: false, dialogFormVisible2: false,
dialogFormVisible3: false, dialogFormVisible3: false,
dialogFormVisible4: false,
planValue: '', planValue: '',
loading: false, loading: false,
tableData: [], tableData: [],
@@ -258,6 +280,12 @@ export default {
rules: { rules: {
任务名称: [{ required: true, message: '请填写任务名称' }] 任务名称: [{ required: true, message: '请填写任务名称' }]
}, },
form1: {
单机部件数: ''
},
rules1: {
单机部件数: [{ required: true, message: '请填写单机部件数' }]
},
departmentData: [] // 树状数据 departmentData: [] // 树状数据
} }
}, },
@@ -314,6 +342,35 @@ export default {
} }
} }
}, },
editData(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.单机部件数 = row.部件数
this.groupValue = row.组件流水号
this.dialogFormVisible4 = true
},
submitEdit() {
this.$refs['form1'].validate((valid) => {
if (valid) {
if (this.form1.单机部件数 !== 0) {
submitEdit(this.groupValue, this.form1.单机部件数).then(response => {
if (response.data[0].result === '1') {
this.$message.success('更改成功')
this.searchTable()
this.dialogFormVisible4 = false
} else {
this.$message.error('更改失败')
}
})
} else {
this.$message.warning('数量不能为0')
}
} else {
return false
}
})
},
openDialog(row) { openDialog(row) {
this.dialogFormVisible = true this.dialogFormVisible = true
this.departmentData = [] this.departmentData = []
@@ -556,7 +613,7 @@ export default {
background: #e9c5d1 !important; background: #e9c5d1 !important;
} }
.zhuangpeizhong { .zhuangpeizhong {
background: #E6EAEE !important; background: #98D7FC !important;
} }
.zanting { .zanting {
background: #D8E5F6 !important; background: #D8E5F6 !important;

View File

@@ -17,7 +17,7 @@
<el-button :disabled="!machineNumberValue" size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 200px" @click="addTaskName()">增加装配任务</el-button> <el-button :disabled="!machineNumberValue" size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 200px" @click="addTaskName()">增加装配任务</el-button>
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 40%; float: left"> <el-card style="width: 79%; float: left">
<el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="570px"> <el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="570px">
<el-table-column label="机床组号" align="center" width="120px" show-overflow-tooltip> <el-table-column label="机床组号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -29,66 +29,31 @@
{{ scope.row.部件名称 }} {{ scope.row.部件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部件数" align="center" width="65px" show-overflow-tooltip> <el-table-column label="装配人" align="center" width="65px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.部件数 }} {{ scope.row.部件数 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="自制" align="center" width="60px"> <el-table-column label="装配工时" align="center" width="60px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.自制件入库率 }} {{ scope.row.自制件入库率 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="外购" align="center" width="60px"> <el-table-column label="返工工时" align="center" width="60px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.外购件入库率 }} {{ scope.row.外购件入库率 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成组配套" align="center" width="80px"> <el-table-column label="返工详情" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="!scope.row.组件流水号" type="text" size="mini" @click="openDialog(scope.row)">查看详情</el-button> <el-button :disabled="!scope.row.组件流水号" type="text" size="mini" @click="openDialog(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="分配时间" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80px">
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="openPeople(scope.row)">分配</el-button>
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 39%; float: left">
<el-table :data="tableData2" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="570px">
<el-table-column label="状态" align="center" width="60px">
<template slot-scope="scope">
{{ scope.row.状态 }}
</template>
</el-table-column>
<el-table-column label="部件名称" align="center" width="110px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column label="装配工" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.装配工 }}
</template>
</el-table-column>
<el-table-column label="装配开始" align="center" width="85px"> <el-table-column label="装配开始" align="center" width="85px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开始时间 ? scope.row.开始时间.split(' ')[0] : '' }} {{ scope.row.开始时间 ? scope.row.开始时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="装配暂停" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.暂停开始时间 ? scope.row.暂停开始时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="装配结束" align="center" width="85px"> <el-table-column label="装配结束" align="center" width="85px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }} {{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }}
@@ -96,8 +61,17 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="80px"> <el-table-column label="操作" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="outPeople(scope.row)">移出</el-button> <el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="openPeople(scope.row)">编辑</el-button>
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteTask(scope.row)"/> </template>
</el-table-column>
<el-table-column label="编辑人" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="编辑时间" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -388,6 +388,7 @@
<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">
<el-button :disabled="selectInto_disable || Number(审批情况)===1" size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button> <el-button :disabled="selectInto_disable || Number(审批情况)===1" size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button>
</el-tooltip> </el-tooltip>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="warning" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="saveList()">保存领料单</el-button>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button> <el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button> <el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>
</el-row> </el-row>
@@ -977,7 +978,13 @@ export default {
let check, isElectrical, check1 let check, isElectrical, check1
this.pickingListPeople ? check = 1 : check = 0 this.pickingListPeople ? check = 1 : check = 0
this.startTime ? check1 = 1 : (check1 = 0, this.startTime = '') this.startTime ? check1 = 1 : (check1 = 0, this.startTime = '')
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长 if (Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35) { // 35电工 36电气部长 37电气副部长
isElectrical = 1
} else if (Number(this.token) === 15) { // 15库管员
isElectrical = 2
} else {
isElectrical = 0
}
searchList(this.pageCurrent3, this.pageSize3, check, this.pickingListPeople, isElectrical, check1, this.startTime[0], this.startTime[1]).then(response => { searchList(this.pageCurrent3, this.pageSize3, check, this.pickingListPeople, isElectrical, check1, this.startTime[0], this.startTime[1]).then(response => {
this.pickListTable1 = response.data.rows this.pickListTable1 = response.data.rows
this.total3 = response.data.total this.total3 = response.data.total
@@ -1016,7 +1023,13 @@ export default {
submitCreateList() { submitCreateList() {
this.createList_disable = true this.createList_disable = true
let isElectrical let isElectrical
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长 if (Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35) { // 35电工 36电气部长 37电气副部长
isElectrical = 1
} else if (Number(this.token) === 15) { // 15库管员
isElectrical = 2
} else {
isElectrical = 0
}
createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical, this.form1.机床图号, this.form1.组号).then(response => { createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical, this.form1.机床图号, this.form1.组号).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('创建成功') this.$message.success('创建成功')
@@ -1055,6 +1068,39 @@ export default {
}) })
}) })
}, },
saveList() {
if (this.pickingListNum) {
this.$confirm('是否确认保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const param = {
url: '',
method: 'post',
data: {
type: '4',
name: `update 车间装配管理_领料单 set 是否审批 = 1 where 领料单流水号 = ${this.pickingListNum}`
}
}
request(param).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.searchList()
} else {
this.$message.error('操作失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
} else {
this.$message.warning('请选择领料单')
}
},
// 删除领料单 // 删除领料单
dropList() { dropList() {
this.$confirm(`确定删除<p style="color: red;display: inline-block"> ${this.pickingListNumberShow}</p> 领料单吗?`, '提示', { this.$confirm(`确定删除<p style="color: red;display: inline-block"> ${this.pickingListNumberShow}</p> 领料单吗?`, '提示', {

View File

@@ -408,6 +408,9 @@ export default {
// 打开表单 // 打开表单
parOut(row) { parOut(row) {
// this.form.DirectNoteCode = '' // this.form.DirectNoteCode = ''
// if (this.$refs['form'] !== undefined) {
// this.$refs['form'].resetFields()
// }
this.locateNumber = row.货位流水号 this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号 this.materialNumber = row.物料流水号
this.partnumber = row.货位存量 this.partnumber = row.货位存量

View File

@@ -56,33 +56,33 @@
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 1300px"> <el-card style="width: 1300px">
<el-table :data="tableData1" border stripe size="mini" style="width: 100%;" height="700"> <el-table :data="tableData1" border stripe size="mini" style="width: 88%;" height="700">
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip> <el-table-column label="机床图号" prop="机床图号" align="center" width="90" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="80" show-overflow-tooltip> <el-table-column label="组号" prop="组号" align="center" width="60" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" prop="供应商" align="center" width="180" show-overflow-tooltip> <el-table-column label="供应商" prop="供应商" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="名称" prop="名称" align="center" width="150" show-overflow-tooltip> <el-table-column label="名称" prop="名称" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.名称 }} {{ scope.row.名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号或型号" prop="图号或型号" align="center" width="200" show-overflow-tooltip> <el-table-column label="图号或型号" prop="图号或型号" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.图号或型号 }} {{ scope.row.图号或型号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="规格" align="center" width="220" show-overflow-tooltip> <el-table-column label="规格" prop="规格" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.规格 }} {{ scope.row.规格 }}
</template> </template>
@@ -97,16 +97,24 @@
{{ scope.row.入库数量 }} {{ scope.row.入库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库人" prop="入库人" align="center" width="80" show-overflow-tooltip> <el-table-column label="入库人" prop="入库人" align="center" width="75" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库人 }} {{ scope.row.入库人 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库时间" prop="入库时间" align="center" width="90"> <el-table-column label="入库时间" prop="入库时间" align="center" width="85">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库时间 ? scope.row.入库时间.split(' ')[0] : '-' }} {{ scope.row.入库时间 ? scope.row.入库时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="editNumber(scope.row)">更改</el-button>
<el-tooltip content="删除入库记录" placement="top">
<el-button type="text" size="mini" icon="el-icon-delete" style="margin-left: 20px" @click="deletemessage(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;"> <div class="block" style="margin-top: 10px;">
<el-pagination <el-pagination
@@ -120,11 +128,21 @@
@current-change="handleCurrentChange1"/> @current-change="handleCurrentChange1"/>
</div> </div>
</el-card> </el-card>
<el-dialog :visible.sync="dialogFormVisible" title="更改数量" center width="300px">
<el-form ref="form" :model="form" label-position="left" label-width="80px" class="demo-ruleForm">
<el-form-item label="数量" prop="数量">
<el-input-number v-model="form.数量" :min="1" :step="1" style="width: 140px" size="small" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :disabled="handleEdit_disable" size="small" type="primary" @click="submitNumber()"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { initMachineProject, searchGroup, searchRecord1, searchSupplier } from '@/api/Inventory/PurchaseInRecord' import { initMachineProject, searchGroup, searchRecord1, searchSupplier, submitNumber, deletemessage } from '@/api/Inventory/PurchaseInRecord'
export default { export default {
name: 'PurchaseInRecord', name: 'PurchaseInRecord',
data() { data() {
@@ -143,7 +161,13 @@ export default {
pageCurrent1: 1, pageCurrent1: 1,
total1: 0, total1: 0,
supplierValues: [], supplierValues: [],
supplierValue: '' supplierValue: '',
inRecordNumber: '',
form: {
数量: ''
},
handleEdit_disable: false,
dialogFormVisible: false
} }
}, },
watch: { watch: {
@@ -225,6 +249,47 @@ export default {
} }
}) })
}, },
editNumber(row) {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogFormVisible = true
this.inRecordNumber = row.采购入库单号
this.form.数量 = Number(row.入库数量)
},
submitNumber() {
submitNumber(this.inRecordNumber, this.form.数量).then(response => {
console.log(response)
if (response.data[0].result === '1') {
this.$message.success('更改成功')
this.searchRecord1()
this.dialogFormVisible = false
} else {
this.$message.error('更改失败')
}
})
},
deletemessage(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletemessage(row.采购入库单号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchRecord1()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
searchRecord() { searchRecord() {
this.pageCurrent1 = 1 this.pageCurrent1 = 1
this.pageSize1 = 40 this.pageSize1 = 40

View File

@@ -49,18 +49,18 @@
</el-row> </el-row>
</el-card> </el-card>
<el-card style="width: 1430px"> <el-card style="width: 1430px">
<el-table :data="tableData" border stripe size="mini" style="width: 98%" height="700"> <el-table :data="tableData" border stripe size="mini" style="width: 70%" height="700">
<el-table-column label="名称" align="center" width="180" show-overflow-tooltip> <el-table-column label="名称" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.名称 }} {{ scope.row.名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号或型号" align="center" width="180" show-overflow-tooltip> <el-table-column label="图号或型号" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.图号或型号 }} {{ scope.row.图号或型号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" align="center" width="250" show-overflow-tooltip> <el-table-column label="规格" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.规格 }} {{ scope.row.规格 }}
</template> </template>
@@ -70,7 +70,7 @@
{{ scope.row.计量单位 }} {{ scope.row.计量单位 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" width="220" show-overflow-tooltip> <el-table-column label="机床图号" prop="机床图号" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
@@ -80,24 +80,22 @@
{{ scope.row.出库数量 }} {{ scope.row.出库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="领料人" align="center" width="100" show-overflow-tooltip> <el-table-column label="领料人" align="center" width="90" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.领料人 }} {{ scope.row.领料人 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出库时间" align="center" min-width="90"> <el-table-column label="出库时间" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }} {{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退货数量" align="center" min-width="90"> <el-table-column label="操作" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.退料数量 }} <el-button type="text" size="mini" @click="editNumber(scope.row)">更改</el-button>
</template> <el-tooltip content="删除出库记录" placement="top">
</el-table-column> <el-button type="text" size="mini" icon="el-icon-delete" style="margin-left: 20px" @click="deletemessage(scope.row)"/>
<el-table-column label="退货时间" align="center" min-width="90"> </el-tooltip>
<template slot-scope="scope">
{{ scope.row.退料时间 ? scope.row.退料时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -113,16 +111,45 @@
@current-change="handleCurrentChange1"/> @current-change="handleCurrentChange1"/>
</div> </div>
</el-card> </el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="更改数量" center width="300px">
<el-form ref="form" :model="form" label-position="left" label-width="80px" class="demo-ruleForm">
<el-form-item label="数量" prop="数量">
<el-input-number v-model="form.数量" :max="maxNumber+form.数量" :min="1" :step="1" style="width: 140px" size="small" />
</el-form-item>
<el-form-item label="机床" prop="机床">
<el-select v-model="form.machineValue" :disabled="isDisabled" style="width: 140px" filterable size="small" placeholder="机床名称">
<el-option
v-for="item in machine1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :disabled="handleEdit_disable" size="small" type="primary" @click="submitNumber()"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { initMachineProject, searchGroup, searchRecord } from '@/api/Inventory/PurchaseOutRecord' import { initMachineProject, searchGroup, searchRecord, submitNumber, deletemessage, searchMax, initMachine } from '@/api/Inventory/PurchaseOutRecord'
export default { export default {
name: 'PurchaseOutRecord', name: 'PurchaseOutRecord',
data() { data() {
return { return {
loading_export: false, loading_export: false,
dialogVisible3: false,
materialOld111: '',
materialNew: '',
materialName0: '',
materialSpec0: '',
materialModel0: '',
tableData02: [],
pageCurrent02: 1,
pageSize02: 10,
total02: 0,
projectValue: '', // 项目名称 projectValue: '', // 项目名称
project: [], project: [],
machineValue: '', machineValue: '',
@@ -132,10 +159,23 @@ export default {
name: '', name: '',
spec: '', spec: '',
model: '', model: '',
maxNumber: '',
machine1: [],
tableData: [], tableData: [],
pageSize1: 100, pageSize1: 100,
pageCurrent1: 1, pageCurrent1: 1,
total1: 0, total1: 0,
floatNumber: '',
materialNumber: '',
groupBasicNumber: '',
isDisabled: false,
type: '',
form: {
数量: '',
machineValue: ''
},
handleEdit_disable: false,
dialogFormVisible: false,
outTime: '' // 出库时间 outTime: '' // 出库时间
} }
}, },
@@ -185,6 +225,62 @@ export default {
this.loading_export = false this.loading_export = false
}, 5000) }, 5000)
}, },
searchMax() {
searchMax(this.materialNumber, this.groupBasicNumber).then(response => {
console.log(response, 123)
this.maxNumber = Number(response.data[0].货位存量1)
}).then(() => {
this.dialogFormVisible = true
})
},
editNumber(row) {
if (row.出库类型 === '物料出库') {
this.isDisabled = true
}
this.materialNumber = row.物料流水号
this.groupBasicNumber = row.组件零件基本件流水号
this.floatNumber = row.零件流水号
this.searchMax()
this.type = row.出库类型
this.form.数量 = Number(row.出库数量)
this.form.machineValue = Number(row.机床流水号)
},
submitNumber() {
if (this.form.machineValue) {
submitNumber(this.floatNumber, this.form.数量, this.form.machineValue, this.type).then(response => {
if (response.data[0].result === '1') {
this.$message.success('更改成功')
this.searchRecord()
this.dialogFormVisible = false
} else {
this.$message.error('更改失败')
}
})
} else {
this.$message.warning('机床不能为空')
}
},
deletemessage(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletemessage(row.出库类型, row.零件流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchRecord()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
fetchData() { fetchData() {
initMachineProject().then(response => { initMachineProject().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
@@ -195,6 +291,15 @@ export default {
}) })
} }
}) })
initMachine().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine1.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
}, },
machineChange() { machineChange() {
this.group = [] this.group = []

View File

@@ -427,39 +427,11 @@ export default {
this.tableData = [] this.tableData = []
// this.tableData1 = [] // this.tableData1 = []
this.loading0 = true this.loading0 = true
if (this.Machine === '') { this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
this.checkbox_Machine = 0 this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
} else { this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
this.checkbox_Machine = 1 getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
} this.tableData = response.data.result
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.number === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.result.length !== 0) {
for (let i = 0; i < response.data.result.length; i++) {
this.tableData.push({
工艺计划流水号: response.data.result[i].工艺计划流水号,
考核状态: response.data.result[i].考核状态,
序号: response.data.result[i].序号,
跟单号: response.data.result[i].跟单号,
零件图号: response.data.result[i].零件图号,
零件名称: response.data.result[i].零件名称,
加工数: response.data.result[i].完成数量, // MES里采集 现在没有
投产数量: response.data.result[i].批次数量,
完成日期: response.data.result[i].机加工实际完成时间 ? response.data.result[i].机加工实际完成时间.split(' ')[0] : '', // 排产时间
计划结束时间: response.data.result[i].机加工结束时间 ? response.data.result[i].机加工结束时间.split(' ')[0] : '',
客户名称: response.data.result[i].客户名称 // 客户名
})
}
}
this.total = parseInt(response.data.output[0].ItemCount) this.total = parseInt(response.data.output[0].ItemCount)
this.loading0 = false this.loading0 = false
}).catch(() => { }).catch(() => {

View File

@@ -25,6 +25,16 @@
{{ scope.row.跟单号 }} {{ scope.row.跟单号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号及规格" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.图号及规格 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center" width="130">
<template slot-scope="scope">
{{ scope.row.制品名称 }}
</template>
</el-table-column>
<el-table-column label="工序" align="center" width="50"> <el-table-column label="工序" align="center" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.序号 }} {{ scope.row.序号 }}
@@ -100,16 +110,6 @@
{{ scope.row.加工完成时间 }} {{ scope.row.加工完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号及规格" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.图号及规格 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.制品名称 }}
</template>
</el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination <el-pagination

View File

@@ -60,16 +60,6 @@
{{ scope.row.报废数量 }} {{ scope.row.报废数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="报废时间" width="85px">
<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="报废工序" width="80px"> <el-table-column align="center" label="报废工序" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工艺名称 }} {{ scope.row.工艺名称 }}
@@ -80,6 +70,11 @@
{{ scope.row.报废原因 }} {{ scope.row.报废原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="报废工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.报废工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作工人" width="80px" show-overflow-tooltip> <el-table-column align="center" label="操作工人" width="80px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.操作工 === '超级管理员' ? '' : scope.row.操作工 }} {{ scope.row.操作工 === '超级管理员' ? '' : scope.row.操作工 }}
@@ -95,11 +90,6 @@
{{ scope.row.质检人 }} {{ scope.row.质检人 }}
</template> </template>
</el-table-column> </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="补投数" width="70px"> <el-table-column align="center" label="补投数" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.补投数量 }} {{ scope.row.补投数量 }}
@@ -115,6 +105,16 @@
{{ scope.row.补投人 }} {{ scope.row.补投人 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="报废时间" width="85px">
<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 label="操作" align="center" width="80px"> <el-table-column label="操作" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" plain size="small" @click="fetchTableData2(scope.row)">加工过程</el-button> <el-button type="text" plain size="small" @click="fetchTableData2(scope.row)">加工过程</el-button>

View File

@@ -44,8 +44,8 @@ import { getMachine, searchState, getData3 } from '@/api/ManufacturingCenter/Equ
export default { export default {
data() { data() {
return { return {
date1: '20191201', date1: '',
date2: '20191204', date2: '',
MachineValue: '', MachineValue: '',
Machine: [], Machine: [],
colors: [], colors: [],
@@ -55,6 +55,7 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.getCurrentTime()
}, },
methods: { methods: {
fetchData() { fetchData() {
@@ -70,6 +71,27 @@ export default {
} }
}) })
}, },
getCurrentTime() {
this.date1 = this.getTime0(-10)
this.date2 = this.getTime0(0)
},
getTime0(num) {
var date0 = new Date()
var date = new Date(date0.getTime() + num * 24 * 60 * 60 * 1000)
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
var hour = this.zeroFill(date.getHours())
var minute = this.zeroFill(date.getMinutes())
var second = this.zeroFill(date.getSeconds())
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
},
zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
},
searchData() { searchData() {
if (this.date1 === null || this.date2 === null) { if (this.date1 === null || this.date2 === null) {
this.$message.warning('请选择开始时间或结束时间') this.$message.warning('请选择开始时间或结束时间')

View File

@@ -62,7 +62,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="入库数量"> <el-table-column align="center" label="入库数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库数量 }} {{ scope.row.入库数量 ? scope.row.入库数量 : 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="类别"> <el-table-column align="center" label="类别">
@@ -77,12 +77,12 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="实际完成"> <el-table-column align="center" label="实际完成">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机加工实际完成时间 }} {{ scope.row.机加工实际完成时间 ? scope.row.机加工实际完成时间 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="入库时间"> <el-table-column align="center" label="入库时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库时间 }} {{ scope.row.入库时间 ? scope.row.入库时间 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" fixed="right"> <el-table-column align="center" label="操作" fixed="right">
@@ -152,17 +152,17 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="用库存数"> <el-table-column align="center" label="用库存数">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.使用库存数 }} {{ scope.row.使用库存数 ? scope.row.使用库存数 : 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购时间"> <el-table-column align="center" label="采购时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : scope.row.采购时间.split(' ')[0] }} {{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : (scope.row.采购时间 ? scope.row.采购时间.split(' ')[0] : '—') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="到货数量"> <el-table-column align="center" label="到货数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '' : scope.row.已到货数量 || scope.row.离线到货数量 || '' }} {{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '0' : scope.row.已到货数量 || scope.row.离线到货数量 || '0' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -226,22 +226,22 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="用滞货数"> <el-table-column align="center" label="用滞货数">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.使用滞货数量 }} {{ scope.row.使用滞货数量 ? scope.row.使用滞货数量 : 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="用库存数"> <el-table-column align="center" label="用库存数">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.使用库存数 }} {{ scope.row.使用库存数 ? scope.row.使用库存数 : 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购时间"> <el-table-column align="center" label="采购时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : scope.row.采购时间.split(' ')[0] }} {{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : (scope.row.采购时间 ? scope.row.采购时间.split(' ')[0] : '—') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="到货数量"> <el-table-column align="center" label="到货数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '' : scope.row.已到货数量 || scope.row.离线到货数量 || '' }} {{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '0' : scope.row.已到货数量 || scope.row.离线到货数量 || '0' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -305,17 +305,17 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购数量"> <el-table-column align="center" label="采购数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || '—' }} {{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : (scope.row.数量 !== '0.00' ? scope.row.数量 : '—' ) || '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购时间"> <el-table-column align="center" label="采购时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : (scope.row.采购日期 ? scope.row.采购日期.split(' ')[0]: '') }} {{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : (scope.row.采购时间 ? scope.row.采购时间.split(' ')[0] : '') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="到货数量"> <el-table-column align="center" label="到货数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '' : scope.row.已到货数量 || '' }} {{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '0' : scope.row.已到货数量 || '0' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -8,7 +8,7 @@
<el-button v-positive="'loading'" :disabled="false" type="success" icon="el-icon-bottom" plain size="small" @click="exportExcel()">导出</el-button> <el-button v-positive="'loading'" :disabled="false" type="success" icon="el-icon-bottom" plain size="small" @click="exportExcel()">导出</el-button>
</el-row> </el-row>
</div> </div>
<el-table :data="tableData1" stripe highlight-current-row border height="600px" style="width: 670px" size="mini"> <el-table :data="tableData1" stripe highlight-current-row border height="600px" style="width: 580px" size="mini">
<el-table-column label="名称" prop="物料名称" align="center" width="150" show-overflow-tooltip> <el-table-column label="名称" prop="物料名称" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
@@ -48,11 +48,6 @@
<span v-else>{{ scope.row.货位存量 }}</span> <span v-else>{{ scope.row.货位存量 }}</span>
</template> </template>
</el-table-column> </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" width="100">--> <!-- <el-table-column label="操作" align="center" width="100">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->

View File

@@ -47,6 +47,11 @@
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="名称" fixed="left" show-overflow-tooltip width="100px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="工序" fixed="left" width="50px"> <el-table-column align="center" label="工序" fixed="left" width="50px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工序顺序 }} {{ scope.row.工序顺序 }}
@@ -72,16 +77,16 @@
{{ scope.row.完成工时 }} {{ scope.row.完成工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="完成工时(分)" width="70px">
<template slot-scope="scope">
{{ Number(scope.row.完成工时) + Number(scope.row.修补工时) }}
</template>
</el-table-column>
<el-table-column align="center" label="准结(分)" width="70px"> <el-table-column align="center" label="准结(分)" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.修补工时 }} {{ scope.row.修补工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="完成工时(分)" width="70px">
<template slot-scope="scope">
{{ Number(scope.row.完成工时) + Number(scope.row.修补工时) }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="50px" show-overflow-tooltip=""> <el-table-column align="center" label="备注" width="50px" show-overflow-tooltip="">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}

View File

@@ -20,6 +20,8 @@
</el-select> </el-select>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;margin:0px 10px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;margin:0px 10px;"/>
<el-button type="primary" class="el-icon-search" size="small" plain style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button> <el-button type="primary" class="el-icon-search" size="small" plain style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
<el-button :disabled="isAddProcess" type="warning" class="el-icon-plus" size="small" plain style="margin: 0px 10px;" @click="addTableData()">加序</el-button>
<el-button :disabled="isProcess" type="danger" class="el-icon-delete" size="small" plain style="margin: 0px 10px;" @click="deleteProcess()">删除加序</el-button>
<el-button v-positive="'loading'" :disabled="false" type="warning" class="el-icon-download" size="small" plain style="margin: 10px 0 0 10px" @click="exportExcel">导出</el-button> <el-button v-positive="'loading'" :disabled="false" type="warning" class="el-icon-download" size="small" plain style="margin: 10px 0 0 10px" @click="exportExcel">导出</el-button>
</el-card> </el-card>
<el-row> <el-row>
@@ -278,11 +280,33 @@
<el-button :disabled="EditWorkingHours_disable" type="primary" @click="submit3('form3')" >确定</el-button> <el-button :disabled="EditWorkingHours_disable" type="primary" @click="submit3('form3')" >确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="加序" center style="min-height: 300px" width="360px">
<el-form ref="form4" :model="form4" :rules="rules4" label-position="left" label-width="90px" class="demo-ruleForm">
<el-row width="200px">
<el-form-item label="序号" prop="工序顺序" >
<el-input v-model="form4.工序顺序" size="small" style="width: 160px;margin:0px 10px" placeholder="序号"/>
</el-form-item>
<el-form-item label="工序名称" prop="工艺编号" >
<el-select v-model="form4.工艺编号" filterable size="small" style="width:160px;margin:0px 10px" placeholder="工艺编号">
<el-option
v-for="item in ProcessNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffProcess('form4')">取消</el-button>
<el-button type="primary" @click="submitProcess('form4')" >确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, getExport, searchWorkTime, submit2, submitEdit3, getPerson_Form3 } from '@/api/ManufacturingCenter/ProcessingStatusNew' import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, getExport, searchWorkTime, submit2, submitEdit3, getPerson_Form3, initProcessNumber, addProcess, deleteProcess, isDeleteProcess } from '@/api/ManufacturingCenter/ProcessingStatusNew'
export default { export default {
data() { data() {
@@ -313,6 +337,7 @@ export default {
endTime: '', endTime: '',
dateOfProduction: '', // 排产时间 dateOfProduction: '', // 排产时间
title: '', title: '',
ProcessNumber: [], // 工艺
dialogFormVisible: false, dialogFormVisible: false,
form: { form: {
人员: '', 人员: '',
@@ -325,6 +350,8 @@ export default {
完成时间: [{ required: true, message: '请选择实际完成时间', trigger: 'change' }] 完成时间: [{ required: true, message: '请选择实际完成时间', trigger: 'change' }]
}, },
dialogFormVisible1: false, dialogFormVisible1: false,
isProcess: true,
isAddProcess: true,
data2: [], data2: [],
List1: [], List1: [],
ssks: '', ssks: '',
@@ -338,10 +365,12 @@ export default {
数量: '' 数量: ''
}, },
操作者: [], 操作者: [],
People: [],
max: 0, max: 0,
// new 20200213修补加工工时↓ // new 20200213修补加工工时↓
dialogFormVisible3: false, dialogFormVisible3: false,
person_Form3: [], person_Form3: [],
process: '',
form3: { form3: {
人员: '', 人员: '',
完成数量: '', 完成数量: '',
@@ -354,6 +383,15 @@ export default {
修补工时: [{ required: true, message: '请输入修补工时', trigger: 'blur' }], 修补工时: [{ required: true, message: '请输入修补工时', trigger: 'blur' }],
完成数量: [{ required: true, message: '请输入完成数量', trigger: 'blur' }] 完成数量: [{ required: true, message: '请输入完成数量', trigger: 'blur' }]
}, },
dialogFormVisible4: false,
form4: {
工序顺序: '',
工艺编号: ''
},
rules4: {
工序顺序: [{ required: true, message: '请填写工序顺序', trigger: 'change' }],
工艺编号: [{ required: true, message: '请选择工序名称', trigger: 'change' }]
},
批次数量: 0 批次数量: 0
} }
}, },
@@ -400,6 +438,103 @@ export default {
} }
} }
}, },
addTableData() {
if (this.$refs['form4'] !== undefined) {
this.$refs['form4'].resetFields()
}
this.form4.工序顺序 = ''
this.form4.工艺编号 = ''
this.dialogFormVisible4 = true
},
submitProcess() {
this.$refs['form4'].validate((valid) => {
if (valid) {
addProcess(this.row2, this.form4.工序顺序, this.form4.工艺编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('加序成功')
this.dialogFormVisible4 = false
this.tableData1 = []
gettabledata1(this.row2).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
工艺名称: response.data[i].工艺名称,
工序顺序: response.data[i].工序顺序,
加工开始时间: response.data[i].加工开始时间 ? response.data[i].加工开始时间 : '',
完成日期: response.data[i].加工完成时间 ? response.data[i].加工完成时间 : '',
操作者: response.data[i].姓名,
批次数量: response.data[i].批次数量,
工序流水号: response.data[i].工序流水号,
完成过程流水号: response.data[i].完成过程流水号,
工序状态: response.data[i].工序状态,
完成数量: response.data[i].完成数量,
工序间是否外协: response.data[i].工序间是否外协,
检验数量: response.data[i].检验数量,
不合格数量: response.data[i].不合格数量,
是否加序: response.data[i].是否加序
})
}
}
})
} else {
this.$message.error('加序失败')
}
})
}
})
},
callOffProcess(formName) {
this.dialogFormVisible4 = false
this.$refs[formName].resetFields()
},
deleteProcess() {
this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
isDeleteProcess(this.processSerialNumber).then(response => {
if (response.data[0].结果 === 0) {
this.$message.warning('该工序正在加工,不能删除')
} else {
deleteProcess(this.processSerialNumber).then(response => {
if (response.data[0].result === '1') {
console.log(response.data)
this.$message.success('删除成功')
this.tableData1 = []
gettabledata1(this.row2).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
工艺名称: response.data[i].工艺名称,
工序顺序: response.data[i].工序顺序,
加工开始时间: response.data[i].加工开始时间 ? response.data[i].加工开始时间 : '',
完成日期: response.data[i].加工完成时间 ? response.data[i].加工完成时间 : '',
操作者: response.data[i].姓名,
批次数量: response.data[i].批次数量,
工序流水号: response.data[i].工序流水号,
完成过程流水号: response.data[i].完成过程流水号,
工序状态: response.data[i].工序状态,
完成数量: response.data[i].完成数量,
工序间是否外协: response.data[i].工序间是否外协,
检验数量: response.data[i].检验数量,
不合格数量: response.data[i].不合格数量,
是否加序: response.data[i].是否加序
})
}
}
})
} else { this.$message.error('删除失败') }
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
getCurrentRow_Click(row) { getCurrentRow_Click(row) {
this.isDisabled = true this.isDisabled = true
this.completeTime = '' this.completeTime = ''
@@ -420,8 +555,10 @@ export default {
完成过程流水号: response.data[i].完成过程流水号, 完成过程流水号: response.data[i].完成过程流水号,
工序状态: response.data[i].工序状态, 工序状态: response.data[i].工序状态,
完成数量: response.data[i].完成数量, 完成数量: response.data[i].完成数量,
工序间是否外协: response.data[i].工序间是否外协,
检验数量: response.data[i].检验数量, 检验数量: response.data[i].检验数量,
不合格数量: response.data[i].不合格数量 不合格数量: response.data[i].不合格数量,
是否加序: response.data[i].是否加序
}) })
} }
} }
@@ -571,6 +708,7 @@ export default {
}, },
// 获取工序表 // 获取工序表
getCurrentRow(row) { getCurrentRow(row) {
row.工艺计划流水号 ? this.isAddProcess = false : this.isAddProcess = true
this.loading2 = true this.loading2 = true
this.批次数量 = row.批次数量 this.批次数量 = row.批次数量
this.index = row.index this.index = row.index
@@ -597,7 +735,8 @@ export default {
完成数量: response.data[i].完成数量, 完成数量: response.data[i].完成数量,
工序间是否外协: response.data[i].工序间是否外协, 工序间是否外协: response.data[i].工序间是否外协,
检验数量: response.data[i].检验数量, 检验数量: response.data[i].检验数量,
不合格数量: response.data[i].不合格数量 不合格数量: response.data[i].不合格数量,
是否加序: response.data[i].是否加序
}) })
} }
this.loading2 = false this.loading2 = false
@@ -616,15 +755,19 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({ this.tableData1.push({
工艺名称: response.data[i].工艺名称, 工艺名称: response.data[i].工艺名称,
间质检: response.data[i].质检结果, 工序顺: response.data[i].工序顺序,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '', 加工开始时间: response.data[i].加工开始时间 ? response.data[i].加工开始时间 : '',
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '', 完成日期: response.data[i].加工完成时间 ? response.data[i].加工完成时间 : '',
操作者: response.data[i].操作者, 操作者: response.data[i].姓名,
不合格数量: response.data[i].不合格数量, 批次数量: response.data[i].批次数量,
质检数量: response.data[i].数量,
工序流水号: response.data[i].工序流水号, 工序流水号: response.data[i].工序流水号,
完成过程流水号: response.data[i].完成过程流水号,
工序状态: response.data[i].工序状态, 工序状态: response.data[i].工序状态,
完成数量: response.data[i].完成数量 完成数量: response.data[i].完成数量,
工序间是否外协: response.data[i].工序间是否外协,
检验数量: response.data[i].检验数量,
不合格数量: response.data[i].不合格数量,
是否加序: response.data[i].是否加序
}) })
} }
} }
@@ -642,6 +785,7 @@ export default {
this.dateOfProduction = row.排产日期 this.dateOfProduction = row.排产日期
this.processSerialNumber = row.工序流水号 this.processSerialNumber = row.工序流水号
if (this.processSerialNumber) { this.isDisabled = false } else { this.isDisabled = true } if (this.processSerialNumber) { this.isDisabled = false } else { this.isDisabled = true }
row.是否加序 === 1 ? this.isProcess = false : this.isProcess = true
}, },
dialogTableVisible() { dialogTableVisible() {
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
@@ -665,6 +809,20 @@ export default {
this.khbmbh = 12 // 考核部门编号 this.khbmbh = 12 // 考核部门编号
getTable8(this.khbmbh).then(response => { getTable8(this.khbmbh).then(response => {
this.List1 = response.data this.List1 = response.data
for (let i = 0; i < response.data.length; i++) {
this.People.push({
value: response.data[i].人员编号,
label: response.data[i].姓名
})
}
})
initProcessNumber().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ProcessNumber.push({
value: response.data[i].工艺编号,
label: response.data[i].工艺名称
})
}
}) })
}, },
// 获取当前行人员信息 // 获取当前行人员信息

View File

@@ -96,27 +96,27 @@
{{ scope.row.未通过审批原因 === '通过' ? '' : scope.row.未通过审批原因 }} {{ scope.row.未通过审批原因 === '通过' ? '' : scope.row.未通过审批原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="财务审批" align="center" min-width="80"> <!-- <el-table-column label="财务审批" align="center" min-width="80">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.付款人姓名 }} <!-- {{ scope.row.付款人姓名 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="财务审批时间" align="center" min-width="80"> <!-- <el-table-column label="财务审批时间" align="center" min-width="80">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.付款时间 ? scope.row.付款时间.split(' ')[0] : '' }} <!-- {{ scope.row.付款时间 ? scope.row.付款时间.split(' ')[0] : '' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="财务审批结果" align="center" min-width="80"> <!-- <el-table-column label="财务审批结果" align="center" min-width="80">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.付款情况内容 }} <!-- {{ scope.row.付款情况内容 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="未过原因" align="center" min-width="60"> <!-- <el-table-column label="未过原因" align="center" min-width="60">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }} <!-- {{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="110px" fixed="right"> <el-table-column label="操作" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
<div style="display: inline-block;"> <div style="display: inline-block;">

View File

@@ -36,7 +36,7 @@
</el-card> </el-card>
<el-card style="margin-top: 5px"> <el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row> <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="供应商" align="center" min-width="150"> <el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
@@ -46,7 +46,7 @@
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="60"> <el-table-column label="请款金额(元)" align="center" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款金额 }} {{ scope.row.请款金额 }}
</template> </template>
@@ -91,22 +91,22 @@
{{ scope.row.未通过审批原因 === '通过' ? '' : scope.row.未通过审批原因 }} {{ scope.row.未通过审批原因 === '通过' ? '' : scope.row.未通过审批原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款人" align="center" min-width="60"> <!-- <el-table-column label="付款人" align="center" min-width="60">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.付款人姓名 }} <!-- {{ scope.row.付款人姓名 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="付款情况" align="center" min-width="60"> <!-- <el-table-column label="付款情况" align="center" min-width="60">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.付款情况内容 }} <!-- {{ scope.row.付款情况内容 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="未过原因" align="center" min-width="60"> <!-- <el-table-column label="未过原因" align="center" min-width="60">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }} <!-- {{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="110px" fixed="right"> <el-table-column label="操作" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">

View File

@@ -161,6 +161,15 @@
<el-form-item label="录入准结(分)" prop="录入准结"> <el-form-item label="录入准结(分)" prop="录入准结">
<el-input-number :min="0" v-model="form1.录入准结" style="width: 200px" @change="timeChange()"/> <el-input-number :min="0" v-model="form1.录入准结" style="width: 200px" @change="timeChange()"/>
</el-form-item> </el-form-item>
<el-form-item label="操作者:" prop="操作者">
<el-select v-model="operatorValue" placeholder="请选择操作者" filterable style="width: 200px" clearable>
<el-option
v-for="item in operator"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="加工工时(分)" prop="加工时间"> <el-form-item label="加工工时(分)" prop="加工时间">
<span style="font-size: 20px">{{ 加工时间 }}</span> <span style="font-size: 20px">{{ 加工时间 }}</span>
</el-form-item> </el-form-item>
@@ -177,12 +186,14 @@
</template> </template>
<script> <script>
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails' import { searchtable, searchtable2, searchoperator } from '@/api/ManufacturingCenter/ScheduleCompletionDetails'
import { getNowShotTime } from '@/utils/tool' import { getNowShotTime } from '@/utils/tool'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
operatorValue: '',
operator: '',
startTime: getNowShotTime(), // 开始时间 startTime: getNowShotTime(), // 开始时间
endTime: getNowShotTime(), // 结束时间 endTime: getNowShotTime(), // 结束时间
tableData: [], // 操作者工时统计 tableData: [], // 操作者工时统计
@@ -222,8 +233,21 @@ export default {
}, },
created() { created() {
this.searchTable() this.searchTable()
this.searchOperator()
}, },
methods: { methods: {
searchOperator() {
this.operator = []
this.operatorValue = ''
searchoperator().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.operator.push({
value: response.data[i].人员编号,
label: response.data[i].姓名
})
}
})
},
// 查询表格数据 // 查询表格数据
searchTable() { searchTable() {
this.loading = true this.loading = true
@@ -264,6 +288,7 @@ export default {
}) })
}, },
handleEdit(row) { handleEdit(row) {
this.operatorValue = Number(row.人员编号)
var param = [] var param = []
param[0] = ['工序流水号', row.工序流水号] param[0] = ['工序流水号', row.工序流水号]
param[1] = ['完成过程流水号', row.完成过程流水号] param[1] = ['完成过程流水号', row.完成过程流水号]
@@ -306,7 +331,8 @@ export default {
param[5] = ['录入准结', this.form1.录入准结] param[5] = ['录入准结', this.form1.录入准结]
param[6] = ['备注', this.form1.备注] param[6] = ['备注', this.form1.备注]
param[7] = ['修改人员', this.id] param[7] = ['修改人员', this.id]
var Data1 = this.CreateData('11', 'MES_机加工MES_编辑备注_Vue_New', param) param[8] = ['操作者', this.operatorValue]
var Data1 = this.CreateData('11', 'MES_机加工MES_编辑备注_Vue_New_电脑端', param)
this.ExecDatabase(Data1).then(response => { this.ExecDatabase(Data1).then(response => {
if (response.data[0].result === 1) { if (response.data[0].result === 1) {
console.log('成功,数量减少 1') console.log('成功,数量减少 1')
@@ -324,6 +350,23 @@ export default {
console.log('成功,未修改数量 6') console.log('成功,未修改数量 6')
} }
this.searchTable2(this.row) this.searchTable2(this.row)
this.loading = true
this.tableData = []
this.total2 = 0
var STime = ''
var ETime = ''
STime = this.startTime + ' 00:00:00'
ETime = this.endTime + ' 23:59:59'
searchtable(STime, ETime, 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
})
this.dialogVisible1 = false this.dialogVisible1 = false
}) })
}, },

View File

@@ -218,6 +218,7 @@ export default {
this.loading2 = true this.loading2 = true
this.tableData2 = [] this.tableData2 = []
searchTableData2(this.PersonValue).then(response => { searchTableData2(this.PersonValue).then(response => {
console.log(response, 111)
this.tableData2 = response.data this.tableData2 = response.data
this.loading2 = false this.loading2 = false
}) })

View File

@@ -1,7 +1,6 @@
<template> <template>
<div class="app-container"> <div>
<!--顶栏结构--> <!--顶栏结构-->
<el-card>
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:150px;margin: 3px 0" placeholder="请输入招标企业"/> <el-input v-model="TenderingEnterprise" clearable size="small" style="width:150px;margin: 3px 0" placeholder="请输入招标企业"/>
<span style="font-size: 13px;margin-left: 10px">签订日期</span> <span style="font-size: 13px;margin-left: 10px">签订日期</span>
<el-date-picker <el-date-picker
@@ -45,10 +44,8 @@
<el-button v-positive="'loading'" :disabled="false" type="primary" plain class="el-icon-download" size="small" style="" @click="exportExcel">导出</el-button> <el-button v-positive="'loading'" :disabled="false" type="primary" plain class="el-icon-download" size="small" style="" @click="exportExcel">导出</el-button>
</div> </div>
</el-tooltip> </el-tooltip>
</el-card>
<!--投标保证金表格--> <!--投标保证金表格-->
<el-card>
<el-table <el-table
v-loading="tableData1Loading" v-loading="tableData1Loading"
:data="tableData1" :data="tableData1"
@@ -221,7 +218,6 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange"/> @current-change="handleCurrentChange"/>
</div> </div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisiblePeople" title="销售经理" center width="400px"> <el-dialog v-el-drag-dialog :visible.sync="dialogFormVisiblePeople" title="销售经理" center width="400px">
<div style="height: 420px"> <div style="height: 420px">

View File

@@ -63,7 +63,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="合同未收款(万元)" width="135"> <el-table-column align="center" label="合同未收款(万元)" width="135">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.合同总金额).toFixed(2) - Number(scope.row.已支付).toFixed(2) }} {{ (Number(scope.row.合同总金额) - Number(scope.row.已支付)).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="投标保证金(万元)" width="135"> <el-table-column align="center" label="投标保证金(万元)" width="135">

View File

@@ -37,5 +37,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-tabs--border-card > .el-tabs__content {
padding: 0px 0px 0px 0px !important;
}
</style> </style>

View File

@@ -81,6 +81,16 @@
{{ scope.row.到货时间 ? (scope.row.到货时间.split(' ')[0] !== '1900-01-01' ? scope.row.到货时间.split(' ')[0] : '') : scope.row.到货时间 }} {{ scope.row.到货时间 ? (scope.row.到货时间.split(' ')[0] !== '1900-01-01' ? scope.row.到货时间.split(' ')[0] : '') : scope.row.到货时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床图号" align="center" width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="70" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="外协员" align="center" width="70" show-overflow-tooltip> <el-table-column label="外协员" align="center" width="70" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.外协计划员 }} {{ scope.row.外协计划员 }}

View File

@@ -4,8 +4,19 @@
<el-input v-model="partNumber" size="small" placeholder="零件号或零件名称" clearable style="width:160px;margin-top: 3px"/> <el-input v-model="partNumber" size="small" placeholder="零件号或零件名称" clearable style="width:160px;margin-top: 3px"/>
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:20px" plain @click="getList()">查询</el-button> <el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:20px" plain @click="getList()">查询</el-button>
<el-button v-positive="'loading'" :disabled="false" type="danger" plain size="mini" icon="el-icon-caret-right" style="float: right;margin-right:10px" @click="getBack()">打回</el-button> <el-button v-positive="'loading'" :disabled="false" type="danger" plain size="mini" icon="el-icon-caret-right" style="float: right;margin-right:10px" @click="getBack()">打回</el-button>
<el-table v-loading="loading1" ref="multipleTable" :data="List1" border size="mini" stripe highlight-current-row height="265" style="width: 100%;margin-top: 3px" @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="55"/> v-loading="loading1"
ref="multipleTable"
:data="List1"
:row-class-name="tableRowClassName"
border
size="mini"
stripe
highlight-current-row
height="265"
style="width: 100%;margin-top: 3px"
@selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" width="55"/>
<el-table-column label="项目名称" prop="项目名称" align="center" show-overflow-tooltip> <el-table-column label="项目名称" prop="项目名称" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.项目名称 }} {{ scope.row.项目名称 }}
@@ -577,6 +588,16 @@ export default {
this.$message.warning('请选择外协加工任务单') this.$message.warning('请选择外协加工任务单')
} }
}, },
tableRowClassName({ row }) {
if (Number(row.是否可选) === 0) {
return 'IsSelect'
} else {
return ''
}
},
selectable(row, index) { // 控制某行是否可选
return Number(row.是否可选) === 1
},
saveAct(row) { saveAct(row) {
getPrice(row.外协加工任务单明细流水号, row.加工价格_成交) getPrice(row.外协加工任务单明细流水号, row.加工价格_成交)
}, },
@@ -712,4 +733,7 @@ export default {
.editWorkTime input[type="number"]{ .editWorkTime input[type="number"]{
-moz-appearance: textfield; -moz-appearance: textfield;
} }
.el-table .IsSelect{
background: #ff7575
}
</style> </style>

View File

@@ -1,28 +1,30 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row>
<el-col style="width: 45%">
<el-card> <el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="200px" size="mini" highlight-current-row @row-click="searchTable01"> <el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="200px" size="mini" highlight-current-row @row-click="searchTable01">
<el-table-column label="供应商" align="center" min-width="170"> <el-table-column label="供应商" align="center" width="170" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款时间" align="center" min-width="150"> <el-table-column label="请款时间" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款时间.split(' ')[0] }} {{ scope.row.请款时间.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款人" align="center" min-width="100"> <el-table-column label="请款人" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="100" prop="请款金额"> <el-table-column label="请款金额(元)" align="center" width="110" prop="请款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款金额 }} {{ scope.row.请款金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核" align="center" width="200"> <el-table-column label="审核" align="center" width="135">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button> <el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="text" style="color:black" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button> <el-button type="text" style="color:black" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
@@ -30,39 +32,50 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-row> </el-col>
<el-col :span="10"> <el-col style="width: 55%">
<el-card> <el-card>
<el-table :data="gridData1" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContactDetail"> <el-table :data="gridData1" :summary-method="getSummaries2" style="width: 100%;max-height: 300px;" height="200px" border highlight-current-row size="mini" show-summary @row-click="searchContactDetail">
<el-table-column min-width="110" align="center" label="合同编号" show-overflow-tooltip> <el-table-column width="104" align="center" label="合同编号" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }} {{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="合同总额(元)" prop="合同总金额"> <el-table-column width="105" align="center" label="合同总额(元)" prop="合同总金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.合同总金额).toFixed(2) }} {{ parseFloat(scope.row.合同总金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="到货金额(元)" prop="到货金额"> <el-table-column width="105" align="center" label="到货金额(元)" prop="到货金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }} {{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="已付金额(元)" prop="已付金额"> <el-table-column width="105" align="center" label="已付金额(元)" prop="已付金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }} {{ parseFloat(scope.row.已付金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="请款金额(元)" prop="请款金额"> <el-table-column width="105" align="center" label="请款金额(元)" prop="请款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }} {{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="105" align="center" label="到票金额(元)" prop="到票金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到票金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="105" align="center" label="尚欠金额(元)" prop="尚欠金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.尚欠金额).toFixed(2) }}
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="14"> </el-row>
<el-row>
<el-card> <el-card>
<el-table :data="contractDetail2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary> <el-table :data="contractDetail2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary>
<el-table-column label="物料名称" align="center" min-width="120" show-overflow-tooltip> <el-table-column label="物料名称" align="center" min-width="120" show-overflow-tooltip>
@@ -80,6 +93,11 @@
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }} {{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料型号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.外购件机床 || scope.row.基本件机床 }}
</template>
</el-table-column>
<el-table-column label="采购数量" align="center" width="80"> <el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.数量 }} {{ scope.row.数量 }}
@@ -90,6 +108,11 @@
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }} {{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货金额" align="center" width="80">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="合计(元)" align="center" min-width="100" prop="合计"> <el-table-column label="合计(元)" align="center" min-width="100" prop="合计">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }} {{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
@@ -112,7 +135,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
@@ -169,7 +191,7 @@ export default {
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
sums[index] = '合计' sums[index] = '合计'
} else if (index === 3) { } else if (index === 4) {
const values = data.map(item => Number(parseFloat(item['数量']))) const values = data.map(item => Number(parseFloat(item['数量'])))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
@@ -184,7 +206,7 @@ export default {
} else { } else {
sums[index] = '0' sums[index] = '0'
} }
} else if (index === 4) { } else if (index === 5) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (!data[i].到货数量) { if (!data[i].到货数量) {
data[i].到货数量 = 0 data[i].到货数量 = 0
@@ -207,7 +229,30 @@ export default {
} else { } else {
sums[index] = '0' sums[index] = '0'
} }
} else if (index === 5) { } else if (index === 6) {
for (let i = 0; i < data.length; i++) {
if (!data[i].到货数量) {
data[i].到货数量 = 0
}
if (!data[i].已到货数量) {
data[i].已到货数量 = 0
}
}
const values = data.map(item => Number(parseInt(item['到货数量'])) * Number(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] = Number(sums[index]).toFixed(2) + ' 元'
} else {
sums[index] = '0.00'
}
} else if (index === 7) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (!data[i].到货数量) { if (!data[i].到货数量) {
data[i].到货数量 = 0 data[i].到货数量 = 0
@@ -241,7 +286,7 @@ export default {
if (index === 0) { if (index === 0) {
sums[index] = '总价' sums[index] = '总价'
return return
} else if (index === 1 || index === 2 || index === 3 || index === 4) { } else {
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {

View File

@@ -1,29 +1,36 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row>
<el-col style="width: 48%">
<el-card> <el-card>
<!--<h3 style="margin-top: 0">采购合同</h3>--> <!--<h3 style="margin-top: 0">采购合同</h3>-->
<el-table v-loading="" :data="tableData1" border stripe style="width: 100%;height: 150px;" height="200px" size="mini" highlight-current-row @row-click="searchTable01"> <el-table v-loading="" :data="tableData1" border stripe style="width: 100%;height: 150px;" height="200px" size="mini" highlight-current-row @row-click="searchTable01">
<el-table-column label="供应商" align="center" min-width="170"> <el-table-column label="供应商" align="center" min-width="170" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款时间" align="center" min-width="150"> <el-table-column label="请款时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款时间 }} {{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款人" align="center" min-width="100"> <el-table-column label="请款人" align="center" min-width="63">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="100" prop="请款金额"> <el-table-column label="请款金额(元)" align="center" min-width="110" prop="请款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款金额 }} {{ scope.row.请款金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核" align="center" width="200"> <el-table-column label="审核结果" align="center" min-width="80" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.审核情况内容 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="135">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button> <el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button> <el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
@@ -42,22 +49,21 @@
@current-change="handleCurrentChange1"/> @current-change="handleCurrentChange1"/>
</div> </div>
</el-card> </el-card>
<!--<h3 style="">合同明细</h3>--> </el-col>
<el-row> <el-col style="width: 52%">
<el-col :span="10">
<el-card> <el-card>
<el-table :data="gridData1" :summary-method="getSummaries2" border stripe highlight-current-row size="mini" show-summary @row-click="searchContactDetail"> <el-table :data="gridData1" :summary-method="getSummaries2" border stripe style="width: 100%;height: 150px;" height="240px" highlight-current-row size="mini" show-summary @row-click="searchContactDetail">
<el-table-column width="120" align="center" label="合同编号"> <el-table-column width="104" align="center" label="合同编号" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }} {{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="合同总额(元)" prop="到货金额"> <el-table-column width="105" align="center" label="合同总额(元)" prop="合同总金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.合同总金额).toFixed(2) }} {{ parseFloat(scope.row.合同总金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="到货金额(元)" prop="到货金额"> <el-table-column width="105" align="center" label="到货金额(元)" prop="到货金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }} {{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template> </template>
@@ -72,10 +78,22 @@
{{ parseFloat(scope.row.请款金额).toFixed(2) }} {{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="105" align="center" label="到票金额(元)" prop="到票金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到票金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="105" align="center" label="尚欠金额(元)" prop="尚欠金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.尚欠金额).toFixed(2) }}
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="14"> </el-row>
<!--<h3 style="">合同明细</h3>-->
<el-row>
<el-card> <el-card>
<el-table :data="contractDetail2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary> <el-table :data="contractDetail2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary>
<el-table-column label="物料名称" align="center" min-width="150"> <el-table-column label="物料名称" align="center" min-width="150">
@@ -125,7 +143,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col>
</el-row> </el-row>
</div> </div>
@@ -298,7 +315,7 @@ export default {
return prev return prev
} }
}, 0) }, 0)
sums[index] = sums[index] + ' 元' sums[index] = sums[index].toFixed(2) + ' 元'
} else { } else {
sums[index] = '0' sums[index] = '0'
} }

View File

@@ -22,9 +22,12 @@
<!-- <el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=100000;searchTable1()">查询</el-button>--> <!-- <el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=100000;searchTable1()">查询</el-button>-->
<el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="createOrder()">结算申请</el-button> <el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="createOrder()">结算申请</el-button>
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button> <el-button :disabled="disabled" type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
<el-tooltip :open-delay="200" effect="dark" content="导出到票申请单" placement="top">
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 400px" @click="exportExcel">导出</el-button>
</el-tooltip>
</div> </div>
<h4 style="margin-top: 5px;margin-bottom: 0px">到票结算申请单</h4> <h4 style="margin-top: 5px;margin-bottom: 0px">到票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border stripe highlight-current-row style="width: 100%;max-height: 350px" size="mini" @row-click="searchTable2"> <el-table id="expandTable" :data="tableData1" border stripe highlight-current-row style="width: 100%;max-height: 350px" height="350px" size="mini" @row-click="searchTable2">
<!-- <el-table-column type="expand"> <!-- <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand"> <el-form label-position="left" inline class="demo-table-expand">
@@ -72,12 +75,12 @@
{{ scope.row.发票金额 }} {{ scope.row.发票金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="创建时间" align="center" min-width="90" show-overflow-tooltip> <!-- <el-table-column label="创建时间" prop="创建时间" align="center" min-width="90" show-overflow-tooltip>-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.创建时间 ? scope.row.创建时间.split(' ')[0] : '—' }} <!-- {{ scope.row.创建时间 ? scope.row.创建时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="申请人" prop="申请人姓名" align="center" min-width="60"> <el-table-column label="申请人" prop="申请人姓名" align="center" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }} {{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template> </template>
@@ -87,56 +90,59 @@
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }} {{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部长审核" align="center" min-width="60"> <el-table-column label="部长确认" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批1结果 }} {{ scope.row.审批1结果 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核未过原因" align="center" min-width="90" show-overflow-tooltip> <!-- <el-table-column label="未过原因" align="center" min-width="90" show-overflow-tooltip>-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批1未过原因 ? scope.row.审批1未过原因 : '—' }} <!-- {{ scope.row.审批1未过原因 ? scope.row.审批1未过原因 : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="审核时间" align="center" min-width="90" show-overflow-tooltip> <!-- <el-table-column label="审核时间" align="center" min-width="90" show-overflow-tooltip>-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }} <!-- {{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="总经理审批" align="center" min-width="60"> <el-table-column label="总经理确认" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批4结果 }} {{ scope.row.审批4结果 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批未过原因" align="center" min-width="90" show-overflow-tooltip> <!-- <el-table-column label="未过原因" align="center" min-width="90" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批4未过原因 ? scope.row.审批4未过原因 : '—' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="财务审批" align="center" min-width="60">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批3结果 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="财务未过原因" align="center" min-width="90" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批3未过原因 ? scope.row.审批3未过原因 : '—' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="340">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批4未过原因 ? scope.row.审批4未过原因 : '—' }} <el-button :disabled="Number(scope.row.是否提交申请)===1 || Number(scope.row.申请人) !== Number(id)" type="text" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
</template> <el-button :disabled="scope.row.文件名称 !== '' && scope.row.文件名称 !== null" type="text" size="mini" style="margin-left:10px" icon="el-icon-upload2" @click="updatePic(scope.row)">发票</el-button>
</el-table-column> <el-button :disabled="scope.row.文件名称 === '' || scope.row.文件名称 === null" size="mini" type="text" icon="el-icon-search" @click="viewPicture(scope.row)">发票</el-button>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip> <el-button :disabled="scope.row.文件名称 === '' || scope.row.文件名称 === null" type="text" size="mini" style="margin-left:10px" @click="deletePic(scope.row)">删除发票</el-button>
<template slot-scope="scope"> <el-button :disabled="Number(scope.row.是否提交申请)===1 || Number(scope.row.申请人) !== Number(id)" type="text" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)"/>
{{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }} <el-button :disabled="Number(scope.row.是否提交申请)===1 || !(Number(scope.row.审批1流水号)===2 || Number(scope.row.审批3流水号)===2 || Number(scope.row.审批4流水号)===2) && Number(scope.row.申请人) !== Number(id)" type="text" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批3结果 }}
</template>
</el-table-column>
<el-table-column label="财务未过原因" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批3未过原因 ? scope.row.审批3未过原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)"/>
<el-button :disabled="Number(scope.row.是否提交申请)===1 && !(Number(scope.row.审批1流水号)===2 || Number(scope.row.审批3流水号)===2 || Number(scope.row.审批4流水号)===2)" type="text" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -152,62 +158,105 @@
<!-- @current-change="handleCurrentChange1"/>--> <!-- @current-change="handleCurrentChange1"/>-->
<!-- </div>--> <!-- </div>-->
</el-card> </el-card>
<el-row>
<el-col style="width: 46%">
<el-card> <el-card>
<!-- <h4 style="margin-top: 5px;margin-bottom: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>--> <el-table :data="tableData2" :summary-method="getSummaries" border show-summary highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini" @row-click="searchTable3">
<!-- <span>发票号</span>--> <el-table-column label="合同编号" align="center" min-width="120">
<!-- <el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>-->
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 400px;" height="300px" 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"> <template slot-scope="scope">
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }} {{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合同名称" align="center" min-width="100"> <el-table-column label="合同金额" align="center" min-width="80" prop="合同总额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同名称 || scope.row.离线合同名称 }} {{ Number(scope.row.合同总额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到票数量" align="center" width="100"> <el-table-column label="到货金额" align="center" min-width="80" prop="到货总额">
<template slot-scope="scope">
{{ Number(scope.row.到货总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="80" prop="已付金额">
<template slot-scope="scope">
{{ Number(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" min-width="80" prop="到票总额">
<template slot-scope="scope">
{{ Number(scope.row.到票总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="尚欠金额" align="center" min-width="80" prop="尚欠金额">
<template slot-scope="scope">
{{ Number(scope.row.尚欠金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="欠票金额" align="center" min-width="80" prop="欠票总额">
<template slot-scope="scope">
{{ Number(scope.row.欠票总额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col style="width: 54%">
<el-card>
<el-table :data="tableData3" :summary-method="getSummaries1" border show-summary highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini">
<el-table-column label="名称" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数" align="center" width="70" prop="采购数量">
<template slot-scope="scope">
{{ scope.row.采购数量 }}
</template>
</el-table-column>
<el-table-column label="到货数" align="center" width="70" prop="到货数量">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到票数" align="center" width="70" prop="到票数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到票数量 }} {{ scope.row.到票数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center" width="100"> <el-table-column label="单价" align="center" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.金额).toFixed(2) }} {{ scope.row.单价.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="到票金额" align="center" width="80" prop="到票金额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip v-show="true" :open-delay="100" content="删除" placement="right"> {{ scope.row.到票金额.toFixed(2) }}
<el-button :disabled="disabled" type="text" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)"/> </template>
</el-tooltip> </el-table-column>
<el-table-column label="到货金额" align="center" width="80" prop="到货金额">
<template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span style="margin-left: 1080px">到票总额{{ monetaryTotal.toFixed(2) }}</span>
</el-card> </el-card>
</el-col>
</el-row>
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="700px"> <el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="700px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="110px"> <el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="110px">
@@ -289,12 +338,12 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1000px"> <el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1100px">
<span>供应商</span> <span>供应商</span>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商到票" style="margin: 0 5px 10px 0;" readonly/> <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-group v-model="contractType" size="small" @change="searchTable01()">
<el-radio label="采购合同" border @click="showtable02 = true,showtable03 = false"/> <el-radio label="采购合同" border/>
<el-radio label="离线合同" border @click="showtable03 = true,showtable02 = false"/> <el-radio label="离线合同" border/>
</el-radio-group> </el-radio-group>
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="200px" size="mini" @row-click="searchTable02"> <el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="200px" size="mini" @row-click="searchTable02">
<el-table-column label="供应商" align="center" min-width="200"> <el-table-column label="供应商" align="center" min-width="200">
@@ -314,7 +363,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table v-show="showtable02" ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange"> <el-table v-show="showtable02" 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="45"/> <el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column label="名称" align="center" width="100"> <el-table-column label="名称" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }} {{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
@@ -330,32 +379,38 @@
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }} {{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template> </template>
</el-table-column> </el-table-column>
<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" width="80"> <el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.数量 }} {{ scope.row.数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到货数" align="center" width="90"> <el-table-column label="已到货数" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.已到货数量 }} {{ scope.row.已到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到票数" align="center" width="90"> <el-table-column label="已到票数" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到票数量 }} {{ scope.row.到票数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本次到票数量" align="center" width="120"> <el-table-column label="本次到票数量" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量 - scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/> <el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量 - scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;" @change="getSum"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本次到票金额" align="center" width="100"> <el-table-column label="到票金额" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.本次到票数量 * scope.row.单价).toFixed(2) }} {{ Number(scope.row.本次到票数量 * scope.row.单价).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span v-show="showtable02" style="margin-left: 890px">本次到票金额{{ totalmoney.toFixed(2) }}</span>
<el-table v-show="showtable03" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange"> <el-table v-show="showtable03" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/> <el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
<el-table-column label="名称" align="center" width="100"> <el-table-column label="名称" align="center" width="100">
@@ -378,39 +433,69 @@
{{ scope.row.数量 }} {{ scope.row.数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到货数" align="center" width="90"> <el-table-column label="已到货数" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.已到货数量 ? scope.row.已到货数量 : scope.row.到货数量 }} {{ scope.row.已到货数量 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到票数" align="center" width="90"> <el-table-column label="已到票数" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到票数量 }} {{ scope.row.到票数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本次到票数量" align="center" width="120"> <el-table-column label="本次到票数量" align="center" width="120">
<template slot-scope="scope"> <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%;"/> <el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量 ||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;" @change="getSum1"/>
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" width="100">
<template slot-scope="scope">
{{ Number(scope.row.本次到票数量 * scope.row.单价).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span v-show="showtable03" style="margin-left: 890px">本次到票金额{{ totalmoney.toFixed(2) }}</span>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button> <el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button> <el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="'上传图片'" :visible.sync="dialogVisible3" center style="font-weight: bold" width="300px" top="10vh">
<el-upload
id="invoiceScan"
ref="upload"
:multiple="true"
:auto-upload="false"
:on-success="uploadSuccess"
:on-exceed="warningExceed"
:limit="limit"
:data="Data"
:action="upload"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
<!-- :before-upload="beforeUpload"-->
<div slot="footer" class="dialog-footer">
<el-button style="width: 90px;height:50px" @click="dialogVisible3=false">取消</el-button>
<el-button type="primary" style="width: 90px;height:50px" @click="submit2()">确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail, import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchTable3, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication' addTable2, deleteTable2, deletepic } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { uploadInvoiceScan } from '@/utils/request' // import { uploadInvoiceScan } from '@/utils/request'
import { url } from '@/utils/request'
export default { export default {
name: '', // 发票结算申请 name: '', // 发票结算申请
data() { data() {
return { return {
totalmoney: 0.00,
tableData3: [],
monetaryTotal: 0, monetaryTotal: 0,
submitAdd1_disable: false, submitAdd1_disable: false,
dateRange: '', dateRange: '',
@@ -483,13 +568,17 @@ export default {
{ required: true, message: '请选择供应商' } { required: true, message: '请选择供应商' }
] ]
}, },
upload: uploadInvoiceScan, // upload: uploadInvoiceScan,
limit: 1, limit: 1,
tableData01: [], tableData01: [],
tableData02: [], tableData02: [],
tableData03: [], tableData03: [],
inboundCardNumber: '', // 入库单号 inboundCardNumber: '', // 入库单号
group: [] // 发票结算申请单明细流水号组 group: [], // 发票结算申请单明细流水号组
upload: url,
applyOrderNum1: '',
dialogVisible3: false,
Data: {}
} }
}, },
computed: { computed: {
@@ -504,6 +593,159 @@ export default {
this.searchTable1() this.searchTable1()
}, },
methods: { methods: {
viewPicture(row) {
var param = []
param[0] = ['发票结算申请单流水号', row.发票结算申请单流水号]
var Data = this.CreateData('2004', '采购管理_发票附件_导出', param)
this.exportExcel_NPOI(Data)
},
deletePic(row) {
deletepic(row.发票结算申请单流水号).then(response => {
if (Number(response.data[0].result) === 1) {
this.$message.success('删除成功!')
this.searchTable1()
} else {
this.$message.error('删除失败!')
}
})
},
submit2() {
var param = []
param[0] = ['发票结算申请单流水号', this.applyOrderNum1]
param[1] = ['文件名称', '']
param[2] = ['文件后缀', '']
param[3] = ['文件内容', null]
var Data1 = this.CreateData('15', '到票申请_文件存储_增加', param)
this.Data.param = Data1
this.$refs.upload.submit()
this.dialogVisible3 = false
this.$nextTick(() => {
this.searchTable1()
})
},
updatePic(row) {
this.dialogVisible3 = true
this.applyOrderNum1 = row.发票结算申请单流水号
},
uploadSuccess(res) { // 上传成功回调
// if (res[0].result === '1') {
// this.$message.success('增加成功')
this.dialogFormVisible = false
this.unquality = true
this.quality = true
this.$refs.upload.clearFiles()
// } else {
// this.$message.error('增加失败')
// }
},
// beforeUpload(file) { // 上传前检测
// const isJPG = /^image\/.*/.test(file.type)
// if (!isJPG) {
// this.$message.error('只能上传图片。。')
// }
// return isJPG
// },
warningExceed() {
this.$message.error('仅可上传一张照片')
},
exportExcel() {
if (this.applyOrderNum === '') {
this.$message.error('请先选择到票结算申请单!')
} else {
var param = []
param[0] = ['发票结算申请单流水号', this.applyOrderNum]
var Data = this.CreateData('2001', '报表_到票结算申请', param)
this.exportExcel_NPOI(Data)
var Data1 = this.CreateData('2001', '报表_采购管理_发票结算申请单明细', param)
this.exportExcel_NPOI(Data1)
}
},
getSum() {
this.totalmoney = 0
for (let i = 0; i < this.tableData02.length; i++) {
for (let j = 0; j < this.group.length; j++) {
if (this.tableData02[i].采购合同明细流水号 === this.group[j].采购合同明细流水号) {
this.totalmoney += Number(this.tableData02[i].本次到票数量 * this.tableData02[i].单价)
}
}
}
},
getSum1() {
this.totalmoney = 0
for (let i = 0; i < this.tableData03.length; i++) {
for (let j = 0; j < this.group.length; j++) {
if (this.tableData03[i].采购合同明细流水号 === this.group[j].采购合同明细流水号) {
this.totalmoney += Number(this.tableData03[i].本次到票数量 * this.tableData03[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) + ' 元'
} else {
sums[index] = 'N/A'
}
})
return sums
},
getSummaries1(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
} else if (index === 6 || index === 7) {
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) + '元'
} else {
sums[index] = 'N/A'
}
} else if (index === 2 || index === 3 || index === 4) {
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]
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
fetchData() { fetchData() {
this.supplier = [] this.supplier = []
searchSupplier().then(response => { searchSupplier().then(response => {
@@ -535,6 +777,7 @@ export default {
this.dialogVisible1 = true this.dialogVisible1 = true
}, },
searchTable1() { searchTable1() {
console.log(12345789)
this.disabled = true this.disabled = true
this.tableData2 = [] this.tableData2 = []
let check1, check2, check3 let check1, check2, check3
@@ -557,7 +800,7 @@ export default {
this.$refs['form1'].validate((valid) => { this.$refs['form1'].validate((valid) => {
if (valid) { if (valid) {
this.submitAdd1_disable = true this.submitAdd1_disable = true
insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => { insertInto(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.id).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
this.dialogVisible1 = false this.dialogVisible1 = false
@@ -626,30 +869,30 @@ export default {
}, },
searchPic(row, i) { searchPic(row, i) {
}, },
warningExceed() { // warningExceed() {
this.$message.error('仅可上传一张发票') // this.$message.error('仅可上传一张发票')
}, // },
beforeUpload(file) { // 上传前检测 // beforeUpload(file) { // 上传前检测
const isJPG = /^image\/.*/.test(file.type) // const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4 // const isLt4M = file.size / 1024 / 1024 < 4
if (!isJPG) { // if (!isJPG) {
this.$message.error('只能上传图片。。') // this.$message.error('只能上传图片。。')
} // }
if (!isLt4M) { // if (!isLt4M) {
this.$message.error('上传头像图片大小不能超过 4MB!') // this.$message.error('上传头像图片大小不能超过 4MB!')
} // }
return isJPG && isLt4M // return isJPG && isLt4M
}, // },
uploadSuccess(res) { // 上传成功回调 // uploadSuccess(res) { // 上传成功回调
if (res[0].result === '1') { // if (res[0].result === '1') {
this.$message.success('增加成功') // this.$message.success('增加成功')
this.dialogVisible1 = false // this.dialogVisible1 = false
this.searchTable1() // this.searchTable1()
this.$refs.upload.clearFiles() // this.$refs.upload.clearFiles()
} else { // } else {
this.$message.error('增加失败') // this.$message.error('增加失败')
} // }
}, // },
handleSizeChange1(val) { handleSizeChange1(val) {
this.pageCurrent1 = 1 this.pageCurrent1 = 1
this.pageSize1 = val this.pageSize1 = val
@@ -660,14 +903,14 @@ export default {
this.searchTable1() this.searchTable1()
}, },
submitApply(row) { submitApply(row) {
if (this.tableData2.length === 0) {
this.$message.warning('到票结算申请明细为空!')
} else {
this.$confirm('确认提交申请吗?', '提示', { this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
if (this.tableData2.length === 0) {
this.$message.warning('到票结算申请明细为空!')
} else {
submitApply(row.发票结算申请单流水号, this.id).then(response => { submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('提交成功') this.$message.success('提交成功')
@@ -675,15 +918,16 @@ export default {
this.tableData2 = [] this.tableData2 = []
} else { this.$message.error('提交失败') } } else { this.$message.error('提交失败') }
}) })
}
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消操作' message: '已取消操作'
}) })
}) })
}
}, },
searchTable2(row) { searchTable2(row) {
this.tableData3 = []
this.monetaryTotal = 0 this.monetaryTotal = 0
this.applyOrderNum = row.发票结算申请单流水号 this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号 this.invoiceNumber = row.发票号
@@ -699,6 +943,13 @@ export default {
} }
}) })
}, },
searchTable3(row) {
this.tableData3 = []
searchTable3(row.发票结算申请单流水号, row.采购合同流水号, row.离线合同流水号).then(response => {
this.tableData3 = response.data
console.log(response.data)
})
},
addInStoreRecord() { addInStoreRecord() {
if (this.applyOrderNum) { if (this.applyOrderNum) {
this.searchTable01() this.searchTable01()
@@ -713,10 +964,14 @@ export default {
this.tableData02 = [] this.tableData02 = []
this.tableData03 = [] this.tableData03 = []
if (this.contractType === '采购合同') { if (this.contractType === '采购合同') {
this.showtable03 = false
this.showtable02 = true
searchPurchase(this.supplierValue).then(response => { searchPurchase(this.supplierValue).then(response => {
this.tableData01 = response.data this.tableData01 = response.data
}) })
} else if (this.contractType === '离线合同') { } else if (this.contractType === '离线合同') {
this.showtable02 = false
this.showtable03 = true
searchOffline(this.supplierValue).then(response => { searchOffline(this.supplierValue).then(response => {
response.data.map(data => { response.data.map(data => {
if (Number(data.离线合同状态) === 2) { if (Number(data.离线合同状态) === 2) {
@@ -753,7 +1008,12 @@ export default {
} }
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.totalmoney = 0.00
this.group = val this.group = val
console.log(val, 'val')
for (let i = 0; i < val.length; i++) {
this.totalmoney += Number(val[i].本次到票数量 * val[i].单价)
}
}, },
submitAdd2() { // 追加入库 submitAdd2() { // 追加入库
if (this.group.length === 0) { if (this.group.length === 0) {

View File

@@ -48,7 +48,7 @@
<!-- </el-form>--> <!-- </el-form>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="供应商" align="center" min-width="200" show-overflow-tooltip> <el-table-column label="供应商" align="center" width="350" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
@@ -73,43 +73,49 @@
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }} {{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购审批" align="center" min-width="70"> <el-table-column v-if="Number(token) === 4" label="部长确认" align="center" min-width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批人1姓名 }} {{ scope.row.审批1结果 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批时间" align="center" width="100"> <!-- <el-table-column label="审批时间" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }} <!-- {{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="总经理审批" align="center" min-width="90"> <!-- <el-table-column label="总经理审批" align="center" min-width="90">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批人4姓名 }} <!-- {{ scope.row.审批人4姓名 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="审批时间" align="center" width="100"> <!-- <el-table-column label="审批时间" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }} <!-- {{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="财务审批" align="center" min-width="70"> <!-- <el-table-column label="财务审批" align="center" min-width="70">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批人3姓名 }} <!-- {{ scope.row.审批人3姓名 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="审批时间" align="center" width="100"> <!-- <el-table-column label="审批时间" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }} <!-- {{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="140" fixed="right"> <el-table-column label="操作" align="center" width="160" fixed="right">
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--<el-button :disabled="false" type="primary" plain size="mini" @click="excuteApprove(scope.row)">审批</el-button>--> <!--<el-button :disabled="false" type="primary" plain size="mini" @click="excuteApprove(scope.row)">审批</el-button>-->
<!--</template>--> <!--</template>-->
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button> <el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">确认</el-button>
<el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button> <el-button
:disabled="scope.row.文件名称 === '' || scope.row.文件名称 === null"
size="mini"
type="text"
icon="el-icon-search"
@click="viewPicture(scope.row)">查看发票</el-button>
<!-- <el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -125,64 +131,168 @@
<!-- @current-change="handleCurrentChange1"/>--> <!-- @current-change="handleCurrentChange1"/>-->
<!-- </div>--> <!-- </div>-->
</el-card> </el-card>
<el-row>
<el-col style="width: 46%">
<el-card> <el-card>
<!--<h4 style="margin: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>--> <el-table :data="tableData2" :summary-method="getSummaries" border show-summary highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini" @row-click="searchTable3">
<!--<span>发票号</span>--> <el-table-column label="合同编号" align="center" min-width="120">
<!--<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly style="margin: 5px 0 5px 0"/>-->
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 300px;" height="300px" 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"> <template slot-scope="scope">
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }} {{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="合同名称" align="center" min-width="100">--> <el-table-column label="合同金额" align="center" min-width="80" prop="合同总额">
<!--<template slot-scope="scope">--> <template slot-scope="scope">
<!--{{ scope.row.采购合同名称 || scope.row.离线合同名称 }}--> {{ Number(scope.row.合同总额).toFixed(2) }}
<!--</template>--> </template>
<!--</el-table-column>--> </el-table-column>
<el-table-column label="采购数量" align="center" width="100"> <el-table-column label="到货金额" align="center" min-width="80" prop="到货总额">
<template slot-scope="scope">
{{ Number(scope.row.到货总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="80" prop="已付金额">
<template slot-scope="scope">
{{ Number(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" min-width="80" prop="到票总额">
<template slot-scope="scope">
{{ Number(scope.row.到票总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="尚欠金额" align="center" min-width="80" prop="尚欠金额">
<template slot-scope="scope">
{{ Number(scope.row.尚欠金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="欠票金额" align="center" min-width="80" prop="欠票总额">
<template slot-scope="scope">
{{ Number(scope.row.欠票总额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col style="width: 54%">
<el-card>
<el-table :data="tableData3" :summary-method="getSummaries1" border show-summary highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini">
<el-table-column label="名称" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数" align="center" width="70" prop="采购数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购数量 }} {{ scope.row.采购数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到票数量" align="center" width="100"> <el-table-column label="到货数" align="center" width="70" prop="到货数量">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到票数" align="center" width="70" prop="到票数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到票数量 }} {{ scope.row.到票数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到票金额" align="center" width="100"> <el-table-column label="单价" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.金额).toFixed(2) }} {{ scope.row.单价.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" width="90" prop="到票金额">
<template slot-scope="scope">
{{ scope.row.到票金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到货金额" align="center" width="90" prop="到货金额">
<template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span style="margin-left: 1000px">到票总额{{ totalMoney.toFixed(2) }}</span>
</el-card> </el-card>
</el-col>
</el-row>
<!-- <el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="图片" center style="" width="800px">-->
<!-- <viewer>-->
<!-- <img v-for="url in urls" :key="url" :src="url" lazy style="width: 700px;height: 700px">-->
<!-- </viewer>-->
<!-- </el-dialog>-->
<!-- <el-card>-->
<!-- &lt;!&ndash;<h4 style="margin: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>&ndash;&gt;-->
<!-- &lt;!&ndash;<span>发票号</span>&ndash;&gt;-->
<!-- &lt;!&ndash;<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly style="margin: 5px 0 5px 0"/>&ndash;&gt;-->
<!-- <el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 300px;" height="300px" 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>-->
<!-- &lt;!&ndash;<el-table-column label="供应商" align="center" min-width="150">&ndash;&gt;-->
<!-- &lt;!&ndash;<template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash;{{ scope.row.供应商名称 }}&ndash;&gt;-->
<!-- &lt;!&ndash;</template>&ndash;&gt;-->
<!-- &lt;!&ndash;</el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="合同编号" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.采购合同编号 || scope.row.离线合同编号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash;<el-table-column label="合同名称" align="center" min-width="100">&ndash;&gt;-->
<!-- &lt;!&ndash;<template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash;{{ scope.row.采购合同名称 || scope.row.离线合同名称 }}&ndash;&gt;-->
<!-- &lt;!&ndash;</template>&ndash;&gt;-->
<!-- &lt;!&ndash;</el-table-column>&ndash;&gt;-->
<!-- <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="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ Number(scope.row.金额).toFixed(2) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <span style="margin-left: 1000px">到票总额{{ totalMoney.toFixed(2) }}</span>-->
<!-- </el-card>-->
</div> </div>
</template> </template>
<script> <script>
import { searchTable1, searchTable2, excuteApprove, searchSupplier } from '@/api/PurchasingCenter/InvoiceSettlementApprove' import { searchTable1, searchTable2, excuteApprove, searchSupplier, searchTable3 } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { readFile } from '@/utils/request' import { readFile } from '@/utils/request'
import request from '@/utils/request' import request from '@/utils/request'
@@ -190,6 +300,8 @@ export default {
name: '', // 发票结算审批 name: '', // 发票结算审批
data() { data() {
return { return {
// dialogFormVisible4: false,
// urls: [],
date1: '', date1: '',
date2: '', date2: '',
tableData1: [], tableData1: [],
@@ -221,6 +333,12 @@ export default {
fetchData() { fetchData() {
// console.log(this.token) // console.log(this.token)
}, },
viewPicture(row) {
var param = []
param[0] = ['发票结算申请单流水号', row.发票结算申请单流水号]
var Data = this.CreateData('2004', '采购管理_发票附件_导出', param)
this.exportExcel_NPOI(Data)
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据 searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '') this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '') this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
@@ -249,6 +367,7 @@ export default {
}) })
}, },
searchTable1() { searchTable1() {
this.tableData = []
let check let check
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '') this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
this.supplierValue ? check = 1 : check = 0 this.supplierValue ? check = 1 : check = 0
@@ -344,16 +463,102 @@ export default {
// }) // })
// }) // })
// }, // },
searchTable3(row) {
this.tableData3 = []
searchTable3(row.发票结算申请单流水号, row.采购合同流水号, row.离线合同流水号).then(response => {
this.tableData3 = response.data
})
},
searchTable2(row) { searchTable2(row) {
this.tableData3 = []
this.monetaryTotal = 0
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号 this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => { searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data this.tableData2 = response.data
this.totalMoney = 0 if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.totalMoney += parseFloat(response.data[i].金额) this.monetaryTotal += 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) + ' 元'
} else {
sums[index] = 'N/A'
}
})
return sums
},
getSummaries1(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
} else if (index === 6 || index === 7) {
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) + '元'
} else {
sums[index] = 'N/A'
}
} else if (index === 2 || index === 3 || index === 4) {
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]
} else {
sums[index] = 'N/A'
}
}
})
return sums
}
// searchTable2(row) {
// this.invoiceNumber = row.发票号
// searchTable2(row.发票结算申请单流水号).then(response => {
// this.tableData2 = response.data
// this.totalMoney = 0
// for (let i = 0; i < response.data.length; i++) {
// this.totalMoney += parseFloat(response.data[i].金额)
// }
// })
// }
} }
} }
</script> </script>

View File

@@ -41,113 +41,234 @@
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }} {{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购审批" align="center" min-width="80"> <el-table-column label="部长确认" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批人1姓名 }} {{ scope.row.审批1结果 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批时间" align="center" width="100"> <!-- <el-table-column label="审批时间" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="未过原因" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审批1未过原因 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="总经理确认" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }} {{ scope.row.审批4结果 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未过原因" align="center" width="100"> <!-- <el-table-column label="审批时间" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批1未过原因 }} <!-- {{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="总经理审批" align="center" min-width="100"> <!-- <el-table-column label="未过原因" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批人4姓名 }} <!-- {{ scope.row.审批4未过原因 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="审批时间" align="center" width="100"> <!-- <el-table-column label="财务审批" align="center" min-width="80">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }} <!-- {{ scope.row.审批人3姓名 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="未过原因" align="center" width="100"> <!-- <el-table-column label="审批时间" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批4未过原因 }} <!-- {{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="财务审批" align="center" min-width="80"> <!-- <el-table-column label="未过原因" align="center" width="100">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.审批人3姓名 }} <!-- {{ scope.row.审批2未过原因 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="审批时间" align="center" width="100"> <el-table-column label="操作" align="center" width="130">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="未过原因" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.审批2未过原因 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" @click="cancel(scope.row)">撤回</el-button> <el-button type="text" size="mini" @click="cancel(scope.row)">撤回</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- plain-->
<!-- icon="el-icon-search"-->
<!-- @click="viewPicture(scope.row)">查看发票</el-button>-->
<el-button
:disabled="scope.row.文件名称 === '' || scope.row.文件名称 === null"
size="mini"
type="text"
icon="el-icon-search"
@click="viewPicture(scope.row)">查看发票</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-row>
<el-col style="width: 46%">
<el-card> <el-card>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 300px;" height="300px" size="mini"> <el-table :data="tableData2" :summary-method="getSummaries" border show-summary highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini" @row-click="searchTable3">
<el-table-column label="名称" align="center" min-width="100"> <el-table-column label="合同编号" align="center" min-width="120">
<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"> <template slot-scope="scope">
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }} {{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="合同名称" align="center" min-width="100">--> <el-table-column label="合同金额" align="center" min-width="80" prop="合同总额">
<!--<template slot-scope="scope">--> <template slot-scope="scope">
<!--{{ scope.row.采购合同名称 || scope.row.离线合同名称 }}--> {{ Number(scope.row.合同总额).toFixed(2) }}
<!--</template>--> </template>
<!--</el-table-column>--> </el-table-column>
<el-table-column label="采购数量" align="center" width="100"> <el-table-column label="到货金额" align="center" min-width="80" prop="到货总额">
<template slot-scope="scope">
{{ Number(scope.row.到货总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="80" prop="已付金额">
<template slot-scope="scope">
{{ Number(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" min-width="80" prop="到票总额">
<template slot-scope="scope">
{{ Number(scope.row.到票总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="尚欠金额" align="center" min-width="80" prop="尚欠金额">
<template slot-scope="scope">
{{ Number(scope.row.尚欠金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="欠票金额" align="center" min-width="80" prop="欠票总额">
<template slot-scope="scope">
{{ Number(scope.row.欠票总额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col style="width: 54%">
<el-card>
<el-table :data="tableData3" :summary-method="getSummaries1" border show-summary highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini">
<el-table-column label="名称" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数" align="center" width="70" prop="采购数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购数量 }} {{ scope.row.采购数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到票数量" align="center" width="100"> <el-table-column label="到货数" align="center" width="70" prop="到货数量">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到票数" align="center" width="70" prop="到票数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到票数量 }} {{ scope.row.到票数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到票金额" align="center" width="100"> <el-table-column label="单价" align="center" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.金额).toFixed(2) }} {{ scope.row.单价.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" width="80" prop="到票金额">
<template slot-scope="scope">
{{ scope.row.到票金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到货金额" align="center" width="80" prop="到货金额">
<template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span style="margin-left: 1000px">到票总额{{ totalMoney.toFixed(2) }}</span>
</el-card> </el-card>
</el-col>
</el-row>
<!-- <el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="图片" center style="" width="800px">-->
<!-- <viewer>-->
<!-- <img v-for="url in urls" :key="url" :src="url" lazy style="width: 700px;height: 700px">-->
<!-- </viewer>-->
<!-- </el-dialog>-->
<!-- <el-card>-->
<!-- <el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 300px;" height="300px" 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="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.机床图号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash;<el-table-column label="供应商" align="center" min-width="150">&ndash;&gt;-->
<!-- &lt;!&ndash;<template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash;{{ scope.row.供应商名称 }}&ndash;&gt;-->
<!-- &lt;!&ndash;</template>&ndash;&gt;-->
<!-- &lt;!&ndash;</el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="合同编号" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.采购合同编号 || scope.row.离线合同编号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash;<el-table-column label="合同名称" align="center" min-width="100">&ndash;&gt;-->
<!-- &lt;!&ndash;<template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash;{{ scope.row.采购合同名称 || scope.row.离线合同名称 }}&ndash;&gt;-->
<!-- &lt;!&ndash;</template>&ndash;&gt;-->
<!-- &lt;!&ndash;</el-table-column>&ndash;&gt;-->
<!-- <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="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ Number(scope.row.金额).toFixed(2) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <span style="margin-left: 1000px">到票总额{{ totalMoney.toFixed(2) }}</span>-->
<!-- </el-card>-->
</div> </div>
</template> </template>
<script> <script>
import { cancel, searchTable1, searchSupplier, searchTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApproveSearch' import { cancel, searchTable1, searchSupplier, searchTable2, searchTable3 } from '@/api/PurchasingCenter/InvoiceSettlementApproveSearch'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
// import { readFile } from '@/utils/request' // import { readFile } from '@/utils/request'
// import request from '@/utils/request' // import request from '@/utils/request'
@@ -167,6 +288,8 @@ export default {
supplierValues: [], supplierValues: [],
supplierValue: '', supplierValue: '',
totalMoney: 0 totalMoney: 0
// dialogFormVisible4: false,
// urls: []
} }
}, },
computed: { computed: {
@@ -183,16 +306,119 @@ export default {
this.searchSupplier() this.searchSupplier()
}, },
methods: { methods: {
// viewPicture(row) {
// this.dialogFormVisible4 = true
// this.urls = []
// searchPic(row.发票结算申请单流水号).then(response => {
// for (let i = 0; i < response.data.length; i++) {
// if (response.data[i].文件内容 !== null) {
// this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
// }
// }
// })
// },
viewPicture(row) {
var param = []
param[0] = ['发票结算申请单流水号', row.发票结算申请单流水号]
var Data = this.CreateData('2004', '采购管理_发票附件_导出', param)
this.exportExcel_NPOI(Data)
},
searchTable3(row) {
this.tableData3 = []
searchTable3(row.发票结算申请单流水号, row.采购合同流水号, row.离线合同流水号).then(response => {
this.tableData3 = response.data
})
},
searchTable2(row) { searchTable2(row) {
this.tableData3 = []
this.monetaryTotal = 0
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号 this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => { searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data this.tableData2 = response.data
this.totalMoney = 0 if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.totalMoney += parseFloat(response.data[i].金额) this.monetaryTotal += 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) + ' 元'
} else {
sums[index] = 'N/A'
}
})
return sums
},
getSummaries1(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
} else if (index === 6 || index === 7) {
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) + '元'
} else {
sums[index] = 'N/A'
}
} else if (index === 2 || index === 3 || index === 4) {
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]
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
// searchTable2(row) {
// this.invoiceNumber = row.发票号
// searchTable2(row.发票结算申请单流水号).then(response => {
// this.tableData2 = response.data
// this.totalMoney = 0
// for (let i = 0; i < response.data.length; i++) {
// this.totalMoney += parseFloat(response.data[i].金额)
// }
// })
// },
cancel(row) { cancel(row) {
console.log(row, 'row') console.log(row, 'row')
if (Number(this.token) === 18) { if (Number(this.token) === 18) {

View File

@@ -72,23 +72,26 @@
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }} {{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款结果" width="80" align="center"> <!-- <el-table-column label="付款结果" width="80" align="center">-->
<template slot-scope="scope"> <!-- <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.付款情况流水号)===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.付款情况流水号)===1" type="success" size="small">已付</el-tag>-->
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag> <!-- <el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="未付原因" width="100" align="center"> <!-- <el-table-column label="未付原因" width="100" align="center">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }} <!-- {{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip v-show="true" :open-delay="100" content="删除请款信息" placement="right"> <el-tooltip v-show="true" :open-delay="100" content="删除请款信息" placement="right">
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || !((Number(scope.row.审核情况流水号) !== 1) || (Number(scope.row.审批情况流水号)===2) || (Number(scope.row.付款情况流水号)===2))" type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)"/> <el-button :disabled="Number(id)!==Number(scope.row.请款人) || !((Number(scope.row.审核情况流水号) !== 1) || (Number(scope.row.审批情况流水号)===2) || (Number(scope.row.付款情况流水号)===2))" type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)"/>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="100" content="打印请款单" placement="right">
<el-button type="text" size="mini" icon="el-icon-document-checked" style="margin-left: 10px" @click="exportExcel1(scope.row)"/>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -104,10 +107,9 @@
@current-change="handleCurrentChange1"/> @current-change="handleCurrentChange1"/>
</div> </div>
</el-card> </el-card>
<el-card>
<!--<h3 style="margin-top: 0">合同明细</h3>--> <!--<h3 style="margin-top: 0">合同明细</h3>-->
<el-row> <el-row style="width: 100%">
<el-col :span="10"> <el-col style="width:48%">
<el-card> <el-card>
<el-table :data="gridData" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContract"> <el-table :data="gridData" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContract">
<el-table-column min-width="110" align="center" label="合同编号" show-overflow-tooltip=""> <el-table-column min-width="110" align="center" label="合同编号" show-overflow-tooltip="">
@@ -115,10 +117,11 @@
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }} {{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="105" align="center" label="合同总额(元)" prop="合同总额"> <el-table-column width="105" align="center" label="合同总额(元)" prop="合同总额">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.合同总额">{{ scope.row.合同总额 ? parseFloat(scope.row.合同总额).toFixed(2) : 0 }}</span> {{ parseFloat(scope.row.合同总).toFixed(2) }}
<span v-if="scope.row.离线合同总额">{{ scope.row.离线合同总额 ? parseFloat(scope.row.离线合同总额).toFixed(2) : 0 }}</span> <!-- <span v-if="scope.row.合同总额">{{ scope.row.合同总额 ? parseFloat(scope.row.合同总额).toFixed(2) : 0 }}</span>-->
<!-- <span v-if="scope.row.离线合同总额">{{ scope.row.离线合同总额 ? parseFloat(scope.row.离线合同总额).toFixed(2) : 0 }}</span>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="105" align="center" label="到货金额(元)" prop="到货金额"> <el-table-column width="105" align="center" label="到货金额(元)" prop="到货金额">
@@ -126,6 +129,11 @@
{{ parseFloat(scope.row.到货金额).toFixed(2) }} {{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="105" align="center" label="已收发票(元)" prop="到票金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到票金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="105" align="center" label="已付金额(元)" prop="已付金额"> <el-table-column width="105" align="center" label="已付金额(元)" prop="已付金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }} {{ parseFloat(scope.row.已付金额).toFixed(2) }}
@@ -139,14 +147,34 @@
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="14"> <el-col style="width: 52%">
<el-card> <el-card>
<el-table :data="tableData2" :summary-method="getSummaries" border height="450px" size="mini" stripe show-summary> <el-table :data="tableData2" :summary-method="getSummaries" border height="450px" size="mini" stripe show-summary>
<el-table-column label="物料名称" align="center" min-width="110"> <el-table-column label="物料名称" align="center" min-width="110" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }} {{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购数" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="到货数" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价||0).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="到货金额" align="center" min-width="100" prop="到货金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="130" show-overflow-tooltip> <el-table-column label="物料规格" align="center" min-width="130" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }} {{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
@@ -157,26 +185,11 @@
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }} {{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购数量" align="center" width="80"> <el-table-column label="机床图号" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.数量 }} {{ scope.row.外购件机床 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</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)).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="单价" align="center" min-width="100" prop="单价">-->
<!--<template slot-scope="scope">-->
<!--{{ parseFloat(scope.row.单价||0).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求"> <el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }} {{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }}
@@ -191,8 +204,7 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</el-card> <el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1210px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1000px">
<span>供应商</span> <span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small" @change="searchTable01()"> <el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small" @change="searchTable01()">
<el-option <el-option
@@ -214,7 +226,7 @@
{{ scope.row.采购合同名称 }} {{ scope.row.采购合同名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购员" align="center" width="70"> <el-table-column label="采购员" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
@@ -229,6 +241,11 @@
{{ scope.row.合同总额 ? (parseInt(scope.row.合同总额 * 100)/100).toFixed(2) : '-' }} {{ scope.row.合同总额 ? (parseInt(scope.row.合同总额 * 100)/100).toFixed(2) : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货金额" align="center" width="110" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额(元)" align="center" width="110" prop="已付金额"> <el-table-column label="已付金额(元)" align="center" width="110" prop="已付金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }} {{ parseFloat(scope.row.已付金额).toFixed(2) }}
@@ -239,26 +256,84 @@
{{ parseFloat(scope.row.申请中金额).toFixed(2) }} {{ parseFloat(scope.row.申请中金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="170" prop="请款金额"> <el-table-column label="请款金额(元)" align="center" min-width="150" prop="请款金额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :max="scope.row.合同总额 - scope.row.已付金额 - scope.row.申请中金额" :disabled="(scope.row.合同总额 - scope.row.已付金额 - scope.row.申请中金额) === 0" :min="0" v-model="scope.row.请款金额" :precision="2" size="mini" controls-position="right" style="width: 100%;"/> <el-input-number :max="scope.row.到货金额 - scope.row.已付金额 - scope.row.申请中金额" :disabled="(scope.row.到货金额 - scope.row.已付金额 - scope.row.申请中金额) === 0" :min="0" v-model="scope.row.请款金额" :precision="2" size="mini" controls-position="right" style="width: 100%;" @change="getSum"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" prop="操作">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="searchTable2(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span>合计<el-input v-model="SUM" readonly size="mini" style="width: 150px; margin: 10px 10px 0 10px"/></span> <span>合计<el-input v-model="SUM" readonly size="mini" style="width: 150px; margin: 10px 10px 0 10px"/></span>
<el-button v-positive="'loading'" :disabled="false" type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button> <el-button v-positive="'loading'" :disabled="false" type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog v-if="searchView2" :visible.sync="searchView2" title="离线合同" center width="850px">
<div v-show="contractDetail.length > 0" style="width: 800px;padding-bottom: 50px;">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="750px">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
</tr>
<tr>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td style="text-align: center;" width="80px">合同名称</td>
<td id="contractName" colspan="2" style="text-align: center;"/>
<td style="text-align: center;" width="80px">供应商</td>
<td id="supplier" colspan="5" style="text-align: center;"/>
<td id="qrCode" style="text-align: center;" colspan="2" rowspan="2"/>
</tr>
<tr>
<td style="text-align: center;" width="80px">合同编号</td>
<td id="contractNum" colspan="2" style="text-align: center;"/>
<td style="text-align: center;" width="80px">采购员</td>
<td id="buyer" colspan="5" style="text-align: center;"/>
</tr>
<tr id="tablehead">
<td style="text-align: center;" width="50px">序号</td>
<td style="text-align: center;" colspan="2">名称</td>
<td style="text-align: center;">规格</td>
<td style="text-align: center;" colspan="2">型号</td>
<td style="text-align: center;">数量</td>
<td style="text-align: center;" colspan="2">单价</td>
<td style="text-align: center;" colspan="2">合计</td>
<td style="text-align: center;">交货期</td>
<td style="text-align: center;" colspan="2">备注</td>
</tr>
<tr>
<td style="text-align: center;">总计</td>
<td id="remark" colspan="13" style="text-align: center;"/>
<!--<td id="total" colspan="2" style="text-align: center;"/>-->
<!--<td/>-->
</tr>
</table>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog v-if="searchView1" :visible.sync="searchView1" title="采购合同" center style="min-height: 300px" width="1000px">
<div id="print" class="print" style="background-color:white;min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<!--将新一般处理页添加至通讯服务器-->
<div>附件图</div>
<img v-if="searchView1" :src="searchView">
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { searchTable0, searchContract, searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/PurchaseContractRequestFund' import { searchOfflineContractContent, searchTable2, searchTable0, searchContract, searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { getNowTime, timeToStamp } from '@/utils/tool' import { getNowTime, timeToStamp } from '@/utils/tool'
import $ from 'jquery'
import QRCode from 'qrcode'
export default { export default {
data() { data() {
return { return {
searchView2: false,
contractDetail: [],
searchView: '',
searchView1: false,
retruns: '',
searchAll: true, searchAll: true,
selectContents: [], selectContents: [],
getDate: null, getDate: null,
@@ -323,7 +398,9 @@ export default {
SUM: 0, SUM: 0,
contractGroup: [], contractGroup: [],
offGroup: [], offGroup: [],
gridData: [] gridData: [],
contractValue: '',
number: ''
} }
}, },
computed: { computed: {
@@ -339,6 +416,107 @@ export default {
// this.searchTable1() // this.searchTable1()
}, },
methods: { methods: {
exportExcel1(row) { // 合同请款表导出
console.log(row, 'row')
var param = []
param[0] = ['采购合同请款流水号', row.采购合同请款流水号]
var Data = this.CreateData('2001', '报表_付款申请单', param)
this.exportExcel_NPOI(Data)
},
searchTable2(row) {
this.number = ''
this.returns = []
this.contractDetail = []
this.contractValue = parseInt(row.采购合同流水号)
if (row.合同类型 === 1) {
this.searchView1 = true
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
}).then(() => {
this.$nextTick(() => {
$('#contractName').next('td').html(`<img id="img">`)
this.useqrcode(row.采购合同编号) // 显示二维码
})
})
} else if (row.合同类型 === 2) {
this.searchView2 = true
this.number = row.采购合同流水号
searchOfflineContractContent(this.contractValue).then(response => {
this.contractDetail = response.data
this.showOffline(row)
})
}
},
showOffline(row) {
const children = document.getElementsByClassName('tableData')
const parent = document.getElementsByClassName('offlineContract')[0]
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
let length = 0
length = this.contractDetail.length
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/>`
$('#tablehead').after(tr[i])
}
let total = 0
for (let j = 0; j < this.contractDetail.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.contractDetail[j].物料名称 ? this.contractDetail[j].物料名称 : this.contractDetail[j].零件名称
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.contractDetail[j].物料规格 ? this.contractDetail[j].物料规格 : this.contractDetail[j].规格
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.contractDetail[j].物料型号 ? this.contractDetail[j].物料型号 : this.contractDetail[j].零件图号
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.contractDetail[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = Number(this.contractDetail[j].单价).toFixed(2)
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.contractDetail[j].数量 * this.contractDetail[j].单价).toFixed(2)
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.contractDetail[j].交货期要求
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.contractDetail[j].备注
total += Number(this.contractDetail[j].数量 * this.contractDetail[j].单价)
}
total = total.toFixed(2)
document.getElementById('contractNum').innerHTML = row.采购合同编号
document.getElementById('contractName').innerHTML = row.采购合同名称
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.姓名
// document.getElementById('total').innerHTML = ''
document.getElementById('remark').innerHTML = total + ' 元'
$('#qrCode').html(`<img id="img1">`)
this.useqrcode1(row.采购合同编号) // 显示二维码
},
useqrcode1(contractNum) { // 二维码
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
const str = contractNum
QRCode.toDataURL(str, opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img1')
img.src = url
})
},
useqrcode(contractNum) { // 二维码
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
const str = contractNum
QRCode.toDataURL(str, opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img')
img.src = url
})
},
exportExcel() { // 合同请款导出 exportExcel() { // 合同请款导出
let check1, check2 let check1, check2
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '') this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
@@ -388,7 +566,7 @@ export default {
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
sums[index] = '合计' sums[index] = '合计'
} else if (index === 3) { } else if (index === 4) {
const values = data.map(item => Number(parseFloat(item['数量']))) const values = data.map(item => Number(parseFloat(item['数量'])))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
@@ -403,7 +581,7 @@ export default {
} else { } else {
sums[index] = '0' sums[index] = '0'
} }
} else if (index === 4) { } else if (index === 5) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (!data[i].到货数量) { if (!data[i].到货数量) {
data[i].到货数量 = 0 data[i].到货数量 = 0
@@ -426,6 +604,21 @@ export default {
} else { } else {
sums[index] = '0' sums[index] = '0'
} }
} else if (index === 7) {
const values = data.map(item => Number(parseFloat(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] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = '0'
}
} }
}) })
return sums return sums
@@ -437,7 +630,7 @@ export default {
if (index === 0) { if (index === 0) {
sums[index] = '总价' sums[index] = '总价'
return return
} else if (index === 2 || index === 3 || index === 1) { } else {
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
@@ -509,7 +702,19 @@ export default {
selectable(row, index) { // 控制某行是否可选 selectable(row, index) { // 控制某行是否可选
return parseInt(row.已请款) !== 1 // 已经请款 return parseInt(row.已请款) !== 1 // 已经请款
}, },
getSum() {
this.SUM = 0
for (let i = 0; i < this.tableData01.length; i++) {
for (let j = 0; j < this.selectContents.length; j++) {
if (this.tableData01[i].采购合同流水号 === this.selectContents[j].采购合同流水号) {
this.SUM += this.tableData01[i].请款金额
}
}
}
this.SUM = parseFloat(this.SUM).toFixed(2)
},
handleSelectionChange(val) { handleSelectionChange(val) {
console.log(val, 'val')
this.selectContents = val this.selectContents = val
this.SUM = 0 this.SUM = 0
this.contractGroup = [] this.contractGroup = []
@@ -564,6 +769,7 @@ export default {
} }
}, },
searchTable02(row) { // 查看详情(请款信息包含的合同) searchTable02(row) { // 查看详情(请款信息包含的合同)
this.tableData2 = []
searchRequsetFundDetail(row.采购合同请款流水号).then(response => { searchRequsetFundDetail(row.采购合同请款流水号).then(response => {
this.gridData = response.data this.gridData = response.data
}) })

View File

@@ -33,6 +33,13 @@
<b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b> <b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="groupValue" placeholder="组号" size="small" clearable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker <el-date-picker
v-show="false" v-show="false"
v-model="dateRange" v-model="dateRange"
@@ -214,7 +221,7 @@
<el-tab-pane label="外购件" name="外购件"> <el-tab-pane label="外购件" name="外购件">
<el-row style="margin-bottom: 5px"> <el-row style="margin-bottom: 5px">
<el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()"/> <el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()"/>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable> <el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
<el-option <el-option
v-for="item in machine" v-for="item in machine"
:key="item.value" :key="item.value"
@@ -224,6 +231,13 @@
<b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b> <b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="groupValue" placeholder="组号" size="small" clearable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select <el-select
v-model="MaterialCategoryValue" v-model="MaterialCategoryValue"
placeholder="物料类别" placeholder="物料类别"
@@ -400,7 +414,7 @@
<el-tab-pane label="基本件" name="基本件"> <el-tab-pane label="基本件" name="基本件">
<el-row style="margin-bottom: 5px"> <el-row style="margin-bottom: 5px">
<el-input v-model="partNum" placeholder="图号名称规格材料" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()"/> <el-input v-model="partNum" placeholder="图号名称规格材料" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()"/>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable> <el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
<el-option <el-option
v-for="item in machine" v-for="item in machine"
:key="item.value" :key="item.value"
@@ -410,6 +424,13 @@
<b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b> <b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="groupValue" placeholder="组号" size="small" clearable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px;" @click="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px;" @click="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">查询</el-button>
<el-checkbox v-model="checked3" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">已分配</el-checkbox> <el-checkbox v-model="checked3" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">已分配</el-checkbox>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 480px"> <el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 480px">
@@ -673,7 +694,9 @@ export default {
checked2: false, checked2: false,
checked3: false, checked3: false,
gouxuan: 0, gouxuan: 0,
totalnumber: 0 totalnumber: 0,
groupNumberValue: '',
groupNumber: []
} }
}, },
computed: { computed: {

View File

@@ -605,7 +605,8 @@ export default {
}) })
}, },
getMachineNames() { getMachineNames() {
console.log(this.machineValue, 2222) this.machineName = []
this.machineNum = []
getMachineNames(this.machineValue).then(response => { getMachineNames(this.machineValue).then(response => {
console.log(response.data, 3333) console.log(response.data, 3333)
if (response.data.length !== 0) { if (response.data.length !== 0) {

View File

@@ -286,7 +286,7 @@
<script> <script>
import { sleep } from '../../../utils/tool' import { sleep } from '../../../utils/tool'
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames, updateNum } from '../../../api/TechnologyCenter/ImportParts' import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames, updateNum, verification } from '../../../api/TechnologyCenter/ImportParts'
export default { export default {
name: 'SpecificationData', name: 'SpecificationData',
props: { props: {
@@ -422,6 +422,11 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
verification(row.物料流水号, this.projectName, this.machineValue, this.groupValue).then(response => {
console.log(response.data, 111)
if (response.data[0].结果 === 1) {
this.$message.warning('要替换的物料已经存在该分组内,不允许出现相同物料')
} else {
updateNum(row.物料流水号, this.NumId).then(response => { updateNum(row.物料流水号, this.NumId).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('替换成功') this.$message.success('替换成功')
@@ -431,6 +436,8 @@ export default {
this.$message.error('替换失败') this.$message.error('替换失败')
} }
}) })
}
})
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',

View File

@@ -127,6 +127,11 @@
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }} {{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床图号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="150"> <el-table-column label="备注" align="center" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
@@ -249,7 +254,7 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="950px"> <el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1100px">
<span>供应商</span> <span>供应商</span>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商到票" style="margin: 0 5px 10px 0;" readonly/> <el-input v-model="supplierName" size="small" placeholder="请选择供应商到票" style="margin: 0 5px 10px 0;" readonly/>
<el-radio-group v-show="false" v-model="contractType" size="small" @change="searchTable01()"> <el-radio-group v-show="false" v-model="contractType" size="small" @change="searchTable01()">
@@ -290,6 +295,11 @@
{{ scope.row.规格 }} {{ scope.row.规格 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床" align="center" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="采购数量" align="center" width="80"> <el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.数量 }} {{ scope.row.数量 }}

View File

@@ -109,6 +109,11 @@
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }} {{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床图号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip> <el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}

View File

@@ -181,24 +181,251 @@
</el-table-column> </el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="130" prop="请款金额"> <el-table-column label="请款金额(元)" align="center" min-width="130" prop="请款金额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :max="scope.row.含税总金额 - scope.row.已付金额 - scope.row.申请中金额" :disabled="(scope.row.含税总金额 - scope.row.已付金额 - scope.row.申请中金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width: 100%;"/> <el-input-number :max="scope.row.含税总金额 - scope.row.已付金额 - scope.row.申请中金额" :disabled="(scope.row.含税总金额 - scope.row.已付金额 - scope.row.申请中金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width: 100%;" @change="getSum"/>
</template>
</el-table-column>
<el-table-column label="查看详情" align="center" min-width="100" prop="申请中金额">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="searchTable2(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span>合计<el-input v-model="SUM" readonly size="mini" style="width: 120px; margin: 10px 10px 0 10px"/></span> <span>合计<el-input v-model="SUM" readonly size="mini" style="width: 120px; margin: 10px 10px 0 10px"/></span>
<el-button :disabled="requestFund_disabe" type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button> <el-button :disabled="requestFund_disabe" type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="showContract" title="合同详情" center width="1000px">
<div style="width:900px;margin-left: 30px">
<el-card>
<div v-show="Number(type) === 1 || Number(type) === 2" id="export">
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
<td colspan="2" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="5" align="center" style="font-weight: bold">{{ 采购合同名称 }}</td>
<!-- <td colspan="1" rowspan="3" style="width: 119px"><img id="img" alt=""></td>-->
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="3" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="2" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="3" align="center">{{ supplier1 }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="2" align="center">江苏盐城</td>
</tr>
</table>
<div style="margin-top: 20px;line-height: 30px">根据中华人民共和国合同法的有关规定经供需双方友好协商在平等自愿的基础上定立本合同以便供需双方共同遵守</div>
<div style="line-height: 30px"> 产品名称规格型号材质数量单价和交货期</div>
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<td colspan="1" align="center">图号</td>
<td colspan="1" align="center">名称</td>
<td colspan="1" align="center">规格</td>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="7">总价: (人民币){{ RMB }}(未税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
<tr style="height: 40px">
<td colspan="7">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
</tr>
</tfoot>
</table>
<div style="line-height: 30px">以上价格为含税增值税价格供方开具真实有效的{{ taxRate }}增值税发票</div>
<div id="23" style="line-height: 30px"/>
<table id="66" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
<tbody id="67">
<tr style="height: 35px">
<td colspan="4" align="center"> </td>
<td colspan="4" align="center"> </td>
</tr>
<tr style="height: 35px">
<th style="width: 15%">单位名称</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">单位名称</th>
<td style="width: 35%" colspan="3" align="center">江苏高精</td>
</tr>
<tr style="height: 35px">
<th style="width: 15%">法定代表人</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">法定代表人</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<th style="width: 15%">委托代理人</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">委托代理人</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<th style="width: 15%">电话</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">电话</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="Number(type) === 1" style="height: 35px">
<th style="width: 15%">传真</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">传真</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="Number(type) === 1" style="height: 35px">
<th style="width: 15%">开户银行</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">开户银行</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="Number(type) === 1" style="height: 35px">
<th style="width: 15%">账号</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">账号</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="Number(type) === 1" style="height: 35px">
<th style="width: 15%">税号</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">税号</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="Number(type) === 1" style="height: 35px">
<th style="width: 15%">邮政编码</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">邮政编码</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
</tbody>
</table>
<div style="line-height: 25px;margin-top: 10px">签订时间____年__月__日</div>
<div style="line-height: 25px">有效期限____年__月__日至____年__月__日</div>
</div>
<div v-show="Number(type) === 3" id="WGBLD" style="width: 880px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr style="height: 60px">
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<tr style="height: 40px">
<th colspan="14"><h4>{{ 采购合同名称 }}</h4></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="5" style="text-align: center;width: 35%">{{ supplier1 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="5" style="text-align: center;width: 35%">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 操作日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 规定到货时间 }}</td>
</tr>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
<tr id="tablehead10" style="height: 35px">
<td style="text-align: center;width: 7%">序号</td>
<td colspan="2" style="text-align: center;width: 20%">物料编码</td>
<td colspan="2" style="text-align: center;width: 10%">名称</td>
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in returns" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.图号 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.物料名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.规格 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 17%">{{ list.备注 }}</td>
</tr>
</table>
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
</div>
<div v-show="Number(type) === 4" id="CZCG" style="width: 880px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr style="height: 60px">
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<tr style="height: 40px">
<th colspan="14"><h4>{{ 采购合同名称 }}</h4></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="5" style="text-align: center;width: 35%">{{ supplier1 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="5" style="text-align: center;width: 35%">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 操作日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 规定到货时间 }}</td>
</tr>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
<tr id="tablehead100" style="height: 35px">
<td style="text-align: center;width: 7%">序号</td>
<td colspan="2" style="text-align: center;width: 10%">组号</td>
<td colspan="2" style="text-align: center;width: 20%">组件名称</td>
<td colspan="2" style="text-align: center;width: 10%">单价</td>
<td colspan="2" style="text-align: center;width: 8%">金额</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in returns2" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.组号 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.组件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.单价 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.金额 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 17%">{{ list.备注 }}</td>
</tr>
</table>
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
</div>
</el-card>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/PurchaseContractRequestFund1' import { searchTable2, searchTable3, searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/PurchaseContractRequestFund1'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { timeToStamp, numSubtract } from '@/utils/tool' import { timeToStamp, numSubtract } from '@/utils/tool'
// import QRCode from 'qrcode'
import $ from 'jquery'
export default { export default {
data() { data() {
return { return {
type: '',
RMB: '',
RMB1: '',
规定到货时间: '',
操作日期: '',
采购合同名称: '',
textarea: '',
contractValue: '',
contract: '',
taxRate: '',
TotalAmount: '',
TotalAmount1: '',
showContract: false,
requestFund_disabe: false, requestFund_disabe: false,
selectContents: [], selectContents: [],
getDate: null, getDate: null,
@@ -252,8 +479,10 @@ export default {
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 30, pageSize1: 30,
returns: '', returns: '',
returns2: '',
supplierValue: '', supplierValue: '',
supplier: [], supplier: [],
supplier1: '',
totalSum: 0, totalSum: 0,
totalPay: 0, totalPay: 0,
totalDebt: 0, totalDebt: 0,
@@ -277,6 +506,98 @@ export default {
this.searchTable1() this.searchTable1()
}, },
methods: { methods: {
searchTable2(row) {
this.showContract = true
this.type = row.模板类型
this.规定到货时间 = row.规定到货时间
this.操作日期 = row.操作日期
this.采购合同名称 = row.采购合同名称
this.textarea = row.合同文本
this.supplier1 = row.供应商名称
this.contract = row.采购合同编号
this.taxRate = row.税率
this.RMB = row.总金额_文本
this.contractValue = parseInt(row.采购合同流水号)
if (row.总金额 === '0') {
this.TotalAmount = ''
this.TotalAmount1 = ''
} else {
this.TotalAmount = row.总金额
this.TotalAmount1 = parseInt((row.含税总金额) * 100) / 100
}
this.RMB1 = row.含税总金额_文本
if (Number(this.type) === 1 || Number(this.type) === 2) {
this.$nextTick(() => {
// this.$refs.box.scrollTop = 0;
document.getElementById('23').innerText = this.textarea
})
// const opts = {
// errorCorrectionLevel: 'H',
// type: 'image/jpeg',
// rendererOpts: {
// quality: 0.3
// }
// }
// console.log(this.contractValue, '采购合同流水号1')
// QRCode.toDataURL(this.contractValue, opts, function(err, url) {
// if (err) throw err
// this.$nextTick(() => {
// const img = document.getElementById('img')
// img.src = url
// })
// })
// console.log(this.contractValue, '采购合同流水号2')
searchTable2(this.contractValue).then(response => {
this.returns = response.data
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
$('#tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].图号
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].规格
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
}
})
} else if (Number(this.type) === 3) {
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data
})
} else {
this.contractValue = parseInt(row.采购合同流水号)
searchTable3(this.contractValue).then(response => {
this.returns2 = response.data
})
}
},
getSum() {
this.SUM = 0
for (let i = 0; i < this.tableData01.length; i++) {
for (let j = 0; j < this.selectContents.length; j++) {
if (this.tableData01[i].采购合同流水号 === this.selectContents[j].采购合同流水号) {
this.SUM += this.tableData01[i].请款金额
}
}
}
this.SUM = parseFloat(this.SUM).toFixed(2)
},
timeToStamp(param) { // 转时间戳 timeToStamp(param) { // 转时间戳
return timeToStamp(param) return timeToStamp(param)
}, },

View File

@@ -14,7 +14,7 @@ export const uploadInvoiceScan1_config = `http://123.56.95.229:58010/submit/uplo
export const download_config = `http://123.56.95.229:58010/submit/downloadFile.ashx` // ContractInformationManagement export const download_config = `http://123.56.95.229:58010/submit/downloadFile.ashx` // ContractInformationManagement
export const uploadPerson_config = `http://123.56.95.229:58010/submit/uploadPerson.ashx` export const uploadPerson_config = `http://123.56.95.229:58010/submit/uploadPerson.ashx`
export const uploadOP_config = `http://123.56.95.229:58010/submit/uploadOP.ashx` export const uploadOP_config = `http://123.56.95.229:58010/submit/uploadOP.ashx`
export const url_config = `http://123.56.95.229:58010/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 export const url_config = `http://123.56.95.229:8095/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
export const ExcelDownLoad_config = 'http://123.56.95.229:58010/submit/MESCommonBase.ashx' // 导出excel export const ExcelDownLoad_config = 'http://123.56.95.229:58010/submit/MESCommonBase.ashx' // 导出excel
// 技术中心程序发布时要更改下面所有的IP到0段 // 技术中心程序发布时要更改下面所有的IP到0段
export const ServerIP_config = `http://123.56.95.229:58010/webpage/file/` export const ServerIP_config = `http://123.56.95.229:58010/webpage/file/`
@@ -23,4 +23,4 @@ export const downloadFileMachine_config = `http://123.56.95.229:58010/submit/dow
export const MESUploadFile_config = `http://123.56.95.229:58010/submit/MESUploadFile.ashx` export const MESUploadFile_config = `http://123.56.95.229:58010/submit/MESUploadFile.ashx`
export const MESDownloadFile_config = `http://123.56.95.229:58010/submit/MESDownloadFile.ashx` export const MESDownloadFile_config = `http://123.56.95.229:58010/submit/MESDownloadFile.ashx`
export const request_config = `http://123.56.95.229:58010/submit/MESCommonBase.ashx` export const request_config = `http://123.56.95.229:8095/submit/MESCommonBase.ashx`