|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div class="storeTransferOutDetail-wrap">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
- <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" >
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
- <template slot="subTitle">
|
|
|
+ <template slot="subTitle" v-if="!outBizSn">
|
|
|
<a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
<a-button
|
|
|
v-if="isEdit&&$hasPermissions('B_storeCallOutEdit')"
|
|
@@ -40,7 +40,7 @@
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
|
|
|
<!-- 总计 -->
|
|
|
- <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
+ <a-alert type="info" showIcon style="margin-bottom:10px">
|
|
|
<div slot="message">
|
|
|
总款数 <strong>{{ (productTotal&&(productTotal.productTotalCategory || productTotal.productTotalCategory==0)) ? productTotal.productTotalCategory : '--' }}</strong> ,
|
|
|
总数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong> ,
|
|
@@ -71,12 +71,18 @@ import { getOperationalPrecision } from '@/libs/tools.js'
|
|
|
import { storeCallOutDetailList, storeCallOutDetailCount, storeCallOutDetailSn, storeCallOutDetailPrint } from '@/api/storeCallOut'
|
|
|
export default {
|
|
|
components: { STable, VSelect },
|
|
|
+ props: {
|
|
|
+ outBizSn: { // 有值则为弹框,无值则为页面
|
|
|
+ type: [Number, String],
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
// 表头
|
|
|
columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
|
+ { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -87,7 +93,7 @@ export default {
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
- return storeCallOutDetailList(Object.assign(parameter, { storeCallOutSn: this.$route.params.sn })).then(res => {
|
|
|
+ return storeCallOutDetailList(Object.assign(parameter, { storeCallOutSn: this.outBizSn || this.$route.params.sn })).then(res => {
|
|
|
const data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
@@ -114,13 +120,13 @@ export default {
|
|
|
methods: {
|
|
|
// 返回列表
|
|
|
handleBack () {
|
|
|
- this.$router.push({ path: '/allocationManagement/storeTransferOut/list' })
|
|
|
+ this.$router.push({ path: '/allocationManagement/storeTransferOut/list', query: { closeLastOldTab: true } })
|
|
|
},
|
|
|
// 打印预览/快捷打印
|
|
|
handlePrint (type) {
|
|
|
const _this = this
|
|
|
_this.spinning = true
|
|
|
- storeCallOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType, costFlag: this.printCostChecked ? '1' : '0' }).then(res => {
|
|
|
+ storeCallOutDetailPrint({ sn: this.outBizSn || this.$route.params.sn, type: this.printerType, costFlag: this.printCostChecked ? '1' : '0' }).then(res => {
|
|
|
_this.spinning = false
|
|
|
if (res.type == 'application/json') {
|
|
|
var reader = new FileReader()
|
|
@@ -152,7 +158,7 @@ export default {
|
|
|
},
|
|
|
// 基本信息
|
|
|
getDetail () {
|
|
|
- storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {
|
|
|
+ storeCallOutDetailSn({ sn: this.outBizSn || this.$route.params.sn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.basicInfoData = res.data
|
|
|
} else {
|
|
@@ -162,7 +168,7 @@ export default {
|
|
|
},
|
|
|
// 合计
|
|
|
getDetailCount () {
|
|
|
- storeCallOutDetailCount({ storeCallOutSn: this.$route.params.sn }).then(res => {
|
|
|
+ storeCallOutDetailCount({ storeCallOutSn: this.outBizSn || this.$route.params.sn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.productTotal = res.data
|
|
|
} else {
|
|
@@ -175,10 +181,14 @@ export default {
|
|
|
this.$router.push({ path: `/allocationManagement/storeTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.storeCallOutSn}` })
|
|
|
}
|
|
|
},
|
|
|
+ mounted () {
|
|
|
+ this.getDetail()
|
|
|
+ this.getDetailCount()
|
|
|
+ },
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
- vm.getDetail()
|
|
|
- vm.getDetailCount()
|
|
|
+ // vm.getDetail()
|
|
|
+ // vm.getDetailCount()
|
|
|
})
|
|
|
}
|
|
|
}
|