Browse Source

feat():增加电桩型号以及设备供应商页面

tags/PMS_V1.0.0_Alpha5
guoxin 1 year ago
parent
commit
58a67439cf
  1. 21
      demin.json
  2. 2
      src/components/TableModule/index.jsx
  3. 193
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/EditModal.jsx
  4. 199
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/FormModal.jsx
  5. 61
      src/pages/NewEnergy/ChargeDeviceMgm/ElectricModal/index.scss
  6. 203
      src/pages/NewEnergy/ChargeDeviceMgm/ElectricModal/loadable.jsx
  7. 6
      src/pages/NewEnergy/ChargeDeviceMgm/EquipmentSupplier/index.jsx
  8. 246
      src/pages/NewEnergy/ChargeDeviceMgm/EquipmentSupplier/index.scss
  9. 236
      src/pages/NewEnergy/ChargeDeviceMgm/EquipmentSupplier/loadable.jsx
  10. 13
      src/services/NewEnergy/ChargeDeviceMgm.js
  11. 32
      src/services/NewEnergy/EquipmentSupplier.js
  12. 2
      src/services/NewEnergy/index.js

21
demin.json

@ -0,0 +1,21 @@
{
"status": 20000,
"messgae": "",
"data": {
"list": [
{
"producer_name": "供应商名称",
"code": "供应商组织结构代码",
"contacts": "联系人",
"phone": "联系电话"
},
{
"producer_name": "供应商名称",
"code": "供应商组织结构代码",
"contacts": "联系人",
"phone": "联系电话"
}
],
"total": 1000
}
}

2
src/components/TableModule/index.jsx

