Browse Source

修复优惠券时间问题

master
sj 2 years ago
parent
commit
78f26b76c4
  1. 10
      src/views/bxg/activity/coupon/form.vue
  2. 4
      src/views/bxg/activity/coupon/index.vue
  3. 16
      src/views/bxg/shop/storeBrand/index.vue
  4. 17
      src/views/bxg/shop/yxStoreHotList/index.vue

10
src/views/bxg/activity/coupon/form.vue

@ -24,8 +24,9 @@
<!-- </el-form-item>-->
<el-form-item label="有效期开始时间">
<el-date-picker
v-model="form.useStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.useStartTime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
@ -33,6 +34,7 @@
<el-date-picker
v-model="form.useEndTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
@ -93,6 +95,9 @@ export default {
}
},
methods: {
change(val){
console.log(val)
},
getGoods(p) {
var ids = []
p.forEach((item,index) => {
@ -109,7 +114,6 @@ export default {
doSubmit() {
this.loading = true
if (this.isAdd) {
// console.log(typeof(this.form.useStartTime),this.form.useStartTime);
this.doAdd()
} else this.doEdit()
},
@ -162,6 +166,8 @@ export default {
couponPrice: 0,
useMinPrice: 0,
// couponTime: 1,
useStartTime:'',
useEndTime:'',
sort: 0,
status: 1,
type: 0,

4
src/views/bxg/activity/coupon/index.vue

@ -167,8 +167,8 @@ export default {
integral: data.integral,
couponPrice: data.couponPrice,
useMinPrice: data.useMinPrice,
useStartTime:new Date(data.useStartTime),
useEndTime:new Date(data.useEndTime),
useStartTime:data.useStartTime,
useEndTime:data.useEndTime,
// couponTime: data.couponTime,
sort: data.sort,
status: data.status,

16
src/views/bxg/shop/storeBrand/index.vue

@ -27,6 +27,9 @@
<el-form-item label="图标">
<MaterialList v-model="picArr" type="image" :num="1" :width="150" :height="150" />
</el-form-item>
<el-form-item label="背景图">
<MaterialList v-model="picArr1" type="image" :num="1" :width="150" :height="150" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.isShow" style="width: 178px">
<el-radio :label="1">显示</el-radio>
@ -91,7 +94,7 @@ import MaterialList from "@/components/material";
// crudpresenter
const defaultCrud = CRUD({ title: '品牌', url: '/bxg/api/yxStoreBrand', sort: 'id,desc', crudMethod: { ...crudYxStoreBrand }})
const defaultForm = { id: null, brandName: null, sort: null, pic: null, isShow: null, createTime: null, updateTime: null, isDel: null, tenantId: null }
const defaultForm = { id: null, brandName: null, sort: null, pic: null,backgroundImage:null,isShow: null, createTime: null, updateTime: null, isDel: null, tenantId: null }
export default {
name: 'YxStoreBrand',
components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList},
@ -99,6 +102,7 @@ export default {
data() {
return {
picArr: [],
picArr1: [],
permission: {
add: ['admin', 'yxStoreBrand:add'],
edit: ['admin', 'yxStoreBrand:edit'],
@ -112,8 +116,10 @@ export default {
},
watch: {
picArr: function(val) {
console.log();
this.form.pic = val.join(',')
},
picArr1: function(val) {
this.form.backgroundImage = val.join(',')
}
},
methods: {
@ -123,11 +129,13 @@ export default {
}, //
[CRUD.HOOK.afterToCU](crud, form) {
this.picArr = []
this
this.picArr1= []
if (form.pic && form.id) {
this.picArr = form.pic.split(',')
}
if (form.backgroundImage && form.id) {
this.picArr1 = form.backgroundImage.split(',')
}
},
}
}

17
src/views/bxg/shop/yxStoreHotList/index.vue

@ -19,7 +19,7 @@
clearable
@change="cascaderChange($event)"
v-model="productList"
placeholder="试试搜索:眼镜"
placeholder="多选,按选择顺序排序"
:options="cateList"
ref="quitCascader"
filterable></el-cascader>
@ -144,20 +144,6 @@ export default {
this.getInfo();
},
methods: {
//使
// cascaderChange(val) {
// this.oldProductList= val;
// //,
// if (val.length<=1){
// // this.oldProductList=[]
// }else {
// // productList=this.getCascader(val,this.$refs.cascader.getCheckedNodes());
// // this.label = productList.label; //
// console.log('val',val, this.oldProductList,)
// this.productList=[];
// // console.log('1111',val)
// }
// },
cascaderChange(val) {
this.productList=[]
let productList=[]
@ -165,7 +151,6 @@ export default {
this.productList = productList //
this.oldProductList=productList;
this.form.productList=JSON.stringify(this.productList.map(item=>item[1]));
this.$refs.quitCascader.inputValue="你想要框内显示的值"
},
getCascader(newVal,oldVal) {
let productList = []

Loading…
Cancel
Save