Commit 77bbfc90 authored by 仇晓婷's avatar 仇晓婷

gongdan

parent ba7bdcf9
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@on-change="change" @on-change="change"
class="select-produt-name" class="select-produt-name"
/> />
<template v-if="datasearch.isMain!=1"> <!-- <template v-if="datasearch.isMain!=1">
<span class="ml20">汇报板次</span> <span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200"> <Select @on-change="boardonchange" v-model="board_ID" class="w200">
<Option <Option
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:key="item.index" :key="item.index"
>{{ item.boardNumber }}</Option> >{{ item.boardNumber }}</Option>
</Select> </Select>
</template> </template>-->
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button> <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="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button>
<Button type="primary" @click="SendCheck()" class="title_btn ml10">送检</Button> <Button type="primary" @click="SendCheck()" class="title_btn ml10">送检</Button>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
placeholder="请输入..." placeholder="请输入..."
@on-blur="selfchecklistinput(index,$event)" @on-blur="selfchecklistinput(index,$event)"
></Input> ></Input>
<template v-else-if="row.fillintype == 4"> <template v-else>
<op <op
class="view" class="view"
@click="showrecordData(row,1,true)" @click="showrecordData(row,1,true)"
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<Modal <Modal
v-model="usercardModal" v-model="usercardModal"
title="刷卡汇报" title="刷卡汇报"
width="1340" width="500"
:footer-hide="true" :footer-hide="true"
:mask-closable="false" :mask-closable="false"
> >
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<Modal <Modal
v-model="sendCheckModal" v-model="sendCheckModal"
title="产品送检" title="产品送检"
width="1340" width="500"
:footer-hide="true" :footer-hide="true"
:mask-closable="false" :mask-closable="false"
> >
...@@ -376,7 +376,7 @@ export default { ...@@ -376,7 +376,7 @@ export default {
params, params,
fill_in_user_type, fill_in_user_type,
this.product_ID, this.product_ID,
this.board_ID, // this.board_ID,
isedit isedit
); );
} else if (params.fillintype == 4) { } else if (params.fillintype == 4) {
...@@ -386,7 +386,7 @@ export default { ...@@ -386,7 +386,7 @@ export default {
params, params,
fill_in_user_type, fill_in_user_type,
this.product_ID, this.product_ID,
this.board_ID, // this.board_ID,
isedit isedit
); );
} }
...@@ -424,7 +424,7 @@ export default { ...@@ -424,7 +424,7 @@ export default {
this.disabled = false; this.disabled = false;
} else { } else {
this.datasearch.productcode = obj.boardNumber; this.datasearch.productcode = obj.boardNumber;
this.board_ID = obj.boardNumber; // this.board_ID = obj.boardNumber;
this.product_ID = obj.productids; this.product_ID = obj.productids;
this.disabled = true; this.disabled = true;
} }
...@@ -445,7 +445,7 @@ export default { ...@@ -445,7 +445,7 @@ export default {
this.disabled = false; this.disabled = false;
} else { } else {
this.datasearch.productcode = obj.boardNumber; this.datasearch.productcode = obj.boardNumber;
this.board_ID = obj.boardNumber; // this.board_ID = obj.boardNumber;
this.product_ID = obj.productids; this.product_ID = obj.productids;
this.disabled = true; this.disabled = true;
} }
...@@ -470,18 +470,18 @@ export default { ...@@ -470,18 +470,18 @@ export default {
// this.entity.productQuantity = e.length + '' // this.entity.productQuantity = e.length + ''
// }, // },
QcCardChecker(fill_in_user_type) { QcCardChecker(fill_in_user_type) {
console.log(this.$refs.codes.dic); // console.log(this.$refs.codes.dic);
this.$refs.usercard.product_List = this.$refs.codes.dic; this.$refs.usercard.product_List = this.$refs.codes.dic;
alert(fill_in_user_type);
this.usercardModal = true; this.usercardModal = true;
let fillModel = { let fillModel = {
fill_in_user_type: fill_in_user_type, fill_in_user_type: fill_in_user_type, //自检,互检
productisabled: this.productisabled, // productisabled: this.productisabled,
product_ID: this.product_ID, product_ID: this.product_ID,
board_ID: this.board_ID, // board_ID: this.board_ID,
product_List: this.$refs.codes.dic, product_List: this.$refs.codes.dic
board_List: this.board_List // board_List: this.board_List
}; };
let recordList = []; let recordList = [];
...@@ -489,12 +489,15 @@ export default { ...@@ -489,12 +489,15 @@ export default {
let obj = this.recorddata[i]; let obj = this.recorddata[i];
if (fill_in_user_type == 1) { if (fill_in_user_type == 1) {
//自检
// &&
// obj.selfchecklist != null &&
// obj.selfchecklist.fill_in_content != null &&
// obj.selfchecklist.fill_in_content != ""
if ( if (
(obj.selfchecklist.fillinstatus == "0" && obj.selfchecklist.fillinstatus == "0" ||
obj.selfchecklist != null && this.productobj.productstatus == 4 //打回重写填报
obj.selfchecklist.fill_in_content != null &&
obj.selfchecklist.fill_in_content != "") ||
this.productobj.productstatus == 4
) { ) {
let qc = { let qc = {
qc_card_id: obj.qc_card_id, qc_card_id: obj.qc_card_id,
...@@ -506,13 +509,15 @@ export default { ...@@ -506,13 +509,15 @@ export default {
recordList.push(qc); recordList.push(qc);
} }
} else if (fill_in_user_type == 2) { } else if (fill_in_user_type == 2) {
if (obj.check_type == 2 || obj.check_type == 4) { //互检
if (obj.inspect_type == 2 || obj.inspect_type == 3) {
//是否需要互检,2和3需要互检和专检
if ( if (
(obj.mutualchecklist.fillinstatus == "0" && (obj.mutualchecklist.fillinstatus == "0" &&
obj.mutualchecklist != null && obj.mutualchecklist != null &&
obj.mutualchecklist.fill_in_content != null && obj.mutualchecklist.fill_in_content != null &&
obj.mutualchecklist.fill_in_content != "") || obj.mutualchecklist.fill_in_content != "") ||
this.productobj.productstatus == 4 this.productobj.productstatus == 4 //打回重写填报
) { ) {
let qc = { let qc = {
qc_card_id: obj.qc_card_id, qc_card_id: obj.qc_card_id,
...@@ -524,7 +529,7 @@ export default { ...@@ -524,7 +529,7 @@ export default {
recordList.push(qc); recordList.push(qc);
} }
} }
} else if (fill_in_user_type == 3) { } else if (inspect_type == 3) {
} }
} }
...@@ -532,7 +537,7 @@ export default { ...@@ -532,7 +537,7 @@ export default {
this.$Message.success("填报项为空,请进行填报"); this.$Message.success("填报项为空,请进行填报");
return; return;
} }
alert(20);
this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList); this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList);
}, },
SendCheck() { SendCheck() {
......
...@@ -3,16 +3,7 @@ ...@@ -3,16 +3,7 @@
<Row class="rowTitle100"> <Row class="rowTitle100">
<Col :span="12"> <Col :span="12">
<Checkbox v-model="isall" @on-change="peoductAllOnchange"></Checkbox> <Checkbox v-model="isall" @on-change="peoductAllOnchange"></Checkbox>
<template v-if="isMain!=1">
<span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" multiple v-model="board_ID" class="w200">
<Option
v-for="item in board_List"
:value="item.boardNumber"
:key="item.index"
>{{ item.boardNumber }}</Option>
</Select>
</template>
<span class="ml20">产品号</span> <span class="ml20">产品号</span>
<Select <Select
:disabled="disabled" :disabled="disabled"
...@@ -198,12 +189,12 @@ export default { ...@@ -198,12 +189,12 @@ export default {
}, },
peoductAllOnchange(e) { peoductAllOnchange(e) {
if (e) { if (e) {
if (!this.isMain) { // if (!this.isMain) {
for (let i = 0; i < this.board_List.length; i++) { // for (let i = 0; i < this.board_List.length; i++) {
let obj = this.board_List[i] // let obj = this.board_List[i]
this.board_ID.push(obj.boardNumber) // this.board_ID.push(obj.boardNumber)
} // }
} // }
for (let i = 0; i < this.product_List.length; i++) { for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i] let obj = this.product_List[i]
...@@ -211,7 +202,7 @@ export default { ...@@ -211,7 +202,7 @@ export default {
} }
} else { } else {
this.product_ID = [] this.product_ID = []
this.board_ID = [] // this.board_ID = []
} }
}, },
productonchange(e) {}, productonchange(e) {},
......
<template> <template>
<Form ref="form" :model="user" :rules="rules" :label-width="100"> <Form ref="form" :model="user" :rules="rules" :label-width="80" class="shua-ka">
<Row class="rowTitle100"> <Row class="rowTitle100">
<Col :span="12"> <Col :span="24">
<Checkbox v-model="isall" @on-change="peoductAllOnchange"></Checkbox> <Checkbox v-model="isall" @on-change="peoductAllOnchange" class="check"></Checkbox>
<template v-if="isMain!=1"> <span>产品号</span>
<span class="ml20">汇报板次</span> <Select multiple @on-change="productonchange" v-model="product_ID" class="w200">
<Select
:width="width1"
@on-change="boardonchange"
multiple
v-model="board_ID"
class="w200"
>
<Option
v-for="item in board_List"
:value="item.boardNumber"
:key="item.index"
>{{ item.boardNumber }}</Option>
</Select>
</template>
<span class="ml20">产品号</span>
<Select
:disabled="productdisabled"
multiple
@on-change="productonchange"
v-model="product_ID"
class="w200"
>
<Option <Option
v-for="item in product_List" v-for="item in product_List"
:value="item.value" :value="item.value"
...@@ -36,7 +14,7 @@ ...@@ -36,7 +14,7 @@
</Col> </Col>
</Row> </Row>
<Row class="rowTitle100"> <Row class="rowTitle100">
<Col :span="12"> <Col :span="24">
<FormItem label="员工编号" prop="cardno"> <FormItem label="员工编号" prop="cardno">
<Input v-model="user.cardno"></Input> <Input v-model="user.cardno"></Input>
<Checkbox v-model="isCurrentUser" @on-change="getCurrentUser">当前用户</Checkbox> <Checkbox v-model="isCurrentUser" @on-change="getCurrentUser">当前用户</Checkbox>
...@@ -83,7 +61,7 @@ export default { ...@@ -83,7 +61,7 @@ export default {
}; };
return { return {
disabled: false, disabled: false,
productdisabled: false,
isCurrentUser: false, isCurrentUser: false,
isall: false, isall: false,
width1: "400", width1: "400",
...@@ -94,7 +72,7 @@ export default { ...@@ -94,7 +72,7 @@ export default {
routingHeaderId: 0, routingHeaderId: 0,
routingDetailId: 0, routingDetailId: 0,
product_code: [], product_code: [],
board_code: [], // board_code: [],
cardno: "", cardno: "",
user_id: "", user_id: "",
user_name: "", user_name: "",
...@@ -107,7 +85,7 @@ export default { ...@@ -107,7 +85,7 @@ export default {
isMain: 1, isMain: 1,
productisabled: false, productisabled: false,
product_ID: [], product_ID: [],
board_ID: [], // board_ID: [],
product_List: [], product_List: [],
board_List: [], board_List: [],
rules: { rules: {
...@@ -129,7 +107,7 @@ export default { ...@@ -129,7 +107,7 @@ export default {
return; return;
} }
this.user.product_code = this.product_ID.join(","); this.user.product_code = this.product_ID.join(",");
this.user.board_code = this.board_ID.join(","); // this.user.board_code = this.board_ID.join(",");
if (state) { if (state) {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
...@@ -155,7 +133,7 @@ export default { ...@@ -155,7 +133,7 @@ export default {
}, },
handleClose() {}, handleClose() {},
loadentry(entryModel, fillModel, recordList) { loadentry(entryModel, fillModel, recordList) {
alert(9)
this.user.dispatch_id = entryModel.id; this.user.dispatch_id = entryModel.id;
this.user.execute_id = entryModel.executeId; this.user.execute_id = entryModel.executeId;
this.user.order_id = entryModel.order_id; this.user.order_id = entryModel.order_id;
...@@ -167,23 +145,23 @@ export default { ...@@ -167,23 +145,23 @@ export default {
this.user.user_id = ""; this.user.user_id = "";
this.user.user_name = ""; this.user.user_name = "";
this.product_code = ""; this.product_code = "";
this.board_code = ""; // this.board_code = "";
this.isCurrentUser = false; this.isCurrentUser = false;
this.isMain = entryModel.isMain; // this.isMain = entryModel.isMain;
this.product_ID = []; this.product_ID = [];
this.board_ID = []; // this.board_ID = [];
this.productisabled = fillModel.productisabled; this.productisabled = fillModel.productisabled;
this.product_List = fillModel.product_List; this.product_List = fillModel.product_List;
console.log( this.product_List) console.log(this.product_List);
if (this.isMain == 1) { // if (this.isMain == 1) {
this.productdisabled = false; // this.productdisabled = false;
} else { // } else {
this.productdisabled = true; // this.productdisabled = true;
} // }
this.product_ID.push(fillModel.product_ID); this.product_ID.push(fillModel.product_ID);
this.board_ID.push(fillModel.board_ID); // this.board_ID.push(fillModel.board_ID);
if ( if (
fillModel.fill_in_user_type == 1 || fillModel.fill_in_user_type == 1 ||
fillModel.fill_in_user_type == 3 fillModel.fill_in_user_type == 3
...@@ -204,36 +182,17 @@ export default { ...@@ -204,36 +182,17 @@ export default {
}, },
peoductAllOnchange(e) { peoductAllOnchange(e) {
if (e) { if (e) {
if (!this.isMain) {
for (let i = 0; i < this.board_List.length; i++) {
let obj = this.board_List[i];
this.board_ID.push(obj.boardNumber);
}
}
for (let i = 0; i < this.product_List.length; i++) { for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i]; let obj = this.product_List[i];
this.product_ID.push(obj.productids); this.product_ID.push(obj.value);
} }
} else { } else {
this.product_ID = []; this.product_ID = [];
this.board_ID = []; // this.board_ID = [];
} }
}, },
productonchange(e) { productonchange(e) {},
},
boardonchange(e) {
this.product_ID = [];
for (let i = 0; i < this.board_List.length; i++) {
let obj = this.board_List[i];
for (let j = 0; j < e.length; j++) {
if (obj.boardNumber == e[j]) {
this.product_ID.push(obj.productids);
}
}
}
},
getCurrentUser(e) { getCurrentUser(e) {
if (e) { if (e) {
console.log(this.$store.state.admin.user.info); console.log(this.$store.state.admin.user.info);
...@@ -249,3 +208,15 @@ export default { ...@@ -249,3 +208,15 @@ export default {
} }
}; };
</script> </script>
<style lang="less">
.shua-ka {
padding: 0 20px;
.rowTitle100 {
margin-top: 10px;
.w200 {
width: 330px;
}
}
}
</style>
\ No newline at end of file
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