2025/07/19 门口门禁监管段接口调试
parent
540e78eaea
commit
eeaf5f96af
|
@ -155,3 +155,11 @@ export const setRefreshToken = (params) =>
|
|||
|
||||
export const getKeyProjectsView = (params) => post("/app/keyProjects/getOutsourced", params); // 获取重点工程详详细信息
|
||||
export const setKeyProjectsState = (params) => post("/app/keyProjects/updateState", params); // 修改重点工程状态
|
||||
|
||||
export const getVehiclemessagePageList = (params) => post("/vehiclemessage/getPageList", params);
|
||||
export const getVehiclemessageView = (params) => post("/vehiclemessage/showVehicleMessage", params);
|
||||
export const setVehiclemessageSave = (params) => post("/vehiclemessage/addVehicleMessage", params);
|
||||
export const setVehiclemessageUpdate = (params) => post("/vehiclemessage/updateVehicleMessage", params);
|
||||
export const setVehiclemessageDelete = (params) => post("/vehiclemessage/deleteVehicleMessage", params);
|
||||
export const getAuditUserList = (params) => post("/sys/user/audit/user", params);
|
||||
export const goCheckLicenceNo = (params) => post("/vehiclemessage/goCheckLicenceNo", params);
|
||||
|
|
|
@ -42,6 +42,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAuditUserList,
|
||||
getVehiclemessageView,
|
||||
goCheckLicenceNo,
|
||||
setVehiclemessageSave,
|
||||
setVehiclemessageUpdate
|
||||
} from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -61,15 +69,16 @@ export default {
|
|||
],
|
||||
userList: [],
|
||||
form: {
|
||||
LICENCE_TYPE:'',
|
||||
LICENCE_TYPE_NAME:'',
|
||||
LICENCE_NO:'',
|
||||
VEHICLE_TYPE:'',
|
||||
VEHICLE_TYPE_NAME:'',
|
||||
QY_AUDITOR:'',
|
||||
QY_AUDITOR_NAME:'',
|
||||
portId:'',
|
||||
portName:'',
|
||||
OLD_LICENCE_NO: '',
|
||||
LICENCE_TYPE: '',
|
||||
LICENCE_TYPE_NAME: '',
|
||||
LICENCE_NO: '',
|
||||
VEHICLE_TYPE: '',
|
||||
VEHICLE_TYPE_NAME: '',
|
||||
QY_AUDITOR: '',
|
||||
QY_AUDITOR_NAME: '',
|
||||
portId: '',
|
||||
portName: '',
|
||||
},
|
||||
rules: {
|
||||
LICENCE_TYPE: [{type: 'string', required: true, message: '请选择车牌类型', trigger: ['blur', 'change']}],
|
||||
|
@ -88,11 +97,13 @@ export default {
|
|||
}
|
||||
},
|
||||
onLoad(event) {
|
||||
this.getUserList();
|
||||
this.VEHICLE_ID = event.VEHICLE_ID
|
||||
if (event.VEHICLE_ID) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: "修改",
|
||||
});
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -139,15 +150,57 @@ export default {
|
|||
fnSingleChoiceCancel() {
|
||||
this.picker.show = false
|
||||
},
|
||||
async getData() {
|
||||
const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID});
|
||||
this.form = resData.pd;
|
||||
const matchedItem = this.VEHICLE_LICENSE_PLATE_TYPE_LIST.find(item => item.id === resData.pd.LICENCE_TYPE.toString());
|
||||
if (matchedItem) {
|
||||
this.form.LICENCE_TYPE_NAME = matchedItem.name;
|
||||
this.form.LICENCE_TYPE = resData.pd.LICENCE_TYPE.toString();
|
||||
}
|
||||
const vehicleType = this.VEHICLE_TYPE_LIST.find(item => item.id === resData.pd.VEHICLE_TYPE.toString());
|
||||
if (vehicleType) {
|
||||
this.form.VEHICLE_TYPE_NAME = vehicleType.name;
|
||||
this.form.VEHICLE_TYPE = resData.pd.VEHICLE_TYPE.toString();
|
||||
}
|
||||
const vehiclePort = this.VEHICLE_PORT_LIST.find(item => item.id === resData.pd.portId.toString());
|
||||
if (vehiclePort) {
|
||||
this.form.portName = vehiclePort.name;
|
||||
this.form.portId = resData.pd.portId.toString();
|
||||
}
|
||||
const auditor = this.userList.find(item => item.userId === resData.pd.QY_AUDITOR);
|
||||
if (auditor) {
|
||||
this.form.QY_AUDITOR_NAME = auditor.name;
|
||||
}
|
||||
},
|
||||
async getUserList() {
|
||||
const resData = await getAuditUserList({corpinfoId: this.userInfo.CORPINFO_ID});
|
||||
this.userList = resData.data;
|
||||
},
|
||||
async fnSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
const checkRes = await goCheckLicenceNo({
|
||||
LICENCE_NO: this.form.LICENCE_NO,
|
||||
licenceType: this.form.LICENCE_TYPE,
|
||||
VEHICLE_ID: this.VEHICLE_ID
|
||||
});
|
||||
if (checkRes.exists === '1') {
|
||||
uni.$u.toast('车牌号已存在')
|
||||
return
|
||||
}
|
||||
this.form.OLD_LICENCE_NO = this.form.LICENCE_NO;
|
||||
const params = {
|
||||
...this.form,
|
||||
DEPARTMENT_ID: this.userInfo.DEPARTMENT_ID,
|
||||
USER_ID: this.userInfo.USER_ID,
|
||||
USER_NAME: this.userInfo.NAME,
|
||||
VEHICLE_DEPARTMENT_ID: this.userInfo.DEPARTMENT_ID,
|
||||
VEHICLE_DEPARTMENT_NAME: this.userInfo.DEPARTMENT_NAME,
|
||||
}
|
||||
this.VEHICLE_ID ? await setVehiclemessageUpdate(params) : await setVehiclemessageSave(params)
|
||||
console.log(params)
|
||||
uni.navigateBack(); // 返回上一页
|
||||
} catch {
|
||||
uni.$u.toast('请补全必填项')
|
||||
}
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
<text>车辆归属人:{{ item.JG_USER_NAME }}</text>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<text>车辆进/出港状态:{{ item.vehicleArrivalStatus }}</text>
|
||||
<text>车辆进/出港状态:{{ item.vehicleArrivalStatus || '出港' }}</text>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<text>车辆来源:{{ VEHICLE_OWNERSHIP_TYPE_MAP[item.vehicleFrom] }}</text>
|
||||
<text>车辆来源:{{ VEHICLE_OWNERSHIP_TYPE_MAP[item.CAR_FROM] }}</text>
|
||||
</view>
|
||||
<view class="mt-10 see_btn">
|
||||
<view class="wrap">
|
||||
|
@ -41,7 +41,7 @@
|
|||
</view>
|
||||
<view class="wrap ml-10">
|
||||
<u-button type="primary" text="修改" size="mini"
|
||||
@click="fnNavigatorView(item.VEHICLE_ID)"></u-button>
|
||||
@click="fnNavigatorAdd(item.VEHICLE_ID)"></u-button>
|
||||
</view>
|
||||
<view class="wrap ml-10">
|
||||
<u-button type="error" text="删除" size="mini"
|
||||
|
@ -58,6 +58,8 @@
|
|||
|
||||
<script>
|
||||
import FabButton from '@/components/fab_button/index.vue'
|
||||
import {getVehiclemessagePageList, setVehiclemessageDelete} from "@/api";
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -94,11 +96,11 @@ export default {
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.resetList()
|
||||
this.resetList()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const resData = {}
|
||||
const resData = await getVehiclemessagePageList({ type: 1, CAR_FROM: 0, curPage: this.currentPage, limit: this.pageSize});
|
||||
this.list = [...this.list, ...resData.varList];
|
||||
this.totalPage = resData.page.totalPage;
|
||||
},
|
||||
|
@ -130,7 +132,10 @@ export default {
|
|||
content: '确定要删除这条记录?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
|
||||
await setVehiclemessageDelete({
|
||||
VEHICLE_ID
|
||||
})
|
||||
this.resetList()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getVehiclemessageView } from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -55,6 +57,15 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID });
|
||||
this.info = resData.pd;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue