Commit 1912d10a by xin.yang
parents 65a889f2 4081bdb5
......@@ -41,9 +41,11 @@
<span class="red">*</span>
</p>
<Tabs type="card">
<TabPane label="上料">
<TabPane label="上料" :disabled="attr1">
<div class="filter">
<label>上料信息:</label>
<label style="font-size: 16px"
>上料信息:</label
>
<Input
type="text"
class="searchInput"
......@@ -81,20 +83,86 @@
<span class="infoLabel">工装编号:</span>
<span class="info"></span>
</p>
<Button type="primary">储位选择</Button>
<Button type="primary" @click="modal = true"
>储位选择</Button
>
</div>
<div>
<Button type="primary">准备上料</Button>
<Button type="primary">安装完成</Button>
</div>
</TabPane>
<TabPane label="下料">下料</TabPane>
<TabPane label="下料" :disabled="attr2"
><div class="flex">
<div>
<Table
class="tableClass"
:data="data2"
:columns="columns2"
:max-height="200"
style="width: 500px"
></Table>
</div>
<div>
<div class="row">
<p class="flex">
<span class="infoLabel"
>工单信息:</span
>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel"
>产品编号:</span
>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel"
>产品名称:</span
>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel"
>工件编号:</span
>
<span class="info"></span>
</p>
</div>
<div class="row">
<p class="flex">
<span class="infoLabel"
>状态:</span
>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel"
>储位编号:</span
>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel"
>工装编号:</span
>
<span class="info"></span>
</p>
</div>
<div>
<Button type="primary">准备上料</Button>
<Button type="primary">安装完成</Button>
</div>
</div>
</div></TabPane
>
</Tabs>
<Modal
class="newModalClass"
:title="$t(900249)"
title="储位选择"
v-model="modal"
:styles="{ width: '940px' }"
:styles="{ width: '700px' }"
>
<div class="modal_body" style="padding-right: 40px">
<Table
......@@ -115,7 +183,6 @@
<Button
type="primary"
size="large"
v-text="$t('1011')"
>提交</Button
>
......@@ -132,17 +199,153 @@ export default {
data() {
return {
productionLine: [],
a: 0,
modal:false,
columns1:[],
data1:[]
stationList: [],
a: -1,
attr1: false, //上料、下料、上下料
attr2: false, //上料、下料、上下料
modal: false,
columns1: [
{
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
width: 70,
},
{
title: "仓库",
key: "warehouse",
},
{
title: "储位编号",
key: "storage_sn",
},
{
title: "工装编号",
key: "install_sn",
},
{
title: "工件编号",
key: "workpiece_sn",
},
],
data1: [],
columns2: [
{
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
width: 70,
},
{
title: "储位编号",
key: "storage_sn",
},
{
title: "工装编号",
key: "install_sn",
},
{
title: "工件编号",
key: "workpiece_sn",
},
],
data2: [],
};
},
created() {},
created() {
this.getProLine();
},
mounted() {
// this.getStations()
},
methods: {
// 获取生产线
getProLine() {
this.axios
.request({
url: "/qms/RepairPostionSetting/GetChanel",
method: "get",
})
.then((res) => {
this.productionLine = res.data.data;
// this.change(0);
if (this.productionLine.length == 0) {
this.$Message.error(this.$t(950057));
}
});
},
getStations(id) {
this.request(
"/qms/RepairPostionSetting/GetSettingByChanel?Id=" + id,
"",
"get"
).then((res) => {
// console.log(res.data.data);
if (res.data.ret == 1) {
this.stationList = res.data.data;
}
});
},
change(i) {
this.a = i;
// 1. 选中产线后自动带出来工位属性中为上下料属性的工位
this.getStations(this.productionLine[i].id);
},
//获取储位
getStorages() {
this.request("", "", "")
.then((res) => {
if (res.data.ret == 1) {
}
})
.catch((err) => {
console.log(err);
});
},
// 获取工单信息
getWorkOrderInfo() {
this.request("", "", "")
.then((res) => {
if (res.data.ret == 1) {
}
})
.catch((err) => {
console.log(err);
});
},
request(url, data, type) {
if (type == "get") {
return this.axios
.request({
url: url,
params: data,
method: type,
})
.then((res) => {
return res;
})
.catch((error) => error);
} else {
return this.axios
.request({
url: url,
data,
method: type,
})
.then((res) => {
return res;
})
.catch((error) => error);
}
},
},
};
......@@ -199,4 +402,10 @@ export default {
width: 200px;
font-size: 20px;
}
.ivu-btn {
margin: 10px;
}
.m010 {
margin: 0 10px;
}
</style>
\ No newline at end of file
<template>
<div>
产线监控管理
</div>
<div>
<div class="divborder">
<h2>基本信息</h2>
<div class="newSearchDiv">
<div class="filter">
<label>{{ $t("1950574") }}</label>
<Cascader trigger="click" class="searchSelect"></Cascader>
</div>
<div class="searchBtn">
<Button type="primary" class="twoWord" icon="ios-search">{{
$t("1001")
}}</Button>
<Button type="primary" class="twoWord" icon="ios-search"
>导出</Button
>
</div>
</div>
</div>
<div class="divborder">
<div class="stateTitle flex">
<p><span>4</span>生产中</p>
<p><span>4</span>待下料</p>
<p><span>4</span>待上料</p>
<p><span>4</span>不可用</p>
</div>
<div class="stateWrap">
<div class="stateItem">
<p class="flex">
<span class="infoLabel">工位:</span>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel">产品:</span>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel">工装:</span>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel">储位:</span>
<span class="info"></span>
</p>
<p class="flex">
<span class="infoLabel">工件:</span>
<span class="info"></span>
</p>
</div>
</div>
<Table
class="tableClass"
:data="data1"
:columns="columns1"
:max-height="200"
></Table>
<Table
class="tableClass"
:data="data2"
:columns="columns2"
:max-height="200"
></Table>
<Table
class="tableClass"
:data="data3"
:columns="columns3"
:max-height="200"
></Table>
</div>
</div>
</template>
<script>
export default {
}
data() {
return {
productionLine: [],
a: 0,
modal: false,
columns1: [
{
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
width: 70,
},
{
title: "产线层级",
key: "warehouse",
},
{
title: "设备",
key: "storage_sn",
},
{
title: "工装编号",
key: "install_sn",
},
{
title: "产品编号",
key: "workpiece_sn",
},
{
title: "工件编号",
key: "storage_sn",
},
{
title: "状态",
key: "install_sn",
},
{
title: "最后更新时间",
key: "workpiece_sn",
},
],
data1: [],
columns2: [
{
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
width: 70,
},
{
title: "父工装类别",
key: "warehouse",
},
{
title: "父工装编号",
key: "storage_sn",
},
{
title: "父工装名称",
key: "install_sn",
},
{
title: "父工装规格",
key: "workpiece_sn",
},
{
title: "父工装编号",
key: "storage_sn",
},
{
title: "子工装类别",
key: "install_sn",
},
{
title: "最后更新时间",
key: "workpiece_sn",
},
],
data1: [],
columns3: [
{
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
width: 70,
},
{
title: "产线层级",
key: "warehouse",
},
{
title: "设备",
key: "storage_sn",
},
{
title: "工装编号",
key: "install_sn",
},
{
title: "产品编号",
key: "workpiece_sn",
},
{
title: "工件编号",
key: "storage_sn",
},
{
title: "状态",
key: "install_sn",
},
{
title: "最后更新时间",
key: "workpiece_sn",
},
],
data1: [],
};
},
created() {},
};
</script>
<style>
<style lang="less" scoped>
.flex {
display: flex;
}
.stateWrap {
margin: 20px 10px;
}
.stateItem {
border: 1px solid #000;
width: 200px;
height: 150px;
padding-left: 10px;
p {
height: 30px;
line-height: 30px;
font-size: 16px;
}
}
.stateTitle {
p {
font-size: 20px;
width: 150px;
height: 40px;
line-height: 40px;
span {
display: inline-block;
margin: 0 10px;
text-align: center;
width: 40px;
height: 40px;
color: #fff;
// border: 1px solid #333;
}
}
p:nth-child(1) span {
background-color: #2db7f5;
}
p:nth-child(2) span {
background-color: #19be6b;
}
p:nth-child(3) span {
background-color: #ff9900;
}
p:nth-child(4) span {
background-color: #ed4014;
}
}
</style>
\ No newline at end of file
<template>
<div class="testdiv">
\任务清单管理
<div class="divborder">
<h2>基本信息</h2>
<div class="newSearchDiv">
<div class="filter">
<label>{{ $t("1950574") }}</label>
<Cascader trigger="click" class="searchSelect"></Cascader>
<label>{{ $t("1132") }}</label>
<Cascader
trigger="click"
class="searchSelect"
:data="datalevel"
:value="leveldata"
></Cascader>
</div>
<div class="filter">
<label>任务类型:</label>
......@@ -83,17 +87,33 @@
></DatePicker>
</div>
<div class="searchBtn">
<Button type="primary" class="twoWord" icon="ios-search">{{
$t("1001")
}}</Button>
<Button
type="primary"
class="twoWord"
icon="ios-search"
@click="search()"
>{{ $t("1001") }}</Button
>
<!-- -->
<Button type="primary" class="twoWord" icon="ios-search"
<Button
type="warning"
class="twoWord"
icon="ios-search"
@click="cancel()"
>取消</Button
><!--只有状态是待执行的可以改成取消-->
<Button type="primary" class="twoWord" icon="ios-search"
<Button
type="primary"
class="twoWord"
icon="ios-search"
@click="manual()"
>手动</Button
><!--当生产线的模式是手动是才可以进行手动任务执行-->
<Button type="primary" class="twoWord" icon="ios-search"
<Button
type="primary"
class="twoWord"
icon="ios-search"
@click="exportExcel()"
>导出</Button
>
</div>
......@@ -121,22 +141,91 @@
export default {
data() {
return {
leveldata: [], // 产线层级插件所需数据
datalevel: [], // 产线层级选中数据
columns1: [
{
title: this.$t('1008'),
key: 'xuhao',
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
'span',
"span",
params.index + (this.page - 1) * this.pagesize + 1
);
},
width: 70
width: 70,
},
{
title: "任务清单",
key: "productcode",
},
{
title: "产线层级",
key: "productcode",
},
{
title: "触发方",
key: "productcode",
},
{
title: "任务类型",
key: "productcode",
},
{
title: this.$t('100089'),
key: 'productcode',
minWidth: 150
title: "发起地",
key: "productcode",
},
{
title: "工件编号",
key: "productcode",
},
{
title: "工单编号",
key: "productcode",
},
{
title: "产品编号",
key: "productcode",
},
{
title: "工序编号",
key: "productcode",
},
{
title: "工序",
key: "productcode",
},
{
title: "程序号",
key: "productcode",
},
{
title: "储位位置",
key: "productcode",
},
{
title: "工装编号",
key: "productcode",
},
{
title: "动作",
key: "productcode",
},
{
title: "执行类型",
key: "productcode",
},
{
title: "状态",
key: "productcode",
},
{
title: "触发时间",
key: "productcode",
},
{
title: "完成时间",
key: "productcode",
},
],
data1: [],
......@@ -147,8 +236,30 @@ export default {
},
created() {
this.columns1 = this.$time.initTableTitle(this.columns1);
this.initlevel()
},
methods: {
search() {},
cancel() {},
manual() {},
exportExcel() {},
initlevel() {
// 初始化产线层级
this.axios
.request({
url: "config/ProjectLevelSection/GetSectionTree",
method: "get",
})
.then((res) => {
const arr = [];
if (res.data.data.length > 0) {
this.datalevel = res.data.data;
arr.push(res.data.data[0].value);
this.leveldata = arr;
}
});
},
},
methods: {},
};
</script>
......
......@@ -7,14 +7,11 @@
</div>
<div class="filter">
<label>工装编号:</label>
<Select v-model="frockCode" label-in-value clearable filterable filter-by-label class="searchSelect">
<Option
v-for="(item,index) in frockList"
:value="item.id"
:key="index"
:label="item.name"
>{{ item.name }}</Option>
</Select>
<Input type="text" class="searchInput" v-model="frockcode" />
</div>
<div class="filter">
<label>工装名称:</label>
<Input type="text" class="searchInput" v-model="frockname" />
</div>
<div class="filter">
<label>状态:</label>
......@@ -26,10 +23,10 @@
<div class="searchBtn">
<Button type="primary" class="twoWord" icon="ios-search" @click="tosearch()">{{ $t(1001) }}</Button>
<Button type="success" class="twoWord" icon="md-add-circle" @click="add()">{{$t('1002')}}</Button>
<!-- <Button type="warning" class="twoWord" icon="ios-create-outline" @click="edit()">{{$t('1003')}}</Button>
<Button type="error" class="twoWord intervalRight" icon="md-close-circle" @click="dele()">{{ $t(1004) }}</Button>
<Button type="warning" class="twoWord" icon="ios-create-outline" @click="edit()">{{$t('1003')}}</Button>
<!-- <Button type="error" class="twoWord intervalRight" icon="md-close-circle" @click="dele()">{{ $t(1004) }}</Button> -->
<Button type="primary" class="fourWord" icon="md-download" @click="loadexcel()">{{$t('1005')}}</Button>
<Upload
<!-- <Upload
style="display:inline-block"
ref="upload"
:action="action"
......@@ -79,33 +76,40 @@
<span v-show="type==1">{{$t('1002')}}</span>
<span v-show="type==2">{{$t('1003')}}</span>
</p>
<div style="">
<div class="demo-spin-col">
<Spin fix v-if="spinShow">
<div>正在上传...</div>
</Spin>
<div class="filter">
<label>工装类型:</label>
<Cascader class="searchSelect" :data="frockTypeTree" change-on-select v-model="parentType" @on-change="changeFrockType1"></Cascader>
<label><i>*</i>工装类型:</label>
<Cascader class="searchSelect" :data="frockTypeTree" v-model="parentType" change-on-select @on-change="changeFrockType1"></Cascader>
</div>
<div class="filter">
<label><i>*</i>管理类型:</label>
<Select v-model="mtype" clearable class="searchSelect">
<Select v-model="addmtype" class="searchSelect">
<Option :value="1">单件</Option>
<Option :value="2">批次</Option>
</Select>
</div>
<div class="filter">
<label><i>*</i>工装名称:</label>
<Input type="text" class="searchInput" v-model="frockname" />
<Input type="text" class="searchInput" v-model="addfrockname" />
</div>
<div class="filter">
<label><i>*</i>工装料号:</label>
<Input type="text" class="searchInput" v-model="frockno" />
<Input type="text" class="searchInput" v-model="addfrockno" />
</div>
<div class="filter">
<label><i>*</i>工装编号:</label>
<Input type="text" class="searchInput" v-model="frockcode" />
<Input type="text" class="searchInput" v-model="addfrockcode" />
</div>
<div class="filter">
<label><i>*</i>规格型号:</label>
<Input type="text" class="searchInput" v-model="addfrockspec" />
</div>
<div class="filter">
<label><i>*</i>数量:</label>
<InputNumber type="text" class="searchInput" :formatter="value => `${parseInt(value)}`" v-model="num" />
<InputNumber type="text" class="searchInput" :min="1" :formatter="value => `${parseInt(value)}`" v-model="addnum" />
</div>
<div class="filter">
<label><i>*</i>状态:</label>
......@@ -116,19 +120,26 @@
</div>
<div class="filter">
<label>备注:</label>
<Input type="text" class="searchInput" v-model="remark" />
<Input type="text" class="searchInput" v-model="addremark" />
</div>
<div class="filter">
<div>
<label>上传文件:</label>
<div class="frockUploadFile">
<div class="accountInfoUploadFile">
<Upload
:before-upload="handleUpload"
ref="upload"
:show-upload-list="false"
:on-success="handleSuccess"
:before-upload="handleBeforeUpload"
:on-error="handleError"
type="drag"
:headers="headers"
:action="fileAction">
<Button class="UFbtn" icon="ios-cloud-upload-outline" :title="filename">{{filename?filename:'上传文件'}}</Button>
: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>
......@@ -147,8 +158,8 @@ export default {
frockTypeTree:[],//树形结构
frockType:[],//工装类型
frockTypeid:'',
frockList:[],//工装编号
frockCode:'',//工装编号
frockcode:'',//工装编号
frockname:'',//工装名称
status:'',//状态
//列表
......@@ -170,108 +181,137 @@ export default {
},
{
title:'工装类型',
key:''
key:'category'
},
{
title:'管理类型',
key:''
key:'managetype',
render:(h,params)=>{
let str = '';
if(params.row.managetype===1){
str = '单件';
}else if(params.row.managetype===2){
str = '批次';
}
return h('span',str);
}
},
{
title:'工装料号',
key:''
key:'partnumber'
},
{
title:'工装名称',
key:''
key:'name'
},
{
title:'工装编号',
key:''
key:'code'
},
{
title:'规格型号',
key:''
key:'specification'
},
{
title:'数量',
key:''
key:'number'
},
{
title:'状态',
key:''
key:'status',
render:(h,params)=>{
let str = '';
if(params.row.status===1){
str = '可用';
}else{
str = '停用';
}
return h('span',str);
}
},
{
title:'备注',
key:''
key:'remark'
},
{
title:'附件',
key:''
key:'filename',
render:(h,params)=>{
return h('span',{
style:{
color:'#2b85e4'
}
},params.row.filename);
}
},
{
title:'维护人',
key:''
key:'updator'
},
{
title:'维护时间',
key:''
key:'updatetime'
}
],
//弹窗
detailobj:{},
addmodal:false,
type:0,//1添加 2编辑
parentType:[],//父级类型
parentTypeid:'',
frockTypename:'',//工装类型名称
mtype:'',//管理类型
frockname:'',//工装名称
frockno:'',//工装料号
frockcode:'',//工装编号
num:0,
addmtype:1,//管理类型
addfrockname:'',//工装名称
addfrockno:'',//工装料号
addfrockcode:'',//工装编号
addnum:0,
addstatus:'1',//状态 1可用 0停用
remark:'',//备注
addfrockspec:'',//规格型号
addremark:'',//备注
filename: '',//文件名称
fileurl:'',//文件路径
loadingStatus: false,
fileAction: this.axios.publicPath + "config/upload/UploadImage",
UploadAction: this.axios.publicPath + "config/upload/UploadImage",
headers: {
token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"),
nonce: localStorage.getItem("nonce"),
sign: localStorage.getItem("sign"),
},
spinShow:false,
}
},
created(){
this.initFrockType();//工装类型
this.tosearch();
this.tableColumns1 = this.$time.initTableTitle(this.tableColumns1);
},
methods:{
//工装类型
initFrockType(){
// this.axios.request({
// url: "/fms/typeMaintenance/frockTypeList",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret == 1) {
// let arr = res.data.data.children;
// this.frockTypeTree = arr;
// this.contentTree(arr);
// }
// });
this.axios.request({
url: "/acc/FixtureTools/GetCategoryList",
method: "get",
})
.then((res) => {
if (res.data.ret == 1) {
let arr = res.data.data;
this.contentTree(arr);
this.frockTypeTree = arr;
}
});
},
contentTree (arr) {
arr.forEach(ele => {
ele.disabled = false;
ele.value = ele.id;
ele.label = ele.name;
if (
ele.children.length != 0 &&
ele.children != undefined &&
ele.children != null
ele.children != null &&
ele.children.length != 0
) {
this.contentTree(ele.children);
}else{
ele.children = []
}
});
},
......@@ -283,8 +323,10 @@ export default {
},
changeFrockType1(value){
this.parentTypeid = "";
this.parentType = [];
if(value!=undefined && value.length){
this.parentTypeid = value[value.length - 1];
this.parentType = value;
}
},
//获取工装列表
......@@ -308,64 +350,190 @@ export default {
},
search(toexcel){
let params = {
frockTypeid:this.frockType,//工装类型id
frockid:this.frockCode, //工装id
staus:this.status, //0停用 1可用
category:this.frockType,//工装类型id
code:this.frockcode,
name:this.frockname,
state:this.status, //0停用 1可用
page:this.page,
pagesize:this.pagesize,
toexcel:toexcel //0查询 1导出
}
this.detailobj = {};
// this.axios.request({
// url: "/fms/accountInfo/search",
// params,
// method: "get",
// })
// .then((res) => {
// if(toexcel === 1){
// if (res.data.ret === 1) {
// window.location.href =
// axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// }
// else{
// this.total = 0;
// this.tableData1 = [];
// let data = res.data.data;
// if (res.data.ret == 1 &&Array.isArray(data)&&data.length) {
// this.total = res.data.total;
// this.tableData1 = res.data.data;
// }
// }
// });
this.axios.request({
url: "/acc/FixtureTools/GetPageList",
params,
method: "get",
})
.then((res) => {
if(toexcel === 1){
if (res.data.ret === 1) {
window.location.href =
axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
}
else{
this.total = 0;
this.tableData1 = [];
let data = res.data.data;
if (res.data.ret == 1 &&Array.isArray(data)&&data.length) {
this.total = res.data.total;
this.tableData1 = res.data.data;
}
}
});
},
add(){
this.type = 1;
this.parentType = [];//工装类型 清空
this.parentTypeid = '';
this.addmtype = 1;//管理类型
this.addfrockname = '';//工装名称
this.addfrockno = '';//工装料号
this.addfrockcode = '';//工装编号
this.addnum = 1;
this.addfrockspec = '';
this.addstatus = '1';//状态 1可用 0停用
this.addremark = '';//备注
this.filename = '';//文件名称
this.fileurl = '';//文件路径
this.addmodal = true;
},
handleUpload (file) {
this.file = file;
return false;
},
handleSuccess (res) {
console.log(222222)
console.log(res)
this.loadingStatus = true;
setTimeout(() => {
this.file = null;
this.loadingStatus = false;
this.$Message.success('Success')
}, 1500);
},
handleError(error){
console.log(1111111)
console.log(error)
edit(){
if(!this.detailobj || !this.detailobj.id){
this.$Message.error(this.$t('1017'));
return false;
}
this.type = 2;
this.parentTypeid = this.detailobj.categoryid;
this.parentType = this.detailobj.categoryids;
this.addmtype = this.detailobj.managetype;//管理类型
this.addfrockname = this.detailobj.name;//工装名称
this.addfrockno = this.detailobj.partnumber;//工装料号
this.addfrockcode = this.detailobj.code;//工装编号
this.addnum = this.detailobj.number;
this.addfrockspec = this.detailobj.specification;
this.addstatus = this.detailobj.status+'';//状态 1可用 0停用
this.addremark = this.detailobj.remark;//备注
this.filename = this.detailobj.filename;//文件名称
this.fileurl = this.detailobj.fileurl;//文件路径
this.addmodal = true;
},
addPost(){
if(!this.parentTypeid){
this.$Message.error("请选择工装类型");
return false;
}
if(!this.addfrockname){
this.$Message.error("请输入工装名称");
return false;
}
if(!this.addfrockno){
this.$Message.error("请输入工装料号");
return false;
}
if(!this.addfrockcode){
this.$Message.error("请输入工装编号");
return false;
}
if(!this.addfrockspec){
this.$Message.error("请输入规格型号");
return false;
}
if(!this.addnum){
this.$Message.error("请输入工装数量");
return false;
}
let url = '';
let id = '';
if(this.type === 1){
url = '/acc/FixtureTools/Add';
id = 0;
}
else{
url = '/acc/FixtureTools/Update';
id = this.detailobj.id;
}
let data = {
id:id,
categoryid:this.parentTypeid,//工装类型id
managetype:this.addmtype,
partnumber:this.addfrockno,//料号
code:this.addfrockcode,//编号
name:this.addfrockname,//名称
specifition:this.addfrockspec,//规格型号
number:this.addnum,//数量
remark:this.addremark,//备注
status:this.addstatus,//附件
fileurl:this.fileurl,
filename:this.filename
}
this.axios.request({
url: url,
data,
method: "post",
}).then((res) => {
if (res.data.ret == 1) {
this.addmodal = false;
if(this.type===1){
this.tosearch();
this.$Message.success(this.$t('1055'));
}
else{
this.$Message.success(this.$t('1060'));
this.search(0);
}
} else {
this.$Message.error(this.$t(res.data.msg+''));
}
});
},
/*********文件上传 start******** */
handleBeforeUpload(file){
this.spinShow = true;
if(!file){
this.spinShow = false;
return false;
}
},
handleSuccess (res,file) {
this.spinShow = false;
if (res.ret == 1) {
this.$Message.success(this.$t("100378"));
this.filename = file.name;
this.fileurl = res.data;
} else {
this.$Message.error(this.$t(res.msg+''));
}
},
handleError(){
this.$Message.error(this.$t("600512") + "!");
},
delfile(){
this.filename = '';
this.fileurl = '';
},
/*********文件上传 end******** */
//导出模板
loadexcel() {
// this.axios.request({
// url: "/config/Download/GetTemplate?name=StorageLocation",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret === 1) {
// window.location.href =
// this.axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// });
},
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
},
......@@ -381,13 +549,39 @@ export default {
}
}
</script>
<style lang="less" scoped>
.frockUploadFile{
<style lang="less">
.accountInfoUploadFile{
display:inline-block;
.UFbtn{
width:140px;
height:29px;
line-height: 15px;
position: relative;
left: 5px;
.ivu-upload{
display: inline-block;
width: 140px;
height: 29px;
vertical-align: middle;
.descicon{
width: 140px;
height:29px;
line-height: 29px;
}
}
.ivu-upload-drag{
border:1px solid #dcdee2!important;
}
.ivu-upload-drag:hover {
border: 1px solid #2d8cf0!important;
}
.hasfile{
display: inline-block;
position: relative;
left: -140px;
top: 29px;
i{
color: red;
font-size: 15px;
cursor: pointer;
vertical-align: top;
}
}
}
</style>
\ No newline at end of file
......@@ -134,6 +134,7 @@ export default {
created(){
this.initFrockType();//工装类型树形结构
this.tosearch();
this.tableColumns1 = this.$time.initTableTitle(this.tableColumns1);
},
methods:{
//工装类型
......
<template>
<div class="entryWrap" id="entry">
<div class="expand" id="full" @click="handleFullScreen">
<Icon type="md-expand" size="50" />
</div>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">
1.{{$t(90000016)}}
<span class="red">*</span>
</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item,index) in passageList"
@click="change(index)"
:class="{active:a==index}"
>{{item.title}}</p>
<div class="entryWrap" id="entry">
<div class="expand" id="full" @click="handleFullScreen">
<Icon type="md-expand" size="50" />
</div>
</div>
<div class="choose">
<p class="selectTitle">
2.{{$t('1052')}}
<span class="red">*</span>
({{$t('1220')}})
</p>
<div class="row">
<p
class="options"
:key="index"
v-for="(item,index) in stationList"
@click="change1(index)"
:class="{active:b==index}"
>{{item.item}}</p>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">
1.{{ $t(90000016) }}
<span class="red">*</span>
</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item, index) in passageList"
@click="change(index)"
:class="{ active: a == index }"
>
{{ item.title }}
</p>
</div>
</div>
<div class="choose">
<p class="selectTitle">
2.{{ $t("1052") }}
<span class="red">*</span>
({{ $t("1220") }})
</p>
<div class="row">
<p
class="options"
:key="index"
v-for="(item, index) in stationList"
@click="change1(index)"
:class="{ active: b == index }"
>
{{ item.item }}
</p>
</div>
</div>
</div>
</div>
</div>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">
3.{{$t('100217')}}
<span class="red">*</span>
</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item,index) in productList"
@click="change2(index)"
:class="{active:c==index}"
>{{item.productName}}</p>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">
3.{{ $t("100217") }}
<span class="red">*</span>
</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item, index) in productList"
@click="change2(index)"
:class="{ active: c == index }"
>
{{ item.productName }}
</p>
</div>
</div>
<div class="choose">
<p class="selectTitle">4.{{ $t(1950603) }}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item, index) in materialList"
@click="change3(index)"
:class="{ active: d == index && must == true }"
>
{{ item.name + "【" + item.pn + "】" }}
</p>
</div>
</div>
</div>
</div>
<div class="choose">
<p class="selectTitle">4.{{$t(1950603)}}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item,index) in materialList"
@click="change3(index)"
:class="{active:d==index && must==true}"
>{{item.name +"【"+item.pn+"】"}}</p>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">5.{{ $t(90000048) }}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item, index) in projectList"
@click="change4(index)"
:class="{ active: e == index && pmust == true }"
>
{{ item.item }}
</p>
</div>
</div>
</div>
</div>
</div>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">5.{{$t(90000048)}}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item,index) in projectList"
@click="change4(index)"
:class="{active:e==index && pmust==true}"
>{{item.item}}</p>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">6.{{ $t(5500006) }}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item, index) in referType"
@click="change5(index)"
:class="{ active: f == index && tmust == true }"
>
{{ item.name }}
</p>
</div>
</div>
</div>
</div>
</div>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">6.{{$t(5500006)}}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item,index) in referType"
@click="change5(index)"
:class="{active:f==index && tmust==true}"
>{{item.name}}</p>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">7.{{ $t(5500005) }}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item, index) in reference"
@click="change6(index)"
:class="{ active: g == index && rmust == true }"
>
{{ item.remark }}
</p>
</div>
</div>
</div>
</div>
</div>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">7.{{$t(5500005)}}</p>
<div class="row">
<p
:key="index"
class="options"
v-for="(item,index) in reference"
@click="change6(index)"
:class="{active:g==index && rmust==true}"
>{{item.remark}}</p>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">8.{{ $t(90000049) }}</p>
<div class="row">
<div class="number row">
<p class="minus" @click="reduce">-</p>
<input type="text" class="digit" v-model="number" />
<p class="plus" @click="add">+</p>
</div>
<input
class="erweima"
type="text"
v-model="qrcode"
@keyup.enter="save()"
/>
</div>
</div>
</div>
</div>
</div>
<div class="entryItem">
<div class="choose">
<p class="selectTitle">8.{{$t(90000049)}}</p>
<div class="row">
<div class="number row">
<p class="minus" @click="reduce">-</p>
<input type="text" class="digit" v-model="number" />
<p class="plus" @click="add">+</p>
</div>
<input class="erweima" type="text" v-model="qrcode" @keyup.enter="save()" />
<div class="entryItem pr">
<!-- <div class="tip" v-show="tip==true">提示:返工{{successnum}}个工件成功!</div> -->
<div class="tip" v-html="showMsg"></div>
<button class="save" @click="save" v-text="$t(900306)">保存</button>
</div>
</div>
</div>
<div class="entryItem pr">
<!-- <div class="tip" v-show="tip==true">提示:返工{{successnum}}个工件成功!</div> -->
<div class="tip" v-html="showMsg"></div>
<button class="save" @click="save" v-text="$t(900306)">保存</button>
</div>
</div>
</template>
<script>
import axios from '@/libs/api.request';
import axios from "@/libs/api.request";
export default {
data () {
data() {
return {
passageList: ['CH3.3', 'CH3.3fsgfdgd', 'CH3.3', 'CH3.3', 'CH3.3'],
passageList: ["CH3.3", "CH3.3fsgfdgd", "CH3.3", "CH3.3", "CH3.3"],
stationList: [],
productList: [],
materialList: [],
......@@ -148,9 +167,9 @@ export default {
material: 0, // 物料
project: 0, // 不良项目
typeid: 0,
reason: '',
reason: "",
number: 0, // 返工数量
qrcode: '', // 二维码
qrcode: "", // 二维码
settingId: 0, // 返工设置ID
a: 0,
b: 0,
......@@ -170,20 +189,20 @@ export default {
arr2: [],
arr3: [],
array: [],
showMsg: ''
showMsg: "",
};
},
created () {
created() {
this.init();
this.loadReferType();
// this.change(0);
// this.change(0);
},
methods: {
init () {
init() {
axios
.request({
url: '/qms/RepairPostionSetting/GetChanel',
method: 'get'
url: "/qms/RepairPostionSetting/GetChanel",
method: "get",
})
.then((res) => {
this.passageList = res.data.data;
......@@ -193,7 +212,7 @@ export default {
}
});
},
initData () {
initData() {
this.station = 0;
this.product = 0;
this.material = 0;
......@@ -204,7 +223,7 @@ export default {
this.tip = false;
},
// 选择通道
change (i) {
change(i) {
this.a = i;
this.initData();
this.passage = this.passageList[i].id;
......@@ -214,8 +233,9 @@ export default {
axios
.request({
url:
'/qms/RepairPostionSetting/GetSettingByChanel?Id=' + this.passage,
method: 'get'
"/qms/RepairPostionSetting/GetSettingByChanel?Id=" +
this.passage,
method: "get",
})
.then((res) => {
// console.log(res.data.data);
......@@ -229,7 +249,7 @@ export default {
});
},
// 选择工位
change1 (i) {
change1(i) {
this.tip = false;
this.material = 0;
this.project = 0;
......@@ -243,8 +263,9 @@ export default {
axios
.request({
url:
'/qms/InspectStandard/GetOQCItemProduct?sectionId=' + this.station,
method: 'get'
"/qms/InspectStandard/GetOQCItemProduct?sectionId=" +
this.station,
method: "get",
})
.then((res) => {
this.productList = res.data.data;
......@@ -261,14 +282,14 @@ export default {
// 根据产品选择物料
var params = {
productId: this.product,
section: this.station
section: this.station,
};
if (this.productList.length > 0) {
axios
.request({
url: '/qms/ManufacturingMaterial/GetMaterialByCell',
url: "/qms/ManufacturingMaterial/GetMaterialByCell",
params,
method: 'get'
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
......@@ -280,11 +301,11 @@ export default {
axios
.request({
url:
'/qms/InspectStandard/GetItems?productid=' +
this.product +
'&sectionid=' +
this.station,
method: 'get'
"/qms/InspectStandard/GetItems?productid=" +
this.product +
"&sectionid=" +
this.station,
method: "get",
})
.then((res) => {
this.projectList = res.data.data;
......@@ -295,7 +316,7 @@ export default {
}
},
// 选择产品
change2 (i) {
change2(i) {
this.project = 0;
this.material = 0;
this.must = false;
......@@ -305,13 +326,13 @@ export default {
// 根据产品选择物料
var params = {
productId: this.productList[i].productId,
section: this.station
section: this.station,
};
axios
.request({
url: '/qms/ManufacturingMaterial/GetMaterialByCell',
url: "/qms/ManufacturingMaterial/GetMaterialByCell",
params,
method: 'get'
method: "get",
})
.then((res) => {
if (res.data.ret == 1 && res.data.data.length > 0) {
......@@ -326,11 +347,11 @@ export default {
axios
.request({
url:
'/qms/InspectStandard/GetItems?productid=' +
this.product +
'&sectionid=' +
this.station,
method: 'get'
"/qms/InspectStandard/GetItems?productid=" +
this.product +
"&sectionid=" +
this.station,
method: "get",
})
.then((res) => {
this.projectList = res.data.data;
......@@ -338,7 +359,7 @@ export default {
});
},
// 选择物料
change3 (i) {
change3(i) {
this.tip = false;
// this.must = true;
// this.d = i;
......@@ -362,7 +383,7 @@ export default {
},
// 选择不良项目
change4 (i) {
change4(i) {
this.tip = false;
let arrIndex = this.arr2.indexOf(i);
......@@ -381,7 +402,7 @@ export default {
}
},
// 选择返工类型
change5 (i) {
change5(i) {
this.tip = false;
let arrIndex = this.arr3.indexOf(i);
......@@ -389,7 +410,7 @@ export default {
this.arr3 = [];
this.tmust = true;
this.f = -1;
this.remark = '';
this.remark = "";
this.reasonList = [];
} else {
this.arr3 = [];
......@@ -402,14 +423,14 @@ export default {
}
},
// 选择返工原因
change6 (i) {
change6(i) {
let arrIndex = this.array.indexOf(i);
if (arrIndex > -1) {
this.array = [];
this.rmust = false;
this.g = -1;
this.reason = '';
this.reason = "";
} else {
this.array = [];
this.g = -1;
......@@ -420,7 +441,7 @@ export default {
}
// console.log(this.reason);
},
reduce () {
reduce() {
this.tip = false;
if (this.number > 1) {
......@@ -429,11 +450,11 @@ export default {
this.number = 1;
}
},
add () {
add() {
this.tip = false;
this.number++;
},
save () {
save() {
if (this.number < 1) {
// window_warning('返工数量不能小于1')
this.showMsg = this.$t(930026) + this.$t(930058);
......@@ -466,27 +487,28 @@ export default {
QID: this.project,
Remark: this.reason,
Count: this.number,
SettingId: this.settingId
SettingId: this.settingId,
};
axios
.request({
url: '/qms/RepairData/AddRepair',
url: "/qms/RepairData/AddRepair",
data,
method: 'post'
method: "post",
})
.then((res) => {
if (res.data.ret == 1) {
this.tip = true;
this.number = 0;
this.qrcode = '';
this.showMsg = this.$t(930059) + this.successnum + this.$t(930060);
this.qrcode = "";
this.showMsg =
this.$t(930059) + this.successnum + this.$t(930060);
}
// 成功后显示提示
});
},
// 全屏事件
handleFullScreen () {
let element = document.getElementById('entry');
handleFullScreen() {
let element = document.getElementById("entry");
// 判断是否已经是全屏
// 如果是全屏,退出
if (this.fullscreen) {
......@@ -515,14 +537,16 @@ export default {
// 改变当前全屏状态
this.fullscreen = !this.fullscreen;
},
submitqr () {
if (this.qrcode == '') {
submitqr() {
if (this.qrcode == "") {
this.$Message.error(this.$t(9000436));
} else {
axios
.request({
url: "'/qms/RepairData/GetProductRoute?sn=" + this.qrcode,
method: 'post'
url:
"'/qms/RepairData/GetProductRoute?sn=" +
this.qrcode,
method: "post",
})
.then((res) => {
if (res.data.ret == 1) {
......@@ -533,11 +557,11 @@ export default {
});
}
},
loadReferType () {
loadReferType() {
axios
.request({
url: '/qms/ReworkReferenceType/GetItem?type=1',
method: 'get'
url: "/qms/ReworkReferenceType/GetItem?type=1",
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
......@@ -547,11 +571,13 @@ export default {
}
});
},
loadRefer () {
loadRefer() {
axios
.request({
url: '/qms/ReworkReference/GetItem?type=1&referType=' + this.typeid,
method: 'get'
url:
"/qms/ReworkReference/GetItem?type=1&referType=" +
this.typeid,
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
......@@ -561,144 +587,144 @@ export default {
console.log(this.$t(res.data.msg));
}
});
}
}
},
},
};
</script>
<style scoped>
.row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-shrink: 1;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-shrink: 1;
}
.entryWrap {
position: relative;
background-color: #f5f7f9;
overflow-y: auto;
overflow-x: hidden;
position: relative;
background-color: #f5f7f9;
overflow-y: auto;
overflow-x: hidden;
}
.expand {
position: absolute;
top: 10px;
right: 10px;
/* left: 95%; */
position: absolute;
top: 10px;
right: 10px;
/* left: 95%; */
}
.entryItem {
background-color: #fff;
border-radius: 10px;
margin-bottom: 20px;
padding: 20px;
width: 100%;
background-color: #fff;
border-radius: 10px;
margin-bottom: 20px;
padding: 20px;
width: 100%;
}
.selectTitle {
font-size: 18px;
font-size: 18px;
}
.options {
font-size: 12px;
padding: 0 12px;
/* width: 100px; */
height: 50px;
line-height: 50px;
text-align: center;
border-radius: 5px;
background-color: #f2f2f2;
margin: 10px 0;
margin-right: 50px;
cursor: pointer;
font-size: 12px;
padding: 0 12px;
/* width: 100px; */
height: 50px;
line-height: 50px;
text-align: center;
border-radius: 5px;
background-color: #f2f2f2;
margin: 10px 0;
margin-right: 50px;
cursor: pointer;
}
.active {
background-color: #2d8cf0;
color: #fff;
background-color: #2d8cf0;
color: #fff;
}
.number {
margin: 10px 55px 10px 0;
margin: 10px 55px 10px 0;
}
.minus {
width: 55px;
height: 42px;
line-height: 42px;
font-size: 20px;
text-align: center;
color: #fff;
background-color: #2d8cf0;
border-radius: 5px;
cursor: pointer;
width: 55px;
height: 42px;
line-height: 42px;
font-size: 20px;
text-align: center;
color: #fff;
background-color: #2d8cf0;
border-radius: 5px;
cursor: pointer;
}
.plus {
width: 55px;
height: 42px;
line-height: 42px;
font-size: 20px;
text-align: center;
color: #fff;
background-color: #2d8cf0;
border-radius: 5px;
cursor: pointer;
width: 55px;
height: 42px;
line-height: 42px;
font-size: 20px;
text-align: center;
color: #fff;
background-color: #2d8cf0;
border-radius: 5px;
cursor: pointer;
}
.digit {
display: block;
outline: none;
width: 180px;
height: 42px;
line-height: 42px;
text-align: center;
font-size: 20px;
border: 1px solid #d8d8d8;
background-color: #f4f7f9;
margin: 0 5px;
color: #000;
display: block;
outline: none;
width: 180px;
height: 42px;
line-height: 42px;
text-align: center;
font-size: 20px;
border: 1px solid #d8d8d8;
background-color: #f4f7f9;
margin: 0 5px;
color: #000;
}
.erweima {
display: block;
outline: none;
width: 582px;
height: 42px;
line-height: 42px;
font-size: 20px;
color: #000;
text-align: center;
border: 1px solid #d8d8d8;
margin: 10px 0;
background-color: #f4f7f9;
display: block;
outline: none;
width: 582px;
height: 42px;
line-height: 42px;
font-size: 20px;
color: #000;
text-align: center;
border: 1px solid #d8d8d8;
margin: 10px 0;
background-color: #f4f7f9;
}
.save {
width: 95px;
height: 55px;
background-color: #2d8cf0;
color: #fff;
line-height: 55px;
text-align: center;
font-size: 20px;
/* cursor: pointer; */
outline: none;
border: none;
border-radius: 10px;
/* position: absolute;
width: 95px;
height: 55px;
background-color: #2d8cf0;
color: #fff;
line-height: 55px;
text-align: center;
font-size: 20px;
/* cursor: pointer; */
outline: none;
border: none;
border-radius: 10px;
/* position: absolute;
right: 20px; */
margin-left: 90%;
margin-left: 90%;
}
.pr {
position: relative;
height: 80px;
position: relative;
height: 80px;
}
.tip {
width: 200px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
/* border: 1px solid #d2d2d2; */
border-radius: 5px;
color: red;
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
width: 200px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
/* border: 1px solid #d2d2d2; */
border-radius: 5px;
color: red;
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
}
.red {
color: red;
color: red;
}
</style>
......@@ -212,6 +212,7 @@ export default {
},
created(){
this.initWarehouse();//仓库
this.tableColumns1 = this.$time.initTableTitle(this.tableColumns1);
},
methods:{
//仓库下拉框
......
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