| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 | 
							- <!DOCTYPE html>
 
- <html class="">
 
- <!--STATUS OK-->
 
- <head>
 
- 	<meta name="referrer" content="always" />
 
- 	<meta charset='utf-8' />
 
- 	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
 
- 	<meta http-equiv="x-dns-prefetch-control" content="on">
 
- 	<meta name="description" content="">
 
- 	<meta name="format-detection" content="telephone=no" />
 
- 	<link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
 
- 	<link rel="stylesheet" type="text/css" href="css/iconfont.css">
 
- 	<link rel="stylesheet" type="text/css" href="css/main.css" />
 
- 	<script src="js/vue.js"></script>
 
- 	<script src="js/vant-ui.js"></script>
 
- 	<script src="js/main.js"></script>
 
- 	<link rel="stylesheet" href="./mescroll/mescroll.min.css">
 
- 	<script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
 
- 	<title>轮胎信息配置</title>
 
- </head>
 
- <style>
 
- 	.chukujilu {
 
- 		background-color: #fff !important;
 
- 	}
 
- 	.chukujilu .chukuTimer {
 
- 		background-color: #00a0ea !important;
 
- 		color: #fff !important;
 
- 	}
 
- 	.mescroll{
 
- 		position: relative;
 
- 		height: 73%;/*如设置bottom:50px,则需height:auto才能生效*/
 
- 	}
 
- 	/*轮胎信息配置*/
 
- 	.tireInfoSetting{
 
- 		background-color: #fff !important;
 
- 	}
 
- 		.form-row{
 
- 			display: flex;
 
- 			font-size: .32rem;
 
- 			color: #333333;
 
- 			padding: .08rem .24rem;
 
- 			justify-content: center;
 
- 		}
 
- 			.column-dt{
 
- 				width: 1.2rem;
 
- 				flex-shrink: 0;
 
- 				font-weight: bold;
 
- 				width: 1.5rem;
 
- 				flex-shrink: 0;
 
- 			}
 
- 			.column-dd{
 
- 				color: #656565;
 
- 				margin-left: .24rem;
 
- 				flex-grow: 1;
 
- 			}
 
- 		.column-line{
 
- 				width: 100%;
 
- 				border-bottom: 2px solid #DEDEE0;
 
- 				margin: .24rem;
 
- 		}
 
- 		.column-title{
 
- 			padding: 0 .24rem;
 
- 			margin: .16rem 0;
 
- 		}
 
- 		.column-tag{
 
- 			display: inline-block;
 
- 			background: #B7B8BA;
 
- 			color: #ffffff;
 
- 			padding: 0 .16rem;
 
- 			line-height: 1.5;
 
- 			/*height: .48rem;
 
- 			line-height: .5rem;*/
 
- 			border-radius: 4px;
 
- 			font-size: .38rem;
 
- 		}
 
- 		.vant-step{
 
- 			font-size: .32rem;
 
- 		}
 
- 	/*开关*/
 
- 	.on-off{
 
-     width: 1rem;
 
-     height: .4rem;
 
-     border: 1px solid #f0eded;
 
-     -webkit-box-shadow: 0px 1px 4px #d8d6d6;
 
-     -moz-box-shadow: 0px 1px 4px #d8d6d6;
 
-     box-shadow: 1px 1px 2px #d8d6d6;
 
-     font-size: 14px;
 
-     cursor: pointer;
 
-     -webkit-border-radius: 3em;
 
-     -moz-border-radius: 3em;
 
-     border-radius: 3em;
 
-     /*padding: 1px;*/
 
- 		margin: 0 .08rem;
 
- 	}
 
- 	.on-off.open{
 
- 	    background: #fecc20;
 
- 	    border: 1px solid #f7ce40;
 
- 	    -webkit-box-shadow: 0px 1px 4px #d6a80c;
 
- 	    -moz-box-shadow: 0px 1px 4px #d6a80c;
 
- 	    box-shadow: 1px 1px 2px #d6a80c;
 
- 	}
 
- 	.on-off:active span{
 
- 	    width: .5rem
 
- 	}
 
- 	.on-off.open span{
 
- 	    margin-left: .6rem;
 
- 	}
 
