人民医院前端

workOrderDetail.vue 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <template>
  2. <page-meta :root-font-size="getFontSizeValue"></page-meta>
  3. <view class="wrapper">
  4. <view class="detailContent">
  5. <view class="contentTable" v-if="isconfirm==1">
  6. <view style="margin-left: 37px;font-size: 18px;color: #0055ff;font-weight: bold;">请对本次维修进行确认!</view>
  7. </view>
  8. <view class="contentTable" v-if="isconfirm==1">
  9. <view style="margin: 5px auto;font-size: 14px;">
  10. <text @click="confirmChange('1')" class="confirmbtns" style="margin-right: 25px;">确认完成</text>
  11. <text @click="confirmChange('0')" class="confirmbtns">需要返修</text>
  12. </view>
  13. </view>
  14. <view class="contentTable" style="margin-left: 37px;border-bottom: 1px solid #ccc;padding-bottom: 10px;">
  15. <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData">
  16. <uni-forms-item v-show="result=='1'" label="服务态度" name="attitude">
  17. <htz-rate v-model="valiFormData.attitude" :type="2"></htz-rate>
  18. </uni-forms-item>
  19. <uni-forms-item v-show="result=='1'" label="维修质量" name="quality">
  20. <htz-rate v-model="valiFormData.quality" :type="2"></htz-rate>
  21. </uni-forms-item>
  22. <uni-forms-item v-show="result=='1'" label="完工时效" name="finishTime">
  23. <htz-rate v-model="valiFormData.finishTime" :type="2"></htz-rate>
  24. </uni-forms-item>
  25. <uni-forms-item v-show="result=='1'" label="评价内容" name="content">
  26. <uni-easyinput style="width: 200px;" type="textarea" v-model="valiFormData.content" placeholder="请输入评价内容(限100字)"
  27. maxlength="100" />
  28. </uni-forms-item>
  29. <uni-forms-item v-show="result=='0'" label="返修原因">
  30. <dictionaries-select :flag="flag" @post-select-dic="postSelectDic" style="width: 200px;"></dictionaries-select>
  31. </uni-forms-item>
  32. <uni-forms-item v-show="result=='0'" label="">
  33. <uni-easyinput style="width: 200px;margin-left: 80px;" type="textarea" maxlength="100" v-model="valiFormData.ReturnReason" placeholder="请输入其他返修原因"/>
  34. </uni-forms-item>
  35. <uni-forms-item v-show="result=='0' || result=='1'" label="" style="margin-left: 50%;width: 300%;">
  36. <button style="margin-right: 20px;" size="mini" @click="cancel">取消</button>
  37. <button type="primary" size="mini" @click="submit('valiForm')">确认</button>
  38. </uni-forms-item>
  39. </uni-forms>
  40. </view>
  41. <view class="contentTable">
  42. <text class="contentTitle">工单编号:</text>
  43. <text class="contentText">{{ detailContentData.F_WorkOrderCode }}</text>
  44. <!-- <text class="textState" v-show="detailContentData.StateName ">{{ detailContentData.StateName }}</text>
  45. <text class="textState fx" v-show="backState == 1">返修</text> -->
  46. </view>
  47. <view class="contentTable" v-show="detailContentData.StateName ">
  48. <text class="contentTitle">工单状态:</text>
  49. <text class="textState">{{ detailContentData.StateName }}</text>
  50. <text class="textState" v-show="detailContentData.F_EmergencyTypes=='紧急'" style="color: #ff0000;border: 1px solid #ff0000;text-align: center;">紧急</text>
  51. <text class="textState" v-show="detailContentData.F_ReplayCount>0" style="color:#ddb642;border:1px solid #ddb642;text-align: center;">延期 {{detailContentData.F_ReplayCount}}</text>
  52. <text class="textState" v-show="detailContentData.ishangup=='是'" style="color:#4fa0f4;border:1px solid #4fa0f4;text-align: center;">挂起</text>
  53. <text class="textState" v-if="detailContentData.F_IsBack == 1" style="color: #3478f6;border: 1px solid #3478f6;text-align: center;">退单</text>
  54. <text class="textState" v-show="detailContentData.GapTime && detailContentData.GapTime.indexOf('超时')>=0" style="color:#880000;border:1px solid #880000;text-align: center;">超期</text>
  55. <text class="textState" v-show="detailContentData.F_TransferCount && detailContentData.F_TransferCount>1" style="color:#55aa7f;border:1px solid #55aa7f;text-align: center;" >转 {{detailContentData.F_TransferCount-1}}</text>
  56. <text class="textState fx" v-show="backState == 1">返修</text>
  57. </view>
  58. <view class="contentTable">
  59. <text class="contentTitle">工单类型:</text>
  60. <text
  61. class="contentText">{{ $mHelper.findParents(orderTypeList,detailContentData.F_WorkOrderCategory)}}</text>
  62. </view>
  63. <view class="contentTable" v-if="typeName.indexOf('设备类')>=0">
  64. <text class="contentTitle">设备资产编码:</text>
  65. <text class="contentText">{{ detailContentData.F_DeviceEncode }}</text>
  66. </view>
  67. <view class="contentTable">
  68. <text class="contentTitle">上报科室:</text>
  69. <text
  70. class="contentText">{{ $mHelper.findParents(departList,detailContentData.F_ApplicationDept)}}</text>
  71. </view>
  72. <view class="contentTable">
  73. <text class="contentTitle">科室电话:</text>
  74. <text class="contentText">{{ detailContentData.F_DeptPhone }}
  75. <uni-icons v-show="detailContentData.F_DeptPhone&&clickbefore==0" class="frContentText" type="eye" size="30" @click="clickEye"></uni-icons>
  76. </text>
  77. </view>
  78. <view class="contentTable">
  79. <text class="contentTitle">科室位置:</text>
  80. <text class="contentText">{{ detailContentData.F_LocationNew }}</text>
  81. </view>
  82. <view class="contentTable">
  83. <text class="contentTitle">上报时间:</text>
  84. <text class="contentText">{{ detailContentData.F_CreateTime }}</text>
  85. </view>
  86. <view class="contentTable">
  87. <text class="contentTitle">报工位置:</text>
  88. <text class="contentText">{{ detailContentData.F_PlaceOfRepair }}</text>
  89. </view>
  90. <view class="contentTable">
  91. <text class="contentTitle">申请人:</text>
  92. <text class="contentText">{{ detailContentData.applicantname}}</text>
  93. </view>
  94. <view class="contentTable">
  95. <text class="contentTitle">申请人电话:</text>
  96. <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>
  97. </view>
  98. <view class="contentTable">
  99. <text class="contentTitle">联系电话:</text>
  100. <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>
  101. </view>
  102. <view class="contentTable">
  103. <view class="contentTitle">报修内容:</view>
  104. <view class="contentText">{{ detailContentData.F_Content }}</view>
  105. </view>
  106. <view class="contentTable">
  107. <text class="contentTitle">维修科室:</text>
  108. <text
  109. class="contentText">{{ $mHelper.findParents(departList,detailContentData.F_MaintenanceDept) }}</text>
  110. </view>
  111. <view class="contentTable">
  112. <text class="contentTitle">维修人员:</text>
  113. <text class="contentText">{{ detailContentData.MaintenancerName}}</text>
  114. </view>
  115. <view class="contentTable">
  116. <text class="contentTitle">联系方式:</text>
  117. <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>
  118. </view>
  119. <view class="contentTable">
  120. <text class="contentTitle">超时时限:</text>
  121. <text class="contentText">{{ detailContentData.GapTime }}</text>
  122. </view>
  123. <view class="contentTable">
  124. <text class="contentTitle">紧急程度:</text>
  125. <text class="contentText">{{ detailContentData.F_EmergencyTypes }}</text>
  126. </view>
  127. <view class="contentTable">
  128. <text class="contentTitle">接单时间:</text>
  129. <text class="contentText">{{ detailContentData.F_AcceptTime }}</text>
  130. </view>
  131. <view class="contentTable">
  132. <text class="contentTitle">挂起时间:</text>
  133. <text class="contentText">{{ detailContentData.F_ExceptFinishTime }}</text>
  134. </view>
  135. <view class="contentTable">
  136. <text class="contentTitle">完成时间:</text>
  137. <text class="contentText">{{ detailContentData.F_Endtime }}</text>
  138. </view>
  139. <view class="contentTable">
  140. <text class="contentTitle">完成时长:</text>
  141. <text class="contentText">{{ detailContentData.SpendTime }}</text>
  142. </view>
  143. <view class="contentTable" v-show="backState == 1">
  144. <text class="contentTitle">返修内容:</text>
  145. <text class="contentText">{{ backCon }}</text>
  146. </view>
  147. <view class="contentTable">
  148. <text class="contentTitle">图<span class="place"></span>片:</text>
  149. <view class="contentText" style="margin-top: 10px;">
  150. <uni-file-picker readonly :value="getFileData(detailContentData.FileUrl)" :imageStyles="imageStyles" file-mediatype="image" />
  151. </view>
  152. </view>
  153. <view class="contentTable" v-show="detailContentData.TransferFileUrl">
  154. <text class="contentTitle">转组长附件:</text>
  155. <view class="contentText" style="margin-top: 10px;">
  156. <uni-file-picker readonly :value="getFileData(detailContentData.TransferFileUrl)" :imageStyles="imageStyles" file-mediatype="image" />
  157. </view>
  158. </view>
  159. </view>
  160. <yiLine>
  161. <view></view>
  162. </yiLine>
  163. <view class="operationButton" v-show="equipmentCon && equipmentCon.length != 0">
  164. <view>
  165. <text class="operationButtonTitle">耗材信息</text>
  166. <table class="equipmentInfo">
  167. <thead style="background-color: #fafafa;">
  168. <tr class="trCon">
  169. <td class="tdCon">耗材名称</td>
  170. <td class="tdCon">单价</td>
  171. <td class="tdCon">数量</td>
  172. <td class="tdCon">总价</td>
  173. </tr>
  174. </thead>
  175. <tbody>
  176. <tr class="trCon" v-for="item in equipmentCon">
  177. <td class="tdCon" v-if="!item.F_EquipNumber">{{item.F_EquipName}}</td>
  178. <td class="tdCon" v-if="item.F_EquipNumber">{{item.F_EquipName}}({{item.F_EquipNumber}})</td>
  179. <td class="tdCon">{{item.F_EquipPrice}}</td>
  180. <td class="tdCon">{{item.F_EquipAmount}}</td>
  181. <td class="tdCon">{{item.F_EquipAmount*item.F_EquipPrice}}</td>
  182. </tr>
  183. </tbody>
  184. </table>
  185. </view>
  186. </view>
  187. <view class="operationButton" v-show="orderButtonData && orderButtonData.length != 0">
  188. <!-- <view class="operationButton"> -->
  189. <view>
  190. <text class="operationButtonTitle">操作</text>
  191. <buttonsComponents class="buttons" :order-button-data="orderButtonData" :wid="workorderid" :typeName="$mHelper.findParents(orderTypeList,detailContentData.F_WorkOrderCategory)"
  192. :orderType="detailContentData.F_WorkOrderCategory" :departid="departid" :applicationDept="applicationDept" :firstType="$mHelper.stateComm(3)"
  193. :maintenancer="detailContentData.MaintenancerName" />
  194. </view>
  195. </view>
  196. <yiLine>
  197. <view></view>
  198. </yiLine>
  199. <view style="background-color: #fff;padding: 17px 0px;">
  200. <view class="segmentedControlWrapper">
  201. <uni-segmented-control :current="segmenter.current" :values="segmenter.items"
  202. @clickItem="onClickSegmentedControl" styleType="text" activeColor="#007aff" />
  203. </view>
  204. <view class="handleProcess">
  205. <view v-show="current == 0">
  206. <view class="detailContent showType" v-for="item in handleProcessListData" :key=item.F_Id>
  207. <view class="contentTable">
  208. <text class="contentTitle">处理部门:</text>
  209. <text class="contentText">{{ $mHelper.findParents(departList,item.F_MaintenanceDept) }}</text>
  210. </view>
  211. <view class="contentTable">
  212. <text class="contentTitle">处理人员:</text>
  213. <text
  214. class="contentText">{{ item.username }}</text>
  215. </view>
  216. <view class="contentTable">
  217. <text class="contentTitle">维修时间:</text>
  218. <text class="contentText">{{ item.F_ProcessingTime }}</text>
  219. </view>
  220. <view class="contentTable">
  221. <text class="contentTitle">完成状态:</text>
  222. <text class="contentText">{{ item.dealtype }}</text>
  223. </view>
  224. <view class="contentTable">
  225. <text class="contentTitle">处理结果:</text>
  226. <text class="contentText" v-html="item.F_Result"></text>
  227. </view>
  228. <view class="contentTable">
  229. <text class="contentTitle">处理方式:</text>
  230. <text class="contentText">{{ item.F_FinishType }}</text>
  231. </view>
  232. <view class="contentTable">
  233. <text class="contentTitle">异常原因:</text>
  234. <text class="contentText">{{ item.F_ExceptionTypeName }}</text>
  235. </view>
  236. <view class="contentTable" v-if="item.FileUrl && item.FileUrl.length > 0">
  237. <text class="contentTitle">维修前附件:</text>
  238. <uni-file-picker readonly :value="getFileData(item.FileUrl)" :imageStyles="imageStyles"
  239. file-mediatype="image" />
  240. </view>
  241. <view class="contentTable" v-if="detailContentData.PictureUrl && detailContentData.PictureUrl.length > 0">
  242. <text class="contentTitle">维修后附件:</text>
  243. <uni-file-picker readonly :value="getFileData(detailContentData.PictureUrl)" :imageStyles="imageStyles"
  244. file-mediatype="image" />
  245. </view>
  246. </view>
  247. <view class="contentTable noCon" v-show="!handleProcessListData || handleProcessListData.length == 0">
  248. 暂时无相关记录
  249. </view>
  250. </view>
  251. <view v-show="current == 1">
  252. <view class="detailContent showType" v-for="item in cooperationDate" :key=item.F_Id >
  253. <view class="contentTable">
  254. <text class="contentTitle">工单编号:</text>
  255. <text class="contentText">{{ item.F_WorkOrderCode }}</text>
  256. </view>
  257. <view class="contentTable">
  258. <text class="contentTitle">协作方式:</text>
  259. <text class="contentText">{{ item.Mode }}</text>
  260. </view>
  261. <view class="contentTable">
  262. <text class="contentTitle">接单部门:</text>
  263. <text class="contentText">{{ $mHelper.findParents(departList,item.F_MaintenanceDept)}}</text>
  264. </view>
  265. <view class="contentTable">
  266. <text class="contentTitle">状<span class="place"></span>态:</text>
  267. <text class="contentText">{{ item.StateName }}</text>
  268. </view>
  269. <view class="contentTable">
  270. <text class="contentTitle">内<span class="place"></span>容:</text>
  271. <text class="contentText">{{ item.F_Content }}</text>
  272. </view>
  273. <view class="contentTable">
  274. <text class="contentTitle">创建时间:</text>
  275. <text class="contentText">{{ item.F_CreateTime }}</text>
  276. </view>
  277. </view>
  278. <view class="contentTable noCon" v-show="!cooperationDate || cooperationDate.length == 0">
  279. 暂时无相关记录
  280. </view>
  281. </view>
  282. <view v-show="current == 2">
  283. <uni-steps :options="orderProcessDate" :steteName='"gdlc"' v-show="orderProcessDate && orderProcessDate.length > 0" />
  284. <view class="contentTable noCon" v-show="!orderProcessDate || orderProcessDate.length == 0">
  285. 暂时无相关记录
  286. </view>
  287. </view>
  288. <view v-show="current == 3">
  289. <uni-steps :options="maintenanceRecords" :steteName='"wxjl"' v-show="maintenanceRecords && maintenanceRecords.length > 0" />
  290. <view class="contentTable noCon" v-show="!maintenanceRecords || maintenanceRecords.length == 0">
  291. 暂时无相关记录
  292. </view>
  293. </view>
  294. <view v-show="current == 4">
  295. <view class="detailContent showType" v-for="item in evaluateDate" :key=item.F_Id>
  296. <view class="contentTable">
  297. <text class="contentTitle">服务态度:</text>
  298. <htz-rate v-model="item.F_Attitude" :readonly='true' :size="30" :type="2"></htz-rate>
  299. <text class="contentTitle">{{ item.F_Attitude | getEvaluateFilters }}</text>
  300. </view>
  301. <view class="contentTable">
  302. <text class="contentTitle">维修质量:</text>
  303. <htz-rate v-model="item.F_Quality" :size="30" :type="2"></htz-rate>
  304. <text class="contentTitle">{{ item.F_Quality | getEvaluateFilters }}</text>
  305. </view>
  306. <view class="contentTable">
  307. <text class="contentTitle">完工时效:</text>
  308. <htz-rate v-model="item.F_Efficiency" :size="30" :type="2"></htz-rate>
  309. <text class="contentTitle">{{ item.F_Efficiency | getEvaluateFilters }}</text>
  310. </view>
  311. <view class="contentTable">
  312. <text class="contentTitle">文字评价:</text>
  313. <text class="contentText">{{ item.F_EvaluateContent }}</text>
  314. </view>
  315. </view>
  316. <view class="contentTable noCon" v-show="!evaluateDate || evaluateDate.length == 0 ||isdealman==detailContentData.F_Maintenancer">
  317. 暂时无相关记录
  318. </view>
  319. </view>
  320. </view>
  321. </view>
  322. </view>
  323. </template>
  324. <script>
  325. import yiLine from "@/components/yi-line/yi-line.vue"
  326. import buttonsComponents from "pages/myTask/workOrderDetail/button/button"
  327. import pageData from "@/pages/myTask/repairList/addRepair/pageData.js"
  328. import uniSteps from "@/pages/components/steps/index.vue"
  329. import htzRate from '@/pages/components/htz-rate/htz-rate.vue'
  330. import dictionariesSelect from '@/pages/components/dictionariesSelect/dictionariesSelect.vue' //upload
  331. import { encrypt,decrypt } from "@/utils/secretKey"
  332. const segmenterData = {
  333. 0: ["处理结果", "协作工单","工单流程", "维修记录", "评价"],
  334. 1: ["处理结果", "工单流程", "维修记录", "评价"]
  335. }
  336. export default {
  337. components: {
  338. yiLine,
  339. buttonsComponents,
  340. uniSteps,
  341. htzRate,
  342. dictionariesSelect
  343. },
  344. filters: {
  345. getEvaluateFilters(state) {
  346. const data = {
  347. 1: '差',
  348. 2: '差',
  349. 3: '良',
  350. 4: '优',
  351. 5: '优',
  352. }
  353. return data[state]
  354. }
  355. },
  356. data() {
  357. return {
  358. clickbefore:0,
  359. isdealman:uni.getStorageSync('userCode'),//处理人
  360. getFontSizeValue:'1rem',
  361. active: 1,
  362. current: 0,
  363. typeName: '',
  364. listtype:"",
  365. workorderid: "", // 工单id
  366. sms_id: '', // 消息id
  367. tap: '', //工单切换
  368. roleCode: "", //角色
  369. departList: [], //部门数据
  370. userCodeList: [], //用户信息
  371. detailContentData: {}, // 详情内容
  372. orderButtonData: [],
  373. departid: '',
  374. applicationDept: '',
  375. handleProcessListData: [], // 办理过程
  376. cooperationDate: [], // 协作工单
  377. orderProcessDate: [], // 工单流程
  378. maintenanceRecords: [], // 维修记录
  379. evaluateDate: [], // 评价工单
  380. workOrderButton: [], // 工单按钮权限
  381. equipmentCon:[], // 耗材数量
  382. backState: 0, // 返修的状态,是返修1,不是为0
  383. backCon: '', // 返修的内容
  384. orderTypeList: [],
  385. segmenter: {
  386. current: 0,
  387. items: ["0", "1", "2", "3", "4"],
  388. type: "",
  389. },
  390. imageStyles: {
  391. width: 64,
  392. height: 64,
  393. border: {
  394. radius: '20%'
  395. }
  396. },
  397. isDisplay: {
  398. displaySegmentedControl: false, // 分段器
  399. },
  400. result:'',
  401. isconfirm:0,
  402. flag:'FXYY',
  403. // 校验规则
  404. rules: {
  405. },
  406. valiFormData:{
  407. attitude: 0, // 服务态度
  408. quality: 0, //维修质量
  409. finishTime: 0, // 完工时效
  410. content: '', // 评价内容
  411. key:'',
  412. value:'',
  413. ReturnReason:''
  414. }
  415. }
  416. },
  417. async onLoad(optioin) {
  418. console.log(optioin,'1111111111111')
  419. await this.getGongDanType()
  420. this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
  421. this.workorderid = optioin.wid
  422. this.sms_id = optioin.sms_id
  423. this.listtype = optioin.listtype
  424. this.getDetail(0)
  425. this.getDetail(3)
  426. this.getDetail(1)
  427. this.getDetail(4)
  428. if(this.sms_id) {
  429. this.getButtons()
  430. }else if(optioin.buttons) {
  431. console.log(JSON.parse(optioin.buttons))
  432. JSON.parse(optioin.buttons).forEach(v => {
  433. let btn = this.$mButtonConfig[v.key];
  434. if (btn != undefined) {
  435. this.orderButtonData.push(btn);
  436. }
  437. //判断有没有返回按钮有的话显示维修确认页面
  438. if(v.key == "repairconfirmnew"){
  439. this.isconfirm = 1
  440. }
  441. })
  442. }
  443. // pageData.getDet((res, data) => {
  444. // this.departList = data
  445. // })
  446. this.departList = JSON.parse(uni.getStorageSync('deptTreeData'))
  447. // pageData.getApplicant('', (res) => {
  448. // this.userCodeList = res
  449. // })
  450. if(this.sms_id) {
  451. this.isDisplay.displaySegmentedControl = true
  452. this.segmenter.type = 0
  453. this.segmenter.items = ["处理结果", "协作工单","工单流程", "维修记录", "评价"]
  454. this.getDetail(2)
  455. } else {
  456. this.isDisplay.displaySegmentedControl = true
  457. this.segmenter.type = optioin.segmenter
  458. this.segmenter.items = segmenterData[optioin.segmenter]
  459. this.getDetail(2)
  460. }
  461. this.roleCode = uni.getStorageSync("roleCode")
  462. },
  463. methods: {
  464. clickEye(){
  465. this.detailContentData.F_DeptPhone = decrypt(this.detailContentData.F_DeptPhoneShow)
  466. this.detailContentData.F_Applicantsphone = decrypt(this.detailContentData.F_ApplicantsphoneShow)
  467. this.detailContentData.MaintenancerPhone = decrypt(this.detailContentData.MaintenancerPhoneShow)
  468. this.detailContentData.F_Phone = decrypt(this.detailContentData.F_PhoneShow)
  469. this.clickbefore = 1
  470. // const params = {
  471. // workordercode:this.detailContentData.F_WorkOrderCode,
  472. // type:3000
  473. // }
  474. // this.$http.get("WorkCommon/GetApplicantPhone",params).then((res)=>{
  475. // this.detailContentData.F_Applicantsphone = res
  476. // this.clickbefore = 1
  477. // })
  478. },
  479. confirmChange(num){
  480. this.result = num
  481. },
  482. postSelectDic(e) {
  483. this.valiFormData.key = Number(e.split(',')[0])
  484. this.valiFormData.value = e.split(',')[1]
  485. },
  486. cancel(){
  487. this.result = ''
  488. },
  489. submit(ref, state) {
  490. this.disabledButton = true
  491. if(this.result==1){
  492. this.valiFormData.key = ""
  493. this.valiFormData.value = ""
  494. this.valiFormData.ReturnReason = ""
  495. if(this.valiFormData.attitude == 0 || this.valiFormData.quality == 0 || this.valiFormData.finishTime == 0){
  496. this.$mHelper.toast('请选择星级评价')
  497. this.disabledButton = false
  498. return
  499. }
  500. if (this.valiFormData.attitude <= 3 || this.valiFormData.quality <= 3 || this.valiFormData.finishTime <= 3) {
  501. if (!this.valiFormData.content) {
  502. this.$mHelper.toast('请输入评价内容')
  503. this.disabledButton = false
  504. return
  505. }
  506. }
  507. }else{
  508. this.valiFormData.attitude = 0
  509. this.valiFormData.quality = 0
  510. this.valiFormData.finishTime = 0
  511. this.valiFormData.content = ""
  512. if(!this.valiFormData.value){
  513. this.$mHelper.toast('请选择原因')
  514. this.disabledButton = false
  515. return
  516. }
  517. if(this.valiFormData.value == '其他'){
  518. if(!this.valiFormData.ReturnReason){
  519. this.$mHelper.toast('请输入其他原因')
  520. this.disabledButton = false
  521. return
  522. }
  523. }
  524. }
  525. this.$refs[ref].validate().then(res => {
  526. const params = {
  527. workordercode: this.workorderid,
  528. confirmtype: this.result,
  529. Attitude: this.valiFormData.attitude,
  530. Quality: this.valiFormData.quality,
  531. Efficiency: this.valiFormData.finishTime,
  532. EvaluateContent: this.valiFormData.content,
  533. key: this.valiFormData.key,
  534. value: this.valiFormData.value,
  535. ReturnReason: this.valiFormData.ReturnReason
  536. }
  537. this.$mHelper.httpPost("FaultRepair/ConfirmEquipsAfter", params, 1, res => this.disabledButton =
  538. res)
  539. }).catch(err => {
  540. this.disabledButton = false
  541. console.log('err', err);
  542. })
  543. },
  544. async getGongDanType(){
  545. let dataOrderType = []
  546. const params = {
  547. pid:0,
  548. flag:1
  549. }
  550. const res = await this.$http.get("GongDanType/GetALLData",params)
  551. if (res.state.toLowerCase() ==="success") this.orderTypeList = res.data
  552. },
  553. callHandle(phone){
  554. if(!phone) {
  555. this.$mHelper.toast('无号码信息')
  556. return
  557. }
  558. uni.makePhoneCall({
  559. phoneNumber:decrypt(phone) //仅为示例
  560. })
  561. },
  562. getButtons() {
  563. this.orderButtonData = []
  564. const params = {
  565. SMS_Id: this.sms_id
  566. }
  567. this.$http.get("InternalMessages/GetButtons",params).then((res)=>{
  568. if(res.state.toLowerCase() ==="success"){
  569. console.log(res.rows[0].Buttons,'res.rows[0].Buttonsres.rows[0].Buttons')
  570. res.rows[0].Buttons.forEach(v => {
  571. let btn = this.$mButtonConfig[v.key];
  572. if (btn != undefined) {
  573. this.orderButtonData.push(btn);
  574. }
  575. //判断有没有返回按钮有的话显示维修确认页面
  576. if(v.key == "repairconfirmnew"){
  577. this.isconfirm = 1
  578. }
  579. })
  580. }
  581. })
  582. },
  583. getFileData(fileData) {
  584. let newFile = []
  585. if (fileData && fileData.length > 0) {
  586. fileData.forEach((element, index) => {
  587. const obj = {}
  588. obj.url = element.F_FileUrl
  589. obj.extname = element.F_FileType.split('.')[1]
  590. obj.name = element.F_FileName
  591. newFile.push(obj);
  592. });
  593. }
  594. return newFile
  595. },
  596. getDetail(type) {
  597. uni.showLoading({
  598. title: '加载中'
  599. });
  600. const params = {
  601. WorkOrderCode: this.workorderid,
  602. type: type,
  603. listtype: this.listtype
  604. }
  605. this.$http.get("FaultRepair/GetWorkOrder", params).then((response) => {
  606. if (response.state.toLowerCase() === "success") {
  607. uni.hideLoading();
  608. if (type == 0) {
  609. this.detailContentData = response.data[0]
  610. this.applicationDept = this.detailContentData.F_ApplicationDept.trim()
  611. this.departid = this.detailContentData.F_MaintenanceDept.trim()
  612. this.typeName = this.$mHelper.findParents(this.orderTypeList,this.detailContentData.F_WorkOrderCategory)
  613. } else if (type == 1) {
  614. this.handleProcessListData = response.data
  615. } else if (type == 2) {
  616. if(response.data.data.length == 0) {
  617. this.segmenter.items = segmenterData[1]
  618. this.segmenter.type = '1'
  619. }
  620. this.cooperationDate = response.data.data
  621. } else if (type == 3) {
  622. this.orderProcessDate = response.data
  623. } else if (type == 4) {
  624. this.maintenanceRecords = response.data
  625. if(response.data.length> 0 && response.data[0].Equips) {
  626. this.equipmentCon = response.data[0].Equips
  627. console.log(this.equipmentCon.length)
  628. }
  629. } else if (type == 5) {
  630. this.evaluateDate = response.data
  631. } else if (type == 6) {
  632. if (response.message == '不是返修') {
  633. this.backState = 0
  634. } else if (response.message == '是返修') {
  635. this.backState = 1
  636. this.backCon = response.data
  637. }
  638. }
  639. }
  640. }).catch((e) => {
  641. console.log(e);
  642. })
  643. },
  644. onClickSegmentedControl(e) {
  645. this.current = e.currentIndex
  646. if(this.segmenter.type == '0') {
  647. switch (String(e.currentIndex)) {
  648. case "0":
  649. this.tap = 1
  650. break
  651. case "1":
  652. this.tap = 2
  653. break
  654. case "2":
  655. this.tap = 3
  656. break
  657. case "3":
  658. this.tap = 4
  659. break
  660. case "4":
  661. this.tap = 5
  662. break
  663. }
  664. }else{
  665. switch (String(e.currentIndex)) {
  666. case "0":
  667. this.tap = 1
  668. this.current = e.currentIndex
  669. break
  670. case "1":
  671. this.tap = 3
  672. this.current = e.currentIndex + 1
  673. break
  674. case "2":
  675. this.tap = 4
  676. this.current = e.currentIndex + 1
  677. break
  678. case "3":
  679. this.tap = 5
  680. this.current = e.currentIndex + 1
  681. break
  682. }
  683. }
  684. this.getDetail(this.tap)
  685. },
  686. },
  687. }
  688. </script>
  689. <style lang="scss">
  690. .confirmbtns{
  691. border:1px solid #0055ff;padding: 3px 7px;border-radius: 5px;
  692. }
  693. .noCon{
  694. height: 200px;
  695. text-align: center;
  696. // font-size: 14px;
  697. color: #525252;
  698. }
  699. /deep/.segmented-control__text{
  700. font-size: 1rem !important;
  701. }
  702. /deep/ .set2-test{
  703. font-size: 1rem !important;
  704. }
  705. /deep/.set-2 .set-view .setTitle{
  706. font-size: 1rem !important;
  707. }
  708. /deep/.set-2 .set-view .setCon{
  709. font-size: 1rem !important;
  710. }
  711. .wrapper {
  712. // background-color: #fff;
  713. // height: 100vh;
  714. // padding: 10px 20px 0 20px;
  715. .showType{
  716. background-color: #fff;
  717. padding: 10px 13px;
  718. border-radius: 10px;
  719. box-shadow: 0px 4px 16px 0px rgba(69, 91, 99, 0.13);
  720. margin-bottom: 25px;
  721. }
  722. .detailContent {
  723. // margin: 0 0 15px 0;
  724. padding: 17px;
  725. background-color: #fff;
  726. .contentTable {
  727. margin: 0 0 10px 0;
  728. display: flex;
  729. .contentTitle {
  730. // font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
  731. font-weight: 700;
  732. // text-align-last: justify;
  733. font-style: normal;
  734. // font-size: 14px;
  735. color: #555555;
  736. width: 34%;
  737. display: inline-block;
  738. text-align: right;
  739. }
  740. .place{
  741. display: inline-block;
  742. width: 32px;
  743. }
  744. .frContentText{
  745. font-size: 25px !important;
  746. color: #1e90ff !important;
  747. margin-left: 15px !important;
  748. }
  749. .contentText {
  750. width: 66%;
  751. color: #525252;
  752. // font-size: 14px;
  753. margin-left: 10px;
  754. }
  755. .textState {
  756. // position: absolute;
  757. // right: 15px;
  758. // font-size: 12px;
  759. border: 1px solid #52C41A;
  760. padding: 2px 5px;
  761. color: #52C41A;
  762. background-color: rgba(195, 239, 161, 0.2);
  763. border-radius: 5px;
  764. margin-left: 10px;
  765. }
  766. .fx {
  767. // right: 70px;
  768. border: 1px solid #2d6116;
  769. color: #2d6116;
  770. background-color: rgba(255, 110, 84, 0.2);
  771. margin-left: 20px;
  772. }
  773. }
  774. }
  775. .operationButton {
  776. margin: 5px 0;
  777. padding: 17px;
  778. background-color: #fff;
  779. .operationButtonTitle {
  780. font-weight: 700;
  781. }
  782. .buttons {
  783. margin: 15px 0 0 0;
  784. }
  785. }
  786. .equipmentInfo{
  787. width: 100%;
  788. margin-top: 15px;
  789. border: 1px solid rgb(229, 229, 229);
  790. box-shadow: 0px 4px 16px 0px rgba(69, 91, 99, 0.05);
  791. margin-bottom: 20px;
  792. border-radius: 5px;
  793. .trCon {
  794. width: 100%;
  795. // font-size: 14px;
  796. .tdCon {
  797. display: inline-block;
  798. padding: 10px 0px;
  799. color: rgb(102, 102, 102);
  800. width: 20%;
  801. padding-right: 5px;
  802. text-align: center;
  803. }
  804. }
  805. }
  806. .handleProcess {
  807. margin: 15px 0;
  808. .handleProcessTitle {
  809. font-weight: 700;
  810. }
  811. .handleProcessContent {
  812. margin: 8px 0 0 0;
  813. .handleProcessContentTime text {
  814. // font-size: 14px;
  815. color: #73d13d;
  816. }
  817. .handleProcessContentText text {
  818. // font-size: 14px;
  819. color: #525252;
  820. }
  821. }
  822. }
  823. }
  824. </style>