|
@@ -22,7 +22,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="客户信息" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<a-form-item label="客户信息" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
- <a-input v-model.trim="searchForm.queryWord" id="purchasedSetmeal-queryWord" placeholder="请输入手机号" allowClear />
|
|
|
|
|
|
+ <a-input v-model.trim="searchForm.custMobile" id="purchasedSetmeal-custMobile" placeholder="请输入手机号" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
@@ -30,8 +30,6 @@
|
|
<a-input v-model.trim="searchForm.bundleName" id="purchasedSetmeal-bundleName" placeholder="请输入套餐名称" allowClear />
|
|
<a-input v-model.trim="searchForm.bundleName" id="purchasedSetmeal-bundleName" placeholder="请输入套餐名称" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <!-- <a-col :span="6">
|
|
|
|
- <a-form-item label="订单状态" :label-col="{ span:7 }" :wrapper-col="{ span:17}"> -->
|
|
|
|
<v-select
|
|
<v-select
|
|
v-show="false"
|
|
v-show="false"
|
|
v-model="searchForm.orderFlag"
|
|
v-model="searchForm.orderFlag"
|
|
@@ -40,8 +38,6 @@
|
|
code="PAY_STATUS"
|
|
code="PAY_STATUS"
|
|
placeholder="请选择订单状态"
|
|
placeholder="请选择订单状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
- <!-- </a-form-item>
|
|
|
|
- </a-col> -->
|
|
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="结算状态" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<a-form-item label="结算状态" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<v-select
|
|
<v-select
|
|
@@ -53,6 +49,18 @@
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :span="6">
|
|
|
|
+ <a-form-item label="销售合作商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
|
+ <a-select
|
|
|
|
+ id="purchasedSetmeal-dataSourceNo"
|
|
|
|
+ allowClear
|
|
|
|
+ option-filter-prop="children"
|
|
|
|
+ placeholder="请选择销售合作商"
|
|
|
|
+ v-model="searchForm.dataSourceNo">
|
|
|
|
+ <a-select-option v-for="(item,index) in dataSourceNoList" :key="index" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
<a-button class="handle-btn serach-btn" id="purchasedSetmeal-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
<a-button class="handle-btn serach-btn" id="purchasedSetmeal-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
<a-button class="handle-btn" type="" id="purchasedSetmeal-reset" @click="handleReset">重置</a-button>
|
|
<a-button class="handle-btn" type="" id="purchasedSetmeal-reset" @click="handleReset">重置</a-button>
|
|
@@ -92,16 +100,16 @@
|
|
</span>
|
|
</span>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 查看详情弹窗 -->
|
|
<!-- 查看详情弹窗 -->
|
|
- <setmeal-detail-modal :openModal="openDetailModal" :setmealId="detailId" @close="openDetailModal=false" />
|
|
|
|
|
|
+ <setmeal-detail-modal :openModal="openDetailModal" :setmealId="detailId" @refrresh="refrreshDetail" @close="closeModal" />
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
-import { completeDate } from '@/libs/tools.js'
|
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import SetmealDetailModal from './SetmealDetailModal.vue'
|
|
import SetmealDetailModal from './SetmealDetailModal.vue'
|
|
|
|
+import { salesChannelList } from '@/api/FinancialManagement'
|
|
import { listCustomerBundle, exportBundle, countListBundle } from '@/api/customerBundle.js'
|
|
import { listCustomerBundle, exportBundle, countListBundle } from '@/api/customerBundle.js'
|
|
export default {
|
|
export default {
|
|
name: 'PurchasedSetmeal',
|
|
name: 'PurchasedSetmeal',
|
|
@@ -114,9 +122,11 @@ export default {
|
|
endDate: null, // 结束时间
|
|
endDate: null, // 结束时间
|
|
bundleName: '', // 套餐名称
|
|
bundleName: '', // 套餐名称
|
|
number: '', // 订单号
|
|
number: '', // 订单号
|
|
- queryWord: '', // 客户信息
|
|
|
|
|
|
+ custMobile: '', // 客户信息
|
|
orderFlag: '', // 订单状态
|
|
orderFlag: '', // 订单状态
|
|
- salesChannelSettleStatus: '' // 结算状态
|
|
|
|
|
|
+ salesChannelSettleStatus: '', // 结算状态
|
|
|
|
+ dataSourceNo: undefined, // 销售合作商
|
|
|
|
+ freeChoiceFlag: 0 // 套餐传0,服务传1
|
|
},
|
|
},
|
|
loading: false, // 导出loading
|
|
loading: false, // 导出loading
|
|
orderTotal: '', // 合计开单数量
|
|
orderTotal: '', // 合计开单数量
|
|
@@ -133,6 +143,7 @@ export default {
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '订单号', dataIndex: 'number', width: 100, align: 'center' },
|
|
{ title: '订单号', dataIndex: 'number', width: 100, align: 'center' },
|
|
{ title: '下单时间', dataIndex: 'orderDate', width: 100, align: 'center' },
|
|
{ title: '下单时间', dataIndex: 'orderDate', width: 100, align: 'center' },
|
|
|
|
+ { title: '销售合作商', dataIndex: 'salesChannelName', width: 100, align: 'center' },
|
|
{ title: '套餐名称', dataIndex: 'bundleName', width: 100, align: 'center' },
|
|
{ title: '套餐名称', dataIndex: 'bundleName', width: 100, align: 'center' },
|
|
{ title: '客户信息', scopedSlots: { customRender: 'custInfo' }, width: 100, align: 'center' },
|
|
{ title: '客户信息', scopedSlots: { customRender: 'custInfo' }, width: 100, align: 'center' },
|
|
{ title: '收款金额(¥)', dataIndex: 'payedAmount', width: 80, align: 'center' },
|
|
{ title: '收款金额(¥)', dataIndex: 'payedAmount', width: 80, align: 'center' },
|
|
@@ -155,7 +166,8 @@ export default {
|
|
return res.data
|
|
return res.data
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ dataSourceNoList: [] // 销售合作商 下拉数据
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -164,6 +176,16 @@ export default {
|
|
disabledDate (date, dateStrings) {
|
|
disabledDate (date, dateStrings) {
|
|
return date && date.valueOf() > Date.now()
|
|
return date && date.valueOf() > Date.now()
|
|
},
|
|
},
|
|
|
|
+ // 获取渠道商下的合作商信息
|
|
|
|
+ getSalesChannel () {
|
|
|
|
+ salesChannelList().then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.dataSourceNoList = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.dataSourceNoList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 购买套餐
|
|
// 购买套餐
|
|
goBuy () {
|
|
goBuy () {
|
|
this.$router.push({ path: '/SetmealSales/BuySetmeal' })
|
|
this.$router.push({ path: '/SetmealSales/BuySetmeal' })
|
|
@@ -182,9 +204,11 @@ export default {
|
|
endDate: this.searchForm.endDate,
|
|
endDate: this.searchForm.endDate,
|
|
bundleName: this.searchForm.bundleName,
|
|
bundleName: this.searchForm.bundleName,
|
|
number: this.searchForm.number,
|
|
number: this.searchForm.number,
|
|
- queryWord: this.searchForm.queryWord,
|
|
|
|
|
|
+ custMobile: this.searchForm.custMobile,
|
|
orderFlag: this.searchForm.orderFlag,
|
|
orderFlag: this.searchForm.orderFlag,
|
|
- salesChannelSettleStatus: this.searchForm.salesChannelSettleStatus
|
|
|
|
|
|
+ salesChannelSettleStatus: this.searchForm.salesChannelSettleStatus,
|
|
|
|
+ dataSourceNo: this.searchForm.dataSourceNo,
|
|
|
|
+ freeChoiceFlag: 0
|
|
}
|
|
}
|
|
params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
|
|
params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
|
|
params.endDate == null ? params.endDate = getDate.getToday().endtime : null
|
|
params.endDate == null ? params.endDate = getDate.getToday().endtime : null
|
|
@@ -209,6 +233,11 @@ export default {
|
|
this.detailId = String(record.id)
|
|
this.detailId = String(record.id)
|
|
this.openDetailModal = true
|
|
this.openDetailModal = true
|
|
},
|
|
},
|
|
|
|
+ // 关闭查看详情弹框
|
|
|
|
+ closeModal () {
|
|
|
|
+ this.detailId = ''
|
|
|
|
+ this.openDetailModal = false
|
|
|
|
+ },
|
|
// 重置
|
|
// 重置
|
|
handleReset () {
|
|
handleReset () {
|
|
this.searchForm.beginDate = getDate.getToday().starttime
|
|
this.searchForm.beginDate = getDate.getToday().starttime
|
|
@@ -219,29 +248,44 @@ export default {
|
|
]
|
|
]
|
|
this.searchForm.bundleName = ''
|
|
this.searchForm.bundleName = ''
|
|
this.searchForm.number = ''
|
|
this.searchForm.number = ''
|
|
- this.searchForm.queryWord = ''
|
|
|
|
|
|
+ this.searchForm.custMobile = ''
|
|
this.searchForm.orderFlag = null
|
|
this.searchForm.orderFlag = null
|
|
this.searchForm.salesChannelSettleStatus = null
|
|
this.searchForm.salesChannelSettleStatus = null
|
|
|
|
+ this.searchForm.dataSourceNo = undefined
|
|
|
|
+ this.searchForm.freeChoiceFlag = 0
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
|
|
+ // 刷新数据
|
|
|
|
+ refrreshDetail () {
|
|
|
|
+ this.openDetailModal = false
|
|
|
|
+ this.detailId = null
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ },
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
const params = {
|
|
const params = {
|
|
- beginDate: this.searchForm.beginDate == null ? getDate.getToday().starttime : this.searchForm.beginDate,
|
|
|
|
- endDate: this.searchForm.endDate == null ? getDate.getToday().endtime : this.searchForm.endDate,
|
|
|
|
bundleName: this.searchForm.bundleName,
|
|
bundleName: this.searchForm.bundleName,
|
|
number: this.searchForm.number,
|
|
number: this.searchForm.number,
|
|
- queryWord: this.searchForm.queryWord,
|
|
|
|
|
|
+ custMobile: this.searchForm.custMobile,
|
|
orderFlag: this.searchForm.orderFlag,
|
|
orderFlag: this.searchForm.orderFlag,
|
|
- salesChannelSettleStatus: this.searchForm.salesChannelSettleStatus
|
|
|
|
|
|
+ salesChannelSettleStatus: this.searchForm.salesChannelSettleStatus,
|
|
|
|
+ dataSourceNo: this.searchForm.dataSourceNo,
|
|
|
|
+ freeChoiceFlag: 0
|
|
|
|
+ }
|
|
|
|
+ if (this.time && this.time.length) {
|
|
|
|
+ params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
|
|
|
|
+ params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
|
|
|
|
+ } else {
|
|
|
|
+ params.beginDate = ''
|
|
|
|
+ params.endDate = ''
|
|
}
|
|
}
|
|
if (!params.beginDate && !params.endDate) {
|
|
if (!params.beginDate && !params.endDate) {
|
|
this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
|
|
this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- // 判断两个时间段是否相差m个月
|
|
|
|
- if (!completeDate(params.beginDate, params.endDate, 3)) {
|
|
|
|
- this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
|
|
|
|
|
|
+ // 判断两个时间段是否相差1个月 第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
|
|
|
|
+ if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 1) {
|
|
|
|
+ this.$message.error('单次最多只能导出1个月的数据,请缩小查询区间后再进行导出!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -262,6 +306,9 @@ export default {
|
|
document.body.appendChild(link)
|
|
document.body.appendChild(link)
|
|
link.click()
|
|
link.click()
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ mounted () {
|
|
|
|
+ this.getSalesChannel()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|