puyao vor 3 Monaten
Ursprung
Commit
dcebd3dd72

+ 12 - 12
assets/css/theme.scss

@@ -1,17 +1,17 @@
 // 这一套作为默认
 /*自定义主题色 */
-$--base-color:#018c39;
-$--base-color-text:#626468;
+$--base-color:#008FD3;
+$--base-color-text:#333;
 $--base-color2:#e7f1fe;
 $--base-color3:#425034;
-$--base-color-a:#FF5C03;
-$--base-color-price:#FF1212;
-$--base-color-gray:#DEDFE4;
+$--base-color-a:#626468;
+$--base-color-price:#FF5030;
+$--base-color-gray:#B2B2B2;
 $--base-color-dark:#313131;
 $--base-color-red:#ef4c50;
 $--base-color-dark2:#3E3E3E;
-$--base-color-success:#a3db42;
-$--base-color-false:#f93e3e;
+$--base-color-success:#2CAE5C;
+$--base-color-false:#FF5030;
 $--base-color-0:#000;
 $--base-color-1:#111;
 $--base-color-3:#333;
@@ -19,16 +19,16 @@ $--base-color-6:#666;
 $--base-color-9:#999;
 $--base-color-f8:#f8f8f8;
 $--base-color-f5:#f5f5f5;
-$--base-bg: #1773ff;
-$--base-bg2:#e7f1fe;
+$--base-bg: #008FD3;
+$--base-bg2:#EFF3F7;
 $--base-bor-red:#f7a1a1;
-$--base-bor-blue:#c9e1fb;
+$--base-bor-blue:#F0FAFF;
 $--base-cont-bg:#F3F5F9;
 $--base-false-bg:#fae7e7;
 $--base-sure-bg:#e7f2fe;
 $--base-bg-f:#fff;
 $--base-bg-red:#ee0a25;
-$--base-bg-blue:#1677ff;
-$--base-bg-orange:#FF7F00;
+$--base-bg-blue:#008FD3;
+$--base-bg-orange:#FF5030;
 
 

+ 1 - 1
pages/enterprise/enterprise.vue

@@ -8,7 +8,7 @@
 		<view class="flex-1 scrolly ">
 			
 			<view class="imgbox column">
-				<image :src="enterpriseimg[1]"  mode="widthFix"></image>
+				<image :src="enterpriseimg[0]"  mode="widthFix"></image>
 				<!-- <image :src="enterpriseimg[2]"  mode="widthFix"></image>
 				<image :src="enterpriseimg[1]"  mode="widthFix"></image> -->
 			</view>

+ 1 - 3
pages/home/index.vue

