buli
2023-07-14 5b5c1e16deaa3a9d6d0ed1ffca390655ed103df7
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js
@@ -34,8 +34,48 @@
            else {
                //component.set('v.errorMessage', 'doinit failed.');
                this.error('doinit failed.');
                this.showErrorToast(component);
                //this.showErrorToast(component);
                component.set('v.login', false);
            }
        });
        $A.enqueueAction(action);
    },
    doinitSave: function (component, event, helper) {
        document.title = "追溯日报";
        component.set('v.loginEdit', true);
        this.report_date_list(component, event, helper, 5);
        var action = component.get('c.getalldata');
        action.setCallback(this, function (response) {
            var state = response.getState();
            if (state == 'SUCCESS') {
                var res = response.getReturnValue();
                component.set('v.alldata', res.reports);
                component.set('v.fieldsmap', res.fieldsMap);
                component.set('v.allselectlist', res.allselectlist);
                component.set('v.doclist', res.doclist);
                //fy
                var xx = res.UserProType;
                component.set('v.UserProType', res.UserProType);
                var gg = component.get('v.UserProType');
                //fy
                component.find('select_agency_person').set('v.options', this.conv_selected(res.allselectlist.AgencyPerson__c));
                component.find('select_DealerPersonnel').set('v.options', this.conv_selected(res.allselectlist.DealerPersonnel__c));
                component.find('select_purpose_type').set('v.options', this.conv_selected(res.allselectlist.WorkRecord__c));
                component.find('select_ProductClassification').set('v.options', this.conv_selected(res.allselectlist.ProductClassification__c));
                component.find('select_stageName').set('v.options', this.conv_selected(res.allselectlist.StageName__c));
                component.set('v.selected_agency_person', res.allselectlist.AgencyPerson__c[0].label);
                component.set('v.dialog_type', '新建');
                this.get_reports(component, event, helper, component.find('select_date').get('v.value'), component.find('select_agency_person').get('v.value'));
                component.set('v.PIConfig', res.PIConfig);// 20220222 PI改造 by Bright
                component.set('v.loginEdit', false);
            }
            else {
                //component.set('v.errorMessage', 'doinit failed.');
                this.error('doinit failed.');
                //this.showErrorToast(component);
                component.set('v.loginEdit', false);
            }
        });
        $A.enqueueAction(action);
@@ -76,7 +116,7 @@
            "date_str": date_str,
            "person_str": person_str,
        });
        component.set('v.login', true);
        component.set('v.loginEdit', true);
        action.setCallback(this, function (response) {
            
            var state = response.getState();
@@ -145,23 +185,23 @@
                                    component.set('v.report_count', res.reports.length);
                                }
                                //fy 20220414 end
                                component.set('v.login', false);
                                component.set('v.loginEdit', false);
                            }, staticResourceAgencyContact.token);
                        } else {
                            component.set('v.login', false);
                            component.set('v.loginEdit', false);
                        }
                    }
                } else {
                    component.set('v.list_message', 'no_data');
                    component.set('v.login', false);
                    component.set('v.loginEdit', false);
                }
            }
            else {
                //component.set('v.errorMessage', 'get_reports failed.');
                this.error('get_reports failed.');
                this.showErrorToast(component);
                component.set('v.login', false);
                //this.showErrorToast(component);
                component.set('v.loginEdit', false);
            }
        });
        $A.enqueueAction(action);
@@ -845,8 +885,9 @@
    },
    //编辑按钮
    edit_button: function (component, event, helper) {
        //component.set('v.loginEdit', true);
        component.set('v.login', true);
        debugger
        //component.set('v.loginEdit', true);
        this.allclear(component);
        //component.set('v.loadOpp', true);
        var index = event.getSource().get('v.value');
@@ -866,6 +907,7 @@
        var ret = this.create_report_header_edit(component, event, helper, name, select_agency, select_date);
        // SWAG-CF58C3 fy start
        this.set_aws_url(component, 'Agency_Contact__c')
        //component.set('v.login', false);
        // SWAG-CF58C3 fy end
    },
    //保存
