8 次代碼提交 726623197a ... 139e18fe75

作者 SHA1 備註 提交日期
  ElPoteito 139e18fe75 Cambio de versión 10 月之前
  ElPoteito a8749994c4 Ajuste título condicionantes detalle 10 月之前
  ElPoteito c2374891a4 Cambio de versión 10 月之前
  ElPoteito 28bb940d16 idSagarhpa multiple 10 月之前
  ElPoteito d08c2b752d Cambio de versión 11 月之前
  acampillo 279c249969 Merge branch 'acampillo' into desarrollo 11 月之前
  ElPoteito b2d57cb5dc Cambio de versión 11 月之前
  ElPoteito 110b3fa705 Excel municipios 11 月之前

+ 1 - 2
.env.development.local

@@ -4,7 +4,6 @@ VITE_NOMBRE_PAGINA=
 #VITE_API_URL=http://localhost:8080
 VITE_API_URL=https://sagarhpa.api.edesarrollos.info
 VITE_USR_URL=http://127.0.0.1:5173/
-VITE_API_VERSION=1.24.05.17+1
 
 VITE_API_MODULE=/v1/
 VITE_API_MODULE_PDF=/pdf/
@@ -12,4 +11,4 @@ VITE_API_MODULE_EXCEL=/excel/
 VITE_API_MODULE_WORD=/word/
 VITE_API_MODULE_PUBLIC=/publico/
 
-VITE_API_VERSION=1.24.05.06+0
+VITE_API_VERSION=1.24.08.08+4

+ 1 - 1
.env.production.local

@@ -3,7 +3,7 @@ VITE_PROJECT=jwt
 VITE_NOMBRE_PAGINA=
 VITE_API_URL=https://sagarhpa.api.edesarrollos.info
 VITE_USR_URL=https://sagarhpa.web.app/
-VITE_API_VERSION=1.24.05.17+1
+VITE_API_VERSION=1.24.08.08+4
 
 VITE_API_MODULE=/v1/
 VITE_API_MODULE_PDF=/pdf/

+ 3 - 3
src/components/layouts/SimpleTableLayout.jsx

