This commit is contained in:
chenjianan
2019-03-20 19:10:10 +08:00
26 changed files with 2986 additions and 468 deletions

View File

@@ -25,7 +25,7 @@ export function searchtable2(num1) {
}
})
}
// 完成备料工序
export function handlechange(Number, code) {
return request({
url: '',
@@ -37,17 +37,32 @@ export function handlechange(Number, code) {
}
})
}
// 查询外购备料零件
export function searchtable3(num, num1, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_外购备料查询',
param: '零件图号_check=' + num + '&零件图号=' + num1,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 自家备料出库
export function change(Number, code, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_备料到货更改',
param: '工流水号=' + Number + '&工作者考勤编号=' + code + '&工艺计划流水号组=' + num
name: '车间生产管理工艺_备料到货_状态更改',
param: '工艺计划流水号=' + Number + '&重量=' + code + '&单价=' + num
}
})
}
// 外购备料出库
export function change2(Number, code, num) {
return request({
url: '',

View File

@@ -419,3 +419,15 @@ export function WeightCopy(num, num2) {
}
})
}
// 保存变更材质
export function saveWeight(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_修改零件重量',
param: '工艺计划流水号=' + num0 + '&重量=' + num1
}
})
}

View File

@@ -1,15 +1,136 @@
import request from '@/utils/request'
// 查询库存数
export function searchInventoryNum(pageCurrent, pageSize, check1, name, check2, state1, state2) {
// 查询外购备料列表
export function initPartDrawing(check1, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_物料余量_查询数据',
param: `物料名称_check=${check1}&物料名称=${name}&库存状态_check=${check2}&库存状态=${state1}&采购状态=${state2}`,
name: '备料管理_外购备料_查询数据',
param: `零件图号_check=${check1}&零件图号=${name}`
}
})
}
// 查询外购备料
export function searchPurchasedMaterials(pageCurrent, pageSize, check1, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_外购备料_查询数据',
param: `零件图号_check=${check1}&零件图号=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询采购单
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划_查询数据',
param: `采购单号_check=${check1}&采购单号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 创建采购单
export function addPurchaseOrder(PurchaseOrderName, supplier, person, date) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划_增加数据',
param: `采购单名称=${PurchaseOrderName}&采购员=${person}&供应商=${supplier}&计划完成日期=${date}`
}
})
}
// 编辑采购单
export function editPurchaseOrder(PurchaseOrderNameValue, PurchaseOrderName, supplier, date) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划_编辑数据',
param: `采购计划流水号=${PurchaseOrderNameValue}&采购单名称=${PurchaseOrderName}&供应商=${supplier}&计划完成日期=${date}`
}
})
}
// 删除采购单
export function deletePurchaseOrder(PurchaseOrderNameValue) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划_删除数据',
param: `采购计划流水号=${PurchaseOrderNameValue}`
}
})
}
// 查询采购计划明细
export function searchMateriel(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划明细_查询数据',
param: `采购计划流水号=${num}`
}
})
}
// 增加采购计划明细
export function addMateriel(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划明细_增加数据',
param: `采购计划流水号=${num1}&工艺计划流水号组=${num2}`
}
})
}
// 保存采购计划明细
export function saveMateriel(num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划明细_保存数据',
param: `采购计划流水号=${num1}&采购计划明细流水号组=${num2}&单位组=${num3}&备注组=${num4}`
}
})
}
// 删除采购计划明细
export function deleteMateriel(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_外购备料_移出数据',
param: `采购计划明细流水号=${num}&工艺计划流水号=${num1}`
}
})
}
// 查询供应商
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
}
})
}

View File

@@ -87,3 +87,40 @@ export function execApprovalOffline(num1, num2, reason, person, state) {
}
})
}
// 查询采购计划待请款信息
export function searchRequsetFundDetail1(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_请款明细_查询数据',
param: `采购计划请款流水号=${num}`
}
})
}
// 查询备料审批/付款
export function initApprovalMaterials(pageCurrent, pageSize, state) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_审批付款_查询数据',
param: `审批_付款状态=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 执行审批/付款(备料)
export function execMaterials(num1, num2, reason, person, state) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_审批付款_修改数据',
param: `采购计划请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
}
})
}

View File

@@ -0,0 +1,122 @@
import request from '@/utils/request'
// 发票查询
export function searchInvoice(pageCurrent, pageSize, check1, num1, check2, supplierName0, check3, transmit, check4, recipient) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_发票_查询数据',
param: '发票号_check=' + check1 + '&发票号=' + num1 + '&供应商名称_check=' + check2 + '&供应商名称=' + supplierName0 + '&传送人_check=' + check3 + '&传送人=' + transmit + '&接收人_check=' + check4 + '&接收人=' + recipient,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 发票明细查询
export function searchInvoiceDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_发票明细_查询数据',
param: '发票流水号=' + num
}
})
}
// 发票增加
export function addInvoice(num1, time1, money, send, receive, remark, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_发票_增加数据',
param: `采购计划流水号组=${num1}&开票时间=${time1}&开票金额=${money}&传送人=${send}&接收人=${receive}&备注=${remark}&供应商=${num3}&采购计划流水号字符串=${num4}`
}
})
}
// 发票编辑
export function editInvoice(num1, time1, money, send, receive, remark, num3) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_发票_编辑数据',
param: '发票流水号=' + num1 + '&供应商=' + num3 + '&开票时间=' + time1 + '&开票金额=' + money + '&传送人=' + send + '&接收人=' + receive + '&备注=' + remark
}
})
}
// 发票删除
export function deleteInvoice(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_发票_删除数据',
param: '发票流水号=' + num1
}
})
}
// 初始化采购计划
export function initPurchase() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划_查询数据_发票'
}
})
}
// 接收人初始化
export function initPerson() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=9'
}
})
}
// 传送人初始化
export function initPerson1() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=5'
}
})
}
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间采购管理_付款情况_查询数据',
param: '采购合同流水号_check=0&供应商名称_check=0'
}
})
}
// 查询供应商
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
}
})
}

View File

