|
@@ -91,6 +91,16 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="所属小程序" prop="appName" >
|
|
|
+ <el-select v-model="queryParams.appId" placeholder="请选择" clearable>
|
|
|
+ <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-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>
|
|
@@ -538,6 +548,16 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="所属小程序" prop="appId">
|
|
|
+ <el-select v-model="appId" 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>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -620,7 +640,8 @@ import { getToken } from "@/utils/auth";
|
|
|
import Material from '@/components/Material'
|
|
|
import ImageUpload from '@/components/ImageUpload'
|
|
|
import { Loading } from 'element-ui';
|
|
|
-import { getOptions } from '@/api/his/packageSolarTerm'
|
|
|
+import { getOptions } from '@/api/his/packageSolarTerm';
|
|
|
+import {list as getAppMallOptions} from '@/api/course/coursePlaySourceConfig';
|
|
|
export default {
|
|
|
name: "Package",
|
|
|
components: { packageDetails,Editor,productAttrValueSelect,Material },
|
|
@@ -634,6 +655,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ appId:[],
|
|
|
open1: false,
|
|
|
form1:{},
|
|
|
finalQuality:1,
|
|
@@ -718,6 +740,7 @@ export default {
|
|
|
isDelOptions: [],
|
|
|
packageSubTypeOptions:[],
|
|
|
solarTermOptions: [],
|
|
|
+ appMallOptions:[],
|
|
|
photoArr:[],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
@@ -807,7 +830,8 @@ export default {
|
|
|
this.privateTypeOptions = response.data.privateType;
|
|
|
});
|
|
|
this.getTemp();
|
|
|
- this.getSolarTermOptions()
|
|
|
+ this.getSolarTermOptions(),
|
|
|
+ this.getAppMallOptions();
|
|
|
listStore().then(response => {
|
|
|
this.storeOPtions = response.rows;
|
|
|
});
|
|
@@ -824,6 +848,11 @@ export default {
|
|
|
this.solarTermOptions = response.data;
|
|
|
})
|
|
|
},
|
|
|
+ getAppMallOptions() {
|
|
|
+ getAppMallOptions({pageNum:1,pageSize:100,isMall:1}).then(response => {
|
|
|
+ this.appMallOptions = response.rows;
|
|
|
+ })
|
|
|
+ },
|
|
|
handleUpdateMore(row){
|
|
|
this.reset1();
|
|
|
this.title = "批量修改套餐状态";
|
|
@@ -1105,6 +1134,7 @@ export default {
|
|
|
if(this.form.followNum!=null ){
|
|
|
this.form.followNum=JSON.stringify(this.form.followNum)
|
|
|
}
|
|
|
+ this.appId=this.form.appIds ? this.form.appIds.split(',') : [];
|
|
|
setTimeout(() => {
|
|
|
if(this.form.desc==null){
|
|
|
this.$refs.myeditor.setText("");
|
|
@@ -1138,14 +1168,18 @@ export default {
|
|
|
this.form.productJson=JSON.stringify(this.drugList)
|
|
|
}
|
|
|
this.form.describeJson = JSON.stringify(this.describeJson);
|
|
|
- if (this.form.packageId != null) {
|
|
|
- updatePackage(this.form).then(response => {
|
|
|
+ const params = {
|
|
|
+ ...this.form,
|
|
|
+ appIds: this.appId.join(',') // 数组转字符串
|
|
|
+ };
|
|
|
+ if (params.packageId != null) {
|
|
|
+ updatePackage(params).then(response => {
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addPackage(this.form).then(response => {
|
|
|
+ addPackage(params).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|