交换件:交换功能
This commit is contained in:
@@ -76,17 +76,17 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="PageCurrent"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="10"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"/>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="block" style="margin-top: 10px;">
|
|
||||||
<el-pagination
|
|
||||||
:current-page="PageCurrent"
|
|
||||||
:page-sizes="[10, 20, 30, 40]"
|
|
||||||
:page-size="10"
|
|
||||||
:total="total"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"/>
|
|
||||||
</div>
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<div style="margin: 10px 15px">
|
<div style="margin: 10px 15px">
|
||||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange()" >交换</el-button>
|
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange('form')" >交换</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
@@ -167,24 +167,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!--新增交换件对话框-->
|
<!--新增交换件对话框-->
|
||||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
|
||||||
<el-form-item label="交换单编号" prop="ContractNumberValue" label-width="100px" size="small">
|
|
||||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交换数量" prop="TotalContractAmount" label-width="100px">
|
|
||||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
|
||||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="callOff('form')">取消</el-button>
|
|
||||||
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
|
||||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -245,17 +227,35 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="PageCurrent1"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="10"
|
||||||
|
:total="total1"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange1"
|
||||||
|
@current-change="handleCurrentChange1"/>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="block" style="margin-top: 10px;">
|
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||||
<el-pagination
|
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||||
:current-page="PageCurrent1"
|
<el-form-item label="交换单编号" prop="ExchangeNumber" label-width="100px" size="small">
|
||||||
:page-sizes="[10, 20, 30, 40]"
|
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
||||||
:page-size="10"
|
</el-form-item>
|
||||||
:total="total1"
|
<el-form-item label="交换数量" prop="ExchangeNumberx" label-width="100px">
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
||||||
@size-change="handleSizeChange1"
|
</el-form-item>
|
||||||
@current-change="handleCurrentChange1"/>
|
<el-form-item label="备注" prop="ExchangeNote" label-width="100px">
|
||||||
</div>
|
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="callOff('form')">取消</el-button>
|
||||||
|
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||||
|
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit(scope.$index, scope.row, 'form')">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -265,13 +265,15 @@ import { mapGetters } from 'vuex'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ProjectValue: ' ',
|
count1: 0,
|
||||||
|
count2: 0, // 清表单验证计数器
|
||||||
|
ProjectValue: '',
|
||||||
Project: [],
|
Project: [],
|
||||||
ProjectValue_check: 1,
|
ProjectValue_check: 1,
|
||||||
MachineValue: ' ',
|
MachineValue: '',
|
||||||
Machine: [],
|
Machine: [],
|
||||||
MachineValue_check: 1,
|
MachineValue_check: 1,
|
||||||
GroupNumValue: ' ',
|
GroupNumValue: '',
|
||||||
GroupNumValue_check: 1,
|
GroupNumValue_check: 1,
|
||||||
GroupNum: [],
|
GroupNum: [],
|
||||||
tableDataBasic: [],
|
tableDataBasic: [],
|
||||||
@@ -302,7 +304,7 @@ export default {
|
|||||||
rules: { // 表单验证规则
|
rules: { // 表单验证规则
|
||||||
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
|
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
|
||||||
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
|
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
|
||||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'change' }]
|
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
PageCurrent: 1,
|
PageCurrent: 1,
|
||||||
PageSize: 10,
|
PageSize: 10,
|
||||||
@@ -334,7 +336,6 @@ export default {
|
|||||||
// 获取人员编号
|
// 获取人员编号
|
||||||
getpeopleid() {
|
getpeopleid() {
|
||||||
this.picikingPeople = this.id
|
this.picikingPeople = this.id
|
||||||
console.log(this.picikingPeople)
|
|
||||||
},
|
},
|
||||||
searchMachine() { // 查询机床
|
searchMachine() { // 查询机床
|
||||||
if (this.ProjectValue === '') {
|
if (this.ProjectValue === '') {
|
||||||
@@ -362,19 +363,18 @@ export default {
|
|||||||
searchPartinfo() {
|
searchPartinfo() {
|
||||||
this.tableDataPurchase = []
|
this.tableDataPurchase = []
|
||||||
this.tableDataBasic = []
|
this.tableDataBasic = []
|
||||||
if (this.ProjectValue === ' ') {
|
if (this.ProjectValue === '') {
|
||||||
this.ProjectValue_check = 0
|
this.ProjectValue_check = 0
|
||||||
}
|
}
|
||||||
if (this.MachineValue === ' ') {
|
if (this.MachineValue === '') {
|
||||||
this.MachineValue_check = 0
|
this.MachineValue_check = 0
|
||||||
}
|
}
|
||||||
if (this.GroupNumValue === ' ') {
|
if (this.GroupNumValue === '') {
|
||||||
this.GroupNumValue_check = 0
|
this.GroupNumValue_check = 0
|
||||||
}
|
}
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||||
this.tableDataPurchase = response.data.rows
|
this.tableDataPurchase = response.data.rows
|
||||||
console.log(this.tableDataPurchase)
|
|
||||||
this.total = response.data.total
|
this.total = response.data.total
|
||||||
})
|
})
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
@@ -397,39 +397,66 @@ export default {
|
|||||||
this.listLoading1 = false
|
this.listLoading1 = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.PageCurrent1 = 1
|
||||||
|
this.PageSize1 = val
|
||||||
|
this.getExchangeTable()
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.PageCurrent1 = val
|
||||||
|
this.getExchangeTable()
|
||||||
|
},
|
||||||
// 选择领料单
|
// 选择领料单
|
||||||
chooseListinfor(row) {
|
chooseListinfor(row) {
|
||||||
this.pickingListNumberx = row.领料单流水号
|
this.pickingListNumberx = row.领料单流水号
|
||||||
console.log(this.pickingListNumberx)
|
|
||||||
this.searchListDetailt()
|
this.searchListDetailt()
|
||||||
},
|
},
|
||||||
// 增加交换件
|
// 增加交换件
|
||||||
addListDetailinfor() {
|
addListDetailinfor(form) {
|
||||||
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (response.data[0].result === '1') {
|
if (valid) {
|
||||||
this.$message.success('增加成功')
|
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
|
||||||
} else { this.$message.error('增加失败') }
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('增加成功')
|
||||||
|
} else { this.$message.error('增加失败') }
|
||||||
|
}).then(() => {
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
this.PageCurrent1 = 1
|
||||||
|
this.getExchangeTable()
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.dialogFormVisible = false
|
|
||||||
this.getExchangeTable()
|
|
||||||
},
|
},
|
||||||
// 打开交换表单
|
// 打开交换表单
|
||||||
exchange() {
|
exchange(form) {
|
||||||
this.title = '交换'
|
if (this.tableData1.length === 0) {
|
||||||
this.dialogFormVisible = true
|
this.$message.error('请选择交换件')
|
||||||
|
} else if (this.tableData2.length === 0) {
|
||||||
|
this.$message.error('请选择交换件')
|
||||||
|
} else {
|
||||||
|
this.count1 = this.count1 + 1
|
||||||
|
if (this.count1 !== 1) {
|
||||||
|
this.$refs[form].resetFields()
|
||||||
|
}
|
||||||
|
this.title = '交换'
|
||||||
|
this.form.ExchangeNumber = ''
|
||||||
|
this.form.ExchangeNumberx = ''
|
||||||
|
this.form.ExchangeNote = ''
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 重置表单
|
// 重置表单
|
||||||
callOff() {
|
callOff(formName) {
|
||||||
this.form.ExchangeNumber = ''
|
this.form.ExchangeNumber = ''
|
||||||
this.form.ExchangeNumberx = ''
|
this.form.ExchangeNumberx = ''
|
||||||
this.form.ExchangeNote = ''
|
this.form.ExchangeNote = ''
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
},
|
},
|
||||||
// 选中零件交换
|
// 选中零件交换
|
||||||
selecting(row) {
|
selecting(row) {
|
||||||
const arr = new Array(row)
|
const arr = new Array(row)
|
||||||
this.tableData1 = arr
|
this.tableData1 = arr
|
||||||
console.log(this.tableData1)
|
|
||||||
},
|
},
|
||||||
// 选中被零件交换
|
// 选中被零件交换
|
||||||
selected(row) {
|
selected(row) {
|
||||||
@@ -448,8 +475,9 @@ export default {
|
|||||||
dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => {
|
dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.getExchangeTable().then(response => {
|
this.dialogFormVisible = false
|
||||||
})
|
this.PageCurrent1 = 1
|
||||||
|
this.getExchangeTable()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('删除失败')
|
this.$message.error('删除失败')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user