detailProductList.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <!-- 已选配件列表 -->
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <div :style="{position:'relative',background:'#fff'}">
  5. <div style="height:10px;" v-if="type!='normal'"></div>
  6. <ve-table
  7. border-y
  8. border-x
  9. border-around
  10. :scroll-width="0"
  11. :max-height="tableHeight"
  12. :show-header="showTableHead"
  13. :row-style-option="{clickHighlight: true}"
  14. :cellSelectionOption="{enable: false}"
  15. :virtual-scroll-option="{enable: true}"
  16. :columns="columns"
  17. :table-data="dataSource"
  18. row-key-field-name="id"
  19. :column-width-resize-option="columnWidthResizeOption"
  20. :cell-style-option="cellStyleOption"
  21. />
  22. <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
  23. </div>
  24. <!-- 总计 -->
  25. <div v-if="countData&&activeList.length>0" style="padding:6px 0 0;text-align: right;">
  26. 总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
  27. 总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
  28. <span v-if="$hasPermissions(authCode + '_salesPrice')||showPrice">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
  29. </div>
  30. <!-- 活动规则详情 -->
  31. <detailModal :openModal="openDetailModal" pageType="salesPage" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
  32. </a-spin>
  33. </template>
  34. <script>
  35. import { commonMixin } from '@/utils/mixin'
  36. import { Empty } from 'ant-design-vue'
  37. import detailModal from '@/views/promotionRulesManagement/dealerPromotions/detailModal.vue'
  38. import { salesDetailAllList, salesDetailExtPromoList, salesDetaiCount } from '@/api/salesDetailNew'
  39. export default {
  40. name: 'DetailProductList',
  41. mixins: [commonMixin],
  42. components: { detailModal },
  43. props: {
  44. newLoading: Boolean, // loading
  45. detailData: { // 详情信息
  46. type: Object,
  47. default: function () { return null }
  48. },
  49. // 正常 or 活动 产品列表
  50. type: {
  51. type: String,
  52. default: 'normal'
  53. },
  54. // 活动规则详情
  55. promo: {
  56. type: Object,
  57. default: function () { return null }
  58. },
  59. // 表格id
  60. id: {
  61. type: String,
  62. default: ''
  63. },
  64. // 仓库sn
  65. warehouseSn: {
  66. type: String,
  67. default: ''
  68. },
  69. // 是否促销产品
  70. promoProductClz: {
  71. type: String,
  72. default: ''
  73. },
  74. // 销售单sn
  75. salesBillSn: {
  76. type: String,
  77. default: ''
  78. },
  79. // 是否显示城市价格
  80. showCityPrice: {
  81. type: Boolean,
  82. default: false
  83. },
  84. // 是否显示平均公斤单价
  85. showAveragePrice: {
  86. type: Boolean,
  87. default: false
  88. },
  89. // 权限码
  90. authCode: {
  91. type: String,
  92. default: ''
  93. },
  94. // 最大高度
  95. maxHeight: {
  96. type: [String, Number],
  97. default: '300'
  98. },
  99. // 是否显示表格头部
  100. showHeader: {
  101. type: Boolean,
  102. default: true
  103. },
  104. activeList: { // 参与的活动列表
  105. type: Array,
  106. default: () => []
  107. },
  108. transferQty: {// 发货经销商库存是否满足
  109. type: [String, Number],
  110. default: ''
  111. },
  112. borrowFlag: { // 是否累计产品
  113. type: [String, Number],
  114. default: ''
  115. },
  116. chooseList: { // 发货经销商库存
  117. type: Array,
  118. default: function () { return [] }
  119. },
  120. showTransferDealer: {// 显示发货经销商库存
  121. type: Boolean,
  122. default: true
  123. },
  124. // 已勾选的活动sn
  125. salesPromoSnSet: {
  126. type: Array,
  127. default: () => []
  128. },
  129. pageType: {
  130. type: String,
  131. default: ''
  132. }
  133. },
  134. data () {
  135. return {
  136. spinning: false,
  137. openDetailModal: false, // 活动规则详情弹框
  138. detailSn: null, // 活动规则详情sn
  139. dataSource: [], // 列表原始数据
  140. tableHeight: this.maxHeight, // 表格高度
  141. // 表格列可拖曳
  142. columnWidthResizeOption: {
  143. // default false
  144. enable: true,
  145. // column resize min width
  146. minWidth: 50
  147. },
  148. cellStyleOption: {
  149. headerCellClass: ({ column, rowIndex }) => {
  150. if (column.align != 'center') {
  151. return 'table-header-cell-center'
  152. }
  153. }
  154. },
  155. isCityPrice: false, // 是否显示市级价
  156. outStockStr: '', // 产品库存不足提示信息
  157. showEmpty: false, // 是否显示空数据图片
  158. showTableHead: true, // 是否显示表格头部
  159. hasOutStockOfActive: false, // 产品是否存在缺货
  160. simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, // 空图片
  161. showStockCol: false, // 显示第三方库存
  162. hasJGtire: false, // 是否轮胎产品
  163. countData: null
  164. }
  165. },
  166. computed: {
  167. // 转单和上级审核显示价格
  168. showPrice () {
  169. return this.pageType == 'salesNewDetailTransfer' || this.pageType == 'salesNewDetaiSupLevelAudit'
  170. },
  171. columns () {
  172. const _this = this
  173. // 价格单元格
  174. const priceFormat = function (data) {
  175. return _this.toThousands(data) || '--'
  176. }
  177. // 数字单元格
  178. const numsFormat = function (data) {
  179. return data || data == 0 ? data : '--'
  180. }
  181. // 发货经销商库存
  182. const transferDealerInfo = function (record, data, h) {
  183. return (
  184. <div>
  185. {(!data || data && data * 1 < record.qty * 1) ? <span style="color:#ed1c24;">{data || '--'}</span> : <span>{data}</span>}
  186. </div>)
  187. }
  188. // 编码
  189. const codeFormat = function (record, data, h) {
  190. return (
  191. <div>
  192. <span style="padding-right: 10px;">{data}</span>
  193. {record.promotionFlag.indexOf('GIFT') >= 0 ? <a-badge count="促" numberStyle={{ backgroundColor: '#52c41a', zoom: '0.7' }}/> : ''}
  194. {record.convertPromoGiftsQty ? (<a-badge count="转" numberStyle={{ backgroundColor: '#0055ff', zoom: '0.7' }}></a-badge>) : ''}
  195. {record.promotionFlag.indexOf('GATE') >= 0 ? <a-badge count="槛" numberStyle={{ backgroundColor: '#108ee9', zoom: '0.7' }}/> : ''}
  196. {record.promotionFlag.indexOf('REGULAR') >= 0 ? <a-badge count="正" numberStyle={{ backgroundColor: '#ff5500', zoom: '0.7' }}/> : ''}
  197. {record.promotionFlag.indexOf('DISCOUNT') >= 0 ? <a-badge count="特" numberStyle={{ backgroundColor: '#faad14', zoom: '0.7' }}/> : ''}
  198. {record.borrowFlag == '1' ? <a-badge count="累" numberStyle={{ backgroundColor: '#aa007f', zoom: '0.7' }}/> : ''}
  199. {(Number(record.stockQty || 0) < Number(record.unpushedQty || 0)) && _this.showStock && record.borrowFlag != '1' ? <a-badge count="缺" numberStyle={{ zoom: '0.7' }}/> : ''}
  200. </div>
  201. )
  202. }
  203. // 显示折扣价
  204. const discountPriceFormat = function (record, data, h) {
  205. return (
  206. <div>
  207. {_this.toThousands(data)}
  208. {record.promotionFlag.indexOf('GIFT') >= 0 || record.promotionFlag.indexOf('DISCOUNT') >= 0 ? (
  209. <span title="原价">({ _this.toThousands(record.origPrice)})</span>
  210. ) : ''}
  211. </div>
  212. )
  213. }
  214. // 列定义
  215. let arr = [
  216. { title: '序号', field: 'no', key: 'a', width: 50, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
  217. { title: '产品编码', field: 'productCode', key: 'b', width: 120, align: 'left', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return codeFormat(row, row[column.field], h) } },
  218. { title: '产品名称', field: 'productName', key: 'c', width: 180, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
  219. { title: '原厂编码', field: 'productOrigCode', key: 'd', width: 120, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
  220. { title: '出库仓库', field: 'warehouseName', key: 'e', width: 100, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } }
  221. ]
  222. // 如果是活动产品列表
  223. if (this.type == 'active') {
  224. arr.splice(3, 0, {
  225. title: '规则数量',
  226. field: 'rulesNums',
  227. key: '4',
  228. width: 60,
  229. align: 'center',
  230. operationColumn: false,
  231. renderBodyCell: ({ row, column, rowIndex }, h) => {
  232. return (
  233. row.promoRuleSnList
  234. ? <a-popover placement="right">
  235. <template slot="content">
  236. {row.promoRuleSnList.map(item => {
  237. return (
  238. <div
  239. id={'dispacth-ruleDetail-' + row.productSn}
  240. title="点击查看详情"
  241. style="padding:5px 0;cursor: pointer;"
  242. onClick={() => _this.showRuleDetail(item)}
  243. >{ _this.activeRuleFilter(item, row) }</div>
  244. )
  245. })}
  246. </template>
  247. <a-button type="link" id={'dispacth-ruleSn-' + row.productSn} size="small" class="button-info">
  248. {row.promoRuleNum}<span style="zoom:0.6;color: #666;">个∨</span>
  249. </a-button>
  250. </a-popover> : '--'
  251. )
  252. }
  253. })
  254. }
  255. // 计算可合并单元格数
  256. if (this.$hasPermissions(this.authCode + '_costPrice') || this.showPrice) { // 成本价权限
  257. arr.push({ title: '成本价', field: 'showCost', width: 80, key: 'f', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
  258. }
  259. arr = arr.concat([
  260. { title: '单位', field: 'productOrigUnit', key: 'g', width: 70, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
  261. { title: '销售数量', field: 'qty', width: 80, key: 'h', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } }
  262. ])
  263. if (this.$hasPermissions(this.authCode + '_provincePrice') || this.showPrice) {
  264. arr.push({ title: '省级价', field: 'provincePrice', width: 80, key: 'i', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
  265. }
  266. // 是否勾选市级价格
  267. if (this.isCityPrice) {
  268. arr.push({ title: '市级价', field: 'cityPrice', width: 80, key: 'j', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
  269. if (this.$hasPermissions(this.authCode + '_salesPrice') || this.showPrice) { // 售价权限
  270. arr.push({ title: '销售价', field: 'price', width: 100, key: 'k', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row, row[column.field], h) } })
  271. }
  272. } else {
  273. if (this.$hasPermissions(this.authCode + '_salesPrice') || this.showPrice) { // 售价权限
  274. arr.push({ title: '销售价', field: 'price', width: 100, key: 'l', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row, row[column.field], h) } })
  275. }
  276. }
  277. // 审核,需用到库存
  278. if (this.showStock) {
  279. arr.push({ title: '库存', field: 'stockQty', width: 80, key: 'm', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } })
  280. if (this.showStockCol) {
  281. arr.push({ title: '第三方库存', field: 'thirdStockQty', width: 80, key: 'mm', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } })
  282. }
  283. }
  284. if (this.showTransferDealer && this.type == 'normal') {
  285. arr.push({ title: '发货经销商库存', field: 'transferDealerStockQty', width: 100, key: 'tt', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return transferDealerInfo(row, row[column.field], h) } })
  286. }
  287. arr = arr.concat([
  288. { title: '待下推数', field: 'unpushedQty', width: 80, key: 'o', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } },
  289. { title: '已下推数', field: 'pushedQty', width: 80, key: 'p', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } }
  290. ])
  291. // 如果有转采购额
  292. if (this.showConvertPromoGifts && this.type == 'active') {
  293. arr.push({ title: '转采购额数量', field: 'convertPromoGiftsQty', width: 100, key: 'z', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.convertPromoGiftsFlag ? numsFormat(row[column.field]) : '--' } })
  294. }
  295. arr.push({ title: '已取消数', field: 'cancelQty', width: 80, key: 'q', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.borrowFlag != '1' ? numsFormat(row[column.field]) : '--' } })
  296. if (this.showAveragePrice) {
  297. arr.push({ title: '单重(kg)', field: 'weightKg', width: 80, key: 'q1', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
  298. arr.push({ title: '合计重量(kg)', field: 'totalWeightKg', width: 98, key: 'q2', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
  299. if (this.$hasPermissions(this.authCode + '_costPrice') || this.showPrice) {
  300. arr.push({ title: '平均成本公斤单价', field: 'weightAvgCost', width: 105, key: 'q3', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
  301. }
  302. if (this.$hasPermissions(this.authCode + '_salesPrice') || this.showPrice) {
  303. arr.push({ title: '平均售价公斤单价', field: 'weightAvgPrice', width: 105, key: 'q4', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
  304. }
  305. }
  306. return arr
  307. },
  308. // 是否有可转采购额
  309. hasConvertPromoGifts () {
  310. return this.detailData && this.detailData.totalConvertPromoGiftsQty
  311. },
  312. // 是否显示可转采购额
  313. showConvertPromoGifts () {
  314. return this.activeList && this.activeList.filter(item => item.enabledFlag == 1).find(item => item.promotionRule && item.promotionRule.convertExpenseFlag == 1 && item.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD')
  315. },
  316. // 是否显示库存列
  317. showStock () {
  318. return this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE' || this.detailData.billStatus == 'SUPERIOR_AUDIT_REJECT') && this.$hasPermissions('B_salesAudit')
  319. }
  320. },
  321. watch: {
  322. // 是否显示城市价格变化时
  323. showCityPrice (newValue, oldValue) {
  324. this.isCityPrice = newValue
  325. },
  326. salesPromoSnSet (newValue, oldValue) {
  327. this.searchTable()
  328. }
  329. },
  330. methods: {
  331. // 参与规则名称
  332. activeRuleFilter (val, data) {
  333. const row = this.activeList.length && this.activeList.find(item => item.promoRuleSn == val)
  334. const rule = data.salesPromoDetailList.find(item => item.promoRuleSn == val)
  335. return row ? (row.promotionRule.promotionRuleTypeDictValue + '-' + row.promotion.description + '(' + row.promotionRule.description + ')') + (data.borrowFlag != 1 ? ',起订量:' + rule.promoUnit : '') : ''
  336. },
  337. // 查看参与规则详情
  338. showRuleDetail (promoRuleSn) {
  339. this.detailSn = promoRuleSn
  340. this.openDetailModal = true
  341. },
  342. // 关闭详情弹窗
  343. closeDetailModal () {
  344. this.detailSn = null
  345. this.openDetailModal = false
  346. },
  347. // 获取销售单参与的活动列表
  348. pageInit () {
  349. this.searchTable()
  350. },
  351. // 显示第三方库存
  352. showThreeStock (flag) {
  353. this.showStockCol = flag
  354. if (flag) {
  355. this.searchTable()
  356. }
  357. },
  358. // 当满足发货经销商显示条件时 查询
  359. transferTableData (list) {
  360. this.dataSource = list.filter(item => this.warehouseSn != '' ? item.warehouseSn == this.warehouseSn : true).filter(item => {
  361. if (this.transferQty == '0') { // 不满足
  362. return (!item.transferDealerStockQty || (item.transferDealerStockQty && item.transferDealerStockQty * 1 < item.qty * 1))
  363. } else if (this.transferQty == '1') { // 满足
  364. return (item.transferDealerStockQty && item.transferDealerStockQty * 1 >= item.qty * 1)
  365. } else {
  366. return true
  367. }
  368. })
  369. },
  370. // 查询表格数据
  371. async searchTable () {
  372. this.dataSource = []
  373. this.disabled = true
  374. this.spinning = true
  375. // 参数
  376. const params = {
  377. salesBillSn: this.salesBillSn,
  378. showStock: this.showStock,
  379. warehouseSn: this.warehouseSn,
  380. borrowFlag: this.borrowFlag
  381. }
  382. // 查询正常产品
  383. if (this.type == 'normal') {
  384. // 转单时
  385. if (this.chooseList && this.chooseList.length) {
  386. this.transferTableData(this.chooseList)
  387. } else {
  388. // 查询正常产品明细列表
  389. if (this.promoProductClz == 0 || this.promoProductClz == undefined) {
  390. params.promotionFlag = this.promoProductClz == '' ? undefined : this.promoProductClz
  391. this.dataSource = await salesDetailAllList(params).then(res => res.data || [])
  392. }
  393. }
  394. } else {
  395. // 查询活动产品明细列表
  396. if (this.promoProductClz !== '0') {
  397. this.dataSource = await salesDetailExtPromoList({ salesPromoSnSet: this.salesPromoSnSet, promoProductClz: this.promoProductClz == '' ? undefined : this.promoProductClz, ...params }).then(res => res.data || [])
  398. // 是否只有累计产品
  399. if (this.borrowFlag == '') {
  400. const onlyBorrow = this.dataSource.filter(item => item.borrowFlag == 1)
  401. this.$emit('onlyBorrow', onlyBorrow.length > 0 && onlyBorrow.length == this.dataSource.length)
  402. }
  403. }
  404. }
  405. this.$emit('hideTable', this.type, this.dataSource.length)
  406. // 格式化数据
  407. let str = ''
  408. this.outStockStr = ''
  409. this.dataSource.forEach((item, i) => {
  410. item.no = i + 1
  411. // 格式化数据,产品编码、产品名称、原厂编码、包装数单位
  412. const productCode = (item.productEntity && item.productEntity.code) || (item.dealerProductEntity && item.dealerProductEntity.code)
  413. const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
  414. const productOrigCode = (item.productEntity && item.productEntity.origCode) || (item.dealerProductEntity && item.dealerProductEntity.origCode)
  415. const productOrigUnit = (item.productEntity && item.productEntity.unit) || (item.dealerProductEntity && item.dealerProductEntity.unit)
  416. const productBrand = (item.productEntity && item.productEntity.productBrandName) || (item.dealerProductEntity && item.dealerProductEntity.productBrandName)
  417. const productType3 = (item.productEntity && item.productEntity.productTypeName3) || (item.dealerProductEntity && item.dealerProductEntity.productTypeName3)
  418. item.productCode = productCode || '--'
  419. item.productName = productName || '--'
  420. item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
  421. item.productOrigUnit = productOrigUnit || '--'
  422. item.epushedQty = Number(item.pushedQty) - Number(item.pushQty)
  423. // 判断是否缺货,排除累计
  424. if (item.unpushedQty && (Number(item.stockQty) < Number(item.unpushedQty)) && item.borrowFlag != 1) {
  425. str += item.productCode + '、'
  426. // 参与促销活动产品是否缺货
  427. if (item.promotionFlag != 0) {
  428. this.hasOutStockOfActive = true
  429. }
  430. }
  431. // 判断是否有箭冠轮胎产品
  432. if (productBrand && productBrand.indexOf('箭冠') >= 0 && productBrand && productType3.indexOf('轮胎') >= 0) {
  433. this.hasJGtire = true
  434. }
  435. })
  436. if (this.activeList.length > 0 && this.type == 'normal') {
  437. this.countData = await salesDetaiCount(params).then(res => res.data)
  438. }
  439. // 是否有缺货明细
  440. if (str.length > 0) {
  441. str = str.substr(0, str.length - 1)
  442. this.outStockStr = '产品编号为:' + str + '的产品库存不足;'
  443. }
  444. const listLen = this.dataSource.length
  445. this.showEmpty = listLen <= 0
  446. // 高度自适应
  447. if (this.maxHeight == 'auto') {
  448. this.tableHeight = (listLen + 1) * 34
  449. this.tableHeight = this.tableHeight > 300 ? 300 : this.tableHeight
  450. } else {
  451. this.tableHeight = this.maxHeight
  452. }
  453. if (this.showEmpty) {
  454. this.tableHeight = 200
  455. }
  456. this.spinning = false
  457. this.disabled = false
  458. }
  459. }
  460. }
  461. </script>
  462. <style lang="less" scoped>
  463. .empty-data{
  464. color: #999;
  465. text-align: center;
  466. width: 100%;
  467. position: absolute;
  468. top: 50%;
  469. margin-top: -50px;
  470. }
  471. .table-header-cell-center{
  472. text-align: center!important;
  473. }
  474. .ant-input-number-sm input{
  475. text-align: center;
  476. }
  477. .ve-table-body-td{
  478. .active-title{
  479. display: flex;
  480. align-items: center;
  481. justify-content: space-between;
  482. padding: 10px;
  483. background: #f3f8fa;
  484. }
  485. }
  486. .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-body-tr td.table-body-cell-no,
  487. .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-expand-tr td.table-body-cell-no{
  488. padding: 0;
  489. }
  490. .ve-table .ve-table-container .ve-table-content-wrapper{
  491. border-bottom: 1px solid #ddd;
  492. }
  493. /deep/.ve-table-header-th{
  494. text-align: center !important;
  495. }
  496. </style>