index.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
  1. <template>
  2. <view class="fillin-container">
  3. <title-status />
  4. <h-navbar title="安全事件填报" />
  5. <nav-button :menus="menuDatas[stepIndex]" @itemClick="menuClick"></nav-button>
  6. <view class="steps-layout">
  7. <view class="steps">
  8. <u-steps :current="stepIndex" inactiveColor="#DDDDDD" dot>
  9. <u-steps-item title="事件基本情况"></u-steps-item>
  10. <u-steps-item title="行为人/单位"></u-steps-item>
  11. </u-steps>
  12. </view>
  13. </view>
  14. <u-form
  15. labelPosition="left"
  16. ref="uForm"
  17. :labelStyle="labelStyle"
  18. labelWidth="100"
  19. :model="formData"
  20. :rules="rules">
  21. <template v-if="stepIndex === 0">
  22. <view class="prompt">事件详情</view>
  23. <u-form-item
  24. label="查获类型"
  25. required
  26. prop="queryThing"
  27. borderBottom>
  28. <u-radio-group v-model="formData.queryThing">
  29. <u-radio
  30. :customStyle="{marginRight: '46rpx'}"
  31. label="Ⅰ类事件"
  32. :name="1">
  33. </u-radio>
  34. <u-radio
  35. label="Ⅱ类事件"
  36. :name="2">
  37. </u-radio>
  38. </u-radio-group>
  39. </u-form-item>
  40. <u-form-item
  41. label="违规所属"
  42. required
  43. prop="violationType"
  44. borderBottom>
  45. <u-radio-group v-model="formData.violationType">
  46. <u-radio
  47. :customStyle="{marginRight: '46rpx'}"
  48. label="旅客"
  49. :name="1">
  50. </u-radio>
  51. <u-radio
  52. :customStyle="{marginRight: '46rpx'}"
  53. label="货代"
  54. :name="2">
  55. </u-radio>
  56. <u-radio
  57. label="工作人员"
  58. :name="3">
  59. </u-radio>
  60. </u-radio-group>
  61. </u-form-item>
  62. <u-form-item
  63. label="事件类型"
  64. prop="safeThingsType.safeThingsTypeId"
  65. labelWidth="90"
  66. @click="gotoSelectSafeThingsType"
  67. required
  68. borderBottom>
  69. <view class="form-item-body-right-content">
  70. <view class="placeholder" v-if="!formData.safeThingsType || Object.keys(formData.safeThingsType).length <= 0 || !formData.safeThingsType.safeThingsTypeId">请选择事件类型</view>
  71. <view v-else class="text-one">{{ formData.safeThingsType.value }}</view>
  72. </view>
  73. <u-icon slot="right" name="arrow-right"></u-icon>
  74. </u-form-item>
  75. <u-form-item
  76. label="事件标题"
  77. prop="thingTitle"
  78. required
  79. borderBottom>
  80. <u-input
  81. v-model="formData.thingTitle"
  82. inputAlign="right"
  83. placeholder="请输入事件标题"
  84. border="none"/>
  85. </u-form-item>
  86. <u-form-item
  87. label="查获时间"
  88. prop="queryTime"
  89. @click="clickShowDate(1)"
  90. required
  91. borderBottom>
  92. <view class="form-item-body-right-content">
  93. <view class="placeholder" v-if="!formData.queryTime">请选择时间</view>
  94. <view v-else>{{ formData.queryTime }}</view>
  95. </view>
  96. <u-icon slot="right" name="arrow-right"></u-icon>
  97. </u-form-item>
  98. <template v-if="formData.violationType === 1 || formData.violationType === 3">
  99. <u-form-item
  100. label="查获位置"
  101. prop="safeThingsPlace"
  102. required
  103. :borderBottom="!formData.safeThingsPlace">
  104. <view class="form-item-body-right-content">
  105. <u-button type="primary" size="small" shape="circle" text="编辑" @click="gotoSelectCheckBox(1)"></u-button>
  106. </view>
  107. </u-form-item>
  108. <view class="form-select-content" v-if="formData.safeThingsPlace">
  109. {{ formData.safeThingsPlace | safeThingsPlaceFormat }}
  110. </view>
  111. </template>
  112. <template v-else-if="formData.violationType === 2">
  113. <u-form-item
  114. label="查获位置"
  115. prop="behaviorThingsPlaceVo"
  116. required
  117. :borderBottom="!(formData.behaviorThingsPlaceVo && formData.behaviorThingsPlaceVo.checkPoint && formData.behaviorThingsPlaceVo.postName)">
  118. <view class="form-item-body-right-content">
  119. <u-button type="primary" size="small" shape="circle" text="编辑" @click="gotoHuoDaiPage(1)"></u-button>
  120. </view>
  121. </u-form-item>
  122. <view class="form-select-content" v-if="formData.behaviorThingsPlaceVo && formData.behaviorThingsPlaceVo.checkPoint && formData.behaviorThingsPlaceVo.postName">
  123. 货检 {{ formData.behaviorThingsPlaceVo.checkPoint || '' }} {{ formData.behaviorThingsPlaceVo.postName || '' }} 岗位
  124. </view>
  125. </template>
  126. <u-form-item
  127. label="查获地点"
  128. prop="safeThingsAddress.safeThingsAddressId"
  129. @click="showPicker('safeThingsAddress')"
  130. borderBottom>
  131. <view class="form-item-body-right-content">
  132. <view class="placeholder" v-if="!formData.safeThingsAddress.safeThingsAddressId">请选择查获地点</view>
  133. <view v-else>{{ formData.safeThingsAddress.value }}</view>
  134. </view>
  135. <u-icon slot="right" name="arrow-right"></u-icon>
  136. </u-form-item>
  137. <template v-if="formData.violationType === 1 || formData.violationType === 2 || formData.violationType === 3">
  138. <!-- 旅客 、 货代 、 工作人员 -->
  139. <u-form-item
  140. label="航班号"
  141. prop="flightNumber"
  142. borderBottom>
  143. <u-input
  144. v-model="formData.flightNumber"
  145. inputAlign="right"
  146. placeholder="请输入航班号"
  147. border="none"/>
  148. </u-form-item>
  149. <u-form-item
  150. label="座位号"
  151. prop="seatNumber"
  152. borderBottom>
  153. <u-input
  154. v-model="formData.seatNumber"
  155. inputAlign="right"
  156. placeholder="请输入座位号"
  157. border="none"/>
  158. </u-form-item>
  159. <u-form-item
  160. label="受害对象"
  161. prop="victims"
  162. borderBottom>
  163. <u-input
  164. v-model="formData.victims"
  165. inputAlign="right"
  166. placeholder="请输入受害对象"
  167. border="none"/>
  168. </u-form-item>
  169. <view class="prompt">事件内容</view>
  170. <u-form-item
  171. label="事件起因"
  172. required
  173. prop="thingCause"
  174. borderBottom>
  175. <u-input
  176. v-model="formData.thingCause"
  177. inputAlign="right"
  178. placeholder="请输入事件起因"
  179. border="none"/>
  180. </u-form-item>
  181. <u-form-item
  182. label="事件后果"
  183. required
  184. prop="thingResult"
  185. borderBottom>
  186. <u-input
  187. v-model="formData.thingResult"
  188. inputAlign="right"
  189. placeholder="请输入事件后果"
  190. border="none"/>
  191. </u-form-item>
  192. <u-form-item
  193. :label="`照片(${formData.photoList ? formData.photoList.length : 0}/3)`"
  194. prop="photoList"
  195. labelPosition="top"
  196. required
  197. borderBottom>
  198. <h-upload v-model="formData.photoList" :maxCount="3" display="block" validateField="photoList" />
  199. </u-form-item>
  200. <template v-if="formData.violationType === 1 || formData.violationType === 3">
  201. <u-form-item
  202. label="简要情况"
  203. prop="briefDetails"
  204. required
  205. :borderBottom="!formData.briefDetails">
  206. <view class="form-item-body-right-content">
  207. <u-button type="primary" size="small" shape="circle" text="编辑" @click="gotoSelectCheckBox(2)"></u-button>
  208. </view>
  209. </u-form-item>
  210. <view class="form-select-content" v-if="formData.briefDetails">
  211. {{ formData.briefDetails | briefDetailsFormat }}
  212. </view>
  213. </template>
  214. <template v-if="formData.violationType === 2">
  215. <u-form-item
  216. label="简要情况"
  217. prop="behaviorDescribeVo"
  218. required
  219. :borderBottom="!formData.behaviorDescribeVo">
  220. <view class="form-item-body-right-content">
  221. <u-button type="primary" size="small" shape="circle" text="编辑" @click="gotoHuoDaiPage(2)"></u-button>
  222. </view>
  223. </u-form-item>
  224. <view class="form-select-content" v-if="formData.behaviorDescribeVo">
  225. 在检查(托运人) {{ formData.behaviorDescribeVo.shipper }} 公司,经办人 {{ formData.behaviorDescribeVo.operator }} ,运单号 {{ formData.behaviorDescribeVo.waybillNumber }} ;{{ formData.behaviorDescribeVo.beginningPlace }} 至 {{ formData.behaviorDescribeVo.destination }} 的货物中,发现有可疑物品,经开包确认为 {{ formData.behaviorDescribeVo.suspiciousItems }} 存在 {{ formData.behaviorDescribeVo.suspectedIllegalPoints }} 的违法嫌疑,现将报警单、航空货运单(复印件)及查获的上述相关物品等提供公安机关调查处理。
  226. </view>
  227. </template>
  228. <u-form-item
  229. labelWidth="120"
  230. labelPosition="top"
  231. label="简要经过描述"
  232. prop="thingsDesc"
  233. borderBottom>
  234. <u-textarea
  235. v-model="formData.thingsDesc"
  236. placeholder="请简要描述事件经过~"
  237. border="none"
  238. height="330rpx"
  239. maxlength="200">
  240. </u-textarea>
  241. </u-form-item>
  242. </template>
  243. </template>
  244. <template v-if="stepIndex === 1">
  245. <template v-if="formData.violationType === 1 || formData.violationType === 3">
  246. <!-- 旅客 或 工作人员 -->
  247. <view class="prompt">行为人信息</view>
  248. <u-form-item
  249. :label="`照片(${formData.behaviorPhoto ? formData.behaviorPhoto.length : 0}/1)`"
  250. prop="behaviorPhoto"
  251. required
  252. borderBottom>
  253. <h-upload v-model="formData.behaviorPhoto" :maxCount="1" validateField="behaviorPhoto" />
  254. </u-form-item>
  255. <u-form-item
  256. label="姓名"
  257. required
  258. prop="behaviorName"
  259. borderBottom>
  260. <u-input
  261. v-model="formData.behaviorName"
  262. inputAlign="right"
  263. placeholder="请输入姓名"
  264. border="none"/>
  265. </u-form-item>
  266. <u-form-item
  267. label="性别"
  268. required
  269. prop="behaviorSex"
  270. borderBottom>
  271. <u-radio-group v-model="formData.behaviorSex">
  272. <u-radio
  273. :customStyle="{marginRight: '46rpx'}"
  274. label="男"
  275. name="男">
  276. </u-radio>
  277. <u-radio
  278. label="女"
  279. name="女">
  280. </u-radio>
  281. </u-radio-group>
  282. </u-form-item>
  283. <u-form-item
  284. label="证件类型"
  285. required
  286. prop="behaviorDocumentType"
  287. borderBottom>
  288. <u-input
  289. v-model="formData.behaviorDocumentType"
  290. inputAlign="right"
  291. placeholder="请输入证件类型"
  292. border="none"/>
  293. </u-form-item>
  294. <u-form-item
  295. label="证件号码"
  296. required
  297. prop="behaviorDocumentNumber"
  298. borderBottom>
  299. <u-input
  300. v-model="formData.behaviorDocumentNumber"
  301. inputAlign="right"
  302. placeholder="请输入证件号码"
  303. border="none"/>
  304. </u-form-item>
  305. <u-form-item
  306. label="国籍"
  307. required
  308. prop="behaviorNationality"
  309. borderBottom>
  310. <u-input
  311. v-model="formData.behaviorNationality"
  312. inputAlign="right"
  313. placeholder="请输入国籍"
  314. border="none"/>
  315. </u-form-item>
  316. <u-form-item
  317. label="籍贯"
  318. required
  319. prop="behaviorPlace"
  320. borderBottom>
  321. <u-input
  322. v-model="formData.behaviorPlace"
  323. inputAlign="right"
  324. placeholder="请输入籍贯"
  325. border="none"/>
  326. </u-form-item>
  327. <u-form-item
  328. label="民族"
  329. required
  330. prop="behaviorNation"
  331. borderBottom>
  332. <u-input
  333. v-model="formData.behaviorNation"
  334. inputAlign="right"
  335. placeholder="请输入民族"
  336. border="none"/>
  337. </u-form-item>
  338. <u-form-item
  339. label="出生日期"
  340. prop="behavionBirth"
  341. @click="clickShowDate(2)"
  342. borderBottom>
  343. <view class="form-item-body-right-content">
  344. <view class="placeholder" v-if="!formData.behavionBirth">请选择出生日期</view>
  345. <view v-else>{{ formData.behavionBirth }}</view>
  346. </view>
  347. <u-icon slot="right" name="arrow-right"></u-icon>
  348. </u-form-item>
  349. <u-form-item
  350. label="婚姻状况"
  351. prop="behavionMarriage"
  352. @click="showPicker('behavionMarriage')"
  353. borderBottom>
  354. <view class="form-item-body-right-content">
  355. <view class="placeholder" v-if="!formData.behavionMarriage">请选择婚姻状况</view>
  356. <view v-else>{{ formData.behavionMarriage | behavionMarriageFormat }}</view>
  357. </view>
  358. <u-icon slot="right" name="arrow-right"></u-icon>
  359. </u-form-item>
  360. <u-form-item
  361. label="学历"
  362. prop="behavionEducation"
  363. @click="showPicker('behavionEducation')"
  364. borderBottom>
  365. <view class="form-item-body-right-content">
  366. <view class="placeholder" v-if="!formData.behavionEducation">请选择学历</view>
  367. <view v-else>{{ formData.behavionEducation }}</view>
  368. </view>
  369. <u-icon slot="right" name="arrow-right"></u-icon>
  370. </u-form-item>
  371. <u-form-item
  372. label="职业"
  373. prop="behavionWork"
  374. borderBottom>
  375. <u-input
  376. v-model="formData.behavionWork"
  377. inputAlign="right"
  378. placeholder="请输入职业"
  379. border="none"/>
  380. </u-form-item>
  381. <u-form-item
  382. label="工作单位"
  383. :required="formData.violationType === 3"
  384. prop="behavionCompany"
  385. borderBottom>
  386. <u-input
  387. v-model="formData.behavionCompany"
  388. inputAlign="right"
  389. placeholder="请输入工作单位"
  390. border="none"/>
  391. </u-form-item>
  392. <u-form-item
  393. label="手机号"
  394. required
  395. prop="behavionPhone"
  396. borderBottom>
  397. <u-input
  398. v-model="formData.behavionPhone"
  399. inputAlign="right"
  400. placeholder="请输入手机号"
  401. border="none"/>
  402. </u-form-item>
  403. <u-form-item
  404. label="座机"
  405. prop="behavionLandline"
  406. borderBottom>
  407. <u-input
  408. v-model="formData.behavionLandline"
  409. inputAlign="right"
  410. placeholder="请输入座机"
  411. border="none"/>
  412. </u-form-item>
  413. <u-form-item
  414. label="住址"
  415. prop="behavionAddress"
  416. borderBottom>
  417. <u-input
  418. v-model="formData.behavionAddress"
  419. inputAlign="right"
  420. placeholder="请输入住址"
  421. border="none"/>
  422. </u-form-item>
  423. </template>
  424. <template v-if="formData.violationType === 2">
  425. <!-- 货代 -->
  426. <view class="prompt">行为单位信息</view>
  427. <u-form-item
  428. label="单位名称"
  429. required
  430. prop="goodsCompany"
  431. borderBottom>
  432. <u-input
  433. v-model="formData.goodsCompany"
  434. inputAlign="right"
  435. placeholder="请输入单位名称"
  436. border="none"/>
  437. </u-form-item>
  438. <u-form-item
  439. label="工商备案号"
  440. required
  441. prop="goodsBusinessNumber"
  442. borderBottom>
  443. <u-input
  444. v-model="formData.goodsBusinessNumber"
  445. inputAlign="right"
  446. placeholder="请输入工商备案号"
  447. border="none"/>
  448. </u-form-item>
  449. <u-form-item
  450. label="注册地"
  451. prop="goodsRegistrationPlace"
  452. borderBottom>
  453. <u-input
  454. v-model="formData.goodsRegistrationPlace"
  455. inputAlign="right"
  456. placeholder="请输入注册地"
  457. border="none"/>
  458. </u-form-item>
  459. <u-form-item
  460. label="货单号"
  461. required
  462. prop="goodsNumber"
  463. borderBottom>
  464. <u-input
  465. v-model="formData.goodsNumber"
  466. inputAlign="right"
  467. placeholder="请输入货单号"
  468. border="none"/>
  469. </u-form-item>
  470. <u-form-item
  471. label="法人姓名"
  472. prop="goodsLegalPerson"
  473. borderBottom>
  474. <u-input
  475. v-model="formData.goodsLegalPerson"
  476. inputAlign="right"
  477. placeholder="请输入法人姓名"
  478. border="none"/>
  479. </u-form-item>
  480. <u-form-item
  481. label="法人证件号"
  482. prop="goodsLegalCard"
  483. borderBottom>
  484. <u-input
  485. v-model="formData.goodsLegalCard"
  486. inputAlign="right"
  487. placeholder="请输入法人证件号"
  488. border="none"/>
  489. </u-form-item>
  490. <u-form-item
  491. label="发货人姓名"
  492. prop="goodsSendName"
  493. borderBottom>
  494. <u-input
  495. v-model="formData.goodsSendName"
  496. inputAlign="right"
  497. placeholder="请输入发货人姓名"
  498. border="none"/>
  499. </u-form-item>
  500. <u-form-item
  501. label="发货人电话"
  502. prop="goodsSendPhone"
  503. borderBottom>
  504. <u-input
  505. v-model="formData.goodsSendPhone"
  506. inputAlign="right"
  507. placeholder="请输入发货人电话"
  508. border="none"/>
  509. </u-form-item>
  510. <u-form-item
  511. label="发货人地址"
  512. prop="goodsSendAddress"
  513. borderBottom>
  514. <u-input
  515. v-model="formData.goodsSendAddress"
  516. inputAlign="right"
  517. placeholder="请输入发货人地址"
  518. border="none"/>
  519. </u-form-item>
  520. <u-form-item
  521. label="收货人姓名"
  522. prop="goodsDeliveryName"
  523. borderBottom>
  524. <u-input
  525. v-model="formData.goodsDeliveryName"
  526. inputAlign="right"
  527. placeholder="请输入收货人姓名"
  528. border="none"/>
  529. </u-form-item>
  530. <u-form-item
  531. label="收货人电话"
  532. prop="goodsDeliveryPhone"
  533. borderBottom>
  534. <u-input
  535. v-model="formData.goodsDeliveryPhone"
  536. inputAlign="right"
  537. placeholder="请输入收货人电话"
  538. border="none"/>
  539. </u-form-item>
  540. <u-form-item
  541. label="收货人地址"
  542. prop="goodsDeliveryAddress"
  543. borderBottom>
  544. <u-input
  545. v-model="formData.goodsDeliveryAddress"
  546. inputAlign="right"
  547. placeholder="请输入收货人地址"
  548. border="none"/>
  549. </u-form-item>
  550. </template>
  551. </template>
  552. </u-form>
  553. <view style="height: 160rpx;"></view>
  554. <u-datetime-picker
  555. ref="datePicker"
  556. :show="showDate"
  557. v-model="curDateTime"
  558. :mode="dateType === 1 ? 'datetime' : 'date'"
  559. :minDate="0"
  560. :formatter="formatter"
  561. closeOnClickOverlay
  562. @confirm="dateConfirm"
  563. @cancel="showDate = false"
  564. @close="showDate = false">
  565. </u-datetime-picker>
  566. <u-picker
  567. ref="mPicker"
  568. closeOnClickOverlay
  569. :defaultIndex="[0]"
  570. :show="pickerShow"
  571. keyName="label"
  572. @close="pickerShow = false"
  573. @cancel="pickerShow = false"
  574. @confirm="pickerSelect">
  575. </u-picker>
  576. </view>
  577. </template>
  578. <script>
  579. import { getSafeThingsAddressList, add } from '@/network/module/fill-in.api.js'
  580. import TitleStatus from '@/components/title-status/title-status'
  581. import HNavbar from '@/components/h-navbar/h-navbar.vue'
  582. import NavButton from '@/components/nav-bottom/nav-button.vue'
  583. const briefDetailsTitle1 = '经安全检查,被移交人存在下列第( '
  584. const briefDetailsTitle2 = ' )种疑似违法行为:'
  585. export default {
  586. components: {
  587. TitleStatus,
  588. HNavbar,
  589. NavButton
  590. },
  591. data() {
  592. return {
  593. showDate: false,
  594. curDateTime: Number(new Date()),
  595. dateType: 1, // 时间选择类型:1为查获时间,2为出生日期
  596. pickerShow: false,
  597. pickerType: null,
  598. safeThingsAddressList: [], // 查获地点
  599. isSubmit: false,
  600. stepIndex: 0,
  601. labelStyle: {
  602. fontSize: '30rpx',
  603. color: '#606266',
  604. fontWeight: '400'
  605. },
  606. menuDatas: [
  607. [
  608. {
  609. title: '下一步',
  610. plain: false,
  611. disabled: false,
  612. bgColor: '#4983FB'
  613. }
  614. ],
  615. [
  616. {
  617. title: '上一步',
  618. plain: true,
  619. disabled: false,
  620. bgColor: '#4983FB'
  621. },
  622. {
  623. title: '确定',
  624. plain: false,
  625. disabled: false,
  626. bgColor: '#4983FB'
  627. }
  628. ]
  629. ],
  630. formData: {
  631. // 安全事件Id
  632. safeThingsId: null,
  633. // 查获事件 1-I类事件 2-II类事件
  634. queryThing: null,
  635. // 违规所属 1-旅客 2-货代 3-工作人员
  636. violationType: null,
  637. // 事件类型
  638. safeThingsType: {
  639. safeThingsTypeId: null,
  640. value: null
  641. },
  642. // 事件标题
  643. thingTitle: null,
  644. // 查获时间 格式yyyy-MM-dd HH:mm
  645. queryTime: null,
  646. // 查获位置
  647. safeThingsPlace: null,
  648. // 货代-查获位置
  649. behaviorThingsPlaceVo: {
  650. // 检查通道
  651. checkPoint: null,
  652. // 岗位
  653. postName: null
  654. },
  655. // 查获地点
  656. safeThingsAddress: {
  657. safeThingsAddressId: null,
  658. // 查获地点名称
  659. value: null,
  660. },
  661. // 航班号
  662. flightNumber: null,
  663. // 座位号
  664. seatNumber: null,
  665. // 受害对象
  666. victims: null,
  667. // 事件起因
  668. thingCause: null,
  669. // 事件后果
  670. thingResult: null,
  671. // 多张照片
  672. photoList: null,
  673. // 旅客\工作人员的 简要情况
  674. briefDetails: null,
  675. // 货代 简要情况
  676. behaviorDescribeVo: null,
  677. // 简要经过描述
  678. thingsDesc: null,
  679. /* 旅客、工作人员 */
  680. // 单张图片
  681. behaviorPhoto: null,
  682. // 姓名
  683. behaviorName: null,
  684. // 性别
  685. behaviorSex: null,
  686. // 证件类型
  687. behaviorDocumentType: null,
  688. // 证件号码
  689. behaviorDocumentNumber: null,
  690. // 国籍
  691. behaviorNationality: null,
  692. // 籍贯
  693. behaviorPlace: null,
  694. // 民族
  695. behaviorNation: null,
  696. // 出生日期 格式yyyy-MM-dd
  697. behavionBirth: null,
  698. // 婚姻状况 1-未婚 2-已婚 3-离异 4-丧偶
  699. behavionMarriage: null,
  700. // 学历
  701. behavionEducation: null,
  702. // 职业
  703. behavionWork: null,
  704. // 工作单位
  705. behavionCompany: null,
  706. // 手机号码
  707. behavionPhone: null,
  708. // 座机号
  709. behavionLandline: null,
  710. // 地址
  711. behavionAddress: null,
  712. /* 货代 */
  713. // 单位名称
  714. goodsCompany: null,
  715. // 工商备案号
  716. goodsBusinessNumber: null,
  717. // 注册地
  718. goodsRegistrationPlace: null,
  719. // 货单号
  720. goodsNumber: null,
  721. // 法人姓名
  722. goodsLegalPerson: null,
  723. // 法人证件号
  724. goodsLegalCard: null,
  725. // 发货人姓名
  726. goodsSendName: null,
  727. // 发货人电话
  728. goodsSendPhone: null,
  729. // 发货人地址
  730. goodsSendAddress: null,
  731. // 收货人姓名
  732. goodsDeliveryName: null,
  733. // 收货人电话
  734. goodsDeliveryPhone: null,
  735. // 收货人地址
  736. goodsDeliveryAddress: null
  737. }
  738. }
  739. },
  740. computed: {
  741. rules() {
  742. const rule = {
  743. queryThing: [
  744. {
  745. required: true,
  746. type: 'number',
  747. message: '请选择查获事件',
  748. trigger: 'blur'
  749. }
  750. ],
  751. violationType: [
  752. {
  753. required: true,
  754. type: 'number',
  755. message: '请选择违规所属',
  756. trigger: 'blur'
  757. }
  758. ],
  759. 'safeThingsType.safeThingsTypeId': [
  760. {
  761. required: true,
  762. type: 'number',
  763. message: '请选择事件类型',
  764. trigger: ['change','blur'],
  765. }
  766. ],
  767. thingTitle: [
  768. {
  769. required: true,
  770. whitespace: true,
  771. message: '请输入事件标题',
  772. trigger: ['change','blur'],
  773. }
  774. ],
  775. queryTime: [
  776. {
  777. required: true,
  778. whitespace: true,
  779. message: '请选择查获时间',
  780. trigger: ['change','blur'],
  781. }
  782. ],
  783. safeThingsPlace: [
  784. {
  785. required: true,
  786. type: 'object',
  787. message: '请选择查获位置',
  788. trigger: ['change','blur'],
  789. validator: (rule, value, callback) => {
  790. if(!!value && Object.keys(value).length > 0) {
  791. return true
  792. }
  793. return false
  794. }
  795. }
  796. ],
  797. behaviorThingsPlaceVo: [
  798. {
  799. required: true,
  800. type: 'object',
  801. message: '请选择查获位置',
  802. trigger: ['change','blur'],
  803. validator: (rule, value, callback) => {
  804. if(!!value && Object.keys(value).length > 0) {
  805. if(value.checkPoint && value.postName) {
  806. return true
  807. }
  808. }
  809. return false
  810. }
  811. }
  812. ],
  813. 'safeThingsAddress.safeThingsAddressId': [
  814. {
  815. required: false,
  816. type: 'number',
  817. message: '请选择查获地点',
  818. trigger: ['change','blur'],
  819. }
  820. ],
  821. thingCause: [
  822. {
  823. required: true,
  824. whitespace: true,
  825. message: '请输入事件起因',
  826. trigger: ['change','blur'],
  827. }
  828. ],
  829. thingResult: [
  830. {
  831. required: true,
  832. whitespace: true,
  833. message: '请输入事件后果',
  834. trigger: ['change','blur'],
  835. }
  836. ],
  837. photoList: [
  838. {
  839. required: true,
  840. type: 'array',
  841. message: '请上传照片',
  842. trigger: ['change','blur'],
  843. validator: (rule, value, callback) => {
  844. if(!!value) {
  845. if(value.length > 0) {
  846. return true
  847. }
  848. }
  849. return false
  850. }
  851. }
  852. ],
  853. briefDetails: [
  854. {
  855. required: true,
  856. type: 'object',
  857. message: '请输入简要情况',
  858. trigger: ['change','blur'],
  859. validator: (rule, value, callback) => {
  860. if(!!value && Object.keys(value).length > 0) {
  861. return true
  862. }
  863. return false
  864. }
  865. }
  866. ],
  867. behaviorDescribeVo: [
  868. {
  869. required: true,
  870. type: 'object',
  871. message: '请输入简要情况',
  872. trigger: ['change','blur'],
  873. validator: (rule, value, callback) => {
  874. if(!!value && Object.keys(value).length > 0) {
  875. return true
  876. }
  877. return false
  878. }
  879. }
  880. ],
  881. thingsDesc: [
  882. {
  883. required: false,
  884. whitespace: true,
  885. message: '请简要描述事件经过',
  886. trigger: ['change','blur'],
  887. }
  888. ],
  889. // 旅客、工作人员
  890. behaviorPhoto: [
  891. {
  892. required: true,
  893. type: 'array',
  894. message: '请上传照片',
  895. trigger: ['change','blur'],
  896. validator: (rule, value, callback) => {
  897. if(!!value) {
  898. if(value.length > 0) {
  899. return true
  900. }
  901. }
  902. return false
  903. }
  904. }
  905. ],
  906. behaviorName: [
  907. {
  908. required: true,
  909. whitespace: true,
  910. message: '请输入姓名',
  911. trigger: ['change','blur'],
  912. }
  913. ],
  914. behaviorSex: [
  915. {
  916. required: true,
  917. whitespace: true,
  918. message: '请选择性别',
  919. trigger: ['change','blur'],
  920. }
  921. ],
  922. behaviorDocumentType: [
  923. {
  924. required: true,
  925. whitespace: true,
  926. message: '请输入证件类型',
  927. trigger: ['change','blur'],
  928. }
  929. ],
  930. behaviorDocumentNumber: [
  931. {
  932. required: true,
  933. whitespace: true,
  934. message: '请输入证件号码',
  935. trigger: ['change','blur']
  936. }
  937. ],
  938. behaviorNationality: [
  939. {
  940. required: true,
  941. whitespace: true,
  942. message: '请输入国籍',
  943. trigger: ['change','blur']
  944. }
  945. ],
  946. behaviorPlace: [
  947. {
  948. required: true,
  949. whitespace: true,
  950. message: '请输入籍贯',
  951. trigger: ['change','blur']
  952. }
  953. ],
  954. behaviorNation: [
  955. {
  956. required: true,
  957. whitespace: true,
  958. message: '请输入民族',
  959. trigger: ['change','blur'],
  960. }
  961. ],
  962. behavionCompany: [
  963. {
  964. required: this.formData.violationType === 3 ? true : false,
  965. whitespace: true,
  966. message: '请输入工作单位',
  967. trigger: ['change','blur'],
  968. }
  969. ],
  970. behavionPhone: [
  971. {
  972. required: true,
  973. whitespace: true,
  974. message: '请输入手机号码',
  975. trigger: ['change','blur'],
  976. }
  977. ],
  978. // 货代
  979. goodsCompany: [
  980. {
  981. required: true,
  982. whitespace: true,
  983. message: '请输入单位名称',
  984. trigger: ['change','blur'],
  985. }
  986. ],
  987. goodsBusinessNumber: [
  988. {
  989. required: true,
  990. whitespace: true,
  991. message: '请输入工商备案号',
  992. trigger: ['change','blur'],
  993. }
  994. ],
  995. goodsNumber: [
  996. {
  997. required: true,
  998. whitespace: true,
  999. message: '请输入货单号',
  1000. trigger: ['change','blur'],
  1001. }
  1002. ]
  1003. }
  1004. return rule
  1005. }
  1006. },
  1007. filters: {
  1008. // 旅客、工作人员的 查获位置的filter
  1009. safeThingsPlaceFormat(value) {
  1010. if(value && value.length > 0) {
  1011. let str = '验证:'
  1012. for(let i = 0; i < value.length; i++) {
  1013. str += `(${ value[i].checked ? "√" : " " })${ value[i].value }${ value[i].extra || '' } `
  1014. }
  1015. return str
  1016. }
  1017. return ''
  1018. },
  1019. // 旅客、工作人员的 简要情况
  1020. briefDetailsFormat(value) {
  1021. if(value && value.length > 0) {
  1022. let str = briefDetailsTitle1
  1023. const checkeds = value.filter(item => {
  1024. return item.checked
  1025. })
  1026. if(checkeds && checkeds.length > 0) {
  1027. str += checkeds.map(item => item.key).join(',')
  1028. }
  1029. str += briefDetailsTitle2 + '\n'
  1030. for(let i = 0; i < value.length; i++) {
  1031. str += `${ value[i].value }${ value[i].extra || '' }(${ value[i].checked ? "√" : " " })\n`
  1032. }
  1033. return str
  1034. }
  1035. return ''
  1036. },
  1037. // 婚姻状况 1-未婚 2-已婚 3-离异 4-丧偶
  1038. behavionMarriageFormat(value) {
  1039. if(value === 1) {
  1040. return '未婚'
  1041. } else if(value === 2) {
  1042. return '已婚'
  1043. } else if(value === 3) {
  1044. return '离异'
  1045. } else if(value === 4) {
  1046. return '丧偶'
  1047. } else {
  1048. return ''
  1049. }
  1050. }
  1051. },
  1052. onReady() {
  1053. //onReady 为uni-app支持的生命周期之一
  1054. this.$refs.uForm.setRules(this.rules)
  1055. // 微信小程序需要用此写法
  1056. this.$refs.datePicker.setFormatter(this.formatter)
  1057. },
  1058. onLoad(options) {
  1059. this.getSafeThingsAddressList()
  1060. },
  1061. methods: {
  1062. formatter(type, value) {
  1063. if(type === 'year') {
  1064. return `${value}年`
  1065. } else if(type === 'month') {
  1066. return `${value}月`
  1067. } else if(type === 'day') {
  1068. return `${value}日`
  1069. } else if(type === 'hour') {
  1070. return `${value}时`
  1071. } else if(type === 'minute') {
  1072. return `${value}分`
  1073. } else if(type === 'second') {
  1074. return `${value}秒`
  1075. }
  1076. return value
  1077. },
  1078. clickShowDate(type) {
  1079. uni.hideKeyboard()
  1080. this.dateType = type
  1081. this.showDate = true
  1082. },
  1083. dateConfirm(e) {
  1084. this.showDate = false
  1085. if(this.dateType === 1) {
  1086. // 查获时间
  1087. this.formData.queryTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM')
  1088. } else if(this.dateType === 2) {
  1089. // 出生日期
  1090. this.formData.behavionBirth = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
  1091. }
  1092. this.dateType = 1
  1093. },
  1094. showPicker(type) {
  1095. uni.hideKeyboard()
  1096. this.pickerShow = true
  1097. this.pickerType = type
  1098. if(type === 'safeThingsAddress') {
  1099. // 查获地点
  1100. this.$refs.mPicker.setColumnValues(0, this.safeThingsAddressList)
  1101. } else if(type === 'behavionMarriage') {
  1102. // 婚姻状况
  1103. this.$refs.mPicker.setColumnValues(0, [{id: 1, label: '未婚'}, {id: 2, label: '已婚'}, {id: 3, label: '离异'}, {id: 4, label: '丧偶'}])
  1104. } else if(type === 'behavionEducation') {
  1105. // 学历
  1106. this.$refs.mPicker.setColumnValues(0, ['高中及以下','中专','大专','本科','研究生'])
  1107. }
  1108. },
  1109. pickerSelect(e) {
  1110. this.pickerShow = false
  1111. if(this.pickerType === 'safeThingsAddress') {
  1112. // 查获地点
  1113. this.formData[this.pickerType].safeThingsAddressId = e.value[0].id
  1114. this.formData[this.pickerType].value = e.value[0].label
  1115. } else if(this.pickerType === 'behavionMarriage') {
  1116. // 婚姻状况
  1117. this.formData[this.pickerType] = e.value[0].id
  1118. } else if(this.pickerType === 'behavionEducation') {
  1119. // 学历
  1120. this.formData[this.pickerType] = e.value[0]
  1121. }
  1122. this.pickerType = null
  1123. },
  1124. menuClick(index) {
  1125. if(this.stepIndex === 0) {
  1126. if(index === 0) {
  1127. // 下一步
  1128. let viloationFields = ['queryThing', 'violationType', 'safeThingsType.safeThingsTypeId', 'thingTitle', 'queryTime', 'thingCause', 'thingResult', 'photoList']
  1129. if(this.formData.violationType === 1 || this.formData.violationType === 3) {
  1130. // 旅客、工作人员
  1131. viloationFields = viloationFields.concat(['safeThingsPlace', 'briefDetails']) // 查获位置, 简要情况
  1132. } else if(this.formData.violationType === 2) {
  1133. // 货代
  1134. viloationFields = viloationFields.concat(['behaviorThingsPlaceVo', 'behaviorDescribeVo']) // 查获位置, 简要情况
  1135. }
  1136. this.$refs.uForm.validateField(viloationFields, (err) => {
  1137. if(!err || err.length === 0) {
  1138. this.stepIndex = 1
  1139. }
  1140. })
  1141. }
  1142. } else if(this.stepIndex === 1) {
  1143. if(index === 0) {
  1144. // 上一步
  1145. this.stepIndex = 0
  1146. } else if(index === 1) {
  1147. // 确定
  1148. this.addSubmit()
  1149. }
  1150. }
  1151. },
  1152. // 获取查获地点列表
  1153. getSafeThingsAddressList() {
  1154. getSafeThingsAddressList({loadingText: '正在加载...', hasMsg: true}).then(res => {
  1155. if(res.data && res.data.length > 0) {
  1156. this.safeThingsAddressList = res.data.map(item => {
  1157. return {
  1158. id: item.safeThingsAddressId,
  1159. label: item.safeThingsAddressName
  1160. }
  1161. })
  1162. } else {
  1163. this.safeThingsAddressList = []
  1164. }
  1165. }).catch(error => {
  1166. this.safeThingsAddressList = []
  1167. })
  1168. },
  1169. // 跳转到事件类型选择页面
  1170. gotoSelectSafeThingsType() {
  1171. const that = this
  1172. this.$navigate.navigateToPage(this.$config.route.fillin_safeThingsType, {type: this.formData.safeThingsType ? this.formData.safeThingsType.safeThingsTypeId || '' : '' }, false, {
  1173. changeSuccess(data) {
  1174. if(!data || Object.keys(data).length <= 0) {
  1175. return
  1176. }
  1177. that.formData.safeThingsType = {
  1178. safeThingsTypeId: data.id,
  1179. value: data.name
  1180. }
  1181. }
  1182. })
  1183. },
  1184. // 跳转到 旅客、工作人员 的选择页面
  1185. gotoSelectCheckBox(type) {
  1186. if(!type) {
  1187. return
  1188. }
  1189. const that = this
  1190. let checkboxList = ''
  1191. let title = ''
  1192. let subTitle = ''
  1193. if(type === 1) {
  1194. // 旅客、工作人员的 查获位置
  1195. title = '查获位置'
  1196. subTitle = ''
  1197. checkboxList = encodeURIComponent(JSON.stringify(this.safeThingsPlace || this.$config.datas.safeThingsPlaceJson))
  1198. } else if(type === 2) {
  1199. // 旅客、工作人员的 简要情况
  1200. title = '简要情况'
  1201. subTitle = encodeURIComponent(briefDetailsTitle1 + briefDetailsTitle2)
  1202. checkboxList = encodeURIComponent(JSON.stringify(this.formData.briefDetails || this.$config.datas.briefDetailsJson))
  1203. }
  1204. this.$navigate.navigateToPage(this.$config.route.fillin_checkbox, { type, title, subTitle, checkboxList }, false, {
  1205. changeSuccess(data) {
  1206. if(!data || data.length <= 0) {
  1207. return
  1208. }
  1209. if(type === 1) {
  1210. // 旅客、工作人员的 查获位置
  1211. that.formData.safeThingsPlace = data
  1212. } else if(type === 2) {
  1213. // 旅客、工作人员的 简要情况
  1214. that.formData.briefDetails = data
  1215. }
  1216. }
  1217. })
  1218. },
  1219. // 货代的选择页面
  1220. gotoHuoDaiPage(type) {
  1221. if(!type) {
  1222. return
  1223. }
  1224. const that = this
  1225. let obj = ''
  1226. let pagePath = ''
  1227. if(type === 1) {
  1228. // 货代的 查获位置
  1229. pagePath = this.$config.route.fillin_huodai_behaviorThingsPlaceVo
  1230. obj = this.formData.behaviorThingsPlaceVo ? encodeURIComponent(JSON.stringify(this.formData.behaviorThingsPlaceVo)) : ''
  1231. } else if(type === 2) {
  1232. // 货代的 简要情况
  1233. pagePath = this.$config.route.fillin_huodai_briefDetails
  1234. obj = this.formData.behaviorDescribeVo ? encodeURIComponent(JSON.stringify(this.formData.behaviorDescribeVo)) : ''
  1235. }
  1236. this.$navigate.navigateToPage(pagePath, { obj : obj }, false, {
  1237. changeSuccess(data) {
  1238. if(!data || data.length <= 0) {
  1239. return
  1240. }
  1241. if(type === 1) {
  1242. // 货代的 查获位置
  1243. that.formData.behaviorThingsPlaceVo = data
  1244. } else if(type === 2) {
  1245. // 货代的 简要情况
  1246. that.formData.behaviorDescribeVo = data
  1247. }
  1248. }
  1249. })
  1250. },
  1251. addSubmit() {
  1252. if(this.isSubmit) {
  1253. return
  1254. }
  1255. this.$refs.uForm.validate().then(async res => {
  1256. this.isSubmit = true
  1257. let params = {
  1258. // 安全事件Id
  1259. // safeThingsId: this.formData.safeThingsId,
  1260. // 查获事件 1-I类事件 2-II类事件
  1261. queryThing: this.formData.queryThing,
  1262. // 违规所属 1-旅客 2-货代 3-工作人员
  1263. violationType: this.formData.violationType,
  1264. // 事件类型
  1265. safeThingsTypeId: this.formData.safeThingsType.safeThingsTypeId,
  1266. // 事件标题
  1267. thingTitle: this.formData.thingTitle,
  1268. // 查获时间 格式yyyy-MM-dd HH:mm
  1269. queryTime: this.formData.queryTime,
  1270. // 查获地点
  1271. safeThingsAddressId: this.formData.safeThingsAddress ? this.formData.safeThingsAddress.safeThingsAddressId || null : null,
  1272. // 航班号
  1273. flightNumber: this.formData.flightNumber,
  1274. // 座位号
  1275. seatNumber: this.formData.seatNumber,
  1276. // 受害对象
  1277. victims: this.formData.victims,
  1278. // 事件起因
  1279. thingCause: this.formData.thingCause,
  1280. // 事件后果
  1281. thingResult: this.formData.thingResult,
  1282. // 多张照片
  1283. photoList: (this.formData.photoList && this.formData.photoList.length > 0) ? this.formData.photoList : null,
  1284. // 简要经过描述
  1285. thingsDesc: null
  1286. }
  1287. if(this.formData.violationType === 1 || this.formData.violationType === 3) {
  1288. // 旅客、工作人员
  1289. // 查获位置
  1290. params.safeThingsPlace = this.formData.safeThingsPlace ? JSON.stringify(this.formData.safeThingsPlace) : null
  1291. // 旅客\工作人员的 简要情况
  1292. if(!this.formData.briefDetails) {
  1293. // 简要详情id列表
  1294. params.briefDetailsList = null,
  1295. // 简要详情其他
  1296. params.briefDetailsOther = null
  1297. } else {
  1298. // 简要详情id列表
  1299. params.briefDetailsList = this.formData.briefDetails.filter(item => !item.hasOwnProperty('extra') && item.checked).map(item => item.key)
  1300. // 简要详情其他
  1301. const extras = this.formData.briefDetails.filter(item => item.hasOwnProperty('extra') && item.checked)
  1302. params.briefDetailsOther = extras && extras.length > 0 ? extras[0].extra : null
  1303. }
  1304. // 单张图片
  1305. params.behaviorPhoto = (this.formData.behaviorPhoto && this.formData.behaviorPhoto.length > 0) ? this.formData.behaviorPhoto[0] : null,
  1306. // 姓名
  1307. params.behaviorName = this.formData.behaviorName,
  1308. // 性别
  1309. params.behaviorSex = this.formData.behaviorSex,
  1310. // 证件类型
  1311. params.behaviorDocumentType = this.formData.behaviorDocumentType,
  1312. // 证件号码
  1313. params.behaviorDocumentNumber = this.formData.behaviorDocumentNumber,
  1314. // 国籍
  1315. params.behaviorNationality = this.formData.behaviorNationality,
  1316. // 籍贯
  1317. params.behaviorPlace = this.formData.behaviorPlace,
  1318. // 民族
  1319. params.behaviorNation = this.formData.behaviorNation,
  1320. // 出生日期 格式yyyy-MM-dd
  1321. params.behavionBirth = this.formData.behavionBirth,
  1322. // 婚姻状况 1-未婚 2-已婚 3-离异 4-丧偶
  1323. params.behavionMarriage = this.formData.behavionMarriage,
  1324. // 学历
  1325. params.behavionEducation = this.formData.behavionEducation,
  1326. // 职业
  1327. params.behavionWork = this.formData.behavionWork,
  1328. // 工作单位
  1329. params.behavionCompany = this.formData.behavionCompany,
  1330. // 手机号码
  1331. params.behavionPhone = this.formData.behavionPhone,
  1332. // 座机号
  1333. params.behavionLandline = this.formData.behavionLandline,
  1334. // 地址
  1335. params.behavionAddress = this.formData.behavionAddress
  1336. } else if(this.formData.violationType === 2) {
  1337. // 货代
  1338. // 查获位置
  1339. params.behaviorThingsPlaceVo = this.formData.behaviorThingsPlaceVo
  1340. // 货代 简要情况
  1341. params.behaviorDescribeVo = this.formData.behaviorDescribeVo,
  1342. // 单位名称
  1343. params.goodsCompany = this.formData.goodsCompany,
  1344. // 工商备案号
  1345. params.goodsBusinessNumber = this.formData.goodsBusinessNumber,
  1346. // 注册地
  1347. params.goodsRegistrationPlace = this.formData.goodsRegistrationPlace,
  1348. // 货单号
  1349. params.goodsNumber = this.formData.goodsNumber,
  1350. // 法人姓名
  1351. params.goodsLegalPerson = this.formData.goodsLegalPerson,
  1352. // 法人证件号
  1353. params.goodsLegalCard = this.formData.goodsLegalCard,
  1354. // 发货人姓名
  1355. params.goodsSendName = this.formData.goodsSendName,
  1356. // 发货人电话
  1357. params.goodsSendPhone = this.formData.goodsSendPhone,
  1358. // 发货人地址
  1359. params.goodsSendAddress = this.formData.goodsSendAddress,
  1360. // 收货人姓名
  1361. params.goodsDeliveryName = this.formData.goodsDeliveryName,
  1362. // 收货人电话
  1363. params.goodsDeliveryPhone = this.formData.goodsDeliveryPhone,
  1364. // 收货人地址
  1365. params.goodsDeliveryAddress = this.formData.goodsDeliveryAddress
  1366. }
  1367. // console.info('params-->', params)
  1368. try {
  1369. const result = await add(params, {loadingText: '正在提交...', hasMsg: true})
  1370. uni.$u.toast('添加成功!')
  1371. uni.$u.sleep(500).then(() => {
  1372. this.$navigate.navigateBack()
  1373. })
  1374. } catch (e) {
  1375. uni.$u.toast(e.msg)
  1376. } finally {
  1377. this.isSubmit = false
  1378. }
  1379. }).catch(errors => {
  1380. // console.log('addSubmit', errors)
  1381. // uni.$u.toast('校验失败')
  1382. })
  1383. }
  1384. }
  1385. }
  1386. </script>
  1387. <style>
  1388. page {
  1389. background-color: #F3F4F6;
  1390. }
  1391. </style>
  1392. <style lang="scss" scoped>
  1393. @import "@/common/css/form.scss";
  1394. .fillin-container {
  1395. display: flex;
  1396. flex-direction: column;
  1397. .steps-layout {
  1398. position: relative;
  1399. height: 124rpx;
  1400. width: 100%;
  1401. .steps {
  1402. width: calc(100% - 240rpx);
  1403. padding: 20rpx 120rpx;
  1404. background-color: #FFF;
  1405. position: fixed;
  1406. z-index: 999;
  1407. border-bottom: 1px solid #F3F4F6;
  1408. }
  1409. }
  1410. .prompt {
  1411. background-color: #fff;
  1412. padding: 32rpx 0 8rpx 32rpx;
  1413. font-weight: 500;
  1414. font-size: 34rpx;
  1415. color: #333333;
  1416. margin-top: 16rpx;
  1417. }
  1418. /deep/ .u-textarea {
  1419. margin-top: 10rpx !important;
  1420. }
  1421. }
  1422. </style>