|
@@ -12,7 +12,7 @@
|
|
<FormItem label="ID">
|
|
<FormItem label="ID">
|
|
<Input v-model="info.id" disabled placeholder="自动生成" />
|
|
<Input v-model="info.id" disabled placeholder="自动生成" />
|
|
</FormItem>
|
|
</FormItem>
|
|
- <FormItem label="部件名称" prop="parts_id">
|
|
|
|
|
|
+ <!-- <FormItem label="部件名称" prop="parts_id">
|
|
<Select
|
|
<Select
|
|
:disabled="type == 3"
|
|
:disabled="type == 3"
|
|
filterable
|
|
filterable
|
|
@@ -27,7 +27,7 @@
|
|
:label="item.title"
|
|
:label="item.title"
|
|
></Option>
|
|
></Option>
|
|
</Select>
|
|
</Select>
|
|
- </FormItem>
|
|
|
|
|
|
+ </FormItem> -->
|
|
|
|
|
|
<FormItem label="工艺组合名称" prop="title">
|
|
<FormItem label="工艺组合名称" prop="title">
|
|
<Input
|
|
<Input
|
|
@@ -52,7 +52,7 @@
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span> -->
|
|
</span> -->
|
|
- <div class="hierarchy" v-for="item of info.list" :key="item.name">
|
|
|
|
|
|
+ <!-- <div class="hierarchy" v-for="item of info.list" :key="item.name">
|
|
<span>{{ item.name || item.title }}(多选):</span>
|
|
<span>{{ item.name || item.title }}(多选):</span>
|
|
<div v-for="_item in item.cld" class="radio-g" :key="_item.type_title">
|
|
<div v-for="_item in item.cld" class="radio-g" :key="_item.type_title">
|
|
<div class="tit_box">
|
|
<div class="tit_box">
|
|
@@ -69,23 +69,30 @@
|
|
>
|
|
>
|
|
{{ __item.title }}
|
|
{{ __item.title }}
|
|
</div></div>
|
|
</div></div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<!-- <div class="radio-g">
|
|
<!-- <div class="radio-g">
|
|
<div @click="setRadioChange(item,_item)"
|
|
<div @click="setRadioChange(item,_item)"
|
|
:class="['radio-us',_item.show ? 'radio-us-foc' : '']"
|
|
:class="['radio-us',_item.show ? 'radio-us-foc' : '']"
|
|
v-for='_item of item.cld'
|
|
v-for='_item of item.cld'
|
|
:key="_item.id">{{_item.title}}</div>
|
|
:key="_item.id">{{_item.title}}</div>
|
|
</div> -->
|
|
</div> -->
|
|
- </div>
|
|
|
|
- <div style="padding:10px 0;">
|
|
|
|
|
|
+ <!-- </div> -->
|
|
|
|
+ <div style="padding:10px 0;display:flex;justify-content:space-between">
|
|
|
|
+ <div>
|
|
<span>工艺路线:</span>
|
|
<span>工艺路线:</span>
|
|
<Button :disabled="type == 3" @click="editRouter()">{{
|
|
<Button :disabled="type == 3" @click="editRouter()">{{
|
|
type == 1 ? "选择工艺路线" : "选择工艺路线"
|
|
type == 1 ? "选择工艺路线" : "选择工艺路线"
|
|
}}</Button>
|
|
}}</Button>
|
|
- {{ process_name }}
|
|
|
|
|
|
+ {{ process_name }}</div>
|
|
|
|
+ <Button type="primary" @click="handleAddLine">增行</Button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <Table border :columns="tableColumns" :data="tableData">
|
|
|
|
|
|
+ <Table border :columns="tableColumns" :data="tableData" draggable @on-drag-drop='handleDrop'>
|
|
|
|
+ <template slot="title" slot-scope="{row}">
|
|
|
|
+ <Select v-model="row.title" filterable clearable transfer @on-change='handleChange(row,index,1)'>
|
|
|
|
+ <Option v-for='(item,index) in processRouteList' :key="index" :label="item.title" :value="item.title"/>
|
|
|
|
+ </Select>
|
|
|
|
+ </template>
|
|
<template slot="time" slot-scope="{row,index}">
|
|
<template slot="time" slot-scope="{row,index}">
|
|
<Input clearable placeholder="请输入" v-model="row.time" @on-change='handleChange(row,index)'/>
|
|
<Input clearable placeholder="请输入" v-model="row.time" @on-change='handleChange(row,index)'/>
|
|
</template>
|
|
</template>
|
|
@@ -95,6 +102,9 @@
|
|
<template slot="capacity" slot-scope="{row,index}">
|
|
<template slot="capacity" slot-scope="{row,index}">
|
|
<Input clearable placeholder="请输入" v-model="row.capacity" @on-change='handleChange(row,index)'/>
|
|
<Input clearable placeholder="请输入" v-model="row.capacity" @on-change='handleChange(row,index)'/>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template slot="set" slot-scope="{row,index}">
|
|
|
|
+ <a @click="handleDel(row,index)">删除</a>
|
|
|
|
+ </template>
|
|
</Table>
|
|
</Table>
|
|
</div>
|
|
</div>
|
|
<Modal
|
|
<Modal
|
|
@@ -329,6 +339,7 @@ import { SlickList, SlickItem } from "vue-slicksort";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ processRouteList:[],
|
|
tempProcessLine: {
|
|
tempProcessLine: {
|
|
title: "",
|
|
title: "",
|
|
},
|
|
},
|
|
@@ -348,7 +359,7 @@ export default {
|
|
info: {
|
|
info: {
|
|
title: "",
|
|
title: "",
|
|
price: "",
|
|
price: "",
|
|
- parts_id: "",
|
|
|
|
|
|
+ parts_id: 0,
|
|
id: null,
|
|
id: null,
|
|
properties: [], //工序号
|
|
properties: [], //工序号
|
|
procedure: [], //工艺属性id
|
|
procedure: [], //工艺属性id
|
|
@@ -363,10 +374,11 @@ export default {
|
|
tableColumns: [
|
|
tableColumns: [
|
|
{ title: "序号", type: "index", align: "center", key: "" ,resizable:true,width:200},
|
|
{ title: "序号", type: "index", align: "center", key: "" ,resizable:true,width:200},
|
|
// { title: 'ID', align: 'center', key: 'id' },
|
|
// { title: 'ID', align: 'center', key: 'id' },
|
|
- { title: "工序名称", align: "center", key: "title" ,resizable:true,width:340},
|
|
|
|
- { title: "工时", align: "center", key: "time" ,resizable:true,width:340,slot:'time'},
|
|
|
|
- { title: "工价", align: "center", key: "wages" ,resizable:true,width:340,slot:'wages'},
|
|
|
|
- { title: "产能", align: "center", key: "capacity",minWidth:150,slot:'capacity' },
|
|
|
|
|
|
+ { title: "工序名称", align: "center", key: "title" ,resizable:true,width:340,slot:'title'},
|
|
|
|
+ { title: "工时", align: "center", key: "time" ,resizable:true,width:250,slot:'time'},
|
|
|
|
+ { title: "工价", align: "center", key: "wages" ,resizable:true,width:250,slot:'wages'},
|
|
|
|
+ { title: "产能", align: "center", key: "capacity",width:250,resizable:true, slot:'capacity' },
|
|
|
|
+ {title:'操作',align:'center',key:'set',minWidth:100,slot:'set'}
|
|
],
|
|
],
|
|
tableData: [],
|
|
tableData: [],
|
|
processRouteId: "",
|
|
processRouteId: "",
|
|
@@ -399,6 +411,10 @@ export default {
|
|
this.axios("/api/bp_list").then((res) => {
|
|
this.axios("/api/bp_list").then((res) => {
|
|
this.info.bps = res.data;
|
|
this.info.bps = res.data;
|
|
this.temp_info_bps = res.data;
|
|
this.temp_info_bps = res.data;
|
|
|
|
+ this.processRouteList = [];
|
|
|
|
+ res.data.forEach(v=>{
|
|
|
|
+ this.processRouteList.push(...v.cld)
|
|
|
|
+ })
|
|
});
|
|
});
|
|
if (this.type == 1) {
|
|
if (this.type == 1) {
|
|
this.axios("/api/bpp_list_new").then((res) => {
|
|
this.axios("/api/bpp_list_new").then((res) => {
|
|
@@ -419,7 +435,19 @@ export default {
|
|
this.getParts();
|
|
this.getParts();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handleChange(row,index){
|
|
|
|
|
|
+ handleDel(row,index){
|
|
|
|
+ this.tableData.splice(index,1);
|
|
|
|
+ },
|
|
|
|
+ handleDrop(a,b){
|
|
|
|
+ this.tableData.splice(b, 0, ...this.tableData.splice(a, 1))
|
|
|
|
+ },
|
|
|
|
+ handleAddLine(){
|
|
|
|
+ this.tableData.unshift({});
|
|
|
|
+ },
|
|
|
|
+ handleChange(row,index,type){
|
|
|
|
+ if(type){
|
|
|
|
+ row.id = this.processRouteList.find(v=>(v.title==row.title)).id;
|
|
|
|
+ }
|
|
this.tableData.splice(index,1,row);
|
|
this.tableData.splice(index,1,row);
|
|
},
|
|
},
|
|
handleProcessLineSet(row, index) {
|
|
handleProcessLineSet(row, index) {
|
|
@@ -489,24 +517,24 @@ export default {
|
|
let data = JSON.parse(JSON.stringify(this.info));
|
|
let data = JSON.parse(JSON.stringify(this.info));
|
|
data.technological_route_id = data.id;
|
|
data.technological_route_id = data.id;
|
|
type == 4 ? (data.id = "") : "";
|
|
type == 4 ? (data.id = "") : "";
|
|
- let properties=[],procedure=[],procedure_list = [];
|
|
|
|
|
|
+ let procedure=[],procedure_list = [];
|
|
procedure_list = this.tableData;
|
|
procedure_list = this.tableData;
|
|
- data.list.forEach((element) => {
|
|
|
|
- element.cld.forEach((elem) => {
|
|
|
|
- elem.list.forEach((el) => {
|
|
|
|
- if (el.show) {
|
|
|
|
- properties.push(el.id);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- this.selectTags.map((v) => {
|
|
|
|
|
|
+ // data.list.forEach((element) => {
|
|
|
|
+ // element.cld.forEach((elem) => {
|
|
|
|
+ // elem.list.forEach((el) => {
|
|
|
|
+ // if (el.show) {
|
|
|
|
+ // properties.push(el.id);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ this.tableData.map((v) => {
|
|
procedure.push(v.id);
|
|
procedure.push(v.id);
|
|
});
|
|
});
|
|
delete data.list;
|
|
delete data.list;
|
|
delete data.bps;
|
|
delete data.bps;
|
|
this.type == 1 ? delete data.id : "";
|
|
this.type == 1 ? delete data.id : "";
|
|
- data.properties = properties;
|
|
|
|
|
|
+ data.properties =[1,2,3];
|
|
data.procedure = procedure.join(",");
|
|
data.procedure = procedure.join(",");
|
|
data.procedure_list = procedure_list;
|
|
data.procedure_list = procedure_list;
|
|
this.axios.post("/api/process_route_save", data).then((res) => {
|
|
this.axios.post("/api/process_route_save", data).then((res) => {
|