| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306 |
- <template>
- <view class="detail-page">
- <scroll-view class="detail-content" :scroll-y="true">
- <!-- 工单信息 -->
- <view class="info-section">
- <view class="section-title">
- <text class="section-title-text">工单信息</text>
- </view>
- <view class="info-card">
- <view class="info-item">
- <text class="info-label">工单编码</text>
- <text class="info-value">{{ workOrderProjectNo ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">工单类型</text>
- <text class="info-value">{{ orderType == '1' ? '维修工单' : '维保工单' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">风机编号</text>
- <text class="info-value">{{ pcsDeviceName ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">维保中心</text>
- <text class="info-value">{{ gxtCenter ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">场站</text>
- <text class="info-value">{{ pcsStationName ?? '-' }}</text>
- </view>
- <!-- <view class="info-item">
- <text class="info-label">品牌</text>
- <text class="info-value">{{ detailData.model ?? '' }}</text>
- </view> -->
- <view class="info-item">
- <text class="info-label">机型</text>
- <text class="info-value">{{ brand ?? '-' }} {{ model ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">接单时间</text>
- <text class="info-value">{{ acceptTime ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">故障代码</text>
- <text class="info-value">{{ faultCode ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">故障条文</text>
- <text class="info-value">{{ faultBarcode ?? '-' }}</text>
- </view>
- <view class="info-item">
- <text class="info-label">故障描述</text>
- <text class="info-value">{{ faultDesc ?? '-' }}</text>
- </view>
- <view class="info-item" v-if="pauseTime != ''">
- <text class="info-label">发生时间</text>
- <text class="info-value">{{ pauseTime ?? '' }}</text>
- </view>
- <view class="info-item" v-if="restartTime != ''">
- <text class="info-label">复运时间</text>
- <text class="info-value">{{ restartTime ?? '' }}</text>
- </view>
- </view>
- </view>
- <!-- 结单表单 -->
- <view class="info-section">
- <view class="section-title">
- <text class="section-title-text">结单信息</text>
- </view>
- <view class="info-card">
- <!-- 信息录入 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">信息录入<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <radio-group @change="handleInfoEntryChange" :disabled="infoEntryDisabled" class="uni-flex uni-row radio-group">
- <view v-for="(option, index) in infoEntryOptions" :key="index" class="radio-label">
- <radio :value="option.dictValue" :checked="infoEntry == option.dictValue">{{ option.dictLabel }}</radio>
- <!-- <text></text> -->
- </view>
- </radio-group>
- </view>
- </view>
- <!-- MIS工单编码选择(当信息录入为1时显示) -->
- <view class="info-item" v-if="infoEntry == '1'">
- <view class="info-label">
- <text class="form-label required">MIS工单编码<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="input-with-select">
- <input
- class="input-field"
- placeholder="请输入或选择MIS工单编码"
- v-model="misNo"
- @focus="handleMisNoInputFocus"
- @blur="handleMisNoInputBlur"
- @input="handleMisNoInput"
- :readonly="infoEntry == '1'"
- :style="{ paddingRight: '120rpx' }" />
- <text class="select-mis-btn" @click="openMisListModal">选择</text>
- </view>
- </view>
- </view>
- <!-- 工作票编号(当信息录入为2时可编辑) -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">工作票编号<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <input
- class="input-field"
- placeholder="请输入工作票编号"
- v-model="workPermitNum"
- maxlength="20"
- :disabled="infoEntry == '1'"
- @change="handleWorkPermitNumChange"
- />
- </view>
- </view>
- <!-- 开始时间 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">开始时间<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="form-picker" @click="infoEntry == '1' ? showStartTimePicker = false : showStartTimePicker = true">
- <input
- class="input-field"
- placeholder="请选择开始时间"
- v-model="realStartTime"
- type="none"
- style="pointer-events: none;"
- />
- </view>
- </view>
- </view>
- <!-- 结束时间 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">结束时间<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="form-picker" @click="infoEntry == '1' ? showEndTimePicker = false : showEndTimePicker = true">
- <input
- class="input-field"
- placeholder="请选择结束时间"
- v-model="realEndTime"
- type="none"
- style="pointer-events: none;"
- />
- <!-- <text class="input-field">
- {{ realEndTime != '' ? realEndTime : '请选择结束时间' }}
- </text> -->
- </view>
- </view>
- </view>
- <!-- 挂起结束时间 -->
- <view class="info-item" v-if="resumeInfo != null && resumeShow">
- <view class="info-label">
- <text class="form-label required">挂起结束时间<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="form-picker" @click="showResumeTimePicker = true">
- <input
- class="input-field"
- placeholder="请选择挂起结束时间"
- v-model="resumeTime"
- type="none"
- />
- </view>
- </view>
- </view>
- <!-- 工作部位 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label">工作部位<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="form-picker" @click="showWorkAreaPicker = true">
- <input
- class="input-field"
- placeholder="请选择工作部位"
- v-model="workAreaLabel"
- readonly
- />
- </view>
- </view>
- </view>
- <!-- 外委人员数 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">外委人员数(人)</text>
- </view>
- <view class="info-value">
- <input
- type="number"
- class="input-field"
- placeholder="请输入外委人员数"
- v-model="wwryNum"
- @input="onWwryNumInput"
- />
- </view>
- </view>
- <!-- 外来人员数 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">外来人员数(人)</text>
- </view>
- <view class="info-value">
- <input
- type="number"
- class="input-field"
- placeholder="请输入外来人员数"
- v-model="wlryNum"
- @input="onWlryNumInput"
- />
- </view>
- </view>
- <!-- 工作负责人 -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">工作负责人<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="input-with-clear">
- <input
- class="input-field"
- placeholder="请选择工作负责人"
- v-model="teamLeaderName"
- @click="showLeaderPicker = true"
- :disabled="infoEntry == '1' || overStopStatus == 2"
- />
- </view>
- </view>
- </view>
- <!-- 工作班成员选择(当信息录入为2时可编辑) -->
- <view class="info-item">
- <view class="info-label">
- <text class="form-label required">工作班成员<text style="color: red;">*</text></text>
- </view>
- <view class="info-value">
- <view class="input-with-clear">
- <input
- class="input-field"
- placeholder="请选择工作班成员"
- v-model="workGroupMemberName"
- @click="showUserSelect = true"
- :disabled="infoEntry == '1' || overStopStatus == 2"
- />
- <!-- <text class="select-users-count" v-if="selectedUserIds.length > 0" :style="{ marginRight: selectedUserIds.length > 0 ? '60rpx' : '0' }">({{ selectedUserIds.length }}人)</text> -->
- <text class="select-clear" v-if="selectedUserIds.length > 0" @click="clearSelectedUsers">×</text>
- </view>
- </view>
- </view>
- <!-- 维保内容 -->
- <view class="info-item full-width">
- <view class="info-label">
- <text class="form-label required">真实故障原因</text>
- </view>
- <view class="info-value">
- <textarea
- class="textarea-field"
- placeholder="请输入真实故障原因"
- v-model="realFailureReason"
- maxlength="500"
- :show-confirm-bar="false"
- auto-height
- ></textarea>
- </view>
- </view>
- <!-- 附件上传 -->
- <view class="info-item full-width">
- <view class="info-label">
- <text class="form-label">附件(可选)</text>
- </view>
- <view class="info-value">
- <upload-image
- :limit="8"
- :modelValue="uploadedFiles"
- :businessType="'workOrder'"
- @update:modelValue="uploadedFiles = $event as UTSArray<UploadResponse>"
- />
- </view>
- </view>
- </view>
- </view>
- <!-- 时间选择器弹窗 -->
- <!-- Start Date Picker -->
- <l-popup v-model="showStartTimePicker" position="bottom" :safe-area-inset-bottom="true" :z-index="10000">
- <l-date-time-picker
- title="选择开始时间"
- :mode="1 | 2 | 4 | 8 | 16"
- format="YYYY-MM-DD HH:mm"
- :modelValue="realStartTime"
- confirm-btn="确定"
- cancel-btn="取消"
- @confirm="onStartDateConfirm"
- @cancel="showStartTimePicker = false">
- </l-date-time-picker>
- </l-popup>
- <!-- End Date Picker -->
- <l-popup v-model="showEndTimePicker" position="bottom" :safe-area-inset-bottom="true" :z-index="10000">
- <l-date-time-picker
- title="选择结束时间"
- :mode="31"
- format="YYYY-MM-DD HH:mm"
- :modelValue="realEndTime"
- confirm-btn="确定"
- cancel-btn="取消"
- @confirm="onEndDateConfirm"
- @cancel="showEndTimePicker = false">
- </l-date-time-picker>
- </l-popup>
- <l-popup v-model="showResumeTimePicker" position="bottom" :safe-area-inset-bottom="true" :z-index="10000">
- <l-date-time-picker
- title="选择挂起结束时间"
- :mode="31"
- format="YYYY-MM-DD HH:mm"
- :modelValue="resumeTime"
- confirm-btn="确定"
- cancel-btn="取消"
- @confirm="onResumeTimeConfirm"
- @cancel="showResumeTimePicker = false">
- </l-date-time-picker>
- </l-popup>
- <!-- 人员选择弹窗 -->
- <view v-if="showUserSelect && overStopStatus != 2" class="picker-modal">
- <view class="modal-mask" @click="showUserSelect = false"></view>
- <view class="modal-content">
- <view class="modal-header">
- <text class="modal-title">选择工作班成员</text>
- <text class="modal-close" @click="confirmSelectedUsers">确定</text>
- </view>
- <view class="search-bar">
- <view class="search-box">
- <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
- <input class="search-input" type="text" placeholder="搜索姓名" v-model="userKeyword" @input="handleUserSearch" />
- <text v-if="userKeyword.length > 0" class="clear-icon" @click="clearUserSearch">✕</text>
- </view>
- </view>
- <scroll-view class="modal-body" scroll-y="true">
- <view
- v-for="(user, index) in userList"
- :key="index"
- class="picker-option"
- @click="toggleUserSelection(user)"
- >
- <text class="option-text">{{ (user['nickName'] as string | null) ?? '' }}</text>
- <text class="option-text">{{ ((user['dept'] as UTSJSONObject | null)?.['deptName'] as string | null) ?? '' }}</text>
- <text class="option-check" v-if="isSelected(user)">✓</text>
- </view>
- </scroll-view>
- </view>
- </view>
- <!-- MIS工单列表弹窗 -->
- <view v-if="showMisListModal" class="picker-modal">
- <view class="modal-mask" @click="closeMisListModal"></view>
- <view class="modal-content">
- <view class="modal-header">
- <text class="modal-title">选择MIS工单</text>
- <text class="modal-close" @click="closeMisListModal">取消</text>
- </view>
- <!-- 搜索栏 -->
- <view class="search-bar">
- <view class="search-box">
- <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
- <input class="search-input" type="text" placeholder="搜索 MIS工单编码" v-model="misListKeyword" @input="searchMisList" />
- <text v-if="misListKeyword.length > 0" class="clear-icon" @click="clearMisListSearch">✕</text>
- </view>
- </view>
- <!-- 列表内容 -->
- <scroll-view class="modal-body" scroll-y="true">
- <!-- 有数据时显示列表 -->
- <view v-if="misList.length > 0">
- <view
- v-for="(item, index) in misList"
- :key="index"
- class="picker-option"
- @click="selectMisItem(item, index)"
- >
- <!-- <text class="option-text">{{ option.label }}</text> -->
- <view>
- <text class="option-text">MIS工单编码</text>
- <text class="option-text">工作票编号</text>
- </view>
- <view>
- <text class="option-text">{{ ((item['misNo'] as string | null) ?? '-')}}</text>
- <text class="option-text">{{ item['workPermitNum'] as string | null ?? '-' }}</text>
- </view>
- <text v-if="index === selectedMisInfoIndex" class="option-check">✓</text>
- </view>
- </view>
- <!-- 无数据时显示提示 -->
- <view v-else class="empty-tip">
- <text>未找到匹配的MIS工单</text>
- </view>
- </scroll-view>
- </view>
- </view>
- <!-- 工作部位选择弹窗 -->
- <view v-if="showWorkAreaPicker" class="picker-modal">
- <view class="modal-mask" @click="showWorkAreaPicker = false"></view>
- <view class="modal-content">
- <view class="modal-header">
- <text class="modal-title">选择工作部位</text>
- <text class="modal-close" @click="confirmSelectedWorkAreas">确定</text>
- </view>
- <scroll-view class="modal-body" scroll-y="true">
- <view
- v-for="(item, index) in workAreaDictList"
- :key="index"
- class="picker-option"
- @click="toggleWorkAreaSelection(item)"
- >
- <text class="option-text">{{ item.dictLabel ?? '' }}</text>
- <text class="option-check" v-if="isWorkAreaSelected(item)">✓</text>
- </view>
- </scroll-view>
- </view>
- </view>
- <!-- 工作负责人弹窗 -->
- <view v-if="showLeaderPicker && overStopStatus != 2" class="picker-modal">
- <view class="modal-mask" @click="showLeaderPicker = false"></view>
- <view class="modal-content">
- <view class="modal-header">
- <text class="modal-title">选择工作负责人</text>
- <text class="modal-close" @click="showLeaderPicker = false">取消</text>
- </view>
- <view class="search-bar">
- <view class="search-box">
- <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
- <input class="search-input" type="text" placeholder="搜索姓名" v-model="teamKeyword" @input="handleSearch" />
- <text v-if="teamKeyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
- </view>
- </view>
- <scroll-view class="modal-body" scroll-y="true">
- <!-- 有数据时显示列表 -->
- <view v-if="teamLeaderList.length > 0">
- <view
- v-for="(user, index) in teamLeaderList"
- :key="index"
- class="picker-option"
- :class="{ 'selected': index === selectedTeamLeaderIndex }"
- @click="selectLeaderManually(user, index)"
- >
- <text class="option-text">{{ (user['nickName'] as string | null) ?? '' }}</text>
- <text class="option-text">{{ ((user['dept'] as UTSJSONObject | null)?.['deptName'] as string | null) ?? '' }}</text>
- <text v-if="index === selectedTeamLeaderIndex" class="option-check">✓</text>
- </view>
- </view>
- <!-- 无数据时显示提示 -->
- <view v-else class="empty-tip">
- <text>未找到匹配的人员</text>
- </view>
- </scroll-view>
- </view>
- </view>
- </scroll-view>
- <!-- 确认结单按钮 -->
- <view class="accept-button-container">
- <button class="accept-button" @click="handleSubmit" :loading="submitLoading">{{ submitLoading ? '提交中...' : '确认结单' }}</button>
- </view>
- <!-- 加载中状态 -->
- <view v-if="loading" class="loading-mask">
- <text class="loading-text">加载中...</text>
- </view>
- </view>
- </template>
- <script setup lang="uts">
- import { ref, watch } from 'vue'
- import type { acceptOrderInfo } from '../../../types/order'
- import type { WorkOrderFlow } from '../../../types/flow'
- import { getOrderInfoById, getRepairOrderInfoById, returnRepairOrder, repairFinishOrder } from '../../../api/order/detail'
- import { getMisInfoList, listWorkPerson, getOrderList, listAutoMisInfo, allListOrder } from '../../../api/order/list'
- import type { SysDictData } from '../../../types/dict'
- import { getDictDataByType } from '../../../api/dict/index'
- import type { UserInfo } from '../../../types/user'
- import type { UploadResponse } from '../../../types/workbench'
- import {checkPermi} from '../../../utils/storage'
- import { getUserList, getLeaderList } from '../../../api/user/list'
- import uploadImage from '../../../components/upload-image/upload-image.uvue'
- // 工单信息
- const orderId = ref<string>('')
- const workOrderProjectNo = ref<string>('')
- const workOrderStatus = ref<string>('')
- const orderType = ref<string>('')
- const pcsDeviceName = ref<string>('')
- const gxtCenter = ref<string>('')
- const pcsStationName = ref<string>('')
- const brand = ref<string>('')
- const model = ref<string>('')
- const acceptTime = ref<string>('')
- const returnType = ref<string>('')
- const returnReason = ref<string>("")
- const returnTypeLabel = ref<string>("")
- const acceptReturnType = ref<string>('')
- const acceptReturnReason = ref<string>("")
- const teamLeaderId = ref<Number | null>(null)
- const teamLeaderName = ref<string>('')
- const pauseTime = ref<string>('')
- const restartTime = ref<string>('')
- const faultCode = ref<string>('')
- const faultBarcode = ref<string>('')
- const faultDesc = ref<string>('')
- const suspendReason = ref<string>('') // 挂起原因
- const flowList = ref<UTSJSONObject[]>([]) //流转过程
- const suspendInfo = ref<UTSJSONObject | null>(null)
- const resumeInfo = ref<UTSJSONObject | null>(null)
- const resumeShow = ref<boolean>(false)
- const resumeTime = ref<string>('') // 挂起结束时间
- const showResumeTimePicker = ref<boolean>(false)
- const oldWorkGroupMemberName = ref<string>('') // 旧工作班成员
- const oldRepairOrderPersonList = ref<UTSJSONObject[]>([]) // 旧工作班成员数组
- const overStopStatus = ref<Number | null>(null)
- const oldTeamLeaderName = ref<string>('')
- // 添加字典加载状态
- const dictLoaded = ref<boolean>(false)
- // 结单表单相关变量
- const infoEntry = ref<string>('') // 信息录入
- const misNo = ref<string>('') // MIS工单编码
- const workPermitNum = ref<string>('') // 工作票编号
- const realStartTime = ref<string>('') // 开始时间
- const realEndTime = ref<string>('') // 结束时间
- const wwryNum = ref<string>('') // 外委人员数
- const wlryNum = ref<string>('') // 外来人员数
- const workGroupMemberName = ref<string>('') // 工作班成员
- const attachmentUrls = ref<string>('') // 附件URLs(逗号分隔的字符串格式)
- const uploadedFiles = ref<UploadResponse[]>([]) // 上传的文件对象数组
- const repairOrderPersonList = ref<UTSJSONObject[]>([]) // 工作班成员数组
- const selectedUserIds = ref<string[]>([]) // 选中的用户ID数组
- const selectedUsers = ref<UTSJSONObject[]>([]) // 选中的用户对象数组
- const realFailureReason = ref<string>('') //真实故障原因
- const workArea = ref<string>('') //工作部位
- const workAreaLabel = ref<string>('')
- const workAreaDictList = ref<SysDictData[]>([]) // 工作部位字典列表
- const selectedWorkAreas = ref<SysDictData[]>([]) // 选中的工作部位
- const showWorkAreaPicker = ref<boolean>(false) // 显示工作部位选择器
- // 选中的负责人信息
- const selectedTeamLeaderName = ref<string>('')
- const selectedTeamLeaderIndex = ref<number>(-1)
- const showLeaderPicker = ref<boolean>(false)
- const teamLeaderList = ref<UTSJSONObject[]>([])
- const teamAllLeaderList = ref<UTSJSONObject[]>([])
- let teamKeyword = ref<string>("")
- // 时间选择器相关变量
- const showStartTimePicker = ref<boolean>(false)
- const showEndTimePicker = ref<boolean>(false)
- const startTimeDate = ref<string>('')
- const startTimeTime = ref<string>('')
- const endTimeDate = ref<string>('')
- const endTimeTime = ref<string>('')
- // 监听开始时间和结束时间变化
- watch(realStartTime, (value: string) => {
- // 在这里添加开始时间变化时的处理逻辑
- if (resumeInfo.value != null && value != '') {
- const suspendTime = (suspendInfo.value?.['actionTime'] as string | null) ?? ''
- if (suspendTime != '' && value != '') {
- const suspendDate = new Date(suspendTime)
- const startDate = new Date(value)
- if (suspendDate.getTime() < startDate.getTime()) { // 开工前挂起
- const resumeDate = new Date(resumeTime.value)
- const endDate = new Date(realEndTime.value)
- if (resumeDate.getTime() > startDate.getTime() || (realEndTime.value != '' && resumeDate.getTime() > endDate.getTime())) {
- resumeShow.value = true
- } else {
- resumeShow.value = false
- }
- } else if (suspendDate.getTime() >= startDate.getTime()) { // 作业中挂起
- const resumeDate = new Date(resumeTime.value)
- const endDate = new Date(realEndTime.value)
- if (resumeDate.getTime() < startDate.getTime() || (realEndTime.value != '' && resumeDate.getTime() > endDate.getTime())) {
- resumeShow.value = true
- } else {
- resumeShow.value = false
- }
- } else {
- resumeShow.value = false
- }
- } else {
- resumeShow.value = false
- }
- }
- })
- watch(realEndTime, (value: string) => {
- // 在这里添加结束时间变化时的处理逻辑
- if (resumeInfo.value != null && value != '') {
- const suspendTime = (suspendInfo.value?.['actionTime'] as string | null) ?? ''
- if (suspendTime != '' && realStartTime.value != '' && new Date(suspendTime).getTime() < new Date(realStartTime.value).getTime()) { // 开工前挂起
- if (value != '' && resumeTime.value != '' && new Date(resumeTime.value).getTime() > new Date(realStartTime.value).getTime()) {
- resumeShow.value = true
- } else if(value != '' && resumeTime.value != '' && new Date(resumeTime.value).getTime() > new Date(value).getTime()) {
- resumeShow.value = true
- } else {
- resumeShow.value = false
- }
- } else if(suspendTime != '' && realStartTime.value != '' && new Date(suspendTime).getTime() >= new Date(realStartTime.value).getTime()) { // 作业中挂起
- if (realStartTime.value != '' && resumeTime.value != '' && new Date(resumeTime.value).getTime() < new Date(realStartTime.value).getTime()) {
- resumeShow.value = true
- } else if(value != '' && resumeTime.value != '' && new Date(resumeTime.value).getTime() > new Date(value).getTime()) {
- resumeShow.value = true
- } else {
- resumeShow.value = false
- }
- } else {
- resumeShow.value = false
- }
- }
- })
- // MIS工单选择相关变量
- const showMisNoQuickSelect = ref<boolean>(false)
- const quickMisNoList = ref<UTSJSONObject[]>([])
- // 添加MIS工单列表弹窗显示状态
- const showMisListModal = ref<boolean>(false)
- // MIS工单列表数据
- const misList = ref<UTSJSONObject[]>([])
- const allMisList = ref<UTSJSONObject[]>([])
- // 分页信息
- const misListPage = ref<number>(1)
- const misListPageSize = ref<number>(999)
- const misListTotal = ref<number>(0)
- // 搜索关键词
- const misListKeyword = ref<string>('')
- const userKeyword = ref<string>('')
- // 人员选择相关变量
- const showUserSelect = ref<boolean>(false)
- const userList = ref<UTSJSONObject[]>([])
- const userAllList = ref<UTSJSONObject[]>([])
- // 信息录入选项
- const infoEntryOptions = ref<SysDictData[]>([])
- const selectedMisInfoIndex = ref<number>(-1)
- // 获取信息录入字典列表
- const loadInfoEntryDictList = async (): Promise<void> => {
- try {
- const result = await getDictDataByType('gxt_info_entry') // 假设信息录入类型字典类型为gxt_info_entry
- const resultObj = result as UTSJSONObject
- if (resultObj['code'] == 200) {
- const data = resultObj['data'] as any[]
- const dictData: SysDictData[] = []
- if (data.length > 0) {
- for (let i = 0; i < data.length; i++) {
- const item = data[i] as UTSJSONObject
- // 只提取需要的字段
- const dictItem: SysDictData = {
- dictValue: item['dictValue'] as string | null,
- dictLabel: item['dictLabel'] as string | null,
- dictCode: null,
- dictSort: null,
- dictType: null,
- cssClass: null,
- listClass: null,
- isDefault: null,
- status: null,
- default: null,
- createTime: null,
- remark: null
- }
- dictData.push(dictItem)
- }
- }
- infoEntryOptions.value = dictData
- }
- } catch (e: any) {
- console.error('获取信息录入类型字典失败:', e.message)
- // 设置默认值
- infoEntryOptions.value = [
- { dictValue: '1', dictLabel: 'MIS工单', dictCode: null, dictSort: null, dictType: null, cssClass: null, listClass: null, isDefault: null, status: null, default: null, createTime: null, remark: null },
- { dictValue: '2', dictLabel: '手工录入', dictCode: null, dictSort: null, dictType: null, cssClass: null, listClass: null, isDefault: null, status: null, default: null, createTime: null, remark: null }
- ];
- }
- }
- // 获取工作部位字典列表
- const loadWorkAreaDictList = async (): Promise<void> => {
- try {
- const result = await getDictDataByType('gxt_work_area')
- const resultObj = result as UTSJSONObject
- if (resultObj['code'] == 200) {
- const data = resultObj['data'] as any[]
- const dictData: SysDictData[] = []
- if (data.length > 0) {
- for (let i = 0; i < data.length; i++) {
- const item = data[i] as UTSJSONObject
- // 只提取需要的字段
- const dictItem: SysDictData = {
- dictValue: item['dictValue'] as string | null,
- dictLabel: item['dictLabel'] as string | null,
- dictCode: null,
- dictSort: null,
- dictType: null,
- cssClass: null,
- listClass: null,
- isDefault: null,
- status: null,
- default: null,
- createTime: null,
- remark: null
- }
- dictData.push(dictItem)
- }
- }
- workAreaDictList.value = dictData
- }
- } catch (e: any) {
- console.error('获取工作部位字典失败:', e.message)
- }
- }
- // 获取用户列表
- const getUserAllList = async (): Promise<void> => {
- try {
- // 这里应该调用获取用户列表的API
- const result = await getLeaderList(-1); // 空参数调用
- const resultObj = result as UTSJSONObject;
- const code = resultObj['code'] as number
- const users = resultObj['data'] as UTSJSONObject[] | null
- if (code == 200 && users != null ) {
- // 解析列表数据
- // const rows = resultObj['rows'] as UTSJSONObject[]
- userList.value = users
- userAllList.value = users
- teamLeaderList.value = users
- teamAllLeaderList.value = users
- // userList.value = result.data || [];
- }
- } catch (error) {
- console.error('获取用户列表失败:', error);
- uni.showToast({
- title: '获取用户列表失败',
- icon: 'none'
- });
- }
- };
- // 外委人员数输入处理
- const onWwryNumInput = (): void => {
- let value = wwryNum.value;
- // 移除非数字字符,包括负号和小数点
- value = value.replace(/[^0-9]/g, '');
- wwryNum.value = value;
- };
- // 外来人员数输入处理
- const onWlryNumInput = (): void => {
- let value = wlryNum.value;
- // 移除非数字字符,包括负号和小数点
- value = value.replace(/[^0-9]/g, '');
- wlryNum.value = value;
- };
- // 验证和提交
- const submitLoading = ref<boolean>(false)
- // 信息录入禁用状态
- const infoEntryDisabled = ref<boolean>(false)
- // 接受用户名
- const acceptUserName = ref<string>('')
- // 选择器选项类型
- type PickerOption = {
- label: string
- value: string
- }
- // 手动选择负责人
- const selectLeaderManually = (user: UTSJSONObject, index: number): void => {
- selectedTeamLeaderIndex.value = index
- const uid = user['userId']
- if (uid != null) {
- teamLeaderId.value = uid as Number
- }
- const name = user['nickName']
- teamLeaderName.value = name != null ? name.toString() : ''
- showLeaderPicker.value = false
- }
- // 信息录入变化处理
- const handleInfoEntryChange = (e: UniRadioGroupChangeEvent): void => {
- // 兼容 radio-group 事件:detail 可能不存在,直接取 e.value
- const val = e.detail?.value as string | null
- infoEntry.value = val ?? ''
- if (infoEntry.value == '1' && overStopStatus.value !=2) {
- // 当选择MIS工单时,清空手工录入的字段
- workPermitNum.value = '';
- realStartTime.value = '';
- realEndTime.value = '';
- workGroupMemberName.value = '';
- }
- };
- // 工作票编号变化处理
- const handleWorkPermitNumChange = async(): Promise<void> => {
- if (infoEntry.value == '2') {
- // 查询工作票编号是否已存在
- const queryParams = {
- workPermitNum: workPermitNum.value,
- } as UTSJSONObject;
- const response = await allListOrder(queryParams)
- const responseObj = response as UTSJSONObject
- const rows = responseObj['rows'] as UTSJSONObject[] | null
- if (rows != null && rows.length > 0) {
- uni.showToast({ title: '工作票编号:' + workPermitNum.value + '已存在', icon: 'none' })
- workPermitNum.value = ''
- return
- }
- }
- };
- // MIS工单编码输入处理
- const handleMisNoInputFocus = (): void => {
- showMisNoQuickSelect.value = true;
- };
- const handleMisNoInputBlur = (): void => {
- setTimeout(() => {
- showMisNoQuickSelect.value = false;
- }, 200);
- };
- const handleMisNoInput = (e: SysDictData): void => {
- misNo.value = (e['detail'] as string | null) ?? '';
- // 这里可以添加实时搜索MIS工单的逻辑
- };
- const handleMisNoClear = (): void => {
- misNo.value = '';
- showMisNoQuickSelect.value = false;
- };
- const handleMisNoQuickSelect = (item: UTSJSONObject): void => {
- misNo.value = (item['misNo'] as string | null) ?? '';
- showMisNoQuickSelect.value = false;
- };
- // 获取MIS工单列表
- const getMisList = async (): Promise<void> => {
- try {
- const queryParams = {
- pcsDeviceName: pcsDeviceName.value,
- pcsStationName: pcsStationName.value,
- workOrderStatus: '结束'
- } as UTSJSONObject;
- // 调用获取MIS工单列表的API
- const result = await getMisInfoList(queryParams);
- const resultObj = result as UTSJSONObject;
- if (resultObj['code'] == 200) {
- // 解析列表数据
- const rows = resultObj['rows'] as UTSJSONObject[]
- misList.value = rows;
- allMisList.value = rows
- // 解析总数
- misListTotal.value = resultObj['total'] as number;
- } else {
- const msg = resultObj['msg'] as string | null
- uni.showToast({
- title: msg ?? '获取MIS工单列表失败',
- icon: 'none'
- })
- }
- } catch (error: any) {
- console.error('获取MIS工单列表失败:', error);
- uni.showToast({
- title: error.message ?? '获取MIS工单列表失败',
- icon: 'none'
- });
- }
- };
- // 打开MIS工单选择弹窗
- const openMisListModal = (): void => {
- showMisListModal.value = true;
- misListPage.value = 1; // 重置为第一页
- getMisList(); // 获取列表数据
- };
- // 选择MIS工单
- const selectMisItem = async (item: UTSJSONObject, index: number): Promise<void> => {
- selectedMisInfoIndex.value = index
- // 回填MIS工单相关信息
- misNo.value = item['misNo'] as string | '';
- // 查询MIS工单是否已存在
- const response = await getOrderList(1, 10, misNo.value, '')
- const responseObj = response as UTSJSONObject
- const rows = responseObj['rows'] as UTSJSONObject[] | null
- if (rows != null && rows.length > 0) {
- uni.showToast({ title: '该MIS工单已被其他工单关联!请重新选择!', icon: 'none' })
- misNo.value = ''
- return
- }
- // 查询相关工作班成员
- await listWorkPerson(misNo.value).then(response => {
- const responseObj = response as UTSJSONObject
- const rows = responseObj['rows'] as UTSJSONObject[] | null
- repairOrderPersonList.value = rows ?? []
- if (rows != null && overStopStatus.value ==2) {
- let hasDifference = false
- const newPersonList = rows
- if (oldRepairOrderPersonList.value.length === 0) {
- // 旧列表为空,新列表不为空,存在差异
- hasDifference = true
- } else if (newPersonList.length !== oldRepairOrderPersonList.value.length) {
- // 列表长度不一致,存在差异
- hasDifference = true
- } else {
- // 比较每个人员的 nickName
- for (let newPerson of newPersonList) {
- const found = oldRepairOrderPersonList.value.some(oldPerson =>
- newPerson.nickName === oldPerson.nickName
- )
- if (!found) {
- hasDifference = true
- break
- }
- }
- }
-
- // 如果存在差异,提醒用户但不改变当前 repairOrderPersonList
- if (hasDifference) {
- uni.showModal({
- title: '提示',
- content: 'MIS 工单人员列表与当前工单人员列表不一致!',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff', // 自定义按钮颜色,匹配你的UI风格
- success: (res) => {
- }
- });
- }
- }
- if (rows != null && rows.length > 0 && overStopStatus.value != 2) {
- // 查找 isLeader 等于 1 的负责人(优先获取第一个符合条件的,贴合常规单负责人场景)
- const leaderPerson = rows.find(person => person.isLeader == 1);
- if(leaderPerson != null) {
- teamLeaderId.value = (leaderPerson['userId'] as Number | null) ?? null
- teamLeaderName.value = (leaderPerson['nickName'] as string | null) ?? ''
- }
- const nickNames = rows
- .filter(person => person.isLeader != 1)
- .map(person => (person.nickName as string | null) ?? '')
- .join(',');
- workGroupMemberName.value = nickNames;
- }
- })
- workPermitNum.value = item['workPermitNum'] as string | '';
- realStartTime.value = item['realStartTime'] as string | '';
- realEndTime.value = item['realEndTime'] as string | '';
- // 关闭弹窗
- showMisListModal.value = false;
- };
- // 搜索
- const handleUserSearch = (): void => {
- const keyword = userKeyword.value
- userList.value = userAllList.value.filter(leader => {
- const nickName = leader['nickName'] as string | null
- return nickName != null && nickName.indexOf(keyword) >= 0
- })
- }
- // 关闭MIS工单选择弹窗
- const closeMisListModal = (): void => {
- showMisListModal.value = false;
- };
- // 搜索
- const searchMisList = (): void => {
- const keyword = misListKeyword.value
- misList.value = allMisList.value.filter(misInfo => {
- const misNo = misInfo['misNo'] as string | null
- // return misNo != null && misNo.indexOf(keyword) >= 0
- const workPermitNum = misInfo['workPermitNum'] as string | null
- // 逻辑或(||)连接两个条件,满足其一即可
- const misNoMatch = misNo != null && misNo.indexOf(keyword) >= 0
- const workPermitNumMatch = workPermitNum != null && workPermitNum.indexOf(keyword) >= 0
- return misNoMatch || workPermitNumMatch
- })
- }
- // 清除MIS工单搜索
- const clearMisListSearch = (): void => {
- misListKeyword.value = "";
- misList.value = allMisList.value
- };
- // 清除用户搜索
- const clearUserSearch = (): void => {
- userKeyword.value = "";
- userList.value = userAllList.value
- };
- // 搜索工作负责人
- const handleSearch = (): void => {
- const keyword = teamKeyword.value
- teamLeaderList.value = teamAllLeaderList.value.filter(leader => {
- const nickName = leader['nickName'] as string | null
- return nickName != null && nickName.indexOf(keyword) >= 0
- })
- }
- // 清空搜索工作负责人
- const clearSearch = (): void => {
- teamKeyword.value = ""
- teamLeaderList.value = teamAllLeaderList.value
- }
- function onStartDateConfirm(value: string) {
- // 检查结束时间是否小于新的开始时间
- if (realEndTime.value != '' && new Date(value) > new Date(realEndTime.value as string)) {
- uni.showToast({ title: '开始时间不能大于结束时间', icon: 'none' })
- return
- }
- realStartTime.value = value
- showStartTimePicker.value = false
- }
- function onEndDateConfirm(value: string) {
- // 检查新的结束时间是否小于开始时间
- if (realStartTime.value != '' && new Date(realStartTime.value as string) > new Date(value)) {
- uni.showToast({ title: '结束时间不能小于开始时间', icon: 'none' })
- return
- }
- realEndTime.value = value
- showEndTimePicker.value = false
- }
- function onResumeTimeConfirm(value: string) {
- // 检查新的结束时间是否小于开始时间
- if (resumeTime.value != '' && new Date(realStartTime.value as string) > new Date(value)) {
- uni.showToast({ title: '结束时间不能小于开始时间', icon: 'none' })
- return
- }
- resumeTime.value = value
- showResumeTimePicker.value = false
- }
- // 检查用户是否已被选中
- const isSelected = (user: UTSJSONObject): boolean => {
- const userId = user['userId'] as string | number | null;
- if (userId !== null) {
- return selectedUserIds.value.includes(userId.toString());
- }
- // 如果没有userId,则比较nickName
- const nickName = user['nickName'] as string | null;
- if (nickName !== null) {
- return selectedUsers.value.some(selected =>
- (selected['nickName'] as string | null) === nickName
- );
- }
- return false;
- };
- // 切换用户选择状态
- const toggleUserSelection = (user: UTSJSONObject): void => {
- const userId = user['userId'] as string | number | null;
- const nickName = user['nickName'] as string | null;
- if (userId !== null) {
- const userIdStr = userId.toString();
- const index = selectedUserIds.value.indexOf(userIdStr);
- if (index > -1) {
- // 取消选择
- selectedUserIds.value.splice(index, 1);
- selectedUsers.value = selectedUsers.value.filter(selected =>
- (selected['userId'] as string | number | null)?.toString() !== userIdStr
- );
- } else {
- // 添加选择
- selectedUserIds.value.push(userIdStr);
- selectedUsers.value.push(user);
- }
- } else if (nickName !== null) {
- // 如果没有userId,通过nickName来识别
- const index = selectedUsers.value.findIndex(selected =>
- (selected['nickName'] as string | null) === nickName
- );
- if (index > -1) {
- // 取消选择
- selectedUsers.value.splice(index, 1);
- // 同时移除对应的userId(如果有的话)
- const userToRemoveId = user['userId'] as string | number | null;
- if (userToRemoveId !== null) {
- const idIndex = selectedUserIds.value.indexOf(userToRemoveId.toString());
- if (idIndex > -1) {
- selectedUserIds.value.splice(idIndex, 1);
- }
- }
- } else {
- // 添加选择
- selectedUsers.value.push(user);
- const userToAddId = user['userId'] as string | number | null;
- if (userToAddId !== null) {
- selectedUserIds.value.push(userToAddId.toString());
- }
- }
- }
- };
- // 确认选择的用户
- const confirmSelectedUsers = (): void => {
- // 将选中的用户姓名拼接成字符串
- const nickNames = selectedUsers.value
- .map(user => (user['nickName'] as string | null) ?? '')
- .filter(name => name !== '')
- .join(',');
- workGroupMemberName.value = nickNames;
- // 更新repairOrderPersonList为选中的用户
- repairOrderPersonList.value = [...selectedUsers.value];
- showUserSelect.value = false;
- };
- // 清空已选择的用户
- const clearSelectedUsers = (): void => {
- // 清空选中的用户数组
- selectedUsers.value = [];
- selectedUserIds.value = [];
- // 清空显示的用户名
- workGroupMemberName.value = '';
- // 清空工作班成员列表
- repairOrderPersonList.value = [];
- };
- // 检查工作部位是否已被选中
- const isWorkAreaSelected = (workArea: SysDictData): boolean => {
- return selectedWorkAreas.value.some(selected =>
- (selected.dictValue as string | null) === (workArea.dictValue as string | null)
- );
- };
- // 切换工作部位选择状态
- const toggleWorkAreaSelection = (workArea: SysDictData): void => {
- const index = selectedWorkAreas.value.findIndex(selected =>
- (selected.dictValue as string | null) === (workArea.dictValue as string | null)
- );
- if (index > -1) {
- // 取消选择
- selectedWorkAreas.value.splice(index, 1);
- } else {
- // 添加选择
- selectedWorkAreas.value.push(workArea);
- }
- };
- // 确认选择的工作部位
- const confirmSelectedWorkAreas = (): void => {
- // 将选中的工作部位标签拼接成字符串,用逗号分隔
- const labels = selectedWorkAreas.value
- .map(item => item.dictLabel ?? '')
- .filter(label => label !== '');
- workAreaLabel.value = labels.join(', ');
- // 将选中的工作部位值拼接成字符串,用逗号分隔
- workArea.value = selectedWorkAreas.value
- .map(item => item.dictValue ?? '')
- .filter(value => value !== '')
- .join(',');
- showWorkAreaPicker.value = false;
- };
- // 表单验证
- const validateForm = (): boolean => {
- if (infoEntry.value == '') {
- uni.showToast({
- title: '请选择信息录入方式',
- icon: 'none'
- });
- return false;
- }
- if (infoEntry.value == '1' && (misNo.value == '')) {
- uni.showToast({
- title: '请输入MIS工单编码',
- icon: 'none'
- });
- return false;
- }
- if (workPermitNum.value == '') {
- uni.showToast({
- title: '请输入工作票编号',
- icon: 'none'
- });
- return false;
- }
- if (realStartTime.value == '') {
- uni.showToast({
- title: '请选择开始时间',
- icon: 'none'
- });
- return false;
- }
- if (realEndTime.value == '') {
- uni.showToast({
- title: '请选择结束时间',
- icon: 'none'
- });
- return false;
- }
-
- // 统一转换为时间戳(避免格式问题,对比更精准)
- const realStartTimeStamp = new Date(realStartTime.value).getTime();
- const currentTimeStamp = new Date().getTime(); // 当前时间戳
- const realEndTimeStamp = new Date(realEndTime.value).getTime(); // 结束时间戳
-
- // 校验1:开始时间不能大于当前时间
- if (realStartTimeStamp > currentTimeStamp) {
- uni.showToast({
- title: '开始时间不能大于当前时间',
- icon: 'none'
- });
- return false;
- }
-
- // 校验2:开始时间不能大于结束时间(优化原有逻辑,用时间戳更稳定)
- if (realStartTimeStamp >= realEndTimeStamp) {
- uni.showToast({
- title: '开始时间不能大于结束时间',
- icon: 'none'
- });
- return false;
- }
-
- // 校验3:开始时间不能大于发生时间(pauseTime非空时校验)
- if (pauseTime.value != '' && pauseTime.value.trim() !== '') {
- const pauseTimeStamp = new Date(pauseTime.value).getTime();
- if (realStartTimeStamp < pauseTimeStamp) {
- uni.showToast({
- title: '开始时间不能小于发生时间',
- icon: 'none'
- });
- return false;
- }
-
- if (realEndTimeStamp < pauseTimeStamp) {
- uni.showToast({
- title: '结束时间不能小于发生时间',
- icon: 'none'
- });
- return false;
- }
-
- }
-
- // 校验4:开始时间不能大于恢复运行时间(restartTime非空时校验)
- if (restartTime.value != '' && restartTime.value.trim() !== '') {
- const restartTimeStamp = new Date(restartTime.value).getTime();
- if (realStartTimeStamp > restartTimeStamp) {
- uni.showToast({
- title: '开始时间不能大于复运时间',
- icon: 'none'
- });
- return false;
- }
- }
-
- // 1. 结束时间不能大于当前时间
- if (realEndTimeStamp > currentTimeStamp) {
- uni.showToast({
- title: '结束时间不能大于当前时间',
- icon: 'none'
- });
- return false;
- }
-
- // 2. 结束时间不能小于恢复运行时间(restartTime/复运时间非空时校验)
- if (restartTime.value != '' && restartTime.value.trim() !== '') {
- const restartTimeStamp = new Date(restartTime.value).getTime();
- if (realEndTimeStamp < restartTimeStamp) {
- uni.showToast({
- title: '结束时间不能小于复运时间',
- icon: 'none'
- });
- return false;
- }
- }
-
- if (teamLeaderName.value == '') {
- uni.showToast({
- title: '请选择工作负责人',
- icon: 'none'
- });
- return false;
- }
- if (workGroupMemberName.value == '') {
- uni.showToast({
- title: '请选择工作班成员',
- icon: 'none'
- });
- return false;
- }
- if (workArea.value == '') {
- uni.showToast({
- title: '请选择工作部位',
- icon: 'none'
- });
- return false;
- }
- if(resumeShow.value) {
- if(resumeTime.value == '') {
- uni.showToast({
- title: '请选挂起结束时间',
- icon: 'none'
- });
- return false;
- } else {
- const suspendTime = (suspendInfo.value?.['actionTime'] as string | null) ?? ''
- if (suspendTime != '' && realStartTime.value != '' && new Date(suspendTime) < new Date(realStartTime.value)) { // 开工前挂起
- if (resumeTime.value != '' && new Date(resumeTime.value) > new Date(realStartTime.value)) {
- uni.showToast({
- title: '开工前挂起结束时间晚于实际开始时间,请调整',
- icon: 'none'
- });
- return false;
- } else if(realEndTime.value != '' && resumeTime.value != '' && new Date(resumeTime.value) > new Date(realEndTime.value)) {
- uni.showToast({
- title: '开工前挂起结束时间晚于实际结束时间,请调整',
- icon: 'none'
- });
- return false;
- }
- } else if(suspendTime != '' && realStartTime.value != '' && new Date(suspendTime) >= new Date(realStartTime.value)) { // 作业中挂起
- if (resumeTime.value != '' && new Date(resumeTime.value) < new Date(realStartTime.value)) {
- uni.showToast({
- title: '作业中挂起结束时间早于实际开始时间,请调整',
- icon: 'none'
- });
- return false;
- } else if(realEndTime.value != '' && resumeTime.value != '' && new Date(resumeTime.value) > new Date(realEndTime.value)) {
- uni.showToast({
- title: '作业中挂起结束时间晚于实际结束时间,请调整',
- icon: 'none'
- });
- return false;
- }
- }
- }
- }
- return true;
- };
- const isDealing = ref(false)
- const hasDealed = ref(false)
- // 提交表单
- const handleSubmit = async (): Promise<void> => {
- if (!validateForm()) {
- return;
- }
- submitLoading.value = true;
- try {
- if (isDealing.value || hasDealed.value) return // 双重保险
- isDealing.value = true
- // 确保附件URLs是最新的逗号分隔格式
- attachmentUrls.value = uploadedFiles.value.map(file => file.fileName).join(',');
- flowList.value = []
- if (resumeTime.value != '' && resumeInfo.value != null && resumeTime.value != (resumeInfo.value['actionTime'] as string | null)) { //存入新的挂起结束时间
- resumeInfo.value['actionTime'] = resumeTime.value
- flowList.value.push(resumeInfo.value as UTSJSONObject)
- }
- const finishData = {
- id: orderId.value,
- orderType: orderType.value,
- workOrderProjectNo: workOrderProjectNo.value,
- infoEntry: infoEntry.value,
- misOrderNo: infoEntry.value == '1' ? misNo.value : null,
- workPermitNum: workPermitNum.value,
- realStartTime: realStartTime.value,
- realEndTime: realEndTime.value,
- wwryNum: wwryNum.value,
- wlryNum: wlryNum.value,
- workGroupMemberName: workGroupMemberName.value,
- realFailureReason: realFailureReason.value,
- attachmentUrls: attachmentUrls.value,
- repairOrderPersonList: repairOrderPersonList.value,
- teamLeaderId: teamLeaderId.value,
- teamLeaderName: teamLeaderName.value,
- finalizeMethod: '2',
- workOrderStatus: 'completed',
- workArea: workArea.value,
- repairOrderFlowList: flowList.value,
- repairMethod: '1'
- } as UTSJSONObject;
- const result = await repairFinishOrder(finishData);
- const resultObj = result as UTSJSONObject;
- const code = resultObj['code'] as number;
- if (code == 200) {
- uni.showToast({
- title: '结单成功',
- icon: 'success'
- });
- hasDealed.value = true
- // 使用事件总线通知列表页面刷新
- uni.$emit('refreshOrderList', {});
- uni.$emit('refreshAssignedCount');
- uni.$emit('refreshOverdueCount');
- setTimeout(() => {
- uni.navigateBack();
- }, 800);
- } else {
- const msg = resultObj['msg'] as string;
- uni.showToast({
- title: msg.length > 0 ? msg : '结单失败',
- icon: 'none'
- });
- }
- } catch (error: Error) {
- uni.showToast({
- title: error.message,
- icon: 'none'
- });
- } finally {
- submitLoading.value = false;
- isDealing.value = false // 无论成功失败都解锁
- }
- };
- const loading = ref<boolean>(false)
- // 加载详情数据
- const loadDetail = async (id: string, orderType?: string): Promise<void> => {
- try {
- loading.value = true
- let result: any;
- // 根据orderType决定调用哪个API
- if (orderType == '1') {
- // 维修工单
- result = await getRepairOrderInfoById(id)
- } else {
- // 维保工单
- result = await getOrderInfoById(id)
- }
- // 提取响应数据
- const resultObj = result as UTSJSONObject
- const code = resultObj['code'] as number
- const data = resultObj['data'] as UTSJSONObject | null
- if (code == 200 && data != null) {
- workOrderStatus.value = (data['workOrderStatus'] as string | null) ?? ''
- workOrderProjectNo.value = (data['workOrderProjectNo'] as string | null) ?? ''
- pcsDeviceName.value = (data['pcsDeviceName'] as string | null) ?? ''
- gxtCenter.value = (data['gxtCenter'] as string | null) ?? ''
- pcsStationName.value = (data['pcsStationName'] as string | null) ?? ''
- brand.value = (data['brand'] as string | null) ?? ''
- model.value = (data['model'] as string | null) ?? ''
- acceptTime.value = (data['acceptTime'] as string | null) ?? ''
- acceptUserName.value = (data['acceptUserName'] as string | null) ?? ''
- // 初始化结单表单默认值
- infoEntry.value = '1' // 默认为手工录入
- teamLeaderId.value = (data['teamLeaderId'] as Number | null) ?? null
- teamLeaderName.value = (data['teamLeaderName'] as string | null) ?? ''
- returnType.value = workOrderStatus.value == 'to_finish' ? '1' : ''
- faultCode.value = (data['faultCode'] as string | null) ?? ''
- faultBarcode.value = (data['faultBarcode'] as string | null) ?? ''
- faultDesc.value = (data['faultDesc'] as string | null) ?? ''
- suspendReason.value = (data['suspendReason'] as string | null) ?? ''
- workGroupMemberName.value = (data['workGroupMemberName'] as string | null) ?? ''
- oldWorkGroupMemberName.value = (data['workGroupMemberName'] as string | null) ?? '' // 旧工作班成员
- oldRepairOrderPersonList.value = (data['repairOrderPersonList'] as UTSJSONObject[] | null) ?? [] // 旧工作班成员数组
- overStopStatus.value = (data['overStopStatus'] as Number | null) ?? null
- oldTeamLeaderName.value = (data['teamLeaderName'] as string | null) ?? ''
-
- // 初始化附件数据
- const attachmentUrlsFromServer = (data['attachmentUrls'] as string | null) ?? ''
- if (attachmentUrlsFromServer.length > 0) {
- attachmentUrls.value = attachmentUrlsFromServer
- // 将逗号分隔的URL字符串转换为UploadResponse对象数组
- const urls = attachmentUrlsFromServer.split(',')
- const fileArr : UploadResponse[] = []
- for (let i = 0; i < urls.length; i++) {
- const url = urls[i]
- const item : UploadResponse = {
- url: url,
- fileId: '',
- fileName: url.substring(url.lastIndexOf('/') + 1),
- filePath: url,
- fileSize: 0,
- fileExt: url.substring(url.lastIndexOf('.') + 1),
- businessType: 'workOrder'
- }
- fileArr.push(item)
- }
- uploadedFiles.value = fileArr
- }
- pauseTime.value = (data['occurTime'] as string | null) ?? ''
- restartTime.value = (data['restartTime'] as string | null) ?? ''
- if(pauseTime.value != '' && restartTime.value != '') {
- const queryParams = {
- pauseTime: pauseTime.value,
- restartTime: restartTime.value,
- pcsDeviceName: pcsDeviceName.value,
- pcsStationName: pcsStationName.value,
- workOrderStatus: '结束',
- orderType: 1
- } as UTSJSONObject;
- const result = await listAutoMisInfo(queryParams)
- // 提取响应数据
- const resultObj = result as UTSJSONObject
- const code = resultObj['code'] as number
- const misInfo = resultObj['rows'] as UTSJSONObject[] | null
- if (code == 200 && misInfo != null) {
- if(misInfo.length > 0 && misInfo.length == 1) {
- // 有工作票号提示
- const workPermitNum2 = misInfo[0]['workPermitNum'] as string | null
- const misNo2 = misInfo[0]['misNo'] as string | null
- if (workPermitNum2 != null && workPermitNum2.length > 0) {
- const response = await getOrderList(1, 10, misNo2 ?? '', '')
- const responseObj = response as UTSJSONObject
- const rows = responseObj['rows'] as UTSJSONObject[] | null
- if (rows != null && rows.length > 0) {
- misNo.value = ''
- uni.showModal({
- title: '提示',
- content: '已匹配到' + misNo2 + '工单,但该MIS工单已被其他工单关联,请检查是否重复操作。',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff', // 自定义按钮颜色,匹配你的UI风格
- success: (res) => {
- }
- });
- } else {
- misNo.value = (misInfo[0]['misNo'] as string | null) ?? ''
- realStartTime.value = (misInfo[0]['realStartTime'] as string | null) ?? ''
- realEndTime.value = (misInfo[0]['realEndTime'] as string | null) ?? ''
- workPermitNum.value = (misInfo[0]['workPermitNum'] as string | null) ?? ''
- // 查询相关工作班成员
- listWorkPerson(misNo.value).then(response => {
- const responseObj = response as UTSJSONObject
- const rows = responseObj['rows'] as UTSJSONObject[] | null
- repairOrderPersonList.value = rows ?? []
- if (rows != null && rows.length > 0) {
- // 查询负责人信息并回填
- for (const person of repairOrderPersonList.value) {
- // 严格判断isLeader为1(兼容数字/字符串类型)
- if (person.isLeader == 1) {
- if(overStopStatus.value == 2 && oldTeamLeaderName.value != person.nickName) {
- uni.showModal({
- title: '提示',
- content: 'MIS工单工作负责人与手动选择的工作负责人不一致',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- break;
- } else {
- teamLeaderName.value = (person.nickName as string | null) ?? '';
- teamLeaderId.value = (person.userId as Number | null) ?? null;
- break; // 找到后立即停止循环
- }
- }
- }
- // 当 overStopStatus == 2 时,比对旧的 repairOrderPersonList 和新的 MIS 工单获取的 repairOrderPersonList
- if (overStopStatus.value == 2) {
- let hasDifference = false
- const newPersonList = repairOrderPersonList.value
- if (oldRepairOrderPersonList.value.length === 0) {
- // 旧列表为空,新列表不为空,存在差异
- hasDifference = true
- } else if (newPersonList.length !== oldRepairOrderPersonList.value.length) {
- // 列表长度不一致,存在差异
- hasDifference = true
- } else {
- // 比较每个人员的 nickName
- for (let newPerson of newPersonList) {
- const found = oldRepairOrderPersonList.value.some(oldPerson =>
- newPerson.nickName === oldPerson.nickName
- )
- if (!found) {
- hasDifference = true
- break
- }
- }
- }
-
- // 如果存在差异,提醒用户但不改变当前 repairOrderPersonList
- if (hasDifference) {
- uni.showModal({
- title: '提示',
- content: 'MIS工单人员列表与当前工单人员列表不一致!',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- }
- } else {
- const nickNames = rows
- .filter(person => person.isLeader != 1)
- .map(person => (person.nickName as string | null) ?? '')
- .join(',');
- workGroupMemberName.value = nickNames;
- repairOrderPersonList.value.map(person => {
- // 构造查询参数:username 和 nickName
- const queryParams = {
- userName: person.userName, // 假设person对象有username字段
- nickName: person.nickName // 假设person对象有nickName字段
- };
- getUserList(queryParams).then(response => {
- const responseObj = response as UTSJSONObject
- const rows = responseObj['rows'] as UTSJSONObject[] | null
- if (rows == null || rows.length == 0) {
- let msg = "已匹配到MIS工单,但工作班成员'" + person.nickName + "'在系统中不存在,系统无法自动结单,请检查。"
- if (person.isLeader == 1) {
- msg = "已匹配到MIS工单,但工作负责人'" + person.nickName + "'在系统中不存在,系统无法自动结单,请检查。"
- }
- // uni.showToast({
- // title: msg,
- // icon: 'none',
- // duration: 3000 // 自定义显示时间,单位ms
- // });
- uni.showModal({
- title: '提示',
- content: msg,
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- }
- });
- })
- }
- }
- })
- }
- } else {
- misNo.value = ''
- // infoEntry.value = '2'
- uni.showModal({
- title: '提示',
- content: '已匹配到MIS工单,但未关联工作票号,系统无法自动结单,请进入工作票录入方式。',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- }
- } else if(misInfo.length == 0) {
- misNo.value = ''
- // infoEntry.value = '2'
- uni.showModal({
- title: '提示',
- content: '未找到匹配的MIS工单,请确认开始时间是否介于停机时间与恢复运行时间之间,并且结束时间晚于恢复运行时间。',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- } else if(misInfo.length > 1) {
- misNo.value = ''
- // infoEntry.value = '2'
- // uni.showToast({
- // title: '已匹配到多个MIS工单,请手动结单,信息录入选择关联MIS。',
- // icon: 'none',
- // duration: 3000
- // });
- uni.showModal({
- title: '提示',
- content: '已匹配到多个MIS工单,请手动结单,信息录入选择关联MIS。',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- }
- }
- } else {
- misNo.value = ''
- uni.showModal({
- title: '提示',
- content: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式。',
- showCancel: false, // 只显示确定按钮
- confirmText: '确定',
- confirmColor: '#007aff',
- success: (res) => {
- }
- });
- }
- flowList.value = data['repairOrderFlowList'] as UTSJSONObject[]
- if (suspendReason.value != '' && flowList.value.length > 0) {
- // 获取最后一个 actionType 等于 'resume' 的项
- const lastResumeItem = flowList.value.findLast(item => item['actionType'] === 'resume') as UTSJSONObject | null
- if (lastResumeItem != null) {
- resumeInfo.value = lastResumeItem
- // 直接给 resumeTime 赋值,无需 formData
- resumeTime.value = (lastResumeItem['actionTime'] as string | null) ?? ''
- }
- const lastSuspendItem = flowList.value.findLast(item => (item['actionType'] as string | null) === 'to_approve') as UTSJSONObject | null
- if (lastSuspendItem != null) {
- suspendInfo.value = lastSuspendItem
- }
- }
- } else {
- const msg = resultObj['msg'] as string | null
- uni.showToast({
- title: msg ?? '加载失败',
- icon: 'none'
- })
- }
- } catch (e: any) {
- uni.showToast({
- title: e.message ?? '加载失败',
- icon: 'none'
- })
- } finally {
- loading.value = false
- }
- }
- // 页面加载
- onLoad((options: any) => {
- const params = options as UTSJSONObject
- const id = params['id'] as string | null
- const orderTypeParam = params['orderType'] as string | null
- if (id != null && orderTypeParam != null) {
- // 先尝试从参数中获取orderType
- // const orderTypeNumber = parseInt(orderTypeParam)
- orderType.value = orderTypeParam
- orderId.value = id
- loadDetail(id, orderTypeParam)
- }
- })
- // 初始化
- onMounted(() => {
- getUserAllList();
- loadInfoEntryDictList();
- loadWorkAreaDictList();
- })
- </script>
- <style lang="scss">
- .detail-page {
- flex: 1;
- background-color: #e8f0f9;
- }
- .detail-content {
- flex: 1;
- padding: 20rpx 0;
- }
- .info-section {
- margin: 0 30rpx 24rpx;
- .section-title {
- position: relative;
- padding-left: 20rpx;
- margin-bottom: 20rpx;
- &::before {
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 8rpx;
- height: 32rpx;
- background-color: #007aff;
- border-radius: 4rpx;
- }
- &-text {
- font-size: 32rpx;
- font-weight: bold;
- color: #333333;
- }
- }
- .info-card {
- background-color: #ffffff;
- border-radius: 16rpx;
- padding: 30rpx;
- .info-item {
- flex-direction: row;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- &:last-child {
- border-bottom: none;
- }
- &.full-width {
- flex-direction: column;
- .info-label {
- margin-bottom: 12rpx;
- }
- .info-value {
- line-height: 44rpx;
- }
- }
- .info-label {
- width: 240rpx;
- font-size: 28rpx;
- color: #666666;
- white-space: nowrap;
- }
- .info-value {
- flex: 1;
- font-size: 28rpx;
- color: #333333;
- text-align: left;
- &.highlight {
- color: #007aff;
- font-weight: bold;
- }
- &.input {
- text-align: left;
- border: 1rpx solid #e0e0e0;
- border-radius: 8rpx;
- padding: 10rpx;
- }
- .input-with-clear {
- position: relative;
- display: flex;
- align-items: center;
- }
- .select-clear {
- position: absolute;
- right: 20rpx;
- color: #ccc;
- text-align: center;
- font-size: 40rpx;
- font-weight: bold;
- z-index: 1;
- }
- .input-with-select {
- position: relative;
- display: flex;
- align-items: center;
- }
- .select-mis-btn {
- line-height: 50rpx;
- text-align: center;
- position: absolute;
- right: 0rpx;
- padding: 6rpx 12rpx;
- background-color: #007aff;
- color: #fff;
- border-radius: 6rpx;
- font-size: 26rpx;
- z-index: 1;
- max-width: 100rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- }
- .flow-item {
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- &:last-child {
- border-bottom: none;
- }
- .flow-header {
- flex-direction: row;
- justify-content: space-between;
- margin-bottom: 10rpx;
- .flow-operator {
- font-size: 28rpx;
- color: #333333;
- font-weight: bold;
- }
- .flow-time {
- font-size: 24rpx;
- color: #999999;
- }
- }
- .flow-content {
- flex-direction: column;
- .flow-action {
- font-size: 26rpx;
- color: #666666;
- margin-bottom: 8rpx;
- }
- .flow-remark {
- font-size: 24rpx;
- color: #999999;
- background-color: #f5f5f5;
- padding: 10rpx;
- border-radius: 8rpx;
- }
- }
- }
- .no-data {
- text-align: center;
- padding: 40rpx 0;
- font-size: 28rpx;
- color: #999999;
- }
- }
- }
- .accept-button-container {
- padding: 30rpx 30rpx 50rpx;
- background-color: #ffffff;
- .accept-button {
- width: 100%;
- height: 80rpx;
- background-color: #007aff;
- color: #ffffff;
- font-size: 32rpx;
- border-radius: 16rpx;
- border: none;
- &:active {
- background-color: #0062cc;
- }
- }
- }
- .loading-mask {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- justify-content: center;
- align-items: center;
- background-color: rgba(0, 0, 0, 0.3);
- .loading-text {
- padding: 30rpx 60rpx;
- background-color: rgba(0, 0, 0, 0.7);
- color: #ffffff;
- font-size: 28rpx;
- border-radius: 12rpx;
- }
- }
- .picker-modal {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 1000;
- }
- .modal-mask {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- }
- .modal-content {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- background-color: #ffffff;
- border-top-left-radius: 16rpx;
- border-top-right-radius: 16rpx;
- min-height: 700rpx;
- }
- .modal-header {
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .modal-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333333;
- }
- .modal-close {
- font-size: 28rpx;
- color: #007aff;
- }
- .modal-body {
- max-height: 800rpx;
- min-height: 800rpx;
- }
- .picker-option {
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding: 24rpx 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .picker-option.selected {
- background-color: #f8f9fa;
- }
- .picker-option:last-child {
- border-bottom: none;
- }
- .option-text {
- font-size: 28rpx;
- color: #333333;
- margin-bottom: 10rpx;
- }
- .option-text:last-child {
- margin-bottom: 0;
- }
- .option-check {
- font-size: 28rpx;
- color: #007aff;
- }
- .empty-tip {
- justify-content: space-between;
- padding: 24rpx 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #999;
- }
- .picker-option {
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding: 24rpx 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .picker-option:last-child {
- border-bottom: none;
- }
- .picker-option.selected {
- background-color: #f8f9fa;
- }
- .picker-mis-option {
- justify-content: space-between;
- align-items: center;
- padding: 24rpx 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .picker-mis-option:last-child {
- border-bottom: none;
- }
- .picker-mis-option.selected {
- background-color: #f8f9fa;
- }
- .option-row {
- flex-direction: row;
- justify-content: space-around;
- align-items: center;
- }
- .option-text {
- font-size: 28rpx;
- color: #333333;
- }
- .mis-list {
- flex: 1;
- height: 100%;
- display: flex;
- flex-direction: column;
- }
- .empty-tip {
- text-align: center;
- padding: 40rpx;
- color: #999;
- font-size: 28rpx;
- }
- .form-item {
- flex-direction: row;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .reject-reason-textarea {
- width: 100%;
- min-height: 100rpx;
- line-height: 1.5;
- }
- .input-field {
- width: 100%;
- height: 60rpx;
- padding: 0 20rpx;
- border: 1rpx solid #e0e0e0;
- border-radius: 8rpx;
- font-size: 28rpx;
- background-color: #f8f9fa;
- }
- .select-mis-btn {
- width: 150rpx;
- height: 60rpx;
- margin-left: 10rpx;
- background-color: #007aff;
- color: #fff;
- border: none;
- border-radius: 8rpx;
- font-size: 24rpx;
- }
- .textarea-field {
- width: 100%;
- min-height: 120rpx;
- padding: 20rpx;
- border: 1rpx solid #e0e0e0;
- border-radius: 8rpx;
- font-size: 28rpx;
- background-color: #f8f9fa;
- }
- .radio-label {
- display: flex;
- align-items: center;
- margin-right: 30rpx;
- }
- .quick-select-dropdown {
- position: absolute;
- top: 100%;
- left: 0;
- right: 0;
- background: #fff;
- border: 1rpx solid #ddd;
- border-top: none;
- z-index: 1000;
- max-height: 300rpx;
- }
- .quick-select-item {
- padding: 20rpx;
- border-bottom: 1rpx solid #eee;
- }
- .mis-no {
- font-size: 28rpx;
- color: #333;
- }
- .search-bar {
- padding: 20rpx 30rpx;
- background-color: #d7eafe;
- }
- .search-box {
- flex-direction: row;
- align-items: center;
- height: 72rpx;
- padding: 0 24rpx;
- background-color: #f5f5f5;
- border-radius: 36rpx;
- .search-icon {
- width: 32rpx;
- height: 32rpx;
- margin-right: 12rpx;
- }
- .search-input {
- flex: 1;
- font-size: 28rpx;
- color: #333333;
- }
- .clear-icon {
- margin-left: 12rpx;
- font-size: 28rpx;
- color: #999999;
- }
- }
- .mis-list {
- flex: 1;
- height: 100%;
- display: flex;
- flex-direction: column;
- }
- .select-users-count {
- margin-left: 10rpx;
- font-size: 24rpx;
- color: #666;
- }
- </style>
|