Browse Source

表单修改

zhangyanfang 5 years ago
parent
commit
b9359544b2
1 changed files with 21 additions and 15 deletions
  1. 21 15
      app/followup/index.html

+ 21 - 15
app/followup/index.html

@ -31,27 +31,27 @@
        if (Request.type == '5' || Request.type == '6') {
            fangshiAPI.getPostpartumVisitDetails({ followupId: followupId || '3' }).then(function (res) {
                if (res.status == 200) {
                     version1=res.data?res.data.version:''
                     bindEvent()
                    version1 = res.data ? res.data.version : ''
                    bindEvent()
                } else {
                    top.toastr.error(res.msg);
                }
            })
            fangshiAPI.getNewbornFamilyVisitRecord({ followupId: followupId || '2' }).then(function (res) {
                if (res.status == 200) {
                    version2=res.data?res.data.version:''
                    version2 = res.data ? res.data.version : ''
                    bindEvent()
                } else {
                    top.toastr.error(res.msg);
                }
            })
        }
        function bindEvent(){
            if(isAdd==1){
                version=lastedVersion
        function bindEvent() {
            if (isAdd == 1) {
                version = lastedVersion
                location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
            }else{
                version=version1||version2
            } else {
                version = version1 || version2
                location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
            }
        }
@ -77,17 +77,23 @@
        } if (Request.type == '9') {
            fangshiAPI.getPhthisisFirstCheckRecord({ followupId: followupId }).then(function (res) {
                if (res.status == 200) {
                    if (isAdd == '1') {//第一次肺结核
                        version = lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
                    } else {
                        version = res.data.version
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
                    }
                    version = isAdd!=1? res.data.version : lastedVersion
                    location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
                } else {
                    top.toastr.error(res.msg);
                }
            })
        } if (Request.type == '10') {
            fangshiAPI.getPhthisis({ followupId: followupId || '1' }).then(function (res) {
                if (res.status == 200 && res.data[0]) {
                    version = isAdd!=1 ? res.data.version : lastedVersion
                    location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
                } else {
                    top.toastr.error(res.msg);
                }
            })
        }
    </script>
</body>