Commit 5763bf79 by chenyu

update: update

parent dc7b228b
......@@ -59,6 +59,7 @@ export default {
dialogSubStoreVisible: false,
dialogImportVisible: false,
selectAll: false, // 列表全选开关
batchValue: '',
batchOpt: [
// 批处理选项
{ value: "integral", label: "调整积分", code: "memberBatchSetIntegral" },
......
<template>
<div>
<el-dialog title="批量修改服务门店" custom-class="customer-dialog" :visible.sync="visible"
:close-on-click-modal="false" @close="cancel" width="600px">
<div class="checkedCustomers">
当前选中<span class="num">
{{ selectObj.selectAll?selectObj.totalCount:selectObj.multipleList.length }} </span>位客户
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="服务门店:" prop="mainStoreId">
<el-select style="width: 382px" v-model="form.mainStoreId" filterable remote
reserve-keyword placeholder="请输入门店名称/门店code" :remote-method="getMainStoreCodeName"
popper-class="option-wrap" :loading="loading">
<el-option v-for="item in mainstoreList" :key="item.storeId" :label="item.storeName"
:value="item.storeId">
<p class="name">
{{ item.storeName }}
</p>
<p class="code">
{{ item.storeCode }}
</p>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
placeholder="请输入内容" style="width: 382px;" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { doFetch, doFetchqs } from '../../axios/api';
import url from '../../axios/url';
import { mapState } from 'vuex';
import { checkFalse, checkStatus, checkSuccess } from '../../../../static/js/checkStatus';
export default {
name: 'MainstoreDailog',
props: {
dialogVisible: {
type: Boolean,
default: false,
},
ajaxObj: {
type: Object,
default: () => {
return {
pageName: '',
};
},
},
selectObj: {
type: Object,
default: () => {
return {
totalCount: 0,
selectAll: false,
multipleList: [],
};
},
},
},
data() {
return {
visible: false,
form: {
remark: '',
optType: 1, // 1服务门店(主门店),2协管门店
mainOptType: 4, // 服务门店类型 1替换为最新协管的门店 2替换为最新协管的自营门店 3 替换为最新协管的自营/联营门店 4自定义服务门店
mainStoreId: '',
},
rules: {
mainStoreId: [
{ required: true, message: '请选择服务门店', trigger: 'change' },
],
remark: [
{ required: true, message: '请输入原因备注', trigger: 'change' },
],
},
mainstoreList: [],
loading: false,
btnLoading: false,
};
},
computed: {
...mapState([ 'showEditClique' ]),
},
watch: {
dialogVisible(n, o) {
this.visible = n;
},
},
methods: {
cancel() {
this.$refs.form.resetFields();
this.$emit('update:dialogVisible', false);
},
getMainStoreCodeName(val) {
this.loading = true;
doFetchqs(url.storeCodeName, {
searchParam: val,
flag: 1,
})
.then(res => {
if (res.data.errorCode === 0) {
this.mainstoreList = res.data.result;
} else {
checkFalse(res.data.message);
}
})
.catch(err => {
checkStatus(err);
}).finally(_ => (this.loading = false));
},
submit() {
this.$refs.form.validate(valid => {
if (valid) {
const { selectAll, multipleList } = this.selectObj;
const { memberSearchStr, pageSize, phoneNameCard, pageName } = this.ajaxObj;
this.btnLoading = true;
const memberIdsArr = [];
multipleList.forEach(item => {
memberIdsArr.push(item.memberId);
});
doFetch(url.updateStore, Object.assign({}, this.form, {
memberIds: selectAll == true ? '-1' : memberIdsArr.join(','),
isCurrent: selectAll == true ? 2 : multipleList.length == pageSize ? 1 : 0,
memberSearchParamStr: selectAll == true ? (memberSearchStr || '-1') : '',
phoneNameCard: phoneNameCard,
pageName: pageName,
}))
.then(res => {
if (res.data.errorCode === 0) {
checkSuccess();
this.$refs.form.resetFields();
this.$emit('update:dialogVisible', false);
this.$emit('successImport', res.data.result);
this.$emit('refresh');
} else {
checkFalse();
}
})
.catch(err => {
checkStatus(err);
}).finally(_ => (this.btnLoading = false));
} else {
return false;
}
});
},
},
};
</script>
<style lang="less" scoped>
.customer-dialog {
.checkedCustomers {
margin-left: 133px;
margin-bottom: 20px;
font-size: 14px;
font-weight: 400;
color: #909399;
line-height: 20px;
.num {
color: #303133;
}
}
.sub-tip {
margin: 4px 0 -5px;
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
}
}
</style>
<style lang="less">
.el-select-dropdown.option-wrap .el-select-dropdown__item {
display: flex;
flex-direction: column;
justify-content: center;
height: 57px;
}
.option-wrap {
color: #303133;
.name {
margin: 0 0 3px;
font-size: 14px;
line-height: 20px;
}
.code {
margin: 0;
font-size: 12px;
line-height: 17px;
}
}
</style>
<template>
<div>
<el-dialog title="批量修改协管门店" custom-class="customer-dialog" :visible.sync="visible"
:close-on-click-modal="false" @close="cancel" width="600px">
<div class="checkedCustomers">
当前选中<span class="num">
{{ selectObj.selectAll?selectObj.totalCount:selectObj.multipleList.length }} </span>位客户
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="133px">
<el-form-item label="协管门店:" prop="fromSubStoreIds">
<el-form-item prop="subOptType" style="margin-bottom:12px;">
<el-radio-group v-model="form.subOptType">
<el-radio :label="1">
增加
</el-radio>
<el-radio :label="2">
减少
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="fromSubStoreIds">
<el-select v-model="form.fromSubStoreIds" filterable remote multiple
class="fromSubStoreIds-select" style="width:384px;" :remote-method="getSubStoreList"
placeholder="请输入请输入门店名称/门店code" popper-class="option-wrap"
v-select-loadmore="getOnlineStore"
@visible-change="(flag) => flag ? getSubStoreList() : ''">
<el-option v-for="item in subStoreList" :key="item.storeId" :label="item.storeName"
:value="item.storeId">
<p class="name">
{{ item.storeName }}
</p>
<p class="code">
{{ item.storeCode }}
</p>
</el-option>
<el-option class="loadmore-loading" v-if="loading">
<i class="loading-icon" v-loading="true" /> 加载中...
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item label="原因备注:" prop="remark">
<el-input type="text" maxlength="20" show-word-limit v-model="form.remark"
placeholder="请输入内容" style="width: 386px;" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" :loading="btnLoading" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { doFetch, doFetchqs } from '../../axios/api';
import url from '../../axios/url';
import { mapState } from 'vuex';
import { checkFalse, checkStatus, checkSuccess } from '../../../../static/js/checkStatus';
export default {
name: 'SubstoreDialog',
props: {
dialogVisible: {
type: Boolean,
default: false,
},
ajaxObj: {
type: Object,
default: () => {
return {
pageName: '',
};
},
},
selectObj: {
type: Object,
default: () => {
return {
totalCount: 0,
selectAll: false,
multipleList: [],
};
},
},
},
data() {
return {
visible: false,
form: {
remark: '',
optType: 2, // 1服务门店(主门店),2协管门店
subOptType: 1, // 协管门店时必填 1增加,2删除
fromSubStoreIds: [], // 批量处理协管门店时使用,存放门店id,以","分割
},
rules: {
fromSubStoreIds: [
{ required: true, message: '请选择要操作的协管门店', trigger: 'change' },
],
remark: [
{ required: true, message: '请输入原因备注', trigger: 'change' },
],
},
pageParam: {
loading: false,
searchName: '',
currentPage: 1,
pageSize: 20,
totalPage: 1,
},
subStoreList: [],
btnLoading: false,
};
},
computed: {
...mapState([ 'showEditClique' ]),
},
watch: {
dialogVisible(n, o) {
this.visible = n;
},
},
methods: {
cancel() {
this.$refs.form.resetFields();
this.$emit('update:dialogVisible', false);
},
getOnlineStore() {
const { searchName, currentPage, loading, totalPage } = this.pageParam;
if (loading || currentPage >= totalPage) return;
this.pageParam.loading = true;
doFetchqs(url.getOnlineStore, {
currentPage: currentPage + 1,
pageSize: 20,
searchName: searchName,
}).then(res => {
const { errorCode, message, result } = res.data || {};
if (errorCode == 0) {
this.subStoreList = this.subStoreList.concat(result.list || []);
this.pageParam.totalPage = result.page.totalPage || 1;
this.pageParam.currentPage = currentPage + 1;
} else {
checkFalse(message);
}
}).finally(() => (this.pageParam.loading = false));
},
getSubStoreList(query) {
this.pageParam.searchName = query;
this.pageParam.currentPage = 0;
this.subStoreList = [];
this.getOnlineStore();
},
submit() {
this.$refs.form.validate(valid => {
if (valid) {
const { selectAll, multipleList } = this.selectObj;
const { memberSearchStr, pageSize, phoneNameCard, pageName } = this.ajaxObj;
this.btnLoading = true;
const memberIdsArr = [];
multipleList.forEach(item => {
memberIdsArr.push(item.memberId);
});
doFetch(url.updateStore, Object.assign({}, this.form, {
fromSubStoreIds: this.form.fromSubStoreIds.join(','),
memberIds: selectAll == true ? '-1' : memberIdsArr.join(','),
isCurrent: selectAll == true ? 2 : multipleList.length == pageSize ? 1 : 0,
memberSearchParamStr: selectAll == true ? (memberSearchStr || '-1') : '',
phoneNameCard: phoneNameCard,
pageName: pageName,
}))
.then(res => {
if (res.data.errorCode === 0) {
checkSuccess();
this.$refs.form.resetFields();
this.$emit('update:dialogVisible', false);
this.$emit('successImport', res.data.result);
this.$emit('refresh');
} else {
checkFalse();
}
})
.catch(err => {
checkStatus(err);
}).finally(_ => (this.btnLoading = false));
} else {
return false;
}
});
},
},
};
</script>
<style lang="less" scoped>
.customer-dialog {
.checkedCustomers {
margin-left: 133px;
margin-bottom: 20px;
font-size: 14px;
font-weight: 400;
color: #909399;
line-height: 20px;
.num {
color: #303133;
}
}
.sub-tip {
margin: 4px 0 -5px;
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
}
}
</style>
<style lang="less">
// 去除dailog-footer上边框
.customer-dialog .el-dialog__footer {
padding-top: 0;
padding-bottom: 20px;
border-top: none !important;
}
.customer-dialog .el-dialog__body {
padding-bottom: 0;
}
.el-select-dropdown.option-wrap .el-select-dropdown__item {
display: flex;
flex-direction: column;
justify-content: center;
height: 57px;
}
.option-wrap {
color: #303133;
.name {
margin: 0 0 3px;
font-size: 14px;
line-height: 20px;
}
.code {
margin: 0;
font-size: 12px;
line-height: 17px;
}
}
</style>
......@@ -3,6 +3,8 @@ import Navbar from "../../view/layout/components/Navbar.vue";
import { doFetch, doFetchqs } from "../../components/axios/api";
import NavPath from "@/common/navbar/navbar.vue";
import url from "../../components/axios/url";
import mainstoreDailog from "./components/mainstoreDialog.vue";
import substoreDailog from "./components/substoreDialog.vue";
import {
checkFalse,
checkStatus,
......@@ -48,6 +50,11 @@ export default {
multipleList: [],
selectAll: false,
batchValue: "",
batchOpt: [
// 批处理选项
{ value: "mainstore", label: "修改服务门店" },
{ value: "store", label: "修改协管门店" }
],
dialogIntegralVisible: false,
IntegralForm: {
editType: 1,
......@@ -95,6 +102,7 @@ export default {
mainStoreId: ""
},
storeName: "",
dialogMainstoreVisible: false,
dialogSubStoreVisible: false,
storeForm: {
remark: "",
......@@ -120,6 +128,22 @@ export default {
};
},
computed: {
selectObj: function() {
return {
selectAll: this.selectAll,
multipleList: this.multipleList,
totalCount: this.page.totalCount
};
},
ajaxObj: function() {
return {
storeId: this.storeId,
listSign: "MemberProcessed",
pageSize: this.page.pageSize,
currentPage: this.page.currentPage,
phoneNameNick: this.phoneNameNick,
pageName: this.pageName };
},
...mapState(["storeImageUrl"])
},
filters: {
......@@ -672,36 +696,43 @@ export default {
}
this.storeName = "";
},
successImport(taskId) {
// this.dialogImportVisible = false;
this.$confirm(
"任务发起成功,请去【企业管理】-【任务中心】查看处理结果和执行进度",
"任务发起成功",
{
confirmButtonText: "去任务中心",
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "import-link-confirm-content",
type: "warning"
}
)
.then(() => {
window.open(`/gic-web/#/taskDetail/${taskId}`)
this.batchRefresh()
})
.catch(() => {
this.batchRefresh()
});
},
handleVisibleBatch() {
handleFocusBatch(val) {
if (this.multipleList.length < 1) {
this.batchValue = "";
checkFalse("请勾选会员");
return false;
}
// 批量处理修改服务门店
if (this.batchValue == "mainstore") {
this.dialogMainstoreVisible = true;
if (this.$refs.mainstoreForm) {
this.$refs.mainstoreForm.resetFields();
}
this.storeName = "";
}
// 批量处理修改协管门店
if (this.batchValue == "store") {
} else if (this.batchValue == "store") {
this.dialogSubStoreVisible = true;
if (this.$refs.storeForm) {
this.$refs.storeForm.resetFields();
}
this.getSubStoreList();
}
this.batchValue = "";
},
handleFocusBatch() {
if (this.multipleList.length < 1) {
this.batchValue = "";
checkFalse("请勾选会员");
return false;
}
batchRefresh() {
this.getAjaxMembers();
},
selectAllmultipleList() {
this.selectAll = !this.selectAll;
......@@ -885,6 +916,8 @@ export default {
// console.log(this.toggleTag);
},
components: {
mainstoreDailog,
substoreDailog,
searchinput,
Navbar,
NavPath
......
......@@ -27,11 +27,11 @@
</p>
</div>
</div>
<el-table class="only-content-table" :data="group.orderItemList" show-overflow-tooltip
<el-table class="only-content-table" :data="group.orderItemList"
:span-method="(obj)=>spanMethod({...obj,length:group.orderItemList.length})">
<template v-for="colunm in tableColumnList">
<el-table-column :key="colunm" :label="colunm.label" :min-width="colunm.width"
:show-overflow-tooltip="column.tooltip" :prop="colunm.prop">
:show-overflow-tooltip="colunm.tooltip" :prop="colunm.prop">
<template slot-scope="{row}">
<template
v-if="['orderStatus','deliveryInfo','payAmount'].includes(colunm.prop)">
......@@ -65,8 +65,8 @@
</div>
</el-image>
<div class="info-detail">
<div class="good-name">{{ row.mallProName }}</div>
<div class="good-attr">{{ row.mallProSkuAttr }}</div>
<div class="good-name" :title="row.mallProName">{{ row.mallProName }}</div>
<div class="good-attr" :title="row.mallProName">{{ row.mallProSkuAttr }}</div>
</div>
</div>
<!-- 单价 -->
......@@ -161,12 +161,12 @@ export default {
search: '',
isWm:true, //当前页面是微盟
tableColumnList: [
{ label: '商品', width: '200', prop: 'mallProName', tooltop:true },
{ label: '单价', width: '80', prop: 'mallProPrice', tooltop:false },
{ label: '数量', width: '80', prop: 'mallProNumber', tooltop:false },
{ label: '订单类型', width: '80', prop: 'orderStatus', tooltop:false },
{ label: '小计(实付)', width: '80', prop: 'payAmount', tooltop:false },
{ label: '收货信息', width: '200', prop: 'deliveryInfo', tooltop:false },
{ label: '商品', width: '200', prop: 'mallProName', tooltip:false },
{ label: '单价', width: '80', prop: 'mallProPrice', tooltip:false },
{ label: '数量', width: '80', prop: 'mallProNumber', tooltip:false },
{ label: '订单类型', width: '80', prop: 'orderStatus', tooltip:false },
{ label: '小计(实付)', width: '80', prop: 'payAmount', tooltip:false },
{ label: '收货信息', width: '200', prop: 'deliveryInfo', tooltip:false },
],
orderColor:{1:'#303133',2:'#FA8C16',4:'#F5222D'},
};
......@@ -282,7 +282,7 @@ export default {
}
.only-content-table-list {
overflow-y: scroll;
height:calc(100vh - 292px);
max-height:calc(100vh - 292px);
.only-content-table {
/deep/.el-table__header-wrapper {
display: none;
......@@ -383,6 +383,9 @@ export default {
font-size: 12px;
color: #909399;
line-height: 17px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment