Beispiel #1
0
 /**
  * (string) actionIndex : marryList
  * @param $pid personal_id
  * @return string
  */
 public function actionIndex($pid)
 {
     /*Personal*/
     $personal = Personal::getPersonalByPid($pid);
     if (!$personal) {
         die('参数错误..');
     }
     $code1 = $personal->code1;
     $because = $personal->marry;
     $becausedate = $personal->marrydate;
     switch ($because) {
         case '22':
             $becausedate = $personal->zhdate;
             break;
         case '23':
             $becausedate = $personal->fhdate;
             break;
         case '30':
         case '40':
             $becausedate = $personal->lhdate;
             break;
     }
     /*配置参数*/
     $preferences = [];
     $preferencesForDT = [];
     $preferences['marry'] = Preferences::getByClassmark('pmarry');
     $preferences['hkxz'] = Preferences::getByClassmark('chkxz');
     $preferencesForDT['marry'] = Preferences::getByClassmarkForDatatables('pmarry');
     $preferencesForDT['hkxz'] = Preferences::getByClassmarkForDatatables('chkxz');
     return $this->render('index', ['pPrimaryKey' => $personal->id, 'pid' => $pid, 'id' => Marry::generateId($pid), 'code1' => $code1, 'because' => $because, 'becausedate' => $becausedate, 'selfno' => $personal->selfno, 'preferences' => Json::encode($preferences), 'preferencesForDT' => Json::encode($preferencesForDT)]);
 }
Beispiel #2
0
                <div class="col-sm-12">
                    <?php 
echo Html::submitButton('保 存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-info']);
?>
                </div>
            </div>
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 6, 'attributes' => ['personal_id' => ['type' => Form::INPUT_HIDDEN, 'label' => false, 'columnOptions' => ['colspan' => 0]], 's_date' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入登记日期..', 'maxlength' => 8]], 'code1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工编码..', 'maxlength' => 36]], 'name1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工姓名..', 'maxlength' => 50]]]]);
?>
        </div>

        <div class="col-sm-12">
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['fcode' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fcode', 'placeholder' => '身份证号', 'maxlength' => 18]], 'sex' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('psex'), 'options' => ['id' => 'p-sex', 'readOnly' => true]], 'birthdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-birthdate', 'placeholder' => '请输入出生日期..', 'maxlength' => 8, 'readOnly' => true]], 'unit' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-unit', 'readOnly' => true, 'maxlength' => 30]], 'flag' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pflag'), 'options' => ['placeholder' => 'Enter Flag...', 'maxlength' => 2]], 'hkxz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('chkxz'), 'options' => ['placeholder' => 'Enter Hkxz...', 'maxlength' => 2]], 'marry' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmarry'), 'options' => ['id' => 'p-marry', 'placeholder' => 'Enter Marry...', 'maxlength' => 2]], 'marrydate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-marrydate', 'placeholder' => 'Enter Marrydate...', 'maxlength' => 8]], 'memo1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmemo1'), 'options' => ['placeholder' => 'Enter Memo1...', 'maxlength' => 2]], 'selfno' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Selfno...']], 'lhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-lhdate', 'placeholder' => 'Enter Lhdate...', 'maxlength' => 8]], 'zhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-zhdate', 'maxlength' => 8]], 'work1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pwork1'), 'options' => ['placeholder' => 'Enter Work1...', 'maxlength' => 2]], 'childnum' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Childnum...']], 'obect1' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmark('pobect1'), 'options' => ['placeholder' => '--请选择--'], 'pluginOptions' => ['allowClear' => true]]], 'fhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fhdate', 'maxlength' => 8]], 'mz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmz'), 'options' => ['placeholder' => 'Enter Mz...', 'maxlength' => 2]], 'whcd' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pwhcd'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-whcd', 'data-classmark' => 'pwhcd', 'data-classmarkcn' => '文化程度'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'title' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('ptitle'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-title', 'data-classmark' => 'ptitle', 'data-classmarkcn' => '职称'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'zw' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('awork1'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-zw', 'data-classmark' => 'awork1', 'data-classmarkcn' => '职务'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'is_dy' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pis_dy'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-is_dy', 'data-classmark' => 'pis_dy', 'data-classmarkcn' => '政治面貌'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'onlysign' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('ponlysign'), 'options' => ['placeholder' => 'Enter Onlysign...', 'maxlength' => 2]], 'tel' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Tel...', 'maxlength' => 50]], 'jobdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Jobdate...', 'maxlength' => 8]], 'address1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Address1...', 'maxlength' => 80]], 'grous' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pgrous'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-grous', 'data-classmark' => 'pgrous', 'data-classmarkcn' => '所属街道'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'ingoingdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Ingoingdate...', 'maxlength' => 8]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['hkaddr' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Hkaddr...', 'maxlength' => 80]], 'logout' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('plogout'), 'options' => ['placeholder' => 'Enter Logout...']], 'e_date' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter E Date...', 'maxlength' => 8]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['memo' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Memo...', 'maxlength' => 254]], 'checktime' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pchecktime'), 'options' => ['id' => 'p-checktime', 'placeholder' => 'Enter Checktime...', 'maxlength' => 2]]]]);
ActiveForm::end();
?>
        </div>
    </div>

</div>

