Commit 73c3863e authored by pengyunqian's avatar pengyunqian

update:更新验证

parent 4ae2fc00
...@@ -554,7 +554,7 @@ export default { ...@@ -554,7 +554,7 @@ export default {
async findProducts() { async findProducts() {
// 获取参数 // 获取参数
const { goods_spu_id, life_account_id } = this.ruleIdForm; 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) { if (start_time && end_time) {
start_time = this.formatTime(start_time); start_time = this.formatTime(start_time);
end_time = this.formatTime(end_time); end_time = this.formatTime(end_time);
...@@ -581,7 +581,7 @@ export default { ...@@ -581,7 +581,7 @@ export default {
} }
}, },
selectGoodsChange(e) { 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() { async getAllList() {
let all = await getMarketingList({ let all = await getMarketingList({
...@@ -594,14 +594,14 @@ export default { ...@@ -594,14 +594,14 @@ export default {
async addList() { async addList() {
this.$refs.ruleForm.validate(async (valid) => { this.$refs.ruleForm.validate(async (valid) => {
if (valid) { if (valid) {
console.log(this.ruleForm.goods_sku_id); console.log(this.ruleForm.goods_spu_id);
if (this.ruleForm.goods_sku_id.length <= 0) { if (this.ruleForm.goods_spu_id.length <= 0) {
ElMessage("请选择商品"); ElMessage("请选择商品");
return; return;
} else { } else {
var goods_sku_id = var goods_sku_id =
this.ruleForm.goods_sku_id && this.ruleForm.goods_spu_id &&
this.ruleForm.goods_sku_id.join(","); this.ruleForm.goods_spu_id.join(",");
} }
// console.log(goods_sku_id); // console.log(goods_sku_id);
let { let {
...@@ -609,10 +609,10 @@ export default { ...@@ -609,10 +609,10 @@ export default {
first_commission_value, first_commission_value,
second_commission_value, second_commission_value,
} = this.ruleForm; } = this.ruleForm;
let [start_time, end_time] = this.timeSelect; let [start_time, end_time] = this.timeSelect || [];
if ( if (
!marketing_name || !marketing_name ||
!first_commission_value || !second_commission_value ||
!start_time || !start_time ||
!end_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