diff --git a/src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/loadable.jsx index 3f8c96c..4404315 100644 --- a/src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/loadable.jsx +++ b/src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/loadable.jsx @@ -274,6 +274,8 @@ function ScheduleMgm(props) { let minutes1 = getStartTime != '' ? getStartTime.hour() * 60 + getStartTime.minute() : ''; let minutes2 = getEndTime != '' ? getEndTime.hour() * 60 + getEndTime.minute() : ''; let totalMinutes = minutes2 - minutes1; + console.log(minutes1, minutes2); + console.log(totalMinutes); const reg = /^(?:[1-9]\d?|1[0-7]\d|180|0)$/; if (editModal.scheduleName == "") { message.error("请输入班次名称"); @@ -397,6 +399,7 @@ function ScheduleMgm(props) { setGetStartTime(time); }; const goingEditWork = (time, timeString) => { + console.log(time); setEditModal({ ...editModal, onTime: timeString }); setGetStartTime(time); }; @@ -609,6 +612,7 @@ function ScheduleMgm(props) { @@ -619,6 +623,7 @@ function ScheduleMgm(props) { @@ -731,6 +736,7 @@ function ScheduleMgm(props) { @@ -862,6 +870,7 @@ function ScheduleMgm(props) { diff --git a/src/pages/InRoadMgm/Stuff/ModelConf/index.scss b/src/pages/InRoadMgm/Stuff/ModelConf/index.scss index 98cb766..95b9165 100644 --- a/src/pages/InRoadMgm/Stuff/ModelConf/index.scss +++ b/src/pages/InRoadMgm/Stuff/ModelConf/index.scss @@ -293,14 +293,14 @@ $color-primary : var(--color-primary); color: #fff; } .cancel{ - width: 80px; - height: 35px; - background: #fff; - border: none; - border-radius: 4px; - color: #3e4557; - cursor: pointer; - margin-left: 20px; - } + width: 80px; + height: 35px; + background: #3e4557; + border: none; + border-radius: 4px; + color: #fff; + cursor: pointer; + margin-left: 20px; + } } } \ No newline at end of file diff --git a/src/pages/InRoadMgm/Stuff/ModelConf/loadable.jsx b/src/pages/InRoadMgm/Stuff/ModelConf/loadable.jsx index cced787..abb5201 100644 --- a/src/pages/InRoadMgm/Stuff/ModelConf/loadable.jsx +++ b/src/pages/InRoadMgm/Stuff/ModelConf/loadable.jsx @@ -116,6 +116,8 @@ function ModelConf(props) { message.success('删除成功') setDeleteVisible(false) getData(formData) + }else{ + message.error(res.message) } }) } diff --git a/src/pages/InRoadMgm/Stuff/StuffMgm/index.scss b/src/pages/InRoadMgm/Stuff/StuffMgm/index.scss index 15481b3..443a091 100644 --- a/src/pages/InRoadMgm/Stuff/StuffMgm/index.scss +++ b/src/pages/InRoadMgm/Stuff/StuffMgm/index.scss @@ -278,4 +278,29 @@ $color-primary : var(--color-primary); margin-left: 20px; } } +} +.deleteModal{ + .submitBtn{ + text-align: center; + margin-top: 20px; + .submit{ + width: 80px; + height: 35px; + background: #409eff; + border: none; + border-radius: 4px; + cursor: pointer; + color: #fff; + } + .cancel{ + width: 80px; + height: 35px; + background: #3e4557; + border: none; + border-radius: 4px; + color: #fff; + cursor: pointer; + margin-left: 20px; + } + } } \ No newline at end of file diff --git a/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx b/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx index 34dc4ff..9e1aeef 100644 --- a/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx +++ b/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx @@ -42,6 +42,7 @@ function StuffMgm(props) { const [editVisible, setEditVisible] = useState(false) const [getSelectStatus, setGetSelectStatus] = useState(true) const [addVisible, setAddVisible] = useState(false) + const [deleteVisible, setDeleteVisible] = useState(false) const [getCanCaDer, setGetCanCaDer] = useState([])//区域 //物品编号 @@ -157,8 +158,10 @@ function StuffMgm(props) {
{ CheckBtn(record) }}>查看
-
{ translateBtn(record) }}> - 编辑
+
{ translateBtn(record) }}>编辑
+ { + record.status === '1' || record.status === '2' ?
{ deleteBtn(record) }}>删除
: '' + } }>
@@ -182,6 +185,29 @@ function StuffMgm(props) { const checkModal = () => { setCheckVisible(false) } + const [getRecord, setGetRecord] = useState({}) + const deleteBtn = (record) => { + setGetRecord(record.id) + setDeleteVisible(true) + } + const deleteModalBtn = () => { + let data = { + id: getRecord + } + ajax.handleDeleteData(data).then((res) => { + if (res.status = 20000) { + message.success('删除成功') + setDeleteVisible(false) + getData(formData) + } else { + message.error(res.message) + } + }) + } + //删除功能 + const deleteModal = () => { + setDeleteVisible(false) + } //编辑弹窗 const [getEditData, setGetEditData] = useState({ region_id: null,//区域 @@ -272,7 +298,7 @@ function StuffMgm(props) { setFormData({ ...parameter }) - getData({...parameter,pn: 1} ) + getData({ ...parameter, pn: 1 }) } //检索数据 const getSearchData = (data = formData) => { @@ -558,6 +584,7 @@ function StuffMgm(props) { } const placeBtn = () => { setEditVisible(false) + setDeleteVisible(false) setGetEditData({ region_id: [],//区域 operatorid: '', @@ -786,14 +813,14 @@ function StuffMgm(props) {
- - - - + +
@@ -1084,11 +1111,11 @@ function StuffMgm(props) { } if (v === '1') { setGetSelectStatus(true) - getEditData.uid='' + getEditData.uid = '' } if (v === '2') { setGetSelectStatus(true) - getEditData.uid='' + getEditData.uid = '' } setGetEditData( Object.assign({}, getEditData, { status: v }) @@ -1135,6 +1162,24 @@ function StuffMgm(props) { + +
+ 此操作将删除该记录, 是否继续? +
+
+ + +
+
} diff --git a/src/services/search.js b/src/services/search.js index da0d17c..0d09b35 100644 --- a/src/services/search.js +++ b/src/services/search.js @@ -550,6 +550,14 @@ const brandDeleteData = (params) => { data: params, }); }; +//物品管理-删除物品 +const handleDeleteData = (params) => { + return ajax({ + url: "/api/bpm/bpmgoods/del_goods", + type: "post", + data: params, + }); +}; //物品管理--型号配置-查看 const checkBrandList = (params) => { return ajax({ @@ -1298,6 +1306,7 @@ export default { checkGoodsData, brandEditData, brandDeleteData, + handleDeleteData, checkBrandList, deleteRuleData, addRuleData,