a
This commit is contained in:
@@ -379,7 +379,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form10')">取消</el-button>
|
||||
<el-button type="primary" @click="submit10('form10')">确定</el-button>
|
||||
<el-button :disabled="openUrgentItem_disable" type="primary" @click="submit10('form10')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -394,6 +394,7 @@ import Cookie from 'js-cookie'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
openUrgentItem_disable: false,
|
||||
checked_hebing: true,
|
||||
checked_UrgentItem: false,
|
||||
UrgentItem: 0,
|
||||
@@ -619,6 +620,7 @@ export default {
|
||||
if (this.$refs['form10'] !== undefined) {
|
||||
this.$refs['form10'].resetFields()
|
||||
}
|
||||
this.openUrgentItem_disable = false
|
||||
this.dialogFormVisible10 = true
|
||||
},
|
||||
typeChange() {
|
||||
@@ -705,11 +707,13 @@ export default {
|
||||
submit10(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.openUrgentItem_disable = true
|
||||
addUrgentItem(this.form10.机床号, this.form10.组号, this.form10.零件图号, this.form10.零件名称, this.form10.规格, this.form10.零件数量, this.form10.零件备注, this.id, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.dialogFormVisible10 = false
|
||||
} else {
|
||||
this.openUrgentItem_disable = false
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='增加'" :disabled="handleAdd_disable" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -566,6 +566,7 @@ export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
handleAdd_disable: false,
|
||||
dateRange: '',
|
||||
partNumber: '',
|
||||
dateRange1: '',
|
||||
@@ -1037,19 +1038,24 @@ export default {
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.handleAdd_disable = false
|
||||
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加'])
|
||||
this.form.请购时间 = getNowShotTime()
|
||||
},
|
||||
submitAdd(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.handleAdd_disable = true
|
||||
addData(this.form.请购车间, this.name, this.id, this.form.请购时间, this.form.Remarks).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.tableData6 = []
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('增加失败') }
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
this.handleAdd_disable = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
|
||||
@@ -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) {
|
||||
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('补投数量不能为零')
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确 定</el-button>
|
||||
<el-button :disabled="ADD_disable" type="primary" @click="submit('form')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="450px">
|
||||
@@ -177,7 +177,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff2('form1')">取消</el-button>
|
||||
<el-button type="primary" @click="submitMachine('form1')">确 定</el-button>
|
||||
<el-button :disabled="addMachine_disable" type="primary" @click="submitMachine('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -193,6 +193,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ADD_disable: false,
|
||||
addMachine_disable: false,
|
||||
contractNumber_check: '',
|
||||
contractNumber: '', // 合同编号
|
||||
entryName: [],
|
||||
@@ -344,6 +346,7 @@ export default {
|
||||
},
|
||||
ADD() {
|
||||
this.addForm('form')
|
||||
this.ADD_disable = false
|
||||
this.dialogFormVisible1 = true
|
||||
this.form.contractSigningDate = getNowTime()// new Date()
|
||||
this.temp = 1
|
||||
@@ -364,6 +367,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTableData1() {
|
||||
this.ADD_disable = true
|
||||
addList(this.form.EntryName, this.form.remark, this.form.contractSigningDate).then(response => {
|
||||
this.dialogFormVisible1 = false
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -371,6 +375,7 @@ export default {
|
||||
this.title = ''
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.ADD_disable = false
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
@@ -424,12 +429,14 @@ export default {
|
||||
},
|
||||
addMachine(row) {
|
||||
this.projectNum = row.项目流水号
|
||||
this.addMachine_disable = false
|
||||
this.dialogFormVisible2 = true
|
||||
this.title1 = '新增机床'
|
||||
this.addForm('form1')
|
||||
this.form1.项目名称 = row.项目名称
|
||||
},
|
||||
submitMachine() {
|
||||
this.addMachine_disable = true
|
||||
function a() {
|
||||
selectMachine(this.projectNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
@@ -438,8 +445,10 @@ export default {
|
||||
}
|
||||
if (this.flag === 1) {
|
||||
this.addTable(submitMachine, [this.projectNum, this.form1.设备型号, this.form1.设备名称, this.form1.机床数量], 'form1', a)
|
||||
this.addMachine_disable = false
|
||||
} else {
|
||||
this.editTable(editMachine, [this.c, this.form1.设备型号, this.form1.设备名称, this.form1.机床数量], 'form1', a)
|
||||
this.addMachine_disable = false
|
||||
}
|
||||
},
|
||||
deleteMachine(row) {
|
||||
|
||||
Reference in New Issue
Block a user