成组采购
This commit is contained in:
@@ -7,44 +7,18 @@ export function initArrivalStateContact() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间管理_到货情况_查询数据',
|
||||
param: '采购合同流水号_check=0&供应商名称_check=0'
|
||||
name: '车间管理_到货情况_查询数据_新1'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询到货情况
|
||||
export function searchArrivalState(pageCurrent, pageSize, check1, num, check2, name) {
|
||||
export function searchArrivalState(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间管理_到货情况_查询数据',
|
||||
param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询到货情况
|
||||
export function searchArrivalNum(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间管理_合同物料到货情况_查询数据_外购件',
|
||||
param: `采购合同流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询到货情况
|
||||
export function searchArrivalNum1(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间管理_合同物料到货情况_查询数据_基本件',
|
||||
name: '车间管理_到货情况_查询数据_新_成组采购',
|
||||
param: `采购合同流水号=${num}`
|
||||
}
|
||||
})
|
||||
|
||||
@@ -50,7 +50,7 @@ export function searchData1(num) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间管理_基本件采购_请购单明细_查询数据_外购件',
|
||||
name: '车间采购管理_成组采购_查询数据',
|
||||
param: '请购单流水号=' + num
|
||||
}
|
||||
})
|
||||
@@ -101,4 +101,47 @@ export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function doneContract1(num1, RequisitionNumber, name1, time2, group, id, num2, text, type, freight, AdvanceCharge, partsNum, priceGroup, taxGroup, currency, remark) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间管理_基本件采购_请购单和请购单明细_增加数据_成组采购',
|
||||
param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&规定到货时间=${time2}&组号=${group}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&模板类型=${type}&运费=${freight}&预付款=${AdvanceCharge}&数量=${partsNum}&单价=${priceGroup}&税率=${taxGroup}&币种流水号=${currency}&备注=${remark}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submitGroup(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间采购管理_成组采购_生成数据',
|
||||
param: '请购单流水号=' + num + '&组件流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function update1(num, num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间采购管理_成组采购_更新数据',
|
||||
param: '组件流水号=' + num + '&数量=' + num1 + '&单价=' + num2 + '&交货期=' + num3 + '&备注=' + num4
|
||||
}
|
||||
})
|
||||
}
|
||||
export function unLinkGroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间采购管理_成组采购_取消数据',
|
||||
param: '请购单流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -115,7 +115,19 @@ export function searchPurchaseDetail(data) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间采购管理_采购合同明细_查询数据',
|
||||
name: '车间采购管理_采购合同明细_查询数据NEW',
|
||||
param: '采购合同流水号=' + data
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询采购合同明细
|
||||
export function searchPurchaseDetail1(data) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间采购管理_采购合同明细_成组采购_查询数据',
|
||||
param: '采购合同流水号=' + data
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,27 +12,27 @@ export function searchCailiao(name) {
|
||||
})
|
||||
}
|
||||
// 查询采购单
|
||||
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name, material) {
|
||||
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name, check, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_采购计划_查询数据_到货',
|
||||
param: `采购单号_check=${check1}&采购单号=${num}&供应商_check=${check2}&供应商=${name}&材料=${material}`,
|
||||
param: `采购单号_check=${check1}&采购单号=${num}&供应商_check=${check2}&供应商=${name}&零件图号_check=${check}&零件图号=${num1}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询采购计划明细
|
||||
export function searchMateriel(num, num1) {
|
||||
export function searchMateriel(num, check, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_采购计划明细_查询数据_未选入',
|
||||
param: `采购计划流水号=${num}&材料=${num1}`
|
||||
param: `采购计划流水号=${num}&零件图号_check=${check}&零件图号=${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -177,14 +177,14 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
|
||||
}
|
||||
})
|
||||
}
|
||||
export function saveWeight(num1, num2, num3, num4) {
|
||||
export function saveWeight(num1, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_到货明细关联备料_保存单件重量和总重量',
|
||||
param: `采购计划明细流水号=${num1}&单件重量=${num2}&总重量=${num3}&总金额=${num4}`
|
||||
param: `采购计划明细流水号=${num1}&总重量=${num3}&总金额=${num4}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
145
src/api/WorkshopProcurement/OfflineProcurement.js
Normal file
145
src/api/WorkshopProcurement/OfflineProcurement.js
Normal file
@@ -0,0 +1,145 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询供应商
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
// 创建采购单
|
||||
export function addPurchaseOrder(PurchaseOrderName, supplier) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_离线采购计划_增加数据',
|
||||
param: `离线采购计划名称=${PurchaseOrderName}&供应商=${supplier}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑采购单
|
||||
export function editPurchaseOrder(PurchaseOrderNameValue, PurchaseOrderName, supplier) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_离线采购计划_编辑数据',
|
||||
param: `离线采购计划流水号=${PurchaseOrderNameValue}&离线采购计划名称=${PurchaseOrderName}&供应商=${supplier}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除采购单
|
||||
export function deletePurchaseOrder(PurchaseOrderNameValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_离线采购计划_删除数据',
|
||||
param: `离线采购计划流水号=${PurchaseOrderNameValue}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询采购单
|
||||
export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check3, name2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_离线采购计划_查询数据',
|
||||
param: `离线采购计划编号_check=${check1}&离线采购计划编号=${num}&供应商流水号_check=${check3}&供应商流水号=${name2}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询材料
|
||||
export function searchMX(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_离线采购计划明细_查询数据',
|
||||
param: '离线采购计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function AddMaterial(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_离线采购计划明细_增加数据_循环',
|
||||
param: `离线采购计划流水号=${num}&工艺计划流水号组=${num1}&数量组=${num2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床名称
|
||||
export function getMachines() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_机床名称_根据机床查询',
|
||||
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getGroups(stepNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组',
|
||||
param: '机床流水号=' + stepNumber + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, k, m, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_横向赋值新建存储过程_新',
|
||||
param: '项目流水号_check=0=string&机床流水号_check=' + checkbox_Machine + '=string&机床流水号=' + Machine + '=string&组件流水号_check=' + checkbox_Group + '=string&组件流水号=' + Group + '=string&零件图号_check=' + checkbox_number + '=string&零件图号=' + number + '=string&是否查询全部数据=1=string&单件是否外协=1=string&考核状态=6=int&开始时间_check=0&开始时间=' + k + '&结束时间_check=0&结束时间=' + m,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function saveWeight(num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_离线采购计划明细_编辑数据',
|
||||
param: `离线采购计划明细流水号=${num1}&成品尺寸=${num2}&备注=${num3}&数量=${num4}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteMX(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_离线采购计划明细_移出数据',
|
||||
param: `离线采购计划明细流水号=${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -59,3 +59,15 @@ export function submitApproval(num, num1, num2, num3) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 采购合同明细查询
|
||||
export function searchTable3(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间采购管理_采购合同明细_成组采购_查询数据',
|
||||
param: '采购合同流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export function searchTable3(num) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间采购管理_采购合同_查询数据_基本件',
|
||||
name: '车间采购管理_采购合同明细_成组采购_查询数据',
|
||||
param: '采购合同流水号=' + num
|
||||
}
|
||||
})
|
||||
|
||||
@@ -155,3 +155,72 @@ export function groupBy(datas, keys) {
|
||||
})
|
||||
return result
|
||||
}
|
||||
// 去除js浮点加法bug
|
||||
export function numAdd(arg1, arg2) {
|
||||
var r1, r2, m
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
return (arg1 * m + arg2 * m) / m
|
||||
}
|
||||
// 去除js浮点减法bug
|
||||
export function numSubtract(arg1, arg2) {
|
||||
var r1, r2, m, n
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
n = (r1 >= r2) ? r1 : r2
|
||||
return ((arg1 * m - arg2 * m) / m).toFixed(n)
|
||||
}
|
||||
// 去除js浮点乘法bug
|
||||
export function numMultiply(arg1, arg2) {
|
||||
var m = 0
|
||||
var s1 = arg1.toString()
|
||||
var s2 = arg2.toString()
|
||||
try {
|
||||
m += s1.split('.')[1].length
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
try {
|
||||
m += s2.split('.')[1].length
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
|
||||
}
|
||||
// 去除js浮点除法bug
|
||||
export function numDivide(arg1, arg2) {
|
||||
var t1 = 0
|
||||
var t2 = 0
|
||||
var r1, r2
|
||||
try {
|
||||
t1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
try {
|
||||
t2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
r1 = Math.Number(arg1.toString().replace('.', ''))
|
||||
r2 = Math.Number(arg2.toString().replace('.', ''))
|
||||
return (r1 / r2) * Math.pow(10, t2 - t1)
|
||||
}
|
||||
|
||||
@@ -151,7 +151,6 @@ export default {
|
||||
if (row.组件流水号 !== '' && row.组件流水号 !== null) {
|
||||
searchgroupName(row.组件流水号).then(response => {
|
||||
console.log(row, 22222)
|
||||
this.groupNumberValue = response.data[0].组号
|
||||
this.tableData2[index].任务名称 = response.data[0].组件名称
|
||||
})
|
||||
}
|
||||
@@ -171,7 +170,7 @@ export default {
|
||||
})
|
||||
},
|
||||
confirmEdit(row) {
|
||||
editData(row.计划流水号, row.组件流水号, this.groupNumberValue, row.任务名称, row.计划工时).then(response => {
|
||||
editData(row.计划流水号, row.组件流水号, row.组号, row.任务名称, row.计划工时).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.edit = false
|
||||
this.tableData2 = []
|
||||
@@ -266,7 +265,6 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
this.groupNumberValue = ''
|
||||
this.groupNum = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
|
||||
@@ -164,15 +164,15 @@
|
||||
<el-form-item label="出库数量" prop="DirectNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库人" prop="PeopleValue" label-width="100px">
|
||||
<el-select v-model="form.PeopleValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="出库人" prop="PeopleValue" label-width="100px">-->
|
||||
<!--<el-select v-model="form.PeopleValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in People"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="领料人" prop="DirectNote" label-width="100px">
|
||||
<el-input v-model="form.DirectNote" size="small" placeholder="请输入领料人" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -148,8 +148,8 @@ export default {
|
||||
this.name ? check4 = 1 : check4 = 0
|
||||
this.spec ? check5 = 1 : check5 = 0
|
||||
this.model ? check6 = 1 : check6 = 0
|
||||
this.outTime ? check7 = 1 : check7 = 0
|
||||
searchRecord1(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.inTime[0] || '', this.inTime[1] || '', this.pageCurrent1, this.pageSize1).then(res => {
|
||||
this.inTime ? check7 = 1 : (check7 = 0, this.inTime = '')
|
||||
searchRecord1(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.inTime[0], this.inTime[1], this.pageCurrent1, this.pageSize1).then(res => {
|
||||
this.tableData1 = res.data.rows
|
||||
this.total1 = res.data.total
|
||||
})
|
||||
|
||||
@@ -145,8 +145,9 @@ export default {
|
||||
this.name ? check4 = 1 : check4 = 0
|
||||
this.spec ? check5 = 1 : check5 = 0
|
||||
this.model ? check6 = 1 : check6 = 0
|
||||
this.outTime ? check7 = 1 : check7 = 0
|
||||
searchRecord(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.outTime[0] || '', this.outTime[1] || '', this.pageCurrent1, this.pageSize1).then(res => {
|
||||
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
|
||||
console.log(this.outTime, 999)
|
||||
searchRecord(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.outTime[0], this.outTime[1], this.pageCurrent1, this.pageSize1).then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total1 = res.data.total
|
||||
})
|
||||
|
||||
@@ -20,30 +20,29 @@
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
min-height="540px"
|
||||
height="540px"
|
||||
border>
|
||||
<el-table-column align="center" label="采购合同编号" width="150">
|
||||
<el-table-column align="center" label="采购合同编号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供应商" show-overflow-tooltip width="100">
|
||||
<el-table-column align="center" label="供应商" show-overflow-tooltip width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件号" width="170px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" width="120px">
|
||||
<el-table-column align="center" label="零件名称" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="70px">
|
||||
@@ -51,22 +50,12 @@
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="重量或面积" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量或面积 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单位" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" width="80px" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总额">
|
||||
<el-table-column align="center" label="总额" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
|
||||
@@ -2,94 +2,19 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable @change="searchTable">
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<span>提前</span>
|
||||
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
|
||||
<span>天预警</span>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData1"
|
||||
border
|
||||
highlight-current-row
|
||||
style="width: 100%;max-height: 250px;"
|
||||
height="250px"
|
||||
size="mini"
|
||||
@row-click="searchTable2">
|
||||
<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="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</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">
|
||||
<el-tag v-if="judge[scope.$index]===1" type="success" size="small">全部到货</el-tag>
|
||||
<el-tag v-if="judge[scope.$index]===2" type="warning" size="small">即将拖期</el-tag>
|
||||
<el-tag v-if="judge[scope.$index]===3" type="danger" size="small">已拖期</el-tag>
|
||||
<el-tag v-if="judge[scope.$index]===4" type="primary" size="small">进度正常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货进度" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="(parseInt(10000*(scope.row.合同物料到货总数)/scope.row.合同物料采购总数)) / 100"
|
||||
status="success"/>
|
||||
</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-table v-loading="" :data="tableData" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" height="300px" size="mini">
|
||||
<el-table v-loading="" :data="tableData" stripe border style="width: 100%;max-height: 600px;margin-top: 10px" height="600px" size="mini">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
@@ -97,17 +22,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="100">
|
||||
<el-table-column label="材料或规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
{{ scope.row.材料 ? scope.row.材料 : scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购总数量" align="center" min-width="100">
|
||||
@@ -117,39 +42,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-loading="" :data="tableData2" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" height="300px" size="mini">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购总数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总到货数量 }}
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -158,26 +51,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initArrivalStateContact, searchArrivalState, searchArrivalNum, searchArrivalNum1 } from '@/api/WorkshopProcurement/ArrivalStateSearch'
|
||||
import { initArrivalStateContact, searchArrivalState } from '@/api/WorkshopProcurement/ArrivalStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
warningValue: 3,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
now: '',
|
||||
arrival: [],
|
||||
judge: []
|
||||
}
|
||||
@@ -199,49 +84,18 @@ export default {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.warningValue ? this.warningValue : this.warningValue = 1
|
||||
this.arrival = [] // 规定到货时间数组
|
||||
this.now = new Date()
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchArrivalState(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.arrival.push(new Date(response.data.rows[i].规定到货时间))
|
||||
if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) {
|
||||
this.judge[i] = 1 // 全部到货
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 2 // 即将拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) < 0) {
|
||||
this.judge[i] = 3 // 已拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 4 // 进度正常
|
||||
searchTable() {
|
||||
searchArrivalState(this.contractNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料型号 === '' || response.data[i].物料型号 === null) {
|
||||
response.data[i].物料型号 = response.data[i].零件图号
|
||||
}
|
||||
}
|
||||
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()
|
||||
},
|
||||
searchTable2(row) {
|
||||
searchArrivalNum(row.采购合同流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchArrivalNum1(row.采购合同流水号).then(response => {
|
||||
this.tableData = response.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -28,34 +28,35 @@
|
||||
placeholder="规定到货时间"/>
|
||||
<el-input v-model="name" placeholder="采购员" size="small" readonly/>
|
||||
<el-input v-model="taxRate" placeholder="税率" size="small"/>
|
||||
<el-button type="success" size="small" @click="linkGroup">成组采购</el-button>
|
||||
<el-button v-show="contractNumType===0" type="success" size="small" @click="linkGroup">成组采购</el-button>
|
||||
<el-button v-show="contractNumType===1" type="danger" size="small" @click="unLinkGroup">取消成组采购</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-show="contractNumType===1" :data="tableData5" border style="width: 100%" height="100px" size="mini">
|
||||
<el-table-column label="组件名称" align="center" min-width="100">
|
||||
<el-table-column label="组件名称" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="100">
|
||||
<el-table-column label="组号" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<el-table-column label="数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.数量" size="mini" style="width:70px" @change="update1(scope.row)"/>
|
||||
<el-input v-model="scope.row.数量" size="mini" style="width:100%" @change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:70px" @change="update1(scope.row)"/>
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:100%" @change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.金额" size="mini" style="width:70px"/>
|
||||
{{ parseInt(scope.row.数量) * parseFloat(scope.row.单价) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期" align="center" width="150">
|
||||
@@ -66,13 +67,13 @@
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 133px"
|
||||
style="width:100%"
|
||||
@change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="150">
|
||||
<el-table-column label="备注" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="mini" style="width: 120px" @change="update1(scope.row)"/>
|
||||
<el-input v-model="scope.row.备注" size="mini" style="width:100%" @change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -296,7 +297,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData2, searchContractDemo, initGroupNum } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData2, searchContractDemo, initGroupNum, submitGroup, update1, unLinkGroup, searchData1, doneContract1 } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
@@ -345,6 +346,9 @@ export default {
|
||||
}, {
|
||||
label: '采购计划',
|
||||
value: 3
|
||||
}, {
|
||||
label: '成组采购',
|
||||
value: 4
|
||||
}],
|
||||
contractValue: 1,
|
||||
contractNum: [], // 合同号
|
||||
@@ -409,7 +413,9 @@ export default {
|
||||
freight: '', // 运费
|
||||
taxRate: '0.13', // 税率
|
||||
tableData4: [],
|
||||
tableData5: [],
|
||||
groupNum2: [],
|
||||
groupNum5: [],
|
||||
group1: '',
|
||||
group2: '',
|
||||
group3: '',
|
||||
@@ -439,17 +445,47 @@ export default {
|
||||
console.log(this.form3, 111)
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitGroup() {},
|
||||
submitGroup() {
|
||||
submitGroup(this.contractNumValue, this.form3.groupNumValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.contractNumType = 1
|
||||
this.dialogVisible2 = false
|
||||
this.searchData()
|
||||
this.$message.success('转换成功')
|
||||
} else {
|
||||
this.$message.success('转换失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
update1(row) {
|
||||
update1(row.组件流水号, row.数量, row.单价, row.物料计划到货时间, row.备注).then(response => {
|
||||
})
|
||||
},
|
||||
unLinkGroup() {
|
||||
unLinkGroup(this.contractNumValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.contractNumType = 0
|
||||
this.$message.success('转换成功')
|
||||
} else {
|
||||
this.$message.success('转换失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
searchData() {
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.contractNumType = this.contractNum[i].id
|
||||
}
|
||||
}
|
||||
console.log(this.contractNumType, 1111)
|
||||
searchData1(this.contractNumValue).then(response => {
|
||||
console.log(response.datas)
|
||||
this.tableData5 = response.data
|
||||
}).then(() => {
|
||||
this.groupNum5 = this.tableData5 // 给中间变量,需要时重新push
|
||||
console.log(this.tableData5)
|
||||
})
|
||||
searchData2(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
this.machineValue = response.data[0].机床流水号
|
||||
this.form3.机床 = response.data[0].机床图号
|
||||
@@ -464,7 +500,6 @@ export default {
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay1[i] = 0
|
||||
this.tableData4[i].金额 = parseFloat(this.tableData4[i].单价) * parseFloat(this.tableData4[i].零件数量)
|
||||
}
|
||||
}).then(() => {
|
||||
@@ -577,16 +612,11 @@ export default {
|
||||
},
|
||||
doneContract() { // 生成采购合同
|
||||
if (this.contractNumValue === '') {
|
||||
this.$message.error('请选择生成合同的询价单')
|
||||
this.$message.error('请选择生成合同的请购单')
|
||||
} else if (this.stipulateArrivalTime === '' || this.stipulateArrivalTime === null) {
|
||||
this.$message.error('请选择规定到货时间!')
|
||||
} else {
|
||||
for (let i = 0; i < this.deliveryDay.length; i++) {
|
||||
if (parseInt(this.deliveryDay[i]) < 0) {
|
||||
this.$message.error('规定到货日期不可小于当前日期')
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.contractNumType === 0) {
|
||||
this.group1 = ''
|
||||
this.group2 = ''
|
||||
this.group3 = ''
|
||||
@@ -620,6 +650,19 @@ export default {
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
} else {
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
}
|
||||
}
|
||||
doneContract1(this.contractNumValue, this.RequisitionNumber, this.contractName, this.stipulateArrivalTime, this.form3.groupNumValue, this.id, this.supplierValue, this.textArea, this.contractValue, this.freight, this.AdvanceCharge, this.tableData5[0].数量, this.tableData5[0].单价, this.taxRate, this.currencyValue, this.tableData5[0].备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
exportExcel() {}
|
||||
|
||||
@@ -36,6 +36,16 @@
|
||||
</el-tooltip>
|
||||
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="330" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="机床图号" prop="机床图号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" prop="组号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
@@ -559,7 +569,6 @@ export default {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.title2 = '创建采购计划单'
|
||||
this.form2.离线合同名称 = ''
|
||||
this.form2.supplierNameValue = ''
|
||||
this.form2.供应商名称 = ''
|
||||
this.form2.计划完成日期 = ''
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
|
||||
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" width="120">
|
||||
<el-table-column label="名称" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||
</template>
|
||||
@@ -139,6 +139,11 @@
|
||||
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -270,8 +275,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="35"/>
|
||||
<el-table v-show="type!==4" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
@@ -308,6 +313,44 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-show="type===4" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到票数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到票数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次到票数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
||||
@@ -317,7 +360,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
|
||||
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail, searchPurchaseDetail1,
|
||||
addTable2, deleteTable2 } from '@/api/WorkshopProcurement/InvoiceSettlementApplication1'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { uploadInvoiceScan1 } from '@/utils/request'
|
||||
@@ -340,6 +383,7 @@ export default {
|
||||
tableData2: [],
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
type: '',
|
||||
supplier: [],
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
@@ -369,6 +413,7 @@ export default {
|
||||
limit: 1,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
tableData03: [],
|
||||
inboundCardNumber: '', // 入库单号
|
||||
group: [] // 发票结算申请单明细流水号组
|
||||
}
|
||||
@@ -578,6 +623,7 @@ export default {
|
||||
searchTable01() {
|
||||
this.tableData01 = []
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
searchPurchase(this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
@@ -590,11 +636,23 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
this.type = ''
|
||||
}
|
||||
},
|
||||
searchTable02(row) {
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
if (row.模板类型 === 4) {
|
||||
this.type = row.模板类型
|
||||
searchPurchaseDetail1(row.采购合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||
this.tableData03.push(data)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
@@ -602,6 +660,7 @@ export default {
|
||||
this.tableData02.push(data)
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (this.contractType === '离线合同') {
|
||||
searchOfflineDetail(row.离线合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
|
||||
@@ -187,14 +187,9 @@
|
||||
{{ scope.row.成品尺寸 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单件重量" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.单件重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:120px" @change="save(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总重量" align="center" prop="总重量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总重量 }}
|
||||
<el-input-number v-model="scope.row.总重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:120px" @change="save(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" >
|
||||
@@ -268,13 +263,7 @@
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-form-item v-show="title1==='添加到货明细'" label="材料" prop="CailiaoValue">
|
||||
<el-select v-model="form1.CailiaoValue" placeholder="材料" size="small" filterable>
|
||||
<el-option
|
||||
v-for="item in Cailiao"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="form1.CailiaoValue" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@@ -326,11 +315,10 @@
|
||||
<div>
|
||||
<span>采购计划单号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
|
||||
<el-input v-model="partNumber" placeholder="零件图号" size="small" style="margin: 3px 0" clearable/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
</el-tooltip>
|
||||
<span style="font-size: 15px;margin-left: 10px;font-weight: bold">材料:</span><span>{{ 材料111 }}</span>
|
||||
<span style="font-size: 15px;margin-left: 10px;font-weight: bold">材料数量:</span><span>{{ 材料数量 }}</span>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="采购计划单号" align="center">
|
||||
@@ -431,7 +419,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchCailiao, searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, searchTable5, searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6 } from '@/api/WorkshopProcurement/NewArrivalList.js'
|
||||
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, searchTable5, searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6 } from '@/api/WorkshopProcurement/NewArrivalList.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -439,14 +427,13 @@ export default {
|
||||
return {
|
||||
supplierNameValue: '',
|
||||
supplierName: [], // 供应商
|
||||
Cailiao: [],
|
||||
partNumber: '',
|
||||
purchasingOrder: '',
|
||||
ArrivalOrderNumber: '',
|
||||
ArrivalOrderMXNumber: '',
|
||||
supplierName0: '',
|
||||
arrest: [],
|
||||
check: 0,
|
||||
材料111: '',
|
||||
Name: '',
|
||||
单价: '',
|
||||
数量: '',
|
||||
@@ -460,7 +447,6 @@ export default {
|
||||
label: '已结算'
|
||||
}],
|
||||
ALLMoney: '',
|
||||
材料数量: '',
|
||||
材料名称: '',
|
||||
未绑定数量: '',
|
||||
tableData2: [],
|
||||
@@ -538,21 +524,11 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
searchCailiao() {
|
||||
this.Cailiao = []
|
||||
searchCailiao(this.供应商111).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Cailiao.push({
|
||||
value: response.data[i].材料,
|
||||
label: response.data[i].材料
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询采购单列表
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.材料111).then(response => {
|
||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
@@ -567,7 +543,8 @@ export default {
|
||||
},
|
||||
searchTable3(row) { // 查询采购计划明细
|
||||
this.采购计划流水号 = row.采购计划流水号
|
||||
searchMateriel(this.采购计划流水号, this.材料111).then(response => {
|
||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||
searchMateriel(this.采购计划流水号, this.check5, this.partNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
@@ -682,10 +659,9 @@ export default {
|
||||
},
|
||||
save(index, row) {
|
||||
this.SUM = 0
|
||||
this.allWeight = parseInt(row.数量 * row.单件重量 * 100) / 100
|
||||
this.ALLMoney = parseInt(this.allWeight * this.单价 * 100) / 100
|
||||
this.ALLMoney = parseInt(row.总重量 * this.单价 * 100) / 100
|
||||
for (let i = 0; i < this.tableData6.length; i++) {
|
||||
this.SUM += parseFloat(this.tableData6[i].单件重量) * parseFloat(this.tableData6[i].数量)
|
||||
this.SUM += parseFloat(this.tableData6[i].总重量)
|
||||
}
|
||||
if (this.数量 - this.SUM < 0) {
|
||||
this.$message.warning('总重量已超出上限')
|
||||
@@ -696,7 +672,7 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
saveWeight(row.采购计划明细流水号, row.单件重量, this.allWeight, this.ALLMoney).then(response => {
|
||||
saveWeight(row.采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('录入成功')
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
@@ -822,7 +798,6 @@ export default {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.供应商111 = row.供应商流水号
|
||||
this.searchCailiao()
|
||||
this.title1 = '添加到货明细'
|
||||
this.form1.CailiaoValue = ''
|
||||
this.form1.数量 = ''
|
||||
@@ -928,8 +903,6 @@ export default {
|
||||
})
|
||||
},
|
||||
addArrivalCL(row) {
|
||||
this.材料111 = row.材料
|
||||
this.材料数量 = row.数量
|
||||
this.supplierName0 = row.供应商流水号
|
||||
this.ArrivalOrderMXNumber = row.到货单明细流水号
|
||||
this.tableData3 = []
|
||||
|
||||
651
src/views/WorkshopProcurement/OfflineProcurement/index.vue
Normal file
651
src/views/WorkshopProcurement/OfflineProcurement/index.vue
Normal file
@@ -0,0 +1,651 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 1137px">
|
||||
<span>机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="width: 150px;" placeholder="机床号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 120px;" @change="getTableData">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 150px"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent10 = 1;pageSize10 = 10;getTableData()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<el-table v-loading="" :data="tableData10" stripe highlight-current-row border style="width: 100%;max-height: 315px;margin-top: 10px" height="315px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="机床图号" prop="机床图号" min-width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" prop="组号" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="220">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="220">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent10"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize10"
|
||||
:total="total10"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange10"
|
||||
@current-change="handleCurrentChange10"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<span>离线采购计划编号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="离线采购计划编号" size="small" style="width: 160px" clearable/>
|
||||
<span style="margin-left: 10px">供应商:</span>
|
||||
<el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 150px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
: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="pageCurrent2=1;pageSize2=10;total2=0;searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button>
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">-->
|
||||
<!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
|
||||
<!--</el-tooltip>-->
|
||||
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<el-table v-loading="" :data="tableData" stripe highlight-current-row border style="width: 100%;max-height: 230px;margin-top: 10px" height="230px" size="mini" @row-click="searchMX">
|
||||
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">未到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===3" type="success" size="mini">已到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线采购计划编号" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线采购计划编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线采购计划名称" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线采购计划名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单日期" prop="下单日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下单日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="290">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印单据</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="primary" plain size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)">编辑</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="primary" plain size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)">删除</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<el-table v-loading="" :data="tableData3" stripe highlight-current-row border style="width: 100%;max-height: 300px;margin-top: 10px" size="mini">
|
||||
<el-table-column label="采购状态" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" prop="材料" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.数量" size="mini" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="备注" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="info" size="mini" icon="el-icon-right" plain @click="deleteMX(scope.row)">移出</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card style="width: 1137px">
|
||||
<div id="WGBLD" style="width: 1037px;margin: 0 auto">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr style="height: 60px">
|
||||
<th colspan="12"><h3>江苏高精机电装备有限公司</h3></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<th colspan="12"><h4>{{ 采购单名称 }}</h4></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
|
||||
<td colspan="4" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">单号</td>
|
||||
<td colspan="4" style="text-align: center;width: 35%">{{ 单号 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
|
||||
<td colspan="4" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
|
||||
<td colspan="4" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
|
||||
<tr id="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: 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: 20%">{{ list.成品尺寸 }}</td>
|
||||
<td style="text-align: center;width: 17%">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="520px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="150px">
|
||||
<el-form-item label="离线采购计划名称" prop="离线采购计划名称">
|
||||
<el-input v-model="form2.离线采购计划名称" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-model="form2.supplierNameValue" placeholder="供应商" size="small" filterable>
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title2==='创建离线采购计划'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddPurchaseOrder">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑离线采购计划'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEditPurchaseOrder">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { getMachines, getGroups, getTable, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchPurchaseOrder, AddMaterial, searchMX, saveWeight, deleteMX } from '@/api/WorkshopProcurement/OfflineProcurement'
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
import Cookie from 'js-cookie'
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
purchasingOrder: '',
|
||||
supplierName: '',
|
||||
supplierNames: [],
|
||||
Machine: '', // 机床号
|
||||
Machines: [],
|
||||
Group: '', // 组号
|
||||
Groups: [],
|
||||
number: '', // 零件图号
|
||||
Number: [], // 数量组
|
||||
title2: '',
|
||||
check3: '',
|
||||
check4: '',
|
||||
tableData10: [],
|
||||
pageCurrent10: 1,
|
||||
pageSize10: 10,
|
||||
total10: 0,
|
||||
Materials: [],
|
||||
materielGroup: [],
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
下单单位: '',
|
||||
下单日期: '',
|
||||
单号: '',
|
||||
计划完成日期: '',
|
||||
采购单名称: '',
|
||||
form2: {
|
||||
离线采购计划名称: '',
|
||||
supplierNameValue: '',
|
||||
离线采购计划流水号: ''
|
||||
},
|
||||
rules2: {
|
||||
离线采购计划名称: [{ required: true, message: '请填写离线采购计划名称' }],
|
||||
supplierNameValue: [{ required: true, message: '请选择供应商' }]
|
||||
},
|
||||
form3: {
|
||||
材料: ''
|
||||
},
|
||||
rules3: {
|
||||
材料: [{ required: true, message: '请选择材料' }]
|
||||
},
|
||||
dialogVisible2: false,
|
||||
dialogVisible3: false,
|
||||
离线采购计划流水号: '',
|
||||
tableData: [],
|
||||
tableData3: [],
|
||||
arrival: [],
|
||||
judge: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchRawMaterial()
|
||||
this.searchTable()
|
||||
this.getMachine()
|
||||
},
|
||||
methods: {
|
||||
searchRawMaterial() {
|
||||
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplierNames.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getMachine() {
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
if (Cookie.get('group') !== undefined) {
|
||||
this.Machine = parseInt(Cookie.get('machineValue'))
|
||||
this.getGroup()
|
||||
this.getTableData()
|
||||
this.Group = parseInt(Cookie.get('group'))
|
||||
// this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
} else {
|
||||
// this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getTableData()
|
||||
}
|
||||
}, // 获取组号
|
||||
getGroup() {
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getGroups(this.Machine).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Groups.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
this.Group = response.data[0].组件流水号
|
||||
})
|
||||
this.getTableData()
|
||||
}, // 按条件查询
|
||||
getTableData() {
|
||||
this.tableData10 = []
|
||||
if (this.Machine === '') {
|
||||
this.checkbox_Machine = 0
|
||||
} else {
|
||||
this.checkbox_Machine = 1
|
||||
}
|
||||
if (this.Group === '') {
|
||||
this.checkbox_Group = 0
|
||||
} else {
|
||||
this.checkbox_Group = 1
|
||||
}
|
||||
if (this.number === '') {
|
||||
this.checkbox_number = 0
|
||||
} else {
|
||||
this.checkbox_number = 1
|
||||
}
|
||||
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, '', '', this.pageCurrent10, this.pageSize10).then(response => {
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData10.push({
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
机床图号: response.data.rows[i].机床图号,
|
||||
组号: response.data.rows[i].组号,
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
批次数量: response.data.rows[i].批次数量,
|
||||
材料: response.data.rows[i].材料
|
||||
})
|
||||
}
|
||||
}
|
||||
this.total10 = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSizeChange10(val) {
|
||||
this.pageSize10 = val
|
||||
this.pageCurrent10 = 1
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange10(val) {
|
||||
this.pageCurrent10 = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.materielGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.materielGroup.push(val[i].工艺计划流水号)
|
||||
this.Number.push(val[i].批次数量)
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) { // 采购单列表分页
|
||||
this.pageSize2 = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange2(val) { // 采购单列表分页
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable()
|
||||
},
|
||||
addPurchaseOrder() { // 创建采购单
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.form2.离线采购计划名称 = ''
|
||||
this.form2.supplierNameValue = ''
|
||||
this.title2 = '创建离线采购计划'
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitAddPurchaseOrder() { // 新建采购单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
addPurchaseOrder(this.form2.离线采购计划名称, this.form2.supplierNameValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建离线采购计划成功')
|
||||
this.searchTable()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('新建离线采购计划失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
editPurchaseOrder(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.title2 = '编辑离线采购计划'
|
||||
this.form2.离线采购计划流水号 = row.离线采购计划流水号
|
||||
this.form2.离线采购计划名称 = row.离线采购计划名称
|
||||
this.form2.supplierNameValue = row.供应商流水号
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitEditPurchaseOrder() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
editPurchaseOrder(this.form2.离线采购计划流水号, this.form2.离线采购计划名称, this.form2.supplierNameValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改离线采购计划成功')
|
||||
this.searchTable()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('修改离线采购计划失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deletePurchaseOrder(row) { // 删除采购单
|
||||
this.$confirm('确定删除该备料计划?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deletePurchaseOrder(row.离线采购计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('数据占用,删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
submitAddMaterial() {
|
||||
if (!this.离线采购计划流水号) {
|
||||
this.$message.warning('请选择离线采购计划')
|
||||
} else if (this.materielGroup.length === 0) {
|
||||
this.$message.warning('请勾选物料')
|
||||
} else {
|
||||
AddMaterial(this.离线采购计划流水号, this.materielGroup, this.Number).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('选入成功')
|
||||
searchMX(this.离线采购计划流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('选入失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
searchMX(row) {
|
||||
this.离线采购计划流水号 = row.离线采购计划流水号
|
||||
this.采购单名称 = row.离线采购计划名称
|
||||
this.采购计划状态 = row.采购计划状态
|
||||
this.下单单位 = row.供应商名称
|
||||
this.单号 = row.离线采购计划编号
|
||||
this.下单日期 = row.下单日期.split(' ')[0]
|
||||
searchMX(row.离线采购计划流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
saveWeight(index, row) {
|
||||
saveWeight(row.离线采购计划明细流水号, row.成品尺寸, row.备注, row.数量)
|
||||
},
|
||||
deleteMX(row) { // 删除采购单明细
|
||||
this.$confirm('确定移出该材料?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteMX(row.离线采购计划明细流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('移出成功')
|
||||
searchMX(this.离线采购计划流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('移出失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
exportExcel(row) {
|
||||
this.$confirm('确定打印备料计划?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const htmlNode = $('#WGBLD').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()
|
||||
}).catch(res => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
@@ -91,7 +91,7 @@
|
||||
<el-card>
|
||||
<div style="width:60%;margin-left: 18%">
|
||||
<el-card v-show="type==='1' || type==='2'">
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="margin-top: 10px">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="5" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
@@ -213,10 +213,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="line-height: 25px;margin-top: 10px">签订时间:____年__月__日</div>
|
||||
<div style="line-height: 25px">有效期限:____年__月__日至____年__月__日</div>
|
||||
<div style="line-height: 25px;margin-bottom: 10px">有效期限:____年__月__日至____年__月__日</div>
|
||||
</el-card>
|
||||
<el-card v-show="type==='3'">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 10px">
|
||||
<tr style="height: 60px">
|
||||
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
|
||||
</tr>
|
||||
@@ -256,7 +256,52 @@
|
||||
<td colspan="2" style="text-align: center;width: 17%">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
<div style="margin-top: 20px;margin-bottom: 10px">联系人:___________ 联系电话:___________ </div>
|
||||
</el-card>
|
||||
<el-card v-show="type === '4'">
|
||||
<div id="CZCG" style="width: 880px;margin: 0 auto">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 10px">
|
||||
<tr style="height: 60px">
|
||||
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<th colspan="14"><h4>{{ 采购合同名称 }}</h4></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ supplier }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">单号</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 操作日期 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 规定到货时间 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
|
||||
<tr id="tablehead100" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">序号</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">组号</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">组件名称</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">单价</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">金额</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">数量</td>
|
||||
<td colspan="2" style="text-align: center;width: 17%">备注</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in returns2" :key="index" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.组号 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">{{ list.组件名称 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.单价 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.金额 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.数量 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 17%">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px;margin-bottom: 10px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -320,7 +365,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, submitApproval } from '@/api/WorkshopProcurement/ProcurementContractApproval'
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, submitApproval, searchTable3 } from '@/api/WorkshopProcurement/ProcurementContractApproval'
|
||||
import $ from 'jquery'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
@@ -361,6 +406,7 @@ export default {
|
||||
form1: {},
|
||||
returns: [],
|
||||
returns1: [],
|
||||
returns2: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
@@ -377,7 +423,7 @@ export default {
|
||||
],
|
||||
disabled: true,
|
||||
form2: {
|
||||
审批是否通过: '是',
|
||||
审批是否通过: 1,
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {
|
||||
@@ -390,6 +436,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
@@ -543,11 +590,16 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
} else {
|
||||
} else if (this.type === '3') {
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
})
|
||||
} else {
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable3(this.contractValue).then(response => {
|
||||
this.returns2 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,6 +281,49 @@
|
||||
</table>
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
<div v-show="type === '4'" id="CZCG" style="width: 880px;margin: 0 auto">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr style="height: 60px">
|
||||
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<th colspan="14"><h4>{{ 采购合同名称 }}</h4></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ supplier }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">单号</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 操作日期 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 规定到货时间 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
|
||||
<tr id="tablehead100" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">序号</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">组号</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">组件名称</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">单价</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">金额</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">数量</td>
|
||||
<td colspan="2" style="text-align: center;width: 17%">备注</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in returns2" :key="index" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.组号 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">{{ list.组件名称 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.单价 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.金额 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.数量 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 17%">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -324,7 +367,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, Disable, searchTable3 } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
import $ from 'jquery'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
@@ -379,6 +422,7 @@ export default {
|
||||
goodTime: '',
|
||||
returns: [],
|
||||
returns1: [],
|
||||
returns2: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
@@ -388,6 +432,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
@@ -481,7 +526,7 @@ export default {
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
} else {
|
||||
} else if (this.type === '3') {
|
||||
const htmlNode = $('#WGBLD').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
@@ -491,6 +536,16 @@ export default {
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
} else {
|
||||
const htmlNode = $('#CZCG').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -564,11 +619,16 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
} else {
|
||||
} else if (this.type === '3') {
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
})
|
||||
} else {
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable3(this.contractValue).then(response => {
|
||||
this.returns2 = response.data
|
||||
})
|
||||
}
|
||||
// searchTable3(this.contractValue).then(response => {
|
||||
// this.returns1 = response.data
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries1" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries1" show-summary border style="width: 100%;max-height: 700px;" height="700px">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
@@ -25,56 +25,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="100">
|
||||
<el-table-column label="材料或规格" align="center" min-width="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" prop="金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData" :summary-method="getSummaries" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
{{ scope.row.材料 ? scope.row.材料 : scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
@@ -140,6 +101,11 @@ export default {
|
||||
})
|
||||
searchProjectTotal2(this.projectValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料型号 === null || response.data[i].物料型号 === '') {
|
||||
response.data[i].物料型号 = response.data[i].零件图号
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择项目')
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<script>
|
||||
import { searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/PurchaseContractRequestFund1'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { timeToStamp } from '@/utils/tool'
|
||||
import { timeToStamp, numSubtract } from '@/utils/tool'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -272,6 +272,9 @@ export default {
|
||||
timeToStamp(param) { // 转时间戳
|
||||
return timeToStamp(param)
|
||||
},
|
||||
numSubtract(arg1, arg2) {
|
||||
return numSubtract(arg1, arg2)
|
||||
},
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
@@ -322,12 +325,14 @@ export default {
|
||||
let check
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchPurchaseContract(check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.tableData01.map(v => {
|
||||
response.data.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.含税总金额 - v.已付金额 - v.申请中金额
|
||||
v.请款金额 = this.numSubtract(this.numSubtract(v.含税总金额, v.已付金额), v.申请中金额)
|
||||
console.log(v.请款金额)
|
||||
return v
|
||||
})
|
||||
console.log(response.data, 12)
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择供应商')
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<!-- <span>供应商:</span>-->
|
||||
<el-select v-model="supplierValue" placeholder="请选择供应商" filterable size="small" style="width: 180px;margin: 0px 10px;" @change="supplierChange();searchContractDetail()">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!-- <span style="margin-left: 5px">合同:</span>-->
|
||||
<el-select v-model="contractValue" placeholder="请选择合同" filterable clearable size="small" style="width: 140px;margin: 0px 10px;" @change="searchContractDetail()">
|
||||
<el-option
|
||||
v-for="item in contract"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" style="margin-left: 10px" @click="searchContractDetail">查询明细</el-button>
|
||||
<el-button type="primary" style="margin: 10px" size="small" @click="submitInStorage">确认到货</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
|
||||
<el-table-column label="名称" sortable prop="物料名称" width="150px" align="center" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" prop="规格型号" width="180px" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : '-' + ' ' + scope.row.物料型号 ? scope.row.零件图号 : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="100" show-overflow-tooltip prop="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到数量" align="center" width="100" show-overflow-tooltip prop="到货数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货数量" align="center" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.本次到货数量" :min="0" :max="scope.row.数量-scope.row.到货数量" :precision="2" size="mini" style="margin: 0;width: 100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { url } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
import Cookie from 'js-cookie'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
supplierValue: '', // 供应商
|
||||
supplier: [],
|
||||
contractValue: '', // 合同
|
||||
contract: [],
|
||||
inventoryNumber: '', // 仓库流水号
|
||||
inventoryName: [], // 仓库名称
|
||||
locateNumber: '',
|
||||
locateName: [],
|
||||
table1: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initSupplier()
|
||||
this.getpeopleid()
|
||||
},
|
||||
methods: {
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.inventoryPeople = Cookie.get('id')
|
||||
},
|
||||
// 初始化供应商
|
||||
async initSupplier() {
|
||||
this.supplierValue = ''
|
||||
this.supplier = []
|
||||
const param = {
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select distinct 供应商流水号,供应商名称 from (
|
||||
select 供应商流水号,供应商名称,sum(数量) as 总采购数量,sum(已到货数量) as 总到货数量
|
||||
from 库存管理_车间采购_视图
|
||||
group by 采购合同流水号,供应商流水号,供应商名称
|
||||
having sum(数量) <> sum(已到货数量)
|
||||
union
|
||||
select 供应商流水号,供应商名称,sum(数量) as 总采购数量,sum(已到货数量) as 总到货数量
|
||||
from 库存管理_车间采购_成组采购_视图
|
||||
group by 采购合同流水号,供应商流水号,供应商名称
|
||||
having sum(数量) <> sum(已到货数量)
|
||||
) as 已采购的离线合同`
|
||||
}
|
||||
}
|
||||
const res = await axios(param)
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
this.supplier.push({
|
||||
value: res.data[i].供应商流水号,
|
||||
label: res.data[i].供应商名称
|
||||
})
|
||||
}
|
||||
},
|
||||
// 根据供应商查合同
|
||||
async supplierChange() {
|
||||
this.contractValue = ''
|
||||
this.contract = []
|
||||
const param = {
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_根据供应商查合同_车间采购',
|
||||
param: `供应商流水号=${this.supplierValue}`
|
||||
}
|
||||
}
|
||||
const res = await axios(param)
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
this.contract.push({
|
||||
value: res.data[i].采购合同流水号,
|
||||
label: res.data[i].采购合同编号
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询
|
||||
async searchContractDetail() {
|
||||
if (this.contractValue) { this.contractValue_check = 1 } else { this.contractValue_check = 0 }
|
||||
const param = {
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '库存管理_外购件入库_车间采购查询',
|
||||
param: `供应商流水号=${this.supplierValue}&采购合同流水号_check=${this.contractValue_check}&采购合同流水号=${this.contractValue}`
|
||||
}
|
||||
}
|
||||
const res = await axios(param)
|
||||
res.data.map(v => {
|
||||
this.$set(v, '本次到货数量', v.数量 - v.到货数量)
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (!res.data[i].物料规格) { res.data[i].物料规格 = '' }
|
||||
if (!res.data[i].物料型号) { res.data[i].物料型号 = '' }
|
||||
}
|
||||
this.table1 = res.data
|
||||
},
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
// 明细可选
|
||||
selectable(row) {
|
||||
return Number(row.数量) !== Number(row.到货数量)
|
||||
},
|
||||
// 确认入库
|
||||
submitInStorage() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请勾选入库物料')
|
||||
} else {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const groupNumGroup = []
|
||||
this.$confirm('确认到货?', '提示', {
|
||||
confirmButtonText: '确定到货',
|
||||
cancelButtonText: '取消操作',
|
||||
center: 'true',
|
||||
type: 'warning'
|
||||
}).then(async() => {
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
materialGroup.push(this.multipleSelection[i].物料流水号)
|
||||
numberGroup.push(this.multipleSelection[i].本次到货数量)
|
||||
partGroup.push(this.multipleSelection[i].请购单明细流水号)
|
||||
groupNumGroup.push(this.multipleSelection[i].组件流水号)
|
||||
}
|
||||
const param = {
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购件入库_车间采购入库_循环执行',
|
||||
param: `物料流水号组=${materialGroup}&实际到货数量组=${numberGroup}&组件流水号组=${groupNumGroup}&入库人员流水号=${this.inventoryPeople}&请购单明细流水号组=${partGroup}`
|
||||
}
|
||||
}
|
||||
const res = await axios(param)
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('到货成功')
|
||||
this.searchContractDetail()
|
||||
} else { this.$message.error('到货失败') }
|
||||
}).catch(() => {
|
||||
this.$message('已取消操作')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-input{
|
||||
margin-right: 2px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user