transferDistribution.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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}}: {{item.num}}
  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="info" 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 scoped>
  94. /deep/ .uni-button-color{
  95. color: #64BD7B;
  96. }
  97. </style>
  98. <style lang="less" scoped>
  99. .HomeItem {
  100. .foot_btn_spe {
  101. width: 100%;
  102. position: fixed;
  103. bottom: 30rpx;
  104. left: 0;
  105. line-height: 88rpx;
  106. height: 88rpx;
  107. text-align: center;
  108. display: flex;
  109. justify-content: space-between;
  110. flex-wrap: wrap;
  111. &::after {
  112. content: '';
  113. flex: 1;
  114. }
  115. .btn2{
  116. width: 100% !important;
  117. }
  118. view {
  119. height: 88rpx;
  120. width: 48%;
  121. margin: 0 1%;
  122. background-image: linear-gradient(to right, #72c172, #3bb197);
  123. color: #fff;
  124. border-radius: 8rpx;
  125. font-size: 32rpx;
  126. margin-top: 16rpx;
  127. }
  128. }
  129. .login {
  130. height: 420rpx;
  131. padding: 0 32rpx;
  132. padding-top: 164rpx;
  133. position: relative;
  134. z-index: 999;
  135. .savePassword {
  136. margin-top: 32rpx;
  137. }
  138. /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  139. border-color: #42b983 !important;
  140. }
  141. .login_input {
  142. margin-top: 32rpx;
  143. background-color: #ffffff;
  144. height: 72rpx;
  145. box-sizing: border-box;
  146. padding: 16rpx;
  147. }
  148. .title {
  149. font-size: 36rpx;
  150. color: #42b983;
  151. text-align: center;
  152. }
  153. .tips {
  154. font-size: 28rpx;
  155. color: red;
  156. margin-top: 16rpx;
  157. }
  158. .page_item_btn {
  159. height: 88rpx;
  160. background-image: linear-gradient(to right, #72c172, #3bb197);
  161. border-radius: 8rpx;
  162. line-height: 88rpx;
  163. color: #fff;
  164. font-size: 36rpx;
  165. font-weight: 700;
  166. margin-top: 64rpx;
  167. text-align: center;
  168. }
  169. }
  170. //上班页面
  171. .goWorkAll {
  172. overflow-y: auto;
  173. display: flex;
  174. flex-direction: column;
  175. justify-content: space-between;
  176. /deep/ .uni-radio-input-checked {
  177. background-color: #42b983 !important;
  178. border-color: #42b983 !important;
  179. }
  180. /deep/ .uni-checkbox-input-checked {
  181. color: #42b983 !important;
  182. }
  183. .title{
  184. text-align: center;
  185. color: #64BD7B;
  186. line-height: 80rpx;
  187. border-bottom: 1rpx solid #E5E5E5;
  188. position: absolute;
  189. top: 0;
  190. width: 100%;
  191. height: 80rpx;
  192. background: #fff;
  193. }
  194. .goWorkSelect {
  195. &.history {
  196. height: 81vh;
  197. overflow-y: auto;
  198. margin-top: 80rpx;
  199. padding-bottom: 16rpx;
  200. }
  201. &.combination {
  202. .goWorkSelect-head {}
  203. .goWorkSelect-list {}
  204. }
  205. .goWorkSelect-head {
  206. font-size: 28rpx;
  207. line-height: 80rpx;
  208. border-bottom: 2rpx solid #E5E5E5;
  209. text-align: center;
  210. }
  211. .goWorkSelect-list {
  212. padding: 16rpx;
  213. .input-num {
  214. height: 60rpx;
  215. border: 2rpx solid #E5E5E5;
  216. border-radius: 5rpx;
  217. // width: 100%;
  218. padding-left: 10rpx;
  219. // padding-right: 10rpx;
  220. }
  221. .goWorkSelect-item {
  222. height: 52rpx;
  223. display: flex;
  224. align-items: center;
  225. border-bottom: 2rpx solid #e5e9ed;
  226. padding: 16rpx;
  227. &.relative {
  228. position: relative;
  229. .picker {
  230. position: absolute;
  231. width: 100%;
  232. padding-left: 64rpx;
  233. }
  234. }
  235. button {
  236. font-size: 32rpx;
  237. height: 52rpx;
  238. line-height: 52rpx;
  239. margin: 0;
  240. margin-left: 16rpx;
  241. color: rgb(7, 134, 60);
  242. font-weight: 700;
  243. }
  244. }
  245. }
  246. }
  247. }
  248. .goWork {
  249. margin: 0 auto 48rpx;
  250. width: 240rpx;
  251. height: 240rpx;
  252. .goWork_btn_E {
  253. width: 100%;
  254. height: 100%;
  255. background: #bee1a7;
  256. border-radius: 30%;
  257. .goWork_btn_W {
  258. width: 75%;
  259. height: 75%;
  260. background-image: linear-gradient(to right, #72c172, #3bb197);
  261. border-radius: 30%;
  262. margin: 0 auto;
  263. position: relative;
  264. top: 12.5%;
  265. line-height: 180rpx;
  266. color: #fff;
  267. font-size: 36rpx;
  268. text-align: center;
  269. }
  270. }
  271. }
  272. .goWork_text {
  273. width: 100%;
  274. view {
  275. text-align: center;
  276. }
  277. .goWork_text-p {
  278. font-size: 36rpx;
  279. margin-bottom: 48rpx;
  280. }
  281. }
  282. .botImg {
  283. height: 600rpx;
  284. width: 100%;
  285. position: fixed;
  286. bottom: 0;
  287. .img {
  288. height: 100%;
  289. background: url("../../static/img/BG.png") no-repeat center center;
  290. background-size: 100% 100%;
  291. }
  292. }
  293. }
  294. </style>