移动端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

434 lines
12 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <!-- 头部开始 -->
  4. <van-nav-bar
  5. title="订单详情"
  6. fixed
  7. placeholder
  8. left-arrow
  9. @click-left="onClickLeft"
  10. />
  11. <!-- 头部结束 -->
  12. <!-- 内容开始 -->
  13. <div class="main">
  14. <div class="main_content_right_list">
  15. <div class="main_content_right_list_header">
  16. <p class="on">商品信息</p>
  17. <p>{{supplyDemand.productType}}</p>
  18. <p>服务</p>
  19. </div>
  20. <div class="main_content_right_list_center">
  21. <template v-if="supplyDemand.supplyDemand!=null">
  22. <img v-if="supplyDemand.supplyDemand.supplyMasterMap" :src="supplyDemand.supplyDemand.supplyMasterMap" style="width: 25vw;height: 25vw;">
  23. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;">
  24. </template>
  25. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;">
  26. <div class="main_content_right_list_content">
  27. <p class="tt">{{supplyDemand.contractionName}}</p>
  28. <div class="tab">
  29. <p>¥<span>{{supplyDemand.unitPrice}}</span>.00/{{supplyDemand.unit}}</p>
  30. </div>
  31. </div>
  32. </div>
  33. <van-cell title="买方名称" :border="false" :value="supplyDemand.bookName" />
  34. <van-cell title="联系人" :border="false" :value="supplyDemand.linkera" />
  35. <van-cell title="联系电话" :border="false" :value="supplyDemand.phonea" />
  36. </div>
  37. <div class="main_content_right_list">
  38. <div class="main_content_right_list_header">
  39. <p class="on">买家信息</p>
  40. </div>
  41. <van-cell title="联系人" :border="false" :value="supplyDemand.linkera" />
  42. <van-cell title="联系电话" :border="false" :value="supplyDemand.phonea" />
  43. <van-cell title="服务地点" :border="false" :value="supplyDemand.serviceAddress" />
  44. </div>
  45. <div class="main_content_right_list">
  46. <div class="main_content_right_list_header">
  47. <p class="on">订单信息</p>
  48. </div>
  49. <van-cell title="服务合同" :border="false" :value="supplyDemand.contractionName" />
  50. <van-cell title="服务作物" :border="false" :value="supplyDemand.cropType" />
  51. <van-cell title="下单时间" :border="false" :value="supplyDemand.orderAt" />
  52. <van-cell title="服务时间" :border="false" :value="supplyDemand.serviceAt" />
  53. <van-cell title="服务数量" :border="false" :value="supplyDemand.serviceNum" />
  54. <van-cell title="成交金额" :border="false" :value="supplyDemand.realityServiceMoney == null ? supplyDemand.countMoney:supplyDemand.realityServiceMoney" />
  55. <van-cell title="备注" :border="false" :value="supplyDemand.serviceRemark" />
  56. </div>
  57. </div>
  58. <div class="main_btn">
  59. <p @click="clickYes">接单</p>
  60. <p @click="clickNo">拒单</p>
  61. </div>
  62. <!-- 内容结束 -->
  63. </div>
  64. </template>
  65. <script>
  66. import Cookies from "js-cookie";
  67. import {productTypes, supplyorderGet , supplyorderFinish , supplyorderReject} from "@/api/agriculturalTrusteeship";
  68. export default {
  69. name: "agriculturalTrusteeshipIndex",
  70. data() {
  71. return {
  72. activeKey: 0,
  73. active: 0,
  74. loading: false,
  75. finished: false,
  76. show:true,
  77. activeNames:[],
  78. cropTypeOptions:[],
  79. orderStatusOptions:[],
  80. productList:[],
  81. supplyDemand:{}
  82. };
  83. },
  84. created() {
  85. let query = {
  86. parentId : null,
  87. tree:false
  88. }
  89. productTypes(query).then(response => {
  90. this.productList = response.data;
  91. });
  92. this.getDicts("crop_type").then(response => {
  93. this.cropTypeOptions = response.data;
  94. });
  95. this.getDicts("service_order_status").then(response => {
  96. this.orderStatusOptions = response.data;
  97. });
  98. this.getDetail();
  99. },
  100. methods: {
  101. getDetail(){
  102. supplyorderGet(this.$route.query.id).then(response => {
  103. response.data.cropType = this.selectDictLabel(this.cropTypeOptions, response.data.cropType);
  104. response.data.orderStatus = this.selectDictLabel(this.orderStatusOptions, response.data.orderStatus);
  105. var that = this ;
  106. setTimeout(function () {
  107. response.data.productType = that.productList.filter(function (e) { return e.id == response.data.productType; })[0].dictName;
  108. },1000)
  109. response.data.countMoney = response.data.unitPrice*response.data.serviceNum;
  110. if (response.data.supplyDemand!=null){
  111. if (response.data.supplyDemand.supplyMasterMap){
  112. var attachement = response.data.supplyDemand.supplyMasterMap.split( "," );
  113. response.data.supplyDemand.supplyMasterMap = '/api' + attachement[0];
  114. }
  115. }
  116. this.supplyDemand = response.data;
  117. });
  118. },
  119. clickYes(){
  120. supplyorderFinish(this.$route.query.id).then(response => {
  121. this.$notify({ type: 'success', message: '接单成功' });
  122. setTimeout(function(){
  123. history.back(-1);
  124. },2000)
  125. });
  126. },
  127. clickNo(){
  128. supplyorderReject(this.$route.query.id).then(response => {
  129. this.$notify({ type: 'success', message: '拒单成功' });
  130. setTimeout(function(){
  131. history.back(-1);
  132. },2000)
  133. });
  134. }
  135. },
  136. }
  137. </script>
  138. <style scoped lang="scss">
  139. .home_wrapper{
  140. }
  141. /*头部*/
  142. .header{
  143. display: flex;
  144. align-items: center;
  145. justify-content: space-between;
  146. padding: 2vh 4% 0vh;
  147. }
  148. .search{
  149. display: flex;
  150. justify-content: space-between;
  151. align-items: center;
  152. border: 1px solid #6E93F3;
  153. padding: 1PX 1PX 1PX 12PX ;
  154. border-radius: 50PX;
  155. margin-right: 30PX;
  156. flex: 1;
  157. input{
  158. flex: 1;
  159. background: transparent;
  160. margin-left: 10PX;
  161. }
  162. }
  163. /*导航栏目*/
  164. .nav{
  165. width: 94%;
  166. margin: 0 auto;
  167. margin-top: 2vh;
  168. padding: 1.5vh 3%;
  169. background: #ffffff;
  170. border-radius: 10PX;
  171. box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16);
  172. .date{
  173. display: flex;
  174. justify-content: space-around;
  175. align-items: center;
  176. p{
  177. border-radius: 1rem;
  178. padding: 5PX 0PX 5PX 5%;
  179. width: 40%;
  180. text-align: center;
  181. color: #334281;
  182. box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16);
  183. background:#D6D9E6 url("../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_date.png") 20% center no-repeat;
  184. }
  185. }
  186. .billCount {
  187. display: flex;
  188. text-align: center;
  189. margin-top: 3vh;
  190. .billCount_left{
  191. width: 50%;
  192. color: #1B5DEA;
  193. p{
  194. &:nth-child(1){
  195. font-size: .45rem;
  196. }
  197. }
  198. }
  199. .billCount_right{
  200. width: 50%;
  201. color: #FF5E00;
  202. p{
  203. &:nth-child(1){
  204. font-size: .45rem;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. /*内容*/
  211. .main{
  212. width: 94%;
  213. margin: 0 auto;
  214. .main_content_right_list{
  215. margin-top: 2vh;
  216. padding: 1.5vh 3%;
  217. background: #ffffff;
  218. border-radius: 10PX;
  219. /*box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16);*/
  220. /deep/ .van-cell{
  221. padding: 0;
  222. margin-top: 8PX;
  223. }
  224. .main_content_right_list_header{
  225. display: flex;
  226. margin-bottom: 1vh;
  227. align-items: center;
  228. p{
  229. padding: 3PX 10PX;
  230. border-radius: 8PX;
  231. &:nth-child(2){background: #2B7EEC;color: #ffffff;margin-left: auto;}
  232. &:nth-child(3){background: #E2E9FD;color: #497CE8;margin-left: 10PX;}
  233. }
  234. .on{
  235. color: #334281;
  236. border-radius: initial;
  237. padding:0 0 0 20PX;
  238. font-size: 0.35rem;
  239. background: url("../../../../static/images/agriculturalTrusteeship/socialization/bill_icon_01.png") no-repeat left center
  240. }
  241. .off{
  242. color: #E60505;
  243. border-radius: initial;
  244. margin-left: auto;
  245. padding:0 0 0 15PX;
  246. background: url("../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_off.png") no-repeat left center
  247. }
  248. }
  249. .main_content_right_list_center{
  250. display: flex;
  251. img{
  252. border-radius: 15PX;
  253. margin-right: 4%;
  254. }
  255. .main_content_right_list_content{
  256. display: flex;
  257. flex-direction:column;
  258. justify-content: space-between;
  259. .tt{
  260. color: #333333;
  261. font-size: .35rem;
  262. }
  263. .tab{
  264. display: flex;
  265. justify-content: space-between;
  266. p{
  267. &:nth-child(1){
  268. flex: 1;
  269. color: #FF5E00;
  270. span{
  271. font-size: .4rem;
  272. }
  273. }
  274. &:nth-child(2){
  275. span{
  276. display: inline-block;
  277. text-align: center;
  278. padding: 2PX 5PX;
  279. &:nth-child(1){
  280. color: #497CE8;
  281. background: #E2E9FD;
  282. border-top-left-radius: 10PX;
  283. }
  284. &:nth-child(2){
  285. color: #ffffff;
  286. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  287. border-bottom-right-radius: 10PX;
  288. }
  289. }
  290. }
  291. }
  292. }
  293. .name{
  294. color: #7A7A7A;
  295. span{
  296. &:nth-child(2){
  297. margin-left: 5PX;
  298. }
  299. }
  300. }
  301. }
  302. }
  303. }
  304. }
  305. /*弹出层*/
  306. .popup_header{
  307. display: flex;
  308. align-items: center;
  309. color: #334281;
  310. font-size: .38rem;
  311. margin-bottom: 15PX;
  312. img{
  313. margin-right: 10PX;
  314. display: block;
  315. }
  316. p{
  317. line-height: 1;
  318. }
  319. }
  320. .popup_content{
  321. .selected{
  322. .on{
  323. font-size: .35rem;
  324. padding: 10PX 20PX;
  325. color: #334281;
  326. background: url("../../../../static/images/agriculturalTrusteeship/socialization/down.png")left center no-repeat;
  327. }
  328. .off{
  329. font-size: .35rem;
  330. padding: 10PX 20PX;
  331. color: #334281;
  332. background: url("../../../../static/images/agriculturalTrusteeship/socialization/right.png")left center no-repeat;
  333. }
  334. .options{
  335. display: flex;
  336. justify-content: space-between;
  337. flex-wrap: wrap;
  338. p{
  339. background: #F5F5F5;
  340. color: #8F8F8F;
  341. width: 30%;
  342. padding: 5PX 0;
  343. border-radius: 5PX;
  344. text-align: center;
  345. &.active{
  346. background: #E2E9FD;
  347. color: #1B5DEA;
  348. }
  349. }
  350. }
  351. }
  352. }
  353. .popup_date{
  354. display: flex;
  355. justify-content: space-around;
  356. align-items: center;
  357. p{
  358. border-radius: 1rem;
  359. padding: 5PX 0PX 5PX 5%;
  360. width: 45%;
  361. text-align: center;
  362. color: #1B5DEA;
  363. background:#E2E9FD url("../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_date.png") 15% center no-repeat;
  364. }
  365. }
  366. .popup_btn{
  367. position: fixed;
  368. bottom: 5vh;
  369. display: flex;
  370. align-items: center;
  371. justify-content: space-between;
  372. width: 94%;
  373. left: 3%;
  374. p{
  375. width: 30%;
  376. padding: 7PX 0;
  377. border-radius: 5rem;
  378. text-align: center;
  379. font-size: .35rem;
  380. box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16);
  381. &:nth-child(1){
  382. background: #1B5DEA;
  383. color: #ffffff;
  384. }
  385. &:nth-child(2){
  386. border: 1PX solid #1B5DEA;
  387. color: #1B5DEA;
  388. }
  389. &:nth-child(3){
  390. background-image: linear-gradient(to right , #6E93F3 , #54C6E4);
  391. color: #ffffff;
  392. }
  393. }
  394. }
  395. .main_btn{
  396. display: flex;
  397. justify-content: space-around;
  398. padding: 4vh 0;
  399. p{
  400. font-size: .4rem;
  401. width: 35%;
  402. text-align: center;
  403. padding: 10PX 0;
  404. border-radius: 5rem;
  405. box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16);
  406. &:nth-child(1){
  407. background: #334281;
  408. color: #ffffff;
  409. }
  410. &:nth-child(2){
  411. background: #D1D5E4;
  412. color: #334281;
  413. }
  414. }
  415. }
  416. </style>