人民医院前端

workOrderDetail.vue 29KB

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