首页 > 其他分享 >【滨州学院】学生集体外出实习备案-JS-MINIUI

【滨州学院】学生集体外出实习备案-JS-MINIUI

时间:2023-07-06 16:55:26浏览次数:37  
标签:MINIUI 滨州 user JS 实习 nbsp var id row

表单:

<div id="complex" class="mini-complex" style="background: rgb(255, 255, 255); padding: 2px 20px 10px; box-shadow: rgb(144, 144, 144) 0px 0px 5px; margin: 10px auto 12px; font-size: 14px; position: relative; height: 1000px; width: 660px;">
    <p style="text-align: center;">
        <strong><span style="font-size: 24px;"><br/></span></strong>
    </p>
    <p style="text-align: center;">
        <strong><span style="font-size: 24px;">学生集体外出实习备案</span></strong><br/>
    </p>
    <p style="margin-bottom: 25px;">
        <strong><span style="font-size: 24px;"></span></strong>
    </p>
    <table style="table-layout: fixed;border-collapse:collapse;border:2px solid black;" data-sort="sortDisabled" align="center">
        <tbody>
            <tr class="firstRow">
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;" width="93.33333333333333">
                    申请人姓名
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;" width="140.33333333333334">
                    <input class="mini-textbox" choosevalue="CURRENTUSER" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="0" enfield="SQRXM" cnfield="申请人姓名" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" maxlength="200" style="width: 100%;" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen" emptytext="" data-options="{&quot;emptytext&quot;:&quot;&quot;}"/><br/>
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;" width="102.33333333333333">
                    申请人工号
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38);" width="135.33333333333334">
                    <input class="mini-textbox" choosevalue="CURRENTUSERID" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="1" enfield="SQRGH" cnfield="申请人工号" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" maxlength="200" style="width: 100%;" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen" emptytext="" data-options="{&quot;emptytext&quot;:&quot;&quot;}"/><br/>
                </td>
            </tr>
            <tr>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="125.33333333333333" valign="middle" align="center">
                    带队教师姓名
                </td>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="140.33333333333334" valign="middle" align="center">
                    <input class="mini-textbox" choosevalue="CURRENTUSER" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="1" enfield="DDJSXM" cnfield="带队教师姓名" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" maxlength="200" style="width: 100%;" emptytext="" data-options="{&quot;emptytext&quot;:&quot;&quot;,&quot;id&quot;:&quot;DDJSXM&quot;}"/><br/>
                </td>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="95.33333333333333" valign="middle" align="center">
                    带队教师工号
                </td>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="137.33333333333334" valign="middle" align="center">
                    <input class="mini-textbox" choosevalue="CURRENTUSERID" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="2" enfield="DDJSGH" cnfield="带队教师工号" adaptive="true" multiselect="false" style="width: 100%;" showclearbutton="false" allowlimitvalue="false" maxlength="200" data-options="{&quot;emptytext&quot;:&quot;&quot;}" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen" emptytext="" linkageurl="/queryservice/query.htm?snumber=CXZDJSXX&amp;ZDJSGH=INPUTVALUE" datasourceurl="" relatefield_1="cnfield=指导教师姓名;enfield=JSXM;datatype=value;icon=;key=ZDJSXM;" relatefield_2="cnfield=联系电话;enfield=LXDH;datatype=value;icon=;key=LXDH;" relatefield_3="cnfield=专业负责人;enfield=ZYFZR;datatype=data;icon=;key=;"/><br/>
                </td>
            </tr>
            <tr>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="125.33333333333333" valign="middle" align="center">
                    所在单位
                </td>
                <td style="border-color: rgb(38, 38, 38);" width="140.33333333333334" valign="middle" align="center">
                    <input class="mini-textbox" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="4" enfield="SZDW" cnfield="所在单位" adaptive="true" multiselect="false" style="width: 100%;" showclearbutton="false" allowlimitvalue="false" maxlength="200" data-options="{&quot;emptytext&quot;:&quot;&quot;}" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen" emptytext="" datasourceurl="/queryservice/query.htm?snumber=CXBMMC&amp;HUMANCODE=STARTID" urlkey="DWMC"/><br/>
                </td>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="102.33333333333333" valign="middle" align="center">
                    联系电话
                </td>
                <td style="border-color: rgb(38, 38, 38);" width="137.33333333333334" valign="middle" align="center">
                    <input class="mini-textbox" choosevalue="CURRENTUSERMOBILETEL" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="5" enfield="LXDH" cnfield="联系电话" adaptive="true" multiselect="false" style="width: 100%;" showclearbutton="false" allowlimitvalue="false" maxlength="200" data-options="{&quot;emptytext&quot;:&quot;&quot;}" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen" emptytext=""/><br/>
                </td>
            </tr>
            <tr>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="125.33333333333333" valign="middle" align="center">
                    参加人数
                </td>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" valign="middle" align="center" rowspan="1" colspan="3">
                    <input class="mini-textbox" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="6" enfield="RS" cnfield="参加人数" adaptive="false" multiselect="false" showclearbutton="false" allowlimitvalue="false" maxlength="200" style="width:60%;" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen" data-options="{&quot;vtype&quot;:&quot;int&quot;,&quot;textAlign&quot;:&quot;center&quot;}" vtype="int" inputstyle="text-align:center;"/>人<br/>
                </td>
            </tr>
            <tr>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" rowspan="1" colspan="4" valign="middle" height="27" align="center" width="98.00000000000004">
                    <strong>实习学生信息</strong><br/>
                </td>
            </tr>
            <tr>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" rowspan="1" colspan="4" valign="middle" height="27" align="center" width="98.00000000000004">
                    <img src="../../resources/images/flow/datagrid.png" datagrid_style="width: 100%; height: 200px;" datagrid_class="mini-datagrid" datagrid_idfield="id" datagrid_showpager="false" datagrid_fldorder="7" datagrid_cnfield="实习学生名单" datagrid_enfield="SXXSMD" showaddbtn="true" showdelbtn="true" showinbtn="true" showupbtn="true" showdownbtn="true" maxgridrows="500" loadcontext="true" shownumber="false" adaptive="true" datagridfield_1="class=mini-textbox;field=XH;name=负责人学号;required=true;align=left;allowinput=true;allowsort=true;maxLength=200;emptytext=;stylewidth=80;stylewidthtype=%;linkageurl=%2Fqueryservice%2Fquery.htm%3Fsnumber%3DCXXMZYBJ%26user_id%3DINPUTVALUE;reactionData=%5B%7B%22datatype%22%3A%22value%22%2C%22_id%22%3A1%2C%22_uid%22%3A1%2C%22_state%22%3A%22added%22%2C%22enfield%22%3A%22XM%22%2C%22cnfield%22%3A%22%E8%B4%9F%E8%B4%A3%E4%BA%BA%E5%A7%93%E5%90%8D%22%2C%22key%22%3A%22XM%22%7D%2C%7B%22datatype%22%3A%22value%22%2C%22_id%22%3A2%2C%22_uid%22%3A2%2C%22_state%22%3A%22added%22%2C%22enfield%22%3A%22BJ%22%2C%22cnfield%22%3A%22%E5%AE%9E%E4%B9%A0%E7%8F%AD%E7%BA%A7%22%2C%22key%22%3A%22BJMC%22%7D%2C%7B%22datatype%22%3A%22value%22%2C%22_id%22%3A3%2C%22_uid%22%3A3%2C%22_state%22%3A%22added%22%2C%22enfield%22%3A%22HTDE4690%22%2C%22cnfield%22%3A%22%E8%B4%9F%E8%B4%A3%E4%BA%BA%E7%94%B5%E8%AF%9D%22%2C%22key%22%3A%22SJH%22%7D%5D;vtype=undefined;choosevalue=other;" stylewidth="80" stylewidthtype="%" fieldname_1="负责人学号" datagridfield_2="class=mini-textbox;field=XM;name=负责人姓名;required=false;align=left;allowinput=true;allowsort=true;maxLength=200;emptytext=;stylewidth=80;stylewidthtype=%;linkageurl=;reactionData=%5B%5D;vtype=undefined;choosevalue=other;" fieldname_2="负责人姓名" required="true" fieldname_3="专业" datagridfield_4="class=mini-textbox;field=BJ;name=实习班级;required=false;align=left;allowinput=true;allowsort=true;maxLength=200;emptytext=;stylewidth=80;stylewidthtype=%;linkageurl=;reactionData=%5B%5D;vtype=undefined;choosevalue=other;" fieldname_4="实习班级" name="未定义列" field="HT44EB6B" data="[{&quot;id&quot;:&quot;是&quot;,&quot;text&quot;:&quot;是&quot;,&quot;_id&quot;:1,&quot;_uid&quot;:1,&quot;_state&quot;:&quot;modified&quot;},{&quot;id&quot;:&quot;否&quot;,&quot;text&quot;:&quot;否&quot;,&quot;_id&quot;:2,&quot;_uid&quot;:2,&quot;_state&quot;:&quot;modified&quot;}]" fieldname_5="负责人电话" fieldname_6="是否离校" fieldname_7="实习单位名称" fieldname_8="实习单位地址(省市县区)" fieldname_9="实习开始时间" fieldname_10="实习结束时间" fieldname_11="备注" data-options="{&quot;shownumber&quot;:&quot;false&quot;,&quot;mingridrows&quot;:1,&quot;showinbtn&quot;:&quot;true&quot;,&quot;showupbtn&quot;:&quot;true&quot;,&quot;showdownbtn&quot;:&quot;true&quot;}" mingridrows="1" type="mini-datagrid" datagridfield_5="class=mini-textbox;field=HTDE4690;name=负责人电话;required=true;align=left;allowinput=true;allowsort=true;maxLength=200;emptytext=;stylewidth=80;stylewidthtype=%;linkageurl=;reactionData=%5B%5D;vtype=undefined;choosevalue=other;" relatefield_1="cnfield=负责人姓名;enfield=XM;datatype=value;icon=;key=XM;" relatefield_2="cnfield=实习班级;enfield=BJ;datatype=value;icon=;key=BJMC;" relatefield_3="cnfield=负责人电话;enfield=HTDE4690;datatype=value;icon=;key=SJH;"/><br/>
                </td>
            </tr>
            <tr>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    实习课程号
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38);"></td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    实习课程名
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38);"></td>
            </tr>
            <tr>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    离校时间
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38);">
                    <input class="mini-datepicker" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="8" enfield="LXSJ" cnfield="离校时间" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" style="width: 100%;" showtime="false" tagtype="mini-datepicker" datetimetype="mini-datepicker" mindate="" maxdate="" data-options="{&quot;minDate&quot;:&quot;&quot;,&quot;maxDate&quot;:&quot;&quot;,&quot;showStyle&quot;:&quot;rung&quot;,&quot;dateScope&quot;:&quot;false&quot;,&quot;manyDateScope&quot;:&quot;false&quot;,&quot;nowDateAfter&quot;:&quot;false&quot;,&quot;dateFixedScope&quot;:&quot;false&quot;,&quot;workDate&quot;:&quot;false&quot;}" showsignaturedateformat="rung" type="mini-datepicker" ziti="MicrosoftYaHei" zihao="fourteen"/><br/>
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    返校时间
                </td>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38);">
                    <input class="mini-datepicker" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="9" enfield="FXSJ" cnfield="返校时间" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" style="width: 100%;" showtime="false" tagtype="mini-datepicker" datetimetype="mini-datepicker" mindate="" maxdate="" data-options="{&quot;minDate&quot;:&quot;&quot;,&quot;maxDate&quot;:&quot;&quot;,&quot;showStyle&quot;:&quot;rung&quot;,&quot;dateScope&quot;:&quot;false&quot;,&quot;manyDateScope&quot;:&quot;false&quot;,&quot;nowDateAfter&quot;:&quot;false&quot;,&quot;dateFixedScope&quot;:&quot;false&quot;,&quot;workDate&quot;:&quot;false&quot;}" showsignaturedateformat="rung" datescope="false" type="mini-datepicker" ziti="MicrosoftYaHei" zihao="fourteen"/><br/>
                </td>
            </tr>
            <tr>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    实习地点
                </td>
                <td valign="middle" align="center" colspan="3" rowspan="1" height="27" style="border-color: rgb(38, 38, 38);">
                    <input class="mini-textarea" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="10" enfield="DD" cnfield="实习地点" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" style="width: 100%; height: 100%;" maxlength="200" type="mini-textarea" ziti="MicrosoftYaHei" zihao="fourteen"/><br/>
                </td>
            </tr>
            <tr>
                <td valign="middle" align="center" colspan="1" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    外出管理措施
                </td>
                <td valign="middle" align="center" colspan="3" rowspan="1" height="27" style="border-color: rgb(38, 38, 38); word-break: break-all;">
                    <input class="mini-textarea" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="11" enfield="WCGLCS" cnfield="外出管理措施" adaptive="true" multiselect="false" showclearbutton="false" allowlimitvalue="false" style="width: 100%; height: 100%;" maxlength="200" type="mini-textarea" ziti="MicrosoftYaHei" zihao="fourteen"/><br/>
                </td>
            </tr>
            <tr>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" width="125.33333333333333" valign="middle" height="27" align="center">
                    辅导员
                </td>
                <td style="border-color: rgb(38, 38, 38); word-break: break-all;" valign="middle" height="27" align="center" rowspan="1" colspan="3" width="445.3333333333333">
                    <input class="mini-textbox" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="1" datasourcetype="url" fldorder="12" enfield="FDYXM" cnfield="辅导员" adaptive="true" multiselect="false" style="width: 100%;" showclearbutton="false" allowlimitvalue="false" maxlength="200" data-options="{&quot;id&quot;:&quot;FDYXM&quot;,&quot;type&quot;:&quot;COUNTDAY&quot;}" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen"/><br/>
                </td>
            </tr>
        </tbody>
    </table>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="mini-textbox" choosevalue="other" required="true" fieldtype="ordinary" allowinput="true" isshowonlist="0" datasourcetype="url" fldorder="13" enfield="FDYGH" cnfield="辅导员审批" adaptive="false" multiselect="false" showclearbutton="false" allowlimitvalue="false" maxlength="200" data-options="{&quot;id&quot;:&quot;FDYGH&quot;,&quot;type&quot;:&quot;COUNTDAY&quot;}" style="width:40%;" type="mini-textbox" ziti="MicrosoftYaHei" zihao="fourteen"/>
    <p style="margin-bottom: 25px; text-align: left;">
        <img class="flow-javascript" src="../../style/flow/img/javascript.png" choosevalue="other" enfield="HTA261E6" cnfield="脚本控件" style="width: 18px; height: 18px; display: block;" method="var datagrid = mini.get(&#39;SXXSMD&#39;); //多行表单英文名称 SXXSMD
            datagrid.on(&#39;cellendedit&#39;,function(e){
                if(e.field == &#39;XH&#39;){ //多行表单学号
                    if(e.row.XH){
                        var row = e.row;
                        $.ajax({
                              //通用查询地址+根据哪个控件值 
                              url:&#39;${basePath}queryservice/query.htm?snumber=CXXMZYBJ&amp;user_id=&#39;+row.XH,
                              dataType:&#39;json&#39;,
                              async:false,
                              success:function(text){
                                  if (Array.isArray(text)) {
                                           row.XM = text[0].XM;
                                           //row.ZY = text[0].XYMC;
                                           row.BJ = text[0].BJMC;
                                        datagrid.commitEditRow ( row );
                                         var bj = row.BJ;
                                           setFdy(bj)
                                  }
                              },
                           });
                   }        
                }
            });
