sponsorTask.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <view class="HomeItem">
  3. <view class="goWorkAll">
  4. <view class="title">请选择要建单的任务类型</view>
  5. <view class="goWorkSelect history">
  6. <view class="goWorkSelect-list" v-for="(item, i) in list" @click="itemClick(item)">
  7. {{item.taskName}}
  8. </view>
  9. </view>
  10. </view>
  11. <view class="foot_btn_spe">
  12. <view class="btn3" @click="goBack">返回</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import {
  18. get,
  19. post,
  20. webHandle
  21. } from "../../http/http.js";
  22. export default {
  23. data() {
  24. return {
  25. list:[],
  26. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  27. };
  28. },
  29. methods: {
  30. // 返回
  31. goBack() {
  32. uni.navigateTo({
  33. url:'/pages/receiptpage/receiptpage'
  34. })
  35. },
  36. itemClick(item){
  37. uni.navigateTo({
  38. url:'/pages/sponsorTaskBuild/sponsorTaskBuild?data=' + JSON.stringify(item)
  39. })
  40. },
  41. getTaskType(){
  42. uni.showLoading({
  43. title: "加载中",
  44. mask: true,
  45. });
  46. let postData= {
  47. idx: 0,
  48. sum: 9999,
  49. taskType:{
  50. hosIds: this.hosId,
  51. simpleQuery: true
  52. }
  53. }
  54. post("/configuration/fetchDataList/taskType", postData).then((res) => {
  55. uni.hideLoading();
  56. if(res.status == 200){
  57. let data = res.list.filter(i=>i.deliveryUserCreate && i.deliveryUserCreate==1)
  58. this.list = data
  59. } else {
  60. uni.showToast({
  61. icon: "none",
  62. title: res.info || "接口获取数据失败!",
  63. });
  64. }
  65. });
  66. }
  67. },
  68. onLoad(options) {
  69. this.getTaskType();
  70. this.options = options;
  71. if(options.order){
  72. options.order = JSON.parse(options.order);
  73. this.order = options.order;
  74. if(this.order.gdState.value == 4){
  75. this.currentIndex = 0;
  76. this.tips = '确认到达';
  77. }else if(this.order.gdState.value == 5){
  78. this.currentIndex = 1;
  79. this.tips = '完成工单';
  80. }
  81. }
  82. if(options.orderId){
  83. this.orderId = options.orderId;
  84. }
  85. if(options.taskType){
  86. options.taskType = JSON.parse(options.taskType);
  87. this.actionConfirmSwitch = options.taskType.carryingCourses[this.currentIndex].actionConfirmSwitch;
  88. let actions = options.taskType.carryingCourses[this.currentIndex].actionRemarks || "";
  89. this.actions = actions.split('$').map((v, i) => ({
  90. value: i,
  91. name: v,
  92. }));
  93. this.digitalHandoverSwitch = options.taskType.carryingCourses[this.currentIndex].digitalHandover;
  94. this.actionPhotoSwitch = options.taskType.carryingCourses[this.currentIndex].actionPhotoSwitch;
  95. this.actionConfirmType = options.taskType.carryingCourses[this.currentIndex].actionConfirmType;
  96. }
  97. },
  98. };
  99. </script>
  100. <style lang="less" scoped>
  101. .HomeItem {
  102. .foot_btn_spe {
  103. width: 100%;
  104. position: fixed;
  105. bottom: 30rpx;
  106. left: 0;
  107. line-height: 88rpx;
  108. height: 88rpx;
  109. text-align: center;
  110. display: flex;
  111. justify-content: space-between;
  112. flex-wrap: wrap;
  113. &::after {
  114. content: '';
  115. flex: 1;
  116. }
  117. view {
  118. height: 88rpx;
  119. width: 100%;
  120. margin: 0 1%;
  121. background-image: linear-gradient(to right, #72c172, #3bb197);
  122. color: #fff;
  123. border-radius: 8rpx;
  124. font-size: 32rpx;
  125. margin-top: 16rpx;
  126. }
  127. }
  128. .login {
  129. height: 420rpx;
  130. padding: 0 32rpx;
  131. padding-top: 164rpx;
  132. position: relative;
  133. z-index: 999;
  134. .savePassword {
  135. margin-top: 32rpx;
  136. }
  137. /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  138. border-color: #42b983 !important;
  139. }
  140. .login_input {
  141. margin-top: 32rpx;
  142. background-color: #ffffff;
  143. height: 72rpx;
  144. box-sizing: border-box;
  145. padding: 16rpx;
  146. }
  147. .title {
  148. font-size: 36rpx;
  149. color: #42b983;
  150. text-align: center;
  151. }
  152. .tips {
  153. font-size: 28rpx;
  154. color: red;
  155. margin-top: 16rpx;
  156. }
  157. .page_item_btn {
  158. height: 88rpx;
  159. background-image: linear-gradient(to right, #72c172, #3bb197);
  160. border-radius: 8rpx;
  161. line-height: 88rpx;
  162. color: #fff;
  163. font-size: 36rpx;
  164. font-weight: 700;
  165. margin-top: 64rpx;
  166. text-align: center;
  167. }
  168. }
  169. //上班页面
  170. .goWorkAll {
  171. overflow-y: auto;
  172. display: flex;
  173. flex-direction: column;
  174. justify-content: space-between;
  175. /deep/ .uni-radio-input-checked {
  176. background-color: #42b983 !important;
  177. border-color: #42b983 !important;
  178. }
  179. /deep/ .uni-checkbox-input-checked {
  180. color: #42b983 !important;
  181. }
  182. .title{
  183. text-align: center;
  184. color: #64BD7B;
  185. line-height: 80rpx;
  186. border-bottom: 1rpx solid #E5E5E5;
  187. position: absolute;
  188. top: 0;
  189. width: 100%;
  190. height: 80rpx;
  191. background: #fff;
  192. }
  193. .goWorkSelect {
  194. &.history {
  195. height: 81vh;
  196. overflow-y: auto;
  197. margin-top: 80rpx;
  198. padding-bottom: 16rpx;
  199. }
  200. &.combination {
  201. .goWorkSelect-head {}
  202. .goWorkSelect-list {}
  203. }
  204. .goWorkSelect-head {
  205. font-size: 28rpx;
  206. line-height: 80rpx;
  207. border-bottom: 2rpx solid #E5E5E5;
  208. text-align: center;
  209. }
  210. .goWorkSelect-list {
  211. text-align: center;
  212. line-height: 80rpx;
  213. border-bottom: 1rpx solid #E5E5E5;
  214. .input-num {
  215. height: 60rpx;
  216. border: 2rpx solid #E5E5E5;
  217. border-radius: 5rpx;
  218. // width: 100%;
  219. padding-left: 10rpx;
  220. // padding-right: 10rpx;
  221. }
  222. .goWorkSelect-item {
  223. height: 52rpx;
  224. display: flex;
  225. align-items: center;
  226. border-bottom: 2rpx solid #e5e9ed;
  227. padding: 16rpx;
  228. &.relative {
  229. position: relative;
  230. .picker {
  231. position: absolute;
  232. width: 100%;
  233. padding-left: 64rpx;
  234. }
  235. }
  236. button {
  237. font-size: 32rpx;
  238. height: 52rpx;
  239. line-height: 52rpx;
  240. margin: 0;
  241. margin-left: 16rpx;
  242. color: rgb(7, 134, 60);
  243. font-weight: 700;
  244. }
  245. }
  246. }
  247. }
  248. }
  249. .goWork {
  250. margin: 0 auto 48rpx;
  251. width: 240rpx;
  252. height: 240rpx;
  253. .goWork_btn_E {
  254. width: 100%;
  255. height: 100%;
  256. background: #bee1a7;
  257. border-radius: 30%;
  258. .goWork_btn_W {
  259. width: 75%;
  260. height: 75%;
  261. background-image: linear-gradient(to right, #72c172, #3bb197);
  262. border-radius: 30%;
  263. margin: 0 auto;
  264. position: relative;
  265. top: 12.5%;
  266. line-height: 180rpx;
  267. color: #fff;
  268. font-size: 36rpx;
  269. text-align: center;
  270. }
  271. }
  272. }
  273. .goWork_text {
  274. width: 100%;
  275. view {
  276. text-align: center;
  277. }
  278. .goWork_text-p {
  279. font-size: 36rpx;
  280. margin-bottom: 48rpx;
  281. }
  282. }
  283. .botImg {
  284. height: 600rpx;
  285. width: 100%;
  286. position: fixed;
  287. bottom: 0;
  288. .img {
  289. height: 100%;
  290. background: url("../../static/img/BG.png") no-repeat center center;
  291. background-size: 100% 100%;
  292. }
  293. }
  294. }
  295. </style>