@ -322,7 +322,7 @@ const TableModule = forwardRef((props, ref) => {
setAreaSelectedList([])
searchForm.resetFields();
setFormData({ ...searchForm.getFieldsValue(), plateValue: '' })
//search({ ...searchForm.getFieldsValue() })
search({ ...searchForm.getFieldsValue() })
setTimeGroup({
timeType: '1',
timeRanges: {

193
src/pages/InRoadMgm/BusinessMgm/ChargeRules/EditModal.jsx

@ -21,10 +21,10 @@ const FormModal = (props) => {
const {
yisaData = {},
editVisible,
setGetEditVisible=()=>{},
setGetEditVisible = () => { },
editModal = () => { },
getEditData = {},
getData=()=>{}
getData = () => { }
} = props
//
const [form] = Form.useForm();
@ -40,9 +40,9 @@ const FormModal = (props) => {
evFreeTime: '',
evCarDiscount: '',
disabledFreeTime: '',
disability_time:'',
disability_time: '',
disabledCarDiscount: '',
new_energy_time:"",
new_energy_time: "",
rules: [
{
"cdate": null,
@ -222,20 +222,20 @@ const FormModal = (props) => {
//
data['rules'].map(item => {
console.log(item);
item.details.map(item=>{
item.details.map(item => {
item["start"] = moment(item["start"]).format('HH:mm');
item["end"] = moment(item["end"]).format('HH:mm');
})
if (item.cdate) {
item["cdate"] = moment(item["cdate"]).format('YYYY-MM-DD HH:mm:ss');
item["cdate"] = moment(item["cdate"]).format('YYYY-MM-DD HH:mm:ss');
}
})
if(handleFormValidation(data,0)&&handleFormValidation(data,1)){
if (handleFormValidation(data, 0) && handleFormValidation(data, 1)) {
// let newData = handelDate(data, 1)
let i = data
const {rules,...rest} = i
const source = { source:{ ...rest,rules:rules}};
i={ ...rest,...source,rule_id:getNewObjData.id}
const { rules, ...rest } = i
const source = { source: { ...rest, rules: rules } };
i = { ...rest, ...source, rule_id: getNewObjData.id }
ajax.deleteChangeRules(i).then(res => {
if (res.status === 20000) {
setGetEditVisible(false)
@ -244,20 +244,20 @@ const FormModal = (props) => {
})
}
};
const [getNewObjData,setgetNewObjData]=useState({})
const [getNewObjData, setgetNewObjData] = useState({})
console.log(getNewObjData);
useEffect(() => {
if(yisaData){
if (yisaData) {
let newObj = { ...defaultData }
if (JSON.stringify(yisaData) != "{}") {
newObj = handelDate(yisaData, 2)
}
newObj.rules = newObj?.source?.rules
// delete newObj.source
//
init(newObj);
setgetNewObjData(newObj)
form.setFieldsValue(newObj);
//
init(newObj);
setgetNewObjData(newObj)
form.setFieldsValue(newObj);
}
}, [yisaData]);
@ -294,8 +294,8 @@ const FormModal = (props) => {
//
const newItems = {
//
const newItems = {
"type": '',
"segment": '',
"threshold": '',
@ -337,35 +337,35 @@ const FormModal = (props) => {
//
const init = (newObj) => {
console.log("11111111111newObj",newObj)
if(newObj.rules==null){
console.log("11111111111newObj", newObj)
if (newObj.rules == null) {
return;
}
if(newObj.rules[0].holiday.length>0){
if (newObj.rules[0].holiday.length > 0) {
setGetValueData(2)
}else{
} else {
newObj.rules[0].holiday = defaultData.rules[0].holiday;
}
if(newObj.rules[0].details.length>0){
if (newObj.rules[0].details.length > 0) {
for (let i = 0; i < newObj.rules[0].details.length; i++) {
for (let z = 0; z < newObj.rules[0].details[i].items.length; z++) {
handleOptionsProcessing(i, z, options,0);
handleOptionsProcessing(i, z, options, 0);
}
}
}
if(newObj.rules[0].holiday.length>0){
if (newObj.rules[0].holiday.length > 0) {
for (let i = 0; i < newObj.rules[0].holiday.length; i++) {
for (let z = 0; z < newObj.rules[0].holiday[i].items.length; z++) {
handleOptionsProcessing(i, z, options,1);
handleOptionsProcessing(i, z, options, 1);
}
}
}
}
//
const handleFormValidation = (data,type) => {
const handleFormValidation = (data, type) => {
const validationData = type == 0 ? data.rules[0].details : data.rules[0].holiday
//
if(type===1 &&validationData.length==0){
if (type === 1 && validationData.length == 0) {
return true;
}
let flag = false;
@ -379,18 +379,18 @@ const FormModal = (props) => {
const endTime = moment(isData.end, "HH:mm");
const startTime = moment(isData.start, "HH:mm");
const duration = Math.ceil(endTime.diff(startTime, "seconds") / 60);
console.log("endTime:"+ endTime + "-- startTime:" + startTime+"-- duration:"+duration); // details
console.log("endTime:" + endTime + "-- startTime:" + startTime + "-- duration:" + duration); // details
totalMinutes += duration; //
});
const totalHours = Math.floor(totalMinutes / 60);
const remainingMinutes = totalMinutes % 60;
console.log("当前区间时间总和", totalHours + ":" + remainingMinutes); // details
//holiday
const copyData = {...data};
if(getValueData !=2 ){
const copyData = { ...data };
if (getValueData != 2) {
data.rules[0].holiday = [];
}else{
copyData.length==0?data.rules[0].holiday = defaultData.rules[0].holiday:copyData
} else {
copyData.length == 0 ? data.rules[0].holiday = defaultData.rules[0].holiday : copyData
}
if (totalHours === 23 && remainingMinutes === 59) {
flag = true;
@ -408,7 +408,7 @@ const FormModal = (props) => {
const currentFormValues = form.getFieldsValue();
const data = type == 0 ? currentFormValues.rules[0].details : currentFormValues.rules[0].holiday
//
if (!handleValidation(data,type)) {
if (!handleValidation(data, type)) {
return;
}
//
@ -421,11 +421,11 @@ const FormModal = (props) => {
rules: [type == 0 ? { ...currentFormValues.rules[0], details: updatedDetailsOrHoliday } : { ...currentFormValues.rules[0], holiday: updatedDetailsOrHoliday }]
});
//-
handleOptionsProcessing(data.length, 0, options,type);
handleOptionsProcessing(data.length, 0, options, type);
console.log("当前表单", currentFormValues);
}
//&&-
const handleValidation = (data,type) => {
const handleValidation = (data, type) => {
let flag = true;
//24,,
let totalMinutes = 0; // 0
@ -438,7 +438,7 @@ const FormModal = (props) => {
const endTime = moment(isData.end, "HH:mm");
const startTime = moment(isData.start, "HH:mm");
const duration = Math.ceil(endTime.diff(startTime, "seconds") / 60);
console.log("endTime:"+ endTime + "-- startTime:" + startTime+"-- duration:"+duration); // details
console.log("endTime:" + endTime + "-- startTime:" + startTime + "-- duration:" + duration); // details
totalMinutes += duration; //
});
const totalHours = Math.floor(totalMinutes / 60);
@ -450,12 +450,13 @@ const FormModal = (props) => {
}
return flag;
}
const [getValueList, setGetValueList] = useState(0)
//
const handleAddItemsClick = (i, z,type) => {
const handleAddItemsClick = (i, z, type) => {
const currentFormValues = form.getFieldsValue();
const data = type == 0 ? currentFormValues.rules[0].details : currentFormValues.rules[0].holiday
//
newItems.type = data[i].items[0].type==0?2:0
newItems.type = data[i].items[0].type == 0 ? 2 : 0
//
const updatedItems = [
...data.slice(0, i),
@ -465,50 +466,62 @@ const FormModal = (props) => {
},
...data.slice(i + 1)
];
if(type==0){
if (type == 0) {
form.setFieldsValue({
...currentFormValues,
rules: [{
...currentFormValues.rules[0],
details:updatedItems,
details: updatedItems,
}]
});
}else{
} else {
form.setFieldsValue({
...currentFormValues,
rules: [{
...currentFormValues.rules[0],
holiday:updatedItems,
holiday: updatedItems,
}]
});
}
//
if (!handleItemsValidation(i, z,data[i].items[0].type,type)) {
if (!handleItemsValidation(i, z, data[i].items[0].type, type, 'add')) {
return;
}
}
//-
const handleItemsValidation = (i, z, value,type) => {
const handleItemsValidation = (i, z, value, type, opr = '') => {
setGetValueList(value)
const currentFormValues = form.getFieldsValue();
// 1.
// 2.
// 3.
// 4.
const data = value == 1 || value == 2 ? options.filter(op => op.value == value) : options;
handleOptionsProcessing(i, z, data,type)//
if (!opr) {
form.setFieldsValue({
...currentFormValues,
rules: [{
...currentFormValues.rules[0],
details: [
{ items: [{ ...currentFormValues.rules[0].details[0].items[0] }] }
]
}]
});
}
const data = options;
handleOptionsProcessing(i, z, data, type)//
console.log("表单数据", currentFormValues);
return true;
}
//-
const handleOptionsProcessing = (i, z, data,type) => {
const handleOptionsProcessing = (i, z, data, type) => {
const key = i + '' + z;
console.log(key, data);
if(type==0){
if (type == 0) {
setSelectOptions(prevOptions => ({
...prevOptions,
[key]: data
}));
}else{
} else {
setSelectHolidayOptions(prevOptions => ({
...prevOptions,
[key]: data
@ -517,9 +530,9 @@ const FormModal = (props) => {
};
//--value
const getOptionsValueByIndex = (i, z,type) => {
const getOptionsValueByIndex = (i, z, type) => {
const key = i + '' + z;
const value = type==0?selectOptions[key][z].value:selectHolidayOptions[key][z].value;
const value = type == 0 ? selectOptions[key][z].value : selectHolidayOptions[key][z].value;
console.log("getOptionsValueByIndex", value);
return value;
};
@ -893,7 +906,7 @@ const FormModal = (props) => {
<Form.Item
className="btm-box"
>
{
{/* {
fields.length < 2 && getOptionsValueByIndex(i, z,0) != 1 && getOptionsValueByIndex(i, z,0) != 2 ?
<PlusCircleOutlined
onClick={() =>
@ -907,6 +920,14 @@ const FormModal = (props) => {
}}
/>
: null
} */}
{//
getValueList === 0 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length, 0)
}
/> : null
}
</Form.Item>
</div>
@ -916,19 +937,16 @@ const FormModal = (props) => {
</>
)}
</Form.List>
{
form?.getFieldValue('rules')[j].details[i].items.filter(item => item.type != 1).length > 0 ?
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div> : ''
}
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div>
</div>
);
})}
@ -977,7 +995,7 @@ const FormModal = (props) => {
label="时段"
className="yisa-label"
>
<TimePicker format={format} allowClear={false} style={{ marginLeft: 10 }}
<TimePicker format={format} allowClear={false} style={{ marginLeft: 10 }}
onChange={handleChangeStartTime} />
</Form.Item>
<label className="mid">to</label>
@ -987,7 +1005,7 @@ const FormModal = (props) => {
label=""
>
<TimePicker format={format}
allowClear={false}
allowClear={false}
onChange={handleChangeEndTime} />
</Form.Item>
@ -1018,7 +1036,7 @@ const FormModal = (props) => {
>
<Select
onChange={(value) => {
handleItemsValidation(i, z, value,1);
handleItemsValidation(i, z, value, 1);
}}
style={{ width: 100, marginLeft: 10 }}
options={selectHolidayOptions[i + '' + z].map((option, index) => ({
@ -1078,11 +1096,11 @@ const FormModal = (props) => {
<Form.Item
className="btm-box"
>
{
fields.length < 2 && getOptionsValueByIndex(i, z,1) != 1 && getOptionsValueByIndex(i, z,1) != 2 ?
{/* {
fields.length < 2 && getOptionsValueByIndex(i, z, 1) != 1 && getOptionsValueByIndex(i, z, 1) != 2 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length,1)
handleAddItemsClick(i, fields.length, 1)
}
/> : fields.length > 1 ?
<MinusCircleOutlined
@ -1091,6 +1109,14 @@ const FormModal = (props) => {
}}
/>
: null
} */}
{//
getValueList === 0 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length, 0)
}
/> : null
}
</Form.Item>
</div>
@ -1100,19 +1126,16 @@ const FormModal = (props) => {
</>
)}
</Form.List>
{
form?.getFieldValue('rules')[j].holiday[i].items.filter(item => item.type != 1).length > 0 ?
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div> : ''
}
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div>
</div>
);
})}

199
src/pages/InRoadMgm/BusinessMgm/ChargeRules/FormModal.jsx

@ -27,7 +27,7 @@ const FormModal = (props) => {
addVisible,
closAddModal = () => { },
setGetAddVisible = () => { },
getData=()=>{}
getData = () => { }
} = props
//
const [form] = Form.useForm();
@ -45,10 +45,10 @@ const FormModal = (props) => {
description: '',
evFreeTime: '',
evCarDiscount: '',
disability_time:'',
disability_time: '',
disabledFreeTime: '',
disabledCarDiscount: '',
new_energy_time:"",
new_energy_time: "",
rules: [
{
"cdate": null,
@ -161,7 +161,7 @@ const FormModal = (props) => {
if (_key == "unitUp") {
_arr[curNum][_key] = _val ? 1 : 0;
} else if (_key == "details" || _key == "holiday") {
console.log("_key",_key)
console.log("_key", _key)
let _curNum = _val.length - 1;
let _curObj = _val[curNum];
if (_curObj) {
@ -222,7 +222,7 @@ const FormModal = (props) => {
console.log(item.cdate);
if (item.cdate) {
// if (type == 1) {
item["cdate"] = moment(item["cdate"]).format('YYYY-MM-DD HH:mm:ss');
item["cdate"] = moment(item["cdate"]).format('YYYY-MM-DD HH:mm:ss');
// } else {
// item["cdate"] = moment(item["cdate"]);
// }
@ -243,15 +243,15 @@ const FormModal = (props) => {
//
const onFinish = (data) => {
console.log("onFinishData",data)
console.log("onFinishData", data)
//
if(handleFormValidation(data,0)&&handleFormValidation(data,1)){
if (handleFormValidation(data, 0) && handleFormValidation(data, 1)) {
console.log(data.cdate);
let i = handelDate(data, 1)
const {rules,...rest} = i
const source = { source:{ ...rest,rules:rules }};
i={ ...rest,...source}
console.log("addChangeRules",i)
const { rules, ...rest } = i
const source = { source: { ...rest, rules: rules } };
i = { ...rest, ...source }
console.log("addChangeRules", i)
ajax.addChangeRules(i).then(res => {
if (res.status === 20000) {
setGetAddVisible(false)
@ -339,10 +339,10 @@ const FormModal = (props) => {
}
]
//
const handleFormValidation = (data,type) => {
const handleFormValidation = (data, type) => {
const validationData = type == 0 ? data.rules[0].details : data.rules[0].holiday
//
if(type==1 &&validationData.length==0){
if (type == 1 && validationData.length == 0) {
return true;
}
let flag = false;
@ -357,18 +357,18 @@ const FormModal = (props) => {
const endTime = moment(isData.end, "HH:mm");
const startTime = moment(isData.start, "HH:mm");
const duration = Math.ceil(endTime.diff(startTime, "seconds") / 60);
console.log("endTime:"+ endTime + "-- startTime:" + startTime+"-- duration:"+duration); // details
console.log("endTime:" + endTime + "-- startTime:" + startTime + "-- duration:" + duration); // details
totalMinutes += duration; //
});
const totalHours = Math.floor(totalMinutes / 60);
const remainingMinutes = totalMinutes % 60;
console.log("当前区间时间总和", totalHours + ":" + remainingMinutes); // details
//holiday
const copyData = {...data};
if(getValueData !=2 ){
const copyData = { ...data };
if (getValueData != 2) {
data.rules[0].holiday = [];
}else{
copyData.length==0?data.rules[0].holiday = defaultData.rules[0].holiday:copyData
} else {
copyData.length == 0 ? data.rules[0].holiday = defaultData.rules[0].holiday : copyData
}
if (totalHours === 23 && remainingMinutes === 59) {
flag = true;
@ -384,7 +384,7 @@ const FormModal = (props) => {
const handleAddRulesClick = (type) => {
const currentFormValues = form.getFieldsValue();
const data = type == 0 ? currentFormValues.rules[0].details : currentFormValues.rules[0].holiday
console.log("handleAddRulesClick",data);
console.log("handleAddRulesClick", data);
//
if (!handleValidation(data)) {
return;
@ -399,11 +399,11 @@ const FormModal = (props) => {
rules: [type == 0 ? { ...currentFormValues.rules[0], details: updatedDetailsOrHoliday } : { ...currentFormValues.rules[0], holiday: updatedDetailsOrHoliday }]
});
//-
handleOptionsProcessing(data.length, 0, options,type);
handleOptionsProcessing(data.length, 0, options, type);
console.log("当前表单", currentFormValues);
}
//&&-
const handleValidation = (data,type) => {
const handleValidation = (data, type) => {
let flag = true;
//24,,
let totalMinutes = 0; // 0
@ -416,7 +416,7 @@ const FormModal = (props) => {
const endTime = moment(isData.end, "HH:mm");
const startTime = moment(isData.start, "HH:mm");
const duration = Math.ceil(endTime.diff(startTime, "seconds") / 60);
console.log("endTime:"+ endTime + "-- startTime:" + startTime+"-- duration:"+duration); // details
console.log("endTime:" + endTime + "-- startTime:" + startTime + "-- duration:" + duration); // details
totalMinutes += duration; //
});
const totalHours = Math.floor(totalMinutes / 60);
@ -428,12 +428,14 @@ const FormModal = (props) => {
}
return flag;
}
const [getValueList, setGetValueList] = useState(0)
//
const handleAddItemsClick = (i, z,type) => {
const handleAddItemsClick = (i, z, type) => {
const currentFormValues = form.getFieldsValue();
const data = type == 0 ? currentFormValues.rules[0].details : currentFormValues.rules[0].holiday
//
newItems.type = data[i].items[0].type==0?2:0
newItems.type = data[i].items[0].type == 0 ? 2 : 0
//
const updatedItems = [
...data.slice(0, i),
@ -443,50 +445,63 @@ const FormModal = (props) => {
},
...data.slice(i + 1)
];
if(type==0){
if (type == 0) {
form.setFieldsValue({
...currentFormValues,
rules: [{
...currentFormValues.rules[0],
details:updatedItems,
details: updatedItems,
}]
});
}else{
} else {
form.setFieldsValue({
...currentFormValues,
rules: [{
...currentFormValues.rules[0],
holiday:updatedItems,
holiday: updatedItems,
}]
});
}
//
if (!handleItemsValidation(i, z,data[i].items[0].type,type)) {
if (!handleItemsValidation(i, z, data[i].items[0].type, type, 'add')) {
return;
}
}
//-
const handleItemsValidation = (i, z, value,type) => {
const handleItemsValidation = (i, z, value, type, opr = '') => {
setGetValueList(value)
const currentFormValues = form.getFieldsValue();
if (!opr) {
form.setFieldsValue({
...currentFormValues,
rules: [{
...currentFormValues.rules[0],
details: [
{ items: [{ ...currentFormValues.rules[0].details[0].items[0] }] }
]
}]
});
}
console.log(form.getFieldsValue());
// 1.
// 2.
// 3.
// 4.
const data = value == 1 || value == 2 ? options.filter(op => op.value == value) : options;
handleOptionsProcessing(i, z, data,type)//
const data = options;
handleOptionsProcessing(i, z, data, type)//
console.log("表单数据", currentFormValues);
return true;
}
//-
const handleOptionsProcessing = (i, z, data,type) => {
const handleOptionsProcessing = (i, z, data, type) => {
const key = i + '' + z;
console.log(key, data);
if(type==0){
if (type == 0) {
setSelectOptions(prevOptions => ({
...prevOptions,
[key]: data
}));
}else{
} else {
setSelectHolidayOptions(prevOptions => ({
...prevOptions,
[key]: data
@ -495,9 +510,9 @@ const FormModal = (props) => {
};
//--value
const getOptionsValueByIndex = (i, z,type) => {
const getOptionsValueByIndex = (i, z, type) => {
const key = i + '' + z;
const value = type==0?selectOptions[key][z].value:selectHolidayOptions[key][z].value;
const value = type == 0 ? selectOptions[key][z].value : selectHolidayOptions[key][z].value;
console.log("getOptionsValueByIndex", value);
return value;
};
@ -584,7 +599,7 @@ const FormModal = (props) => {
className="yisa-label extend-time"
rules={[{ required: true, message: "请选择${label}" }]}
>
<Input placeholder="请输入续停免费分钟" style={{ marginLeft: 10 ,width:200}} autoComplete="off" />
<Input placeholder="请输入续停免费分钟" style={{ marginLeft: 10, width: 200 }} autoComplete="off" />
</Form.Item>
<Form.Item name="freeTimeAble" valuePropName="checked">
<Checkbox>免费分钟数不纳入计费时长</Checkbox>
@ -671,18 +686,18 @@ const FormModal = (props) => {
<label>单位%</label>
</div>
<div className="place">
<Form.Item
name="new_energy_time"
label="续停免费分钟"
className="yisa-label timeSearch"
rules={[{ required: true, message: "请输入${label}" }]}
>
<Input
style={{ width: 200, marginLeft: 10 }}
placeholder="请输入续停免费分钟"
/>
</Form.Item>
</div>
<Form.Item
name="new_energy_time"
label="续停免费分钟"
className="yisa-label timeSearch"
rules={[{ required: true, message: "请输入${label}" }]}
>
<Input
style={{ width: 200, marginLeft: 10 }}
placeholder="请输入续停免费分钟"
/>
</Form.Item>
</div>
</div> : ''
}
<div className="list">
@ -786,7 +801,7 @@ const FormModal = (props) => {
label=""
>
<TimePicker format={format}
allowClear={false}
allowClear={false}
onChange={handleChangeEndTime} />
</Form.Item>
@ -794,7 +809,7 @@ const FormModal = (props) => {
className="btm-box"
label=""
>
{
{//
!i ?
<PlusCircleOutlined onClick={() => { handleAddRulesClick(0); }} />
:
@ -817,7 +832,7 @@ const FormModal = (props) => {
>
<Select
onChange={(value) => {
handleItemsValidation(i, z, value,0);
handleItemsValidation(i, z, value, 0);
}}
style={{ width: 100, marginLeft: 10 }}
options={selectOptions[i + '' + z].map((option, index) => ({
@ -877,11 +892,11 @@ const FormModal = (props) => {
<Form.Item
className="btm-box"
>
{
fields.length < 2 && getOptionsValueByIndex(i, z,0) != 1 && getOptionsValueByIndex(i, z,0) != 2 ?
{/* {
fields.length < 2 && getOptionsValueByIndex(i, z, 0) != 1 && getOptionsValueByIndex(i, z, 0) != 2 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length,0)
handleAddItemsClick(i, fields.length, 0)
}
/> : fields.length > 1 ?
<MinusCircleOutlined
@ -890,6 +905,14 @@ const FormModal = (props) => {
}}
/>
: null
} */}
{//
getValueList === 0 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length, 0)
}
/> : null
}
</Form.Item>
</div>
@ -899,19 +922,16 @@ const FormModal = (props) => {
</>
)}
</Form.List>
{
form?.getFieldValue('rules')[j].details[i].items.filter(item => item.type != 1).length > 0 ?
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div> : ''
}
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div>
</div>
);
})}
@ -969,7 +989,7 @@ const FormModal = (props) => {
label=""
>
<TimePicker format={format}
allowClear={false}
allowClear={false}
onChange={handleChangeEndTime} />
</Form.Item>
@ -1000,7 +1020,7 @@ const FormModal = (props) => {
>
<Select
onChange={(value) => {
handleItemsValidation(i, z, value,1);
handleItemsValidation(i, z, value, 1);
}}
style={{ width: 100, marginLeft: 10 }}
options={selectHolidayOptions[i + '' + z].map((option, index) => ({
@ -1060,11 +1080,11 @@ const FormModal = (props) => {
<Form.Item
className="btm-box"
>
{
fields.length < 2 && getOptionsValueByIndex(i, z,1) != 1 && getOptionsValueByIndex(i, z,1) != 2 ?
{/* {
fields.length < 2 && getOptionsValueByIndex(i, z, 1) != 1 && getOptionsValueByIndex(i, z, 1) != 2 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length,1)
handleAddItemsClick(i, fields.length, 1)
}
/> : fields.length > 1 ?
<MinusCircleOutlined
@ -1073,6 +1093,14 @@ const FormModal = (props) => {
}}
/>
: null
} */}
{//
getValueList === 0 ?
<PlusCircleOutlined
onClick={() =>
handleAddItemsClick(i, fields.length, 0)
}
/> : null
}
</Form.Item>
</div>
@ -1082,19 +1110,16 @@ const FormModal = (props) => {
</>
)}
</Form.List>
{
form?.getFieldValue('rules')[j].holiday[i].items.filter(item => item.type != 1).length > 0 ?
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div> : ''
}
<div className="row" >
<Form.Item {...restField}
name={[name, "limit"]}
className="yisa-label countNumTip"
label="时段最高收费金额">
<Input
style={{ width: 150, marginLeft: 10 }} />
</Form.Item>
<label className="font">"0"表示没有最高限额</label>
</div>
</div>
);
})}

61
src/pages/NewEnergy/ChargeDeviceMgm/ElectricModal/index.scss

@ -57,7 +57,7 @@ $color-primary: var(--color-primary);
.ant-input::-moz-placeholder {
color: var(--color-placeholder);
}
.right-list .ant-btn-primary {
.right-list .ant-btn-primary {
width: 68px;
height: 30px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
@ -171,8 +171,8 @@ $color-primary: var(--color-primary);
border-color: var(--color-border);
}
.totalModal{
.ant-modal-footer{
.totalModal {
.ant-modal-footer {
display: none;
}
position: absolute;
@ -185,13 +185,13 @@ $color-primary: var(--color-primary);
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
img {
height: 295px;
width: 387px;
// object-fit: contain;
}
}
.hanleHistoyModal{
.hanleHistoyModal {
max-height: 700px;
overflow: auto;
}
@ -202,30 +202,45 @@ $color-primary: var(--color-primary);
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img{
img{
.modal-img {
img {
width: 200px;
height: 200px;
}
}
.electric-station-modal {
.add-station-body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.row {
width: 100%;
margin: 10px 0;
}
.cc-form-tree {
margin-bottom: 0;
.add-station-body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.row {
width: 100%;
margin: 10px 0;
position: relative;
.redLogo{
position: absolute;
left: 15px;
top: 7px;
}
.cc-form-content,.form-select-single-content {
flex: auto;
}
.cc-form-name,.form-select-single-name {
width: 100px;
}
.ele-style {
display: flex;
label {
line-height: 32px;
margin-left: 10px;
}
}
.cc-form-tree {
margin-bottom: 0;
}
.cc-form-content,
.form-select-single-content {
flex: auto;
}
.cc-form-name,
.form-select-single-name {
width: 100px;
}
}
}

203
src/pages/NewEnergy/ChargeDeviceMgm/ElectricModal/loadable.jsx

@ -1,27 +1,15 @@
import React, { useState, useRef, useEffect } from "react";
import {
message,
Pagination,
Table,
Space,
Modal,
Button,
Tabs,
Descriptions,
Input,
Steps,
Select,
Image,
Timeline,
Popover
} from "antd";
import { dictionary } from "@/config/common";
import { utils } from "@/config/common";
import ajax from "@/services";
import { useSetState } from "ahooks"
import { TableModule, FormInput, FormSelect, FormTreeSelectNew } from "@/components";
import { TableModule, FormInput, FormSelect } from "@/components";
import "./index.scss";
const { TextArea } = Input;
function BillingRule() {
//
@ -30,33 +18,28 @@ function BillingRule() {
const [tableData, setTableData] = useState([]);
//
const [total, setTotal] = useState(0);
//
const [detailData, setDetailData] = useState({});
const initAdd = {
name: "",
code: "",
address: "",
site_type: "",
area: "",
operator: ""
producer_id: "",
model: "",
type: "",
power: "",
muzzle_num: "",
muzzle_type: ""
}
const [addFormData, setAddFormData] = useSetState(initAdd);
const [formData, setFormData] = useSetState({});
const [getProducerList, setGetProducerList] = useState([])
const [getTypeList, setGetTypeList] = useState([])
const [getMuzzleTypeList, setGetMuzzleTypeList] = useState([])
//
const initFormData = {
operator: "0",
rule_name: "",
producer_id: "0",
model: "",
type: "0",
};
const columns = [
{
title: "序号",
dataIndex: "index",
key: "index",
align: "center",
render: (text, record, index) => index + 1,
width: 100,
},
{
title: "设备生产商",
dataIndex: "producer_name",
key: "producer_name",
@ -97,35 +80,43 @@ function BillingRule() {
const formSearch = [
{
name: "operator",
name: "producer_id",
type: "Select",
label: "商户名称",
label: "设备生产商",
defaultValue: "0",
placeholder: "请选择商户名称",
placeholder: "请选择设备生产商",
options: [
{ value: "0", label: "全部" },
...getProducerList
],
},
{
name: "rule_name",
name: "model",
type: "Input",
label: "规则名称",
placeholder: "请输入出场收费员",
label: "设备型号",
placeholder: "请输入设备型号",
},
{
name: "timePeriod",
type: "RangePicker",
label: "时间段",
name: "type",
type: "Select",
defaultValue: "0",
label: "设备类型",
placeholder: "请输入设备类型",
options: [
{ value: "0", label: "全部" },
...getTypeList
],
},
];
//
const openModal = (index, record) => {
setDetailData(record)
setDetailVisible(true);
}
//
const search = (params) => {
console.log(params);
utils.tableScrollTop("parent-table-scroll");
ajax.getElecList(params).then((res) => {
if (res.status === 20000) {
setFormData(params)
setTableData(res.data.list);
setTotal(res.data.total);
} else {
@ -134,22 +125,56 @@ function BillingRule() {
});
}
const handelAdd = () => {
setDetailVisible(true)
setAddFormData(initAdd)
}
const handelOk = () => {
ajax.addStation(addFormData).then((res) => {
const getHandleList = () => {
ajax.getEleList().then((res) => {
if (res.status === 20000) {
message.success("新增成功")
setDetailVisible(false);
setAddFormData(initAdd)
search(formData)
setGetProducerList(res.data.producer_id)
setGetTypeList(res.data.type)
setGetMuzzleTypeList(res.data.muzzle_type)
} else {
message.error(res.message)
}
});
}
useEffect(() => {
getHandleList()
}, [])
const handelAdd = () => {
setDetailVisible(true)
setAddFormData(initAdd)
}
const handelOk = () => {
var numberRegex = /^\d+$/;
if (addFormData.producer_id === '') {
message.error('请选择设备生产号')
} else if (addFormData.model === '') {
message.error('请输入设备型号')
} else if (addFormData.type === '') {
message.error('请选择设备类型')
} else if (addFormData.power === '') {
message.error('请输入总桩功率')
} else if (!numberRegex.test(addFormData.power)) {
message.error('总桩功率只能输入数字')
} else if (addFormData.muzzle_num === '') {
message.error('请输入枪口数量')
} else if (!numberRegex.test(addFormData.muzzle_num)) {
message.error('枪口数量只能输入数字')
} else if (addFormData.muzzle_type === '') {
message.error('请选择枪口类型')
} else {
ajax.addEle(addFormData).then((res) => {
if (res.status === 20000) {
message.success("新增成功")
setDetailVisible(false);
setAddFormData(initAdd)
search(formData)
} else {
message.error(res.message)
}
});
}
}
return (
<>
<TableModule
@ -174,7 +199,7 @@ function BillingRule() {
exportUrl="/api/bpm/record/get_record_export"
/>
<Modal
title="添加充电站"
title="新增电桩型号"
open={detailVisible}
width={500}
className="electric-station-modal"
@ -185,31 +210,69 @@ function BillingRule() {
destroyOnClose
>
<div className="add-station-body">
<div className="row ">
<div className="redLogo">*</div>
<FormSelect
yisaLabel="设备生产号"
placeholder="请选择设备生产号"
yisaData={getProducerList}
defaultValue={addFormData.producer_id || null}
hasUnlimited={false}
onChange={e => { setAddFormData({ producer_id: e }) }}
/>
</div>
<div className="row">
<div className="redLogo">*</div>
<FormInput
yisaLabel="充电站名称"
placeholder="请输入充电站名称"
yisaLabel="设备型号"
placeholder="请输入设备型号"
isShowAfterIcon={false}
value={addFormData.name}
onChange={e => { setAddFormData({ name: e.target.value }) }}
value={addFormData.model}
onChange={e => { setAddFormData({ model: e.target.value }) }}
/>
</div>
<div className="row">
<div className="redLogo">*</div>
<FormSelect
yisaLabel="设备类型"
placeholder="请选择设备类型"
yisaData={getTypeList}
defaultValue={addFormData.type || null}
hasUnlimited={false}
onChange={e => { setAddFormData({ type: e }) }}
/>
</div>
<div className="row ele-style">
<div className="redLogo">*</div>
<FormInput
yisaLabel="充电站编码"
placeholder="请输入充电站编码"
yisaLabel="总桩功率"
placeholder="请输入总桩功率"
isShowAfterIcon={false}
value={addFormData.code}
onChange={e => { setAddFormData({ code: e.target.value }) }}
value={addFormData.power}
onChange={e => { setAddFormData({ power: e.target.value }) }}
/>
<label>KW</label>
</div>
<div className="row">
<div className="row ele-style">
<div className="redLogo">*</div>
<FormInput
yisaLabel="详细地址"
placeholder="请输入详细地址"
yisaLabel="枪口数量"
placeholder="请输入枪口数量"
isShowAfterIcon={false}
value={addFormData.address}
onChange={e => { setAddFormData({ address: e.target.value }) }}
value={addFormData.muzzle_num}
onChange={e => { setAddFormData({ muzzle_num: e.target.value }) }}
/>
<label></label>
</div>
<div className="row">
<div className="redLogo">*</div>
<FormSelect
yisaLabel="枪口类型"
placeholder="请选择枪口类型"
yisaData={getMuzzleTypeList}
hasUnlimited={false}
defaultValue={addFormData.muzzle_type || null}
onChange={e => { setAddFormData({ muzzle_type: e }) }}
/>
</div>
</div>

6
src/pages/NewEnergy/ChargeDeviceMgm/EquipmentSupplier/index.jsx

@ -0,0 +1,6 @@
import React from "react"
import loadable from "@loadable/component"
import { LoadingImg } from "@/components"
const EquipmentSupplier = loadable(() => import("./loadable"))
export default (pros) => <EquipmentSupplier {...pros} fallback={<LoadingImg />} />

246
src/pages/NewEnergy/ChargeDeviceMgm/EquipmentSupplier/index.scss

@ -0,0 +1,246 @@
@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);
.ant-tabs {
margin-bottom: 16px;
.ant-tabs-nav {
margin-bottom: 0 !important;
&::before {
border-bottom: 1px solid var(--color-card-line) !important;
}
}
.ant-tabs-nav-wrap {
width: 100%;
box-sizing: content-box;
.ant-tabs-nav-list {
width: 340px;
.ant-tabs-ink-bar {
height: 3px;
background-color: #00ccff;
}
.ant-tabs-tab {
flex: 1;
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 10px;
text-align: center;
cursor: pointer;
font-size: 14px !important;
font-family: MicrosoftYaHei;
text-align: center;
letter-spacing: 0.7px;
}
.ant-tabs-tab-active {
div {
color: #00ccff;
}
}
}
}
}
.ant-input::-webkit-input-placeholder {
color: var(--color-placeholder);
}
.ant-input::-moz-placeholder {
color: var(--color-placeholder);
}
.right-list .ant-btn-primary {
width: 68px;
height: 30px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
border-radius: 4px;
}
.ant-input:-ms-input-placeholder {
color: var(--color-placeholder);
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-thead th {
background-color: #616b83 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody td {
background-color: #3e4557 !important;
}
.right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td {
background-color: #3e4557 !important;
}
.ant-input::placeholder {
color: var(--color-placeholder);
}
.ant-select-selection-placeholder {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background: var(--color-input-disabled-bg);
color: var(--color-placeholder);
}
.ant-select-disabled .ant-select-arrow {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: var(--color-input-disabled-bg);
color: var(--color-input-disabled-color);
cursor: not-allowed;
}
.ant-select-multiple {
.ant-select-selector {
.ant-select-selection-item {
background-color: var(--color-bg-body);
border-color: var(--color-border);
.ant-select-selection-item-remove {
color: var(--color-text);
}
}
}
}
.ant-select-arrow {
color: var(--color-text);
}
.ant-select-clear {
border-radius: 50%;
}
.ant-select-dropdown-menu {
background-color: var(--color-input-bg);
.ant-select-dropdown-menu-item {
color: var(--color-text);
&.ant-select-dropdown-menu-item-active {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&.ant-select-dropdown-menu-item-selected {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
&:hover {
color: #fff;
// background-color: var(--radio-button-bg-checked);
}
}
}
.ant-select-selector {
background-color: var(--color-search-list-item-bg) !important;
box-shadow: none !important;
border-radius: 4px;
color: var(--color-search-list-item-value);
border-color: var(--color-search-list-item-bd) !important;
}
.ant-select-selection {
background-color: var(--color-input-bg);
box-shadow: none;
color: var(--color-text);
// border-color:var(--checkable-tag-border);
}
.ant-form-horizontal .ant-form-item-label {
label {
display: inline-block;
word-wrap: break-word;
white-space: normal;
}
}
.ant-picker {
width: 100%;
background-color: var(--color-search-list-item-bg);
border-color: var(--color-border);
}
.totalModal {
.ant-modal-footer {
display: none;
}
position: absolute;
top: 40px;
right: 174px;
}
.ltc-item-img {
width: 390px;
height: 300px;
border: 1px solid;
background: #6565656b;
margin-right: 20px !important;
img {
height: 295px;
width: 387px;
// object-fit: contain;
}
}
.hanleHistoyModal {
max-height: 700px;
overflow: auto;
}
.hanleHistoyModal::-webkit-scrollbar {
width: 5px;
}
.hanleHistoyModal::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}
.modal-img {
img {
width: 200px;
height: 200px;
}
}
.electric-station-modal {
.add-station-body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.row {
width: 100%;
margin: 10px 0;
position: relative;
.redLogo{
position: absolute;
left: 15px;
top: 7px;
}
}
.ele-style {
display: flex;
label {
line-height: 32px;
margin-left: 10px;
}
}
.cc-form-tree {
margin-bottom: 0;
}
.cc-form-content,
.form-select-single-content {
flex: auto;
}
.cc-form-name,
.form-select-single-name {
width: 100px;
}
}
}

236
src/pages/NewEnergy/ChargeDeviceMgm/EquipmentSupplier/loadable.jsx

@ -0,0 +1,236 @@
import React, { useState, useRef, useEffect } from "react";
import {
message,
Modal,
Button,
} from "antd";
import { utils } from "@/config/common";
import ajax from "@/services";
import { useSetState } from "ahooks"
import { TableModule, FormInput, FormSelect } from "@/components";
import "./index.scss";
function EquipmentSupplier() {
//
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [total, setTotal] = useState(0);
const initAdd = {
supplier_id: "",
code: "",
contacts: "",
phone: "",
}
const [addFormData, setAddFormData] = useSetState(initAdd);
const [formData, setFormData] = useSetState({});
const [getProducerList, setGetProducerList] = useState([])
//
const initFormData = {
supplier_id: "0",
contacts: "",
phone: "",
};
const columns = [
{
title: "供应商名称",
dataIndex: "producer_name",
key: "producer_name",
align: "center",
},
{
title: "供应商组织结构代码",
dataIndex: "code",
key: "code",
align: "center",
},
{
title: "联系人",
dataIndex: "contacts",
key: "contacts",
align: "center",
},
{
title: "联系电话",
dataIndex: "phone",
key: "phone",
align: "center",
}
];
const formSearch = [
{
name: "supplier_id",
type: "Select",
label: "设备供应商",
defaultValue: "0",
placeholder: "请选择设备生产商",
options: [
{ value: "0", label: "全部" },
...getProducerList
],
},
{
name: "contacts",
type: "Input",
label: "联系人",
placeholder: "请输入联系人",
},
{
name: "phone",
type: "Input",
label: "联系电话",
placeholder: "请输入联系电话",
},
];
//
const search = (params) => {
console.log(params);
utils.tableScrollTop("parent-table-scroll");
ajax.getEquipList(params).then((res) => {
if (res.status === 20000) {
setFormData(params)
setTableData(res.data.list);
setTotal(res.data.total);
} else {
message.error(res.message)
}
});
}
const getHandleList = () => {
ajax.getSupplier().then((res) => {
if (res.status === 20000) {
setGetProducerList(res.data)
} else {
message.error(res.message)
}
});
}
useEffect(() => {
getHandleList()
}, [])
const handelAdd = () => {
setDetailVisible(true)
setAddFormData(initAdd)
}
const handelOk = () => {
var numberRegex = /^[1][3,4,5,7,8][0-9]{9}$/;
var letterNumber = /^[0-9a-zA-Z]+$/;
var reg = /^[^\u4E00-\u9FFF]+$/;
if (addFormData.supplier_id === '') {
message.error('请选择设备供应商')
} else if (addFormData.code === '') {
message.error('请输入供应商组织结构代码')
} else if (!letterNumber.test(addFormData.code)) {
message.error('供应商组织结构代码只能输入英文和数字')
} else if (addFormData.contacts === '') {
message.error('请输入联系人')
} else if (reg.test(addFormData.contacts)) {
message.error('联系人只能输入汉字')
} else if (addFormData.phone === '') {
message.error('请输入联系电话')
} else if (!numberRegex.test(addFormData.phone)) {
message.error('请输入正确的联系电话')
}else {
ajax.addSupplier(addFormData).then((res) => {
if (res.status === 20000) {
message.success("新增成功")
setDetailVisible(false);
setAddFormData(initAdd)
search(formData)
} else {
message.error(res.message)
}
});
}
}
return (
<>
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
新增
</Button>
}
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="电桩型号"
pageName={'EquipmentSupplier'}
initFormData={initFormData}
total={total}
search={search}
exportUrl="/api/bpm/record/get_record_export"
/>
<Modal
title="新增电桩型号"
open={detailVisible}
width={500}
className="electric-station-modal"
onCancel={() => {
setDetailVisible(false);
}}
onOk={handelOk}
destroyOnClose
>
<div className="add-station-body">
<div className="row ">
<div className="redLogo">*</div>
<FormSelect
yisaLabel="设备生产号"
placeholder="请选择设备生产号"
yisaData={getProducerList}
defaultValue={addFormData.supplier_id || null}
hasUnlimited={false}
onChange={e => { setAddFormData({ supplier_id: e }) }}
/>
</div>
<div className="row">
<div className="redLogo" style={{left:-9}}>*</div>
<FormInput
yisaLabel="供应商组织结构代码"
placeholder="请输入供应商组织结构代码"
isShowAfterIcon={false}
value={addFormData.code}
onChange={e => { setAddFormData({ code: e.target.value }) }}
/>
</div>
<div className="row">
<div className="redLogo" style={{left:40}}>*</div>
<FormInput
yisaLabel="联系人"
placeholder="请输入联系人"
isShowAfterIcon={false}
value={addFormData.contacts}
onChange={e => { setAddFormData({ contacts: e.target.value }) }}
/>
</div>
<div className="row">
<div className="redLogo" style={{left:28}}>*</div>
<FormInput
yisaLabel="联系电话"
placeholder="请输入联系电话"
isShowAfterIcon={false}
value={addFormData.phone}
onChange={e => { setAddFormData({ phone: e.target.value }) }}
/>
</div>
</div>
</Modal>
</>
);
}
export default EquipmentSupplier;

13
src/services/NewEnergy/ChargeDeviceMgm.js

@ -18,17 +18,17 @@ const getElecList = (params) => {
});
};
// 获取站点状态
const getSiteStatus = (params) => {
const getEleList = (params) => {
return ajax({
url: "/api/fin/charge_station/site_status",
url: "/api/nes/device/elec_down",
type: "get",
data: params,
});
};
// 新增充电站
const addStation = (params) => {
const addEle = (params) => {
return ajax({
url: "/api/fin/charge_station/add_station",
url: "/api/nes/device/elec_add",
type: "post",
data: params,
});
@ -91,5 +91,8 @@ export default{
getDeviceLockDown,
getDeviceLockList,
getDeviceLockAdd,
getDeviceLockEdit
getDeviceLockEdit,
getEleList,
getElecList,
addEle
}

32
src/services/NewEnergy/EquipmentSupplier.js

@ -0,0 +1,32 @@
import ajax from "@/config/ajax"
// 充电站管理
// 获取列表数据
const getEquipList = (params) => {
return ajax({
url: "/api/nes/device/supplier_list",
type: "post",
data: params,
});
};
// 获取站点状态
const getSupplier = (params) => {
return ajax({
url: "/api/nes/device/supplier_down",
type: "get",
data: params,
});
};
// 新增充电站
const addSupplier = (params) => {
return ajax({
url: "/api/nes/device/supplier_add",
type: "post",
data: params,
});
};
export default{
getSupplier,
getEquipList,
addSupplier
}

2
src/services/NewEnergy/index.js

@ -3,9 +3,11 @@ import chargeStationMgm from './ChargeStationMgm'
import realtimeMonitor from './realtimeMonitor'
import recordsInquiry from './recordsInquiry'
import ChargeDeviceMgm from './ChargeDeviceMgm'
import EquipmentSupplier from './EquipmentSupplier'
export default {
...chargingMgm,
...EquipmentSupplier,
...ChargeDeviceMgm,
...realtimeMonitor,
...chargeStationMgm,

Loading…
Cancel
Save