- 	.on-off.open:active span{
 
- 	    margin-left: .3rem;
 
- 	    width: .5rem;
 
- 	}
 
- 	.on-off>span{
 
- 	    width: .38rem;
 
- 	    height: .38rem;
 
- 	    background: #fff;
 
- 	    border: 1px solid #f0eded;
 
- 	    -webkit-box-shadow: 0px 1px 4px #d8d6d6;
 
- 	    -moz-box-shadow: 0px 1px 4px #d8d6d6;
 
- 	    box-shadow: 1px 1px 2px #d8d6d6;
 
- 	    display: block;
 
- 	    -webkit-border-radius: 3em;
 
- 	    -moz-border-radius: 3em;
 
- 	    border-radius: 3em;
 
- 	}
 
- </style>
 
- <body>
 
- 	<div id="app" v-cloak>
 
- 		<div class="pageView tireInfoSetting flex col filterpage">
 
- 			<div class="mescroll-touch-y mescroll" id="mescroll">
 
- 				<van-form @submit="onSubmit">
 
- 					  <van-field
 
- 					    v-model="maktx"
 
- 					    name="物料描述"
 
- 					    label="物料描述"
 
- 					    placeholder="物料描述" size="large">
 
- 					  </van-field>
 
- 					  <van-field
 
- 					    v-model="brand"
 
- 					    name="品牌"
 
- 					    label="品牌"
 
- 					    placeholder="品牌"
 
- 					    :rules="[{ required: true, message: '品牌' }]" size="large">
 
- 					  </van-field>
 
- 						<!-- <van-field name="stepper" label="库存" size="large">
 
- 						  <template #input>
 
- 						    <van-stepper v-model="num" />
 
- 						  </template>
 
- 						</van-field>
 
- 						<van-field name="stepper" label="价格" size="large">
 
- 						  <template #input>
 
- 						    <van-stepper v-model="price" />
 
- 						  </template>
 
- 						</van-field> -->
 
- 						<van-field
 
- 							v-model="stock"
 
- 							name="库存"
 
- 							label="库存"
 
- 							placeholder="库存" size="large">
 
- 						</van-field>
 
- 						<van-field
 
- 							v-model="price"
 
- 							name="价格"
 
- 							label="价格"
 
- 							placeholder="价格" size="large">
 
- 						</van-field>
 
- 						<van-field name="stepper" label="是否提供安装服务" size="large">
 
- 						  <template #input>
 
- 							  <van-switch v-model="isProvider" />
 
- 						  </template>
 
- 						</van-field>
 
- 						<van-field name="stepper" label="是否开放微信下单" size="large">
 
- 							<template #input>
 
- 								<van-switch v-model="isOpen" />
 
- 							</template>
 
- 						</van-field>
 
- 					  <div style="margin: 16px;">
 
- 					    <van-button round block type="info" native-type="submit">
 
- 					      提交
 
- 					    </van-button>
 
- 					  </div>
 
- 					</van-form>
 
- 			</div>
 
- 		</div>
 
- 	</div>
 
- </body>
 
- <script type="text/javascript" src="../script/aui-scroll.js"></script>
 
- <script type="text/javascript" src="../script/api.js"></script>
 
- <script type="text/javascript" src="../script/httpRequest.js"></script>
 
- <script type="text/javascript" src="../script/vue_plugins.js"></script>
 
- <script type="text/javascript">
 
