Commit ba07d071 by xin.yang
parents ee0f5d9d b7db37a4
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
type="text" type="text"
class="searchInput" class="searchInput"
style="width: 300px" style="width: 300px"
@keyup.enter="getWorkOrderInfo()" v-model="code"
@on-keyup.enter="getWorkOrderInfo()"
/> />
</div> </div>
<div class="row"> <div class="row">
...@@ -105,25 +106,33 @@ ...@@ -105,25 +106,33 @@
<span class="infoLabel" <span class="infoLabel"
>工单信息:</span >工单信息:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
<p class="flex"> <p class="flex">
<span class="infoLabel" <span class="infoLabel"
>产品编号:</span >产品编号:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
<p class="flex"> <p class="flex">
<span class="infoLabel" <span class="infoLabel"
>产品名称:</span >产品名称:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
<p class="flex"> <p class="flex">
<span class="infoLabel" <span class="infoLabel"
>工件编号:</span >工件编号:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
</div> </div>
<div class="row"> <div class="row">
...@@ -131,19 +140,25 @@ ...@@ -131,19 +140,25 @@
<span class="infoLabel" <span class="infoLabel"
>状态:</span >状态:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
<p class="flex"> <p class="flex">
<span class="infoLabel" <span class="infoLabel"
>储位编号:</span >储位编号:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
<p class="flex"> <p class="flex">
<span class="infoLabel" <span class="infoLabel"
>工装编号:</span >工装编号:</span
> >
<span class="info"></span> <span class="info">{{
orderDetail.code
}}</span>
</p> </p>
</div> </div>
<div> <div>
...@@ -173,7 +188,8 @@ ...@@ -173,7 +188,8 @@
class="tableClass" class="tableClass"
:data="data1" :data="data1"
:columns="columns1" :columns="columns1"
:max-height="200" @on-current-change="handleRowChange"
highlight-row
></Table> ></Table>
</div> </div>
<div slot="footer"> <div slot="footer">
...@@ -209,15 +225,13 @@ export default { ...@@ -209,15 +225,13 @@ export default {
attr1: false, //上料、下料、上下料 attr1: false, //上料、下料、上下料
attr2: false, //上料、下料、上下料 attr2: false, //上料、下料、上下料
modal: false, modal: false,
code: "", //工令单
columns1: [ columns1: [
{ {
title: this.$t("1008"), title: this.$t("1008"),
key: "xuhao", key: "xuhao",
render: (h, params) => { render: (h, params) => {
return h( return h("span", params.index + 1);
"span",
params.index + 1
);
}, },
width: 70, width: 70,
}, },
...@@ -244,10 +258,7 @@ export default { ...@@ -244,10 +258,7 @@ export default {
title: this.$t("1008"), title: this.$t("1008"),
key: "xuhao", key: "xuhao",
render: (h, params) => { render: (h, params) => {
return h( return h("span", params.index + 1);
"span",
params.index+ 1
);
}, },
width: 70, width: 70,
}, },
...@@ -265,6 +276,8 @@ export default { ...@@ -265,6 +276,8 @@ export default {
}, },
], ],
data2: [], data2: [],
orderDetail: {},
detailobj:{}
}; };
}, },
created() { created() {
...@@ -326,7 +339,6 @@ export default { ...@@ -326,7 +339,6 @@ export default {
if (res.data.ret == 1) { if (res.data.ret == 1) {
this.data1 = res.data.data; this.data1 = res.data.data;
this.data2 = res.data.data; this.data2 = res.data.data;
} }
}) })
.catch((err) => { .catch((err) => {
...@@ -335,9 +347,17 @@ export default { ...@@ -335,9 +347,17 @@ export default {
}, },
// 获取工单信息 // 获取工单信息
getWorkOrderInfo() { getWorkOrderInfo() {
this.request("", "", "") let data = {
code: this.code,
};
this.request("/acc/AutomationOperate/ScanCode", data, "get")
.then((res) => { .then((res) => {
if (res.data.ret == 1) { if (res.data.ret == 1) {
console.log(res.data.data);
this.orderDetail = res.data.data;
} else {
this.$Message.error(this.$t(res.data, msg));
} }
}) })
.catch((err) => { .catch((err) => {
...@@ -349,28 +369,31 @@ export default { ...@@ -349,28 +369,31 @@ export default {
// 准备上料 // 准备上料
let data = { let data = {
section: 13, section: 13,
code: "234324", code: "234324",
}; };
this.request("/acc/AutomationOperate/Loading", data, "post").thne((res) => { this.request("/acc/AutomationOperate/Loading", data, "post").thne(
if (res.data.ret == 1) { (res) => {
if (res.data.ret == 1) {
}
} }
}); );
}, },
installOver() { installOver() {
// 安装完成 // 安装完成
let data = { let data = {
section: 13 section: 13,
}; };
this.request("", data, "post").thne( this.request("", data, "post").thne((res) => {
(res) => { if (res.data.ret == 1) {
if (res.data.ret == 1) {
}
} }
); });
}, },
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
},
request(url, data, type) { request(url, data, type) {
if (type == "get") { if (type == "get") {
return this.axios return this.axios
......
<template> <template>
<div class="testdiv"> <div class="testdiv">
工装装配信息
<div class="divborder"> <div class="divborder">
<h2>基本信息</h2> <h2>基本信息</h2>
<div class="newSearchDiv"> <div class="newSearchDiv">
...@@ -10,19 +9,19 @@ ...@@ -10,19 +9,19 @@
label-in-value label-in-value
clearable clearable
filterable filterable
v-model="category"
class="searchSelect" class="searchSelect"
> >
</Select> </Select>
<Cascader class="searchSelect" :data="typeTree" clearable change-on-select v-model="category" @on-change="changeFrockType"></Cascader>
</div> </div>
<div class="filter"> <div class="filter">
<label>工装编号:</label> <label>工装编号:</label>
<Select <Input type="text" class="searchInput" v-model="number" />
label-in-value </div>
clearable <div class="filter">
filterable <label>工装名称:</label>
class="searchSelect" <Input type="text" class="searchInput" v-model="name" />
>
</Select>
</div> </div>
<div class="filter"> <div class="filter">
<label>状态:</label> <label>状态:</label>
...@@ -30,8 +29,11 @@ ...@@ -30,8 +29,11 @@
label-in-value label-in-value
clearable clearable
filterable filterable
v-model="state"
class="searchSelect" class="searchSelect"
> >
<Option :value="1">可用</Option>
<Option :value="0">停用</Option>
</Select> </Select>
</div> </div>
...@@ -83,12 +85,12 @@ ...@@ -83,12 +85,12 @@
:on-error="handleError" :on-error="handleError"
:format="['xlsx']" :format="['xlsx']"
> --> > -->
<Button <Button
type="primary" type="primary"
class="fourWord" class="fourWord"
icon="md-cloud-upload" icon="md-cloud-upload"
>{{ $t("1006") }}</Button >{{ $t("1006") }}</Button
> >
<!-- </Upload> --> <!-- </Upload> -->
<Button <Button
type="primary" type="primary"
...@@ -115,6 +117,103 @@ ...@@ -115,6 +117,103 @@
</div> </div>
</div> </div>
</div> </div>
<Modal
class="newModalClass"
v-model="modal"
:styles="{ width: '900px' }"
>
<p slot="header">
<span v-show="type == 1">{{ $t("1002") }}</span>
<span v-show="type == 2">{{ $t("1003") }}</span>
</p>
<div class="demo-spin-col">
<Spin fix v-if="spinShow">
<div>正在上传...</div>
</Spin>
<div class="filter">
<label>父工装类别:</label>
<Cascader
class="searchSelect"
:data="frockTypeTree"
v-model="parentType"
change-on-select
@on-change="changeFrockType1"
></Cascader>
</div>
<div class="filter">
<label><i>*</i>父工装信息:</label>
<Input type="text" class="searchInput" />
</div>
<div class="filter">
<label><i>*</i>父工装编号:</label>
<Input type="text" class="searchInput" />
</div>
<div style="padding-left: 50px">
<div class="filter">
<label>子工装类别:</label>
<Cascader
class="searchSelect"
:data="frockTypeTree"
v-model="parentType"
change-on-select
@on-change="changeFrockType1"
></Cascader>
</div>
<div class="filter">
<label><i>*</i>子工装信息:</label>
<Input type="text" class="searchInput" />
</div>
<div class="filter">
<label><i>*</i>子工装编号:</label>
<Input type="text" class="searchInput" />
</div>
</div>
<div class="filter">
<label>备注:</label>
<Input
type="text"
class="searchInput"
v-model="addremark"
/>
</div>
<div>
<label>上传文件:</label>
<div class="accountInfoUploadFile">
<Upload
ref="upload"
:show-upload-list="false"
:on-success="handleSuccess1"
:before-upload="handleBeforeUpload"
:on-error="handleError1"
type="drag"
:headers="headers"
:action="UploadAction"
>
<div class="descicon" style="">
<Icon type="md-cloud-upload" size="15"></Icon>
<span>上传文件</span>
</div>
</Upload>
<div v-show="filename" class="hasfile">
{{ filename
}}<Icon
@click.native="delfile"
type="ios-close-circle"
size="15"
/>
</div>
</div>
</div>
</div>
<div slot="footer">
<Button type="text" size="large" @click="addmodal = false">{{
$t("1033")
}}</Button>
<Button type="primary" size="large" @click="addPost()">{{
$t("1011")
}}</Button>
</div>
</Modal>
</div> </div>
</template> </template>
...@@ -122,7 +221,7 @@ ...@@ -122,7 +221,7 @@
export default { export default {
data() { data() {
return { return {
columns1:[ columns1: [
{ {
type: "index2", type: "index2",
title: this.$t("1008"), title: this.$t("1008"),
...@@ -135,106 +234,153 @@ export default { ...@@ -135,106 +234,153 @@ export default {
}, },
}, },
{ {
title:'工装类型', title: "工装类型",
key:'category' key: "category",
}, },
{ {
title:'管理类型', title: "管理类型",
key:'managetype', key: "managetype",
render:(h,params)=>{ render: (h, params) => {
let str = ''; let str = "";
if(params.row.managetype===1){ if (params.row.managetype === 1) {
str = '单件'; str = "单件";
}else if(params.row.managetype===2){ } else if (params.row.managetype === 2) {
str = '批次'; str = "批次";
} }
return h('span',str); return h("span", str);
} },
}, },
{ {
title:'工装料号', title: "工装料号",
key:'partnumber' key: "partnumber",
}, },
{ {
title:'工装名称', title: "工装名称",
key:'name' key: "name",
}, },
{ {
title:'工装编号', title: "工装编号",
key:'code' key: "code",
}, },
{ {
title:'规格型号', title: "规格型号",
key:'specification' key: "specification",
}, },
{ {
title:'数量', title: "数量",
key:'number' key: "number",
}, },
{ {
title:'状态', title: "状态",
key:'status', key: "status",
render:(h,params)=>{ render: (h, params) => {
let str = ''; let str = "";
if(params.row.status===1){ if (params.row.status === 1) {
str = '可用'; str = "可用";
}else{ } else {
str = '停用'; str = "停用";
} }
return h('span',str); return h("span", str);
} },
}, },
{ {
title:'备注', title: "备注",
key:'remark' key: "remark",
}, },
{ {
title:'附件', title: "附件",
key:'filename', key: "filename",
render:(h,params)=>{ render: (h, params) => {
return h('span',{ return h(
style:{ "span",
color:'#2b85e4', {
cursor:'pointer' style: {
color: "#2b85e4",
cursor: "pointer",
},
on: {
click: () => {
let name = params.row.filename;
let url = params.row.fileurl;
if (url) {
this.downFile(url, name);
}
},
},
}, },
on:{ params.row.filename
click:()=>{ );
let name = params.row.filename; },
let url = params.row.fileurl;
if(url){
this.downFile(url,name);
}
}
}
},params.row.filename);
}
}, },
{ {
title:'维护人', title: "维护人",
key:'updator' key: "updator",
}, },
{ {
title:'维护时间', title: "维护时间",
key:'updatetime' key: "updatetime",
} },
], ],
data1: [], data1: [],
total: 0, total: 0,
page: 1, page: 1,
pagesize: 10, pagesize: 10,
modal: false,
type: 0,
typeTree:[],
category: [],
number: "",
name: "",
state: '',
}; };
}, },
created() { created() {
this.columns1 = this.$time.initTableTitle(this.columns1); this.columns1 = this.$time.initTableTitle(this.columns1);
}, },
methods: { methods: {
search(page,pagesize){}, search(page, pagesize) {
add(){}, let data = {
edit(){}, category: this.category, //工装类型id
dele(){}, code: this.number,
loadExcel(){}, name: this.name,
exportEecel(){}, state: this.state, //0停用 1可用
page: this.page,
pagesize: this.pagesize,
toexcel: 0, //0查询 1导出
};
this.request(
"acc/FixtureToolsAssembly/GetPageList",
data,
"get"
).then((res) => {
if (res.data.ret == 1) {
this.data1 = res.data.data;
}
});
},
add() {
this.modal = true;
this.type = 1;
},
edit() {},
dele() {},
loadExcel() {},
exportEecel() {},
request(url, data, type) {
if (type == "get") {
return this.axios.request({
url: url,
params: data,
method: type,
});
} else {
return this.axios.request({
url: url,
data,
method: type,
});
}
},
}, },
}; };
</script> </script>
......
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