移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

441 righe
11 KiB

  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. 查农药
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="jg"></div>
  7. </div>
  8. <div class="main">
  9. <div class="main_box">
  10. <van-field v-model="queryParams.recordCode" :border="false" label="登记证号" placeholder="请输入登记证号" input-align="right" />
  11. <van-field v-model="queryParams.productName" :border="false" label="农药名称" placeholder="请输入农药名称" input-align="right" />
  12. <van-field v-model="queryParams.recordHolder" :border="false" label="登记证持有人" placeholder="请输入登记证持有人" input-align="right" />
  13. <van-field
  14. readonly
  15. clickable
  16. :border="false"
  17. label="农药种类"
  18. placeholder="请选择"
  19. v-model="category"
  20. @click="showCategory = true"
  21. input-align="right"
  22. right-icon="arrow-down"
  23. label-width="auto"
  24. />
  25. <van-popup v-model="showCategory" position="bottom">
  26. <van-picker
  27. show-toolbar
  28. :columns="categoryOptions"
  29. @confirm="onConfirmCategory"
  30. @cancel="showCategory = false"
  31. />
  32. </van-popup>
  33. <van-popup v-model="showAgent" position="bottom">
  34. <van-picker
  35. show-toolbar
  36. :columns="agentOptions"
  37. @confirm="onConfirmAgent"
  38. @cancel="showAgent = false"
  39. />
  40. </van-popup>
  41. <van-field
  42. readonly
  43. clickable
  44. :border="false"
  45. label="全部剂型"
  46. placeholder="请选择"
  47. v-model="agent"
  48. @click="showAgent = true"
  49. input-align="right"
  50. right-icon="arrow-down"
  51. label-width="auto"
  52. />
  53. </div>
  54. <p class="submitButton" @click="goSubmit">立即查询</p>
  55. <div class="scroll_box">
  56. <van-list
  57. v-model="loading"
  58. :finished="finished"
  59. finished-text="没有更多了"
  60. @load="getList"
  61. >
  62. <div class="list_box" v-for="(item,index) in list" :key="index">
  63. <van-cell center :to="{name:'lawEnforcementPesticidesDetail', query: {content:item}}">
  64. <template #title>
  65. <div class="tt">
  66. <span>{{item.productName}}</span>
  67. <span>{{item.content}}%</span>
  68. </div>
  69. <div class="first">
  70. <span>{{item.recordCode}}</span>
  71. <span>{{item.category}}</span>
  72. <span>{{item.agent}}</span>
  73. </div>
  74. <p class="dress">{{item.recordHolder}}</p>
  75. </template>
  76. <template #label>
  77. <div class="label">
  78. <p>有效期始 {{item.firstApprovalDate}}</p>
  79. <p>有效期至 {{item.effectiveDate}}</p>
  80. </div>
  81. </template>
  82. </van-cell>
  83. </div>
  84. </van-list>
  85. </div>
  86. </div>
  87. </div>
  88. </template>
  89. <script>
  90. import { listProduct } from "@/api/lawEnforcement/index";
  91. export default {
  92. name: "programmeDetail",
  93. data() {
  94. return {
  95. loading: false,
  96. finished: false,
  97. form:{},
  98. value:'',
  99. showCategory:false,
  100. showAgent:false,
  101. queryParams: {
  102. // 分页
  103. pageNum: 1,
  104. pageSize: 10,
  105. // 查询排序
  106. orderByColumn: "id",
  107. isAsc: "desc",
  108. recordCode: null, // 查询参数-登记证号
  109. productName: null, // 查询参数-农药名称
  110. category: null, // 查询参数-农药种类
  111. agent: null, // 查询参数-剂型
  112. recordHolder:null, // 查询参数-登记证持有人
  113. },
  114. list:[],
  115. categoryOptions:[],
  116. agentOptions:[],
  117. category: null, // 查询参数-农药种类
  118. agent: null, // 查询参数-剂型
  119. };
  120. },
  121. created() {
  122. // this.getDictionaries()
  123. // 农药种类
  124. this.getDicts("category_type").then(response => {
  125. for (var i = 0; i < response.data.length; i++) {
  126. this.categoryOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  127. }
  128. });
  129. // 剂型
  130. this.getDicts("agent_type").then(response => {
  131. for (var i = 0; i < response.data.length; i++) {
  132. this.agentOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  133. }
  134. });
  135. },
  136. methods: {
  137. getList(){
  138. var _this = this;
  139. listProduct(_this.queryParams).then(response => {
  140. response.rows.map(res=>{
  141. // res.businessType = res.businessType == '' ? '' : this.selectDictLabel(this.businessTypeOptions, res.businessType);
  142. this.list.push(res);
  143. })
  144. console.log(this.list.length)
  145. if(this.list.length >= response.total){
  146. this.finished = true;
  147. return;
  148. }else{
  149. this.loading = false;
  150. this.queryParams.pageNum += 1 ;
  151. }
  152. });
  153. },
  154. onConfirmCategory(data){
  155. this.category = data.text;
  156. this.queryParams.category = data.value;
  157. this.showCategory = false;
  158. },
  159. onConfirmAgent(data){
  160. this.agent = data.text;
  161. this.queryParams.agent = data.value;
  162. this.showAgent = false;
  163. },
  164. goSubmit(){
  165. this.list = [];
  166. this.getList();
  167. }
  168. },
  169. }
  170. </script>
  171. <style scoped lang="scss">
  172. .jg{
  173. height: 180PX;
  174. }
  175. .app-container {
  176. }
  177. .top_box{
  178. line-height: 1;
  179. text-align: left;
  180. width: 85%;
  181. margin: 0 auto;
  182. padding-bottom: 10PX;
  183. background: url('../../../../static/images/lawEnforcement/new/retrospect_icon_14.png') no-repeat right bottom;
  184. .top_01{
  185. display: flex;
  186. align-items: center;
  187. font-size: 0.4rem;
  188. margin-top: 15PX;
  189. img{
  190. margin-right: 10PX;
  191. }
  192. }
  193. .tt{
  194. font-size: 0.7rem;
  195. margin-top: 15PX;
  196. }
  197. .top_02{
  198. display: flex;
  199. align-items: center;
  200. font-size: 0.3rem;
  201. margin-top: 15PX;
  202. i{
  203. display: inline-block;
  204. width: 15PX;
  205. height: 15PX;
  206. margin-right: 3PX;
  207. }
  208. p{
  209. display: flex;
  210. align-items: center;
  211. margin-right: 10PX;
  212. &:nth-child(1){
  213. i{
  214. background: url('../../../../static/images/lawEnforcement/new/retrospect_icon_11.png') no-repeat center;
  215. background-size: auto 15PX;
  216. }
  217. }
  218. &:nth-child(2){
  219. i{
  220. background: url('../../../../static/images/lawEnforcement/new/retrospect_icon_12.png') no-repeat center;
  221. background-size: auto 15PX;
  222. }
  223. }
  224. &:nth-child(3){
  225. i{
  226. background: url('../../../../static/images/lawEnforcement/new/retrospect_icon_13.png') no-repeat center;
  227. background-size: auto 15PX;
  228. }
  229. }
  230. }
  231. }
  232. }
  233. .main{
  234. position: absolute;
  235. width: 100%;
  236. top: 58PX;
  237. }
  238. .center_box{
  239. text-align: center;
  240. padding: 30PX 0!important;
  241. p{
  242. margin-top: 15PX;
  243. &:nth-child(2){
  244. font-size: 0.4rem;
  245. color: #59C145;
  246. }
  247. &:nth-child(3){
  248. font-size: 0.4rem;
  249. color: #B4B0B0;
  250. display: inline-block;
  251. background: url('../../../../static/images/lawEnforcement/new/retrospect_icon_16.png') no-repeat left center;
  252. padding-left: 20PX;
  253. }
  254. }
  255. }
  256. /deep/ .van-cell{
  257. padding-bottom: 0;
  258. padding-top: 0;
  259. margin-bottom: 10PX;
  260. &:last-child{
  261. margin-bottom: 0;
  262. }
  263. }
  264. .header_main{
  265. /*height: 116px;*/
  266. background: url('../../../../static/images/lawEnforcement/new/header_bg.png') no-repeat;
  267. background-size: 100% 100%;
  268. /*position: fixed;*/
  269. top: 0;
  270. left: 0;
  271. width: 100%;
  272. font-size: 36px;
  273. line-height: 116px;
  274. text-align: center;
  275. color: #fff;
  276. z-index: 999;
  277. .return_btn{
  278. width: 24px;
  279. height: 43.2px;
  280. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  281. background-size: 20px 36px;
  282. position: absolute;
  283. left: 38px;
  284. top: 36px;
  285. }
  286. .add_btn{
  287. width: 56.4px;
  288. height: 40.8px;
  289. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  290. background-size: 47px 34px;
  291. position: absolute;
  292. right: 38px;
  293. top: 36px;
  294. }
  295. }
  296. /deep/ .van-radio--horizontal{
  297. margin-left: 0.32rem;
  298. margin-right: 0;
  299. }
  300. .peopleList{
  301. padding-right: 3%;
  302. .van-row{
  303. margin-bottom: 10PX;
  304. .van-col{
  305. text-align: center;
  306. font-size: 14PX;
  307. }
  308. &:first-child{
  309. .van-col{
  310. color: #1D6FE9;
  311. }
  312. }
  313. }
  314. }
  315. .main_title{
  316. font-size: 0.4rem;
  317. color: #1D6FE9;
  318. margin: 0.2rem 6%;
  319. margin-top: 0;
  320. position: relative;
  321. }
  322. .main_box{
  323. width: 90%;
  324. margin: 0 auto;
  325. border-radius: 10PX;
  326. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  327. overflow: hidden;
  328. background-color: #FFF;
  329. padding: 20PX 5PX;
  330. .van-icon{
  331. vertical-align: middle;
  332. }
  333. .custom-title{
  334. font-size: 17PX;
  335. color: #333333;
  336. vertical-align: middle;
  337. line-height: 1;
  338. position: relative;
  339. }
  340. .tap{
  341. color: #1D6FE9;
  342. }
  343. .bgBlue{
  344. display: block;
  345. position: absolute;
  346. width: 17PX;
  347. height: 17PX;
  348. border-radius: 50%;
  349. background-color: rgba(29,111,233,0.26);
  350. top: -2PX;
  351. right: -8PX;
  352. }
  353. }
  354. .submitButton{
  355. width: 70%;
  356. margin: 50px auto;
  357. background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
  358. text-align: center;
  359. color: #ffffff;
  360. height: 70px;
  361. line-height: 70px;
  362. border-radius: 8PX;
  363. }
  364. .scroll_box{
  365. height: calc(100vh - 100px - 200PX - 100PX);
  366. overflow: hidden;
  367. overflow-y: scroll;
  368. }
  369. .addFamily{
  370. position: absolute;
  371. top: -2px;
  372. right: 0;
  373. border-radius: 50%;
  374. }
  375. /deep/.van-cell__title{
  376. .tt{
  377. display: flex;
  378. justify-content: space-between;
  379. span:first-child{
  380. background: url('../../../../static/images/lawEnforcement/icon/pesticides_icon_01.png') no-repeat left center;
  381. padding-left: 15PX;
  382. }
  383. }
  384. .first{
  385. display: flex;
  386. justify-content: space-between;
  387. align-items: center;
  388. margin-top: 5PX;
  389. span{
  390. color: #1D6FE9;
  391. font-size: 0.35rem;
  392. &:first-child{
  393. background: rgba(29,111,233,0.2);
  394. padding: 3PX 5PX;
  395. line-height: 1;
  396. border-radius: 3PX;
  397. }
  398. }
  399. }
  400. .dress{
  401. font-size: .35rem;
  402. color: #1CB8B1;
  403. margin-top: 5PX;
  404. }
  405. span{
  406. font-family: Arial;
  407. font-size: 0.4rem;
  408. font-weight: normal;
  409. display: -webkit-box;
  410. -webkit-box-orient: vertical;
  411. -webkit-line-clamp: 1;
  412. word-break: break-all;
  413. overflow: hidden;
  414. }
  415. }
  416. .list_box{
  417. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  418. width: 94%;
  419. margin: 0 auto 10PX;
  420. padding: 12PX 0;
  421. background: #ffffff;
  422. border-radius: 8PX;
  423. }
  424. .label {
  425. display: flex;
  426. justify-content: space-between;
  427. p{
  428. display: inline-block;
  429. font-size: 0.35rem;
  430. }
  431. }
  432. </style>