|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
<el-form-item label="商品名称" prop="goodsName">
|
|
<el-form-item label="商品名称" prop="goodsName">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.goodsName"
|
|
v-model="queryParams.goodsName"
|
|
@@ -30,6 +30,16 @@
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="所属小程序" prop="appId">
|
|
|
|
|
+ <el-select style="width: 240px" v-model="queryParams.appId" placeholder="请选择所属小程序" clearable size="small">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in appMallOptions"
|
|
|
|
|
+ :key="dict.appid"
|
|
|
|
|
+ :label="dict.name + '(' + dict.appid + ')'"
|
|
|
|
|
+ :value="dict.appid"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -215,6 +225,16 @@
|
|
|
>{{dict.dictLabel}}</el-radio>
|
|
>{{dict.dictLabel}}</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="所属小程序" prop="appIds">
|
|
|
|
|
+ <el-select style="width: 240px" v-model="appIds" placeholder="请选择所属小程序" clearable size="small" multiple>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in appMallOptions"
|
|
|
|
|
+ :key="dict.appid"
|
|
|
|
|
+ :label="dict.name + '(' + dict.appid + ')'"
|
|
|
|
|
+ :value="dict.appid"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -266,6 +286,7 @@ import Material from '@/components/Material';
|
|
|
import Editor from '@/components/Editor/wang';
|
|
import Editor from '@/components/Editor/wang';
|
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
|
import integralGoodsDetails from '../../components/his/integralGoodsDetails';
|
|
import integralGoodsDetails from '../../components/his/integralGoodsDetails';
|
|
|
|
|
+import { list as getAppMallOptions } from '@/api/course/coursePlaySourceConfig'
|
|
|
export default {
|
|
export default {
|
|
|
name: "IntegralGoods",
|
|
name: "IntegralGoods",
|
|
|
components: {Material,Editor,integralGoodsDetails},
|
|
components: {Material,Editor,integralGoodsDetails},
|
|
@@ -279,6 +300,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+
|
|
|
|
|
+ appIds:[], // 选择的小程序
|
|
|
|
|
+ // 小程序列表
|
|
|
|
|
+ appMallOptions:[],
|
|
|
|
|
+
|
|
|
show:{
|
|
show:{
|
|
|
open:false,
|
|
open:false,
|
|
|
},
|
|
},
|
|
@@ -329,6 +355,7 @@ export default {
|
|
|
goodsName: null,
|
|
goodsName: null,
|
|
|
goodsType: null,
|
|
goodsType: null,
|
|
|
status: null,
|
|
status: null,
|
|
|
|
|
+ appId: null,
|
|
|
integral: null,
|
|
integral: null,
|
|
|
createTime: null
|
|
createTime: null
|
|
|
},
|
|
},
|
|
@@ -346,6 +373,10 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
|
|
+
|
|
|
|
|
+ // 查询小程序
|
|
|
|
|
+ this.getAppMallOptions();
|
|
|
|
|
+
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.getDicts("sys_integral_goods_type").then(response => {
|
|
this.getDicts("sys_integral_goods_type").then(response => {
|
|
|
this.goodsTypeOptions = response.data;
|
|
this.goodsTypeOptions = response.data;
|
|
@@ -355,12 +386,19 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- handledetails(row){
|
|
|
|
|
- this.show.open=true;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.Details.getDetails(row.goodsId);
|
|
|
|
|
- }, 1);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
|
|
+ getAppMallOptions() {
|
|
|
|
|
+ getAppMallOptions({pageNum:1,pageSize:100}).then(response => {
|
|
|
|
|
+ this.appMallOptions = response.rows;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ handledetails(row){
|
|
|
|
|
+ this.show.open=true;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$refs.Details.getDetails(row.goodsId);
|
|
|
|
|
+ }, 1);
|
|
|
|
|
+ },
|
|
|
/** 导入按钮操作 */
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|
|
handleImport() {
|
|
|
this.upload.title = "导入";
|
|
this.upload.title = "导入";
|
|
@@ -465,6 +503,8 @@ export default {
|
|
|
if(this.form.images!=null){
|
|
if(this.form.images!=null){
|
|
|
this.photoArr=this.form.images.split(",");
|
|
this.photoArr=this.form.images.split(",");
|
|
|
}
|
|
}
|
|
|
|
|
+ this.appIds = this.form.appIds ? this.form.appIds.split(',') : [];
|
|
|
|
|
+
|
|
|
//修改按钮
|
|
//修改按钮
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if(this.form.descs==null){
|
|
if(this.form.descs==null){
|
|
@@ -480,15 +520,22 @@ export default {
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+
|
|
|
|
|
+ // 小程序
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ ...this.form,
|
|
|
|
|
+ appIds: this.appIds.join(',') // 数组转字符串
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
if (this.form.goodsId != null) {
|
|
if (this.form.goodsId != null) {
|
|
|
- updateIntegralGoods(this.form).then(response => {
|
|
|
|
|
|
|
+ updateIntegralGoods(params).then(response => {
|
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.reset();
|
|
this.reset();
|
|
|
this.getList();
|
|
this.getList();
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- addIntegralGoods(this.form).then(response => {
|
|
|
|
|
|
|
+ addIntegralGoods(params).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.reset();
|
|
this.reset();
|