Browse Source

材料下料 功能完成

master
Rui_Li 4 years ago
parent
commit
0c56b5e1e9
  1. 4
      src/api/yieldReport/com_cutting_material.js
  2. 37
      src/views/modules/yieldReport/com_cutting_material.vue

4
src/api/yieldReport/com_cutting_material.js

@ -0,0 +1,4 @@
import { createAPI } from '@/utils/httpRequest.js'
// 材料下机操作
export const processCuttingMaterialRoll = data => createAPI('schedule/processCuttingMaterialRoll', 'POST', data)

37
src/views/modules/yieldReport/com_cutting_material.vue

@ -35,7 +35,7 @@
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="processCuttingMaterial">确定</el-button>
<el-button type="primary" @click="processCuttingMaterialBun">确定</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
@ -44,9 +44,8 @@
<script>
import {
getBomItemNosByPartNo,
feedingMaterialRoll,
} from "@/api/yieldReport/com_produce_material.js";
processCuttingMaterialRoll,
} from "@/api/yieldReport/com_cutting_material.js";
export default {
data() {
return {
@ -139,7 +138,7 @@ export default {
/*检查材料卷号的数据*/
checkValidQty() {
//100
//
let transQty = this.pageData.transQty;
//
if (transQty > this.pageData.oriTransQty){
@ -149,24 +148,34 @@ export default {
//
if(transQty <= 0){
this.$message.error('请输入有效的数量!');
return false;
}
},
/*处理材料下料的记录*/
processCuttingMaterial(){
//
processCuttingMaterialBun(){
//
let transQty = this.pageData.transQty;
//
if (transQty > this.pageData.oriTransQty){
this.$message.error('退料数量超过了该记录上的发料数量!');
return false;
}
//
if(transQty <= 0){
this.$message.error('请输入有效的数量!');
return false;
}
//
feedingMaterialRoll(this.pageData).then(({data}) => {
processCuttingMaterialRoll(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.msg);
//
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1;
this.bomList = [];
this.timeArray = [];
//
this.$emit('refreshPageData');
//
this.closeDialog();
}
});

Loading…
Cancel
Save