index.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. size="small"
  7. :inline="true"
  8. v-show="showSearch"
  9. >
  10. <el-form-item label="保税区">
  11. <el-select v-model="queryParams.deptId" placeholder="请选择保税区">
  12. <el-option
  13. v-for="item in regionList"
  14. :key="item.value"
  15. :label="item.label"
  16. :value="item.value"
  17. >
  18. </el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item label="采集状态" prop="collStatus">
  22. <el-select
  23. v-model="queryParams.collStatus"
  24. placeholder="请选择采集状态"
  25. clearable
  26. filterable
  27. class="se"
  28. >
  29. <el-option
  30. v-for="dict in collStatus"
  31. :key="dict.value + 'collStatus'"
  32. :label="dict.label"
  33. :value="dict.value"
  34. />
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="上报状态" prop="reportStatus">
  38. <el-select
  39. v-model="queryParams.reportStatus"
  40. placeholder="请选择上报状态"
  41. clearable
  42. filterable
  43. class="se"
  44. >
  45. <el-option
  46. v-for="dict in reportStatus"
  47. :key="dict.value + 'reportStatus'"
  48. :label="dict.label"
  49. :value="dict.value"
  50. />
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item label="审核状态" prop="approveStatus">
  54. <el-select
  55. v-model="queryParams.approveStatus"
  56. placeholder="请选择审核状态"
  57. clearable
  58. filterable
  59. class="se"
  60. >
  61. <el-option
  62. v-for="(dict, index) in approveStatus"
  63. :key="dict.value + 'approveStatus'"
  64. :label="dict.label"
  65. :value="dict.value"
  66. />
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item label="年度" prop="year">
  70. <el-date-picker
  71. v-model="queryParams.year"
  72. type="year"
  73. format="yyyy"
  74. value-format="yyyy"
  75. placeholder="选择年度"
  76. class="se"
  77. ></el-date-picker>
  78. </el-form-item>
  79. <el-form-item label="月份" prop="month">
  80. <el-select v-model="queryParams.month" placeholder="请选择月份">
  81. <el-option
  82. v-for="item in monthOpt"
  83. :key="item.value"
  84. :label="item.label"
  85. :value="item.value">
  86. </el-option>
  87. </el-select>
  88. </el-form-item>
  89. <el-form-item>
  90. <el-button type="primary" icon="el-icon-search" @click="handleQuery"
  91. >搜索</el-button
  92. >
  93. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  94. </el-form-item>
  95. </el-form>
  96. <el-row :gutter="10" class="mb8">
  97. <el-col :span="1.5">
  98. <el-button
  99. type="success"
  100. v-hasPermi="['gather:GATHER:upload']"
  101. @click="onOpenDialog('old')"
  102. >历史数据导入</el-button
  103. >
  104. </el-col>
  105. <el-col :span="1.5">
  106. <el-button
  107. type="success"
  108. v-hasPermi="['gather:GATHER:uploadnew']"
  109. @click="onOpenDialog('new')"
  110. >导入</el-button
  111. >
  112. </el-col>
  113. <el-col :span="1.5">
  114. <el-button
  115. @click="handleDownload()"
  116. v-hasPermi="['gather:GATHER:download']"
  117. :title="radio === '' ? '请先选择下面对应的单位模板' : ''"
  118. :disabled="radio === '' ? true : false"
  119. >下载导入模板</el-button
  120. >
  121. </el-col>
  122. <el-col :span="1.5">
  123. <el-button
  124. type="danger"
  125. plain
  126. @click="importFile({ type: '0', mark: '1' }, '海关部分贸易导入')"
  127. v-hasPermi="['gather:GATHER:customsMrak']"
  128. >海关部分贸易导入</el-button
  129. >
  130. </el-col>
  131. <el-col :span="1.5">
  132. <el-button
  133. type="danger"
  134. plain
  135. @click="importFile({ type: '0', mark: '2' }, '海关进出口总值导入')"
  136. v-hasPermi="['gather:GATHER:customs']"
  137. >海关进出口总值导入</el-button
  138. >
  139. </el-col>
  140. <right-toolbar
  141. :showSearch.sync="showSearch"
  142. @queryTable="getList"
  143. ></right-toolbar>
  144. </el-row>
  145. <el-table
  146. :data="GATHERList"
  147. @selection-change="handleSelectionChange"
  148. @row-click="showRow"
  149. >
  150. <!-- @current-change="handleCurrentChange" -->
  151. <el-table-column label="选择" fixed="left" width="70" center>
  152. <template scope="scope">
  153. <el-radio
  154. class="radio"
  155. v-model="radio"
  156. :label="scope.$index"
  157. @change.native="getCurrentRow(scope.row)"
  158. >{{ "" }}</el-radio
  159. >
  160. </template>
  161. </el-table-column>
  162. <!-- <el-table-column type="selection" width="55" align="center" /> -->
  163. <el-table-column label="综保区名称" fixed width="150" align="center" prop="deptId_dictText">
  164. <template slot-scope="scope">
  165. {{ scope.row.deptId_dictText }}
  166. </template>
  167. </el-table-column>
  168. <!-- <el-table-column label="数据类型" width="140" align="center" prop="type">-->
  169. <!-- <template slot-scope="scope">-->
  170. <!-- <span v-if="scope.row.type == 0">量化指标数据</span>-->
  171. <!-- <span v-if="scope.row.type == 1">月报表数据</span>-->
  172. <!-- </template>-->
  173. <!-- </el-table-column>-->
  174. <el-table-column label="年份" align="center" prop="month">
  175. <template slot-scope="scope">
  176. {{ scope.row.year }}
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="月份" align="center" prop="month">
  180. <template slot-scope="scope">
  181. {{ "01-" + scope.row.month }}
  182. </template>
  183. </el-table-column>
  184. <el-table-column label="采集状态" align="center" prop="collStatus">
  185. <template slot-scope="scope">
  186. <span v-if="scope.row.collStatus == 0">未采集</span>
  187. <span v-if="scope.row.collStatus == 1">已采集</span>
  188. <span v-if="scope.row.collStatus == 2">草稿</span>
  189. </template>
  190. </el-table-column>
  191. <el-table-column
  192. label="采集人"
  193. align="center"
  194. prop="collName"
  195. width="110"
  196. >
  197. <template slot-scope="scope">
  198. <span>{{ scope.row.collName }}</span>
  199. </template>
  200. </el-table-column>
  201. <el-table-column
  202. label="采集时间"
  203. align="center"
  204. prop="collTime"
  205. width="160"
  206. >
  207. </el-table-column>
  208. <el-table-column label="上报状态" align="center" prop="reportStatus">
  209. <template slot-scope="scope">
  210. <span v-if="scope.row.reportStatus == 0">未上报</span>
  211. <span v-if="scope.row.reportStatus == 1">已上报</span>
  212. </template>
  213. </el-table-column>
  214. <el-table-column
  215. label="上报人"
  216. align="center"
  217. prop="reportName"
  218. width="160"
  219. />
  220. <el-table-column
  221. width="160"
  222. label="上报时间"
  223. align="center"
  224. prop="reportTime"
  225. />
  226. <el-table-column
  227. label="审核人"
  228. align="center"
  229. prop="approveName"
  230. width="160"
  231. />
  232. <el-table-column
  233. label="审核时间"
  234. align="center"
  235. prop="approveTime"
  236. width="160"
  237. />
  238. <el-table-column label="审核状态" align="center" prop="approveStatus">
  239. <template slot-scope="scope">
  240. <span>{{
  241. scope.row.approveStatus == 0
  242. ? "未审核"
  243. : scope.row.approveStatus == 1
  244. ? "审核中"
  245. : scope.row.approveStatus == 2
  246. ? "审核通过"
  247. : "审核拒绝"
  248. }}</span>
  249. </template>
  250. </el-table-column>
  251. <el-table-column
  252. label="驳回时间"
  253. align="center"
  254. prop="collTime"
  255. width="160"
  256. >
  257. </el-table-column>
  258. <el-table-column
  259. label="驳回姓名"
  260. align="center"
  261. prop="approveName"
  262. width="160"
  263. >
  264. </el-table-column>
  265. <el-table-column
  266. label="操作"
  267. align="center"
  268. fixed="right"
  269. width="220"
  270. class-name="small-padding fixed-width"
  271. >
  272. <template slot-scope="scope">
  273. <template
  274. v-if="
  275. scope.row.collStatus == 0 && checkPermi(['gather:GATHER:typein'])
  276. "
  277. >
  278. <el-button
  279. style="margin: 0 2px"
  280. size="mini"
  281. type="text"
  282. @click="handleUpdate(scope.row)"
  283. >录入</el-button
  284. >
  285. </template>
  286. <template
  287. v-if="scope.row.reportStatus == 1
  288. && checkPermi(['gather:GATHER:admin'])"
  289. >
  290. <el-button
  291. style="margin: 0 2px"
  292. size="mini"
  293. type="text"
  294. @click="handleWbEdit(scope.row)"
  295. >湾办修改</el-button
  296. >
  297. </template>
  298. <template
  299. v-if="(scope.row.collStatus == 0 || scope.row.collStatus == 1||scope.row.collStatus == 2) && (scope.row.approveStatus == 0 || scope.row.approveStatus == 3)
  300. && checkPermi(['gather:GATHER:admin'])"
  301. >
  302. <el-button
  303. style="margin: 0 2px"
  304. size="mini"
  305. type="text"
  306. @click="handleUpdate(scope.row)"
  307. >湾办录入</el-button
  308. >
  309. </template>
  310. <template
  311. v-if="
  312. scope.row.collStatus == 1 &&
  313. (scope.row.approveStatus == 0 || scope.row.approveStatus == 3) &&
  314. checkPermi(['gather:GATHER:approve'])
  315. "
  316. >
  317. <el-button
  318. @click="handleDetail(scope.row,3)"
  319. style="margin: 0 2px"
  320. size="mini"
  321. type="text"
  322. slot="reference"
  323. >提交审核</el-button
  324. >
  325. </template>
  326. <template
  327. v-if="
  328. scope.row.collStatus == 1 &&
  329. (scope.row.reportStatus == 0 || scope.row.reportStatus == null) &&
  330. scope.row.approveStatus == 2 &&
  331. checkPermi(['gather:GATHER:report'])
  332. "
  333. >
  334. <el-popconfirm
  335. title="确定上报吗?"
  336. @confirm="handleReport(scope.row)"
  337. >
  338. <el-button
  339. style="margin: 0 2px"
  340. size="mini"
  341. slot="reference"
  342. type="text"
  343. >上报</el-button
  344. >
  345. </el-popconfirm>
  346. </template>
  347. <el-button
  348. v-if="scope.row.collStatus == 1"
  349. style="margin: 0 2px"
  350. size="mini"
  351. type="text"
  352. @click="handleDetail(scope.row, 0)"
  353. >查看</el-button
  354. >
  355. <!-- {{scope.row.collStatus}}--{{scope.row.approveStatus}} -->
  356. <el-button
  357. style="margin: 0 2px"
  358. v-if="
  359. scope.row.collStatus == 2 &&
  360. (scope.row.approveStatus == 0 || scope.row.approveStatus == 3) &&
  361. checkPermi(['gather:GATHER:edit']) // 编辑权限
  362. "
  363. size="mini"
  364. type="text"
  365. @click="handleDetail(scope.row, 1)"
  366. >确定</el-button
  367. >
  368. <el-button
  369. style="margin: 0 2px"
  370. v-if="
  371. (scope.row.collStatus == 1 || scope.row.collStatus == 2) &&
  372. (scope.row.approveStatus == 0 || scope.row.approveStatus == 3) &&
  373. checkPermi(['gather:GATHER:edit']) // 编辑权限
  374. "
  375. size="mini"
  376. type="text"
  377. @click="handleDetail(scope.row, 1)"
  378. >修改</el-button
  379. >
  380. </template>
  381. </el-table-column>
  382. </el-table>
  383. <pagination
  384. v-show="total > 0"
  385. :total="total"
  386. :page.sync="queryParams.pageNum"
  387. :limit.sync="queryParams.pageSize"
  388. @pagination="getList"
  389. />
  390. <!-- 上传文件对话框 历史数据导入 -->
  391. <el-dialog
  392. center
  393. title="导入"
  394. :visible.sync="openUpload"
  395. width="50%"
  396. append-to-body
  397. :close-on-click-modal="false"
  398. >
  399. <el-form
  400. ref="uploadForm"
  401. :model="uploadForm"
  402. :rules="rules"
  403. label-width="120px"
  404. >
  405. <el-form-item label="文件" prop="linkUrl">
  406. <el-upload
  407. class="upload-demo"
  408. ref="upload"
  409. action="#"
  410. :http-request="httprequest"
  411. :before-upload="uploadFile"
  412. :file-list="fileList"
  413. :auto-upload="false"
  414. :limit="1"
  415. >
  416. <el-button slot="trigger" size="small" type="primary"
  417. >选取文件</el-button
  418. >
  419. </el-upload>
  420. </el-form-item>
  421. <div class="tips-text">
  422. <span class="tit">提示</span>
  423. <p>1.请先下载对应单位名称模板;</p>
  424. <p>2.上传前,请先检查数据的完整性;</p>
  425. </div>
  426. </el-form>
  427. <div slot="footer" class="dialog-footer">
  428. <el-button type="primary" @click="submitUpload">导 入</el-button>
  429. <el-button @click="cancel">取 消</el-button>
  430. </div>
  431. </el-dialog>
  432. <!-- 录入数据采集对话框 -->
  433. <el-dialog
  434. center
  435. :title="title"
  436. :visible.sync="open"
  437. width="1080px"
  438. append-to-body
  439. :close-on-click-modal="false"
  440. >
  441. <div
  442. v-for="(item, index) in tabList"
  443. :key="index + 'tabs'"
  444. :label="item.normName"
  445. :name="item.normName"
  446. >
  447. <el-col :span="24"
  448. style=" margin-bottom: 5px; padding: 4px;"
  449. >
  450. <!-- <p style="font-weight: 600;margin:0;margin-bottom: 5px; font-size: 17px;">{{ item.normName }}</p>-->
  451. <el-divider content-position="left" ><span style="font-weight: bold; font-size: 16px">{{ item.normName }}</span></el-divider>
  452. <template v-for="listItem in form.feeLists">
  453. <el-form
  454. v-if="listItem.normId == item.normId"
  455. :rules="
  456. validatorList(
  457. listItem.normfeeCode,
  458. listItem.normfeeName,
  459. listItem.sendValue
  460. )
  461. "
  462. :model="listItem"
  463. :ref="'form' + listItem.normfeeId"
  464. :key="listItem.normfeeId"
  465. :disabled="listItem.sendValue == 1 || (listItem.sendValue == undefined)"
  466. label-width="360px"
  467. >
  468. <el-col :span="12">
  469. <el-form-item
  470. style="padding:10px;"
  471. :label="
  472. listItem.normfeeName + '(' + listItem.funitName + ')'
  473. "
  474. prop="collCalue"
  475. >
  476. <el-input
  477. size="small"
  478. v-model="listItem.collCalue"
  479. style="width: 150px"
  480. ></el-input>
  481. </el-form-item>
  482. </el-col>
  483. </el-form>
  484. </template>
  485. </el-col>
  486. </div>
  487. <div slot="footer" class="dialog-footer">
  488. <el-button v-if="checkPermi(['gather:GATHER:add'])" type="primary" @click="submitForm('add')">确 定</el-button>
  489. <el-button v-if="this.form.collStatus!=1 &&checkPermi(['gather:GATHER:draft'])" @click="submitForm('draft')" type="warning">暂 存</el-button>
  490. <el-button @click="cancel">取 消</el-button>
  491. </div>
  492. </el-dialog>
  493. <!-- 查看或修改 -->
  494. <el-dialog
  495. center
  496. @close="handleClose"
  497. :title="title"
  498. :visible.sync="openDetail"
  499. width="95%"
  500. append-to-body
  501. :close-on-click-modal="false"
  502. >
  503. <div
  504. v-for="(item, index) in tabList"
  505. :key="index + 'tabs'"
  506. :label="item.normName"
  507. :name="item.normName"
  508. >
  509. <el-col :span="24"
  510. style="border:1px solid rgba(0, 0, 0, .05); margin-bottom: 5px; padding: 4px;border-radius: 10px"
  511. >
  512. <p style="font-weight: 600;margin:0; margin-bottom: 5px; font-size: 17px;">{{ item.normName }}</p>
  513. <template v-for="listItem in form.feeLists">
  514. <el-form
  515. v-if="listItem.normId == item.normId"
  516. :rules="
  517. validatorList(
  518. listItem.normfeeCode,
  519. listItem.normfeeName,
  520. listItem.sendValue
  521. )
  522. "
  523. :model="listItem"
  524. :ref="'form' + listItem.normfeeId"
  525. :key="listItem.normfeeId"
  526. :disabled="listItem.sendValue == 1 || listItem.sendValue == undefined"
  527. :label-width="(index == 1 || index == 3) ? '350px' : '250px'"
  528. >
  529. <el-col :span="8">
  530. <el-form-item
  531. style="padding:10px;"
  532. :label="
  533. listItem.normfeeName + '(' + listItem.funitName + ')'
  534. "
  535. prop="collCalue"
  536. >
  537. <el-input
  538. :disabled="!edit"
  539. v-if="edit == true"
  540. v-model="listItem.collCalue"
  541. :placeholder="'请输入' + listItem.normfeeName"
  542. ></el-input>
  543. <div v-if="edit == false" style="background-color: rgba(0, 0, 0, .03); padding-left: 5px;" >{{ listItem.collCalue || listItem.collCalue == 0 ? listItem.collCalue :"请输入" }}</div>
  544. </el-form-item>
  545. </el-col>
  546. </el-form>
  547. </template>
  548. </el-col>
  549. </div>
  550. <div slot="footer" class="dialog-footer">
  551. <el-button v-if="audit && (this.form.collStatus != 2 && this.form.collStatus==1)" type="primary" @click="handleAudit(form)">提交审核</el-button>
  552. <el-button type="primary" @click="submitForm('edit')" v-if="edit && isEdit"
  553. >确 定</el-button
  554. >
  555. <el-button @click="submitForm('draft')" v-if="edit && this.form.collStatus!=1" type="warning">暂 存</el-button>
  556. <el-button type="primary" v-if="check" @click="handleCheck(1)"
  557. >通 过</el-button
  558. >
  559. <el-button type="warning" v-if="check" @click="handleReject"
  560. >驳 回</el-button
  561. >
  562. <el-button type="primary" @click="cancel">返 回</el-button>
  563. </div>
  564. <div class="remark" v-if="form.taskVoList != 0">
  565. <div class="remark_title" style="margin-bottom: 20px">审批记录:</div>
  566. <el-timeline>
  567. <el-timeline-item
  568. v-for="(item, index) in form.taskVoList"
  569. :timestamp="item.createTime"
  570. placement="top"
  571. :key="index + 'taskHisAction'"
  572. >
  573. <el-card>
  574. <p>
  575. {{ item.execName }}------{{
  576. item.status == 0
  577. ? "待审核"
  578. : item.status == 1
  579. ? "同意"
  580. : item.status == 2
  581. ? "驳回"
  582. : "退回"
  583. }}------{{ item.acname }}------{{ item.createTime }}
  584. <p v-if="item.comments != null">{{
  585. "审核意见:" + item.comments
  586. }}</p>
  587. </p>
  588. </el-card>
  589. </el-timeline-item>
  590. </el-timeline>
  591. </div>
  592. </el-dialog>
  593. <!-- 湾办录入 -->
  594. <el-dialog
  595. center
  596. @close="handleClose"
  597. :title="title"
  598. :visible.sync="wbopenDetail"
  599. width="95%"
  600. append-to-body
  601. :close-on-click-modal="false"
  602. >
  603. <div
  604. v-for="(item, index) in tabList"
  605. :key="index + 'tabs'"
  606. :label="item.normName"
  607. :name="item.normName"
  608. >
  609. <el-col :span="24"
  610. style="border:1px solid rgba(0, 0, 0, .05); margin-bottom: 5px; padding: 4px"
  611. >
  612. <p style="font-weight: 600;margin:0; margin-bottom: 5px; font-size: 17px;">{{ item.normName }}</p>
  613. <template v-for="listItem in form.feeLists">
  614. <el-form
  615. v-if="listItem.normId == item.normId"
  616. :rules="
  617. validatorList(
  618. listItem.normfeeCode,
  619. listItem.normfeeName,
  620. listItem.sendValue
  621. )
  622. "
  623. :model="listItem"
  624. :ref="'form' + listItem.normfeeId"
  625. :key="listItem.normfeeId"
  626. :disabled="!checkPermi(['gather:GATHER:adminedit'])"
  627. :label-width="(index == 1 || index == 3) ? '350px' : '250px'"
  628. >
  629. <el-col :span="8">
  630. <el-form-item
  631. style="padding:10px;"
  632. :label="
  633. listItem.normfeeName + '(' + listItem.funitName + ')'
  634. "
  635. prop="collCalue"
  636. >
  637. <el-input
  638. :disabled="false"
  639. v-model="listItem.collCalue"
  640. :placeholder="'请输入' + listItem.normfeeName"
  641. ></el-input>
  642. <!-- <div v-if="edit == false" style="background-color: rgba(0, 0, 0, .03); padding-left: 5px;" >{{ listItem.collCalue || listItem.collCalue == 0 ? listItem.collCalue :"请输入" }}</div> -->
  643. </el-form-item>
  644. </el-col>
  645. </el-form>
  646. </template>
  647. </el-col>
  648. </div>
  649. <div slot="footer" class="dialog-footer">
  650. <!-- <el-button v-if="audit && (this.form.collStatus != 2 && this.form.collStatus==1)" type="primary" @click="handleAudit(form)">提交审核</el-button> -->
  651. <el-button type="primary" @click="submitForm('edit',1)"
  652. >确 定</el-button
  653. >
  654. <!-- <el-button @click="submitForm('draft')" v-if="edit && this.form.collStatus!=1" type="warning">暂 存</el-button>
  655. <el-button type="primary" v-if="check" @click="handleCheck(1)"
  656. >通 过</el-button
  657. >
  658. <el-button type="warning" v-if="check" @click="handleReject"
  659. >驳 回</el-button
  660. > -->
  661. <el-button @click="cancel">返 回</el-button>
  662. </div>
  663. <div class="remark" v-if="form.taskVoList != 0">
  664. <div class="remark_title" style="margin-bottom: 20px">审批记录:</div>
  665. <el-timeline>
  666. <el-timeline-item
  667. v-for="(item, index) in form.taskVoList"
  668. :timestamp="item.createTime"
  669. placement="top"
  670. :key="index + 'taskHisAction'"
  671. >
  672. <el-card>
  673. <p>
  674. {{ item.execName }}------{{
  675. item.status == 0
  676. ? "待审核"
  677. : item.status == 1
  678. ? "同意"
  679. : item.status == 2
  680. ? "驳回"
  681. : "退回"
  682. }}------{{ item.acname }}------{{ item.createTime }}
  683. <p v-if="item.comments != null">{{
  684. "审核意见:" + item.comments
  685. }}</p>
  686. </p>
  687. </el-card>
  688. </el-timeline-item>
  689. </el-timeline>
  690. </div>
  691. </el-dialog>
  692. </div>
  693. </template>
  694. <script>
  695. import {
  696. compute,
  697. listGATHER,
  698. getGATHER,
  699. delGATHER,
  700. addGATHER,
  701. updateGATHER,
  702. wbUpdateGATHER,
  703. getInfoByColl,
  704. approve,
  705. report,
  706. setAudit,
  707. download,
  708. upload,
  709. uploadnew,
  710. bsqAudit,
  711. } from "@/api/portal/GATHER/GATHER.js";
  712. import importFile from "./importFile.vue";
  713. import { saveAs } from "file-saver";
  714. import { getToken } from "@/utils/auth";
  715. import axios from "axios";
  716. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  717. import { bondedList } from "@/api/portal/figure/figure.js";
  718. export default {
  719. name: "GATHER",
  720. data() {
  721. return {
  722. // 提交审核按钮
  723. audit:false,
  724. isEdit:true,
  725. monthOpt: [{
  726. value: '01',
  727. label: '1月'
  728. }, {
  729. value: '02',
  730. label: '2月'
  731. }, {
  732. value: '03',
  733. label: '3月'
  734. }, {
  735. value: '04',
  736. label: '4月'
  737. }, {
  738. value: '05',
  739. label: '5月'
  740. }, {
  741. value: '06',
  742. label: '6月'
  743. }, {
  744. value: '07',
  745. label: '7月'
  746. }, {
  747. value: '08',
  748. label: '8月'
  749. }, {
  750. value: '09',
  751. label: '9月'
  752. }, {
  753. value: '10',
  754. label: '10月'
  755. }, {
  756. value: '11',
  757. label: '11月'
  758. }, {
  759. value: '12',
  760. label: '12月'
  761. }
  762. ],
  763. // 部门名称
  764. deptName:"",
  765. // 审核、驳回
  766. check: false,
  767. // 数据id
  768. dataId: null,
  769. edit: true, //false 查看 true修改
  770. tabList: [],
  771. feeLists: [],
  772. activeName: "",
  773. //数据类型(0=量化指标数据,1=月报表数据)
  774. typeList: [
  775. { label: "量化指标数据", value: "0" },
  776. { label: "月报表数据", value: "1" },
  777. ],
  778. //采集状态(0=未采集,1=已采集)
  779. collStatus: [
  780. { label: "未采集", value: "0" },
  781. { label: "已采集", value: "1" },
  782. ],
  783. //上报状态(0=未上报,=1已上报)
  784. reportStatus: [
  785. { label: "未上报", value: "0" },
  786. { label: "已上报", value: "1" },
  787. ],
  788. //审核状态(0=未审核,1审核中,2=审核通过,3=审核拒绝)
  789. approveStatus: [
  790. { label: "未审核", value: "0" },
  791. { label: "审核中", value: "1" },
  792. { label: "审核通过", value: "2" },
  793. { label: "审核拒绝", value: "3" },
  794. ],
  795. // 根路径
  796. baseURL: process.env.VUE_APP_BASE_API,
  797. // 遮罩层
  798. loading: true,
  799. // 选中数组
  800. ids: [],
  801. // 非单个禁用
  802. single: true,
  803. // 非多个禁用
  804. multiple: true,
  805. // 显示搜索条件
  806. showSearch: true,
  807. // 总条数
  808. total: 0,
  809. // 数据采集表格数据
  810. GATHERList: [],
  811. load: true,
  812. // 弹出层标题
  813. title: "",
  814. // 是否显示弹出层
  815. open: false,
  816. openDetail: false,
  817. wbopenDetail: false,
  818. // 查询参数
  819. queryParams: {
  820. deptId: "",
  821. pageNum: 1,
  822. pageSize: 10,
  823. id: null,
  824. createTime: null,
  825. createBy: null,
  826. updateTime: null,
  827. updateBy: null,
  828. delFlag: null,
  829. type: null,
  830. year: null,
  831. month: null,
  832. collStatus: null,
  833. reportStatus: null,
  834. approveStatus: null,
  835. audit: null,
  836. },
  837. regionList: [], //保税区列表
  838. // 表单参数
  839. form: {},
  840. // 表单校验
  841. rules: {
  842. // id: [{ required: true, message: "$comment不能为空", trigger: "blur" }],
  843. collCalue: [
  844. { required: true, message: "不能为空", trigger: "blur" },
  845. { trigger: "blur", validator: this.validatorFloatNum },
  846. ],
  847. },
  848. rulesOne: {},
  849. //设置文件名字
  850. setFileName: "",
  851. radio: "",
  852. rowData: {},
  853. fileList: [],
  854. uploadForm: {},
  855. openUpload: false,
  856. uploadFileType: "old", // old、new
  857. };
  858. },
  859. created() {
  860. this.getList();
  861. this.bondedList();
  862. },
  863. methods: {
  864. checkPermi,
  865. checkRole,
  866. // 下面这个validatorNum写重复了吗?
  867. // validatorNum(rule, value, callback) {},
  868. validatorFloatNum(rule, value, callback) {
  869. let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
  870. if (!reg.test(value)) {
  871. callback(new Error("请输入数字和正确格式的数字"));
  872. } else if (typeof value == "string" && value.split(".").length > 2) {
  873. callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
  874. }
  875. // else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
  876. // callback(new Error('最多只能输入两位小数')); //小数点后两位
  877. // }
  878. else {
  879. callback();
  880. }
  881. },
  882. validatorNum(rule, value, callback) {
  883. let reg = /^[+]?(0|([1-9]\d*))(\.\d+)?$/g;
  884. if (!reg.test(value)) {
  885. callback(new Error("请输入正数和正确格式的数字"));
  886. } else if (typeof value == "string" && value.split(".").length > 2) {
  887. callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
  888. }
  889. // else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
  890. // callback(new Error('最多只能输入两位小数')); //小数点后两位
  891. // }
  892. else {
  893. callback();
  894. }
  895. },
  896. validatorList(code, name, sendValue) {
  897. if (typeof name != "string") return;
  898. if (sendValue == 1) return;
  899. // if (
  900. // code == "A001" ||
  901. // code == "A002" ||
  902. // code == "A003" ||
  903. // code == "A004" ||
  904. // code == "A005" ||
  905. // code == "A006" ||
  906. // code == "A007" ||
  907. // code == "A008" ||
  908. // code == "C002" ||
  909. // code == "C003" ||
  910. // code == "D001" ||
  911. // code == "E001" ||
  912. // code == "E002" ||
  913. // code == "E003" ||
  914. // code == "E004" ||
  915. // code == "F001" ||
  916. // code == "F002"
  917. // ) {
  918. return {
  919. collCalue: [
  920. { required: true, message: "不能为空", trigger: "blur" },
  921. { trigger: "blur", validator: this.validatorFloatNum },
  922. ],
  923. };
  924. // } else if (code == "A009" || code == "A010") {
  925. // return {
  926. // collCalue: [
  927. // { required: true, message: "不能为空", trigger: "blur" },
  928. // { pattern: /^[1-9]\d*$/, message: "请输入正整数", trigger: "blur" },
  929. // ],
  930. // };
  931. // }
  932. },
  933. importFile(param, title) {
  934. let img = param.mark == "1" ? "@/assets/images/portion.png" : "@/assets/images/sum.png";
  935. param.img = img;
  936. this.iframe({
  937. obj: importFile,
  938. param: param,
  939. title: title,
  940. width: "500px",
  941. height: "50%",
  942. });
  943. },
  944. submitUpload() {
  945. this.$refs.upload.submit();
  946. },
  947. httprequest() {},
  948. getCurrentRow(val) {
  949. },
  950. // 获取保税区列表
  951. bondedList() {
  952. this.regionList = [];
  953. bondedList().then((res) => {
  954. for (const i in res.data) {
  955. this.regionList.push({
  956. label: res.data[i].deptName,
  957. value: res.data[i].deptId,
  958. });
  959. }
  960. });
  961. },
  962. handleCurrentChange(val, index) {
  963. this.currentRow = val;
  964. this.$emit("data", val.pkg);
  965. },
  966. handleChange(file, fileList) {
  967. this.fileList = fileList.slice(-3);
  968. },
  969. showRow(row) {
  970. //赋值给radio
  971. this.radio = this.GATHERList.indexOf(row);
  972. this.rowData = row;
  973. },
  974. handleClose() {
  975. this.check = false;
  976. },
  977. /**
  978. * 打开上传弹窗
  979. * @params string type old/new
  980. */
  981. onOpenDialog(type) {
  982. this.uploadFileType = type;
  983. this.openUpload = true;
  984. },
  985. //导入
  986. uploadFile(file) {
  987. let formData = new FormData();
  988. formData.append("file", file);
  989. formData.append("type", this.uploadForm.type);
  990. if (this.uploadFileType === "old") {
  991. upload(formData).then((res) => {
  992. this.$modal.msgSuccess("上传采集附件成功!");
  993. this.getList();
  994. this.cancel();
  995. this.openUpload = false;
  996. });
  997. } else {
  998. uploadnew(formData).then((res) => {
  999. this.$modal.msgSuccess("上传采集附件成功!");
  1000. this.getList();
  1001. this.cancel();
  1002. this.openUpload = false;
  1003. });
  1004. }
  1005. },
  1006. //下载模板
  1007. handleDownload() {
  1008. let row = this.rowData;
  1009. axios({
  1010. url: process.env.VUE_APP_BASE_API + "/gather/download/" + row.id,
  1011. method: "get",
  1012. responseType: "blob",
  1013. headers: {
  1014. Authorization: "Bearer " + getToken(),
  1015. },
  1016. }).then((res) => {
  1017. const temp = res.headers["content-disposition"]
  1018. .split(";")[1]
  1019. .split("filename=")[1];
  1020. const fileName = decodeURIComponent(temp);
  1021. const blob = new Blob([res.data]);
  1022. saveAs(blob, fileName);
  1023. this.getList();
  1024. });
  1025. },
  1026. //上报
  1027. handleReport(data) {
  1028. report(data).then((res) => {
  1029. this.$modal.msgSuccess("上报成功");
  1030. this.getList();
  1031. });
  1032. },
  1033. //提交审核
  1034. handleApprove(row) {
  1035. this.tabList = [];
  1036. this.form = [];
  1037. const id = row.id || this.ids;
  1038. this.edit = false;
  1039. this.check = true;
  1040. this.dataId = row.id;
  1041. getGATHER(id).then((response) => {
  1042. //深拷贝,而不是拷贝地址
  1043. this.form = JSON.parse(JSON.stringify(response.data));
  1044. this.openDetail = true;
  1045. this.title = "数据查看";
  1046. //深拷贝,而不是拷贝地址
  1047. this.tabList = JSON.parse(JSON.stringify(response.data.feeLists));
  1048. let dataList = response.data.feeLists;
  1049. //去重获取tab
  1050. //遍历如果遇到相同的id则删掉
  1051. for (var i = 0; i < this.tabList.length - 1; i++) {
  1052. //设置激活的tab
  1053. if (i == 0) {
  1054. this.activeName = this.tabList[0].normName;
  1055. }
  1056. for (var j = i + 1; j < this.tabList.length; j++) {
  1057. if (this.tabList[i].normId == this.tabList[j].normId) {
  1058. this.tabList.splice(j, 1);
  1059. //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
  1060. j--;
  1061. }
  1062. }
  1063. }
  1064. });
  1065. },
  1066. handleCheck(val, value) {
  1067. let data = {
  1068. gatherId: this.dataId,
  1069. auditType: 2,
  1070. };
  1071. let audit = {
  1072. gatherId: this.dataId,
  1073. auditType: 3,
  1074. remark: value,
  1075. };
  1076. if (val == 1) {
  1077. bsqAudit(data).then((res) => {
  1078. if (res.code == 200) {
  1079. this.$modal.msgSuccess("通过审核成功");
  1080. this.getList();
  1081. this.openDetail = false;
  1082. }
  1083. });
  1084. } else {
  1085. bsqAudit(audit).then((res) => {
  1086. if (res.code == 200) {
  1087. this.$modal.msgSuccess("驳回成功");
  1088. this.getList();
  1089. this.openDetail = false;
  1090. }
  1091. });
  1092. }
  1093. },
  1094. // 驳回处理
  1095. handleReject() {
  1096. this.$prompt("请输入驳回理由:", "提示", {
  1097. confirmButtonText: "确定",
  1098. cancelButtonText: "取消",
  1099. inputType: "textarea",
  1100. })
  1101. .then(({ value }) => {
  1102. this.handleCheck(2, value);
  1103. // this.$message({
  1104. // type: 'success',
  1105. // message: '你的邮箱是: ' + value
  1106. // });
  1107. })
  1108. .catch(() => {
  1109. // this.$message({
  1110. // type: 'info',
  1111. // message: '取消输入'
  1112. // });
  1113. });
  1114. },
  1115. handleClick(tab, event) {},
  1116. /** 查询数据采集列表 */
  1117. getList() {
  1118. this.loading = true;
  1119. listGATHER(this.queryParams).then((response) => {
  1120. this.GATHERList = response.rows;
  1121. this.load = false;
  1122. this.total = response.total;
  1123. this.loading = false;
  1124. });
  1125. },
  1126. // 取消按钮
  1127. cancel() {
  1128. this.check = false;
  1129. this.open = false;
  1130. this.openDetail = false;
  1131. this.openUpload = false;
  1132. this.wbopenDetail = false;
  1133. this.reset();
  1134. },
  1135. // 表单重置
  1136. reset() {
  1137. this.isEdit = true;
  1138. this.audit = false;
  1139. this.deptName = "";
  1140. this.form = {
  1141. id: null,
  1142. delFlag: null,
  1143. deptId: null,
  1144. type: null,
  1145. month: null,
  1146. collStatus: "0",
  1147. reportStatus: "0",
  1148. approveStatus: "0",
  1149. };
  1150. this.uploadForm = {
  1151. type: "",
  1152. };
  1153. this.fileList = [];
  1154. this.resetForm("form");
  1155. },
  1156. /** 搜索按钮操作 */
  1157. handleQuery() {
  1158. this.queryParams.pageNum = 1;
  1159. this.getList();
  1160. },
  1161. /** 重置按钮操作 */
  1162. resetQuery() {
  1163. this.queryParams.deptId = "";
  1164. this.resetForm("queryForm");
  1165. this.handleQuery();
  1166. },
  1167. // 多选框选中数据
  1168. handleSelectionChange(selection) {
  1169. this.ids = selection.map((item) => item.id);
  1170. this.single = selection.length !== 1;
  1171. this.multiple = !selection.length;
  1172. },
  1173. /** 新增按钮操作 */
  1174. // handleAdd() {
  1175. // this.reset();
  1176. // this.open = true;
  1177. // this.openDetail = true;
  1178. // this.title = "添加数据采集";
  1179. // },
  1180. /** 录入按钮操作 */
  1181. handleUpdate(row) {
  1182. // this.reset();
  1183. this.tabList = [];
  1184. this.form = [];
  1185. const id = row.id || this.ids;
  1186. getInfoByColl(id).then((response) => {
  1187. //深拷贝,而不是拷贝地址
  1188. this.form = JSON.parse(JSON.stringify(response.data));
  1189. this.form.feeLists.forEach((item) => {
  1190. if(item.funit == "%" && item.collCalue){
  1191. item.collCalue = item.collCalue.toFixed(2);
  1192. }
  1193. if(item.collCalue == 0){
  1194. item.collCalue = "";
  1195. }
  1196. })
  1197. this.regionList.forEach(item=>{
  1198. if(item.value == this.form.deptId){
  1199. this.deptName = item.label;
  1200. }
  1201. })
  1202. this.open = true;
  1203. this.title = this.deptName + this.form.year + "年" + this.form.month + "数据采集";
  1204. //深拷贝,而不是拷贝地址
  1205. this.tabList = JSON.parse(JSON.stringify(response.data.feeLists));
  1206. let dataList = response.data.feeLists;
  1207. //去重获取tab
  1208. //遍历如果遇到相同的id则删掉
  1209. for (var i = 0; i < this.tabList.length - 1; i++) {
  1210. //设置激活的tab
  1211. if (i == 0) {
  1212. this.activeName = this.tabList[0].normName;
  1213. }
  1214. for (var j = i + 1; j < this.tabList.length; j++) {
  1215. if (this.tabList[i].normId == this.tabList[j].normId) {
  1216. this.tabList.splice(j, 1);
  1217. //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
  1218. j--;
  1219. }
  1220. }
  1221. }
  1222. });
  1223. },
  1224. handleAudit(row) {
  1225. let is = false;
  1226. row.feeLists.forEach(item=>{
  1227. if(item.collCalue == null || item.collCalue.length ==0 || item.collCalue == undefined){
  1228. return is = true;
  1229. }
  1230. })
  1231. if(is){
  1232. this.$message.error("数据未填写齐全,禁止提交!");
  1233. return;
  1234. }
  1235. let data = {
  1236. type: "1",
  1237. gatherId: row.id,
  1238. };
  1239. this.form.collStatus = 1;
  1240. updateGATHER(this.form).then((response) => {
  1241. this.$modal.msgSuccess("修改成功");
  1242. compute(this.form).then((response) => {
  1243. setAudit(data).then((res) => {
  1244. if (res.code) {
  1245. this.$message.success("审核成功");
  1246. this.getList();
  1247. this.openDetail = false;
  1248. }
  1249. });
  1250. });
  1251. });
  1252. },
  1253. // 湾办修改
  1254. handleWbEdit(row){
  1255. this.tabList = [];
  1256. this.form = [];
  1257. const id = row.id || this.ids;
  1258. getGATHER(id).then((response) => {
  1259. this.wbopenDetail = true;
  1260. //深拷贝,而不是拷贝地址
  1261. this.form = JSON.parse(JSON.stringify(response.data));
  1262. this.form.feeLists.forEach((item) => {
  1263. if(item.funit == "%" && item.collCalue){
  1264. item.collCalue = item.collCalue.toFixed(2);
  1265. }
  1266. })
  1267. this.regionList.forEach(item=>{
  1268. if(item.value == this.form.deptId){
  1269. this.deptName = item.label;
  1270. }
  1271. })
  1272. this.title = this.deptName + this.form.year + "年" + this.form.month + "数据采集";
  1273. //深拷贝,而不是拷贝地址
  1274. this.tabList = JSON.parse(JSON.stringify(response.data.feeLists));
  1275. //去重获取tab
  1276. //遍历如果遇到相同的id则删掉
  1277. for (var i = 0; i < this.tabList.length - 1; i++) {
  1278. //设置激活的tab
  1279. if (i == 0) {
  1280. this.activeName = this.tabList[0].normName;
  1281. }
  1282. for (var j = i + 1; j < this.tabList.length; j++) {
  1283. if (this.tabList[i].normId == this.tabList[j].normId) {
  1284. this.tabList.splice(j, 1);
  1285. //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
  1286. j--;
  1287. }
  1288. }
  1289. }
  1290. });
  1291. },
  1292. /** 查看按钮操作 */
  1293. handleDetail(row, type) {
  1294. //false 查看 true修改
  1295. if (type == 0 ) {
  1296. this.edit = false;
  1297. } else if (type == 1 ) {
  1298. this.edit = true;
  1299. this.isEdit = true;
  1300. this.audit = false;
  1301. }else if(type == 3){
  1302. this.isEdit = false;
  1303. this.edit = true;
  1304. this.audit = true;
  1305. }
  1306. // this.reset();
  1307. this.tabList = [];
  1308. this.form = [];
  1309. const id = row.id || this.ids;
  1310. getGATHER(id).then((response) => {
  1311. //深拷贝,而不是拷贝地址
  1312. this.form = JSON.parse(JSON.stringify(response.data));
  1313. this.form.feeLists.forEach((item) => {
  1314. if(item.funit == "%" && item.collCalue){
  1315. item.collCalue = item.collCalue.toFixed(2);
  1316. }
  1317. })
  1318. this.openDetail = true;
  1319. this.regionList.forEach(item=>{
  1320. if(item.value == this.form.deptId){
  1321. this.deptName = item.label;
  1322. }
  1323. })
  1324. this.title = this.deptName + this.form.year + "年" + this.form.month + "数据采集";
  1325. //深拷贝,而不是拷贝地址
  1326. this.tabList = JSON.parse(JSON.stringify(response.data.feeLists));
  1327. //去重获取tab
  1328. //遍历如果遇到相同的id则删掉
  1329. for (var i = 0; i < this.tabList.length - 1; i++) {
  1330. //设置激活的tab
  1331. if (i == 0) {
  1332. this.activeName = this.tabList[0].normName;
  1333. }
  1334. for (var j = i + 1; j < this.tabList.length; j++) {
  1335. if (this.tabList[i].normId == this.tabList[j].normId) {
  1336. this.tabList.splice(j, 1);
  1337. //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
  1338. j--;
  1339. }
  1340. }
  1341. }
  1342. });
  1343. },
  1344. /** 提交按钮 */
  1345. submitForm(type,is) {
  1346. // 验证表单
  1347. let p = [];
  1348. if(type == 'draft') {
  1349. this.form.feeLists.map((item, index) => {
  1350. this.$refs["form" + item.normfeeId][0].clearValidate();
  1351. })
  1352. this.form.collStatus = 2;
  1353. msg = "操作成功";
  1354. this.$nextTick(() => {
  1355. addGATHER(this.form).then((response) => {
  1356. if (response.code == 200) {
  1357. this.$modal.msgSuccess(msg);
  1358. this.getList();
  1359. this.open = false;
  1360. this.openDetail = false;
  1361. compute(this.form).then((response) => {});
  1362. }
  1363. });
  1364. })
  1365. return
  1366. }else {
  1367. p = this.form.feeLists.map((item, index) => {
  1368. return new Promise((resolve, reject) => {
  1369. this.$refs["form" + item.normfeeId][0].validate((valid) => {
  1370. // this.$refs["form" + index].validate((valid) => {
  1371. if (valid) {
  1372. resolve(); //完成态
  1373. } else {
  1374. reject(); //已失败
  1375. }
  1376. });
  1377. });
  1378. });
  1379. }
  1380. let msg = "";
  1381. Promise.all(p)
  1382. .then(() => {
  1383. if (type == "add") {
  1384. this.form.collStatus = 1;
  1385. msg = "录入成功";
  1386. } else if (type == "edit") {
  1387. this.form.collStatus = 1;
  1388. if(is){
  1389. wbUpdateGATHER(this.form).then((response) => {
  1390. this.$modal.msgSuccess("修改成功");
  1391. this.getList();
  1392. this.wbopenDetail = false;
  1393. compute(this.form).then((response) => {});
  1394. });
  1395. return;
  1396. }else{
  1397. updateGATHER(this.form).then((response) => {
  1398. this.$modal.msgSuccess("修改成功");
  1399. this.getList();
  1400. this.openDetail = false;
  1401. compute(this.form).then((response) => {});
  1402. });
  1403. return;
  1404. }
  1405. }else if(type == 'draft'){
  1406. this.form.collStatus = 2;
  1407. msg = "操作成功";
  1408. }
  1409. addGATHER(this.form).then((response) => {
  1410. if (response.code == 200) {
  1411. this.$modal.msgSuccess(msg);
  1412. this.getList();
  1413. this.open = false;
  1414. this.openDetail = false;
  1415. compute(this.form).then((response) => {});
  1416. }
  1417. });
  1418. })
  1419. .catch((err) => {
  1420. this.$message.error("请检查是否有必填项未输入!");
  1421. });
  1422. },
  1423. /** 删除按钮操作 */
  1424. handleDelete(row) {
  1425. const ids = row.id || this.ids;
  1426. this.$modal
  1427. .confirm('是否确认删除数据采集编号为"' + ids + '"的数据项?')
  1428. .then(function () {
  1429. return delGATHER(ids);
  1430. })
  1431. .then(() => {
  1432. this.getList();
  1433. this.$modal.msgSuccess("删除成功");
  1434. })
  1435. .catch(() => {});
  1436. },
  1437. /** 导出按钮操作 */
  1438. handleExport() {
  1439. this.download(
  1440. "business/GATHER/export",
  1441. {
  1442. ...this.queryParams,
  1443. },
  1444. `GATHER_${new Date().getTime()}.xlsx`
  1445. );
  1446. },
  1447. },
  1448. };
  1449. </script>
  1450. <style scoped lang="scss">
  1451. .el-form-item{
  1452. margin-right: 5px;
  1453. padding: 0 !important;
  1454. }
  1455. ::v-deep .el-form-item .el-form-item__label{
  1456. font-size: 13px !important;
  1457. }
  1458. .remark {
  1459. margin-top: 20px;
  1460. .remark_title {
  1461. margin-bottom: 30px;
  1462. font-size: 18px;
  1463. font-weight: bold;
  1464. }
  1465. .remark_text {
  1466. padding: 2px;
  1467. min-height: 150px;
  1468. border: 1px solid #cccccc82;
  1469. border-radius: 4px;
  1470. color: #958383;
  1471. font-size: 16px;
  1472. background: #3333331a;
  1473. }
  1474. }
  1475. </style>