Commit 3b58c97bb9241c76352a0c53e3a782000c8d6fed

Authored by 曹明
1 parent a15f78da
Exists in master

1. 维修费用清单页面新增

app-wx/modules/order/views/default/index.php
... ... @@ -22,6 +22,7 @@ function img($file, $path = '/i/')
22 22  
23 23 <?=$this->render('pages/index-template', ['asset' => $asset])?>
24 24 <?=$this->render('pages/rank-template', ['asset' => $asset])?>
  25 +<?=$this->render('pages/cost-list-template', ['asset' => $asset])?>
25 26  
26 27 <script>
27 28 require.config({baseUrl: $site.assets_url + '/js/',urlArgs : "v=" + require.version});
... ...
app-wx/modules/order/views/default/pages/cost-list-template.php 0 → 100644
... ... @@ -0,0 +1,74 @@
  1 +<?php
  2 +use yii\helpers\Url;
  3 +$baseUrl = Url::base(true);
  4 +?>
  5 +<style>
  6 + body,div,p,span,input{padding: 0;margin: 0}
  7 + input{-webkit-appearance: none;}
  8 + #cost-list .content-div { background: #fff; height: auto;padding: 1rem}
  9 + #cost-list .content-div-two { background: #fff; height: auto;padding: 1rem;margin-top: 0.63rem}
  10 + #cost-list .page-content{ background-color: #ECF0F2 }
  11 + #cost-list .cost-list-title { width:100%; font-size:1.07rem; font-weight:bold; color:rgba(0,0,0,1); line-height:1.81rem;}
  12 + #cost-list .title-tip{ font-size:1rem; font-weight:400; color:rgba(255,135,40,1); line-height:1.82rem; float: right}
  13 + #cost-list .cost-list-title-two { font-size:1rem; font-weight:400; color:rgba(0,0,0,1); line-height:1.81rem;}
  14 + #cost-list .cost-list-div {width:100%;margin-top: 1rem; }
  15 + #cost-list .cost-list-add {width:100%;margin-top: 0.5rem; }
  16 + #cost-list .pic-div {width:100%;margin-top: 0.5rem; }
  17 + #cost-list .cost-total-list-div {width:100%;margin-top: 1rem; text-align: right}
  18 + #cost-list .cost-total-title {font-size:0.81rem;font-weight:400;color:rgba(85,85,85,1);line-height:1.69rem;}
  19 + #cost-list .cost-total-price { font-size:1.13rem; font-weight:400; color:rgba(0,0,0,1); line-height:1.69rem;}
  20 + #cost-list .img-plus {width: 1rem; height: 1rem; vertical-align: text-top; margin-right: 0.2rem}
  21 + #cost-list .item-title { font-size:0.88rem; font-weight:400; color:rgba(186,186,186,1); line-height:1.81rem;}
  22 + #cost-list .input-left {width:70%; padding: 0 0.5rem; height:2.47rem; background:rgba(255,255,255,1); border:1px solid rgba(221,221,221,1); border-radius:0rem 0rem 0rem 0rem;}
  23 + #cost-list .input-right {width:30%; height:2.47rem; padding: 0 0.5rem; text-align: center; background:rgba(255,255,255,1); border:1px solid rgba(221,221,221,1); border-radius:0rem 0rem 0rem 0rem; border-left: none}
  24 + #cost-list .two-tip{ font-size:0.75rem; font-weight:400; color:rgba(85,85,85,1); line-height:1.81rem;}
  25 + #cost-list .add-pic{width: 3.91rem;height: 3.91rem}
  26 + #cost-list .btn-submit{width:85%;text-align: center;line-height: 3.06rem;
  27 + height:3.06rem;
  28 + background:rgba(255,135,40,1);
  29 + border-radius:2rem;
  30 + font-size:1.06rem;
  31 + font-weight:400;
  32 + color:rgba(255,255,255,1);
  33 + margin: 0 auto;
  34 + margin-top: 9rem;
  35 + margin-bottom: 2rem;
  36 + }
  37 +</style>
  38 +<script id="cost-list-template" type="text/template">
  39 + <div class="pages">
  40 + <div class="page" id="cost-list" style="background: #fff">
  41 + <div class="page-content">
  42 + <div class="content-div">
  43 + <div class="cost-list-title">维修费用清单
  44 + <span class="title-tip">
  45 + <img src="<?= $baseUrl . "/i/order/plus.png"?>" class="img-plus">添加
  46 + </span>
  47 + </div>
  48 + <div class="cost-list-div">
  49 + <p class="item-title">第1项</p>
  50 + <div style="display: flex;width: 100%">
  51 + <input type="text" class="input-left" placeholder="填写维修内容" value="更换车轮胎"/><input type="text" class="input-right" placeholder="填写价格" value="250"/>
  52 + </div>
  53 + </div>
  54 + <div class="cost-list-add">
  55 + <p class="item-title">第2项</p>
  56 + <div style="display: flex;width: 100%">
  57 + <input type="text" class="input-left" placeholder="填写维修内容"/><input type="text" class="input-right" placeholder="填写价格"/>
  58 + </div>
  59 + </div>
  60 + <div class="cost-total-list-div">
  61 + <span class="cost-total-title">总金额:</span><span class="cost-total-price">&yen;250</span>
  62 + </div>
  63 + </div>
  64 + <div class="content-div-two">
  65 + <div class="cost-list-title-two">维修完成照片 <span class="two-tip">(选传,最多9张)</span></div>
  66 + <div class="pic-div">
  67 + <img src="<?= $baseUrl . "/i/order/add_pic.png"?>" class="add-pic">
  68 + </div>
  69 + </div>
  70 + <div class="btn-submit"> 提交 </div>
  71 + </div>
  72 + </div>
  73 + </div>
  74 +</script>