@@ -0,0 +1,63 @@
import request from '@/utils/request'
// 查询采购单列表
export function initPurchaseOrder(check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划_查询数据_到货',
param: `采购单号_check=${check1}&采购单号=${num}&供应商名称_check=${check2}&供应商名称=${name}`
}
})
}
// 查询采购单
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划_查询数据_到货',
param: `采购单号_check=${check1}&采购单号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询采购单明细
export function searchMateriel(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划明细_查询数据',
param: `采购计划流水号=${num}`
}
})
}
// 到货
export function Arrival(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划_到货',
param: `采购计划明细流水号=${num}&重量=${num1}&单价=${num2}`
}
})
}
// 总价
export function totalChange(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划_保存总价',
param: `采购计划流水号=${num}&总价=${num1}`
}
})
}

View File

@@ -0,0 +1,75 @@
import request from '@/utils/request'
// 查询请款表
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_请款_查询数据',
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询采购计划待请款信息
export function searchOfflineContract(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_待请款_查询数据',
param: `供应商=${num}`
}
})
}
// 增加请款
export function submitRequestFund(contractGroup, sumGroup, supplier, money, person) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_请款_增加数据',
param: `采购计划流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商=${supplier}&请款金额=${money}&请款人=${person}`
}
})
}
// 查询采购计划待请款信息
export function searchRequsetFundDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_请款明细_查询数据',
param: `采购计划请款流水号=${num}`
}
})
}
// 取消请款
export function cancelRequestFund(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_请款_删除数据',
param: `采购计划请款流水号=${num}`
}
})
}
// 保存请款明细
export function SavingMoney(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_请款明细_保存数据',
param: `采购计划请款明细流水号组=${num}&请款金额组=${num1}`
}
})
}

View File

@@ -0,0 +1,74 @@
import request from '@/utils/request'
// 查询入库单列表
export function initWarehouseReceipt(check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_入库单_查询数据',
param: `入库单号_check=${check1}&入库单号=${num}&供应商名称_check=${check2}&供应商名称=${name}`
}
})
}
// 查询采购单列表
export function initPurchaseOrder() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划_查询数据_发票'
}
})
}
// 查询入库单
export function searchWarehouseReceipt(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_入库单_查询数据',
param: `入库单号_check=${check1}&入库单号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询入库单明细
export function searchMateriel(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划明细_查询数据',
param: `采购计划流水号=${num}`
}
})
}
// 创建入库单
export function AddWarehousing(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_入库单_增加数据',
param: `采购计划流水号=${num}&入库人员=${num1}`
}
})
}
// 删除入库单
export function deleteWarehousing(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_入库单_删除数据',
param: `入库单流水号=${num}`
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552714746003" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2671" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M704 111.04V38.29333333H320v72.74666667H90.66666667v874.66666667h404.16v-53.33333334H144v-768h176v65.92h384v-65.92h176V550.4h53.33333333V111.04H704z m-53.33333333 65.92H373.33333333v-85.33333333h277.33333334v85.33333333zM272 526.72h298.66666667v53.33333333H272v-53.33333333z m480-107.41333333H272v-53.33333334h480v53.33333334z m5.33333333 337.06666666h176v53.33333334H757.33333333v176h-53.33333333v-176H528v-53.33333334h176v-176h53.33333333v176z" p-id="2672"></path></svg>

After

Width:  |  Height:  |  Size: 858 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552714825535" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3678" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M958.464 393.216c4.096 0 12.288-4.096 16.384-4.096 4.096-4.096 4.096-8.192 4.096-16.384L978.944 233.472c0-69.632-20.48-90.112-90.112-90.112L135.168 143.36C69.632 143.36 45.056 163.84 45.056 233.472l0 139.264c0 4.096 4.096 12.288 8.192 16.384 4.096 4.096 8.192 4.096 16.384 4.096 40.96 0 69.632 8.192 90.112 24.576 20.48 20.48 28.672 49.152 28.672 94.208 0 77.824-40.96 118.784-118.784 118.784-12.288 0-20.48 8.192-20.48 20.48l0 139.264c0 69.632 20.48 90.112 90.112 90.112l753.664 0c69.632 0 90.112-20.48 90.112-90.112l0-139.264c0-4.096-4.096-12.288-8.192-16.384-4.096-4.096-12.288-4.096-16.384-4.096-36.864 0-65.536-8.192-86.016-28.672-20.48-20.48-32.768-53.248-32.768-90.112 0-36.864 12.288-65.536 32.768-86.016C897.024 397.312 933.888 393.216 958.464 393.216zM798.72 512c0 49.152 16.384 90.112 45.056 118.784 24.576 24.576 57.344 36.864 94.208 40.96l0 118.784c0 45.056-4.096 49.152-49.152 49.152L135.168 839.68c-45.056 0-49.152-4.096-49.152-49.152l0-118.784c90.112-8.192 139.264-65.536 139.264-159.744 0-57.344-12.288-98.304-40.96-122.88C163.84 364.544 131.072 352.256 86.016 352.256L86.016 233.472c0-45.056 4.096-49.152 49.152-49.152l753.664 0c45.056 0 49.152 4.096 49.152 49.152l0 118.784c-36.864 4.096-73.728 16.384-94.208 40.96C815.104 421.888 798.72 462.848 798.72 512z" p-id="3679"></path><path d="M679.936 258.048c-8.192-8.192-20.48-8.192-28.672 0l-139.264 139.264L372.736 258.048c-8.192-8.192-20.48-8.192-28.672 0s-8.192 20.48 0 28.672l118.784 118.784L356.352 405.504c-12.288 0-20.48 8.192-20.48 20.48S344.064 450.56 356.352 450.56L491.52 450.56l0 90.112L356.352 540.672c-12.288 0-20.48 8.192-20.48 20.48s8.192 20.48 20.48 20.48L491.52 581.632l0 167.936c0 12.288 8.192 20.48 20.48 20.48s20.48-8.192 20.48-20.48l0-167.936 135.168 0c12.288 0 20.48-8.192 20.48-20.48s-8.192-20.48-20.48-20.48L532.48 540.672 532.48 450.56l135.168 0c12.288 0 20.48-8.192 20.48-20.48S679.936 409.6 667.648 409.6l-106.496 0 118.784-118.784C688.128 282.624 688.128 266.24 679.936 258.048z" p-id="3680"></path></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

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

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552714836428" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3824" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M 445.6 371.5 c 14.5 0 26.2 -11.8 26.2 -26.2 v -8.9 c 0 -14.5 -11.8 -26.2 -26.2 -26.2 h -38.8 l 59.8 -84.1 c 5.4 -8 6 -18.2 1.5 -26.7 c -4.5 -8.7 -13.4 -14.1 -23.2 -14.1 H 431 c -9 0 -17.3 4.5 -22.2 12.2 l -60.2 89.1 l -59.4 -88.9 c -4.8 -7.7 -13.1 -12.4 -22.2 -12.4 h -16.9 c -9.8 0 -18.7 5.4 -23.3 14.1 c -4.4 8.5 -3.9 18.7 1.5 26.7 l 59.1 84.2 h -40.2 c -14.5 0 -26.2 11.8 -26.2 26.2 v 8.9 c 0 14.5 11.8 26.2 26.2 26.2 h 66.7 v 9.3 h -66.7 c -14.5 0 -26.2 11.8 -26.2 26.2 v 9.1 c 0 14.5 11.8 26.2 26.2 26.2 h 66.7 V 487 c 0 14.5 11.8 26.2 26.2 26.2 H 355 c 14.5 0 26.2 -11.8 26.2 -26.2 v -44.6 h 64.4 c 14.5 0 26.2 -11.8 26.2 -26.2 v -9.1 c 0 -14.5 -11.8 -26.2 -26.2 -26.2 h -64.4 v -9.3 h 64.4 Z M 564 219.9 c -17.7 0 -32 14.3 -32 32 s 14.3 32 32 32 h 200 c 17.7 0 32 -14.3 32 -32 s -14.3 -32 -32 -32 H 564 Z M 694 415.9 c 17.7 0 32 -14.3 32 -32 s -14.3 -32 -32 -32 H 564 c -17.7 0 -32 14.3 -32 32 s 14.3 32 32 32 h 130 Z" p-id="3825"></path><path d="M 162 895.9 V 128.1 l 0.1 -0.1 h 701.8 l 0.1 0.1 v 281.6 c 6.6 -3 13.5 -4.5 20.5 -4.5 c 12.6 0 24.6 5 34.7 14.3 l 8.9 8.2 V 128 c 0 -35.2 -28.8 -64 -64 -64 H 162 c -35.2 0 -64 28.8 -64 64 v 768 c 0 35.2 28.8 64 64 64 h 316.7 c -0.1 -0.9 -0.1 -1.8 0 -2.7 v -0.4 l 0.1 -0.7 l 8.4 -60.2 h -325 c -0.1 0 -0.2 -0.1 -0.2 -0.1 Z" p-id="3826"></path><path d="M 943.7 511.5 l -34.6 -31.9 c -10.1 -9.4 -22.1 -14.3 -34.7 -14.3 c -14.8 0 -29.4 7 -41.1 19.7 L 561.4 774 l -14.7 105.3 l -0.1 0.7 v 0.4 c -0.3 6.2 2.1 12.1 6.7 16.4 c 3.9 3.6 8.9 5.5 14.1 5.5 c 0.8 0 1.6 0 2.4 -0.1 h 0.4 l 105.1 -22.7 L 945.4 592 c 10.6 -10.7 16.5 -25.5 16.1 -40.5 c -0.1 -15.2 -6.7 -29.7 -17.8 -40 Z M 647.1 827.3 l -32.9 3.6 l 1.2 -32.7 L 821.7 580 l 31.5 29.2 l -206.1 218.1 Z m 258.4 -274.6 l -14.1 15.2 l -31.4 -29.1 l 14 -15.2 h 0.3 l 31.2 28.8 c 0.1 0.1 0.1 0.2 0 0.3 Z" p-id="3827"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552714849238" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4101" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M896 651.636364a34.909091 34.909091 0 0 0 34.909091-34.909091V139.636364a46.545455 46.545455 0 0 0-46.545455-46.545455h-139.636363V46.545455a46.545455 46.545455 0 0 0-46.545455-46.545455H325.818182a46.545455 46.545455 0 0 0-46.545455 46.545455v46.545454H139.636364a46.545455 46.545455 0 0 0-46.545455 46.545455v837.818181a46.545455 46.545455 0 0 0 46.545455 46.545455h744.727272a46.545455 46.545455 0 0 0 46.545455-46.545455v-151.272727a34.909091 34.909091 0 0 0-69.818182 0V954.181818H162.909091V162.909091h116.363636v46.545454a46.545455 46.545455 0 0 0 46.545455 46.545455h372.363636a46.545455 46.545455 0 0 0 46.545455-46.545455V162.909091h116.363636v453.818182a34.909091 34.909091 0 0 0 34.909091 34.909091zM674.909091 186.181818H349.090909V69.818182h325.818182zM302.545455 802.909091a34.909091 34.909091 0 0 0 34.90909 34.909091h349.09091a34.909091 34.909091 0 0 0 0-69.818182h-349.09091A34.909091 34.909091 0 0 0 302.545455 802.909091zM512 325.818182a34.909091 34.909091 0 0 0-34.909091 34.909091V581.818182l-72.145454-72.145455a34.909091 34.909091 0 0 0-49.338182 49.338182l139.636363 139.636364a23.272727 23.272727 0 0 0 32.814546 0l139.636363-139.636364a34.909091 34.909091 0 1 0-49.338181-49.338182L546.909091 581.818182v-221.090909A34.909091 34.909091 0 0 0 512 325.818182z" p-id="4102"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -44,9 +44,9 @@
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" width="100px">
<el-table-column label="重量" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.原材料规格 }}
{{ scope.row.重量 }}
</template>
</el-table-column>
<el-table-column label="备料" align="center">
@@ -155,6 +155,9 @@ export default {
if (response.data.total === 0) {
this.loading = false
} else {
// this.tableData.push({
// 重量: response.data.rows[0].重量
// })
this.Data = response.data.rows
this.total = response.data.total
}
@@ -168,7 +171,7 @@ export default {
备料打印: this.Data[i].备料打印,
工艺要求: response.data[0].工艺要求,
材料: this.Data[i].材料,
原材料规格: this.Data[i].原材料规格,
重量: this.Data[i].重量,
批次数量: this.Data[i].批次数量
})
})

View File