<?php 
\common\widgets\JsBlock::begin();
?>
    <script type="text/javascript">
        //身份证合法性
        function certificateNoParse(certificateNo){
            var pat = /^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/;
            if(!pat.test(certificateNo))
Beispiel #3
0
 /**
  * (string) actionDetail : 右侧区域信息
  * @return string
  * @throws NotFoundHttpException
  */
 public function actionDetail()
 {
     //$this->layout = 'bank';
     $id = Yii::$app->request->post('id', '%');
     if ($id == '0' || $id == '@') {
         $id = '%';
     }
     $name = Yii::$app->request->post('name', '计生管理系统');
     $unit = new Unit();
     $p_num = Personal::find()->where(['unit' => $id])->count(1);
     if ($unit->isParent($id) && $p_num <= 0) {
         return $this->renderAjax('_detail', ['parent' => $id, 'parentName' => $name, 'unitcode' => Unit::getMaxunitcode($id), 'isParent' => intval($this->findModel($id)->corpflag) < 5 ? "yes" : "no"]);
     } else {
         $preferences = [];
         $preferences['sex'] = Preferences::getByClassmark('psex');
         $preferences['marry'] = Preferences::getByClassmark('pmarry');
         $preferences['flag'] = Preferences::getByClassmark('pflag');
         $preferences['work1'] = Preferences::getByClassmark('pwork1');
         return $this->renderAjax('/personal/_list', ['parent' => $id, 'parentName' => $name, 'code1' => Personal::getMaxCode(), 'preferences' => Json::encode($preferences)]);
     }
 }
 public function actionGetFieldConfig()
 {
     //传过来的数据格式为 pbc_tnam.pbc_cnam
     $params = Yii::$app->request->post('params', '');
     $config = [];
     if ($params) {
         $paramArr = explode('.', $params);
         if (count($paramArr) == 2) {
             $pbc_tnam = $paramArr[0];
             $pbc_cnam = $paramArr[1];
             $classmark = ColTable::getClassmark($pbc_tnam, $pbc_cnam);
             $data = $classmark ? Preferences::getByClassmark($classmark) : [];
             if ($pbc_cnam == 'unit') {
                 $data = Unit::getUnitcodeToUnitnameList();
             }
         }
     }
     if (count($data)) {
         foreach ($data as $key => $value) {
             $tmp['id'] = $key;
             $tmp['text'] = $value;
             $config[] = $tmp;
         }
     }
     return count($config) ? Json::encode($config) : '';
 }
Beispiel #5
0
    echo $i;
    ?>
" name="value-<?php 
    echo $i;
    ?>
" multiple="multiple" style="width: 100%;">
                                </select>
                            </div>
                            <div class="col-md-1 col-right">
                                <?php 
    echo \kartik\widgets\Select2::widget(['name' => 'right-' . $i, 'theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'data' => \common\populac\models\Preferences::getByClassmark('tRight'), 'options' => ['prompt' => '', 'title' => '如需要选择右括号,请选择..'], 'pluginOptions' => ['allowClear' => true, 'minimumResultsForSearch' => 'Infinity']]);
    ?>
                            </div>
                            <div class="col-md-1 col-relation">
                                <?php 
    echo \kartik\widgets\Select2::widget(['name' => 'relation-' . $i, 'theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'data' => \common\populac\models\Preferences::getByClassmark('tRelation'), 'value' => 'and', 'options' => ['multiple' => false], 'pluginOptions' => ['minimumResultsForSearch' => 'Infinity']]);
    ?>
                            </div>
                        </div>
                    <?php 
}
?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关 闭</button>
                    <button type="button" class="btn btn-primary" id="btn-view-adv-search-relation">确 定</button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
 /**
  * (string) actionSearchList : 多功能查询后的人员列表
  * @return string
  */
 public function actionSearchResult()
 {
     //$this->layout = 'bank';
     $sql = Yii::$app->request->post('sql');
     /*配置参数*/
     $preferences = [];
     $preferences['sex'] = Preferences::getByClassmark('psex');
     $preferences['marry'] = Preferences::getByClassmark('pmarry');
     $preferences['flag'] = Preferences::getByClassmark('pflag');
     $preferences['work1'] = Preferences::getByClassmark('pwork1');
     return $this->renderAjax('_search-list', ['preferences' => Json::encode($preferences), 'sql' => $sql]);
 }
Beispiel #7
0
                </div>
            </div>
            <div class="row">
                <div class="col-md-4">
                    <?php 
echo $form->field($model, 'postcode')->textInput(['maxlength' => true]);
?>
                </div>
                <div class="col-md-4">
                    <?php 
echo $form->field($model, 'date1')->textInput(['maxlength' => true]);
?>
                </div>
                <div class="col-md-4">
                    <?php 
echo $form->field($model, 'corpflag')->dropDownList(\common\populac\models\Preferences::getByClassmark('ukind'));
?>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-offset-9">
                    <?php 
echo Html::submitButton('保 存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
            <?php 
ActiveForm::end();
?>
Beispiel #8
0
?>

    <?php 
echo $form->field($model, 'cnname')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'memo')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'order_num')->textInput();
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(\common\populac\models\Preferences::getByClassmark('sStatus'));
?>

  
	<?php 
if (!Yii::$app->request->isAjax) {
    ?>
	  	<div class="form-group">
	        <?php 
    echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
    ?>
	    </div>
	<?php 
}
?>