@@ -516,7 +516,7 @@
 			return { 
 				theme:'beiliyou',
 				pltoptext:[{
-					text:'搜索健康食品、乳制品等'
+					text:'请输入产品名称搜索'
 				},{
 					text:'搜索商品、症状、功能主治'
 				},{
@@ -1199,7 +1199,6 @@
 			// background: linear-gradient(135deg, #018C39 0%, #1fbd2c 100%);
 		}
 		.status_bar {
-			
 			width: 100%;
 		}
 	}
@@ -2015,7 +2014,6 @@
 			.drug-list{
 				display: flex;
 				flex-wrap: wrap;
-				// margin-bottom: 20upx;
 				.item{
 					margin-right: 20rpx;
 					margin-bottom: 20rpx;

+ 1 - 1
pages/home/productSearch.vue

@@ -4,7 +4,7 @@
 		<view class="search-cont">
 			<view class="inner">
 				<image class="icon-search" src="../../static/images/search.png" mode=""></image>
-				<input type="text" value="" :placeholder="storeId ? '搜索店内商品' : '输入品名称'" confirm-type="搜索" @confirm="goSearch" :focus='setFocus' placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				<input type="text" value="" :placeholder="storeId ? '搜索店内商品' : '输入品名称'" confirm-type="搜索" @confirm="goSearch" :focus='setFocus' placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
 			</view>
 		</view>
 		<!-- 搜索历史 -->

+ 163 - 17
pages_company/order/cart.vue

@@ -25,7 +25,7 @@
 								<image v-if="item.cartNum <= 1" src="../../static/images/jian.png" mode=""></image>
 								<image v-else src="../../static/images/jian2.png" mode=""></image>
 							</view>
-							<input type="text"  @change="changeNum($event,item)" :value="item.cartNum"   />
+							<input type="number"  @change="changeNum($event,item)" :value="item.cartNum" disabled/>
 							<view class="img-box" @click="addNum(item)">
 								<image src="../../static/images/add.png" mode=""></image>
 							</view>
@@ -34,6 +34,70 @@
 				</view>
 			</view>
 		</view>
+		<view>
+			<u-popup :show="dictshow" @close="closedict" mode="center" :closeOnClickOverlay="false" round="20">
+				<view  class="w600 h500 radius20 ">
+					<view class="p40 justify-end">
+						<image src="/static/images/close24.png" class="w40 h40" @click="closedict"></image>
+					</view>
+					<view class="m20">
+						<view class="justify-start align-center u-border radius20 p20">
+							<view>订单类型:</view>
+							<view class="color6 flex-1" @click="cardshow=true">{{cardvalue?cardvalue:'请选择订单类型'}}</view>
+						</view>
+						<view class="justify-start align-center u-border radius20 p20 mt20 mb60">
+							<view>媒体类型:</view>
+							<view class="color6 flex-1" @click="videoshow=true">{{videovalue?videovalue:'请选择媒体类型'}}</view>
+						</view>
+					</view>
+					<view class="subdict " @click="submitgoods">确认</view>
+				</view>
+			</u-popup>
+		</view>
+		<view>
+			<u-popup :show="cardshow" mode="bottom"  @close="cardshow=!cardshow" :closeOnClickOverlay="true" closeIconPos='top-right'>
+				<view class=" h600">
+					<view class="mb20" style="text-align: center;">
+						<view style="display: inline-block; ">订单类型</view>
+						<u-icon name="close-circle" color="#ccc" size="28"
+						@click="cardshow=!cardshow" style="display: inline-block;float: left;"></u-icon>
+					</view>
+					<view class="justify-start wrap">
+						<view class="p16 mlr4" v-for="(item,index) in cardlist" :key="index">
+							<u-tag :text="item.dictLabel" :plain="!item.checked" type="primary" :name="index"
+									@click="checkboxClick">
+							</u-tag>
+						</view>
+						<view class="base-color-red fs24 bor-red p8 radius8 plr12" v-if="cardlist.length==0">暂无订单类型</view>
+					</view>
+					<view class="centerV">
+						<view @click="getcardid" class="surebtn">确定</view>
+					</view>
+				</view>
+			</u-popup>
+		</view>
+		<view>
+			<u-popup :show="videoshow" mode="bottom"  @close="videoshow=!videoshow" :closeOnClickOverlay="true" closeIconPos='top-right'>
+				<view class=" h600">
+					<view class="mb20" style="text-align: center;">
+						<view style="display: inline-block; ">媒体类型</view>
+						<u-icon name="close-circle" color="#ccc" size="28"
+						@click="videoshow=!videoshow" style="display: inline-block;float: left;"></u-icon>
+					</view>
+					<view class="justify-start wrap">
+						<view class="p16 mlr4" v-for="(item,index) in videolist" :key="index">
+							<u-tag :text="item.dictLabel" :plain="!item.checked" type="primary" :name="index"
+									@click="checkboxClickA">
+							</u-tag>
+						</view>
+						<view class="base-color-red fs24 bor-red p8 radius8 plr12" v-if="videolist.length==0">暂无媒体类型</view>
+					</view>
+					<view class="centerV">
+						<view @click="getvideoid" class="surebtn">确定</view>
+					</view>
+				</view>
+			</u-popup>
+		</view>
 		<!-- 底部按钮 -->
 		<view class="btn-foot">
 			<view class="left">
@@ -68,14 +132,67 @@
 				totalMoney:0.00,
 				carts:[],
 				checkAll:false,
+				selectCartsid:[],
+				dictshow:false,
+				cardvalue:'',
+				cardid:'',
+				videovalue:'',
+				videoid:'',
+				cardshow:false,
+				videoshow:false,
+				videolist:{},
+				cardlist:{}
 			}	
 		},
 		onLoad() {
 			this.getCarts();
- 
+			const dicts=JSON.parse(uni.getStorageSync('dicts'))
+			console.log(dicts)
+			this.videolist=dicts.storeOrderMedium.map(item => {
+				return {
+					...item,
+					checked: false,
+				}
+			})
+			this.cardlist=dicts.storeOrderType.map(item => {
+				return {
+					...item,
+					checked: false,
+				}
+			})
+			console.log(this.cardlist)
 		},
 		 
 		methods: {
+			checkboxClickA(name){
+				this.videolist.map((item, index) => {
+				  item.checked = index === name ? true : false;
+				});
+				console.log(name)
+			},
+			getvideoid(){
+				this.videovalue = this.videolist.filter(item => item.checked)
+				.map(v => v.dictLabel).join('')
+				console.log(this.cardvalue)
+				this.videoid = this.videolist.filter(item => item.checked).map(v => v.dictValue).join('')
+				this.videoshow=false
+			},
+			checkboxClick(name){
+				this.cardlist.map((item, index) => {
+				  item.checked = index === name ? true : false;
+				});
+				console.log(name)
+			},
+			getcardid(){
+				this.cardvalue = this.cardlist.filter(item => item.checked)
+				.map(v => v.dictLabel).join('')
+				console.log(this.cardvalue)
+				this.cardid = this.cardlist.filter(item => item.checked).map(v => v.dictValue).join('')
+				this.cardshow=false
+			},
+			closedict(){
+				this.dictshow=!this.dictshow
+			},
 			changeNum(e,item) {
 				item.cartNum = e.detail.value.replace(/\D/g, '')
 				if (item.cartNum <= 1) {
@@ -216,19 +333,14 @@
 				}
 				this.changeCartNum(item)
 			},
-			// 结算
-			submit() {
-				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
-				  return ele.id
-				});
-				if(selectCarts.length==0){
-					uni.showToast({
-						icon:'none',
-						title: "请选择商品",
-					});
-					return;
-				}
-				var data={token:uni.getStorageSync('CompanyUserToken'),cateIds:selectCarts.toString()}
+			submitgoods(){
+				//选择后提交制单
+				var data={
+					token:uni.getStorageSync('CompanyUserToken'),
+					cateIds:this.selectCartsid.toString(),
+					orderType:this.cardid,
+					orderMedium:this.videoid
+					}
 				createSalesOrder(data).then(
 					res => {
 						if(res.code==200){
@@ -244,13 +356,47 @@
 					},
 					rej => {}
 				);
-			
 			},
+			// 结算
+			submit() {
+				this.selectCartsid=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(this.selectCartsid.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品",
+					});
+					return;
+				}
+				this.dictshow=true
+			}
+			
 		}
 	}
 </script>
 
 <style lang="scss">