@@ -6,24 +6,13 @@
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料出库</el-button>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit2()">外购备料出库</el-button>
<!--<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料出库</el-button>-->
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column label="到货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.备料到货==='1'" type="success" size="small">已到货</el-tag>
<el-tag v-if="scope.row.备料到货==='0'" type="warning" size="small">未到货</el-tag>
</template>
</el-table-column>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
@@ -39,6 +28,25 @@
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
<el-table-column prop="request" label="重量(kg)" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.重量" size="mini"/>
</template>
</el-table-column>
<el-table-column prop="request" label="单价(元)" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(scope.row)">出库</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@@ -53,17 +61,17 @@
</div>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<span>零件图号:</span>
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="total2=0;pageSize2=10; pageCurrent2=1;searchTable2()">查询</el-button>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料出库</el-button>
</el-card>
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column label="到货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.备料到货==='1'" type="success" size="small">已到货</el-tag>
<el-tag v-if="scope.row.备料到货==='0'" type="warning" size="small">未到货</el-tag>
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
@@ -74,22 +82,32 @@
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="备料" align="center">
<el-table-column label="重量" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
{{ scope.row.重量1 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注1 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
v-if="!loading2"
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize"
:total="total"
:page-size="pageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
@@ -97,7 +115,8 @@
</template>
<script>
import { searchtable, searchtable2, change, change2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { searchtable, searchtable2, change, handlechange, searchtable3, change2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { mapGetters } from 'vuex'
export default {
data() {
return {
@@ -111,11 +130,26 @@ export default {
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1 // 后台获取页
pageCurrent: 1, // 后台获取页
loading2: false,
partName2: '',
tableData2: [], // 表格数据
total2: null, // 总条数
pageSize2: 10, // 每页显示条数
pageCurrent2: 1 // 后台获取页
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.searchTable()
this.searchTable2()
},
methods: {
// 查询表格数据
@@ -144,16 +178,58 @@ export default {
零件图号: this.Data[i].零件图号,
备料到货: this.Data[i].备料到货,
工艺要求: response.data[0].工艺要求,
工序流水号: response.data[0].工序流水号
工序流水号: response.data[0].工序流水号,
重量: response.data[0].重量
})
})
this.loading = false
}
})
},
// 自家备料出库
handleChange1(row) {
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, this.id)
}).then(response => {
this.searchTable()
})
},
handleSelectionChange(val) {
this.arrest = val
},
searchTable2() {
this.loading2 = true
this.tableData2 = []
this.Data = []
if (this.partName2 !== '' && this.partName2 !== null) {
this.partNamecheck2 = 1
} else {
this.partNamecheck2 = 0
}
searchtable3(this.partNamecheck2, this.partName2, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.total === 0) {
this.loading2 = false
} else {
this.Data = response.data.rows
this.total2 = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data.length; i++) {
searchtable2(this.Data[i].工艺计划流水号).then(response => {
this.tableData2.push({
工艺计划流水号: this.Data[i].工艺计划流水号,
零件名称: this.Data[i].零件名称,
零件图号: this.Data[i].零件图号,
重量1: this.Data[i].重量1,
单价: this.Data[i].单价,
备注1: this.Data[i].备注1,
工序流水号: response.data[0].工序流水号
})
})
this.loading2 = false
}
})
},
edit() {
this.bianliang1 = []
this.bianliang2 = []
@@ -164,23 +240,8 @@ export default {
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
change(this.bianliang2, '0000', this.bianliang1).then(() => {
this.searchTable()
})
}
},
edit2() {
this.bianliang1 = []
this.bianliang2 = []
if (this.arrest.length === 0) {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest.length; i++) {
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
change2(this.bianliang2, '0000', this.bianliang1).then(() => {
this.searchTable()
change2(this.bianliang2, this.id, this.bianliang1).then(response => {
this.searchTable2()
})
}
},
@@ -193,6 +254,15 @@ export default {
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
handleSizeChange2(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
}
}
}

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="CraftmenValue = '';checked = false;partNumValue = '';typeValue = '';partName = '';material = '';materialName = '';spec = '';batchNum = '';searchParts()">
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="CraftmenValue = '';checked = false;partNumValue = '';typeValue = '';partName = '';material = '';materialName = '';prepareMateriel = '';spec = '';batchNum = '';searchParts()">
<el-radio v-model="radio" :label="1">未编制</el-radio>
<el-radio v-model="radio" :label="2">已编制</el-radio>
</el-radio-group>
@@ -31,15 +31,15 @@
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
<span>零件名称:</span>
<el-input v-model="partName" placeholder="零件名称" size="small" readonly style="width:115px"/>
<span>材质:</span>
<el-input v-model="materialName" placeholder="材质" size="small" style="width:215px" readonly>
<span>投产总数量:</span>
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
<span>物料:</span>
<el-input v-model="materialName" placeholder="物料" size="small" style="width:215px" readonly>
<el-button slot="prepend" icon="el-icon-search" @click="dialogMaterial=true"/>
<el-button slot="append" icon="el-icon-cjn-09" @click="saveMaterial"/>
</el-input>
<span>规格:</span>
<el-input v-model="spec" :readonly="isShow2" style="width:100px" size="small" placeholder="规格"/>
<span>投产总数量:</span>
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
<!--<span>规格:</span>-->
<!--<el-input v-model="spec" :readonly="isShow2" style="width:100px" size="small" placeholder="规格"/>-->
</div>
<div>
<el-row>
@@ -60,6 +60,10 @@
<span>长度:</span>
<el-input-number v-model="height2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation1()">计算重量</el-button>
<span>重量:</span>
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
<!-- ° # ± × mm δ μm ()-->
<!--<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="insertThestring()">计算重量</el-button>-->
</el-col>
@@ -72,6 +76,10 @@
<span>:</span>
<el-input-number v-model="height1" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation2()">计算重量</el-button>
<span>重量:</span>
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
</el-col>
<el-col v-show="materielValue==='3'" :span="20">
@@ -80,6 +88,10 @@
<span>长度:</span>
<el-input-number v-model="length2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation3()">计算重量</el-button>
<span>重量:</span>
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
</el-col>
<el-col v-show="materielValue==='4'" :span="20">
@@ -90,6 +102,10 @@
<span>长度:</span>
<el-input-number v-model="changdu" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation4()">计算重量</el-button>
<span>重量:</span>
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
</el-col>
<el-col v-show="materielValue==='5'" :span="20">
@@ -100,7 +116,12 @@
<span>长度:</span>
<el-input-number v-model="changdu2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation5()">计算重量</el-button>
<span>重量:</span>
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
</el-col>
</el-row>
</div>
</el-card>
@@ -206,7 +227,7 @@
</el-table>
</el-card>
<el-dialog :visible.sync="dialogMaterial" title="材质选择" center width="400px">
<el-dialog :visible.sync="dialogMaterial" title="物料选择" center width="400px">
<el-input v-model="input" placeholder="材质" size="small" style="width:200px"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="total=0;pageCurrent=1;pageSize=10;searchMaterial()">查询</el-button>
<el-table :data="tableMaterial" size="mini" highlight-current-row border @row-click="selectMaterial">
@@ -232,7 +253,6 @@
<el-button type="primary" size="small" @click="selectMaterial2()">提交</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="工艺名称、工艺要求选择" center width="400px">
<el-form ref="form2" :model="form2" label-position="left" label-width="125px" class="demo-ruleForm">
<el-form-item label="工艺名称分类">
@@ -456,6 +476,7 @@
<script>
import '@/icon/iconfont.css'
import {
saveWeight,
numChange,
searchProcess11,
WeightCopy,
@@ -487,8 +508,7 @@ import {
selectRequest,
pasteTable,
deleteTable,
returnEdit,
searchRecord
returnEdit
} from '@/api/ManufacturingCenter/ProcessPlanning'
import elInput from 'element-ui/packages/input'
import { mapGetters } from 'vuex'
@@ -499,6 +519,9 @@ export default {
},
data() {
return {
weight: '',
dialogMateria2: false,
prepareMateriel: '',
lastFocusText: '',
Result1: '',
Result2: '',
@@ -637,7 +660,7 @@ export default {
result: 0,
oldNum: '',
newNum: '',
tableRecord: [],
// tableRecord: [],
materialName2: '',
material2: ''
}
@@ -656,7 +679,21 @@ export default {
this.getList()
},
methods: {
saveWeight() {
if (this.partNumValue === '' || this.material === '') {
this.$message.error('请选择一个零件')
} else {
saveWeight(this.partNumValue, this.weight).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功')
} else {
this.$message.error('保存失败')
}
})
}
},
clear() {
this.weight = ''
this.Length = ''
this.Width = ''
this.height1 = ''
@@ -676,27 +713,35 @@ export default {
this.$message.error('请先选择一个零件')
} else {
if (this.materielValue === '1') {
this.Result2 = '物料:' + this.materiel[1].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2 + 'mm 重量:' + 0.00617 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.Result2 = '物料:' + this.materiel[1].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2
// + 'mm 重量:' + 0.00617 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.weight = 0.00617 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2)
WeightCopy(this.partNumValue, this.Result2).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
if (this.materielValue === '6') {
this.Result2 = '物料:' + this.materiel[6].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2 + 'mm 重量:' + 0.00698 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.Result2 = '物料:' + this.materiel[6].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2
// + 'mm 重量:' + 0.00698 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.weight = 0.00698 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2)
WeightCopy(this.partNumValue, this.Result2).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
if (this.materielValue === '7') {
this.Result2 = '物料:' + this.materiel[7].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2 + 'mm 重量:' + 0.00668 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.Result2 = '物料:' + this.materiel[7].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2
// + 'mm 重量:' + 0.00668 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.weight = 0.00668 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2)
WeightCopy(this.partNumValue, this.Result2).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
if (this.materielValue === '8') {
this.Result2 = '物料:' + this.materiel[8].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2 + 'mm 重量:' + 0.0022 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.Result2 = '物料:' + this.materiel[8].label + ' 直径:' + this.diameter + 'mm 长度:' + this.height2
// + 'mm 重量:' + 0.0022 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2) + 'kg'
this.weight = 0.0022 * 0.001 * parseInt(this.diameter) * parseInt(this.diameter) * parseFloat(this.height2)
WeightCopy(this.partNumValue, this.Result2).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
}
@@ -707,27 +752,35 @@ export default {
this.$message.error('请先选择一个零件')
} else {
if (this.materielValue === '2') {
this.Result1 = '物料:' + this.materiel[2].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1 + 'mm 重量:' + 0.001 * 0.00785 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.Result1 = '物料:' + this.materiel[2].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1
// + 'mm 重量:' + 0.001 * 0.00785 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.weight = 0.001 * 0.00785 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1)
WeightCopy(this.partNumValue, this.Result1).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
if (this.materielValue === '9') {
this.Result1 = '物料:' + this.materiel[9].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1 + 'mm 重量:' + 0.001 * 0.0089 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.Result1 = '物料:' + this.materiel[9].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1
// + 'mm 重量:' + 0.001 * 0.0089 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.weight = 0.001 * 0.0089 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1)
WeightCopy(this.partNumValue, this.Result1).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
if (this.materielValue === '10') {
this.Result1 = '物料:' + this.materiel[10].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1 + 'mm 重量:' + 0.001 * 0.0085 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.Result1 = '物料:' + this.materiel[10].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1
// + 'mm 重量:' + 0.001 * 0.0085 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.weight = 0.001 * 0.0085 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1)
WeightCopy(this.partNumValue, this.Result1).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
if (this.materielValue === '11') {
this.Result1 = '物料:' + this.materiel[11].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1 + 'mm 重量:' + 0.001 * 0.0028 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.Result1 = '物料:' + this.materiel[11].label + ' 长:' + this.Length + 'mm 宽:' + this.Width + 'mm 厚:' + this.height1
// + 'mm 重量:' + 0.001 * 0.0028 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1) + 'kg'
this.weight = 0.001 * 0.0028 * parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1)
WeightCopy(this.partNumValue, this.Result1).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
}
@@ -738,9 +791,11 @@ export default {
this.$message.error('请先选择一个零件')
} else {
if (this.materielValue === '3') {
this.Result3 = '物料:' + this.materiel[3].label + ' 对边宽:' + this.OppositeSideWidth + 'mm 长度:' + this.length2 + 'mm 重量:' + 0.001 * 0.0068 * parseInt(this.OppositeSideWidth) * parseInt(this.OppositeSideWidth) * parseInt(this.length2) + 'kg'
this.Result3 = '物料:' + this.materiel[3].label + ' 对边宽:' + this.OppositeSideWidth + 'mm 长度:' + this.length2
// + 'mm 重量:' + 0.001 * 0.0068 * parseInt(this.OppositeSideWidth) * parseInt(this.OppositeSideWidth) * parseInt(this.length2) + 'kg'
this.weight = 0.001 * 0.0068 * parseInt(this.OppositeSideWidth) * parseInt(this.OppositeSideWidth) * parseInt(this.length2)
WeightCopy(this.partNumValue, this.Result3).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
}
@@ -751,9 +806,11 @@ export default {
this.$message.error('请先选择一个零件')
} else {
if (this.materielValue === '4') {
this.Result4 = '物料:' + this.materiel[4].label + ' 边宽:' + this.biankuan + 'mm 边厚:' + this.bianhou + 'mm 长度:' + this.changdu + 'mm 重量:' + 0.001 * 0.00785 * (parseInt(this.biankuan) + parseInt(this.biankuan) - parseInt(this.bianhou)) * parseInt(this.bianhou) * parseInt(this.changdu) + 'kg'
this.Result4 = '物料:' + this.materiel[4].label + ' 边宽:' + this.biankuan + 'mm 边厚:' + this.bianhou + 'mm 长度:' + this.changdu
// + 'mm 重量:' + 0.001 * 0.00785 * (parseInt(this.biankuan) + parseInt(this.biankuan) - parseInt(this.bianhou)) * parseInt(this.bianhou) * parseInt(this.changdu) + 'kg'
this.weight = 0.001 * 0.00785 * (parseInt(this.biankuan) + parseInt(this.biankuan) - parseInt(this.bianhou)) * parseInt(this.bianhou) * parseInt(this.changdu)
WeightCopy(this.partNumValue, this.Result4).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
}
@@ -763,9 +820,11 @@ export default {
this.$message.error('请先选择一个零件')
} else {
if (this.materielValue === '5') {
this.Result5 = '物料:' + this.materiel[5].label + ' 壁厚:' + this.bihou + 'mm 外径:' + this.waijing + 'mm 长度:' + this.changdu2 + 'mm 重量:' + 0.001 * 0.02466 * parseInt(this.bihou) * (parseInt(this.waijing) - parseInt(this.bihou)) * parseInt(this.changdu2) + 'kg'
this.Result5 = '物料:' + this.materiel[5].label + ' 壁厚:' + this.bihou + 'mm 外径:' + this.waijing + 'mm 长度:' + this.changdu2
// + 'mm 重量:' + 0.001 * 0.02466 * parseInt(this.bihou) * (parseInt(this.waijing) - parseInt(this.bihou)) * parseInt(this.changdu2) + 'kg'
this.weight = 0.001 * 0.02466 * parseInt(this.bihou) * (parseInt(this.waijing) - parseInt(this.bihou)) * parseInt(this.changdu2)
WeightCopy(this.partNumValue, this.Result5).then(response => {
this.searchDetail()
this.searchDetai2()
})
}
}
@@ -779,6 +838,7 @@ export default {
},
clearDetail() {
this.checked = false
this.weight = ''
this.partNumValue = ''
this.typeValue = ''
this.partName = ''
@@ -948,12 +1008,37 @@ export default {
this.material = response.data[0].材料流水号
this.materialName = response.data[0].材料
this.spec = response.data[0].原材料规格
if (response.data[0].重量 === null) {
this.weight = ''
} else {
this.weight = response.data[0].重量
}
}
})
this.tableRecord = []
searchRecord(this.partNumValue).then(response => {
this.tableRecord = response.data
// this.tableRecord = []
// searchRecord(this.partNumValue).then(response => {
// this.tableRecord = response.data
// })
mainTable(this.partNumValue).then(response => {
this.tableData = []
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].工艺编号 === null) {
response.data[i].工艺编号 = 0
}
if (response.data[i].工艺要求 === null) {
response.data[i].工艺要求 = ''
}
}
this.tableData = response.data
this.newNum = this.partNumValue
}).then(() => {
this.loading0 = false
})
}
},
searchDetai2() {
if (this.partNumValue !== '' && this.partNumValue !== null) {
this.loading0 = true
mainTable(this.partNumValue).then(response => {
this.tableData = []
for (let i = 0; i < response.data.length; i++) {
@@ -1101,9 +1186,9 @@ export default {
hardEdit(row.工序流水号, row.工艺难度等级).then(response => {
})
},
requestEdit(row) { // 修改工艺要求
requestEdit(row.工序流水号, row.工艺要求).then(response => {
})
// 修改工艺要求
requestEdit(row) {
requestEdit(row.工序流水号, row.工艺要求)
},
tableSearch(index) { // 主界面工艺名称分类、工艺名称及工艺要求后续查询
if (this.checked1 === false) {

View File

@@ -23,6 +23,14 @@
</el-select>
<span>零件图号:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
<span>进度颜色</span>
<span style="background-color: red">拖期</span>
<span style="background-color: yellow">即将拖期</span>
<span style="background-color: lawngreen">如期</span>
<span style="background-color: deepskyblue">工序外协</span>
<span style="background-color: grey">报废</span>
</el-row>
<el-row style="margin-top:10px;">
<span class="demonstration">计划下达时间:</span>
<el-date-picker
v-model="startTime"
@@ -31,7 +39,7 @@
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">-</span>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime"
value-format="yyyy-MM-dd"
@@ -41,14 +49,6 @@
placeholder="选择日期"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
</el-row>
<el-row style="margin-top:10px;">
<span>进度颜色</span>
<span style="background-color: red">拖期</span>
<span style="background-color: yellow">即将拖期</span>
<span style="background-color: lawngreen">如期</span>
<span style="background-color: deepskyblue">工序外协</span>
<span style="background-color: grey">报废</span>
</el-row>
</el-card>
<el-card>

View File

@@ -32,7 +32,7 @@
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">-</span>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime"
value-format="yyyy-MM-dd"

View File

@@ -27,8 +27,8 @@
<span>零件图号:</span>
<el-input v-model="partNumber" clearable size="small" placeholder="零件图号" style="width: 200px;"/>
<el-button v-if="是否扫描 === false" size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="total = 0;pageSize = 10;pageList = 1;getTable()">查询</el-button>
<el-button v-if="是否扫描 === true" size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="total5 = 0;pageSize5 = 10;pageList5 = 1;getTable5()">查询</el-button>
<el-button v-if="是否扫描 === false" size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="total = 0;pageList = 1;getTable()">查询</el-button>
<el-button v-if="是否扫描 === true" size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="total5 = 0;pageList5 = 1;getTable5()">查询</el-button>
<el-checkbox v-if="false" v-model="是否扫描">是否扫描查询</el-checkbox>
</el-row>
@@ -431,11 +431,10 @@
@current-change="handleCurrentChange1"/>
<div style="float:right">
<el-button type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Discharge">虚拟排产</el-button>
<el-button type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Plan" >确定零件计划</el-button>
<el-button :disabled="listLoading1" type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Plan" >确定零件计划</el-button>
<el-button type="danger" size="small" icon="el-icon-upload2" style="float:right;margin:5px 50px 10px 10px" @click="allOut">全部选出</el-button>
</div>
</div>
</div>
</el-card>
@@ -1103,11 +1102,9 @@ export default {
if (this.result1 === this.multipleSelection.length) {
this.result1 = 0
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
this.total = 0
this.pageSize = 10
this.pageList = 1
this.getTable()
}
@@ -1128,11 +1125,9 @@ export default {
}
}).then(() => {
this.total = 0
this.pageSize = 10
this.pageList = 1
this.getTable()
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
})
@@ -1148,7 +1143,6 @@ export default {
xuanchu(this.工艺计划流水号[index]).then(response => {
}).then(() => {
this.pageList = 1
this.pageSize = 10
this.total = 0
this.getTable()
}).then(() => {
@@ -1232,7 +1226,6 @@ export default {
this.计划日期.push(response.data[i].计划日期)
}
})
this.listLoading1 = false
})
}
} else {
@@ -1240,6 +1233,8 @@ export default {
this.listLoading1 = false
this.total1 = 0
}
}).then(() => {
this.listLoading1 = false
})
},
// 调整
@@ -1285,11 +1280,9 @@ export default {
}
}).then(() => {
this.total = 0
this.pageSize = 10
this.pageList = 1
this.getTable()
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
})
@@ -1408,7 +1401,6 @@ export default {
message: '板焊结束时间修改成功!'
})
this.pageList = 1
this.pageSize = 10
this.total = 0
this.getTable()
} else {
@@ -1453,12 +1445,7 @@ export default {
this.result1 = 0
for (let i = 0; i < this.tableData1.length; i++) {
this.length = this.tableData1.length
if (this.预计外协[i] === '否') {
this.预计外协[i] = 1
} else {
this.预计外协[i] = 2
}
out(this.tableData1[i].工艺计划流水号, this.预计外协[i]).then(response => {
out(this.tableData1[i].工艺计划流水号, 1).then(response => {
}).then(() => {
plan(this.tableData1[i].工艺计划流水号).then(response => {
if (this.tableData1[i].平衡次数 !== 0 || this.tableData1[i].是否焊接 !== 1) {
@@ -1466,7 +1453,6 @@ export default {
if (this.result1 === this.length) {
this.$message.success('零件计划制定成功')
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
} else if (response.data[0].result === '0') {
@@ -1501,7 +1487,6 @@ export default {
if (i === this.multipleSelection.length - 1) {
this.$message.success('零件计划制定成功')
this.pageList = 1
this.pageSize = 10
this.total = 0
this.getTable()
}
@@ -1571,7 +1556,6 @@ export default {
}).then(() => {
this.total = 0
this.pageList = 1
this.pageSize = 10
this.getTable()
})
})

View File

@@ -3,9 +3,9 @@
<el-card>
<div slot="header">
<span>零件图号:</span>
<el-select v-model="inventoryStateValue" placeholder="零件图号" size="small" clearable>
<el-select v-model="partDrawingNumberValue" placeholder="零件图号" size="small" clearable>
<el-option
v-for="item in inventoryState"
v-for="item in partDrawingNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
@@ -29,32 +29,32 @@
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="零件图号" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="规格" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
{{ scope.row.原材料规格 }}
</template>
</el-table-column>
<el-table-column label="备料" min-width="90" align="center">
<el-table-column label="重量" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存 }}
{{ scope.row. }}
</template>
</el-table-column>
</el-table>
@@ -75,7 +75,7 @@
<el-card>
<div slot="header">
<span>采购单号:</span>
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" clearable/>
<el-input v-model="purchasingOrder" placeholder="采购单号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-button
@@ -89,7 +89,7 @@
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="addOfflineContract">创建采购单</el-button>
@click="addPurchaseOrder">创建采购单</el-button>
<el-button
type="primary"
size="small"
@@ -101,24 +101,24 @@
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="addMateriel">保存</el-button>
@click="saveMateriel">保存</el-button>
</div>
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="单号状态" align="center" width="100" fixed="left">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="Number(scope.row.离线合同状态)===2&&Number(scope.row.总采购数量)!==Number(scope.row.总到货数量)" type="primary" size="small">采购</el-tag>
<el-tag v-if="Number(scope.row.采购数量)===Number(scope.row.总到货数量)&&Number(scope.row.总采购数量)!==0" type="success" size="small">全部到货</el-tag>
<el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="Number(scope.row.采购计划状态)===1" type="primary" size="small">保存</el-tag>
<el-tag v-if="Number(scope.row.采购计划状态)===2" type="success" size="small">已导出</el-tag>
</template>
</el-table-column>
<el-table-column label="采购单号" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.离线合同编 }}
{{ scope.row.采购单 }}
</template>
</el-table-column>
<el-table-column label="采购单名称" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.离线合同名称 }}
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
@@ -128,23 +128,23 @@
</el-table-column>
<el-table-column label="采购员" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.采购员 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="下单日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.创建日期.split(' ')[0] }}
{{ scope.row.下单日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="计划完成时间" align="center" width="100">
<el-table-column label="计划完成日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
{{ scope.row.计划完成日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" 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 :disabled="parseInt(scope.row.采购计划状态)===2" type="primary" size="mini" icon="el-icon-edit" @click="editPurchaseOrder(scope.row)"/>
<el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="danger" size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportExcel(scope.row)"/>
</template>
</el-table-column>
@@ -160,40 +160,40 @@
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</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" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="零件图号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.离线合同编 }}
{{ scope.row.零件图 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" min-width="200">
<el-table-column label="单位" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
<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="100">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="成品尺寸" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
{{ scope.row.重量 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100" prop="单价">
<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"/>
<el-input v-model="scope.row.备注1" :disabled="disable" size="mini" style="width:150px"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
@@ -319,13 +319,13 @@
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="离线合同编号" prop="离线合同编号">
<el-input v-model="form2.离线合同编号" size="small"/>
<el-form-item label="采购单名称" prop="采购单名称">
<el-input v-model="form2.采购单名称" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="离线合同名称" prop="离线合同名称">
<el-input v-model="form2.离线合同名称" size="small"/>
<el-form-item label="采购员" prop="采购员">
<el-input v-model="name" readonly size="small"/>
</el-form-item>
</el-col>
</el-row>
@@ -338,9 +338,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规定到货时间" prop="规定到货时间">
<el-form-item label="计划完成日期" prop="计划完成日期">
<el-date-picker
v-model="form2.规定到货时间"
v-model="form2.计划完成日期"
size="small"
type="date"
format="yyyy-MM-dd"
@@ -349,117 +349,98 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="离线合同备注" prop="离线合同备注">
<el-input v-model="form2.离线合同备注" size="small" type="textarea" style="width: 550px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建离线合同'"
v-show="title2==='创建采购单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitAddOfflineContract">确定</el-button>
@click="submitAddPurchaseOrder">确定</el-button>
<el-button
v-show="title2==='编辑离线合同'"
v-show="title2==='编辑采购单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitEditOfflineContract">确定</el-button>
@click="submitEditPurchaseOrder">确定</el-button>
</div>
</el-dialog>
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
<el-card style="width: 1100px;margin: 20px auto">
<div id="cjn" style="width: 1000px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<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 width="80px">供应商</td>
<td id="supplier" colspan="4" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2">二维码粘贴处</td>
<th colspan="14"><h4>锻件采购计划表</h4></th>
</tr>
<tr>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="3" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="4" style="text-align: left;"/>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 单号 }}</td>
</tr>
<tr id="tablehead">
<td>序号</td>
<td colspan="2">名称</td>
<td colspan="2">规格</td>
<td colspan="2">型号</td>
<td colspan="2">数量</td>
<td colspan="2">单价</td>
<td colspan="2">合计</td>
<td>备注</td>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
</tr>
<tr>
<td>总计</td>
<td colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 20px">
<tr id="tablehead" style="height: 35px">
<td style="text-align: center;width: 7%">序号</td>
<td colspan="2" style="text-align: center;width: 20%">图号</td>
<td colspan="2" style="text-align: center;width: 10%">名称</td>
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 20%">成品尺寸</td>
<td style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in tableData3" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.零件图号 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.批次数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注1 }}</td>
</tr>
</table>
</div>
</el-card>
</div>
</template>
<script>import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, setSafeValue } from '@/api/WorkshopProcurement/OfflineContract1'
<script>import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchMateriel,
addMateriel, deleteMateriel, saveMateriel } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
name: '', // 采购计划
data() {
return {
partDrawingNumberValue: '',
partDrawingNumber: [],
Buyer: '',
showMaterialTable: true,
loading1: false,
title2: '',
purchaseStateValue: 2, // 采购状态 全部
purchaseState: [
{
label: '未采购',
value: 1
}, {
label: '全部',
value: 2
}
],
check1: 0,
check2: 0,
check3: 0,
check4: 0,
materialName: '',
inventoryStateValue: '', // 库存状态
inventoryState: [
{
label: '充足',
value: 2
},
{
label: '不足',
value: 1
}
],
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
offlineContractNum: '', // 离线合同流水
offlineContract: '', // 离线合同
purchasingOrder: '', // 采购单
purchasingOrderNumber: '', // 采购计划流水
supplierName0: '', // 供应商名称(外面的)
supplierName: '', // 供应商名称
payTime: [], // 付款时间节点
tableData2: [],
total2: 0,
pageCurrent2: 1,
@@ -492,34 +473,31 @@ export default {
fax: '', // 传真
tableData01: [],
dialogVisible2: false,
下单单位: '',
下单日期: '',
单号: '',
计划完成日期: '',
form2: {
离线合同流水号: '',
离线合同编号: '',
离线合同名称: '',
采购计划流水号: '',
采购单名称: '',
供应商流水号: '',
供应商名称: '',
规定到货时间: '',
离线合同备注: '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;'
计划完成日期: ''
},
rules2: { // 离线合同表单验证规则
离线合同编号: [{ required: true, message: '请填写离线合同编号' }],
离线合同名称: [{ required: true, message: '请填写离线合同名称' }],
rules2: { // 采购表单验证规则
采购单名称: [{ required: true, message: '请填写采购单名称' }],
供应商名称: [{ required: true, message: '请选择供应商' }],
规定到货时间: [{ required: true, message: '请选择规定到货时间' }],
运费: [{ required: true, message: '请填写运费' }],
付款方式: [{ required: true, message: '请选择付款方式' }]
计划完成日期: [{ required: true, message: '请选择计划完成日期' }]
},
tableData3: [],
materielGroup: [], // 物料流水号组
partGroup: [], // 离线合同明细流水号组
numGroup: [], // 数量
priceGroup: [], // 单价
totalPrice: 0, // 合同总额
materielGroup: [], // 工艺计划流水号组
partGroup: [], // 采购计划明细流水号组
unit: [], // 单位
Remarks: [], // 备注
tableData4: [], // 合同模板
stipulateArrivalTime: '', // 规定到货时间
离线合同状态: '',
采购计划状态: '',
paramRow: '', // 参数row
disable: true // 其他的禁用
disable: false // 其他的禁用
}
},
computed: {
@@ -550,18 +528,21 @@ export default {
img.src = url
})
},
fetchData() {},
searchTable1() { // 查询物料库物料
this.loading1 = true
this.materialName ? this.check1 = 1 : this.check1 = 0
this.inventoryStateValue ? this.check2 = 1 : this.check2 = 0
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'changeSafeValue', false)
v.原安全库存量 = v.安全库存量
return v
fetchData() {
initPartDrawing(0, this.partDrawingNumberValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partDrawingNumber.push({
label: response.data[i].零件图号,
value: response.data[i].零件图号
})
}
})
},
searchTable1() { // 查询外购备料
this.loading1 = true
this.partDrawingNumberValue ? this.check1 = 1 : this.check1 = 0
searchPurchasedMaterials(this.pageCurrent1, this.pageSize1, this.check1, this.partDrawingNumberValue).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
this.loading1 = false
})
@@ -578,75 +559,45 @@ export default {
handleSelectionChange(val) {
this.materielGroup = []
for (let i = 0; i < val.length; i++) {
this.materielGroup.push(val[i].物料流水号)
this.materielGroup.push(val[i].工艺计划流水号)
}
},
cancelEdit(row) { // 取消设置
row.安全库存量 = row.原安全库存量
row.changeSafeValue = false
this.$message('取消修改')
},
confirmEdit(row) { // 确认设置
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
if (response.data[0].result === '1') {
row.changeSafeValue = false
this.$message.success('设置成功')
this.searchTable1()
} else {
this.$message.error('设置失败')
}
})
},
searchTable2() { // 查询离线合同列表
this.offlineContract ? this.check3 = 1 : this.check3 = 0
searchTable2() { // 查询采购单列表
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.offlineContract, this.check4, this.supplierName0).then(response => {
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) { // 离线合同列表分页
handleSizeChange2(val) { // 采购单列表分页
this.pageSize2 = val
this.searchTable2()
},
handleCurrentChange2(val) { // 离线合同列表分页
handleCurrentChange2(val) { // 采购单列表分页
this.pageCurrent2 = val
this.searchTable2()
},
addOfflineContract() { // 创建离线合同
addPurchaseOrder() { // 创建采购单
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '创建离线合同'
this.form2.离线合同编号 = ''
this.title2 = '创建采购单'
this.form2.离线合同名称 = ''
this.form2.供应商流水号 = ''
this.form2.供应商名称 = ''
this.form2.规定到货时间 = ''
this.form2.离线合同备注 = '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;'
this.form2.计划完成日期 = ''
this.dialogVisible2 = true
},
submitAddOfflineContract() { // 新建离线合同
submitAddPurchaseOrder() { // 新建采购单
this.$refs['form2'].validate((valid) => {
if (valid) {
const numGroup1 = [] // 空数组,放现有的询价单号
searchOfflineContract2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].离线合同编号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1) {
this.$message.error('该离线合同编号已存在')
} else {
addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => {
addPurchaseOrder(this.form2.采购单名称, this.form2.供应商流水号, this.id, this.form2.计划完成日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建离线合同成功')
this.$message.success('新建采购单成功')
this.searchTable2()
this.dialogVisible2 = false
} else { this.$message.error('新建离线合同失败') }
})
}
} else { this.$message.error('新建采购单失败') }
})
} else {
console.log('error submit!!')
@@ -654,42 +605,28 @@ export default {
}
})
},
editOfflineContract(row) {
editPurchaseOrder(row) {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑离线合同'
this.form2.离线合同流水号 = row.离线合同流水号
this.form2.离线合同编号 = row.离线合同编号
this.form2.离线合同名称 = row.离线合同名称
this.form2.供应商流水号 = row.供应商流水号
this.title2 = '编辑采购单'
this.form2.采购计划流水号 = row.采购计划流水号
this.form2.采购单名称 = row.采购单名称
this.form2.供应商流水号 = row.供应商
this.form2.供应商名称 = row.供应商名称
this.form2.规定到货时间 = row.规定到货时间
this.form2.离线合同备注 = row.离线合同备注
this.form2.计划完成日期 = row.计划完成日期
this.dialogVisible2 = true
},
submitEditOfflineContract() {
submitEditPurchaseOrder() {
this.$refs['form2'].validate((valid) => {
if (valid) {
const numGroup1 = [] // 空数组,放现有的离线合同号
const numGroup2 = [] // 空数组,放现有的离线合同流水号
searchOfflineContract2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].离线合同编号)
numGroup2.push(response.data[i].离线合同流水号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1 && numGroup1.indexOf(this.form2.离线合同编号) !== numGroup2.indexOf(parseInt(this.form2.离线合同流水号))) {
this.$message.error('该离线合同编号已存在')
} else {
editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => {
console.log(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.供应商流水号, this.form2.计划完成日期)
editPurchaseOrder(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.供应商流水号, this.form2.计划完成日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改离线合同成功')
this.$message.success('修改采购单成功')
this.searchTable2()
this.dialogVisible2 = false
} else { this.$message.error('修改离线合同失败') }
})
}
} else { this.$message.error('修改采购单失败') }
})
} else {
console.log('error submit!!')
@@ -697,18 +634,18 @@ export default {
}
})
},
deleteOfflineContract(row) { // 删除离线合同
deletePurchaseOrder(row) { // 删除采购单
this.$confirm('确定删除该合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteOfflineContract(row.离线合同流水号).then(response => {
deletePurchaseOrder(row.采购计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable2()
this.disable = true
searchMateriel(this.offlineContractNum).then(response => {
searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('数据占用,删除失败') }
@@ -772,68 +709,76 @@ export default {
submitSelectSupplier() { // 确定选择供应商
this.dialogVisible1 = false
},
searchTable3(row) { // 查询离线合同明细
this.stipulateArrivalTime = row.规定到货时间.split(' ')[0]
this.offlineContractNum = row.离线合同流水号
this.离线合同状态 = row.离线合同状态
searchMateriel(this.offlineContractNum).then(response => {
searchTable3(row) { // 查询采购计划明细
this.purchasingOrderNumber = row.采购计划流水号
this.采购计划状态 = row.采购计划状态
this.下单单位 = row.供应商名称
this.单号 = row.采购单号
this.计划完成日期 = row.计划完成日期.split(' ')[0]
this.下单日期 = row.下单日期.split(' ')[0]
searchMateriel(this.purchasingOrderNumber).then(response => {
console.log(response.data)
this.tableData3 = response.data
})
Number(row.离线合同状态) !== 1 ? this.disable = true : this.disable = false // 是否为编辑模式
},
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
},
addMateriel() { // 将物料选入离线合同
if (!this.offlineContractNum) {
this.$message.warning('请选择离线合同')
} else if (Number(this.离线合同状态) !== 1) {
this.$message.warning('请选择可编辑的离线合同')
addMateriel() { // 将材料选入请购单
if (!this.purchasingOrderNumber) {
this.$message.warning('请选择采购单')
} else if (this.materielGroup.length === 0) {
this.$message.warning('请勾选物料')
} else {
addMateriel(this.offlineContractNum, this.materielGroup).then(response => {
addMateriel(this.purchasingOrderNumber, this.materielGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('选入成功')
searchMateriel(this.offlineContractNum).then(response => {
this.searchTable1()
searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('选入失败') }
})
}
},
saveMateriel() { // 保存数据
this.partGroup = []
this.unit = []
this.Remarks = []
if (!this.purchasingOrderNumber) {
this.$message.warning('请选择采购单')
} else {
for (let i = 0; i < this.tableData3.length; i++) {
this.partGroup.push(this.tableData3[i].采购计划明细流水号)
if (this.tableData3[i].单位 === '' || this.tableData3[i].单位 === null) {
this.tableData3[i].单位 = '无'
}
this.unit.push(this.tableData3[i].单位)
if (this.tableData3[i].备注1 === '' || this.tableData3[i].备注1 === null) {
this.tableData3[i].备注1 = '无'
}
this.Remarks.push(this.tableData3[i].备注1)
}
saveMateriel(this.purchasingOrderNumber, this.partGroup, this.unit, this.Remarks).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功')
this.searchTable2()
searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('保存失败') }
})
}
},
deleteMateriel(row) { // 移除物料
this.$confirm('确定移除该物料?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteMateriel(row.离线合同明细流水号).then(response => {
console.log(row)
deleteMateriel(row.采购计划明细流水号, row.工艺计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
searchMateriel(this.offlineContractNum).then(response => {
this.searchTable1()
searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('移除失败') }
@@ -845,83 +790,14 @@ export default {
})
})
},
doneOfflineContact() { // 生成离线合同
this.$confirm('确定生成合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.totalPrice = 0
this.partGroup = []
this.numGroup = []
this.priceGroup = []
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].单价)
}
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同生成成功')
this.searchTable2()
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
this.disable = true // 是否为编辑模式
})
} else { this.$message.error('离线合同生成失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
exportExcel(row) {
exportExcel() {
this.$confirm('确定导出该合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const children = document.getElementsByClassName('tableData')
const parent = document.getElementsByClassName('offlineContract')[0]
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
let length = 0
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 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"/>`
document.getElementById('tablehead').after(tr[i])
}
let total = 0
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].物料名称
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料规格
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料型号
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].数量 * this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
total += this.tableData3[j].数量 * this.tableData3[j].单价
}
document.getElementById('contractNum').innerHTML = row.离线合同编号
document.getElementById('contractName').innerHTML = row.离线合同名称
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.采购员
document.getElementById('total').innerHTML = total
$('#qrCode').html(`<img id="img" style="display: block;margin: 0 auto">`)
this.useqrcode(row.离线合同流水号) // 显示二维码
}).then(() => {
const htmlNode = $('#offlineContract').html()
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
const htmlNode = $('#cjn').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)

View File

@@ -129,11 +129,73 @@
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData3" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData1" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购单号">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="采购单名称">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="计划总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable03(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesMaterials(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noMaterials(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
</el-card>
</div>
</template>
<script>
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/WorkshopProcurement/FundApproval'
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials } from '@/api/WorkshopProcurement/FundApproval'
import { mapGetters } from 'vuex'
export default {
@@ -148,7 +210,12 @@ export default {
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
tableData3: [],
pageSize3: 10,
pageCurrent3: 1,
total3: 0,
gridData: [],
gridData1: []
}
},
computed: {
@@ -166,6 +233,7 @@ export default {
fetchData() {
this.searchTable()
this.searchTable2()
this.searchTable3()
},
searchTable() {
initApproval1(this.pageCurrent, this.pageSize, 2).then(response => {
@@ -207,6 +275,27 @@ export default {
this.gridData = response.data
})
},
searchTable3() {
initApprovalMaterials(this.pageCurrent3, this.pageSize3, 1).then(response => {
console.log(response.data.rows)
this.tableData3 = response.data.rows
this.total3 = response.data.total
})
},
handleSizeChange3(val) {
this.pageSize3 = val
this.pageCurrent3 = 1
this.searchTable3()
},
handleCurrentChange3(val) {
this.pageCurrent3 = val
this.searchTable3()
},
searchTable03(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail1(row.采购计划请款流水号).then(response => {
this.gridData1 = response.data
})
},
yesApproval(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
@@ -280,6 +369,43 @@ export default {
message: '取消操作'
})
})
},
yesMaterials(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execMaterials(row.采购计划请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable3()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noMaterials(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execMaterials(row.采购计划请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable3()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
}
}

View File

@@ -129,11 +129,73 @@
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData3" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData1" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购单号">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="采购单名称">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="计划总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable03(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesMaterials(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noMaterials(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
</el-card>
</div>
</template>
<script>
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/WorkshopProcurement/FundApproval'
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials } from '@/api/WorkshopProcurement/FundApproval'
import { mapGetters } from 'vuex'
export default {
@@ -148,7 +210,12 @@ export default {
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
gridData: [],
tableData3: [],
pageSize3: 10,
pageCurrent3: 1,
total3: 0,
gridData1: []
}
},
computed: {
@@ -166,6 +233,7 @@ export default {
fetchData() {
this.searchTable()
this.searchTable2()
this.searchTable3()
},
searchTable() {
initApproval1(this.pageCurrent, this.pageSize, 3).then(response => {
@@ -207,6 +275,27 @@ export default {
this.gridData = response.data
})
},
searchTable3() {
initApprovalMaterials(this.pageCurrent3, this.pageSize3, 2).then(response => {
console.log(response.data.rows)
this.tableData3 = response.data.rows
this.total3 = response.data.total
})
},
handleSizeChange3(val) {
this.pageSize3 = val
this.pageCurrent3 = 1
this.searchTable3()
},
handleCurrentChange3(val) {
this.pageCurrent3 = val
this.searchTable3()
},
searchTable03(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail1(row.采购计划请款流水号).then(response => {
this.gridData1 = response.data
})
},
yesApproval(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
@@ -280,6 +369,43 @@ export default {
message: '取消操作'
})
})
},
yesMaterials(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execMaterials(row.采购计划请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable3()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noMaterials(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execMaterials(row.采购计划请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable3()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
}
}

View File

@@ -0,0 +1,613 @@
<template>
<div class="app-container">
<el-card>
<span>发票号:</span>
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<span>传送人:</span>
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>接收人:</span>
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="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="addTable1()">增加</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="200px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="传送人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.传送人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="接收人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" min-width="200px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="350px">
<template slot-scope="scope">
<el-popover placement="right" width="450" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购单号">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="采购单名称">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="总价" prop="总价">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button
type="primary"
size="mini"
icon="el-icon-edit"
style="margin-left: 10px"
@click="editTable1(scope.row)">编辑</el-button>
<el-button
type="danger"
size="mini"
icon="el-icon-delete"
@click="deleteTable1(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-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
<el-form-item label="供应商名称" prop="供应商名称">
<el-input v-model="form1.供应商名称" size="small" readonly>
<el-button slot="append" icon="el-icon-search" @click="dialogVisible=true"/>
</el-input>
</el-form-item>
<el-form-item label="采购单号" prop="contractNum">
<el-select :disabled="title1==='编辑'" v-model="form1.contractNum" placeholder="采购单号" size="small" multiple filterable clearable>
<el-option
v-for="item in contractNums"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="开票时间" prop="invoiceTime">
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="开票金额" prop="money">
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
</el-form-item>
<el-form-item label="传送人" prop="sendPerson">
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="接收人" prop="receivePerson">
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-show="title1==='增加'" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" title="供应商选择" center style="min-height: 300px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
<el-col :span="12">
<el-form-item label="供应商名称">
<el-input v-model="supplierName" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质">
<el-input v-model="enterpriseNature" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="货期">
<el-input v-model="goodTime" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注册资本">
<el-input v-model="registeredCapital" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="税号">
<el-input v-model="taxNum" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子邮箱">
<el-input v-model="EMail" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="地址">
<el-input v-model="address" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="账号">
<el-input v-model="account" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开户行">
<el-input v-model="openingBank" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话号码">
<el-input v-model="phone" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="传真">
<el-input v-model="fax" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-button
type="success"
size="small"
icon="el-icon-search"
@click="searchSupplier">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitSelectSupplier">确定</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
@click="emptySupplierDetail">清空</el-button>
</el-col>
</el-row>
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
<el-table-column align="center" label="供应商名称" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="企业性质" min-width="100">
<template slot-scope="scope">
{{ scope.row.企业性质 }}
</template>
</el-table-column>
<el-table-column align="center" label="创立日期" min-width="100">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="注册资本" min-width="100">
<template slot-scope="scope">
{{ scope.row.注册资本 }}
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
</div>
</template>
<script>import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initPerson1, searchSupplier, initPurchase, searchInvoiceDetail } from '@/api/WorkshopProcurement/OutsourcingMaterialsInvoice'
import { mapGetters } from 'vuex'
export default {
name: '', // 发票交接单
data() {
return {
contractNumValue: '',
contractNums: [],
invoiceNum: '',
invoiceTime: '',
transmitValue: this.id,
selectPerson: [], // 接收人
selectPerson1: [], // 传送人
recipientValue: '',
contractNum: '',
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
tableData01: [],
gridData: [],
check1: 0,
check2: 0,
check3: 0,
check4: 0,
check5: 0,
supplierCheck1: 0,
supplierCheck2: 0,
supplierCheck3: 0,
supplierCheck4: 0,
supplierCheck5: 0,
supplierCheck6: 0,
supplierCheck7: 0,
supplierCheck8: 0,
supplierCheck9: 0,
supplierCheck10: 0,
supplierCheck11: 0,
supplierCheck12: 0,
supplierName0: '', // 供应商名称(外面的)
supplierName: '', // 供应商名称
supplierValue: '', // 供应商流水号
goodTime: '', // 货期
enterpriseNature: '', // 企业性质
createDate: '', // 创立日期
registeredCapital: '', // 注册资本
taxNum: '', // 税号
EMail: '', // 电子邮箱
address: '', // 地址
account: '', // 账号
openingBank: '', // 开户行
phone: '', // 电话号码
fax: '', // 传真
dialogVisible: false,
dialogVisible1: false,
title1: '',
form1: {
供应商名称: '',
供应商流水号: '',
contractNum: [],
invoiceNumValue: '',
invoiceTime: '',
money: '',
sendPersonValue: '',
receivePersonValue: '',
remark: ''
},
rules1: {
contractNum: [
{ required: true, message: '请选择采购单号', trigger: 'change' }
]
}
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.selectPerson.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
initPerson1().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.selectPerson1.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
initPurchase().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({
label: response.data[i].采购单号,
value: response.data[i].采购计划流水号
})
}
})
},
searchTable1() {
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
this.supplierName0 ? this.check2 = 1 : this.check2 = 0
this.transmitValue ? this.check3 = 1 : this.check3 = 0
this.recipientValue ? this.check4 = 1 : this.check4 = 0
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.supplierName0, this.check3, this.transmitValue, this.check4, this.recipientValue).then(response => {
console.log(response.data)
for (let j = 0; j < response.data.rows.length; j++) {
response.data.rows[j].开票金额 = parseInt(response.data.rows[j].开票金额 * 100) / 100
if (response.data.rows[j].开票时间 !== null) {
response.data.rows[j].开票时间 = response.data.rows[j].开票时间.substring(0, response.data.rows[j].开票时间.indexOf(' '))
}
if (response.data.rows[j].开票时间 === '1900/1/1') {
response.data.rows[j].开票时间 = ''
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable02(row) { // 查看详情(发票包含的合同)
searchInvoiceDetail(row.发票流水号).then(response => {
this.gridData = response.data
})
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
this.tableData01 = response.data
})
},
showSupplierDetail(row) {
this.form1.供应商流水号 = row.供应商流水号
this.form1.供应商名称 = row.供应商名称
this.supplierValue = row.供应商流水号
this.supplierName = row.供应商名称
this.enterpriseNature = row.企业性质
this.createDate = row.创立日期
this.registeredCapital = row.注册资本
this.taxNum = row.税号
this.EMail = row.电子信箱
this.address = row.地址
this.account = row.帐号
this.openingBank = row.开户行
this.phone = row.电话号码
this.fax = row.传真
this.goodTime = row.货期
},
emptySupplierDetail() {
this.supplierValue = ''
this.supplierName = ''
this.enterpriseNature = ''
this.createDate = ''
this.registeredCapital = ''
this.taxNum = ''
this.EMail = ''
this.address = ''
this.account = ''
this.openingBank = ''
this.phone = ''
this.fax = ''
this.goodTime = ''
},
submitSelectSupplier() { // 确定选择供应商
this.dialogVisible = false
},
addTable1() {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '增加'
this.dialogVisible1 = true
this.form1.供应商名称 = ''
this.form1.供应商流水号 = ''
this.form1.contractNum = []
this.contractNumValue = ''
this.form1.invoiceTime = ''
this.form1.money = ''
this.form1.sendPersonValue = parseInt(this.id)
this.form1.receivePersonValue = ''
this.form1.remark = ''
},
submitAdd1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.contractNumValue = this.form1.contractNum[0]
for (let h = 1; h < this.form1.contractNum.length; h++) {
this.contractNumValue += ',' + this.form1.contractNum[h]
}
addInvoice(this.form1.contractNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, this.form1.供应商流水号, this.contractNumValue).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('增加失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
editTable1(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '编辑'
console.log(row)
this.dialogVisible1 = true
this.form1.contractNum = (row.采购计划流水号.split(',')).map(Number)
this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间
this.form1.money = row.开票金额
this.form1.sendPersonValue = parseInt(row.传送人)
this.form1.receivePersonValue = parseInt(row.接收人)
this.form1.remark = row.备注
this.form1.供应商流水号 = row.供应商
this.form1.供应商名称 = row.供应商名称
console.log(row.开票时间)
if (row.开票时间 === '1900/1/1') {
this.form1.invoiceTime = null
}
if (parseInt(row.传送人) === 0) {
this.form1.sendPersonValue = ''
}
if (parseInt(row.接收人) === 0) {
this.form1.receivePersonValue = ''
}
},
submitEdit1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.form1.remark)
editInvoice(this.form1.invoiceNumValue, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, this.form1.供应商流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
deleteTable1(row) {
console.log(row)
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInvoice(row.发票流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-top: 1px;
margin-bottom: 1px;
}
</style>

View File

@@ -0,0 +1,317 @@
<template>
<div class="app-container">
<el-card>
<div slot="header">
<span>采购单号:</span>
<el-select v-model="purchaseOrderValue" placeholder="采购单号" size="small" clearable filterable>
<el-option
v-for="item in purchaseOrder"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" style="width: 200px" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent=1;pageSize=10;total=0;searchTable()">查询</el-button>
</div>
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%;max-height: 460px;"
height="270"
size="mini"
highlight-current-row
@row-click="searchTable1">
<el-table-column label="单号" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="采购单名称" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总价" min-width="90" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.总价" size="mini" style="width:100px" @change="totalChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="下单日期" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.下单日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="计划完成日期" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" :summary-method="getSummaries" border style="max-height: 300px;" height="400px" size="mini" show-summary>
<el-table-column label="状态" align="center" width="100" fixed="left">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="small">未到货</el-tag>
<el-tag v-if="Number(scope.row.是否到货)===1" type="primary" size="small">已到货</el-tag>
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" min-width="100">
<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.备注1 }}
</template>
</el-table-column>
<el-table-column label="重量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.重量1 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="合计" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.批次数量 * scope.row.单价 * scope.row.重量1 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-goods" @click="OpenArrival(scope.row)">到货</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible" title="到货" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="100px">
<el-row>
<el-form-item label="重量" prop="重量">
<el-input v-model="form.重量" size="small" style="width: 200px"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="单价" prop="单价">
<el-input v-model="form.单价" size="small" style="width: 200px"/>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitArrival">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>import { initPurchaseOrder, searchPurchaseOrder, searchMateriel, Arrival, totalChange } from '@/api/WorkshopProcurement/OutsourcingStockArrival'
export default {
data() {
return {
purchaseOrderValue: '',
purchaseOrder: [],
supplierName0: '',
totalMoney: 0,
check: 0,
chekc1: 0,
num: '',
tableData: [],
tableData1: [],
loading: false,
pageCurrent: 1,
pageSize: 10,
total: 0,
disable: true,
dialogVisible: false,
form: {
采购计划明细流水号: '',
重量: '',
单价: ''
},
rules: {
重量: [{ required: true, message: '请填写重量' }],
单价: [{ required: true, message: '请填写单价' }]
}
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initPurchaseOrder(0, this.purchaseOrderValue, 0, this.supplierName0).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.purchaseOrder.push({
label: response.data[i].采购单号,
value: response.data[i].采购单号
})
}
})
},
searchTable() { // 查询外购备料
this.loading = true
this.purchaseOrderValue ? this.check = 1 : this.check = 0
this.supplierName0 ? this.check1 = 1 : this.check1 = 0
searchPurchaseOrder(this.pageCurrent, this.pageSize, this.check, this.purchaseOrderValue, this.check1, this.supplierName0).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
searchTable1(row) {
this.num = row.采购计划流水号
this.totalMoney = 0
searchMateriel(this.num).then(response => {
this.tableData1 = response.data
for (let i = 0; i < response.data.length; i++) {
this.totalMoney += (response.data[i].批次数量 * response.data[i].重量1 * response.data[i].单价)
}
})
},
totalChange(row) {
totalChange(row.采购计划流水号, row.总价).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
} else { this.$message.error('编辑失败') }
})
},
OpenArrival(row) {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogVisible = true
this.form.采购计划明细流水号 = row.采购计划明细流水号
this.form.重量 = row.重量1
this.form.单价 = row.单价
},
submitArrival() {
this.$refs['form'].validate((valid) => {
if (valid) {
Arrival(this.form.采购计划明细流水号, this.form.重量, this.form.单价).then(response => {
if (response.data[0].result === '1') {
this.$message.success('到货成功')
searchMateriel(this.num).then(response => {
this.tableData1 = response.data
this.totalMoney = 0
for (let i = 0; i < response.data.length; i++) {
this.totalMoney += (response.data[i].批次数量 * response.data[i].重量1 * response.data[i].单价)
}
})
this.dialogVisible = false
} else { this.$message.error('到货失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 7) {
sums[index] = '总重量'
return
} else if (index === 8) {
const values = data.map(item => Number(item['重量1'] * item['批次数量']))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
} else {
return Number(prev)
}
}, 0)
sums[index] += ' kg'
} else {
sums[index] = 'N/A'
}
} else if (index === 9) {
sums[index] = '总价'
} else if (index === 10) {
sums[index] = this.totalMoney
}
})
return sums
}
}
}
</script>
<style scoped>
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -0,0 +1,366 @@
<template>
<div class="app-container">
<el-card>
<span>请款时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款付款情况" align="center">
<el-table-column label="审批情况内容" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购单号">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="采购单名称">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="计划总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogVisible2" title="采购计划请款" center style="min-height: 300px" width="1200px">
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable 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-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column label="采购单号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="采购单名称" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额" fixed="right">
<template slot-scope="scope">
<el-input-number :max="scope.row.总价 - scope.row.已付金额" :disabled="(scope.row.总价 - scope.row.已付金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width:100%"/>
</template>
</el-table-column>
</el-table>
<span>合计<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/></span>
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
</el-dialog>
</div>
</template>
<script>import { searchRequestFund, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/RequestOutsourcingMaterials'
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
data() {
return {
check1: 0,
check2: 0,
dateRange: '',
pickerOptions: {
shortcuts: [{
text: '上季度',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
picker.$emit('pick', [start, end])
}
}, {
text: '过去半年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
picker.$emit('pick', [start, end])
}
}, {
text: '过去一年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
picker.$emit('pick', [start, end])
}
}]
},
offlineContract: '',
supplierName0: '',
supplierValue: '',
supplier: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
tableData01: [],
dialogVisible2: false,
SUM: 0,
contractGroup: [],
sumGroup: [],
gridData: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
this.supplier = []
searchOfflineContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
console.log(this.supplier)
},
searchTable1() { // 查询请款表
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
this.supplierName0 ? this.check2 = 1 : (this.check2 = 0, this.supplierName0 = '')
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.supplierName0).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
requestFund() { // 请款
this.dialogVisible2 = true
this.supplierValue = ''
this.fetchData() // 重新获取供应商
this.tableData01 = []
},
searchTable01() { // 查询待请款
if (this.supplierValue) {
this.contractGroup = []
searchOfflineContract(this.supplierValue).then(response => {
this.tableData01 = response.data
})
} else {
this.$message.error('请选择供应商')
}
},
handleSelectionChange(val) {
this.SUM = 0
this.contractGroup = []
this.sumGroup = []
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].请款金额)
this.contractGroup.push(val[i].采购计划流水号)
this.sumGroup.push(val[i].请款金额)
}
},
selectable(row, index) { // 控制某行是否可选
return parseInt(row.已请款) !== 1 // 已经请款
},
submitRequestFund() { // 确认请款
if (this.supplierValue && this.contractGroup.length !== 0) {
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('请款成功')
this.searchTable1()
this.dialogVisible2 = false
} else { this.$message.error('请款失败') }
})
} else {
this.$message.error('请选择需要请款的合同')
}
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.采购计划请款流水号).then(response => {
this.gridData = response.data
})
},
cancelRequestFund(row) { // 取消请款
this.$confirm('确定取消请款?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelRequestFund(row.采购计划请款流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.searchTable1()
} else { this.$message.error('取消失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.el-tag{
margin: 0
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>

View File

@@ -0,0 +1,428 @@
<template>
<div class="app-container">
<el-card>
<div slot="header">
<span>入库单号:</span>
<el-select v-model="warehouseReceiptValue" placeholder="入库单号" size="small" clearable>
<el-option
v-for="item in warehouseReceipt"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" style="width: 200px" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent=1;pageSize=10;total=0;searchTable()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="OpenAdd">创建入库单</el-button>
<el-button
type="warning"
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="exportTable">导出入库单</el-button>
</div>
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%;max-height: 460px;"
height="270"
size="mini"
highlight-current-row
@row-click="searchTable1">
<el-table-column label="入库单号" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
</template>
</el-table-column>
<el-table-column label="入库人员" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="入库时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
</template>
</el-table-column>
<el-table-column label="采购单号" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="采购单名称" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteWarehouseReceipt(scope.row)"/>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" :summary-method="getSummaries" show-summary border style="max-height: 300px;" height="400px" size="mini">
<el-table-column label="零件图号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="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">
<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.重量1 }}
</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.单价 * scope.row.重量1 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible" title="创建入库单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
<el-row>
<el-form-item label="采购单号" prop="purchaseOrderValue">
<el-select v-model="form.purchaseOrderValue" placeholder="采购单号" size="small" filterable clearable>
<el-option
v-for="item in purchaseOrder"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="入库人员" prop="money">
<el-input v-model="form.warehousingStaff" size="small" placeholder="入库人员" readonly style="width: 200px"/>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitAdd">确定</el-button>
</div>
</el-dialog>
<el-card style="width: 1100px;margin: 20px auto">
<div id="cjn" style="width: 1000px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="16"><h3>备料入库单</h3></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">入库单号</td>
<td colspan="6" style="text-align: center;width: 35%">{{ 入库单号 }}</td>
<td colspan="2" style="text-align: center;width: 15%">入库人员</td>
<td colspan="6" style="text-align: center;width: 35%">{{ 入库人员 }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">采购单号</td>
<td colspan="6" style="text-align: center;width: 35%">{{ 采购单号 }}</td>
<td colspan="2" style="text-align: center;width: 15%">采购单名称</td>
<td colspan="6" style="text-align: center;width: 35%">{{ 采购单名称 }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">入库时间</td>
<td colspan="6" style="text-align: center;width: 35%">{{ 入库时间 }}</td>
<td colspan="2" style="text-align: center;width: 15%">供应商</td>
<td colspan="6" style="text-align: center;width: 35%">{{ 供应商 }}</td>
</tr>
</table>
<table style="margin-top: 20px" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr id="tablehead" style="height: 35px">
<td style="text-align: center;width: 5%">序号</td>
<td colspan="2" style="text-align: center;width: 15%">零件图号</td>
<td colspan="2" style="text-align: center;width: 15%">零件名称</td>
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="1" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 20%">成品尺寸</td>
<td colspan="2" style="text-align: center;width: 8%">重量</td>
<td colspan="2" style="text-align: center;width: 11%">总重量</td>
</tr>
<tr v-for="(list, index) in tableData1" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 15%">{{ list.零件图号 }}</td>
<td colspan="2" style="text-align: center;width: 15%">{{ list.零件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="1" style="text-align: center;width: 8%">{{ list.批次数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.重量1 }}</td>
<td colspan="2" style="text-align: center;width: 9%">{{ list.批次数量 * list.重量1 }}</td>
</tr>
</table>
</div>
</el-card>
</div>
</template>
<script>import { initWarehouseReceipt, searchWarehouseReceipt, searchMateriel, AddWarehousing, deleteWarehousing, initPurchaseOrder } from '@/api/WorkshopProcurement/StockPreparation'
import { mapGetters } from 'vuex'
import $ from 'jquery'
export default {
data() {
return {
warehouseReceiptValue: '',
warehouseReceipt: [],
supplierName0: '',
check: 0,
chekc1: 0,
tableData: [],
tableData1: [],
loading: false,
pageCurrent: 1,
pageSize: 10,
total: 0,
num: '',
disable: true,
dialogVisible: false,
purchaseOrder: [],
入库单号: '',
入库人员: '',
入库时间: '',
采购单号: '',
采购单名称: '',
供应商: '',
totalMoney: 0,
form: {
入库单流水号: '',
purchaseOrderValue: '',
warehousingStaff: ''
},
rules: {
purchaseOrderValue: [{ required: true, message: '请选择采购单号' }]
}
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initWarehouseReceipt(0, this.warehouseReceiptValue, 0, this.supplierName0).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.warehouseReceipt.push({
label: response.data[i].入库单号,
value: response.data[i].入库单号
})
}
})
initPurchaseOrder().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.purchaseOrder.push({
label: response.data[i].采购单号,
value: response.data[i].采购计划流水号
})
}
})
},
searchTable() { // 查询入库单
this.loading = true
this.warehouseReceiptValue ? this.check = 1 : this.check = 0
this.supplierName0 ? this.check1 = 1 : this.check1 = 0
searchWarehouseReceipt(this.pageCurrent, this.pageSize, this.check, this.warehouseReceiptValue, this.check1, this.supplierName0).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
searchTable1(row) {
this.totalMoney = 0
this.num = row.采购计划流水号
this.入库单号 = row.入库单号
this.入库人员 = row.姓名
this.采购单号 = row.采购单号
this.采购单名称 = row.采购单名称
this.入库时间 = row.入库时间
this.供应商 = row.供应商名称
searchMateriel(this.num).then(response => {
this.tableData1 = response.data
for (let i = 0; i < response.data.length; i++) {
this.totalMoney += (response.data[i].批次数量 * response.data[i].重量1 * response.data[i].单价)
}
})
},
OpenAdd() {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.form.warehousingStaff = this.name
this.dialogVisible = true
this.form.purchaseOrderValue = ''
},
submitAdd() {
this.$refs['form'].validate((valid) => {
if (valid) {
AddWarehousing(this.form.purchaseOrderValue, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('创建成功')
this.searchTable()
this.dialogVisible = false
} else { this.$message.error('创建失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
deleteWarehouseReceipt(row) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteWarehousing(row.入库单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.dialogVisible = false
this.searchTable()
this.tableData1 = []
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 6) {
sums[index] = '总重量'
return
} else if (index === 7) {
const values = data.map(item => Number(item['重量1']))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
} else {
return Number(prev)
}
}, 0)
sums[index] += ' kg'
} else {
sums[index] = 'N/A'
}
} else if (index === 8) {
sums[index] = '总价'
} else if (index === 9) {
if (this.totalMoney !== 0) {
sums[index] = this.totalMoney + ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
exportTable() {
const htmlNode = $('#cjn').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.removeAttr('style')
body.children().not('script').show()
body.children().not('#app').hide()
printNode.remove()
}
}
}
</script>
<style scoped>
span{
margin: 10px 0 10px 10px;
}
</style>