|
@@ -55,6 +55,16 @@
|
|
|
v-hasPermi="['store:storeProductPackage:edit']"
|
|
v-hasPermi="['store:storeProductPackage:edit']"
|
|
|
>修改</el-button>
|
|
>修改</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="info"
|
|
|
|
|
+ icon="el-icon-connection"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ :disabled="multiple"
|
|
|
|
|
+ @click="handleUpdateCloseSingleLinkMore"
|
|
|
|
|
+ v-hasPermi="['store:storeProductPackage:edit']"
|
|
|
|
|
+ >批量修改单人链接</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
<el-button
|
|
|
type="danger"
|
|
type="danger"
|
|
@@ -171,9 +181,21 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <el-dialog title="批量修改单人链接" :visible.sync="open2" width="580px" append-to-body>
|
|
|
|
|
+ <el-form ref="form2" :model="form2" label-width="120px">
|
|
|
|
|
+ <el-form-item label="关闭单人链接" prop="closeSingleLink">
|
|
|
|
|
+ <el-switch v-model="form2.closeSingleLink"></el-switch>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="primary" @click="submitForm2">确 定</el-button>
|
|
|
|
|
+ <el-button @click="cancel2">取 消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<!-- 添加或修改商品组合套餐对话框 -->
|
|
<!-- 添加或修改商品组合套餐对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
<el-form-item label="套餐封面" prop="imgUrl">
|
|
<el-form-item label="套餐封面" prop="imgUrl">
|
|
|
<Material v-model="imageArr" type="image" :num="1" :width="150" :height="150" />
|
|
<Material v-model="imageArr" type="image" :num="1" :width="150" :height="150" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -292,6 +314,9 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="关闭单人链接" prop="closeSingleLink">
|
|
|
|
|
+ <el-switch v-model="form.closeSingleLink"></el-switch>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="分期赠送优惠券" prop="icgEnable" v-hasPermi="['store:storeProductPackage:edit:coupon']">
|
|
<el-form-item label="分期赠送优惠券" prop="icgEnable" v-hasPermi="['store:storeProductPackage:edit:coupon']">
|
|
|
<el-radio-group v-model="icgEnableModel">
|
|
<el-radio-group v-model="icgEnableModel">
|
|
|
<el-radio :label="item.dictValue" v-for="item in icgEnableOptions" >{{item.dictLabel}}</el-radio>
|
|
<el-radio :label="item.dictValue" v-for="item in icgEnableOptions" >{{item.dictLabel}}</el-radio>
|
|
@@ -332,7 +357,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { listStoreProductPackage, getStoreProductPackage, delStoreProductPackage, addStoreProductPackage, updateStoreProductPackage, exportStoreProductPackage,modifyStoreProductPackages } from "@/api/store/storeProductPackage";
|
|
|
|
|
|
|
+import { listStoreProductPackage, getStoreProductPackage, delStoreProductPackage, addStoreProductPackage, updateStoreProductPackage, exportStoreProductPackage, modifyStoreProductPackages, modifyCloseSingleLinkMore } from "@/api/store/storeProductPackage";
|
|
|
import Editor from '@/components/Editor/wang';
|
|
import Editor from '@/components/Editor/wang';
|
|
|
import productAttrValueSelect from "../components/productAttrValueSelect";
|
|
import productAttrValueSelect from "../components/productAttrValueSelect";
|
|
|
import Material from '@/components/Material'
|
|
import Material from '@/components/Material'
|
|
@@ -391,6 +416,7 @@ export default {
|
|
|
open: false,
|
|
open: false,
|
|
|
// 是否显示批量修改弹出层
|
|
// 是否显示批量修改弹出层
|
|
|
open1: false,
|
|
open1: false,
|
|
|
|
|
+ open2: false,
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -410,6 +436,7 @@ export default {
|
|
|
form: {},
|
|
form: {},
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
form1: {},
|
|
form1: {},
|
|
|
|
|
+ form2: {},
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
|
title: [
|
|
title: [
|
|
@@ -588,6 +615,7 @@ export default {
|
|
|
icgMonth: 0,
|
|
icgMonth: 0,
|
|
|
icgUrl: null,
|
|
icgUrl: null,
|
|
|
icgMark: null,
|
|
icgMark: null,
|
|
|
|
|
+ closeSingleLink: false,
|
|
|
};
|
|
};
|
|
|
this.products=[];
|
|
this.products=[];
|
|
|
this.photoArr=[];
|
|
this.photoArr=[];
|
|
@@ -627,6 +655,9 @@ export default {
|
|
|
const packageId = row.packageId || this.ids
|
|
const packageId = row.packageId || this.ids
|
|
|
getStoreProductPackage(packageId).then(response => {
|
|
getStoreProductPackage(packageId).then(response => {
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
|
|
+ if (this.form.closeSingleLink == null) {
|
|
|
|
|
+ this.form.closeSingleLink = false;
|
|
|
|
|
+ }
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
this.title = "修改商品组合套餐";
|
|
this.title = "修改商品组合套餐";
|
|
|
this.products=this.form.productList;
|
|
this.products=this.form.productList;
|
|
@@ -745,11 +776,23 @@ export default {
|
|
|
const packageIds = row.packageId || this.ids;
|
|
const packageIds = row.packageId || this.ids;
|
|
|
this.form1.packageIds=packageIds;
|
|
this.form1.packageIds=packageIds;
|
|
|
this.open1 = true;
|
|
this.open1 = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ handleUpdateCloseSingleLinkMore(row){
|
|
|
|
|
+ const packageIds = row.packageId || this.ids;
|
|
|
|
|
+ this.form2 = {
|
|
|
|
|
+ packageIds: packageIds,
|
|
|
|
|
+ closeSingleLink: false
|
|
|
|
|
+ };
|
|
|
|
|
+ this.open2 = true;
|
|
|
},
|
|
},
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
cancel1() {
|
|
cancel1() {
|
|
|
- this.open = false;
|
|
|
|
|
- this.reset();
|
|
|
|
|
|
|
+ this.open1 = false;
|
|
|
|
|
+ this.reset1();
|
|
|
|
|
+ },
|
|
|
|
|
+ cancel2() {
|
|
|
|
|
+ this.open2 = false;
|
|
|
|
|
+ this.reset2();
|
|
|
},
|
|
},
|
|
|
// 表单重置
|
|
// 表单重置
|
|
|
reset1() {
|
|
reset1() {
|
|
@@ -758,6 +801,13 @@ export default {
|
|
|
packageIds:[],
|
|
packageIds:[],
|
|
|
};
|
|
};
|
|
|
this.resetForm("form1");
|
|
this.resetForm("form1");
|
|
|
|
|
+ },
|
|
|
|
|
+ reset2() {
|
|
|
|
|
+ this.form2 = {
|
|
|
|
|
+ closeSingleLink: false,
|
|
|
|
|
+ packageIds: []
|
|
|
|
|
+ };
|
|
|
|
|
+ this.resetForm("form2");
|
|
|
},
|
|
},
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
submitForm1() {
|
|
submitForm1() {
|
|
@@ -781,6 +831,23 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ submitForm2() {
|
|
|
|
|
+ if (this.form2.closeSingleLink == null) {
|
|
|
|
|
+ this.msgError("请选择是否关闭单人链接");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.form2.packageIds == null || this.form2.packageIds.length === 0) {
|
|
|
|
|
+ this.msgError("请选择套餐");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ modifyCloseSingleLinkMore(this.form2).then(response => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
|
|
+ this.open2 = false;
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|