list.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <template>
  2. <a-card size="small" :bordered="false" class="replenishmentManagementList-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <!-- 搜索条件 -->
  5. <div ref="tableSearch" class="table-page-search-wrapper">
  6. <!-- 标签页 -->
  7. <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs">
  8. <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
  9. <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
  10. </a-tab-pane>
  11. </a-tabs>
  12. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  13. <a-row :gutter="15">
  14. <a-col :md="6" :sm="24" v-if="queryParam.bizType=='WAIT_CHECK'">
  15. <a-form-item label="出库时间">
  16. <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
  17. </a-form-item>
  18. </a-col>
  19. <a-col :md="6" :sm="24" v-else-if="queryParam.bizType=='FINISH'">
  20. <a-form-item label="签收时间">
  21. <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
  22. </a-form-item>
  23. </a-col>
  24. <a-col :md="6" :sm="24" v-else>
  25. <a-form-item label="创建时间">
  26. <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
  27. </a-form-item>
  28. </a-col>
  29. <a-col :md="6" :sm="24">
  30. <a-form-item label="补货单号"><a-input id="replenishmentManagementList-replenishBillNo" v-model.trim="queryParam.replenishBillNo" allowClear placeholder="请输入补货单号" /></a-form-item>
  31. </a-col>
  32. <a-col :md="6" :sm="24">
  33. <a-form-item label="货架名称">
  34. <shelfSList :showAll="true" v-model="queryParam.shelfSn"></shelfSList>
  35. </a-form-item>
  36. </a-col>
  37. <template v-if="advanced">
  38. <a-col :md="6" :sm="24">
  39. <a-form-item label="产品编码"><a-input id="replenishmentManagementList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码" /></a-form-item>
  40. </a-col>
  41. <a-col :md="6" :sm="24">
  42. <a-form-item label="产品名称">
  43. <a-input id="replenishmentManagementList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称" />
  44. </a-form-item>
  45. </a-col>
  46. </template>
  47. <a-col :md="6" :sm="24">
  48. <span class="table-page-search-submitButtons">
  49. <a-button type="primary" style="margin-left: 5px" @click="queryByTypeSum" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
  50. <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
  51. <a @click="advanced = !advanced" style="margin-left: 5px">
  52. {{ advanced ? '收起' : '展开' }}
  53. <a-icon :type="advanced ? 'up' : 'down'" />
  54. </a>
  55. </span>
  56. </a-col>
  57. </a-row>
  58. </a-form>
  59. <!-- 操作按钮 -->
  60. <div class="table-operator">
  61. <a-button type="primary" class="button-error" @click="openSlodOut=true">待补货产品</a-button>
  62. <span style="margin-left:10px;color:#999;">请点击此按钮,选择需要补货的产品创建补货单</span>
  63. </div>
  64. </div>
  65. <s-table
  66. class="sTable fixPagination"
  67. ref="table"
  68. :style="{ height: tableHeight+84.5+'px' }"
  69. size="small"
  70. :rowKey="(record) => record.id"
  71. :columns="columns"
  72. :data="loadData"
  73. :expandedRowKeys="expandedRowKeys"
  74. @expand="expandFun"
  75. :expandRowByClick="true"
  76. :scroll="{ y: tableHeight }"
  77. :defaultLoadData="false"
  78. bordered>
  79. <a-table
  80. v-if="listData&&listData[index]"
  81. slot="expandedRowRender"
  82. slot-scope="record, index"
  83. size="small"
  84. :rowKey="(record) => record.id"
  85. :columns="subColumns"
  86. :data-source="listData[index].subList"
  87. :pagination="false"
  88. :bordered="false"
  89. style="margin: 15px 10px;">
  90. </a-table>
  91. <!-- 操作 -->
  92. <template slot="action" slot-scope="text, record">
  93. <!-- <a-button v-if="record.billState=='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button> -->
  94. <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
  95. <a-button v-if="record.billState=='WAIT_CHECK'" size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">签收</a-button>
  96. <a-button v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
  97. <a-button v-if="record.billState=='CANCEL'" size="small" type="link" class="button-error" @click.stop="handleDelete(record)">删除</a-button>
  98. <a-button v-if="record.billState!='CANCEL'&&record.billState!='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
  99. </template>
  100. <!-- 货架名称 -->
  101. <template slot="shelfName" slot-scope="text, record">
  102. {{text}}
  103. <a-badge count="已注销" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='WRITE_OFF'"></a-badge>
  104. <a-badge count="已暂停" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='SUSPEND'"></a-badge>
  105. <a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='DISABLED'"></a-badge>
  106. </template>
  107. <!-- 补货单号 -->
  108. <template slot="replenishBillNo" slot-scope="text, record">
  109. <span class="table-td-link" @click.stop="handleDetail(record)">{{ record.replenishBillNo }}</span>
  110. </template>
  111. </s-table>
  112. <!-- 确认 -->
  113. <confirm-modal :openModal="openConfirmModal" :nowData="nowData" @ok="handleValidate" @close="handleCancel" />
  114. <!-- 库存不足,确认弹框 -->
  115. <stock-modal
  116. :openModal="openStockModal"
  117. :type="validateType"
  118. :params="paramsData"
  119. :listData="stockList"
  120. @ok="handleStockOk"
  121. @close="handleStockCancel" />
  122. <!-- 打印贴签 -->
  123. <print-sticker-modal :openModal="openPrintStickerModal" :nowData="nowData" @ok="handlePrintStickerOk" @close="handleCancel" />
  124. <!-- 出库 -->
  125. <out-warehousing-modal :openModal="openOutWarehousingModal" :nowData="nowData" @ok="handleOutWarehousingOk" @close="handleCancel" />
  126. <!-- 签收 -->
  127. <put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
  128. <!-- 详情 -->
  129. <detailModal :openModal="openDetailModal" :nowData="nowData" @close="handleCancel" />
  130. <!-- 待补货产品 -->
  131. <slodOutModal :openModal="openSlodOut" @close="openSlodOut=false" />
  132. </a-spin>
  133. </a-card>
  134. </template>
  135. <script>
  136. import { commonMixin } from '@/utils/mixin'
  137. import { STable, VSelect } from '@/components'
  138. import getDate from '@/libs/getDate.js'
  139. import rangeDate from '@/views/common/rangeDate.vue'
  140. import shelfSList from '@/views/common/shelfList'
  141. import confirmModal from './confirmModal.vue'
  142. import stockModal from './stockModal.vue'
  143. import printStickerModal from './printStickerModal.vue'
  144. import outWarehousingModal from './outWarehousingModal.vue'
  145. import putWarehousingModal from './putWarehousingModal.vue'
  146. import detailModal from './detailModal.vue'
  147. import slodOutModal from './slodOutModal.vue'
  148. import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishDelete } from '@/api/shelfReplenish'
  149. export default {
  150. components: { STable, VSelect, rangeDate, shelfSList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal, detailModal, slodOutModal },
  151. mixins: [commonMixin],
  152. data () {
  153. return {
  154. isNotProd: false,
  155. spinning: false,
  156. advanced: true, // 高级搜索 展开/关闭
  157. tableHeight: 0,
  158. disabled: false, // 查询、重置按钮是否可操作
  159. curBizType: 'ALL',
  160. time: [
  161. getDate.getCurrMonthDays().starttime,
  162. getDate.getCurrMonthDays().endtime
  163. ],
  164. // 查询参数
  165. queryParam: {
  166. bDate: getDate.getCurrMonthDays().starttime,
  167. eDate: getDate.getCurrMonthDays().endtime,
  168. bizType: 'ALL',
  169. replenishBillNo: '',
  170. shelfSn: undefined,
  171. productCode: '',
  172. productName: ''
  173. },
  174. expandedRowKeys: [],
  175. // 加载数据方法 必须为 Promise 对象
  176. loadData: parameter => {
  177. this.disabled = true
  178. this.spinning = true
  179. this.expandedRowKeys = []
  180. parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
  181. const params = Object.assign(parameter, this.queryParam)
  182. if (params.billState == 'WAIT_CHECK') {
  183. params.outStockTimeBegin = this.queryParam.bDate
  184. params.outStockTimeEnd = this.queryParam.eDate
  185. } else if (params.billState == 'FINISH') {
  186. params.putStockTimeBegin = this.queryParam.bDate
  187. params.putStockTimeEnd = this.queryParam.eDate
  188. } else {
  189. params.beginDate = this.queryParam.bDate
  190. params.endDate = this.queryParam.eDate
  191. }
  192. delete params.index
  193. delete params.tableId
  194. delete params.bizType
  195. return shelfReplenishList(params).then(res => {
  196. let data
  197. if (res.status == 200) {
  198. data = res.data
  199. const no = (data.pageNo - 1) * data.pageSize
  200. for (var i = 0; i < data.list.length; i++) {
  201. data.list[i].no = no + i + 1
  202. data.list[i].subList = []
  203. }
  204. this.listData = data.list || []
  205. this.disabled = false
  206. }
  207. this.spinning = false
  208. return data
  209. })
  210. },
  211. subColumns: [
  212. { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
  213. { title: '货位号', dataIndex: 'shelfPlaceCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
  214. { title: '产品编码', dataIndex: 'product.code', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
  215. { title: '产品名称', dataIndex: 'product.name', width: '32%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  216. { title: '补货数量', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  217. { title: '签收数量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  218. { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
  219. ],
  220. listData: [],
  221. tabPaneData: [
  222. { bizName: '全部', bizType: 'ALL', countNum: 0 },
  223. // { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
  224. { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
  225. { bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
  226. { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
  227. { bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
  228. ],
  229. nowData: null,
  230. openConfirmModal: false,
  231. openStockModal: false,
  232. openPrintStickerModal: false,
  233. openOutWarehousingModal: false,
  234. openPutWarehousingModal: false,
  235. openDetailModal: false,
  236. openSlodOut: false,
  237. validateType: 'confirm',
  238. stockList: [],
  239. paramsData: null
  240. }
  241. },
  242. computed: {
  243. columns () {
  244. const ret = [
  245. { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
  246. { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
  247. { title: '补货单号', dataIndex: 'replenishBillNo', scopedSlots: { customRender: 'replenishBillNo' }, width: '15%', align: 'center' },
  248. { title: '货架名称', dataIndex: 'shelfInfo.shelfName', scopedSlots: { customRender: 'shelfName' }, width: '25%', align: 'left', ellipsis: true },
  249. { title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
  250. { title: '补货总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  251. { title: '签收总量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  252. { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'left' }
  253. ]
  254. if (this.queryParam.bizType == 'WAIT_CHECK') {
  255. ret.splice(1, 1, { title: '出库时间', dataIndex: 'outStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
  256. } else if (this.queryParam.bizType == 'FINISH') {
  257. ret.splice(1, 1, { title: '签收时间', dataIndex: 'putStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
  258. }
  259. return ret
  260. }
  261. },
  262. methods: {
  263. // 确认
  264. handleConfirm (row) {
  265. this.nowData = row
  266. this.openConfirmModal = true
  267. },
  268. // 补货详情
  269. handleDetail (row) {
  270. this.nowData = row
  271. this.openDetailModal = true
  272. },
  273. // 库存不足 确认 ok
  274. handleStockOk (type, params) {
  275. this.openStockModal = false
  276. this.openConfirmModal = false
  277. this.openOutWarehousingModal = false
  278. if (type == 'confirm') { // 确认
  279. this.confirmFun(params)
  280. }
  281. },
  282. // 库存不足 确认 cancel
  283. handleStockCancel () {
  284. this.stockList = []
  285. this.validateType = 'confirm'
  286. this.openStockModal = false
  287. },
  288. // 打印贴签
  289. handlePrintSticker (row) {
  290. this.nowData = row
  291. this.openPrintStickerModal = true
  292. },
  293. // 打印贴签 ok
  294. handlePrintStickerOk () {},
  295. // 出库
  296. handleOutWarehousing (row) {
  297. this.nowData = row
  298. this.openOutWarehousingModal = true
  299. },
  300. // 出库 ok
  301. handleOutWarehousingOk () {
  302. this.nowData = null
  303. this.openOutWarehousingModal = false
  304. this.queryByTypeSum(true)
  305. },
  306. // cancel
  307. handleCancel () {
  308. this.nowData = null
  309. this.openConfirmModal = false
  310. this.openStockModal = false
  311. this.openPrintStickerModal = false
  312. this.openOutWarehousingModal = false
  313. this.openPutWarehousingModal = false
  314. this.openDetailModal = false
  315. },
  316. handleValidate (type, params) {
  317. if (type == 'confirm') { // 确认
  318. this.confirmFun(params)
  319. }
  320. // this.spinning = true
  321. // 校验产品库存是否足够
  322. // shelfReplenishDetailStock(params).then(res => {
  323. // if (res.status == 200) {
  324. // if (res.data && res.data.length > 0) {
  325. // this.stockList = res.data
  326. // this.validateType = 'confirm'
  327. // this.paramsData = params
  328. // this.openStockModal = true
  329. // } else {
  330. // if (type == 'confirm') { // 确认
  331. // this.confirmFun(params)
  332. // }
  333. // }
  334. // }
  335. // })
  336. },
  337. // 提交确认
  338. confirmFun (params) {
  339. shelfReplenishConfirm(params).then(res => {
  340. if (res.status == 200) {
  341. this.$message.success('确认补货成功')
  342. this.$refs.table.refresh()
  343. this.handleCancel()
  344. }
  345. this.spinning = false
  346. })
  347. },
  348. // 签收
  349. handlePutWarehousing (row) {
  350. this.nowData = row
  351. this.openPutWarehousingModal = true
  352. },
  353. // 签收 ok
  354. handlePutWarehousingOk () {
  355. this.nowData = null
  356. this.openPutWarehousingModal = false
  357. this.queryByTypeSum(true)
  358. },
  359. // 取消补货单
  360. handleCancelOrder (row) {
  361. const _this = this
  362. this.$confirm({
  363. title: '提示',
  364. content: '确认取消补货单吗?',
  365. centered: true,
  366. onOk () {
  367. _this.spinning = true
  368. shelfReplenishCancel({ replenishBillSn: row.replenishBillSn }).then(res => {
  369. if (res.status == 200) {
  370. _this.$message.success(res.message)
  371. _this.$refs.table.refresh()
  372. _this.spinning = false
  373. } else {
  374. _this.spinning = false
  375. }
  376. })
  377. }
  378. })
  379. },
  380. // 删除
  381. handleDelete (row) {
  382. const _this = this
  383. this.$confirm({
  384. title: '提示',
  385. content: '确认删除补货单吗?',
  386. centered: true,
  387. onOk () {
  388. _this.spinning = true
  389. shelfReplenishDelete({ replenishBillSn: row.replenishBillSn }).then(res => {
  390. if (res.status == 200) {
  391. _this.$message.success(res.message)
  392. _this.$refs.table.refresh()
  393. _this.spinning = false
  394. } else {
  395. _this.spinning = false
  396. }
  397. })
  398. }
  399. })
  400. },
  401. expandFun (expanded, record) {
  402. if (expanded) {
  403. this.expandedRowKeys.push(record.id)
  404. this.getSubItem(record) // 获取表格内部数据
  405. } else {
  406. const i = this.expandedRowKeys.findIndex(item => item == record.id)
  407. this.expandedRowKeys.splice(i, 1)
  408. }
  409. },
  410. // 获取子节点数据
  411. getSubItem (record) {
  412. this.spinning = true
  413. shelfReplenishDetailList({ replenishBillSn: record.replenishBillSn }).then(res => {
  414. const ind = this.listData.findIndex(item => item.id == record.id)
  415. if (ind >= 0) {
  416. if (res.status == 200 && res.data && res.data.length) {
  417. res.data.map((item, index) => {
  418. item.no = index + 1
  419. })
  420. this.listData[ind].subList = res.data
  421. } else {
  422. this.listData[ind].subList = []
  423. }
  424. }
  425. this.spinning = false
  426. })
  427. },
  428. // 重置
  429. resetSearchForm () {
  430. this.resetData()
  431. this.queryByTypeSum()
  432. },
  433. // 重置数据
  434. resetData () {
  435. this.$refs.rangeDate.resetDate(this.time)
  436. this.queryParam.bDate = getDate.getCurrMonthDays().starttime
  437. this.queryParam.eDate = getDate.getCurrMonthDays().endtime
  438. this.queryParam.bizType = this.curBizType
  439. this.queryParam.replenishBillNo = ''
  440. this.queryParam.shelfSn = undefined
  441. this.queryParam.productCode = ''
  442. this.queryParam.productName = ''
  443. },
  444. // 时间 change
  445. dateChange (date) {
  446. this.queryParam.bDate = date[0] || null
  447. this.queryParam.eDate = date[1] || null
  448. },
  449. // 选择类型
  450. handleTabChange (key) {
  451. this.expandedRowKeys = []
  452. this.queryParam.bizType = key
  453. this.curBizType = key
  454. this.resetSearchForm()
  455. },
  456. // 客户 change
  457. custChange (obj) {
  458. this.queryParam.customerSn = obj.key || undefined
  459. },
  460. // 获取类型
  461. queryByTypeSum (flag) {
  462. const params = JSON.parse(JSON.stringify(this.queryParam))
  463. if (params.bizType == 'WAIT_CHECK') {
  464. params.outStockTimeBegin = this.queryParam.bDate
  465. params.outStockTimeEnd = this.queryParam.eDate
  466. } else if (params.bizType == 'FINISH') {
  467. params.putStockTimeBegin = this.queryParam.bDate
  468. params.putStockTimeEnd = this.queryParam.eDate
  469. } else {
  470. params.beginDate = this.queryParam.bDate
  471. params.endDate = this.queryParam.eDate
  472. }
  473. delete params.bizType
  474. this.spinning = true
  475. shelfReplenishStateCount(params).then(res => {
  476. if (res.data && res.status == 200) {
  477. // this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
  478. this.tabPaneData[1].countNum = res.data.WAIT_OUT_STOCK || 0
  479. this.tabPaneData[2].countNum = res.data.WAIT_CHECK || 0
  480. this.tabPaneData[3].countNum = res.data.FINISH || 0
  481. this.tabPaneData[4].countNum = res.data.CANCEL || 0
  482. this.queryParam.bizType = this.curBizType
  483. this.$refs.table.refresh(!flag)
  484. }
  485. this.spinning = false
  486. })
  487. },
  488. setTableH () {
  489. const tableSearchH = this.$refs.tableSearch.offsetHeight
  490. this.tableHeight = window.innerHeight - tableSearchH - 200
  491. },
  492. pageInit () {
  493. const _this = this
  494. this.isNotProd = !!process.env.VUE_APP_ENVTIPS
  495. this.$nextTick(() => { // 页面渲染完成后的回调
  496. _this.setTableH()
  497. })
  498. this.curBizType = this.$route.query && this.$route.query.bizType || this.curBizType
  499. this.queryByTypeSum()
  500. if (this.$route.query && this.$route.query.bizType == 'ALL') {
  501. this.openSlodOut = true
  502. }
  503. }
  504. },
  505. watch: {
  506. advanced (newValue, oldValue) {
  507. const _this = this
  508. this.$nextTick(() => { // 页面渲染完成后的回调
  509. _this.setTableH()
  510. })
  511. },
  512. '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
  513. this.setTableH()
  514. }
  515. },
  516. mounted () {
  517. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  518. this.resetData()
  519. this.pageInit()
  520. }
  521. },
  522. activated () {
  523. // 如果是新页签打开,则重置当前页面
  524. if (this.$store.state.app.isNewTab) {
  525. this.resetData()
  526. this.pageInit()
  527. }
  528. }
  529. }
  530. </script>
  531. <style lang="less">
  532. .replenishmentManagementList-wrap{
  533. .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-bar{
  534. margin: 0 0 10px 0!important;
  535. }
  536. .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
  537. height: 30px!important;
  538. }
  539. .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
  540. height: 30px!important;
  541. }
  542. .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
  543. line-height: 26px!important;
  544. height: 30px!important;
  545. }
  546. }
  547. </style>