transferConnect.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. <template>
  2. <view class="HomeItem">
  3. <view class="goWorkAll">
  4. <view class="title">{{optData.deptName}}-{{optData.handoverType.name}}</view>
  5. <view class="goWorkSelect history">
  6. <view class="goWorkSelect-head">总数量:{{optData.totalNum}}</view>
  7. <view class="goWorkSelect-list" v-for="(item, i) in optData.data">
  8. {{item.deptName}}
  9. </view>
  10. </view>
  11. </view>
  12. <view class="foot_btn_spe">
  13. <view class="btn1" @click="submit()">{{optData.handoverType.value==1 ? '确认中转' : '确认交接'}}</view>
  14. <view class="btn3" @click="goBack">取消</view>
  15. </view>
  16. <!-- 填写交接人工号弹窗 -->
  17. <selectAccount v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  18. @cancel="hosCancel">
  19. </selectAccount>
  20. <!-- 中转 -->
  21. <uni-popup ref="alertDialog" type="dialog" :mask-click="false">
  22. <uni-popup-dialog type="warn" message="提示" cancelText="取消" confirmText="确定" title="通知" content="您确认中转吗?" @confirm="dialogConfirm"
  23. @close="dialogClose"></uni-popup-dialog>
  24. </uni-popup>
  25. </view>
  26. </template>
  27. <script>
  28. import * as commonFun from '../../tools/commonFun.js';
  29. import {
  30. pathUrl
  31. } from "../../tools/photograph.js";
  32. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  33. import {
  34. get,
  35. post,
  36. webHandle
  37. } from "../../http/http.js";
  38. export default {
  39. components: {
  40. selectAccount,
  41. },
  42. data() {
  43. return {
  44. list:[],
  45. optData:null,
  46. tips: '',
  47. currentIndex: undefined,
  48. // 填写交接人工号弹窗model
  49. hosModels: {
  50. disjunctor: false,
  51. },
  52. currentCode: '', //当前拍照使用的科室二维码
  53. currentData: {}, //当前小扫描的工单对象
  54. orderId: undefined,
  55. order: {},
  56. digitalNum:null,
  57. // 数字交接
  58. digitalHandoverSwitch: false,
  59. // 拍照动作开关
  60. actionPhotoSwitch: false,
  61. // 确认动作开关
  62. actionConfirmSwitch: false,
  63. // 确认动作模式开关
  64. actionConfirmType: false,
  65. // 参数
  66. options: {},
  67. //动作列表
  68. actions: [],
  69. //图片列表
  70. imageValue: [],
  71. };
  72. },
  73. methods: {
  74. // 其他临床服务-运输过程-终点科室是否开通备注填写
  75. isOpenTransportationProcessRemarks(data, accountObj, funName){
  76. const tasktype = data.taskType;
  77. console.log(tasktype, data);
  78. if(tasktype.associationType.value === 'other' && tasktype.carryingCourses[this.currentIndex].logSwitch && data.gdState.value == 5){
  79. uni.navigateTo({
  80. url: `../../pages/transportationProcessRemarks/transportationProcessRemarks?data=${data ? encodeURIComponent(JSON.stringify(data)) : ''}&accountObj=${accountObj ? encodeURIComponent(JSON.stringify(accountObj)) : ''}&currentCode=${this.currentCode}&funName=${funName}&actions=${this.actions ? encodeURIComponent(JSON.stringify(this.actions)) : ''}&imageValue=${this.imageValue ? encodeURIComponent(JSON.stringify(this.imageValue)) : ''}`
  81. })
  82. }else{
  83. commonFun[funName](this, data, accountObj);
  84. }
  85. },
  86. // 填写交接人工号-确认
  87. hosOk(data) {
  88. console.log(data);
  89. const {
  90. accountName,
  91. account,
  92. accountId
  93. } = data;
  94. if (!accountName && !account) {
  95. //没有填写交接人
  96. uni.showModal({
  97. title: '提示',
  98. content: "请填写交接人工号!",
  99. showCancel: false,
  100. success: function(res) {
  101. if (res.confirm) {
  102. console.log('用户点击确定');
  103. } else if (res.cancel) {
  104. console.log('用户点击取消');
  105. }
  106. }
  107. });
  108. return;
  109. } else if (!accountName && account || accountName && !account) {
  110. //没有填写交接人
  111. uni.showModal({
  112. title: '提示',
  113. content: "请填写正确的交接人工号!",
  114. showCancel: false,
  115. success: function(res) {
  116. if (res.confirm) {
  117. console.log('用户点击确定');
  118. } else if (res.cancel) {
  119. console.log('用户点击取消');
  120. }
  121. }
  122. });
  123. return;
  124. }
  125. uni.showLoading({
  126. title: "加载中",
  127. mask: true,
  128. });
  129. let postData = {
  130. ids: this.optData.orderIds,
  131. handoverTypeValue: this.optData.handoverType.value,
  132. deptId: this.optData.deptId,
  133. handoverUserId: accountId
  134. }
  135. this.hosModels.disjunctor = false;
  136. post("/business/confirmHandover", postData).then((res) => {
  137. uni.hideLoading();
  138. if(res.status == 200){
  139. uni.showToast({
  140. icon: "none",
  141. title: "操作成功",
  142. });
  143. setTimeout(_=>{
  144. uni.redirectTo({
  145. url:'/pages/receiptpage/receiptpage'
  146. })
  147. },1000)
  148. } else {
  149. uni.showToast({
  150. icon: "none",
  151. title: res.info || "接口获取数据失败!",
  152. });
  153. }
  154. });
  155. },
  156. // 填写交接人工号-取消
  157. hosCancel() {
  158. this.hosModels.disjunctor = false;
  159. },
  160. // 填写交接人工号弹窗
  161. showSelectAccount() {
  162. this.hosModels = {
  163. disjunctor: true,
  164. }
  165. },
  166. // 确定中转
  167. submit(){
  168. // 1:中转 2:终点
  169. if(this.optData.handoverType.value==1){
  170. this.$refs.alertDialog.open()
  171. }else{
  172. if(this.optData.taskType.carryingCourses[1].handoverSwitch){
  173. this.showSelectAccount();
  174. }else{
  175. this.$refs.alertDialog.open()
  176. }
  177. }
  178. },
  179. // 确定中转
  180. dialogConfirm(){
  181. uni.showLoading({
  182. title: "加载中",
  183. mask: true,
  184. });
  185. let url = null
  186. let postData = {
  187. ids: this.optData.orderIds,
  188. handoverTypeValue: this.optData.handoverType.value,
  189. deptId: this.optData.deptId
  190. }
  191. if(this.optData.handoverType.value==1){
  192. url = post("/business/confirmHandover", postData)
  193. }else{
  194. url = post("/business/confirmHandover", postData)
  195. }
  196. url.then((res) => {
  197. if(res.status == 200){
  198. uni.hideLoading();
  199. this.$refs.alertDialog.close()
  200. uni.showToast({
  201. icon: "none",
  202. title: "操作成功",
  203. });
  204. setTimeout(_=>{
  205. uni.redirectTo({
  206. url:'/pages/receiptpage/receiptpage'
  207. })
  208. },1000)
  209. } else {
  210. uni.showToast({
  211. icon: "none",
  212. title: res.info || "接口获取数据失败!",
  213. });
  214. }
  215. });
  216. },
  217. // 取消
  218. dialogClose(){
  219. this.$refs.alertDialog.close()
  220. },
  221. // 返回
  222. goBack() {
  223. uni.navigateBack();
  224. },
  225. // 选择动作
  226. checkboxChange: function (e) {
  227. let items = this.actions;
  228. let values = [];
  229. if(this.actionConfirmType == 1 || this.actionConfirmType == 2){
  230. values = e.detail.value || [];
  231. }else if(this.actionConfirmType == 3){
  232. values = [e.detail.value];
  233. }
  234. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  235. const item = items[i]
  236. if(values.includes(item.value)){
  237. this.$set(item,'checked',true)
  238. }else{
  239. this.$set(item,'checked',false)
  240. }
  241. }
  242. },
  243. // 获取上传状态
  244. selectFile(e) {
  245. console.log('选择文件:', e)
  246. this.imageValue = this.imageValue.concat(e.tempFiles);
  247. },
  248. // 移除
  249. deleteFile(e) {
  250. console.log('移除:', e);
  251. },
  252. },
  253. onLoad(options) {
  254. this.options = options;
  255. if(options.data){
  256. this.optData = JSON.parse(options.data);
  257. console.log(this.optData);
  258. }
  259. },
  260. };
  261. </script>
  262. <style lang="less" scoped>
  263. .HomeItem {
  264. .foot_btn_spe {
  265. width: 100%;
  266. position: fixed;
  267. bottom: 30rpx;
  268. left: 0;
  269. line-height: 88rpx;
  270. height: 88rpx;
  271. text-align: center;
  272. display: flex;
  273. justify-content: space-between;
  274. flex-wrap: wrap;
  275. &::after {
  276. content: '';
  277. flex: 1;
  278. }
  279. view {
  280. height: 88rpx;
  281. width: 48%;
  282. margin: 0 1%;
  283. background-image: linear-gradient(to right, #72c172, #3bb197);
  284. color: #fff;
  285. border-radius: 8rpx;
  286. font-size: 32rpx;
  287. margin-top: 16rpx;
  288. }
  289. }
  290. .login {
  291. height: 420rpx;
  292. padding: 0 32rpx;
  293. padding-top: 164rpx;
  294. position: relative;
  295. z-index: 999;
  296. .savePassword {
  297. margin-top: 32rpx;
  298. }
  299. /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  300. border-color: #42b983 !important;
  301. }
  302. .login_input {
  303. margin-top: 32rpx;
  304. background-color: #ffffff;
  305. height: 72rpx;
  306. box-sizing: border-box;
  307. padding: 16rpx;
  308. }
  309. .title {
  310. font-size: 36rpx;
  311. color: #42b983;
  312. text-align: center;
  313. }
  314. .tips {
  315. font-size: 28rpx;
  316. color: red;
  317. margin-top: 16rpx;
  318. }
  319. .page_item_btn {
  320. height: 88rpx;
  321. background-image: linear-gradient(to right, #72c172, #3bb197);
  322. border-radius: 8rpx;
  323. line-height: 88rpx;
  324. color: #fff;
  325. font-size: 36rpx;
  326. font-weight: 700;
  327. margin-top: 64rpx;
  328. text-align: center;
  329. }
  330. }
  331. //上班页面
  332. .goWorkAll {
  333. overflow-y: auto;
  334. display: flex;
  335. flex-direction: column;
  336. justify-content: space-between;
  337. /deep/ .uni-radio-input-checked {
  338. background-color: #42b983 !important;
  339. border-color: #42b983 !important;
  340. }
  341. /deep/ .uni-checkbox-input-checked {
  342. color: #42b983 !important;
  343. }
  344. .title{
  345. text-align: center;
  346. color: #64BD7B;
  347. line-height: 80rpx;
  348. border-bottom: 1rpx solid #E5E5E5;
  349. }
  350. .goWorkSelect {
  351. &.history {
  352. height: 356rpx;
  353. padding-bottom: 16rpx;
  354. }
  355. &.combination {
  356. .goWorkSelect-head {}
  357. .goWorkSelect-list {}
  358. }
  359. .goWorkSelect-head {
  360. font-size: 28rpx;
  361. line-height: 80rpx;
  362. border-bottom: 2rpx solid #E5E5E5;
  363. text-align: center;
  364. }
  365. .goWorkSelect-list {
  366. padding: 16rpx;
  367. .input-num {
  368. height: 60rpx;
  369. border: 2rpx solid #E5E5E5;
  370. border-radius: 5rpx;
  371. // width: 100%;
  372. padding-left: 10rpx;
  373. // padding-right: 10rpx;
  374. }
  375. .goWorkSelect-item {
  376. height: 52rpx;
  377. display: flex;
  378. align-items: center;
  379. border-bottom: 2rpx solid #e5e9ed;
  380. padding: 16rpx;
  381. &.relative {
  382. position: relative;
  383. .picker {
  384. position: absolute;
  385. width: 100%;
  386. padding-left: 64rpx;
  387. }
  388. }
  389. button {
  390. font-size: 32rpx;
  391. height: 52rpx;
  392. line-height: 52rpx;
  393. margin: 0;
  394. margin-left: 16rpx;
  395. color: rgb(7, 134, 60);
  396. font-weight: 700;
  397. }
  398. }
  399. }
  400. }
  401. }
  402. .goWork {
  403. margin: 0 auto 48rpx;
  404. width: 240rpx;
  405. height: 240rpx;
  406. .goWork_btn_E {
  407. width: 100%;
  408. height: 100%;
  409. background: #bee1a7;
  410. border-radius: 30%;
  411. .goWork_btn_W {
  412. width: 75%;
  413. height: 75%;
  414. background-image: linear-gradient(to right, #72c172, #3bb197);
  415. border-radius: 30%;
  416. margin: 0 auto;
  417. position: relative;
  418. top: 12.5%;
  419. line-height: 180rpx;
  420. color: #fff;
  421. font-size: 36rpx;
  422. text-align: center;
  423. }
  424. }
  425. }
  426. .goWork_text {
  427. width: 100%;
  428. view {
  429. text-align: center;
  430. }
  431. .goWork_text-p {
  432. font-size: 36rpx;
  433. margin-bottom: 48rpx;
  434. }
  435. }
  436. .botImg {
  437. height: 600rpx;
  438. width: 100%;
  439. position: fixed;
  440. bottom: 0;
  441. .img {
  442. height: 100%;
  443. background: url("../../static/img/BG.png") no-repeat center center;
  444. background-size: 100% 100%;
  445. }
  446. }
  447. }
  448. </style>