+	.surebtn{
+		margin: 20rpx 0;
+		background-color: #018C39;
+		color: #fff;
+		width: 80%;
+		text-align: center;
+		padding: 20rpx 0;
+		border-radius: 40rpx;
+	}
+	.subdict{
+		width: 300rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		background-color: #018C39;
+		border-radius: 200rpx;
+		color: #fff;
+		text-align: center;
+		font-size: 28rpx;
+		margin: 0 auto;
+	}
 	page {
 		height: 100%;
 	}
@@ -296,7 +442,7 @@
 							font-family: PingFang SC;
 							font-weight: bold;
 							color: #FFFFFF;
-							background: linear-gradient(90deg, #66b2ef 0%,#018C39 100%);
+							background: linear-gradient(90deg, #3def30 0%,#018C39 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							flex-shrink: 0;

+ 1 - 1
pages_company/order/confirmCompanyOrder.vue

@@ -206,7 +206,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #66b2ef 0%,#018C39 100%);
+							background: linear-gradient(90deg, #3def30 0%,#018C39 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;

+ 3 - 3
pages_company/order/productDetails.vue

@@ -557,7 +557,7 @@
 				display: inline-block;
 				padding: 0 6upx;
 				height: 30upx;
-				background: linear-gradient(90deg,#018C39 0%, #2BC7A4 100%);
+				background: linear-gradient(90deg,#018C39 0%, #3def30 100%);
 				border-radius: 4upx;
 				margin-right: 10upx;
 				font-size: 22upx;
@@ -853,8 +853,8 @@
 					margin-right: 20upx;
 					margin-bottom: 30upx;
 					&.active{
-						background: #F1FFFE;
-						border: 1px solid #8AD5CE;
+						background: #effff6;
+						border: 1px solid #018C39;
 						color:#018C39;
 					}
 				}

+ 2 - 0
pages_company/order/productList.vue

@@ -192,8 +192,10 @@
 				var that = this;
 				this.form.page=page.num;
 				this.form.pageSize=page.size;
+				this.form.token=uni.getStorageSync('CompanyUserToken');
 				getSalesProducts(this.form).then(res => {
 					if(res.code==200){
+						console.log(7488)
 						//设置列表数据
 						if (page.num == 1) {
 							that.dataList = res.data.list;