Browse Source

fix: 问题单修改

tags/PMS_Frontend_v1.0.6-develop
chenglb 1 year ago
parent
commit
e831354156
  1. 1
      src/components/QuickMenu/index.jsx
  2. 44
      src/components/TableModule/index.jsx
  3. 4
      src/pages/OperationCenter/AppMgm/MobileDeviceMgm/loadable.jsx
  4. 4
      src/pages/OperationCenter/AppMgm/WechatMenuMgm/loadable.jsx
  5. 4
      src/pages/OperationCenter/OperationSales/CouponMgm/CouponRules/loadable.jsx
  6. 22
      src/pages/SystemMgm/BusinessConfig/HotCbdConf/loadable.jsx
  7. 5
      src/pages/SystemMgm/BusinessConfig/PageConf/loadable.jsx
  8. 15
      src/pages/SystemMgm/BusinessConfig/VacationConf/index.scss
  9. 9
      src/pages/SystemMgm/BusinessConfig/VacationConf/loadable.jsx

1
src/components/QuickMenu/index.jsx

@ -28,7 +28,6 @@ function QuickMenu(props) {
//
const setDateTimeByPeriod = (periodId) => {
//
let beginMoment = moment().subtract(periodId, 'days').startOf('day')
//

44
src/components/TableModule/index.jsx

@ -145,22 +145,38 @@ const TableModule = forwardRef((props, ref) => {
useEffect(() => {
if (pageName && sessionTabList && Object.values(sessionTabList).length > 0) {
setSessionTabList(sessionTabList)
let temp_obj = {...sessionTabList}
if (sessionTabList.start_time) {
let start_time = sessionTabList.start_time
let end_time = sessionTabList.end_time
searchForm.setFieldsValue({ ...sessionTabList, start_time: moment(start_time), end_time: moment(end_time) })
} else {
if (sessionTabList.in_time) {
searchForm.setFieldsValue({ ...sessionTabList, in_time: moment(sessionTabList.in_time) })
} else {
searchForm.setFieldsValue({ ...sessionTabList })
}
temp_obj.start_time = moment(sessionTabList.start_time)
temp_obj.end_time = moment(sessionTabList.end_time)
}
if(sessionTabList.in_time){
temp_obj.in_time = moment(sessionTabList.in_time)
}
if (sessionTabList.plateValue) {
//console.log(180,sessionTabList.plateValue.match(/:(\S*)/)[1],sessionTabList.plate2)
temp_obj.carId = sessionTabList.plate2
fetchPlateSearch(sessionTabList.plateValue.match(/:(\S*)/)[1], setPlateData, []);
searchForm.setFieldsValue({ ...sessionTabList, carId: sessionTabList.plate2 })
}
searchForm.setFieldsValue(temp_obj)
// if (sessionTabList.start_time) {
// let temp_obj = { ...sessionTabList, start_time: moment(start_time), end_time: moment(end_time) }
// if (sessionTabList.plateValue){
// temp_obj.carId = sessionTabList.plate2
// }
// searchForm.setFieldsValue(temp_obj)
// } else {
// if (sessionTabList.in_time) {
// searchForm.setFieldsValue({ ...sessionTabList, in_time: moment(sessionTabList.in_time) })
// } else {
// searchForm.setFieldsValue({ ...sessionTabList })
// }
// }
// if (sessionTabList.plateValue) {
// fetchPlateSearch(sessionTabList.plateValue.match(/:(\S*)/)[1], setPlateData, []);
// searchForm.setFieldsValue({ ...sessionTabList, carId: sessionTabList.plate2 })
// } // let start_time = sessionTabList.start_time
// let end_time = sessionTabList.end_time
} else {
//console.log(2222224333, searchForm.getFieldsValue())
}
@ -308,6 +324,7 @@ const TableModule = forwardRef((props, ref) => {
if (timeout) {
clearTimeout(timeout);
timeout = null;
return // todo
}
currentValue = value;
const fake = () => {
@ -320,7 +337,8 @@ const TableModule = forwardRef((props, ref) => {
value: item.value,
text: item.label,
}));
callback(plateData);
// callback(plateData);
setPlateData(plateData)
}
})
};
@ -520,7 +538,7 @@ const TableModule = forwardRef((props, ref) => {
onSearch={(newValue) => handlePlateSearch(newValue, item)}
onChange={handlePlateChange}
notFoundContent={null}
options={(plateData || []).map((d) => ({
options={(plateData || [{value: '', text: ''}]).map((d) => ({
value: d.value,
label: d.text,
}))}

4
src/pages/OperationCenter/AppMgm/MobileDeviceMgm/loadable.jsx

@ -43,9 +43,9 @@ function WechatMenuMgm() {
return <div className="mobile-device-mgm">
<div className="content">
<div className="title">青岛收费管理端APP</div>
<div className="row">
<div className="row" >
<span className="name">关于我们</span>
<Input.TextArea value={resultData.description} onChange={(e)=>{setResultData({...resultData, description: e.target.value})}} rows={5} showCount={true} maxLength={300} style={{width: "600px"}}></Input.TextArea>
<Input.TextArea value={resultData.description } autoSize={{ minRows: 8, maxRows: 8 }} onChange={(e)=>{setResultData({...resultData, description: e.target.value})}} rows={5} showCount={true} maxLength={300} style={{width: "600px"}}></Input.TextArea>
</div>
<div className="row">
<span className="name">客服电话</span>

4
src/pages/OperationCenter/AppMgm/WechatMenuMgm/loadable.jsx

@ -307,7 +307,9 @@ function WechatMenuMgm() {
<Input style={{width: '400px',marginLeft:"10px"}} value={rightData.name} onChange={(e)=>{onChange('name',e)}}></Input>
</div>
<div className=" desc">
仅支持中英文和数字, 字数不超过4个汉字或8个字母
{
activeSubmenuIndex > -1 ? '仅支持中英文, 字数不超过4个汉字或8个字母' : '仅支持中英文, 字数不超过8个汉字或16个字母'
}
</div>
<div className="content-row">
{

4
src/pages/OperationCenter/OperationSales/CouponMgm/CouponRules/loadable.jsx

@ -156,6 +156,7 @@ function CouponRules() {
if (res.status == 20000) {
message.success(res.message)
setDeleteModalOpen(false)
setCurrentCouponId('')
getCouponList(params.current)
} else {
message.error(res.message)
@ -260,6 +261,7 @@ function CouponRules() {
//
const addCoupon = ()=>{
setCurrentCouponId('')
setShowEdit(true)
setCurrentCouponInfo({type: 1, mode: 1, partner: '青岛', effective_date: 1})
}
@ -995,7 +997,7 @@ function CouponRules() {
<Modal title="提示" open={showCannotEdit} footer={<Button onClick={()=>{setShowCannotEdit(false)}}>确定</Button>}>
<p>优惠券规则状态为有效或者已经关联活动,无法编辑</p>
</Modal>
<Modal title="提示" open={deleteModalOpen} onOk={confirmDelete} onCancel={()=>{setDeleteModalOpen(false)}}>
<Modal title="提示" open={deleteModalOpen} onOk={confirmDelete} onCancel={()=>{setDeleteModalOpen(false); setCurrentCouponId('')}}>
<p>确认是否删除该优惠券</p>
</Modal>
</div>

22
src/pages/SystemMgm/BusinessConfig/HotCbdConf/loadable.jsx

@ -125,10 +125,10 @@ function HotCbdConf() {
//
function search(params) {
let obj = params;
if(!params.pn){
if(params.pn === undefined){
obj.pn = pageData.pn
obj.size = pageData.size
}else if(!params.area){
}else if(params.area === undefined){
obj.name = formData.name
obj.area = formData.area
}
@ -149,6 +149,10 @@ function HotCbdConf() {
message.error('商圈名称不能为空')
return
}
if(!modalFormData.area){
message.error('所属区域不能为空')
return
}
if(!modalFormData.center_name){
message.error('商圈中心点位名称不能为空')
return
@ -204,7 +208,7 @@ function HotCbdConf() {
icon: <ExclamationCircleOutlined />,
content: '确认删除当前商圈?',
onOk() {
confirmDelete()
confirmDelete(record.id)
},
onCancel() {
console.log('取消');
@ -212,8 +216,8 @@ function HotCbdConf() {
});
}
const confirmDelete = ()=>{
ajax.deleteHotCbd({id: currentRecord.id}).then((res) => {
const confirmDelete = (id)=>{
ajax.deleteHotCbd({id: id}).then((res) => {
if (res.status == 20000) {
search(Object.assign({},formData, pageData))
message.success(res.message)
@ -341,6 +345,7 @@ function HotCbdConf() {
</div>
</div>
<div className="right-list">
<span className="font">共检索到&ensp;<span style={{color: '#3B97FF'}}>{total}</span>&ensp;条结果</span>
<div className="table-wrap">
<Table
rowKey="id"
@ -369,9 +374,14 @@ function HotCbdConf() {
<Modal
open={detailVisible}
width={800}
width={820}
title={'商圈配置'}
onCancel={() => {
setModalFormData({
name: '',
area: '',
center_name: ''
})
setDetailVisible(false);
}}
onOk={saveModal}

5
src/pages/SystemMgm/BusinessConfig/PageConf/loadable.jsx

@ -10,6 +10,7 @@ import "./index.scss";
// import { useLocation } from "react-router-dom";
function PageConf() {
const [list , setList] = useState([])
const [total, setTotal] = useState(0)
const [type, setType] = useState('-1')
const [scrollHeight, setScrollHeight] = useState(0)
const rightListRef = useRef(null)
@ -64,6 +65,7 @@ function PageConf() {
ajax.getOverviewConfigList({type: value ? value: type, pn: 1, page_size: 20, size: 20}).then((res)=>{
if(res.status == 20000){
setList(res.data)
setTotal(res.total)
}else{
message.error(res.message)
}
@ -88,7 +90,7 @@ function PageConf() {
<div className="left-search">
<FormSelect
yisaLabel="所属系统"
yisaData={[{value: '-1', label: '全部'},{value: '1', label: '路内'},{value: '2', label: '路外'}]}
yisaData={[{value: '-1', label: '全部'},{value: '1', label: '路内停车场系统'},{value: '2', label: '路外停车场系统'}]}
defaultValue={ type }
placeholder=""
hasUnlimited={ false }
@ -102,6 +104,7 @@ function PageConf() {
</div>
</div>
<div className="right-list" ref={(e)=>{rightListRef.current = e; if(e){setScrollHeight(e.offsetHeight - 100)}}}>
<span className="font">共检索到&ensp;<span style={{color: '#3B97FF'}}>{total}</span>&ensp;条结果</span>
<Table
columns={columns}
dataSource={list}

15
src/pages/SystemMgm/BusinessConfig/VacationConf/index.scss

@ -37,6 +37,21 @@ $color-primary : var(--color-primary);
margin-left: 5px;
margin-bottom: 5px;
}
.vc-name{
height: 54px;
overflow-y: auto;
&::-webkit-scrollbar{
width: 4px;
background-color: #4f5a6e;
}
&::-webkit-scrollbar-thumb{
width: 4px;
background-color: #8b95b2;
}
&::-webkit-scrollbar-track{
width: 4px;
}
}
tr:nth-child(1) .calendar-item{
margin-top: 5px;
}

9
src/pages/SystemMgm/BusinessConfig/VacationConf/loadable.jsx

@ -93,15 +93,16 @@ function VacationConf() {
})
}else{
ajax.editVacationConfig({
let temp_param = {
vacation_name: vacationName,
vacation_start_date: startDate.format('YYYY-MM-DD'),
vacation_end_date: endDate.format('YYYY-MM-DD'),
id: rightDetailData.id
}).then((res)=>{
}
ajax.editVacationConfig(temp_param).then((res)=>{
if(res.status == 20000){
message.success('修改成功')
setRightDetailData(temp_param)
setModalVisible(false)
getVacationData()
}else{
@ -156,7 +157,7 @@ function VacationConf() {
<div>{date.format('DD')}</div>
{
temp_vc_name ? <div>{temp_vc_name}</div> : null
temp_vc_name ? <div className="vc-name">{temp_vc_name}</div> : null
}
</div>
}

Loading…
Cancel
Save