浏览代码

commit -m 订单

zhengjinyi 4 年之前
父节点
当前提交
7138259e44

+ 7 - 7
components/cm-module/creatOrder/address.vue

@@ -8,8 +8,8 @@
 		 	<view class="address-content" v-else>
 		 		<view class="address-cen">
 		 			<view class="top">
-		 				<view class="name">{{addressData.shouHuoRen !== undefined ? addressData.shouHuoRen : ''}}</view>
-		 				<view class="mobile">{{addressData.mobile !== undefined ? addressData.mobile : ''}}</view>
+		 				<view class="name">{{addressData.shouHuoRen ? addressData.shouHuoRen : ''}}</view>
+		 				<view class="mobile">{{addressData.mobile ? addressData.mobile : ''}}</view>
 		 			</view>
 		 			<view class="address">
 						<view class="address-icon">
@@ -17,10 +17,10 @@
 						</view>
 						<view class="address-text">
 							收货地址:
-							{{addressData.province !== undefined ? addressData.province : ''}}
-							{{addressData.city !== undefined ? addressData.city : ''}}
-							{{addressData.town !== undefined ? addressData.town : ''}}
-							{{addressData.address !== undefined ? addressData.address : ''}}
+							{{addressData.provinceName ? addressData.provinceName : ''}}
+							{{addressData.cityName ? addressData.cityName : ''}}
+							{{addressData.townName ? addressData.townName : ''}}
+							{{addressData.address ? addressData.address : ''}}
 						</view>
 					</view>
 					<view class="nexpage"><text class="iconfont icon-genghuan"></text></view>
@@ -120,7 +120,7 @@
 			justify-content: center;
 			width: 40rpx;
 			color: $color-system;
