edit.vue 24 KB

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