This commit is contained in:
Vergil
2020-02-22 08:42:20 +08:00
parent 4bc99d30aa
commit 9a09af3ade

View File

@@ -504,45 +504,53 @@ export default {
}) })
}) })
} else { } else {
this.$message.warning('请选择单') this.$message.warning('请选择外协加工任务单')
} }
}, },
// 保存 // 保存
confirmPrice() { confirmPrice() {
var 外协加工任务单明细流水号组 = [] if (this.Number) {
var 加工价格_成交 = [] var 外协加工任务单明细流水号 = []
for (let i = 0; i < this.List3.length; i++) { var 加工价格_成交组 = []
外协加工任务单明细流水号组.push(this.List3[i].外协加工任务单明细流水号) for (let i = 0; i < this.List3.length; i++) {
加工价格_成交.push(this.List3[i].加工价格_成交) 外协加工任务单明细流水号.push(this.List3[i].外协加工任务单明细流水号)
} 加工价格_成交组.push(this.List3[i].加工价格_成交)
getPrice(外协加工任务单明细流水号组, 加工价格_成交组).then(response => { }
this.loading = true getPrice(外协加工任务单明细流水号组, 加工价格_成交组).then(response => {
this.List3 = [] this.loading = true
getParts(this.Number).then(response => { this.List3 = []
this.List3 = response.data getParts(this.Number).then(response => {
this.loading = false this.List3 = response.data
this.loading = false
})
}) })
}) } else {
this.$message.warning('请选择外协加工任务单')
}
}, },
// 提交 // 提交
Deal() { Deal() {
this.$confirm('成交后单据不可修改, 确定成交吗?', '提示', { if (this.Number) {
confirmButtonText: '确定', this.$confirm('成交后单据不可修改, 确定成交吗?', '提示', {
cancelButtonText: '取消', confirmButtonText: '确定',
type: 'warning' cancelButtonText: '取消',
}).then(() => { type: 'warning'
editData1(this.Number, this.ManufactorNumber).then(response => { }).then(() => {
if (response.data[0].result === '1') { editData1(this.Number, this.ManufactorNumber).then(response => {
this.$message.success('提交成功') if (response.data[0].result === '1') {
this.fetchData() this.$message.success('提交成功')
} else { this.$message.error('提交失败') } this.fetchData()
} else { this.$message.error('提交失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消提交'
})
}) })
}).catch(() => { } else {
this.$message({ this.$message.warning('请选择外协加工任务单')
type: 'info', }
message: '已取消提交'
})
})
}, },
// 导出任务单 // 导出任务单
exportTable() { exportTable() {
@@ -596,39 +604,5 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-card{
margin: 0px;
}
td{
width: 100px;
height: 30px;
text-align:center;
}
.el-table .chengjiao {
background: #AEF199;
}
.el-input__inner {
height: 30px;
}
</style>
<style>
.el-table .chajia {
background: #EBF953;
}
#tableHead td{
border:1px solid black;
}
.tableData td{
border:1px solid black;
}
#tableFoot td{
border:1px solid black;
}
.tbodyHead td{
text-align: left;
}
.foot td{
width: 7%;
text-align: left;
}
</style> </style>