阅行客电子档案
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.

470 lines
18 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <el-dialog class="partPackingDialog" :title="packingTitle" :visible.sync="packingVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :before-close="handleClose">
  3. <div class="setting-dialog">
  4. <div class="packing-head">
  5. <div class="head-search">
  6. <!-- 搜索 -->
  7. <el-input v-model="caseQuery[inputSelect]" clearable size="small" placeholder="请输入搜索关键字" style="width: 245px; margin-right: 10px;" class="input-prepend filter-item" @keyup.enter.native="getCaseList" @clear="clearTableData">
  8. <el-select slot="prepend" v-model="inputSelect" style="width: 90px" @change="querySelect">
  9. <el-option
  10. v-for="item in queryOption"
  11. :key="item.value"
  12. :label="item.label"
  13. :value="item.value"
  14. />
  15. </el-select>
  16. </el-input>
  17. <el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getCaseList">搜索</el-button>
  18. <el-button class="filter-rfid" type="success" disabled><i class="iconfont icon-duqu" />读取</el-button>
  19. </div>
  20. <div class="selct-data-head">
  21. <p v-if="selectedCategory.arrangeType === 1">数据来源文件<span>{{ selections.length }}</span>条数据</p>
  22. <!-- totalSumAll -->
  23. <p v-else>数据来源案卷<span>{{ selections.length }}</span>条数据 卷内<span>{{ 111 }}</span>条数据</p>
  24. </div>
  25. </div>
  26. <!--表格渲染-->
  27. <!-- 装盒 -->
  28. <el-table
  29. v-if="!isPackingOrPartType"
  30. ref="table"
  31. :data="tableData"
  32. style="min-width: 100%"
  33. height="calc(100vh - 382px)"
  34. >
  35. <el-table-column prop="create_date" label="操作" width="80" align="center">
  36. <template slot-scope="scope">
  37. <el-button class="packing-handle-btn iconfont" @click="handleCartoning(scope.row)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
  38. </template>
  39. </el-table-column>
  40. <el-table-column prop="caseNum" label="盒号" min-width="60" align="center" />
  41. <el-table-column prop="depositNum" label="已装" min-width="100" align="center" />
  42. <el-table-column prop="tid" label="TID" min-width="120" align="center" />
  43. <el-table-column prop="barcode" label="条形码" min-width="120" align="center" />
  44. <el-table-column prop="retention" label="保管期限" min-width="100" align="center" />
  45. <el-table-column prop="security_class" label="密级" min-width="100" align="center" />
  46. <el-table-column prop="fonds" label="全宗" min-width="100" align="center" />
  47. <el-table-column prop="category" label="所属门类" min-width="100" align="center" />
  48. <el-table-column prop="classify" label="所属分类" min-width="100" align="center" />
  49. </el-table>
  50. <!-- 分卷 -->
  51. <div v-else class="part-packing-cont">
  52. <div class="part-packing-item">
  53. <h5 class="part-packing-title">盒列表-待选</h5>
  54. <el-table
  55. ref="table"
  56. class="custom-table"
  57. :data="tableData"
  58. style="width: 100%"
  59. height="calc(100vh/2 - 200px)"
  60. >
  61. <el-table-column prop="create_date" label="操作" width="80" align="center">
  62. <template slot-scope="scope">
  63. <el-button class="packing-handle-btn iconfont" @click="handleCartoning(scope.row)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="caseNum" label="盒号" min-width="60" align="center" />
  67. <el-table-column prop="depositNum" label="已装" min-width="100" align="center" />
  68. <el-table-column prop="tid" label="TID" min-width="120" align="center" />
  69. <el-table-column prop="barcode" label="条形码" min-width="120" align="center" />
  70. <el-table-column prop="retention" label="保管期限" min-width="100" align="center" />
  71. <el-table-column prop="security_class" label="密级" min-width="100" align="center" />
  72. <el-table-column prop="fonds" label="全宗" min-width="100" align="center" />
  73. <el-table-column prop="category" label="所属门类" min-width="100" align="center" />
  74. <el-table-column prop="classify" label="所属分类" min-width="100" align="center" />
  75. </el-table>
  76. </div>
  77. <div class="part-packing-item">
  78. <h5 class="part-packing-title">盒列表-已选</h5>
  79. <el-table
  80. ref="selectBox"
  81. class="custom-table"
  82. :data="selectTableData"
  83. style="width: 100%"
  84. height="calc(100vh/2 - 200px)"
  85. >
  86. <el-table-column prop="create_date" label="操作" align="center">
  87. <template slot-scope="scope">
  88. <el-button class="packing-recall-btn iconfont" @click="cancelParking(scope.row,scope.$index)"><svg-icon icon-class="chehui" class="svg-arc-style" />撤销</el-button>
  89. </template>
  90. </el-table-column>
  91. <el-table-column prop="caseNum" label="盒号" min-width="60" align="center" />
  92. <el-table-column prop="depositNum" label="已装" min-width="100" align="center" />
  93. <el-table-column prop="tid" label="TID" min-width="120" align="center" />
  94. <el-table-column prop="barcode" label="条形码" min-width="120" align="center" />
  95. <el-table-column prop="retention" label="保管期限" min-width="100" align="center" />
  96. <el-table-column prop="security_class" label="密级" min-width="100" align="center" />
  97. <el-table-column prop="fonds" label="全宗" min-width="100" align="center" />
  98. <el-table-column prop="category" label="所属门类" min-width="100" align="center" />
  99. <el-table-column prop="classify" label="所属分类" min-width="100" align="center" />
  100. </el-table>
  101. </div>
  102. <div class="part-packing-item">
  103. <h5 class="part-packing-title">档案列表-待选</h5>
  104. <el-table
  105. ref="archivesList"
  106. class="archives-table custom-table"
  107. :data="archivesTable"
  108. highlight-current-row
  109. style="width: 100%;"
  110. height="calc(100vh/2 - 200px)"
  111. @selection-change="selectionChangeHandler"
  112. @row-click="clickRowHandler"
  113. >
  114. <el-table-column type="selection" width="55" align="center" />
  115. <!-- <el-table-column prop="fonds" label="全宗" min-width="100" align="center" /> -->
  116. <!-- <el-table-column label="文件" prop="children_num" width="55" align="center" /> -->
  117. <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
  118. <template slot="header">
  119. <el-tooltip
  120. class="item"
  121. effect="dark"
  122. :content="field.fieldCnName"
  123. placement="top-start"
  124. >
  125. <span>{{ field.fieldCnName }}</span>
  126. </el-tooltip>
  127. </template>
  128. <template slot-scope="scope">
  129. {{ scope.row[field.fieldName] }}
  130. </template>
  131. </el-table-column>
  132. </el-table>
  133. </div>
  134. <div class="part-packing-item">
  135. <h5 class="part-packing-title">档案列表-已选</h5>
  136. <el-table
  137. ref="selectArchivesList"
  138. class="archives-table custom-table"
  139. :data="selectArchivesTable"
  140. highlight-current-row
  141. style="width: 100%;"
  142. height="calc(100vh/2 - 200px)"
  143. >
  144. <el-table-column type="index" label="序号" width="55" align="center" />
  145. <!-- <el-table-column label="文件" prop="children_num" width="55" align="center" /> -->
  146. <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
  147. <template slot="header">
  148. <el-tooltip
  149. class="item"
  150. effect="dark"
  151. :content="field.fieldCnName"
  152. placement="top-start"
  153. >
  154. <span>{{ field.fieldCnName }}</span>
  155. </el-tooltip>
  156. </template>
  157. <template slot-scope="scope">
  158. {{ scope.row[field.fieldName] }}
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. </div>
  163. </div>
  164. <div v-if="isPackingOrPartType" slot="footer" class="dialog-footer">
  165. <el-button type="text">取消</el-button>
  166. <el-button type="primary" @click="handleComfireCartoning">确定</el-button>
  167. </div>
  168. </div>
  169. </el-dialog>
  170. </template>
  171. <script>
  172. // import { FetchInitCartoningList, FetchCartoning } from '@/api/archivesManage/caseManage'
  173. // import { FetchInitArchivesView } from '@/api/archivesManage/archivesList'
  174. import { header, form } from '@crud/crud'
  175. const data = [
  176. {
  177. 'id': '02877E5A6559BEDE24B227',
  178. 'caseName': 'ZL-2023-1',
  179. 'caseType': 0,
  180. 'tid': null,
  181. 'barcode': null,
  182. 'shelfId': null,
  183. 'folderLocation': null,
  184. 'folderLocationDetails': null,
  185. 'depositNum': 0,
  186. 'storageType': 0,
  187. 'storageTime': null,
  188. 'create_by': 'admin',
  189. 'update_by': 'admin',
  190. 'create_time': 1695628425000,
  191. 'update_time': 1702971551000
  192. }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}
  193. ]
  194. export default {
  195. name: 'Packing',
  196. components: { },
  197. // inject: ['caseData', 'recycleMain'],
  198. mixins: [
  199. header(),
  200. form({})
  201. ],
  202. props: {
  203. selectedCategory: {
  204. type: Object,
  205. default: function() {
  206. return {}
  207. }
  208. },
  209. selections: {
  210. type: Array,
  211. default: () => []
  212. }
  213. },
  214. data() {
  215. return {
  216. packingTitle: '装盒',
  217. packingData: [],
  218. tableData: [],
  219. selectTableData: [],
  220. archivesTable: [],
  221. selectArchivesTable: [],
  222. tid: null,
  223. caseName: null,
  224. barcode: null,
  225. caseQuery: {},
  226. inputSelect: null,
  227. queryOption: [
  228. { value: 'caseName', label: '盒号' },
  229. { value: 'tid', label: 'TID' },
  230. { value: 'barcode', label: '条形码' }
  231. ],
  232. packingVisible: false, // 装盒
  233. isPackingOrPartType: 0
  234. }
  235. },
  236. created() {
  237. // 初始化带select的输入框的 - 搜索
  238. this.inputSelect = this.queryOption[0].value
  239. this.tableData = data
  240. this.selectTableData = data
  241. },
  242. methods: {
  243. // 搜索-select
  244. querySelect(val) {
  245. this.inputSelect = val
  246. },
  247. // 搜索盒列表
  248. getCaseList() {
  249. if (!this.caseQuery[this.inputSelect]) {
  250. this.$message.error('请输入后再搜索!')
  251. return
  252. }
  253. switch (this.inputSelect) {
  254. case 'caseName':
  255. this.caseName = this.caseQuery[this.inputSelect]
  256. this.tid = null
  257. this.barcode = null
  258. break
  259. case 'tid':
  260. this.tid = this.caseQuery[this.inputSelect]
  261. this.caseName = null
  262. this.barcode = null
  263. break
  264. case 'barcode':
  265. this.barcode = this.caseQuery[this.inputSelect]
  266. this.caseName = null
  267. this.tid = null
  268. break
  269. }
  270. // const params = {
  271. // 'tid': this.tid,
  272. // 'caseName': this.caseName,
  273. // 'barcode': this.barcode,
  274. // 'page': 0,
  275. // 'size': 10
  276. // }
  277. // FetchInitCartoningList(params).then(res => {
  278. // this.tableData = res.content
  279. // })
  280. },
  281. async getPackingFileList() {
  282. // let categoryId
  283. // if (this.selectedCategory.isType === 2) {
  284. // categoryId = this.selectedCategory.children[0].children[0].id
  285. // } else {
  286. // categoryId = this.selectedCategory.children[0].id
  287. // }
  288. // const params = {
  289. // 'categoryId': categoryId,
  290. // 'parentsId': this.recycleMain.anjuanSelection.id,
  291. // 'isdel': false,
  292. // 'page': 0,
  293. // 'size': null,
  294. // 'sort': null,
  295. // 'queryType': null,
  296. // 'queryTitle': null,
  297. // 'itemNo': null,
  298. // 'archiveCtgNo': null,
  299. // 'responsibleby': null,
  300. // 'archiveNo': null,
  301. // 'archiveYear': null,
  302. // 'department': null,
  303. // 'retention': null,
  304. // 'securityClass': null,
  305. // 'organizationMatter': null
  306. // }
  307. // await FetchInitArchivesView(params).then(data => {
  308. // if (data) {
  309. // this.packingData = data.list.content
  310. // this.archivesTable = data.list.content
  311. // }
  312. // })
  313. },
  314. // 装盒 api
  315. async handleCartoning(row) {
  316. // let jnCategoryId
  317. // let archivesParentsId
  318. // if (this.caseData.selectedCategory.isType === 5) {
  319. // this.packingData = this.caseData.selections
  320. // jnCategoryId = this.caseData.selectedCategory.id
  321. // } else {
  322. // await this.getPackingFileList()
  323. // if (this.caseData.selectedCategory.isType === 2) {
  324. // jnCategoryId = this.caseData.selectedCategory.children[0].children[0].id
  325. // } else {
  326. // jnCategoryId = this.caseData.selectedCategory.children[0].id
  327. // }
  328. // archivesParentsId = this.caseData.selections[0].id
  329. // }
  330. // const arrParams = this.packingData.map(item => {
  331. // const json = {}
  332. // json.archivesId = item.id
  333. // if (this.caseData.selectedCategory.isType === 5) {
  334. // json.archivesParentsId = item.id
  335. // } else {
  336. // json.archivesParentsId = archivesParentsId
  337. // }
  338. // json.caseId = row.id
  339. // json.caseName = row.caseName
  340. // json.categoryId = jnCategoryId
  341. // return json
  342. // })
  343. // await this.FetchCartioning(arrParams)
  344. },
  345. FetchCartioning(arrParams) {
  346. // FetchCartoning(arrParams).then(res => {
  347. // this.$message.success('装盒成功!')
  348. // this.packingVisible = false
  349. // this.crud.refresh()
  350. // this.tableData = []
  351. // this.caseQuery[this.inputSelect] = ''
  352. // })
  353. },
  354. // 分卷装盒
  355. handlePartParking(row, index) {
  356. // if (!this.selections.length) {
  357. // this.$message.error('请选择要装盒的档案!')
  358. // return
  359. // }
  360. // // 分卷装盒存在未完成装盒操作,且某一个盒能一直搜索到,故添加到盒里时进行判断筛选
  361. // if (this.selectTableData.findIndex(val => val.id === row.id) === -1) {
  362. // this.selectTableData.push(row)
  363. // }
  364. // this.tableData.splice(index, 1)
  365. // this.selections.forEach(item => {
  366. // item.caseId = row.id
  367. // item.caseName = row.caseName
  368. // this.archivesTable.splice(this.archivesTable.findIndex(val => val.id === item.id), 1)
  369. // this.selectArchivesTable.push(item)
  370. // })
  371. },
  372. // 撤回装盒
  373. cancelParking(row, index) {
  374. // this.tableData.unshift(row)
  375. // this.selectTableData.splice(index, 1)
  376. // this.selectArchivesTable.forEach((item, i) => {
  377. // if (item.caseId === row.id) {
  378. // this.archivesTable.push(item)
  379. // }
  380. // })
  381. // this.selectArchivesTable.splice(this.selectArchivesTable.findIndex((item, i) => item.caseId === row.id), this.archivesTable.length)
  382. },
  383. handleComfireCartoning() {
  384. // if (this.archivesTable.length) {
  385. // this.$message.error('左侧档案待选列表全部装盒完成才可保存')
  386. // return
  387. // }
  388. // let jnCategoryId
  389. // if (this.caseData.selectedCategory.isType === 2) {
  390. // jnCategoryId = this.caseData.selectedCategory.children[0].children[0].id
  391. // } else {
  392. // jnCategoryId = this.caseData.selectedCategory.children[0].id
  393. // }
  394. // const arrParams = this.selectArchivesTable.map(item => {
  395. // const json = {}
  396. // json.archivesId = item.id
  397. // json.archivesParentsId = this.caseData.selections[0].id
  398. // json.caseId = item.caseId
  399. // json.caseName = item.caseName
  400. // json.categoryId = jnCategoryId
  401. // return json
  402. // })
  403. // this.FetchCartioning(arrParams)
  404. },
  405. clearTableData() {
  406. this.tableData = []
  407. },
  408. // table
  409. clickRowHandler(row) {
  410. this.$refs.archivesList.toggleRowSelection(row)
  411. },
  412. // table
  413. selectionChangeHandler(val) {
  414. this.selections = val
  415. },
  416. // dialog - close
  417. handleClose(done) {
  418. this.showCoverVisible = false
  419. this.$set(this.caseQuery, this.inputSelect, '')
  420. this.tableData = []
  421. this.selectTableData = []
  422. this.archivesTable = []
  423. this.selectArchivesTable = []
  424. done()
  425. }
  426. }
  427. }
  428. </script>
  429. <style lang="scss" scoped>
  430. .filter-rfid{
  431. margin-left: 10px;
  432. padding: 0 13px;
  433. height: 32px;
  434. line-height: 30px;
  435. &.is-disabled,
  436. &.is-disabled:focus{
  437. border-color: #0348F3 !important;
  438. background-color: rgba(31, 85, 235, 0.20) !important;
  439. color: #0348F3 !important;
  440. opacity: 0.6;
  441. }
  442. .iconfont{
  443. font-size: 20px;
  444. }
  445. }
  446. .el-table .el-button{
  447. padding: 0;
  448. }
  449. ::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar {
  450. width: 5px !important;
  451. height: 5px !important;
  452. background-color: #DDE8FB !important;
  453. }
  454. ::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar-thumb {
  455. border-radius: 3px;
  456. background-color: #4578F6 !important;
  457. }
  458. ::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
  459. background-color: #4578F6 !important;
  460. }
  461. ::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar-corner {
  462. background-color: #DDE8FB !important;
  463. }
  464. </style>