tireInfoSetting_body.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="css/main.css" />
  14. <script src="js/vue.js"></script>
  15. <script src="js/vant-ui.js"></script>
  16. <script src="js/main.js"></script>
  17. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  18. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  19. <title>轮胎信息配置</title>
  20. </head>
  21. <style>
  22. .chukujilu {
  23. background-color: #fff !important;
  24. }
  25. .chukujilu .chukuTimer {
  26. background-color: #00a0ea !important;
  27. color: #fff !important;
  28. }
  29. .mescroll{
  30. position: relative;
  31. height: 73%;/*如设置bottom:50px,则需height:auto才能生效*/
  32. }
  33. /*轮胎信息配置*/
  34. .tireInfoSetting{
  35. background-color: #fff !important;
  36. }
  37. .form-row{
  38. display: flex;
  39. font-size: .32rem;
  40. color: #333333;
  41. padding: .08rem .24rem;
  42. justify-content: center;
  43. }
  44. .column-dt{
  45. width: 1.2rem;
  46. flex-shrink: 0;
  47. font-weight: bold;
  48. width: 1.5rem;
  49. flex-shrink: 0;
  50. }
  51. .column-dd{
  52. color: #656565;
  53. margin-left: .24rem;
  54. flex-grow: 1;
  55. }
  56. .column-line{
  57. width: 100%;
  58. border-bottom: 2px solid #DEDEE0;
  59. margin: .24rem;
  60. }
  61. .column-title{
  62. padding: 0 .24rem;
  63. margin: .16rem 0;
  64. }
  65. .column-tag{
  66. display: inline-block;
  67. background: #B7B8BA;
  68. color: #ffffff;
  69. padding: 0 .16rem;
  70. line-height: 1.5;
  71. /*height: .48rem;
  72. line-height: .5rem;*/
  73. border-radius: 4px;
  74. font-size: .38rem;
  75. }
  76. .vant-step{
  77. font-size: .32rem;
  78. }
  79. /*开关*/
  80. .on-off{
  81. width: 1rem;
  82. height: .4rem;
  83. border: 1px solid #f0eded;
  84. -webkit-box-shadow: 0px 1px 4px #d8d6d6;
  85. -moz-box-shadow: 0px 1px 4px #d8d6d6;
  86. box-shadow: 1px 1px 2px #d8d6d6;
  87. font-size: 14px;
  88. cursor: pointer;
  89. -webkit-border-radius: 3em;
  90. -moz-border-radius: 3em;
  91. border-radius: 3em;
  92. /*padding: 1px;*/
  93. margin: 0 .08rem;
  94. }
  95. .on-off.open{
  96. background: #fecc20;
  97. border: 1px solid #f7ce40;
  98. -webkit-box-shadow: 0px 1px 4px #d6a80c;
  99. -moz-box-shadow: 0px 1px 4px #d6a80c;
  100. box-shadow: 1px 1px 2px #d6a80c;
  101. }
  102. .on-off:active span{
  103. width: .5rem
  104. }
  105. .on-off.open span{
  106. margin-left: .6rem;
  107. }
  108. .on-off.open:active span{
  109. margin-left: .3rem;
  110. width: .5rem;
  111. }
  112. .on-off>span{
  113. width: .38rem;
  114. height: .38rem;
  115. background: #fff;
  116. border: 1px solid #f0eded;
  117. -webkit-box-shadow: 0px 1px 4px #d8d6d6;
  118. -moz-box-shadow: 0px 1px 4px #d8d6d6;
  119. box-shadow: 1px 1px 2px #d8d6d6;
  120. display: block;
  121. -webkit-border-radius: 3em;
  122. -moz-border-radius: 3em;
  123. border-radius: 3em;
  124. }
  125. </style>
  126. <body>
  127. <div id="app" v-cloak>
  128. <div class="pageView tireInfoSetting flex col filterpage">
  129. <div class="mescroll-touch-y mescroll" id="mescroll">
  130. <van-form @submit="onSubmit">
  131. <van-field
  132. v-model="maktx"
  133. name="物料描述"
  134. label="物料描述"
  135. placeholder="物料描述" size="large">
  136. </van-field>
  137. <van-field
  138. v-model="brand"
  139. name="品牌"
  140. label="品牌"
  141. placeholder="品牌"
  142. :rules="[{ required: true, message: '品牌' }]" size="large">
  143. </van-field>
  144. <!-- <van-field name="stepper" label="库存" size="large">
  145. <template #input>
  146. <van-stepper v-model="num" />
  147. </template>
  148. </van-field>
  149. <van-field name="stepper" label="价格" size="large">
  150. <template #input>
  151. <van-stepper v-model="price" />
  152. </template>
  153. </van-field> -->
  154. <van-field
  155. v-model="stock"
  156. name="库存"
  157. label="库存"
  158. placeholder="库存" size="large">
  159. </van-field>
  160. <van-field
  161. v-model="price"
  162. name="价格"
  163. label="价格"
  164. placeholder="价格" size="large">
  165. </van-field>
  166. <van-field name="stepper" label="是否提供安装服务" size="large">
  167. <template #input>
  168. <van-switch v-model="isProvider" />
  169. </template>
  170. </van-field>
  171. <van-field name="stepper" label="是否开放微信下单" size="large">
  172. <template #input>
  173. <van-switch v-model="isOpen" />
  174. </template>
  175. </van-field>
  176. <div style="margin: 16px;">
  177. <van-button round block type="info" native-type="submit">
  178. 提交
  179. </van-button>
  180. </div>
  181. </van-form>
  182. </div>
  183. </div>
  184. </div>
  185. </body>
  186. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  187. <script type="text/javascript" src="../script/api.js"></script>
  188. <script type="text/javascript" src="../script/httpRequest.js"></script>
  189. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  190. <script type="text/javascript">
  191. apiready = function() {
  192. new Vue({
  193. el: '#app',
  194. data: {
  195. describe: "",
  196. brand: "",
  197. stock:0,
  198. price: 0,
  199. isProvider:true,
  200. isinstallservice: 1,
  201. isOpen: true,
  202. isopenwechatorder: 1,
  203. storeid: "",
  204. maktx: "",
  205. specs: "",
  206. pattern: ""
  207. },
  208. watch: {
  209. keyword: function(nw, od) {
  210. this.current = 1;
  211. this.getIntoList();
  212. }
  213. },
  214. computed: {
  215. // isProvider: function(){
  216. // var value = true;
  217. // this.isinstallservice==="1"||this.isinstallservice===1 ? value=true : value=false;
  218. // return value;
  219. // },
  220. // isOpen: function(){
  221. // var value = true;
  222. // console.log();
  223. // this.isopenwechatorder==="1"||this.isopenwechatorder===1 ? value=true : value=false;
  224. // return value;
  225. // },
  226. },
  227. methods: {
  228. handleInit: function(){
  229. var data = {
  230. "storeid": this.storeid,
  231. "maktx": this.maktx,
  232. "brand":this.brand,
  233. "specs":this.specs,
  234. "patterns":this.pattern,
  235. "url": "json",
  236. "type": "body"
  237. },
  238. _this = this,
  239. url = "getStoreToMaktxInfoByBSP";
  240. this.$post(url, data, function(ret) {
  241. // alertJson(ret)
  242. // console.log(JSON.stringify(ret))
  243. if((ret.code==0||ret.code=="0"||ret.code=="0000")&&ret.data){
  244. _this.maktx = ret.data.maktx;
  245. _this.stock = ret.data.stock;
  246. _this.price = ret.data.price;
  247. _this.isinstallservice = ret.data.isinstallservice;
  248. _this.isProvider = _this.isinstallservice==="1"||_this.isinstallservice===1 ? true : false;
  249. _this.isopenwechatorder = ret.data.isopenwechatorder;
  250. _this.isOpen = _this.isopenwechatorder==="1"||_this.isopenwechatorder===1 ? true : false;
  251. }else if(!ret.data){
  252. api.toast({
  253. msg: "数据为空!",
  254. duration: 2000,
  255. location: 'center'
  256. });
  257. }else{
  258. api.toast({
  259. msg: ret.message,
  260. duration: 2000,
  261. location: 'center'
  262. });
  263. }
  264. })
  265. },
  266. onSubmit: function(){
  267. var data = {
  268. "storeid": this.storeid,
  269. "maktx": this.maktx,
  270. "brand":this.brand,
  271. "specs":this.specs,
  272. "patterns":this.pattern,
  273. "price": this.price,
  274. "isinstallservice": this.isProvider?1:0,
  275. "isopenwechatorder": this.isOpen?1:0,
  276. "url": "json",
  277. "type": "body"
  278. };
  279. _this = this,
  280. url = "updateStoreToMaktxInfoByBSP";
  281. this.$post(url, data, function(ret) {
  282. if(ret.code==0||ret.code=="0"||ret.code=="0000"){
  283. api.alert({
  284. title: '确认信息',
  285. msg: ret.message,
  286. }, function (ret, err) {
  287. if (ret) {
  288. api.sendEvent({
  289. name: 'refreshPage',
  290. extra: {}
  291. });
  292. api.closeWin({});
  293. // _this.goWin("kucunMy",'kucunMy_win.html', '');
  294. }
  295. });
  296. }else{
  297. api.toast({
  298. msg: ret.msg,
  299. duration: 2000,
  300. location: 'center'
  301. });
  302. }
  303. })
  304. }
  305. },
  306. filters: {
  307. formatBoolean: function(params){
  308. if(params){
  309. return true
  310. }else{
  311. return false
  312. }
  313. }
  314. },
  315. mounted: function() {
  316. // console.log(api.pageParam.brand)
  317. this.storeid =$api.getStorage("userid");
  318. this.maktx = api.pageParam.maktx;
  319. this.brand = api.pageParam.brand;
  320. this.specs = api.pageParam.specs;
  321. this.pattern = api.pageParam.pattern;
  322. this.handleInit();
  323. }
  324. })
  325. }
  326. </script>
  327. </html>