|
@@ -2,7 +2,28 @@
|
|
|
<div class="mod-print-printPicLib">
|
|
<div class="mod-print-printPicLib">
|
|
|
<!-- 搜索相关区域 -->
|
|
<!-- 搜索相关区域 -->
|
|
|
<div class="search-bar">
|
|
<div class="search-bar">
|
|
|
- <el-button class="default-btn primary-btn" @click="searchChange">{{$t('crud.searchBtn')}}</el-button>
|
|
|
|
|
|
|
+ <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" label-width="auto" size="small">
|
|
|
|
|
+ <!-- 表单项 -->
|
|
|
|
|
+ <div class="input-row">
|
|
|
|
|
+ <el-form-item prop="prodId" label="关联产品">
|
|
|
|
|
+ <el-select v-model="searchForm.prodId" clearable filterable>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="node in prodList"
|
|
|
|
|
+ :key="node.prodId"
|
|
|
|
|
+ :label="node.prodName"
|
|
|
|
|
+ :value="node.prodId"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="category" label="分类">
|
|
|
|
|
+ <el-input v-model="searchForm.category"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <div class="default-btn primary-btn" @click="searchChange()">{{ $t('crud.searchBtn') }}</div>
|
|
|
|
|
+ <div class="default-btn" @click="resetForm()">{{ $t('shop.resetMap') }}</div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 列表相关区域 -->
|
|
<!-- 列表相关区域 -->
|
|
|
<div class="main-container">
|
|
<div class="main-container">
|
|
@@ -40,18 +61,16 @@
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <!--<!– 关联的产品ID –>
|
|
|
|
|
- <el-table-column label="关联产品" prop="prodId" align="center">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <span>{{ scope.row.prodId}}</span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>-->
|
|
|
|
|
- <!-- 产品名称 -->
|
|
|
|
|
<el-table-column label="关联产品" prop="prodName" align="center">
|
|
<el-table-column label="关联产品" prop="prodName" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.prodName}}</span>
|
|
<span>{{ scope.row.prodName}}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column label="分类" prop="category" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{ scope.row.category}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<!-- 排序序号 -->
|
|
<!-- 排序序号 -->
|
|
|
<el-table-column label="序号" prop="seq" align="center">
|
|
<el-table-column label="序号" prop="seq" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -104,10 +123,14 @@ export default {
|
|
|
currentPage: 1, // 当前页数
|
|
currentPage: 1, // 当前页数
|
|
|
pageSize: 10 // 每页显示多少条
|
|
pageSize: 10 // 每页显示多少条
|
|
|
},
|
|
},
|
|
|
|
|
+ categoryList:[],
|
|
|
|
|
+ prodList:[],
|
|
|
previewPicUrl: null,
|
|
previewPicUrl: null,
|
|
|
previewPicDialogVisible: false,
|
|
previewPicDialogVisible: false,
|
|
|
resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
|
|
resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
|
|
|
- searchForm: {}, // 搜索
|
|
|
|
|
|
|
+ searchForm: {
|
|
|
|
|
+ prodId: null
|
|
|
|
|
+ }, // 搜索
|
|
|
dataListLoading: false,
|
|
dataListLoading: false,
|
|
|
addOrUpdateVisible: false
|
|
addOrUpdateVisible: false
|
|
|
}
|
|
}
|
|
@@ -117,16 +140,26 @@ export default {
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
this.getDataList();
|
|
this.getDataList();
|
|
|
|
|
+ this.getProdList();
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getProdList(){
|
|
|
|
|
+ this.$http({
|
|
|
|
|
+ url: this.$http.adornUrl('/prod/prod/simpleList'),
|
|
|
|
|
+ method: 'GET',
|
|
|
|
|
+ params: this.$http.adornParams({customized:0})
|
|
|
|
|
+ }).then(({data}) => {
|
|
|
|
|
+ this.prodList = data
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
previewPic(url){
|
|
previewPic(url){
|
|
|
- this.previewPicUrl = this.resourcesUrl + url
|
|
|
|
|
|
|
+ this.previewPicUrl = this.resourcesUrl + url;
|
|
|
this.previewPicDialogVisible = true;
|
|
this.previewPicDialogVisible = true;
|
|
|
},
|
|
},
|
|
|
getDataList (page) {
|
|
getDataList (page) {
|
|
|
- this.dataListLoading = true
|
|
|
|
|
|
|
+ this.dataListLoading = true;
|
|
|
this.$http({
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/print/printPicLib/page'),
|
|
url: this.$http.adornUrl('/print/printPicLib/page'),
|
|
|
method: 'get',
|
|
method: 'get',
|
|
@@ -146,7 +179,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 新增 / 修改
|
|
// 新增 / 修改
|
|
|
addOrUpdateHandle (id) {
|
|
addOrUpdateHandle (id) {
|
|
|
- this.addOrUpdateVisible = true
|
|
|
|
|
|
|
+ this.addOrUpdateVisible = true;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.addOrUpdate.init(id)
|
|
this.$refs.addOrUpdate.init(id)
|
|
|
})
|
|
})
|
|
@@ -178,8 +211,12 @@ export default {
|
|
|
this.page.currentPage = 1
|
|
this.page.currentPage = 1
|
|
|
this.getDataList(this.page)
|
|
this.getDataList(this.page)
|
|
|
},
|
|
},
|
|
|
|
|
+ resetForm () {
|
|
|
|
|
+ this.searchForm = {
|
|
|
|
|
+ prodId: null,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
searchChange (params) {
|
|
searchChange (params) {
|
|
|
- this.searchForm = params
|
|
|
|
|
this.getDataList(this.page)
|
|
this.getDataList(this.page)
|
|
|
},
|
|
},
|
|
|
handleSizeChange (val) {
|
|
handleSizeChange (val) {
|