@@ -29,7 +29,7 @@ const SimpleTableLayout = ({
     <>
       {Boolean(onSearch) && !Boolean(customRender) && (
         <div style={styles.container}>
-          <Row gutter={10}>
+          <Row gutter={10} justify={'space-between'}>
             {titulo && (<Col span={24}>{titulo}</Col>)}
             <Col
               xs={24}
@@ -37,7 +37,7 @@ const SimpleTableLayout = ({
               md={11}
               lg={7}
               xxl={7}
-              style={styles.inputSearch}
+              style={{...styles.inputSearch, border: '1px solid red'}}
             >
               <Input.Search
                 enterButton
@@ -46,7 +46,7 @@ const SimpleTableLayout = ({
               />
             </Col>
             {Boolean(btnGroup) && (
-              <Col xs={24} sm={24} md={13} lg={17} xxl={17}>
+              <Col xs={24} sm={24} md={13} lg={17} xxl={17} style={{ border: '1px solid red'}}>
                 <ButtonGroup data={btnGroup} />
               </Col>
             )}

+ 11 - 4
src/views/catalogos/finMovilizaciones/FinMovilizacionDetalle.jsx

@@ -1,4 +1,4 @@
-import { Form, Input, Button, Spin, Row, Col } from 'antd'
+import { Form, Input, Button, Select as AntdSelect, Spin, Row, Col } from 'antd'
 import { useEffect, useMemo, useState } from 'react'
 import HttpService from '../../../services/httpService'
 import { respuestas } from '../../../utilities'
@@ -12,12 +12,14 @@ const endpoints = {
 };
 
 const FinMovilizacionDetalleDetalle = () => {
-  const [form] = Form.useForm()
   const navigate = useNavigate()
-  const [loading, setLoading] = useState(false)
   const query = useQuery()
   const id = query.get("id")
+
+  const [form] = Form.useForm()
+  
   const [request, setRequest] = useState({})
+  const [loading, setLoading] = useState(false)
 
   // const extraParams = useMemo(() => ({
   //   idAgenda: id,
@@ -121,7 +123,12 @@ const FinMovilizacionDetalleDetalle = () => {
               commonRules.requerido,
             ]}
           >
-            <Input onKeyPress={handleKeyPress} maxLength={9}/>
+            {/* <Input onKeyPress={handleKeyPress} maxLength={9}/> */}
+            <AntdSelect
+              mode='tags'
+              style={{ width: '100%' }}
+              tokenSeparators={[',']}
+            />
           </Form.Item>
         </Col>
         <Col span={24}>

+ 30 - 3
src/views/catalogos/finMovilizaciones/FinMovilizaciones.jsx

@@ -25,7 +25,7 @@ const FinMovilizaciones = () => {
       q: q ?? "",
       padre: true,
     };
-    setBuscarParams(params);    
+    setBuscarParams(params);
   };
 
   const botones = [
@@ -89,7 +89,34 @@ const FinMovilizaciones = () => {
       title: "ID Sagarhpa",
       key: "idSagarhpa",
       dataIndex: "idSagarhpa",
-      render: linkText,
+      render: (item, row) => (
+        <Link
+          to={`/administracion/catalogos/finMovilizaciones/editar?id=${row.id}`}
+          style={{ color: "black" }}
+        >
+          {isEllipsis(columns, "idSagarhpa") ? (
+            <Tooltip title={item}>
+              {item?.map((i, index) => {
+                let v = `${i}`;
+                if (index !== (item?.length - 1)) {
+                  v += ', '
+                }
+
+                return v;
+              })}
+            </Tooltip>
+          ) : (
+            item?.map((i, index) => {
+              let v = `${i}`;
+              if (index !== (item?.length - 1)) {
+                v += ', '
+              }
+
+              return v;
+            })
+          )}
+        </Link>
+      ),
     },
   ];
 
@@ -101,7 +128,7 @@ const FinMovilizaciones = () => {
     >
       <Formulario
         form={form}
-        onFinish={onFinish} 
+        onFinish={onFinish}
       />
       <Tabla
         columns={columns}

+ 50 - 20
src/views/catalogos/municipios/Formulario.jsx

@@ -10,6 +10,7 @@ import PropTypes from 'prop-types'
 const Formulario = ({
   form,
   onFinish,
+  botones = []
 }) => {
   return (
     <Form
@@ -21,28 +22,57 @@ const Formulario = ({
       onFinishFailed={() => { }}
     >
       <Row gutter={16}>
-        <Col span={6}>
-
-
-          <Form.Item
-            label="Búsqueda"
-            name="q"
-          >
-            <Input />
-          </Form.Item>
+        <Col span={12}>
+          <Row gutter={10}>
+            <Col span={12}>
+              <Form.Item
+                // label="Búsqueda"
+                name="q"
+              >
+                <Input />
+              </Form.Item>
+            </Col>
+            <Col span={4}>
+              <Form.Item>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  // style={{ marginTop: "30px" }}
+                  block
+                >
+                  Buscar
+                </Button>
+              </Form.Item>
+            </Col>
+          </Row>
         </Col>
-        <Col span={6}>
-          <Form.Item>
-            <Button
-              type="primary"
-              htmlType="submit"
-              style={{ marginTop: "30px" }}
-            >
-              Buscar
-            </Button>
-          </Form.Item>
+        <Col span={12}>
+          <Row gutter={10} justify={'end'}>
+            {botones.map((i, index) => (
+              <Col>
+                {
+                  Boolean(i?.text) ? (
+                    <Button
+                      key={`btnGroup-${index}`}
+                      onClick={i.onClick}
+                      {...i.props}
+                    >
+                      {i.icon} {i.text}
+                    </Button>
+                  ) : (
+                    <Button
+                      key={`btnGroup-${index}`}
+                      onClick={i.onClick}
+                      icon={i.icon}
+                      {...i.props}
+                    />
+                  )
+                }
+              </Col>
+            ))}
+          </Row>
         </Col>
-      </Row>  
+      </Row>
     </Form>
   )
 }

+ 17 - 11
src/views/catalogos/municipios/Municipios.jsx

@@ -1,10 +1,10 @@
 import { useRef, useState } from "react";
 import { Form, Modal, Tooltip, notification } from "antd";
-import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
+import { DeleteOutlined, FileExcelOutlined, PlusOutlined } from "@ant-design/icons";
 import { Tabla } from "../../../components";
 import { SimpleTableLayout } from "../../../components/layouts";
 import { ActionsButton } from "../../../components";
-import { isEllipsis, eliminarRegistro } from "../../../utilities";
+import { isEllipsis, eliminarRegistro, openInNewTab } from "../../../utilities";
 import { Link, useNavigate } from "react-router-dom";
 import Formulario from "./Formulario";
 
@@ -25,7 +25,7 @@ const Municipios = () => {
       q: q ?? "",
       padre: true,
     };
-    setBuscarParams(params);    
+    setBuscarParams(params);
   };
 
   const botones = [
@@ -35,6 +35,12 @@ const Municipios = () => {
       text: "Nuevo",
       icon: <PlusOutlined />,
     },
+    {
+      onClick: () => openInNewTab('/excel/municipio'),
+      props: { disabled: false, block: false },
+      text: "Excel",
+      icon: <FileExcelOutlined />,
+    },
   ];
 
   const linkText = (value, row, key) => (
@@ -87,21 +93,21 @@ const Municipios = () => {
     {
       title: "Estado",
       key: "estado",
-      dataIndex: ["estado", "nombre"], 
+      dataIndex: ["estado", "nombre"],
       render: (value) => value,
     },
   ];
 
   return (
     <SimpleTableLayout
-      btnGroup={{
-        btnGroup: botones,
-      }}
+      customRender={
+        <Formulario
+          form={form}
+          onFinish={onFinish}
+          botones={botones}
+        />
+      }
     >
-      <Formulario
-        form={form}
-        onFinish={onFinish} 
-      />
       <Tabla
         columns={columns}
         nameURL={endPoint}

+ 17 - 4
src/views/condicionantes/CondicionanteDetalle.jsx

@@ -16,6 +16,10 @@ const selectores = {
     expand: "subproductos",
     ordenar: "nombre-asc",
   },
+  niveles: {
+    name: "nivel",
+    ordenar: "nombre-asc",
+  }
 };
 
 const endpoints = {
@@ -191,9 +195,9 @@ const CondicionanteDetalle = () => {
   return (
     <DefaultLayout>
       <Form layout="vertical" name="basic" form={form} onFinish={onFinish} onFinishFailed={() => { }}>
-        <Row gutter={16}>
+        <Row gutter={[10, 10]}>
           <Col span={24}>
-            <h2>Información del Condicionante</h2>
+            <h1 style={{ marginTop: -10 }}>Información del Condicionante</h1>
           </Col>
           <Col md={8} xs={24}>
             <Form.Item
@@ -245,7 +249,7 @@ const CondicionanteDetalle = () => {
             </Form.Item>
           </Col>
           <Divider style={{ margin: '8px 0', borderColor: 'transparent' }} />
-          <Col md={12} xs={24}>
+          <Col md={8} xs={24}>
             <Form.Item
               label={<Text strong>Fines de Movilización</Text>}
               name="fines"
@@ -264,7 +268,7 @@ const CondicionanteDetalle = () => {
               </Checkbox.Group>
             </Form.Item>
           </Col>
-          <Col md={12} xs={24}>
+          <Col md={8} xs={24}>
             <Form.Item
               label={<Text strong>Tipo de Movilización</Text>}
               name="tipos"
@@ -283,6 +287,15 @@ const CondicionanteDetalle = () => {
               </Checkbox.Group>
             </Form.Item>
           </Col>
+          <Col md={8} xs={24}>
+            <Form.Item
+              label={<Text strong>Nivel</Text>}
+              name="idNivel"
+              rules={[{ required: true, message: 'El nivel es obligatorio.' }]}
+            >
+              <Select modelsParams={selectores.niveles} labelProp="nombre" valueProp="id" />
+            </Form.Item>
+          </Col>
           <Divider style={{ margin: '8px 0', borderColor: 'transparent' }} />
           <Col md={12} xs={24}>
             <Form.Item