@@ -1004,16 +1046,21 @@
        // if (!productCategories__c) { error.push("其他品牌产品类别 不存在"); }
        //let errorMsg = '';
        for (var i = 0; i < error.length; i++) {
            component.set('v.errorMessage', error[i]);
            this.showErrorToast(component);
            //errorMsg +=  '; ' + error[i]
            //this.error(error[i]);
        }
        // if(errorMsg != '')
        //     this.error(errorMsg.substring(1));
        if (error.length > 0) {
            component.find('save_button').set('v.disabled', false);
            return false;
        }
        // 保存処理
        component.set('v.login', true);
        component.set('v.loginEdit', true);
        if (component.get('v.mode') == 'edit') {
            var Agency_Report__c = component.get('v.select_report_data').Id;
            var action = component.get('c.editAgencyReport');
@@ -1047,6 +1094,7 @@
            action.setCallback(this, function (response) {
                var state = response.getState();
                if (state == 'SUCCESS') {
                    debugger
                    component.set('v.successMessage', '编辑保存成功');
                    this.showSuccessToast(component);
                    var report_id = response.getReturnValue();
@@ -1063,14 +1111,14 @@
                    component.set('v.update_select_report_data_id', report_id);
                    this.get_reports(component, event, helper, component.get('v.select_report_data').Submit_date__c, component.get('v.select_report_data').Person_In_Charge2__c);
                    component.find('save_button').set('v.disabled', false);
                    component.set('v.login', false);
                    component.set('v.loginEdit', false);
                }
                else {
                    //component.set('v.errorMessage', 'save_report failed.');
                    this.error('save_report failed.');
                    this.showErrorToast(component);
                    this.error('保存日报失败');
                    //this.showErrorToast(component);
                    component.find('save_button').set('v.disabled', false);
                    component.set('v.login', false);
                    component.set('v.loginEdit', false);
                }
            });
            $A.enqueueAction(action);
@@ -1141,25 +1189,26 @@
                        else {
                            // component.set('v.errorMessage', 'get_reports_now failed.');
                            this.error('get_reports_now failed.');
                            this.showErrorToast(component);
                            //this.showErrorToast(component);
                            component.find('save_button').set('v.disabled', false);
                            component.set('v.login', false);
                            component.set('v.loginEdit', false);
                        }
                    });
                    $A.enqueueAction(action2);
                    this.allclear(component);
                    component.find('select_WorkMark').set('v.value', false);
                    component.find('save_button').set('v.disabled', false);
                    component.set('v.login', false);
                    this.doinit(component, event, helper);
                    component.set('v.loginEdit', false);
                    debugger
                    this.doinitSave(component, event, helper);
                }
                else {
                    var error = response.getError();
                    //component.set('v.errorMessage', '保存日报失败');
                    this.error('保存日报失败');
                    this.showErrorToast(component);
                    //this.showErrorToast(component);
                    component.find('save_button').set('v.disabled', false);
                    component.set('v.login', false);
                    component.set('v.loginEdit', false);
                }
            });
            $A.enqueueAction(action);
@@ -1241,7 +1290,7 @@
        if (s_date == false) {
            //component.set('v.errorMessage', 'get_date_string failed.');
            this.error('get_date_string failed.');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            return false;
        }
        var head_key = this.create_header_input_key(s_agency, s_date);
@@ -1249,7 +1298,7 @@
        if (head_key == false) {
            //component.set('v.errorMessage', 'create_header_input_key failed.');
            this.error('create_header_input_key failed.');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            return false;
        }
        var key2 = s_date.replace(/-/g, '');
