|
@@ -30,25 +30,27 @@
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="单据状态">
|
|
|
|
|
|
+ <a-form-item label="业务状态">
|
|
<v-select
|
|
<v-select
|
|
v-model="queryParam.state"
|
|
v-model="queryParam.state"
|
|
ref="state"
|
|
ref="state"
|
|
id="bulkWarehousingOrderList-state"
|
|
id="bulkWarehousingOrderList-state"
|
|
code="PAYMENT_TYPE"
|
|
code="PAYMENT_TYPE"
|
|
- placeholder="请选择单据状态"
|
|
|
|
- allowClear></v-select>
|
|
|
|
|
|
+ placeholder="请选择业务状态"
|
|
|
|
+ allowClear
|
|
|
|
+ ></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="结算状态">
|
|
|
|
|
|
+ <a-form-item label="财务状态">
|
|
<v-select
|
|
<v-select
|
|
v-model="queryParam.settleState"
|
|
v-model="queryParam.settleState"
|
|
ref="settleState"
|
|
ref="settleState"
|
|
id="bulkWarehousingOrderList-settleState"
|
|
id="bulkWarehousingOrderList-settleState"
|
|
- code="PAYMENT_TYPE"
|
|
|
|
- placeholder="请选择结算状态"
|
|
|
|
- allowClear></v-select>
|
|
|
|
|
|
+ code="FINANCIAL_STATUS"
|
|
|
|
+ placeholder="请选择财务状态"
|
|
|
|
+ allowClear
|
|
|
|
+ ></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
@@ -79,7 +81,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- alert -->
|
|
<!-- alert -->
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
- <div slot="message">共 <strong>6</strong> 条记录,总数量合计 <strong>14</strong> ,总金额合计¥<strong>14.00</strong> </div>
|
|
|
|
|
|
+ <div slot="message">共 <strong>{{ dataTotalCount }}</strong> 条记录,总数量合计 <strong>{{ productTotal.productTotalQty }}</strong> ,总金额合计¥<strong>{{ productTotal.productTotalCost }}</strong> </div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -89,25 +91,18 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1320, y: 300 }"
|
|
|
|
|
|
+ :scroll="{ x: 1410, y: 300 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 散件单号 -->
|
|
<!-- 散件单号 -->
|
|
<template slot="sparePartsPurchaseNo" slot-scope="text, record">
|
|
<template slot="sparePartsPurchaseNo" slot-scope="text, record">
|
|
<span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
|
|
<span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
|
|
</template>
|
|
</template>
|
|
- <!-- 状态 -->
|
|
|
|
- <template slot="state" slot-scope="text, record">
|
|
|
|
- <span>{{ record.state == 1 ? '已启用' : '已禁用' }}</span>
|
|
|
|
- </template>
|
|
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button size="small" type="link" @click="handleEdit(record)" id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
|
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
|
- <a-button size="small" type="link" @click="handleDetail(record)" id="bulkWarehousingOrderList-detail-btn">详情</a-button>
|
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
|
- <a-button size="small" type="link" @click="handleWarehouse(record)" id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
|
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
|
- <a-button size="small" type="link" @click="handleDel(record)" id="bulkWarehousingOrderList-del-btn">删除</a-button>
|
|
|
|
|
|
+ <a-button size="small" type="primary" @click="handleEdit(record)" class="button-info" id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
|
|
|
|
+ <a-button size="small" type="primary" @click="handleDetail(record)" class="button-success" id="bulkWarehousingOrderList-detail-btn">详情</a-button>
|
|
|
|
+ <a-button size="small" type="primary" @click="handleWarehouse(record)" class="button-warning" id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
|
|
|
|
+ <a-button size="small" type="primary" @click="handleDel(record)" class="button-error" id="bulkWarehousingOrderList-del-btn">删除</a-button>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 选择基本信息弹框 -->
|
|
<!-- 选择基本信息弹框 -->
|
|
@@ -119,7 +114,8 @@
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
-import { sparePartsPurList } from '@/api/sparePartsPur'
|
|
|
|
|
|
+import { sparePartsPurList, sparePartsPurCount } from '@/api/sparePartsPur'
|
|
|
|
+import { supplierAllList } from '@/api/supplier'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, basicInfoModal },
|
|
components: { STable, VSelect, basicInfoModal },
|
|
data () {
|
|
data () {
|
|
@@ -140,20 +136,19 @@ export default {
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '散件单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
|
|
|
|
|
|
+ { title: '散件单号', dataIndex: 'sparePartsPurchaseNo', width: 200, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
- { title: '供应商', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总数量', dataIndex: 'totalQty', width: 100, 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: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 110, align: 'center' },
|
|
|
|
- { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 220, align: 'center', fixed: 'right' }
|
|
|
|
|
|
+ { 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 : '--') } },
|
|
|
|
+ { title: '总金额', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'stateDictValue', width: 110, align: 'center' },
|
|
|
|
+ { title: '财务状态', dataIndex: 'settleStateDictValue', width: 110, align: 'center' },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 250, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- this.queryParam = {}
|
|
|
|
return sparePartsPurList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
return sparePartsPurList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
const data = res.data
|
|
const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
@@ -161,12 +156,33 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.dataTotalCount = data.count
|
|
|
|
+ this.getTotal(Object.assign(parameter, this.queryParam))
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ productTotal: { // 合计信息
|
|
|
|
+ productTotalCost: '',
|
|
|
|
+ productTotalQty: ''
|
|
|
|
+ },
|
|
|
|
+ dataTotalCount: '' // 列表数据总条数
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 合计
|
|
|
|
+ getTotal (param) {
|
|
|
|
+ sparePartsPurCount(param).then(res => {
|
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
|
+ this.productTotal = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.productTotal = {
|
|
|
|
+ // 合计信息
|
|
|
|
+ productTotalCost: '',
|
|
|
|
+ productTotalQty: ''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 新增
|
|
// 新增
|
|
handleAdd () {
|
|
handleAdd () {
|
|
this.openModal = true
|
|
this.openModal = true
|
|
@@ -241,18 +257,11 @@ export default {
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
- if (this.creatDate && this.creatDate.length > 0) {
|
|
|
|
- params.beginDate = moment(this.creatDate[0]).format('YYYY-MM-DD')
|
|
|
|
- params.endDate = moment(this.creatDate[1]).format('YYYY-MM-DD')
|
|
|
|
- } else {
|
|
|
|
- params.beginDate = ''
|
|
|
|
- params.endDate = ''
|
|
|
|
- }
|
|
|
|
this.exportLoading = true
|
|
this.exportLoading = true
|
|
- customerBundleExportDelay(params).then(res => {
|
|
|
|
- this.exportLoading = false
|
|
|
|
- this.download(res)
|
|
|
|
- })
|
|
|
|
|
|
+ // customerBundleExportDelay(params).then(res => {
|
|
|
|
+ // this.exportLoading = false
|
|
|
|
+ // this.download(res)
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
download (data) {
|
|
download (data) {
|
|
if (!data) { return }
|
|
if (!data) { return }
|
|
@@ -265,11 +274,22 @@ export default {
|
|
link.setAttribute('download', fname + '.xlsx')
|
|
link.setAttribute('download', fname + '.xlsx')
|
|
document.body.appendChild(link)
|
|
document.body.appendChild(link)
|
|
link.click()
|
|
link.click()
|
|
|
|
+ },
|
|
|
|
+ // 供应商下拉数据
|
|
|
|
+ getSupplierList () {
|
|
|
|
+ supplierAllList().then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.supplierList = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.supplierList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
next(vm => {
|
|
vm.openModal = false
|
|
vm.openModal = false
|
|
|
|
+ vm.getSupplierList()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|