Browse Source

fix bugs

dev
zhaobing 1 year ago
parent
commit
898b5e970e
  1. 4
      api/app/lib/controllers/data/appointed.js
  2. 2
      api/app/lib/controllers/data/vehicle.js
  3. 2
      api/app/lib/models/report.js
  4. 4
      web/client/src/sections/fillion/components/feedback/nominateModalcopy.js
  5. 10
      web/client/src/sections/fillion/components/operationalTable.js

4
api/app/lib/controllers/data/appointed.js

@ -4,9 +4,9 @@ const moment = require('moment')
async function appoint(ctx) { async function appoint(ctx) {
try { try {
const models = ctx.fs.dc.models const models = ctx.fs.dc.models
const { recordId, performerId, handleOpinions } = ctx.request.body const { recordId, performerId, handleAdvice, handleState } = ctx.request.body
await models.Report.update({ await models.Report.update({
performerId, handleOpinions performerId, handleAdvice, handleState
}, { where: { id: recordId } }) }, { where: { id: recordId } })
ctx.status = 204; ctx.status = 204;
} catch (error) { } catch (error) {

2
api/app/lib/controllers/data/vehicle.js

@ -29,7 +29,7 @@ async function get(ctx) {
ctx.status = 200; ctx.status = 200;
ctx.body = { ctx.body = {
vehicleRes: vehicleRes.filter(item => item.dataValues.name === '标志牌' || item.dataValues.name === '养护责任牌') vehicleRes: vehicleRes.filter(item => item.dataValues.name === '标志牌' || item.dataValues.name === '养护责任牌')
, conserveData , conserveData, vehicleR: vehicleRes
} }
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);

2
api/app/lib/models/report.js

@ -1,5 +1,3 @@
/* eslint-disable*/
'use strict'; 'use strict';
module.exports = dc => { module.exports = dc => {

4
web/client/src/sections/fillion/components/feedback/nominateModalcopy.js

@ -36,10 +36,12 @@ const NominateModal = (props) => {
} }
}) })
setDepUsers(processedUsers) setDepUsers(processedUsers)
form.resetFields(['nameId'])
} }
const handleFinish = () => { const handleFinish = () => {
form.validateFields().then(values => { form.validateFields().then(values => {
dispatch(appointTask({ recordId: recordId, performerId: values.nameId, handleOpinions: values.handleOpinions })).then((res) => { dispatch(appointTask({ recordId: recordId, performerId: values.nameId, handleAdvice: values.handleOpinions, handleState: '已指派' })).then((res) => {
if (res.success) { if (res.success) {
setSelectedUserId(null) setSelectedUserId(null)
queryData() queryData()

10
web/client/src/sections/fillion/components/operationalTable.js

@ -1988,19 +1988,19 @@ const OperaTionalTable = (props) => {
const query = {} const query = {}
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getOperaTional(query)); const res = await dispatch(getOperaTional(query));
setCounts(res.payload.data) setCounts(res.payload.data?.vehicleR)
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data?.vehicleR.count : 0
} }
} if (rewkeys == 'huoyun') { } if (rewkeys == 'huoyun') {
const query = {} const query = {}
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getShippingList(query)); const res = await dispatch(getShippingList(query));
setCounts(res.payload.data) setCounts(res.payload.data?.vehicleR)
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data?.vehicleR.count : 0
} }
} }
if (rewkeys == 'chuzu') { if (rewkeys == 'chuzu') {
@ -2038,7 +2038,7 @@ const OperaTionalTable = (props) => {
setCounts(res.payload.data) setCounts(res.payload.data)
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data : 0
} }
} }
}} }}

Loading…
Cancel
Save