Browse Source

fix(): 处理测试提交的bug(车场折扣模糊搜索问题及优化等)

tags/PMS_Frontend_v1.0.6-develop
陈宇航 1 year ago
parent
commit
9b39e77688
  1. 21
      src/components/ParkingRecordModal/RecordReviewModal.jsx
  2. 3
      src/components/ParkingRecordModal/index.scss
  3. 4
      src/pages/OperationCenter/OperationSales/AdsMgm/loadable.jsx
  4. 2
      src/pages/OperationCenter/OperationSales/YardDiscount/DebounceSelect.jsx
  5. 2
      src/pages/OperationCenter/OperationSales/YardDiscount/loadable.jsx

21
src/components/ParkingRecordModal/RecordReviewModal.jsx

@ -285,7 +285,7 @@ const RecordReviewModal = (props) => {
<Select
style={{ width: 200 }}
placeholder="请选择更改项"
disabled={disabledModal}
disabled={disabledModal || resultData?.length > 2}
value={formData?.examine_reason_id || ""}
options={changeProject}
onChange={(v) => {
@ -318,9 +318,24 @@ const RecordReviewModal = (props) => {
disabled={disabledModal}
showTime
format={"YYYY-MM-DD HH:mm:ss"}
disabledDate={(current) => {
if(resultData.length == 1) {
if(resultData[0]?.strEntryTime && resultData[0]?.strExitTime) {
return current && current < moment(resultData[0]?.strEntryTime) || current && current.diff(moment(resultData[0]?.strExitTime), 'day') > 0
}
if(resultData[0]?.strEntryTime) {
return current && current < moment(resultData[0]?.strEntryTime)
}
if(resultData[0]?.strExitTime) {
return current && current > moment(resultData[0]?.strExitTime)
}
}
}}
value={formData?.update_value ? moment(formData?.update_value) : null}
onChange={(date, time) => {
setFormData({ ...formData, update_value: time })
console.log(moment(resultData[0]?.strExitTime).valueOf(), moment(time)?.valueOf());
if(moment(resultData[0]?.strExitTime).valueOf() < moment(time)?.valueOf()) message.error("选择时间不能超过入场时间!")
setFormData({ ...formData, update_value: resultData[0]?.strExitTime })
}}
/>
:
@ -337,7 +352,7 @@ const RecordReviewModal = (props) => {
setFormData({ ...formData, update_value: e.target.value || "" })
}}
/>
<label> </label>
<label> </label>
</>
}
</>

3
src/components/ParkingRecordModal/index.scss

@ -273,6 +273,9 @@
>label {
margin-right: 10px;
}
.ant-picker {
width: 200px;
}
}
.text-area {
margin-top: 15px;

4
src/pages/OperationCenter/OperationSales/AdsMgm/loadable.jsx

@ -1068,6 +1068,8 @@ function AdsMgm() {
className="row-lg"
allowClear
placeholder="请选择"
multiple
maxTagCount="responsive"
fieldNames={{
label: "name",
value: "id",
@ -1298,7 +1300,7 @@ function AdsMgm() {
<div className="r-txt">跳转类型</div>
<div className="r-con">
{rowData?.jumpUrlType == 1 ? "页面URL" : "应用路径"} &emsp;
{rowData?.jumpUrl || ""}
{rowData?.jumpUrlType == 1 ? rowData?.jumpUrl || "" : path_name || ""}
</div>
</div>
<div className="row-line">

2
src/pages/OperationCenter/OperationSales/YardDiscount/DebounceSelect.jsx

@ -63,7 +63,7 @@ const DebounceSelect = ({
filterOption={false}
onSearch={debounceFetcher}
showSearch={true}
notFoundContent={fetching ? <Spin size="small" /> : "暂无数据"}
notFoundContent={fetching ? <Spin size="small" /> : props?.value ? "" : "暂无数据"}
{...props}
options={options}
/>

2
src/pages/OperationCenter/OperationSales/YardDiscount/loadable.jsx

@ -464,6 +464,8 @@ const YardDiscount = () => {
className="form-con"
placeholder="请输入活动名称"
value={modalData?.activity}
maxLength={20}
showCount
onChange={(e) => {
setModalData({
...modalData,

Loading…
Cancel
Save