Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
26
index.html
26
index.html
@@ -8,31 +8,7 @@
|
||||
<body>
|
||||
<script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
if (window.console) {
|
||||
console.log(`%c
|
||||
_ooOoo_
|
||||
o8888888o
|
||||
88" . "88
|
||||
(| -_- |)
|
||||
O\\ = /O
|
||||
____/\`---'\\____
|
||||
.' \\\\| |// \`.
|
||||
/ \\\\||| : |||// \\
|
||||
/ _||||| -:- |||||- \\
|
||||
| | \\\\\\ - /// | |
|
||||
| \\_| ''\\---/'' | |
|
||||
\\ .-\\__ \`-\` ___/-. /
|
||||
___\`. .' /--.--\\ \`. . __
|
||||
."" '< \`.___\\_<|>_/___.' >'"".
|
||||
| | : \`- \\\`.;\`\\ _ /\`;.\`/ - \` : | |
|
||||
\\ \\ \`-. \\_ __\\ /__ _/ .-\` / /
|
||||
======\`-.____\`-.___\\_____/___.-\`____.-'======
|
||||
\`=---='
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
佛祖保佑 永无BUG`, 'color:#fcaf17')
|
||||
}
|
||||
</script>
|
||||
<script></script>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@ export function searchInventory() {
|
||||
})
|
||||
}
|
||||
// 入库记录查询
|
||||
export function searchInbound(data1, data2, data3) {
|
||||
export function searchInbound(...data) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_入库记录_采购部查询',
|
||||
param: '采购合同流水号=' + data1 + '&到货时间=' + data2 + '&仓库流水号=' + data3
|
||||
param: `采购合同流水号_check=${data[0]}&采购合同流水号=${data[1]}&到货时间_check=${data[2]}&到货开始时间=${data[3]}&到货结束时间=${data[4]}&仓库流水号_check=${data[5]}&仓库流水号=${data[6]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
// 初始化 工位
|
||||
// 初始化 人员和工位
|
||||
export function getMachine() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_加工顺序调整_查询工位及人员'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取工位
|
||||
export function getMachine2() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -46,3 +57,15 @@ export function JurisdictionControl(num1, num2) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 所有工序
|
||||
export function getTable2(stepNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序',
|
||||
param: '项目流水号_check=0&项目流水号=0&机床流水号_check=0&机床流水号=0&组件流水号_check=0&组件流水号=0&零件图号_check=1=string&零件图号=' + stepNumber + '=string&是否查询全部数据=1=string&单件是否外协=1&考核状态=6=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ export function getMachines() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_机床名称_加工进度修改模块查询',
|
||||
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
|
||||
name: '车间生产管理工艺_传递后_机床名称_加工进度修改模块查询_MESWORK'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -171,3 +171,15 @@ export function editInquirySheet(num1, num2, num3) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑询价单
|
||||
export function saveOrder(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_询价单明细_保存数据',
|
||||
param: `询价单明细流水号组=${num1}&数量组=${num2}&备注组=${num3}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export function doneContract(...params) {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_采购合同_增加数据',
|
||||
param: `采购合同编号=${params[0]}&采购合同名称=${params[1]}&交货日期=${params[2]}&支付日期=${params[3]}&支付方式=${params[4]}&开票信息=${params[5]}&其他说明=${params[6]}&合同总额=${params[7]}&采购员流水号=${params[8]}&供应商流水号=${params[9]}&单价是否含税=${params[10]}&组件零件流水号组=${params[11]}&组件零件基本件流水号组=${params[12]}&数量组=${params[13]}&单价组=${params[14]}&交货期组=${params[15]}&合同内容\\=${params[16]}`
|
||||
param: `采购合同编号=${params[0]}\\&采购合同名称=${params[1]}\\&交货日期=${params[2]}\\&支付日期=${params[3]}\\&支付方式=${params[4]}\\&开票信息=${params[5]}\\&其他说明=${params[6]}\\&合同总额=${params[7]}\\&采购员流水号=${params[8]}\\&供应商流水号=${params[9]}\\&单价是否含税=${params[10]}\\&组件零件流水号组=${params[11]}\\&组件零件基本件流水号组=${params[12]}\\&数量组=${params[13]}\\&单价组=${params[14]}\\&交货期组=${params[15]}\\&合同内容\\=${params[16]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
111
src/api/PurchasingCenter/InvoiceSettlementApplication.js
Normal file
111
src/api/PurchasingCenter/InvoiceSettlementApplication.js
Normal file
@@ -0,0 +1,111 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 根据条件查发票结算申请单
|
||||
export function searchTable1(...group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单_查询数据',
|
||||
param: `发票号_check=${group[0]}&发票号=${group[1]}`,
|
||||
Pagination: group[2] + '&' + group[3]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑发票结算申请单
|
||||
export function submitEdit(...group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单_修改数据',
|
||||
param: `发票号=${group[0]}&发票金额=${group[1]}&已付款项=${group[2]}&尚欠金额=${group[3]}&税额=${group[4]}&是否费用类=${group[5]}&备注=${group[6]}&发票结算申请单流水号=${group[7]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除发票结算申请单
|
||||
export function submitDelete(...group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单_删除数据',
|
||||
param: `发票结算申请单流水号=${group[0]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 提交申请 发票结算申请单
|
||||
export function submitApply(...group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_发票结算申请单_提交申请',
|
||||
param: `发票结算申请单流水号=${group[0]}&申请人=${group[1]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票结算申请单明细列表
|
||||
export function searchTable2(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单明细_查询数据',
|
||||
param: `发票结算申请单流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 入库单查询
|
||||
export function searchInboundCard(data1, data2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_采购入库单_入库单查询',
|
||||
param: '入库单号_check=' + data1 + '&入库单号=' + data2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 入库单明细查询
|
||||
export function searchInboundCardDetail(data1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_采购入库单_入库单明细_查询数据',
|
||||
param: '采购入库单流水号=' + data1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票结算申请单明细增加
|
||||
export function addTable2(data, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_发票结算申请单明细_增加数据',
|
||||
param: '发票结算申请单流水号=' + data + '&采购入库单流水号组=' + group
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票结算申请单明细删除
|
||||
export function deleteTable2(group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_发票结算申请单明细_删除数据',
|
||||
param: '发票结算申请单明细流水号组=' + group
|
||||
}
|
||||
})
|
||||
}
|
||||
51
src/api/PurchasingCenter/InvoiceSettlementApprove.js
Normal file
51
src/api/PurchasingCenter/InvoiceSettlementApprove.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 根据条件查发票结算申请单
|
||||
export function searchTable1(...group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单_查询数据',
|
||||
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1`,
|
||||
Pagination: group[3] + '&' + group[4]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票结算申请单明细列表
|
||||
export function searchTable2(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单明细_查询数据',
|
||||
param: `发票结算申请单流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 入库单明细查询
|
||||
export function searchInboundCardDetail(data1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_采购入库单_入库单明细_查询数据',
|
||||
param: '采购入库单流水号=' + data1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 执行审批
|
||||
export function excuteApprove(...data) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_发票结算申请单_执行审批',
|
||||
param: `发票结算申请单流水号=${data[0]}&人员编号=${data[1]}&审批代号=${data[2]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -82,7 +82,7 @@ export function addData(MaterialVariety, MaterialName, FullNameOfMaterial, Mater
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_物料主文件_基本_增加数据',
|
||||
param: '物料品种流水号=' + MaterialVariety + '&物料名称=' + MaterialName + '&物料全名=' + FullNameOfMaterial + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
|
||||
param: '物料品种流水号=' + MaterialVariety + '&物料名称\\=' + MaterialName + '&物料全名\\=' + FullNameOfMaterial + '&物料规格\\=' + MaterialSpecification + '&物料型号\\=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -93,7 +93,7 @@ export function editData(MaterialValue, MaterialVariety, MaterialName, FullNameO
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_物料主文件_基本_修改数据',
|
||||
param: '物料流水号=' + MaterialValue + '&物料品种流水号=' + MaterialVariety + '&物料名称=' + MaterialName + '&物料全名=' + FullNameOfMaterial + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
|
||||
param: '物料流水号=' + MaterialValue + '&物料品种流水号=' + MaterialVariety + '&物料名称\\=' + MaterialName + '&物料全名\\=' + FullNameOfMaterial + '&物料规格\\=' + MaterialSpecification + '&物料型号\\=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -122,15 +122,27 @@ export function deleteMateriel(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 保存离线合同
|
||||
export function saveOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_保存合同',
|
||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 生成离线合同
|
||||
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup) {
|
||||
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_生成合同',
|
||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}`
|
||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,27 +1,38 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询请款表
|
||||
export function searchRequestFund(pageCurrent, pageSize, check1, start, end) {
|
||||
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_请款_查询数据',
|
||||
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}`,
|
||||
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function searchOfflineContract(num) {
|
||||
// 查询供应商
|
||||
export function searchSupplier() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_待请款_查询数据',
|
||||
param: `供应商流水号=${num}`
|
||||
name: '采购管理_供应商_查询数据_根据条件'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function searchOfflineContract(check, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_查询数据',
|
||||
param: `供应商流水号_check=${check}&供应商流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -55,9 +66,21 @@ export function cancelRequestFund(num) {
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_请款_删除数据',
|
||||
param: `离线合同请款流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同明细
|
||||
export function searchMateriel(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同明细_查询数据',
|
||||
param: `离线合同流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export function cancelRequestFund(num1) {
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_删除数据',
|
||||
param: '采购请款流水号=' + num1
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function initProject() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
1
src/icons/svg/InvoiceSettlementApplication.svg
Normal file
1
src/icons/svg/InvoiceSettlementApplication.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551691047116" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2055" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M864 128h-704a128 128 0 0 0-128 128v512a128 128 0 0 0 128 128h704a128 128 0 0 0 128-128V256a128 128 0 0 0-128-128z m64 640a64 64 0 0 1-64 64h-704a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64h704a64 64 0 0 1 64 64v512z" fill="" p-id="2056"></path><path d="M512 512a32 32 0 0 0 0-64H400.32l-1.024-1.088 102.4-102.4a33.472 33.472 0 0 0-47.296-47.296l-102.4 102.4-102.4-102.4a33.472 33.472 0 0 0-47.296 47.296l102.4 102.4L303.68 448H192a32 32 0 0 0 0 64h128v64H192a32 32 0 0 0 0 64h128v96a32 32 0 0 0 64 0V640h128a32 32 0 0 0 0-64H384V512h128zM832 480h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 608h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM832 352h-192a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64z" fill="" p-id="2057"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/icons/svg/InvoiceSettlementApprove.svg
Normal file
1
src/icons/svg/InvoiceSettlementApprove.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551698748547" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2829" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M896 928H128c-17.6 0-32-14.4-32-32s14.4-32 32-32h768c17.6 0 32 14.4 32 32s-14.4 32-32 32z m0-128H128c-17.6 0-32-14.4-32-32V608c0-52.8 43.2-96 96-96h204.8c-6.4-38.4-25.6-75.2-52.8-107.2-36.8-41.6-56-94.4-56-148.8 0-60.8 24-118.4 68.8-161.6 44.8-43.2 102.4-64 164.8-62.4C636.8 36.8 734.4 136 736 251.2c1.6 57.6-20.8 113.6-59.2 156.8-27.2 28.8-43.2 64-49.6 104H832c52.8 0 96 43.2 96 96v160c0 17.6-14.4 32-32 32z m-736-64h704V608c0-17.6-14.4-32-32-32H592c-17.6 0-32-14.4-32-32 0-67.2 24-131.2 68.8-179.2 28.8-30.4 43.2-70.4 43.2-112-1.6-83.2-70.4-153.6-153.6-156.8-44.8-1.6-86.4 14.4-116.8 44.8-32 30.4-49.6 72-49.6 115.2 0 38.4 14.4 76.8 40 105.6 46.4 52.8 72 116.8 72 182.4 0 17.6-14.4 32-32 32H192c-17.6 0-32 14.4-32 32v128z" p-id="2830"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -22,7 +22,7 @@ const service = axios.create({
|
||||
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
timeout: 1500000 // 请求超时时间git
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
||||
@@ -11,14 +11,21 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span class="demonstration">入库日期</span>
|
||||
<span class="demonstration">到货时间</span>
|
||||
<el-date-picker
|
||||
v-model="InboundDate"
|
||||
v-model="InboundStartDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="选择开始日期"/> ~
|
||||
<el-date-picker
|
||||
v-model="InboundEndDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择结束日期"/>
|
||||
<span>仓库:</span>
|
||||
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
|
||||
<el-option
|
||||
@@ -44,37 +51,42 @@
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="存货名称" align="center" min-width="80">
|
||||
<el-table-column label="到货时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="存货名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<el-table-column label="物料规格" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<el-table-column label="物料型号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="80">
|
||||
<el-table-column label="零件图号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" min-width="80">
|
||||
<el-table-column label="本币单价" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币总价" align="center" min-width="80">
|
||||
<el-table-column label="本币总价" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 * scope.row.实际到货数量 }}
|
||||
</template>
|
||||
@@ -164,35 +176,25 @@
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-card>
|
||||
<span style="margin: 5px">入库单编号</span>
|
||||
<span>入库单编号:</span>
|
||||
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchInboundCard1()">查询</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addCard()">创建</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-arrow-down" style="margin: 0 0 0 10px" @click="InboundCardDetail()">选入</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading3"
|
||||
:data="tableData3"
|
||||
border
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
height="200"
|
||||
@row-click = "searchDetail">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="入库单号" align="center" min-width="100">
|
||||
<el-table v-loading="listLoading3" :data="tableData3" border style="width: 100%;" size="mini" height="200" highlight-current-row @row-click="searchDetail">
|
||||
<el-table-column label="入库单号" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库日期" align="center" min-width="100" >
|
||||
<template slot-scope="scope" value-format="yyyy-MM-dd">
|
||||
{{ scope.row.入库日期 }}
|
||||
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
@@ -200,7 +202,7 @@
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<el-table-column label="合同编号" align="center" min-width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
@@ -212,7 +214,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货日期 }}
|
||||
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务号" align="center" min-width="60">
|
||||
@@ -220,7 +222,7 @@
|
||||
{{ scope.row.业务号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="100">
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -230,17 +232,17 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务类型" align="center" min-width="100">
|
||||
<el-table-column label="业务类型" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购类型" align="center" min-width="80">
|
||||
<el-table-column label="采购类型" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库类别" align="center" min-width="80">
|
||||
<el-table-column label="入库类别" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库类别 }}
|
||||
</template>
|
||||
@@ -252,9 +254,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="300px">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="editInboundCardInfor(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropCard(scope.row)">删除</el-button>
|
||||
<el-button size="small" type="warning" icon="el-icon-download" style="margin: 0 0 0 10px" @click="exportCard(scope.row)">导出</el-button>
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="editInboundCardInfor(scope.row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropCard(scope.row)">删除</el-button>
|
||||
<el-button size="mini" type="warning" icon="el-icon-download" style="margin: 0 0 0 10px" @click="exportCard(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -268,16 +270,7 @@
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading4"
|
||||
id = "cardDetail"
|
||||
:data="tableData4"
|
||||
:summary-method="calculateContractSum"
|
||||
:show-summary="true"
|
||||
border
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
height="200">
|
||||
<el-table v-loading="listLoading4" id="cardDetail" :data="tableData4" :summary-method="calculateContractSum" :show-summary="true" border style="width: 100%;" size="mini" height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -303,32 +296,33 @@
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100" prop="数量">
|
||||
<el-table-column label="数量" align="center" width="100" prop="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" min-width="100">
|
||||
<el-table-column label="本币单价" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.本币单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
|
||||
<el-table-column label="本币金额" align="center" width="100" prop="sum">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropCarddetail(scope.row)">删除</el-button>
|
||||
<el-button :disabled="scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" @click="dropCarddetail(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisibleExport" center style="min-height: 300px" width="60%">
|
||||
<el-card>
|
||||
<div id="print">
|
||||
<div style="text-align: center">
|
||||
<div style="text-align: center;border: 1px solid white">
|
||||
<h2>采 购 入 库 单</h2>
|
||||
<hr>
|
||||
<table class="tgClass" style="table-layout: fixed; width: 820px;margin: auto">
|
||||
@@ -385,13 +379,13 @@
|
||||
<div style="margin-top: 10px">
|
||||
<table class="tg" style="table-layout: fixed; width: 820px; margin: auto">
|
||||
<colgroup>
|
||||
<col style="width: 150px">
|
||||
<col style="width: 150px">
|
||||
<col style="width: 120px">
|
||||
<col style="width: 100px">
|
||||
<col style="width: 100px">
|
||||
<col style="width: 100px">
|
||||
<col style="width: 50px">
|
||||
<col style="width: 70px">
|
||||
<col style="width: 200px">
|
||||
<col style="width: 100px">
|
||||
<col style="width: 50px">
|
||||
<col style="width: 50px">
|
||||
<col style="width: 50px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th class="tg-c3ow">存货编码</th>
|
||||
@@ -405,7 +399,7 @@
|
||||
<tr v-for="(list, index) in tableData4" :key="index">
|
||||
<td class="tg-c3ow">{{ index + 1 }}</td>
|
||||
<td class="tg-c3ow">{{ list.名称 }}</td>
|
||||
<td class="tg-c3ow">{{ list.规格 }}</td>
|
||||
<td class="tg-c3ow">{{ list.规格 + list.型号 }}</td>
|
||||
<td class="tg-baqh">{{ list.零件图号 }}</td>
|
||||
<td class="tg-c3ow">{{ list.数量 }}</td>
|
||||
<td class="tg-c3ow">{{ list.本币单价 }}</td>
|
||||
@@ -423,8 +417,8 @@
|
||||
</table>
|
||||
</div>
|
||||
<div style="margin-top: 20px; text-align: right">
|
||||
<span style="margin-right: 50px">制单人:{{ '李鑫' }}</span>
|
||||
<span style="margin-right: 50px">审核人:{{ '李鑫' }}</span>
|
||||
<span style="margin-right: 50px">制单人:</span>
|
||||
<span style="margin-right: 50px">审核人:</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -433,6 +427,7 @@
|
||||
<el-button type="primary" size="small" @click="printCard">打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="增加采购入库单" center style="min-height: 300px" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px">
|
||||
<el-row>
|
||||
@@ -526,6 +521,7 @@
|
||||
<el-button type="primary" size="small" @click="submitCard('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="修改采购入库单" center style="min-height: 300px" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px">
|
||||
<el-row>
|
||||
@@ -636,6 +632,8 @@ export default {
|
||||
ShopContractValue: '', // 车间采购合同流水号
|
||||
Inventory: [],
|
||||
InventoryValue: '',
|
||||
InboundStartDate: '',
|
||||
InboundEndDate: '',
|
||||
InboundDate: '',
|
||||
listLoading: '',
|
||||
tableData: [],
|
||||
@@ -701,6 +699,7 @@ export default {
|
||||
created() {
|
||||
this.searchContractData()
|
||||
this.searchInventoryData()
|
||||
this.searchInboundCard1()
|
||||
},
|
||||
methods: {
|
||||
searchContractData() { // 查询合同
|
||||
@@ -743,7 +742,11 @@ export default {
|
||||
searchPartinfo() {
|
||||
this.tableData = []
|
||||
this.listLoading = true
|
||||
searchInbound(this.ContractValue, this.InboundDate, this.InventoryValue).then(response => {
|
||||
let check1, check2, check3
|
||||
this.ContractValue ? check1 = 1 : check1 = 0
|
||||
this.InboundStartDate && this.InboundEndDate ? check2 = 1 : (check2 = 0, this.InboundStartDate = null, this.InboundEndDate = null)
|
||||
this.InventoryValue ? check3 = 1 : check3 = 0
|
||||
searchInbound(check1, this.ContractValue, check2, this.InboundStartDate, this.InboundEndDate, check3, this.InventoryValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].组件零件流水号 === 0) {
|
||||
response.data[i].物料名称 = response.data[i].零件名称
|
||||
@@ -786,6 +789,7 @@ export default {
|
||||
addInboundCard(this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchInboundCard1()
|
||||
this.dialogVisible1 = false
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
@@ -867,6 +871,7 @@ export default {
|
||||
editInboundCard(this.DetailNumber, this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.searchInboundCard1()
|
||||
this.dialogVisible2 = false
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
@@ -879,11 +884,10 @@ export default {
|
||||
searchDetail(row) {
|
||||
this.DetailNumber = row.采购入库单流水号
|
||||
searchInboundCardDetail(this.DetailNumber).then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data[i].length; i++) {
|
||||
data[i].数量 = parseInt(data[i].数量)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].数量 = parseInt(response.data[i].数量)
|
||||
}
|
||||
this.tableData4 = data
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
// 删除领料单
|
||||
@@ -1007,6 +1011,7 @@ export default {
|
||||
this.inbondCard[13] = row.备注
|
||||
this.DetailNumber = row.采购入库单流水号
|
||||
searchInboundCardDetail(this.DetailNumber).then(response => {
|
||||
console.log(this.tableData4)
|
||||
this.tableData4 = response.data
|
||||
return this.tableData4
|
||||
}).then(data => {
|
||||
@@ -1035,6 +1040,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.tg {border-collapse:collapse;border-spacing:0;}
|
||||
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
|
||||
@@ -3,13 +3,17 @@
|
||||
|
||||
<el-card>
|
||||
<span>工位号:</span>
|
||||
<el-select v-model="MachineValue" size="small" filterable placeholder="工位号" style="width: 180px;" @change="searchTable()">
|
||||
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="searchTable();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
|
||||
<el-badge :value="num" :max="99" class="item">
|
||||
<el-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">调序权限</el-button>
|
||||
@@ -17,18 +21,231 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border>
|
||||
<el-table-column
|
||||
label=" "
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="零件名称" align="center" width="310px">
|
||||
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border @expand-change="searchTable2">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="tableData2" border style="text-align: center" size="mini">
|
||||
<el-table-column label="零件加工计划进度(工艺名称,计划完成时间,实际完成时间,员工名称)" >
|
||||
<el-table-column label="[1]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[0]">
|
||||
<h4>{{ process[0] }}</h4><h4>{{ planDate[0] }} </h4><h4> {{ realDate[0] }}</h4><h4> {{ worker[0] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[2]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[1]">
|
||||
<h4>{{ process[1] }}</h4><h4>{{ planDate[1] }} </h4><h4> {{ realDate[1] }}</h4><h4> {{ worker[1] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[3]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[2]">
|
||||
<h4>{{ process[2] }}</h4><h4>{{ planDate[2] }} </h4><h4> {{ realDate[2] }}</h4><h4> {{ worker[2] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[4]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[3]">
|
||||
<h4>{{ process[3] }}</h4><h4>{{ planDate[3] }} </h4><h4> {{ realDate[3] }}</h4><h4> {{ worker[3] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[5]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[4]">
|
||||
<h4>{{ process[4] }}</h4><h4>{{ planDate[4] }} </h4><h4> {{ realDate[4] }}</h4><h4> {{ worker[4] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[6]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[5]">
|
||||
<h4>{{ process[5] }}</h4><h4>{{ planDate[5] }} </h4><h4> {{ realDate[5] }}</h4><h4> {{ worker[5] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[7]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[6]">
|
||||
<h4>{{ process[6] }}</h4><h4>{{ planDate[6] }} </h4><h4> {{ realDate[6] }}</h4><h4> {{ worker[6] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[8]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[7]">
|
||||
<h4>{{ process[7] }}</h4><h4>{{ planDate[7] }} </h4><h4> {{ realDate[7] }}</h4><h4> {{ worker[7] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[9]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[8]">
|
||||
<h4>{{ process[8] }}</h4><h4>{{ planDate[8] }} </h4><h4> {{ realDate[8] }}</h4><h4> {{ worker[8] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[10]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[9]">
|
||||
<h4>{{ process[9] }}</h4><h4>{{ planDate[9] }} </h4><h4> {{ realDate[9] }}</h4><h4> {{ worker[9] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[11]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[10]">
|
||||
<h4>{{ process[10] }}</h4><h4>{{ planDate[10] }} </h4><h4> {{ realDate[10] }}</h4><h4> {{ worker[10] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[12]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[11]">
|
||||
<h4>{{ process[11] }}</h4><h4>{{ planDate[11] }} </h4><h4> {{ realDate[11] }}</h4><h4> {{ worker[11] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[13]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[12]">
|
||||
<h4>{{ process[12] }}</h4><h4>{{ planDate[12] }} </h4><h4> {{ realDate[12] }}</h4><h4> {{ worker[12] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[14]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[13]">
|
||||
<h4>{{ process[13] }}</h4><h4>{{ planDate[13] }} </h4><h4> {{ realDate[13] }}</h4><h4> {{ worker[13] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[15]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[14]">
|
||||
<h4>{{ process[14] }}</h4><h4>{{ planDate[14] }} </h4><h4> {{ realDate[14] }}</h4><h4> {{ worker[14] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[16]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[15]">
|
||||
<h4>{{ process[15] }}</h4><h4>{{ planDate[15] }} </h4><h4> {{ realDate[15] }}</h4><h4> {{ worker[15] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[17]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[16]">
|
||||
<h4>{{ process[16] }}</h4><h4>{{ planDate[16] }} </h4><h4> {{ realDate[16] }}</h4><h4> {{ worker[16] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[18]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[17]">
|
||||
<h4>{{ process[17] }}</h4><h4>{{ planDate[17] }} </h4><h4> {{ realDate[17] }}</h4><h4> {{ worker[17] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[19]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[18]">
|
||||
<h4>{{ process[18] }}</h4><h4>{{ planDate[18] }} </h4><h4> {{ realDate[18] }}</h4><h4> {{ worker[18] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[20]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[19]">
|
||||
<h4>{{ process[19] }}</h4><h4>{{ planDate[19] }} </h4><h4> {{ realDate[19] }}</h4><h4> {{ worker[19] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[21]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[20]">
|
||||
<h4>{{ process[20] }}</h4><h4>{{ planDate[20] }} </h4><h4> {{ realDate[20] }}</h4><h4> {{ worker[20] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[22]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[21]">
|
||||
<h4>{{ process[21] }}</h4><h4>{{ planDate[21] }} </h4><h4> {{ realDate[21] }}</h4><h4> {{ worker[21] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[23]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[22]">
|
||||
<h4>{{ process[22] }}</h4><h4>{{ planDate[22] }} </h4><h4> {{ realDate[22] }}</h4><h4> {{ worker[22] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[24]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[23]">
|
||||
<h4>{{ process[23] }}</h4><h4>{{ planDate[23] }} </h4><h4> {{ realDate[23] }}</h4><h4> {{ worker[23] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[25]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[24]">
|
||||
<h4>{{ process[24] }}</h4><h4>{{ planDate[24] }} </h4><h4> {{ realDate[24] }}</h4><h4> {{ worker[24] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[26]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[25]">
|
||||
<h4>{{ process[25] }}</h4><h4>{{ planDate[25] }} </h4><h4> {{ realDate[25] }}</h4><h4> {{ worker[25] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[27]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[26]">
|
||||
<h4>{{ process[26] }}</h4><h4>{{ planDate[26] }} </h4><h4> {{ realDate[26] }}</h4><h4> {{ worker[26] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[28]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[27]">
|
||||
<h4>{{ process[27] }}</h4><h4>{{ planDate[27] }} </h4><h4> {{ realDate[27] }}</h4><h4> {{ worker[27] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[29]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[28]">
|
||||
<h4>{{ process[28] }}</h4><h4>{{ planDate[28] }} </h4><h4> {{ realDate[28] }}</h4><h4> {{ worker[28] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[30]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[29]">
|
||||
<h4>{{ process[29] }}</h4><h4>{{ planDate[29] }} </h4><h4> {{ realDate[29] }}</h4><h4> {{ worker[29] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="330px">
|
||||
<el-table-column label="零件图号" align="center" width="270px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号_短 }}
|
||||
</template>
|
||||
@@ -38,7 +255,7 @@
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-button
|
||||
@@ -112,7 +329,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachine, searchtable, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
import { getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -123,6 +340,14 @@ export default {
|
||||
Machine: [],
|
||||
MachineValue: '',
|
||||
loading0: false,
|
||||
tableData2: [], // 工艺数据
|
||||
process: [],
|
||||
planDate: [],
|
||||
worker: [],
|
||||
colorCode: [],
|
||||
realDate: [],
|
||||
result: [],
|
||||
零件图号: [],
|
||||
tableData: [], // 表格数据
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
@@ -146,8 +371,9 @@ export default {
|
||||
getMachine().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].MES终端号,
|
||||
value: response.data[i].MES终端号
|
||||
label: response.data[i].终端编号,
|
||||
value: response.data[i].终端编号,
|
||||
value2: response.data[i].姓名
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
@@ -160,16 +386,49 @@ export default {
|
||||
searchtable(this.MachineValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
}).then(() => {
|
||||
this.loading0 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择工位')
|
||||
}
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.process = []
|
||||
this.planDate = []
|
||||
this.worker = []
|
||||
this.colorCode = []
|
||||
this.realDate = []
|
||||
this.tableData2 = []
|
||||
getTable2(row.零件图号).then(response => {
|
||||
for (let k = 0; k < response.data.length; k++) {
|
||||
this.process[k] = response.data[k].工艺名称简称
|
||||
this.planDate[k] = response.data[k].计划日期_短
|
||||
this.realDate[k] = response.data[k].完成日期_短
|
||||
if (response.data[k].工艺编号 === 29) {
|
||||
response.data[k].员工姓名 = '备料'
|
||||
}
|
||||
if (response.data[k].工序间是否外协 === 2) {
|
||||
response.data[k].员工姓名 = '外协'
|
||||
}
|
||||
if (response.data[k].员工姓名 === '超级管理员') {
|
||||
response.data[k].员工姓名 = '无'
|
||||
}
|
||||
this.worker[k] = response.data[k].员工姓名
|
||||
if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
|
||||
this.colorCode[k] = 'grey'
|
||||
} else {
|
||||
this.colorCode[k] = response.data[k].进度颜色
|
||||
}
|
||||
if (response.data[k].工序间是否外协 === 2) {
|
||||
this.colorCode[k] = 'lightblue'
|
||||
}
|
||||
}
|
||||
this.tableData2.push(response.data[0])
|
||||
})
|
||||
},
|
||||
Jurisdiction() {
|
||||
this.count = 0
|
||||
getMachine().then(response => {
|
||||
getMachine2().then(response => {
|
||||
this.gridData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].调序权限 === '1') { this.count = this.count + 1 }
|
||||
@@ -226,15 +485,53 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-input{
|
||||
width: 210px;
|
||||
}
|
||||
.item {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.el-form-item{
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
h4{
|
||||
border: 1px solid transparent;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
width: 100px;
|
||||
height: 24px;
|
||||
}
|
||||
.white{
|
||||
background-color: ghostwhite;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.grey{
|
||||
background-color: grey;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.red{
|
||||
background-color: orangered;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.lightblue{
|
||||
background-color: deepskyblue;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.yellow{
|
||||
background-color: yellow;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.blank{
|
||||
background-color: transparent;
|
||||
border: 0px solid white;
|
||||
}
|
||||
.lightgreen{
|
||||
background-color: lightgreen;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -295,61 +295,11 @@ export default {
|
||||
edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => {
|
||||
this.$message.success('工序外协状态更改成功')
|
||||
})
|
||||
}).then(() => {
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(this.num1).then(response => {
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.InOut = 1
|
||||
edit(row.工序流水号, this.InOut).then(response => {
|
||||
this.$message.success('工序外协状态更改成功')
|
||||
}).then(() => {
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(this.num1).then(response => {
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="parseFloat((100*scope.row.合同到货总数/scope.row.合同采购总数).toFixed(2))"
|
||||
:percentage="scope.row.到货进度 = (100*(Number(scope.row.合同到货总数))/scope.row.合同采购总数) > 100 ? 100 : Number((100*(Number(scope.row.合同到货总数))/scope.row.合同采购总数).toFixed(2))"
|
||||
status="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
:data="tableData11"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
height="300px"
|
||||
style="width: 100%;max-height: 600px;"
|
||||
height="600px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/>
|
||||
@@ -48,11 +48,21 @@
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="150">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类别" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别 }}
|
||||
@@ -130,8 +140,8 @@
|
||||
:data="tableData12"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
height="300px"
|
||||
style="width: 100%;max-height: 600px;"
|
||||
height="600px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange2">
|
||||
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/>
|
||||
@@ -152,11 +162,21 @@
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="150">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
@@ -260,11 +280,10 @@
|
||||
{{ scope.row.电子信箱 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" @click="editInquirySheet(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteInquirySheet(scope.row)">删除</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportInquirySheet(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -278,33 +297,55 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
<el-button type="warning" size="mini" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
|
||||
<el-button type="success" size="mini" style="float: right" @click="saveOrder()">保存</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="图号" align="center" min-width="200">
|
||||
<el-table v-loading="" :data="tableData3" border style="max-height: 500px;" height="500px" size="mini">
|
||||
<el-table-column label="图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件零件流水号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="150">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件零件流水号 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="100">
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="90">
|
||||
<el-table-column label="技术下达数量" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
{{ scope.row.技术下达数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="询价单编号" align="center" min-width="150">
|
||||
<el-table-column label="实际采购数量" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.数量" size="mini" style="width:100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="询价备注" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="mini" style="width:100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="询价单编号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.询价单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="outInquirySheet(scope.row)">移出</el-button>
|
||||
@@ -523,7 +564,7 @@
|
||||
|
||||
<script>
|
||||
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
|
||||
@@ -613,7 +654,9 @@ export default {
|
||||
materialNewValue: '',
|
||||
groupPartNumValue: '', // 组件零件流水号
|
||||
standardAndPurchaseValue: '', // 标准件和外购件流水号
|
||||
title2: ''
|
||||
title2: '',
|
||||
orderExport: '',
|
||||
supplierExport: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -629,6 +672,21 @@ export default {
|
||||
this.searchTable2() // 查表2
|
||||
},
|
||||
methods: {
|
||||
saveOrder() { // 保存询价单
|
||||
const orderNumGroup = []
|
||||
const numGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
orderNumGroup.push(this.tableData3[i].询价单明细流水号)
|
||||
numGroup.push(this.tableData3[i].数量)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
saveOrder(orderNumGroup, numGroup, remarkGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) === 1 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
|
||||
},
|
||||
@@ -791,38 +849,43 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
exportInquirySheet(row) { // 导出询价单
|
||||
this.$confirm('确认导出询价单' + row.询价单编号 + '?', '提示', {
|
||||
exportInquirySheet() { // 导出询价单
|
||||
this.$confirm('确认导出询价单?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementsByClassName('inquirySheet')[0]
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
if (this.tableData3.length === 0 && !this.supplierExport) {
|
||||
this.$message.error('请选择正确的询价单导出')
|
||||
} else {
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementsByClassName('inquirySheet')[0]
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
let length = 0
|
||||
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
|
||||
for (let i = 0; i < length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
|
||||
document.getElementById('tablehead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.tableData3.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData3[j].物料型号 || this.tableData3[j].零件图号
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料名称 || this.tableData3[j].零件名称
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料规格 || this.tableData3[j].规格
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].备注
|
||||
}
|
||||
document.getElementById('inquirySheetNum').innerHTML = this.orderExport
|
||||
document.getElementById('supplier').innerHTML = this.supplierExport
|
||||
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
|
||||
}
|
||||
const tr = []
|
||||
let length = 0
|
||||
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
|
||||
for (let i = 0; i < length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
|
||||
document.getElementById('tablehead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.tableData3.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData3[j].物料型号 || this.tableData3[j].零件图号
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料名称 || this.tableData3[j].零件名称
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料规格 || this.tableData3[j].规格
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
|
||||
}
|
||||
document.getElementById('inquirySheetNum').innerHTML = row.询价单编号
|
||||
document.getElementById('supplier').innerHTML = row.供应商名称
|
||||
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
|
||||
}).catch(res => {
|
||||
console.log(res)
|
||||
this.$message({
|
||||
@@ -981,7 +1044,10 @@ export default {
|
||||
searchTable3(row) { // 查询该询价单中的物料和零件
|
||||
this.tableData3 = []
|
||||
this.inquirySheetFlowNum = row.询价单流水号
|
||||
this.supplierExport = row.供应商名称
|
||||
this.orderExport = row.询价单编号
|
||||
searchSheetDetail(row.询价单流水号).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</el-form>
|
||||
<el-table :data="tableData1" border style="margin: 10px 0;max-height: 300px;" height="300px" size="mini" show-summary>
|
||||
<el-table-column label="序号" align="center" width="50" type="index"/>
|
||||
<el-table-column label="交货期" align="center" min-width="130">
|
||||
<el-table-column label="交货期" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.交货期"
|
||||
@@ -83,7 +83,7 @@
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 130px"/>
|
||||
style="width:100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" min-width="150">
|
||||
@@ -91,7 +91,7 @@
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="150">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
@@ -101,20 +101,20 @@
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<el-table-column label="数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" min-width="100">
|
||||
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:70px"/>
|
||||
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%"/>
|
||||
<span v-show="hasTax!=='未税'">—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" min-width="100">
|
||||
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:70px"/>
|
||||
<el-input v-show="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%"/>
|
||||
<span v-show="hasTax!=='含税'">—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -136,11 +136,11 @@
|
||||
<el-radio-button label="模板3"/>
|
||||
<el-radio-button label="自定义"/>
|
||||
</el-radio-group>
|
||||
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">调整合同</el-button>
|
||||
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
|
||||
<span>合同总额:</span>
|
||||
<el-input v-model="actualTotal" size="small" style="width: 100px"/>
|
||||
<el-button type="primary" size="small" @click="submitTotal()">确定总额</el-button>
|
||||
<div style="float: right">
|
||||
<span>合同总额:</span>
|
||||
<el-input v-model="actualTotal" size="small" style="width: 100px"/>
|
||||
<el-button type="primary" size="small" @click="submitTotal()">确定总额</el-button>
|
||||
<el-button type="success" size="small" @click="generateContract()">递交审批</el-button>
|
||||
</div>
|
||||
<hr>
|
||||
@@ -252,7 +252,6 @@ export default {
|
||||
searchContractDetail() { // 查询合同明细
|
||||
this.tableData1 = []
|
||||
searchSheetContract(this.contractNumValue).then(response => {
|
||||
console.log(response.data, 111)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
组件零件流水号: response.data[i].组件零件流水号,
|
||||
@@ -265,11 +264,11 @@ export default {
|
||||
未税单价: 0,
|
||||
未税总额: 0,
|
||||
含税单价: 0,
|
||||
含税总额: 0
|
||||
含税总额: 0,
|
||||
备注: response.data[i].备注
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(this.tableData1, 222)
|
||||
},
|
||||
demoChange() { // 模板change
|
||||
switch (this.demoRadio) {
|
||||
@@ -289,9 +288,9 @@ export default {
|
||||
},
|
||||
demo1() { // 选择合同模板1
|
||||
this.content = `
|
||||
<h1 style="text-align: center;">
|
||||
<h2 style="text-align: center;">
|
||||
<strong>采购合同</strong>
|
||||
</h1>
|
||||
</h2>
|
||||
<table style="border-collapse: collapse; width: 100%;" border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -360,9 +359,7 @@ export default {
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">交货日期:</td>
|
||||
<td style="width: 25%;" colspan="3">
|
||||
<p id="deliveryDate"></p>
|
||||
</td>
|
||||
<td id="deliveryDate" style="width: 25%;" colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;" rowspan="3">交货地点:</td>
|
||||
@@ -379,27 +376,19 @@ export default {
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">开票信息:</td>
|
||||
<td style="width: 25%;" colspan="3">
|
||||
<p id="invoiceInfo"></p>
|
||||
</td>
|
||||
<td id="invoiceInfo" style="width: 25%;" colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">支付日期:</td>
|
||||
<td style="width: 25%;" colspan="3">
|
||||
<p id="payDate"></p>
|
||||
</td>
|
||||
<td id="payDate" style="width: 25%;" colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">支付方式:</td>
|
||||
<td style="width: 25%;" colspan="3">
|
||||
<p id="payMethod"></p>
|
||||
</td>
|
||||
<td id="payMethod" style="width: 25%;" colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%;">其他说明:</td>
|
||||
<td style="width: 25%;" colspan="3">
|
||||
<p id="otherInfo"></p>
|
||||
</td>
|
||||
<td id="otherInfo" style="width: 25%;" colspan="3"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -410,15 +399,11 @@ export default {
|
||||
<p>买方:</p>
|
||||
<p>(盖章)</p>
|
||||
<p>授权代表人:_______________</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
</td>
|
||||
<td style="width: 50%;">
|
||||
<p>卖方:</p>
|
||||
<p>(盖章)</p>
|
||||
<p>授权代表人:_______________</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -432,15 +417,17 @@ export default {
|
||||
<table style="border-collapse: collapse; width: 100%;" border="1">
|
||||
<tbody id="tbody">
|
||||
<tr id="tableHead">
|
||||
<td style="width: 5%;">序号</td>
|
||||
<td style="width: 10%;">图号</td>
|
||||
<td style="width: 10%;">名称</td>
|
||||
<td style="width: 10%;">规格型号</td>
|
||||
<td style="width: 5%;">数量</td>
|
||||
<td style="width: 10%;">单价金额</td>
|
||||
<td style="width: 10%;">合计金额</td>
|
||||
<td style="width: 12%;">交货时间</td>
|
||||
<td style="width: 10%;">备注</td>
|
||||
<td>序号</td>
|
||||
<td>产品名称</td>
|
||||
<td>产品规格型号</td>
|
||||
<td>图号</td>
|
||||
<td>名称</td>
|
||||
<td>规格型号</td>
|
||||
<td>数量</td>
|
||||
<td >单价</td>
|
||||
<td>合计</td>
|
||||
<td>交货时间</td>
|
||||
<td>备注</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -481,7 +468,7 @@ export default {
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td style="width: 5%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 5%;"></td><td style="width: 10%;"></td><td style="width: 10%;"></td><td style="width: 12%;"></td><td style="width: 10%;"></td>'
|
||||
tr[i].innerHTML = '<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>'
|
||||
document.getElementById('tableHead') ? document.getElementById('tableHead').after(tr[i]) : ''
|
||||
}
|
||||
this.actualTotal = 0
|
||||
@@ -493,14 +480,14 @@ export default {
|
||||
this.taxTotal += Number(this.tableData1[j].含税总额)
|
||||
if (document.getElementsByClassName('tableData')[j]) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData1[j].图号
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData1[j].名称
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData1[j].规格
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData1[j].数量
|
||||
this.hasTax === '含税' ? document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].含税单价 : document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].未税单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (Number(document.getElementsByClassName('tableData')[j].children[5].innerHTML) * Number(this.tableData1[j].数量)).toFixed(2)
|
||||
this.tableData1[j].交货期 ? document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].交货期.split(' ')[0] : document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
|
||||
document.getElementsByClassName('tableData')[j].children[8].innerHTML = `备注` + j
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData1[j].图号
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData1[j].名称
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].规格
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData1[j].数量
|
||||
this.hasTax === '含税' ? document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].含税单价 : document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].未税单价
|
||||
document.getElementsByClassName('tableData')[j].children[8].innerHTML = (Number(document.getElementsByClassName('tableData')[j].children[7].innerHTML) * Number(this.tableData1[j].数量)).toFixed(2)
|
||||
this.tableData1[j].交货期 ? document.getElementsByClassName('tableData')[j].children[9].innerHTML = this.tableData1[j].交货期.split(' ')[0] : document.getElementsByClassName('tableData')[j].children[9].innerHTML = ''
|
||||
document.getElementsByClassName('tableData')[j].children[10].innerHTML = this.tableData1[j].备注
|
||||
}
|
||||
}
|
||||
this.actualTotal = this.actualTotal.toFixed(2)
|
||||
|
||||
@@ -0,0 +1,749 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 400px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||
</viewer>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="已付款项">
|
||||
<span>{{ scope.row.已付款项 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="尚欠金额">
|
||||
<span>{{ scope.row.尚欠金额 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="备注">
|
||||
<span>{{ scope.row.备注 }}</span>
|
||||
</el-form-item><br>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否费用类发票">
|
||||
<span>{{ scope.row.是否费用类 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="税额">
|
||||
<span>{{ scope.row.税额 }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票号" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="danger" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreOrder()">追加入库单</el-button>
|
||||
<el-button :disabled="group2.length === 0" type="danger" size="small" icon="el-icon-delete" style="margin-left:10px" @click="deleteTable2()">移除入库单</el-button>
|
||||
<el-table ref="multipleTable" :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" align="center" width="35"/>
|
||||
<el-table-column label="入库单号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务员" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<h4>采购入库单明细</h4>
|
||||
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100" prop="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.本币单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="650px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票金额" prop="money">
|
||||
<el-input v-model="form1.money" size="small" placeholder="发票金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已付款项">
|
||||
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尚欠金额">
|
||||
<el-input v-model="form1.unpaid" size="small" placeholder="尚欠金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税额">
|
||||
<el-input v-model="form1.tax" size="small" placeholder="税额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否费用类">
|
||||
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" placeholder="备注" style="width: 500px"/>
|
||||
</el-form-item>
|
||||
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
|
||||
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
ref="upload"
|
||||
:auto-upload="false"
|
||||
:on-success="uploadSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button v-if="title1 === '创建发票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
||||
<span>入库单号:</span>
|
||||
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="searchInboundCard()">查询</el-button>
|
||||
<el-table ref="multipleTable" :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="35"/>
|
||||
<el-table-column label="入库单号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库日期" align="center" width="100" >
|
||||
<template slot-scope="scope" value-format="yyyy-MM-dd">
|
||||
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货单号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库类别" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="100" prop="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" 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.sum = scope.row.本币单价 * scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||
<el-button :disabled="group1.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchInboundCard, searchInboundCardDetail,
|
||||
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { uploadInvoiceScan, readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
export default {
|
||||
name: '', // 发票结算申请
|
||||
data() {
|
||||
return {
|
||||
invoiceNum: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
applyOrderNum: '',
|
||||
invoiceNumber: '',
|
||||
title2: '',
|
||||
dialogVisible2: false,
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
form1: {
|
||||
invoiceNum: '',
|
||||
money: '',
|
||||
paid: '',
|
||||
unpaid: '',
|
||||
tax: '',
|
||||
isCost: '',
|
||||
remark: '',
|
||||
applyOrderNum: ''
|
||||
},
|
||||
rules1: {
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请输入发票号' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请输入开票金额' }
|
||||
]
|
||||
},
|
||||
upload: uploadInvoiceScan,
|
||||
limit: 1,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
inboundCardNumber: '', // 入库单号
|
||||
group1: [], // 入库单流水号组
|
||||
group2: [] // 发票结算申请单明细流水号组
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {},
|
||||
createOrder() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.invoiceNum = ''
|
||||
this.form1.money = ''
|
||||
this.form1.paid = ''
|
||||
this.form1.unpaid = ''
|
||||
this.form1.tax = ''
|
||||
this.form1.isCost = ''
|
||||
this.form1.remark = ''
|
||||
this.title1 = '创建发票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
searchTable1() {
|
||||
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable1(this.check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
}
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.money = row.发票金额
|
||||
this.form1.paid = row.已付款项
|
||||
this.form1.unpaid = row.尚欠金额
|
||||
this.form1.tax = row.税额
|
||||
this.form1.isCost = row.是否费用类
|
||||
this.form1.remark = row.备注
|
||||
this.form1.applyOrderNum = row.发票结算申请单流水号
|
||||
this.title1 = '编辑发票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
submitDelete(row.发票结算申请单流水号).then(response => {
|
||||
if (response.data[0].result === '删除成功') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '删除失败') {
|
||||
this.$message.error('已提交申请,删除失败')
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
submitApply(row) {
|
||||
this.$confirm('确认提交申请吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('入库单为空')
|
||||
} else {
|
||||
submitApply(row.发票结算申请单流水号, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('提交成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('提交失败') }
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchInboundCard() {
|
||||
let check
|
||||
this.inboundCardNumber ? check = 1 : check = 0
|
||||
this.tableData01 = []
|
||||
searchInboundCard(check, this.inboundCardNumber).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.applyOrderNum = row.发票结算申请单流水号
|
||||
this.invoiceNumber = row.发票号
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTable3(row) {
|
||||
searchInboundCardDetail(row.采购入库单流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
beforeUpload(file) { // 上船前检测
|
||||
const isJPG = /^image\/.*/.test(file.type)
|
||||
const isLt4M = file.size / 1024 / 1024 < 4
|
||||
if (!isJPG) {
|
||||
this.$message.error('只能上传图片。。')
|
||||
}
|
||||
if (!isLt4M) {
|
||||
this.$message.error('上传头像图片大小不能超过 4MB!')
|
||||
}
|
||||
return isJPG && isLt4M
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
if (res[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.$refs.upload.clearFiles()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
},
|
||||
warningExceed() {
|
||||
this.$message.error('仅可上传一张发票')
|
||||
},
|
||||
addInStoreOrder() {
|
||||
if (this.applyOrderNum) {
|
||||
this.title2 = '追加入库单'
|
||||
this.dialogVisible2 = true
|
||||
} else {
|
||||
this.$message.error('请选择发票!')
|
||||
}
|
||||
},
|
||||
submitAdd1() { // 提交新增
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs.upload.submit() // 上传图片
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
submitEdit() { // 提交编辑
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
||||
if (response.data[0].result === '修改成功') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '修改失败') {
|
||||
this.$message.error('已提交申请,编辑失败')
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable02(row) {
|
||||
searchInboundCardDetail(row.采购入库单流水号).then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.group1 = val
|
||||
},
|
||||
submitAdd2() { // 追加入库单
|
||||
if (this.group1.length === 0) {
|
||||
this.$message.warning('请选择入库单')
|
||||
} else {
|
||||
const group = []
|
||||
for (let i = 0; i < this.group1.length; i++) {
|
||||
group.push(this.group1[i].采购入库单流水号)
|
||||
}
|
||||
addTable2(this.applyOrderNum, group).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('追加成功')
|
||||
this.dialogVisible2 = false
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('追加失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChange2(val) {
|
||||
this.group2 = val
|
||||
},
|
||||
deleteTable2() { // 移除入库单
|
||||
if (this.group2.length === 0) {
|
||||
this.$message.warning('请选择入库单')
|
||||
} else {
|
||||
this.$confirm('此操作将移除入库单, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const group = []
|
||||
for (let i = 0; i < this.group2.length; i++) {
|
||||
group.push(this.group2[i].发票结算申请单明细流水号)
|
||||
}
|
||||
deleteTable2(group).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('移除成功')
|
||||
this.dialogVisible2 = false
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('移除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
#expandTable .el-form-item{
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
361
src/views/PurchasingCenter/InvoiceSettlementApprove/index.vue
Normal file
361
src/views/PurchasingCenter/InvoiceSettlementApprove/index.vue
Normal file
@@ -0,0 +1,361 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>申请时间:</span>
|
||||
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/> ~
|
||||
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||
</viewer>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="已付款项">
|
||||
<span>{{ scope.row.已付款项 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="尚欠金额">
|
||||
<span>{{ scope.row.尚欠金额 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="备注">
|
||||
<span>{{ scope.row.备注 }}</span>
|
||||
</el-form-item><br>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否费用类发票">
|
||||
<span>{{ scope.row.是否费用类 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="税额">
|
||||
<span>{{ scope.row.税额 }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票号" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3">
|
||||
<el-table-column label="入库单号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务员" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.业务类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库类型" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<h4>采购入库单明细</h4>
|
||||
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100" prop="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.本币单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, searchTable2, searchInboundCardDetail, excuteApprove } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
export default {
|
||||
name: '', // 发票结算审批
|
||||
data() {
|
||||
return {
|
||||
date1: '',
|
||||
date2: '',
|
||||
tableData1: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
invoiceNumber: '',
|
||||
tableData2: [],
|
||||
tableData3: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'token',
|
||||
'sidebar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
console.log(this.token)
|
||||
},
|
||||
searchTable1() {
|
||||
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
|
||||
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
}
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
excuteApprove(row) {
|
||||
this.$confirm('确认审批签字?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
|
||||
if (response.data[0].result === '审批成功') {
|
||||
this.$message.success('审批成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '已完成审批') {
|
||||
this.$message.warning('已完成审批,不可重复审批')
|
||||
} else { this.$message.error('审批失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消审批'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchTable2(row) {
|
||||
console.log(row)
|
||||
this.invoiceNumber = row.发票号
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTable3(row) {
|
||||
console.log(row)
|
||||
searchInboundCardDetail(row.采购入库单流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
#expandTable .el-form-item{
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -129,7 +129,7 @@
|
||||
style="margin-left: 10px"
|
||||
@click="addMateriel">选入物料</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="460px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column type="expand" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
@@ -176,11 +176,11 @@
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="240" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)"/>
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)"/>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportExcel(scope.row)"/>
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" @click="editOfflineContract(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" @click="deleteOfflineContract(scope.row)">删除</el-button>
|
||||
<el-button type="warning" size="mini" @click="exportExcel(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -194,9 +194,10 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
<el-button :disabled="disable" type="success" size="mini" style="float:right" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
<el-button type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
|
||||
<el-button type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 300px;" height="300px" size="mini" show-summary>
|
||||
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
@@ -237,6 +238,16 @@
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="150" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
@@ -427,30 +438,31 @@
|
||||
<tr>
|
||||
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
|
||||
<td width="80px">合同名称</td>
|
||||
<td id="contractName" colspan="3" style="text-align: left;"/>
|
||||
<td id="contractName" colspan="2" style="text-align: left;"/>
|
||||
<td width="80px">供应商</td>
|
||||
<td id="supplier" colspan="4" style="text-align: left;"/>
|
||||
<td id="supplier" colspan="5" style="text-align: left;"/>
|
||||
<td id="qrCode" colspan="2" rowspan="2">二维码粘贴处</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">合同编号</td>
|
||||
<td id="contractNum" colspan="3" style="text-align: left;"/>
|
||||
<td id="contractNum" colspan="2" style="text-align: left;"/>
|
||||
<td width="80px">采购员</td>
|
||||
<td id="buyer" colspan="4" style="text-align: left;"/>
|
||||
<td id="buyer" colspan="5" style="text-align: left;"/>
|
||||
</tr>
|
||||
<tr id="tablehead">
|
||||
<td>序号</td>
|
||||
<td colspan="2">名称</td>
|
||||
<td colspan="2">规格</td>
|
||||
<td>规格</td>
|
||||
<td colspan="2">型号</td>
|
||||
<td colspan="2">数量</td>
|
||||
<td>数量</td>
|
||||
<td colspan="2">单价</td>
|
||||
<td colspan="2">合计</td>
|
||||
<td>备注</td>
|
||||
<td>交货期</td>
|
||||
<td colspan="2">备注</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>总计</td>
|
||||
<td colspan="10"/>
|
||||
<td id="remark" colspan="10"/>
|
||||
<td id="total" colspan="2" style="text-align: left;"/>
|
||||
<td/>
|
||||
</tr>
|
||||
@@ -461,7 +473,7 @@
|
||||
|
||||
<script>
|
||||
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
|
||||
addMateriel, deleteMateriel, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
|
||||
addMateriel, deleteMateriel, saveOfflineContact, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
|
||||
import QRCode from 'qrcode'
|
||||
import $ from 'jquery'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -893,6 +905,42 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
saveContract() {
|
||||
this.$confirm('确定保存合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
this.priceGroup = []
|
||||
const dateGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.priceGroup.push(this.tableData3[i].单价)
|
||||
dateGroup.push(this.tableData3[i].交货期要求)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
saveOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同保存成功')
|
||||
this.searchTable2()
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('离线合同保存失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
doneOfflineContact() { // 生成离线合同
|
||||
this.$confirm('确定生成合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -903,13 +951,17 @@ export default {
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
this.priceGroup = []
|
||||
const dateGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.priceGroup.push(this.tableData3[i].单价)
|
||||
dateGroup.push(this.tableData3[i].交货期要求)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup).then(response => {
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同生成成功')
|
||||
this.searchTable2()
|
||||
@@ -945,7 +997,7 @@ export default {
|
||||
for (let i = 0; i < length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/>`
|
||||
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
|
||||
document.getElementById('tablehead').after(tr[i])
|
||||
}
|
||||
let total = 0
|
||||
@@ -957,7 +1009,8 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].数量 * this.tableData3[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求
|
||||
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注
|
||||
total += this.tableData3[j].数量 * this.tableData3[j].单价
|
||||
}
|
||||
document.getElementById('contractNum').innerHTML = row.离线合同编号
|
||||
@@ -965,6 +1018,7 @@ export default {
|
||||
document.getElementById('supplier').innerHTML = row.供应商名称
|
||||
document.getElementById('buyer').innerHTML = row.采购员
|
||||
document.getElementById('total').innerHTML = total
|
||||
document.getElementById('remark').innerHTML = row.离线合同备注
|
||||
$('#qrCode').html(`<img id="img" style="display: block;margin: 0 auto">`)
|
||||
this.useqrcode(row.离线合同流水号) // 显示二维码
|
||||
}).then(() => {
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -24,7 +32,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -73,15 +81,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary @row-click="searchTable2">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
@@ -103,25 +116,78 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
<span v-show="supplierValue">累计合同总额:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计付款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计欠款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="100" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
{{ 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) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交货期要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="150" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1000px">
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1200px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small">
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin: 0 10px 10px 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable01()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @row-click="searchTable03" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
@@ -133,43 +199,101 @@
|
||||
{{ scope.row.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="250">
|
||||
<el-table-column label="供应商" align="center" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="100">
|
||||
<el-table-column label="采购员" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款方式" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" min-width="100" prop="合同总额" fixed="right">
|
||||
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.请款金额" size="mini" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
<el-table v-loading="" :data="tableData02" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="100" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交货期要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="150" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchRequestFund, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/OfflineContractRequestFund'
|
||||
import { searchRequestFund, searchSupplier, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund, searchMateriel } from '@/api/PurchasingCenter/OfflineContractRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
totalSum: 0,
|
||||
totalPay: 0,
|
||||
totalDebt: 0,
|
||||
dateRange: '',
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
@@ -206,10 +330,12 @@ export default {
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
SUM: 0,
|
||||
contractGroup: [],
|
||||
@@ -232,7 +358,7 @@ export default {
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchOfflineContract().then(response => {
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
@@ -242,11 +368,23 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询请款表
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.tableData2 = []
|
||||
let check1, check2
|
||||
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||
this.supplierValue ? check2 = 1 : check2 = 0
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
this.totalSum = 0
|
||||
this.totalPay = 0
|
||||
searchOfflineContract(check2, this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
this.totalSum += data.合同总额
|
||||
this.totalPay += data.已付金额
|
||||
})
|
||||
this.totalDebt = this.totalSum - this.totalPay
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
@@ -262,25 +400,69 @@ export default {
|
||||
this.supplierValue = ''
|
||||
this.fetchData() // 重新获取供应商
|
||||
this.tableData01 = []
|
||||
this.tableData02 = []
|
||||
},
|
||||
searchTable03(row) { // 查询离线合同明细
|
||||
searchMateriel(row.离线合同流水号).then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue) {
|
||||
this.contractGroup = []
|
||||
searchOfflineContract(this.supplierValue).then(response => {
|
||||
let check
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchOfflineContract(check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.合同总额 - v.已付金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择供应商')
|
||||
}
|
||||
},
|
||||
searchTable2(row) { // 查询离线合同明细
|
||||
searchMateriel(row.离线合同流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
console.log(val)
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.SUM += parseFloat(val[i].合同总额)
|
||||
this.SUM += parseFloat(val[i].请款金额)
|
||||
this.contractGroup.push(val[i].离线合同流水号)
|
||||
this.sumGroup.push(val[i].合同总额)
|
||||
this.sumGroup.push(val[i].请款金额)
|
||||
}
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
@@ -312,9 +494,11 @@ export default {
|
||||
}).then(() => {
|
||||
cancelRequestFund(row.离线合同请款流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('取消成功')
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('取消失败') }
|
||||
} else if (response.data[0].result === '已审批') {
|
||||
this.$message.error('已审批,操作失败')
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="100*(Number(scope.row.已付金额))/scope.row.合同总额"
|
||||
:percentage="scope.row.付款进度 = (100*(Number(scope.row.已付金额))/scope.row.合同总额) > 100 ? 100 : Number((100*(Number(scope.row.已付金额))/scope.row.合同总额).toFixed(2))"
|
||||
status="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" show-summary stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
|
||||
<el-table v-loading="" :data="tableData1" show-summary stripe border style="width: 100%;max-height: 600px;" height="600px" size="mini">
|
||||
<el-table-column label="序号" align="center" width="80" type="index"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -352,6 +352,9 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '已审批') {
|
||||
this.searchTable1()
|
||||
this.$message.error('已审批,操作失败')
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
:data="tableData1"
|
||||
size="mini"
|
||||
style="max-height: 600px"
|
||||
height="400px"
|
||||
height="600px"
|
||||
border
|
||||
stripe
|
||||
@selection-change="handleSelectionChange1">
|
||||
@@ -213,7 +213,7 @@
|
||||
:data="tableData2"
|
||||
size="mini"
|
||||
style="max-height: 600px"
|
||||
height="400px"
|
||||
height="600px"
|
||||
border
|
||||
stripe
|
||||
@selection-change="handleSelectionChange2">
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<!-- or name="fade" -->
|
||||
<!-- <router-view :key="key"></router-view> -->
|
||||
<!--<keep-alive>-->
|
||||
<router-view/>
|
||||
<!--</keep-alive>-->
|
||||
</transition>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user