Commit 8a4f7659db322c146b8d7a901e5622d11cf4d155

Authored by unknown
1 parent 9cdc41360b

快速建档

Showing 18 changed files with 1030 additions and 37 deletions

littleApp_child/app.json View file @ 8a4f765
1 1 {
2 2 "pages": [
3 3 "pages/home/home",
  4 + "pages/quickArchives/quickArchives",
  5 + "pages/checkupAskInput/checkupAskInput",
4 6 "pages/Setting/Setting",
5 7 "pages/PersonalInfo/PersonalInfo",
6 8 "pages/checkTabList/checkTabList",
littleApp_child/pages/checkupAskInput/checkupAskInput.js View file @ 8a4f765
  1 +// pages/checkupAskInput/checkupAskInput.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + postObj: {},
  9 + "fyType": [
  10 + {
  11 + "name": "父亲",
  12 + "id": "0"
  13 + },
  14 + {
  15 + "name": "母亲",
  16 + "id": "1"
  17 + },
  18 + {
  19 + "name": "祖父",
  20 + "id": "2"
  21 + },
  22 + {
  23 + "name": "祖母",
  24 + "id": "3"
  25 + },
  26 + {
  27 + "name": "外祖父",
  28 + "id": "4"
  29 + },
  30 + {
  31 + "name": "外祖母",
  32 + "id": "5"
  33 + },
  34 + {
  35 + "name": "其它",
  36 + "id": "6"
  37 + }
  38 + ],
  39 + "cnqk": [
  40 + {
  41 + "name": "好",
  42 + "id": "1"
  43 + },
  44 + {
  45 + "name": "不好",
  46 + "id": "2"
  47 + }
  48 + ],
  49 + "wyType": [
  50 + {
  51 + "name": "母乳喂养",
  52 + "id": "0"
  53 + },
  54 + {
  55 + "name": "混合喂养",
  56 + "id": "1"
  57 + },
  58 + {
  59 + "name": "人工喂养",
  60 + "id": "2"
  61 + }
  62 + ]
  63 + },
  64 +
  65 + /**
  66 + * 生命周期函数--监听页面加载
  67 + */
  68 + onLoad: function (options) {
  69 +
  70 + },
  71 +
  72 + bindKeyInput(e) {
  73 + // console.log(e)
  74 + let key = e.currentTarget.id;
  75 + let value = e.detail.value;
  76 + this.setData({
  77 + ['postObj.' + key]: value
  78 + })
  79 + },
  80 +
  81 + bindPickerChange(e) {
  82 + console.log(e)
  83 + },
  84 +
  85 +
  86 +
  87 +
  88 +
  89 +
  90 +
  91 +
  92 +
  93 +
  94 +
  95 +
  96 +
  97 +
  98 +
  99 +
  100 +
  101 +
  102 +
  103 +
  104 +
  105 + /**
  106 + * 生命周期函数--监听页面初次渲染完成
  107 + */
  108 + onReady: function () {
  109 +
  110 + },
  111 +
  112 + /**
  113 + * 生命周期函数--监听页面显示
  114 + */
  115 + onShow: function () {
  116 +
  117 + },
  118 +
  119 + /**
  120 + * 生命周期函数--监听页面隐藏
  121 + */
  122 + onHide: function () {
  123 +
  124 + },
  125 +
  126 + /**
  127 + * 生命周期函数--监听页面卸载
  128 + */
  129 + onUnload: function () {
  130 +
  131 + },
  132 +
  133 + /**
  134 + * 页面相关事件处理函数--监听用户下拉动作
  135 + */
  136 + onPullDownRefresh: function () {
  137 +
  138 + },
  139 +
  140 + /**
  141 + * 页面上拉触底事件的处理函数
  142 + */
  143 + onReachBottom: function () {
  144 +
  145 + },
  146 +
  147 + /**
  148 + * 用户点击右上角分享
  149 + */
  150 + onShareAppMessage: function () {
  151 +
  152 + }
  153 +})
littleApp_child/pages/checkupAskInput/checkupAskInput.json View file @ 8a4f765
  1 +{
  2 + "navigationBarBackgroundColor": "#48C17B",
  3 + "navigationBarTitleText": "问诊录入",
  4 + "navigationBarTextStyle": "white",
  5 + "backgroundColor": "#F4F4F4",
  6 + "enablePullDownRefresh": true
  7 +}
