edit.vue 24 KB

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