This commit is contained in:
Vergil
2020-04-08 16:00:17 +08:00
parent 8eaf768150
commit c94a5d21d1
5 changed files with 82 additions and 42 deletions

View File

@@ -349,12 +349,14 @@
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建外购备料单'"
:disabled="addPurchaseOrder_disable"
type="primary"
size="small"
icon="el-icon-check"
@click="submitAddPurchaseOrder">确定</el-button>
<el-button
v-show="title2==='编辑外购备料单'"
:disabled="addPurchaseOrder_disable"
type="primary"
size="small"
icon="el-icon-check"
@@ -376,6 +378,7 @@ export default {
name: '', // 采购计划
data() {
return {
addPurchaseOrder_disable: false,
dateRange: '',
checktime: '',
state: '',
@@ -693,6 +696,7 @@ export default {
this.form2.supplierNameValue = ''
this.form2.供应商名称 = ''
this.form2.计划完成日期 = ''
this.addPurchaseOrder_disable = false
this.dialogVisible2 = true
},
closedialog() {
@@ -706,6 +710,7 @@ export default {
submitAddPurchaseOrder() { // 新建采购单
this.$refs['form2'].validate((valid) => {
if (valid) {
this.addPurchaseOrder_disable = true
addPurchaseOrder(this.form2.采购单名称, this.form2.supplierNameValue, this.id, this.form2.计划完成日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建采购单成功')
@@ -727,11 +732,13 @@ export default {
this.form2.采购单名称 = row.采购单名称
this.form2.supplierNameValue = row.供应商
this.form2.计划完成日期 = row.计划完成日期
this.addPurchaseOrder_disable = false
this.dialogVisible2 = true
},
submitEditPurchaseOrder() {
this.$refs['form2'].validate((valid) => {
if (valid) {
this.addPurchaseOrder_disable = true
editPurchaseOrder(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.supplierNameValue, this.form2.计划完成日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改采购单成功')