littleApp_child/pages/checkupAskInput/checkupAskInput.wxml View file @ 8a4f765
  1 +<view class="card">
  2 + <view class="weui-cell page-tt">问诊{{postObj.sadada}}</view>
  3 + <view class="weui-cells">
  4 + <view class="weui-cell">
  5 + <view class="weui-cell__hd">
  6 + <text class="weui-label line-tt">联系电话</text>
  7 + </view>
  8 + <view class="weui-cell__bd">
  9 + <input bindinput="bindKeyInput" id="mphone" type="number" placeholder="输入" />
  10 + </view>
  11 + </view>
  12 + <view class="weui-cell">
  13 + <view class="weui-cell__hd">
  14 + <text class="weui-label line-tt">主要抚养人</text>
  15 + </view>
  16 + <view class="weui-cell__bd">
  17 + <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
  18 + <view class="picker">
  19 + <text class="select-placeholder" wx:if="true">请选择</text>
  20 + {{array[index]}}
  21 + </view>
  22 + </picker>
  23 + </view>
  24 + <view class="weui-cell__ft">〉</view>
  25 + </view>
  26 + <view class="weui-cell">
  27 + <view class="weui-cell__hd">
  28 + <text class="weui-label line-tt">喂养方式</text>
  29 + </view>
  30 + <view class="weui-cell__bd">
  31 + <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
  32 + <view class="picker">
  33 + <text class="select-placeholder" wx:if="true">请选择</text>
  34 + {{array[index]}}
  35 + </view>
  36 + </picker>
  37 + </view>
  38 + <view class="weui-cell__ft">〉</view>
  39 + </view>
  40 + <view class="weui-cell">
  41 + <view class="weui-cell__hd">
  42 + <text class="weui-label line-tt">吃奶情况</text>
  43 + </view>
  44 + <view class="weui-cell__bd">
  45 + <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
  46 + <view class="picker">
  47 + <text class="select-placeholder" wx:if="true">请选择</text>
  48 + {{array[index]}}
  49 + </view>
  50 + </picker>
  51 + </view>
  52 + <view class="weui-cell__ft">〉</view>
  53 + </view>
  54 + <view class="weui-cell">
  55 + <view class="weui-cell__hd">
  56 + <text class="weui-label line-tt">每天吃奶次数</text>
  57 + </view>
  58 + <view class="weui-cell__bd">
  59 + <input type="number" bindinput="bindKeyInput" id="mtcnNum" placeholder="输入吃奶次数" />
  60 + </view>
  61 + <view class="weui-cell__ft">次</view>
  62 + </view>
  63 + <view class="weui-cell">
  64 + <view class="weui-cell__hd">
  65 + <text class="weui-label line-tt">小便</text>
  66 + </view>
  67 + <view class="weui-cell__bd">
  68 + <input type="text" bindinput="bindKeyInput" id="pee" placeholder="输入小便情况" />
  69 + </view>
  70 + </view>
  71 + <view class="weui-cell">
  72 + <view class="weui-cell__hd">
  73 + <text class="weui-label line-tt">小便次数</text>
  74 + </view>
  75 + <view class="weui-cell__bd">
  76 + <input type="number" bindinput="bindKeyInput" id="xbNum" placeholder="输入小便次数" />
  77 + </view>
  78 + <view class="weui-cell__ft">次</view>
  79 + </view>
  80 + <view class="weui-cell">
  81 + <view class="weui-cell__hd">
  82 + <text class="weui-label line-tt">大便</text>
  83 + </view>
  84 + <view class="weui-cell__bd">
  85 + <input type="text" bindinput="bindKeyInput" id="excrement" placeholder="输入大便情况" />
  86 + </view>
  87 + <view class="weui-cell__ft"></view>
  88 + </view>
  89 + <view class="weui-cell">
  90 + <view class="weui-cell__hd">
  91 + <text class="weui-label line-tt">大便次数</text>
  92 + </view>
  93 + <view class="weui-cell__bd flex-box">
  94 + <input type="number" bindinput="bindKeyInput" id="dbNum" placeholder="次数" />
  95 + </view>
  96 + <view class="weui-cell__ft">次/</view>
  97 + <view class="weui-cell__bd flex-box">
  98 + <input type="number" bindinput="bindKeyInput" id="dbDayNum" placeholder="统计天数" />
  99 + </view>
  100 + <view class="weui-cell__ft">天</view>
  101 + </view>
  102 + <view class="weui-cell">
  103 + <view class="weui-cell__hd">
  104 + <text class="weui-label line-tt">睡眠</text>
  105 + </view>
  106 + <view class="weui-cell__bd">
  107 + <input type="text" bindinput="bindKeyInput" id="sleep" placeholder="输入睡眠情况" />
  108 + </view>
  109 + <view class="weui-cell__ft"></view>
  110 + </view>
  111 + <view class="weui-cell">
  112 + <view class="weui-cell__hd">
  113 + <text class="weui-label line-tt">户外活动</text>
  114 + </view>
  115 + <view class="weui-cell__bd">
  116 + <input type="digit" bindinput="bindKeyInput" id="activity" placeholder="输入户外活动" />
  117 + </view>
  118 + <view class="weui-cell__ft">时/日</view>
  119 + </view>
  120 + <view class="weui-cell">
  121 + <view class="weui-cell__hd">
  122 + <text class="weui-label line-tt">维生素D</text>
  123 + </view>
  124 + <view class="weui-cell__bd">
  125 + <input type="digit" bindinput="bindKeyInput" id="vitaminD" placeholder="输入维生素D摄入量" />
  126 + </view>
  127 + <view class="weui-cell__ft">IU/日</view>
  128 + </view>
  129 + <view class="weui-cell">
  130 + <view class="weui-cell__hd">
  131 + <text class="weui-label line-tt">维生素AD</text>
  132 + </view>
  133 + <view class="weui-cell__bd">
  134 + <input type="digit" bindinput="bindKeyInput" id="wssAd" placeholder="输入维生素AD摄入量" />
  135 + </view>
  136 + <view class="weui-cell__ft">IU/日</view>
  137 + </view>
  138 + <view class="weui-cell">
  139 + <view class="weui-cell__hd">
  140 + <text class="weui-label line-tt">辅食添加</text>
  141 + </view>
  142 + <view class="weui-cell__bd">
  143 + <view style="height:60px;">
  144 + <text class="select-btn choose ">未添加</text>
  145 + <text class="select-btn">添加</text>
  146 + <input type="text" bindinput="bindKeyInput" id="assistFood" placeholder="输入辅食内容" />
  147 + </view>
  148 + </view>
  149 + </view>
  150 + <view class="weui-cell">
  151 + <view class="weui-cell__hd">
  152 + <text class="weui-label line-tt">家庭措施</text>
  153 + </view>
  154 + <view class="weui-cell__bd">
  155 + <input type="text" bindinput="bindKeyInput" id="homeMeasure" placeholder="促进儿童早期发展采取的措施" />
  156 + </view>
  157 + </view>
  158 + <view class="weui-cell">
  159 + <view class="weui-cell__hd">
  160 + <text class="weui-label line-tt">两次随访间
  161 + 患病情况</text>
  162 + </view>
  163 + <view class="weui-cell__bd">
  164 + <view style="height:80px;">
  165 + <text class="select-btn choose">未患病</text>
  166 + <text class="select-btn">患病</text>
  167 + <!-- douhbqk -->
  168 + </view>
  169 + </view>
  170 + </view>
  171 + <view class="weui-cell">
  172 + <view class="weui-cell__hd">
  173 + <text class="weui-label line-tt">药物过敏史</text>
  174 + </view>
  175 + <view class="weui-cell__bd">
  176 + <view style="height:80px;">
  177 + <text class="select-btn choose">无</text>
  178 + <text class="select-btn">有</text>
  179 + <!-- drugGllergic -->
  180 + </view>
  181 + </view>
  182 + </view>
  183 + <view class="weui-cell">
  184 + <view class="weui-cell__hd">
  185 + <text class="weui-label line-tt">脐带脱落时间</text>
  186 + </view>
  187 + <view class="weui-cell__bd">
  188 + <input type="number" bindinput="bindKeyInput" id="qdtlTime" placeholder="输入脐带脱落时间" />
  189 + </view>
  190 + <view class="weui-cell__ft">天</view>
  191 + </view>
  192 + <view class="weui-cell">
  193 + <view class="weui-cell__hd">
  194 + <text class="weui-label line-tt">黄染消退时间</text>
  195 + </view>
  196 + <view class="weui-cell__bd">
  197 + <input type="number" bindinput="bindKeyInput" id="pfhrTime" placeholder="输入黄染消退时间" />
  198 + </view>
  199 + <view class="weui-cell__ft">天</view>
  200 + </view>
  201 + <view class="weui-cell">
  202 + <view class="weui-cell__hd">
  203 + <text class="weui-label line-tt">其他说明</text>
  204 + </view>
  205 + <view class="weui-cell__bd">
  206 + <input type="text" bindinput="bindKeyInput" id="askOther" placeholder="输入其他说明" />
  207 + </view>
  208 + <view class="weui-cell__ft"></view>
  209 + </view>
  210 + </view>
  211 +</view>
