|
@@ -11,7 +11,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="关联单号">
|
|
|
- <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入关联单号"/>
|
|
|
+ <a-input id="bulkWarehousingOrderList-sparePartsNo" v-model.trim="queryParam.sparePartsNo" allowClear placeholder="请输入关联单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -49,8 +49,8 @@
|
|
|
:scroll="{ x: 1360, y: tableHeight }"
|
|
|
bordered>
|
|
|
<!-- 入库单号 -->
|
|
|
- <template slot="sparePartsPurchaseNo" slot-scope="text, record">
|
|
|
- <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
|
|
|
+ <template slot="sparePartsNo" slot-scope="text, record">
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsNo }}</span>
|
|
|
</template>
|
|
|
<!-- 财务状态 -->
|
|
|
<template slot="settleState" slot-scope="text, record">
|
|
@@ -84,8 +84,7 @@
|
|
|
import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
|
-// import { sparePartsPurList, sparePartsPurCount, sparePartsPurDel, sparePartsPurPut } from '@/api/sparePartsPur'
|
|
|
-import { supplierAllList } from '@/api/supplier'
|
|
|
+import { sparePartsList } from '@/api/spareParts'
|
|
|
export default {
|
|
|
components: { STable, VSelect, basicInfoModal },
|
|
|
data () {
|
|
@@ -94,22 +93,20 @@ export default {
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false, // 导出loading
|
|
|
openModal: false, // 基本信息弹框是否显示
|
|
|
- supplierList: [], // 供应商列表数据
|
|
|
createDate: [], // 创建时间
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
tableHeight: 0,
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- sparePartsPurchaseNo: '', // 散件单号
|
|
|
+ sparePartsNo: '', // 单号
|
|
|
supplierSn: undefined, // 供应商
|
|
|
state: undefined, // 单据状态
|
|
|
settleState: undefined // 结算状态
|
|
|
},
|
|
|
// 表头
|
|
|
columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
|
- { title: '入库单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: 220, align: 'center' },
|
|
|
+ { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: 220, align: 'center' },
|
|
|
{ title: '商户名称', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '入库数量', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '入库成本', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -137,15 +134,13 @@ export default {
|
|
|
this.queryParam.beginDate = undefined
|
|
|
this.queryParam.endDate = undefined
|
|
|
}
|
|
|
- return sparePartsPurList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return sparePartsList(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
|
|
|
- this.dataTotalCount = data.count
|
|
|
- this.getTotal(Object.assign(parameter, this.queryParam))
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
@@ -170,20 +165,6 @@ export default {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
|
- // 合计
|
|
|
- getTotal (param) {
|
|
|
- sparePartsPurCount(param).then(res => {
|
|
|
- if (res.status == 200 && res.data) {
|
|
|
- this.productTotal = res.data
|
|
|
- } else {
|
|
|
- this.productTotal = {
|
|
|
- // 合计信息
|
|
|
- productTotalCost: '',
|
|
|
- productTotalQty: ''
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 新增
|
|
|
handleAdd () {
|
|
|
this.openModal = true
|
|
@@ -284,22 +265,11 @@ export default {
|
|
|
link.setAttribute('download', fname + '.xlsx')
|
|
|
document.body.appendChild(link)
|
|
|
link.click()
|
|
|
- },
|
|
|
- // 供应商下拉数据
|
|
|
- getSupplierList () {
|
|
|
- supplierAllList().then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.supplierList = res.data
|
|
|
- } else {
|
|
|
- this.supplierList = []
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.openModal = false
|
|
|
- vm.getSupplierList()
|
|
|
})
|
|
|
}
|
|
|
}
|