... ...
app-wx/modules/order/views/default/pages/rank-template.php
... ... @@ -12,7 +12,7 @@ $baseUrl = Url::base(true);
12 12 #rank .star-div {margin-top: 1rem;display: flex;}
13 13 #rank .img-start {width: 1.47rem; height: 1.47rem; float: left; vertical-align: middle; margin-right: 1rem}
14 14 #rank .text-content {width: 100%;height: 7.5rem; resize: none;line-height: 1.2rem;padding: 0.5rem}
15   -
  15 + #rank .rank-text { font-size:0.94rem; font-weight:400; color:rgba(0,0,0,1); line-height:1.75rem;}
16 16 </style>
17 17 <script id="rank-template" type="text/template">
18 18 <div class="pages">
... ... @@ -26,7 +26,7 @@ $baseUrl = Url::base(true);
26 26 <img src="<?= $baseUrl . "/i/order/rank/rank_star.png"?>" class="img-start">
27 27 <img src="<?= $baseUrl . "/i/order/rank/rank_star.png"?>" class="img-start">
28 28 <img src="<?= $baseUrl . "/i/order/rank/rank_no_select.png"?>" class="img-start">
29   - <span style="line-height: 1.47rem">一般</span>
  29 + <span class="rank-text">一般</span>
30 30 </div>
31 31 <div class="rank-title-two">说说你的感受</div>
32 32 <div class="star-div">
... ...
web/dist/js/order-app.js
1   -define("order-app",["mk7/app"],function(n){var e=Dom7,i=function(){var n=e(".ui-loading-block");0==n.length&&(e(".view-main").html('<div class="ui-loading-block" id="ui-loading"><div class="ui-loading-cnt"><div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div><div id="loader-inner"><p></p></div> </div> </div>'),window.waitingTime=1e4,window.loaderTimer&&clearTimeout(window.loaderTimer),window.loaderTimer=setTimeout(function(){var n=document.getElementById("loader-inner"),e=document.createElement("p");e.className="notice",n&&(e.innerHTML='加载速度太慢?试试<a class="link" href="#" onclick="javascript:location.reload();return false;">重新加载</a>',n.appendChild(e))},window.waitingTime))},r=!0;return n.name="order",n.routes={index:function(){return r=!1,i(),n.runController("index")},rank:function(){return r=!1,i(),n.runController("rank")},"*":function(){return n.runController("index")}},n}),define("order/index-controller",["mk7/controller","mk7/url","mk7/utils"],function(n,e,i){var n=(Dom7,Template7,new n);return n.run=function(){var n=this;n.setPageTitle("首页"),n.hideAllNonBaseMenuItem(window.$site),n.render()},n.bindEvents=function(){console.log("bindEvents")},n}),define("order/rank-controller",["mk7/controller","mk7/url","mk7/utils"],function(n,e,i){var n=(Dom7,Template7,new n);return n.run=function(){var n=this;n.setPageTitle("评价"),n.render()},n.bindEvents=function(){console.log("bindEvents")},n});
2 1 \ No newline at end of file
  2 +define("order-app",["mk7/app"],function(n){var e=Dom7,i=function(){var n=e(".ui-loading-block");0==n.length&&(e(".view-main").html('<div class="ui-loading-block" id="ui-loading"><div class="ui-loading-cnt"><div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div><div id="loader-inner"><p></p></div> </div> </div>'),window.waitingTime=1e4,window.loaderTimer&&clearTimeout(window.loaderTimer),window.loaderTimer=setTimeout(function(){var n=document.getElementById("loader-inner"),e=document.createElement("p");e.className="notice",n&&(e.innerHTML='加载速度太慢?试试<a class="link" href="#" onclick="javascript:location.reload();return false;">重新加载</a>',n.appendChild(e))},window.waitingTime))},r=!0;return n.name="order",n.routes={index:function(){return r=!1,i(),n.runController("index")},rank:function(){return r=!1,i(),n.runController("rank")},"cost-list":function(){return r=!1,i(),n.runController("cost-list")},"*":function(){return n.runController("index")}},n}),define("order/cost-list-controller",["mk7/controller","mk7/url","mk7/utils"],function(n,e,i){var n=(Dom7,Template7,new n);return n.run=function(){var n=this;n.setPageTitle("费用列表"),n.render()},n.bindEvents=function(){console.log("bindEvents")},n}),define("order/index-controller",["mk7/controller","mk7/url","mk7/utils"],function(n,e,i){var n=(Dom7,Template7,new n);return n.run=function(){var n=this;n.setPageTitle("订单列表"),n.hideAllNonBaseMenuItem(window.$site),n.render()},n.bindEvents=function(){console.log("bindEvents")},n}),define("order/rank-controller",["mk7/controller","mk7/url","mk7/utils"],function(n,e,i){var n=(Dom7,Template7,new n);return n.run=function(){var n=this;n.setPageTitle("评价"),n.render()},n.bindEvents=function(){console.log("bindEvents")},n});
