lx
This commit is contained in:
@@ -71,11 +71,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" min-width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.changeSafeValue">
|
||||
<el-input v-model="scope.row.可出库数量" style="width: 70px;" class="edit-input" size="mini"/>
|
||||
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.可出库数量 }}</span>
|
||||
{{ scope.row.可出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
@@ -85,13 +81,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="设置" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
|
||||
@click="AlterNumber(scope.row)">设置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -327,20 +321,20 @@
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<!--编辑零件数量对话框-->
|
||||
<!--<el-dialog :visible.sync="dialogFormVisible2" title="领料单明细" center width="380px">-->
|
||||
<!--<el-form ref="form4" :model="form4" :rules="rules4" label-position="left" class="demo-ruleForm">-->
|
||||
<!--<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">-->
|
||||
<!--<el-input v-model="form4.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="出库备注" prop="outNote" label-width="100px">-->
|
||||
<!--<el-input v-model="form4.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<!--<div slot="footer" class="dialog-footer">-->
|
||||
<!--<el-button @click="callOff('form4')">取消</el-button>-->
|
||||
<!--<el-button type="primary" @click="submitChannge()">确 定</el-button>-->
|
||||
<!--</div>-->
|
||||
<!--</el-dialog>-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="盘点修改" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="零件数量" prop="Number" label-width="100px" size="small">
|
||||
<el-input v-model="form2.Number" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改原因" prop="AlterReason" label-width="100px">
|
||||
<el-input v-model="form2.AlterReason" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff2('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="submitChannge()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-tab-pane label="采购" name="second">
|
||||
<el-card v-show="purchaseshow">
|
||||
<el-radio-group
|
||||
@@ -997,7 +991,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart } from '@/api/Inventory/InventoryCheck'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart, CheckAlter } from '@/api/Inventory/InventoryCheck'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -1080,9 +1075,31 @@ export default {
|
||||
HouseDataBasicIn: [],
|
||||
HouseDataPurchase: [],
|
||||
HouseDataPurchaseOut: [],
|
||||
HouseDataPurchaseIn: []
|
||||
HouseDataPurchaseIn: [],
|
||||
rules2: { // 表单验证规则
|
||||
Number: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }],
|
||||
AlterReason: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }]
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
form2: {
|
||||
AlterReason: '',
|
||||
Number: ''
|
||||
},
|
||||
project: '',
|
||||
machinenumber: '',
|
||||
partnumber: '',
|
||||
oldnumber: '',
|
||||
locate: '',
|
||||
contractdetail: '',
|
||||
craftnumber: '',
|
||||
receive: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
@@ -1475,23 +1492,6 @@ export default {
|
||||
this.total6 = response.data.total
|
||||
})
|
||||
},
|
||||
cancelEdit(row) { // 取消设置
|
||||
row.安全库存量 = row.原安全库存量
|
||||
row.changeSafeValue = false
|
||||
this.$message('取消修改')
|
||||
},
|
||||
confirmEdit(row) { // 确认设置
|
||||
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
|
||||
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.changeSafeValue = false
|
||||
this.$message.success('设置成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('设置失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询外购件记录
|
||||
HousePurchaseRecord(row) {
|
||||
this.ContractDetailValue = row.采购合同明细流水号
|
||||
@@ -1504,6 +1504,35 @@ export default {
|
||||
this.HouseDataPurchaseOut = response.data
|
||||
this.listLoading8 = false
|
||||
})
|
||||
},
|
||||
AlterNumber(row) {
|
||||
this.project = row.项目流水号
|
||||
this.machinenumber = row.机床流水号
|
||||
this.partnumber = row.组件流水号
|
||||
this.oldnumber = row.可出库数量
|
||||
this.locate = row.货位流水号
|
||||
this.contractdetail = row.采购合同明细流水号
|
||||
this.craftnumber = row.工艺计划流水号
|
||||
this.receive = row.收件信息ID
|
||||
this.materiallocate = row.物料与货位对照流水号
|
||||
this.materialType = row.零件类型代码
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submitChannge() {
|
||||
console.log(this.receive, this.project, this.machinenumber, this.partnumber, this.oldnumber, this.form2.AlterReason, this.form2.Number, this.id, this.locate, this.contractdetail, this.craftnumber, this.materialType, this.materiallocate)
|
||||
CheckAlter(this.receive, this.project, this.machinenumber, this.partnumber, this.oldnumber, this.form2.AlterReason, this.form2.Number, this.id, this.locate, this.contractdetail, this.craftnumber, this.materialType, this.materiallocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchBasciPartinfo()
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
callOff2() {
|
||||
this.dialogFormVisible = false
|
||||
this.form2 = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user