移动端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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