fabric-list.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <!-- 装箱单-面料列表 -->
  3. <div id="fabricList">
  4. <!-- 查询 -->
  5. <a-card :bordered="false">
  6. <div class="table-page-search-wrapper">
  7. <a-form layout="inline" @keyup.enter.native="searchQuery">
  8. <a-row :gutter="24">
  9. <a-col :md="6" :sm="8">
  10. <a-form-item label="单据号">
  11. <a-input placeholder="请输入单据号" v-model="queryParam.documentNo"></a-input>
  12. </a-form-item>
  13. </a-col>
  14. <!-- <a-col :md="6" :sm="8">
  15. <a-form-item label="订单号">
  16. <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
  17. </a-form-item>
  18. </a-col> -->
  19. <a-col :md="6" :sm="8">
  20. <a-form-item label="集装箱号">
  21. <a-input placeholder="请输入集装箱号" v-model="queryParam.containerNumber"></a-input>
  22. </a-form-item>
  23. </a-col>
  24. <a-col :md="6" :sm="8">
  25. <a-form-item label="外销发票号">
  26. <a-input placeholder="请输入外销发票号" v-model="queryParam.exportInvoiceNo"></a-input>
  27. </a-form-item>
  28. </a-col>
  29. <a-col :md="6" :sm="8">
  30. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  31. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  32. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  33. <a @click="handleToggleSearch" style="margin-left: 8px">
  34. {{ toggleSearchStatus ? '收起' : '展开' }}
  35. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  36. </a>
  37. </span>
  38. </a-col>
  39. </a-row>
  40. </a-form>
  41. </div>
  42. </a-card>
  43. <!-- 操作按钮区域 推送 新增-->
  44. <a-card :bordered="false" style="marginTop:10px;">
  45. <div class="table-operator">
  46. <a-button type="primary" @click="addFabric" icon="plus">新增</a-button>
  47. <a-button type="primary" @click="bitchSubmitList" icon="check">批量提交</a-button>
  48. <a-button type="primary" @click="bitchCancelSubmitList" icon="close">批量取消提交</a-button>
  49. <a-button type="primary" @click="push" icon="export">推送</a-button>
  50. <!-- <a-button type="primary" icon="download" @click="handleExportXls('装箱单-面辅料')">装箱单面辅料导出</a-button> -->
  51. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" @change="handleImportExcel" :customRequest="uploadFlie" >
  52. <a-button type="primary" icon="import">导入-来源出运明细</a-button>
  53. </a-upload>
  54. <a-button type="primary" @click="synchronization" icon="reload">同步</a-button>
  55. </div>
  56. <!-- 子表 :scroll="{ x: 1500 }" 内容少 无需滚动-->
  57. <a-table
  58. bordered
  59. :columns="fabricListColumns"
  60. :data-source="fabricListData"
  61. :loading="loading"
  62. :scroll="{ x: 1500 , y: 500 }"
  63. :pagination="pagination"
  64. :row-key="record => record.id"
  65. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  66. @change="handleTableChange"
  67. >
  68. <!-- 集装箱号 输入框
  69. <a-form-model
  70. slot="containerNo"
  71. slot-scope="text, record"
  72. :ref="record.index"
  73. :model="record"
  74. style="width:100%;height:40px"
  75. >
  76. <a-form-model-item prop="containerNo">
  77. <a-input style="width:100%" v-model="record.containerNumber" />
  78. </a-form-model-item>
  79. </a-form-model> -->
  80. <!-- 单据状态 -->
  81. <span slot="pushState" slot-scope="text, record">
  82. <a-tag color="orange" v-if="record.pushState == '0'">未推送</a-tag>
  83. <a-tag color="red" v-if="record.pushState == '2'">推送失败</a-tag>
  84. <a-tag color="green" v-if="record.pushState == '1'">推送成功</a-tag>
  85. </span>
  86. <!-- 单据状态 -->
  87. <span slot="state" slot-scope="text, record">
  88. <a-tag color="orange" v-if="record.status == '0'">已保存</a-tag>
  89. <a-tag color="green" v-if="record.status == '1'">已提交</a-tag>
  90. </span>
  91. <!-- 操作 -->
  92. <span slot="operationSlot" slot-scope="text, record">
  93. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="enclosureUrl" @change="handleImportExcel" :data="{id:record.id}" >
  94. <a style="color:green;">附件上传</a>
  95. </a-upload>
  96. <a-divider type="vertical" />
  97. <a-dropdown>
  98. <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
  99. <a-menu slot="overlay" v-if="record.status=='0'">
  100. <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
  101. <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
  102. <a-menu-item><a @click="pushU8(record)">推送U8</a></a-menu-item>
  103. <!-- <a-menu-item><a @click="itemXls(record)">导出</a></a-menu-item> -->
  104. <!-- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item> -->
  105. <a-menu-item>
  106. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  107. <a href="javascript:void(0);" style="color:red;">删除</a>
  108. </a-popconfirm>
  109. </a-menu-item>
  110. </a-menu>
  111. <!-- 已提交 -->
  112. <a-menu slot="overlay" v-if="record.status=='1'">
  113. <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
  114. <a-menu-item><a @click="pushU8(record)">推送U8</a></a-menu-item>
  115. <!-- <a-menu-item><a @click="itemXls(record)">导出</a></a-menu-item> -->
  116. <!-- <a-menu-item><a @click="cancel(record)">取消提交</a></a-menu-item> -->
  117. </a-menu>
  118. </a-dropdown>
  119. </span>
  120. </a-table>
  121. </a-card>
  122. <!-- 抽屉 -->
  123. <div>
  124. <addFabric-drawer ref="addFabricDrawer" :father="aa" @ok="modalFormOk" :fatherList="getFabricList"></addFabric-drawer>
  125. <detailsFabric-drawer ref="detailsFabricDrawer" :father="bb" @ok="modalFormOk"></detailsFabric-drawer>
  126. <editFabric-drawer ref="editFabricDrawer" :father="cc" @ok="modalFormOk"></editFabric-drawer>
  127. </div>
  128. <!-- 导入确认框 -->
  129. <div>
  130. <a-modal :visible="visible" title="是否继续导入" @ok="handleOk" @cancel="handleCancel">
  131. <ul>
  132. <li v-for="(item,index) in message" :key="index">{{item}}</li>
  133. </ul>
  134. </a-modal>
  135. </div>
  136. </div>
  137. </template>
  138. <script>
  139. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  140. import { downFile } from '@/api/manage'
  141. import JEllipsis from '@/components/jeecg/JEllipsis'
  142. import moment from 'moment'
  143. import addFabricDrawer from '@views/packing-list/packinglist-fabrics/addFabricDrawer.vue'
  144. import detailsFabricDrawer from '@views/packing-list/packinglist-fabrics/detailsFabricDrawer.vue'
  145. import editFabricDrawer from '@views/packing-list/packinglist-fabrics/editFabricDrawer.vue'
  146. import { fabricList,fabricListId,deleteFabricList,submitList,cancelSubmit,bitchSubmit,bitchCancelSubmit,synchronizationData,upload,fileDetail,pushOrderData} from '@api/document/packing-list/packinglist-fabrics'
  147. export default {
  148. name: 'FabricList', // 装箱单-面料
  149. mixins: [JeecgListMixin],
  150. components: { JEllipsis, moment, addFabricDrawer, detailsFabricDrawer, editFabricDrawer },
  151. data() {
  152. // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  153. return {
  154. // 表头
  155. fabricListColumns: [
  156. {
  157. title: '单据号',
  158. dataIndex: 'documentNo',
  159. width: 160,
  160. ellipsis: true,
  161. className: 'replacecolor'
  162. },
  163. // {
  164. // title: '订单号',
  165. // dataIndex: 'orderNumber',
  166. // width: 160,
  167. // className: 'replacecolor'
  168. // },
  169. {
  170. title: '集装箱号',
  171. dataIndex: 'containerNumber',
  172. width: 120,
  173. ellipsis: true,
  174. // scopedSlots: { customRender: 'containerNo' },
  175. className: 'replacecolor'
  176. },
  177. // {
  178. // title: '发票号',
  179. // dataIndex: 'invoiceNo',
  180. // width: 160,
  181. // ellipsis: true,
  182. // className: 'replacecolor'
  183. // },
  184. {
  185. title: '外销发票号',
  186. dataIndex: 'exportInvoiceNo',
  187. width: 150,
  188. ellipsis: true,
  189. className: 'replacecolor'
  190. },
  191. {
  192. title: '装柜日期',
  193. dataIndex: 'latestDateOfShipment',
  194. width: 120,
  195. ellipsis: true,
  196. className: 'replacecolor'
  197. },
  198. {
  199. title: '成衣工厂',
  200. dataIndex: 'garmentFactory',
  201. width: 140,
  202. ellipsis: true,
  203. className: 'replacecolor'
  204. },
  205. {
  206. title: '制单人',
  207. dataIndex: 'createBy',
  208. width: 120,
  209. ellipsis: true,
  210. className: 'replacecolor'
  211. },
  212. {
  213. title: '制单日期',
  214. dataIndex: 'preparedDate',
  215. width: 140,
  216. ellipsis: true,
  217. // 有问题,自动显示当日日期
  218. // customRender: text => {
  219. // return moment(text).format('YYYY-MM-DD')
  220. // },
  221. className: 'replacecolor'
  222. },
  223. {
  224. title: '托书号',
  225. dataIndex: 'shippingOrderNumber',
  226. width: 160,
  227. ellipsis: true,
  228. className: 'replacecolor'
  229. },
  230. {
  231. title: '推送状态',
  232. dataIndex: 'pushState',
  233. scopedSlots: { customRender: 'pushState' },
  234. width: 140,
  235. className: 'replacecolor'
  236. },
  237. {
  238. title: '状态',
  239. dataIndex: 'status',
  240. scopedSlots: { customRender: 'state' },
  241. width: 140,
  242. className: 'replacecolor'
  243. },
  244. {
  245. title: '操作',
  246. dataIndex: 'operation',
  247. scopedSlots: { customRender: 'operationSlot' },
  248. width: 150,
  249. // fixed: 'right',
  250. className: 'replacecolor'
  251. }
  252. ],
  253. fabricListData: [],
  254. visible:false,
  255. file:{},
  256. message:[],//导入文件信息
  257. selectedRowKeys: [], // 勾选航
  258. loading: false, // 表格加载
  259. // 查询条件
  260. queryParam: {
  261. pageNo: '' // 初始页
  262. },
  263. pagination:{},
  264. url: {
  265. // syncUser: '/act/process/extActProcess/doSyncUser',
  266. list: '/sys/user/list',
  267. // delete: '/sys/user/delete',
  268. // deleteBatch: '/sys/user/deleteBatch',
  269. exportXlsUrl: '/sys/user/exportXls', // 导出
  270. importExcelUrl: 'splfi/syPackingListFabric/importExcel', // 导入
  271. enclosureUrl:'splfi/syPackingListFabric/upload'//附件导入
  272. }
  273. }
  274. },
  275. created() {
  276. this.getFabricList()
  277. },
  278. methods: {
  279. // 导入
  280. uploadFlie(file) {
  281. const formData = new FormData()
  282. formData.append('file', file.file)
  283. fileDetail(formData).then(res => {
  284. this.loading = false
  285. if (res.success) {
  286. this.visible = true
  287. this.message = res.message.split(';').filter((element) => {
  288. return element !== "";
  289. });
  290. this.file = file
  291. }else{
  292. this.$message.error(res.message);
  293. }
  294. })},
  295. //继续导入
  296. handleOk(){
  297. const formData = new FormData()
  298. formData.append('file', this.file.file)
  299. upload(formData).then(res => {
  300. this.visible = false
  301. if (res.success) {
  302. this.$message.success('导入成功')
  303. this.getFabricList()
  304. }else{
  305. this.$message.error(res.message);
  306. }
  307. })
  308. },
  309. //取消导入
  310. handleCancel(){
  311. this.visible = false
  312. this.loading = false
  313. },
  314. //分页查询
  315. getFabricList(){
  316. this.$nextTick(() => {
  317. this.queryParam.pageSize = 20
  318. fabricList(this.queryParam).then(res => {
  319. if (res.success) {
  320. this.fabricListData = res.result.records;
  321. this.loading = false
  322. this.selectedRowKeys = []
  323. this.pagination = {
  324. total: res.result.total,
  325. current: res.result.current,
  326. pageSize: res.result.size
  327. }
  328. }else{
  329. this.$message.error(res.message);
  330. }
  331. })
  332. })
  333. },
  334. // 查询按钮
  335. searchQuery() {
  336. this.toggleSearchStatus = false
  337. this.queryParam.pageNo = ''
  338. this.getFabricList()
  339. },
  340. //重置查询
  341. searchReset() {
  342. this.queryParam = {}
  343. this.getFabricList()
  344. },
  345. // ------------------------------------
  346. // 推送
  347. push() {},
  348. // 新增
  349. addFabric() {
  350. console.log('新增-装箱单面料')
  351. this.$refs.addFabricDrawer.visible = true
  352. },
  353. // --------------------------------------
  354. // 操作 附件上传
  355. accessoryUpload() {},
  356. // 列表导出
  357. handleExportXls(fileName) {
  358. downFile('/splfi/syPackingListFabric/exportXls',this.queryParam).then(data => {
  359. if (!data) {
  360. this.$message.warning('文件下载失败')
  361. return
  362. }
  363. if (typeof window.navigator.msSaveBlob !== 'undefined') {
  364. window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx')
  365. } else {
  366. let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
  367. let link = document.createElement('a')
  368. link.style.display = 'none'
  369. link.href = url
  370. link.setAttribute('download', fileName + '.xlsx')
  371. document.body.appendChild(link)
  372. link.click()
  373. document.body.removeChild(link) // 下载完成移除元素
  374. window.URL.revokeObjectURL(url) // 释放掉blob对象
  375. }
  376. })
  377. },
  378. // 操作 单条数据导出
  379. itemXls(record) {
  380. downFile('/splfi/syPackingListFabric/exportXls',{id:record.id}).then(data => {
  381. if (!data) {
  382. this.$message.warning('文件下载失败')
  383. return
  384. }
  385. if (typeof window.navigator.msSaveBlob !== 'undefined') {
  386. window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), item + '.xlsx')
  387. }else {
  388. let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
  389. let link = document.createElement('a')
  390. link.style.display = 'none'
  391. link.href = url
  392. link.setAttribute('download', '装箱单' + '.xlsx')
  393. document.body.appendChild(link)
  394. link.click()
  395. document.body.removeChild(link) // 下载完成移除元素
  396. window.URL.revokeObjectURL(url) // 释放掉blob对象
  397. }
  398. })
  399. },
  400. // 同步
  401. synchronization(){
  402. this.$nextTick(() => {
  403. synchronizationData().then(res => {
  404. if (res.success) {
  405. this.$message.success('同步成功')
  406. this.getFabricList();
  407. }else{
  408. this.$message.error(res.message);
  409. }
  410. })
  411. })
  412. },
  413. // 操作 详情
  414. details(record) {
  415. console.log('详情', record.id)
  416. // console.log('编辑')
  417. this.$nextTick(() => {
  418. fabricListId({id:record.id}).then(res => {
  419. if (res.success) {
  420. var data = res.result
  421. this.$refs.detailsFabricDrawer.visible = true
  422. this.$refs.detailsFabricDrawer.addFabric ={
  423. documentNo:data.documentNo,
  424. // orderNumber:data.orderNumber,
  425. containerNumber:data.containerNumber,
  426. latestDateOfShipment:data.latestDateOfShipment,
  427. garmentFactory:data.garmentFactory,
  428. invoiceNo:data.invoiceNo,
  429. preparedBy:data.preparedBy,
  430. preparedDate:data.preparedDate,
  431. exportInvoiceNo:data.exportInvoiceNo,
  432. shippingOrderNumber:data.shippingOrderNumber,
  433. remarks:data.remarks,
  434. plumbumNo:data.plumbumNo,
  435. }
  436. if(record.documentNo.substr(0, 2) == "FL"){
  437. this.$refs.detailsFabricDrawer.judageCloumn()
  438. }
  439. data.syPackingListFabricItem.map(item =>{
  440. if(item.manualYarnFlag == 0){
  441. item.manualYarnFlag = '否'
  442. }else {
  443. item.manualYarnFlag = '是'
  444. }
  445. })
  446. this.$refs.detailsFabricDrawer.accessory =(data.accessory!==''&&data.accessory) ?data.accessory.split(","):''
  447. this.$refs.detailsFabricDrawer.addFabricData = data.syPackingListFabricItem
  448. }else{
  449. this.$message.error(res.message);
  450. }
  451. })
  452. })
  453. },
  454. // 操作 编辑
  455. edit(record) {
  456. // console.log('编辑')
  457. this.$nextTick(() => {
  458. fabricListId({id:record.id}).then(res => {
  459. if (res.success) {
  460. var data = res.result
  461. this.$refs.addFabricDrawer.visible = true
  462. this.$refs.addFabricDrawer.defaultMethod = 'edit'
  463. this.$refs.addFabricDrawer.addFabric ={
  464. id:data.id,
  465. // orderNumber:data.orderNumber,
  466. documentNo:data.documentNo,
  467. containerNumber:data.containerNumber,
  468. latestDateOfShipment:data.latestDateOfShipment,
  469. garmentFactory:data.garmentFactory,
  470. invoiceNo:data.invoiceNo,
  471. preparedBy:data.preparedBy,
  472. preparedDate:data.preparedDate,
  473. exportInvoiceNo:data.exportInvoiceNo,
  474. shippingOrderNumber:data.shippingOrderNumber,
  475. remarks:data.remarks,
  476. plumbumNo:data.plumbumNo,
  477. }
  478. if(record.documentNo.substr(0, 2) == "FL"){
  479. this.$refs.addFabricDrawer.judageCloumn()
  480. }
  481. data.syPackingListFabricItem.map(item =>{
  482. if(item.manualYarnFlag == 0){
  483. this.$refs.addFabricDrawer.manualYarnDisabled = true
  484. this.$forceUpdate()
  485. }else {
  486. this.$refs.addFabricDrawer.manualYarnDisabled = false
  487. }
  488. })
  489. this.$refs.addFabricDrawer.addFabricData = data.syPackingListFabricItem
  490. }else{
  491. this.$message.error(res.message);
  492. }
  493. })
  494. })
  495. },
  496. //提交
  497. submit(record){
  498. console.log(record.id)
  499. submitList({id:record.id}).then(res =>{
  500. if (res.success) {
  501. record.status = 1
  502. this.getFabricList()
  503. this.$message.success('提交成功')
  504. }else{
  505. this.$message.error(res.message);
  506. }
  507. })
  508. },
  509. pushU8(record){
  510. pushOrderData({ids : record.id}).then(res =>{
  511. if (res.success) {
  512. this.$message.success('推送U8成功');
  513. }else{
  514. this.$message.error(res.message);
  515. }
  516. })
  517. },
  518. cancel(record){
  519. console.log(record.id)
  520. cancelSubmit({id:record.id}).then(res =>{
  521. if (res.success) {
  522. record.status = 0
  523. this.getFabricList()
  524. this.$message.success('取消提交成功')
  525. }else{
  526. this.$message.error(res.message);
  527. }
  528. })
  529. },
  530. //批量提交
  531. bitchSubmitList(){
  532. for(var i =0;i<this.selectedRows.length;i++){
  533. var tickRow = this.selectedRows[i]
  534. if(tickRow.status === '1'){
  535. this.$message.error("部分数据是已提交,请勿重复提交!");
  536. return
  537. }
  538. }
  539. var ids = this.selectedRowKeys.toString()
  540. bitchSubmit({ids : ids}).then(res =>{
  541. if (res.success) {
  542. this.getFabricList()
  543. this.selectedRowKeys = []
  544. this.$message.success('提交成功');
  545. }else{
  546. this.$message.error(res.message);
  547. }
  548. })
  549. },
  550. //批量取消推送
  551. bitchCancelSubmitList(){
  552. for(var i =0;i<this.selectedRows.length;i++){
  553. var tickRow = this.selectedRows[i]
  554. if(tickRow.status === '0'){
  555. this.$message.error("含未提交数据,请重新选择!");
  556. return
  557. }
  558. }
  559. var ids = this.selectedRowKeys.toString()
  560. bitchCancelSubmit({ids : ids}).then(res =>{
  561. if (res.success) {
  562. this.getFabricList()
  563. this.selectedRowKeys = []
  564. this.$message.success('取消提交成功');
  565. }else{
  566. this.$message.error(res.message);
  567. }
  568. })
  569. },
  570. // 操作 删除
  571. handleDelete(id) {
  572. this.$nextTick(() => {
  573. if(this.queryParam.pageNo > 1 && this.fabricListData.length === 1){
  574. this.queryParam.pageNo = this.queryParam.pageNo -1
  575. }
  576. deleteFabricList({ id: id }).then(res => {
  577. if (res.success) {
  578. this.getFabricList()
  579. this.$message.success('删除成功')
  580. } else {
  581. this.$message.error('删除成功')
  582. }
  583. })
  584. })
  585. },
  586. // --------------------------------------
  587. // ??
  588. modalFormOk() {},
  589. // 选中行
  590. onSelectChange(keys, rows) {
  591. this.selectedRowKeys = keys
  592. this.selectedRows = rows
  593. },
  594. // --------------------------------------
  595. aa() {},
  596. bb() {},
  597. cc() {},
  598. // 分页、排序、筛选变化时触发
  599. handleTableChange(pagination, filters, sorter) {
  600. // console.log('当前页信息>>>>',pagination)
  601. this.queryParam.pageNo = pagination.current
  602. this.getFabricList()
  603. }
  604. },
  605. computed: {
  606. // 导入
  607. importExcelUrl: function() {
  608. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  609. },
  610. // 附件上传
  611. enclosureUrl: function() {
  612. return `${window._CONFIG['domianURL']}/${this.url.enclosureUrl}`
  613. },
  614. // 选中项
  615. rowSelection() {
  616. return {
  617. onChange: (selectedRowKeys, selectedRows) => {
  618. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  619. },
  620. getCheckboxProps: record => ({
  621. props: {
  622. disabled: record.title === 'Disabled User',
  623. // Column configuration not to be checked
  624. title: record.title
  625. }
  626. })
  627. }
  628. }
  629. },
  630. mounted() {}
  631. }
  632. </script>
  633. <style lang="less" scoped>
  634. @import '~@assets/less/common.less';
  635. @import '~@assets/less/overwriter.less';
  636. /deep/ .ant-table-thead > tr > th {
  637. text-align: center;
  638. // font-weight: 700;
  639. }
  640. /deep/ .ant-table-tbody {
  641. text-align: center;
  642. }
  643. // /deep/ th.replacecolor {
  644. // background-color: #ccc;
  645. // }
  646. </style>