@@ -1272,19 +1321,19 @@
            else {
                //component.set('v.errorMessage', 'createReportHeader callback failed.');
                this.error('createReportHeader callback failed.');
                this.showErrorToast(component);
                //this.showErrorToast(component);
                component.set('v.login', false);
            }
        });
        $A.enqueueAction(action);
    },
    create_report_header_edit: function (component, event, helper, name, s_agency, s_date) {
        component.set('v.login',true);
        s_date = this.get_date_string(s_date);
        if (s_date == false) {
            //component.set('v.errorMessage', 'get_date_string failed.');
            this.error('get_date_string failed.');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            return false;
        }
        var head_key = this.create_header_input_key(s_agency, s_date);
@@ -1292,31 +1341,32 @@
        if (head_key == false) {
            //component.set('v.errorMessage', 'create_header_input_key failed.');
            this.error('create_header_input_key failed.');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            return false;
        }
        var key2 = s_date.replace(/-/g, '');
        var action = component.get('c.createReportHeader');
        action.setParams({
            "name": name,
            "s_date": s_date,
            "s_agency": s_agency,
            "head_key": head_key,
        });
        component.set('v.loginEdit', true);
        component.set('v.login',true);
        action.setCallback(this, function (response) {
            var state = response.getState();
            if (state == 'SUCCESS') {
                var res = response.getReturnValue();
                component.set('v.agency_report_header_id', res);
                component.set('v.loginEdit', false);
                component.set('v.login', false);
                this.toggle_report_edit(component, event, helper);
            }
            else {
                //component.set('v.errorMessage', 'createReportHeader callback failed.');
                this.error('createReportHeader callback failed.');
                this.showErrorToast(component);
                component.set('v.loginEdit', false);
                //this.showErrorToast(component);
                component.set('v.login', false);
            }
        });
        $A.enqueueAction(action);
@@ -1327,7 +1377,7 @@
            if (s_date == false) {
                //component.set('v.errorMessage', 'get_date_string in create_header_input_key.');
                this.error('get_date_string in create_header_input_key.');
                this.showErrorToast(component);
                //this.showErrorToast(component);
                return false;
            }
        }
@@ -1442,7 +1492,7 @@
        component.set("v.hospitalId", accid);
        
        component.set('v.setdoctorlisthos', true);
        this.set_doctor_list(component, event, helper);
        this.set_doctor_list_edit(component, event, helper);
    },
@@ -1505,7 +1555,7 @@
        } else {
            //component.set('v.errorMessage', '不能选择同样的产品');
            this.error('不能选择同样的产品');
            this.showErrorToast(component);
            //this.showErrorToast(component);
        }
    },
    //模糊查询使用产品2
@@ -1566,7 +1616,7 @@
        } else {
            //component.set('v.errorMessage', '不能选择同样的产品');
            this.error('不能选择同样的产品');
            this.showErrorToast(component);
            //this.showErrorToast(component);
        }
    },
@@ -1628,7 +1678,7 @@
        } else {
            //component.set('v.errorMessage', '不能选择同样的产品');
            this.error('不能选择同样的产品');
            this.showErrorToast(component);
            //this.showErrorToast(component);
        }
    },
@@ -1674,7 +1724,7 @@
            else {
                // component.set('v.errorMessage', 'AWS url/token error.');
                this.error('AWS url/token error.');
                this.showErrorToast(component);
                //this.showErrorToast(component);
                component.set('v.login', false);
                component.set('v.loginEdit', false);
            }
@@ -1750,19 +1800,19 @@
                } else if (acMap.errormsg != '') {
                    // component.set('v.errorMessage', acMap.errormsg);
                    this.error(acMap.errormsg);
                    this.showErrorToast(component);
                    //this.showErrorToast(component);
                    component.set('v.login', false);
                } else {
                    //component.set('v.errorMessage', 'agency contact insert id error.');
                    this.error('agency contact insert id error.');
                    this.showErrorToast(component);
                    //this.showErrorToast(component);
                    component.set('v.login', false);
                }
            }
            else {
                //component.set('v.errorMessage', 'agency contact insert error.');
                this.error('agency contact insert error.');
                this.showErrorToast(component);
                //this.showErrorToast(component);
                component.set('v.login', false);
            }
        });
