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

index.vue 8.3 KiB

2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div class="home_wrapper">
  3. <!-- 头部开始 -->
  4. <div class="header">
  5. <p>待处理订单</p>
  6. <p>共{{supplyDemandList.length}}个新订单</p>
  7. </div>
  8. <!-- 头部结束 -->
  9. <!-- 内容开始 -->
  10. <div class="main">
  11. <van-list
  12. v-model="loading"
  13. :finished="finished"
  14. finished-text="没有更多了"
  15. @load="getList"
  16. >
  17. <!-- @load="onLoad"-->
  18. <div class="main_content_right_list" v-for="(item,index) in supplyDemandList" :key="index" @click="$router.push({name:'agriculturalTrusteeshipSocializationBillOrder',query:{id:item.id}})">
  19. <div class="main_content_right_list_header">
  20. <p>{{item.productType}}</p>
  21. <p>服务</p>
  22. <p>{{item.createTime.substr(0,10)}}</p>
  23. </div>
  24. <div class="main_content_right_list_center">
  25. <template v-if="item.supplyDemand">
  26. <img v-if="item.supplyDemand.supplyMasterMap" :src="item.supplyDemand.supplyMasterMap" style="width: 25vw;height: 25vw;">
  27. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;">
  28. </template>
  29. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;">
  30. <div class="main_content_right_list_content">
  31. <p class="tt">{{item.contractionName}}</p>
  32. <div class="tab">
  33. <p>¥<span>{{item.countMoney}}</span>.00</p>
  34. </div>
  35. <p class="name">
  36. <span>数量:{{item.serviceNum}}</span>
  37. <span>作物:{{item.cropType}}</span>
  38. </p>
  39. </div>
  40. </div>
  41. <van-cell title="卖方名称" :border="false" :value="item.bookName" />
  42. <van-cell title="联系人" :border="false" :value="item.linkera" />
  43. <van-cell title="联系电话" :border="false" :value="item.phonea" />
  44. </div>
  45. </van-list>
  46. </div>
  47. <!-- 内容结束 -->
  48. <agr></agr>
  49. <transition name="van-fade">
  50. <dialogClose v-show="showDialog"></dialogClose>
  51. </transition>
  52. </div>
  53. </template>
  54. <script>
  55. import Cookies from "js-cookie";
  56. import agr from "@/components/common/agr_footer";
  57. import dialogClose from "@/components/agriculturalTrusteeship/dialog";
  58. import {productTypes, supplyorderList} from "@/api/agriculturalTrusteeship";
  59. export default {
  60. name: "agriculturalTrusteeshipIndex",
  61. components: {
  62. agr,
  63. dialogClose
  64. },
  65. data() {
  66. return {
  67. activeKey: 0,
  68. active: 0,
  69. loading: false,
  70. finished: false,
  71. showDialog:false,
  72. supplyDemandList:[],
  73. supplyDemandList1:[],
  74. cropTypeOptions:[],
  75. orderStatusOptions:[],
  76. productList:[],
  77. currentDateStar: new Date(),
  78. currentDateEnd: new Date(),
  79. query:{
  80. orderByColumn:'order_at',
  81. isAsc:'asc',
  82. demandName :'',
  83. startOrderAt :'',
  84. endOrderAt :'',
  85. orderStatus :'',
  86. },
  87. startOrderAt:this.format(new Date(),'yyyy年MM月'),
  88. endOrderAt:this.format(new Date(),'yyyy年MM月'),
  89. params : {
  90. startOrderAt:this.format(new Date(),'yyyy-MM'),
  91. endOrderAt:this.format(new Date(),'yyyy-MM'),
  92. },
  93. content:''
  94. };
  95. },
  96. created() {
  97. let query = {
  98. parentId : null,
  99. tree:false
  100. }
  101. productTypes(query).then(response => {
  102. this.productList = response.data;
  103. });
  104. this.getDicts("crop_type").then(response => {
  105. this.cropTypeOptions = response.data;
  106. });
  107. this.getDicts("service_order_status").then(response => {
  108. this.orderStatusOptions = response.data;
  109. });
  110. },
  111. methods: {
  112. getList(){
  113. supplyorderList(this.query).then(response => {
  114. response.rows.map(res=>{
  115. if ( res.orderStatus == '1'){
  116. if (res.supplyDemand){
  117. if (res.supplyDemand.supplyMasterMap){
  118. let supplyMasterMap = res.supplyDemand.supplyMasterMap.split( "," )
  119. res.supplyDemand.supplyMasterMap = '/api'+supplyMasterMap[0]
  120. }
  121. }
  122. res.cropType = this.selectDictLabel(this.cropTypeOptions, res.cropType);
  123. res.orderStatus = this.selectDictLabel(this.orderStatusOptions, res.orderStatus);
  124. var that = this ;
  125. setTimeout(function () {
  126. res.productType = that.productList.filter(function (e) { return e.id == res.productType; })[0].dictName;
  127. },1000)
  128. res.countMoney = res.unitPrice * res.serviceNum;
  129. this.supplyDemandList.push(res);
  130. }
  131. this.supplyDemandList1.push(res);
  132. })
  133. if(this.supplyDemandList1.length >= response.total){
  134. this.finished = true;
  135. return;
  136. }else{
  137. this.loading = false;
  138. this.query.pageNum += 1 ;
  139. }
  140. });
  141. },
  142. openDialog(val){
  143. this.showDialog = val
  144. },
  145. },
  146. }
  147. </script>
  148. <style scoped lang="scss">
  149. .home_wrapper{
  150. }
  151. /*头部*/
  152. .header{
  153. display: flex;
  154. align-items: end;
  155. justify-content: space-between;
  156. padding: 2vh 4% 0vh;
  157. p{
  158. &:nth-child(1){
  159. color: #334281;
  160. font-size: .45rem;
  161. }
  162. &:nth-child(2){
  163. color: #7A7A7A;
  164. margin-top: .5vh;
  165. }
  166. }
  167. }
  168. /*导航栏目*/
  169. .nav{
  170. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  171. .van-grid{
  172. border-top-left-radius: 25PX;
  173. border-top-right-radius: 25PX;
  174. overflow: hidden;
  175. }
  176. .nav_notice_box{
  177. background: #ffffff;
  178. padding:.5vh 0 1vh;
  179. }
  180. /deep/ .van-notice-bar{
  181. width: 94%;
  182. margin: 0 auto;
  183. border-radius: 5PX;
  184. .notice-swipe {
  185. height: 40px;
  186. line-height: 42px;
  187. }
  188. }
  189. }
  190. /*内容*/
  191. .main{
  192. width: 94%;
  193. margin: 0 auto;
  194. .main_content_right_list{
  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. /deep/ .van-cell{
  201. padding: 0;
  202. margin-top: 8PX;
  203. }
  204. .main_content_right_list_header{
  205. display: flex;
  206. margin-bottom: 1vh;
  207. align-items: center;
  208. p{
  209. padding: 3PX 10PX;
  210. border-radius: 8PX;
  211. &:nth-child(1){background: #2B7EEC;color: #ffffff;}
  212. &:nth-child(2){background: #E2E9FD;color: #497CE8;margin-left: 10PX;}
  213. &:nth-child(3){color: #334281;margin-left: auto;padding:0 0 0 15PX;background: url("../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_clock.png") no-repeat left center}
  214. }
  215. }
  216. .main_content_right_list_center{
  217. display: flex;
  218. img{
  219. border-radius: 15PX;
  220. margin-right: 4%;
  221. }
  222. .main_content_right_list_content{
  223. display: flex;
  224. flex-direction:column;
  225. justify-content: space-between;
  226. .tt{
  227. color: #333333;
  228. font-size: .35rem;
  229. }
  230. .tab{
  231. display: flex;
  232. justify-content: space-between;
  233. p{
  234. &:nth-child(1){
  235. flex: 1;
  236. color: #FF5E00;
  237. span{
  238. font-size: .4rem;
  239. }
  240. }
  241. &:nth-child(2){
  242. span{
  243. display: inline-block;
  244. text-align: center;
  245. padding: 2PX 5PX;
  246. &:nth-child(1){
  247. color: #497CE8;
  248. background: #E2E9FD;
  249. border-top-left-radius: 10PX;
  250. }
  251. &:nth-child(2){
  252. color: #ffffff;
  253. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  254. border-bottom-right-radius: 10PX;
  255. }
  256. }
  257. }
  258. }
  259. }
  260. .name{
  261. color: #7A7A7A;
  262. span{
  263. &:nth-child(2){
  264. margin-left: 5PX;
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. }
  272. </style>