a
This commit is contained in:
@@ -231,7 +231,7 @@
|
||||
<el-input-number v-model="inputC" :step="1" :min="0" :max="spareNumber-SupplementationNumber" style="width: 100px" size="small" />
|
||||
<span>开始工序</span>
|
||||
<el-input v-model="inputD" :disabled="true" auto-complete="off" style="width: 100px" size="small"/>
|
||||
<el-button :disabled="spareNumber-SupplementationNumber===0" type="primary" size="small" plain @click="editB">补投重新生产零件</el-button>
|
||||
<el-button :disabled="spareNumber-SupplementationNumber<=0" type="primary" size="small" plain @click="editB">补投重新生产零件</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-show="false">
|
||||
@@ -291,7 +291,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form2')">确定</el-button>
|
||||
<el-button :disabled="handleEdit_disable" type="primary" @click="submit('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="margin-left: 140px;margin-top: 10px">
|
||||
<el-button type="primary" @click="submitRemark()">确定</el-button>
|
||||
<el-button :disabled="handleEdit_disable" type="primary" @click="submitRemark()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -323,6 +323,8 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
handleEdit_disable: false,
|
||||
editB_disable: false,
|
||||
index: 0,
|
||||
remark1: '',
|
||||
remark2: '',
|
||||
@@ -483,12 +485,12 @@ export default {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
console.log(index)
|
||||
this.index = index
|
||||
this.remark1 = ''
|
||||
this.remark2 = ''
|
||||
this.PCNumber = parseInt(row.批次数量)
|
||||
this.title = row.零件名称
|
||||
this.handleEdit_disable = false
|
||||
this.dialogeditVisible = true
|
||||
this.form.input1 = row.零件图号
|
||||
this.code = row.工艺计划流水号
|
||||
@@ -498,6 +500,7 @@ export default {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form2.报废数量 > 0) {
|
||||
this.handleEdit_disable = true
|
||||
editSpare(this.code, this.form2.报废数量, this.form2.报废原因, this.form2.报废时间, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('报废成功')
|
||||
@@ -509,6 +512,7 @@ export default {
|
||||
}
|
||||
// this.fetchTableData()
|
||||
} else {
|
||||
this.handleEdit_disable = false
|
||||
this.$message.success('报废失败')
|
||||
}
|
||||
})
|
||||
@@ -538,15 +542,20 @@ export default {
|
||||
editB() {
|
||||
if (this.spareNumber - this.SupplementationNumber > 0) {
|
||||
if (this.inputC > 0) {
|
||||
editA(this.CutCodeBefore, this.inputC).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('补投成功')
|
||||
this.fetchTableData()
|
||||
this.inputC = 0
|
||||
} else {
|
||||
this.$message.error('补投失败')
|
||||
}
|
||||
})
|
||||
if (!this.editB_disable) {
|
||||
this.editB_disable = true
|
||||
editA(this.CutCodeBefore, this.inputC).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('补投成功')
|
||||
this.fetchTableData()
|
||||
this.inputC = 0
|
||||
this.editB_disable = false
|
||||
} else {
|
||||
this.editB_disable = false
|
||||
this.$message.error('补投失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('补投数量不能为零')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user