From 0be0836675a10df67376c09c98bacb4744b131a3 Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Thu, 2 Apr 2020 14:45:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E8=B4=AD=E5=A4=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Inventory/OfflinePartOut/index.vue | 78 ++++++++++--------- .../OfflineProcurement/index.vue | 15 ++-- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/src/views/Inventory/OfflinePartOut/index.vue b/src/views/Inventory/OfflinePartOut/index.vue index ba51dbda..9c78b41f 100644 --- a/src/views/Inventory/OfflinePartOut/index.vue +++ b/src/views/Inventory/OfflinePartOut/index.vue @@ -199,7 +199,7 @@ @@ -218,6 +218,7 @@ export default { } } return { + buttonDisable: false, Project: [], Machine: [], GroupNum: [], @@ -405,6 +406,7 @@ export default { this.DirectNotes = [] this.selectLeaders() this.selectDepartment() + this.buttonDisable = false this.dialogFormVisible = true }, // 重置表单 @@ -425,46 +427,48 @@ export default { }, // 离线外购件出库 addDirectPartm() { - if (Number(this.partnumber) < Number(this.form.DirectNumber)) { - this.$message.error('库存不够,重输领料数量') - } else { - this.$refs['form'].validate((valid) => { - if (valid) { - if (Number(this.form.DirectNoteCode) === Number(this.form.DirectNote)) { - for (let i = 0; i < this.departments.length; i++) { - if (this.form.department === this.departments[i].value) { - this.department111 = this.departments[i].label + if (!this.buttonDisable) { + if (Number(this.partnumber) < Number(this.form.DirectNumber)) { + this.$message.error('库存不够,重输领料数量') + } else { + this.$refs['form'].validate((valid) => { + if (valid) { + if (Number(this.form.DirectNoteCode) === Number(this.form.DirectNote)) { + this.buttonDisable = true + for (let i = 0; i < this.departments.length; i++) { + if (this.form.department === this.departments[i].value) { + this.department111 = this.departments[i].label + } } + for (let i = 0; i < this.DirectNotes.length; i++) { + if (this.form.DirectNote === this.DirectNotes[i].value) { + this.DirectNote111 = this.DirectNotes[i].label + } + } + outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.DirectNote111, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号, this.组件零件基本件流水号, this.department111).then(response => { + if (response.data[0].result === '1') { + this.$message.success('零件出库成功') + this.dialogFormVisible = false + this.searchTable1() + // 物料流水号查 + outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => { + this.tableDataOut = response.data.rows + this.total2 = response.data.total + this.listLoading1 = false + }) + } else { + this.$message.error('零件出库失败') + } + }) + } else { + this.$message.error('人员编号错误') } - for (let i = 0; i < this.DirectNotes.length; i++) { - if (this.form.DirectNote === this.DirectNotes[i].value) { - this.DirectNote111 = this.DirectNotes[i].label - } - } - console.log(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.DirectNote111, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号, this.组件零件基本件流水号, this.department111, 121221) - outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.DirectNote111, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号, this.组件零件基本件流水号, this.department111).then(response => { - if (response.data[0].result === '1') { - this.$message.success('零件出库成功') - this.dialogFormVisible = false - this.searchTable1() - // 物料流水号查 - outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => { - this.tableDataOut = response.data.rows - this.total2 = response.data.total - this.listLoading1 = false - }) - } else { - this.$message.error('零件出库失败') - } - }) } else { - this.$message.error('人员编号错误') + console.log('error submit!!') + return false } - } else { - console.log('error submit!!') - return false - } - }) + }) + } } } } diff --git a/src/views/WorkshopProcurement/OfflineProcurement/index.vue b/src/views/WorkshopProcurement/OfflineProcurement/index.vue index 50949a24..d1ed18aa 100644 --- a/src/views/WorkshopProcurement/OfflineProcurement/index.vue +++ b/src/views/WorkshopProcurement/OfflineProcurement/index.vue @@ -59,9 +59,15 @@ -
+
+ 计划单 + + + + 选入备料 + - + 查询 - 计划单 - - - - 选入备料