|
@@ -4,7 +4,7 @@
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
<a id="warehousingAuditDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
- <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '--' }}</p>
|
|
|
+ <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.receivingBillNo) || '--' }}</p>
|
|
|
</template>
|
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra">
|
|
@@ -17,17 +17,17 @@
|
|
|
<a-collapse :activeKey="['1']">
|
|
|
<a-collapse-panel key="1" header="基础信息">
|
|
|
<a-descriptions :column="3">
|
|
|
- <a-descriptions-item label="供应商">箭冠营销中心</a-descriptions-item>
|
|
|
- <a-descriptions-item label="入库时间">箭冠营销中心</a-descriptions-item>
|
|
|
- <a-descriptions-item label="采购单号">箭冠营销中心</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="供应商">{{ basicInfoData&&basicInfoData.dealerName ? basicInfoData.dealerName : '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入库时间">{{ basicInfoData&&basicInfoData.stockPutTime ? basicInfoData.stockPutTime : '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="采购单号">{{ basicInfoData&&basicInfoData.purchaseBillNo ? basicInfoData.purchaseBillNo : '--' }}</a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
<a-descriptions :column="3" bordered>
|
|
|
- <a-descriptions-item label="采购总款数">2</a-descriptions-item>
|
|
|
- <a-descriptions-item label="采购总数量">20</a-descriptions-item>
|
|
|
- <a-descriptions-item label="采购总成本">¥120.36</a-descriptions-item>
|
|
|
- <a-descriptions-item label="入库总款数">{{ (bizInfo&&bizInfo.productTotalCategory!=0) ? bizInfo.productTotalCategory : 0 }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="入库总数量">{{ (bizInfo&&bizInfo.productTotalQty!=0) ? bizInfo.productTotalQty : 0 }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="入库总成本">¥{{ (bizInfo&&bizInfo.productTotalCost!=0) ? bizInfo.productTotalCost : 0 }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="采购总款数">{{ (basicInfoData&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="采购总数量">{{ (basicInfoData&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="采购总成本">¥{{ (basicInfoData&&basicInfoData.totalAmount!=0) ? basicInfoData.totalAmount : 0 }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入库总款数">{{ (basicInfoData&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入库总数量">{{ (basicInfoData&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入库总成本">¥{{ (basicInfoData&&basicInfoData.totalPutAmount!=0) ? basicInfoData.totalPutAmount : 0 }}</a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
@@ -40,11 +40,11 @@
|
|
|
<s-table
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
- size="default"
|
|
|
+ size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1290 }"
|
|
|
+ :scroll="{ x: 1520 }"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
</a-collapse-panel>
|
|
@@ -56,7 +56,7 @@
|
|
|
<script>
|
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { stockPutBizInfo } from '@/api/stockPut'
|
|
|
+import { receivingDetailList, receivingDetailSn } from '@/api/receiving'
|
|
|
export default {
|
|
|
components: { STable, VSelect },
|
|
|
data () {
|
|
@@ -64,61 +64,33 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
|
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center' },
|
|
|
+ { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 220, align: 'center' },
|
|
|
{ title: '采购数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '入库数量', dataIndex: 'qtsy', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '成本价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' },
|
|
|
- { title: '入库小计', dataIndex: 'warehousingSubtotal', width: 100, align: 'center' },
|
|
|
- { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '入库数量', dataIndex: 'putQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '成本价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center' },
|
|
|
+ { title: '入库小计', dataIndex: 'totalAmount', width: 100, align: 'center' },
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
- // return customerBundleDelayList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
- // const data = res.data
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
- // const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
|
|
|
- // const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
|
|
|
- // const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
|
|
|
- // const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
|
|
|
- // data.list[i].productCode = productCode || '--'
|
|
|
- // data.list[i].productName = productName || '--'
|
|
|
- // data.list[i].productOrigCode = productOrigCode || '--'
|
|
|
- // data.list[i].productOrigUnit = productOrigUnit || '--'
|
|
|
- // data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
|
|
|
- // data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
|
|
|
- // // 入库小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
|
- // data.list[i].warehousingSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
+ return receivingDetailList(Object.assign(parameter, { receivingBillSn: 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++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
+ // 入库小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
|
+ data.list[i].warehousingSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
|
|
|
}
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
})
|
|
|
},
|
|
|
- basicInfoData: null, // 基本信息
|
|
|
- bizInfo: null
|
|
|
+ basicInfoData: null // 基本信息
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -126,19 +98,19 @@ export default {
|
|
|
handleBack () {
|
|
|
this.$router.push({ path: '/financialManagement/warehousingAudit/list' })
|
|
|
},
|
|
|
- getBizInfoDetail () {
|
|
|
- stockPutBizInfo({ putBizSn: this.$route.params.sn, putBizType: this.$route.params.type }).then(res => {
|
|
|
+ getDetail () {
|
|
|
+ receivingDetailSn({ sn: this.$route.params.sn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.bizInfo = res.data
|
|
|
+ this.basicInfoData = res.data
|
|
|
} else {
|
|
|
- this.bizInfo = null
|
|
|
+ this.basicInfoData = null
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
- vm.getBizInfoDetail()
|
|
|
+ vm.getDetail()
|
|
|
})
|
|
|
}
|
|
|
}
|