237 lines
5.4 KiB
Vue
237 lines
5.4 KiB
Vue
<template>
|
|
<div class="couponbody">
|
|
<div class="couponbodyhead">
|
|
<div class="couponbodyheadl">发放卡券</div>
|
|
<div class="couponbodyheadr">
|
|
<u-icon @click="goadd" name="plus" size="18" color="#338AFA"></u-icon>
|
|
</div>
|
|
</div>
|
|
<view class="couponlist">
|
|
<div class="couponlistitem" v-for="(item,index) in 3" :key="index">
|
|
<u-icon class='icon-right' name="arrow-right" size="14" color="#338AFA"></u-icon>
|
|
<div class="couponlistitem1">
|
|
<div class="coupontitle">卡券类型:</div>
|
|
<div class="coupondesc">满减券</div>
|
|
</div>
|
|
<div class="couponlistitem1">
|
|
<div class="coupontitle">数量:</div>
|
|
<div class="coupondesc">888889</div>
|
|
</div>
|
|
<div class="couponlistitem1">
|
|
<div class="coupontitle">开始时间:</div>
|
|
<div class="coupondesc">2022-01-12</div>
|
|
</div>
|
|
<div class="couponlistitem1">
|
|
<div class="coupontitle">结束时间:</div>
|
|
<div class="coupondesc">2022-02-12</div>
|
|
</div>
|
|
<div class="couponlistitem2">
|
|
<div class="coupontitle">卡券内容:</div>
|
|
<div class="coupondesc">满减券满痲券满减券满减券满臧券满减券满减券满减券满减券</div>
|
|
</div>
|
|
<div class="couponlistitem2">
|
|
<div class="coupontitle">使用地址:</div>
|
|
<u-input v-model="value" type="text" :border="false" />
|
|
</div>
|
|
<div class="couponlistitem2">
|
|
<div class="coupontitle">测试:</div>
|
|
<input-select-dialog :value.sync="formObj.checkNo" input-placeholder="请选择盘点单号"
|
|
:query-param="checkNoQueryParam" :get-list-data="fetchList" :maskCloseAble="true"
|
|
:usePage="true" :allowSearch="true"
|
|
:before-open-fun="checkErpStorageLocation" @doSelected="checkNoSelected">
|
|
<template #row="{ item, description }">
|
|
<u-cell-item :border-bottom="false" style="padding-top: 0px; padding-bottom: 0px;" :arrow="false" >
|
|
<text slot="title">物料编码:{{ item }} </text>
|
|
<text slot="label">描述:{{ description }}</text>
|
|
</u-cell-item>
|
|
</template>
|
|
</input-select-dialog>
|
|
</div>
|
|
</div>
|
|
</view>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import scanBarcode from '@/common/scanBarcode';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
keywords: '',
|
|
query: {
|
|
current: 1,
|
|
size: 20
|
|
},
|
|
formObj: {
|
|
checkNo: ''
|
|
},
|
|
checkNoQueryParam: {},
|
|
fetchList: this.$u.api.item.fetchList,
|
|
list: [],
|
|
count: 0,
|
|
loadStatus: 'loadmore',
|
|
options: [{
|
|
text: '删除',
|
|
style: {
|
|
background: '#dd524d'
|
|
}
|
|
}]
|
|
};
|
|
},
|
|
onLoad(options) {
|
|
console.log(options['ACTIVITY_ID'])
|
|
this.loadList();
|
|
},
|
|
onShow() {
|
|
if (uni.getStorageSync('refreshList') === true) {
|
|
uni.removeStorageSync('refreshList');
|
|
this.search('');
|
|
}
|
|
},
|
|
methods: {
|
|
cardClick(id) {
|
|
uni.navigateTo({
|
|
url: '/pages/sys/momxTenant/form?id=' + id
|
|
})
|
|
},
|
|
loadMore() {
|
|
this.loadStatus = "loading";
|
|
setTimeout(() => {
|
|
this.query.current += 1;
|
|
this.loadList();
|
|
}, 100);
|
|
},
|
|
loadList() {
|
|
this.$u.api.momxTenant.fetchList(this.query).then(res => {
|
|
if (!res.data.records || res.data.records.length === 0) {
|
|
this.loadStatus = "nomore";
|
|
return;
|
|
}
|
|
this.list = this.list.concat(res.data.records);
|
|
this.total = res.data.total;
|
|
this.query.current = res.data.current;
|
|
this.query.size = res.data.size;
|
|
|
|
this.loadStatus = "loadmore";
|
|
});
|
|
},
|
|
del(id) {
|
|
let self = this;
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '确认要删除该数据吗?',
|
|
showCancel: true,
|
|
success: function(res2) {
|
|
if (res2.confirm) {
|
|
self.$u.api.momxTenant.delObj({
|
|
id: id
|
|
}).then(res => {
|
|
self.$u.toast('删除成功');
|
|
self.query.current = 1
|
|
self.list = []
|
|
self.loadList()
|
|
});
|
|
}
|
|
}
|
|
});
|
|
},
|
|
checkNoSelected(row) {
|
|
alert(JSON.stringify(row))
|
|
},
|
|
checkErpStorageLocation() {
|
|
return true;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.couponbody {
|
|
width: 100%;
|
|
width: 630rpx;
|
|
margin: 30rpx auto;
|
|
|
|
.couponbodyhead {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: nowrap;
|
|
flex-direction: row;
|
|
|
|
.couponbodyheadl {
|
|
font-size: 26rpx;
|
|
color: #000;
|
|
}
|
|
|
|
.couponbodyheadr {}
|
|
}
|
|
}
|
|
|
|
.couponlist {
|
|
width: 630rpx;
|
|
margin: 30rpx auto;
|
|
|
|
.couponlistitem {
|
|
background: #FAFAFA;
|
|
padding: 30rpx;
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: flex-start;
|
|
flex-wrap: wrap;
|
|
flex-direction: row;
|
|
margin-bottom: 30rpx;
|
|
|
|
.couponlistitem1 {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
flex-wrap: nowrap;
|
|
flex-direction: row;
|
|
height: 60rpx;
|
|
width: 50%;
|
|
|
|
.coupontitle {
|
|
color: #A9A9A9;
|
|
font-size: 24rpx;
|
|
width: 130rpx;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.coupondesc {
|
|
color: #4E4E4E;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.couponlistitem2 {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
flex-wrap: nowrap;
|
|
flex-direction: row;
|
|
height: 60rpx;
|
|
width: 90%;
|
|
|
|
.coupontitle {
|
|
color: #A9A9A9;
|
|
font-size: 24rpx;
|
|
width: 130rpx;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.coupondesc {
|
|
color: #4E4E4E;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.icon-right {
|
|
position: absolute;
|
|
right: 10rpx;
|
|
top: 50%;
|
|
}
|
|
</style> |