12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634 |
- <template>
- <div>
- <div v-show="visible">
- <a-row :gutter="40">
- <a-col :span="6">
- <div class="gutter-box gutter-color center">
- <div style=" overflow: auto;height: 300px;">
- <a-steps :current="repairStatus.length-1" direction="vertical" >
- <a-step v-for="item in repairStatus" :key="item.id" :title="DictCache.COLOR.REPAIR_STATUS[item.status]" :sub-title="item.realUserName" :description="BaseTool.Date.formatter(item.createdTime , BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2) " />
- </a-steps>
- </div>
- </div>
- </a-col>
- <a-col :span="18" class="gutter-box">
- <a-row :gutter="[20,20]">
- <a-col :span="6">
- <div class="gutter-btn gutter-color" :class="{'act':current===0}" @click="current=0">
- <my-icon type="icon-weixiu1" />
- <div style="font-size:25px">报修数据</div>
- </div>
- </a-col>
- <a-col :span="6" >
- <div class="gutter-btn gutter-color" :class="{'act':current===1}" @click="current=1">
- <my-icon type="icon-weixiubaoxiu" />
- <div style="font-size:25px; ">维修数据</div>
- </div>
- </a-col>
- <a-col :span="6">
- <div class="gutter-btn gutter-color" :class="{'act':current===7}" @click="current=7">
- <my-icon type="icon-weixiu" />
- <div style="font-size:25px; ">维修方案</div>
- </div>
- </a-col>
- <a-col :span="6">
- <div class="gutter-btn gutter-color" @click="current=3" :class="{'act':current===3}">
- <img v-if="current==3" src="@/assets/icons/jilu.png" width="50px"/>
- <my-icon v-else class="act" type="icon-xinzengyugengxinhuopindangan" />
- <div style="font-size:25px;">维修记录</div>
- </div>
- </a-col>
- <a-col :span="6">
- <div class="gutter-btn gutter-color" @click="current=4" :class="{'act':current===4}">
- <img v-if="current==4" src="@/assets/icons/beijian.png" width="50px"/>
- <my-icon v-else class="act" type="icon-shouhoubeijianjijingpinjianjiageshenqingbiao-06" />
- <div style="font-size:25px; ">备件清单</div>
- </div>
- </a-col>
- <a-col :span="6" >
- <div class="gutter-btn gutter-color" :class="{'act':current===5}" @click="current=5">
- <my-icon type="icon-qitafeiyong" />
- <div style="font-size:25px;">费用清单</div>
- </div>
- </a-col>
- <a-col :span="6">
- <div class="gutter-btn gutter-color" :class="{'act':current===6}" @click="current=6">
- <my-icon type="icon-zhengzaiweixiudegongdan" />
- <div style="font-size:25px; ">维修报告</div>
- </div>
- </a-col>
- <a-col :span="6">
- <div class="gutter-btn gutter-color" @click="current=2" :class="{'act':current===2}">
- <img v-if="current==2" src="@/assets/icons/shenhe.png" width="50px"/>
- <my-icon v-else class="act" type="icon-fapiaoshenhe" />
- <div style="font-size:25px; ">审核详情</div>
- </div>
- </a-col>
- </a-row>
- </a-col>
- </a-row>
- <div>
- <div class="main gutter-color" v-show="current == 0">
- <div class="title">报修数据</div>
- <div>
- <a-descriptions :column="3" bordered>
- <a-descriptions-item label="报修单号">{{ model.no }}</a-descriptions-item>
- <a-descriptions-item label="设备位号">{{ model.positionNo }}</a-descriptions-item>
- <a-descriptions-item label="设备名称">{{ model.sbName }}</a-descriptions-item>
- <a-descriptions-item label="报修车间">{{ model.sbPositionName }}</a-descriptions-item>
- <a-descriptions-item label="车间具体位置">{{ model.sbCph }}</a-descriptions-item>
- <a-descriptions-item label="工单类别">{{ BaseTool.Object.getField(planFlagMap,model.category) }}</a-descriptions-item>
- <a-descriptions-item label="报修状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></a-descriptions-item>
- <a-descriptions-item label="报修时间">{{ BaseTool.Date.formatter(model.applyTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2) }}</a-descriptions-item>
- <a-descriptions-item label="报修人">{{ model.actualUser }}</a-descriptions-item>
- <a-descriptions-item v-if="model.category!==1" label="工作优选权">{{ BaseTool.Object.getField(levelMap,model.level) }}</a-descriptions-item>
- <a-descriptions-item v-else label="计划性维修级别">{{ model.repairPlanLevel }}</a-descriptions-item>
- <a-descriptions-item label="送修部门">{{ model.name }}</a-descriptions-item>
- <a-descriptions-item label="维修工程师" >{{ model.checkUserName }}</a-descriptions-item>
- <a-descriptions-item v-if="model.category===2 && model.verifyRepairUserId != null && model.verifyRepairUserId != ''" label="报修审批人" >{{ userRepairList.find(item=>item.userId==model.verifyRepairUserId).realName }}</a-descriptions-item>
- <a-descriptions-item label="报修类型" >{{ repairFormTypeMap[model.repairFormType] }}</a-descriptions-item>
- <a-descriptions-item label="委托内容描述" :span="3"> <span v-html="model.content "></span><a-divider type="vertical" /><a @click="handleEdit(model)">编辑</a> </a-descriptions-item>
- <a-descriptions-item label="报修图片" :span="3">
- <div v-if="model.applicationFileList != null && model.applicationFileList.length > 0">
- <viewer :images="model.applicationFileList" @inited="inited" ref="viewer" :index="1" >
- <img
- v-for="item in model.applicationFileList"
- :src="item.url"
- :key="item.id"
- class="image"
- width="200px"
- style="margin:10px;">
- </viewer></div>
- <div v-if="model.applicationFileList == null || model.applicationFileList.length === 0"> 暂无</div>
- </a-descriptions-item>
- <a-descriptions-item label="报修文件">
- <a v-for="item in model.reportFileList" :key="item.id" :href="item.url" target="downloadFile" :download="item.name">{{ item.name }}</a>
- </a-descriptions-item>
- </a-descriptions>
- </div>
- </div>
- <div class="main gutter-color" v-show="current == 1">
- <div class="title">维修数据</div>
- <div>
- <a-descriptions :column="2" bordered>
- <a-descriptions-item label="维修开始时间">{{ BaseTool.Date.formatter(model.repairStartTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2) }}</a-descriptions-item>
- <a-descriptions-item label="维修结束时间">{{ BaseTool.Date.formatter(model.repairEndTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2) }}</a-descriptions-item>
- <a-descriptions-item label="维修耗时">{{ model.repairMinutes }}小时</a-descriptions-item>
- <a-descriptions-item label="当前维修人">{{ model.repairUserName }}</a-descriptions-item>
- </a-descriptions>
- </div>
- </div>
- <div class="main gutter-color" v-show="current == 2">
- <div class="title">审核记录</div>
- <a-table
- :data-source="dataVerifyRecord"
- :columns="columnsVerifyRecord"
- tableLayout="auto"
- rowKey="id">
- <span slot="action" slot-scope="record">
- <template>
- <a @click="handleVerifyRecord(record)">审核详情</a>
- </template>
- </span>
- </a-table>
- </div>
- <div class="main gutter-color" v-show="current == 3">
- <a-tabs default-active-key="1" @change="callback">
- <a-tab-pane key="1" tab="维修记录">
- <a-table
- :data-source="dataRecord"
- :columns="columnsRecord"
- tableLayout="auto"
- rowKey="id">
- <span slot="action" slot-scope="record">
- <template>
- <a @click="handleViewRecord(record)">维修详情</a>
- <operation-button @click="handleEditRecord(record)" >编辑</operation-button>
- </template>
- </span>
- </a-table>
- </a-tab-pane>
- <a-tab-pane key="2" tab="转派记录">
- <a-table
- :data-source="redeployRecord"
- :columns="redeploycolumnsRecord"
- tableLayout="auto"
- rowKey="id">
- </a-table>
- </a-tab-pane>
- </a-tabs>
- </div>
- <div class="main gutter-color" v-show="current == 4">
- <div class="title">备件清单</div>
- <div style="margin:20px;margin-left: 40%;" class="table-operator" v-if="$auth('repair-application-forms-finish')">
-
- <a-divider type="vertical" />
- <a-button type="primary" @click="handleOutStroe(2)">
- <a-icon type="plus"/>
- 备件BOM出库
- </a-button>
-
- <a-divider type="vertical" />
- <a-button type="primary" @click="handleOutStroe(0)">
- <a-icon type="plus"/>
- 仓库领料
- </a-button>
- </div>
- <a-table
- :data-source="dataSpare"
- :columns="columnsOutStore"
- tableLayout="auto"
- rowKey="id">
- <span slot="status" slot-scope="text">
- <badge
- :status="DictCache.COLOR.OUT_STORE_FORM_STATUS[text]"
- :text="outStoreStatusMap[text]" />
- </span>
- <span slot="actionSpare" slot-scope="record">
- <template>
- <a-popconfirm v-if=" userInfo.realName===record.createdUserName&& record.status==0" title="是否提交审核?" @confirm="updateStore(record.id)">
- <a>提交审核</a>
- </a-popconfirm>
- </template>
- </span>
- <div slot="expandedRowRender" slot-scope="record" style="margin: 0">
- <a-table
- :data-source="record.detailList"
- :columns="columnsSpare"
- tableLayout="auto"
- :pagination="false"
- rowKey="id">
- </a-table>
- </div>
- </a-table>
- </div>
- <div class="main gutter-color" v-show="current == 5">
- <div class="title">费用清单</div>
- <div style="margin:20px;margin-left:45%;" class="table-operator" v-if="$auth('repair-application-forms-finish')">
- <a-button type="primary" @click="handleAddFee">
- <a-icon type="plus"/>
- 费用单
- </a-button>
- </div>
- <a-table
- :data-source="dataFee"
- :columns="columnsFee"
- tableLayout="auto"
- rowKey="id">
- <span slot="action" slot-scope="record">
- <template>
- <a @click="handleViewFee(record)">查看</a>
- <operation-button
- @click="handleEditFee(record)" >修改</operation-button>
- <operation-button
- title="确认删除该笔费用?"
- @confirm="batchDeleteFee(record.id)" >删除</operation-button>
- </template>
- </span>
- </a-table>
- </div>
- <div class="main gutter-color" v-show="current == 6">
- <div class="title">维修报告</div>
- <div style="margin:20px;margin-left:45%;" class="table-operator" v-if="$auth('repair-application-forms-finish') && ((dataReason === null) || (dataReason.length===0))">
- <a-button type="primary" @click="handleAddReason">
- <a-icon type="plus"/>
- 维修报告
- </a-button>
- </div>
- <a-table
- :data-source="dataReason"
- :columns="columnsReason"
- :scroll="{x: 1, y: BaseTool.Constant.scrollY }"
- rowKey="id">
- <span slot="action" slot-scope="record">
- <template>
- <a @click="handleViewReason(record)">查看</a>
- <operation-button
- @click="handleEditReason(record)" >修改</operation-button>
-
- <operation-button
- :type="2"
- title="确认删除该记录?"
- @confirm="batchDeleteReason(record.id)" >删除</operation-button>
- </template>
- </span>
- </a-table>
- </div>
- <div class="main gutter-color" v-show="current == 7">
- <div class="title">维修方案</div>
- <div style="margin:20px;margin-left:45%;" class="table-operator" >
- <a-button v-if="$auth('repair-repairs-add')" type="primary" @click="handleAddRepairResolve">
- <a-icon type="plus"/>
- 添加方案
- </a-button>
- <a-button style="margin-left:30px;" v-if="$auth('repair-repairs-add')" type="primary" @click="handleAddRepairResolves">
- <a-icon type="read" />
- 方案库
- </a-button>
- </div>
- <a-table
- :data-source="dataRepairResolve"
- :columns="columnsRepairResolve"
- tableLayout="auto"
- rowKey="id">
- <span slot="action" slot-scope="record">
- <template>
- <a @click="handleViewRepairResolve(record)">方案详情</a>
- <operation-button
- @click="handleEditRepairResolve(record)" >修改</operation-button>
- </template>
- </span>
- </a-table>
- </div>
- </div>
- <div class="btn" v-if="model.category!==1">
- <a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status " title="是否要接单?" @confirm="receiveRepair">
- <a-button style="margin-left: 8px" type="default">接单</a-button>
- </a-popconfirm>
- <a-button
- v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.RECEIVED === model.status ||
- DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.HANG_UP === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status ||
- DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.DISPATCH_REPAIR === model.status "
- style="margin-left: 8px"
- type="default"
- @click="nonPlanToPlan">转计划维修</a-button>
- <a-button v-if="$auth('repair-application-forms-dispatch') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.RECEIVED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_DISPATCH === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.DISPATCH_REPAIR === model.status)" style="margin-left: 16px" type="default" @click="handleAssign">派单</a-button>
- <a-button v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status )" style="margin-left: 16px" type="default" @click="reportRepair">维修上报</a-button>
- <a-button v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_REPAIR_FAIL === model.status)" style="margin-left: 16px" type="default" @click="handleReportRepair">处理维修上报</a-button>
- <a-button v-if="$auth('repair-application-forms-finish') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.MM_REPAIR_FAIL === model.status)" style="margin-left: 8px" type="default" @click="handleTransfer()">转派</a-button>
- <a-button v-if="$auth('repair-application-forms-examine') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成维修</a-button>
- <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleViewTicket()">维修票证</a-button>
- <a-popconfirm v-if="$auth('repair-application-forms-finish') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status)" title="是否要结单?" @confirm="handleExamine">
- <a-button style="margin-left: 8px" type="default">结单</a-button>
- </a-popconfirm>
- <a-popconfirm v-if="$auth('repair-application-forms-approve') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要接受?" @confirm="handleApprove">
- <a-button :loading="confirmLoading" style="margin-left: 8px" type="default">接受</a-button>
- </a-popconfirm>
- <a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.FINISHED === model.status" title="是否要关闭工单?" @confirm="handleClose">
- <a-button :loading="confirmLoading" style="margin-left: 8px" type="default">关闭工单</a-button>
- </a-popconfirm>
- <a-popconfirm v-if="$auth('repair-application-forms-reback') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要拒绝?" @confirm="handleReturn">
- <a-button style="margin-left: 8px" type="error">拒绝</a-button>
- </a-popconfirm>
- <a-button v-show=" model.status===10" style="margin-left: 8px" type="primary" @click="recoverPause">挂起解除</a-button>
- <a-button v-show="model.level!==6 && model.status!==6 && model.status!==14 && model.status!==21&& model.status!==23" style="margin-left: 8px" type="primary" @click="handleBigRepair">转大修</a-button>
- <a-button v-show="model.status===21" style="margin-left: 8px" type="primary" @click="handleCheckBigRepair">大修审核</a-button>
- <a-button v-show="model.status===23" style="margin-left: 8px" type="primary" @click="handleAgain">再次报修</a-button>
- <a-popconfirm
- v-show=" model.status===1||model.status===9"
- title="确定撤回?"
- ok-text="是"
- cancel-text="否"
- @confirm="handleRepairCancel"
- style="margin-left: 8px"
- >
- <a-button type="primary" >撤回</a-button>
- </a-popconfirm>
- <a-button v-show=" model.status===24" style="margin-left: 8px" type="primary" @click="repairCheck">报修审核</a-button>
- <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
- </div>
- <div class="btn" v-else>
- <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
- <a-button v-show="model.status===15 || model.status===17 || model.status === 19 " style="margin-left: 8px" type="primary" @click="handleCheck">审核</a-button>
- <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.CALLER_REPAIR_VERIFY_SUCCESS_THREE === model.status " style="margin-left: 16px" type="default" @click="handleAssign">派单</a-button>
- <a-button v-show="model.status===20" style="margin-left: 8px" type="primary" @click="handleCheck">再次发起审核</a-button>
- <a-button v-if="$auth('repair-application-forms-examine') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成维修</a-button>
- <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleViewTicket()">维修票证</a-button>
- <a-popconfirm v-if="$auth('repair-application-forms-finish') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status)" title="是否要结单?" @confirm="handleExamine">
- <a-button style="margin-left: 8px" type="default">结单</a-button>
- </a-popconfirm>
- <a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.FINISHED === model.status" title="是否要关闭工单?" @confirm="handleClose">
- <a-button :loading="confirmLoading" style="margin-left: 8px" type="default">关闭工单</a-button>
- </a-popconfirm>
- </div>
- </div>
- <check-form ref="checkForm" @ok="handleOk" />
- <base-out-form ref="outForm" @ok="handleCancel" />
- <finish-form ref="finishForm" @ok="handleRepairRecordOk" />
- <dispatch-form ref="dispatchForm" @ok="handleCancel" />
- <assign-form ref="assignForm" @ok="handleCancel" />
- <spare-pick-base-form ref="baseModal" @ok="handleOk"/>
- <base-form-for-repair ref="baseFormForRepair" @ok="handleOk" />
- <spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected"/>
- <fee-base-form ref="feeForm" @ok="handleOk" />
- <fee-detail ref="feeDetail" @ok="handleOk" />
- <reason-base-form ref="reasonForm" @ok="handleOk" />
- <reason-detail ref="reasonDetail" @ok="handleOk" />
- <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
- <detail-sb-check ref="detailSbCheckModal" @ok="handleOk"/>
- <base-form ref="baseRepairProjectModal" @ok="handleOk"/>
- <detail ref="detailRepairProjectModal"/>
- <edit-form ref="editForm" @okEdit="handleOk" />
- <resolve-base-form ref="resolveBaseForm" @ok="handleResolveOk"/>
- <resolve-detail ref="resolveDetail" @ok="handleResolveOk"/>
- <detail-repair-record ref="detailRepairRecord" @ok="handleRepairRecordOk"/>
- <transfer-form ref="transferForm" @ok="handleOk"/>
- <detail-check-new ref="detailCheckNew" @ok="handleVerifyRecordOk"/>
- <repair-record-form ref="repairRecordForm" @ok="handleRepairRecordOk" />
- <report-up-form ref="reportUpForm" @ok="handleOk" @okk="handleOk" />
- <ticket-form ref="ticketForm" @ok="handleOk" />
- <longYanSelectSpareForm ref="longYanSelectSpareForm" @ok="handleOk"/>
- <scheme-library ref="schemeLibrary" @ok="handleOk"/>
- <PlanCheckForm ref="planCheckForm" @ok="handleOk"/>
- <OutStroeForm ref="outStroeForm" @ok="handleOk" />
- <ReportPauseForm ref="reportPauseForm" @ok="handleOk" />
- <BigRepairForm ref="bigRepairForm" @ok="handleOk" />
- <CheckBigRepairForm ref="checkBigRepairForm" @ok="handleOk" />
- <ToPlanForm ref="toPlanForm" @ok="handleOk" />
- <AddForm ref="addForm" @ok="handleOk"/>
- <AuditFrom2 ref="auditFrom2" @ok="handleOk"/>
- </div>
- </template>
- <script>
- import DetailList from '@/components/tools/DetailList'
- import { fetchRepairApplicationForm, approve, receive, receiveRepair, closeRepair, repairCancel } from '@/api/repair/application-form'
- import CheckForm from './CheckForm'
- import ToPlanForm from './ToPlanForm'
- import BaseOutForm from './BaseOutForm'
- import FinishForm from './FinishForm'
- import PlanCheckForm from './PlanCheckForm'
- import CheckBigRepairForm from './CheckBigRepairForm'
- import EditForm from './RemarkForm'
- import DispatchForm from './DispatchForm'
- import AssignForm from './AssignForm'
- import SchemeLibrary from './SchemeLibrary'
- import SparePickBaseForm from '../../../store/sparepickform/modules/BaseForm'
- import SparePartUsedSelectTable from '@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable'
- import SparePickFormSelectTable from '@/views/store/sparepickform/modules/SparePickFormSelectTable'
- import RepairProjectSelectModal from '@/views/repair/repairproject/modules/RepairProjectSelectModal'
- import { queryRepairProject, fetchRepairProject, deleteRepairProjects } from '@/api/repair/repairproject'
- import SparePartInfoSelectModal from '@/views/sqarepartmanage/sparepartinfo/modules/SparePartInfoSelectModal'
- import BaseFormForRepair from '@/views/sqarepartmanage/sparepartused/modules/BaseFormForRepair'
- import { selectSparePartUsedListBySbId, addSparePartUsedBatch, deleteSparePartUseds, updateSpare, selectLongYanListByRepairId } from '@/api/sqarepartmanage/sparepartused'
- import SpareStoreSelectModal from '@/views/store/sparestore/modules/SpareStoreSelectModal'
- import BaseTool from '@/utils/tool'
- import FeeBaseForm from '@/views/repair/fee/modules/BaseForm'
- import FeeDetail from '@/views/repair/fee/modules/Detail'
- import { deleteRepairFees, fetchRepairFee, queryRepairFee } from '@/api/repair/fee'
- import { getSelfRole } from '@/api/upms/role'
- import ReasonBaseForm from '@/views/repair/repair-reason/modules/BaseForm'
- import ReasonDetail from '@/views/repair/repair-reason/modules/Detail'
- import { deleteRepairReasons, fetchRepairReason, queryRepairReason } from '@/api/repair/repair-reason'
- import { queryRepairRecord, fetchCustomDataForRepairRecord, fetchRepairTicketRecord, getSpareList } from '@/api/customize/fieldTemplateData'
- import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
- import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
- import { fetchSbInfo } from '@/api/sb/info'
- import { getRepairSchemePage, fetchRepairScheme, getRepairSpare } from '@/api/repair/repair'
- import BaseForm from '@/views/repair/repairproject/modules/BaseForm'
- import Detail from '@/views/repair/repairproject/modules/Detail'
- import ResolveBaseForm from '@/views/repair/repair/modules/BaseForm'
- import ResolveDetail from '@/views/repair/repair/modules/Detail'
- import DetailRepairRecord from './DetailRepairRecord'
- import TransferForm from './TransferForm'
- import DetailCheckNew from './DetailCheckNew'
- import RepairRecordForm from './RepairRecordForm'
- import ReportUpForm from './ReportUpForm'
- import TicketForm from './TicketForm'
- import LongYanSelectSpareForm from './LongYanSelectSpareForm'
- import ReportPauseForm from './ReportPauseForm'
- import BigRepairForm from './BigRepairForm'
- import { startSbInfoScrap } from '@/api/activiti/activiti-sb-scrap'
- import AuditFrom2 from './AuditFrom2.vue'
- import AddForm from './BaseForm.vue'
- import OutStroeForm from '@/views/store/outstoreform/modules/BaseFormYY.vue'
- import { queryRepairUser } from '@/api/upms/user'
- const DetailListItem = DetailList.Item
- export default {
- name: 'RepairApplicationFormDetail',
- components: {
- CheckForm,
- SchemeLibrary,
- EditForm,
- DetailList,
- DetailSbCheck,
- DetailSbBom,
- ReasonBaseForm,
- ReasonDetail,
- DetailListItem,
- FinishForm,
- PlanCheckForm,
- BaseOutForm,
- DispatchForm,
- FeeDetail,
- AssignForm,
- FeeBaseForm,
- SparePickBaseForm,
- SparePartUsedSelectTable,
- SparePickFormSelectTable,
- RepairProjectSelectModal,
- SparePartInfoSelectModal,
- BaseFormForRepair,
- SpareStoreSelectModal,
- BaseForm,
- Detail,
- ResolveBaseForm,
- ResolveDetail,
- DetailRepairRecord,
- TransferForm,
- DetailCheckNew,
- RepairRecordForm,
- ReportUpForm,
- TicketForm,
- LongYanSelectSpareForm,
- OutStroeForm,
- ReportPauseForm,
- BigRepairForm,
- CheckBigRepairForm,
- ToPlanForm,
- AddForm,
- AuditFrom2
- },
- data () {
- return {
- confirmLoading: false,
- mdl: {},
- current: 0,
- modalTitle: null,
- needStopMap: {},
- userInfo: this.$store.getters.userInfo,
- planFlagMap: {},
- dispatchList: [],
- visible: false,
- showSbFlag: false,
- sbInfo: {},
-
- sourceMap: {},
- typeMap: {},
- outStoreMap: {},
- repairStatus: [],
- userRepairList: [],
- levelMap: {},
- descripitionMap: {},
- repairFormTypeMap: {},
- selectedRowKeys: [],
- statusMap: {},
- outStoreStatusMap: {},
- repairProjectMap: {},
- repairTechnologyMap: {},
- activeKey: 'a',
- data: [],
- dataSpare: [],
- dataFee: [],
- dataReason: [],
- dataRepairResolve: [],
- dataRecord: [],
- redeployRecord: [],
- dataVerifyRecord: [],
-
- columns: [
- {
- title: '序号',
- dataIndex: 'index',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '维修内容',
- dataIndex: 'name'
- },
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- columnsSpare: [
-
-
-
-
-
-
-
- {
- title: '名称',
- dataIndex: 'spareName'
- },
-
-
-
-
- {
- title: '规格',
- dataIndex: 'ggxh'
- },
-
-
-
-
- {
- title: '数量',
- dataIndex: 'num'
- },
-
-
-
-
-
- {
- title: '单位',
- dataIndex: 'unit'
- },
- {
- title: '仓库',
- dataIndex: 'storeName'
- },
- {
- title: '货架号',
- dataIndex: 'storePosition'
- },
- {
- title: '备注',
- dataIndex: 'remark',
- width: 150
- }
- ],
- columnsOutStore: [
- {
- title: '序号',
- dataIndex: 'index',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '出库单号',
- dataIndex: 'outNo'
- },
- {
- title: '用友单号',
- dataIndex: 'yyId'
- },
- {
- title: '出库类型',
- dataIndex: 'type',
- customRender: (text, record, index) => {
- return this.BaseTool.Object.getField(this.outStoreMap, text)
- }
- },
- {
- title: '状态',
- dataIndex: 'status',
- scopedSlots: { customRender: 'status' }
- },
- {
- title: '领用日期',
- dataIndex: 'createdTime'
- },
- {
- title: '领用人',
- dataIndex: 'createdUserName'
- },
- {
- title: '仓库',
- dataIndex: 'storeName'
- },
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'actionSpare' }
- }
- ],
- columnsFee: [
- {
- title: '序号',
- dataIndex: 'index',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '费用金额',
- dataIndex: 'fee',
- customRender: (text, record, index) => {
- return this.BaseTool.Amount.formatter(text)
- }
- },
- {
- title: '费用类别',
- dataIndex: 'type',
- customRender: (text, record, index) => {
- return this.BaseTool.Object.getField(this.typeMap, text)
- }
- },
- {
- title: '费用原因',
- dataIndex: 'reason'
- },
- {
- title: '费用描述',
- dataIndex: 'descripition'
- },
- {
- title: '备注',
- dataIndex: 'remark'
- },
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- columnsVerifyRecord: [
- {
- title: '序号',
- dataIndex: 'index',
- width: '70px',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '审核人',
- dataIndex: 'createdUserName',
- width: '100px'
- },
- {
- title: '审核时间',
- dataIndex: 'createdTime',
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
- }
- },
- {
- title: '审核类别',
- dataIndex: 'type',
- ellipsis: true,
- width: '100px',
- customRender: (text, record, index) => {
- if (text === 1 || text == 3) {
- return '维修审核'
- } else if (text === 2) {
- return '报修审核'
- }
- }
- },
- {
- title: '审核状态',
- dataIndex: 'status',
- ellipsis: true,
- width: '100px',
- customRender: (text, record, index) => {
- if (text === 1) {
- return '审核通过'
- } else if (text === 2) {
- return '审核拒绝'
- }
- }
- },
- {
- title: '审核意见',
- dataIndex: 'dataRemark',
- ellipsis: true,
- width: '150px'
- },
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- redeploycolumnsRecord: [
- {
- title: '序号',
- dataIndex: 'index',
- width: '70px',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '转派人',
- dataIndex: 'createdUserName',
- ellipsis: true,
- width: '150px'
- },
- {
- title: '转派时间',
- dataIndex: 'createdTime',
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
- }
- },
- {
- title: '转派备注',
- dataIndex: 'dataRemark',
- ellipsis: true,
- width: '150px'
- }
- ],
- columnsRecord: [
- {
- title: '序号',
- dataIndex: 'index',
- width: '70px',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '维修人',
- dataIndex: 'createdUserName',
- ellipsis: true,
- width: '150px'
- },
- {
- title: '维修时间',
- dataIndex: 'createdTime',
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
- }
- },
- {
- title: '结束时间',
- dataIndex: 'updateTime',
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
- }
- },
- {
- title: '维修时长',
- dataIndex: 'repairHours',
- ellipsis: true,
- width: '100px'
- },
-
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- columnsRepairResolve: [
- {
- title: '序号',
- dataIndex: 'index',
- width: '70px',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '维修建议',
- dataIndex: 'opinion',
- width: '200px'
- },
- {
- title: '方案提供者',
- dataIndex: 'createdUserName',
- width: '120px'
- },
- {
- title: '方案提供时间',
- dataIndex: 'createdTime',
- ellipsis: true,
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
- }
- },
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- columnsReason: [
- {
- title: '序号',
- dataIndex: 'index',
- width: '70px',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '分析时间',
- dataIndex: 'analyzeTime',
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
- }
- },
- {
- title: '故障部位',
- dataIndex: 'sbPartId',
- width: '150px'
- },
- {
- title: '故障现象',
- dataIndex: 'problemDesc',
- ellipsis: true,
- width: '150px'
- },
- {
- title: '检查处理过程',
- dataIndex: 'checkProcess',
- ellipsis: true,
- width: '150px'
- },
- {
- title: '改进措施类别',
- dataIndex: 'type',
- ellipsis: true,
- width: '150px',
- customRender: (text, record, index) => {
- return this.BaseTool.Object.getField(this.typeReasonMap, text)
- }
- },
- {
- title: '改进内容',
- dataIndex: 'changeRepairPlanContent',
- ellipsis: true,
- width: '250px'
- },
- {
- title: '操作',
- key: 'action',
- width: '200px',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- typeReasonMap: {},
- model: {
- 'id': null,
- 'sbId': null,
- 'partId': null,
- 'repairUserId': null,
- 'needStop': null,
- 'category': null,
- 'no': null,
- 'source': null,
- 'applyTime': null,
- 'level': null,
- 'content': null,
- 'status': null,
- 'remark': null,
- 'updateTime': null,
- 'createdUserId': null,
- 'updateUserId': null,
- 'createdUserName': null,
- 'sbName': null,
- 'partName': null,
- 'limitHours': null,
- 'limitDate': null,
- 'updateUserName': null,
- 'repairFormVO': null,
- 'repairCheckVO': null,
- 'checkUserName': null,
- 'remarkTwo': null,
- 'repairMinutes': null,
- 'repairDeptId': null,
- 'userId': null,
- 'sbCph': null,
- 'actualUser': null,
- 'dispatchUserId': null,
- 'parentSbNo': null,
- 'sbPositionName': null,
- 'selfParentNo': null,
- 'positionNo': null
- }
- }
- },
- created () {
-
- this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LEVEL_TYPE)
- this.repairFormTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FORM_TYPE)
- this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
-
- this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
- this.statusRepairMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FORM_STATUS)
- this.statusCheckMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_CHECK_STATUS)
- this.needStopMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
- this.repairProjectMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_PROJECT_TYPE)
- this.repairTechnologyMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_TECHNOLOGY_TYPE)
- this.descripitionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIRE_ACTION)
- this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FEE_TYPE)
- this.typeReasonMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
- this.planFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
- this.outStoreMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
- this.outStoreStatusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_STATUS)
- queryRepairUser({ roleType: 3 }).then(res => {
- this.userRepairList = res.data
- })
- this.tableOption()
- },
- methods: {
- base (record) {
- this.visible = true
- this.showSbFlag = false
- this.modalTitle = '详情'
- this.model = record
- this.activeKey = 'a'
- const sbId = record.sbId
- console.log(2222222, this.userRepairList)
- if (sbId) {
- fetchSbInfo({ id: sbId }).then(res => {
- this.sbInfo = res.data
- this.showSbFlag = true
- })
- }
- if (record.repairMinutes === null) {
- this.model.repairMinutes = '?'
- }
- this.init()
- },
- init () {
- queryRepairProject({ repairId: this.model.id }).then(res => {
- this.data = res.data
- })
-
-
-
- getRepairSpare({ id: this.model.id }).then(res => {
- console.log(res)
- console.log(this.userInfo)
- this.dataSpare = res.data
- })
- queryRepairFee({ repairId: this.model.id }).then(res => {
- this.dataFee = res.data
- })
- queryRepairReason({ repairId: this.model.id }).then(res => {
- this.dataReason = res.data
- })
- queryRepairRecord({ objId: this.model.id, remark: 'repair_record' }).then(res => {
- this.dataRecord = res.data.rows
- })
- queryRepairRecord({ objId: this.model.id, remark: 'dispatch_record' }).then(res => {
- this.redeployRecord = res.data.rows
- })
- queryRepairRecord({ objId: this.model.id, pageSize: 20, remark: 'repair_status_record' }).then(res => {
- this.repairStatus = res.data.rows
- })
- queryRepairRecord({ objId: this.model.id, remark: 'repair_verify_record' }).then(res => {
- this.dataVerifyRecord = res.data.rows
- })
- getRepairSchemePage({ repairId: this.model.id }).then(res => {
- this.dataRepairResolve = res.data.rows
- })
- },
- handleViewBom (record) {
- this.visible = false
- const modal = this.$refs.detailSbBomModal
- modal.base(this.sbInfo)
- },
- handleViewCheck (record) {
- this.visible = false
- const modal = this.$refs.detailSbCheckModal
- modal.base(this.sbInfo)
- },
- handleCancel () {
- this.visible = false
- this.current = 0
- this.confirmLoading = false
- this.$emit('ok')
- },
- handleOkUp (num) {
- if (num === 1) {
- this.handleOk()
- } else {
- this.handleCancel()
- }
- },
- handleAddSpare () {
- const id = this.model.sbId
- const routeUrl = this.$router.resolve({ path: '/spare/used/record', query: { id: id } })
- window.open(routeUrl.href, '_blank')
- },
- receive () {
- this.model.status = this.DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING
- receive(this.model).then(() => {
- })
- },
- nonPlanToPlan () {
- const modal = this.$refs.toPlanForm
- modal.base(this.model)
- },
- handleClose () {
-
- if (this.dataReason.length === 0 || this.dataRepairResolve.length === 0) {
- this.$message.error('维修方案或维修报告不能为空')
- return
- }
- const params = { id: this.model.id, category: this.model.category }
- closeRepair(params).then(res => {
- this.$message.info('操作成功')
- this.handleOk()
- })
- },
- batchDeleteFee (id) {
- let ids = []
- if (this.BaseTool.String.isBlank(id)) {
- const length = this.selectedRows.length
- if (length === 0) {
- this.$message.info('请选择要删除的记录')
- return
- }
- ids = this.selectedRows.map(item => item.id)
- } else {
- ids = [id]
- }
- deleteRepairFees(ids).then(res => {
- this.$message.info('删除成功')
- this.handleOk()
- })
- },
- handleOut () {
- const modal = this.$refs.outForm
- modal.base(null, this.model)
- },
- handleTransfer () {
- getSelfRole().then(res => {
- const modal = this.$refs.transferForm
- modal.base(this.model, res.data)
- })
- },
- handleAddFee () {
- const modal = this.$refs.feeForm
- modal.base(null, this.model)
- },
- handleEditFee (record) {
- fetchRepairFee({ id: record.id }).then(res => {
- const modal = this.$refs.feeForm
- const data = res.data
- data.repairNo = this.model.no
- modal.base(data, this.model)
- })
- },
- handleViewFee (record) {
- fetchRepairFee({ id: record.id }).then(res => {
- const modal = this.$refs.feeDetail
- modal.base(res.data)
- })
- },
- handleAddRepairResolve () {
- const modal = this.$refs.resolveBaseForm
- modal.base({ repairId: this.model.id, repairNo: this.model.no, errorContent: this.model.content, sbId: this.model.sbId })
- },
- recoverPause () {
- getSelfRole().then(res => {
- const modal = this.$refs.reportPauseForm
- modal.base(this.model, res.data)
- })
- },
- handleAddRepairResolves () {
- const modal = this.$refs.schemeLibrary
- modal.base(this.model)
- },
- handleViewRepairResolve (record) {
- this.visible = false
- fetchRepairScheme({ id: record.id }).then(res => {
- const modal = this.$refs.resolveDetail
- modal.base(res.data)
- })
- },
- handleEditRepairResolve (record) {
- fetchRepairScheme({ id: record.id }).then(res => {
- const modal = this.$refs.resolveBaseForm
- const data = res.data
- modal.base(data)
- })
- },
- handleViewRecord (record) {
- this.visible = false
- fetchCustomDataForRepairRecord({ id: record.id }).then(res => {
- getSpareList({ repairFormId: this.model.id, createdUserId: record.createdUserId }).then(response => {
- const modal = this.$refs.detailRepairRecord
- modal.base(res.data, response.data)
- })
- })
- },
- handleViewTicket () {
- this.visible = false
- fetchRepairTicketRecord({ id: this.model.id }).then(res => {
- const modal = this.$refs.ticketForm
- modal.base(res.data, this.model.id)
- })
- },
- handleVerifyRecord (record) {
- this.visible = false
- fetchCustomDataForRepairRecord({ id: record.id }).then(res => {
- const modal = this.$refs.detailCheckNew
- modal.base(res.data)
- })
- },
- batchDeleteReason (id) {
- let ids = []
- if (this.BaseTool.String.isBlank(id)) {
- const length = this.selectedRows.length
- if (length === 0) {
- this.$message.info('请选择要删除的记录')
- return
- }
- ids = this.selectedRows.map(item => item.id)
- } else {
- ids = [id]
- }
- deleteRepairReasons(ids).then(res => {
- this.$message.info('删除成功')
- this.handleOk()
- this.$refs.table.clearSelected()
- })
- },
- handleAddReason () {
- const modal = this.$refs.reasonForm
- this.visible = false
- modal.base(null, this.model)
- },
- handleBigRepair () {
- const modal = this.$refs.bigRepairForm
- modal.base(this.model)
- },
- handleCheckBigRepair () {
- const modal = this.$refs.checkBigRepairForm
- modal.base(this.model)
- },
- handleEditReason (record) {
- fetchRepairReason({ id: record.id }).then(res => {
- const modal = this.$refs.reasonForm
- this.visible = false
- modal.base(res.data, this.model)
- })
- },
- handleCopyReason (record) {
- fetchRepairReason({ id: record.id }).then(res => {
- const modal = this.$refs.reasonForm
- this.visible = false
- res.data.id = null
- modal.base(res.data, this.model)
- })
- },
- handleViewReason (record) {
- fetchRepairReason({ id: record.id }).then(res => {
- const modal = this.$refs.reasonDetail
- modal.base(res.data)
- })
- },
- handleApprove () {
- approve(this.model).then(() => {
- this.$message.info('操作成功')
- this.handleOk()
- })
- },
- receiveRepair () {
- const params = {}
- params.id = this.model.id
- params.repairDeptId = this.model.repairDeptId
- params.applyTime = this.model.applyTime
- params.userId = this.model.userId
- params.no = this.model.no
- params.category = this.model.category
- receiveRepair(params).then(() => {
- this.$message.info('接单成功')
- this.handleOk()
- })
- },
- reportRepair () {
- const params = {}
- params.id = this.model.id
- params.repairDeptId = this.model.repairDeptId
- params.applyTime = this.model.applyTime
- params.userId = this.model.userId
- params.no = this.model.no
- params.sbId = this.model.sbId
- params.sbCph = this.model.sbCph
- params.actualUser = this.model.actualUser
- params.content = this.model.content
- params.category = this.model.category
- params.repairUserId = this.model.repairUserId
- params.remark = this.model.remark
- params.reportHandleType = 2
- getSelfRole().then(res => {
- const modal = this.$refs.reportUpForm
- params.roleType = res.data
- modal.base(params)
- })
- },
- handleReportRepair () {
- const params = {}
- params.id = this.model.id
- params.repairDeptId = this.model.repairDeptId
- params.applyTime = this.model.applyTime
- params.userId = this.model.userId
- params.no = this.model.no
- params.sbId = this.model.sbId
- params.sbCph = this.model.sbCph
- params.actualUser = this.model.actualUser
- params.content = this.model.content
- params.category = this.model.category
- params.repairUserId = this.model.repairUserId
- params.remark = this.model.remarkTwo
- params.reportHandleType = 1
- getSelfRole().then(res => {
- const modal = this.$refs.reportUpForm
- params.roleType = res.data
- modal.base(params)
- })
- },
- handleEditRecord (record) {
- this.visible = false
- fetchCustomDataForRepairRecord({ id: record.id }).then(res => {
- const modal = this.$refs.repairRecordForm
- modal.base(res.data)
- })
- },
- handleReturn () {
- const modal = this.$refs.checkForm
- modal.base(this.model, 1)
- },
- handleOutStroe (type) {
- this.visible = false
- const modal = this.$refs.outStroeForm
- modal.base({ outFlag: 1 }, this.model, type)
- },
- handleOk () {
- this.loading = true
- fetchRepairApplicationForm({ id: this.model.id }).then(res => {
- this.loading = false
- this.model = res.data
- this.visible = true
- })
- this.init()
- },
- okEdit (val) {
- this.loading = true
- this.model.content = val
- },
- handleResolveOk () {
- this.loading = true
- this.visible = true
- getRepairSchemePage({ repairId: this.model.id }).then(res => {
- this.loading = false
- this.dataRepairResolve = res.data.rows
- })
- },
- handleRepairRecordOk () {
- this.loading = true
- this.visible = true
- queryRepairRecord({ objId: this.model.id, remark: 'repair_record' }).then(res => {
- this.loading = false
- this.dataRecord = res.data.rows
- })
- fetchRepairApplicationForm({ id: this.model.id }).then(res => {
- this.model = res.data
- })
- },
- handleVerifyRecordOk () {
- this.loading = true
- this.visible = true
- queryRepairRecord({ objId: this.model.id, remark: 'repair_verify_record' }).then(res => {
- this.loading = false
- this.dataVerifyRecord = res.data.rows
- })
- },
- handleFinish () {
- const modal = this.$refs.finishForm
- modal.base(this.model)
- },
- handleExamine () {
- const modal = this.$refs.checkForm
- modal.base(this.model, 2)
- },
- handleDispatch () {
- const modal = this.$refs.dispatchForm
- modal.base(this.model)
- },
- handleAssign () {
- getSelfRole().then(res => {
- const roleType = res.data
- if (roleType === 4) {
- const modal = this.$refs.reportUpForm
- const params = {}
- params.id = this.model.id
- params.repairDeptId = this.model.repairDeptId
- params.applyTime = this.model.applyTime
- params.userId = this.model.userId
- params.no = this.model.no
- params.sbId = this.model.sbId
- params.sbCph = this.model.sbCph
- params.actualUser = this.model.actualUser
- params.content = this.model.content
- params.repairUserId = this.model.repairUserId
- params.remark = this.model.remarkTwo
- params.category = this.model.category
- params.reportHandleType = 1
- params.roleType = 4
- modal.base(params)
- } else {
- const modal = this.$refs.assignForm
- modal.base(this.model)
- }
- })
- },
- handleSparePick () {
- const modal = this.$refs.baseModal
- modal.base(null, { repairId: this.model.id, repairNo: this.model.no, reason: '维修领用' })
- },
- changeTab (activeKey) {
- this.activeKey = activeKey
- if (this.activeKey === 'a' && this.BaseTool.Object.isNotBlank(this.$refs.sparePartUsedSelectTable)) {
- const modal = this.$refs.sparePartUsedSelectTable
- modal.handleOk()
- return
- }
- if (this.activeKey === 'b' && this.BaseTool.Object.isNotBlank(this.$refs.sparePickFormSelectTable)) {
- const modal = this.$refs.sparePickFormSelectTable
- modal.handleOk()
- }
- },
- handleView (record) {
- fetchRepairProject({ id: record.id }).then(res => {
- const modal = this.$refs.detailRepairProjectModal
- modal.base(res.data)
- })
- },
- handleEdit (record) {
- const modal = this.$refs.editForm
- modal.base(this.model)
- },
- handleRepairProjectAdd () {
- this.$refs.baseRepairProjectModal.base({ repairId: this.model.id })
- },
- batchDelete (id) {
- let ids = []
- if (this.BaseTool.String.isBlank(id)) {
- if (length === 0) {
- this.$message.info('请选择要删除的记录')
- return
- }
- ids = this.selectedRows.map(item => item.id)
- } else {
- ids = [id]
- }
- deleteRepairProjects(ids).then(res => {
- this.$message.info('删除成功')
- this.handleOk()
- })
- },
- handleSpareSelect () {
- this.$refs.spareSelectModal.base({}, { yt: 1 })
- },
- updateLongYanSpare (num) {
- this.$refs.longYanSelectSpareForm.base({ isSpecial: num }, this.model)
- },
-
- handleSpareSelected (record, keys, rows) {
- const data = []
- for (let i = 0; i < rows.length; i++) {
- data.push({ sbId: this.model.sbId, spareId: rows[i].id, repairId: this.model.id, num: 1, price: rows[i].initialValue, totalPrice: rows[i].initialValue })
- }
- addSparePartUsedBatch(data)
- .then((response) => {
- this.$message.info('添加成功')
- this.handleOk()
- }).catch(() => {
- this.confirmLoading = false
- })
- },
- batchDeleteSpare (id) {
- let ids = []
- if (this.BaseTool.String.isBlank(id)) {
- if (length === 0) {
- this.$message.info('请选择要删除的记录')
- return
- }
- ids = this.selectedRows.map(item => item.id)
- } else {
- ids = [id]
- }
- deleteSparePartUseds(ids).then(res => {
- this.$message.info('删除成功')
- this.handleOk()
- })
- },
- handleEditSpare (record) {
- const modal = this.$refs.baseFormForRepair
- modal.base(record)
- },
- updateSpare (record) {
- updateSpare(record).then(res => {
- this.$message.info('更换成功')
- selectSparePartUsedListBySbId({ id: this.model.sbId }).then(res => {
- this.dataSpare = res.data
- })
- })
- },
- handleSpareStoreSelect (isSpecial) {
- this.$refs.spareStoreSelectModal.base({}, { repairFlag: 1, storeId: this.storeId, isSpecial: isSpecial, sbId: this.model.sbId })
- },
- handleSpareStoreSelected (record, keys, rows) {
- const data = []
- for (let i = 0; i < rows.length; i++) {
- data.push({ isSpecial: record.isSpecial, sbId: this.model.sbId, spareId: rows[i].spareId, repairNo: this.model.no, repairId: this.model.id, num: 1, price: rows[i].price, totalPrice: rows[i].price, startDate: BaseTool.Date.formatter(new Date(), BaseTool.Date.PICKER_NORM_DATE_PATTERN) })
- }
- if (record.isSpecial === 1) {
- updateSpare(data)
- .then((response) => {
- this.$message.info('更换成功')
- this.handleOk()
- }).catch(() => {
- this.confirmLoading = false
- })
- } else {
- addSparePartUsedBatch(data)
- .then((response) => {
- this.$message.info('更换成功')
- this.handleOk()
- }).catch(() => {
- this.confirmLoading = false
- })
- }
- },
- onSelectChange (selectedRowKeys) {
- console.log('selectedRowKeys changed: ', selectedRowKeys)
- this.selectedRowKeys = selectedRowKeys
- },
- inited (viewer) {
- this.$viewer = viewer
- },
- handleCheck () {
- const modal = this.$refs.planCheckForm
- modal.base(this.model, this.model.status)
- },
- handleRepairCancel () {
- repairCancel({ id: this.model.id }).then(res => {
- this.$message.info('操作成功!')
- this.handleCancel()
- })
- },
- updateStore (id) {
- const params = {}
- params.id = id
- params.processInstanceId = ''
- params.auditModelName = '仓库审批'
- params.auditModelKey = 'out_store_back'
- startSbInfoScrap(params).then(res => {
- this.$message.info('已提交,请等待主管审核')
- getRepairSpare({ id: this.model.id }).then(res => {
- console.log(res)
- this.dataSpare = res.data
- })
- })
- },
- handleAgain () {
- this.$refs.addForm.base(this.model)
- },
- repairCheck () {
- this.$refs.auditFrom2.base(this.model)
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .gutter-box{
- height: 350px;
- }
- .gutter-color{
- background: #fff;
- border: 1px solid #DDDDDD;
- }
- .gutter-btn{
- height: 165px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- font-size: 50px;
- color:#333;
- &:hover{
- cursor: pointer;
- }
- }
- .act{
- color:#3462FD;
- }
- .main{
- margin-top:30px;
- }
- .title{
- font-size: 28px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #3462FD;
- padding:10px 42px;
- border-bottom: 1px solid #DDDDDD;
- }
- .btn{
- position: fixed;
- bottom: 50px;
- width: 100%;
- display: flex;
- justify-content: center;
- }
- .center{
- display: flex;
- justify-content: center;
- align-items: center;
- }
- ::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
- </style>
|