|
@@ -138,7 +138,6 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { nextTick, ref, watch } from 'vue'
|
|
|
-import { useAppStore } from '~src/store'
|
|
|
import { getStoreValue } from '~src/utils/storage'
|
|
|
import HcBillBaseModal from './addBillBaseModal.vue'
|
|
|
import { arrToId, getArrValue, getObjValue, getRandom } from 'js-fast-way'
|
|
@@ -177,10 +176,6 @@ const props = defineProps({
|
|
|
|
|
|
//事件
|
|
|
const emit = defineEmits(['finish', 'close'])
|
|
|
-
|
|
|
-const useAppState = useAppStore()
|
|
|
-const contractInfo = ref(useAppState.getContractInfo)
|
|
|
-
|
|
|
const uuid = getRandom(4)
|
|
|
const dataId = ref(props.ids)
|
|
|
const dataType = ref(props.type)
|
|
@@ -290,15 +285,25 @@ const periodChange = () => {
|
|
|
|
|
|
//计量期相关的数据
|
|
|
const setBasePeriodForm = (periodId) => {
|
|
|
- const { contractNumber } = contractInfo.value
|
|
|
const periods = period.value
|
|
|
baseForm.value.contractPeriodId = periodId
|
|
|
const periodData = periods.find((item) => item.id === periodId)
|
|
|
- baseForm.value.meterNumber = contractNumber + '-' + periodData.periodNumber + '-流水号'
|
|
|
baseForm.value.periodNumber = periodData.periodNumber
|
|
|
baseForm.value.businessDate = periodData.endDate ?? null
|
|
|
+ getMeterNumber(periodId)
|
|
|
}
|
|
|
|
|
|
+//获取计量单编号
|
|
|
+const getMeterNumber = async (periodId) => {
|
|
|
+ const { data } = await mainApi.getMeterNumber({
|
|
|
+ projectId: pid.value,
|
|
|
+ contractId: cid.value,
|
|
|
+ contractPeriodId: periodId,
|
|
|
+ })
|
|
|
+ baseForm.value.meterNumber = data ?? ''
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
//草图文件上传
|
|
|
const formUpload = () => {
|
|
|
uploadFileParams.value = { type: '草图文件' }
|