zhangyanfang 4 سال پیش
والد
کامیت
aea89d0b7d
2فایلهای تغییر یافته به همراه20 افزوده شده و 14 حذف شده
  1. 2 2
      html/payment/html/patientIDCards.html
  2. 18 12
      html/payment/js/patientIDCards.js

+ 2 - 2
html/payment/html/patientIDCards.html

@ -40,8 +40,8 @@
					</div>	
					<div class="geduan"></div>
					<div class="pt5 pb10 c-t-center">
						<span v-if="item.isDefault==1" class="c-4dcd70"><img src="../images/xuanzhemoren_btn.png" width="22" class="mr5"/>默认</span>
						<span v-else class="c-c8c8c8" v-on:click.stop="setDefault(item.id,1)"><img src="../images/quxiaomoren_btn.png" width="22" class="mr5"/>设为默认</span>
						<span v-if="item.isDefault==1" v-on:click.stop="setDefault(item.id,0,'是否取消默认')" class="c-4dcd70"><img src="../images/xuanzhemoren_btn.png" width="22" class="mr5"/>默认</span>
						<span v-else class="c-4dcd70" v-on:click.stop="setDefault(item.id,1,'是否设置为默认')"><img src="../images/quxiaomoren_btn.png" width="22" class="mr5"/>设为默认</span>
					</div>
				</div>
			</div>

+ 18 - 12
html/payment/js/patientIDCards.js

@ -52,24 +52,30 @@ var checktype=false;
			    })
			},
			//设置默认就诊卡
			setDefault:function(id,isDefault){
			setDefault:function(id,isDefault,str){
				var vm=this				
				var loading = dialog({
					contentType: 'load',
					skin: 'bk-popup',
					content:'设置中...'
				});
				loading.showModal()
				sendPost("/patient/card/defaultOpe", {id:id,isDefault:isDefault}, "json", "post",function(){
		          }, function(res){
		          	loading.close()
	                if(res.status == 200){
	                  dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:res.msg}).show();
					  vm.getData()
	                }else{
	                  dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
	                }
	            })				
				dialog({
					content: str, cancelValue: '否', okValue: '是', 
					cancel: function () { }, 
					ok: function () {
						loading.showModal()
						sendPost("/patient/card/defaultOpe", { id: id, isDefault: isDefault }, "json", "post", function () {
						}, function (res) {
							loading.close()
							if (res.status == 200) {
								dialog({ contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg }).show();
								vm.getData()
							} else {
								dialog({ contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '数据获取失败' }).show();
							}
						})
					},
				}).showModal();
			},
			initBtnScroll: function () {
				var vm=this