littleApp_child/pages/checkupAskInput/checkupAskInput.wxss View file @ 8a4f765
  1 +/* pages/checkupAskInput/checkupAskInput.wxss */
  2 +.weui-cells{
  3 + padding-right:15px;
  4 +}
  5 +.weui-cell{
  6 + padding: 10px 0 10px 10px;
  7 +}
  8 +.page-tt{
  9 + font-size: 18px;
  10 +}
  11 +.weui-cells{
  12 + margin-top:0;
  13 +}
  14 +.weui-cell__ft{
  15 + font-size: 14px;
  16 + color: #333;
  17 +}
  18 +.weui-label{
  19 + display: block;
  20 + width: 95px;
  21 +}
  22 +.line-tt{
  23 + padding-left: 5px;
  24 + font-size: 14px;
  25 +}
  26 +.select-placeholder{
  27 + color: #c0c0c0;
  28 + font-size: 14px;
  29 +}
  30 +.select-btn{
  31 + text-align: center;
  32 + min-width: 45px;
  33 + padding: 0px 4px;
  34 + height: 24px;
  35 + line-height: 24px;
  36 + border:1px solid #797979;
  37 + color: #797979;
  38 + font-size: 14px;
  39 + display: inline-block;
  40 + margin:1px 3px;
  41 +}
  42 +.select-btn.choose{
  43 + border:1px solid #48C07B;
  44 + background: #48C07B;
  45 + color: #fff;
  46 +}
  47 +.unit-span{
  48 + font-size: 14px;
  49 + vertical-align: middle;
  50 + line-height: 1.5;
  51 +}
  52 +.flex-box{
  53 + display: flex;
  54 +}
  55 +.unit-input{
  56 + flex: 1;
  57 + display:inline-block;
  58 + vertical-align: middle;
  59 +}