@@ -1792,155 +1842,24 @@
                $A.util.addClass(modal_newAC, 'disp_none');
                component.set('v.successMessage', '.拜访人已创建。');
                this.showSuccessToast(component);
                this.set_doctor_list(component);
                component.set('v.login', false);
                this.set_doctor_list_edit(component);
            } else {
                //component.set('v.errorMessage', 'AWS confirm error.');
                this.error('AWS confirm error.');
                this.showErrorToast(component);
                //this.showErrorToast(component);
                component.set('v.login', false);
            }
        }).catch(error => {
            // component.set('v.errorMessage', 'AWS confirm error.');
            this.error('AWS confirm error.');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            component.set('v.login', false);
        });
    },
    //SWAG-CF58C3 fy end 调用pi
    set_doctor_list: function (component) {
        console.log('set_doctor_list')
        var doctor_value = component.find('select_purpose_type').get('v.value');
        var hospital_id = component.get('v.hospitalLinkId');
        console.log('hospital_id = ' + hospital_id);
        if (hospital_id) {
            if (doctor_value == '科室会') {
                component.set('v.login', true);
                this.set_doctor_list2(component);
            } else {
                component.set('v.login', true);
                var action = component.get('c.getDoctorList');
                action.setParams({
                    "hospital_id": hospital_id,
                });
                action.setCallback(this, function (response) {
                    var state = response.getState();
                    if (state == 'SUCCESS') {
                        ;
                        var res = this.conv_selected(response.getReturnValue());
                        //fy
                        var setdoctorlisthos = component.get('v.setdoctorlisthos');
                        if (setdoctorlisthos) {
                            component.set('v.default_select_doctor_id', '');
                            component.set('v.setdoctorlisthos', false);
                        }
                        //fy
                        var default_doctor = component.get('v.default_select_doctor_id');
                        if (default_doctor != '' && res.length > 0) {
                            var doctor_title = '';
                            let awsids = [];
                            for (var i = 0; i < res.length; i++) {
                                if (res[i].value == default_doctor) {
                                    res[i].selected = true;
                                    doctor_title = res[i].Doctor_Division1__c;
                                } else {
                                    res[i].selected = false;
                                }
                                if (res[i].AWS_Data_Id__c) {
                                    awsids.push(res[i].AWS_Data_Id__c);
                                }
                            }
                            component.find('select_doctor').set('v.options', res);
                            component.set('v.doctor_title', doctor_title);
                            console.log('awsids = ' + JSON.stringify(awsids))
                            if (awsids.length > 0) {
                                let PIConfig = component.get('v.PIConfig');
                                let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact);
                                AWSService.search(staticResourceAgencyContact.searchUrl, {
                                    dataIds: awsids
                                }, function (data) {
                                    console.log('data = ' + JSON.stringify(data))
                                    if (data && data.object && data.object.length) {
                                        let m = {};
                                        for (let di in data.object) {
                                            if (data.object[di] && data.object[di].dataId) {
                                                m[data.object[di].dataId] = data.object[di];
                                            }
                                        }
                                        for (let ri in res) {
                                            if (res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)) {
                                                res[ri].label = m[res[ri].AWS_Data_Id__c].name;
                                            }
                                        }
                                        component.find('select_doctor').set('v.options', res);
                                    }
                                    component.set('v.login', false);
                                }, staticResourceAgencyContact.token);
                            }
                        } else {
                            let awsids = [];
                            for (var i = 0; i < res.length; i++) {
                                if (res[i].AWS_Data_Id__c) {
                                    awsids.push(res[i].AWS_Data_Id__c);
                                }
                            }
                            component.find('select_doctor').set('v.options', res);
                            if (awsids.length > 0) {
                                let PIConfig = component.get('v.PIConfig');
                                let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact);
                                AWSService.search(staticResourceAgencyContact.searchUrl, {
                                    dataIds: awsids
                                }, function (data) {
                                    if (data && data.object && data.object.length) {
                                        let m = {};
                                        for (let di in data.object) {
                                            if (data.object[di] && data.object[di].dataId) {
                                                m[data.object[di].dataId] = data.object[di];
                                            }
                                        }
                                        for (let ri in res) {
                                            if (res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)) {
                                                res[ri].label = m[res[ri].AWS_Data_Id__c].name;
                                            }
                                        }
                                        component.find('select_doctor').set('v.options', res);
                                    }
                                    component.set('v.login', false);
                                }, staticResourceAgencyContact.token);
                            }
                            // component.find('select_doctor').set('v.options', res);
                            if (res.length > 0) {
                                component.set('v.doctor_title', res[0].Doctor_Division1__c);
                            }
                        }
                        // component.set('v.default_select_doctor_id', '');
                        component.set('v.doctor_list', res);
                        component.set('v.login', false);
                    }
                    else {
                        // component.set('v.errorMessage', 'set_doctor_list failed.');
                        this.error('set_doctor_list failed.');
                        this.showErrorToast(component);
                        component.set('v.login', false);
                    }
                });
                $A.enqueueAction(action);
            }
        } else {
            if (doctor_value == '科室会') {
                this.set_doctor_list2(component);
            } else {
                component.find('select_doctor').set('v.options', '');
            }
        }
    },//fy 20220414
    set_doctor_list_edit: function (component) {
        console.log('set_doctor_list')
        var doctor_value = component.find('select_purpose_type').get('v.value');
        var hospital_id = component.get('v.hospitalLinkId');
@@ -2057,7 +1976,139 @@
                    else {
                        // component.set('v.errorMessage', 'set_doctor_list failed.');
                        this.error('set_doctor_list failed.');
                        this.showErrorToast(component);
                        //this.showErrorToast(component);
                        component.set('v.loginEdit', false);
                    }
                });
                $A.enqueueAction(action);
            }
        } else {
            if (doctor_value == '科室会') {
                this.set_doctor_list2(component);
            } else {
                component.find('select_doctor').set('v.options', '');
            }
        }
        component.set('v.loginEdit', false);
    },//fy 20220414
    set_doctor_list_edit: function (component) {
        console.log('set_doctor_list')
        var doctor_value = component.find('select_purpose_type').get('v.value');
        var hospital_id = component.get('v.hospitalLinkId');
        console.log('hospital_id = ' + hospital_id);
        if (hospital_id) {
            if (doctor_value == '科室会') {
                component.set('v.loginEdit', true);
                this.set_doctor_list2(component);
            } else {
                component.set('v.loginEdit', true);
                var action = component.get('c.getDoctorList');
                action.setParams({
                    "hospital_id": hospital_id,
                });
                action.setCallback(this, function (response) {
                    var state = response.getState();
                    if (state == 'SUCCESS') {
                        var res = this.conv_selected(response.getReturnValue());
                        //fy
                        var setdoctorlisthos = component.get('v.setdoctorlisthos');
                        if (setdoctorlisthos) {
                            component.set('v.default_select_doctor_id', '');
                            component.set('v.setdoctorlisthos', false);
                        }
                        //fy
                        var default_doctor = component.get('v.default_select_doctor_id');
                        if (default_doctor != '' && res.length > 0) {
                            var doctor_title = '';
                            let awsids = [];
                            for (var i = 0; i < res.length; i++) {
                                if (res[i].value == default_doctor) {
                                    res[i].selected = true;
                                    doctor_title = res[i].Doctor_Division1__c;
                                } else {
                                    res[i].selected = false;
                                }
                                if (res[i].AWS_Data_Id__c) {
                                    awsids.push(res[i].AWS_Data_Id__c);
                                }
                            }
                            component.find('select_doctor').set('v.options', res);
                            component.set('v.doctor_title', doctor_title);
                            console.log('awsids = ' + JSON.stringify(awsids))
                            if (awsids.length > 0) {
                                let PIConfig = component.get('v.PIConfig');
                                let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact);
                                AWSService.search(staticResourceAgencyContact.searchUrl, {
                                    dataIds: awsids
                                }, function (data) {
                                    console.log('data = ' + JSON.stringify(data))
                                    if (data && data.object && data.object.length) {
                                        let m = {};
                                        for (let di in data.object) {
                                            if (data.object[di] && data.object[di].dataId) {
                                                m[data.object[di].dataId] = data.object[di];
                                            }
                                        }
                                        for (let ri in res) {
                                            if (res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)) {
                                                res[ri].label = m[res[ri].AWS_Data_Id__c].name;
                                            }
                                        }
                                        component.find('select_doctor').set('v.options', res);
                                    }
                                    component.set('v.loginEdit', false);
                                }, staticResourceAgencyContact.token);
                            }
                        } else {
                            let awsids = [];
                            for (var i = 0; i < res.length; i++) {
                                if (res[i].AWS_Data_Id__c) {
                                    awsids.push(res[i].AWS_Data_Id__c);
                                }
                            }
                            component.find('select_doctor').set('v.options', res);
                            if (awsids.length > 0) {
                                let PIConfig = component.get('v.PIConfig');
                                let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact);
                                AWSService.search(staticResourceAgencyContact.searchUrl, {
                                    dataIds: awsids
                                }, function (data) {
                                    if (data && data.object && data.object.length) {
                                        let m = {};
                                        for (let di in data.object) {
                                            if (data.object[di] && data.object[di].dataId) {
                                                m[data.object[di].dataId] = data.object[di];
                                            }
                                        }
                                        for (let ri in res) {
                                            if (res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)) {
                                                res[ri].label = m[res[ri].AWS_Data_Id__c].name;
                                            }
                                        }
                                        component.find('select_doctor').set('v.options', res);
                                    }
                                    component.set('v.loginEdit', false);
                                }, staticResourceAgencyContact.token);
                            }
                            // component.find('select_doctor').set('v.options', res);
                            if (res.length > 0) {
                                component.set('v.doctor_title', res[0].Doctor_Division1__c);
                            }
                        }
                        // component.set('v.default_select_doctor_id', '');
                        component.set('v.doctor_list', res);
                        component.set('v.loginEdit', false);
                    }
                    else {
                        // component.set('v.errorMessage', 'set_doctor_list failed.');
                        this.error('set_doctor_list failed.');
                        //this.showErrorToast(component);
                        component.set('v.loginEdit', false);
                    }
                });
