diff --git a/src/views/wpm/check_drawer.vue b/src/views/wpm/check_drawer.vue
new file mode 100644
index 00000000..f37b0896
--- /dev/null
+++ b/src/views/wpm/check_drawer.vue
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+ {{props.row.count_notok_json.count_n_hs}}
+
+
+ {{props.row.count_notok_json.count_n_hs}}
+
+
+ {{props.row.count_notok_json.count_n_zz}}
+
+
+ {{props.row.count_notok_json.count_n_tw}}
+
+
+ {{props.row.count_notok_json.count_n_zdd}}
+
+
+ {{props.row.count_notok_json.count_n_d}}
+
+
+ {{props.row.count_notok_json.count_n_zw}}
+
+
+ {{props.row.count_notok_json.count_n_dl}}
+
+
+ {{props.row.count_notok_json.count_n_qp}}
+
+
+ {{props.row.count_notok_json.count_n_bl}}
+
+
+ {{props.row.count_notok_json.count_n_hw}}
+
+
+ {{props.row.count_notok_json.count_n_yp}}
+
+
+ {{props.row.count_notok_json.count_n_bp}}
+
+
+ {{props.row.count_notok_json.count_n_sc}}
+
+
+ {{props.row.count_notok_json.count_n_zjd}}
+
+
+ {{props.row.count_notok_json.count_n_zjx}}
+
+
+ {{props.row.count_notok_json.count_n_qx}}
+
+
+ {{props.row.count_notok_json.count_n_js}}
+
+
+ {{props.row.count_notok_json.count_n_tydd}}
+
+
+ {{props.row.count_notok_json.count_n_sw}}
+
+
+ {{props.row.count_notok_json.count_n_bhpcd}}
+
+
+ {{props.row.count_notok_json.count_n_wq}}
+
+
+
+
+
+
+
+
+ {{props.row.count_notok_json.count_n_zw}}
+
+
+ {{props.row.count_notok_json.count_n_zt}}
+
+
+ {{props.row.count_notok_json.count_n_tw}}
+
+
+ {{props.row.count_notok_json.count_n_qp}}
+
+
+
+ {{props.row.count_notok_json.count_n_b}}
+
+
+ {{props.row.count_notok_json.count_n_qt}}
+
+
+
+
+
+
+
+
+ {{props.row.count_notok_json.count_n_wq}}
+
+
+ {{props.row.count_notok_json.count_n_tw}}
+
+
+ {{props.row.count_notok_json.count_n_dl}}
+
+
+ {{props.row.count_notok_json.count_n_pb}}
+
+
+ {{props.row.count_notok_json.count_n_dxt}}
+
+
+ {{props.row.count_notok_json.count_n_js}}
+
+
+ {{props.row.count_notok_json.count_n_qx}}
+
+
+ {{props.row.count_notok_json.count_n_qt}}
+
+
+
+
+
+
+
+ {{ type2_[scope.row.type2] }}
+
+
+ {{ type2_[scope.row.type2] }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.count_sampling }}
+ {{ scope.row.count }}
+
+
+
+
+ {{ scope.row.count_sampling_ok }}
+ {{ scope.row.count_ok }}
+
+
+
+
+
+
+ {{ scope.row.count_sampling_ok/scope.row.count_sampling*100 }}%
+ {{ scope.row.count_ok/scope.row.count*100 }}%
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm/middle_test.vue b/src/views/wpm/middle_test.vue
index 5182252b..25bbdb4a 100644
--- a/src/views/wpm/middle_test.vue
+++ b/src/views/wpm/middle_test.vue
@@ -15,24 +15,68 @@
label-width="100px"
>
+
+
+
+
+
+
+
-
-
-
+
+
+ style="width: 100%"
+ :precision="0"
+ @change="handleCountNotokChange"
+ >
-
+
+
+
+
+
+
+
+
+
+
+
@@ -83,116 +128,582 @@
-
-
+ 不合格原因及数量:
+
+
-
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+ >
+
+
+ >
+
-
+
+ >
+
-
+
+
+
+
+
+
+
+
+
+ >
+
-
+
+ >
+
-
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+
-
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -213,6 +724,7 @@ export default {
emits: ["success", "closed"],
data() {
return {
+ deptName: "",
mode:'',
loading: false,
form: {
@@ -226,22 +738,46 @@ export default {
},
count_rate:100,
count_notok_json:{
- count_n_w: 0,
- count_n_qp: 0,
+ count_n_hs: 0,
+ count_n_cs:0,
+ count_n_zz: 0,
+ count_n_tw: 0,
+ count_n_zdd: 0,
count_n_d: 0,
- count_n_b: 0,
- count_n_swen: 0,
- count_n_l: 0,
- count_n_h: 0,
- count_n_q:0,
- count_n_zz:0,
- count_n_jz: 0
+ count_n_zw: 0,
+ count_n_dl: 0,
+ count_n_qp:0,
+ count_n_bl:0,
+ count_n_hw: 0,
+ count_n_yp: 0,
+ count_n_bp: 0,
+ count_n_sc: 0,
+ count_n_zjd: 0,
+ count_n_zjx: 0,
+ count_n_qx: 0,
+ count_n_js: 0,
+ count_n_tydd: 0,
+ count_n_sw: 0,
+ count_n_bhpcd: 0,
+ count_n_wq: 0,
+ //7
+ count_n_zt:0,
+ count_n_b:0,
+ count_n_qt:0,
+ //10
+ count_n_pb:0,
+ count_n_dxt:0,
},
rules: {
test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}],
batch: [{required: true,message: "请选择物料批次",trigger: "blur"}],
test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}],
},
+ typeOption:[
+ {name:'全检',value:20},
+ {name:'抽检',value:10},
+ ],
+ originData:{},
userList : [],
selectionFilters: [],
batchCount:null,
@@ -256,17 +792,29 @@ export default {
},
methods: {
//显示
- open() {
+ open(deptName) {
+ this.deptName = deptName;
this.visible = true;
return this;
},
//表单注入数据
- setData(data) {
- this.form.wm = data.id;
- this.form.count_notok = 0;
- this.count_rate = 100;
- this.wm_batch = data.batch;
- this.form.count = this.form.count_ok = data.count;
+ setData(data,) {
+ let that = this;
+ Object.assign(that.originData, data);
+ that.form.wm = data.id;
+ that.count_rate = 100;
+ that.wm_batch = data.batch;
+ that.form.count_notok = 0;
+ that.form.count = that.form.count_ok = data.count;
+ },
+ handleTypeChange(){
+ if(this.form.type2==10){//抽检
+ this.form.count_sampling = this.originData.count;
+ this.form.count_sampling_ok = this.originData.count;
+ }else if(this.form.type2==20){
+ this.form.count = this.originData.count;
+ this.form.count_ok = this.originData.count;
+ }
},
getUsers(){
let that = this;
@@ -276,21 +824,43 @@ export default {
},
handleCountChange(){
this.form.count_notok =
- this.count_notok_json.count_n_w+
- this.count_notok_json.count_n_qp+
- this.count_notok_json.count_n_d+
- this.count_notok_json.count_n_b+
- this.count_notok_json.count_n_swen+
- this.count_notok_json.count_n_l+
- this.count_notok_json.count_n_h+
- this.count_notok_json.count_n_q+
+ this.count_notok_json.count_n_hs+
+ this.count_notok_json.count_n_cs+
this.count_notok_json.count_n_zz+
- this.count_notok_json.count_n_jz;
+ this.count_notok_json.count_n_tw+
+ this.count_notok_json.count_n_zdd+
+ this.count_notok_json.count_n_d+
+ this.count_notok_json.count_n_zw+
+ this.count_notok_json.count_n_dl+
+ this.count_notok_json.count_n_qp+
+ this.count_notok_json.count_n_bl+
+ this.count_notok_json.count_n_hw+
+ this.count_notok_json.count_n_yp+
+ this.count_notok_json.count_n_bp+
+ this.count_notok_json.count_n_sc+
+ this.count_notok_json.count_n_zjd+
+ this.count_notok_json.count_n_zjx+
+ this.count_notok_json.count_n_qx+
+ this.count_notok_json.count_n_js+
+ this.count_notok_json.count_n_tydd+
+ this.count_notok_json.count_n_sw+
+ this.count_notok_json.count_n_bhpcd+
+ this.count_notok_json.count_n_wq
+ this.count_notok_json.count_n_zt
+ this.count_notok_json.count_n_b
+ this.count_notok_json.count_n_qt
+ this.count_notok_json.count_n_pb
+ this.count_notok_json.count_n_dxt;
this.handleCountNotokChange();
},
handleCountNotokChange(){
- this.form.count_ok = this.form.count - this.form.count_notok;
- this.count_rate = ((this.form.count_ok/this.form.count)*100).toFixed(2);
+ if(this.form.type2==10){//抽检
+ this.form.count_sampling_ok = this.form.count_sampling - this.form.count_notok;
+ this.count_rate = ((this.form.count_sampling_ok/this.form.count_sampling)*100).toFixed(2);
+ }else if(this.form.type2==20){//全检
+ this.form.count_ok = this.form.count - this.form.count_notok;
+ this.count_rate = ((this.form.count_ok/this.form.count)*100).toFixed(2);
+ }
},
//提交
submit() {
@@ -299,32 +869,53 @@ export default {
if (valid) {
that.isSaveing = true;
let count_notok =
- that.count_notok_json.count_n_w+
- that.count_notok_json.count_n_qp+
- that.count_notok_json.count_n_d+
- that.count_notok_json.count_n_b+
- that.count_notok_json.count_n_swen+
- that.count_notok_json.count_n_l+
- that.count_notok_json.count_n_h+
- that.count_notok_json.count_n_q+
- that.count_notok_json.count_n_zz+
- that.count_notok_json.count_n_jz;
+ that.count_notok_json.count_n_hs+
+ that.count_notok_json.count_n_cs+
+ that.count_notok_json.count_n_zz+
+ that.count_notok_json.count_n_tw+
+ that.count_notok_json.count_n_zdd+
+ that.count_notok_json.count_n_d+
+ that.count_notok_json.count_n_zw+
+ that.count_notok_json.count_n_dl+
+ that.count_notok_json.count_n_qp+
+ that.count_notok_json.count_n_bl+
+ that.count_notok_json.count_n_hw+
+ that.count_notok_json.count_n_yp+
+ that.count_notok_json.count_n_bp+
+ that.count_notok_json.count_n_sc+
+ that.count_notok_json.count_n_zjd+
+ that.count_notok_json.count_n_zjx+
+ that.count_notok_json.count_n_qx+
+ that.count_notok_json.count_n_js+
+ that.count_notok_json.count_n_tydd+
+ that.count_notok_json.count_n_sw+
+ that.count_notok_json.count_n_bhpcd+
+ that.count_notok_json.count_n_wq+
+ that.count_notok_json.count_n_zt
+ that.count_notok_json.count_n_b
+ that.count_notok_json.count_n_qt
+ that.count_notok_json.count_n_pb
+ that.count_notok_json.count_n_dxt;
if(count_notok>that.form.count_notok){
that.$notify.error("不合格数量有问题");
that.isSaveing = false;
}else{
- that.form.count_ok = that.form.count - that.form.count_notok;
+ if(that.form.type2==10){//抽检
+ that.form.count_sampling_ok = that.form.count_sampling - that.form.count_notok;
+ }else{//全检
+ that.form.count_ok = that.form.count - that.form.count_notok;
+ }
that.form.count_notok_json = that.count_notok_json;
console.log('that.form',that.form)
that.$API.qm.ftestwork.create.req(that.form).then((res) => {
that.$API.qm.ftestwork.submit.req(res.id).then((res) => {
- that.isSaveing = false;
- that.visible = false;
- that.$emit("success");
- that.$message.success("操作成功");
- })
- }).catch( err=>{
that.isSaveing = false;
+ that.visible = false;
+ that.$emit("success");
+ that.$message.success("操作成功");
+ })
+ }).catch( err=>{
+ that.isSaveing = false;
})
}
}
diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue
index 3b66e668..83a0b1e5 100644
--- a/src/views/wpm/mlog_dept10.vue
+++ b/src/views/wpm/mlog_dept10.vue
@@ -568,7 +568,6 @@
row-key="id"
:params="paramsWm"
stripe
- hidePagination
>
{{
@@ -601,6 +600,12 @@
width="80"
>
+
+
+ 检验
+ 记录
+
+
@@ -666,6 +671,19 @@
@choseChange="choseChange"
>
+
+
+
+
@@ -674,12 +692,16 @@ import handoverDialog from "./handover_form.vue";
import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue";
+import checkDrawer from "./check_drawer.vue";
+import middleDialog from "./middle_test.vue";
export default {
components: {
saveDialog,
showDrawer,
materials,
- handoverDialog
+ handoverDialog,
+ middleDialog,
+ checkDrawer,
},
data() {
return {
@@ -717,6 +739,7 @@ export default {
material: "",
},
materialType: "wm",
+ wm:'',
mgroup: "",
mlogId: "",
mtaskDate: "",
@@ -725,6 +748,8 @@ export default {
queryMtaskState: false,
materialsVisible: false,
dialogHandover:false,
+ dialogInmTest:false,
+ visibleCheckDrawer:false,
};
},
mounted() {
@@ -962,6 +987,20 @@ export default {
})
},
handleHandoverSuccess(){},
+ //获取当前车间物料的检验记录
+ inm_record(row){
+ this.wm = row.id;
+ this.visibleCheckDrawer = true;
+ this.$nextTick(() => {
+ this.$refs.checkDrawers.open();
+ });
+ },
+ inm_test(row){
+ this.dialogInmTest = true;
+ this.$nextTick(() => {
+ this.$refs.inmTestDialog.open('10车间').setData(row);
+ })
+ },
},
};
diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue
index 6e6f8f96..7e190176 100644
--- a/src/views/wpm/mlog_dept6.vue
+++ b/src/views/wpm/mlog_dept6.vue
@@ -323,6 +323,7 @@
检验
+ 记录
@@ -344,6 +345,14 @@
@closed="visibleDrawer = false"
>
+
+
diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue
index 2c9bb9eb..f8fcb3da 100644
--- a/src/views/wpm/mlog_dept7.vue
+++ b/src/views/wpm/mlog_dept7.vue
@@ -538,7 +538,6 @@
row-key="id"
:params="paramsWm"
stripe
- hidePagination
>
{{
@@ -571,6 +570,12 @@
width="80"
>
+
+
+ 检验
+ 记录
+
+
@@ -613,9 +618,25 @@
@choseChange="choseChange"
>
+
+
+
+
+