salesReturnEdit.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. <template>
  2. <div class="salesReturnEdit-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
  5. <!-- 自定义的二级文字标题 -->
  6. <template slot="subTitle">
  7. <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
  8. <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ ordeDetail&&ordeDetail.salesReturnBillNo }}</span>
  9. <span style="margin: 0 10px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
  10. <span style="margin: 0 10px;color: #666;">
  11. 退货仓库:{{ ordeDetail&&ordeDetail.warehouseName }}
  12. </span>
  13. <span style="margin: 0 10px;color: #666;">
  14. 退货类别:{{ ordeDetail&&ordeDetail.goodFlagDictValue }}
  15. </span>
  16. </template>
  17. <!-- 操作区,位于 title 行的行尾 -->
  18. <template slot="extra">
  19. <a-button
  20. key="3"
  21. type="default"
  22. class="button-info"
  23. id="salesReturnEdit-preview-btn"
  24. v-if="$hasPermissions('B_salesReturnPrint')"
  25. :disabled="chooseLoadData.length==0"
  26. @click="handlePrint('preview')">打印预览</a-button>
  27. <a-button
  28. key="2"
  29. type="primary"
  30. class="button-info"
  31. id="salesReturnEdit-print-btn"
  32. v-if="$hasPermissions('B_salesReturnPrint')"
  33. :disabled="chooseLoadData.length==0"
  34. @click="handlePrint('print')">快捷打印</a-button>
  35. <a-divider type="vertical" />
  36. <a-button
  37. key="1"
  38. type="default"
  39. class="button-warning"
  40. id="salesReturnEdit-export-btn"
  41. v-if="$hasPermissions('B_salesReturnExport')"
  42. :disabled="chooseLoadData.length==0"
  43. @click="handlePrint('export')">导出Excel</a-button>
  44. </template>
  45. </a-page-header>
  46. <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
  47. <!-- 查询配件列表 -->
  48. <queryPart ref="partQuery" :newLoading="isInster" @add="saveProduct"></queryPart>
  49. </a-card>
  50. <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
  51. <a-alert style="margin-bottom: 10px;" type="info">
  52. <div slot="message" class="total-bar">
  53. <div>
  54. <span>申请退货数量:{{ ordeDetail&&(ordeDetail.totalInitialQty || ordeDetail.totalInitialQty==0) ? ordeDetail.totalInitialQty : '--' }};</span>
  55. <span v-if="$hasPermissions('B_salesReturnEdit_salesPrice')">参考退货金额:{{ ordeDetail&&(ordeDetail.totalAmount || ordeDetail.totalAmount==0) ? toThousands(ordeDetail.totalAmount) : '--' }};</span>
  56. </div>
  57. </div>
  58. </a-alert>
  59. <div class="table-page-search-wrapper" style="display:flex;align-items: center;justify-content: space-between;">
  60. <div style="flex-grow:1;">
  61. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  62. <a-row :gutter="15">
  63. <a-col :md="6" :sm="24">
  64. <a-form-item label="产品编码">
  65. <a-input v-model.trim="productForm.productCode" allowClear placeholder="请输入产品编码"/>
  66. </a-form-item>
  67. </a-col>
  68. <a-col :md="6" :sm="24">
  69. <a-form-item label="产品名称">
  70. <a-input v-model.trim="productForm.productName" allowClear placeholder="请输入产品名称"/>
  71. </a-form-item>
  72. </a-col>
  73. <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
  74. <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
  75. <a-button style="margin-left: 5px" @click="resetSearchForm(true)" :disabled="disabled">重置</a-button>
  76. </a-col>
  77. </a-row>
  78. </a-form>
  79. </div>
  80. <div>
  81. <span style="margin-right: 10px;" v-if="selNums">已选{{ selNums }}项</span>
  82. <a-button type="default" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
  83. <a-button type="primary" class="button-info" id="salesReturnEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
  84. </div>
  85. </div>
  86. <!-- 已选配件列表 -->
  87. <s-table
  88. class="sTable"
  89. ref="table"
  90. size="small"
  91. :rowKey="(record) => record.id"
  92. :row-selection="{ columnWidth: 40 }"
  93. @rowSelection="rowSelectionFun"
  94. :columns="columns"
  95. :data="loadData"
  96. :defaultLoadData="false"
  97. :scroll="{ y: 300 }"
  98. bordered>
  99. <!-- 本次退货数量 -->
  100. <template slot="qty" slot-scope="text, record">
  101. <a-input-number
  102. id="salesReturn-qty"
  103. size="small"
  104. v-model="record.initialQty"
  105. :precision="0"
  106. :min="0"
  107. :max="999999"
  108. placeholder="请输入"
  109. @blur="e => onCellBlur(e.target.value, record, 'qty')"
  110. style="width: 100%;" />
  111. </template>
  112. <!-- 退货原因 -->
  113. <template slot="returnReason" slot-scope="text, record">
  114. <returnReason :goodFlag="goodFlag" v-model="record.returnReasonCode" @change="e => updateReason(e, record, 0)"></returnReason>
  115. </template>
  116. <!-- 备注 -->
  117. <template slot="returnRemarks" slot-scope="text, record">
  118. <a-input size="small" placeholder="请输入备注" v-model="record.returnReasonRemarks" @blur="e => updateReason(e, record, 1)"></a-input>
  119. </template>
  120. <!-- 操作 -->
  121. <template slot="action" slot-scope="text, record">
  122. <a-button
  123. size="small"
  124. type="link"
  125. :loading="delLoading"
  126. class="button-error"
  127. @click="handleDel(record)"
  128. id="salesReturn-Del">删除</a-button>
  129. </template>
  130. </s-table>
  131. </a-card>
  132. </a-spin>
  133. <div class="affix-cont">
  134. <a-button
  135. size="large"
  136. style="padding: 0 60px;"
  137. :disabled="spinning"
  138. type="primary"
  139. class="button-primary"
  140. @click="beforeSubmit()"
  141. id="salesReturn-handleSubmit">提交</a-button>
  142. </div>
  143. <!-- 选择审核人员 -->
  144. <chooseDepartUserModal ref="chooseDepart" :showDefUser="true" :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
  145. <!-- 导入产品 -->
  146. <importGuideModal :goodFlag="goodFlag == 'GOOD_PRODUCT_RETURN' ? 1 : 0" :openModal="openGuideModal" :params="{salesReturnBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeOk" />
  147. <!-- 批量设置退货原因 -->
  148. <commonModal modalTit="批量设置退货原因" :openModal="showPlModal" @cancel="showPlModal=false" @ok="setPlReturnReason">
  149. <div style="text-align: left;">
  150. <div style="line-height: 24px;">
  151. <div><span style="color:red;">*</span>退货原因</div>
  152. <div><returnReason size="large" :goodFlag="goodFlag" v-model="plReturnReason"></returnReason></div>
  153. </div>
  154. <div style="line-height: 24px;margin-top:10px;">
  155. <a-checkbox :checked="showEditRemarks" @change="e => showEditRemarks=!showEditRemarks">是否设置备注</a-checkbox>
  156. </div>
  157. <div style="line-height: 24px;margin-top:10px;" v-if="showEditRemarks">
  158. <div>备注</div>
  159. <div><a-input size="large" :maxLength="50" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div>
  160. </div>
  161. </div>
  162. </commonModal>
  163. </div>
  164. </template>
  165. <script>
  166. import { commonMixin } from '@/utils/mixin'
  167. import { STable, VSelect } from '@/components'
  168. import { printFun, exportExcel } from '@/libs/JGPrint.js'
  169. import ImportGuideModal from './importGuideModal.vue'
  170. import queryPart from './queryPart.vue'
  171. import commonModal from '@/views/common/commonModal.vue'
  172. import EditableCell from '@/views/common/editInput.js'
  173. import chooseDepartUserModal from './chooseDepartUserModal.vue'
  174. import warehouse from '@/views/common/chooseWarehouse.js'
  175. import returnReason from '@/views/common/returnReason'
  176. import {
  177. salesReturnDetail,
  178. salesReturnSubmit,
  179. salesReturnBatchInsert,
  180. salesReturnPrint,
  181. salesReturnExport,
  182. salesReturnModify,
  183. submitVerify
  184. } from '@/api/salesReturn'
  185. import {
  186. salesReturnDetailList,
  187. salesReturnDetailDel,
  188. salesReturnDetailInsert,
  189. salesReturnDetailUpdateQty,
  190. salesReturnDetailUpdateReason,
  191. salesReturnDetailSetReason
  192. } from '@/api/salesReturnDetail'
  193. export default {
  194. name: 'SalesReturnEdit',
  195. mixins: [commonMixin],
  196. components: {
  197. STable,
  198. VSelect,
  199. queryPart,
  200. EditableCell,
  201. ImportGuideModal,
  202. chooseDepartUserModal,
  203. returnReason,
  204. commonModal,
  205. warehouse
  206. },
  207. data () {
  208. return {
  209. spinning: false,
  210. orderId: null,
  211. orderSn: null,
  212. buyerSn: null,
  213. disabled: false,
  214. isInster: false, // 是否正在添加产品
  215. openDepartUserModal: false,
  216. ordeDetail: { discountAmount: 0 },
  217. delLoading: false,
  218. // 已选产品
  219. dataSource: [],
  220. productForm: {
  221. salesReturnBillSn: '',
  222. productName: '',
  223. productCode: ''
  224. },
  225. chooseLoadData: [],
  226. // 加载数据方法 必须为 Promise 对象
  227. loadData: parameter => {
  228. this.disabled = true
  229. // 查询总计
  230. this.productForm.salesReturnBillSn = this.$route.params.sn
  231. return salesReturnDetailList(Object.assign(parameter, this.productForm)).then(res => {
  232. let data
  233. if (res.status == 200) {
  234. data = res.data
  235. const no = (data.pageNo - 1) * data.pageSize
  236. for (var i = 0; i < data.list.length; i++) {
  237. data.list[i].no = no + i + 1
  238. data.list[i].qtyBackups = data.list[i].initialQty
  239. data.list[i].returnReasonBackups = data.list[i].returnReasonCode
  240. data.list[i].bakReamrks = data.list[i].returnReasonRemarks
  241. }
  242. this.disabled = false
  243. this.chooseLoadData = data.list
  244. this.total = res.data.count
  245. }
  246. return data
  247. })
  248. },
  249. openGuideModal: false, // 导入产品引导
  250. total: 0,
  251. rowSelectionInfo: null,
  252. plReturnReason: undefined,
  253. plReturnRemark: undefined,
  254. showEditRemarks: false,
  255. showPlModal: false,
  256. returnReasonlist: []
  257. }
  258. },
  259. watch: {
  260. showPlModal (newValue, oldValue) {
  261. if (!newValue) {
  262. this.plReturnReason = undefined
  263. this.plReturnRemark = undefined
  264. this.showEditRemarks = false
  265. }
  266. }
  267. },
  268. computed: {
  269. goodFlag () {
  270. return this.ordeDetail && this.ordeDetail.goodFlag || ''
  271. },
  272. selNums () {
  273. return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
  274. },
  275. columns () {
  276. const arr = [
  277. { title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
  278. { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
  279. { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
  280. { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
  281. { title: '申请退货数量', dataIndex: 'initialQty', align: 'center', width: '8%', scopedSlots: { customRender: 'qty' } },
  282. { title: '退货原因', dataIndex: 'returnReason', align: 'center', width: '13%', scopedSlots: { customRender: 'returnReason' } },
  283. { title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' },
  284. { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
  285. ]
  286. if (this.$hasPermissions('B_salesReturnEdit_salesPrice')) { // 售价权限
  287. arr.splice(4, 0, { title: '参考退货单价', dataIndex: 'price', align: 'right', width: '8%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
  288. arr.splice(7, 0, { title: '参考退货金额', align: 'right', dataIndex: 'totalAmount', width: '8%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
  289. }
  290. return arr
  291. }
  292. },
  293. methods: {
  294. // 返回
  295. handleBack () {
  296. this.$router.push({ name: 'salesReturnList', query: { closeLastOldTab: true } })
  297. },
  298. // 表格选中项
  299. rowSelectionFun (obj) {
  300. this.rowSelectionInfo = obj || null
  301. },
  302. // 已选产品 blur
  303. onCellBlur (val, record, type) {
  304. const valBackups = record.qtyBackups
  305. // 光标移出,值发生改变再调用编辑接口
  306. if (val && val != valBackups) {
  307. this.spinning = true
  308. salesReturnDetailUpdateQty({
  309. salesReturnDetailSn: record.salesReturnDetailSn,
  310. initialQty: record.initialQty,
  311. price: record.price
  312. }).then(res => {
  313. if (res.status == 200) {
  314. this.resetTable(false)
  315. this.$message.success(res.message)
  316. this.spinning = false
  317. record.qtyBackups = record.initialQty
  318. } else {
  319. this.spinning = false
  320. record.initialQty = valBackups
  321. }
  322. })
  323. } else {
  324. record.initialQty = valBackups
  325. }
  326. },
  327. // 修改仓库
  328. updateWarehouse (warehouseSn) {
  329. const _this = this
  330. _this.spinning = true
  331. const params = { id: this.ordeDetail.id, warehouseSn: warehouseSn }
  332. salesReturnModify(params).then(res => {
  333. if (res.status == 200) {
  334. _this.$message.success(res.message)
  335. _this.getOrderDetail()
  336. }
  337. _this.spinning = false
  338. })
  339. },
  340. // 修改退货原因
  341. updateReason (val, record, type) {
  342. console.log(val, record, type)
  343. const params = {
  344. salesReturnDetailSn: record.salesReturnDetailSn,
  345. goodFlag: this.goodFlag
  346. }
  347. // 退货原因
  348. if (type == 0) {
  349. const rows = this.returnReasonlist.find(item => item.code == val)
  350. params.returnReasonCode = val || ''
  351. params.returnReason = rows ? rows.dispName : ''
  352. } else {
  353. // 备注
  354. params.returnReasonRemarks = val.target.value
  355. if (params.returnReasonRemarks == record.bakReamrks) {
  356. return
  357. }
  358. }
  359. this.spinning = true
  360. salesReturnDetailUpdateReason(params).then(res => {
  361. if (res.status == 200) {
  362. this.resetTable(false)
  363. this.$message.success(res.message)
  364. } else {
  365. row.returnReasonCode = record.returnReasonBackups
  366. }
  367. this.spinning = false
  368. })
  369. },
  370. // 批量设置退货原因
  371. openPlSetReason () {
  372. if (this.selNums) {
  373. this.showPlModal = true
  374. } else {
  375. this.$message.warning('请先选择产品!')
  376. }
  377. },
  378. setPlReturnReason () {
  379. if (!this.plReturnReason) {
  380. this.$message.warning('请选择退货原因!')
  381. } else {
  382. this.spinning = true
  383. const snList = []
  384. const arr = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
  385. const rows = this.returnReasonlist.find(item => item.code == this.plReturnReason)
  386. arr.map(item => {
  387. snList.push(item.salesReturnDetailSn)
  388. })
  389. salesReturnDetailSetReason({
  390. salesReturnBillDetailSnList: snList,
  391. salesReturnBillSn: this.$route.params.sn,
  392. returnReason: rows ? rows.dispName : '',
  393. returnReasonCode: this.plReturnReason,
  394. returnReasonRemarks: this.showEditRemarks ? this.plReturnRemark || '' : undefined
  395. }).then(res => {
  396. if (res.status == 200) {
  397. this.showPlModal = false
  398. this.$refs.table.clearSelected()
  399. this.resetTable(false)
  400. }
  401. this.spinning = false
  402. })
  403. }
  404. },
  405. // 获取单据详细
  406. getOrderDetail (flag) {
  407. salesReturnDetail({ sn: this.orderSn }).then(res => {
  408. this.ordeDetail = res.data || null
  409. if (res.data.goodFlag == 'DEFECTIVE_PRODUCT_RETURN') {
  410. this.returnReasonlist = this.$store.state.app.defectiveReturnReason
  411. }
  412. // 良品
  413. if (res.data.goodFlag == 'GOOD_PRODUCT_RETURN') {
  414. this.returnReasonlist = this.$store.state.app.goodReturnReason
  415. }
  416. this.$refs.table.refresh(!flag)
  417. if (!flag) {
  418. this.$refs.partQuery.pageInit(this.buyerSn, this.ordeDetail.warehouseName, this.goodFlag)
  419. }
  420. })
  421. },
  422. // 删除产品
  423. handleDel (row) {
  424. const _this = this
  425. this.$confirm({
  426. title: '提示',
  427. content: '确认要删除吗?',
  428. centered: true,
  429. closable: true,
  430. onOk () {
  431. _this.delLoading = true
  432. _this.spinning = true
  433. salesReturnDetailDel({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => {
  434. if (res.status == 200) {
  435. _this.resetTable(false)
  436. }
  437. _this.$message.info(res.message)
  438. _this.delLoading = false
  439. _this.spinning = false
  440. })
  441. }
  442. })
  443. },
  444. resetTable (flag) {
  445. this.$refs.table.refresh(flag)
  446. this.getOrderDetail(true)
  447. },
  448. // 重置
  449. resetSearchForm (flag) {
  450. this.productForm.productName = ''
  451. this.productForm.productCode = ''
  452. this.getOrderDetail(flag)
  453. },
  454. // 添加或修改产品
  455. saveProduct (row) {
  456. // 防止多次添加产品
  457. if (this.isInster) {
  458. return
  459. }
  460. // 退货原因
  461. const rows = this.returnReasonlist.find(item => item.code == row.returnReasonCode)
  462. this.isInster = true
  463. const params = {
  464. 'salesReturnBillSn': this.orderSn,
  465. 'salesReturnBillNo': this.ordeDetail.salesReturnBillNo,
  466. 'price': row.productPrice,
  467. 'returnReasonCode': row.returnReasonCode,
  468. 'returnReason': rows ? rows.dispName : '',
  469. 'goodFlag': this.goodFlag,
  470. 'productSn': row.productSn,
  471. 'initialQty': row.qty
  472. }
  473. this.spinning = true
  474. salesReturnDetailInsert(params).then(res => {
  475. if (res.status == 200) {
  476. this.resetSearchForm(true)
  477. this.$message.success(res.message)
  478. }
  479. this.isInster = false
  480. this.spinning = false
  481. })
  482. },
  483. beforeSubmit () {
  484. if (this.total) {
  485. const hasKong = this.chooseLoadData.find(item => !item.returnReason)
  486. if (hasKong) {
  487. this.$message.warning('请输入退货原因!')
  488. } else {
  489. // 判断价格
  490. submitVerify({ salesReturnBillSn: this.orderSn }).then(res => {
  491. if (res.status == 200) {
  492. if (!res.data) {
  493. this.openDepartUserModal = true
  494. if (this.ordeDetail.billStatus == 'AUDIT_REJECT') {
  495. this.$refs.chooseDepart.getDetail(this.ordeDetail)
  496. }
  497. } else {
  498. const arr = res.data.split('\n')
  499. this.$notification.open({
  500. message: '提示',
  501. description:
  502. <div>
  503. {arr.map(item =>
  504. (<p>{item}</p>)
  505. )}
  506. </div>
  507. })
  508. }
  509. }
  510. })
  511. }
  512. } else {
  513. this.$message.warning('请添加产品!')
  514. }
  515. },
  516. // 提交销售退货
  517. handleSubmit (data) {
  518. this.spinning = true
  519. salesReturnSubmit({ salesReturnBillSn: this.orderSn, ...data }).then(res => {
  520. if (res.status == 200) {
  521. this.handleBack()
  522. this.$message.success(res.message)
  523. }
  524. this.spinning = false
  525. })
  526. },
  527. closeGuideModel () {
  528. this.openGuideModal = false
  529. },
  530. // 导入产品
  531. hanldeOk (obj) {
  532. salesReturnBatchInsert(obj).then(res => {
  533. if (res.status == 200) {
  534. this.resetTable(true)
  535. }
  536. })
  537. },
  538. // 打印预览/快捷打印
  539. handlePrint (type) {
  540. const _this = this
  541. const a = ['WAIT_CUSTOMER_SERVICE_CONFIRM', 'WAIT_FINANCIAL_AUDIT', 'FINANCIAL_REJECT', 'FINISH'].find(item => item == this.ordeDetail.billStatus)
  542. const status = a ? 'SALES_RETURN_AMOUNT' : 'SALES_RETURN_REASON'
  543. const params = { salesReturnBillSn: this.$route.params.sn, priceType: status }
  544. _this.spinning = true
  545. // 导出
  546. if (type == 'export') {
  547. exportExcel(salesReturnExport, params, '销售退货', function () {
  548. _this.spinning = false
  549. _this.$store.state.app.curActionPermission = ''
  550. })
  551. } else {
  552. // 打印或预览
  553. printFun(salesReturnPrint, params, type, '销售退货', () => {
  554. _this.spinning = false
  555. _this.$store.state.app.curActionPermission = ''
  556. })
  557. }
  558. },
  559. pageInit () {
  560. this.orderSn = this.$route.params.sn
  561. this.buyerSn = this.$route.params.buyerSn
  562. this.resetSearchForm()
  563. }
  564. },
  565. mounted () {
  566. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  567. this.pageInit()
  568. }
  569. },
  570. activated () {
  571. // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
  572. if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
  573. this.pageInit()
  574. }
  575. },
  576. beforeRouteEnter (to, from, next) {
  577. next(vm => {})
  578. }
  579. }
  580. </script>
  581. <style lang="less">
  582. .salesReturnEdit-wrap{
  583. position: relative;
  584. height: 100%;
  585. padding-bottom: 51px;
  586. box-sizing: border-box;
  587. >.ant-spin-nested-loading{
  588. overflow-y: scroll;
  589. height: 100%;
  590. }
  591. .salesReturnEdit-cont{
  592. margin-top: 10px;
  593. .total-bar{
  594. display: flex;
  595. align-items: center;
  596. justify-content: space-between;
  597. > div{
  598. &:last-child{
  599. display: flex;
  600. align-items: center;
  601. justify-content: space-between;
  602. > div{
  603. padding: 0 10px;
  604. }
  605. }
  606. }
  607. }
  608. }
  609. }
  610. </style>