diff --git a/src/views/wpm_bx/check_drawer.vue b/src/views/wpm_bx/check_drawer.vue
index 01f2c644..abf580f0 100644
--- a/src/views/wpm_bx/check_drawer.vue
+++ b/src/views/wpm_bx/check_drawer.vue
@@ -31,8 +31,13 @@
-
-
+
@@ -47,6 +52,7 @@ export default {
emits: ["closed"],
props: {
wm: { type: String, default: "" },
+ material: { type: String, default: "" },
},
data() {
return {
@@ -58,17 +64,32 @@ export default {
10: "抽检",
20: "全检",
},
+ qct_defects:[],
isSaveing: false,
};
},
- mounted() {},
+ mounted() {
+
+ },
methods: {
open() {
this.visible = true;
this.paramsObj.wm = this.wm;
this.apiObj = this.$API.qm.ftestwork.list;
+ this.getdefects();
return this;
},
+ //获取不合格项
+ getdefects(){
+ let that = this;
+ that.$API.qm.qct.list.req({ page: 0, qctmat__material: that.material }).then((res) => {
+ if(res.length>0){
+ that.$API.qm.qct.item.req(res[0].id).then((res) => {
+ that.qct_defects = res;
+ })
+ }
+ });
+ },
table_del(row){
this.$API.qm.ftestwork.delete.req(row.id).then((res) => {
this.$refs.drawer_table.fetch();
diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index f631311a..55d7e58d 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -180,14 +180,17 @@
- 交接数量
+ >交接数量
{
return that.selectItems.indexOf(item.id)>-1;
});
- data.forEach(item=>{
+ data.forEach((item,index)=>{
item.wm = item.id;
item.count = item.count_cando;
totalCount += item.count_cando;
+ item.handoverbw = [];
+ that.getWprList(item.id,index);
})
that.totalCount = totalCount;
that.form.handoverb = data;
},
+ getWprList(id,index){
+ console.log('id',id,'index',index);
+ let that = this;
+ let handoverbw = [];
+ that.$API.wpm.wpr.list.req({wm:id,page:0}).then((res) => {
+ res.forEach(wpritem=>{
+ let obj = {};
+ obj.wpr = wpritem.id;
+ obj.number = wpritem.number;
+ handoverbw.push(obj);
+ })
+ that.form.handoverb[index].handoverbw = handoverbw;
+ })
+ },
countChange(){
let that = this;
let totalCount = 0;
@@ -530,7 +549,7 @@ export default {
//提交
submit() {
let that = this;
- that.$refs.dialogForm.validate(async (valid) => {
+ that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
if (that.mode == "add") {
that.$API.wpm.handover.create.req(that.form).then((res) => {
@@ -571,7 +590,7 @@ export default {
},
//表单注入数据
setData(data) {
- this.totalCount = data.count;
+ this.totalCount = data.count?data.count:data.handoverb.count;
Object.assign(this.form, data);
if(data.type==30){
this.getUserList3();
diff --git a/src/views/wpm_bx/inm.vue b/src/views/wpm_bx/inm.vue
index a663f516..2b373054 100644
--- a/src/views/wpm_bx/inm.vue
+++ b/src/views/wpm_bx/inm.vue
@@ -154,6 +154,7 @@
ref="showDrawer"
v-if="visibleDrawer"
:wm="wm"
+ :material="wmMaterial"
@closed="visibleDrawer = false"
>
@@ -172,7 +173,7 @@
关联产品
-
+
@@ -273,6 +274,7 @@ export default {
wprParams:{
wm: ""
},
+ wmMaterial:'',
cate_type:'',
process:'',
materialType: "wm",
@@ -345,6 +347,7 @@ export default {
//获取当前批次车间物料的检验记录
tableCheckList(row){
this.wm = row.id;
+ this.wmMaterial = row.material;
this.visibleDrawer = true;
this.$nextTick(() => {
this.$refs.showDrawer.open();
@@ -376,9 +379,11 @@ export default {
},
showWpr(row){
let that = this;
- that.wprParams.wm='';
that.wprParams.wm = row.id;
that.wprVisibleDrawer = true;
+ this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
+ that.wprList = res.results;
+ })
},
//本地更新数据
handleSaveSuccess(data, mode) {
diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue
index 0cc6166d..4ee14e9d 100644
--- a/src/views/wpm_bx/mlog_detail.vue
+++ b/src/views/wpm_bx/mlog_detail.vue
@@ -340,7 +340,7 @@
:tracking="tracking"
:materialIn="materialIn"
@success="handleSaveSuccess"
- @closed="dialog.save = false"
+ @closed="saveMlogbInClose"
>
-1){
let arrs = code.split("#");
@@ -204,6 +204,8 @@ export default {
codeId = arrs[1];
that.scanKyes = keys;
if(keys=='wpr'){//个
+ console.log('wpr',codeId)
+ that.form.parent = '';
that.$API.wpm.wpr.item.req(codeId).then((res) => {
if(res){
let bwitem = {};
@@ -216,18 +218,14 @@ export default {
if (arr.length > 0) {//车间存在该批次
let batch = arr[0].batch;
that.wm_in = arr[0].batch;
- that.form.count_use =1;
- console.log('batch',batch);
+ that.mlogbInCount = arr[0].count;//该批次数量
//判断日志中是否存在该批次
let arr0= that.mlogbIns.filter((item)=>{
return item.batch == batch;
})
- console.log('arr0',arr0)
if (arr0.length > 0) {
that.hasMlogbIn = true;
bwitem.mlogb = arr0[0].id;
- that.form.parent = '';
- console.log('bwitem',bwitem)
}else{
that.form.batch = arr[0].batch;
that.form.wm_in = arr[0].id;
@@ -306,7 +304,8 @@ export default {
that.form.batch = '';
that.form.parent = '';
that.form.count_use = 0;
- if(that.scanKyes=='wpr'){
+ if(that.scanKyes=='wpr'&&that.mlogbInCount>1){
+ //当批次数量不为1时
that.bwItemForm.mlogb = res.id;
that.$API.wpm.mlogbw.create.req(that.bwItemForm).then((res) => {})
}