datagrid.on(&#39;preload&#39;,function(e){
            debugger;
            console.log(e.sender.data);
            var data = e.sender.data;
            for(var i=0;i&lt;data.length;i++){
                var row = data[i];
                var row = e.row;
                $.ajax({
                      //通用查询地址+根据哪个控件值 
                      url:&#39;${basePath}queryservice/query.htm?snumber=CXXMZYBJ&amp;user_id=&#39;+row.XH,
                      dataType:&#39;json&#39;,
                      async:false,
                      success:function(text){
                          if (Array.isArray(text)) {
                               row.XM = text[0].XM;
                               //row.ZY = text[0].XYMC;
                               row.BJ = text[0].BJMC;
                            datagrid.commitEditRow(row);
                             var bj = row.BJ;
                               setFdy(bj);
                          }
                      },
                   });
            }
            
        });

        function setFdy(bj){
            
           var fdy_ids = mini.get(&quot;FDYGH&quot;).getValue();
           var fdy_names = mini.get(&quot;FDYXM&quot;).getValue();
           
           var fdy_id_arr = fdy_ids.split(&quot;,&quot;);
           var fdy_name_arr = fdy_names.split(&quot;,&quot;);
           
           if(bj){
                $.ajax({
                    methods: &#39;GET&#39;,
                    dataType:&#39;json&#39;,
                    async:false,
                    url: &quot;${basePath}queryservice/query.htm?snumber=CXFDY&amp;orgname=&quot; + bj,
                    success: function (res) {
                        if(res){
                            for(var i=0;i&lt;res.length;i++){
                                var fdy_obj = res[i];
                                var fdy_id = fdy_obj.HUMANCODE;
                                var fdy_name = fdy_obj.HUMANNAME;
                                fdy_id_arr.push(fdy_id);
                                fdy_name_arr.push(fdy_name);
                            }
                            let fyd_id_set = [...new Set(fdy_id_arr)];
                            fdy_ids = [...fyd_id_set].join(&#39;,&#39;); 
                            let fyd_name_set = [...new Set(fdy_name_arr)];
                            fdy_names = [...fyd_name_set].join(&#39;,&#39;);
                        }
                        if(fdy_names.indexOf(&quot;,&quot;)==0 ){
                            fdy_names = fdy_names.substring(1, fdy_names.length);
                        }
                        if(fdy_ids.indexOf(&quot;,&quot;)==0 ){
                            fdy_ids = fdy_ids.substring(1, fdy_ids.length);
                        }
                        
                        mini.get(&quot;FDYGH&quot;).setValue(fdy_ids);
                        mini.get(&quot;FDYXM&quot;).setValue(fdy_names);
                        
                    },
                    error: function (err) {
                        reject(err)
                    }
                })
           }
        }
$(&#39;#delbar_SXXSMD&#39;).click(function () {
       debugger;
var data = datagrid.getData();
        if(data.length &gt;0){
                        mini.get(&quot;FDYGH&quot;).setValue(&quot;&quot;);
            mini.get(&quot;FDYXM&quot;).setValue(&quot;&quot;);
            for(var i=0;i&lt;data.length;i++){
                var row = data[i];
                var bj = row.BJ;
                setFdy(bj);
            }
        }else{
            mini.get(&quot;FDYGH&quot;).setValue(&quot;&quot;);
            mini.get(&quot;FDYXM&quot;).setValue(&quot;&quot;);
        }

});"/>
    </p>
</div>

 

JS:

var datagrid = mini.get('SXXSMD'); //多行表单英文名称 SXXSMD
            datagrid.on('cellendedit',function(e){
                if(e.field == 'XH'){ //多行表单学号
                    if(e.row.XH){
                        var row = e.row;
                        $.ajax({
                              //通用查询地址+根据哪个控件值 
                              url:'${basePath}queryservice/query.htm?snumber=CXXMZYBJ&user_id='+row.XH,
                              dataType:'json',
                              async:false,
                              success:function(text){
                                  if (Array.isArray(text)) {
                                           row.XM = text[0].XM;
                                           //row.ZY = text[0].XYMC;
                                           row.BJ = text[0].BJMC;
                                        datagrid.commitEditRow ( row );
                                         var bj = row.BJ;
                                           setFdy(bj)
                                  }
                              },
                           });
                   }        
                }
            });
datagrid.on('preload',function(e){
            debugger;
            console.log(e.sender.data);
            var data = e.sender.data;
            for(var i=0;i<data.length;i++){
                var row = data[i];
                var row = e.row;
                $.ajax({
                      //通用查询地址+根据哪个控件值 
                      url:'${basePath}queryservice/query.htm?snumber=CXXMZYBJ&user_id='+row.XH,
                      dataType:'json',
                      async:false,
                      success:function(text){
                          if (Array.isArray(text)) {
                               row.XM = text[0].XM;
                               //row.ZY = text[0].XYMC;
                               row.BJ = text[0].BJMC;
                            datagrid.commitEditRow(row);
                             var bj = row.BJ;
                               setFdy(bj);
                          }
                      },
                   });
            }
            
        });

        function setFdy(bj){
            
           var fdy_ids = mini.get("FDYGH").getValue();
           var fdy_names = mini.get("FDYXM").getValue();
           
           var fdy_id_arr = fdy_ids.split(",");
           var fdy_name_arr = fdy_names.split(",");
           
           if(bj){
                $.ajax({
                    methods: 'GET',
                    dataType:'json',
                    async:false,
                    url: "${basePath}queryservice/query.htm?snumber=CXFDY&orgname=" + bj,
                    success: function (res) {
                        if(res){
                            for(var i=0;i<res.length;i++){
                                var fdy_obj = res[i];
                                var fdy_id = fdy_obj.HUMANCODE;
                                var fdy_name = fdy_obj.HUMANNAME;
                                fdy_id_arr.push(fdy_id);
                                fdy_name_arr.push(fdy_name);
                            }
                            let fyd_id_set = [...new Set(fdy_id_arr)];
                            fdy_ids = [...fyd_id_set].join(','); 
                            let fyd_name_set = [...new Set(fdy_name_arr)];
                            fdy_names = [...fyd_name_set].join(',');
                        }
                        if(fdy_names.indexOf(",")==0 ){
                            fdy_names = fdy_names.substring(1, fdy_names.length);
                        }
                        if(fdy_ids.indexOf(",")==0 ){
                            fdy_ids = fdy_ids.substring(1, fdy_ids.length);
                        }
                        
                        mini.get("FDYGH").setValue(fdy_ids);
                        mini.get("FDYXM").setValue(fdy_names);
                        
                    },
                    error: function (err) {
                        reject(err)
                    }
                })
           }
        }
$('#delbar_SXXSMD').click(function () {
       debugger;
var data = datagrid.getData();
        if(data.length >0){
                        mini.get("FDYGH").setValue("");
            mini.get("FDYXM").setValue("");
            for(var i=0;i<data.length;i++){
                var row = data[i];
                var bj = row.BJ;
                setFdy(bj);
            }
        }else{
            mini.get("FDYGH").setValue("");
            mini.get("FDYXM").setValue("");
        }

});

通用查询:

CXXMZYBJ:

select a.humanname as XM,e.xh, e.xymc,e.zymc,e.bjmc,a.telmobile1 as SJH from ht_sys_user a,(
select a.orgname as XYMC ,c.ZYMC AS ZYMC,c.BJMC AS BJMC ,c.user_id as XH from HT_SYS_ORGANIZATION a,(
select a.orgname as ZYMC,b.orgname as BJMC ,a.parent ,b.user_id from HT_SYS_ORGANIZATION a ,
(select a.orgname,a.parent,b.user_id from HT_SYS_ORGANIZATION a,HT_SYS_ORGANIZATION_USER b where a.id =b.organization_id and b.user_id='${user_id}') b where a.id = b.parent) c where a.id =c.parent) e where a.id =e.xh

 

截图:

 

标签:MINIUI,滨州,user,JS,实习,nbsp,var,id,row
From: https://www.cnblogs.com/xiaoweihongyan/p/17532625.html

相关文章

  • 【滨州学院】通过学生学号查询辅导员JS-miniui
    表单内容:1<divid="complex"class="mini-complex"style="background:rgb(255,255,255);padding:2px20px10px;box-shadow:rgb(144,144,144)0px0px5px;margin:10pxauto12px;font-size:14px;font-family:MicrosoftYaHei;......
  • 前端基础-js篇(一)
    1.usestrict (1)ES5规范增加了新的语言特性并且修改了一些已经存在的特性。为了保证旧的功能还能够使用,大部分的修改是默认不生效的。(2)需要一个特殊的指令—— "usestrict" 来明确地激活这些特性。(3)当它处于脚本文件的顶部时,则整个脚本文件都将以“现代”模式进行工作。"u......
  • js的中的函数(二)
    构造函数JavaScript中,一个函数除了作为普通意义的函数外,还可以被用来定义为构造函数。什么是构造函数?就是可以用来生成一个对象的函数。例如:functionStudent(name,age,city,address){//this指向构造函数生成的对象this.name=name;this.age=ag......
  • 第九篇 - SpringBoot统一结果封装Json数据
    前面几节学习了SpringBoot和Vue的结合,以及Vue跳转到另一个Vue页面。这节学习SpringBootcontroller返回Json数据格式封装。参考链接:https://zhuanlan.zhihu.com/p/347233348第一步:在entity文件夹下新建一个ResultVo类。 ResultVo.javapackagecom.example.demo.entity;p......
  • 认识soui4js(第5篇):使用扩展控件
    无论内置控件多么丰富,也不可能满足用户所有需求。总有时候用户需要自己扩展控件。soui4js推荐使用C++来扩展控件,然后通过实现一个js模块来提供js使用。扩展控件通常涉及到图形上下文的频繁交互,如果使用js来实现,效率上会大打折扣。使用C++,没了C++和js的相互调用。使用起来就和C++......
  • GIS融合之路(五)给CesiumJS加上体积云(Volumetric Cloud)和高度雾(Height Fog)
    同样在这篇文章开始前重申一下,山海鲸并没有使用ThreeJS引擎。但由于ThreeJS引擎使用广泛,下文中直接用ThreeJS同CesiumJS的整合方案代替山海鲸中3D引擎和CesiumJS整合。系列传送门:同样在这篇文章开始前重申一下,山海鲸并没有使用ThreeJS引擎。但由于ThreeJS引擎使用广泛,下文中直接......
  • 2023年7月最新全国省市区县和乡镇街道行政区划矢量边界坐标经纬度地图数据 shp geojso
    发现个可以免费下载全国 geojson 数据的网站,推荐一下。支持全国、省级、市级、区/县级、街道/乡镇级以及各级的联动数据,支持导入矢量地图渲染框架中使用,例如:D3、Echarts等geojson数据下载地址:https://geojson.hxkj.vip该项目github地址:https://github.com/TangSY/echarts-m......
  • scala class、Map、List 转换成Json(Gson、json4s、JSONUtil)
    实例代码importcn.hutool.json.JSONUtilimportcom.google.gson.GsonobjectEntitytoJsonTest{defmain(args:Array[String]):Unit={valgson=newGsonvalpeople=JJ("gl",12,List("basketball","baseball"),......
  • js 实现文件下载并重命名
    JavaScript实现文件下载并重命名 第一种是HTML官网中的方法<ahref="/images/liang.jpg"download="文件名称">HTML5中a标签提供了一个filename属性,可以下载成指定的download属性名称这种同源访问是没有问题的,但一跨域就不行了,试了其它方法,不是报跨域错误,就是在当......
  • md5.js
    直接引入md5.js需要注意:(不然加密的md5不会变)md5(blob.byteLength)import{md5}from"@/utils/md5.js";/* *JavaScriptMD51.0.1 *https://github.com/blueimp/JavaScript-MD5 * *Copyright2011,SebastianTschan *https://blueimp.net * *License......