littleApp_child/pages/checkupAskInput/ss.js View file @ 8a4f765
  1 +// POST /interrogation/upload
  2 +// {
  3 +// private String mphone;
  4 +
  5 +// /**
  6 +// * 抚养人
  7 +// */
  8 +// private String mainFoster;
  9 +
  10 +// /**
  11 +// * 喂养方式
  12 +// */
  13 +// private String cnqk;
  14 +
  15 +// /**
  16 +// * 吃奶情况
  17 +// */
  18 +// private String milkingSituation;
  19 +
  20 +// /**
  21 +// * 每天吃奶次数
  22 +// */
  23 +// private String mtcnNum;
  24 +
  25 +// /**
  26 +// * 小便
  27 +// */
  28 +// private String pee;
  29 +
  30 +// /**
  31 +// * 小便次数
  32 +// */
  33 +// private String xbNum;
  34 +
  35 +// /**
  36 +// * 大便
  37 +// */
  38 +// private String excrement;
  39 +
  40 +// /**
  41 +// * 大便次数
  42 +// */
  43 +// private String dbNum;
  44 +
  45 +// /**
  46 +// * 大便天数
  47 +// */
  48 +// private String dbDayNum;
  49 +
  50 +// /**
  51 +// * 睡眠
  52 +// */
  53 +// private String sleep;
  54 +
  55 +// /**
  56 +// * 户外活动(小时)
  57 +// */
  58 +// private String activity;
  59 +
  60 +// /**
  61 +// * 维生素D
  62 +// */
  63 +// private String vitaminD;
  64 +
  65 +// /**
  66 +// * 维生素AD
  67 +// */
  68 +// private String wssAd;
  69 +
  70 +// /**
  71 +// * 辅食添加
  72 +// */
  73 +// private String assistFood;
  74 +
  75 +// /**
  76 +// * 家庭措施
  77 +// */
  78 +// private String homeMeasure;
  79 +
  80 +// /**
  81 +// * 两次随访问患病情况
  82 +// */
  83 +// private Map<String, Object> douhbqk = new HashedMap();
  84 +
  85 +// /**
  86 +// * 药物过敏史
  87 +// */
  88 +// private String drugGllergic;
  89 +
  90 +// /**
  91 +// * 脐带脱落时间
  92 +// */
  93 +// private String qdtlTime;
  94 +
  95 +// /**
  96 +// * 皮肤黄染消退时间
  97 +// */
  98 +// private String pfhrTime;
  99 +
  100 +// /**
  101 +// * 问诊其他说明
  102 +// */
  103 +// private String askOther;
  104 +// }
  105 +
  106 +
  107 +// /**
  108 +// * 母亲名称
  109 +// */
  110 +// private String mommyName;
  111 +
  112 +// /**
  113 +// * 证件号号
  114 +// */
  115 +// @NotEmpty
  116 +// private String mommyCertificateNum;
  117 +
  118 +// /**
  119 +// * 母亲联系方式
  120 +// */
  121 +// @NotEmpty
  122 +// private String mommyPhone;
  123 +
  124 +// /**
  125 +// * 儿童名称
  126 +// */
  127 +// @NotEmpty
  128 +// private String babyName;
  129 +
  130 +// /**
  131 +// * 儿童性别
  132 +// */
  133 +// private Integer babyGender;
  134 +
  135 +// /**
  136 +// * 儿童生日
  137 +// */
  138 +// private String babyBirthday;
  139 +
  140 +// /**
  141 +// * 就诊卡号
  142 +// */
  143 +// @NotEmpty
  144 +// private String vcCardNo;
littleApp_child/pages/checkupInput/checkupInput.js View file @ 8a4f765
... ... @@ -21,6 +21,7 @@
21 21 bust: "",
22 22 feedArray:["母乳喂养","混合喂养","人工喂养"],
23 23 feed: "0",
  24 + canWork:true,
24 25 },
25 26 // 下拉刷新回调接口
26 27 onPullDownRefresh() {},
27 28  
... ... @@ -31,8 +32,14 @@
31 32 toDay: toDay,
32 33 })
33 34 this.setData({
34   - hospitalId:app.globalData.userInfo.hospitalId,
  35 + hospitalId: app.globalData.userInfo.hospitalId,
  36 + pid:app.globalData.userInfo.pid,
35 37 })
  38 + if(this.data.pid == ""||this.data.pid== undefined){
  39 + this.setData({
  40 + canWork:false
  41 + });
  42 + }
36 43 this.getList();
37 44 networkUtil._get(api.checkList,
38 45 { patientId: getApp().globalData.currentId},
39 46  
40 47  
41 48  
42 49  
43 50  
... ... @@ -42,30 +49,30 @@
42 49 },
43 50 getList() {
44 51 networkUtil._post(api.getCheckUpHistory, {
45   - pid: this.data.pid,
46   - hospitalId: this.data.hospitalId,
  52 + keyword: this.data.pid,
  53 + sort: this.data.hospitalId,
47 54 }, res => {
48 55 console.log(res)
49 56 if (res.statusCode == 200 && res.data.errorcode == 0) {
50 57 var data = res.data.data;
51   - for (let o of data) {
52   - o.fhr = JSON.parse(o.fhr);
53   - }
54 58 this.setData({
55   - array: res.data.data
  59 + array: res.data.data[0].babyInfos
56 60 })
57 61 }
58 62 }, err => {
59 63  
60   - })
  64 + }, 'application/json')
