Commit 73c3863e authored by pengyunqian's avatar pengyunqian

update:更新验证

parent 4ae2fc00
......@@ -554,7 +554,7 @@ export default {
async findProducts() {
// 获取参数
const { goods_spu_id, life_account_id } = this.ruleIdForm;
let [start_time, end_time] = this.timeSelect;
let [start_time, end_time] = this.timeSelect || [];
if (start_time && end_time) {
start_time = this.formatTime(start_time);
end_time = this.formatTime(end_time);
......@@ -581,7 +581,7 @@ export default {
}
},
selectGoodsChange(e) {
this.ruleForm.goods_sku_id = e.map((item) => item.goods_sku_id);
this.ruleForm.goods_spu_id = e.map((item) => item.goods_sku_id);
},
async getAllList() {
let all = await getMarketingList({
......@@ -594,14 +594,14 @@ export default {
async addList() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
console.log(this.ruleForm.goods_sku_id);
if (this.ruleForm.goods_sku_id.length <= 0) {
console.log(this.ruleForm.goods_spu_id);
if (this.ruleForm.goods_spu_id.length <= 0) {
ElMessage("请选择商品");
return;
} else {
var goods_sku_id =
this.ruleForm.goods_sku_id &&
this.ruleForm.goods_sku_id.join(",");
this.ruleForm.goods_spu_id &&
this.ruleForm.goods_spu_id.join(",");
}
// console.log(goods_sku_id);
let {
......@@ -609,10 +609,10 @@ export default {
first_commission_value,
second_commission_value,
} = this.ruleForm;
let [start_time, end_time] = this.timeSelect;
let [start_time, end_time] = this.timeSelect || [];
if (
!marketing_name ||
!first_commission_value ||
!second_commission_value ||
!start_time ||
!end_time
) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment