transferConnect.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  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}}: {{item.num}}
  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="info" 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 scoped>
  263. /deep/ .uni-button-color{
  264. color: #64BD7B;
  265. }
  266. </style>
  267. <style lang="less" scoped>
  268. .HomeItem {
  269. .foot_btn_spe {
  270. width: 100%;
  271. position: fixed;
  272. bottom: 30rpx;
  273. left: 0;
  274. line-height: 88rpx;
  275. height: 88rpx;
  276. text-align: center;
  277. display: flex;
  278. justify-content: space-between;
  279. flex-wrap: wrap;
  280. &::after {
  281. content: '';
  282. flex: 1;
  283. }
  284. view {
  285. height: 88rpx;
  286. width: 48%;
  287. margin: 0 1%;
  288. background-image: linear-gradient(to right, #72c172, #3bb197);
  289. color: #fff;
  290. border-radius: 8rpx;
  291. font-size: 32rpx;
  292. margin-top: 16rpx;
  293. }
  294. }
  295. .login {
  296. height: 420rpx;
  297. padding: 0 32rpx;
  298. padding-top: 164rpx;
  299. position: relative;
  300. z-index: 999;
  301. .savePassword {
  302. margin-top: 32rpx;
  303. }
  304. /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  305. border-color: #42b983 !important;
  306. }
  307. .login_input {
  308. margin-top: 32rpx;
  309. background-color: #ffffff;
  310. height: 72rpx;
  311. box-sizing: border-box;
  312. padding: 16rpx;
  313. }
  314. .title {
  315. font-size: 36rpx;
  316. color: #42b983;
  317. text-align: center;
  318. }
  319. .tips {
  320. font-size: 28rpx;
  321. color: red;
  322. margin-top: 16rpx;
  323. }
  324. .page_item_btn {
  325. height: 88rpx;
  326. background-image: linear-gradient(to right, #72c172, #3bb197);
  327. border-radius: 8rpx;
  328. line-height: 88rpx;
  329. color: #fff;
  330. font-size: 36rpx;
  331. font-weight: 700;
  332. margin-top: 64rpx;
  333. text-align: center;
  334. }
  335. }
  336. //上班页面
  337. .goWorkAll {
  338. overflow-y: auto;
  339. display: flex;
  340. flex-direction: column;
  341. justify-content: space-between;
  342. /deep/ .uni-radio-input-checked {
  343. background-color: #42b983 !important;
  344. border-color: #42b983 !important;
  345. }
  346. /deep/ .uni-checkbox-input-checked {
  347. color: #42b983 !important;
  348. }
  349. .title{
  350. text-align: center;
  351. color: #64BD7B;
  352. line-height: 80rpx;
  353. border-bottom: 1rpx solid #E5E5E5;
  354. position: absolute;
  355. top: 0;
  356. width: 100%;
  357. height: 80rpx;
  358. background: #fff;
  359. }
  360. .goWorkSelect {
  361. &.history {
  362. height: 81vh;
  363. overflow-y: auto;
  364. margin-top: 80rpx;
  365. padding-bottom: 16rpx;
  366. }
  367. &.combination {
  368. .goWorkSelect-head {}
  369. .goWorkSelect-list {}
  370. }
  371. .goWorkSelect-head {
  372. font-size: 28rpx;
  373. line-height: 80rpx;
  374. border-bottom: 2rpx solid #E5E5E5;
  375. text-align: center;
  376. }
  377. .goWorkSelect-list {
  378. padding: 16rpx;
  379. .input-num {
  380. height: 60rpx;
  381. border: 2rpx solid #E5E5E5;
  382. border-radius: 5rpx;
  383. // width: 100%;
  384. padding-left: 10rpx;
  385. // padding-right: 10rpx;
  386. }
  387. .goWorkSelect-item {
  388. height: 52rpx;
  389. display: flex;
  390. align-items: center;
  391. border-bottom: 2rpx solid #e5e9ed;
  392. padding: 16rpx;
  393. &.relative {
  394. position: relative;
  395. .picker {
  396. position: absolute;
  397. width: 100%;
  398. padding-left: 64rpx;
  399. }
  400. }
  401. button {
  402. font-size: 32rpx;
  403. height: 52rpx;
  404. line-height: 52rpx;
  405. margin: 0;
  406. margin-left: 16rpx;
  407. color: rgb(7, 134, 60);
  408. font-weight: 700;
  409. }
  410. }
  411. }
  412. }
  413. }
  414. .goWork {
  415. margin: 0 auto 48rpx;
  416. width: 240rpx;
  417. height: 240rpx;
  418. .goWork_btn_E {
  419. width: 100%;
  420. height: 100%;
  421. background: #bee1a7;
  422. border-radius: 30%;
  423. .goWork_btn_W {
  424. width: 75%;
  425. height: 75%;
  426. background-image: linear-gradient(to right, #72c172, #3bb197);
  427. border-radius: 30%;
  428. margin: 0 auto;
  429. position: relative;
  430. top: 12.5%;
  431. line-height: 180rpx;
  432. color: #fff;
  433. font-size: 36rpx;
  434. text-align: center;
  435. }
  436. }
  437. }
  438. .goWork_text {
  439. width: 100%;
  440. view {
  441. text-align: center;
  442. }
  443. .goWork_text-p {
  444. font-size: 36rpx;
  445. margin-bottom: 48rpx;
  446. }
  447. }
  448. .botImg {
  449. height: 600rpx;
  450. width: 100%;
  451. position: fixed;
  452. bottom: 0;
  453. .img {
  454. height: 100%;
  455. background: url("../../static/img/BG.png") no-repeat center center;
  456. background-size: 100% 100%;
  457. }
  458. }
  459. }
  460. </style>