|
@@ -1,102 +1,102 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <!-- 搜索条件 -->
|
|
|
- <a-card size="small" :bordered="false" class="searchBoxNormal">
|
|
|
- <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
- <a-form-model
|
|
|
- id="salesOrderWarehouseList-form"
|
|
|
- ref="ruleForm"
|
|
|
- class="form-model-con"
|
|
|
- layout="inline"
|
|
|
- :rules="rules"
|
|
|
- :model="queryParam"
|
|
|
- @keyup.enter.native="handleSearch">
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="创建时间" prop="time">
|
|
|
- <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="客户名称">
|
|
|
- <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesManagementList-buyerName" @change="custChange" />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="销售单号">
|
|
|
- <a-input id="salesOrderWarehouseList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="业务状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.billStatus"
|
|
|
- ref="billStatus"
|
|
|
- id="salesManagementList-billStatus"
|
|
|
- code="SALES_BILL_STATUS"
|
|
|
- placeholder="请选择业务状态"
|
|
|
- allowClear></v-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
|
|
|
- <Area id="salesOrderWarehouseList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24" v-show="isShowWarehouse">
|
|
|
- <a-form-model-item label="出库仓库">
|
|
|
- <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesOrderWarehouseList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesOrderWarehouseList-reset">重置</a-button>
|
|
|
- <a-button
|
|
|
- style="margin-left: 10px"
|
|
|
- type="primary"
|
|
|
- class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
- :disabled="disabled"
|
|
|
- :loading="exportLoading"
|
|
|
- v-if="$hasPermissions('B_salesOrderWarehouseExport')"
|
|
|
- >导出</a-button>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form-model>
|
|
|
- </div>
|
|
|
- </a-card>
|
|
|
-
|
|
|
- <a-card size="small" :bordered="false" class="salesOrderWarehouseList-wrap">
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
- <div class="tongji-bar" style="margin-bottom:10px">
|
|
|
- <!-- 总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>; -->
|
|
|
- 总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <a-card size="small" :bordered="false" class="searchBoxNormal">
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
+ <a-form-model
|
|
|
+ id="salesOrderWarehouseList-form"
|
|
|
+ ref="ruleForm"
|
|
|
+ class="form-model-con"
|
|
|
+ layout="inline"
|
|
|
+ :rules="rules"
|
|
|
+ :model="queryParam"
|
|
|
+ @keyup.enter.native="handleSearch">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="创建时间" prop="time">
|
|
|
+ <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="客户名称">
|
|
|
+ <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesManagementList-buyerName" @change="custChange" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="销售单号">
|
|
|
+ <a-input id="salesOrderWarehouseList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="业务状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.billStatus"
|
|
|
+ ref="billStatus"
|
|
|
+ id="salesManagementList-billStatus"
|
|
|
+ code="SALES_BILL_STATUS"
|
|
|
+ placeholder="请选择业务状态"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
|
|
|
+ <Area id="salesOrderWarehouseList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24" v-show="isShowWarehouse">
|
|
|
+ <a-form-model-item label="出库仓库">
|
|
|
+ <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesOrderWarehouseList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesOrderWarehouseList-reset">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ v-if="$hasPermissions('B_salesOrderWarehouseExport')"
|
|
|
+ >导出</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form-model>
|
|
|
</div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
- ref="table"
|
|
|
- :style="{ height: tableHeight+68+'px' }"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.no"
|
|
|
- rowKeyName="no"
|
|
|
- :columns="columns"
|
|
|
- :pageSize="30"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y: tableHeight }"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
- <!-- 单号 -->
|
|
|
- <template slot="stockOutNo" slot-scope="text, record" v-if="$hasPermissions('B_salesOrderWarehouseDetail')">
|
|
|
- <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
- <a-badge count="促" v-if="record.promoFlag==1" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-spin>
|
|
|
- <!-- 导出提示框 -->
|
|
|
- <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
- </a-card>
|
|
|
- </div>
|
|
|
+ </a-card>
|
|
|
+
|
|
|
+ <a-card size="small" :bordered="false" class="salesOrderWarehouseList-wrap">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <div class="tongji-bar" style="margin-bottom:10px">
|
|
|
+ <!-- 总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>; -->
|
|
|
+ 总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ :style="{ height: tableHeight+68+'px' }"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.no"
|
|
|
+ rowKeyName="no"
|
|
|
+ :columns="columns"
|
|
|
+ :pageSize="30"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 单号 -->
|
|
|
+ <template slot="stockOutNo" slot-scope="text, record" v-if="$hasPermissions('B_salesOrderWarehouseDetail')">
|
|
|
+ <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
+ <a-badge count="促" v-if="record.promoFlag==1" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ <!-- 导出提示框 -->
|
|
|
+ <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -124,19 +124,20 @@ export default {
|
|
|
moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
],
|
|
|
- beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime, // 开始时间
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
buyerSn: '', // 客户名称
|
|
|
billStatus: 'WAIT_AUDIT', // 业务状态
|
|
|
salesBillNo: '', // 销售单号
|
|
|
- shippingAddrProvinceSn: undefined,
|
|
|
- warehouseSn: undefined
|
|
|
+ shippingAddrProvinceSn: undefined, // 地址sn
|
|
|
+ warehouseSn: undefined // 仓库sn
|
|
|
},
|
|
|
- exportLoading: false,
|
|
|
+ exportLoading: false, // 导出loading
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
loading: false,
|
|
|
- totalData: null,
|
|
|
- showExport: false,
|
|
|
+ totalData: null, // 统计信息
|
|
|
+ showExport: false, // 导出提示框
|
|
|
+ // 校验规则
|
|
|
rules: {
|
|
|
'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
|
|
|
},
|
|
@@ -173,9 +174,10 @@ export default {
|
|
|
{ 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 })
|
|
|
- }
|
|
|
+ // 如果显示仓库
|
|
|
+ if (this.isShowWarehouse) {
|
|
|
+ arr.splice(5, 0, { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
|
|
|
+ }
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
@@ -192,6 +194,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 选择客户
|
|
|
custChange (val) {
|
|
|
this.queryParam.buyerSn = val.key
|
|
|
},
|
|
@@ -216,7 +219,7 @@ export default {
|
|
|
_this.showExport = true
|
|
|
})
|
|
|
},
|
|
|
- // 时间 change
|
|
|
+ // 选择时间 change
|
|
|
dateChange (date) {
|
|
|
if (date[0] && date[1]) {
|
|
|
this.queryParam.time = date
|
|
@@ -243,10 +246,11 @@ export default {
|
|
|
this.queryParam.warehouseSn = undefined
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- // 详情
|
|
|
+ // 打开详情页面
|
|
|
handleDetail (row) {
|
|
|
this.$router.push({ path: `/salesManagement/salesOrderWarehouse/detail/${row.salesBillSn}/${row.warehouseSn}` })
|
|
|
},
|
|
|
+ // 初始化
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|