3 3 \ No newline at end of file
... ...
web/i/order/add_pic.png 0 → 100644

4.31 KB

web/i/order/plus.png 0 → 100644

1.09 KB

web/src/js/order/app.js
... ... @@ -44,6 +44,11 @@ define(
44 44 _autoLoading();
45 45 return app.runController('rank');
46 46 },
  47 + 'cost-list': function () {
  48 + fromOutside = false;
  49 + _autoLoading();
  50 + return app.runController('cost-list');
  51 + },
47 52 '*': function(){
48 53 return app.runController('index');
49 54 }
... ...
web/src/js/order/cost-list-controller.js 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +/**
  2 + * 订单评价-首页
  3 + */
  4 +define(
  5 + "order/cost-list-controller",
  6 + [
  7 + 'mk7/controller',
  8 + 'mk7/url',
  9 + 'mk7/utils',
  10 + ],
  11 +
  12 + function(ctrl, url, utils) {
  13 +
  14 + var $$ = Dom7;
  15 + var t7 = Template7;
  16 + var ctrl = new ctrl();
  17 +
  18 + ctrl.run = function () {
  19 + var me = this;
  20 + me.setPageTitle("费用列表");
  21 + me.render();
  22 + }
  23 + ctrl.bindEvents = function () {
  24 + var me = this;
  25 + console.log("bindEvents");
  26 + }
  27 +
  28 + return ctrl;
  29 + }
  30 +);
... ...
web/src/js/order/index-controller.js
... ... @@ -18,7 +18,7 @@ define(
18 18  
19 19 ctrl.run = function () {
20 20 var me = this;
21   - me.setPageTitle("首页");
  21 + me.setPageTitle("订单列表");
22 22 me.hideAllNonBaseMenuItem(window.$site);
23 23  
24 24 me.render();
... ...