edit.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <template>
  2. <div class="chainTransferOutEdit-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutEdit-back" >
  5. <!-- 自定义的二级文字标题 -->
  6. <template slot="subTitle">
  7. <a id="chainTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
  8. <span style="margin: 0 15px;color: #666;">调往对象:{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</span>
  9. </template>
  10. <!-- 操作区,位于 title 行的行尾 -->
  11. <template slot="extra" v-if="$hasPermissions('B_allocLinkageOutPrint')">
  12. <Print :disabled="localDataSource.length==0" :showExport="false" @handlePrint="handlePrint"></Print>
  13. </template>
  14. </a-page-header>
  15. <!-- 选择产品 -->
  16. <div class="chainTransferOutEdit-cont">
  17. <a-collapse :activeKey="['1']">
  18. <a-collapse-panel key="1" header="选择产品">
  19. <!-- 筛选条件 -->
  20. <div class="table-page-search-wrapper">
  21. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  22. <a-row :gutter="15">
  23. <a-col :md="6" :sm="24">
  24. <a-form-item label="产品编码" prop="productCode">
  25. <a-input id="chainTransferOutEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
  26. </a-form-item>
  27. </a-col>
  28. <a-col :md="6" :sm="24">
  29. <a-form-item label="产品名称" prop="productName">
  30. <a-input id="chainTransferOutEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
  31. </a-form-item>
  32. </a-col>
  33. <a-col :md="6" :sm="24">
  34. <a-form-item label="原厂编码" prop="productOrigCode">
  35. <a-input id="chainTransferOutEdit-productOrigCode" v-model.trim="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
  36. </a-form-item>
  37. </a-col>
  38. <template v-if="advanced">
  39. <a-col :md="6" :sm="24">
  40. <a-form-model-item label="产品品牌">
  41. <ProductBrand id="chainTransferOutEdit-brandSn" placeholder="请选择产品品牌" v-model="queryParam.brandSn"></ProductBrand>
  42. </a-form-model-item>
  43. </a-col>
  44. <a-col :md="6" :sm="24">
  45. <a-form-model-item label="产品分类">
  46. <ProductType id="chainTransferOutEdit-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
  47. </a-form-model-item>
  48. </a-col>
  49. <a-col :md="6" :sm="24">
  50. <a-form-item label="仓库">
  51. <a-select id="chainTransferOutEdit-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
  52. <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
  53. </a-select>
  54. </a-form-item>
  55. </a-col>
  56. </template>
  57. <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
  58. <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
  59. <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutEdit-reset">重置</a-button>
  60. <a @click="advanced=!advanced" style="margin-left: 8px">
  61. {{ advanced ? '收起' : '展开' }}
  62. <a-icon :type="advanced ? 'up' : 'down'"/>
  63. </a>
  64. </a-col>
  65. </a-row>
  66. </a-form>
  67. </div>
  68. <!-- 列表 -->
  69. <s-table
  70. class="sTable"
  71. ref="table"
  72. size="small"
  73. :rowKey="(record) => record.stockDetailSn"
  74. rowKeyName="stockDetailSn"
  75. :columns="columns"
  76. @dblclick="handleClickRow"
  77. :data="loadData"
  78. :defaultLoadData="false"
  79. :scroll="{ y: 200 }"
  80. bordered>
  81. <!-- 调出数量 -->
  82. <template slot="outQty" slot-scope="text, record">
  83. <div @dblclick.stop>
  84. <a-input-number
  85. size="small"
  86. id="chainTransferOutEdit-outQty"
  87. v-model="record.outQty"
  88. :precision="0"
  89. :min="1"
  90. :max="record.currentQty"
  91. placeholder="请输入"
  92. style="width: 100%;" />
  93. </div>
  94. </template>
  95. <!-- 操作 -->
  96. <template slot="action" slot-scope="text, record">
  97. <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
  98. </template>
  99. </s-table>
  100. </a-collapse-panel>
  101. </a-collapse>
  102. </div>
  103. <!-- 已选产品 -->
  104. <div class="chainTransferOutEdit-cont">
  105. <a-collapse :activeKey="['1']">
  106. <a-collapse-panel key="1" header="已选产品">
  107. <!-- 总计 -->
  108. <a-alert type="info" style="margin-bottom:10px">
  109. <div slot="message">
  110. 总款数 <strong>{{ (productTotal&&(productTotal.productTotalCategory || productTotal.productTotalCategory==0)) ? productTotal.productTotalCategory : '--' }}</strong> ,
  111. 总数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong>
  112. <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
  113. ,总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? toThousands(productTotal.productTotalCost,2) : '--' }}</strong>
  114. </div>
  115. </div>
  116. </a-alert>
  117. <!-- 筛选条件 -->
  118. <a-row :gutter="15" justify="space-between">
  119. <a-col :span="17">
  120. <div class="table-page-search-wrapper">
  121. <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
  122. <a-row :gutter="15">
  123. <a-col :md="9" :sm="24">
  124. <a-form-item label="产品编码" prop="productCode">
  125. <a-input id="chainTransferOutEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
  126. </a-form-item>
  127. </a-col>
  128. <a-col :md="9" :sm="24">
  129. <a-form-item label="产品名称" prop="productName">
  130. <a-input id="chainTransferOutEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
  131. </a-form-item>
  132. </a-col>
  133. <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
  134. <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chainTransferOutList-refresh">查询</a-button>
  135. <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chainTransferOutList-reset">重置</a-button>
  136. </a-col>
  137. </a-row>
  138. </a-form>
  139. </div>
  140. </a-col>
  141. <a-col :span="7" style="text-align: right;">
  142. <a-button
  143. type="danger"
  144. ghost
  145. size="small"
  146. @click="openGuideModal=true"
  147. style="margin-right: 5px"
  148. id="chainTransferOutEdit-import-btn">导入产品</a-button>
  149. <a-button
  150. size="small"
  151. type="primary"
  152. ghost
  153. style="margin-left: 8px"
  154. :disabled="localDataSource.length==0"
  155. @click.stop="handleDel('', 'all')"
  156. id="chainTransferOutEdit-del-all-btn">清空列表</a-button>
  157. </a-col>
  158. </a-row>
  159. <!-- 列表 -->
  160. <s-table
  161. class="sTable"
  162. ref="chooseTable"
  163. size="small"
  164. :rowKey="(record) => record.id"
  165. :columns="chooseColumns"
  166. :data="chooseLoadData"
  167. :defaultLoadData="false"
  168. :scroll="{ y: 300 }"
  169. bordered>
  170. <!-- 操作 -->
  171. <template slot="action" slot-scope="text, record">
  172. <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
  173. </template>
  174. </s-table>
  175. </a-collapse-panel>
  176. </a-collapse>
  177. </div>
  178. </a-spin>
  179. <div class="affix-cont">
  180. <a-button
  181. type="primary"
  182. id="chainTransferOutEdit-submit"
  183. size="large"
  184. :disabled="spinning"
  185. class="button-primary"
  186. @click="handleSubmit"
  187. style="padding: 0 60px;">提交</a-button>
  188. </div>
  189. <!-- 导入产品 -->
  190. <importGuideModal :openModal="openGuideModal" :params="{allocationLinkageOutSn: $route.params.sn}" @close="openGuideModal=false" @ok="pageInit" />
  191. </div>
  192. </template>
  193. <script>
  194. import { commonMixin } from '@/utils/mixin'
  195. import { STable, VSelect } from '@/components'
  196. import { getOperationalPrecision } from '@/libs/tools.js'
  197. import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint, importProductInsertBatch } from '@/api/allocLinkageOut'
  198. import { productQuery } from '@/api/allocWarehouse'
  199. import ProductType from '../../common/productType.js'
  200. import ProductBrand from '../../common/productBrand.js'
  201. import { warehouseAllList } from '@/api/warehouse'
  202. import Print from '@/views/common/print.vue'
  203. import { hdPrint } from '@/libs/JGPrint'
  204. import importGuideModal from './importGuideModal.vue'
  205. export default {
  206. name: 'AllocLinkageOutEdit',
  207. components: { STable, VSelect, Print, ProductType, ProductBrand, importGuideModal },
  208. mixins: [commonMixin],
  209. data () {
  210. return {
  211. spinning: false,
  212. queryParam: {
  213. productCode: '',
  214. productName: '',
  215. productOrigCode: '',
  216. warehouseSn: undefined,
  217. brandSn: undefined,
  218. productTypeSn1: undefined,
  219. productTypeSn2: undefined,
  220. productTypeSn3: undefined
  221. },
  222. productType: [],
  223. warehouseList: [], // 仓库 下拉数据
  224. disabled: false, // 查询、重置按钮是否可操作
  225. chooseDisabled: false,
  226. openGuideModal: false,
  227. advanced: false, // 高级搜索 展开/关闭
  228. // 加载数据方法 必须为 Promise 对象
  229. loadData: parameter => {
  230. this.disabled = true
  231. // 箭冠品牌 sysFlag传1,非箭冠品牌传0。与新增时所选调出产品类型有关
  232. this.queryParam.sysFlag = this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0'
  233. const params = Object.assign(parameter, this.queryParam, {wasteFlag: 0})
  234. return productQuery(params).then(res => {
  235. const data = res.data
  236. const no = (data.pageNo - 1) * data.pageSize
  237. for (var i = 0; i < data.list.length; i++) {
  238. data.list[i].no = no + i + 1
  239. }
  240. this.disabled = false
  241. return data
  242. })
  243. },
  244. chooseQueryParam: {
  245. productCode: '',
  246. productName: ''
  247. },
  248. // 加载数据方法 必须为 Promise 对象
  249. chooseLoadData: parameter => {
  250. this.chooseDisabled = true
  251. const params = Object.assign(parameter, this.chooseQueryParam, { allocationLinkageOutSn: this.$route.params.sn })
  252. return allocLinkageOutDetailList(params).then(res => {
  253. const data = res.data
  254. const no = (data.pageNo - 1) * data.pageSize
  255. for (var i = 0; i < data.list.length; i++) {
  256. data.list[i].no = no + i + 1
  257. // 成本小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
  258. data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
  259. }
  260. this.chooseDisabled = false
  261. this.getDetailCount(params)
  262. this.localDataSource = data.list
  263. return data
  264. })
  265. },
  266. basicInfoData: null, // 基本信息
  267. productTotal: null, // 合计
  268. localDataSource: []
  269. }
  270. },
  271. computed: {
  272. columns () {
  273. const _this = this
  274. const arr = [
  275. { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
  276. { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
  277. { title: '产品名称', dataIndex: 'productName', width: '13%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  278. { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
  279. { title: '品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  280. { title: '仓库', dataIndex: 'warehouseName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  281. { title: '仓位', dataIndex: 'warehouseLocationName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  282. // { title: '成本价', dataIndex: 'putCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  283. { title: '库存数量', dataIndex: 'currentQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  284. { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
  285. { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: '8%', align: 'center' },
  286. { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
  287. ]
  288. if (this.$hasPermissions('M_ShowAllCost')) {
  289. arr.splice(7, 0, { title: '成本价', dataIndex: 'putCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
  290. }
  291. return arr
  292. },
  293. chooseColumns () {
  294. const _this = this
  295. const arr = [
  296. { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
  297. { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
  298. { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  299. { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
  300. { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  301. { title: '仓库', dataIndex: 'warehouseName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  302. { title: '仓位', dataIndex: 'warehouseLocationName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  303. { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
  304. // { title: '成本价', dataIndex: 'outCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  305. { title: '调出数量', dataIndex: 'outQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  306. // { title: '成本小计', dataIndex: 'costSubtotal', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  307. { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
  308. ]
  309. if (this.$hasPermissions('M_ShowAllCost')) {
  310. arr.splice(8, 0, { title: '成本价', dataIndex: 'outCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
  311. arr.splice(10, 0, { title: '成本小计', dataIndex: 'costSubtotal', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
  312. }
  313. return arr
  314. }
  315. },
  316. methods: {
  317. // 重置
  318. resetSearchForm () {
  319. this.resetData()
  320. this.$refs.table.refresh(true)
  321. },
  322. resetData () {
  323. this.queryParam.productCode = ''
  324. this.queryParam.productName = ''
  325. this.queryParam.productOrigCode = ''
  326. this.queryParam.warehouseSn = undefined
  327. this.queryParam.brandSn = undefined
  328. this.queryParam.productTypeSn1 = undefined
  329. this.queryParam.productTypeSn2 = undefined
  330. this.queryParam.productTypeSn3 = undefined
  331. this.productType = []
  332. },
  333. // 已选产品 重置
  334. chooseResetSearchForm () {
  335. this.chooseQueryParam.productCode = ''
  336. this.chooseQueryParam.productName = ''
  337. this.$refs.chooseTable.refresh(true)
  338. },
  339. // 双击快速添加
  340. handleClickRow (record) {
  341. this.handleAdd(record)
  342. },
  343. // 基本信息
  344. getDetail () {
  345. allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
  346. if (res.status == 200) {
  347. this.basicInfoData = res.data
  348. this.$refs.table.refresh(true)
  349. } else {
  350. this.basicInfoData = null
  351. }
  352. })
  353. },
  354. // 添加/编辑
  355. handleAdd (row, isEdit) {
  356. if (!isEdit && !row.outQty) {
  357. this.$message.warning('请输入调出数量后再添加!')
  358. return
  359. }
  360. const params = {
  361. id: isEdit ? row.id : undefined,
  362. allocationLinkageOutSn: this.$route.params.sn,
  363. outCost: isEdit ? row.outCost : row.putCost,
  364. outQty: row.outQty,
  365. productSn: row.productSn,
  366. productProduceDate: row.productProduceDate,
  367. productExpiryDate: row.productExpiryDate,
  368. warehouseSn: row.warehouseSn,
  369. warehouseLocationSn: row.warehouseLocationSn
  370. }
  371. this.spinning = true
  372. allocLinkageOutDetailSave(params).then(res => {
  373. if (res.status == 200) {
  374. this.$message.success(res.message)
  375. if (isEdit) {
  376. this.$refs.table.refresh()
  377. }
  378. this.$refs.chooseTable.refresh()
  379. this.spinning = false
  380. } else {
  381. this.spinning = false
  382. }
  383. })
  384. },
  385. // 删除
  386. handleDel (row, isAll) {
  387. const _this = this
  388. const content = isAll ? '删除后不可恢复,确定要清空列表吗?' : '删除后不可恢复,确定要进行删除吗?'
  389. this.$confirm({
  390. title: '提示',
  391. content: content,
  392. centered: true,
  393. onOk () {
  394. if (isAll) { // 清空列表
  395. _this.spinning = true
  396. allocLinkageOutDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
  397. if (res.status == 200) {
  398. _this.$message.success(res.message)
  399. _this.$refs.table.refresh()
  400. _this.$refs.chooseTable.refresh()
  401. _this.spinning = false
  402. } else {
  403. _this.spinning = false
  404. }
  405. })
  406. } else { // 单个删除
  407. _this.spinning = true
  408. allocLinkageOutDetailDel({ id: row.id }).then(res => {
  409. if (res.status == 200) {
  410. _this.$message.success(res.message)
  411. _this.$refs.table.refresh()
  412. _this.$refs.chooseTable.refresh()
  413. _this.spinning = false
  414. } else {
  415. _this.spinning = false
  416. }
  417. })
  418. }
  419. }
  420. })
  421. },
  422. // 提交
  423. handleSubmit () {
  424. const _this = this
  425. _this.spinning = true
  426. allocLinkageOutSubmit({ sn: this.$route.params.sn }).then(res => {
  427. if (res.status == 200) {
  428. this.$message.success(res.message)
  429. setTimeout(() => {
  430. _this.handleBack()
  431. _this.spinning = false
  432. }, 1000)
  433. } else {
  434. _this.spinning = false
  435. }
  436. })
  437. },
  438. // 返回列表
  439. handleBack () {
  440. this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
  441. },
  442. filterOption (input, option) {
  443. return (
  444. option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  445. )
  446. },
  447. // 合计
  448. getDetailCount (params) {
  449. allocLinkageOutDetailCount(params).then(res => {
  450. if (res.status == 200) {
  451. this.productTotal = res.data
  452. } else {
  453. this.productTotal = null
  454. }
  455. })
  456. },
  457. // 产品分类 change
  458. changeProductType (val, opt) {
  459. this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
  460. this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
  461. this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
  462. },
  463. // 仓库下拉数据
  464. getWarehouseList (type) {
  465. warehouseAllList({wasteFlag:0}).then(res => {
  466. if (res.status == 200) {
  467. this.warehouseList = res.data
  468. } else {
  469. this.warehouseList = []
  470. }
  471. })
  472. },
  473. // 打印预览/快捷打印
  474. handlePrint (type, printerType) {
  475. const _this = this
  476. _this.spinning = true
  477. const url = allocLinkageOutDetailPrint
  478. const params = { sn: this.$route.params.sn, type: printerType, showFlag: this.$hasPermissions('M_ShowAllCost') ? 1 : 0 }
  479. // 打印或导出
  480. hdPrint(printerType, type, url, params, '连锁调出单', function () {
  481. _this.spinning = false
  482. })
  483. },
  484. pageInit () {
  485. this.resetData()
  486. this.chooseResetSearchForm()
  487. this.getDetail()
  488. this.getWarehouseList()
  489. }
  490. },
  491. mounted () {
  492. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  493. this.pageInit()
  494. }
  495. },
  496. activated () {
  497. // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
  498. if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
  499. this.pageInit()
  500. }
  501. },
  502. beforeRouteEnter (to, from, next) {
  503. next(vm => {})
  504. }
  505. }
  506. </script>
  507. <style lang="less">
  508. .chainTransferOutEdit-wrap{
  509. position: relative;
  510. height: 100%;
  511. padding-bottom: 51px;
  512. box-sizing: border-box;
  513. .chainTransferOutEdit-back, .chainTransferOutEdit-cont{
  514. margin-bottom: 10px;
  515. }
  516. >.ant-spin-nested-loading{
  517. overflow-y: auto;
  518. height: 100%;
  519. }
  520. }
  521. </style>