Browse Source

(*)短信提醒完成

dev
ww664853070 1 year ago
parent
commit
6329bdc20d
  1. 2
      api/app/lib/controllers/data/anspectionNotificationPhone.js
  2. 12
      web/client/src/sections/fillion/components/patrolTable.js

2
api/app/lib/controllers/data/anspectionNotificationPhone.js

@ -36,7 +36,7 @@ async function addAnspectionNotificationPhone(ctx) {
})
})
await models.AnspectionNotificationPhone.bulkCreate(dataList);
await transaction.commit();
// await transaction.commit();
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);

12
web/client/src/sections/fillion/components/patrolTable.js

@ -713,6 +713,7 @@ const PatrolTable = (props) => {
const isPatrol = !isRoad && !isAnomaly
const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol';
const [isModalOpen, setIsModalOpen] = useState(false);
const [phoneList, setPhoneList] = useState([]);
const [form] = Form.useForm();
useEffect(() => {
queryData();
@ -823,6 +824,7 @@ const PatrolTable = (props) => {
})
}
console.log(phoneList, '789789789789');
setPhoneList(phoneList)
}, [anspectionNotificationPhoneList])
const showModal = () => {
@ -926,15 +928,7 @@ const PatrolTable = (props) => {
<Form form={form} name="dynamic_form_item" {...formItemLayoutWithOutLabel} >
<Form.List
name="phone"
// rules={[
// {
// validator: async (_, names) => {
// if (!names || names.length < 1) {
// return Promise.reject(new Error('At least 2 passengers'));
// }
// },
// },
// ]}
initialValue={phoneList}
>
{(fields, { add, remove }, { errors }) => (
<>

Loading…
Cancel
Save