@@ -2106,7 +2157,7 @@
        if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
            //component.set('v.errorMessage', '不能选择同样的产品区分');
            this.error('不能选择同样的产品区分');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            component.find('select_Product1').set('v.value', '');
        }
    },
@@ -2120,7 +2171,7 @@
        if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
            //component.set('v.errorMessage', '不能选择同样的产品区分');
            this.error('不能选择同样的产品区分');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            component.set('v.UseProduct2_TEXT', '');
        }
    },
@@ -2134,7 +2185,7 @@
        if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) {
            //component.set('v.errorMessage', '不能选择同样的产品区分');
            this.error('不能选择同样的产品区分');
            this.showErrorToast(component);
            //this.showErrorToast(component);
            component.find('select_Product3').set('v.value', '');
        }
    },
@@ -2237,7 +2288,7 @@
        $A.util.addClass(modal_newAC, 'disp_none');
        component.set('v.successMessage', '.拜访人已创建。');
        this.showSuccessToast(component);
        this.set_doctor_list(component, event, helper);
        this.set_doctor_list_edit(component, event, helper);
    },
    createCancel: function (component, event, helper) {
        component.set('v.truthy', false);
@@ -2360,7 +2411,7 @@
            else {
                //component.set('v.errorMessage', 'AWS url/token error.');
                this.error('AWS url/token error.');
                this.showErrorToast01(component);
                //this.showErrorToast01(component);
                component.set('v.login', false);
            }
        });
