|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
<div class="bulkWarehousingOrderDetail-wrap">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
- <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderDetail-cont" >
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }">
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
- <a id="bulkWarehousingOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
+ <a id="bulkWarehousingOrderDetail-back-btn" href="javascript:;" @click="handleBack" v-if="!outBizSn"><a-icon type="left" /> 返回列表</a>
|
|
|
<a-button
|
|
|
- v-if="isEdit"
|
|
|
+ v-if="isEdit&&!outBizSn"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
|
|
@@ -99,13 +99,19 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
|
-import { sparePartsPurDetail, sparePartsPurDetailList, sparePartsPurDetailCount, sparePartsPurDetailPrint } from '@/api/sparePartsPur'
|
|
|
+import { sparePartsPurDetailBySn, sparePartsPurDetailList, sparePartsPurDetailCount, sparePartsPurDetailPrint } from '@/api/sparePartsPur'
|
|
|
import Print from '@/views/common/print.vue'
|
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
|
export default {
|
|
|
name: 'BulkWarehousingDetail',
|
|
|
components: { STable, VSelect, Print },
|
|
|
mixins: [commonMixin],
|
|
|
+ props: {
|
|
|
+ outBizSn: { // 有值则为弹框,无值则为页面
|
|
|
+ type: [Number, String],
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -125,7 +131,7 @@ export default {
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return sparePartsPurDetailList(Object.assign(parameter, { sparePartsPurchaseSn: this.$route.params.sn })).then(res => {
|
|
|
+ return sparePartsPurDetailList(Object.assign(parameter, { sparePartsPurchaseSn: this.outBizSn || this.$route.params.sn })).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -162,7 +168,7 @@ export default {
|
|
|
const _this = this
|
|
|
_this.spinning = true
|
|
|
const url = sparePartsPurDetailPrint
|
|
|
- const params = { sn: this.$route.params.sn, type: printerType }
|
|
|
+ const params = { sn: this.outBizSn || this.$route.params.sn, type: printerType }
|
|
|
// 打印或导出
|
|
|
hdPrint(printerType, type, url, params, '散件入库单', function () {
|
|
|
_this.spinning = false
|
|
@@ -170,7 +176,7 @@ export default {
|
|
|
},
|
|
|
// 基本信息
|
|
|
getDetail () {
|
|
|
- sparePartsPurDetail({ id: this.$route.params.id }).then(res => {
|
|
|
+ sparePartsPurDetailBySn({ sn: this.outBizSn || this.$route.params.sn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.basicInfoData = res.data
|
|
|
} else {
|
|
@@ -180,7 +186,7 @@ export default {
|
|
|
},
|
|
|
// 合计
|
|
|
getDetailCount () {
|
|
|
- sparePartsPurDetailCount({ sparePartsPurchaseSn: this.$route.params.sn }).then(res => {
|
|
|
+ sparePartsPurDetailCount({ sparePartsPurchaseSn: this.outBizSn || this.$route.params.sn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.productTotal = res.data
|
|
|
} else {
|
|
@@ -194,7 +200,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
+ if (!this.$store.state.app.isNewTab || this.outBizSn) { // 页签刷新时调用
|
|
|
this.$refs.table.refresh(true)
|
|
|
this.getDetail()
|
|
|
this.getDetailCount()
|