|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
|
|
|
|
|
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
|
|
|
|
|
:rules='rules' @submit="submit">
|
|
|
|
|
<template v-slot:application_type_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -8,25 +8,25 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Application Category:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select style="width:100%" v-model="form.application_type_id" placeholder="Please Select">
|
|
|
|
|
<el-select style="width:100%" filterable v-model="form.application_type_id" placeholder="Please Select">
|
|
|
|
|
<el-option v-for="item in appCategoryList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:category_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select multiple style="width:100%" v-model="form.category_id" placeholder="Please Select">
|
|
|
|
|
<el-option v-for="(item,index) in productCategoryList" :key="index" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:category_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select multiple filterable style="width:100%" v-model="form.category_id" placeholder="Please Select">
|
|
|
|
|
<el-option v-for="(item,index) in productCategoryList" :key="index" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:number>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -54,7 +54,8 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Separation Mode:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select style="width:100%" multiple collapse-tags v-model="form.separation" placeholder="Please Select">
|
|
|
|
|
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.separation"
|
|
|
|
|
placeholder="Please Select">
|
|
|
|
|
<el-option v-for="item in separationModeList" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
@ -67,7 +68,8 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Brand:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select style="width:100%" multiple collapse-tags v-model="form.branch" placeholder="Please Select">
|
|
|
|
|
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.branch"
|
|
|
|
|
placeholder="Please Select">
|
|
|
|
|
<el-option v-for="item in brandList" :key="item.id" :label="item.value" :value="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
@ -79,7 +81,8 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Topic:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select style="width:100%" multiple collapse-tags v-model="form.topic" placeholder="Please Select">
|
|
|
|
|
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.topic"
|
|
|
|
|
placeholder="Please Select">
|
|
|
|
|
<el-option v-for="item in topicList" :key="item.id" :label="item.value" :value="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
@ -91,7 +94,8 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Equipment:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select style="width:100%" multiple collapse-tags v-model="form.equipment" placeholder="Please Select">
|
|
|
|
|
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.equipment"
|
|
|
|
|
placeholder="Please Select">
|
|
|
|
|
<el-option v-for="item in equipmentList" :key="item.id" :label="item.value" :value="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
@ -103,8 +107,9 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Files:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" :limit="1" class='upload-demo' multiple :file-list="filesList" ref="pictureUpload"
|
|
|
|
|
:auto-upload="true" :data="uploadOther" :on-success="handlesuccess" :on-remove="handleRemove">
|
|
|
|
|
<el-upload :action="action" :limit="1" class='upload-demo' multiple :file-list="filesList"
|
|
|
|
|
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
|
|
|
|
|
:on-remove="handleRemove">
|
|
|
|
|
<el-button size="small" type="primary">upload</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
@ -113,13 +118,14 @@
|
|
|
|
|
<template v-slot:application_details>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Note Details:
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Column:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addRow">Add Row</el-button>
|
|
|
|
|
<xy-table :list="form.application_details" :isPage="false" :height="350" :table-item="detail_item">
|
|
|
|
|
<xy-table style="width:850px" :list="form.application_details" :isPage="false" :height="350"
|
|
|
|
|
:table-item="detail_item">
|
|
|
|
|
<template v-slot:key>
|
|
|
|
|
<el-table-column align='left' label="key">
|
|
|
|
|
<el-table-column align='left' label="key" width="340">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input placeholder="Please Input" style="width:100%" v-model="scope.row.key"></el-input>
|
|
|
|
|
|
|
|
|
|
@ -127,7 +133,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:value>
|
|
|
|
|
<el-table-column align='left' label="value">
|
|
|
|
|
<el-table-column align='left' label="value" width="340">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input placeholder="Please Input" style="width:100%" v-model="scope.row.value"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
@ -163,9 +169,9 @@
|
|
|
|
|
} from '@/utils/auth'
|
|
|
|
|
import
|
|
|
|
|
applicationMixin
|
|
|
|
|
from "@/mixin/application.js"
|
|
|
|
|
import {
|
|
|
|
|
index as getCategory
|
|
|
|
|
from "@/mixin/application.js"
|
|
|
|
|
import {
|
|
|
|
|
index as getCategory
|
|
|
|
|
} from "@/api/product/category.js"
|
|
|
|
|
export default {
|
|
|
|
|
mixins: [applicationMixin],
|
|
|
|
|
@ -179,21 +185,23 @@
|
|
|
|
|
},
|
|
|
|
|
action: `${process.env.VUE_APP_UPLOAD_API}`,
|
|
|
|
|
filesList: [],
|
|
|
|
|
appCategoryList: [],
|
|
|
|
|
productCategoryList:[],
|
|
|
|
|
appCategoryList: [],
|
|
|
|
|
productCategoryList: [],
|
|
|
|
|
detail_item: [{
|
|
|
|
|
type: 'index',
|
|
|
|
|
width: 50
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'key',
|
|
|
|
|
label: 'key'
|
|
|
|
|
label: 'key',
|
|
|
|
|
width: 340
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'value',
|
|
|
|
|
label: 'value',
|
|
|
|
|
width: 340
|
|
|
|
|
}],
|
|
|
|
|
form: {
|
|
|
|
|
application_type_id: '',
|
|
|
|
|
category_id:[],
|
|
|
|
|
application_type_id: '',
|
|
|
|
|
category_id: [],
|
|
|
|
|
number: '',
|
|
|
|
|
title: "",
|
|
|
|
|
separation: [],
|
|
|
|
|
@ -220,7 +228,7 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.uploadOther.token = getToken();
|
|
|
|
|
this.uploadOther.token = getToken();
|
|
|
|
|
this.getCategoryList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -244,17 +252,17 @@
|
|
|
|
|
},
|
|
|
|
|
delRow(obj, index) {
|
|
|
|
|
this.form.application_details.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
async getCategoryList() {
|
|
|
|
|
const res = await getCategory({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
page: 1,
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
sort_name: 'sort',
|
|
|
|
|
type:2
|
|
|
|
|
})
|
|
|
|
|
this.productCategoryList = res.data
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
async getCategoryList() {
|
|
|
|
|
const res = await getCategory({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
page: 1,
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
sort_name: 'sort',
|
|
|
|
|
type: 2
|
|
|
|
|
})
|
|
|
|
|
this.productCategoryList = res.data
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
if (this.id) {
|
|
|
|
|
@ -320,8 +328,8 @@
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.filesList = []
|
|
|
|
|
this.form = {
|
|
|
|
|
application_type_id: '',
|
|
|
|
|
category_id:[],
|
|
|
|
|
application_type_id: '',
|
|
|
|
|
category_id: [],
|
|
|
|
|
number: '',
|
|
|
|
|
title: "",
|
|
|
|
|
separation: [],
|
|
|
|
|
|