@@ -2385,7 +2436,7 @@
            console.log('AWS search error = ' + JSON.stringify(error));
            // component.set('v.errorMessage', 'AWS search error.');
            this.error('AWS search error.');
            this.showErrorToast01(component);
            //this.showErrorToast01(component);
            component.set('v.login', false);
        });
    },
@@ -2436,14 +2487,14 @@
                                    } else {
                                        //component.set('v.errorMessage', 'AWS 查询数据为空 ');
                                        this.error('AWS 查询数据为空 ');
                                        this.showErrorToast01(component);
                                        //this.showErrorToast01(component);
                                        //component.set('v.login', false);
                                        component.set('v.modal_import_spinner', false);
                                    }
                                } else {
                                    //component.set('v.errorMessage', 'AWS search status : ' + result.status);
                                    this.error('AWS search status : ' + result.status);
                                    this.showErrorToast01(component);
                                    //this.showErrorToast01(component);
                                    //component.set('v.login', false);
                                    component.set('v.modal_import_spinner', false);
                                }
@@ -2452,7 +2503,7 @@
                    } else {
                        //component.set('v.errorMessage', valur[1] + '\n' + "请修改后重新上传");
                        this.error(valur[1] + '\n' + "请修改后重新上传");
                        this.showErrorToast01(component);
                        //this.showErrorToast01(component);
                        //component.set('v.login', false);
                        component.set('v.modal_import_spinner', false);
                    }
