Commit f35ec95d authored by 仇晓婷's avatar 仇晓婷

工单执行

parent 44161d59
......@@ -43,7 +43,6 @@ export default {
},
methods: {
change(event) {
this.$emit("on-change", event);
this.codeIds = [];
for (let index = 0; index < event.length; index++) {
this.data.forEach(e => {
......@@ -52,6 +51,7 @@ export default {
}
});
}
this.$emit("on-change", event);
},
getCodes(e) {
let url = `${PlanUrl}/orderproductcode/getbyorderid`;
......
......@@ -7,4 +7,9 @@ export default {
getCardList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/list`, params);
},
//过程质量填报表
getentryqcrecordlist_new(params) {
return Api.get(`${PlanUrl}orderexecutequalityrecord/getentryqcrecordlist_new`, params);
},
}
......@@ -76,7 +76,7 @@ export default {
},
methods: {
gnFunto(number, type) {
alert("a"+this.orderId)
// alert("a"+this.orderId)
this.gnFlag = number;
this.$emit("changeTitle", number, type, this.orderId);
}
......
<template>
<div class="new_box">
<div >
<Button v-if="isedit" style=" margin-left:10px" type="primary" @click="handleAdd">添加</Button>
<Table class="tableCommon" stripe ref="table" border :columns="moviecolumn" :data="moviedata">
<template slot-scope="{ row, index }" slot="data_content1">
<Input type="text" v-model="data_content1" v-if="editIndex === index" />
<span v-else>{{ row.data_content1 }}</span>
</template>
<template slot-scope="{ row, index }" slot="data_content2">
<Input type="text" v-model="data_content2" v-if="editIndex === index" />
<span v-else>{{ row.data_content2 }}</span>
</template>
<template slot-scope="{ row, index }" slot="data_content3">
<Input type="text" v-model="data_content3" v-if="editIndex === index" />
<span v-else>{{ row.data_content3 }}</span>
</template>
<template slot-scope="{ row, index }" slot="action">
<div v-if="editIndex === index">
<Button @click="handleSave(index)">保存</Button>
<Button @click="handlecancel(row, index)">取消</Button>
</div>
<div v-else>
<template v-if="isedit">
<Button class="pl10" @click="handleEdit(row, index)">编辑</Button>
<Button @click="handledel(row, index)">删除</Button>
</template>
</div>
</template>
</Table>
</div>
</div>
</template>
<script>
import service from '@/plugins/request'
import QS from 'querystring'
export default {
name: 'entryrecorddata',
components: {},
data() {
return {
datasearch: {
ids: 0,
MaxResultCount: 10,
SkipCount: 0
},
isedit: true,
editIndex: -1,
isadd: false,
newModel: false,
ids: [],
data_content1: '',
data_content2: '',
data_content3: '',
datafrom: {
id: 0,
record_id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: '',
qc_card_id: 0,
fill_in_user_type: 0,
data_type: 4,
data_content1: '',
data_content2: '',
data_content3: '',
data_content4: '',
product_code: '',
board_code: ''
},
moviedata: [],
moviecolumn: [
// { title: '', key: 'organizType1', type: 'expand',width:'60'},
{ title: '序号', type: 'index', width: '100', align: 'center' },
{
title: '名称',
slot: 'data_content1',
key: 'data_content1'
},
{
title: '值',
slot: 'data_content2',
key: 'data_content2'
},
{
title: '备注',
slot: 'data_content3',
key: 'data_content3'
},
{
title: '操作',
slot: 'action',
align: 'center',
width: '201'
}
]
}
},
mounted() {},
watch: {},
methods: {
loadpage(params, fill_in_user_type, product_code, board_code, isedit) {
this.isedit = isedit;
(this.datafrom.dispatch_id = params.dispatch_id),
(this.datafrom.execute_id = params.execute_id),
(this.datafrom.order_id = params.order_id),
(this.datafrom.qc_card_id = params.qc_card_id),
(this.datafrom.fill_in_user_type = fill_in_user_type),
(this.datafrom.data_type = 4)
this.ids = []
if (
fill_in_user_type == 1 &&
params.selfchecklist != null &&
params.selfchecklist.fill_in_content != null &&
params.selfchecklist.fill_in_content != ''
) {
this.ids = params.selfchecklist.fill_in_content.split(',')
this.datafrom.record_id =
params.selfchecklist.record_id == null
? 0
: params.selfchecklist.record_id
} else if (
fill_in_user_type == 2 &&
params.mutualchecklist != null &&
params.mutualchecklist.fill_in_content != null &&
params.mutualchecklist.fill_in_content != ''
) {
this.ids = params.mutualchecklist.fill_in_content.split(',')
this.datafrom.record_id =
params.mutualchecklist.record_id == null
? 0
: params.mutualchecklist.record_id
} else if (
fill_in_user_type == 3 &&
params.seizurechecklist != null &&
params.seizurechecklist.fill_in_content != null &&
params.seizurechecklist.fill_in_content != ''
) {
this.ids = params.seizurechecklist.fill_in_content.split(',')
this.datafrom.record_id =
params.seizurechecklist.record_id == null
? 0
: params.seizurechecklist.record_id
}
this.datafrom.product_code = product_code
this.datafrom.board_code = board_code
this.loaddata()
},
loaddata() {
this.moviedata = []
this.datasearch.ids = this.ids.join(',')
var url =
`${PlanUrl}/orderexecutequalitydata/getlist?` +
QS.stringify(this.datasearch)
service.get(`${url}`).then((response) => {
if (response.result != null) {
this.moviedata = response.result
}
})
},
handlecancel(row, index) {
this.editIndex = -1
this.isadd = false
if (row.isnewadd) {
this.data01.splice(index, 1)
}
},
handleAdd() {
if (this.isadd == false) {
let row = {
id: 0,
record_id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: '',
qc_card_id: 0,
fill_in_user_type: 0,
data_type: 0,
data_content1: '',
data_content2: '',
data_content3: '',
data_content4: '',
product_code: '',
board_code: '',
isnewadd: true
}
;(this.data_content1 = ''),
(this.data_content2 = ''),
(this.data_content3 = ''),
(this.isadd = true)
this.moviedata.push(row)
this.editIndex = this.moviedata.length - 1
} else {
let lastindex = this.moviedata.length - 1
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
}
},
handleEdit(row, index) {
this.data_content1 = row.data_content1
this.data_content2 = row.data_content2
this.data_content3 = row.data_content3
this.editIndex = index
},
handleSave(index) {
this.datafrom.data_content1 = this.data_content1
this.datafrom.data_content2 = this.data_content2
this.datafrom.data_content3 = this.data_content3
this.datafrom.id = this.moviedata[index].id
this.ok(index)
if (this.editIndex == this.moviedata.length - 1) {
this.isadd = false
this.moviedata[index].isnewadd = false
}
this.editIndex = -1
},
ok(index) {
var url = `${PlanUrl}/orderexecutequalitydata/createorupdate`
service
.post(
`${url}`,
{
OrderExecuteQualityData: this.datafrom
}
)
.then((response) => {
if (response.success) {
this.$Message.success('保存成功')
this.ids.push(response.result.id)
this.moviedata.splice(index, 1)
this.moviedata.push(response.result)
this.cleardata()
this.$emit(
'binddataid',
this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type,
this.ids.join(','),
true
)
//this.loaddata()
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
},
cancel() {
this.cleardata()
},
cleardata() {
this.datafrom.id = 0
this.datafrom.data_content1 = ''
this.datafrom.data_content2 = ''
this.datafrom.data_content3 = ''
},
handledel(row, index) {
let id = row.id
if (id == 0) {
this.moviedata.splice(index, 1)
} else {
this.$Modal.confirm({
title: '提示',
content: '确定要删除当前行?',
onOk: () => {
var url =
`${PlanUrl}/orderexecutequalitydata/delete?id=` +
row.id +
'&record_id=' +
row.record_id
service
.delete(`${url}`)
.then((response) => {
if (response.success) {
this.$Message.success('删除成功')
this.ids.splice(index, 1)
this.moviedata.splice(index, 1)
// this.loaddata()
this.$emit(
'binddataid',
this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type,
this.ids.join(',')
)
} else {
this.$Message.error('删除失败')
}
})
.catch((error) => {
this.$Message.error('删除失败')
})
},
onCancel: () => {}
})
}
}
}
}
</script>
\ No newline at end of file
......@@ -4,37 +4,136 @@
<div class="data-title">
<span class="ml20">产品号</span>
<ProductNumberSelect
v-model="productSerialNumber"
:eid="orderId"
v-model="product_ID"
:eid="row.orderId"
ref="codes"
@on-change="change"
class="select-produt-name"
/>
<template v-if="datasearch.isMain!=1">
<span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200">
<Option
v-for="item in board_List"
:value="item.boardNumber"
:key="item.index"
>{{ item.boardNumber }}</Option>
</Select>
</template>
<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" @click="SendCheck()" class="title_btn ml10">送检</Button>
</div>
<div class="table-i">
<Table border :columns="columns12" :data="data6">
<Table border :columns="columns12" :data="recorddata">
<!-- 自检 -->
<template slot-scope="{ row,index }" slot="selffillin">
<template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4">
<Checkbox
v-model="row.selfchecklist.checkstatus"
@on-change="selfchecklistcheck(index,$event)"
v-if="row.fillintype == 1"
></Checkbox>
<Input
v-model="row.name"
v-model="row.selfchecklist.fill_in_content"
v-else-if="row.fillintype == 2"
placeholder="请输入..."
@on-blur="selfchecklistinput(index,$event)"
></Input>
<!-- <op
<template v-else-if="row.fillintype == 4">
<op
class="view"
@click="showrecordData(row,1,true)"
v-if="row.selfchecklist.fill_in_content==''"
v-text="row.fillintype_str"
></op>
<op class="view" @click="showrecordData(row,1,true)" v-else v-text="look"></op>-->
<op class="view" @click="showrecordData(row,1,true)" v-else v-text="look"></op>
</template>
</template>
<template v-else>
<template
v-if="row.fillintype == 1"
>{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}</template>
<template v-else-if="row.fillintype ==2">
<op class="view">{{row.selfchecklist.fill_in_content}}</op>
{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}
</template>
<template v-else>
<op
class="view"
@click="showrecordData(row,1,false)"
v-text="row.selfchecklist.user_name+' '+row.selfchecklist.addTime"
></op>
</template>
</template>
</template>
<!--互检-->
<template slot-scope="{ row,index }" slot="mutualfillin">
<Button type="primary" size="small" style="margin-right: 5px" @click="show(index)">View</Button>
<Button type="error" size="small" @click="remove(index)">Delete</Button>
<template v-if="row.check_type==2||row.check_type==4">
<!--未填报-->
<template v-if="row.mutualchecklist.fillinstatus==0||productobj.productstatus==4">
<!--自检完成-->
<template v-if="productobj.productstatus==2||productobj.productstatus==4">
<Checkbox
v-model="row.mutualchecklist.checkstatus"
@on-change="mutualchecklistcheck(index,$event)"
v-if="row.fillintype == 1"
></Checkbox>
<Input
v-model="row.mutualchecklist.fill_in_content"
v-else-if="row.fillintype == 2"
placeholder="请输入..."
@on-blur="mutualchecklistinput(index,$event)"
></Input>
<template v-else>
<op
class="view"
@click="showrecordData(row,2,true)"
v-if="row.mutualchecklist.fill_in_content==''"
v-text="row.fillintype_str"
></op>
<op class="view" @click="showrecordData(row,2,true)" v-else v-text="look"></op>
</template>
</template>
</template>
<template v-else>
<template
v-if="row.fillintype == 1"
>{{row.mutualchecklist.user_name}} {{row.mutualchecklist.addTime}}</template>
<template v-else-if="row.fillintype ==2">
<op class="view">{{row.mutualchecklist.fill_in_content}}</op>
{{row.mutualchecklist.user_name}} {{row.mutualchecklist.addTime}}
</template>
<template v-else>
<op
class="view"
@click="showrecordData(row,2,false)"
v-text="row.mutualchecklist.user_name+' '+row.mutualchecklist.addTime"
></op>
</template>
</template>
</template>
</template>
<!-- 检验员 -->
<template slot-scope="{ row,index }" slot="seizurefillin">
<template v-if="row.check_type==3||row.check_type==4">
<template v-if="row.seizurechecklist.fillinstatus==1">
<template
v-if="row.fillintype == 1"
>{{row.seizurechecklist.user_name}} {{row.seizurechecklist.addTime}}</template>
<template v-else-if="row.fillintype ==2">
<op class="view">{{row.seizurechecklist.fill_in_content}}</op>
{{row.seizurechecklist.user_name}} {{row.seizurechecklist.addTime}}
</template>
<template v-else>
<op
class="view"
@click="showrecordData(row,3,false)"
v-text="row.seizurechecklist.user_name+' '+row.seizurechecklist.addTime"
></op>
</template>
</template>
</template>
<template slot-scope="{ row }" slot="seizurefillin">
<div>{{ row.name }}</div>
</template>
</Table>
</div>
......@@ -56,17 +155,29 @@
>
<sendCheck ref="sendCheck"></sendCheck>
</Modal>
<Modal
v-model="entryrecorddataModal"
title="数据包列表"
width="940"
:footer-hide="true"
:mask-closable="false"
>
<entryrecorddata ref="entryrecorddata" @binddataid="binddataid"></entryrecorddata>
</Modal>
</div>
</template>
<script>
import service from "@/plugins/request";
import usercard from "./usercard.vue";
import sendCheck from "./sendCheck.vue";
import entryrecorddata from "./entryrecorddata.vue";
export default {
name: "starOrder",
props: ["orderId"],
props: ["row"],
components: {
usercard,
sendCheck
sendCheck,
entryrecorddata
},
data() {
return {
......@@ -74,23 +185,31 @@ export default {
disabled: false,
ishavhj: false,
ishavzj: true,
productSerialNumber: "",
board_ID: "",
board_List: [],
usercardModal: false,
sendCheckModal: false,
entryrecorddataModal: false,
recorddata: [],
entryModel: {},
look: "查看",
qc_show_data: null, //表格列表row
qc_show_fill_in_user_type: null, //1,2,3;自检,互检,检验员
datasearch: {
entryID: this.row.id,
isMain: 1,
productcode: "",
execute_id: this.row.executeId,
order_id: this.row.orderId
},
columns12: [
{ title: "序号", type: "index", width: "70", align: "center" },
{
title: "Name",
slot: "name"
},
{
title: "Age",
key: "age"
},
{
title: "Address",
key: "address"
},
{ title: "参数名称", key: "check_params" },
{ title: "检验标记", key: "check_type_str" },
{ title: "汇报类型", key: "fillintype_str" },
{ title: "标准指标", key: "standard" },
{ title: "生产要求", key: "production_requirement", tooltip: true },
{ title: "检测内容", key: "check_content", tooltip: true },
{
title: "操作员",
key: "fillintype",
......@@ -159,41 +278,184 @@ export default {
]);
},
slot: "seizurefillin"
}
],
data6: [
{
name: "John Brown",
age: 18,
address: "New York No. 1 Lake Park"
},
{
name: "Jim Green",
age: 24,
address: "London No. 1 Lake Park"
title: "是否拍照",
key: "isPhotograph",
slot: "isPhotograph"
},
{
name: "Joe Black",
age: 30,
address: "Sydney No. 1 Lake Park"
title: "模板",
key: "qualityTemplate",
render: (h, params) => {
return h(
"div",
{
class: "icon_box"
},
[
h(
"A",
{
name: "Jon Snow",
age: 26,
address: "Ottawa No. 2 Lake Park"
attrs: {
href: fileUrlDown + params.row.qualityTemplate,
target: "_blank"
},
props: {},
style: {
color: "#249E91",
marginRight: "5px",
cursor: "pointer"
}
},
params.row.qualityTemplateName
)
]
);
}
}
]
};
},
created() {
alert("b" + this.orderId);
// this.productSerialNumber = this.orderId;
this.datasearch.entryID = this.row.id;
this.datasearch.isMain = 1;
this.datasearch.productcode = this.datasearch.productcode;
this.datasearch.execute_id = this.row.executeId;
this.datasearch.order_id = this.row.orderId;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
mounted() {
this.loaddata();
},
methods: {
loaddata() {
// if (
// this.datasearch.productcode == '' ||
// typeof this.datasearch.productcode == 'undefined'
// ) {
// return
// }
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist_new`;
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.ishavhj = true;
}
let gh1 = this.recorddata.filter(function(obj) {
return obj.check_type === 3 || obj.check_type === 4;
});
if (gh1 != null && gh1.length > 0) {
this.ishavzj = false;
} else {
this.ishavzj = true;
}
});
},
change(v) {
this.datasearch.productcode = v.join(",");
this.loaddata();
},
showrecordData(params, fill_in_user_type, isedit) {
this.qc_show_data = params; //表格列表row
this.qc_show_fill_in_user_type = fill_in_user_type; //1,2,3;自检,互检,检验员
alert(params.fillintype);
if (params.fillintype == 3) {
//附件页面
this.entryrecordfilesModal = true;
this.$refs.entryrecordfiles.loadpage(
params,
fill_in_user_type,
this.product_ID,
this.board_ID,
isedit
);
} else if (params.fillintype == 4) {
//数据包页面
this.entryrecorddataModal = true;
this.$refs.entryrecorddata.loadpage(
params,
fill_in_user_type,
this.product_ID,
this.board_ID,
isedit
);
}
},
binddataid(qc_card_id, fill_in_user_type, content) {
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
if (obj.qc_card_id == qc_card_id) {
if (fill_in_user_type == 1) {
obj.selfchecklist.fill_in_content = content;
} else if (fill_in_user_type == 2) {
obj.mutualchecklist.fill_in_content = content;
} else if (fill_in_user_type == 3) {
obj.seizurechecklist.fill_in_content = content;
}
}
}
},
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();
});
},
show(index) {
this.$Modal.info({
title: "User Info",
......@@ -208,12 +470,17 @@ 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;
alert(fill_in_user_type);
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.product_List,
product_List: this.$refs.codes.dic,
board_List: this.board_List
};
let recordList = [];
......@@ -265,7 +532,7 @@ export default {
this.$Message.success("填报项为空,请进行填报");
return;
}
this.usercardModal = true;
alert(20);
this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList);
},
SendCheck() {
......
......@@ -29,9 +29,9 @@
>
<Option
v-for="item in product_List"
:value="item.productids"
:value="item.value"
:key="item.index"
>{{ item.productcodes }}</Option>
>{{ item.label }}</Option>
</Select>
</Col>
</Row>
......@@ -49,58 +49,56 @@
</Form>
</template>
<script>
import service from '@/plugins/request'
import service from "@/plugins/request";
export default {
name: 'usercard',
name: "usercard",
components: {},
data() {
const validateCarNo = (rule, value, callback) => {
if (!value) {
return callback(new Error('员工编号不能为空'))
return callback(new Error("员工编号不能为空"));
}
var params = {
conditions: [
{
fieldName: 'cardNo',
fieldName: "cardNo",
fieldValue: value,
conditionalType: 'Equal'
conditionalType: "Equal"
}
],
pageSize: 3
}
};
service
.post(`${systemUrl}/user/list`, params)
.then((response) => {
service.post(`${systemUrl}/user/list`, params).then(response => {
if (response.result.length > 0) {
this.user.user_name = response.result[0].userName
this.user.user_id = response.result[0].id
callback()
this.user.user_name = response.result[0].userName;
this.user.user_id = response.result[0].id;
callback();
} else {
this.user.cardno = ''
return callback(new Error('员工编号不存在'))
}
})
this.user.cardno = "";
return callback(new Error("员工编号不存在"));
}
});
};
return {
disabled: false,
productdisabled: false,
isCurrentUser: false,
isall: false,
width1: '400',
width1: "400",
user: {
dispatch_id: 0,
execute_id: 0,
order_id: '',
order_id: "",
routingHeaderId: 0,
routingDetailId: 0,
product_code: [],
board_code: [],
cardno: '',
user_id: '',
user_name: '',
remarks: '',
cardno: "",
user_id: "",
user_name: "",
remarks: "",
fill_in_user_type: 0,
reportdate: null,
isreplace: 0
......@@ -114,124 +112,124 @@ export default {
board_List: [],
rules: {
cardno: [
{ required: true, message: '必填', trigger: 'blur' },
{ validator: validateCarNo, trigger: 'blur' }
{ required: true, message: "必填", trigger: "blur" },
{ validator: validateCarNo, trigger: "blur" }
]
}
}
};
},
mounted() {},
watch: {},
methods: {
handleSubmit() {
let state = true
let state = true;
if (this.product_ID.length == 0) {
state = false
this.$Message.error('请选择要送检的产品')
return
state = false;
this.$Message.error("请选择要送检的产品");
return;
}
this.user.product_code = this.product_ID.join(',')
this.user.board_code = this.board_ID.join(',')
this.user.product_code = this.product_ID.join(",");
this.user.board_code = this.board_ID.join(",");
if (state) {
this.$refs.form.validate((v) => {
this.$refs.form.validate(v => {
if (v) {
var url = `${PlanUrl}/orderexecutequalityrecord/qccardchecker`
var url = `${PlanUrl}/orderexecutequalityrecord/qccardchecker`;
service
.post(
`${url}`,
{
.post(`${url}`, {
user: this.user,
card: this.recordList
}
)
.then((response) => {
})
.then(response => {
if (response.success) {
this.$Message.success('保存成功')
this.$parent.$parent.loadproduct()
this.$parent.$parent.usercardModal = false
this.$Message.success("保存成功");
this.$parent.$parent.loadproduct();
this.$parent.$parent.usercardModal = false;
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
}
})
});
}
},
handleClose() {},
loadentry(entryModel, fillModel, recordList) {
this.user.dispatch_id = entryModel.id
this.user.execute_id = entryModel.executeId
this.user.order_id = entryModel.order_id
this.user.routingHeaderId = entryModel.routingHeaderId
this.user.routingDetailId = entryModel.routingDetailId
this.user.fill_in_user_type = fillModel.fill_in_user_type
this.user.cardno = ''
this.user.user_id = ''
this.user.user_name = ''
this.product_code = ''
this.board_code = ''
this.isCurrentUser = false
this.isMain = entryModel.isMain
this.product_ID = []
this.board_ID = []
this.productisabled = fillModel.productisabled
alert(9)
this.user.dispatch_id = entryModel.id;
this.user.execute_id = entryModel.executeId;
this.user.order_id = entryModel.order_id;
this.user.routingHeaderId = entryModel.routingHeaderId;
this.user.routingDetailId = entryModel.routingDetailId;
this.user.fill_in_user_type = fillModel.fill_in_user_type;
this.user.cardno = "";
this.user.user_id = "";
this.user.user_name = "";
this.product_code = "";
this.board_code = "";
this.isCurrentUser = false;
this.isMain = entryModel.isMain;
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
this.productdisabled = false;
} 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 (
fillModel.fill_in_user_type == 1 ||
fillModel.fill_in_user_type == 3
) {
this.product_List = fillModel.product_List
this.board_List = fillModel.board_List
this.board_List = fillModel.board_List;
} else {
this.board_List = []
this.product_List = []
this.board_List = [];
this.product_List = [];
for (let i = 0; i < fillModel.product_List.length; i++) {
let obj = fillModel.product_List[i]
let obj = fillModel.product_List[i];
if (obj.productstatus == 2 || obj.productstatus == 4) {
this.board_List.push(obj)
this.product_List.push(obj)
this.board_List.push(obj);
this.product_List.push(obj);
}
}
}
this.recordList = recordList
this.recordList = recordList;
},
peoductAllOnchange(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)
let obj = this.board_List[i];
this.board_ID.push(obj.boardNumber);
}
}
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i]
this.product_ID.push(obj.productids)
let obj = this.product_List[i];
this.product_ID.push(obj.productids);
}
} else {
this.product_ID = []
this.board_ID = []
this.product_ID = [];
this.board_ID = [];
}
},
productonchange(e) {},
productonchange(e) {
},
boardonchange(e) {
this.product_ID = []
this.product_ID = [];
for (let i = 0; i < this.board_List.length; i++) {
let obj = this.board_List[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)
this.product_ID.push(obj.productids);
}
}
}
......@@ -241,13 +239,13 @@ export default {
console.log(this.$store.state.admin.user.info);
let userInfo = this.$store.state.admin.user.info;
this.user.cardno = userInfo.cardNo
this.user.user_name = userInfo.name
this.user.user_id = userInfo.id
this.user.cardno = userInfo.cardNo;
this.user.user_name = userInfo.name;
this.user.user_id = userInfo.id;
} else {
this.user.cardno = ''
this.user.cardno = "";
}
}
}
}
};
</script>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div>
</div>
<component :is="detail" :gdid="gdId" :orderId="orderId"/>
<component :is="detail" :gdid="gdId" :row="row"/>
<a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 -->
......@@ -81,6 +81,7 @@ export default {
detail: null,
odermodel: -9,
orderId: null,
row:{},
oderList: [
{
value: -9,
......@@ -121,7 +122,8 @@ export default {
};
},
created() {
this.orderId = this.$route.query.orderId;
// this.orderId = this.$route.query.orderId;
this.row = this.$route.query.row;
this.detail = () => import("./starOrder/index");
},
......
......@@ -29,7 +29,7 @@
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="body" @click="toExecute(row.id,row.orderId)">
<div class="body" @click="toExecute(row.id,row.orderId,row)">
<Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col>
<Col :span="10" class="order-code">{{row.mesCode}}</Col>
......@@ -176,7 +176,7 @@ export default {
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.toExecute(params.row.id) }
on: { click: () => this.toExecute(params.row.id,row) }
},
"查看"
)
......@@ -209,11 +209,11 @@ export default {
search() {
this.$refs.grid.reload(this.easySearch);
},
toExecute(id, orderId) {
toExecute(id, orderId,row) {
//跳转到对应操作页面 获取id:this.$route.query.id
this.$router.push({
path: "/produce/execute",
query: { id: id, orderId: orderId }
query: { id: id, orderId: orderId,row }
});
},
tdStyle(val) {
......
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