移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1128 line
38 KiB

  1. <template>
  2. <div>
  3. <van-nav-bar
  4. title="确权颁证调查统计表"
  5. left-text="返回"
  6. right-text="新增"
  7. left-arrow
  8. @click-left="$router.back(-1)"
  9. @click-right="onClickRight"
  10. />
  11. <van-dropdown-menu>
  12. <van-dropdown-item v-model="value1" :options="option1" @change="changeDept(1)"/>
  13. <van-dropdown-item v-model="value11" :options="option11" :disabled="value1==0" @change="changeDept(2)"/>
  14. </van-dropdown-menu>
  15. <van-dropdown-menu>
  16. <van-dropdown-item v-model="value2" :options="option2" :disabled="value11==0" @change="changeDept(3)"/>
  17. <van-dropdown-item v-model="value22" :options="option22" :disabled="value2==0" @change="changeDept(4)"/>
  18. </van-dropdown-menu>
  19. <van-pull-refresh v-model="refreshing" @refresh="">
  20. <van-list
  21. v-model="loading"
  22. :finished="finished"
  23. finished-text="没有更多了"
  24. @load="onL"
  25. >
  26. <van-row style="text-align: center;font-weight: bold;border:1px solid #ddd;font-size:.4rem;background: #1989fa;color: #fff;line-height: 1rem;border-radius: 10px;">
  27. <van-col span="8" style="border: 1px solid #FFF">
  28. <span >农户名</span>
  29. </van-col>
  30. <van-col span="8" style="border: 1px solid #FFF">
  31. <span >调查状态</span>
  32. </van-col>
  33. <van-col span="8" style="border: 1px solid #FFF">
  34. <span >操作</span>
  35. </van-col>
  36. </van-row>
  37. <van-swipe-cell v-for="(item,index) in samplingList" stop-propagation>
  38. <template #left>
  39. <van-button square type="danger" style="height: 30px" text="删除" @click="removeRow(item.id,index)"/>
  40. </template>
  41. <van-row style="text-align: center;line-height: 30px;border: 1px solid #FFF">
  42. <van-col span="8" >
  43. <span>{{item.farmerName}}</span>
  44. </van-col>
  45. <van-col span="8" >
  46. <span >{{item.status}}</span>
  47. </van-col>
  48. <van-col span="8" >
  49. <van-button type="primary" size="mini" v-show="item.status=='未调查'" style="vertical-align: middle" @click="selectType(1,item,index)">替补</van-button>
  50. <van-button type="info" size="mini" v-show="item.status=='电话调查'||item.status=='未调查'" style="vertical-align: middle" @click="selectType(2,item,index)">电话</van-button>
  51. <van-button type="warning" size="mini" v-show="item.status=='现场调查'||item.status=='未调查'" style="vertical-align: middle" @click="selectType(3,item,index)">现场</van-button>
  52. </van-col>
  53. </van-row>
  54. </van-swipe-cell>
  55. </van-list>
  56. </van-pull-refresh>
  57. <van-action-sheet v-model="showXCDC" title="现场调查">
  58. <van-form @submit="onSubmitXCDC">
  59. <van-field
  60. v-model="xcdcform.countName"
  61. name="countName"
  62. label="县(区)"
  63. label-width="120px"
  64. placeholder="县(区)"
  65. :rules="[{ required: true, message: '请填写县(区)' }]"
  66. />
  67. <van-field
  68. v-model="xcdcform.townName"
  69. name="townName"
  70. label="乡(镇、街)"
  71. label-width="120px"
  72. placeholder="乡(镇、街)"
  73. :rules="[{ required: true, message: '请填写乡(镇、街)' }]"
  74. />
  75. <van-field
  76. v-model="xcdcform.villageName"
  77. name="villageName"
  78. label="经联社"
  79. label-width="120px"
  80. placeholder="经联社"
  81. :rules="[{ required: true, message: '请填写经联社' }]"
  82. />
  83. <van-field
  84. v-model="xcdcform.cooperativeName"
  85. name="cooperativeName"
  86. label="经济社(小组)"
  87. label-width="120px"
  88. placeholder="经济社(小组))"
  89. :rules="[{ required: true, message: '请填写经济社(小组))' }]"
  90. />
  91. <van-field
  92. v-model="xcdcform.farmerName"
  93. name="farmerName"
  94. label="抽查户主名称"
  95. label-width="120px"
  96. placeholder="抽查户主名称"
  97. :rules="[{ required: true, message: '请填写抽查户主名称' }]"
  98. />
  99. <van-field
  100. v-model="xcdcform.originalNameCheckedBy"
  101. name="originalNameCheckedBy"
  102. label="原抽查户主姓名"
  103. label-width="120px"
  104. placeholder="原抽查户主姓名"
  105. />
  106. <van-field
  107. v-model="xcdcform.nameCheckedBy"
  108. name="nameCheckedBy"
  109. label="被核查人姓名"
  110. label-width="120px"
  111. placeholder="被核查人姓名"
  112. :rules="[{ required: true, message: '请填写被核查人姓名' }]"
  113. >
  114. <template #button>
  115. <van-uploader :after-read="afterRead" v-model="fileList" :preview-image="false" :max-count="1" capture="camera" accept="image/*">
  116. <van-button icon="photograph" type="primary" size="mini">扫描身份证</van-button>
  117. </van-uploader>
  118. </template>
  119. </van-field>
  120. <van-field
  121. v-model="xcdcform.idcardCheckedBy"
  122. name="idcardCheckedBy"
  123. label="被核查人身份证号"
  124. label-width="120px"
  125. placeholder="被核查人身份证号"
  126. :rules="[{ required: true, message: '请填写被核查人身份证号' }]"
  127. />
  128. <h2 class="van-doc-demo-block__title">农村土地承包经营权证</h2>
  129. <van-field name="item1" label="是否有证书" label-width="200px">
  130. <template #input>
  131. <van-radio-group v-model="xcdcform.item1" direction="horizontal" @change="haveCertificate(1)">
  132. <van-radio name="Y">是</van-radio>
  133. <van-radio name="N">否</van-radio>
  134. </van-radio-group>
  135. </template>
  136. </van-field>
  137. <van-field name="item2" label="印鉴是否合规" label-width="200px">
  138. <template #input>
  139. <van-radio-group v-model="xcdcform.item2" direction="horizontal">
  140. <van-radio name="Y">是</van-radio>
  141. <van-radio name="N">否</van-radio>
  142. </van-radio-group>
  143. </template>
  144. </van-field>
  145. <van-field name="item3" label="发包方是否准确" label-width="200px">
  146. <template #input>
  147. <van-radio-group v-model="xcdcform.item3" direction="horizontal">
  148. <van-radio name="Y">是</van-radio>
  149. <van-radio name="N">否</van-radio>
  150. </van-radio-group>
  151. </template>
  152. </van-field>
  153. <van-field name="item4" label="户主姓名是否正确" label-width="200px">
  154. <template #input>
  155. <van-radio-group v-model="xcdcform.item4" direction="horizontal">
  156. <van-radio name="Y">是</van-radio>
  157. <van-radio name="N">否</van-radio>
  158. </van-radio-group>
  159. </template>
  160. </van-field>
  161. <van-field name="item5" label="户主身份证号是否正确" label-width="200px">
  162. <template #input>
  163. <van-radio-group v-model="xcdcform.item5" direction="horizontal">
  164. <van-radio name="Y">是</van-radio>
  165. <van-radio name="N">否</van-radio>
  166. </van-radio-group>
  167. </template>
  168. </van-field>
  169. <van-field
  170. v-model="xcdcform.item6"
  171. name="item6"
  172. label="地块数(块)"
  173. placeholder="地块数"
  174. label-width="120px"
  175. :rules="[{ required: true, message: '请填写地块数' }]"
  176. />
  177. <van-field
  178. v-model="xcdcform.item7"
  179. name="item7"
  180. label="面积(亩)"
  181. placeholder="面积"
  182. label-width="120px"
  183. :rules="[{ required: true, message: '请填写面积' }]"
  184. />
  185. <van-field name="item8" label="期限是否合法" label-width="200px">
  186. <template #input>
  187. <van-radio-group v-model="xcdcform.item8" direction="horizontal">
  188. <van-radio name="Y">是</van-radio>
  189. <van-radio name="N">否</van-radio>
  190. </van-radio-group>
  191. </template>
  192. </van-field>
  193. <van-field name="item9" label="承包合同编号是否正确" label-width="200px">
  194. <template #input>
  195. <van-radio-group v-model="xcdcform.item9" direction="horizontal">
  196. <van-radio name="Y">是</van-radio>
  197. <van-radio name="N">否</van-radio>
  198. </van-radio-group>
  199. </template>
  200. </van-field>
  201. <h2 class="van-doc-demo-block__title">农村土地承包经营权证</h2>
  202. <van-field name="item10" label="是否保存合同" label-width="200px" >
  203. <template #input>
  204. <van-radio-group v-model="xcdcform.item10" direction="horizontal" @change="haveCertificate(2)">
  205. <van-radio name="Y">是</van-radio>
  206. <van-radio name="N">否</van-radio>
  207. </van-radio-group>
  208. </template>
  209. </van-field><van-field name="item11" label="印鉴是否合规" label-width="200px">
  210. <template #input>
  211. <van-radio-group v-model="xcdcform.item11" direction="horizontal">
  212. <van-radio name="Y">是</van-radio>
  213. <van-radio name="N">否</van-radio>
  214. </van-radio-group>
  215. </template>
  216. </van-field><van-field name="item12" label="发包方是否与证书一致" label-width="200px">
  217. <template #input>
  218. <van-radio-group v-model="xcdcform.item12" direction="horizontal">
  219. <van-radio name="Y">是</van-radio>
  220. <van-radio name="N">否</van-radio>
  221. </van-radio-group>
  222. </template>
  223. </van-field>
  224. <van-field name="item13" label="户主姓名是否与证书一致" label-width="200px">
  225. <template #input>
  226. <van-radio-group v-model="xcdcform.item13" direction="horizontal">
  227. <van-radio name="Y">是</van-radio>
  228. <van-radio name="N">否</van-radio>
  229. </van-radio-group>
  230. </template>
  231. </van-field>
  232. <van-field name="item14" label="户主身份证号码是否正确" label-width="200px">
  233. <template #input>
  234. <van-radio-group v-model="xcdcform.item14" direction="horizontal">
  235. <van-radio name="Y">是</van-radio>
  236. <van-radio name="N">否</van-radio>
  237. </van-radio-group>
  238. </template>
  239. </van-field>
  240. <van-field name="item15" label="地块数是否与证书一致" label-width="200px">
  241. <template #input>
  242. <van-radio-group v-model="xcdcform.item15" direction="horizontal">
  243. <van-radio name="Y">是</van-radio>
  244. <van-radio name="N">否</van-radio>
  245. </van-radio-group>
  246. </template>
  247. </van-field>
  248. <van-field name="item16" label="面积是否与证书一致" label-width="200px">
  249. <template #input>
  250. <van-radio-group v-model="xcdcform.item16" direction="horizontal">
  251. <van-radio name="Y">是</van-radio>
  252. <van-radio name="N">否</van-radio>
  253. </van-radio-group>
  254. </template>
  255. </van-field>
  256. <van-field name="item17" label="期限是否与证书一致" label-width="200px">
  257. <template #input>
  258. <van-radio-group v-model="xcdcform.item17" direction="horizontal">
  259. <van-radio name="Y">是</van-radio>
  260. <van-radio name="N">否</van-radio>
  261. </van-radio-group>
  262. </template>
  263. </van-field>
  264. <van-field name="item18" label="承包合同编号是否正确" label-width="200px">
  265. <template #input>
  266. <van-radio-group v-model="xcdcform.item18" direction="horizontal">
  267. <van-radio name="Y">是</van-radio>
  268. <van-radio name="N">否</van-radio>
  269. </van-radio-group>
  270. </template>
  271. </van-field>
  272. <van-field
  273. v-model="xcdcform.checkedBy"
  274. name="checkedBy"
  275. label="检查人"
  276. label-width="120px"
  277. placeholder="检查人"
  278. :rules="[{ required: true, message: '请填写检查人' }]"
  279. />
  280. <van-field
  281. v-model="xcdcform.fileName"
  282. name="fileName"
  283. label="影像文件名称"
  284. label-width="120px"
  285. placeholder="影像文件名称"
  286. :rules="[{ required: true, message: '请填写影像文件名称' }]"
  287. />
  288. <van-field
  289. v-model="xcdcform.fileTime"
  290. name="fileTime"
  291. label="影像起始时间"
  292. label-width="120px"
  293. placeholder="影像起始时间"
  294. @click="showPop"
  295. :rules="[{ required: true, message: '请填写影像起始时间' }]"
  296. >
  297. </van-field>
  298. <van-popup v-model="showDate" position="bottom" :style="{ height: '40%' }">
  299. <van-datetime-picker v-model="currentValue" type="datetime" @change="changeFn()" @confirm="confirmFn()" @cancel="cancelFn()"/>
  300. </van-popup>
  301. <div style="margin: 16px;">
  302. <van-button round block type="info" native-type="submit">提交</van-button>
  303. </div>
  304. </van-form>
  305. </van-action-sheet>
  306. <van-action-sheet v-model="showDHDC" title="电话调查">
  307. <van-form @submit="onSubmitDHDC">
  308. <van-field
  309. v-model="dhdcform.countName"
  310. name="countName"
  311. label="县(区)"
  312. label-width="120px"
  313. placeholder="县(区)"
  314. :rules="[{ required: true, message: '请填写县(区)' }]"
  315. />
  316. <van-field
  317. v-model="dhdcform.townName"
  318. name="townName"
  319. label="乡(镇、街)"
  320. label-width="120px"
  321. placeholder="乡(镇、街)"
  322. :rules="[{ required: true, message: '请填写乡(镇、街)' }]"
  323. />
  324. <van-field
  325. v-model="dhdcform.villageName"
  326. name="villageName"
  327. label="经联社"
  328. label-width="120px"
  329. placeholder="经联社"
  330. :rules="[{ required: true, message: '请填写经联社' }]"
  331. />
  332. <van-field
  333. v-model="dhdcform.cooperativeName"
  334. name="cooperativeName"
  335. label="经济社(小组)"
  336. label-width="120px"
  337. placeholder="经济社(小组))"
  338. :rules="[{ required: true, message: '请填写经济社(小组))' }]"
  339. />
  340. <van-field
  341. v-model="dhdcform.farmerName"
  342. name="farmerName"
  343. label="抽查户主名称"
  344. label-width="120px"
  345. placeholder="抽查户主名称"
  346. :rules="[{ required: true, message: '请填写抽查户主名称' }]"
  347. />
  348. <van-field
  349. v-model="dhdcform.originalNameCheckedBy"
  350. name="originalNameCheckedBy"
  351. label="原抽查户主姓名"
  352. label-width="120px"
  353. placeholder="原抽查户主姓名"
  354. />
  355. <van-field
  356. v-model="dhdcform.callPhone"
  357. name="callPhone"
  358. label="主叫号码"
  359. label-width="120px"
  360. placeholder="主叫号码"
  361. :rules="[{ required: true, message: '请填写主叫号码' }]"
  362. />
  363. <van-field
  364. v-model="dhdcform.calledPhone"
  365. name="calledPhone"
  366. label="被叫号码"
  367. label-width="120px"
  368. placeholder="被叫号码"
  369. :rules="[{ required: true, message: '请填写被叫号码' }]"
  370. />
  371. <h2 class="van-doc-demo-block__title">农村土地承包经营权证</h2>
  372. <van-field name="item1" label="是否有证书">
  373. <template #input>
  374. <van-radio-group v-model="dhdcform.item1" direction="horizontal">
  375. <van-radio name="Y">是</van-radio>
  376. <van-radio name="N">否</van-radio>
  377. </van-radio-group>
  378. </template>
  379. </van-field>
  380. <h2 class="van-doc-demo-block__title">农村土地承合同</h2>
  381. <van-field name="item10" label="是否保存合同">
  382. <template #input>
  383. <van-radio-group v-model="dhdcform.item10" direction="horizontal">
  384. <van-radio name="Y">是</van-radio>
  385. <van-radio name="N">否</van-radio>
  386. </van-radio-group>
  387. </template>
  388. </van-field>
  389. <van-field
  390. v-model="dhdcform.checkedBy"
  391. name="checkedBy"
  392. label="检查人"
  393. label-width="120px"
  394. placeholder="检查人"
  395. :rules="[{ required: true, message: '请填写检查人' }]"
  396. />
  397. <van-field
  398. v-model="dhdcform.fileName"
  399. name="fileName"
  400. label="影像文件名称"
  401. label-width="120px"
  402. placeholder="影像文件名称"
  403. :rules="[{ required: true, message: '请填写影像文件名称' }]"
  404. />
  405. <van-field
  406. v-model="dhdcform.fileTime"
  407. name="fileTime"
  408. label="影像起始时间"
  409. label-width="120px"
  410. @click="showPop1"
  411. placeholder="影像起始时间"
  412. :rules="[{ required: true, message: '请填写影像起始时间' }]"
  413. >
  414. </van-field>
  415. <van-popup v-model="showDate1" position="bottom" :style="{ height: '40%' }">
  416. <van-datetime-picker v-model="currentValue" type="datetime" @change="changeFn()" @confirm="confirmFn()" @cancel="cancelFn()"/>
  417. </van-popup>
  418. <div style="margin: 16px;">
  419. <van-button round block type="info" native-type="submit">提交</van-button>
  420. </div>
  421. </van-form>
  422. </van-action-sheet>
  423. <van-action-sheet v-model="show" title="基础数据">
  424. <van-form @submit="onSubmit">
  425. <van-field
  426. v-model="queryform.countName"
  427. name="countName"
  428. label="县(区)"
  429. label-width="120px"
  430. placeholder="县(区)"
  431. :rules="[{ required: true, message: '请填写县(区)' }]"
  432. />
  433. <van-field
  434. v-model="queryform.townName"
  435. name="townName"
  436. label="乡(镇、街)"
  437. label-width="120px"
  438. placeholder="乡(镇、街)"
  439. :rules="[{ required: true, message: '请填写乡(镇、街)' }]"
  440. />
  441. <van-field
  442. v-model="queryform.villageName"
  443. name="villageName"
  444. label="经联社"
  445. label-width="120px"
  446. placeholder="经联社"
  447. :rules="[{ required: true, message: '请填写经联社' }]"
  448. />
  449. <van-field
  450. v-model="queryform.cooperativeName"
  451. name="cooperativeName"
  452. label="经济社(小组)"
  453. label-width="120px"
  454. placeholder="经济社(小组))"
  455. :rules="[{ required: true, message: '请填写经济社(小组))' }]"
  456. />
  457. <van-field
  458. v-model="queryform.farmerName"
  459. name="farmerName"
  460. label="抽查户主名称"
  461. label-width="120px"
  462. placeholder="抽查户主名称"
  463. :rules="[{ required: true, message: '请填写抽查户主名称' }]"
  464. />
  465. <div style="margin: 16px;">
  466. <van-button round block type="info" native-type="submit">提交</van-button>
  467. </div>
  468. </van-form>
  469. </van-action-sheet>
  470. </div>
  471. </template>
  472. <script>
  473. import {
  474. addInvestigate,
  475. addSampling,
  476. delSampling,
  477. getInvestigate,
  478. listSampling, listSamplingDept,
  479. updateInvestigate,
  480. updateSampling, uploadFile
  481. } from "../../api/authenticRight";
  482. import {getDeptList} from "../../api/biddingHall";
  483. import {Dialog} from "vant";
  484. import {getInfo} from "@/api/login/index";
  485. import {getNowFormatDate} from "../../utils/utils";
  486. export default {
  487. name: "authenticRightApply",
  488. data() {
  489. return {
  490. showDate:false,
  491. showDate1 : false,
  492. value1:0,
  493. option1:[{ text: '请选择区县', value: 0 }],
  494. value11:0,
  495. option11:[{ text: '请选择乡镇', value: 0 }],
  496. value2:0,
  497. option2:[{ text: '请选择村级', value: 0 }],
  498. value22:0,
  499. option22:[{ text: '请选择合作社', value: 0 }],
  500. loading: false,
  501. finished: false,
  502. refreshing: false,
  503. value:"",
  504. show:false,
  505. showXCDC:false,
  506. showDHDC:false,
  507. radio: '1',
  508. username: '',
  509. password: '',
  510. queryParams:{
  511. // 分页
  512. pageNum: 1,
  513. pageSize: 10,
  514. // 查询排序
  515. //orderByColumn: "id",
  516. //isAsc: "desc",
  517. countName: null,
  518. townName: null,
  519. villageName: null,
  520. cooperativeName: null,
  521. farmerName: null,
  522. status: null,
  523. id: null,
  524. },
  525. samplingList:[
  526. ],
  527. queryform:{
  528. // 分页
  529. pageNum: 1,
  530. pageSize: 10,
  531. // 查询排序
  532. //orderByColumn: "id",
  533. //isAsc: "desc",
  534. countName: null,
  535. townName: null,
  536. villageName: null,
  537. cooperativeName: null,
  538. farmerName: null,
  539. status: null,
  540. id: null,
  541. },
  542. xcdcform:{
  543. countName: null,
  544. townName: null,
  545. villageName: null,
  546. cooperativeName: null,
  547. farmerName: null,
  548. status: null,
  549. callPhone: null,
  550. calledPhone: null,
  551. checkedBy: null,
  552. createBy: null,
  553. createTime: null,
  554. fileName: null,
  555. fileTime: null,
  556. id: null,
  557. idcardCheckedBy: null,
  558. item1: '',
  559. item2: '',
  560. item3: '',
  561. item4: '',
  562. item5: '',
  563. item6: '',
  564. item7: '',
  565. item8: '',
  566. item9: '',
  567. item10: '',
  568. item11: '',
  569. item12: '',
  570. item13: '',
  571. item14: '',
  572. item15: '',
  573. item16: '',
  574. item17: '',
  575. item18: '',
  576. lackCount: null,
  577. originalNameCheckedBy: null,
  578. nameCheckedBy: null,
  579. params: null,
  580. samplingId: null,
  581. searchValue: null,
  582. },
  583. dhdcform:{
  584. callPhone: null,
  585. calledPhone: null,
  586. checkedBy: null,
  587. createBy: null,
  588. createTime: null,
  589. fileName: null,
  590. fileTime: null,
  591. id: null,
  592. idcardCheckedBy: null,
  593. item1: null,
  594. item10: null,
  595. lackCount: null,
  596. originalNameCheckedBy: null,
  597. nameCheckedBy: null,
  598. params: null,
  599. samplingId: null,
  600. searchValue: null,
  601. countName: null,
  602. townName: null,
  603. villageName: null,
  604. cooperativeName: null,
  605. farmerName: null,
  606. status: null,
  607. },
  608. show1: false,
  609. fieldValue: '',
  610. cascaderValue: '',
  611. options: [
  612. ],
  613. userId :null,
  614. nickName:null,
  615. currentValue:null,
  616. fileList:[]
  617. }
  618. },
  619. created(){
  620. listSamplingDept(this.queryParams).then(res => {
  621. if(res.data){
  622. this.option1=[{ text: '请选择区县', value: 0 }]
  623. res.data.map(item => {
  624. this.option1.push({ "text":item.countName,"value": item.countName})
  625. })
  626. }
  627. })
  628. getInfo().then(response => {
  629. this.userId = response.user.userId
  630. this.nickName = response.user.nickName
  631. });
  632. },
  633. methods:{
  634. afterRead(file) {
  635. const data = new FormData();
  636. data.append("file", this.fileList[0].file);
  637. uploadFile(data).then(res => {
  638. if(res.code == 200){
  639. this.xcdcform.idcardCheckedBy = res.idcardCheckedBy
  640. this.xcdcform.nameCheckedBy = res.nameCheckedBy
  641. this.xcdcform["fileUrl"] = res.url
  642. }
  643. })
  644. this.fileList = []
  645. },
  646. changeFn(val) {
  647. },
  648. confirmFn(){
  649. this.xcdcform.fileTime = getNowFormatDate(this.currentValue)
  650. this.dhdcform.fileTime = getNowFormatDate(this.currentValue)
  651. this.showDate = false;
  652. this.showDate1 = false;
  653. },
  654. cancelFn(){
  655. this.showDate = false;
  656. this.showDate1 = false;
  657. }
  658. ,
  659. showPop(){
  660. this.showDate = true;
  661. },
  662. showPop1(){
  663. this.showDate1 = true;
  664. },
  665. changeDept(val){
  666. if(val==1){
  667. this.queryParams.countName = this.value1
  668. this.queryParams.townName = null
  669. this.queryParams.villageName = null
  670. this.queryParams.cooperativeName = null
  671. listSamplingDept(this.queryParams).then(res => {
  672. if(res.data){
  673. this.option11=[{ text: '请选择乡镇', value: 0 }]
  674. res.data.map(item => {
  675. this.option11.push({ "text":item.townName,"value": item.townName})
  676. })
  677. this.value11=0
  678. this.value2=0
  679. this.value22=0
  680. }
  681. })
  682. }else if(val==2){
  683. this.queryParams.countName = this.value1
  684. this.queryParams.townName = this.value11
  685. this.queryParams.villageName = null
  686. this.queryParams.cooperativeName = null
  687. listSamplingDept(this.queryParams).then(res => {
  688. if(res.data){
  689. this.option2=[{ text: '请选择村级', value: 0 }]
  690. res.data.map(item => {
  691. this.option2.push({ "text":item.villageName,"value": item.villageName})
  692. })
  693. this.value2=0
  694. this.value22=0
  695. }
  696. })
  697. }else if(val==3){
  698. this.queryParams.countName = this.value1
  699. this.queryParams.townName = this.value11
  700. this.queryParams.villageName = this.value2
  701. this.queryParams.cooperativeName = null
  702. listSamplingDept(this.queryParams).then(res => {
  703. if(res.data){
  704. this.option22=[{ text: '请选择合作社', value: 0 }]
  705. res.data.map(item => {
  706. this.option22.push({ "text":item.cooperativeName,"value": item.cooperativeName})
  707. })
  708. this.value22=0
  709. }
  710. })
  711. }else if(val==4){
  712. this.queryParams.countName = this.value1
  713. this.queryParams.townName = this.value11
  714. this.queryParams.villageName = this.value2
  715. this.queryParams.cooperativeName = this.value22
  716. this.getList()
  717. }
  718. },
  719. reset(){
  720. this.queryform={
  721. pageNum: 1,
  722. pageSize: 10,
  723. // 查询排序
  724. //orderByColumn: "id",
  725. //isAsc: "desc",
  726. countName: null,
  727. townName: null,
  728. villageName: null,
  729. cooperativeName: null,
  730. status: null,
  731. id: null,
  732. }
  733. this.xcdcform={
  734. countName: null,
  735. townName: null,
  736. villageName: null,
  737. cooperativeName: null,
  738. farmerName: null,
  739. status: null,
  740. callPhone: null,
  741. calledPhone: null,
  742. checkedBy: null,
  743. createBy: null,
  744. createTime: null,
  745. fileName: null,
  746. fileTime: null,
  747. id: null,
  748. idcardCheckedBy: null,
  749. item1: '',
  750. item2: '',
  751. item3: '',
  752. item4: '',
  753. item5: '',
  754. item6: '',
  755. item7: '',
  756. item8: '',
  757. item9: '',
  758. item10: '',
  759. item11: '',
  760. item12: '',
  761. item13: '',
  762. item14: '',
  763. item15: '',
  764. item16: '',
  765. item17: '',
  766. item18: '',
  767. lackCount: null,
  768. originalNameCheckedBy: null,
  769. nameCheckedBy: null,
  770. params: null,
  771. samplingId: null,
  772. searchValue: null,
  773. updateBy: null,
  774. };
  775. this.dhdcform={
  776. countName: null,
  777. townName: null,
  778. villageName: null,
  779. cooperativeName: null,
  780. farmerName: null,
  781. status: null,
  782. callPhone: null,
  783. calledPhone: null,
  784. checkedBy: null,
  785. createBy: null,
  786. createTime: null,
  787. fileName: null,
  788. fileTime: null,
  789. id: null,
  790. idcardCheckedBy: null,
  791. item1: null,
  792. item10: null,
  793. lackCount: null,
  794. originalNameCheckedBy: null,
  795. nameCheckedBy: null,
  796. params: null,
  797. samplingId: null,
  798. searchValue: null,
  799. updateBy: null,
  800. }
  801. },
  802. onClickRight() {
  803. this.show = true
  804. this.queryform = this.queryParams
  805. },
  806. onSearch() {
  807. },
  808. onChange({ value }) {
  809. this.options.map(i => {
  810. if (value === i.value) {
  811. getDeptList(value).then(response => {
  812. if(response.data.length>0){
  813. i.children=[]
  814. response.data.map(item => {
  815. i.children.push({ text: item.deptName,value:item.deptId});
  816. });
  817. }
  818. });
  819. }
  820. })
  821. },
  822. removeRow(id,index){
  823. let _this = this
  824. Dialog.confirm({
  825. title: '删除',
  826. message: '删除后数据无法恢复,确认要删除么?'
  827. }).then(() => {
  828. delSampling(id).then(res => {
  829. this.$toast({
  830. icon: 'success', // 找到自己需要的图标
  831. message: '删除成功',
  832. duration:"1000",
  833. onClose:function(){
  834. _this.getList();
  835. }
  836. })
  837. })
  838. }).catch(() => {
  839. // on cancel
  840. });
  841. },
  842. onFinish({ selectedOptions }) {
  843. this.show1 = false;
  844. this.fieldValue = selectedOptions.map((option) => option.text).join('/');
  845. },
  846. /** 判断是否有证书 */
  847. haveCertificate(id){
  848. if(id == "1"){
  849. if(this.xcdcform.item1=='N'){
  850. this.xcdcform.item2 = 'N'
  851. this.xcdcform.item3 = 'N'
  852. this.xcdcform.item4 = 'N'
  853. this.xcdcform.item5 = 'N'
  854. this.xcdcform.item8 = 'N'
  855. this.xcdcform.item9 = 'N'
  856. }
  857. }if(id == "2") {
  858. if(this.xcdcform.item10=='N'){
  859. this.xcdcform.item11 = 'N'
  860. this.xcdcform.item12 = 'N'
  861. this.xcdcform.item13 = 'N'
  862. this.xcdcform.item14 = 'N'
  863. this.xcdcform.item15 = 'N'
  864. this.xcdcform.item16 = 'N'
  865. this.xcdcform.item17 = 'N'
  866. this.xcdcform.item18 = 'N'
  867. }
  868. }
  869. },
  870. selectType(val,data,index){
  871. console.log(this.nickName,this.userId)
  872. if(val==1){
  873. let _this = this
  874. let a ={
  875. "countName": data.countName,
  876. "townName": data.townName,
  877. "villageName": data.villageName,
  878. "cooperativeName": data.cooperativeName,
  879. "status": "1",
  880. "id": data.id
  881. }
  882. a.status = "1"
  883. updateSampling(a).then(res => {
  884. this.$toast({
  885. icon: 'success', // 找到自己需要的图标
  886. message: '修改成功',
  887. duration:"1000",
  888. onClose:function(){
  889. _this.getList();
  890. }
  891. })
  892. })
  893. }else if(val==3){
  894. this.reset();
  895. this.showXCDC=true
  896. getInvestigate(data.id).then(res => {
  897. if(res.data){
  898. this.xcdcform = res.data
  899. this.xcdcform["countName"] = data.countName
  900. this.xcdcform["townName"] = data.townName
  901. this.xcdcform["villageName"] = data.villageName
  902. this.xcdcform["cooperativeName"] = data.cooperativeName
  903. this.xcdcform["farmerName"] = data.farmerName
  904. }else{
  905. this.xcdcform["countName"] = data.countName
  906. this.xcdcform["townName"] = data.townName
  907. this.xcdcform["villageName"] = data.villageName
  908. this.xcdcform["cooperativeName"] = data.cooperativeName
  909. this.xcdcform["farmerName"] = data.farmerName
  910. this.xcdcform["samplingId"] = data.id
  911. this.xcdcform["fileName"] = data.townName+data.villageName
  912. this.xcdcform["checkedBy"] = this.nickName
  913. this.xcdcform["fileTime"] = getNowFormatDate()
  914. }
  915. })
  916. }else if(val==2){
  917. this.reset();
  918. this.showDHDC=true
  919. getInvestigate(data.id).then(res => {
  920. if(res.data){
  921. this.dhdcform = res.data
  922. this.dhdcform["countName"] = data.countName
  923. this.dhdcform["townName"] = data.townName
  924. this.dhdcform["villageName"] = data.villageName
  925. this.dhdcform["cooperativeName"] = data.cooperativeName
  926. this.dhdcform["farmerName"] = data.farmerName
  927. }else{
  928. this.dhdcform["countName"] = data.countName
  929. this.dhdcform["townName"] = data.townName
  930. this.dhdcform["villageName"] = data.villageName
  931. this.dhdcform["cooperativeName"] = data.cooperativeName
  932. this.dhdcform["farmerName"] = data.farmerName
  933. this.dhdcform["samplingId"] = data.id
  934. this.dhdcform["fileName"] = data.townName+data.villageName
  935. this.dhdcform["checkedBy"] = this.nickName
  936. this.dhdcform["fileTime"] = getNowFormatDate()
  937. }
  938. })
  939. }
  940. },
  941. onSubmit(values) {
  942. this.queryform["createBy"] = this.userId
  943. this.queryform["createTime"] = getNowFormatDate()
  944. addSampling(this.queryform).then(res => {
  945. this.show = false
  946. this.getList();
  947. })
  948. },
  949. onSubmitXCDC(values) {
  950. this.xcdcform["createBy"] = this.userId
  951. this.xcdcform["createTime"] = getNowFormatDate()
  952. this.xcdcform["updateBy"] = this.userId
  953. this.xcdcform["updateTime"] = getNowFormatDate()
  954. let i = 0
  955. if(this.xcdcform.item1=='N'){
  956. i++
  957. }if(this.xcdcform.item2=='N'){
  958. i++
  959. }if(this.xcdcform.item3=='N'){
  960. i++
  961. }if(this.xcdcform.item4=='N'){
  962. i++
  963. }if(this.xcdcform.item5=='N'){
  964. i++
  965. }if(this.xcdcform.item8=='N'){
  966. i++
  967. }if(this.xcdcform.item9=='N'){
  968. i++
  969. }if(this.xcdcform.item10=='N'){
  970. i++
  971. }if(this.xcdcform.item11=='N'){
  972. i++
  973. }if(this.xcdcform.item12=='N'){
  974. i++
  975. }if(this.xcdcform.item13=='N'){
  976. i++
  977. }if(this.xcdcform.item14=='N'){
  978. i++
  979. }if(this.xcdcform.item15=='N'){
  980. i++
  981. }if(this.xcdcform.item16=='N'){
  982. i++
  983. }if(this.xcdcform.item17=='N'){
  984. i++
  985. }if(this.xcdcform.item18=='N'){
  986. i++
  987. }
  988. this.xcdcform["lackCount"] = i
  989. console.log(this.xcdcform)
  990. if(this.xcdcform.id){
  991. updateInvestigate(this.xcdcform).then(res => {
  992. this.showXCDC = false
  993. let _this = this
  994. this.xcdcform.status = "2"
  995. this.xcdcform.id = this.xcdcform.samplingId
  996. updateSampling(this.xcdcform).then(res => {
  997. _this.reset()
  998. this.$toast({
  999. icon: 'success', // 找到自己需要的图标
  1000. message: '修改成功',
  1001. duration:"1000",
  1002. onClose:function(){
  1003. _this.getList();
  1004. }
  1005. })
  1006. })
  1007. })
  1008. }else {
  1009. addInvestigate(this.xcdcform).then(res => {
  1010. this.showXCDC = false
  1011. let _this = this
  1012. this.xcdcform.status = "2"
  1013. this.xcdcform.id = this.xcdcform.samplingId
  1014. updateSampling(this.xcdcform).then(res => {
  1015. _this.reset()
  1016. this.$toast({
  1017. icon: 'success', // 找到自己需要的图标
  1018. message: '保存成功',
  1019. duration:"1000",
  1020. onClose:function(){
  1021. _this.getList();
  1022. }
  1023. })
  1024. })
  1025. })
  1026. }},
  1027. onSubmitDHDC(values) {
  1028. this.dhdcform["createBy"] = this.userId
  1029. this.dhdcform["createTime"] = getNowFormatDate()
  1030. this.dhdcform["updateBy"] = this.userId
  1031. this.dhdcform["updateTime"] = getNowFormatDate()
  1032. if(this.dhdcform.id){
  1033. updateInvestigate(this.dhdcform).then(res => {
  1034. this.showDHDC = false
  1035. let _this = this
  1036. this.dhdcform.status = "3"
  1037. this.dhdcform.id = this.dhdcform.samplingId
  1038. updateSampling(this.dhdcform).then(res => {
  1039. _this.reset()
  1040. this.$toast({
  1041. icon: 'success', // 找到自己需要的图标
  1042. message: '修改成功',
  1043. duration:"1000",
  1044. onClose:function(){
  1045. _this.getList();
  1046. }
  1047. })
  1048. })
  1049. })
  1050. }else {
  1051. addInvestigate(this.dhdcform).then(res => {
  1052. this.showDHDC = false
  1053. let _this = this
  1054. this.dhdcform.status = "3"
  1055. this.dhdcform.id = this.dhdcform.samplingId
  1056. updateSampling(this.dhdcform).then(res => {
  1057. _this.reset()
  1058. this.$toast({
  1059. icon: 'success', // 找到自己需要的图标
  1060. message: '保存成功',
  1061. duration:"1000",
  1062. onClose:function(){
  1063. _this.getList();
  1064. }
  1065. })
  1066. })
  1067. })
  1068. }
  1069. },
  1070. getList(){
  1071. this.queryParams["farmerName"] = null
  1072. listSampling(this.queryParams).then(response => {
  1073. if(response.rows.length>0){
  1074. response.rows.map(item => {
  1075. if(item.status==0){
  1076. item.status="未调查"
  1077. }else if(item.status==1){
  1078. item.status="被替补"
  1079. }else if(item.status==2){
  1080. item.status="现场调查"
  1081. }else if(item.status==3){
  1082. item.status="电话调查"
  1083. }
  1084. })
  1085. this.samplingList = response.rows;
  1086. this.loading = false;
  1087. }
  1088. });
  1089. },
  1090. onL() {
  1091. this.refreshing = true;
  1092. this.loading = false;
  1093. this.refreshing = false;
  1094. },
  1095. onRefresh() {
  1096. // 清空列表数据
  1097. this.finished = false;
  1098. // 重新加载数据
  1099. // 将 loading 设置为 true,表示处于加载状态
  1100. this.loading = true;
  1101. this.onL();
  1102. },
  1103. },
  1104. }
  1105. </script>
  1106. <style scoped>
  1107. .van-doc-demo-block__title {
  1108. margin: 0;
  1109. padding: 32px 16px 16px;
  1110. color: rgba(69, 90, 100, 0.6);
  1111. font-weight: normal;
  1112. font-size: 14px;
  1113. line-height: 16px;
  1114. }
  1115. </style>