61 65 },
62 66  
63 67 inputtemperature(e) {
64 68 var temperature = this.data.temperature;
65 69 var data = e.detail.value;
  70 + if (data.indexOf('.') > -1 && data.indexOf('.')<data.length-2){
  71 + data = data.slice(0, -1)
  72 + }
66 73 if (data <= 50 && data >= 0) {
67 74 this.setData({
68   - temperature: e.detail.value
  75 + temperature: data
69 76 })
70 77 }else{
71 78 this.setData({
72 79  
... ... @@ -76,9 +83,12 @@
76 83 inputheight(e) {
77 84 var height = this.data.height;
78 85 var data = e.detail.value;
  86 + if (data.indexOf('.') > -1 && data.indexOf('.') < data.length - 2) {
  87 + data = data.slice(0,-1)
  88 + }
79 89 if (data <= 200 && data >= 0) {
80 90 this.setData({
81   - height: e.detail.value
  91 + height: data
82 92 })
83 93 }else{
84 94 this.setData({
85 95  
... ... @@ -89,9 +99,12 @@
89 99 inputweight(e) {
90 100 var weight = this.data.weight;
91 101 var data = e.detail.value;
  102 + if (data.indexOf('.') > -1 && data.indexOf('.') < data.length - 2) {
  103 + data = data.slice(0, -1)
  104 + }
92 105 if (data <= 50 && data >= 0) {
93 106 this.setData({
94   - weight: e.detail.value
  107 + weight: data
95 108 })
96 109 }else{
97 110 this.setData({
98 111  
... ... @@ -102,9 +115,12 @@
102 115 inputheadWidth(e) {
103 116 var headWidth = this.data.headWidth;
104 117 var data = e.detail.value;
  118 + if (data.indexOf('.') > -1 && data.indexOf('.') < data.length - 2) {
  119 + data = data.slice(0, -1)
  120 + }
105 121 if (data <= 100 && data >= 0) {
106 122 this.setData({
107   - headWidth: e.detail.value
  123 + headWidth: data
108 124 })
109 125 }else{
110 126 this.setData({
111 127  
... ... @@ -115,9 +131,12 @@
115 131 inputbust(e) {
116 132 var bust = this.data.bust;
117 133 var data = e.detail.value;
  134 + if (data.indexOf('.') > -1 && data.indexOf('.') < data.length - 2) {
  135 + data = data.slice(0, -1)
  136 + }
118 137 if (data <= 100 && data >= 0) {
119 138 this.setData({
120   - bust: e.detail.value
  139 + bust: data
121 140 })
122 141 }else{
123 142 this.setData({
... ... @@ -131,6 +150,14 @@
131 150 })
132 151 },
133 152 toMyApport() {
  153 + if (!this.data.canWork) {
  154 + wx.showModal({
  155 + title: '提示',
  156 + content: "游客用户不能录入产检信息!",
  157 + showCancel: false,
  158 + });
  159 + return;
  160 + };
134 161 if (isRefresh) {
135 162 return;
136 163 }
... ... @@ -151,10 +178,10 @@
151 178 }, (res) => {
152 179 isRefresh = false
153 180 this.getList();
154   - wx.showToast({
155   - title: '产检信息已成功提交',
156   - icon: 'success',
157   - duration: 1000
  181 + wx.showModal({
  182 + title: '成功提交',
  183 + content: '检查信息已提交!',
  184 + showCancel: false
158 185 });
159 186 }, (err) => {
160 187 isRefresh = false
littleApp_child/pages/checkupInput/checkupInput.wxml View file @ 8a4f765
... ... @@ -6,35 +6,35 @@
6 6 <view class="section">
7 7 <text class="section__title">体温</text>
8 8 <view class="input-box">
9   - <input bindinput="inputtemperature" value="{{temperature}}" class="input" maxlength="2" type="number" />
  9 + <input bindinput="inputtemperature" value="{{temperature}}" class="input" maxlength="4" type="digit" />
10 10 <text style="vertical-align:middle"> °C</text>
11 11 </view>
12 12 </view>
13 13 <view class="section">
14 14 <text class="section__title">身高</text>
15 15 <view class="input-box">
16   - <input bindinput="inputheight" value="{{height}}" class="input" maxlength="3" type="number" />
  16 + <input bindinput="inputheight" value="{{height}}" class="input" maxlength="5" type="digit" />
17 17 <text style="vertical-align:middle"> cm</text>
18 18 </view>
19 19 </view>
20 20 <view class="section">
21 21 <text class="section__title">体重</text>
22 22 <view class="input-box">
23   - <input bindinput="inputweight" value="{{weight}}" class="input" maxlength="2" type="number" />
  23 + <input bindinput="inputweight" value="{{weight}}" class="input" maxlength="4" type="digit" />
24 24 <text style="vertical-align:middle"> kg</text>
25 25 </view>
26 26 </view>
27 27 <view class="section">
28 28 <text class="section__title">头围</text>
29 29 <view class="input-box">
30   - <input bindinput="inputheadWidth" value="{{headWidth}}" class="input" maxlength="2" type="number" />
  30 + <input bindinput="inputheadWidth" value="{{headWidth}}" class="input" maxlength="4" type="digit" />
31 31 <text style="vertical-align:middle"> cm</text>
32 32 </view>
33 33 </view>
34 34 <view class="section">
35 35 <text class="section__title">胸围</text>
36 36 <view class="input-box">
37   - <input bindinput="inputbust" value="{{bust}}" class="input" maxlength="3" type="number" />
  37 + <input bindinput="inputbust" value="{{bust}}" class="input" maxlength="5" type="digit" />
38 38 <text style="vertical-align:middle"> cm</text>
39 39 </view>
40 40 </view>
... ... @@ -78,7 +78,11 @@
78 78 </view>
79 79 <view class="line">
80 80 <text class="key">喂养方式:</text>
81   - <text class="value">{{item.feed}}</text>
  81 + <text class="value">{{
  82 + item.feed==0?"母乳喂养":
  83 + item.feed==1?"混合喂养":
  84 + item.feed==2?"人工喂养":""
  85 + }}</text>
82 86 </view>
83 87 </view>
84 88 </view>
littleApp_child/pages/home/css/AboutPage.wxss View file @ 8a4f765
... ... @@ -41,25 +41,32 @@
41 41 font: medium;
42 42 font-size: 16px;
43 43 color: white;
44   - width: 60%;
  44 + width: 40%;
45 45 height: 38px;
46 46 line-height: 38px;
47 47 border-radius: 19px;
48 48 background-color: #48C17B;
49   -
  49 + display: inline-block;
50 50 text-align: center;
51 51 /* position: fixed; */
52 52 }
53 53  
54 54 .register {
55   - margin-left: 20%;
  55 + margin-left: 5%;
56 56 margin-top: 20px;
57   - /* bottom: 20px; */
58 57 }
59   -
60 58 .login {
61   - margin-left: 20%;
  59 + margin-left: 7.5%;
62 60 margin-top: 20px;
63   - /* bottom: 78px; */
  61 +}
  62 +.checkinput{
  63 + margin-left: 7.5%;
  64 + margin-top: 10px;
  65 + margin-bottom: 20px;
  66 +}
  67 +.archives{
  68 + margin-left: 5%;
  69 + margin-top: 10px;
  70 + margin-bottom: 20px;
64 71 }
littleApp_child/pages/home/home.js View file @ 8a4f765
... ... @@ -388,6 +388,32 @@
388 388 }
389 389 })
390 390 },
  391 + connectWebIM() {
  392 + console.log('开始连接')
  393 + WebIM.conn.close()
  394 + var that = this
  395 + var options = {
  396 + apiUrl: WebIM.config.apiURL,
  397 + user: wx.getStorageSync('hxName'),
  398 + pwd: wx.getStorageSync('hxPassWord'),
  399 + accessToken: wx.getStorageSync('access_token'),
  400 + // grant_type: "password",
  401 +
  402 + success: function (res) {
  403 + console.log("conn success:", res);
  404 +
  405 + that.getRoster()
  406 + },
  407 + fail: function (e) {
  408 + console.log("fail:" + e);
  409 + },
  410 + autoReconnectNumMax: 30,
  411 + autoReconnectInterval: 1,
  412 + appKey: WebIM.config.appkey
  413 + }
  414 +
  415 + WebIM.conn.open(options)
  416 + },
391 417 requestHomeInfo() {
392 418 // 需要先请求用户信息
393 419 this.getUserInfo()
... ... @@ -503,6 +529,16 @@
503 529 toRegister() {
504 530 wx.navigateTo({
505 531 url: '../Register/Register',
  532 + })
  533 + },
  534 + toCheckInput() {
  535 + wx.navigateTo({
  536 + url: '../checkupAskInput/checkupAskInput',
  537 + })
  538 + },
  539 + toQuickArchives(){
  540 + wx.navigateTo({
  541 + url: '../quickArchives/quickArchives',
506 542 })
507 543 },
508 544 // 获取验证码
littleApp_child/pages/home/home.wxml View file @ 8a4f765
... ... @@ -172,7 +172,9 @@
172 172 </view>
173 173 </block> -->
174 174 <button class="we_button login" bindtap="toLogin">登录</button>
175   - <view class="we_button register" bindtap="toRegister">注册</view>
  175 + <button class="we_button register" bindtap="toRegister">注册</button>
  176 + <button class="we_button checkinput" bindtap="toQuickArchives">快速建档</button>
  177 + <!-- <button class="we_button archives" bindtap="toCheckInput">问诊录入</button> -->
176 178 </view>
177 179  
178 180 <!-- <view style='height:108px;'></view> -->
littleApp_child/pages/quickArchives/quickArchives.js View file @ 8a4f765
  1 +// pages/quickArchives /quickArchives .js
  2 +var networkUtil = require('../../utils/network_util.js')
  3 +var numberUtil = require('../../utils/numberUtil.js')
  4 +var api = require('../../utils/apiFile.js')
  5 +Page({
  6 +
  7 + /**
  8 + * 页面的初始数据
  9 + */
  10 + data: {
  11 + postObj: {},
  12 + sex:[
  13 + {
  14 + name:"男",
  15 + value:1,
  16 + checked:true
  17 + },
  18 + {
  19 + name:"女",
  20 + value:0,
  21 + checked:false
  22 + },
  23 + ]
  24 + },
  25 +
  26 + /**
  27 + * 生命周期函数--监听页面加载
  28 + */
  29 + onLoad: function (options) {
  30 +
  31 + },
  32 + bindKeyInput(e) {
  33 + // console.log(e)
  34 + let key = e.currentTarget.id;
  35 + let value = e.detail.value;
  36 + this.setData({
  37 + ['postObj.' + key]: value
  38 + })
  39 + },
  40 + bindDateChange(e){
  41 + let value = e.detail.value;
  42 + this.setData({
  43 + ['postObj.babyBirthday']: value
  44 + })
  45 + },
  46 +
  47 + checkForm(){
  48 + // 513901199410060022
  49 + // 513901199410060049
  50 + // 513901199410060065
  51 + // 513901199410060081
  52 + // 513901199410060006
  53 + // 513901199410060102
  54 + // 513901199410060209
  55 + // 513901199410060305
  56 + let flag = true;
  57 + var data = this.data.postObj;
  58 + var value = "";
  59 + if(!(data.mommyCertificateNum&&numberUtil.checkIdCard(data.mommyCertificateNum,'woman'))){
  60 + flag = false;
  61 + value += "身份证号 "
  62 + }
  63 + if(!(data.mommyPhone&&numberUtil.IsTelPhoneNumber(data.mommyPhone))){
  64 + flag = false;
  65 + value += "手机号 "
  66 + }
  67 + if(!data.babyBirthday){
  68 + flag = false;
  69 + value += "儿童生日 "
  70 + }
  71 + if(!data.babyName){
  72 + flag = false;
  73 + value += "儿童姓名 "
  74 + }
  75 + return {
  76 + flag:flag,
  77 + value:value
  78 + };
  79 + },
  80 + submitData(){
  81 + var key = this.checkForm();
  82 + var data = this.data.postObj;
  83 + for(let o of this.data.sex){
  84 + if(o.checked){
  85 + data.babyGender = o.value;
  86 + break;
  87 + }
  88 + }
  89 + if(key.flag){
  90 + networkUtil._post(api.interrogation, data , (res)=> {
  91 + console.log(res);
  92 + wx.showModal({
  93 + title: '成功提交',
  94 + content: "您已成功建档,可以到体重秤测量并打印相关报告!",
  95 + showCancel: false,
  96 + success: function (res) {
  97 + wx.navigateTo({
  98 + url: '../home/home',
  99 + })
  100 + }
  101 + })
  102 + }, function (res) {
  103 + console.log(res)
  104 + },'application/json')
  105 + }else{
  106 + wx.showModal({
  107 + title: '表单填写不规范',
  108 + content: "这些项目未正确填写:"+key.value,
  109 + showCancel: false,
  110 + success: function (res) {
  111 + }
  112 + })
  113 + }
  114 + },
  115 +
  116 +
  117 +
  118 +
  119 +
  120 +
  121 +
  122 +
  123 +
  124 +
  125 +
  126 +
  127 +
  128 +
  129 +
  130 +
  131 +
  132 +
  133 +
  134 +
  135 +
  136 +
  137 +
  138 +
  139 + /**
  140 + * 生命周期函数--监听页面初次渲染完成
  141 + */
  142 + onReady: function () {
  143 +
  144 + },
  145 +
  146 + /**
  147 + * 生命周期函数--监听页面显示
  148 + */
  149 + onShow: function () {
  150 +
  151 + },
  152 +
  153 + /**
  154 + * 生命周期函数--监听页面隐藏
  155 + */
  156 + onHide: function () {
  157 +
  158 + },
  159 +
  160 + /**
  161 + * 生命周期函数--监听页面卸载
  162 + */
  163 + onUnload: function () {
  164 +
  165 + },
  166 +
  167 + /**
  168 + * 页面相关事件处理函数--监听用户下拉动作
  169 + */
  170 + onPullDownRefresh: function () {
  171 +
  172 + },
  173 +
  174 + /**
  175 + * 页面上拉触底事件的处理函数
  176 + */
  177 + onReachBottom: function () {
  178 +
  179 + },
  180 +
  181 + /**
  182 + * 用户点击右上角分享
  183 + */
  184 + onShareAppMessage: function () {
  185 +
  186 + }
  187 +})
littleApp_child/pages/quickArchives/quickArchives.json View file @ 8a4f765
  1 +{
  2 + "navigationBarBackgroundColor": "#48C17B",
  3 + "navigationBarTitleText": "快速建档",
  4 + "navigationBarTextStyle": "white",
  5 + "backgroundColor": "#F4F4F4",
  6 + "enablePullDownRefresh": true
  7 + }
littleApp_child/pages/quickArchives/quickArchives.wxml View file @ 8a4f765
  1 +<view class="card">
  2 + <view class="weui-cell page-tt">快速建档</view>
  3 + <view class="weui-cells">
  4 + <view class="weui-cell">
  5 + <view class="weui-cell__hd">
  6 + <view class="weui-label line-tt">
  7 + <text style="color:red">*</text>
  8 + 母亲身份证号
  9 + </view>
  10 + </view>
  11 + <view class="weui-cell__bd">
  12 + <input bindinput="bindKeyInput" id="mommyCertificateNum" type="idcard" placeholder="输入母亲身份证号" />
  13 + </view>
  14 + </view>
  15 + <view class="weui-cell">
  16 + <view class="weui-cell__hd">
  17 + <view class="weui-label line-tt">
  18 + <text style="color:red">*</text>
  19 + 母亲手机号
  20 + </view>
  21 + </view>
  22 + <view class="weui-cell__bd">
  23 + <input bindinput="bindKeyInput" id="mommyPhone" type="number" placeholder="输入母亲手机号" />
  24 + </view>
  25 + </view>
  26 + <view class="weui-cell">
  27 + <view class="weui-cell__hd">
  28 + <view class="weui-label line-tt">
  29 + <text style="color:red">*</text>
  30 + 儿童姓名
  31 + </view>
  32 + </view>
  33 + <view class="weui-cell__bd">
  34 + <input bindinput="bindKeyInput" id="babyName" type="text" placeholder="输入儿童姓名" />
  35 + </view>
  36 + </view>
  37 + <view class="weui-cell">
  38 + <view class="weui-cell__hd">
  39 + <view class="weui-label line-tt">
  40 + <text style="color:red">*</text>
  41 + 儿童性别
  42 + </view>
  43 + </view>
  44 + <view class="weui-cell__bd">
  45 + <radio-group class="radio-group" bindchange="radioChange">
  46 + <label class="radio" wx:for="{{sex}}">
  47 + <radio value="{{item.value}}" checked="{{item.checked}}" />
  48 + {{item.name}}
  49 + </label>
  50 + </radio-group>
  51 + </view>
  52 + </view>
  53 + <view class="weui-cell">
  54 + <view class="weui-cell__hd">
  55 + <view class="weui-label line-tt">
  56 + <text style="color:red">*</text>
  57 + 儿童出生日期
  58 + </view>
  59 + </view>
  60 + <view class="weui-cell__bd">
  61 + <picker mode="date" value="{{postObj.babyBirthday}}" start="2000-01-01" end="2030-12-31" bindchange="bindDateChange">
  62 + <view class="picker-view">
  63 + <text style="color:#909090" wx:if="{{!postObj.babyBirthday}}">请选择出生日期</text>
  64 + <text wx:if="{{postObj.babyBirthday}}">{{postObj.babyBirthday}}</text>
  65 + </view>
  66 + </picker>
  67 + </view>
  68 + </view>
  69 + <view class="weui-cell">
  70 + <view class="weui-cell__hd">
  71 + <view class="weui-label line-tt">母亲姓名</view>
  72 + </view>
  73 + <view class="weui-cell__bd">
  74 + <input bindinput="bindKeyInput" id="mommyName" type="text" placeholder="输入母亲姓名" />
  75 + </view>
  76 + </view>
  77 + <view class="weui-cell">
  78 + <view class="weui-cell__hd">
  79 + <view class="weui-label line-tt">儿童就诊卡号</view>
  80 + </view>
  81 + <view class="weui-cell__bd">
  82 + <input bindinput="bindKeyInput" id="vcCardNo" type="number" placeholder="输入就诊卡号" />
  83 + </view>
  84 + </view>
  85 + </view>
  86 + <view>
  87 + <button class="we_button archives" bindtap="submitData">提交建档</button>
  88 + </view>
  89 +</view>
littleApp_child/pages/quickArchives/quickArchives.wxss View file @ 8a4f765
  1 +/* pages/quickArchives /quickArchives .wxss *//* pages/checkupAskInput/checkupAskInput.wxss */
  2 +.weui-cells{
  3 + padding-right:15px;
  4 +}
  5 +.weui-cell{
  6 + padding: 10px 0 10px 10px;
  7 +}
  8 +.page-tt{
  9 + font-size: 18px;
  10 +}
  11 +.weui-cells{
  12 + margin-top:0;
  13 +}
  14 +.weui-cell__ft{
  15 + font-size: 14px;
  16 + color: #333;
  17 +}
  18 +.weui-label{
  19 + display: block;
  20 +}
  21 +.line-tt{
  22 + padding-left: 5px;
  23 + color: #505050;
  24 + font-size: 14px;
  25 +}
  26 +.select-placeholder{
  27 + color: #c0c0c0;
  28 + font-size: 14px;
  29 +}
  30 +.we_button {
  31 + margin-top:20px;
  32 + font: medium;
  33 + font-size: 16px;
  34 + color: white;
  35 + width: 60%;
  36 + margin-left:20%;
  37 + height: 38px;
  38 + line-height: 38px;
  39 + border-radius: 19px;
  40 + background-color: #48C17B;
  41 + display: inline-block;
  42 + text-align: center;
  43 + /* position: fixed; */
  44 +}
  45 +.picker-view{
  46 + font-size: 14px;
  47 +}
  48 +.radio-group{
  49 + font-size: 14px;
  50 +}
  51 +.radio{
  52 + width: 90px;
  53 + display: inline-block;
  54 +}
  55 +radio{
  56 + transform:scale(0.8);
  57 +}
littleApp_child/utils/apiFile.js View file @ 8a4f765
1 1 module.exports = {
2 2 getOpenId: 'wx/getOpenId',
3 3 /*------建档------*/
4   -
  4 + // 快捷建档
  5 + interrogation:"/interrogation/build/upload",
5 6 // 校验验证码并且绑定建档
6 7 verifyCode: 'baby/vercode',
7 8 // 获取验证码
8 9  
... ... @@ -63,8 +64,8 @@
63 64 //高危指导
64 65 babyPrecise:'/baby/precise',
65 66 // 填写检查字段
66   - setCheckUp:"babyMeasureInfo/saveOrUpdate",
  67 + setCheckUp:"baby/wx/babyMeasureInfo/saveOrUpdate",
67 68 // get检查字段list
68   - getCheckUpHistory:"babyMeasureInfo/list"
  69 + getCheckUpHistory:"baby/wx/babyMeasureInfo/list"
69 70 }
littleApp_child/utils/network_util.js View file @ 8a4f765
... ... @@ -78,7 +78,7 @@
78 78 },
79 79 complete: function () {
80 80 // complete
81   - // wx.hideToast()
  81 + wx.hideToast()
82 82 // 小程序提供的api,通知页面停止下拉刷新效果
83 83 wx.stopPullDownRefresh;
84 84 }
littleApp_child/utils/numberUtil.js View file @ 8a4f765
... ... @@ -234,7 +234,7 @@
234 234  
235 235 /**
236 236 * 检查身份证合法
237   - * @param str_idCard sex为human man
  237 + * @param str_idCard sex为wuman man
238 238 * @returns {boolean}
239 239 */
240 240 function checkIdCard(str_idCard, sex) {
... ... @@ -329,7 +329,7 @@
329 329  
330 330 /**
331 331 * 检查身份证合法
332   - * @param str_idCard sex为human man
  332 + * @param str_idCard sex为wuman man
333 333 * @returns {boolean}
334 334 */
335 335 function checkIdCard(str_idCard, sex) {