|
@@ -2,7 +2,7 @@
|
|
|
<a-card :bordered="false">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
- <a-form-model layout="inline" @keyup.enter.native="refresh">
|
|
|
+ <a-form-model ref="queryForm" :model="queryParam" layout="inline" @keyup.enter.native="refresh">
|
|
|
<a-row :gutter="48">
|
|
|
<a-col :lg="8" :sm="12">
|
|
|
<a-form-model-item label="绑定时间" :label-col="{ span:4 }" :wrapper-col="{ span:16}">
|
|
@@ -11,29 +11,28 @@
|
|
|
:disabledDate="disabledDate"
|
|
|
style="width: 100%;"
|
|
|
v-model="queryOrderDate"
|
|
|
- :show-time="{ format: 'HH:mm' }"
|
|
|
- format="YYYY-MM-DD HH:mm"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
- <a-form-model-item prop="channeName" label="供应商名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
|
|
|
+ <a-form-model-item prop="supplierName" label="供应商名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
|
|
|
<a-select
|
|
|
- id="storeBindList-channeName"
|
|
|
+ id="storeBindList-supplierName"
|
|
|
show-search
|
|
|
allowClear
|
|
|
placeholder="请输入供应商名称"
|
|
|
option-filter-prop="children"
|
|
|
- v-model="queryParam.channeName"
|
|
|
+ v-model="queryParam.supplierName"
|
|
|
>
|
|
|
- <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
|
|
|
+ <a-select-option v-for="item in supplierList" :key="item.id" :value="item.id">
|
|
|
{{ item.name }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :lg="6" :sm="12">
|
|
|
- <a-form-model-item prop="channeName" label="门店名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
|
|
|
+ <a-form-model-item prop="storeName" label="门店名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
|
|
|
<a-select
|
|
|
id="storeBindList-storeName"
|
|
|
show-search
|
|
@@ -70,8 +69,8 @@
|
|
|
:data="loadData">
|
|
|
</s-table>
|
|
|
</div>
|
|
|
- <!-- 申请提现弹窗 -->
|
|
|
- <store-bind-modal :openStoreBindModal="openStoreBindModal" @close="openStoreBindModal=false" @refresh="refresh"></store-bind-modal>
|
|
|
+ <!-- 绑定弹窗 -->
|
|
|
+ <store-bind-modal :openStoreBindModal="openStoreBindModal" :supplierList="supplierList" :storeList="storeList" @close="openStoreBindModal=false" @refresh="refresh"></store-bind-modal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -82,12 +81,10 @@ import {
|
|
|
VSelect
|
|
|
} from '@/components'
|
|
|
import storeBindModal from './StoreBindModal.vue'
|
|
|
-import {
|
|
|
- settlementRecordsList,
|
|
|
- settlementRecordsListTotal
|
|
|
-} from '@/api/FinancialManagement'
|
|
|
+import { supplierStoreList, storeFindAll } from '@/api/storeManagement.js'
|
|
|
+import { supplierFindAll } from '@/api/supplierManagement.js'
|
|
|
export default {
|
|
|
- name: 'CashOutManagement',
|
|
|
+ name: 'StoreBindList',
|
|
|
components: {
|
|
|
VSelect,
|
|
|
STable,
|
|
@@ -95,18 +92,13 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- openStoreBindModal: false, // 是否打开申请提现弹窗
|
|
|
+ openStoreBindModal: false, // 是否打开绑定弹窗
|
|
|
queryOrderDate: undefined,
|
|
|
- storeList: [
|
|
|
- { id: 11, name: '常青二路店' },
|
|
|
- { id: 112, name: '西部大道店' },
|
|
|
- { id: 114, name: '渭滨路店' },
|
|
|
- { id: 115, name: '未央店' },
|
|
|
- { id: 116, name: '凤城八路店' }
|
|
|
- ],
|
|
|
+ supplierList: [], // 供应商列表
|
|
|
+ storeList: [], // 门店列表
|
|
|
queryParam: {
|
|
|
- storeName: undefined, // 客户名称
|
|
|
- channeName: undefined, // 供应商名称
|
|
|
+ storeName: undefined, // 门店名称
|
|
|
+ supplierName: undefined, // 供应商名称
|
|
|
beginDate: '',
|
|
|
endDate: ''
|
|
|
},
|
|
@@ -170,7 +162,7 @@ export default {
|
|
|
searchData.beginDate = ''
|
|
|
searchData.endDate = ''
|
|
|
}
|
|
|
- return settlementRecordsList(searchData).then(res => {
|
|
|
+ return supplierStoreList(searchData).then(res => {
|
|
|
const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
|
const _item = res.data.list[i]
|
|
@@ -186,44 +178,29 @@ export default {
|
|
|
disabledDate (current) {
|
|
|
return current && current > moment().endOf('day')
|
|
|
},
|
|
|
+ // 获取供应商列表
|
|
|
+ getSupplierList () {
|
|
|
+ supplierFindAll({}).then(res => {
|
|
|
+ this.supplierList = res.data || []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取门店列表
|
|
|
+ getStoreList () {
|
|
|
+ storeFindAll({}).then(res => {
|
|
|
+ this.storeList = res.data || []
|
|
|
+ })
|
|
|
+ },
|
|
|
// 查询
|
|
|
refresh () {
|
|
|
this.$refs.table.refresh(true)
|
|
|
- this.getListTotal()
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
+ this.$refs.queryForm.resetFields()
|
|
|
this.queryOrderDate = null
|
|
|
this.$refs.table.refresh(true)
|
|
|
- this.getListTotal()
|
|
|
- },
|
|
|
- // 合计
|
|
|
- getListTotal () {
|
|
|
- const params = {
|
|
|
- settleNo: this.queryParam.settleNo,
|
|
|
- beginDate: this.queryParam.beginDate,
|
|
|
- endDate: this.queryParam.endDate
|
|
|
- }
|
|
|
- if (this.queryOrderDate && this.queryOrderDate.length) {
|
|
|
- params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
|
|
|
- params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
|
|
|
- } else {
|
|
|
- params.beginDate = ''
|
|
|
- params.endDate = ''
|
|
|
- }
|
|
|
- settlementRecordsListTotal(params).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- if (res.data) {
|
|
|
- this.orderTotal = res.data.orderNum || 0
|
|
|
- this.amountTotal = res.data.amount || 0
|
|
|
- } else {
|
|
|
- this.orderTotal = 0
|
|
|
- this.amountTotal = 0
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
- // 打开提现弹窗
|
|
|
+ // 打开绑定弹窗
|
|
|
openModal () {
|
|
|
this.openStoreBindModal = true
|
|
|
}
|
|
@@ -233,6 +210,9 @@ export default {
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.queryOrderDate = null
|
|
|
+ vm.$refs.queryForm.resetFields()
|
|
|
+ vm.getSupplierList()
|
|
|
+ vm.getStoreList()
|
|
|
})
|
|
|
}
|
|
|
}
|