- apiready = function() {
 
- 		new Vue({
 
- 			el: '#app',
 
- 			data: {
 
- 					describe: "",
 
- 					brand: "",
 
- 					stock:0,
 
- 					price: 0,
 
- 					isProvider:true,
 
- 					isinstallservice: 1,
 
- 					isOpen: true,
 
- 					isopenwechatorder: 1,
 
- 					storeid: "",
 
- 					maktx: "",
 
- 					specs: "",
 
- 					pattern: ""
 
- 			},
 
- 			watch: {
 
- 				keyword: function(nw, od) {
 
- 					this.current = 1;
 
- 					 this.getIntoList();
 
- 				}
 
- 			},
 
- 			computed: {
 
- 				// isProvider: function(){
 
- 				// 	var value = true;
 
- 				// 	this.isinstallservice==="1"||this.isinstallservice===1 ? value=true : value=false;
 
- 				// 	return value;
 
- 				// },
 
- 				// isOpen: function(){
 
- 				// 	var value = true;
 
- 				// 	console.log();
 
- 				// 	this.isopenwechatorder==="1"||this.isopenwechatorder===1 ? value=true : value=false;
 
- 				// 	return value;
 
- 				// },
 
- 			},
 
- 			methods: {
 
- 				handleInit: function(){
 
- 					var data = {
 
- 									"storeid": this.storeid,
 
- 									"maktx": this.maktx,
 
- 									"brand":this.brand,
 
- 									"specs":this.specs,
 
- 									"patterns":this.pattern,
 
- 									"url": "json",
 
- 									"type": "body"
 
- 							},
 
- 							_this = this,
 
- 							url = "getStoreToMaktxInfoByBSP";
 
- 					this.$post(url, data, function(ret) {
 
- 						// alertJson(ret)
 
- 						// console.log(JSON.stringify(ret))
 
- 						if((ret.code==0||ret.code=="0"||ret.code=="0000")&&ret.data){
 
- 							_this.maktx = ret.data.maktx;
 
- 							_this.stock = ret.data.stock;
 
- 							_this.price = ret.data.price;
 
- 							_this.isinstallservice = ret.data.isinstallservice;
 
- 							_this.isProvider = _this.isinstallservice==="1"||_this.isinstallservice===1 ? true : false;
 
- 							_this.isopenwechatorder = ret.data.isopenwechatorder;
 
- 							_this.isOpen = _this.isopenwechatorder==="1"||_this.isopenwechatorder===1 ? true : false;
 
- 						}else if(!ret.data){
 
- 							api.toast({
 
- 									msg: "数据为空!",
 
- 									duration: 2000,
 
- 									location: 'center'
 
- 							});
 
- 						}else{
 
- 							api.toast({
 
- 									msg: ret.message,
 
- 									duration: 2000,
 
- 									location: 'center'
 
- 							});
 
- 						}
 
- 					})
 
- 				},
 
- 				onSubmit: function(){
 
- 					var data = {
 
- 									"storeid": this.storeid,
 
- 									"maktx": this.maktx,
 
- 									"brand":this.brand,
 
- 									"specs":this.specs,
 
- 									"patterns":this.pattern,
 
- 									"price": this.price,
 
- 									"isinstallservice": this.isProvider?1:0,
 
- 									"isopenwechatorder": this.isOpen?1:0,
 
- 									"url": "json",
 
- 									"type": "body"
 
- 							};
 
- 							_this = this,
 
- 							url = "updateStoreToMaktxInfoByBSP";
 
- 					this.$post(url, data, function(ret) {
 
- 						if(ret.code==0||ret.code=="0"||ret.code=="0000"){
 
- 								api.alert({
 
- 									title: '确认信息',
 
- 									msg: ret.message,
 
- 								}, function (ret, err) {
 
- 									if (ret) {
 
- 										api.sendEvent({
 
- 												name: 'refreshPage',
 
- 												extra: {}
 
- 										});
 
- 										api.closeWin({});
 
- 										// _this.goWin("kucunMy",'kucunMy_win.html', '');
 
- 									}
 
- 								});
 
- 						}else{
 
- 							api.toast({
 
- 									msg: ret.msg,
 
- 									duration: 2000,
 
- 									location: 'center'
 
- 							});
 
- 						}
 
- 					})
 
- 				}
 
- 			},
 
- 			filters: {
 
- 				formatBoolean: function(params){
 
- 					if(params){
 
- 						return true
 
- 					}else{
 
- 						return false
 
- 					}
 
- 				}
 
- 			},
 
- 			mounted: function() {
 
- 				// console.log(api.pageParam.brand)
 
- 				this.storeid =$api.getStorage("userid");
 
- 				this.maktx = api.pageParam.maktx;
 
- 				this.brand = api.pageParam.brand;
 
- 				this.specs = api.pageParam.specs;
 
- 				this.pattern = api.pageParam.pattern;
 
- 				this.handleInit();
 
- 			}
 
- 		})
 
- }
 
- </script>
 
- </html>
 
 
  |