-			font-size: 46rpx;
+			font-size: 40rpx;
 			margin-right: 10rpx;
 		}	
 		.address-cen {

+ 1 - 1
components/cm-module/creatOrder/choiceAddress.vue

@@ -119,7 +119,7 @@
 			justify-content: center;
 			width: 40rpx;
 			color: $color-system;
-			font-size: 46rpx;
+			font-size: 40rpx;
 			margin-right: 10rpx;
 		}	
 		.address-cen {

+ 1 - 1
components/cm-module/creatOrder/goodsList.vue

@@ -16,7 +16,7 @@
 							<view class="producttitle">{{pros.productName}}</view>
 							<view class="productspec">规格:{{pros.unit}}</view>
 							<view class="productprice">
-								<view class="price"><text>¥{{pros.price | NumFormat}}</text></view>
+								<view class="price"><text>¥{{ (pros.productType == 2 ? 0 : pros.price) | NumFormat}}</text></view>
 								<view class="count"><text class="small">x</text>{{pros.productCount}}</view>
 							</view>
 							<view class="floor-item-act" v-if="pros.promotion!=null">

+ 0 - 683
components/cm-module/creatOrder/invoiceTent.vue

@@ -1,683 +0,0 @@
-<template name="invoice">
-	<view class="invoice-template">
-		 <!-- 发票信息 -->
-		<view class="invoice-title" @tap.stop="hanldOperationConfim">
-			<text class="text">发票信息:</text>
-			<text class="iconfont icon-chakangengduo"></text>
-		</view>
-		<view class="invoice-text">
-			<text>{{invoiceText}}</text>
-		</view>
-		<!--底部选择模态层弹窗组件 -->
-		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="choiceaInvoiceConfim">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer" @tap.stop="discard">
-				<view class="content clearfix">
-					<view class="invoice-ltitle">发票类型</view>
-					<view class="invoice-radio">
-						<radio-group class="row-group" @change="radioChange">
-							<label class="row-input" v-for="(item, index) in invoiceTypeList" :key="item.value">
-								<radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616"/>
-								<view class="row-text">{{item.name}}</view>
-							</label>
-						</radio-group>
-					</view>
-					<view class="invoice-main from" v-if="invoiceType == '2'">
-						<view class="invoice-from">
-							<view class="label">单位名称:</view>
-							<input class="form-input" type="text" v-model="invoiceData.invoiceTitle" placeholder="请填写单位信息(必填)" maxlength="20">
-						</view>
-						<view class="invoice-from">
-							<view class="label">纳税人识别号:</view>
-							<input class="form-input" type="text" v-model="invoiceData.corporationTaxNum" placeholder="请填写纳税人识别号(必填)" maxlength="20">
-						</view>
-						<view class="invoice-from">
-							<view class="label">注册地址:</view>
-							<input class="form-input" type="text" v-model="invoiceData.registeredAddress" placeholder="请填写单位注册地址(必填)" maxlength="100">
-						</view>
-						<view class="invoice-from">
-							<view class="label">注册电话:</view>
-							<input class="form-input" type="text" v-model="invoiceData.registeredPhone" placeholder="请填写注册电话(必填)" maxlength="15">
-						</view>
-						<view class="invoice-from">
-							<view class="label">开户银行:</view>
-							<input class="form-input" type="text" v-model="invoiceData.openBank"   placeholder="请填写开户银行(必填)" maxlength="10">
-						</view>
-						<view class="invoice-from">
-							<view class="label">银行账号:</view>
-							<input class="form-input" 
-								   type="text" 
-								   v-model="invoiceData.bankAccountNo" 
-								   placeholder="请填写银行账号(必填)" 
-								   maxlength="19">
-						</view>
-					</view>
-					<view class="invoice-main" v-if="invoiceType == '3'">
-						<view class="invoice-ltitle">发票内容</view>
-						<view class="invoice-group tit">
-							<checkbox-group class="row-group" @change="checkboxChange">
-								<view class="text">商品明细</view>
-								<checkbox class="row-radio" value="明细"  :checked="inventoryChecked" color="#E15616"></checkbox>
-							</checkbox-group>
-						</view>
-						<view class="invoice-ltitle">发票抬头</view>
-						<view class="invoice-group tit">
-							<radio-group class="row-group radio" @change="radioChangeTitle">
-								<label class="row-input" v-for="(item, index) in invoiceTitleList" :key="item.value">
-									<radio class="row-radio" :value="item.value" :checked="index === titleCurrent" color="#E15616"/>
-									<view class="row-text">{{item.name}}</view>
-								</label>
-							</radio-group>
-						</view>
-						<view class="invoice-group from">
-							<view class="group-from" v-if="peopleInvoiceData.invoiceTitleType == '0'">
-								<input class="form-input" type="text" v-model="peopleInvoiceData.invoiceTitle"   placeholder="请填写个人抬头" maxlength="20">
-							</view>
-							<view class="group-from" v-if="peopleInvoiceData.invoiceTitleType == '1'">
-								<input class="form-input" type="text" v-model="peopleInvoiceData.invoiceTitle"   placeholder="请填写公司抬头" maxlength="20">
-							</view>
-							<view class="group-from" v-if="peopleInvoiceData.invoiceTitleType == '1'">
-								<input class="form-input" type="text" v-model="peopleInvoiceData.corporationTaxNum"   placeholder="请填写纳税人识别号" maxlength="20">
-							</view>
-						</view>
-					</view>
-					<view class="invoice-main" v-if="invoiceType == '1'">
-						<view class="invoice-none">不开具发票信息</view>
-					</view>
-				</view>
-				<view class="btn">
-					<view class="button add" @click="choiceaInvoiceConfim">完成</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"invoice",
-		data() {
-			return{
-				invoiceText:'不要发票',
-				specClass: '',//规格弹窗css类,控制开关动画
-				invoiceType:'1',//发票类型
-				current:0,
-				titleCurrent:0,
-				inventoryChecked:false,
-				invoiceTypeList:[
-					{value:'1',name:'不要发票'},
-					{value:'2',name:'要发票'},
-				],
-				invoiceTitleList:[
-					{value:'0',name:'个人'},
-					{value:'1',name:'公司'},
-				],
-				peopleInvoiceData:{
-					invoiceTitle:'',   //单位名称
-					invoiceContent:'', //商品明细
-					corporationTaxNum:'',//纳税人识别号
-					invoiceTitleType:'0'//发票抬头类型 1企业 0个人
-				},
-				invoiceData:{
-					invoiceTitle:'',	 //单位名称
-					corporationTaxNum:'',//纳税人识别号
-					registeredAddress: '',//单位地址
-					registeredPhone:'',	 //注册电话
-					openBank:'',		//开户银行
-					bankAccountNo: ''  ,//银行账号
-				},
-			}
-		},
-		created(){
-			// this.initData(this.invoiceDatas)
-		},
-		computed: {
-
-		},
-		methods:{
-			getUseFindInvoice(){//获取发票信息
-				this.$api.getStorage().then((resolve) => {
-					this.OrderService.GetFindInvoice({userId:resolve.userID}).then(response =>{
-						if(response.data == null){
-							this.invoiceData = Object.assign(this.invoiceData,'',{type:0})
-						}else{
-							this.invoiceData = response.data
-						} 
-					})
-				})
-			},
-			updateInvoiceFn(){//保存发票信息
-				this.$api.getStorage().then((resolve) => {
-					console.log(resolve.userID)
-					this.OrderService.UpdateInvoice(Object.assign({userId:resolve.userID},this.invoiceData)).then(response =>{})
-				})
-			},
-			choiceaInvoiceConfim(){
-				switch(this.invoiceType){
-					case '1':
-						this.choiceaInvoiceThree()
-						this.invoiceText = '不要发票'
-						break;
-					// case '2':
-					// 	this.choiceaInvoiceTwo()
-					// 	this.invoiceText = this.peopleInvoiceData.invoiceTitle
-					// 	break;
-					case '2':
-						this.choiceaInvoiceFirst()
-						this.invoiceText = this.invoiceData.invoiceTitle
-						break;	
-						default:
-						this.choiceaInvoiceThree()
-						this.invoiceText = '不要发票'
-				}
-			},
-			choiceaInvoiceFirst(){//增值税发票
-				if(this.invoiceData.invoiceTitle == ""){
-					this.$util.msg('请输入单位名称',2000)
-					return
-				}
-				if(this.invoiceData.corporationTaxNum == ""){
-					this.$util.msg('请输入纳税人识别号',2000)
-					return
-				}
-				if(this.invoiceData.registeredAddress == ""){
-					this.$util.msg('请输入单位地址',2000)
-					return
-				}
-				if(this.invoiceData.registeredPhone == ""){
-					this.$util.msg('请输入注册电话',2000)
-					return
-				}
-				if(this.invoiceData.openBank == ""){
-					this.$util.msg('请输入开户银行',2000)
-					return
-				}
-				if(this.invoiceData.bankAccountNo == ""){
-					this.$util.msg('请输入银行账号',2000)
-					return
-				}
-				this.updateInvoiceFn()
-				this.$emit('handleChoiceaInvoice',Object.assign(this.invoiceData,'',{type:2}))
-				this.hideSpec()
-			},
-			choiceaInvoiceTwo(){//取消普通发票.(可删除)	
-				switch(this.peopleInvoiceData.invoiceTitleType){
-					case '0':
-						if(this.peopleInvoiceData.invoiceContent == ''){
-							this.$util.msg('请选择商品明细',2000)
-							return
-						}
-						if(this.peopleInvoiceData.invoiceTitle == ""){
-							this.$util.msg('请输入个人抬头',2000)
-							return
-						}
-						break;
-					case '1':
-						if(this.peopleInvoiceData.invoiceContent == ''){
-							this.$util.msg('请选择商品明细',2000)
-							return
-						}
-						if(this.peopleInvoiceData.invoiceTitle == ""){
-							this.$util.msg('请输入公司抬头',2000)
-							return
-						}
-						if(this.peopleInvoiceData.corporationTaxNum == ""){
-							this.$util.msg('请输入纳税人识别号',2000)
-							return
-						}
-						break;
-				}
-				this.$emit('handleChoiceaInvoice',Object.assign(this.peopleInvoiceData,'',{type:1}))
-				this.hideSpec()
-			},
-			choiceaInvoiceThree(){//不要发票
-				this.invoiceData = {}
-				this.$emit('handleChoiceaInvoice',Object.assign(this.invoiceData,'',{type:0}))
-				this.hideSpec()
-			},
-			hideSpec() {//关闭弹窗
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
-			hanldOperationConfim(){//显示发票弹窗
-				this.specClass = 'show';
-			},
-			radioChange(e) {
-				this.invoiceType = e.target.value;
-				for (let i = 0; i < this.invoiceTypeList.length; i++) {
-					if (this.invoiceTypeList[i].value === this.invoiceType) {
-						this.current = i;
-						break;
-					}
-				}
-				switch(this.invoiceType){
-					case '2':
-						this.getUseFindInvoice()
-						break;
-					//取消普通发票.(可删除)	
-					// case '3':
-					// 	this.peopleInvoiceData.invoiceTitleType = "0"
-					// 	this.titleCurrent = 0
-					// 	break;
-				}		
-			},
-			radioChangeTitle(e) {
-				this.peopleInvoiceData.invoiceTitleType = e.target.value;
-				for (let i = 0; i < this.invoiceTitleList.length; i++) {
-					if (this.invoiceTitleList[i].value === this.peopleInvoiceData.invoiceTitleType) {
-						this.titleCurrent = i;
-						break;
-					}
-				}
-				switch(this.peopleInvoiceData.invoiceTitleType){
-					case '1':
-						this.inventoryChecked = false
-						this.peopleInvoiceData.invoiceTitle = ""
-						this.peopleInvoiceData.invoiceContent = ""
-						break;
-				}		
-			},
-			checkboxChange(e){
-				this.inventoryChecked = !this.inventoryChecked
-				this.peopleInvoiceData.invoiceContent = e.detail.value[0]
-			},
-			inputBankNum(val) {
-				if (/\S{5}/.test(val)) {
-					this.invoiceData.bankAccountNo = val.replace(/\s/g, '').replace(/(.{4})/g, "$1 ");
-				}
-			},
-			discard(){
-				//丢弃
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.invoice-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.invoice-title{
-			width: 702rpx;
-			padding: 0 24rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			position: relative;
-			border-bottom: 1px solid #EBEBEB;
-			.text{
-				font-size: $font-size-28;
-				color: $text-color;
-			}
-			.iconfont{
-				width: 50rpx;
-				height: 88rpx;
-				line-height: 88rpx;
-				color: #999999;
-				display: block;
-				position: absolute;
-				right: 0;
-				top: 0;
-			}
-		}
-		.invoice-text{
-			width: 702rpx;
-			padding: 0 24rpx;
-			font-size: $font-size-24;
-			color: #666666;
-			line-height: 60rpx;
-		}
-		.invoice-ltitle{
-			width: 100%;
-			line-height: 60rpx;
-			height: 60rpx;
-			font-size: $font-size-28;
-			color: #333333;
-		}
-		.invoice-radio{
-			width: 100%;
-			height: 88rpx;
-			line-height: 88rpx;
-			display: flex;
-			border-bottom: 1px solid #EBEBEB;
-			.row-group{
-				flex:1;
-				display: flex;
-			}
-			.row-input{
-				flex: 1;
-				height: 88rpx;
-				line-height: 88rpx;
-			}
-			.row-radio{
-				float: left;
-				transform: scale(0.6);
-			}
-			.row-text{
-				font-size: $font-size-24;
-				color: $text-color;
-			}
-		}
-		.invoice-main{
-			width: 100%;
-			height: auto;
-			margin-top: 30rpx;
-			&.from{
-				padding-bottom: 40rpx;
-			}
-			.invoice-none{
-				line-height: 60rpx;
-				height: 60rpx;
-				font-size: $font-size-24;
-				color: #666666;
-				text-align: center;
-			}
-			.invoice-from{
-				width: 662rpx;
-				height: 40rpx;
-				padding: 20rpx;
-				line-height: 40rpx;
-				align-items: flex-start;
-				font-size: $font-size-28;
-				color: $text-color;
-				background: #F7F7F7;
-				border-radius: 14rpx;
-				margin-bottom: 20rpx;
-				.label{
-					height: 40rpx;
-					line-height: 40rpx;
-					float: left;
-				}
-				.form-input{
-					height: 40rpx;
-					line-height: 40rpx;
-					flex-grow: 1;
-					padding-left: 20rpx;
-				}
-			}
-			.invoice-group{
-				width: 100%;
-				height: 88rpx;
-				display: flex;
-				border-bottom: 1px solid #EBEBEB;
-				&.tit{
-					margin-bottom: 30rpx;
-				}
-				&.from{
-					margin-bottom: 30rpx;
-					border-bottom: 1px solid #FFFFFF;
-					flex-direction: row;
-					display: block;
-					.group-from{
-						flex: 1;
-						height: 40rpx;
-						padding: 20rpx;
-						line-height: 40rpx;
-						align-items: flex-start;
-						font-size: $font-size-24;
-						color: $text-color;
-						background: #F7F7F7;
-						border-radius: 14rpx;
-						margin-bottom: 20rpx;
-						.form-input{
-							height: 40rpx;
-							line-height: 40rpx;
-							flex-grow: 1;
-						}
-					}
-				}
-				.row-group{
-					line-height: 88rpx;
-					flex: 1;
-					.text{
-						font-size: $font-size-24;
-						color: $text-color;
-						line-height: 88rpx;
-						float: left;
-					}
-					.row-radio{
-						float: right;
-						transform: scale(0.8);
-						border-radius: 50%;
-					}
-					&.radio{
-						display: flex;
-						.row-input{
-							flex: 1;
-							height: 88rpx;
-							line-height: 88rpx;
-						}
-						.row-radio{
-							float: left;
-							transform: scale(0.6);
-						}
-						.row-text{
-							font-size: $font-size-24;
-							color: $text-color;
-						}
-					}
-				}
-			}
-		}
-	}
-	/* 加入购物模态层*/
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-		100% {
-			opacity: 1;
-		}
-	}
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-		100% {
-			opacity: 0;
-		}
-	}
-	@keyframes showLayer {
-		0% {
-			transform: translateY(0);
-		}
-		100% {
-			transform: translateY(-100%);
-		}
-	}
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(-100%);
-		}
-		100% {
-			transform: translateY(0);
-		}
-	}
-	@keyframes showAmnation {
-		0% {
-			top: -12rpx;
-			opacity: 0;
-		}
-		50% {
-			top: -60rpx;
-			opacity: 1;
-		}
-		100% {
-			top: -100rpx;
-			opacity: 0;
-		}
-	}
-	@keyframes hideAmnation {
-		0% {
-			top: -100rpx;
-			opacity: 0;
-		}
-		100% {
-			top: -12rpx;
-			opacity: 0;
-		}
-	}
-	.popup {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 999;
-		display: none;
-		.mask{
-			position: fixed;
-			top: 0;
-			width: 100%;
-			height: 100%;
-			z-index: 21;
-			background-color: rgba(0, 0, 0, 0.6);
-		}
-		.layer {
-			position: absolute;
-			z-index: 22;
-			bottom: -1010rpx;
-			width: 702rpx;
-			padding: 24rpx 24rpx 65rpx 24rpx;
-			height: 920rpx;
-			border-radius: 20rpx 20rpx 0 0;
-			background-color: #fff;
-			display: flex;
-			flex-wrap: wrap;
-			align-content: space-between;
-			.content {
-				width: 100%;
-			}
-			.btn {
-				width: 100%;
-				height: 88rpx;
-				display: flex;
-				.button {
-					width: 702rpx;
-					height: 88rpx;
-					color: #fff;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					font-size: $font-size-28;
-					border-radius: 44rpx;
-					background: $btn-confirm;
-				}
-			}
-		}
-		
-		&.show {
-			display: block;
-			.mask{
-				animation: showPopup 0.2s linear both;
-			}
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
-		}
-		&.hide {
-			display: block;
-			.mask{
-				animation: hidePopup 0.2s linear both;
-			}
-			
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
-		}
-		&.none {
-			display: none;
-		}
-		&.service {
-			.row {
-				margin: 30upx 0;
-				.title {
-					font-size: 30upx;
-					margin: 10upx 0;
-				}
-				.description {
-					font-size: 28upx;
-					color: #999;
-				}
-			}
-		}
-		.layer-smimg{
-			width: 114rpx;
-			height: 114rpx;
-			float: left;
-			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 114rpx;
-				height: 114rpx;	
-				border-radius: 10rpx;
-			}
-		}
-		.layer-nunbox{
-			justify-content: space-between;
-			align-items: center;
-			width: 536rpx;
-			height: 88rpx;
-			padding: 13rpx 0 0 0;
-			float: left;
-			.layer-nunbox-t{
-				width: 100%;
-				height:44rpx;
-				position:relative;
-				display: flex;
-				.layer-nunbox-text{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-				}
-				.number-box{
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					.iconfont{
-						font-size: $font-size-32;
-						padding:0 18rpx;
-						font-size: $text-color;
-					}
-					.btn-input{
-						width: 62rpx;
-						height: 48rpx;
-						line-height: 48rpx;
-						background: #F8F8F8;
-						border-radius: 4rpx;
-						text-align: center;
-						font-size: $font-size-28;
-					}
-				}
-				.product-step{
-					position: absolute;
-					left: 45rpx;
-					bottom: 0;
-					height: 44rpx;
-					background: #FFFFFF;
-				}
-			}
-			.layer-nunbox-b{
-				width: 100%;
-				height:44rpx;
-				margin-top: 13rpx;
-			}
-			.text{
-				line-height: 44rpx;
-				font-size: $font-size-28;
-				.p{
-					color: #FF2A2A;
-				}
-				.p:first-child{
-					margin-left: 30rpx;
-				}
-				.p.sm{
-					font-size: $font-size-24;
-				}
-			}
-		}
-	}	
-</style>

