From f6e14b78fe0e9e6e1fa6006ef110b04002599dc4 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Fri, 07 Oct 2022 13:58:23 +0800
Subject: [PATCH] 修复任选套餐-无限次数时无默认999的bug
---
zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html
index 224cacb..a97efed 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html
@@ -234,6 +234,17 @@
</el-col>
</el-row>
+ <el-row>
+ <el-col :span="10">
+ <el-form-item label="是否合作项目">
+ <el-radio-group v-model="form.isCooperate">
+ <el-radio label="2">否</el-radio>
+ <el-radio label="1">是</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
<p class="el-big-title">销售设置</p>
@@ -1011,8 +1022,8 @@
<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
-<script src="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.umd.min.js"></script>
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.min.css">
+<script th:src="@{/plugin/vue-treeselect/vue-treeselect.umd.min.js}"></script>
+<link rel="stylesheet" th:href="@{/plugin/vue-treeselect/vue-treeselect.min.css}">
<script>
@@ -1145,6 +1156,7 @@
//表单数据
form: {
isPresent: '否',
+ isCooperate: '2',
staus: '上架',
//产品组合
assembleGoods: [],
@@ -1593,10 +1605,16 @@
if (valid) {
- if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && _this.form.isInfinite == 'N' && !_this.form.carUseCount) {
- this.$message.error('请输入套餐最大使用次数!');
- _this.submiting = false;
- return false;
+ if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && _this.form.isInfinite == 'N') {
+ if (!_this.form.carUseCount) {
+ this.$message.error('请输入套餐最大使用次数!');
+ _this.submiting = false;
+ return false;
+ }
+ }
+
+ if (_this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && _this.form.isInfinite == 'Y') {
+ _this.form.carUseCount = 999;
}
@@ -1684,7 +1702,7 @@
_this.userAdbleEdit();
//如果是总产品加载总部分类信息
- _this.getShoppinggoodscategory(1);
+ // _this.getShoppinggoodscategory(1);
_this.getGoodstype(1);
}
});
--
Gitblit v1.9.1