@@ -2655,7 +2706,7 @@
            console.log('error = ' + error);
            //component.set('v.errorMessage', error);
            this.error(error);
            this.showErrorToast01(component);
            //this.showErrorToast01(component);
            console.log('error=' + error);
            //component.set('v.login', false);
            component.set('v.modal_import_spinner', false);
@@ -2749,7 +2800,7 @@
                    console.log("==" + res1);
                    //component.set('v.errorMessage', res1 + "请修改后重新上传");
                    this.error(res1 + "请修改后重新上传");
                    this.showErrorToast01(component);
                    //this.showErrorToast01(component);
                    //component.set('v.login', false);
                    component.set('v.modal_import_spinner', false);
                } else {
@@ -2852,7 +2903,12 @@
        var content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">";
        content += "<thead><tr class=\"slds-text-title--caps\">";
        for (i = 0; i < headers.length; i++) {
            content += '<th scope=\"col"\>' + headers[i] + '</th>';
            //content += '<th scope=\"col"\ style=\"width:200px">' + headers[i] + '</th>';
            if (headers[i] == '产品1同类耗材科室月使用量') {
                content += '<th scope=\"col"\ style=\"width:250px"\>' + headers[i] + '</th>';
            } else {
                content += '<th scope=\"col"\ style=\"width:200px"\>' + headers[i] + '</th>';
            }
        }
        content += "</tr></thead>";
        for (var i = 0; i < objectRecords.length; i++) {
@@ -3044,7 +3100,7 @@
                else {
                    //component.set('v.errorMessage', 'newlyBuild failed.');
                    this.error('newlyBuild failed.');
                    this.showErrorToast(component);
                    //this.showErrorToast(component);
                    component.set('v.login', false);
                }
            });
@@ -3061,12 +3117,12 @@
                } else {
                    //component.set('v.errorMessage', '产品1同类耗材科室月使用量必须输入数字!');
                    this.error('产品1同类耗材科室月使用量必须输入数字!');
                    this.showErrorToast(component);
                    //this.showErrorToast(component);
                }
            } else {
                //component.set('v.errorMessage', '产品1同类耗材科室月使用量最多输入14位数字!');
                this.error('产品1同类耗材科室月使用量最多输入14位数字!');
                this.showErrorToast(component);
                //this.showErrorToast(component);
            }
        }
    },
@@ -3080,12 +3136,12 @@
                } else {
                    //component.set('v.errorMessage', '产品用量必须输入数字!');
                    this.error('产品用量必须输入数字!');
                    this.showErrorToast(component);
                    //this.showErrorToast(component);
                }
            } else {
                //component.set('v.errorMessage', '产品用量最多输入14位数字!');
                this.error('产品用量最多输入14位数字!');
                this.showErrorToast(component);
                //this.showErrorToast(component);
            }
        }
    },
@@ -3100,7 +3156,7 @@
            component.find('new_con').set('v.disabled', true);
        }
        if (doctor_value != '') {
            this.set_doctor_list(component);
            this.set_doctor_list_edit(component);
            var action = component.get('c.selectPurposeTypes');
            action.setParams({
                'doctor_value': doctor_value