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

数据包

parent 6facfc64
<template> <template>
<div class> <div class>
<p>
<Select @on-change="productonchange" style="width:300px" placeholder="请选择编号">
<Option value class="option-text">请选择编号</Option>
<Option v-for="item in mainCodeList" :value="item" :key="item">{{ item }}</Option>
</Select>
</p>
<Tabs :animated="false" @on-click="tabChange" value="1"> <Tabs :animated="false" @on-click="tabChange" value="1">
<TabPane label="工艺信息" name="1"> <TabPane label="工艺信息" name="1">
<Form :model="craftData" :label-width="130" inline> <Form :model="craftData" :label-width="130" inline>
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem label="工艺文件编号:" style="width:100%"> <FormItem label="工艺文件编号:" style="width: 100%">
<span>{{craftData.code}}</span> <span>{{ craftData.code }}</span>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="工艺文件名称:" style="width:100%"> <FormItem label="工艺文件名称:" style="width: 100%">
<span>{{craftData.name}}</span> <span>{{ craftData.name }}</span>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="工艺文件版本:" style="width:100%"> <FormItem label="工艺文件版本:" style="width: 100%">
<span>{{craftData.versiondesc}}</span> <span>{{ craftData.versiondesc }}</span>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="任务类型:" style="width:100%"> <FormItem label="任务类型:" style="width: 100%">
<state code="plan.order.taskType" :value="craftData.task_type" type="text"></state> <state
code="plan.order.taskType"
:value="craftData.task_type"
type="text"
></state>
<!-- <span>{{craftData.task_type}}</span> --> <!-- <span>{{craftData.task_type}}</span> -->
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="研制方式:" style="width:100%"> <FormItem label="研制方式:" style="width: 100%">
<span>{{craftData.development_mode_str}}</span> <span>{{ craftData.development_mode_str }}</span>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="产品名称:" style="width:100%"> <FormItem label="产品名称:" style="width: 100%">
<span>{{craftData.productName}}</span> <span>{{ craftData.productName }}</span>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="产品图号:" style="width:100%"> <FormItem label="产品编号:" style="width: 100%">
<span>{{craftData.productCode}}</span> <span>{{ craftData.productCode }}</span>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
</Form> </Form>
</TabPane> </TabPane>
<TabPane label="设备信息" name="2"> <!-- <TabPane label="设备信息" name="2">
<Form :model="equipmentData" :label-width="130" inline> <Form :model="equipmentData" :label-width="130" inline>
<Row> <Row>
<Col span="12"> <Col span="12">
...@@ -74,32 +72,49 @@ ...@@ -74,32 +72,49 @@
</Col> </Col>
</Row> </Row>
</Form> </Form>
</TabPane> </TabPane> -->
<TabPane label="质量信息" name="3"> <TabPane label="质量信息" name="3">
<orderqcrecord ref="orderqcrecord1" /> <orderqcrecord ref="orderqcrecord1" :items="items"/>
</TabPane>
<TabPane label="配套数据" name="4">
<!-- <orderqcrecord ref="orderqcrecord1" /> -->
</TabPane> </TabPane>
</Tabs> </Tabs>
</div> </div>
</template> </template>
<script> <script>
import service from '@/plugins/request' import service from "@/plugins/request";
import orderqcrecord from './orderqcrecord.vue' import orderqcrecord from "./orderqcrecord.vue";
export default { export default {
components: { orderqcrecord }, components: { orderqcrecord },
props: { props: {
baseData: { baseData: {
type: [String, Number, Array, Object] type: [String, Number, Array, Object],
} },
items: {
mesCodeId: {
type: Number,
},
headerid: {
type: Number,
},
routingType: {
type: Number,
},
craftData: {
type: Object,
},
},
}, },
data() { data() {
return { return {
themeBg: 'light', themeBg: "light",
craftData: {}, //工艺信息 craftData:this.items.craftData, //工艺信息
equipmentData: {}, //设备信息 equipmentData: {}, //设备信息
headerid: '', //暂存传字段 headerid: "", //暂存传字段
routingType: '', //工艺类型(主/专业) routingType: "", //工艺类型(主/专业)
mainCodeList: [] //编号数组 mainCodeList: [], //编号数组
} };
}, },
created() { created() {
// this.loaddata() // this.loaddata()
...@@ -107,34 +122,33 @@ export default { ...@@ -107,34 +122,33 @@ export default {
methods: { methods: {
// 获取设备信息 10020 /equipinfo/getlistall // 获取设备信息 10020 /equipinfo/getlistall
getlistall(equipids) { getlistall(equipids) {
let url02 = `${systemUrl}/equipinfo/getlistall?equipids=` + equipids let url02 = `${systemUrl}/equipinfo/getlistall?equipids=` + equipids;
service.get(`${url02}`).then((res) => { service.get(`${url02}`).then((res) => {
if (res.success) { if (res.success) {
if (res.result.length != 0) { if (res.result.length != 0) {
this.equipmentData = res.result[0] this.equipmentData = res.result[0];
} else { } else {
this.equipmentData = [] this.equipmentData = [];
console.log('获取主工艺设备信息为空.') console.log("获取主工艺设备信息为空.");
} }
} else { } else {
this.equipmentData = [] this.equipmentData = [];
console.log('获取主工艺设备数据失败.') console.log("获取主工艺设备数据失败.");
} }
}) });
}, },
getqc(executeid) { getqc(executeid) {
this.$refs.orderqcrecord1.qcdatasearch.execute_id = executeid;
this.$refs.orderqcrecord1.qcdatasearch.execute_id = executeid
}, },
productonchange(e) { productonchange(e) {
this.$refs.orderqcrecord1.qcdatasearch.isMain = 1 this.$refs.orderqcrecord1.qcdatasearch.isMain = 1;
this.$refs.orderqcrecord1.qcdatasearch.productcode = e this.$refs.orderqcrecord1.qcdatasearch.productcode = e;
this.$refs.orderqcrecord1.qcdatasearch.SkipCount = 0 this.$refs.orderqcrecord1.qcdatasearch.SkipCount = 0;
this.$refs.orderqcrecord1.onqcpage() this.$refs.orderqcrecord1.onqcpage();
}, },
tabChange() { tabChange() {
// console.log("切换tab") // console.log("切换tab")
} },
}, },
mounted() {}, mounted() {},
watch: { watch: {
...@@ -145,10 +159,10 @@ export default { ...@@ -145,10 +159,10 @@ export default {
// this.loaddata(v.id) // this.loaddata(v.id)
// console.info(o.id) // console.info(o.id)
}, },
deep: true deep: true,
} },
} },
} };
</script> </script>
<style scoped> <style scoped>
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
<Table ref="table" border class="tableCommon" :columns="qcrecordcolumn" :data="qcrecorddata"> <p style="margin-bottom: 10px">
<template slot-scope="{ row,index }" slot="selffillin"> <Select
@on-change="productonchange"
style="width: 300px"
clearable
placeholder="请选择编号"
>
<!-- <Option value class="option-text">请选择编号</Option> -->
<Option v-for="item in mainCodeList" :value="item" :key="item">{{
item
}}</Option>
</Select>
</p>
<Table
ref="table"
border
class="tableCommon"
:columns="qcrecordcolumn"
:data="qcrecorddata"
>
<template slot-scope="{ row, index }" slot="selffillin">
<template> <template>
<template <template v-if="row.fillintype == 1"
v-if="row.fillintype == 1" >{{ row.selfchecklist.user_name }}
>{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}</template> {{ row.selfchecklist.addTime }}</template
<template v-else-if="row.fillintype ==2"> >
<op class="view">{{row.selfchecklist.fill_in_content}}</op> <template v-else-if="row.fillintype == 2">
{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}} <op class="view">{{ row.selfchecklist.fill_in_content }}</op>
{{ row.selfchecklist.user_name }} {{ row.selfchecklist.addTime }}
</template> </template>
<template v-else> <template v-else>
<op
<op v-if="row.selfchecklist.fillinstatus!=0" v-if="row.selfchecklist.fillinstatus != 0"
class="view" class="view"
@click="showrecordData(row,1,false)" @click="showrecordData(row, 1, false)"
v-text="row.selfchecklist.user_name+' '+row.selfchecklist.addTime" v-text="
row.selfchecklist.user_name + ' ' + row.selfchecklist.addTime
"
></op> ></op>
</template> </template>
</template> </template>
</template> </template>
<!--互检--> <!--互检-->
<template slot-scope="{ row,index }" slot="mutualfillin"> <template slot-scope="{ row, index }" slot="mutualfillin">
<template v-if="row.check_type==2||row.check_type==4"> <template v-if="row.check_type == 2 || row.check_type == 4">
<template> <template>
<template <template v-if="row.fillintype == 1"
v-if="row.fillintype == 1" >{{ row.mutualchecklist.user_name }}
>{{row.mutualchecklist.user_name}} {{row.mutualchecklist.addTime}}</template> {{ row.mutualchecklist.addTime }}</template
<template v-else-if="row.fillintype ==2"> >
<op class="view">{{row.mutualchecklist.fill_in_content}}</op> <template v-else-if="row.fillintype == 2">
{{row.mutualchecklist.user_name}} {{row.mutualchecklist.addTime}} <op class="view">{{ row.mutualchecklist.fill_in_content }}</op>
{{ row.mutualchecklist.user_name }}
{{ row.mutualchecklist.addTime }}
</template> </template>
<template v-else> <template v-else>
<op v-if="row.mutualchecklist.fillinstatus!=0" <op
v-if="row.mutualchecklist.fillinstatus != 0"
class="view" class="view"
@click="showrecordData(row,2,false)" @click="showrecordData(row, 2, false)"
v-text="row.mutualchecklist.user_name+' '+row.mutualchecklist.addTime" v-text="
row.mutualchecklist.user_name +
' ' +
row.mutualchecklist.addTime
"
></op> ></op>
</template> </template>
</template> </template>
</template> </template>
</template> </template>
<template slot-scope="{ row,index }" slot="seizurefillin"> <template slot-scope="{ row, index }" slot="seizurefillin">
<template v-if="row.check_type==3||row.check_type==4"> <template v-if="row.check_type == 3 || row.check_type == 4">
<template v-if="row.seizurechecklist.fillinstatus==1"> <template v-if="row.seizurechecklist.fillinstatus == 1">
<template <template v-if="row.fillintype == 1"
v-if="row.fillintype == 1" >{{ row.seizurechecklist.user_name }}
>{{row.seizurechecklist.user_name}} {{row.seizurechecklist.addTime}}</template> {{ row.seizurechecklist.addTime }}</template
<template v-else-if="row.fillintype ==2"> >
<op class="view">{{row.seizurechecklist.fill_in_content}}</op> <template v-else-if="row.fillintype == 2">
{{row.seizurechecklist.user_name}} {{row.seizurechecklist.addTime}} <op class="view">{{ row.seizurechecklist.fill_in_content }}</op>
{{ row.seizurechecklist.user_name }}
{{ row.seizurechecklist.addTime }}
</template> </template>
<template v-else> <template v-else>
<op v-if="row.seizurechecklist.fillinstatus!=0" <op
v-if="row.seizurechecklist.fillinstatus != 0"
class="view" class="view"
@click="showrecordData(row,3,false)" @click="showrecordData(row, 3, false)"
v-text="row.seizurechecklist.user_name+' '+row.seizurechecklist.addTime" v-text="
row.seizurechecklist.user_name +
' ' +
row.seizurechecklist.addTime
"
></op> ></op>
</template> </template>
</template> </template>
</template> </template>
</template> </template>
<template slot-scope="{ row,index }" slot="isPhotograph"> <template slot-scope="{ row, index }" slot="isPhotograph">
<template v-if="row.isPhotograph==0"> <template v-if="row.isPhotograph == 0">
<op class="view"></op> <op class="view"></op>
</template> </template>
<template v-else> <template v-else>
<op class="view" @click="showPhoto(row,false)">查看</op> <op class="view" @click="showPhoto(row, false)">查看</op>
</template> </template>
</template> </template>
</Table> </Table>
...@@ -82,14 +118,14 @@ ...@@ -82,14 +118,14 @@
show-elevator show-elevator
show-total show-total
/> />
<Modal <Modal
v-model="entryrecordfilesModal" v-model="entryrecordfilesModal"
title="附件列表" title="附件列表"
width="940" width="940"
:footer-hide="true" :footer-hide="true"
:mask-closable="false" :mask-closable="false"
> >
<entryrecordfiles ref="entryrecordfiles"></entryrecordfiles> <entryrecordfiles ref="entryrecordfiles"></entryrecordfiles>
</Modal> </Modal>
<Modal <Modal
v-model="entryrecorddataModal" v-model="entryrecorddataModal"
...@@ -108,187 +144,249 @@ ...@@ -108,187 +144,249 @@
:mask-closable="false" :mask-closable="false"
:footer-hide="true" :footer-hide="true"
> >
<entryrecordMovie ref="entryrecordMovie"></entryrecordMovie> <entryrecordMovie ref="entryrecordMovie"></entryrecordMovie>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import service from '@/plugins/request' import service from "@/plugins/request";
import QS from 'querystring' import QS from "querystring";
import entryrecordfiles from '../../../implement/components/entryrecordfiles.vue' import entryrecordfiles from "../../../implement/components/entryrecordfiles.vue";
import entryrecordMovie from '../../../implement/components/entryrecordMovie.vue' import entryrecordMovie from "../../../implement/components/entryrecordMovie.vue";
import entryrecorddata from '../../../implement/components/entryrecorddata.vue' import entryrecorddata from "../../../implement/components/entryrecorddata.vue";
export default { export default {
name: 'orderqcrecord', name: "orderqcrecord",
components: { entryrecordfiles, entryrecordMovie, entryrecorddata },
components: {entryrecordfiles,entryrecordMovie,entryrecorddata}, props: {
items: {
mesCodeId: {
type: Number,
},
headerid: {
type: Number,
},
routingType: {
type: Number,
},
craftData: {
type: Object,
},
},
},
data() { data() {
return { return {
mainCodeList: [], //编号数组
pageindex: 1, pageindex: 1,
pagesize: 5, pagesize: 5,
qcdatatotal: 0, qcdatatotal: 0,
qcdatasearch: { qcdatasearch: {
isMain: 1, isMain: 1,
productcode: '1', productcode: "1",
execute_id: 0, execute_id: 0,
SkipCount: 0, SkipCount: 0,
MaxResultCount: 5 MaxResultCount: 5,
}, },
entryrecordfilesModal: false, entryrecordfilesModal: false,
entryrecorddataModal: false, entryrecorddataModal: false,
entryrecordmovieModal: false, entryrecordmovieModal: false,
qcrecorddata: [], qcrecorddata: [],
qcrecordcolumn: [ qcrecordcolumn: [
{ title: '序号', type: 'index', width: '70', align: 'center' }, { title: "序号", type: "index", width: "70", align: "center" },
{ title: '工序', key: 'remark' }, { title: "工序", key: "remark" },
{ title: '参数名称', key: 'check_params' }, { title: "参数名称", key: "check_params" },
{ title: '检验标记', key: 'check_type_str' }, { title: "检验标记", key: "check_type_str" },
{ title: '汇报类型', key: 'fillintype_str' }, { title: "汇报类型", key: "fillintype_str" },
{ title: '标准指标', key: 'standard' }, { title: "标准指标", key: "standard" },
{ title: '生产要求', key: 'production_requirement', tooltip: true }, { title: "生产要求", key: "production_requirement", tooltip: true },
{ title: '检测内容', key: 'check_content', tooltip: true }, { title: "检测内容", key: "check_content", tooltip: true },
{ {
title: '操作员', title: "操作员",
key: 'fillintype', key: "fillintype",
slot: 'selffillin' slot: "selffillin",
}, },
{ {
title: '互检员', title: "互检员",
key: 'mutual', key: "mutual",
slot: 'mutualfillin' slot: "mutualfillin",
}, },
{ {
title: '检验员', title: "检验员",
key: 'seizure', key: "seizure",
slot: 'seizurefillin' slot: "seizurefillin",
}, },
{ {
title: '是否拍照', title: "是否拍照",
key: 'isPhotograph', key: "isPhotograph",
slot: 'isPhotograph' slot: "isPhotograph",
}, },
{ {
title: '模板', title: "模板",
key: 'qualityTemplate', key: "qualityTemplate",
render: (h, params) => { render: (h, params) => {
return h( return h(
'div', "div",
{ {
class: 'icon_box' class: "icon_box",
}, },
[ [
h( h(
'A', "A",
{ {
attrs: { attrs: {
href: fileUrlDown + params.row.qualityTemplate, href: fileUrlDown + params.row.qualityTemplate,
target: '_blank' target: "_blank",
}, },
props: {}, props: {},
style: { style: {
color: '#249E91', color: "#249E91",
marginRight: '5px', marginRight: "5px",
cursor: 'pointer' cursor: "pointer",
} },
}, },
params.row.qualityTemplateName params.row.qualityTemplateName
) ),
] ]
) );
} },
} },
] ],
} };
},
mounted() {
this.getmainorder();
}, },
mounted() {},
watch: {}, watch: {},
methods: { methods: {
productonchange(e) {
// console.log(e);
this.qcdatasearch.isMain = 1;
this.qcdatasearch.productcode = e;
this.qcdatasearch.SkipCount = 0;
// this.$refs.orderqcrecord1.onqcpage()
},
getmainorder() {
let mesCodeId = this.items.mesCodeId;
let headerid = this.items.headerid;
let routingType = this.items.routingType;
let url01 =
`${PlanUrl}/orderexecute/getorderproductandequip?orderId=` +
mesCodeId +
`&headerid=` +
headerid +
`&routingType=` +
routingType;
service
.get(`${url01}`)
.then((res) => {
if (res.success) {
if (res.result.productCode) {
let codeList = []; // 编号List
let bandleList = res.result.productCode;
bandleList.map((item, index) => {
codeList.push(item.productcodes);
});
this.mainCodeList = codeList;
}
// if (res.result.equipids) {
// let equipids = res.result.equipids;
// this.mainexecuteid = res.result.executeid;
// this.$refs.mainView.getlistall(equipids);
// this.$refs.mainView.getqc(this.mainexecuteid);
// this.$refs.mainView.mainCodeList = codeList;
// console.warn(codeList);
// } else {
// console.log("获取主工艺设备信息数据为空.");
// }
} else {
console.log("获取主工艺设备信息数据失败.");
}
})
.catch((err) => {
console.log(err);
});
},
onPageChanged(page_index) { onPageChanged(page_index) {
this.pageindex = page_index this.pageindex = page_index;
this.onqcpage() this.onqcpage();
}, },
onPagesizeChanged(page_size) { onPagesizeChanged(page_size) {
this.qcdatasearch.MaxResultCount = page_size this.qcdatasearch.MaxResultCount = page_size;
this.onqcpage() this.onqcpage();
}, },
onqcpage() { onqcpage() {
this.qcdatasearch.SkipCount = this.qcdatasearch.SkipCount =
(this.pageindex - 1) * this.qcdatasearch.MaxResultCount (this.pageindex - 1) * this.qcdatasearch.MaxResultCount;
var url = var url =
`${PlanUrl}/orderexecutequalityrecord/getorderqcrecordlist?` + `${PlanUrl}/orderexecutequalityrecord/getorderqcrecordlist?` +
QS.stringify(this.qcdatasearch) QS.stringify(this.qcdatasearch);
service.get(`${url}`).then((response) => { service.get(`${url}`).then((response) => {
this.qcrecorddata = response.result.items this.qcrecorddata = response.result.items;
this.qcdatatotal = response.result.totalCount this.qcdatatotal = response.result.totalCount;
this.getdetail() this.getdetail();
}) });
}, },
getdetail() { getdetail() {
let routing_header_id = 0 let routing_header_id = 0;
if (this.qcrecorddata != null && this.qcrecorddata.length > 0) { if (this.qcrecorddata != null && this.qcrecorddata.length > 0) {
routing_header_id = this.qcrecorddata[0].routing_header_id routing_header_id = this.qcrecorddata[0].routing_header_id;
var url = var url =
`${designUrl}/routingdetail/getlistbyheaderid?headerID=` + `${designUrl}/routingdetail/getlistbyheaderid?headerID=` +
routing_header_id routing_header_id;
service.get(`${url}`).then((response) => { service.get(`${url}`).then((response) => {
let detaildata = response.result let detaildata = response.result;
for (let i = 0; i < this.qcrecorddata.length; i++) { for (let i = 0; i < this.qcrecorddata.length; i++) {
let qc = this.qcrecorddata[i] let qc = this.qcrecorddata[i];
var gh = detaildata.filter(function(obj) { var gh = detaildata.filter(function (obj) {
return obj.id == qc.routing_detail_id return obj.id == qc.routing_detail_id;
}) });
if (gh != null && gh.length > 0) { if (gh != null && gh.length > 0) {
this.qcrecorddata[i].remark = gh[0].task_seq + ':' + gh[0].name this.qcrecorddata[i].remark = gh[0].task_seq + ":" + gh[0].name;
} }
} }
}) });
} }
}, },
showPhoto(params, isedit) { showPhoto(params, isedit) {
this.entryrecordmovieModal = true this.entryrecordmovieModal = true;
this.$refs.entryrecordMovie.loadpage( this.$refs.entryrecordMovie.loadpage(params, "", "", isedit);
params,
'',
'',
isedit
)
}, },
showrecordData(params, fill_in_user_type, isedit) { showrecordData(params, fill_in_user_type, isedit) {
this.qc_show_data = params this.qc_show_data = params;
this.qc_show_fill_in_user_type = fill_in_user_type this.qc_show_fill_in_user_type = fill_in_user_type;
//显示附件数据包页面 //显示附件数据包页面
if (params.fillintype == 3) { if (params.fillintype == 3) {
this.entryrecordfilesModal = true this.entryrecordfilesModal = true;
this.$refs.entryrecordfiles.loadpage( this.$refs.entryrecordfiles.loadpage(
params, params,
fill_in_user_type, fill_in_user_type,
'', "",
'', "",
isedit isedit
) );
} else if (params.fillintype == 4) { } else if (params.fillintype == 4) {
this.entryrecorddataModal = true this.entryrecorddataModal = true;
this.$refs.entryrecorddata.loadpage( this.$refs.entryrecorddata.loadpage(
params, params,
fill_in_user_type, fill_in_user_type,
'', "",
'', "",
isedit isedit
) );
} }
}, },
} },
} };
</script> </script>
\ No newline at end of file
<template> <template>
<div class="reve_cont"> <div class="reve_cont">
<Row> <Row>
<Col span="4"> <Col span="4">
<Menu :active-name="actNum" ref="actNum" class="menuBg" @on-select="openView" :theme="themeBg"> <Menu
<MenuItem name="1" replace> :active-name="actNum"
基本信息 ref="actNum"
</MenuItem> class="menuBg"
<MenuItem name="2" replace> @on-select="openView"
工艺信息 :theme="themeBg"
</MenuItem> >
<!-- <MenuItem name="3" replace> <MenuItem name="1" replace> 基本信息 </MenuItem>
专业工艺 <MenuItem
</MenuItem> --> v-for="(li, index) in nameList"
:key="index"
:name="index + 2"
replace
>
{{ li.name }}
</MenuItem>
</Menu> </Menu>
</Col> </Col>
<Col span="20" class="revieweBox"> <Col span="20" class="revieweBox">
<basicView ref="basicView" :baseData="basicData" v-show="basicmodal" /> <component
<mainView ref="mainView" :baseData="basicData" v-show="mainmodal" /> :is="detail"
:baseData="basicData"
:items="items"
@on-close="cancel"
@on-ok="ok"
/>
<!-- <basicView ref="basicView" :baseData="basicData" v-show="basicmodal" />
<mainView ref="mainView" :baseData="basicData" v-show="mainmodal" /> -->
<!-- <dispatched ref="dispatched" :baseData="basicData" v-show="dispatchedmodal"/> --> <!-- <dispatched ref="dispatched" :baseData="basicData" v-show="dispatchedmodal"/> -->
</Col> </Col>
</Row> </Row>
</div> </div>
</template> </template>
<script> <script>
import service from '@/plugins/request' import service from "@/plugins/request";
import basicView from './basicView.vue'; import basicView from "./basicView.vue";
import mainView from './mainView.vue'; import mainView from "./mainView.vue";
import dispatched from './dispatched.vue'; import dispatched from "./dispatched.vue";
export default { export default {
components: { components: {
basicView, basicView,
mainView, mainView,
dispatched dispatched,
}, },
props: { props: {
basicData: null, basicData: null,
actValue: { actValue: {
type: Number, type: Number,
default: 1 default: 1,
}
},
created() {
this.openView(1)
}, },
data() { },
return { created() {
actNum: '1', this.detail = () => import("./basicView");
themeBg: 'light', this.openView(this.actNum);
basicmodal: true, },
mainmodal: false, data() {
dispatchedmodal: false, return {
headerid: '', //暂存传字段 items: {
routingType: '', //工艺类型(主/专业) mesCodeId: this.basicData.id,
diHeaderid: '', //暂存传字段 headerid: 0,
diRoutingType: '', //工艺类型(主/专业) routingType: 0,
disexecuteid: 0, craftData: {},
mainexecuteid: 0 },
} nameList: [],
}, detail: null,
mounted() { actNum: "1",
this.$nextTick(() => { themeBg: "light",
this.actNum == this.$route.path.slice(1) basicmodal: true,
this.$refs.actNum.updateActiveName(); mainmodal: false,
// this.shop = this.$route.path.slice(1) dispatchedmodal: false,
// this.$refs.shop.updateActiveName() headerid: "", //暂存传字段
}) routingType: "", //工艺类型(主/专业)
}, diHeaderid: "", //暂存传字段
methods: { diRoutingType: "", //工艺类型(主/专业)
loaddata(pamasId) { disexecuteid: 0,
this.basicmodal = true; mainexecuteid: 0,
this.mainmodal = false; };
// this.dispatchedmodal= false; },
// console.warn(pamasId) 获取主工艺信息 10030 mounted() {
let url = `${designUrl}/orderrouting/getordersheaderinfo?orderId=` + pamasId; this.actNum = "1";
if (pamasId) { this.loaddata(this.basicData.id);
service.get(`${url}`).then((response) => { },
console.log(response) methods: {
if (response.result.length > 0) { loaddata(pamasId) {
if (response.result[0]) { this.basicmodal = true;
this.$refs.mainView.craftData = response.result[0]; this.mainmodal = false;
this.headerid = response.result[0].id; // this.dispatchedmodal= false;
this.routingType = response.result[0].routingType; // console.warn(pamasId) 获取主工艺信息 10030
this.getmainorder(pamasId) let url =
} `${technologyUrl}orderrouting/getordersheaderinfo?orderId=` + pamasId;
if (response.result[1]) { if (pamasId) {
this.$refs.dispatched.craftData = response.result[1]; service.get(`${url}`).then((response) => {
this.diHeaderid = response.result[1].id; console.log(response);
this.diRoutingType = response.result[1].routingType; if (response.result.length > 0) {
this.getdisorder(pamasId) this.nameList = response.result;
}
//this.$refs.dispatched.getmaterialsupport(pamasId)
} else {
console.log('获取工艺信息为空.')
this.$refs.mainView.craftData = {};
this.$refs.dispatched.craftData = {};
}
})
}
},
// 获取产品号和设备id orderexecute/getorderproductandequip 10050
getmainorder(pamasId) {
let headerid = this.headerid;
let routingType = this.routingType;
let url01 = `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` + pamasId +
`&headerid=` + headerid + `&routingType=` + routingType;
service.get(`${url01}`).then((res) => {
if (res.success) {
if (res.result.equipids) {
let equipids = res.result.equipids;
this.mainexecuteid = res.result.executeid;
this.$refs.mainView.getlistall(equipids)
this.$refs.mainView.getqc(this.mainexecuteid);
let bandleList = res.result.productCode;
let codeList = []; // 编号List
bandleList.map((item, index) => {
codeList.push(item.productcodes)
})
this.$refs.mainView.mainCodeList = codeList
console.warn(codeList) if (response.result[0]) {
} else { this.$refs.mainView.craftData = response.result[0]; //工艺信息
console.log('获取主工艺设备信息数据为空.') // this.headerid = response.result[0].id;
} // this.routingType = response.result[0].routingType;
} else { this.getmainorder(pamasId);
console.log('获取主工艺设备信息数据失败.')
}
}).catch((err) => {
console.log(err)
})
},
getdisorder(pamasId) {
let diHeaderid = this.diHeaderid;
let diRoutingType = this.diRoutingType;
let url02 = `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` + pamasId +
`&headerid=` + diHeaderid + `&routingType=` + diRoutingType;
service.get(`${url02}`).then((res) => {
if (res.success) {
if (res.result.equipids) {
let equipids = res.result.equipids;
this.disexecuteid = res.result.executeid;
this.$refs.dispatched.getlistall(equipids)
this.$refs.dispatched.getqc(this.disexecuteid);
let bandleList = res.result.productCode;
let boardList = []; // 板次List
bandleList.map((item, index) => {
boardList.push(item.boardNumber)
})
this.$refs.dispatched.disCodeList = boardList
console.warn(boardList)
} else {
console.log('获取专业工艺信息数据为空.')
}
} else {
console.log('获取专业工艺信息数据失败.')
}
}).catch((err) => {
console.log(err)
})
},
// 更换左侧
openView(v) {
if (v == 2) {
this.basicmodal = false;
this.mainmodal = true;
// this.dispatchedmodal= false;
this.$refs.mainView.getqc(this.mainexecuteid);
} }
// else if(v==3){ if (response.result[1]) {
// this.basicmodal= false; this.$refs.dispatched.craftData = response.result[1];
// this.mainmodal= false; // this.diHeaderid = response.result[1].id;
// // this.dispatchedmodal= true; // this.diRoutingType = response.result[1].routingType;
//  this.$refs.dispatched.getqc(this.disexecuteid); this.getdisorder(pamasId);
// }
else {
this.basicmodal = true;
this.mainmodal = false;
// this.dispatchedmodal= false;
} }
}, } else {
console.log("获取工艺信息为空.");
this.$refs.mainView.craftData = {};
this.$refs.dispatched.craftData = {};
}
});
}
}, },
watch: { // 获取产品号和设备id orderexecute/getorderproductandequip 10050
basicData: { // getmainorder(pamasId) {
handler(v, o) { // let headerid = this.headerid;
this.loaddata(v.id) // let routingType = this.routingType;
if (v) { // let url01 =
this.actNum == '1' // `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` +
this.openView(1) // pamasId +
} // `&headerid=` +
}, // headerid +
deep: true // `&routingType=` +
}, // routingType;
// service
// .get(`${url01}`)
// .then((res) => {
// if (res.success) {
// if (res.result.equipids) {
// let equipids = res.result.equipids;
// this.mainexecuteid = res.result.executeid;
// this.$refs.mainView.getlistall(equipids);
// this.$refs.mainView.getqc(this.mainexecuteid);
// let bandleList = res.result.productCode;
// let codeList = []; // 编号List
// bandleList.map((item, index) => {
// codeList.push(item.productcodes);
// });
// // this.$refs.mainView.mainCodeList = codeList;
// console.warn(codeList);
// } else {
// console.log("获取主工艺设备信息数据为空.");
// }
// } else {
// console.log("获取主工艺设备信息数据失败.");
// }
// })
// .catch((err) => {
// console.log(err);
// });
// },
// getdisorder(pamasId) {
// let diHeaderid = this.diHeaderid;
// let diRoutingType = this.diRoutingType;
// let url02 =
// `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` +
// pamasId +
// `&headerid=` +
// diHeaderid +
// `&routingType=` +
// diRoutingType;
// service
// .get(`${url02}`)
// .then((res) => {
// if (res.success) {
// if (res.result.equipids) {
// let equipids = res.result.equipids;
// this.disexecuteid = res.result.executeid;
// this.$refs.dispatched.getlistall(equipids);
// this.$refs.dispatched.getqc(this.disexecuteid);
// let bandleList = res.result.productCode;
// let boardList = []; // 板次List
// bandleList.map((item, index) => {
// boardList.push(item.boardNumber);
// });
// this.$refs.dispatched.disCodeList = boardList;
// console.warn(boardList);
// } else {
// console.log("获取专业工艺信息数据为空.");
// }
// } else {
// console.log("获取专业工艺信息数据失败.");
// }
// })
// .catch((err) => {
// console.log(err);
// });
// },
// 更换左侧
openView(v) {
console.log(v);
if (v == 1) {
this.detail = () => import("./basicView");
// this.this.basicmodal = true;
// this.mainmodal = false;
} else {
let i = v - 2;
this.nameList.forEach((e, index) => {
if (i == index) {
this.items.craftData = e;
this.items.headerid = e.id;
this.items.routingType = e.routingType;
}
});
this.detail = () => import("./mainView");
// this.$refs.mainView.getqc(this.mainexecuteid);
}
}, },
} cancel() {},
ok() {},
},
watch: {
basicData: {
handler(v, o) {
this.loaddata(v.id);
if (v) {
this.actNum == "1";
this.openView(this.actNum);
}
},
deep: true,
},
},
};
</script> </script>
<style scoped> <style scoped>
.menuBg { .menuBg {
background: none; background: none;
height: 630px; height: 630px;
} }
.menuBg .ivu-menu-item { .menuBg .ivu-menu-item {
color: #000; color: #000;
} }
.revieweBox { .revieweBox {
padding: 0 0 0 60px; padding: 0 0 0 60px;
height: 630px; height: 630px;
} }
</style> </style>
...@@ -281,7 +281,7 @@ export default { ...@@ -281,7 +281,7 @@ export default {
//追溯 //追溯
this.reviewModal = true; this.reviewModal = true;
this.itemData = item; this.itemData = item;
this.$refs.reviewCount.actNum = "1"; // this.$refs.reviewCount.actNum = "1";
}, },
reviewOk() { reviewOk() {
this.reviewModal = false; this.reviewModal = false;
...@@ -292,7 +292,7 @@ export default { ...@@ -292,7 +292,7 @@ export default {
// this.$refs.reviewCount.$refs.menus.updateActiveName(); // this.$refs.reviewCount.$refs.menus.updateActiveName();
// }) // })
// } // }
this.$refs.reviewCount.actNum = ""; // this.$refs.reviewCount.actNum = "1";
}, },
// 分页 // 分页
pageChange(pageNum) { pageChange(pageNum) {
......
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