2 Commits

  1. 4
      src/pages/InRoadMgm/Stuff/CategroyConf/loadable.jsx
  2. 6
      src/pages/InRoadMgm/Stuff/ModelConf/loadable.jsx
  3. 16
      src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx
  4. 6
      src/pages/InRoadMgm/Stuff/StuffStat/loadable.jsx
  5. 2
      src/pages/OffPeak/OffPeakParkMgm/BookInfo/loadable.jsx
  6. 9
      src/pages/OffPeak/OffPeakParkMgm/BreakInfo/index.scss
  7. 43
      src/pages/OffPeak/OffPeakParkMgm/BreakInfo/loadable.jsx
  8. 3
      src/pages/OffPeak/OffPeakParkMgm/OffPeakParkingRecords/index.scss
  9. 12
      src/services/OffPeak/index.js

4
src/pages/InRoadMgm/Stuff/CategroyConf/loadable.jsx

@ -381,7 +381,7 @@ function CategroyConf(props) {
<div className="yisa-search">
<label>商户名称</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
// allowClear
value={formData.operatorid}
options={getMerchantDataName}
@ -391,7 +391,7 @@ function CategroyConf(props) {
<div className="yisa-search">
<label>物品类型</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
disabled={getOperatorid}
value={formData.brand_id}
options={getOperationName}

6
src/pages/InRoadMgm/Stuff/ModelConf/loadable.jsx

@ -402,7 +402,7 @@ function ModelConf(props) {
<div className="yisa-search">
<label>商户名称</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
// allowClear
value={formData.operator_id}
options={getMerchantDataName}
@ -412,7 +412,7 @@ function ModelConf(props) {
<div className="yisa-search">
<label>物品类型</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
disabled={getModal}
value={formData.model_id}
options={getOperationName}
@ -424,7 +424,7 @@ function ModelConf(props) {
<Input
placeholder="请输入"
value={formData.model_name}
style={{ width: 220 }}
style={{ width: 260 }}
onChange={handleLoginName}
/>
</div>

16
src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx

@ -742,7 +742,7 @@ function StuffMgm(props) {
allowClear={false}
value={formData.region_id}
changeOnSelect
style={{ width: 220, marginLeft: 29 }}
style={{ width: 260, marginLeft: 29 }}
fieldNames={{
label: 'name',
value: 'id',
@ -753,7 +753,7 @@ function StuffMgm(props) {
<div className="yisa-search">
<label>商户名称</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
value={formData.operatorid}
options={getMerchantDataName}
onChange={handleDeployType}
@ -764,7 +764,7 @@ function StuffMgm(props) {
<Input
placeholder="请输入"
value={formData.code}
style={{ width: 220 }}
style={{ width: 260 }}
onChange={handleLoginName}
/>
</div>
@ -773,14 +773,14 @@ function StuffMgm(props) {
<Input
placeholder="请输入"
value={formData.name}
style={{ width: 220 }}
style={{ width: 260 }}
onChange={handleAssetsName}
/>
</div>
<div className="yisa-search">
<label>物品类型</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
value={formData.brand_id}
disabled={getOperatorid}
options={getOperationName}
@ -790,7 +790,7 @@ function StuffMgm(props) {
<div className="yisa-search">
<label>物品型号</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
placeholder="请选择"
value={formData.model_id}
options={getAssetsModel}
@ -801,7 +801,7 @@ function StuffMgm(props) {
<div className="yisa-search">
<label>状态</label>
<Select
style={{ width: 220, marginLeft: 27 }}
style={{ width: 260, marginLeft: 27 }}
placeholder="请选择"
value={formData.status}
onChange={handleStatus}
@ -827,7 +827,7 @@ function StuffMgm(props) {
<div className="yisa-search">
<label>领用人</label>
<Select
style={{ width: 220, marginLeft: 14 }}
style={{ width: 260, marginLeft: 14 }}
placeholder="请选择"
value={formData.uid}
options={getRecipient}

6
src/pages/InRoadMgm/Stuff/StuffStat/loadable.jsx

@ -246,7 +246,7 @@ function StuffStat(props) {
<div className="yisa-search">
<label>商户名称</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
// allowClear
value={formData.operatorid}
options={getMerchantDataName}
@ -256,7 +256,7 @@ function StuffStat(props) {
<div className="yisa-search">
<label>物品类型</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
value={formData.brand_id}
options={getOperationName}
disabled={getOperatorid}
@ -266,7 +266,7 @@ function StuffStat(props) {
<div className="yisa-search">
<label>物品型号</label>
<Select
style={{ width: 220 }}
style={{ width: 260 }}
placeholder="请选择"
value={formData.model_id}
disabled={getOperatorid}

2
src/pages/OffPeak/OffPeakParkMgm/BookInfo/loadable.jsx

@ -58,7 +58,7 @@ function BookInfo(props) {
const formSearch = [
{
type: "Input",
type: "SearchSelect",
label: "车场名称",
placeholder: "请输入",
name: "park_name",

9
src/pages/OffPeak/OffPeakParkMgm/BreakInfo/index.scss

@ -3,4 +3,13 @@
cursor: pointer;
color: #02a7f0;
}
}
.break-info-modal{
.count-setting{
height: 45px;
line-height: 45px;
}
.tip{
color: #cd851f;
}
}

43
src/pages/OffPeak/OffPeakParkMgm/BreakInfo/loadable.jsx

@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect } from "react";
import { message, Pagination, Table, Space, Modal, Button } from "antd";
import { message, Pagination, Table, Space, Modal, Button, InputNumber } from "antd";
// import { dictionary, utils } from "@/config/common";
// import moment from 'moment'
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks';
@ -64,7 +64,7 @@ function BreakInfo() {
查看
</Link>
&emsp;
<span onClick={()=>{setCurrentRecord(record); setVisible(true)}}>修改</span>
<span onClick={()=>{setCurrentRecord(record); setVisible(true); setCount(record.total_remain)}}>修改</span>
</div>
)
}
@ -99,6 +99,8 @@ function BreakInfo() {
const [visible, setVisible] = useState(false)
const [currentRecord,setCurrentRecord] = useState({})
const [count ,setCount] = useState()
const tableRef = useRef()
//
const [total, setTotal] = useState(0);
function search(params) {
@ -114,6 +116,27 @@ function BreakInfo() {
});
}
const countSetting=()=>{
setVisible(true)
setCurrentRecord({})
}
const save = ()=>{
// alert(count)
ajax.updateBreakCount({id: currentRecord.id, count: count}).then(
res=>{
if(res.status == 20000){
message.success(res.message)
setVisible(false)
setCount("")
tableRef.current.fetch()
}else{
message.error(res.message)
}
}
)
}
return (
<>
<TableModule
@ -122,21 +145,31 @@ function BreakInfo() {
formSearch={formSearch}
search={search}
total={total}
ref={tableRef}
// mandatory={'parking_num'}
// mandatory_name={''}
// pagename="PDA"
// pageName={'entryExitOptPDA'}
diyButton={<Button type="primary" style={{width: '130px'}} onClick={()=>setVisible(true)}>违约次数配置</Button>}
diyButton={<Button type="primary" style={{width: '130px'}} onClick={countSetting}>违约次数配置</Button>}
isExport={false}
initFormData={initFormData}
// exportUrl="/api/bpm/record/get_pda_export"
/>
<Modal
open={visible}
wrapClassName="break-info-modal"
title="违约次数配置"
onCancel={()=>{setVisible(false);setCurrentRecord({})}}
okText="保存"
onOk={save}
onCancel={()=>{setVisible(false);setCurrentRecord({});setCount('')}}
>
<div className="count-setting">
<span>剩余可违约次数&emsp;</span>
<InputNumber value={count} max={99} min={0} precision={0} onChange={(e)=>setCount(e)}></InputNumber>
</div>
<div className="tip">
提示: 剩余违约次数为0的用户将不能进行错时预约
</div>
</Modal>
</>

3
src/pages/OffPeak/OffPeakParkMgm/OffPeakParkingRecords/index.scss

@ -5,7 +5,8 @@
.offpeak-record-box {
width: 100%;
height: 600px;
overflow-y: auto;
.ltc-box-title {
font-size: 18px;
font-weight: bolder;

12
src/services/OffPeak/index.js

@ -15,6 +15,14 @@ const getBreakInfoList = (params) => {
data: params,
});
}
// 配置剩余违约次数
const updateBreakCount = (params) => {
return ajax({
url: "/api/off_peak/break_info/update_break_count",
type: "post",
data: params,
});
}
const getStallCountData = (params) => {
return ajax({
url: "/api/off_peak/park_info/get_park_list",
@ -169,6 +177,6 @@ export default {
getRuleLinkList,
getRuleDetailsSelect,
getRuleLinkAdd,
getDelRuleLink
getDelRuleLink,
updateBreakCount
}
Loading…
Cancel
Save