12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- Vue.component('treatment-patient', {
- template: '<div><div class="c-f16 c-border-b pb5">就诊人信息</div>\
- <table class="table table-no-bordered">\
- <tbody>\
- <tr>\
- <td class="w150">就诊居民</td>\
- <td>{{appointinfo.name}}</td>\
- </tr>\
- <tr>\
- <td class="w150">身份证号</td>\
- <td>{{handleIdcard(appointinfo.idcard)}}</td>\
- </tr>\
- <tr>\
- <td class="w150">社保卡号</td>\
- <td >{{appointinfo.ssc}}</td>\
- </tr>\
- <tr>\
- <td class="w150">手机号码</td>\
- <td >{{appointinfo.phone}}</td>\
- </tr>\
- </tbody>\
- </table>\
- <div class="c-t-center">\
- <button @click="remove" type="button" class="btn btn-w-m btn-ff3b30 mr15" v-show="appointinfo.status != 0">取消挂号</button>\
- <button @click="goBack" type="button" class="btn btn-w-m btn-fff">返回</button>\
- </div>\
- </div>',
- props: ["appointinfo"],
- data: function() {
- return {
- editable: false
- }
- },
- mounted: function() {
-
- },
- methods: {
- remove: function() {
- var vm = this
- var layerid = top.layer.confirm('请与居民确认:<br>一个月内连续取消预约三次,系统会自动将居民年列入黑名单,三个月后才 可再次预约。', {
- title: '取消预约',
- closeBtn: true,
- btn: ['确定','取消'] //按钮
- }, function(){
-
- var loadingid = top.layer.load(1, {
- shade: [0.1,'#fff'] //0.1透明度的白色背景
- });
- APIService.cancelOrder(param).then(function(res) {
- top.layer.close(loadingid)
- if(res.status == 200) {
- top.layer.close(layerid)
- top.showSuccessMessage("取消预约成功!")
- closeLayer()
- EventBus.$emit('appointment-search',{
- data: kwObj
- })
- } else {
- top.showErrorMessage(res.msg || "取消预约失败!")
- }
- }).catch(function(e) {
- top.layer.close(loadingid)
- console && console.error(e)
- })
- }, function(){
-
- });
- },
- goBack: function() {
- var layerid = parent.layer.getFrameIndex(window.name)
- parent.layer.close(layerid)
- },
- handleIdcard: function(str) {
- var len = str.length
- if (len == 18) {
- return str.substr(0, 4) + '**********' + str.substr(14, 4)
- } else if (len == 15) {
- return str.substr(0, 4) + '*******' + str.substr(11, 4)
- }
- }
- }
- })
|