Commit 4ceb19c6 authored by chuan.liu's avatar chuan.liu

新增商机选择 商户选择 地址管理界面

parent 0c55c956
......@@ -147,7 +147,7 @@
}
}
},{
"path": "pages/select-sale-plan/select-sale-plan",
"path": "pages/select-product/select-product",
"style": {
"app-plus": {
"titleNView": {
......@@ -166,6 +166,60 @@
}
}
}
},{
"path": "pages/select-business/select-business",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "transparent",
"titleText": "商机选择",
"autoBackButton": false,
"buttons": [{
"type": "none",
"text": "选择",
"fontSize": "14px",
"color": "#555"
}]
}
}
}
},{
"path": "pages/select-group-client/select-group-client",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "transparent",
"titleText": "团购客户选择",
"autoBackButton": false,
"buttons": [{
"type": "none",
"text": "选择",
"fontSize": "14px",
"color": "#555"
}]
}
}
}
},{
"path": "pages/address-manage/address-manage",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "#fff",
"titleText": "收货地址",
"autoBackButton": true
}
}
}
},{
"path": "pages/logistics/logistics",
"style": {
......
<template>
<view class="order view">
<view class="status_bar" :style="navHeight"></view>
<view class="listview">
<view class="cell-list">
<view class="cell-list-block" @click="check" v-for="item in 10" :key='item'>
<text class="icon-address">张</text>
<view class="cell-list-block__content">
<view class="list-block-item">
<text class="list-block-item__title1">张先生 13760362013</text>
</view>
<view class="list-block-item">
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__value">38000680</text>
</view>
<view class="list-block-item">
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__value">常委会退休处</text>
</view>
<view class="list-block-item">
<image class="icon-arrow" src="@/static/image/uc_setting@3x.png" mode="aspectFit"></image>
<text class="list-block-item__desc">天津天津市静海县华佗大道529号</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
data() {
return {
}
},
computed: {
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
...mapState(['sysinfo'])
},
methods: {
check(item) {
uni.navigateBack({
})
}
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
/* #ifndef APP-PLUS */
page {
width: 100%;
min-height: 100%;
display: flex;
background: #fff;
}
.status_bar {
height: var(--status-bar-height);
background: #fff;
}
/* #endif */
.order {
flex: 1;
background: #f8f9fa;
}
.listview {
flex: 1;
flex-direction: column;
padding: 16rpx;
}
.cell-list {
flex-direction: column;
}
.icon-address {
width: 88rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #fff4f4;
font-size: 28rpx;
color: #ff1d32;
font-weight: 500;
border-radius: 50%;
margin-right: 32rpx;
}
.cell-list-block__content {
display: flex;
flex: 1;
flex-direction: column;
}
.list-block-item{
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.list-block-item__title1{
color: #333;
font-weight: 500;
font-size: 32rpx;
}
.list-block-item__label{
color: #999999;
font-size: 24rpx;
margin-right: 16rpx;
}
.list-block-item__value{
color: #333333;
font-size: 12px;
}
.cell-list-block__desc {
color: #333;
font-size: 12px;
}
.icon-arrow {
width: 18rpx;
height: 22rpx;
margin-right: 28rpx;
}
.cell-list-block {
display: flex;
margin-bottom: 16rpx;
background: #fff;
border-radius: 8px;
padding: 32rpx 36rpx 32rpx 16rpx;
align-items: center;
}
</style>
<template>
<view class="lists">
<view class="middle view planout-block-item">
<view class="text-block">
<view class="text-block" @click="selectGroupClient">
<text class="middle-date">团购单位</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
......@@ -12,12 +12,12 @@
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
<view class="text-block">
<view class="text-block" @click="selectBusiness">
<text class="middle-date">商机选择</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
<text class="middle-date-des">{{selectedBusiness.product}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -47,19 +47,19 @@
</view>
<view class="text-block">
<text class="middle-date">外箱喷码内容</text>
<input class="middle-date-des" type="text" value="" placeholder="请选择" />
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block">
<text class="middle-date">联系人</text>
<input class="middle-date-des" type="text" value="" placeholder="请选择" />
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<text class="middle-date">电话</text>
<input class="middle-date-des" type="text" value="" placeholder="请选择" />
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last" @click="selectAddress">
<text class="middle-date">收货地址</text>
<input class="middle-date-des" type="text" value="" placeholder="请选择" />
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
</view>
......@@ -80,10 +80,57 @@
export default {
data() {
return {
applyNum: 100
selectedBusiness: {
id:'请选择',
checked:false,
product:'请填写',
quantity:0,
price:0
},
selectedGroupClient:{
id:'请选择',
checked:false,
product:'请填写',
quantity:0,
price:0
}
}
},
onBackPress(event){
console.log('event',event)
uni.switchTab({
url: `/pages/go-order/go-order`
})
return false
},
mounted() {
console.log('监听到事件来自 update');
let _this = this
uni.$once('selectedBusiness',function(data){
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:' + data.selectedBusiness.id);
_this.selectedBusiness = {...data.selectedBusiness}
})
uni.$once('selectedGroupClient',function(data){
console.log('监听到事件来自 selectedGroupClient ,携带参数 msg 为:' + data.selectedGroupClient.id);
_this.selectedGroupClient = {...data.selectedGroupClient}
})
},
methods: {
selectGroupClient(){
uni.navigateTo({
url: `/pages/select-group-client/select-group-client`
});
},
selectBusiness(){
uni.navigateTo({
url: `/pages/select-business/select-business`
});
},
selectAddress(){
uni.navigateTo({
url: `/pages/address-manage/address-manage`
});
},
nextStep() {
this.$emit('click', 'quotaOrder')
},
......
......@@ -18,7 +18,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
<text class="middle-date-des">{{selectedSalePlan.id}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -29,18 +29,18 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
<input class="middle-date-des" type="text" v-model="selectedSalePlan.product" placeholder="请填写" />
</view>
</view>
</view>
</view>
<view class="text-block">
<text class="middle-date">数量(件)</text>
<text class="middle-date-des">789</text>
<text class="middle-date-des">{{selectedSalePlan.quantity}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">单价</text>
<text class="middle-date-des">789*6*4</text>
<text class="middle-date-des">{{selectedSalePlan.price}}</text>
</view>
</view>
......@@ -56,12 +56,12 @@
<view class="text-block title-first">
<text class="middle-date title-first__text">1</text>
</view>
<view class="text-block">
<view class="text-block" @click="selectProduct">
<text class="middle-date">产品</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
<text class="middle-date-des">{{selectedProduct.product}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -69,15 +69,15 @@
</view>
<view class="text-block">
<text class="middle-date">数量(件)</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
<input class="middle-date-des" type="text" v-model="selectedProduct.quantity" placeholder="请填写" />
</view>
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date-des">789</text>
<text class="middle-date-des">{{selectedProduct.price}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">小计</text>
<text class="middle-date-des">789*6*4</text>
<text class="middle-date-des">{{selectedProduct.quantity}}</text>
</view>
</view>
<template v-slot:right>
......@@ -104,7 +104,20 @@
export default {
data() {
return {
applyNum: 100
selectedSalePlan: {
id:'请选择',
checked:false,
product:'请填写',
quantity:0,
price:0
},
selectedProduct:{
id:'请选择',
checked:false,
product:'请填写',
quantity:0,
price:0
}
}
},
onBackPress(event){
......@@ -114,6 +127,18 @@
})
return false
},
mounted() {
console.log('监听到事件来自 update');
let _this = this
uni.$once('selectedSalePlan',function(data){
console.log('监听到事件来自 selectedSalePlan ,携带参数 msg 为:' + data.selectedSalePlan.id);
_this.selectedSalePlan = {...data.selectedSalePlan}
})
uni.$once('selectedProduct',function(data){
console.log('监听到事件来自 selectedProduct ,携带参数 msg 为:' + data.selectedProduct.id);
_this.selectedProduct = {...data.selectedProduct}
})
},
methods: {
handleDel() {
console.log(1)
......@@ -123,6 +148,11 @@
url: `/pages/select-sale-plan/select-sale-plan`
});
},
selectProduct(){
uni.navigateTo({
url: `/pages/select-product/select-product`
});
},
nextStep() {
this.$emit('click','orderUpload')
},
......
<template>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<view class="main">
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">商机名称</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block">
<text class="middle-date">商机所有人</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<text class="middle-date">团购单位名称</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="planout-block">
<button class="btn" type="default" @tap="search">
<text class="btn-text">查询</text>
</button>
</view>
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.id' :auto-close="false" :disabled='true' :show="isOpened" @click="handleClick">
<template v-slot:left>
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
class="swipe-right-block__text" :class="{'swipe-right-block__active':item.checked}"></text>
</view>
</template>
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">商机编码</text>
<text class="middle-date-des">300820638</text>
</view>
<view class="text-block">
<text class="middle-date">商机名称</text>
<text class="middle-date-des">年底促销</text>
</view>
<view class="text-block">
<text class="middle-date">客户编号</text>
<text class="middle-date-des">800235672</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">客户名称</text>
<text class="middle-date-des">机关单位</text>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
data() {
return {
isOpened: 'none',
array: ['2021', '2020', '2019', '2018'],
index: 0,
lists:[
{
id:1,
checked:false,
product:'新品五粮液',
quantity:2,
price:100
},
{
id:2,
checked:false,
product:'新品五粮液91 52%',
quantity:4,
price:200
}
],
selectedBusiness:{}
}
},
computed: {
...mapState(['sysinfo']),
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
},
onNavigationBarButtonTap(e){
console.log('onNavigationBarButtonTap:',e);
this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
// #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview();
console.log('webView',webView)
webView.setTitleNViewButtonStyle(0, {
text: this.isOpened === 'none' ? '选择' : '完成',
});
// #endif
if(this.isOpened === 'none'){
uni.$emit('selectedBusiness',{selectedBusiness:this.selectedBusiness})
uni.navigateBack({})
}
},
methods: {
search() {
},
bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
handleClick(e,content,index){
console.log('click当前索引:',e,content, index);
},
handleChecked(e,item,index){
console.log('当前索引:',e, index);
this.lists.forEach((cur)=>{
if(cur.id === item.id){
cur.checked = !cur.checked
}else{
cur.checked = false
}
})
if(item.checked === true){
// this.selectedBusiness.push(item)
this.selectedBusiness = item
}else{
// const selectIndex = this.selectedBusiness.findIndex((saleplan)=>{
// return saleplan.id === item.id
// })
// this.selectedBusiness.splice(selectIndex,1)
this.selectedBusiness = {}
}
},
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.header-bg {
height: 284rpx;
opacity: 0.72;
margin-top: -88rpx;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
}
.lists {
position: relative;
flex-direction: column;
overflow-y: scroll;
background: #f0f4f5;
}
.main {
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
}
.middle {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.text-block {
over-overflow: hidden;
height: 96rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 96rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 3;
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
}
.uni-list-cell {
flex: 1;
}
.uni-list-cell-db {
flex: 1;
}
.picker-block {
flex: 1;
}
.icon-arrow {
position: absolute;
right: 0;
top: 16px;
width: 12rpx;
height: 20rpx;
z-index: 10;
}
.planout-block-lists {
display: flex;
flex-direction: column;
}
.uni-swipe {
flex: 1;
margin-bottom: 26rpx;
}
/deep/ .uni-swipe_box {
flex: 1;
}
.swipe-right-block {
width: 100rpx;
justify-content: center;
align-items: center;
}
.swipe-right-block__text {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
background-color: #fff;
}
.swipe-right-block__active {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
background-color:$wly-primary-color ;
}
.planout-block {
display: flex;
justify-content: space-between;
height: 84rpx;
margin-top: 64rpx;
margin-bottom: 48rpx;
padding: 0 24rpx;
}
.planout-block-item {
flex: 1;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
</style>
<template>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg"></view>
<view class="main">
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">团购单位类型</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<text class="middle-date">团购单位名称</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="planout-block">
<button class="btn" type="default" @tap="search">
<text class="btn-text">查询</text>
</button>
</view>
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="(item,index) in lists" :key='item.id' :auto-close="false" :disabled='true' :show="isOpened" @click="handleClick">
<template v-slot:left>
<view class="swipe-right-block" @click="handleChecked($event,item, index)"><text
class="swipe-right-block__text" :class="{'swipe-right-block__active':item.checked}"></text>
</view>
</template>
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">团购编码</text>
<text class="middle-date-des">300820638</text>
</view>
<view class="text-block">
<text class="middle-date">团购名称</text>
<text class="middle-date-des">迎新年退休职工团拜会</text>
</view>
<view class="text-block">
<text class="middle-date">城市</text>
<text class="middle-date-des">山东省淄博市张店区</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">地址</text>
<text class="middle-date-des">新生活广场 12栋 1单元 2708</text>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
data() {
return {
isOpened: 'none',
array: ['2021', '2020', '2019', '2018'],
index: 0,
lists:[
{
id:1,
checked:false,
product:'新品五粮液',
quantity:2,
price:100
},
{
id:2,
checked:false,
product:'新品五粮液91 52%',
quantity:4,
price:200
}
],
selectedGroupClient:{}
}
},
computed: {
...mapState(['sysinfo']),
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
},
onNavigationBarButtonTap(e){
console.log('onNavigationBarButtonTap:',e);
this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
// #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview();
console.log('webView',webView)
webView.setTitleNViewButtonStyle(0, {
text: this.isOpened === 'none' ? '选择' : '完成',
});
// #endif
if(this.isOpened === 'none'){
uni.$emit('selectedGroupClient',{selectedGroupClient:this.selectedGroupClient})
uni.navigateBack({})
}
},
methods: {
search() {
},
bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
handleClick(e,content,index){
console.log('click当前索引:',e,content, index);
},
handleChecked(e,item,index){
console.log('当前索引:',e, index);
this.lists.forEach((cur)=>{
if(cur.id === item.id){
cur.checked = !cur.checked
}else{
cur.checked = false
}
})
if(item.checked === true){
// this.selectedGroupClient.push(item)
this.selectedGroupClient = item
}else{
// const selectIndex = this.selectedGroupClient.findIndex((saleplan)=>{
// return saleplan.id === item.id
// })
// this.selectedGroupClient.splice(selectIndex,1)
this.selectedGroupClient = {}
}
},
nextStep() {
this.$emit('click', 'orderUpload')
},
preStep() {
uni.switchTab({
url: `/pages/go-order/go-order`
})
},
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.header-bg {
height: 284rpx;
opacity: 0.72;
margin-top: -88rpx;
background: linear-gradient(232deg, #f4e2e2 25%, #faf3f3 98%);
}
.lists {
position: relative;
flex-direction: column;
overflow-y: scroll;
background: #f0f4f5;
}
.main {
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
}
.middle {
background-color: #fff;
border-radius: 16rpx;
padding: 32rpx 64rpx 40rpx 48rpx;
}
.text-block {
over-overflow: hidden;
height: 96rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 96rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 3;
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
}
.uni-list-cell {
flex: 1;
}
.uni-list-cell-db {
flex: 1;
}
.picker-block {
flex: 1;
}
.icon-arrow {
position: absolute;
right: 0;
top: 16px;
width: 12rpx;
height: 20rpx;
z-index: 10;
}
.planout-block-lists {
display: flex;
flex-direction: column;
}
.uni-swipe {
flex: 1;
margin-bottom: 26rpx;
}
/deep/ .uni-swipe_box {
flex: 1;
}
.swipe-right-block {
width: 100rpx;
justify-content: center;
align-items: center;
}
.swipe-right-block__text {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
background-color: #fff;
}
.swipe-right-block__active {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
background-color:$wly-primary-color ;
}
.planout-block {
display: flex;
justify-content: space-between;
height: 84rpx;
margin-top: 64rpx;
margin-bottom: 48rpx;
padding: 0 24rpx;
}
.planout-block-item {
flex: 1;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
</style>
......@@ -5,26 +5,8 @@
<view class="main">
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">年度</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
<view class="text-block">
<text class="middle-date">月度</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
<text class="middle-date">产品名称</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<text class="middle-date">计划类型</text>
......@@ -54,20 +36,20 @@
</template>
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">计划编码</text>
<text class="middle-date">产品编码</text>
<text class="middle-date-des">400820638</text>
</view>
<view class="text-block">
<text class="middle-date">类型</text>
<text class="middle-date-des">电商配额酒年度计划(1-5月)</text>
<text class="middle-date">描述</text>
<text class="middle-date-des">原度五粮液061 72%500ml*6</text>
</view>
<view class="text-block">
<text class="middle-date">产品</text>
<text class="middle-date-des">电商配额酒年度计划(1-5月)</text>
<text class="middle-date">产品类型</text>
<text class="middle-date-des">五粮液新品</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">可用件数</text>
<text class="middle-date-des">2</text>
<text class="middle-date">价格</text>
<text class="middle-date-des">2,38000</text>
</view>
</view>
......@@ -86,16 +68,25 @@
data() {
return {
isOpened: 'none',
array: ['2021', '2020', '2019', '2018'],
index: 0,
lists:[
{
id:1,
checked:false
checked:false,
product:'新品五粮液',
quantity:2,
price:100
},
{
id:2,
checked:false
checked:false,
product:'新品五粮液91 52%',
quantity:4,
price:200
}
]
],
selectedProduct:{}
}
},
computed: {
......@@ -116,10 +107,19 @@
text: this.isOpened === 'none' ? '选择' : '完成',
});
// #endif
if(this.isOpened === 'none'){
uni.$emit('selectedProduct',{selectedProduct:this.selectedProduct})
uni.navigateBack({})
}
},
methods: {
search() {
},
bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
handleClick(e,content,index){
console.log('click当前索引:',e,content, index);
......@@ -129,8 +129,21 @@
this.lists.forEach((cur)=>{
if(cur.id === item.id){
cur.checked = !cur.checked
}else{
cur.checked = false
}
})
if(item.checked === true){
// this.selectedProduct.push(item)
this.selectedProduct = item
}else{
// const selectIndex = this.selectedProduct.findIndex((saleplan)=>{
// return saleplan.id === item.id
// })
// this.selectedProduct.splice(selectIndex,1)
this.selectedProduct = {}
}
},
nextStep() {
this.$emit('click', 'orderUpload')
......
......@@ -9,7 +9,9 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
<picker class="picker-block" @change="bindPickerChange" :value="index" :range="array">
<text class="uni-input">{{array[index]}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -20,7 +22,9 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
<picker class="picker-block" @change="bindPickerChange" :value="index" :range="months">
<text class="uni-input">{{months[index]}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
......@@ -86,16 +90,26 @@
data() {
return {
isOpened: 'none',
array: ['2022','2021', '2020', '2019', '2018'],
months: ['十二月','十一月', '十月', '九月', '八月'],
index: 0,
lists:[
{
id:1,
checked:false
checked:false,
product:'新品五粮液',
quantity:2,
price:100
},
{
id:2,
checked:false
checked:false,
product:'新品五粮液91 52%',
quantity:4,
price:200
}
]
],
selectedSalePlan:{}
}
},
computed: {
......@@ -116,10 +130,18 @@
text: this.isOpened === 'none' ? '选择' : '完成',
});
// #endif
if(this.isOpened === 'none'){
uni.$emit('selectedSalePlan',{selectedSalePlan:this.selectedSalePlan})
uni.navigateBack({})
}
},
methods: {
search() {
},
bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
handleClick(e,content,index){
console.log('click当前索引:',e,content, index);
......@@ -129,8 +151,21 @@
this.lists.forEach((cur)=>{
if(cur.id === item.id){
cur.checked = !cur.checked
}else{
cur.checked = false
}
})
if(item.checked === true){
// this.selectedSalePlan.push(item)
this.selectedSalePlan = item
}else{
// const selectIndex = this.selectedSalePlan.findIndex((saleplan)=>{
// return saleplan.id === item.id
// })
// this.selectedSalePlan.splice(selectIndex,1)
this.selectedSalePlan = {}
}
},
nextStep() {
this.$emit('click', 'orderUpload')
......
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