chenrui il y a 2 ans
Parent
commit
fc88388b3a

+ 101 - 0
components/customPicker/checkBoxPicker.vue

@@ -0,0 +1,101 @@
+<template>
+	<view>
+		<u-popup v-model="isShow" @close="isShow = false" mode="bottom" safe-area-inset-bottom border-radius="20" >
+			<view class="content flex flex_column">
+				<view class="con">
+					<view class="choose-list u-flex u-row-between" v-for="(item,i) in list" :key="item.id" @click="getChooseItem(i)">
+						<view>{{item.name}}</view>
+						<u-icon v-show="item.isChecked" name="checkbox-mark" color="#2979ff" size="28"></u-icon>
+					</view>
+				</view>
+				<view class="btn u-flex">
+					<view class="cancleStyle" @click="isShow = false">取消</view>
+					<view class="confimStyle" :style="{background:$config('primaryColor'),color:'#fff'}" @click="submit">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	export default{
+		props:{
+			showModal:{
+				type: Boolean,
+				default: false
+			},
+			dataList:{
+				type: Array,
+				default: ()=>[]
+			}	
+		},
+		data(){
+			return{
+				isShow:this.showModal,
+				chooseObj:null,
+				chooseFlag:-1,
+				list:[]
+			}
+		},
+		methods:{
+			submit(index){
+				let arr = [];
+				this.list.forEach(con=>{
+					if(con.isChecked){
+						arr.push(con)
+					}
+				})
+				this.$emit('chooseCon',arr)
+				this.isShow = false
+			},
+			getChooseItem(index){
+				this.list[index].isChecked=!this.list[index].isChecked;
+			}
+		},
+		watch:{
+			//  父页面传过来的弹框状态
+			showModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}else{
+					this.list=this.dataList;
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content{
+		width: 100%;
+		height: 100%;
+		.con{
+			flex-grow: 1;
+			overflow: auto;
+			padding:0 40rpx;
+			.choose-list{
+				border-bottom: 1rpx solid #efefef;
+				padding:20rpx 0;
+				&:last-child{
+					border-bottom: 0rpx solid #efefef;
+				}
+			}
+		}
+		.btn{
+			border-top: 1rpx solid #efefef;
+			.cancleStyle,.confimStyle{
+				width: 50%;
+				text-align: center;
+				height: 89rpx;
+				line-height: 89rpx;
+				text-align: center;
+			}
+			
+		}
+		
+	}
+</style>

+ 100 - 0
components/customPicker/redioPicker.vue

@@ -0,0 +1,100 @@
+<template>
+	<view>
+		<u-popup v-model="isShow" @close="isShow = false" mode="bottom" safe-area-inset-bottom border-radius="20" >
+			<view class="content flex flex_column">
+				<view class="con">
+					<view class="choose-list u-flex u-row-between" v-for="(item,i) in dataList" :key="item.id" @click="getChooseItem(i)">
+						<view>{{item.name}}</view>
+						<u-icon v-show="chooseFlag==i" name="checkbox-mark" color="#2979ff" size="28"></u-icon>
+					</view>
+				</view>
+				<view class="btn u-flex">
+					<view class="cancleStyle" @click="isShow = false">取消</view>
+					<view class="confimStyle" :style="{background:$config('primaryColor'),color:'#fff'}" @click="submit">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	export default{
+		props:{
+			showModal:{
+				type: Boolean,
+				default: false
+			},
+			dataList:{
+				type: Array,
+				default: ()=>[]
+			}	
+		},
+		data(){
+			return{
+				isShow:this.showModal,
+				chooseObj:null,
+				chooseFlag:-1
+			}
+		},
+		methods:{
+			submit(index){
+				if(this.chooseFlag == -1){
+					this.chooseObj = null
+				}
+				this.$emit('chooseItem',this.chooseObj)
+				this.isShow = false
+			},
+			getChooseItem(index){
+				if(this.chooseFlag == index){
+					this.chooseFlag = -1
+				}else{
+					this.chooseFlag = index
+				}
+				this.chooseObj=this.dataList[index]
+			}
+		},
+		watch:{
+			//  父页面传过来的弹框状态
+			showModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content{
+		width: 100%;
+		height: 100%;
+		.con{
+			flex-grow: 1;
+			overflow: auto;
+			padding:0 40rpx;
+			.choose-list{
+				border-bottom: 1rpx solid #efefef;
+				padding:20rpx 0;
+				&:last-child{
+					border-bottom: 0rpx solid #efefef;
+				}
+			}
+		}
+		.btn{
+			border-top: 1rpx solid #efefef;
+			.cancleStyle,.confimStyle{
+				width: 50%;
+				text-align: center;
+				height: 89rpx;
+				line-height: 89rpx;
+				text-align: center;
+			}
+			
+		}
+		
+	}
+</style>

+ 6 - 0
pages.json

@@ -50,6 +50,12 @@
 				"navigationBarTitleText": "修改密码"
 			}
 		},
+		{
+			"path": "pages/userCenter/setData",		//  我的>修改密码
+			"style": {
+				"navigationBarTitleText": "系统参数"
+			}
+		},
 		{
 			"path": "pages/xtNotice/xtNotice",		//  我的>消息
 			"style": {

+ 5 - 1
pages/userCenter/index.vue

@@ -23,6 +23,9 @@
 					<u-badge :count="noReadNums" :absolute="false" slot="right-icon"></u-badge>
 				</u-cell-item>
 				<u-cell-item icon="edit-pen" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="toPage(1)" title="修改密码"></u-cell-item>
+				<u-cell-item  index="1" @click="toPage(4)" title="系统参数">
+					<u-icon slot="icon" name="xitongcanshu-05" custom-prefix="iscm-icon" size="42" color="#00aaff"></u-icon>
+				</u-cell-item>
 				<u-cell-item icon="man-delete" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="closeAccount" title="注销账户"></u-cell-item>
 				<u-cell-item icon="reload" icon-size="35" :icon-style="{color:'#00aaff'}" index="1" @click="resetPrint" title="重置打印机"></u-cell-item>
 			</u-cell-group>
@@ -162,7 +165,8 @@
 					'/pages/login/userAuthYs?fromPage=usercenter',
 					'/pages/userCenter/changePwd',
 					'getVersion',
-					'/pages/xtNotice/xtNotice'
+					'/pages/xtNotice/xtNotice',
+					'/pages/userCenter/setData'
 					]
 				if(index != 2){
 					uni.navigateTo({

+ 115 - 0
pages/userCenter/setData.vue

@@ -0,0 +1,115 @@
+<template>
+	<view class="content">
+		<view class="tit">
+			应收对账单
+		</view>
+		<view class="con">
+			<u-cell-group :border="false">
+				<u-cell-item title="对账周期默认值">
+					<u-input slot="right-icon" v-model="billCycle" @click="showModal=true" disabled placeholder="请选择对账周期" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item>
+				<u-cell-item title="参与对账的销售单业务状态">
+					<u-input slot="right-icon" v-model="billStatus" @click="showCheckBoxModal=true" disabled placeholder="请选择参与对账的销售单业务状态" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item>
+				<u-cell-item title="参与对账的销售单来源">
+					<u-input slot="right-icon" v-model="billCycle" @click="showModal=true" disabled placeholder="请选择参与对账的销售单来源" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item>
+				<u-cell-item  title="铺货销售单是否参与对账">
+					<u-switch :size="40" :active-color="activeColor" slot="right-icon" v-model="checked"></u-switch>
+				</u-cell-item>
+				<u-cell-item title="对账单选择客户默认页签" :border-bottom="false">
+					<u-input slot="right-icon" v-model="billCycle" @click="showModal=true" disabled placeholder="请选择对账单客户" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item>
+			</u-cell-group>
+		</view>
+		<!-- 类似于picker单选 -->
+		<redioPicker :showModal="showModal" @chooseItem="chooseCycle"  @close="showModal=false" :dataList="cycleList"></redioPicker>
+		<!-- 类似于picker多选 -->
+		<checkBoxPicker :showModal="showCheckBoxModal" @chooseCon="chooseStatus"  @close="showCheckBoxModal=false" :dataList="statusList"></checkBoxPicker>
+	</view>
+</template>
+
+<script>
+	import redioPicker from '@/components/customPicker/redioPicker.vue'
+	import checkBoxPicker from '@/components/customPicker/checkBoxPicker.vue'
+	export default{
+		components:{
+			redioPicker,
+			checkBoxPicker
+		},
+		data(){
+			return{
+				showModal:false,
+				cycleList:[
+					{id:1,name:'全部'},
+					{id:2,name:'昨日'},
+					{id:3,name:'今日'},
+					{id:4,name:'上周'},
+					{id:5,name:'本周'},
+					{id:6,name:'上月'},
+					{id:7,name:'本月'}
+				],
+				billCycle:'',
+				checked:false,
+				inputStyle:{
+					'text-align':'right'
+				},
+				activeColor:this.$config('primaryColor'),
+				showCheckBoxModal:false,
+				statusList:[
+					{id:1,isChecked:false,name:'待提交'},
+					{id:1,isChecked:false,name:'待审核'},
+					{id:1,isChecked:false,name:'待出库'},
+					{id:1,isChecked:false,name:'已完结'}
+				],
+				billStatus:'',
+				originList:[
+					{id:1,isChecked:false,name:'自建'},
+					{id:1,isChecked:false,name:'下级创建'},
+					{id:1,isChecked:false,name:'数字货架'}
+				],
+				customlist:[
+					{id:1,isChecked:false,name:'最近开单用户(月)'},
+					{id:1,isChecked:false,name:'最近开单用户(日)'},
+					{id:1,isChecked:false,name:'全部客户'}
+				],
+			}
+		},
+		onLoad() {
+		
+		},
+		methods:{
+			chooseCycle(con){
+				this.billCycle = con.name
+			},
+			chooseStatus(arr){
+				this.billStatus = '已选'+arr.length+'项'
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content{
+		width: 100%;
+		height: 100vh;
+		.tit{
+			padding:30rpx 20rpx 16rpx;
+		}
+		.con{
+			box-sizing: border-box;
+			width: calc(100% - 40rpx);
+			margin:0 auto;
+			border-radius: 30rpx;
+			overflow: hidden;
+			.u-cell{
+				padding:14rpx 26rpx;
+				color:#333;
+				/deep/.u-cell_right{
+					max-width: 40% !important;
+				}
+			}
+			
+		}
+	}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff