人民医院前端

workOrderDetail.vue 29KB

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