-
《
-
- {
- getTabData &&
- getTabData.map((item, index) => {
- return
onClickData(item)}>{item.text}
- })
- }
+
+
{
+ // 不能小于0
+ getValue &&
+ setGetValue(getValue - 1)
+ }
+ }>《
+ {/* 外层做显示区域,里边元素滚动 */}
+
+
+ {
+ getTabData &&
+ getTabData.map((item, index) => {
+ return
onClickData(item)}>{item.text}
+ })
+ }
+
-
》
+
{
+ getValue < getTabData.length -1 &&
+ setGetValue(getValue + 1)
+ }
+ }
+ >》
{
diff --git a/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx
index 91ca106..4f0cafb 100644
--- a/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx
+++ b/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx
@@ -288,9 +288,9 @@ function WorkerStat(props) {
limit={730}
dropdownData={[
{ text: "昨天", value: 1 },
- { text: "近30天", value: -29 },
- { text: "近90天", value: -89 },
- { text: "近180天", value: -179 },
+ { text: "近30天", value: 30 },
+ { text: "近90天", value: 90 },
+ { text: "近180天", value: 180 },
]}
/>
diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss
index 19b9879..74ef081 100644
--- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss
+++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss
@@ -378,6 +378,7 @@ $color-primary: var(--color-primary);
}
.deal-btn {
text-align: end;
+ margin-top: 20px;
.submit {
width: 100px;
height: 34px;
diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
index ee68ab7..96ddceb 100644
--- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
+++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
@@ -36,6 +36,7 @@ function CallbackSuggestion(props) {
const [imgVisible, setImgVisible] = useState(false)
const [orderVisible, setOrderVisible] = useState(false)
const [evidenceVisible, setEvidenceVisible] = useState(false)
+
//物品型号
const handleAdviseType = (value) => {
setFormData({ ...formData, adviseType: value })
@@ -100,10 +101,12 @@ function CallbackSuggestion(props) {
dataIndex: 'parkRecordId',
key: 'parkRecordId',
render: (text, record) => {
- return
+ return <>
+
+ >
}
},
{
@@ -371,32 +374,35 @@ function CallbackSuggestion(props) {
const [submitDeploy, setSubmitDeploy] = useState({})
//提交审核
const onChangeReason = (value) => {
- setSubmitDeploy({ ...submitDeploy, content: value.target.value })
+ setSubmitDeploy({ ...submitDeploy, deal_reason: value.target.value })
}
const [getValueList, setGetValueList] = useState({})
const handleChoose = (value) => {
setGetValueList(value)
- setSubmitDeploy({ ...submitDeploy, adviseType: value })
+ setSubmitDeploy({ ...submitDeploy, change_content: value })
}
+ const [getAdjustTimeValue, setGetAdjustTimeValue] = useState(1)
const handleAdjust = (value) => {
- setSubmitDeploy({ ...submitDeploy, adjustTime: value })
+ setGetAdjustTimeValue(value)
}
const handleAdjustTime = (v, dateString) => {
- setSubmitDeploy({ ...submitDeploy, changeTime: dateString })
+ setSubmitDeploy({ ...submitDeploy, update_value: dateString })
}
const handlePlateColor = (v) => {
- setSubmitDeploy({ ...submitDeploy, plateColor: v })
+ setSubmitDeploy({ ...submitDeploy, plate_type: v })
}
const handlePlateNumber = (v) => {
- setSubmitDeploy({ ...submitDeploy, plateNumber: v.target.value })
+ setSubmitDeploy({ ...submitDeploy, update_value: v.target.value })
}
const handleAdd = (v) => {
setSubmitDeploy({ ...submitDeploy, add: v })
}
const handleAddCount = (v) => {
- setSubmitDeploy({ ...submitDeploy, addCount: v.target.value })
+ setSubmitDeploy({ ...submitDeploy, update_value: v.target.value })
+ }
+ const handleComeTime = (v) => {
+ setSubmitDeploy({ ...submitDeploy, update_value: v.target.value })
}
-
const cancelBtn = () => {
setOrderVisible(false)
}
@@ -653,7 +659,7 @@ function CallbackSuggestion(props) {
)
})
- :''
+ : ''
}
@@ -814,6 +820,7 @@ function CallbackSuggestion(props) {
-
+ {
+ getAdjustTimeValue === 1 ?
+
: ''
+ }
+ {
+ getAdjustTimeValue === 2 ?
+
+
+
+
+
: ''
+ }
> : ''
}
{
@@ -875,6 +901,7 @@ function CallbackSuggestion(props) {
}>
+
+
+ >
+ },
+ }]
+ //查看弹窗
+ const [getRecordData, setGetRecordData] = useState([])
+ const CheckBtn = (record) => {
+ setGetRecordData(Object.assign({}, getRecordData, {
+ road_name: record.road_name,
+ phone: record.phone,
+ plate: record.plate,
+ status: record.status,
+ method: record.method,
+ order_amount: record.order_amount,
+ phone: record.phone,
+ phone: record.phone,
+ }))
+ setEditVisible(true)
+ }
+ const editModal = () => {
+ setEditVisible(false)
+ }
+ //重置数据
+ const getResetData = () => {
+ setFormData({
+ ...parameter
+ })
+ getData({ ...parameter })
+ }
+ // 获取列表数据
+ const getData = (data = formData) => {
+ setAjaxLoading(true)
+ ajax.getComplainList(data).then(res => {
+ setAjaxLoading(false)
+ if (res.status === 20000) {
+ let resDataArr = res.data.list.map((item) => {
+ item.key = item.id
+ return item
+ })
+ setResultData({
+ ...resultData,
+ data: resDataArr,
+ total_records: res.data.total
+ })
+ } else {
+ setResultData({
+ data: [],
+ total_records: 0,
+ export_url: '',
+ process_url: ""
+ })
+ message.error(res.message)
+ }
+ }, err => {
+ console.log(err)
+ })
+ }
+ //切换分页
+ const changePn = (pn, length) => {
+ if (lastFormData.page_size === length) {
+ setLastFormData(Object.assign({}, lastFormData, { pn: pn }))
+ lastFormDataRef.current = Object.assign({}, lastFormData, { pn: pn })
+ getData(Object.assign({}, lastFormData, { pn: pn }))
+ }
+ }
+ //切换每页条数
+ const changeLength = (pn, length) => {
+ setFormData(Object.assign({}, formData, { pn: 1, page_size: length }))
+ setLastFormData(Object.assign({}, lastFormData, { pn: 1, page_size: length }))
+ lastFormDataRef.current = Object.assign({}, lastFormData, { pn: 1, page_size: length })
+ getData(Object.assign({}, lastFormData, { pn: 1, page_size: length }))
+ }
+ //检索数据
+ const getSearchData = (data = formData) => {
+ getData(data)
+ }
+ const placeBtn = () => {
+ setEditVisible(false)
+ }
+ const [sessionTabList, setSessionTabList] = useSessionStorageState('ComplainManage', {
+ value: {
+ }
+ })
+ useEffect(() => {
+ console.log(location)
+ if (sessionTabList && Object.values(sessionTabList).length > 0) {
+ setFormData({
+ road: sessionTabList?.road,
+ phone: sessionTabList?.phone,
+ plate: sessionTabList?.plate,
+ method: sessionTabList?.method,
+ start_time: sessionTabList?.start_time,
+ end_time: sessionTabList?.end_time,
+ serial_number: sessionTabList?.serial_number,
+ })
+ }
+ }, [])
+ useEffect(() => {
+ setSessionTabList({
+ ...formData
+ })
+ }, [formData])
+ useEffect(() => {
+ getData()
+ }, [])
+ return <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ } onClick={() => { getSearchData() }}>
+ 搜索
+
+ } onClick={() => { getResetData() }}>
+ 清空
+
+
+
+
+
+
+
+
共检索到{resultData.total_records}条结果
+
+
+ `共 ${resultData.total_records} 条`}
+ total={resultData.total_records}
+ current={lastFormData.pn}
+ pageSize={lastFormData.page_size}
+ pageSizeOptions={pageSizeOptions}
+ onChange={changePn}
+ onShowSizeChange={changeLength}
+ />
+
+
+
+
+
+
+
+ 订单信息
+
+
+
+
+ 停车场名称:
+
+
+ {getRecordData.road_name}
+
+
+
+
+ 手机号:
+
+
+ {getRecordData.phone}
+
+
+
+
+ 车牌号:
+
+
+ {getRecordData.plate}
+
+
+
+
+ 同步MS状态:
+
+
+ {getRecordData.phone}
+
+
+
+
+ 订购时间:
+
+
+ {getRecordData.status === 1 ? '同步失败' : '同步成功'}
+
+
+
+
+ 支付方式:
+
+
+ {getRecordData.method}
+
+
+
+
+ 订单金额:
+
+
+ {getRecordData.order_amount}
+
+
+
+
+ 商品信息
+
+
+
+
+ 销售金额:
+
+
+ {getRecordData.price}
+
+
+
+
+ 有效时间:
+
+
+ {getRecordData.effective_date}
+
+
+
+
+
+
+
+ >
}
export default ComplainManage;
\ No newline at end of file
diff --git a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/index.scss b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/index.scss
index 2c072e5..147f43e 100644
--- a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/index.scss
+++ b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/index.scss
@@ -1,9 +1,8 @@
@import "@/assets/css/mixin.scss";
-$color-container-bg : var(--color-container-bg);
-$color-user-list-bg : var(--color-user-list-bg);
-$color-text : var(--color-text);
-$color-primary : var(--color-primary);
-
+$color-container-bg: var(--color-container-bg);
+$color-user-list-bg: var(--color-user-list-bg);
+$color-text: var(--color-text);
+$color-primary: var(--color-primary);
.colorBtn {
width: 90px;
@@ -37,50 +36,52 @@ $color-primary : var(--color-primary);
border-radius: 4px;
}
}
-.paid-StaggeredOrder{
+.paid-StaggeredOrder {
display: flex;
padding: 15px;
width: 100%;
- .paid-search{
- .search{
+ .paid-search {
+ .search {
font-size: 16px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Bold;
font-weight: 700;
text-align: left;
color: #eeeff1;
}
- label{
- margin:0 10px;
+ label {
+ margin: 0 10px;
}
- .yisa-search{
+ .yisa-search {
margin-top: 10px;
display: flex;
- label{
+ label {
line-height: 31px;
}
}
- .ant-select:not(.ant-select-customize-input) .ant-select-selector{
+ .ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: #50586c !important;
}
- .ant-select-arrow .anticon{
+ .ant-select-arrow .anticon {
background-color: #50586c !important;
}
- .ant-input:placeholder-shown{
+ .ant-input:placeholder-shown {
background-color: #50586c !important;
}
- .timePicker{
+ .timePicker {
width: 350px;
margin-top: 22px;
- .btnBox{
- display:flex ;
- margin-top: 20px;
- .yisa-btn{
- margin-left: 20px;
- width: 85px;
- }
- .root_gfkk{
- margin-left: 20px;
- .export-content{
+ .btnBox {
+ display: flex;
+ margin-top: 20px;
+ .yisa-btn {
+ margin-left: 20px;
+ width: 85px;
+ }
+ .root_gfkk {
+ margin-left: 20px;
+ .export-content {
width: 130px;
height: 33px;
display: flex;
@@ -92,80 +93,92 @@ $color-primary : var(--color-primary);
color: #fff;
margin-right: 10px;
}
- }
-
}
+ }
}
}
- .scheduleBtn{
+ .scheduleBtn {
background: #409eff;
- border: none;
- border-radius: 4px;
- cursor: pointer;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
}
-
- .paid-result{
+
+ .paid-result {
width: 100%;
height: 834px;
background: #505a6f;
border-radius: 20px;
margin-left: 17px;
- .result{
+ .result {
padding: 25px;
- .font{
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+ .font {
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Regular;
font-weight: 400;
text-align: left;
color: #eeeff1;
margin-bottom: 10px;
display: inline-block;
-
- em{
+
+ em {
color: #3aa8fe;
margin: 0 5px;
}
}
- .yisa-table .ant-table-thead .ant-table-cell{
+ .yisa-table .ant-table-thead .ant-table-cell {
background-color: #616b83 !important;
- color: #ffffff !important;
- font-size: 14px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
+ color: #ffffff !important;
+ font-size: 14px;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Bold;
+ font-weight: 700;
text-align: center;
border-right: none !important;
border-top-color: #888f9d !important;
border-color: #888f9d !important;
}
- .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table, .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table{
+ .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table,
+ .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table {
border-top: none !important;
border-left: none !important;
}
- .ant-table-tbody .ant-table-row .ant-table-cell{
+ .ant-table-tbody .ant-table-row .ant-table-cell {
background-color: #3e4557 !important;
color: #ffffff !important;
text-align: center;
font-size: 14px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Regular;
font-weight: 400;
border-right: none !important;
border-left: none !important;
border-bottom-color: #626b7e !important;
}
}
-
+ .status-color {
+ color: red;
+ }
+ .status-bg {
+ color: rgb(56, 174, 56);
+ }
}
-
}
-.revenue{
- .tab-title{
+.revenue {
+ .tab-title {
text-align: center;
font-size: 18px;
font-weight: 400;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Regular;
}
width: 700px !important;
- .tab-index{
- .tab-top{
+ .tab-index {
+ .tab-top {
display: flex;
margin-top: 10px;
height: 30px;
@@ -173,25 +186,27 @@ $color-primary : var(--color-primary);
white-space: nowrap;
overflow: hidden;
border-bottom: 1px solid #e4e7ed;
- .tab-li{
+ .tab-li {
margin-left: 20px;
cursor: pointer;
}
- .active{
- color:#409eff ;
+ .active {
+ color: #409eff;
cursor: pointer;
margin-left: 20px;
border-bottom: 1px solid #409eff !important;
margin-bottom: -1px !important;
}
}
- .tab-bottom{
- .yisa-tab{
- .ant-table-cell{
+ .tab-bottom {
+ .yisa-tab {
+ .ant-table-cell {
background-color: #616b83 !important;
color: #ffffff !important;
font-size: 14px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Bold;
font-weight: 700;
text-align: center;
border-right: none !important;
@@ -202,32 +217,37 @@ $color-primary : var(--color-primary);
}
}
}
-.roadModal{
+.roadModal {
width: 900px !important;
- .table{
+ .table {
width: 780px;
margin-left: 40px;
- .yisa-table .ant-table-thead .ant-table-cell{
+ .yisa-table .ant-table-thead .ant-table-cell {
background-color: #616b83 !important;
- color: #ffffff !important;
- font-size: 14px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
+ color: #ffffff !important;
+ font-size: 14px;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Bold;
+ font-weight: 700;
text-align: center;
border-right: none !important;
border-top-color: #888f9d !important;
border-color: #888f9d !important;
}
- .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table, .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table{
+ .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table,
+ .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table {
border-top: none !important;
border-left: none !important;
}
- .ant-table-tbody .ant-table-row .ant-table-cell{
+ .ant-table-tbody .ant-table-row .ant-table-cell {
background-color: #3e4557 !important;
color: #ffffff !important;
text-align: center;
font-size: 14px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+ font-family:
+ Microsoft YaHei,
+ Microsoft YaHei-Regular;
font-weight: 400;
border-right: none !important;
border-left: none !important;
@@ -235,38 +255,94 @@ $color-primary : var(--color-primary);
}
}
}
-.operateBtn{
- div{
+.operateBtn {
+ div {
cursor: pointer;
margin-top: 5px;
}
}
-.add{
+.add {
margin-left: 100px;
- .yisa-search{
+ .yisa-search {
margin-top: 20px;
}
- .submitBtn{
+ .submitBtn {
margin-left: 54px;
margin-top: 20px;
- .submit{
+ .submit {
width: 80px;
- height: 35px;
- background: #409eff;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- color: #fff;
+ height: 35px;
+ background: #409eff;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ color: #fff;
}
- .cancel{
- width: 80px;
- height: 35px;
- background: #fff;
- border: none;
- border-radius: 4px;
- color: #3e4557;
- cursor: pointer;
- margin-left: 20px;
+ .cancel {
+ width: 80px;
+ height: 35px;
+ background: #fff;
+ border: none;
+ border-radius: 4px;
+ color: #3e4557;
+ cursor: pointer;
+ margin-left: 20px;
+ }
+ }
+}
+.check-detail {
+ .carTitle {
+ .font {
+ font-weight: 700;
+ font-size: 16px;
+ border-left: 6px solid #409eff;
+ padding-left: 8px;
+ height: 20px;
+ line-height: 20px;
+ margin-bottom: 20px;
}
}
-}
\ No newline at end of file
+ .order-msg {
+ margin-left: 15%;
+ .order {
+ margin-top: 20px;
+ .message {
+ color: white;
+ width: 30%;
+ display: inline-block;
+ text-align: left;
+ }
+ span:nth-of-type(2){
+ display: inline-block;
+ width: 65%;
+ }
+ .status-color {
+ color: red;
+ }
+ .status-bg {
+ color: rgb(56, 174, 56);
+ }
+ }
+ }
+ .sale-msg{
+ margin-left: 15%;
+ .order {
+ margin-top: 20px;
+ .message {
+ color: white;
+ width: 30%;
+ display: inline-block;
+ text-align: left;
+ }
+ span:nth-of-type(2){
+ display: inline-block;
+ width: 65%;
+ }
+ }
+ }
+ .submitBtn{
+ text-align: center;
+ margin-top: 30px;
+ cursor: pointer;
+ }
+}
diff --git a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx
index 6b9b66f..8291334 100644
--- a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx
+++ b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredOrder/loadable.jsx
@@ -35,10 +35,7 @@ function StaggeredOrder(props) {
const [formData, setFormData] = useState(parameter)
const [lastFormData, setLastFormData] = useState(formData)
const lastFormDataRef = useRef(formData)
- const [checkVisible, setCheckVisible] = useState(false)
const [editVisible, setEditVisible] = useState(false)
- const [getSelectStatus, setGetSelectStatus] = useState(true)
- const [addVisible, setAddVisible] = useState(false)
//停车场名称
@@ -130,8 +127,13 @@ function StaggeredOrder(props) {
},
{
title: '同步MS状态',
- dataIndex: 'status',
- key: 'status',
+ render: (text, record) => {
+ return <>
+
+ {record.status === 1 ? '同步失败' : '同步成功'}
+
+ >
+ }
},
{
title: '订购时间',
@@ -154,32 +156,18 @@ function StaggeredOrder(props) {
//查看弹窗
const [getRecordData, setGetRecordData] = useState([])
const CheckBtn = (record) => {
- let data = {
- id: record.id
- }
- ajax.checkGoods(data).then(res => {
- if (res.status === 20000) {
- setCheckVisible(true)
- setGetRecordData([res.data])
-
- }
- })
+ setGetRecordData(Object.assign({}, getRecordData, {
+ road_name: record.road_name,
+ phone: record.phone,
+ plate: record.plate,
+ status: record.status,
+ method: record.method,
+ order_amount: record.order_amount,
+ phone: record.phone,
+ phone: record.phone,
+ }))
+ setEditVisible(true)
}
- const checkModal = () => {
- setCheckVisible(false)
- }
- //编辑弹窗
- const [getEditData, setGetEditData] = useState({
- region_id: '',//区域
- operatorid: '',
- code: '',
- name: '',
- brand_id: '',
- model_id: '',
- status: '',
- uid: ''
- })
- const [getId, setGetId] = useState({})
const editModal = () => {
setEditVisible(false)
}
@@ -190,13 +178,6 @@ function StaggeredOrder(props) {
})
getData({ ...parameter })
}
- const handleDetail = () => {
- let result = [...handleDeColumns];
- return result;
- }
- const handleDeColumns = [
-
- ]
// 获取列表数据
const getData = (data = formData) => {
setAjaxLoading(true)
@@ -244,101 +225,7 @@ function StaggeredOrder(props) {
const getSearchData = (data = formData) => {
getData(data)
}
- //添加
- const addData = () => {
- setAddVisible(true)
- }
- const addModal = () => {
- setAddVisible(false)
- }
- let param = {
- region_id: '',//区域
- operatorid: '',
- code: '',
- name: '',
- brand_id: '',
- model_id: '',
- status: '',
- uid: ''
- }
- const [checkData, setCheckData] = useState(param)
- const onChange = (newValue) => {
- setCheckData(
- Object.assign({}, checkData, { region_id: newValue })
- );
- };
- //物品编号
- const handleAddLoginName = (v) => {
- setCheckData({ ...checkData, code: v.target.value })
- }
- //物品名称
- const handleAddAssetsName = (v) => {
- setCheckData({ ...checkData, name: v.target.value })
- }
- //状态
- const handleAddStatus = (v) => {
- setCheckData({ ...checkData, status: v })
- if (v == 0) {
- setGetSelectStatus(false)
- }
- if (v == 1) {
- setGetSelectStatus(true)
- }
- }
- const placeSaveBtn = () => {
- let data = {
- ...checkData,
- }
- if (checkData.region_id == '') {
- message.error('请选择区域')
- } else if (checkData.operatorid == '') {
- message.error('请选择商户')
- } else if (checkData.code == '') {
- message.error('请输入物品编号')
- } else if (checkData.name == '') {
- message.error('请输入物品名称')
- } else if (checkData.brand_id == '') {
- message.error('请选择物品类型')
- } else if (checkData.model_id == '') {
- message.error('请选择物品型号')
- } else {
- ajax.saveData(data).then((res) => {
- if (res.status === 20000) {
- setAddVisible(false)
- getData(formData)
- }
- })
- }
-
- }
- const editBtn = () => {
- let data = {
- ...getEditData,
- id: getId.id,
- }
- if (getEditData.region_id == '') {
- message.error('请选择区域')
- } else if (getEditData.operatorid == '') {
- message.error('请选择商户')
- } else if (getEditData.code == '') {
- message.error('请输入物品编号')
- } else if (getEditData.name == '') {
- message.error('请输入物品名称')
- } else if (getEditData.brand_id == '') {
- message.error('请选择物品类型')
- } else if (getEditData.model_id == '') {
- message.error('请选择物品型号')
- } else {
- ajax.saveEditData(data).then((res) => {
- if (res.status === 20000) {
- setEditVisible(false)
- getData(formData)
- }
- })
- }
- }
const placeBtn = () => {
- setAddVisible(false)
setEditVisible(false)
}
const [sessionTabList, setSessionTabList] = useSessionStorageState('StaggeredOrder', {
@@ -349,14 +236,13 @@ function StaggeredOrder(props) {
console.log(location)
if (sessionTabList && Object.values(sessionTabList).length > 0) {
setFormData({
- region_id: sessionTabList?.region_id,//区域
- code: sessionTabList?.code,//物品编号
- brand_id: sessionTabList?.brand_id,//物品类型
- model_id: sessionTabList?.model_id,//物品型号
- operatorid: sessionTabList?.operatorid,//商户名称
- name: sessionTabList?.name,//物品名称
- status: sessionTabList?.status,//状态
- uid: sessionTabList?.uid,//领用人
+ road: sessionTabList?.road,
+ phone: sessionTabList?.phone,
+ plate: sessionTabList?.plate,
+ method: sessionTabList?.method,
+ start_time: sessionTabList?.start_time,
+ end_time: sessionTabList?.end_time,
+ serial_number: sessionTabList?.serial_number,
})
}
}, [])
@@ -365,17 +251,8 @@ function StaggeredOrder(props) {
...formData
})
}, [formData])
- const [getMerchantDataName,setGetMerchantDataName]=useState([])
- const merchantDataName=()=>{
- ajax.getPayData().then(res=>{
- if(res.status===20000){
- setGetMerchantDataName(res)
- }
- })
- }
useEffect(() => {
getData()
- merchantDataName()
}, [])
return <>
@@ -413,7 +290,7 @@ function StaggeredOrder(props) {
@@ -483,142 +360,97 @@ function StaggeredOrder(props) {