|
@@ -12,21 +12,21 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="客户名称">
|
|
|
- <a-input id="salesOrderWarehouseList-demanderName" v-model.trim="queryParam.demanderName" allowClear placeholder="请输入客户名称"/>
|
|
|
+ <a-input id="salesOrderWarehouseList-buyerSn" v-model.trim="queryParam.buyerSn" allowClear placeholder="请输入客户名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="销售单号">
|
|
|
- <a-input id="salesOrderWarehouseList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入销售单号"/>
|
|
|
+ <a-input id="salesOrderWarehouseList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="业务状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.state"
|
|
|
- ref="state"
|
|
|
- id="salesOrderWarehouseList-state"
|
|
|
- code="OUT_STATE"
|
|
|
+ v-model="queryParam.billStatus"
|
|
|
+ ref="billStatus"
|
|
|
+ id="salesManagementList-billStatus"
|
|
|
+ code="SALES_BILL_STATUS"
|
|
|
placeholder="请选择业务状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -59,7 +59,6 @@
|
|
|
<!-- alert -->
|
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
|
<div slot="message">
|
|
|
- 总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
|
|
|
总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
|
|
|
总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
</div>
|
|
@@ -70,8 +69,8 @@
|
|
|
ref="table"
|
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.stockOutSn"
|
|
|
- rowKeyName="stockOutSn"
|
|
|
+ :rowKey="(record) => record.salesBillNo"
|
|
|
+ rowKeyName="salesBillNo"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ y: tableHeight }"
|
|
@@ -79,7 +78,7 @@
|
|
|
bordered>
|
|
|
<!-- 单号 -->
|
|
|
<template slot="stockOutNo" slot-scope="text, record">
|
|
|
- <span class="link-bule" @click="handleDetail(record)">{{ record.stockOutNo }}</span>
|
|
|
+ <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -94,7 +93,7 @@ import getDate from '@/libs/getDate.js'
|
|
|
import Area from '@/views/common/area.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
|
-import { stockOutList } from '@/api/stockOut'
|
|
|
+import { queryPageForWarehouse, queryCountForWarehouse, exportForWarehouse } from '@/api/sales'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
export default {
|
|
|
name: 'SalesOrderWarehouseList',
|
|
@@ -111,20 +110,22 @@ export default {
|
|
|
queryParam: { // 查询条件
|
|
|
beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- demanderName: '', // 客户名称
|
|
|
- state: undefined, // 状态
|
|
|
+ buyerSn: '', // 客户名称
|
|
|
+ billStatus: undefined, // 业务状态
|
|
|
+ salesBillNo: '', // 销售单号
|
|
|
shippingAddrProvinceSn: undefined,
|
|
|
- sendFlag: undefined,
|
|
|
warehouseSn: undefined
|
|
|
},
|
|
|
exportLoading: false,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
loading: false,
|
|
|
+ totalData: null,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
+ return queryPageForWarehouse(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -132,6 +133,7 @@ export default {
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
}
|
|
|
+ this.getCount(params)
|
|
|
this.disabled = false
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -149,10 +151,10 @@ export default {
|
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '销售单号', scopedSlots: { customRender: 'stockOutNo' }, width: '10%', align: 'center' },
|
|
|
- { title: '提交时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'demanderName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '总数量', dataIndex: 'productTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '业务状态', dataIndex: 'sendFlagDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '提交时间', dataIndex: 'submitDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '总数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
]
|
|
|
if (this.isShowWarehouse) {
|
|
|
arr.splice(5, 0, { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
|
|
@@ -161,17 +163,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取总数量
|
|
|
+ getCount (params) {
|
|
|
+ queryCountForWarehouse(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.totalData = res.data
|
|
|
+ } else {
|
|
|
+ this.totalData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 导出
|
|
|
handleExport () {
|
|
|
const _this = this
|
|
|
- _this.$store.state.app.curActionPermission = 'B_sales_export'
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
- hdExportExcel(salesDetailExport, _this.queryParam, '销售明细', function () {
|
|
|
+ hdExportExcel(exportForWarehouse, _this.queryParam, '销售单仓库明细', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
- _this.showExport = true
|
|
|
- _this.$store.state.app.curActionPermission = ''
|
|
|
})
|
|
|
},
|
|
|
// 时间 change
|
|
@@ -193,7 +202,7 @@ export default {
|
|
|
},
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
- this.$router.push({ path: `/salesManagement/salesOrderWarehouse/detail/${row.allocateSn}` })
|
|
|
+ this.$router.push({ path: `/salesManagement/salesOrderWarehouse/detail/${row.salesBillSn}/${row.warehouseSn}` })
|
|
|
},
|
|
|
pageInit () {
|
|
|
const _this = this
|