|
@@ -1,9 +1,16 @@
|
|
<template>
|
|
<template>
|
|
<div class="chainTransferOutDetail-wrap">
|
|
<div class="chainTransferOutDetail-wrap">
|
|
- <a-page-header :ghost="false" @back="handleBack" class="chainTransferOutDetail-back">
|
|
|
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutDetail-cont" >
|
|
<!-- 自定义的二级文字标题 -->
|
|
<!-- 自定义的二级文字标题 -->
|
|
<template slot="subTitle">
|
|
<template slot="subTitle">
|
|
- <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
|
|
|
|
|
|
+ <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="isEdit"
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
|
|
|
|
+ id="chainTransferOutDetail-edit-btn"
|
|
|
|
+ @click.stop="handleEdit">编辑</a-button>
|
|
</template>
|
|
</template>
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<template slot="extra">
|
|
<template slot="extra">
|
|
@@ -11,97 +18,130 @@
|
|
<a-button key="1" type="primary" id="chainTransferOutDetail-print-btn">快速打印</a-button>
|
|
<a-button key="1" type="primary" id="chainTransferOutDetail-print-btn">快速打印</a-button>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
|
|
+ <!-- 基础信息 -->
|
|
<a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
|
|
<a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
|
|
- <!-- 总计 -->
|
|
|
|
- <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
|
- <div slot="message">审核状态: <strong>支持市级</strong>,完结状态: <strong>支持市级</strong>,调出对象: <strong>支持市级</strong>,调入单号: <strong>2121212</strong>,总成本:¥<strong>6.33</strong>,总数量: <strong>6</strong> </div>
|
|
|
|
- </a-alert>
|
|
|
|
- <!-- 列表 -->
|
|
|
|
- <s-table
|
|
|
|
- class="sTable"
|
|
|
|
- ref="table"
|
|
|
|
- size="default"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :scroll="{ x: 1085 }"
|
|
|
|
- bordered>
|
|
|
|
- <!-- 成本小计 -->
|
|
|
|
- <template slot="totalCost" slot-scope="text, record">
|
|
|
|
- <span>{{ (record.outCost * record.outQty) || 0 }}</span>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
|
|
+ <a-collapse :activeKey="['1']">
|
|
|
|
+ <a-collapse-panel key="1" header="基础信息">
|
|
|
|
+ <a-descriptions :column="3">
|
|
|
|
+ <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="调出单号">{{ (basicInfoData&&basicInfoData.allocationLinkageOutNo) || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
|
|
|
|
+ </a-descriptions>
|
|
|
|
+ </a-collapse-panel>
|
|
|
|
+ </a-collapse>
|
|
|
|
+ </a-card>
|
|
|
|
+ <!-- 产品详情 -->
|
|
|
|
+ <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
|
|
|
|
+ <a-collapse :activeKey="['1']">
|
|
|
|
+ <a-collapse-panel key="1" header="产品详情">
|
|
|
|
+ <!-- 总计 -->
|
|
|
|
+ <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
|
+ <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
|
|
|
|
+ </a-alert>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable"
|
|
|
|
+ ref="table"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ x: 1090 }"
|
|
|
|
+ bordered>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-collapse-panel>
|
|
|
|
+ </a-collapse>
|
|
</a-card>
|
|
</a-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { allocLinkageOutDetailList } from '@/api/allocLinkageOut'
|
|
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
|
|
+import { getOperationalPrecision } from '@/libs/tools.js'
|
|
|
|
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailCount } from '@/api/allocLinkageOut'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- queryParam: {
|
|
|
|
- allocationLinkageOutSn: this.$route.params.sn
|
|
|
|
- },
|
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
- brandData: [], // 产品品牌 下拉数据
|
|
|
|
- typeData: [], // 产品类别 下拉数据
|
|
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
|
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '成本价(¥)', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '调出仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '调出数量', dataIndex: 'outQty', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '成本小计(¥)', scopedSlots: { customRender: 'totalCost' }, width: 135, align: 'center' }
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '成本价', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '调出仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '调出数量', dataIndex: 'outQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- return allocLinkageOutDetailList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ const params = Object.assign(parameter, { allocationLinkageOutSn: this.$route.params.sn })
|
|
|
|
+ return allocLinkageOutDetailList(params).then(res => {
|
|
const data = res.data
|
|
const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
|
|
+ // 成本小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
|
|
+ data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.getDetailCount(params)
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ basicInfoData: null, // 基本信息
|
|
|
|
+ productTotal: null // 合计
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ isEdit () {
|
|
|
|
+ return (this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 重置
|
|
|
|
- resetSearchForm () {
|
|
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
|
- this.queryParam.bundleName = ''
|
|
|
|
- this.queryParam.itemName = ''
|
|
|
|
- this.oldTime = undefined
|
|
|
|
- this.newTime = undefined
|
|
|
|
- this.$refs.table.refresh(true)
|
|
|
|
- },
|
|
|
|
- // 提交
|
|
|
|
- handleSubmit () {},
|
|
|
|
// 返回列表
|
|
// 返回列表
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
|
|
this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
|
|
|
|
+ },
|
|
|
|
+ // 基本信息
|
|
|
|
+ getDetail () {
|
|
|
|
+ allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.basicInfoData = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.basicInfoData = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 合计
|
|
|
|
+ getDetailCount (params) {
|
|
|
|
+ allocLinkageOutDetailCount(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.productTotal = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.productTotal = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 编辑
|
|
|
|
+ handleEdit () {
|
|
|
|
+ this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.allocationLinkageOutSn}` })
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
|
+ next(vm => {
|
|
|
|
+ vm.getDetail()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
- .chainTransferOutDetail-wrap{
|
|
|
|
- .chainTransferOutDetail-back{
|
|
|
|
- margin-bottom: 15px;
|
|
|
|
- }
|
|
|
|
- .chainTransferOutDetail-cont{
|
|
|
|
- margin-bottom: 15px;
|
|
|
|
- }
|
|
|
|
|
|
+ .chainTransferOutDetail-cont{
|
|
|
|
+ margin-bottom: 15px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|