同步6/16

This commit is contained in:
Zy
2026-06-01 18:12:58 +08:00
parent 38274ab612
commit 50e7b14fd6
183 changed files with 8956 additions and 4803 deletions

View File

@@ -8,26 +8,24 @@
<el-form-item label="账单名称" prop="billName">
<el-input disabled v-model.trim="form.billName" placeholder="请输入账单名称" />
</el-form-item>
<el-form-item label="收费项目" prop="chargeItemId">
<el-select disabled v-model="form.chargeItemId" @change="handleChange">
<el-option v-for="(item, index) in chargeitemlist" :key="index" :value="item.id" :label="item.itemName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="收费范围" prop="chargeScope">
<el-form-item label="收费范围" prop="chargeScope" v-if="itemTypeincludes">
<el-radio-group disabled v-model="form.chargeScope">
<el-radio v-for="(item, index) in com_questionnaire_scope" :key="index" :value="item.value" :label="item.label"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.chargeScope === '1'">
<div class="residentBox">
<ul class="checkoutSideUsesbox">
<li v-for="(item, index) in checkoutUses" :key="index">
<span>{{ item.buildingName }} </span> / <span>{{ item.unitNo }}单元 </span> / <span>{{ item.floorNo }} </span> /
<span>{{ item.houseNo }}</span>
</li>
</ul>
</div>
<el-form-item label="收费范围" prop="chargeScope" v-else>
<el-radio-group disabled v-model="form.chargeScope">
<el-radio v-for="(item, index) in com_bill_charge_scope_house" :key="index" :value="item.value" :label="item.label"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="费用周期" prop="chargePeriod">
<el-select disabled v-model="form.chargePeriod">
<el-option v-for="(item, index) in com_bill_charge_period" :key="index" :value="item.value" :label="item.label"></el-option>
@@ -71,6 +69,7 @@ import { Delete } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
type PickerConfig = {
@@ -114,38 +113,47 @@ function handleDate(val: string[]) {
form.value.endDate = formatDate2(val[1]);
}
const chargeitemlist = ref([]);
// 电费 水费
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
const itemTypeincludes = computed(() => {
return typeNamelist.value.includes(form.value.chargeItemId);
});
const houselist = ref([]);
const checkoutUses = ref([]);
async function init() {
listChargeItem().then((res) => {
const res1 = await listBillHouse({ pageNum: 1, pageSize: 999999 });
houselist.value = res1.rows;
listChargeItem().then(async (res) => {
chargeitemlist.value = res.rows;
});
const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
houselist.value = res.rows;
if (route.query.id) {
userid.value = route.query.id;
getBill(userid.value).then((res) => {
form.value = {
...form.value,
...res.data
};
form.value.houseIds = res.data.houseIds || [];
StartEndDate.value = [formatDate(res.data.startDate), formatDate(res.data.endDate)];
checkoutUses.value = form.value.houseIds
.map((item) => {
if (item) {
const find = houselist.value.find((it) => it.houseId === item);
if (find) {
return find;
} else {
return null;
if (route.query.id) {
userid.value = route.query.id;
getBill(userid.value).then((res1) => {
form.value = {
...form.value,
...res1.data
};
form.value.houseIds = res1.data.houseIds || [];
StartEndDate.value = [formatDate(res1.data.startDate), formatDate(res1.data.endDate)];
checkoutUses.value = form.value.houseIds
.map((item) => {
if (item) {
const find = houselist.value.find((it) => it.houseId === item);
if (find) {
return find;
} else {
return null;
}
}
}
})
.filter((item) => item !== null);
});
}
})
.filter((item) => item !== null);
});
}
});
}
init();