人民医院前端

button.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. <template>
  2. <view>
  3. <button class="mini-btn" type="default" size="mini" v-for="item in orderButtonData" :disabled="disabledButton"
  4. @click="callBtnMethods(item.eventName)" :key="item.id">
  5. {{ item.text }}
  6. </button>
  7. <!-- <button class="mini-btn" type="default" size="mini" @click="deleteBtn">删除</button> -->
  8. <!-- 弹框 -->
  9. <view>
  10. <uni-popup ref="inputDialog" type="dialog">
  11. <uni-popup-dialog ref="inputClose" mode="input" :title="title" @confirm="dialogInputConfirm">
  12. <view style="width:100%;">
  13. <!-- <uni-data-checkbox v-model="assignType" :localdata="assignTypeVisit" style="margin-bottom: 20px;" v-show="auditPlaceholder === 'show'"/> -->
  14. <uni-data-select v-model="Maintenancer" :localdata="maintenancerDate" @change="maintenancerChange" v-show="auditPlaceholder === 'show' || auditPlaceholder === 'show_users'"/>
  15. <uni-easyinput type="textarea" autoHeight maxlength="100" v-model="cbreason" :placeholder="auditPlaceholder" v-show="!(auditPlaceholder === 'show' || auditPlaceholder === 'show_users')"/>
  16. </view>
  17. </uni-popup-dialog>
  18. </uni-popup>
  19. </view>
  20. <view>
  21. <uni-popup ref="toCollDialog" type="dialog">
  22. <uni-popup-dialog ref="inputClose" mode="input" :title="title" @confirm="toCollDialogConfirm">
  23. <view style="width:100%;">
  24. <!-- <uni-data-checkbox v-model="assignType" :localdata="assignTypeVisit" style="margin-bottom: 20px;" v-show="auditPlaceholder === 'show'"/> -->
  25. <uni-data-select v-model="Maintenancer" :localdata="maintenancerDate" @change="maintenancerChange" v-show="auditPlaceholder === 'show'"/>
  26. <uni-easyinput type="textarea" autoHeight maxlength="100" v-model="cbreason" :placeholder="auditPlaceholder" v-show="auditPlaceholder !== 'show'"/>
  27. </view>
  28. </uni-popup-dialog>
  29. </uni-popup>
  30. </view>
  31. <view>
  32. <uni-popup ref="selectDialog" type="dialog">
  33. <uni-popup-dialog ref="inputClose" mode="input" title="原因" @confirm="dialogSelectConfirm">
  34. <view style="width:100%;">
  35. <dictionaries-select :flag="flag" @post-select-dic="postSelectDic" style="margin-bottom: 20px;" ></dictionaries-select>
  36. <uni-datetime-picker v-if="this.flag === 'GQYY'" v-model="dateTimeValue"></uni-datetime-picker>
  37. <uni-easyinput type="textarea" autoHeight maxlength="100" v-model="cbreason" placeholder="请输入原因" v-show="value == '其他'"/>
  38. </view>
  39. </uni-popup-dialog>
  40. </uni-popup>
  41. </view>
  42. <view>
  43. <uni-popup ref="transferDialog" type="dialog">
  44. <uni-popup-dialog ref="inputClose" mode="input" title="原因" @confirm="dialogTransferConfirm">
  45. <view style="width:100%;">
  46. <dictionaries-select :flag="flag" @post-select-dic="postTransferDic" style="margin-bottom: 20px;" ></dictionaries-select>
  47. <!-- <uni-easyinput type="textarea" autoHeight maxlength="100" v-model="reason" placeholder="请输入原因"/> -->
  48. </view>
  49. </uni-popup-dialog>
  50. </uni-popup>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import dictionariesSelect from '@/pages/components/dictionariesSelect/dictionariesSelect.vue' //upload
  56. import pageData from "@/pages/myTask/repairList/addRepair/pageData.js"
  57. export default {
  58. components: {
  59. dictionariesSelect
  60. },
  61. props: {
  62. orderButtonData: {
  63. type: Array,
  64. default () {
  65. return []
  66. }
  67. },
  68. wid: {
  69. type: String,
  70. default: ''
  71. },
  72. orderType: {
  73. type: String,
  74. default: ''
  75. },
  76. typeName: {
  77. type: String,
  78. default: ''
  79. },
  80. departid: {
  81. type: String,
  82. default: ''
  83. },
  84. applicationDept: {
  85. type: String,
  86. default: ''
  87. },
  88. maintenancer: {
  89. type: String,
  90. default: ''
  91. },
  92. firstType: {
  93. type: Number,
  94. default: 0
  95. },
  96. fid:{
  97. type:String,
  98. default:''
  99. }
  100. },
  101. data() {
  102. return {
  103. transfertype:1,
  104. reason:'',
  105. flag: '',
  106. key: 0,
  107. value: '',
  108. orderT: '',
  109. orderid: '',
  110. disabledButton:false,
  111. assignType: 0,
  112. assignTypeVisit: [{
  113. text: '转同事',
  114. value: 0
  115. },{
  116. text: '转组长',
  117. value: 1
  118. }],
  119. title:'请输入内容',
  120. Maintenancer: '', //维修人
  121. maintenancerDate: [], // 人员信息
  122. workOrderButton: [], // 工单按钮权限
  123. dateTimeValue:this.$mHelper.getNowDate()+' 23:59:59',
  124. cbreason: '', //审核原因
  125. auditPlaceholder: '请输入不通过审核原因'
  126. }
  127. },
  128. onLoad(option) {
  129. console.log(this.orderType)
  130. },
  131. methods: {
  132. postSelectDic(e) {
  133. this.key = Number(e.split(',')[0])
  134. this.value = e.split(',')[1]
  135. },
  136. postTransferDic(e){
  137. this.reason = e.split(',')[1]
  138. },
  139. disTrunCollBtn() {
  140. const dept = uni.getStorageSync("deptId");
  141. console.log(dept, 'dept');
  142. pageData.getCurrentDeptUsers(dept, (res) => {
  143. res.forEach(v => {
  144. if(v.text == this.maintenancer ) {
  145. v.disable = true
  146. }
  147. })
  148. this.maintenancerDate = res
  149. })
  150. this.title = '转同事'
  151. this.auditPlaceholder = 'show_users'
  152. this.$refs.inputDialog.open()
  153. },
  154. callBtnMethods(methodName) {
  155. console.log(methodName, 'methodName')
  156. this[methodName]();
  157. },
  158. /**
  159. * 工单列表(按钮)
  160. */
  161. // 工单指派
  162. transferBtn() {
  163. uni.navigateTo({
  164. url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid+ '&orderType=' + this.orderType +'&departid='+ this.applicationDept
  165. })
  166. },
  167. // 工单撤回
  168. orderReuturnBtn() {
  169. this.title = '撤回'
  170. this.cbreason = ''
  171. this.auditPlaceholder = '请输入要撤回原因'
  172. this.$refs.inputDialog.open()
  173. },
  174. // 工单退回
  175. orderBackBtn() {
  176. this.title = '退回'
  177. this.cbreason = ''
  178. this.auditPlaceholder = '请输入要退回原因'
  179. this.$refs.inputDialog.open()
  180. },
  181. // 工单编辑
  182. editBtn() {
  183. uni.navigateTo({
  184. url: "/pages/myTask/repairList/addRepair/addRepair?wid=" + this.wid + '&editState='+1
  185. })
  186. },
  187. // 工单删除
  188. deleteBtn() {
  189. this.confirmationAPI("FaultRepair/DeleteWorkOrder", "删除", "是否要删除", "取消了删除")
  190. },
  191. debtn() {
  192. this.confirmationAPI("Scheduling/DeleteSchedulingWorkOrder", "删除", "是否要删除", "取消了删除")
  193. },
  194. /**
  195. * 我的提交(工单)(按钮)
  196. */
  197. // 自行解决
  198. selfSolveBtn() {
  199. this.title = '异常结束'
  200. this.cbreason = ''
  201. this.auditPlaceholder = '请输入异常结束原因'
  202. this.$refs.inputDialog.open()
  203. },
  204. // 评价
  205. evaluateReapirBtn() {
  206. uni.navigateTo({
  207. url: "/pages/myTask/repairList/repairDetail/evaluateDetail/evaluateDetail?wid=" + this.wid
  208. })
  209. },
  210. //返修
  211. backOrderBtn() {
  212. this.flag = 'FXYY'
  213. this.$refs.selectDialog.open()
  214. },
  215. // 撤回
  216. returnBtn() {
  217. this.title = '撤回'
  218. this.cbreason = ''
  219. this.auditPlaceholder = '请输入撤回原因'
  220. this.$refs.inputDialog.open()
  221. },
  222. // 编辑撤回
  223. returnEditBtn() {
  224. uni.navigateTo({
  225. url: "/pages/myTask/repairList/repairDetail/returnEditDetail/returnEditDetail?wid=" + this.wid + '&editState='+1
  226. })
  227. },
  228. // 咨询工单接单
  229. receivingBtn() {
  230. this.confirmationAPI("Con_WorkOrder/SureWorkOrder", "信息", "是否要接单", "取消了接单")
  231. },
  232. // 咨询退回
  233. zxBackBtn() {
  234. this.flag = 'TDYY'
  235. this.orderT = 'zx'
  236. this.$refs.selectDialog.open()
  237. },
  238. //咨询处理
  239. zxDealBtn() {
  240. uni.navigateTo({
  241. url: "/pages/myTask/consultList/consultDetail/appointmentDeal/appointmentDeal?wid=" + this.wid
  242. })
  243. },
  244. //咨询编辑
  245. zxEditBtn() {
  246. uni.navigateTo({
  247. url: "/pages/myTask/consultList/consultDetail/editDetail/editDetail?wid=" + this.wid
  248. })
  249. },
  250. // 确认耗材
  251. readyBtn() {
  252. uni.navigateTo({
  253. url: "/pages/myTask/repairList/repairDetail/consumablesDeail/consumablesDeail?wid=" + this.wid
  254. })
  255. },
  256. /**
  257. * 报修列表(按钮)
  258. */
  259. // 1接单
  260. checkBtn() {
  261. this.confirmationAPI("FaultRepair/checkWorkOrder", "接单", "是否要接单", "取消了接单")
  262. },
  263. // 2退回
  264. sendBackBtn() {
  265. this.flag = 'TDYY'
  266. this.orderT = 'bx'
  267. this.$refs.selectDialog.open()
  268. },
  269. // 4 协作
  270. cooperationBtn() {
  271. uni.navigateTo({
  272. url: "/pages/myTask/repairList/repairDetail/cooperationDetail/cooperationDetail?wid=" + this.wid
  273. + '&orderType=' + this.orderType + '&departid='+this.departid + '&maintenancer=' + this.maintenancer,
  274. })
  275. },
  276. // 转同事
  277. trunColleagueBtn() {
  278. pageData.getApplicant(this.departid, (res) => {
  279. res.forEach(v => {
  280. if(v.text == this.maintenancer ) {
  281. v.disable = true
  282. }
  283. })
  284. this.maintenancerDate = res
  285. })
  286. this.title = '转派工单'
  287. this.cbreason = '1'
  288. this.auditPlaceholder = 'show'
  289. this.$refs.inputDialog.open()
  290. },
  291. // 延期
  292. replayBtn() {
  293. uni.navigateTo({
  294. url: "/pages/myTask/repairList/repairDetail/replayDetail/replayDetail?wid=" + this.wid + '&orderType=' + this.orderType + '&firstType='+this.firstType
  295. })
  296. },
  297. maintenancerChange(e) {
  298. this.Maintenancer = e
  299. },
  300. // 完成
  301. finishBtn() {
  302. uni.navigateTo({
  303. url: "/pages/myTask/repairList/repairDetail/finishDetail/finishDetail?wid=" + this.wid + '&showBeforePic=' + (this.typeName.indexOf('基建') >=0 ? 1 : 0)
  304. })
  305. },
  306. // 挂起
  307. hangBtn() {
  308. this.flag = 'GQYY'
  309. this.$refs.selectDialog.open()
  310. },
  311. // 到达
  312. arriveBtn() {
  313. this.confirmationAPI("FaultRepair/Arrive", "信息", "是否要到达", "取消了到达")
  314. },
  315. // 转值班
  316. trunWorkBtn() {
  317. // this.confirmationAPI("FaultRepair/Transfer", "转值班", "是否要转值班", "已经取消")
  318. this.flag = 'ZUZHANG'
  319. this.transfertype = 2
  320. this.$refs.transferDialog.open()
  321. },
  322. // 内协作
  323. inWorkBtn() {
  324. uni.navigateTo({
  325. url: "/pages/myTask/repairList/repairDetail/cooperationDetail/cooperationDetail?wid=" + this.wid
  326. + '&orderType=' + this.orderType + '&departid='+this.departid + '&maintenancer=' + this.maintenancer+ '&state=' + 'in',
  327. })
  328. },
  329. // 外协作
  330. outWorkBtn() {
  331. uni.navigateTo({
  332. url: "/pages/myTask/repairList/repairDetail/cooperationDetail/cooperationDetail?wid=" + this.wid
  333. + '&orderType=' + this.orderType + '&departid='+this.departid + '&maintenancer=' + this.maintenancer+ '&state=' + 'out',
  334. })
  335. },
  336. // 转部门
  337. trunDepartBtn() {
  338. uni.navigateTo({
  339. url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid + '&state='+ 'trunWork'
  340. })
  341. },
  342. // 转组长
  343. groupLeaderBtn() {
  344. // this.confirmationAPI("FaultRepair/Transfer", "转组长", "是否要转组长", "已经取消")
  345. this.flag = 'ZUZHANG'
  346. this.transfertype = 1
  347. this.$refs.transferDialog.open()
  348. },
  349. /**
  350. * 综合调度(按钮)
  351. */
  352. // 撤回
  353. dispatchReturnBtn() {
  354. this.confirmationAPI("Scheduling/MyRetract", "信息", "是否要撤回", "取消了撤回")
  355. },
  356. // 接单
  357. dispatchReceivingBtn() {
  358. this.confirmationAPI("Scheduling/CheckWorkOrder", "信息", "是否要接单", "取消了接单")
  359. },
  360. // 送达
  361. dispatchArriveBtn() {
  362. uni.navigateTo({
  363. url: "/pages/myTask/comDispatch/comDispatchDetail/dealDetail/dealDetail?wid=" + this.wid + '&state='+ 1
  364. })
  365. },
  366. // 收取
  367. collectSpecimensBtn() {
  368. uni.navigateTo({
  369. url: "/pages/myTask/comDispatch/comDispatchDetail/dealDetail/dealDetail?wid=" + this.wid + '&state='+ 2
  370. })
  371. },
  372. // 退回
  373. dispatchBackBtn() {
  374. this.flag = 'TDYY'
  375. this.orderT = 'zh'
  376. this.$refs.selectDialog.open()
  377. },
  378. // 评价
  379. dispatchEvaluateBtn() {
  380. uni.navigateTo({
  381. url: "/pages/myTask/repairList/repairDetail/evaluateDetail/evaluateDetail?wid=" + this.wid + '&state='+ 1
  382. })
  383. },
  384. // 编辑
  385. dispatchEditBtn() {
  386. uni.navigateTo({
  387. url: "/pages/myTask/comDispatch/addComDispatch/addComDispatch?wid=" + this.wid
  388. })
  389. },
  390. disTrunBtn() {
  391. uni.navigateTo({
  392. url: "/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail?wid=" + this.wid+"&zhdd=1"+ '&orderType=' + this.orderType +'&departid='+ this.applicationDept
  393. })
  394. },
  395. // 车辆调度 ( 按钮开始 )
  396. // 编辑
  397. editVehBtn() {
  398. uni.navigateTo({
  399. url: "/pages/myTask/vehicleSchedulList/applicantsList/addVehicle/addVehicle?wid=" + this.wid + '&editState='+1
  400. })
  401. },
  402. // 撤回
  403. revocationBtn(){
  404. this.confirmationAPI("T_Car_WorkOrder/WithdrawWorkOrder", "信息", "是否撤回", "取消了撤回")
  405. },
  406. // 评价
  407. evaluateBtn(){
  408. uni.navigateTo({
  409. url: "/pages/myTask/vehicleSchedulList/components/vehiccleDetail/evaluateDetail/evaluateDetail?wid=" + this.wid
  410. })
  411. },
  412. // 接单
  413. takeOrderVeh(){
  414. this.confirmationAPI("T_Car_WorkOrder/SureWorkOrder", "信息", "是否接单", "取消了接单")
  415. },
  416. // 退回
  417. sendBackVeh(){
  418. this.flag = 'TDYY'
  419. this.orderT = 'cl'
  420. this.$refs.selectDialog.open()
  421. },
  422. // 抵达发车点
  423. departBtn(){
  424. this.confirmationAPI("T_Car_WorkOrder/StartCar", "信息", "是否抵达发车点", "取消了")
  425. },
  426. // 抵达目的地
  427. destinationBtn(){
  428. this.confirmationAPI("T_Car_WorkOrder/EndCar", "信息", "是否抵达目的地", "取消了")
  429. },
  430. // 撤回完成按钮
  431. // 业务咨询
  432. finishYWBtn() {
  433. this.$mHelper.getOrderId('1000', (id) => {
  434. this.title = '完成'
  435. this.cbreason = ''
  436. this.orderid = id
  437. this.auditPlaceholder = '请输入完成原因'
  438. this.$refs.inputDialog.open()
  439. })
  440. },
  441. // 综合调度
  442. finishZHBtn() {
  443. this.$mHelper.getOrderId('2000', (id) => {
  444. this.title = '完成'
  445. this.cbreason = ''
  446. this.orderid = id
  447. this.auditPlaceholder = '请输入完成原因'
  448. this.$refs.inputDialog.open()
  449. })
  450. },
  451. // 故障报修
  452. finishBXBtn() {
  453. this.$mHelper.getOrderId('3000', (id) => {
  454. this.title = '完成'
  455. this.cbreason = ''
  456. this.orderid = id
  457. this.auditPlaceholder = '请输入完成原因'
  458. this.$refs.inputDialog.open()
  459. })
  460. },
  461. // 车辆调度
  462. finishCLBtn() {
  463. this.$mHelper.getOrderId('4000', (id) => {
  464. this.title = '完成'
  465. this.cbreason = ''
  466. this.orderid = id
  467. this.auditPlaceholder = '请输入完成原因'
  468. this.$refs.inputDialog.open()
  469. })
  470. },
  471. // 催办调度中心
  472. urgeMyBtn() {
  473. this.cbreason = ''
  474. this.auditPlaceholder = '请输入催办原因'
  475. this.$refs.inputDialog.open()
  476. },
  477. // 催办申请人
  478. urgeOLBtn() {
  479. this.cbreason = ''
  480. this.auditPlaceholder = '请输入要催办原因'
  481. this.$refs.inputDialog.open()
  482. },
  483. //转组长
  484. dialogTransferConfirm(){
  485. const params = {
  486. workordercode: this.wid,
  487. toUserCode: '',
  488. type:this.transfertype,
  489. reason: this.reason
  490. }
  491. this.workOrderContent("FaultRepair/Transfer",params)
  492. },
  493. // 原因下拉框
  494. dialogSelectConfirm() {
  495. uni.showLoading({
  496. title: '加载中'
  497. })
  498. if(!this.key) {
  499. this.$mHelper.toast('请选择操作原因');
  500. return
  501. }
  502. if(this.value == '其他' && !this.cbreason){
  503. this.$mHelper.toast('请输入其他原因');
  504. return
  505. }
  506. if (this.flag === 'FXYY') {
  507. const addParams = {key: this.key,WorkOrderCode: this.wid, value: this.value,ReturnReason: this.cbreason}
  508. this.workOrderContent("FaultRepair/ReturnWorkOrder",addParams)
  509. }else if (this.flag === 'GQYY') {
  510. const addParams = {key: this.key,workordercode: this.wid, value: this.value,expectfinishtime:this.dateTimeValue, reason: this.cbreason}
  511. this.workOrderContent("FaultRepair/HangUp",addParams)
  512. }else if (this.flag === 'TDYY') {
  513. if(this.orderT == 'zx') {
  514. const addParams = {key: this.key,WorkOrderCode: this.wid, value: this.value,reason: this.cbreason}
  515. this.workOrderContent("Con_WorkOrder/BackWorkOrder",addParams)
  516. }else if(this.orderT == 'bx') {
  517. const addParams = {key: this.key,WorkOrderCode: this.wid, value: this.value,BackReason: this.cbreason}
  518. this.workOrderContent("FaultRepair/BackWorkOrder",addParams)
  519. }else if(this.orderT == 'zh') {
  520. const addParams = {key: this.key,WorkOrderCode: this.wid, value: this.value,BackReason: this.cbreason}
  521. this.workOrderContent("Scheduling/BackWorkOrder",addParams)
  522. }else{
  523. const addParams = {key: this.key,orderid: this.fid, value: this.value,reason: this.cbreason}
  524. this.workOrderContent("T_Car_WorkOrder/BackWorkOrder",addParams)
  525. }
  526. }
  527. this.cbreason = ''
  528. this.$refs.selectDialog.close()
  529. },
  530. // 车辆调度 ( 按钮结束 )
  531. // 审核通过确认框
  532. dialogInputConfirm() {
  533. uni.showLoading({
  534. title: '加载中'
  535. })
  536. // 关闭窗口后,恢复默认内容
  537. if (this.auditPlaceholder !== 'show_users' && !this.cbreason) {
  538. this.$mHelper.toast(this.auditPlaceholder)
  539. return
  540. }
  541. if(this.auditPlaceholder === 'show_users') {
  542. console.log(this.Maintenancer, 'this.Maintenancer')
  543. if(!this.Maintenancer) {
  544. this.$mHelper.toast('请选择同事');
  545. return
  546. }
  547. const addParams = {ToUserCode: this.Maintenancer,WorkOrderCode: this.wid}
  548. this.workOrderContent("Scheduling/DealManTransfer",addParams)
  549. } else if(this.auditPlaceholder === 'show') {
  550. if(!this.Maintenancer) {
  551. this.$mHelper.toast('请选择指派人');
  552. return
  553. }
  554. const addParams = {ToUserCode: this.Maintenancer,WorkOrderCode: this.wid,type: this.assignType}
  555. this.workOrderContent("FaultRepair/Transfer",addParams)
  556. }else if(this.auditPlaceholder === '请输入异常结束原因') {
  557. const addParams = {result: this.cbreason,WorkOrderCode: this.wid,type:1}
  558. this.workOrderContent("FaultRepair/DealWorkOrder ",addParams)
  559. }else if(this.auditPlaceholder === '请输入要退回原因') {
  560. // 调度中心
  561. const addParams = {BackReason: this.cbreason,WorkOrderCode: this.wid}
  562. this.workOrderContent("FaultRepair/ReBack",addParams)
  563. }else if(this.auditPlaceholder === '请输入要撤回原因') {
  564. // 调度中心
  565. const addParams = {BackReason: this.cbreason,workordercode: this.wid}
  566. this.workOrderContent("FaultRepair/Retract",addParams)
  567. }
  568. else if(this.auditPlaceholder === '请输入撤回原因') {
  569. // 申请人
  570. const addParams = {BackReason: this.cbreason,workordercode: this.wid}
  571. this.workOrderContent("FaultRepair/MyRetract",addParams)
  572. }
  573. else if(this.auditPlaceholder === '请输入催办原因') {
  574. // 调度中心
  575. const addParams = {reason: this.cbreason,workordercode: this.wid,urgetype:2}
  576. this.workOrderContent("WorkCommon/UrgeWorkOrder",addParams)
  577. }
  578. else if(this.auditPlaceholder === '请输入要催办原因') {
  579. // 申请人
  580. const addParams = {reason: this.cbreason,workordercode: this.wid,urgetype:1}
  581. this.workOrderContent("WorkCommon/UrgeWorkOrder",addParams)
  582. }
  583. else if(this.auditPlaceholder === '请输入完成原因') {
  584. const addParams = {reason: this.cbreason,workordercode: this.wid,type:this.orderid}
  585. this.workOrderContent("WorkCommon/FinishWorkOrder",addParams)
  586. }
  587. this.$refs.inputDialog.close()
  588. },
  589. // 确认框方法,带输入框
  590. workOrderContent(url,addParams) {
  591. this.disabledButton = true
  592. this.$mHelper.httpPost(url,addParams,1 ,res=>this.disabledButton=res)
  593. uni.hideLoading()
  594. },
  595. //确认框方法
  596. confirmationAPI(url, title, content, canceContent) {
  597. this.disabledButton = true
  598. uni.showModal({
  599. title: title,
  600. content: content,
  601. success: (res) => {
  602. if (res.confirm) {
  603. const params = {}
  604. if(content == '是否要接单' || content == '是否要退回') {
  605. params.WorkOrderCode = this.wid
  606. }else if (content === '是否撤回' || content === '是否接单' || content === '是否退回' ){
  607. params.orderid = this.fid
  608. }else if(content === '是否抵达发车点' || content === '是否抵达目的地'){
  609. params.orderid = this.fid
  610. params.WorkOrderCode = this.wid
  611. }else if(content === '是否要转值班' ){
  612. params.workordercode = this.wid
  613. params.type = 2
  614. params.toUserCode = ''
  615. }else if(content === '是否要转组长' ){
  616. params.workordercode = this.wid
  617. params.type = 1
  618. params.toUserCode = ''
  619. } else{
  620. params.workordercode = this.wid
  621. }
  622. this.$mHelper.httpPost(url,params,1,res=>this.disabledButton=res)
  623. } else if (res.cancel) {
  624. this.disabledButton = false
  625. this.$mHelper.toast(canceContent);
  626. }
  627. }
  628. })
  629. },
  630. }
  631. }
  632. </script>
  633. <style lang="scss">
  634. @import '@/common/addFormDeep.scss';
  635. .mini-btn {
  636. margin-right: 3px;
  637. color: #fff;
  638. background: #1e90ff;
  639. font-size: 1rem !important;
  640. }
  641. </style>