transferDistribution.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <view class="HomeItem">
  3. <view class="goWorkAll">
  4. <view class="title">{{optData.quickOrderName}}-发起中转配送</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" v-if="optData.totalNum>0">
  13. <view class="btn1" @click="submit()">确认建单</view>
  14. <view class="btn3" @click="goBack">取消</view>
  15. </view>
  16. <view class="foot_btn_spe" v-else>
  17. <view class="btn2" @click="goBack">返回</view>
  18. </view>
  19. <!-- 确认建单 -->
  20. <uni-popup ref="alertDialog" type="dialog" :mask-click="false">
  21. <uni-popup-dialog type="warn" message="提示" cancelText="取消" confirmText="确定" title="通知" content="您确认建单吗?" @confirm="dialogConfirm"
  22. @close="dialogClose"></uni-popup-dialog>
  23. </uni-popup>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. get,
  29. post,
  30. webHandle
  31. } from "../../http/http.js";
  32. export default {
  33. data() {
  34. return {
  35. list:[],
  36. optData:null
  37. };
  38. },
  39. methods: {
  40. // 确定中转
  41. submit(){
  42. this.$refs.alertDialog.open()
  43. },
  44. // 确定中转
  45. dialogConfirm(){
  46. uni.showLoading({
  47. title: "加载中",
  48. mask: true,
  49. });
  50. let postData = {
  51. businessIds: this.optData.businessIds,
  52. quickOrderId: this.optData.quickOrderId
  53. }
  54. post("/business/createAndSign", postData).then((res) => {
  55. uni.hideLoading();
  56. if(res.status == 200){
  57. this.$refs.alertDialog.close()
  58. uni.showToast({
  59. icon: "none",
  60. title: "操作成功",
  61. });
  62. setTimeout(_=>{
  63. uni.redirectTo({
  64. url:'/pages/receiptpage/receiptpage'
  65. })
  66. },1000)
  67. } else {
  68. uni.showToast({
  69. icon: "none",
  70. title: res.info || "接口获取数据失败!",
  71. });
  72. }
  73. });
  74. },
  75. // 取消
  76. dialogClose(){
  77. this.$refs.alertDialog.close()
  78. },
  79. // 返回
  80. goBack() {
  81. uni.navigateBack();
  82. }
  83. },
  84. onLoad(options) {
  85. this.options = options;
  86. if(options.data){
  87. this.optData = JSON.parse(options.data);
  88. console.log(this.optData);
  89. }
  90. },
  91. };
  92. </script>
  93. <style lang="less" scoped>
  94. .HomeItem {
  95. .foot_btn_spe {
  96. width: 100%;
  97. position: fixed;
  98. bottom: 30rpx;
  99. left: 0;
  100. line-height: 88rpx;
  101. height: 88rpx;
  102. text-align: center;
  103. display: flex;
  104. justify-content: space-between;
  105. flex-wrap: wrap;
  106. &::after {
  107. content: '';
  108. flex: 1;
  109. }
  110. .btn2{
  111. width: 100% !important;
  112. }
  113. view {
  114. height: 88rpx;
  115. width: 48%;
  116. margin: 0 1%;
  117. background-image: linear-gradient(to right, #72c172, #3bb197);
  118. color: #fff;
  119. border-radius: 8rpx;
  120. font-size: 32rpx;
  121. margin-top: 16rpx;
  122. }
  123. }
  124. .login {
  125. height: 420rpx;
  126. padding: 0 32rpx;
  127. padding-top: 164rpx;
  128. position: relative;
  129. z-index: 999;
  130. .savePassword {
  131. margin-top: 32rpx;
  132. }
  133. /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  134. border-color: #42b983 !important;
  135. }
  136. .login_input {
  137. margin-top: 32rpx;
  138. background-color: #ffffff;
  139. height: 72rpx;
  140. box-sizing: border-box;
  141. padding: 16rpx;
  142. }
  143. .title {
  144. font-size: 36rpx;
  145. color: #42b983;
  146. text-align: center;
  147. }
  148. .tips {
  149. font-size: 28rpx;
  150. color: red;
  151. margin-top: 16rpx;
  152. }
  153. .page_item_btn {
  154. height: 88rpx;
  155. background-image: linear-gradient(to right, #72c172, #3bb197);
  156. border-radius: 8rpx;
  157. line-height: 88rpx;
  158. color: #fff;
  159. font-size: 36rpx;
  160. font-weight: 700;
  161. margin-top: 64rpx;
  162. text-align: center;
  163. }
  164. }
  165. //上班页面
  166. .goWorkAll {
  167. overflow-y: auto;
  168. display: flex;
  169. flex-direction: column;
  170. justify-content: space-between;
  171. /deep/ .uni-radio-input-checked {
  172. background-color: #42b983 !important;
  173. border-color: #42b983 !important;
  174. }
  175. /deep/ .uni-checkbox-input-checked {
  176. color: #42b983 !important;
  177. }
  178. .title{
  179. text-align: center;
  180. color: #64BD7B;
  181. line-height: 80rpx;
  182. border-bottom: 1rpx solid #E5E5E5;
  183. }
  184. .goWorkSelect {
  185. &.history {
  186. height: 356rpx;
  187. padding-bottom: 16rpx;
  188. }
  189. &.combination {
  190. .goWorkSelect-head {}
  191. .goWorkSelect-list {}
  192. }
  193. .goWorkSelect-head {
  194. font-size: 28rpx;
  195. line-height: 80rpx;
  196. border-bottom: 2rpx solid #E5E5E5;
  197. text-align: center;
  198. }
  199. .goWorkSelect-list {
  200. padding: 16rpx;
  201. .input-num {
  202. height: 60rpx;
  203. border: 2rpx solid #E5E5E5;
  204. border-radius: 5rpx;
  205. // width: 100%;
  206. padding-left: 10rpx;
  207. // padding-right: 10rpx;
  208. }
  209. .goWorkSelect-item {
  210. height: 52rpx;
  211. display: flex;
  212. align-items: center;
  213. border-bottom: 2rpx solid #e5e9ed;
  214. padding: 16rpx;
  215. &.relative {
  216. position: relative;
  217. .picker {
  218. position: absolute;
  219. width: 100%;
  220. padding-left: 64rpx;
  221. }
  222. }
  223. button {
  224. font-size: 32rpx;
  225. height: 52rpx;
  226. line-height: 52rpx;
  227. margin: 0;
  228. margin-left: 16rpx;
  229. color: rgb(7, 134, 60);
  230. font-weight: 700;
  231. }
  232. }
  233. }
  234. }
  235. }
  236. .goWork {
  237. margin: 0 auto 48rpx;
  238. width: 240rpx;
  239. height: 240rpx;
  240. .goWork_btn_E {
  241. width: 100%;
  242. height: 100%;
  243. background: #bee1a7;
  244. border-radius: 30%;
  245. .goWork_btn_W {
  246. width: 75%;
  247. height: 75%;
  248. background-image: linear-gradient(to right, #72c172, #3bb197);
  249. border-radius: 30%;
  250. margin: 0 auto;
  251. position: relative;
  252. top: 12.5%;
  253. line-height: 180rpx;
  254. color: #fff;
  255. font-size: 36rpx;
  256. text-align: center;
  257. }
  258. }
  259. }
  260. .goWork_text {
  261. width: 100%;
  262. view {
  263. text-align: center;
  264. }
  265. .goWork_text-p {
  266. font-size: 36rpx;
  267. margin-bottom: 48rpx;
  268. }
  269. }
  270. .botImg {
  271. height: 600rpx;
  272. width: 100%;
  273. position: fixed;
  274. bottom: 0;
  275. .img {
  276. height: 100%;
  277. background: url("../../static/img/BG.png") no-repeat center center;
  278. background-size: 100% 100%;
  279. }
  280. }
  281. }
  282. </style>