Commit 57c55ca1 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 8b8c3288 5ab16884
......@@ -48,7 +48,7 @@
"vue-i18n": "^8.15.5",
"vue-json-viewer": "^2.2.8",
"vue-quill-editor": "^3.0.6",
"vue-slider-component": "^3.1.3",
"vue-slider-component": "^3.1.5",
"vue-switches": "^2.0.1",
"vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2",
......
......@@ -115,7 +115,7 @@ export default {
this.datafrom.fill_in_user_type = fill_in_user_type;
this.datafrom.data_type = 4;
this.ids = [];
console.log(params);
if (
fill_in_user_type == 1 && //自检
params.selfchecklist != null &&
......@@ -151,9 +151,9 @@ export default {
: params.seizurechecklist.record_id;
}
this.datafrom.product_code = product_code.join(",");
this.datafrom.product_code = product_code;
// this.datafrom.board_code = board_code
alert(2)
this.loaddata();
},
loaddata() {
......@@ -204,14 +204,20 @@ alert(2)
this.moviedata.push(row);
this.editIndex = this.moviedata.length - 1;
} else {
let lastindex = this.moviedata.length - 1;
if(lastindex<0)
{
lastindex=0;
}
this.data_content1 = this.moviedata[lastindex].data_content1;
this.data_content2 = this.moviedata[lastindex].data_content2;
this.data_content3 = this.moviedata[lastindex].data_content3;
this.editIndex = lastindex;
}
this.datafrom.product_code = this.datafrom.product_code.join(",");
},
handleEdit(row, index) {
this.data_content1 = row.data_content1;
......
......@@ -4,29 +4,30 @@
<div class="data-title flex">
<div class="fg">
<span class="ml20">产品号</span>
<ProductNumberSelect
v-model="product_ID"
:eid="row.orderId"
ref="codes"
@on-change="change"
<Select
:multiple="false"
class="select-produt-name"
/>
</div>
<!-- <template v-if="datasearch.isMain!=1">
<span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200">
@on-change="productonchange"
v-model="product_ID"
>
<!-- <Option value="" class="option_text">请选择</Option> -->
<Option
v-for="item in board_List"
:value="item.boardNumber"
v-for="item in product_List"
:value="item.productids"
:key="item.index"
>{{ item.boardNumber }}</Option>
>{{ item.productcodes }}</Option>
</Select>
</template>-->
</div>
<div class="tr">
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button type="primary" :disabled="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button>
<Button type="primary" :disabled="ishavself" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button
type="primary"
:disabled="ishavhj"
@click="QcCardChecker(2)"
class="title_btn ml10"
>互检</Button>
<Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button>
<Button
type="primary"
......@@ -35,12 +36,12 @@
class="title_btn ml10"
>送检记录</Button>
</div>
</div>
<div class="table-i">
<Table border :columns="columns12" :data="recorddata">
<!-- 自检 -->
<template slot-scope="{ row,index }" slot="selffillin">
<template v-if="row.inspect_type.split(',').indexOf('1')>-1">
<template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4">
<Checkbox
v-model="row.selfchecklist.checkstatus"
......@@ -80,9 +81,10 @@
</template>
</template>
</template>
</template>
<!--互检-->
<template slot-scope="{ row,index }" slot="mutualfillin">
<template v-if="row.check_type==2||row.check_type==4">
<template v-if="row.inspect_type.split(',').indexOf('2')>-1">
<!--未填报-->
<template v-if="row.mutualchecklist.fillinstatus==0||productobj.productstatus==4">
<!--自检完成-->
......@@ -129,7 +131,7 @@
</template>
<!-- 检验员 -->
<template slot-scope="{ row,index }" slot="seizurefillin">
<template v-if="row.check_type==3||row.check_type==4">
<template v-if="row.inspect_type.split(',').indexOf('3')>-1">
<template v-if="row.seizurechecklist.fillinstatus==1">
<template
v-if="row.fillintype == 1"
......@@ -236,9 +238,11 @@ export default {
},
data() {
return {
product_List: [],
product_ID: "",
disabled: false,
ishavhj: false,
ishavself: true,
ishavhj: true,
ishavzj: true,
board_ID: "",
board_List: [],
......@@ -386,6 +390,13 @@ export default {
};
},
created() {
this.entryModel.executeId=this.row.executeId;
this.entryModel.order_id=this.row.order_id;
this.entryModel.id=this.row.id;
this.entryModel.routingHeaderId=this.row.headid;
this.entryModel.routingDetailId=this.row.routingdetailId;
this.entryModel.isMain=1;
this.datasearch.entryID = this.row.id;
this.datasearch.isMain = 1;
this.datasearch.productcode = this.datasearch.productcode;
......@@ -396,40 +407,60 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.loaddata();
this.loadproduct();
},
methods: {
loaddata() {
// if (
// this.datasearch.productcode == '' ||
// typeof this.datasearch.productcode == 'undefined'
// ) {
// return
// }
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist_new`;
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist`;
service.get(url, this.datasearch).then(response => {
this.recorddata = response.result;
let gh = this.recorddata.filter(function(obj) {
return obj.check_type === 2;
});
if (gh != null && gh.length > 0) {
this.ishavhj = false;
} else {
this.ishavself = true;
this.ishavhj = true;
}
this.ishavzj = true;
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
let gh1 = this.recorddata.filter(function(obj) {
return obj.check_type === 3 || obj.check_type === 4;
});
if (gh1 != null && gh1.length > 0) {
let checktypes = obj.inspect_type.split(",");
if (checktypes.indexOf("1") > -1) {
this.ishavself = false;
}
if (checktypes.indexOf("2") > -1) {
this.ishavhj = false;
}
if (checktypes.indexOf("3") > -1) {
this.ishavzj = false;
} else {
this.ishavzj = true;
}
}
});
},
change(v) {
loadproduct() {
let entry = {
dispatch_id: this.row.id,
execute_id: this.row.executeId,
order_id: this.row.orderId,
routingHeaderId: this.row.headid,
routingDetailId: this.row.routingdetailId
};
var url = `${PlanUrl}/orderexecutequalityrecord/getentryproductcode`;
service.get(url, entry).then(response => {
this.product_List = response.result;
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i];
if (obj.productstatus == 1 || obj.productstatus == 2) {
this.datasearch.productcode = obj.productids;
this.product_ID = obj.productids;
this.productobj = obj;
break;
}
}
this.loaddata();
});
},
productonchange(v) {
this.datasearch.productcode = v;
this.loaddata();
},
......@@ -474,57 +505,7 @@ export default {
}
}
},
// loadproduct() {
// var url =
// `${PlanUrl}/orderexecutequalityrecord/getentryproductcode?entryID=` +
// this.datasearch.entryID;
// service.get(`${url}`).then(response => {
// this.product_List = response.result;
// this.board_List = response.result;
// for (let i = 0; i < this.product_List.length; i++) {
// let obj = this.product_List[i];
// if (obj.productstatus == 1 || obj.productstatus == 2) {
// if (this.datasearch.isMain == 1) {
// this.datasearch.productcode = obj.productids;
// this.product_ID = obj.productids;
// this.disabled = false;
// } else {
// this.datasearch.productcode = obj.boardNumber;
// // this.board_ID = obj.boardNumber;
// this.product_ID = obj.productids;
// this.disabled = true;
// }
// this.productobj = obj;
// break;
// }
// if (
// this.productobj == null ||
// this.datasearch.productcode == "" ||
// typeof this.datasearch.productcode == "undefined"
// ) {
// let obj = this.product_List[0];
// if (this.datasearch.isMain == 1) {
// this.datasearch.productcode = obj.productids;
// this.product_ID = obj.productids;
// this.disabled = false;
// } else {
// this.datasearch.productcode = obj.boardNumber;
// // this.board_ID = obj.boardNumber;
// this.product_ID = obj.productids;
// this.disabled = true;
// }
// this.productobj = obj;
// }
// }
// this.loaddata();
// });
// },
showPhoto(params, isedit) {
this.entryrecordmovieModal = true;
this.$refs.entryrecordMovie.loadpage(
......@@ -536,7 +517,8 @@ export default {
},
ok() {
this.usercardModal = false;
this.loaddata();
this.loadproduct();
// this.loaddata();
},
bindPhotoid(qc_card_id, content) {
for (let i = 0; i < this.recorddata.length; i++) {
......@@ -548,7 +530,7 @@ export default {
},
handleselfCheckAll() {
this.isselfCheckAll = !this.isselfCheckAll;
console.log(this.recorddata);
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
if (obj.fillintype == 1) {
......@@ -597,32 +579,37 @@ export default {
// this.entity.productQuantity = e.length + ''
// },
QcCardChecker(fill_in_user_type) {
// console.log(this.$refs.codes.dic);
this.$refs.usercard.product_List = this.$refs.codes.dic;
this.$refs.usercard.product_List = this.product_List;
this.usercardModal = true;
let fillModel = {
fill_in_user_type: fill_in_user_type, //自检,互检
// productisabled: this.productisabled,
product_ID: this.product_ID,
// board_ID: this.board_ID,
product_List: this.$refs.codes.dic
product_List: this.product_List
// board_List: this.board_List
};
let recordList = [];
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
console.log(obj);
let checktypes = obj.inspect_type.split(",");
if (fill_in_user_type == 1) {
//自检
if (checktypes.indexOf("1") > -1) {
// &&
// obj.selfchecklist != null &&
// obj.selfchecklist.fill_in_content != null &&
// obj.selfchecklist.fill_in_content != ""
if (
obj.selfchecklist.fillinstatus == "0" ||
( obj.selfchecklist != null &&
obj.selfchecklist.fill_in_content != null &&
obj.selfchecklist.fill_in_content != ""&&
obj.selfchecklist.fillinstatus == "0") ||
this.productobj.productstatus == 4 //打回重写填报
) {
let qc = {
......@@ -635,9 +622,11 @@ export default {
};
recordList.push(qc);
}
}
} else if (fill_in_user_type == 2) {
//互检
if (obj.check_type == 2 || obj.check_type == 3) {
if (checktypes.indexOf("2") > -1) {
//是否需要互检,2和3需要互检和专检 inspect_type
if (
(obj.mutualchecklist.fillinstatus == "0" &&
......@@ -657,7 +646,7 @@ export default {
recordList.push(qc);
}
}
} else if (inspect_type == 3) {
} else if (fill_in_user_type == 3) {
}
}
......@@ -665,7 +654,7 @@ export default {
this.$Message.success("填报项为空,请进行填报");
return;
}
this.usercardModal = true;
this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList);
},
selfchecklistcheck(index, e) {
......
......@@ -6,7 +6,7 @@
<span class="ml20">产品号</span>
<Select
:disabled="disabled"
multiple
@on-change="productonchange"
v-model="product_ID"
......@@ -121,6 +121,7 @@ export default {
},
handleClose() {},
loadentry(entryModel) {
this.user.dispatch_id = entryModel.id
this.user.execute_id = entryModel.executeId
this.user.order_id = entryModel.order_id
......@@ -128,14 +129,11 @@ export default {
this.user.routingDetailId = entryModel.routingDetailId
this.isMain = entryModel.isMain
if (this.isMain == 1) {
this.disabled = false
} else {
this.disabled = true
}
this.checker = []
;(this.product_ID = []), (this.board_ID = []), this.loadproduct()
this.loaduser()
this.checker = [];
this.product_ID = [];
this.loadproduct();
this.loaduser();
},
loadproduct() {
var url =
......@@ -144,7 +142,7 @@ export default {
service.post(`${url}`).then((response) => {
this.product_List = response.result
this.board_List = response.result
})
},
loaduser() {
......
......@@ -7,9 +7,9 @@
<Select multiple @on-change="productonchange" v-model="product_ID" class="w200">
<Option
v-for="item in product_List"
:value="item.value"
:value="item.productids"
:key="item.index"
>{{ item.label }}</Option>
>{{ item.productcodes }}</Option>
</Select>
</Col>
</Row>
......@@ -152,29 +152,26 @@ export default {
this.product_ID = [];
// this.board_ID = [];
this.productisabled = fillModel.productisabled;
this.product_List = fillModel.product_List;
console.log(this.product_List);
// if (this.isMain == 1) {
// this.productdisabled = false;
// } else {
// this.productdisabled = true;
// }
this.product_ID.push(fillModel.product_ID);
alert(this.product_ID);
// this.board_ID.push(fillModel.board_ID);
if (
fillModel.fill_in_user_type == 1 ||
fillModel.fill_in_user_type == 3
) {
this.board_List = fillModel.board_List;
//自检或专检取全部产品
this.product_List = fillModel.product_List;
} else {
this.board_List = [];
//互检只取待互检和打回的
this.product_List = [];
for (let i = 0; i < fillModel.product_List.length; i++) {
let obj = fillModel.product_List[i];
if (obj.productstatus == 2 || obj.productstatus == 4) {
this.board_List.push(obj);
this.product_List.push(obj);
}
}
......@@ -185,8 +182,8 @@ export default {
if (e) {
this.product_ID = [];
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i];
this.product_ID.push(obj.value);
let obj = this.product_List[i]
this.product_ID.push(obj.productids)
}
} else {
this.product_ID = [];
......@@ -197,7 +194,7 @@ export default {
getCurrentUser(e) {
if (e) {
console.log(this.$store.state.admin.user.info);
//console.log(this.$store.state.admin.user.info);
let userInfo = this.$store.state.admin.user.info;
this.user.cardno = userInfo.cardNo;
......
......@@ -81,6 +81,10 @@ export default {
row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId;
row.headid=this.$route.query.headid;
row.routingdetailId=this.$route.query.routid;
this.row = row;
this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment