|
@@ -45,13 +45,18 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
bordered>
|
|
bordered>
|
|
- <!-- 采购数量 -->
|
|
|
|
- <template slot="purchaseNum" slot-scope="text, record">
|
|
|
|
- <span>{{record.purchaseNum}}</span>
|
|
|
|
|
|
+ <!-- 产品类别 -->
|
|
|
|
+ <template slot="productType" slot-scope="text, record">
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>{{record.productTypeName}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ {{record.productTypeName3}}
|
|
|
|
+ </a-tooltip>
|
|
</template>
|
|
</template>
|
|
- <!-- 缺货数量 -->
|
|
|
|
- <template slot="outOfStockNum" slot-scope="text, record">
|
|
|
|
- <span>{{record.outOfStockNum}}</span>
|
|
|
|
|
|
+ <!-- 成本小计 -->
|
|
|
|
+ <template slot="costSubtotal" slot-scope="text, record">
|
|
|
|
+ <span>{{(record.allocationCost * record.allocationQty) || 0}}</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
@@ -61,53 +66,44 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import { allocWarehouseDetailList } from '@/api/allocWarehouse'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
export default{
|
|
export default{
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
|
|
+ queryParam: {
|
|
|
|
+ allocationWarehouseSn: this.$route.params.sn
|
|
|
|
+ },
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '类别', dataIndex: 'tostalP', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
|
|
|
|
- { title: '单位', dataIndex: 'mementPay', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '成本小计', dataIndex: 'totalNums', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '调出仓位', dataIndex: 'shDate', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '调入仓位', dataIndex: 'shDsate', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '类别', scopedSlots: { customRender: 'productType' }, align: 'center' },
|
|
|
|
+ { title: '数量', dataIndex: 'allocationQty', align: 'center' },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '成本小计', scopedSlots: { customRender: 'costSubtotal' }, align: 'center' },
|
|
|
|
+ { title: '调出仓位', dataIndex: 'outWarehouseLocationName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '调入仓位', dataIndex: 'putWarehouseLocationName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
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
|
|
|
|
- // }
|
|
|
|
- // 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 allocWarehouseDetailList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
|
+ 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
|
|
|
|
+ const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
|
|
|
|
+ const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
|
|
|
|
+ const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
|
|
|
|
+ data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
|
|
}
|
|
}
|
|
- _this.disabled = false
|
|
|
|
- resolve(data)
|
|
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -120,20 +116,6 @@
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
- if (this.oldTime && this.oldTime.length > 0) {
|
|
|
|
- params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
|
|
|
|
- params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
|
|
|
|
- } else {
|
|
|
|
- params.beginOldExpiryDate = ''
|
|
|
|
- params.endOldExpirydDate = ''
|
|
|
|
- }
|
|
|
|
- if (this.newTime && this.newTime.length > 0) {
|
|
|
|
- params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
|
|
|
|
- params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
|
|
|
|
- } else {
|
|
|
|
- params.beginDate = ''
|
|
|
|
- params.endDate = ''
|
|
|
|
- }
|
|
|
|
this.exportLoading = true
|
|
this.exportLoading = true
|
|
customerBundleExportDelay(params).then(res => {
|
|
customerBundleExportDelay(params).then(res => {
|
|
this.exportLoading = false
|
|
this.exportLoading = false
|