feat: 车辆收费接口对接

This commit is contained in:
fyy
2025-07-22 19:19:08 +08:00
parent 34d50c58af
commit 9796a46ba1
4 changed files with 198 additions and 130 deletions

View File

@@ -58,7 +58,7 @@ const schema =[
rules: 'required',
componentProps: {
options: getDictOptions('wy_cbfylx'),
onChange: async (value:any) => {
onChange: async (value:any) => {
// 请求并更新下拉
if (!value) {
costItemsOptions.value = [];
@@ -205,7 +205,7 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && id) {
const record = await costMeterWaterInfo(id);
console.log(1,record);
const costItemsRes = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: record.costType });
costItemsOptions.value = (costItemsRes?.rows || []).map(item => ({
label: item.chargeItem,
@@ -234,7 +234,7 @@ const [BasicModal, modalApi] = useVbenModal({
]);
await formApi.setValues(record);
console.log(2,await formApi.getValues());
}
await markInitialized();
@@ -252,7 +252,7 @@ async function handleConfirm() {
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
const data = cloneDeep(await formApi.getValues());
console.log(data);
await (isUpdate.value ? costMeterWaterUpdate(data) : costMeterWaterAdd(data));
resetInitialized();
//必须要手动清空不然ref会保留值
@@ -378,4 +378,3 @@ async function setupCommunitySelect() {
-webkit-text-fill-color: rgba(0, 0, 0, 0.65) !important;
}
</style>