1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990 |
- <template>
- <scroll-view>
- <view class="background">
- <view>
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- <view style="display: flex;align-items: center;">房间信息
- <image :src="loadImgSrc('icon_copy.png')" @click='copyAddress()' style="display: flex;justify-content:flex-end; margin-left: 10px;width: 15px;height: 15px;">
- </image>
- </view>
- <image v-if="changefj==false" :src="loadImgSrc('icon_user_open.png')" @click='this.changefj = !this.changefj' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
- </image>
- <image v-if="changefj==true" :src="loadImgSrc('icon_user_close.png')" @click='this.changefj = !this.changefj' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
- </image>
- </view>
- </view>
- <view v-show="changefj">
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 行政区
- </view>
- <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;" @click="pickerShow('xzq')">
- <span style="color: darkgray;">请选择行政区</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
- <span style="color: black;">{{XZQValue.dictLabel}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 小区
- </view>
- <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
- <span style="color: darkgray;">请选择小区</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
- <span style="color: black;">{{XQValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 楼栋
- </view>
- <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
- <span style="color: darkgray;">请选择楼栋</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
- <span style="color: black;">{{LDValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- <view class="uni-list" style="margin-top: 10;">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 单元
- </view>
- <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
- <span style="color: darkgray;">请选择单元</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
- <span style="color: black;">{{DYValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 房间
- </view>
- <view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
- <span style="color: darkgray;">请选择房间</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
- <span style="color: black;">{{FJValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view v-for="(user,index) in currentResidentsPhoe" :key="index" class="num-style">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <spane>现住人电话</spane>
- <view style="display: flex; justify-content: flex-end; ">
- <input class="uni-input" type="tel" v-model="user.phone" maxlength="11" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx; "></input>
- </view>
- </view>
- <button v-if="index!=0" @click="this.currentResidentsPhoe.splice(index,1)" class="sc-btn">删除</button>
- </view>
- <button @click="this.currentResidentsPhoe.push({phone:''})" class="tj-btn">添加</button>
- </view>
- </view>
- </view>
- <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name" subtitleKey="id" v-model="name"></SelectPicker>
- <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict" titleKey="dictLabel" subtitleKey="dictValue" v-model="name"></SelectPicker>
- </view>
- <view class="background">
- <input class="uni-input" type="idcard" v-model="idCard" maxlength="18" placeholder="请输入身份证号码" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx; "></input>
- </view>
- <button class="tj-btn" style="margin: 40rpx 90rpx;" @click="serchByCard"> 搜索</button>
- <view class="background">
- <view>
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 户主信息
- <image v-if="change==false" :src="loadImgSrc('icon_user_open.png')" @click='change1' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
- </image>
- <image v-if="change==true" :src="loadImgSrc('icon_user_close.png')" @click='change1' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
- </image>
- </view>
- </view>
- <view v-show="change">
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 户主姓名
- </view>
- <view class="uni-list-cell-db" style="margin-top: 10;">
- <span style="color: darkgray;" v-model="houseHeadName">{{houseHeadName}}</span>
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 户主电话
- </view>
- <view class="uni-list-cell-db" style="margin-top: 10;">
- <span style="color: darkgray;" v-model="houseHeadPhone">{{houseHeadPhone}}</span>
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 户主身份证号码
- </view>
- <view class="uni-list-cell-db" style="margin-top: 10;">
- <span style="color: darkgray;" v-model="houseHeadIDcardNumber">{{houseHeadIDcardNumber}}</span>
- </view>
- </view>
- </view>
- <view class="uni-list">
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view class="uni-list-cell-left">
- 管理所
- </view>
- <view class="uni-list-cell-db" style="margin-top: 10;">
- <span style="color: darkgray;" v-model="administrative">{{administrative}}</span>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!--报警器切断阀-->
- <view class="background">
- <view v-if="objValue.enginClassValue=='报警器'||objValue.enginClassValue=='切断阀'">
- <view class="uni-list">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
- {{objValue.enginClassValue}}
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>厂 家</text>
- <view v-if="this.isEmpty(this.brandValue.id)" style="margin-top: 10;" @click="pickerShow('brand')">
- <span style="color: darkgray;">请选择厂家</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
- <span style="color: black;">{{brandValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- </view>
- <!--拆旧管-->
- <view v-if="objValue.enginClassValue=='拆旧管'">
- <view class="uni-list">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 拆旧管
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
- <view>
- 腐蚀等级
- </view>
- <view v-if="this.isEmpty(this.LevelValue.id)" style="margin-top: 10;" @click="pickerShow('fsdj')">
- <span style="color: darkgray;">请选择腐蚀等级</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
- <span style="color: black;">{{LevelValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- </view>
- <view v-if="objValue.enginClassValue=='打孔'">
- <view class="uni-list">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 打孔
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <!-- <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
- <view>
- 孔距
- </view>
- <view v-if="this.isEmpty(this.LevelValue.id)" style="margin-top: 10;"
- @click="pickerShow('kj')">
- <span style="color: darkgray;">请选择孔距</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('kj')">
- <span style="color: black;">{{LevelValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view> -->
- </view>
- </view>
- <!--立杠-->
- <view v-else-if="objValue.enginClassValue=='立杠'">
- <view class="uni-list" style="margin-bottom: 20px;">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 立杠
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 材 质
- </view>
- <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;" @click="pickerShow('cz')">
- <span style="color: darkgray;">请选择材质</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
- <span style="color: black;">{{materialValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 规 格
- </view>
- <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;" @click="pickerShow('gg')">
- <span style="color: darkgray;">请选择规格</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
- <span style="color: black;">{{specificationValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>米 数</text>
- <!-- style="margin-left: 10px;text-align: right;" -->
- <view style="display: flex; justify-content: right; width: 70%;">
- <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
- <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- </view>
- </view>
- </view>
- </view>
- <!--挂表-->
- <view v-else-if="objValue.enginClassValue=='挂表'">
- <view class="uni-list" style="margin-bottom: 20px;">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 挂表
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 品 牌
- </view>
- <view v-if="this.isEmpty(this.brandValue.id)" style="margin-top: 10;" @click="pickerShow('brand')">
- <span style="color: darkgray;">请选择品牌</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
- <span style="color: black;">{{brandValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- </view>
- </view>
- <!--表后管-->
- <view v-else-if="objValue.enginClassValue=='表后管'">
- <view class="uni-list" style="margin-bottom: 20px;">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 表后管
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 材 质
- </view>
- <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;" @click="pickerShow('cz')">
- <span style="color: darkgray;">请选择材质</span>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
- <span style="color: black;">{{materialValue.name}}</span>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 规 格
- </view>
- <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;" @click="pickerShow('gg')">
- <span style="color: darkgray;">请选择规格</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
- <span style="color: black;">{{specificationValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>米 数</text>
- <!-- style="margin-left: 10px;text-align: right;" -->
- <view style="display: flex; justify-content: right; width: 70%;">
- <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
- <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- </view>
- </view>
- </view>
- </view>
- <!--阀管-->
- <view v-else-if="objValue.enginClassValue=='阀管'">
- <view class="uni-list" style="margin-bottom: 20px;">
- <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
- 阀管
- <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 上门类型
- </view>
- <view v-if="this.isEmpty(this.doorValue.dictValue)" style="margin-top: 10;" @click="pickerShow('door')">
- <span style="color: darkgray;">请选择上门类型</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('door')">
- <span style="color: black;">{{doorValue.dictLabel}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 自闭阀厂家
- </view>
- <view v-if="this.isEmpty(this.SelfClosValve.id)" style="margin-top: 10;" @click="pickerShow('zbf')">
- <span style="color: darkgray;">请选择自闭阀厂家</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('zbf')">
- <span style="color: black;">{{SelfClosValve.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 灶具管厂家
- </view>
- <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;" @click="pickerShow('cz')">
- <span style="color: darkgray;">请选择灶具管厂家</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
- <span style="color: black;">{{materialValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <view>
- 规 格
- </view>
- <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;" @click="pickerShow('gg')">
- <span style="color: darkgray;">请选择规格</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
- <span style="color: black;">{{specificationValue.name}}</span>
- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
- </view>
- </view>
- <!-- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
- <text>米 数</text>
- <view style="display: flex; justify-content: right; width: 70%;">
- <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
- style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
- <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
- style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
- </view>
- </view> -->
- </view>
- </view>
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
- <view class="container" style="color: #b2b2b2;">*请上传照片</view>
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
- <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()" v-show="reviewStatus!='1'"></image>
- <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
- <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
- <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index)">
- </image>
- </view>
- <view v-else>
- <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
- </view>
- <view @click="remove(index)" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
- <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
- </image>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="action-btn" v-show="reviewStatus!='1'">
- <button @click="submit('submit')" class="btn cu-btn block bg-blue lg round">确认上传</button>
- <button @click="submit('save')" class="btn cu-btn block bg-blue lg round" v-if="objValue.enginType == 'old_renovation'">暂存</button>
- </view>
- <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
- </scroll-view>
- </template>
- <script>
- import SelectPicker from '../../../components/selectPicker/select_picker.vue'
- import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
- import {
- getDicts
- } from "@/api/system/dict/data";
- import {
- getAreaList,
- getBuildingList,
- getUnitList,
- getHousesList,
- addTearOldPipe,
- getEnginMaterialQualityList,
- getEnginSpecificationsList,
- getRoomProjectList,
- getRoomProjectId,
- getRoomDetailsIDCard,
- putRoomDetails
- } from '@/api/common'
- import {
- getToken
- } from '../../../utils/auth';
- import {
- showConfirm
- } from '../../../utils/common';
- import {
- login
- } from '../../../api/login';
- export default {
- components: {
- SelectPicker,
- bottomSheet
- },
- data() {
- return {
- headers: {
- Authorization: "Bearer " + getToken()
- },
- historyName: '',
- houseHeadName: '',
- houseHeadPhone: '',
- houseHeadIDcardNumber: '',
- administrative: '',
- type: '',
- changefj: false,
- change: false,
- open: false,
- reviewStatus: '', //是否可以点击
- objValue: '', //上一页面传过来的值 新增接口用
- openDict: false,
- selectList: [],
- dictOptions: [],
- imgArr: [],
- idCard: '',
- XQValue: {},
- XZQValue: {},
- projectValue: {
- 'dictValue': '0'
- },
- currentResidentsPhoe: [{
- phone: ''
- }],
- LevelValue: {},
- LDValue: {},
- DYValue: {},
- FJValue: {},
- specificationValue: {}, //规格
- materialValue: {}, //材质
- brandValue: {}, //品牌
- doorValue: {}, //上门类型
- SelfClosValve: {}, //自闭阀类型
- materialList: '', //材质list
- XQList: '',
- LDList: '',
- DYList: '',
- FJList: '',
- progress: 0, //上传图片进度百分比
- loading: false,
- isCheck: true, //是否按照施工图纸施工
- inputNumberValue: '',
- inputIntegerNumberValue: '',
- inputDecimalNumberValue: '',
- title: '',
- historyList: {}, //历史数据
- tempState: '',
- tempSelectList: [],
- }
- },
- created() {
- },
- onLoad(options) {
- if ('params' in options) {
- this.objValue = JSON.parse(decodeURIComponent(options.params));
- if (this.objValue.enginType == `old_renovation`) {
- this.title = '旧改工程-室内'
- } else if (this.objValue.enginType == `new_built`) {
- this.title = '新建工程-室内'
- }
- uni.setNavigationBarTitle({
- title: this.title
- })
- }
- },
- methods: {
- getSelectName(id) {
- let res = '';
- this.tempSelectList.forEach((val) => {
- if (id == val.id) {
- console.log("====", val.name)
- res = val.name
- };
- })
- return res;
- },
- copyAddress() {
- if (uni.getStorageSync('XZQValue') != {}) {
- this.type = 'xzq';
- this.changeSelectDict(uni.getStorageSync('XZQValue'));
- }
- if (uni.getStorageSync('XQValue') != {}) {
- this.type = 'xq';
- this.changeSelect(uni.getStorageSync('XQValue'))
- }
- if (uni.getStorageSync('LDValue') != {}) {
- this.type = 'ld';
- this.changeSelect(uni.getStorageSync('LDValue'))
- }
- if (uni.getStorageSync('DYValue') != {}) {
- this.type = 'dy';
- this.changeSelect(uni.getStorageSync('DYValue'))
- }
- if (uni.getStorageSync('FJValue') != {}) {
- this.type = 'fj';
- this.changeSelect(uni.getStorageSync('FJValue'))
- }
- },
- //判断是否选择
- isEmpty(str) {
- return (!str || 0 === str.length);
- },
- change1() {
- this.change = !this.change
- },
- // 显示历史弹窗
- handleShowSheet() {
- this.shareState = true;
- },
- // 隐藏历史弹窗
- handleHiddenShare() {
- this.shareState = false;
- },
- showPhoto(index) {
- uni.previewImage({
- current: index,
- urls: this.imgArr,
- })
- },
- remove(index) {
- uni.showModal({
- title: '提示',
- content: '是否删除该图片或视频?',
- success: (res) => {
- if (res.confirm) {
- this.imgArr.splice(index, 1)
- if (this.imgArr.length <= 0) {
- this.photo = true;
- }
- }
- }
- })
- },
- choose() {
- let _this = this;
- uni.showActionSheet({
- title: '上传',
- itemList: ['图片', '视频'],
- success: (res) => {
- if (res.tapIndex == 0) {
- this.chooseimage()
- } else {
- this.choosevideo()
- }
- }
- })
- },
- chooseimage() {
- let _this = this;
- uni.chooseImage({
- sizeType: ['album', 'camera'],
- success(resp) {
- resp.tempFiles.forEach((item, index) => {
- const task = uni.uploadFile({
- url: _this.$HTTP + `/obs`,
- filePath: item.path,
- name: 'file',
- formData: {},
- header: _this.headers,
- success: res => {
- // 判断是否json字符串,将其转为json格式
- // let data = _this.$u.test.jsonString(res
- // .data) ? JSON.parse(res.data) : res.data;
- let data = JSON.parse(res.data);
- if (![200].includes(data.code)) {
- // this.uploadError(index, data);
- _this.$modal.msg(data.msg)
- } else {
- if (_this.progress === 100) {
- _this.imgArr.push(data.data.url)
- _this.$modal.msg('上传成功!')
- _this.photo = false;
- }
- }
- },
- fail: e => {
- _this.$modal.msg('上传失败!')
- //_this.uploadError(index, e);
- },
- complete: res => {
- uni.hideLoading();
- _this.uploading = false;
- }
- });
- task.onProgressUpdate(res => {
- _this.progress = res.progress;
- uni.showLoading({
- title: '上传中'
- })
- if (_this.progress != 100) {
- _this.loading = false
- } else {
- _this.loading = true
- }
- });
- })
- },
- })
- },
- choosevideo() {
- let _this = this;
- uni.chooseVideo({
- sourceType: ['album', 'camera'],
- maxDuration: 30,
- success(resp) {
- const task = uni.uploadFile({
- url: _this.$HTTP + `/obs`,
- filePath: resp.tempFilePath,
- name: 'file',
- formData: {},
- header: _this.headers,
- success: res => {
- // 判断是否json字符串,将其转为json格式
- let data = JSON.parse(res.data);
- if (![200].includes(res.statusCode)) {
- this.uploadError(index, data);
- } else {
- //上传成功
- if (_this.progress === 100) {
- _this.imgArr.push(data.data.url)
- _this.$modal.msg('上传成功!')
- _this.photo = false;
- }
- }
- },
- fail: e => {
- _this.$modal.msg('上传失败!')
- this.uploadError(index, e);
- },
- complete: res => {
- uni.hideLoading();
- _this.uploading = false;
- }
- });
- task.onProgressUpdate(res => {
- _this.progress = res.progress;
- uni.showLoading({
- title: '上传中'
- })
- if (_this.progress != 100) {
- _this.loading = false
- } else {
- _this.loading = true
- }
- });
- },
- })
- },
- pickerShow(e) {
- this.type = e; //赋值类型
- if (e == 'door') { //上门类型
- this.openDict = true;
- getDicts("visit_type").then(response => {
- this.dictOptions = response.data;
- });
- } else if (e == 'zbf') { //自闭阀类型
- this.open = true;
- getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
- .objValue.enginClassValue, '自闭阀厂家').then(response => {
- this.selectList = response.data;
- });
- } else if (e == 'brand') { //品牌
- this.open = true;
- getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
- .objValue.enginClassValue).then(response => {
- this.selectList = response.data;
- });
- } else if (e == 'cz') { //材质
- this.open = true;
- if (this.objValue.enginClassValue == '阀管') {
- getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
- this
- .objValue.enginClassValue, "灶具管厂家").then(response => {
- this.selectList = response.data;
- });
- } else {
- getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
- this
- .objValue.enginClassValue).then(response => {
- this.selectList = response.data;
- });
- }
- } else if (e == 'gg') { //规格
- if (this.isEmpty(this.materialValue.id)) {
- if (this.objValue.enginClassValue == '阀管') {
- this.$modal.msg('请选择灶具管厂家')
- } else {
- this.$modal.msg('请选择材质')
- }
- } else {
- this.open = true;
- this.selectList = this.materialList;
- }
- } else if (e == 'fsdj') {
- this.open = true;
- getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
- .objValue.enginClassValue).then(response => {
- this.selectList = response.data;
- });
- } else if (e == 'kj') {
- //孔距
- this.open = true;
- getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
- .objValue.enginClassValue).then(response => {
- this.selectList = response.data;
- });
- } else if (e == 'gczq') { //工程周期
- this.openDict = true;
- getDicts("engin_cycle").then(response => {
- this.dictOptions = response.data;
- });
- } else if (e == 'xzq') { //行政区
- if (this.isEmpty(this.projectValue.dictValue)) {
- this.$modal.msg('请选择工程周期')
- } else {
- this.openDict = true;
- getDicts("district").then(response => {
- this.dictOptions = response.data;
- });
- }
- //this.selectList = this.dictOptions;
- } else if (e == 'xq') { //小区
- if (this.isEmpty(this.XZQValue.dictValue)) {
- getAreaList('').then(res => {
- this.XQList = res.data;
- this.open = true;
- this.selectList = this.XQList;
- })
- } else {
- this.open = true;
- this.selectList = this.XQList;
- }
- } else if (e == 'ld') { //楼栋
- if (this.isEmpty(this.XQValue.id)) {
- this.$modal.msg('请选择小区')
- } else {
- this.open = true;
- this.selectList = this.LDList;
- }
- } else if (e == 'dy') { //单元
- if (this.isEmpty(this.LDValue.id)) {
- this.$modal.msg('请选择楼栋')
- } else {
- this.open = true;
- this.selectList = this.DYList;
- }
- } else if (e == 'fj') { //房间
- if (this.isEmpty(this.DYValue.id)) {
- this.$modal.msg('请选择单元')
- } else {
- this.open = true;
- this.selectList = this.FJList;
- }
- }
- },
- switchChange(e) {
- //'switch 发生 change 事件,携带值为', e.detail.value)
- this.isCheck = e.detail.value;
- },
- changeSelectDict(item, index) {
- this.openDict = false;
- if (this.type == 'door') {
- this.doorValue = item
- } else if (this.type == 'gczq') {
- this.projectValue = item
- if (!this.isEmpty(this.FJValue.id)) {
- //房间选完 判断 工程周期 工程周期切换
- this.getStatus();
- }
- } else if (this.type == 'xzq') {
- this.XZQValue = item;
- //根据行政区id获取小区数据
- this.XQValue = ''; //重置小区数据
- this.LDValue = ''; //重置楼栋数据
- this.DYValue = ''; //重置单元数据
- this.FJValue = ''; //重置房间数据
- this.currentResidentsPhoe = [];
- this.historyName = "";
- this.houseHeadName = "";
- this.houseHeadPhone = "";
- this.houseHeadIDcardNumber = "";
- this.administrative = "";
- getAreaList(item.dictValue).then(res => {
- this.XQList = res.data;
- })
- }
- },
- changeSelect(item, index) {
- // this.index = index;
- // this.address = item.communityName;
- this.open = false;
- if (this.type == 'cz') {
- this.materialValue = item;
- this.specificationValue = ''; //重置规格
- //根据材质ID 获取规格数据
- getEnginSpecificationsList(item.id).then(res => {
- this.materialList = res.data
- })
- } else if (this.type == 'gg') {
- this.specificationValue = item;
- } else if (this.type == 'xq') {
- this.XZQValue = {
- dictValue: item.district,
- dictLabel: item.districtName
- };
- this.XQValue = item;
- //根据小区id 获取楼栋数据
- this.LDValue = ''; //重置楼栋数据
- this.DYValue = ''; //重置单元数据
- this.FJValue = ''; //重置房间数据
- this.currentResidentsPhoe = [];
- this.historyName = "";
- this.houseHeadName = "";
- this.houseHeadPhone = "";
- this.houseHeadIDcardNumber = "";
- this.administrative = item.administrative;
- getBuildingList(item.id).then(res => {
- this.LDList = res.data
- })
- } else if (this.type == 'ld') {
- this.LDValue = item;
- //根据楼栋ID 获取单元数据
- this.DYValue = ''; //重置单元数据
- this.FJValue = ''; //重置房间数据
- this.currentResidentsPhoe = [];
- this.historyName = "";
- this.houseHeadName = "";
- this.houseHeadPhone = "";
- this.houseHeadIDcardNumber = "";
- getUnitList(item.id).then(res => {
- this.DYList = res.data
- })
- } else if (this.type == 'dy') {
- this.DYValue = item;
- //根据单元数据 获取房间数据
- this.FJValue = ''; //重置房间数据
- this.currentResidentsPhoe = [];
- this.historyName = "";
- this.houseHeadName = "";
- this.houseHeadPhone = "";
- this.houseHeadIDcardNumber = "";
- getHousesList(item.id).then(res => {
- this.FJList = res.data
- })
- } else if (this.type == 'fj') {
- this.FJValue = item;
- this.history();
- this.houseHeadName = item.houseUserName;
- this.houseHeadPhone = item.phone;
- this.houseHeadIDcardNumber = item.idCard;
- this.currentResidentsPhoe = [];
- if (!this.isEmpty(item.newPhone)) {
- let str = item.newPhone;
- var array = str.split(",");
- array.forEach((list) => {
- this.currentResidentsPhoe.push({
- phone: list
- })
- })
- }
- if (!this.isEmpty(this.projectValue.id)) {
- //房间选完 判断 工程周期
- this.getStatus();
- }
- } else if (this.type == 'zbf') {
- this.SelfClosValve = item
- } else if (this.type == 'brand') {
- this.brandValue = item
- } else {
- this.LevelValue = item;
- }
- },
- //关闭弹窗
- close(e) {
- this.open = false
- },
- //关闭弹窗
- closeDict(e) {
- this.openDict = false
- },
- getStatus() {
- let param = {
- areaId: this.XQValue.id, // 小区id
- buildingId: this.LDValue.id, // 楼宇id
- unitId: this.DYValue.id, // 单元id
- houseId: this.FJValue.id, // 房间id
- enginCycle: this.projectValue.id, // 工程周期
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- }
- getRoomProjectId(param).then(res => {
- if (res.code == '200') {
- if (res.data != null && res.data.zEngineeringNodeBoList != null) {
- res.data.zEngineeringNodeBoList.forEach((item, index) => {
- if (this.objValue.enginClassValue == item.type) {
- this.reviewStatus = item.reviewStatus;
- if (item.reviewStatus == '1')
- this.$modal.msg('当前工程已结束')
- }
- })
- } else {
- this.reviewStatus = '' //置空
- }
- } else {
- this.$modal.msg(res.msg)
- this.reviewStatus = '' //置空
- }
- })
- },
- serchByCard() {
- if (this.isEmpty(this.idCard)) {
- this.$modal.msg("请输入身份证号码")
- return
- }
- if (!this.$validation.idCard(this.idCard)) {
- this.$modal.msg("身份证号码格式不正确")
- return
- }
- getRoomDetailsIDCard(this.idCard).then(res => {
- if (res.code == '200' && res.data != null) {
- if (!this.isEmpty(res.data.newPhone)) {
- this.currentResidentsPhoe = [];
- let str = res.data.newPhone;
- var array = str.split(",");
- array.forEach((list) => {
- this.currentResidentsPhoe.push({
- phone: list
- })
- })
- }
- this.houseHeadName = res.data.houseUserName;
- this.houseHeadIDcardNumber = res.data.idCard;
- this.houseHeadPhone = res.data.phone;
- this.XZQValue = {
- dictValue: res.data.district,
- dictLabel: res.data.districtName
- };
- this.XQValue = {
- id: res.data.areaId,
- name: res.data.areaName
- }
- this.LDValue = {
- id: res.data.buildingId,
- name: res.data.buildingName
- }
- this.DYValue = {
- id: res.data.unitId,
- name: res.data.unitName
- }
- this.FJValue = {
- id: res.data.id,
- name: res.data.name
- }
- getAreaList(this.XZQValue.dictValue).then(res => {
- this.XQList = res.data;
- })
- getBuildingList(this.XQValue.id).then(res => {
- this.LDList = res.data
- })
- getUnitList(this.LDValue.id).then(res => {
- this.DYList = res.data
- })
- getHousesList(this.DYValue.id).then(res => {
- this.FJList = res.data
- })
- }
- })
- },
- //提交数据
- submit(e) {
- this.tempState = e == 'submit' ? '' : '99'
- if (this.isEmpty(this.projectValue.dictValue)) {
- this.$modal.msg("请选择工程周期")
- return
- }
- if (this.isEmpty(this.XZQValue.dictValue)) {
- this.$modal.msg("请选择行政区")
- return
- }
- if (this.isEmpty(this.XQValue.id)) {
- this.$modal.msg("请选择小区")
- return
- }
- if (this.isEmpty(this.LDValue.id)) {
- this.$modal.msg("请选择楼栋")
- return
- }
- if (this.isEmpty(this.DYValue.id)) {
- this.$modal.msg("请选择单元")
- return
- }
- if (this.isEmpty(this.FJValue.id)) {
- this.$modal.msg("请选择房间")
- return
- }
- uni.setStorageSync("XZQValue", this.XZQValue)
- uni.setStorageSync("XQValue", this.XQValue)
- uni.setStorageSync("LDValue", this.LDValue)
- uni.setStorageSync("DYValue", this.DYValue)
- uni.setStorageSync("FJValue", this.FJValue)
- try {
- this.currentResidentsPhoe.forEach((list) => {
- if (this.isEmpty(list.phone)) {
- this.$modal.msg('现住人电话不能为空')
- throw new Error('End Loop')
- }
- if (list.phone.length == 11 || list.phone.length == 8) {} else {
- this.$modal.msg('现住人电话填写错误')
- throw new Error('End Loop')
- }
- })
- } catch (e) {
- if (e.message === 'End Loop') throw e
- }
- if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
- if (this.isEmpty(this.brandValue.id)) {
- this.$modal.msg("请选择厂家")
- } else {
- this.onsubmit();
- }
- } else if (this.objValue.enginClassValue == '打孔') {
- // if (this.isEmpty(this.LevelValue.id)) {
- // this.$modal.msg("请选择孔距") //打孔 判断孔距
- // } else {
- this.onsubmit();
- //}
- } else if (this.objValue.enginClassValue == '拆旧管') {
- if (this.currentResidentsPhoe.length == 0) {
- this.$modal.msg('现住人电话不能为空')
- } else if (this.isEmpty(this.LevelValue.id)) {
- this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
- } else {
- this.onsubmit();
- }
- } else if (this.objValue.enginClassValue == '立杠') {
- //立杠 判断 材质 规格 米数
- if (this.isEmpty(this.materialValue.id)) {
- this.$modal.msg("请选择材质")
- } else if (this.isEmpty(this.specificationValue.id)) {
- this.$modal.msg("请选择规格")
- } else if (this.isEmpty(this.inputIntegerNumberValue)) {
- this.$modal.msg("请输入米数")
- } else {
- if (this.isEmpty(this.inputDecimalNumberValue)) {
- this.inputNumberValue = this.inputIntegerNumberValue;
- } else {
- this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
- }
- this.onsubmit();
- }
- } else if (this.objValue.enginClassValue == '挂表') {
- //挂表 判断 品牌
- if (this.isEmpty(this.brandValue.id)) {
- this.$modal.msg("请选择品牌")
- } else {
- this.onsubmit();
- }
- } else if (this.objValue.enginClassValue == '表后管') {
- //表后管 判断 材质 规格 米数 (为必须有一张照片和一个视频)
- if (this.isEmpty(this.materialValue.id)) {
- this.$modal.msg("请选择材质")
- } else if (this.isEmpty(this.specificationValue.id)) {
- this.$modal.msg("请选择规格")
- } else if (this.isEmpty(this.inputIntegerNumberValue)) {
- this.$modal.msg("请输入米数")
- } else if (this.imgArr.length <= 0) {
- this.$modal.msg('请上传照片或视频')
- }
- // else if (this.loading == false) {
- // this.$modal.msg('照片或视频未上传完毕,无法提交!')
- // }
- else {
- const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
- '.png') || item
- .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
- .endsWith('.JPEG'));
- const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
- if (hasImage && hasVideo) {
- //表后管 特殊 提交
- if (this.isEmpty(this.inputDecimalNumberValue)) {
- this.inputNumberValue = this.inputIntegerNumberValue;
- } else {
- this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
- }
- let phoneArr = [];
- this.currentResidentsPhoe.forEach((list) => {
- phoneArr.push(list.phone)
- })
- putRoomDetails(this.FJValue.id, phoneArr
- .join())
- .then(res => {
- if (res.code == '200') {
- let param = {
- district: this.XZQValue.dictValue,
- areaId: this.XQValue.id,
- buildingId: this.LDValue.id,
- unitId: this.DYValue.id,
- houseId: this.FJValue.id,
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue
- .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- enginCycle: this.projectValue.dictValue, //工程周期
- zEngineeringNodeBo: {
- type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
- zEngineeringInfoBo: {
- constructAccordingDrawings: this.isCheck, //是否按图纸施工
- state: this.tempState,
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngineeringMaterialBo: [{
- materialQuality: this.materialValue.id, //材质
- specifications: this.specificationValue.id, //规格
- number: this.inputNumberValue //米数
- }]
- }
- }
- }
- uni.showLoading()
- addTearOldPipe(param).then(res => {
- if (res.code == '200') {
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: 'none',
- //显示持续时间为 1秒
- duration: 1000
- });
- uni.navigateBack();
- }
- })
- }
- })
- } else {
- this.$modal.msg('请至少上传一张照片和一个视频')
- }
- }
- } else if (this.objValue.enginClassValue == '阀管') {
- //阀管 判断 材质 规格 米数
- if (this.isEmpty(this.doorValue.dictValue)) {
- this.$modal.msg("请选择上门类型")
- } else if (this.isEmpty(this.SelfClosValve.id)) {
- this.$modal.msg("请选择自闭阀厂家")
- } else if (this.isEmpty(this.materialValue.id)) {
- this.$modal.msg("请选择材质")
- } else if (this.isEmpty(this.specificationValue.id)) {
- this.$modal.msg("请选择规格")
- }
- // else if (this.isEmpty(this.inputIntegerNumberValue)) {
- // this.$modal.msg("请输入米数")
- // }
- else {
- if (this.isEmpty(this.inputDecimalNumberValue)) {
- this.inputNumberValue = this.inputIntegerNumberValue;
- } else {
- this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
- }
- this.onsubmit();
- }
- }
- },
- onsubmit() {
- if (this.imgArr.length <= 0) {
- this.$modal.msg('请上传照片或视频')
- }
- // else if (this.loading == false) {
- // this.$modal.msg('照片或视频未上传完毕,无法提交!')
- // }
- else {
- let phoneArr = [];
- this.currentResidentsPhoe.forEach((list) => {
- phoneArr.push(list.phone)
- })
- putRoomDetails(this.FJValue.id, phoneArr.join())
- .then(res => {
- if (res.code == '200') {
- this.againSubmit();
- }
- })
- }
- },
- againSubmit() {
- //提交
- let param = '';
- if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue ==
- '打孔') { //拆旧管 打孔
- param = {
- district: this.XZQValue.dictValue,
- areaId: this.XQValue.id,
- buildingId: this.LDValue.id,
- unitId: this.DYValue.id,
- houseId: this.FJValue.id,
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue
- .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- enginCycle: this.projectValue.dictValue, //工程周期
- zEngineeringNodeBo: {
- type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
- zEngineeringInfoBo: {
- constructAccordingDrawings: this.isCheck, //是否按图纸施工
- state: this.tempState,
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngineeringMaterialBo: [{
- corrosionLevel: this.LevelValue.id //腐蚀等级 //孔距
- }]
- }
- }
- }
- //this.onsubmit(param)
- } else if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue ==
- '切断阀') { //报警器切断阀
- param = {
- district: this.XZQValue.dictValue,
- areaId: this.XQValue.id,
- buildingId: this.LDValue.id,
- unitId: this.DYValue.id,
- houseId: this.FJValue.id,
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue
- .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- enginCycle: this.projectValue.dictValue, //工程周期
- zEngineeringNodeBo: {
- type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
- zEngineeringInfoBo: {
- constructAccordingDrawings: this.isCheck, //是否按图纸施工
- state: this.tempState,
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngineeringMaterialBo: [{
- brand: this.brandValue.id, //品牌
- // number: this.inputNumberValue //米数
- }]
- }
- }
- }
- } else if (this.objValue.enginClassValue == '立杠') { //立杠
- param = {
- district: this.XZQValue.dictValue,
- areaId: this.XQValue.id,
- buildingId: this.LDValue.id,
- unitId: this.DYValue.id,
- houseId: this.FJValue.id,
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue
- .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- enginCycle: this.projectValue.dictValue, //工程周期
- zEngineeringNodeBo: {
- type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
- zEngineeringInfoBo: {
- constructAccordingDrawings: this.isCheck, //是否按图纸施工
- state: this.tempState,
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngineeringMaterialBo: [{
- materialQuality: this.materialValue.id, //材质
- specifications: this.specificationValue.id, //规格
- number: this.inputNumberValue //米数
- }]
- }
- }
- }
- } else if (this.objValue.enginClassValue == '挂表') { //挂表
- param = {
- district: this.XZQValue.dictValue,
- areaId: this.XQValue.id,
- buildingId: this.LDValue.id,
- unitId: this.DYValue.id,
- houseId: this.FJValue.id,
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue
- .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- enginCycle: this.projectValue.dictValue, //工程周期
- zEngineeringNodeBo: {
- type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
- zEngineeringInfoBo: {
- constructAccordingDrawings: this.isCheck, //是否按图纸施工
- state: this.tempState,
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngineeringMaterialBo: [{
- brand: this.brandValue.id, //品牌
- //number: this.inputNumberValue //米数
- }]
- }
- }
- }
- } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
- var onlyNumbers = this.specificationValue.name.replace(/[^\d.]/g, '');
- console.log(this.specificationValue)
- param = {
- district: this.XZQValue.dictValue,
- areaId: this.XQValue.id,
- buildingId: this.LDValue.id,
- unitId: this.DYValue.id,
- houseId: this.FJValue.id,
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue
- .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- enginCycle: this.projectValue.dictValue, //工程周期
- zEngineeringNodeBo: {
- type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
- zEngineeringInfoBo: {
- constructAccordingDrawings: this.isCheck, //是否按图纸施工
- state: this.tempState,
- zEngiineeringPhotoBoList: this.imgArr, //照片集合
- zEngineeringMaterialBo: [{
- visitType: this.doorValue.dictValue, //上门类型
- selfClosingValveType: this.SelfClosValve.id, //自闭阀类型
- materialQuality: this.materialValue.id, //材质
- specifications: this.specificationValue.id, //规格
- number: onlyNumbers //米数
- }]
- }
- }
- }
- }
- uni.showLoading()
- addTearOldPipe(param).then(res => {
- if (res.code == '200') {
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: 'none',
- //显示持续时间为 3秒
- duration: 2000
- });
- setTimeout(function() {
- uni.navigateBack();
- }, 1000)
- }
- })
- },
- history() {
- if (this.isEmpty(this.projectValue.dictValue)) {
- this.$modal.msg("请选择工程周期")
- return
- }
- if (this.isEmpty(this.XZQValue.dictValue)) {
- this.$modal.msg("请选择行政区")
- return
- }
- if (this.isEmpty(this.XQValue.id)) {
- this.$modal.msg("请选择小区")
- return
- }
- if (this.isEmpty(this.LDValue.id)) {
- this.$modal.msg("请选择楼栋")
- return
- }
- if (this.isEmpty(this.DYValue.id)) {
- this.$modal.msg("请选择单元")
- return
- }
- if (this.isEmpty(this.FJValue.id)) {
- this.$modal.msg("请选择房间")
- return
- }
- let param = {
- areaId: this.XQValue.id, // 小区id
- buildingId: this.LDValue.id, // 楼宇id
- unitId: this.DYValue.id, // 单元id
- houseId: this.FJValue.id, // 房间id
- enginCycle: this.projectValue.dictValue, // 工程周期
- enginType: this.objValue.enginType, //写死 上一页面传过来的
- enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
- }
- getRoomProjectId(param).then(res => {
- if (res.code == '200') {
- if (res.data != null) {
- getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
- // this.historyName = res.data.zEngineeringNodeBo.reviewStatus == '0' ?
- // '未通过' : '已通过'
- if (res.data.zEngineeringNodeBo.reviewStatus == '1') {
- this.historyName = '已通过';
- } else if (res.data.zEngineeringNodeBo.reviewStatus == '99') {
- this.historyName = '恢复暂存';
- } else {
- this.historyName = '未通过';
- }
- this.historyList = res.data
- if (res.data.zEngineeringNodeBo != null) {
- if (res.data.zEngineeringNodeBo.reviewStatus == '1') {
- // this.showHistoryList();
- this.$modal.msg("当前步骤以审核通过请谨慎!")
- } else if (res.data.zEngineeringNodeBo.reviewStatus == '99') {
- let dataJson = res.data.zEngineeringNodeBo
- .zEngineeringInfoBoList[0];
- this.imgArr = dataJson.zEngiineeringPhotoBoList;
- this.LevelValue.id = dataJson
- .zEngineeringMaterialBo[0]
- .corrosionLevel
- if (this.objValue.enginClassValue == '拆旧管') {
- this.LevelValue.id = dataJson
- .zEngineeringMaterialBo[0]
- .corrosionLevel
- this.LevelValue.name = dataJson
- .zEngineeringMaterialBo[0]
- .corrosionLevelName
- } else if (this.objValue.enginClassValue == '立杠' || this.objValue
- .enginClassValue == '表后管') {
- this.materialValue.id = dataJson.zEngineeringMaterialBo[0].materialQuality;
- this.specificationValue.id = dataJson
- .zEngineeringMaterialBo[0]
- .specifications;
- this.materialValue.name = dataJson.zEngineeringMaterialBo[0]
- .materialQualityName;
- this.specificationValue.name = dataJson
- .zEngineeringMaterialBo[0].specificationsName;
- this.inputIntegerNumberValue = this.getIntegerPart(
- dataJson
- .zEngineeringMaterialBo[0].number, 0);
- this.inputDecimalNumberValue = this.getIntegerPart(dataJson
- .zEngineeringMaterialBo[0].number, 1);
- } else if (this.objValue.enginClassValue == '报警器' || this.objValue
- .enginClassValue == '切断阀' || this.objValue
- .enginClassValue == '挂表') {
- this.brandValue.id = dataJson.zEngineeringMaterialBo[0]
- .brand
- this.brandValue.name = dataJson.zEngineeringMaterialBo[0]
- .brandName
- } else if (this.objValue.enginClassValue == '阀管') {
- this.doorValue.dictValue = dataJson
- .zEngineeringMaterialBo[0]
- .visitType;
- this.doorValue.dictLabel = dataJson
- .zEngineeringMaterialBo[0]
- .visitType;
- this.SelfClosValve.id = dataJson
- .zEngineeringMaterialBo[0]
- .selfClosingValveType;
- this.SelfClosValve.name = dataJson
- .zEngineeringMaterialBo[0]
- .selfClosingValveTypeName;
- this.materialValue.id = dataJson
- .zEngineeringMaterialBo[0]
- .materialQuality;
- this.specificationValue.id = dataJson
- .zEngineeringMaterialBo[0]
- .specifications;
- this.materialValue.name = dataJson.zEngineeringMaterialBo[0]
- .materialQualityName;
- this.specificationValue.name = dataJson
- .zEngineeringMaterialBo[0].specificationsName;
- }
- }
- } else {
- this.$modal.msg("暂无历史信息")
- }
- })
- } else {
- this.$modal.msg("暂无工程信息")
- }
- } else {
- this.$modal.msg(res.msg)
- }
- })
- },
- getIntegerPart(numStr, i) {
- return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
- },
- setInfoBoNumber(key, number, i) {
- let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0]
- .number;
- let resAry = Ynumber.toString().split('.');
- resAry[i] = number
- this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].number = resAry
- .join('.');
- },
- showHistoryList() {
- this.$refs.refShare.handleShowShare();
- }
- }
- }
- </script>
- <style lang="scss">
- .container {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 10px;
- position: relative;
- }
- .uni-list {
- border: 1xp solid #eee;
- }
- .to-right-icon {
- width: 15px;
- height: 15px;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- }
- .text {
- font-size: 16px;
- color: #333;
- }
- .background {
- // border: 15px solid hsla(0, 0%, 100%, .5);
- background: white;
- background-clip: padding-box;
- padding: 20rpx;
- border-radius: 20rpx;
- margin: 20rpx 10rpx;
- /*从padding开始往外面裁剪背景*/
- }
- .btn {
- width: 715rpx;
- height: 69rpx;
- background: #79A4F0;
- border-radius: 6rpx;
- font-size: 25rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 69rpx;
- margin-top: 40rpx;
- margin-bottom: 100rpx;
- }
- .number {
- display: flex;
- /* 水平居中显示子元素 */
- align-items: flex-start;
- /* 垂直居中显示子元素 */
- justify-content: space-between;
- /* 左右间距等于间距大小 */
- padding: 10px;
- /* 设置padding以提高视觉效果 */
- }
- .tj-btn {
- height: 69rpx;
- background: #3184f0;
- border-radius: 6rpx;
- font-size: 25rpx;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 69rpx;
- margin: 40rpx 70rpx;
- }
- .sc-btn {
- height: 69rpx;
- background: #f0686b;
- border-radius: 6rpx;
- font-size: 25rpx;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 69rpx;
- margin: 40rpx;
- }
- .num-style {
- background: #e8f4f9;
- margin: 20rpx;
- padding: 10rpx;
- border-radius: 20rpx;
- border: 1px solid #d4e3f0;
- }
- .textarea {
- margin-top: 10upx;
- width: 100%;
- border: 1rpx solid red;
- min-height: 100upx;
- line-height: 20px;
- }
- page {
- background: #f2f2f2;
- }
- .flex-x {
- display: flex;
- align-items: center;
- }
- .template_title,
- .template_title1,
- .template_title_list {
- height: 90rpx;
- background: #fff;
- justify-content: space-between;
- padding: 0 30rpx;
- box-sizing: border-box;
- }
- .template_title1 {
- background: none;
- }
- .template_title_list {
- margin-bottom: 4rpx;
- }
- .template_title>view,
- .template_title1>view {
- font-size: 32rpx;
- color: #8f8f8f;
- flex-shrink: 0;
- margin-right: 20rpx;
- }
- .template_title>input {
- font-size: 28rpx;
- color: #808080;
- text-align: right;
- flex-grow: 1;
- }
- /* 添加内容 */
- .add_con>text {
- font-size: 40rpx;
- color: #f16765;
- display: block;
- margin-right: 20rpx;
- margin-left: 10rpx;
- line-height: 44rpx;
- }
- .add_con>view {
- font-size: 32rpx;
- color: #7885cb;
- }
- /* 删除内容 */
- .del {
- font-size: 32rpx;
- color: #f16765;
- margin-right: 14rpx;
- padding: 20rpx;
- }
- input {
- flex-grow: 1;
- font-size: 28rpx;
- color: #808080;
- }
- // .container {
- // display: flex;
- // align-items: center;
- // justify-content: space-between;
- // padding: 10px;
- // position: relative;
- // }
- // .uni-list {
- // border: 1xp solid #eee;
- // }
- // .to-right-icon {
- // width: 15px;
- // height: 15px;
- // position: absolute;
- // top: 50%;
- // transform: translateY(-50%);
- // }
- // .text {
- // font-size: 16px;
- // color: #333;
- // }
- // .background {
- // // border: 15px solid hsla(0, 0%, 100%, .5);
- // background: white;
- // background-clip: padding-box;
- // padding: 20rpx;
- // border-radius: 20rpx;
- // margin: 20rpx;
- // /*从padding开始往外面裁剪背景*/
- // }
- // .btn {
- // width: 715rpx;
- // height: 69rpx;
- // background: #79A4F0;
- // border-radius: 6rpx;
- // font-size: 25rpx;
- // font-family: Microsoft YaHei;
- // font-weight: 400;
- // color: #FFFFFF;
- // line-height: 69rpx;
- // margin-top: 40rpx;
- // margin-bottom: 100rpx;
- // }
- // .number {
- // display: flex;
- // /* 水平居中显示子元素 */
- // align-items: flex-start;
- // /* 垂直居中显示子元素 */
- // justify-content: space-between;
- // /* 左右间距等于间距大小 */
- // padding: 10px;
- // /* 设置padding以提高视觉效果 */
- // }
- // .textarea {
- // margin-top: 10upx;
- // width: 100%;
- // border: 1rpx solid red;
- // min-height: 100upx;
- // line-height: 20px;
- // }
- </style>
|