Commit 85f85df6 by wangql
2 parents 5cdc1189 5006c5e9
import { http } from '@/main' import { http } from '@/main'
const path = 'org.ore.api.one.mass.' const path = 'org.ore.api.mass.'
const URL = 'rop-scrm-entmicro/router' const URL = 'rop-scrm-entmicro/router'
const customerList = params => { const customerList = params => {
params.type = 1 params.type = 1
......
...@@ -13,5 +13,14 @@ const getOrderListApi = params => { ...@@ -13,5 +13,14 @@ const getOrderListApi = params => {
sign: true sign: true
}) })
} }
export { getOrderListApi }
\ No newline at end of file \ No newline at end of file
const getOrderPageDetail=params=>{
params.method=`scrm.api.equity.merchant.order.select`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export { getOrderListApi ,getOrderPageDetail}
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
<div class="info-box"> <div class="info-box">
<div class="info-content"> <div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="选择群发账号" prop="userList"> <el-form-item prop="userList">
<label slot="label" class="required">选择群发账号</label>
<el-button size="small" @click="openMembers"> <el-button size="small" @click="openMembers">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择成员 选择成员
...@@ -76,7 +77,7 @@ ...@@ -76,7 +77,7 @@
<span>将消息发送给客户符合条件的客户</span> <span>将消息发送给客户符合条件的客户</span>
<div class="filter-number"> <div class="filter-number">
查看预计群发人数 查看预计群发人数
<span>6</span> <span>查看</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -109,7 +110,7 @@ ...@@ -109,7 +110,7 @@
</div> </div>
</div> </div>
<glsx-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible"> <glsx-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMembers ref="membersForm"></SelectMembers> <SelectMembers :selectData="selectData" ref="membersForm"></SelectMembers>
</glsx-dialog> </glsx-dialog>
</div> </div>
<div <div
...@@ -141,28 +142,12 @@ export default { ...@@ -141,28 +142,12 @@ export default {
}, },
data() { data() {
const validatorUser = (rule, value, callback) => { const validatorUser = (rule, value, callback) => {
console.log(value) console.log(value, this.basicForm.userList)
if (this.$route.params.id == -1) { const userList = this.basicForm.userList
if (this.$refs.membersForm.innerTags) this.basicForm.userList = this.$refs.membersForm.innerTags if (userList && userList.length != 0) {
if (this.basicForm.userList) { callback()
if (this.basicForm.userList.length < 2) {
callback(new Error('至少配置2个及以上成员'))
} else {
callback()
}
} else {
callback(new Error('请选择默认成员'))
}
} else { } else {
if (value) { callback(new Error('请选择默认成员'))
if (value.length < 2) {
callback(new Error('至少配置2个及以上成员'))
} else {
callback()
}
} else {
callback(new Error('请选择默认成员'))
}
} }
} }
const validatorAttachment = (rule, value, callback) => { const validatorAttachment = (rule, value, callback) => {
...@@ -223,7 +208,8 @@ export default { ...@@ -223,7 +208,8 @@ export default {
], ],
key: new Date(), key: new Date(),
dialogVisible: false, dialogVisible: false,
previewFlag: false previewFlag: false,
selectData: []
} }
}, },
// mounted() { // mounted() {
...@@ -257,29 +243,43 @@ export default { ...@@ -257,29 +243,43 @@ export default {
this.$refs.selectLabel.init() this.$refs.selectLabel.init()
}, },
handleSubmit() { handleSubmit() {
const previewList = this.$refs.welcome.previewList this.$refs.basicForm.validate(valid => {
console.log(111, previewList.length)
this.$refs.groupForm.validate(valid => {
if (valid) { if (valid) {
if (previewList.length == 0) { this.$refs.groupForm.validate(v => {
this.$set(this, 'previewFlag', true) if (v) {
return const params = {
} type: 1,
this.previewFlag = false attachmentList: this.basicForm.attachmentList,
const params = { selectType: this.basicForm.selectType,
attachmentList: previewList, sendType: this.basicForm.sendType
selectType: this.basicForm.selectType }
} params.userList = this.basicForm.userList.map(item => {
params.userList = this.basicForm.userList.map(item => { return {
return { staffId: item.staffId,
staffId: item.staffId, staffName: item.staffName
staffName: item.staffName, }
departmentName: item.departmentName, })
avatar: item.avatar, console.log(params)
delFlag: item.delFlag this.$apis.customerTransform
.insert(params)
.then(res => {
console.log(res)
if (res) {
this.$message({
type: 'success',
message: '操作成功!'
})
this.handleCancel()
}
})
.catch(err => {
this.$message({
type: 'error',
message: err.message
})
})
} }
}) })
console.log(params)
} }
}) })
} }
...@@ -330,6 +330,7 @@ export default { ...@@ -330,6 +330,7 @@ export default {
color: #333; color: #333;
span { span {
color: #5850ff; color: #5850ff;
cursor: pointer;
} }
} }
} }
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<el-form-item label="群聊名称" prop="groupName"> <el-form-item label="群聊名称" prop="groupName">
<el-input v-model="basicForm.groupName" placeholder="群发名称仅内部可见" maxlength="10"></el-input> <el-input v-model="basicForm.groupName" placeholder="群发名称仅内部可见" maxlength="10"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="选择群主" prop="userList"> <el-form-item prop="userList">
<label slot="label" class="required">选择群主</label>
<el-button size="small" @click="openMembers"> <el-button size="small" @click="openMembers">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
全部账号 全部账号
...@@ -29,7 +30,23 @@ ...@@ -29,7 +30,23 @@
<!-- 编辑入群欢迎语 --> <!-- 编辑入群欢迎语 -->
<div class="title">编辑群发内容</div> <div class="title">编辑群发内容</div>
<div> <div>
<WelcomeWords :eventBus="eventBus"></WelcomeWords> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList">
<label slot="label" class="required">入群欢迎语</label>
<WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords>
</el-form-item>
<el-form-item label="发送时间" prop="sendType">
<el-radio-group v-model="basicForm.sendType">
<el-radio :label="1">立即发送</el-radio>
<el-radio :label="2">定时发送</el-radio>
</el-radio-group>
<div v-show="basicForm.sendType == 2" class="date-picker">
<el-date-picker v-model="sendTime" size="small" type="date" placeholder="选择日期"></el-date-picker>
-
<el-time-picker v-model="sendDate" size="small" placeholder="选择时间"></el-time-picker>
</div>
</el-form-item>
</el-form>
</div> </div>
</div> </div>
<div class="preview"> <div class="preview">
...@@ -45,7 +62,7 @@ ...@@ -45,7 +62,7 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="handleNext">确定</el-button> <el-button type="primary" @click="handleSubmit">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
<glsx-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible"> <glsx-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
...@@ -66,12 +83,45 @@ export default { ...@@ -66,12 +83,45 @@ export default {
Preview Preview
}, },
data() { data() {
const validatorUser = (rule, value, callback) => {
console.log(value)
const userList = this.basicForm.userList
if (userList && userList.length != 0) {
callback()
} else {
callback(new Error('请选择默认成员'))
}
}
const validatorAttachment = (rule, value, callback) => {
const previewList = this.$refs.welcome.previewList
if (previewList.length != 0) {
this.basicForm.attachmentList = previewList
}
console.log(this.basicForm.attachmentList, '---')
if (this.basicForm.attachmentList) {
if (this.basicForm.attachmentList.length > 9) {
callback(new Error('附件不可超过9个'))
} else {
callback()
}
} else {
callback(new Error('请输入入群欢迎语'))
}
}
return { return {
eventBus: new Vue(), eventBus: new Vue(),
basicForm: {}, basicForm: {},
basicRules: { basicRules: {
name: [{ required: true, message: '请输入组名', trigger: 'blur' }], userList: [
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }] // { required: true, message: '请选择群发账号', trigger: 'blur' },
{ validator: validatorUser, trigger: 'change' }
],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }],
attachmentList: [
// { required: true, message: '请输入入群欢迎语' },
{ validator: validatorAttachment, trigger: 'change' }
],
sendType: [{ required: true, message: '请选择发送时间', trigger: 'change' }]
}, },
membersVisible: false, membersVisible: false,
key: new Date() key: new Date()
...@@ -101,6 +151,45 @@ export default { ...@@ -101,6 +151,45 @@ export default {
this.$refs.membersForm.remove(val) this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags) this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.key = new Date() this.key = new Date()
},
handleSubmit() {
this.$refs.basicForm.validate(valid => {
if (valid) {
this.$refs.groupForm.validate(v => {
const params = {
type: 2,
attachmentList: this.basicForm.attachmentList,
selectType: this.basicForm.selectType,
sendType: this.basicForm.sendType
}
params.userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName
}
})
console.log(params)
this.$apis.customerTransform
.insert(params)
.then(res => {
console.log(res)
if (res) {
this.$message({
type: 'success',
message: '操作成功!'
})
this.handleCancel()
}
})
.catch(err => {
this.$message({
type: 'error',
message: err.message
})
})
})
}
})
} }
} }
} }
...@@ -155,4 +244,13 @@ export default { ...@@ -155,4 +244,13 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
.required {
display: inline-block;
line-height: 40px;
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4 px;
}
</style> </style>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<script> <script>
export default { export default {
name: 'selectEmp', name: 'selectEmp',
props: ['selectData'],
data() { data() {
return { return {
treeHeight: 0, treeHeight: 0,
...@@ -66,6 +67,13 @@ export default { ...@@ -66,6 +67,13 @@ export default {
listDepartmentTree() { listDepartmentTree() {
this.$apis.customerTransform.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => { this.$apis.customerTransform.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => {
this.listTree = res this.listTree = res
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
console.log(this.listTree)
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
console.log(row)
this.clearSelect(row)
})
this.$nextTick(() => { this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click() document.getElementsByClassName('el-tree-node__expand-icon')[0].click()
document.getElementsByClassName('el-tree-node__content')[0].click() document.getElementsByClassName('el-tree-node__content')[0].click()
...@@ -83,6 +91,19 @@ export default { ...@@ -83,6 +91,19 @@ export default {
this.departmentId = data.id this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses this.tableEmpData = data.entmicroStaffResponses
// this.listEntmicroStaff() // this.listEntmicroStaff()
},
getEmployee(d, arr = []) {
d.forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
arr.push(j)
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
} }
// listEntmicroStaff(staffName) { // listEntmicroStaff(staffName) {
// let params = { // let params = {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div> <div>
<div class="select-sale-panel"> <div class="select-sale-panel">
<select-emp @group="handlGroup" @selectTable="selectTable" ref="selectEmpTabel"></select-emp> <select-emp :selectData="selectData" @group="handlGroup" @selectTable="selectTable" ref="selectEmpTabel"></select-emp>
<div class="popper__arrow"></div> <div class="popper__arrow"></div>
</div> </div>
</div> </div>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
import selectEmp from './selectEmp.vue' import selectEmp from './selectEmp.vue'
export default { export default {
name: 'SelectMembers', name: 'SelectMembers',
props: ['selectData'],
components: { components: {
selectEmp selectEmp
}, },
......
...@@ -20,24 +20,22 @@ ...@@ -20,24 +20,22 @@
<span class="price" v-if="ruleForm.marketPrice">¥{{ ruleForm.marketPrice }}</span> <span class="price" v-if="ruleForm.marketPrice">¥{{ ruleForm.marketPrice }}</span>
</div> </div>
<div> <div>
<span> <span>会员权益使用地址:</span>
会员权益使用地址:
</span>
<span class="address">{{ ruleForm.linkUrl }}</span> <span class="address">{{ ruleForm.linkUrl }}</span>
</div> </div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button> <el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
</div> </div>
<div class="cardDetail editForm" v-else> <div class="cardDetail editForm" v-else>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" class="demo-ruleForm" style="width:500px"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" class="demo-ruleForm" style="width: 500px">
<el-form-item label="会员卡名" prop="cardName" size="small"> <el-form-item label="会员卡名" prop="cardName" size="small">
<el-input v-model="ruleForm.cardName" size="small" placeholder="请输入会员卡名" maxlength="10"></el-input> <el-input v-model="ruleForm.cardName" size="small" placeholder="请输入会员卡名" maxlength="15"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="售价" size="small" prop="price" style="width:300px"> <el-form-item label="售价" size="small" prop="price" style="width: 300px">
<el-input v-model="ruleForm.price" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.price = oninput(ruleForm.price)"> <el-input v-model="ruleForm.price" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.price = oninput(ruleForm.price)">
<template slot="append">元</template> <template slot="append">元</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="市场价" prop="marketPrice" size="small" style="width:300px"> <el-form-item label="市场价" prop="marketPrice" size="small" style="width: 300px">
<!-- :onkeyup="(ruleForm.marketPrice = ruleForm.marketPrice.replace(/[^\-\d.]/g, ''))" --> <!-- :onkeyup="(ruleForm.marketPrice = ruleForm.marketPrice.replace(/[^\-\d.]/g, ''))" -->
<el-input v-model="ruleForm.marketPrice" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)"> <el-input v-model="ruleForm.marketPrice" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)">
<template slot="append">元</template> <template slot="append">元</template>
...@@ -52,15 +50,15 @@ ...@@ -52,15 +50,15 @@
<p class="pageTitle">会员中心</p> <p class="pageTitle">会员中心</p>
<div class="live-room container"> <div class="live-room container">
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="100px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row> <el-row>
<el-form-item size="small" label="会员用户"> <el-form-item size="small" label="会员用户">
<el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入会员用户或手机号" clearable></el-input> <el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入会员用户或手机号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="门店"> <el-form-item size="small" label="门店" style="margin-left:-10px">
<el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input> <el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="状态"> <el-form-item size="small" label="状态" style="margin-left:-10px">
<el-select size="small" v-model="searchForm.status" placeholder="请选择"> <el-select size="small" v-model="searchForm.status" placeholder="请选择">
<el-option v-for="item in memberCenterStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in memberCenterStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -71,13 +69,18 @@ ...@@ -71,13 +69,18 @@
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker> <el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float:right"> <el-form-item size="small" style="float: right">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable ref="memberCenterRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable> <GLTable ref="memberCenterRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
</span>
</GLTable>
</div> </div>
<glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<el-scrollbar> <el-scrollbar>
...@@ -168,7 +171,9 @@ export default { ...@@ -168,7 +171,9 @@ export default {
{ {
label: '会员用户', label: '会员用户',
prop: 'accountName', prop: 'accountName',
width: '180' width: '180',
addHtml: 'accountName'
// formatter: cellValue => { // formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime // return cellValue.startTime + '-' + cellValue.endTime
// } // }
...@@ -261,7 +266,9 @@ export default { ...@@ -261,7 +266,9 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if (Number(value) >= 99999) {
return (str = 99999)
}
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) { if (str_.indexOf('.') != -1) {
...@@ -447,6 +454,9 @@ export default { ...@@ -447,6 +454,9 @@ export default {
.el-range-editor--small.el-input__inner { .el-range-editor--small.el-input__inner {
width: 215px; width: 215px;
} }
/deep/.el-input--small .el-input__inner{
width: 215px;
}
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header .el-dialog__title {
font-size: 16px; font-size: 16px;
color: #000; color: #000;
...@@ -457,10 +467,10 @@ export default { ...@@ -457,10 +467,10 @@ export default {
// ::v-deep .el-dialog__body { // ::v-deep .el-dialog__body {
// border-top: 1px solid #e6e6e6; // border-top: 1px solid #e6e6e6;
// border-bottom: 1px solid #e6e6e6; // border-bottom: 1px solid #e6e6e6;
// padding: 20px 25px; // padding: 20px 25px;
// } // }
/deep/.el-dialog__body { /deep/.el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 45px; padding: 20px 45px;
.modal-body { .modal-body {
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div class="live-room"> <div class="live-room">
<div class="live-room container"> <div class="live-room container">
<div class="flex"> <div class="flex">
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="100px" label-position="right"> <el-form :inline="true" style="width:100%" :model="searchForm" label-width="70px" label-position="left">
<el-row> <el-row>
<el-form-item size="small" label="订单编号"> <el-form-item size="small" label="订单编号">
<el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input> <el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="名称"> <el-form-item size="small" label="名称" style="margin-left:20px">
<el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input> <el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="类型"> <el-form-item size="small" label="类型" style="margin-left:-10px">
<el-select size="small" v-model="searchForm.orderType" placeholder="请选择"> <el-select size="small" v-model="searchForm.orderType" placeholder="请选择">
<el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<el-form-item size="small" label="用户信息"> <el-form-item size="small" label="用户信息">
<el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入用户名或手机号" clearable></el-input> <el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入用户名或手机号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="下单时间"> <el-form-item size="small" label="下单时间" style="margin-left:20px">
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker> <el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item> </el-form-item>
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
</el-form> </el-form>
</div> </div>
<GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</span> </span>
...@@ -128,7 +125,7 @@ export default { ...@@ -128,7 +125,7 @@ export default {
{ {
label: '订单号', label: '订单号',
prop: 'orderCode', prop: 'orderCode',
line: 1
} }
] ]
}, },
...@@ -175,6 +172,9 @@ export default { ...@@ -175,6 +172,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{
width: 215px;
}
.el-range-editor.is-active, .el-range-editor.is-active,
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: #5850ff; border-color: #5850ff;
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<div class="topMsg"> <div class="topMsg">
<div class="orderNo">订单编号:{{ detail.orderCode }}</div> <div class="orderNo">订单编号:{{ detail.orderCode }}</div>
<div class="orderTime">下单时间:{{ detail.createDate }}</div> <div class="orderTime">下单时间:{{ detail.createDate }}</div>
<el-button type="primary" size="small" class="backBtn" @click="goBack"> <el-button type="primary" size="small" class="backBtn" @click="goBack">返回</el-button>
返回
</el-button>
</div> </div>
<div class="midMsgWrap"> <div class="midMsgWrap">
<div class="midMsgTitle"> <div class="midMsgTitle">
...@@ -33,6 +31,7 @@ ...@@ -33,6 +31,7 @@
<!-- <div>8/12次</div> <!-- <div>8/12次</div>
<div>0/1次</div> <div>0/1次</div>
<div>0/3次</div> --> <div>0/3次</div> -->
<!-- detail.list从上一个页面那list有可能为空 -->
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceAmount }}/{{ item.serviceCount }}次</div> <div v-for="(item, index) in detail.list" :key="index">{{ item.serviceAmount }}/{{ item.serviceCount }}次</div>
</div> </div>
</div> </div>
...@@ -60,7 +59,7 @@ ...@@ -60,7 +59,7 @@
<el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column> <el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column>
<el-table-column prop="realPayPrice" label="实收金额" align="center"> <el-table-column prop="realPayPrice" label="实收金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color:#EB4E4E">{{ scope.row.realPayPrice }}</span> <span style="color: #eb4e4e">{{ scope.row.realPayPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center"> <el-table-column prop="orderStatus" label="状态" align="center">
...@@ -75,15 +74,18 @@ ...@@ -75,15 +74,18 @@
</template> </template>
<script> <script>
import { getOrderPageDetail } from '@/api/modules/order'
export default { export default {
data() { data() {
return { return {
tableData: [{}], tableData: [{}],
detail: this.$route.query.detail detail: {}, //this.$route.query.detail,
mylist: []
} }
}, },
created() { created() {
this.setTableData() this.getOrderPageDetail()
// this.setTableData()
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -93,17 +95,36 @@ export default { ...@@ -93,17 +95,36 @@ export default {
}) })
}, },
methods: { methods: {
setTableData() { getOrderPageDetail() {
this.$set(this.tableData[0], 'couponList', this.detail.couponList) getOrderPageDetail({ id: this.$route.query.id }).then(res => {
this.$set(this.tableData[0], 'orderType', this.detail.orderType) // this.mylist=res.list
this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum) if (res.code == '0') {
this.$set(this.tableData[0], 'originalPrice', this.detail.originalPrice) this.detail = res.data
this.$set(this.tableData[0], 'amount', 1) this.$set(this.tableData[0], 'couponList', this.detail.couponList)
this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice) this.$set(this.tableData[0], 'orderType', this.detail.orderType)
this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice) this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum)
this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus) this.$set(this.tableData[0], 'originalPrice', this.detail.originalPrice)
console.log(this.tableData[0], '表格数据') this.$set(this.tableData[0], 'amount', 1)
this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
} else {
this.$message.error(`${res.message}`)
}
})
}, },
// setTableData() {
// this.$set(this.tableData[0], 'couponList', this.detail.couponList)
// this.$set(this.tableData[0], 'orderType', this.detail.orderType)
// this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum)
// this.$set(this.tableData[0], 'originalPrice', this.detail.originalPrice)
// this.$set(this.tableData[0], 'amount', 1)
// this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
// this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
// this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
// console.log(this.tableData[0], '表格数据')
// },
goBack() { goBack() {
console.log(this.detail, 'gggg') console.log(this.detail, 'gggg')
this.$router.go(-1) this.$router.go(-1)
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增直播</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增直播</el-button>
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="100px" label-position="right"> <el-form :inline="true" style="width:100%" :model="searchForm" label-width="85px" label-position="right">
<el-row> <el-row>
<!-- <el-col :span="6"></el-col> --> <!-- <el-col :span="6"></el-col> -->
<el-form-item size="small" label="服务名称"> <el-form-item size="small" label="服务名称">
<el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input> <el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="核销用户"> <el-form-item size="small" label="核销用户" style="margin-left:-10px">
<el-input :size="size" v-model="searchForm.userReq" placeholder="请输入核销用户" clearable></el-input> <el-input :size="size" v-model="searchForm.userReq" placeholder="请输入核销用户" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="核销员"> <el-form-item size="small" label="核销员">
...@@ -94,6 +94,11 @@ export default { ...@@ -94,6 +94,11 @@ export default {
line: 1 line: 1
}, },
{ {
label: '核销用户',
prop: 'userName',
line: 1
},
{
label: '核销员', label: '核销员',
prop: 'verificationOperator' prop: 'verificationOperator'
}, },
...@@ -198,6 +203,9 @@ export default { ...@@ -198,6 +203,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{
width: 215px;
}
.el-range-editor.is-active, .el-range-editor.is-active,
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: #5850ff; border-color: #5850ff;
......
...@@ -254,4 +254,8 @@ export default { ...@@ -254,4 +254,8 @@ export default {
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{
width: 215px;
}
</style>
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
领取后 领取后
<el-input <el-input
v-model="effectiveDays" v-model="effectiveDays"
maxlength="4"
@input=" @input="
val => { val => {
effectiveDays = val.replace(/[^\d]/g, '') effectiveDays = val.replace(/[^\d]/g, '')
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
有效期内每 有效期内每
<el-input <el-input
v-model="limitDays" v-model="limitDays"
maxlength="4"
@input=" @input="
val => { val => {
limitDays = val.replace(/[^\d]/g, '') limitDays = val.replace(/[^\d]/g, '')
...@@ -74,17 +76,17 @@ ...@@ -74,17 +76,17 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item size="small" label="会员价" prop="vipPrice" style="width: 315px"> <el-form-item size="small" label="会员价" prop="vipPrice" style="width: 315px">
<el-input size="small" :disabled="disabledContent" v-model="ruleForm.vipPrice" placeholder="请输入" @keyup.native="ruleForm.vipPrice = oninput(ruleForm.vipPrice)"> <el-input size="small" :disabled="disabledContent" maxlength="9" v-model="ruleForm.vipPrice" placeholder="请输入" @keyup.native="ruleForm.vipPrice = oninput(ruleForm.vipPrice)">
<template slot="append">元</template> <template slot="append">元</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="门店价" prop="shopPrice" style="width: 315px"> <el-form-item size="small" label="门店价" prop="shopPrice" style="width: 315px">
<el-input size="small" :disabled="disabledContent" v-model="ruleForm.shopPrice" placeholder="请输入" @keyup.native="ruleForm.shopPrice = oninput(ruleForm.shopPrice)"> <el-input size="small" :disabled="disabledContent" maxlength="9" v-model="ruleForm.shopPrice" placeholder="请输入" @keyup.native="ruleForm.shopPrice = oninput(ruleForm.shopPrice)">
<template slot="append">元</template> <template slot="append">元</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="库存" prop="stock" style="width: 315px"> <el-form-item size="small" label="库存" prop="stock" style="width: 315px">
<el-input size="small" :disabled="title == '查看'" v-model.number="ruleForm.stock" placeholder="请输入"></el-input> <el-input size="small" :disabled="title == '查看'" maxlength="6" v-model.number="ruleForm.stock" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="使用说明" prop="useDescription" style="width: 670px"> <el-form-item size="small" label="使用说明" prop="useDescription" style="width: 670px">
<el-input size="small" :rows="6" :disabled="title == '查看'" type="textarea" v-model="ruleForm.useDescription" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" :disabled="title == '查看'" type="textarea" v-model="ruleForm.useDescription" placeholder="请输入" maxlength="200" show-word-limit></el-input>
...@@ -97,10 +99,9 @@ ...@@ -97,10 +99,9 @@
<span class="effectiveRange">{{ limitText }}</span> <span class="effectiveRange">{{ limitText }}</span>
<span class="timeRange">{{ effectiveRangeText }}</span> <span class="timeRange">{{ effectiveRangeText }}</span>
<div class="grayLine"></div> <div class="grayLine"></div>
<div class="desc">使用说明:</div> <div class="desc">使用说明:</div>
<span class="detailDesc">{{ ruleForm.useDescription }}</span> <span class="detailDesc">{{ ruleForm.useDescription }}</span>
</div> </div>
</div> </div>
</div> </div>
<div <div
...@@ -379,7 +380,9 @@ export default { ...@@ -379,7 +380,9 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if (Number(value) >= 999999999) {
return (str = 999999999)
}
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) { if (str_.indexOf('.') != -1) {
......
...@@ -339,7 +339,9 @@ export default { ...@@ -339,7 +339,9 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if(Number(value)>=99999){
return str=99999
}
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) { if (str_.indexOf('.') != -1) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!