| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852 |
- <template>
- <page-meta :root-font-size="getFontSizeValue"></page-meta>
- <view class="wrapper">
- <view class="detailContent">
- <view class="contentTable" v-if="isconfirm==1">
- <view style="margin-left: 37px;font-size: 18px;color: #0055ff;font-weight: bold;">请对本次维修进行确认!</view>
- </view>
- <view class="contentTable" v-if="isconfirm==1">
- <view style="margin: 5px auto;font-size: 14px;">
- <text @click="confirmChange('1')" class="confirmbtns" style="margin-right: 25px;">确认完成</text>
- <text @click="confirmChange('0')" class="confirmbtns">需要返修</text>
- </view>
- </view>
- <view class="contentTable" style="margin-left: 37px;border-bottom: 1px solid #ccc;padding-bottom: 10px;">
- <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData">
- <uni-forms-item v-show="result=='1'" label="服务态度" name="attitude">
- <htz-rate v-model="valiFormData.attitude" :type="2"></htz-rate>
- </uni-forms-item>
- <uni-forms-item v-show="result=='1'" label="维修质量" name="quality">
- <htz-rate v-model="valiFormData.quality" :type="2"></htz-rate>
- </uni-forms-item>
- <uni-forms-item v-show="result=='1'" label="完工时效" name="finishTime">
- <htz-rate v-model="valiFormData.finishTime" :type="2"></htz-rate>
- </uni-forms-item>
- <uni-forms-item v-show="result=='1'" label="评价内容" name="content">
- <uni-easyinput style="width: 200px;" type="textarea" v-model="valiFormData.content" placeholder="请输入评价内容(限100字)"
- maxlength="100" />
- </uni-forms-item>
- <uni-forms-item v-show="result=='0'" label="返修原因">
- <dictionaries-select :flag="flag" @post-select-dic="postSelectDic" style="width: 200px;"></dictionaries-select>
- </uni-forms-item>
- <uni-forms-item v-show="result=='0'" label="">
- <uni-easyinput style="width: 200px;margin-left: 80px;" type="textarea" maxlength="100" v-model="valiFormData.ReturnReason" placeholder="请输入其他返修原因"/>
- </uni-forms-item>
- <uni-forms-item v-show="result=='0' || result=='1'" label="" style="margin-left: 50%;width: 300%;">
- <button style="margin-right: 20px;" size="mini" @click="cancel">取消</button>
- <button type="primary" size="mini" @click="submit('valiForm')">确认</button>
- </uni-forms-item>
- </uni-forms>
- </view>
- <view class="contentTable">
- <text class="contentTitle">工单编号:</text>
- <text class="contentText">{{ detailContentData.F_WorkOrderCode }}</text>
- <!-- <text class="textState" v-show="detailContentData.StateName ">{{ detailContentData.StateName }}</text>
- <text class="textState fx" v-show="backState == 1">返修</text> -->
- </view>
- <view class="contentTable" v-show="detailContentData.StateName ">
- <text class="contentTitle">工单状态:</text>
- <text class="textState">{{ detailContentData.StateName }}</text>
- <text class="textState" v-show="detailContentData.F_EmergencyTypes=='紧急'" style="color: #ff0000;border: 1px solid #ff0000;text-align: center;">紧急</text>
- <text class="textState" v-show="detailContentData.F_ReplayCount>0" style="color:#ddb642;border:1px solid #ddb642;text-align: center;">延期 {{detailContentData.F_ReplayCount}}</text>
- <text class="textState" v-show="detailContentData.ishangup=='是'" style="color:#4fa0f4;border:1px solid #4fa0f4;text-align: center;">挂起</text>
- <text class="textState" v-if="detailContentData.F_IsBack == 1" style="color: #3478f6;border: 1px solid #3478f6;text-align: center;">退单</text>
- <text class="textState" v-show="detailContentData.GapTime && detailContentData.GapTime.indexOf('超时')>=0" style="color:#880000;border:1px solid #880000;text-align: center;">超期</text>
- <text class="textState fx" v-show="backState == 1">返修</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">工单类型:</text>
- <text
- class="contentText">{{ $mHelper.findParents(orderTypeList,detailContentData.F_WorkOrderCategory)}}</text>
- </view>
- <view class="contentTable" v-if="typeName.indexOf('设备类')>=0">
- <text class="contentTitle">设备资产编码:</text>
- <text class="contentText">{{ detailContentData.F_DeviceEncode }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">上报科室:</text>
- <text
- class="contentText">{{ $mHelper.findParents(departList,detailContentData.F_ApplicationDept)}}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">科室电话:</text>
- <text class="contentText">{{ detailContentData.F_DeptPhone }}
- <uni-icons v-show="detailContentData.F_DeptPhone&&clickbefore==0" class="frContentText" type="eye" size="30" @click="clickEye"></uni-icons>
- </text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">科室位置:</text>
- <text class="contentText">{{ detailContentData.F_LocationNew }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">上报时间:</text>
- <text class="contentText">{{ detailContentData.F_CreateTime }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">报工位置:</text>
- <text class="contentText">{{ detailContentData.F_PlaceOfRepair }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">申请人:</text>
- <text class="contentText">{{ detailContentData.applicantname}}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">申请人电话:</text>
- <text class="contentText" style="margin-top: -5px;">{{ detailContentData.F_Applicantsphone }}<uni-icons v-show="detailContentData.F_Applicantsphone&&clickbefore==0" class="frContentText" type="eye" size="30" @click="clickEye"></uni-icons> <uni-icons @click="callHandle(detailContentData.F_ApplicantsphoneShow)" class="frContentText" type="phone" size="30" v-if="detailContentData.F_Applicantsphone"></uni-icons></text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">联系电话:</text>
- <text class="contentText" style="margin-top: -5px;">{{ detailContentData.F_Phone }}<uni-icons v-show="detailContentData.F_Phone&&clickbefore==0" class="frContentText" type="eye" size="30" @click="clickEye"></uni-icons> <uni-icons @click="callHandle(detailContentData.F_PhoneShow)" class="frContentText" type="phone" size="30" v-if="detailContentData.F_Phone"></uni-icons></text>
- </view>
- <view class="contentTable">
- <view class="contentTitle">报修内容:</view>
- <view class="contentText">{{ detailContentData.F_Content }}</view>
- </view>
- <view class="contentTable">
- <text class="contentTitle">维修科室:</text>
- <text
- class="contentText">{{ $mHelper.findParents(departList,detailContentData.F_MaintenanceDept) }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">维修人员:</text>
- <text class="contentText">{{ detailContentData.MaintenancerName}}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">联系方式:</text>
- <text class="contentText" style="margin-top: -5px;">{{ detailContentData.MaintenancerPhone }}<uni-icons v-show="detailContentData.MaintenancerPhone&&clickbefore==0" class="frContentText" type="eye" size="30" @click="clickEye"></uni-icons> <uni-icons @click="callHandle(detailContentData.MaintenancerPhoneShow)" class="frContentText" type="phone" size="30" v-if="detailContentData.MaintenancerPhone"></uni-icons></text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">超时时限:</text>
- <text class="contentText">{{ detailContentData.GapTime }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">紧急程度:</text>
- <text class="contentText">{{ detailContentData.F_EmergencyTypes }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">接单时间:</text>
- <text class="contentText">{{ detailContentData.F_AcceptTime }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">挂起时间:</text>
- <text class="contentText">{{ detailContentData.F_ExceptFinishTime }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">完成时间:</text>
- <text class="contentText">{{ detailContentData.F_Endtime }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">完成时长:</text>
- <text class="contentText">{{ detailContentData.SpendTime }}</text>
- </view>
- <view class="contentTable" v-show="backState == 1">
- <text class="contentTitle">返修内容:</text>
- <text class="contentText">{{ backCon }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">图<span class="place"></span>片:</text>
-
- <view class="contentText" style="margin-top: 10px;">
- <uni-file-picker readonly :value="getFileData(detailContentData.FileUrl)" :imageStyles="imageStyles" file-mediatype="image" />
- </view>
- </view>
- <view class="contentTable" v-show="detailContentData.TransferFileUrl">
- <text class="contentTitle">转组长附件:</text>
- <view class="contentText" style="margin-top: 10px;">
- <uni-file-picker readonly :value="getFileData(detailContentData.TransferFileUrl)" :imageStyles="imageStyles" file-mediatype="image" />
- </view>
- </view>
- </view>
- <yiLine>
- <view></view>
- </yiLine>
-
- <view class="operationButton" v-show="equipmentCon && equipmentCon.length != 0">
- <view>
- <text class="operationButtonTitle">耗材信息</text>
- <table class="equipmentInfo">
- <thead style="background-color: #fafafa;">
- <tr class="trCon">
- <td class="tdCon">耗材名称</td>
- <td class="tdCon">单价</td>
- <td class="tdCon">数量</td>
- <td class="tdCon">总价</td>
- </tr>
- </thead>
- <tbody>
- <tr class="trCon" v-for="item in equipmentCon">
- <td class="tdCon" v-if="!item.F_EquipNumber">{{item.F_EquipName}}</td>
- <td class="tdCon" v-if="item.F_EquipNumber">{{item.F_EquipName}}({{item.F_EquipNumber}})</td>
- <td class="tdCon">{{item.F_EquipPrice}}</td>
- <td class="tdCon">{{item.F_EquipAmount}}</td>
- <td class="tdCon">{{item.F_EquipAmount*item.F_EquipPrice}}</td>
- </tr>
- </tbody>
- </table>
- </view>
- </view>
-
- <view class="operationButton" v-show="orderButtonData && orderButtonData.length != 0">
- <!-- <view class="operationButton"> -->
- <view>
- <text class="operationButtonTitle">操作</text>
- <buttonsComponents class="buttons" :order-button-data="orderButtonData" :wid="workorderid" :typeName="$mHelper.findParents(orderTypeList,detailContentData.F_WorkOrderCategory)"
- :orderType="detailContentData.F_WorkOrderCategory" :departid="departid" :applicationDept="applicationDept" :firstType="$mHelper.stateComm(3)"
- :maintenancer="detailContentData.MaintenancerName" />
- </view>
- </view>
- <yiLine>
- <view></view>
- </yiLine>
- <view style="background-color: #fff;padding: 17px 0px;">
- <view class="segmentedControlWrapper">
- <uni-segmented-control :current="segmenter.current" :values="segmenter.items"
- @clickItem="onClickSegmentedControl" styleType="text" activeColor="#007aff" />
- </view>
- <view class="handleProcess">
- <view v-show="current == 0">
- <view class="detailContent showType" v-for="item in handleProcessListData" :key=item.F_Id>
- <view class="contentTable">
- <text class="contentTitle">处理部门:</text>
- <text class="contentText">{{ $mHelper.findParents(departList,item.F_MaintenanceDept) }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">处理人员:</text>
- <text
- class="contentText">{{ item.username }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">维修时间:</text>
- <text class="contentText">{{ item.F_ProcessingTime }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">完成状态:</text>
- <text class="contentText">{{ item.dealtype }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">处理结果:</text>
- <text class="contentText">{{ item.F_Result }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">处理方式:</text>
- <text class="contentText">{{ item.F_FinishType }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">异常原因:</text>
- <text class="contentText">{{ item.F_ExceptionTypeName }}</text>
- </view>
- <view class="contentTable" v-if="item.FileUrl && item.FileUrl.length > 0">
- <text class="contentTitle">维修前附件:</text>
- <uni-file-picker readonly :value="getFileData(item.FileUrl)" :imageStyles="imageStyles"
- file-mediatype="image" />
- </view>
- <view class="contentTable" v-if="detailContentData.PictureUrl && detailContentData.PictureUrl.length > 0">
- <text class="contentTitle">维修后附件:</text>
- <uni-file-picker readonly :value="getFileData(detailContentData.PictureUrl)" :imageStyles="imageStyles"
- file-mediatype="image" />
- </view>
- </view>
-
- <view class="contentTable noCon" v-show="!handleProcessListData || handleProcessListData.length == 0">
- 暂时无相关记录
- </view>
- </view>
- <view v-show="current == 1">
- <view class="detailContent showType" v-for="item in cooperationDate" :key=item.F_Id >
- <view class="contentTable">
- <text class="contentTitle">工单编号:</text>
- <text class="contentText">{{ item.F_WorkOrderCode }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">协作方式:</text>
- <text class="contentText">{{ item.Mode }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">接单部门:</text>
- <text class="contentText">{{ $mHelper.findParents(departList,item.F_MaintenanceDept)}}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">状<span class="place"></span>态:</text>
- <text class="contentText">{{ item.StateName }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">内<span class="place"></span>容:</text>
- <text class="contentText">{{ item.F_Content }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">创建时间:</text>
- <text class="contentText">{{ item.F_CreateTime }}</text>
- </view>
- </view>
- <view class="contentTable noCon" v-show="!cooperationDate || cooperationDate.length == 0">
- 暂时无相关记录
- </view>
- </view>
- <view v-show="current == 2">
- <uni-steps :options="orderProcessDate" :steteName='"gdlc"' v-show="orderProcessDate && orderProcessDate.length > 0" />
- <view class="contentTable noCon" v-show="!orderProcessDate || orderProcessDate.length == 0">
- 暂时无相关记录
- </view>
- </view>
- <view v-show="current == 3">
- <uni-steps :options="maintenanceRecords" :steteName='"wxjl"' v-show="maintenanceRecords && maintenanceRecords.length > 0" />
- <view class="contentTable noCon" v-show="!maintenanceRecords || maintenanceRecords.length == 0">
- 暂时无相关记录
- </view>
- </view>
- <view v-show="current == 4">
-
- <view class="detailContent showType" v-for="item in evaluateDate" :key=item.F_Id>
- <view class="contentTable">
- <text class="contentTitle">服务态度:</text>
- <htz-rate v-model="item.F_Attitude" :readonly='true' :size="30" :type="2"></htz-rate>
- <text class="contentTitle">{{ item.F_Attitude | getEvaluateFilters }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">维修质量:</text>
- <htz-rate v-model="item.F_Quality" :size="30" :type="2"></htz-rate>
- <text class="contentTitle">{{ item.F_Quality | getEvaluateFilters }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">完工时效:</text>
- <htz-rate v-model="item.F_Efficiency" :size="30" :type="2"></htz-rate>
- <text class="contentTitle">{{ item.F_Efficiency | getEvaluateFilters }}</text>
- </view>
- <view class="contentTable">
- <text class="contentTitle">文字评价:</text>
- <text class="contentText">{{ item.F_EvaluateContent }}</text>
- </view>
- </view>
- <view class="contentTable noCon" v-show="!evaluateDate || evaluateDate.length == 0 ||isdealman==detailContentData.F_Maintenancer">
- 暂时无相关记录
- </view>
- </view>
- </view>
- </view>
-
- </view>
- </template>
- <script>
- import yiLine from "@/components/yi-line/yi-line.vue"
- import buttonsComponents from "pages/myTask/workOrderDetail/button/button"
- import pageData from "@/pages/myTask/repairList/addRepair/pageData.js"
- import uniSteps from "@/pages/components/steps/index.vue"
- import htzRate from '@/pages/components/htz-rate/htz-rate.vue'
- import dictionariesSelect from '@/pages/components/dictionariesSelect/dictionariesSelect.vue' //upload
- import { encrypt,decrypt } from "@/utils/secretKey"
- const segmenterData = {
- 0: ["处理结果", "协作工单","工单流程", "维修记录", "评价"],
- 1: ["处理结果", "工单流程", "维修记录", "评价"]
- }
- export default {
- components: {
- yiLine,
- buttonsComponents,
- uniSteps,
- htzRate,
- dictionariesSelect
- },
- filters: {
- getEvaluateFilters(state) {
- const data = {
- 1: '差',
- 2: '差',
- 3: '良',
- 4: '优',
- 5: '优',
- }
- return data[state]
- }
- },
- data() {
- return {
- clickbefore:0,
- isdealman:uni.getStorageSync('userCode'),//处理人
- getFontSizeValue:'1rem',
- active: 1,
- current: 0,
- typeName: '',
- listtype:"",
- workorderid: "", // 工单id
- sms_id: '', // 消息id
- tap: '', //工单切换
- roleCode: "", //角色
- departList: [], //部门数据
- userCodeList: [], //用户信息
- detailContentData: {}, // 详情内容
- orderButtonData: [],
- departid: '',
- applicationDept: '',
- handleProcessListData: [], // 办理过程
- cooperationDate: [], // 协作工单
- orderProcessDate: [], // 工单流程
- maintenanceRecords: [], // 维修记录
- evaluateDate: [], // 评价工单
- workOrderButton: [], // 工单按钮权限
- equipmentCon:[], // 耗材数量
- backState: 0, // 返修的状态,是返修1,不是为0
- backCon: '', // 返修的内容
- orderTypeList: [],
- segmenter: {
- current: 0,
- items: ["0", "1", "2", "3", "4"],
- type: "",
- },
- imageStyles: {
- width: 64,
- height: 64,
- border: {
- radius: '20%'
- }
- },
- isDisplay: {
- displaySegmentedControl: false, // 分段器
- },
- result:'',
- isconfirm:0,
- flag:'FXYY',
- // 校验规则
- rules: {
-
- },
- valiFormData:{
- attitude: 0, // 服务态度
- quality: 0, //维修质量
- finishTime: 0, // 完工时效
- content: '', // 评价内容
- key:'',
- value:'',
- ReturnReason:''
- }
- }
- },
- async onLoad(optioin) {
- console.log(optioin,'1111111111111')
- await this.getGongDanType()
- this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
- this.workorderid = optioin.wid
- this.sms_id = optioin.sms_id
- this.listtype = optioin.listtype
- this.getDetail(0)
- this.getDetail(3)
- this.getDetail(1)
- this.getDetail(4)
- if(this.sms_id) {
- this.getButtons()
- }else if(optioin.buttons) {
- console.log(JSON.parse(optioin.buttons))
- JSON.parse(optioin.buttons).forEach(v => {
- let btn = this.$mButtonConfig[v.key];
- if (btn != undefined) {
- this.orderButtonData.push(btn);
- }
- //判断有没有返回按钮有的话显示维修确认页面
- if(v.key == "repairconfirmnew"){
- this.isconfirm = 1
- }
- })
- }
- // pageData.getDet((res, data) => {
- // this.departList = data
- // })
- this.departList = JSON.parse(uni.getStorageSync('deptTreeData'))
- // pageData.getApplicant('', (res) => {
- // this.userCodeList = res
- // })
- if(this.sms_id) {
- this.isDisplay.displaySegmentedControl = true
- this.segmenter.type = 0
- this.segmenter.items = ["处理结果", "协作工单","工单流程", "维修记录", "评价"]
- this.getDetail(2)
- } else {
- this.isDisplay.displaySegmentedControl = true
- this.segmenter.type = optioin.segmenter
- this.segmenter.items = segmenterData[optioin.segmenter]
- this.getDetail(2)
- }
- this.roleCode = uni.getStorageSync("roleCode")
- },
- methods: {
- clickEye(){
- this.detailContentData.F_DeptPhone = decrypt(this.detailContentData.F_DeptPhoneShow)
- this.detailContentData.F_Applicantsphone = decrypt(this.detailContentData.F_ApplicantsphoneShow)
- this.detailContentData.MaintenancerPhone = decrypt(this.detailContentData.MaintenancerPhoneShow)
- this.detailContentData.F_Phone = decrypt(this.detailContentData.F_PhoneShow)
- this.clickbefore = 1
- // const params = {
- // workordercode:this.detailContentData.F_WorkOrderCode,
- // type:3000
- // }
- // this.$http.get("WorkCommon/GetApplicantPhone",params).then((res)=>{
- // this.detailContentData.F_Applicantsphone = res
- // this.clickbefore = 1
- // })
- },
- confirmChange(num){
- this.result = num
- },
- postSelectDic(e) {
- this.valiFormData.key = Number(e.split(',')[0])
- this.valiFormData.value = e.split(',')[1]
- },
- cancel(){
- this.result = ''
- },
- submit(ref, state) {
- this.disabledButton = true
- if(this.result==1){
- this.valiFormData.key = ""
- this.valiFormData.value = ""
- this.valiFormData.ReturnReason = ""
- if(this.valiFormData.attitude == 0 || this.valiFormData.quality == 0 || this.valiFormData.finishTime == 0){
- this.$mHelper.toast('请选择星级评价')
- this.disabledButton = false
- return
- }
- if (this.valiFormData.attitude < 3 || this.valiFormData.quality < 3 || this.valiFormData.finishTime < 3) {
- if (!this.valiFormData.content) {
- this.$mHelper.toast('请输入评价内容')
- this.disabledButton = false
- return
- }
- }
- }else{
- this.valiFormData.attitude = 0
- this.valiFormData.quality = 0
- this.valiFormData.finishTime = 0
- this.valiFormData.content = ""
- if(!this.valiFormData.value){
- this.$mHelper.toast('请选择原因')
- this.disabledButton = false
- return
- }
- if(this.valiFormData.value == '其他'){
- if(!this.valiFormData.ReturnReason){
- this.$mHelper.toast('请输入其他原因')
- this.disabledButton = false
- return
- }
- }
- }
- this.$refs[ref].validate().then(res => {
- const params = {
- workordercode: this.workorderid,
- confirmtype: this.result,
- Attitude: this.valiFormData.attitude,
- Quality: this.valiFormData.quality,
- Efficiency: this.valiFormData.finishTime,
- EvaluateContent: this.valiFormData.content,
- key: this.valiFormData.key,
- value: this.valiFormData.value,
- ReturnReason: this.valiFormData.ReturnReason
- }
- this.$mHelper.httpPost("FaultRepair/ConfirmEquipsAfter", params, 1, res => this.disabledButton =
- res)
-
- }).catch(err => {
- this.disabledButton = false
- console.log('err', err);
- })
- },
- async getGongDanType(){
- let dataOrderType = []
- const params = {
- pid:0,
- flag:1
- }
- const res = await this.$http.get("GongDanType/GetALLData",params)
- if (res.state.toLowerCase() ==="success") this.orderTypeList = res.data
- },
- callHandle(phone){
- if(!phone) {
- this.$mHelper.toast('无号码信息')
- return
- }
- uni.makePhoneCall({
- phoneNumber:decrypt(phone) //仅为示例
- })
- },
- getButtons() {
- this.orderButtonData = []
- const params = {
- SMS_Id: this.sms_id
- }
- this.$http.get("InternalMessages/GetButtons",params).then((res)=>{
- if(res.state.toLowerCase() ==="success"){
- res.rows[0].Buttons.forEach(v => {
- let btn = this.$mButtonConfig[v.key];
- if (btn != undefined) {
- this.orderButtonData.push(btn);
- }
- })
- }
- })
- },
- getFileData(fileData) {
- let newFile = []
- if (fileData && fileData.length > 0) {
- fileData.forEach((element, index) => {
- const obj = {}
- obj.url = element.F_FileUrl
- obj.extname = element.F_FileType.split('.')[1]
- obj.name = element.F_FileName
- newFile.push(obj);
- });
- }
- return newFile
- },
- getDetail(type) {
- const params = {
- WorkOrderCode: this.workorderid,
- type: type,
- listtype: this.listtype
- }
- this.$http.get("FaultRepair/GetWorkOrder", params).then((response) => {
- if (response.state.toLowerCase() === "success") {
- if (type == 0) {
- this.detailContentData = response.data[0]
- this.applicationDept = this.detailContentData.F_ApplicationDept.trim()
- this.departid = this.detailContentData.F_MaintenanceDept.trim()
- this.typeName = this.$mHelper.findParents(this.orderTypeList,this.detailContentData.F_WorkOrderCategory)
- } else if (type == 1) {
- this.handleProcessListData = response.data
- } else if (type == 2) {
- if(response.data.data.length == 0) {
- this.segmenter.items = segmenterData[1]
- this.segmenter.type = '1'
- }
- this.cooperationDate = response.data.data
- } else if (type == 3) {
- this.orderProcessDate = response.data
- } else if (type == 4) {
- this.maintenanceRecords = response.data
- if(response.data.length> 0 && response.data[0].Equips) {
- this.equipmentCon = response.data[0].Equips
- console.log(this.equipmentCon.length)
- }
- } else if (type == 5) {
- this.evaluateDate = response.data
- } else if (type == 6) {
- if (response.message == '不是返修') {
- this.backState = 0
- } else if (response.message == '是返修') {
- this.backState = 1
- this.backCon = response.data
- }
- }
- }
- }).catch((e) => {
- console.log(e);
- })
- },
- onClickSegmentedControl(e) {
- this.current = e.currentIndex
- if(this.segmenter.type == '0') {
- switch (String(e.currentIndex)) {
- case "0":
- this.tap = 1
- break
- case "1":
- this.tap = 2
- break
- case "2":
- this.tap = 3
- break
- case "3":
- this.tap = 4
- break
- case "4":
- this.tap = 5
- break
- }
- }else{
- switch (String(e.currentIndex)) {
- case "0":
- this.tap = 1
- this.current = e.currentIndex
- break
- case "1":
- this.tap = 3
- this.current = e.currentIndex + 1
- break
- case "2":
- this.tap = 4
- this.current = e.currentIndex + 1
- break
- case "3":
- this.tap = 5
- this.current = e.currentIndex + 1
- break
- }
- }
-
- this.getDetail(this.tap)
- },
- },
- }
- </script>
- <style lang="scss">
- .confirmbtns{
- border:1px solid #0055ff;padding: 3px 7px;border-radius: 5px;
- }
- .noCon{
- height: 200px;
- text-align: center;
- // font-size: 14px;
- color: #525252;
- }
- /deep/.segmented-control__text{
- font-size: 1rem !important;
- }
- /deep/ .set2-test{
- font-size: 1rem !important;
- }
- /deep/.set-2 .set-view .setTitle{
- font-size: 1rem !important;
- }
- /deep/.set-2 .set-view .setCon{
- font-size: 1rem !important;
- }
- .wrapper {
- // background-color: #fff;
- // height: 100vh;
- // padding: 10px 20px 0 20px;
- .showType{
- background-color: #fff;
- padding: 10px 13px;
- border-radius: 10px;
- box-shadow: 0px 4px 16px 0px rgba(69, 91, 99, 0.13);
- margin-bottom: 25px;
- }
- .detailContent {
- // margin: 0 0 15px 0;
- padding: 17px;
- background-color: #fff;
-
- .contentTable {
- margin: 0 0 10px 0;
- display: flex;
- .contentTitle {
- // font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
- font-weight: 700;
- // text-align-last: justify;
- font-style: normal;
- // font-size: 14px;
- color: #555555;
- width: 34%;
- display: inline-block;
- text-align: right;
- }
-
- .place{
- display: inline-block;
- width: 32px;
- }
-
- .frContentText{
- font-size: 25px !important;
- color: #1e90ff !important;
- margin-left: 15px !important;
- }
- .contentText {
- width: 66%;
- color: #525252;
- // font-size: 14px;
- margin-left: 10px;
- }
- .textState {
- // position: absolute;
- // right: 15px;
- // font-size: 12px;
- border: 1px solid #52C41A;
- padding: 2px 5px;
- color: #52C41A;
- background-color: rgba(195, 239, 161, 0.2);
- border-radius: 5px;
- margin-left: 10px;
- }
- .fx {
- // right: 70px;
- border: 1px solid #2d6116;
- color: #2d6116;
- background-color: rgba(255, 110, 84, 0.2);
- margin-left: 20px;
- }
- }
-
-
- }
- .operationButton {
- margin: 5px 0;
- padding: 17px;
- background-color: #fff;
-
- .operationButtonTitle {
- font-weight: 700;
- }
- .buttons {
- margin: 15px 0 0 0;
- }
- }
-
- .equipmentInfo{
- width: 100%;
- margin-top: 15px;
- border: 1px solid rgb(229, 229, 229);
- box-shadow: 0px 4px 16px 0px rgba(69, 91, 99, 0.05);
- margin-bottom: 20px;
- border-radius: 5px;
-
- .trCon {
- width: 100%;
- // font-size: 14px;
-
- .tdCon {
- display: inline-block;
- padding: 10px 0px;
- color: rgb(102, 102, 102);
- width: 20%;
- padding-right: 5px;
- text-align: center;
- }
- }
-
- }
-
- .handleProcess {
- margin: 15px 0;
- .handleProcessTitle {
- font-weight: 700;
- }
- .handleProcessContent {
- margin: 8px 0 0 0;
- .handleProcessContentTime text {
- // font-size: 14px;
- color: #73d13d;
- }
- .handleProcessContentText text {
- // font-size: 14px;
- color: #525252;
- }
- }
- }
- }
- </style>
|