diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js
index 17dd4cfb..eb3a09a9 100644
--- a/src/api/model/wpm.js
+++ b/src/api/model/wpm.js
@@ -195,6 +195,14 @@ export default {
`${config.API_URL}/wpm/mlog/related_first/`,
data);
}
+ },
+ submit:{
+ name: "提交",
+ req: async function(id){
+ return await http.post(
+ `${config.API_URL}/wpm/mlog/${id}/submit/`,
+ );
+ }
}
},
handover:{
diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue
index 2fdb1758..5c5ecb9c 100644
--- a/src/views/wpm/mlog_dept10.vue
+++ b/src/views/wpm/mlog_dept10.vue
@@ -92,7 +92,7 @@
-
+
{{ item.material_out_.name }}
@@ -128,15 +128,17 @@
-
+
编辑
-
删除
+ 提交
+
日志记录
@@ -416,6 +418,12 @@ export default {
handleSaveSuccess(){
this.getMlogs();
},
+ mlog_submit(row){
+ this.$API.wpm.mlog.submit.req(row.id).then(res => {
+ this.$message.success('操作成功')
+ this.$refs.table_mlog.refresh()
+ }).catch(err => {})
+ },
}
}
\ No newline at end of file
diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue
index 09ea7b46..e2ef0665 100644
--- a/src/views/wpm/mlog_dept6.vue
+++ b/src/views/wpm/mlog_dept6.vue
@@ -1,15 +1,17 @@
-
+
-
+
+
+
查询
-
+
@@ -46,12 +48,9 @@
-
-
-
-
-
-
+
+
+
@@ -73,45 +72,102 @@
+
+
+ 提交
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 交接记录
+
+
+
+
+
+
+
+
+ {{
+ scope.row.material_.name
+ }}
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+ 确认
+
+
+
+
+
+
-
+
-
-
- 车间库存
-
-
- 领料
- 入库
-
-
-
-
-
-
- {{scope.row.material_.name}}
-
-
-
-
- {{scope.row.material_.specification}}
-
-
-
-
- {{scope.row.material_.model}}
-
-
-
-
-
-
-
+
+
+ 车间库存
+
+
+ 领料
+ 入库
+
+
+
+
+
+
+ {{scope.row.material_.name}}
+
+
+
+
+ {{scope.row.material_.specification}}
+
+
+
+
+ {{scope.row.material_.model}}
+
+
+
+
+
+
+
@@ -144,6 +200,10 @@ export default {
paramsMlog:{
mtask:''
},
+ apiObjHandover:this.$API.wpm.handover.list,
+ paramsHandover:{
+ recive_dept__name:'6车间'
+ },
paramsWm: {
belong_dept__name: '6车间'
},
@@ -189,6 +249,18 @@ export default {
resetQuery() {
this.query = {};
},
+ table_submit(row) {
+ this.$API.pm.mtask.submit.req(row.id).then(res => {
+ this.$message.success('操作成功')
+ this.rowClick(row);
+ }).catch(err => { })
+ },
+ handover_submit(row){
+ this.$API.wpm.handover.submit.req(row.id).then(res => {
+ this.$message.success('操作成功')
+ this.$refs.table_handover.refresh();
+ }).catch(err => { })
+ },
}
}
diff --git a/src/views/wpm/mlog_dept6_detail.vue b/src/views/wpm/mlog_dept6_detail.vue
index 93a0ebcf..8527237b 100644
--- a/src/views/wpm/mlog_dept6_detail.vue
+++ b/src/views/wpm/mlog_dept6_detail.vue
@@ -63,6 +63,9 @@
删除
+ 提交
+
日志记录
@@ -191,6 +194,12 @@ export default {
resetQuery() {
this.query = {};
},
+ mlog_submit(row){
+ this.$API.wpm.mlog.submit.req(row.id).then(res => {
+ this.$message.success('操作成功')
+ this.$refs.mtaskMlogs.refresh()
+ }).catch(err => {})
+ },
}
}
diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue
index b8b2b7ee..ab9c2ac8 100644
--- a/src/views/wpm/mlog_dept7.vue
+++ b/src/views/wpm/mlog_dept7.vue
@@ -91,7 +91,7 @@
-
+
{{
scope.row.material_out_.name
@@ -134,15 +134,17 @@
-
+
编辑
-
删除
+ 提交
+
日志记录
@@ -306,8 +308,6 @@ export default {
//添加
addMlog() {
let that = this;
- console.log(that.currentMtask);
- debugger;
if (that.currentMtask && that.currentMtask.id) {
that.mgroup = that.currentMtask.mgroup;
that.material_out = that.currentMtask.material_out;
@@ -399,6 +399,12 @@ export default {
this.$refs.showDrawer.open();
});
},
+ mlog_submit(row){
+ this.$API.wpm.mlog.submit.req(row.id).then(res => {
+ this.$message.success('操作成功')
+ this.$refs.table_mlog.refresh()
+ }).catch(err => {})
+ },
}
}
\ No newline at end of file
diff --git a/src/views/wpm/mlog_drawer.vue b/src/views/wpm/mlog_drawer.vue
index 43ebfad3..6e9ca108 100644
--- a/src/views/wpm/mlog_drawer.vue
+++ b/src/views/wpm/mlog_drawer.vue
@@ -13,6 +13,7 @@
新建
更改
+ 提交
diff --git a/src/views/wpm/mlog_tui.vue b/src/views/wpm/mlog_tui.vue
index 18f9488f..4d7bb3cd 100644
--- a/src/views/wpm/mlog_tui.vue
+++ b/src/views/wpm/mlog_tui.vue
@@ -53,9 +53,10 @@
+
+ 新增
@@ -83,7 +84,7 @@
否
-
+
@@ -138,20 +139,42 @@
-
+ style="width: 100%" :disabled="handoverType=='edit'"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @change="getUserList2" :disabled="handoverType=='edit'">
@@ -159,25 +182,11 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -201,6 +210,11 @@ export default {
data() {
return {
activeName:'退火',
+ handoverType:'add',
+ titleOptions:{
+ 'add':'新增',
+ 'edit':'编辑',
+ },
currentMgroup: {},
apiObj: null,
params: {},
@@ -218,7 +232,8 @@ export default {
},
mounted() {
this.initMgroup()
- this.getDepts()
+ this.getDepts();
+ this.getWmaterial();
},
methods: {
add() {
@@ -256,12 +271,12 @@ export default {
this.$refs.table.refresh();
},
getDepts() {
- this.$API.system.dept.list.req({ page: 0, name__in: '7车间,10车间' }).then(res => {
+ this.$API.system.dept.list.req({ page: 0, name__in: '6车间,7车间,10车间' }).then(res => {
this.deptOptions = res
})
},
- getUserList2(val) {
- this.$API.system.user.list.req({ belong_dept: val, page: 0 }).then(res => {
+ getUserList2() {
+ this.$API.system.user.list.req({ belong_dept: this.handoverForm.recive_dept, page: 0 }).then(res => {
this.userList2 = res
})
},
@@ -288,20 +303,31 @@ export default {
},
//从生产日志生成交接记录
addHandover(row) {
+ console.log('currentMgroup',this.currentMgroup.id)
+ this.handoverForm.wm = '';
this.handoverForm.send_date = "";
- this.handoverForm.mlog = row.id;
- this.handoverForm.batch = row.batch;
- this.handoverForm.count = row.count_real;
- this.handoverForm.material = row.material_out;
- this.handoverForm.count_eweight = row.count_real_eweight;
- this.handoverForm.send_dept = row.belong_dept;
- this.handoverForm.recive_dept = "";
this.handoverForm.send_user = "";
- this.handoverForm.recive_user = "";
+ this.handoverForm.count = 1;
+
+ this.handoverForm.recive_user = '';//接收人
+ this.handoverForm.recive_dept = '';//接收车间
+ this.handoverForm.send_mgroup = this.currentMgroup.id;
+ this.handoverType='add';
this.handoverVisible = true;
},
+ getWmaterial(){
+ let obj = {};
+ obj.belong_dept__name = "8车间";
+ obj.page = 0;
+ obj.count__gte = 1;
+ this.$API.wpm.wmaterial.list.req(obj).then(res=>{
+ debugger;
+ console.log(res);
+ this.wmaterialList = res;
+ })
+ },
submitHandover() {
- this.$API.wpm.handover.create.req(this.handoverForm).then((res) => {
+ this.$API.wpm.handover.genByWm.req(this.handoverForm).then((res) => {
this.$message.success("创建成功");
this.handoverVisible = false;
this.$refs.table2.refresh();
@@ -309,7 +335,8 @@ export default {
},
handover_edit(row) {
Object.assign(this.handoverForm, row);
- this.getUserList2(row.recive_dept)
+ this.getUserList2(row.recive_dept);
+ this.handoverType='edit';
this.handoverVisible = true;
},
handover_delete(row) {
diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue
index 47925252..c46e0a19 100644
--- a/src/views/wpm/worktask_form.vue
+++ b/src/views/wpm/worktask_form.vue
@@ -1090,7 +1090,13 @@ export default {
},
methods: {
getRouteOptions() {
- this.$API.mtm.route.list.req({ page: 0, mgroup: this.form.mgroup}).then(res => {
+ let mgroup__name = '';
+ if(this.activeType=='8车间'){
+ mgroup__name = '混料';
+ }else if(this.activeType=='退火'){
+ mgroup__name = '管料退火';
+ }else{return}
+ this.$API.mtm.route.list.req({ page: 0, mgroup__name:mgroup__name}).then(res => {
for (var i = 0; i < res.length; i++) {
if (res[i].material_in == null) {
res[i].material_in_name = ''