+ 1 - 1
components/cm-module/headerNavbar/header-back.vue

@@ -6,7 +6,7 @@
 	  	</view>
 	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',left:(navbarBtn.right)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">
-			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
+			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-daohangfanhui"></text>
 	  	</view>
 		<view class="navbar-icon" v-if="navbarData.showSearch == 1 ? true : false"
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',right:(navbarBtn.width)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">

+ 3 - 2
pages.json

@@ -4,8 +4,9 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "维沙采购商城",
-				"enablePullDownRefresh": true
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
 			}
 		},
 		{

+ 21 - 1
pages/index/index.vue

@@ -1,7 +1,9 @@
 <template>
-	<view class="container">
+	<view class="container" :style="{paddingTop :CustomBar + 'px' }">
+		<cm-custom :navbar-data='nvabarData'></cm-custom>
 		<!-- 机构信息区域 -->
 		<template v-show="!isRequest">
+			<!-- <view class="ws-title" :style="{lineHeight :CustomBar + 'px' }">维沙采购商城</view> -->
 			<view class="ws-header">
 				<!-- 用户信息 -->
 				<view class="user-info">
@@ -94,6 +96,16 @@ export default {
 	},
 	data() {
 		return {
+			nvabarData: {//顶部自定义导航
+				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+				showSearch: 0,
+				title: '维沙采购商城', // 导航栏 中间的标题
+				haveBack:false,
+				textLeft:this.$store.state.isIphone,
+				textColor:'#333333',
+				bgColor:'#ffffff'
+			},
+			CustomBar:this.CustomBar,// 顶部导航栏高度
 			organizeName: '',  //采购员组织名称
 			isRequest: false,
 			paymentCount: 0, //待付款角标
@@ -195,6 +207,14 @@ export default {
 	background: #f7f7f7;
 }
 // 用户登录信息区域
+.ws-title{
+	width: 100%;
+	position: fixed;
+	top:0 ;
+	left: 0;
+	font-size: 34rpx;
+	text-align: center;
+}
 .ws-header {
 	position: relative;
 	height: 280rpx;

+ 8 - 32
pages/user/order/create-order.vue

@@ -173,27 +173,10 @@
 				}
 			},
 			attributeNofreight(){//计算没有邮费的支付价格
-				if(this.ischecked){
-					if(this.userMoney>this.payAllPrice){
-						this.payAllPrice = 0.00
-					}else{
-						this.payAllPrice = this.allPrice - this.userMoney       	//勾选后的总价
-					}
-				}else{
-					this.payAllPrice = this.allPrice;
-				}
+				this.payAllPrice = this.allPrice;
 			},
 			attributeHashfreight(freight){//计算需要邮费的支付价格
 				this.payAllPrice = this.allPrice+parseInt(freight)//计算不包邮的价格 总价等于商品价格+邮费
-				if(this.ischecked){
-					if(this.userMoney>this.payAllPrice){							//余额大于支付金额
-						this.payAllPrice =0.00
-					}else{
-						this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney       	//勾选后的总价
-					}
-				}else{
-					this.payAllPrice = this.allPrice+parseInt(freight)
-				}
 			},
 			orderSubmitMit(){//提交订单
 				if(this.addressId == ''){
@@ -205,13 +188,13 @@
 					let productInfo = [];
 					el.productList.forEach(item => {
 						productInfo.push({
-							productId:item.productID,
+							productId:item.productId,
 							productNum:item.productCount,
 							productType:item.productType ? Number(item.productType) : 0,
 							presentNum:0,
 						})
 					})				
-					return {shopId:el.shopID,note:el.note?el.note:'',productInfo:productInfo}
+					return {shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
 				})
 				//订单信息
 				this.payInfo = {
@@ -229,19 +212,12 @@
 						orderInvoice:this.invoiceData //发票信息
 					}
 				this.modalLayer = true;	
-				this.OrderService.CreatedOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
+				this.OrderService.CreatedOrderSubmit(params).then(response =>{
 					const data = response.data;
-					if(data.code === '1'){
-						this.$util.msg('支付成功',2000,true,'success')
-						setTimeout(() =>{
-							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderId=${data.orderId}`)
-						},2000)
-					}else{
-						this.$util.msg('订单提交成功',2000,true,'success')
-						setTimeout(()=>{
-							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderId=${data.orderId}`)
-						},2000)
-					}
+					this.$util.msg('订单提交成功',2000,true,'success')
+					setTimeout(()=>{
+						this.$api.redirectTo(`/pages/user/order/success?orderId=${data.orderId}`)
+					},2000)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})

+ 7 - 66
pages/user/order/order-details.vue

@@ -29,14 +29,8 @@
 						   @buttonConfirm="handButtonConfirm">
 			</order-button>
 		</view>
-		<!-- 付款弹窗 -->
-		<order-model v-if="isPayModel" 
-					:payModelData="payModelData" 
-					:modelType='modelType' 
-					@cancelConfirm = "hanldCancelConfirm"
-					@paymentConfirm ='hanldPaymentConfirm'/>
 		<!-- 分享弹窗 -->			
-		<share-alert  :orderID="orderID" 
+		<share-alert  :orderID="orderId" 
 					  v-if="isShareModal"  
 					  @btnConfirm ='onShareAppMessage'>
 		</share-alert>		
@@ -80,7 +74,7 @@
 			return {
 				state:0,
 				userID:'',
-				orderID:'',
+				orderId:'',
 				shareCode:'',				//分享码
 				shareType:'',               //分享登录页过来记录的状态
 				cellPhone:'',				//客服电话
@@ -90,11 +84,9 @@
 				isRequest:false,			//是否加载完成渲染子组件
 				isOrderShare:false,
 				isShareModal:false,
-				isPayModel:false,
 				modelType:0,
 				orderInfo:{},
 				alertOrderInfo:{},
-				payModelData:{},
 				addressData:{},				//地址信息初始化
 				information:{},				//订单信息初始化
 				shopOrderData:{},			//商品信息初始化
@@ -124,7 +116,7 @@
 		onLoad(option){
 			console.log(option)
 			this.shareType = option.type;
-			this.orderID = option.orderID
+			this.orderId = option.orderId
 			if(this.shareType ==='share'){
 				this.state = 0
 				this.isOrderShare = true
@@ -171,7 +163,7 @@
 				this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
 			},
 			initOrderDetaileData(){//初始化页面数据@参数:订单ID
-				this.OrderService.QueryOrderDetails({ orderID : this.orderID }).then(response =>{
+				this.OrderService.QueryOrderDetails({ orderId : this.orderId }).then(response =>{
 					let resData = response.data;
 					this.isRequest = true
 					this.orderInfo = resData.order
@@ -211,7 +203,7 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'pay':
-						this.$api.navigateTo(`/pages/user/order/order-details?path=pay&state=0&orderID=${this.btnoRderID}`)
+						this.$api.navigateTo(`/pages/user/order/order-details?path=pay&state=0&orderId=${this.btnoRderID}`)
 						// this.WeChatMiniWxPay(this.hanldOrder);
 						break;
 					case 'delete':
@@ -232,7 +224,7 @@
 						break;
 					case 'query':
 						this.isModalLayer = true;
-						this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+data.orderId)
+						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break;
 					case 'confirm':
 						this.modal = true;
@@ -258,7 +250,7 @@
 							break
 						case 'query':
 							this.isModalLayer = true;
-							this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+data.orderId)
+							this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 							break
 						case 'confirm':
 							this.handOrderConfirm(data.orderId);
@@ -271,57 +263,6 @@
 				}
 				this.modal = false;
 			},
-			getOrderPaymentValidation(data){//监听根据付款状态做操作
-				this.OrderService.OrderPaymentValidation({orderId:data.orderId}).then(response =>{
-					let dataCode = response.data.code
-					this.payModelData = response.data
-					switch(dataCode){
-						case 1:
-							this.isPayModel = true;
-							this.modelType = 1
-							break;
-						case 2:
-							this.isPayModel = true;
-							this.modelType = 2
-							break;
-						case -1:
-							this.$util.modal('','订单已申请全部退款,无需再付款!','确定','',false,() =>{})
-							break;
-						default:
-							if(response.data.onlinePayFlag == '1'){
-								this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${response.data.pendingPayments}&orderID=${data.orderId}`)
-							}else{
-								this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderID=${data.orderId}`)
-							}
-					}
-					
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})	
-			},
-			hanldPaymentConfirm(data){//余额抵扣跳转
-				this.OrderService.OrderBalanceDeduction({orderId:data.order.orderId}).then(response =>{
-					if(data.type === 2){
-						let _data = {orderID:data.order.orderId}
-						this.$api.navigateTo(`/pages/user/order/success?type=deduction&data=${JSON.stringify({data:_data})}`)
-					}else{
-						if(data.order.onlinePayFlag === '1'){
-							this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${data.order.pendingPayments}&orderID=${data.order.orderId}`)
-						}else{
-							this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderID=${data.order.orderId}`)
-						}
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})	
-			},
-			hanldCancelConfirm(data){//不使用余额抵扣直接跳转收银台
-				if(data.onlinePayFlag == '1'){
-					this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${this.orderInfo.pendingPayments}&orderID=${data.orderId}`)
-				}else{
-					this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderID=${data.orderId}`)
-				}
-			},
 			handOrderConfirm(){//确认收货
 				this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
 					this.OrderService.ConfirmReceipt({orderID:this.orderID}).then(response =>{

+ 24 - 28
pages/user/order/order-list.vue

@@ -115,7 +115,6 @@
 	import empty from "@/components/empty";
 	import shareAlert from '@/components/cm-module/modelAlert/shareAlert'			 //分享弹窗
 	import orderModel from '@/components/cm-module/modelAlert/order-alert'			 //付款弹窗
-	import { orderDataList } from '@/common/json/data.json.js' //本地数据
 	
 	
 	export default {
@@ -150,7 +149,7 @@
 				winHeight: "", //窗口高度
 				currentTab: 0, //预设当前项的值
 				scrollLeft: 0 ,//tab标题的滚动条位置
-				userID:0,
+				userId:0,
 				orderData: [],
 				btnoRderID: 0, //点击按钮传入的的订单ID
 				pageNum: 1,	  //页数
@@ -216,7 +215,7 @@
 				this.loadding =  false //切换时隐藏
 				this.nomoreText = ''
 				if(!this.isOnloadFlag){
-					this.getOrderDatainit(this.currentTab,'tabChange')
+					this.GetOrderDatainit(this.currentTab,'tabChange')
 				}
 			},
 			// 点击标题切换当前页时改变样式
@@ -230,7 +229,7 @@
 					this.pageNum = 1
 					this.pullUpOn = true //切换时隐藏
 					this.loadding =  false //切换时隐藏
-					this.getOrderDatainit(this.currentTab)
+					this.GetOrderDatainit(this.currentTab)
 				}
 			},
 			//判断当前滚动超过一屏时,设置tab标题滚动条。
@@ -242,43 +241,40 @@
 					this.scrollLeft = 0
 				}
 			},
-			getOrderDatainit(index,source){
+			GetOrderDatainit(index,source){
 				/**
 				 * @订单初始化加载  仅加载第一页码
 				 * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
-				 * @param:userID(用户ID)
+				 * @param:userId(用户ID)
 				 * @param:pageNum(页码数)
 				 * @param:pageSize(每页条数)
 				 * @param:organizeID(全局变量组织ID)
 				 */ 
-				let orderItem = this.orderTabBar[0];
-				let state = 1;
-				let orderList = orderDataList.filter(item=>{
-					//添加不同状态下订单的表现形式
-					item = Object.assign(item, this.StateExpFormat(item.state));
-					return item;
-				});
-				orderItem.orderList =[];
-				orderList.forEach(item=>{
-					orderItem.orderList.push(item);
-				})
 				setTimeout(()=>{
 					this.skeletonShow = false
 					this.isOnloadFlag = false
 				},1500)
-				
-				
+				let orderItem = this.orderTabBar[index];
+				let state = orderItem.state;
 				if(source === 'tabChange' && orderItem.loaded === true){
 					//tab切换只有第一次需要加载数据
 					return;
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
-						this.userID = resolve.userID
-						let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
+						this.userId = resolve.userId
+						let params = {orderState:index,organizeId:resolve.organizeId,pageNum:1,pageSize:this.pageSize};
 						this.OrderService.QueryOrderList(params).then(response =>{
-							
 							//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+							let orderList = response.data.list.filter(item=>{
+									//添加不同状态下订单的表现形式
+									item = Object.assign(item, this.StateExpFormat(item.state));
+									return item;
+							});
+							orderItem.orderList =[];
+							orderList.forEach(item=>{
+								orderItem.orderList.push(item);
+							})
 							this.$set(orderItem, 'loaded', true);
 							this.hasNextPage = response.data.hasNextPage;
 							if(this.hasNextPage){
@@ -300,7 +296,7 @@
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum+=1
-				let params = {orderState:index,userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize};
+				let params = {orderState:index,userId:this.userId,pageNum:this.pageNum,pageSize:this.pageSize};
 				this.OrderService.QueryOrderList(params).then(response =>{
 					let orderItem = this.orderTabBar[index];
 					let resData = response.data.results
@@ -458,7 +454,7 @@
 					this.OrderService.ConfirmReceipt({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
+							this.GetOrderDatainit(this.currentTab)
 						},2000)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -470,7 +466,7 @@
 					this.OrderService.DeleteOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
+							this.GetOrderDatainit(this.currentTab)
 						},2000)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -482,7 +478,7 @@
 					this.OrderService.CancelOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
+							this.GetOrderDatainit(this.currentTab)
 						},2000)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -498,7 +494,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userId=${this.userId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},
@@ -579,7 +575,7 @@
 		},
 		onShow() {
 			this.isModalLayer = false;
-			this.getOrderDatainit(this.currentTab)
+			this.GetOrderDatainit(this.currentTab)
 		}
 	}
 </script>

+ 5 - 10
pages/user/order/success.vue

@@ -10,8 +10,8 @@
 					<text>{{ successText }}</text>
 				</view>
 				<view class="cash-btn">
-					<view class="btn btn-pay" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">支付订单</view>
-					<view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderID='+orderID)">查看订单</view>
+					<view class="btn btn-pay" @click="this.$api.navigateTo('/pages/user/order/order-payment')">支付订单</view>
+					<view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderId='+orderId)">查看订单</view>
 				</view>
 			</view>
 		</view>
@@ -22,7 +22,7 @@
 	export default{
 		data(){
 			return{
-				orderID:'',
+				orderId:'',
 				nvabarData: {		//顶部自定义导航
 					haveBack:true,
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
@@ -39,12 +39,7 @@
 			}
 		},
 		onLoad(option) {
-			if(option.type == 'deduction'){
-				this.successText = '支付成功'
-			}else{
-				this.successText = '订单提交成功~'
-			}
-			// this.initData(option)
+			this.initData(option)
 		},
 		methods:{
 			setHeaderBtnPosi(){
@@ -63,7 +58,7 @@
 			},
 			initData(e){
 				let data = JSON.parse(e.data);
-				this.orderID = data.data.orderID
+				this.orderId = data.data.orderId
 			}
 		},
 		onShow() {

+ 18 - 2
services/order.service.js

@@ -22,9 +22,21 @@ export default class OrderService {
 			isLoading: true ,
 		})
 	}
+	/* 订单列表 */
+	QueryOrderList (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/order/list', 
+			data, 
+			isLoading: true ,
+		})
+	}
 	/* 查询订单详情 */
 	QueryOrderDetails (data = {}) {
-		return this.AjaxService.get({ url:'/order/detail', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/order/detail', 
+			data, 
+			isLoading: true ,
+		})
 	}
 	/* 操作取消订单 */
 	CancelOrder (data = {}) {
@@ -131,7 +143,11 @@ export default class OrderService {
 	}
 	/* 提交订单 orderId 订单ID */
 	CreatedOrderSubmit (data = {}) {
-		return this.AjaxService.post({ url:'/order/submit', data, isLoading: true })
+		return this.AjaxService.post({ 
+			url:'/order/submit', 
+			data, 
+			isLoading: true ,
+		})
 	}
 	/* 订单支付,效验付款规则 orderId 订单ID */
 	OrderPaymentValidation (data = {}) {