Commit 596cc1e0 by xuyl

更新mixin文件,使用另外接口请求

1 parent 571a9396
import request from './request'
import Vue from 'vue'
const path = 'merchants.api.'
const addNamelistApi = {
// 根据商户名称和渠道类型查询商户列表
getMerchantsList(data = {}) {
data.method = 'merchants.api.open.findMerchantList'
return request(
data,
'merchants.api.open.findMerchantList',
[],
Vue.prototype.otherUrl
)
}
}
export { addNamelistApi }
export const nearlyAMonth = {
data(){
return{
defalutStartTime:'',
defalutEndTime:''
}
},
created() {
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
let aheadOfMonth = month == '12' ? '1' : month - 1
this.defalutStartTime = year + '-' + aheadOfMonth + '-' + day
this.defalutEndTime = year + '-' + month + '-' + day
}
}
import App from './index'
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
import Vue from 'vue'
base.getConfig().then(data => {
const { vue, config } = data
Vue.prototype.otherUrl = config.axios.otherURL
vue.use(GlsxVueCommon, config)
base.render(App)
})
......@@ -22,30 +22,26 @@
></el-input>
</el-form-item>
<el-form-item label='所属业务场景'>
<el-select v-model='profitSearchForm.businessScene' placeholder='请选择状态'>
<el-select v-model='profitSearchForm.businessScene' placeholder='所属业务场景'>
<el-option label='全部' value=''></el-option>
<el-option label='未同步' value='0'></el-option>
<!-- <el-option label="同步中" value="1"></el-option> -->
<el-option label='已同步' value='2'></el-option>
<el-option label='同步失败' value='3'></el-option>
</el-select>
</el-form-item>
<el-form-item label='所属商户:'>
<el-input
clearable
v-model='profitSearchForm.merchantName'
placeholder='请输入员工手机号'
placeholder='请输入所属商户'
></el-input>
</el-form-item>
<el-form-item label='所属活动/产品:'>
<el-input
clearable
v-model='profitSearchForm.activityName'
placeholder='请输入员工手机号'
placeholder='请输入所属活动/产品'
></el-input>
</el-form-item>
<el-form-item label='发放渠道:'>
<el-select v-model='profitSearchForm.channel' placeholder='请选择状态'>
<el-select v-model='profitSearchForm.channel' placeholder='请选择发放渠道'>
<el-option label='全部' value=''></el-option>
<el-option label='广联' value='0'></el-option>
<el-option label='服务商' value='2'></el-option>
......@@ -53,12 +49,11 @@
</el-select>
</el-form-item>
<el-form-item label='关联任务:'>
<el-select v-model='profitSearchForm.missionName' placeholder='请选择状态'>
<el-option label='全部' value=''></el-option>
<el-option label='未同步' value='0'></el-option>
<el-option label='已同步' value='2'></el-option>
<el-option label='同步失败' value='3'></el-option>
</el-select>
<el-input
clearable
v-model='profitSearchForm.activityName'
placeholder='请输入关联任务'
></el-input>
</el-form-item>
<el-form-item label='奖励时间'>
<el-date-picker
......@@ -81,11 +76,13 @@
</template>
<script>
import { nearlyAMonth } from '@/mixin/nearlyAMonth'
export default {
name: 'ProfitSearch',
mixins:[nearlyAMonth],
data() {
return {
profitSearchForm: {}
profitSearchForm: {},
}
},
methods: {
......@@ -94,16 +91,20 @@ export default {
this.profitSearchForm.rewardBeginTime = this.profitSearchForm.rewardTime[0]
this.profitSearchForm.rewardEndTime = this.profitSearchForm.rewardTime[1]
}
this.$emit('sendSearchForm',this.profitSearchForm)
this.$emit('sendSearchForm', this.profitSearchForm)
},
reset() {
Object.keys(this.profitSearchForm).forEach((key) => {
this.profitSearchForm[key] = ''
})
this.$set(this.profitSearchForm, 'rewardTime', [this.defalutStartTime, this.defalutEndTime])
this.$nextTick(() => {
this.handleSearch()
})
}
},
created() {
this.$set(this.profitSearchForm, 'rewardTime', [this.defalutStartTime, this.defalutEndTime])
}
}
</script>
......
......@@ -97,7 +97,7 @@ export default {
this.profitSearchForm = val
this.$refs.withdrawalTable.refreshTable()
}
}
},
}
</script>
......
......@@ -64,13 +64,18 @@
</template>
<script>
import { nearlyAMonth } from '@/mixin/nearlyAMonth'
export default {
name: 'WithdrawalSearch',
mixins:[nearlyAMonth],
data() {
return {
withdrawalSearchForm: {}
}
},
created() {
this.$set(this.withdrawalSearchForm,'withdrawalTime',[this.defalutStartTime,this.defalutEndTime])
},
methods: {
handleSearch() {
if (this.withdrawalSearchForm && this.withdrawalSearchForm.withdrawalTime) {
......@@ -87,6 +92,7 @@ export default {
Object.keys(this.withdrawalSearchForm).forEach((key) => {
this.withdrawalSearchForm[key] = ''
})
this.$set(this.withdrawalSearchForm,'withdrawalTime',[this.defalutStartTime,this.defalutEndTime])
this.$nextTick(() => {
this.handleSearch()
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!