创建外购备料计划

This commit is contained in:
zhangdingyu
2019-10-24 09:41:07 +08:00
parent dda5114f52
commit ab6aa515b8
2 changed files with 16 additions and 21 deletions

View File

@@ -26,14 +26,14 @@ export function addMateriel2(num1, num2) {
})
}
// 保存重量和备注
export function saveWeight(num1, num2, num3, num4) {
export function saveWeight(num1, num2, num3, num4, num5, num6, num7) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划明细_保存重量和备注',
param: `采购计划明细流水号=${num1}&成品尺寸=${num2}&备注=${num3}&单=${num4}`
param: `采购计划流水号=${num1}&成品尺寸=${num2}&备注=${num3}&单=${num4}&零件图号=${num5}&材料=${num6}&零件名称=${num7}`
}
})
}
@@ -160,14 +160,14 @@ export function saveMateriel1(num1) {
})
}
// 删除采购计划明细
export function deleteMateriel(num, num1) {
export function deleteMateriel(num, num1, num2, num3) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_外购备料_移出数据',
param: `采购计划明细流水号=${num}&工艺计划流水号=${num1}`
param: `采购计划流水号=${num}&零件图号=${num1}&材料=${num2}&零件名称=${num3}`
}
})
}

View File

@@ -177,11 +177,6 @@
{{ 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">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
@@ -194,7 +189,7 @@
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="250px">
@@ -317,7 +312,7 @@
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.批次数量 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注1 }}</td>
</tr>
@@ -479,19 +474,19 @@ export default {
}
},
saveWeight(index, row) {
saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.)
saveWeight(row.采购计划流水号, row.成品尺寸, row.备注1, row., row.零件图号, row.材料, row.零件名称)
},
saveMoney(index, row) {
var reg = /^[0-9]*$/
if (!reg.test(row.单价)) {
this.$message.error('请输入正确的单价')
row.单价 = ''
} else {
saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单位)
}
saveWeight(row.采购计划流水号, row.成品尺寸, row.备注1, row.单位, row.零件图号, row.材料, row.零件名称)
// var reg = /^[0-9]*$/
// if (!reg.test(row.单价)) {
// this.$message.error('请输入正确的单价')
// row.单价 = ''
// } else {
// }
},
saveRemarks(index, row) {
saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单位)
saveWeight(row.采购计划流水号, row.成品尺寸, row.备注1, row.单位, row.零件图号, row.材料, row.零件名称)
},
// ///////////////////////////////////////////////////////////////////////////////////////0529新加↑
useqrcode(contractNum) {
@@ -705,7 +700,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteMateriel(row.采购计划明细流水号, row.工艺计划流水号).then(response => {
deleteMateriel(row.采购计划流水号, row.零件图号, row.材料, row.零件名称).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
this.searchTable1()