还款页面 修改

master
十七 4 years ago
parent e844c5fe29
commit df135edb0b

@ -1,73 +1,73 @@
export const phoneNum = /^((1)|(\\+861)|(861))[0-9]{10}$/;
export const email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
// export const http = "https://www.decaisoft.com:443/";
// export const https = "https://www.decaisoft.com:443/img";
export const http = "http://139.9.58.205:21/img/";
export const https = "http://139.9.58.205:8077/tydFile/";
var month = "";
if (new Date().getMonth() + 1 < 10) {
month = "0" + (new Date().getMonth() + 1);
} else {
month = new Date().getMonth() + 1;
dabao;
}
var day = "";
if (new Date().getDate() < 10) {
day = "0" + new Date().getDate();
} else {
day = new Date().getDate();
}
var hours = "";
if (new Date().getHours() < 10) {
hours = "0" + new Date().getHours();
} else {
hours = new Date().getHours();
}
var Min = null;
if (new Date().getMinutes() < 10) {
Min = "0" + new Date().getMinutes();
} else {
Min = new Date().getMinutes();
}
var seconds = null;
if (new Date().getSeconds() < 10) {
seconds = "0" + new Date().getSeconds();
} else {
seconds = new Date().getSeconds();
}
export const date =
new Date().getFullYear() +
"" +
month +
"" +
day +
"" +
hours +
"" +
Min +
"" +
seconds;
export const dates =
new Date().getFullYear() +
"/" +
month +
"/" +
day +
" " +
hours +
":" +
Min +
":" +
seconds;
export const dayStatisticDate =
new Date().getFullYear() + "-" + month + "-" + new Date().getDate();
export const months = new Date().getFullYear() + "-" + month + "";
export const phoneNum = /^((1)|(\\+861)|(861))[0-9]{10}$/;
export const email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
// export const http = "https://www.decaisoft.com:443/";
// export const https = "https://www.decaisoft.com:443/img";
export const http = "http://139.9.58.205:21/img/";
export const https = "http://139.9.58.205:8077/tydFile/";
var month = "";
if (new Date().getMonth() + 1 < 10) {
month = "0" + (new Date().getMonth() + 1);
} else {
month = new Date().getMonth() + 1;
dabao;
}
var day = "";
if (new Date().getDate() < 10) {
day = "0" + new Date().getDate();
} else {
day = new Date().getDate();
}
var hours = "";
if (new Date().getHours() < 10) {
hours = "0" + new Date().getHours();
} else {
hours = new Date().getHours();
}
var Min = null;
if (new Date().getMinutes() < 10) {
Min = "0" + new Date().getMinutes();
} else {
Min = new Date().getMinutes();
}
var seconds = null;
if (new Date().getSeconds() < 10) {
seconds = "0" + new Date().getSeconds();
} else {
seconds = new Date().getSeconds();
}
export const date =
new Date().getFullYear() +
"" +
month +
"" +
day +
"" +
hours +
"" +
Min +
"" +
seconds;
export const dates =
new Date().getFullYear() +
"/" +
month +
"/" +
day +
" " +
hours +
":" +
Min +
":" +
seconds;
export const dayStatisticDate =
new Date().getFullYear() + "-" + month + "-" + new Date().getDate();
export const months = new Date().getFullYear() + "-" + month + "";

@ -1107,7 +1107,7 @@ export function pageMemberClass(params) {
// 修改等级
export function editMemberClass(params) {
return service({
url: "/api" + "/demay/ssm/StoreMemberClass/update",
url: "/api" + "/demay/ssm/StoreMemberClass/updates",
method: "post",
data: params
});

@ -10,7 +10,7 @@
{{ scope.row.payNumber }}
<i class="text-cyan el-icon-edit"></i>
</div>
<el-input v-else v-focus type="number" size="samll" class="form-input-width" pattern="[0-9]" v-model="scope.row.payNumber" @blur="endCount(scope.row,scope.$index)" @change="endCount(scope.row,scope.$index)"></el-input>
<el-input v-else v-focus type="number" size="samll" class="form-input-width" pattern="[0-9]" v-model="scope.row.payNumber" @blur="endCount(scope.row,scope.$index)"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="payMoney" label="支付总额" width="90"></el-table-column>
@ -47,24 +47,25 @@ export default {
} else {
row.payNumber = 0;
}
let form = { ...row };
row.payMoney = (row.payNumber * row.price).toFixed(2) * 1;
this.list.splice(index, 1, row);
console.log(this.list);
this.proIndex = -1;
form.payMoney = (form.payNumber * form.price).toFixed(2) * 1;
this.list.splice(index, 1, form);
this.list.forEach((item) => {});
this.sumPay();
},
////
sumPay() {
let form = JSON.parse(JSON.stringify(this.form));
var courseMoney = 0;
console.log(this.list);
this.list.forEach((item) => {
courseMoney += item.payMoney;
});
this.form.courseMoney = courseMoney;
this.form.repayMoney =
(this.form.paymentMoney - courseMoney - this.form.recMoney).toFixed(2) *
1;
this.form.proList = [...this.list];
form.courseMoney = courseMoney;
form.repayMoney =
(form.paymentMoney - courseMoney - form.recMoney).toFixed(2) * 1;
form.proList = Array.from(this.list);
this.form = JSON.parse(JSON.stringify(form));
},
handleCloseCancel() {
this.form = {};
@ -84,7 +85,9 @@ export default {
},
confirm() {
this.dialogVisible = false;
this.form.proList = [...this.list];
this.form.proList = this.list;
console.log(this.list);
console.log(this.form);
this.$emit("proData", this.form);
},
getSummaries(param) {

@ -41,13 +41,12 @@ export default {
},
//>
endPayMoney(row, index) {
console.log(row.payMoney);
if (row.payMoney) {
row.payMoney = row.payMoney * 1;
let form = { ...row };
if (form.payMoney) {
form.payMoney = form.payMoney * 1;
} else {
row.payMoney = 0;
form.payMoney = 0;
}
let form = { ...row };
form.cardOver = (form.cardRestMoney - form.payMoney).toFixed(2) * 1;
this.recIndex = -1;
this.list.splice(index, 1, form);
@ -78,11 +77,13 @@ export default {
Object.assign(this.$data, this.$options.data.call(this));
this.form = { ...form };
this.list = [...form.recList];
this.dialogVisible = true;
},
confirm() {
this.dialogVisible = false;
this.form.recList = [...this.list];
this.form.recList = Array.from(this.list);
console.log(this.list);
this.$emit("recData", this.form);
},
getSummaries(param) {

@ -224,7 +224,12 @@ export default {
this.$refs.staffratio.show(row, text);
},
staffratioData(v) {
this.list.splice(v.index, 1, v);
console.log(v);
this.list.forEach((item, index) => {
if (index == v.index) {
item[text] = v.list;
}
});
},
clear(row, text) {
let form = { ...row };
@ -247,16 +252,26 @@ export default {
this.$refs.pro.show(row);
},
proData(v) {
if (v.courseMoney > 0) {
console.log(v);
let form = JSON.parse(JSON.stringify(v));
console.log(form);
this.list.splice(form.index, 1, form);
console.log(this.list);
this.sumList();
this.restList(form);
},
restList(form) {
if (form.courseMoney > 0) {
var list = [];
v.proList.forEach((item) => {
var listCopy = [];
form.proList.forEach((item) => {
item.courseConsumeCount = item.courseConsumeCount - item.payNumber;
item.courseRestCount = item.courseRestCount - item.payNumber;
list.push(item);
});
this.list.forEach((item) => {
let proList = [];
if (item.index != v.index) {
if (item.index != form.index) {
item.proList.forEach((items, indexs) => {
if (items.payNumber == 0) {
list[indexs].payNumber = 0;
@ -265,27 +280,30 @@ export default {
}
proList.push(items);
});
item.proList = proList;
}
item.proList = proList;
listCopy.push(item);
});
this.list = listCopy;
console.log(this.list);
}
this.list.splice(v.index, 1, v);
this.sumList();
},
openRec(row) {
this.$refs.rec.show(row);
},
recData(v) {
if (v.recMoney > 0) {
let form = JSON.parse(JSON.stringify(v));
console.log(form);
if (form.recMoney > 0) {
var list = [];
v.recList.forEach((item) => {
form.recList.forEach((item) => {
item.cardRestMoney = item.cardRestMoney - item.payMoney;
item.cardConsumeMoney = item.cardConsumeMoney - item.payMoney;
list.push(item);
});
this.list.forEach((item) => {
let recList = [];
if (item.index != v.index) {
if (item.index != form.index) {
item.recList.forEach((items, indexs) => {
if (items.payMoney == 0) {
list[indexs].payMoney = 0;
@ -294,11 +312,11 @@ export default {
recList.push(items);
console.log(recList);
});
item.recList = recList;
}
item.recList = recList;
});
}
this.list.splice(v.index, 1, v);
this.list.splice(form.index, 1, form);
this.sumList();
},
//
@ -322,18 +340,7 @@ export default {
delete row.adminList;
this.$refs.cancel.show(row);
},
//
staffslesData(v) {
this.list[this.rowIndex].entities = [...v];
},
//
managerData(v) {
this.list[this.rowIndex].managerList = [...v];
},
//
adminData(v) {
this.list[this.rowIndex].adminList = [...v];
},
//
show(form) {
Object.assign(this.$data, this.$options.data.call(this));

@ -998,6 +998,7 @@ export default {
// flag = false;
// }
});
if (
this.balance <=
(this.form.collectionCashAmount - sumMoney).toFixed(2) * 1 ||

@ -4,7 +4,6 @@
<div>
<el-button size="mini" type="primary" @click="add(0)"></el-button>
<selec v-if="headOffice == 1" ref="selec" @selecData="selecData"></selec>
</div>
<div>
<el-button size="mini" type="" v-if="radioRowValueList.state != undefined" @click="detail"></el-button>
@ -51,19 +50,17 @@
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="docDate" label="日期"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="memberName" label="会员名字"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="mobilePhone" label="手机号码"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="rechargeMoney" label="原账户">
<el-table-column show-overflow-tooltip align="center" min-width="80" label="原账户">
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="outRechargeTypeNum" label="帐户编码"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="outRechargeTypeName" label="帐户名称"></el-table-column>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="rechargeMoney" label="新账户">
<el-table-column show-overflow-tooltip align="center" min-width="80" label="新账户">
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="inRechargeTypeNum" label="帐户编码"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="inRechargeTypeName" label="帐户名称"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="inMoney" label="转入金额"></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="inGiftMoney" label="转入赠送"></el-table-column>
</el-table-column>
<el-table-column align="center" prop="storeName" label="所属门店" show-overflow-tooltip min-width="100"></el-table-column>
<el-table-column align="center" prop="insertName" :show-overflow-tooltip="true" label="创建人" min-width="80"></el-table-column>
<el-table-column align="center" prop="insertDate" :show-overflow-tooltip="true" label="创建时间" min-width="100"></el-table-column>
<el-table-column align="center" prop="updateBy" :show-overflow-tooltip="true" label="修改人" min-width="80"></el-table-column>
@ -78,7 +75,6 @@
<detail ref="detail" @detailData="detailData"></detail>
</div>
</template>
<script>
import edit from "./components/edit.vue";
import detail from "./components/detail.vue";
@ -93,7 +89,6 @@ export default {
data() {
return {
headOffice: sessionStorage.getItem("headOffice") * 1,
form: {}, //
listLoading: false, //list
elementLoadingText: "加载中...", //list

@ -123,12 +123,12 @@
<br>
<el-form-item label="开始日期:" required>
<div class="block form-width-m">
<el-date-picker v-model="packingForm.beginDate" value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" type="date" default-time="00:00:00" placeholder="开始日期"></el-date-picker>
<el-date-picker :picker-options="pickerOptionsStart" v-model="packingForm.beginDate" value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" type="date" default-time="00:00:00" placeholder="开始日期"></el-date-picker>
</div>
</el-form-item>
<el-form-item label="结束日期:" required>
<div class="block form-width-m">
<el-date-picker v-model="packingForm.endDate" value-format="yyyy-MM-dd 23:59:59" format="yyyy-MM-dd" default-time="23:59:59" type="date" placeholder="结束日期"></el-date-picker>
<el-date-picker :picker-options="pickerOptionsEnd" v-model="packingForm.endDate" value-format="yyyy-MM-dd 23:59:59" format="yyyy-MM-dd" default-time="23:59:59" type="date" placeholder="结束日期"></el-date-picker>
</div>
</el-form-item>
<el-form-item label="现付提成:" required>
@ -304,7 +304,7 @@
<div class="form-width-m">
<div v-if="titles=='明细'">{{packingForm.beginDate}}</div>
<div v-else class="block">
<el-date-picker v-model="packingForm.beginDate" value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" type="date" placeholder="开始日期"></el-date-picker>
<el-date-picker v-model="packingForm.beginDate" :picker-options="pickerOptionsStart" value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" type="date" placeholder="开始日期"></el-date-picker>
</div>
</div>
</el-form-item>
@ -312,7 +312,7 @@
<div class="form-width-m">
<div v-if="titles=='明细'">{{packingForm.endDate}}</div>
<div v-else class="block">
<el-date-picker v-model="packingForm.endDate" value-format="yyyy-MM-dd 23:59:59" format="yyyy-MM-dd" type="date" placeholder="结束日期"></el-date-picker>
<el-date-picker v-model="packingForm.endDate" :picker-options="pickerOptionsEnd" value-format="yyyy-MM-dd 23:59:59" format="yyyy-MM-dd" type="date" placeholder="结束日期"></el-date-picker>
</div>
</div>
</el-form-item>
@ -548,6 +548,24 @@ export default {
components: { suit, project, membersuit },
data() {
return {
pickerOptionsStart: {
disabledDate: (time) => {
time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
},
},
pickerOptionsEnd: {
disabledDate: (time) => {
let beginDateVal = this.packingForm.beginDate;
if (beginDateVal) {
return (
time.getTime() <
new Date(beginDateVal).getTime() - 1 * 60 * 60 * 1000
);
}
},
// selectableRange 0
selectableRange: "00:00:00 - 23:59:59",
},
listDialogFormVisible: false,
opneEditVipListDialog: false,

@ -195,7 +195,7 @@ export default {
form: {}, //
pickerOptionsStart: {
disabledDate: (time) => {
date.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
},
},
pickerOptionsEnd: {

@ -596,7 +596,7 @@ export default {
return {
pickerOptionsStart: {
disabledDate: (time) => {
date.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
},
},
pickerOptionsEnd: {

@ -1,185 +1,185 @@
<template>
<div class="notallote">
<hr />
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="memberNum" label="编码" min-width="80" sortable></el-table-column>
<el-table-column align="center" prop="memberName" label="姓名" min-width="100" sortable></el-table-column>
<el-table-column align="center" prop="sex" label="性别" min-width="80">
<template slot-scope="scope">{{scope.row.label==1?'男':'女'}}</template>
</el-table-column>
<el-table-column align="center" prop="label" :show-overflow-tooltip="true" label="标签" min-width="80">
<template slot-scope="scope">{{scope.row.label==null?'暂时没有标签':scope.row.label}}</template>
</el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机" min-width="150" sortable>
<template slot-scope="scope">{{scope.row.mobilePhone | phone}}</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="80" v-role='4008001'>
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="allote(scope.row,scope.$index,(visible=true))" plain>分派</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<!-- 分页组件 -->
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pageInfo.total"></el-pagination>
</div>
<!-- 分派 -->
<el-dialog :close-on-click-modal="false" v-dialogDrag title="分派" :visible.sync="visible" width="800px">
<el-form :model="allotForm" :inline="true">
<el-form-item label="会员编码:" :label-width="formLabelwidth">
<span>{{allotForm.memberNum}}</span>
</el-form-item>
<el-form-item label="会员名称:" :label-width="formLabelwidth">
<span>{{allotForm.memberName}}</span>
</el-form-item>
<el-form-item label="会员性别:" :label-width="formLabelwidth">
<span>{{allotForm.sex==1?'男':'女'}}</span>
</el-form-item>
<el-form-item label="分派人员:" :label-width="formLabelwidth">
<span>{{allotForm.allotstaff}}</span>
</el-form-item>
<div style="width:400px;margin:0px auto">
<el-table :data="staffList" style="padding-left:20px;" @current-change="changetable" @row-dblclick="confirm">
<el-table-column align="center" label="选择" width="100">
<template slot-scope="scope">
<el-radio v-model="radiotable" :label="scope.row.id" @change.native="(scope.row)"></el-radio>
</template>
</el-table-column>
<el-table-column align="center" prop="brandNumber" label="水牌号" width="80"></el-table-column>
<el-table-column align="center" prop="staffName" label="名字" min-width="100"></el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<!-- 分页组件 -->
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="visible = false"> </el-button>
<el-button size="mini" type="primary" @click="confirm(visible=false)"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { staffPage, pageassign, storeMemberassign } from "@/api/storeManage.js";
export default {
data() {
return {
visible: false, //
pageNum: 1, //
pageSize: 10, // ,
input: "", //
radiotable: "", //
allotstaffList: "", //
formLabelwidth: "130px", //
list: [], //
allotForm: {}, //
pageInfo: {
total: 0, //
tableList: [],
},
total: 0, //
queryForm: {
//
pageNum: 1,
pageSize: 10,
},
staffList: [], //
};
},
methods: {
//
allote(row, index) {
this.allotForm = { ...row };
staffPage({ state: 1 }).then((res) => {
this.staffList = res.pageInfo.list;
});
},
//
changetable(row) {
this.radiotable = row.id;
this.allotstaffList = row;
},
// assignState1
//
confirm() {
var allotForm = {
id: this.allotForm.id,
staffId: this.allotstaffList.id,
staffName: this.allotstaffList.staffName,
};
storeMemberassign(allotForm).then((res) => {
//console.log(res);
if (res.code == "000000") {
if (this.radiotable !== "") {
this.$message({
type: "success",
message: "已成功分派!",
});
this.visible = false;
} else {
this.$message({
type: "error",
message: "请选择分派人员!",
});
}
this.getData();
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
handleSizeChange(val) {
// //console.log(` ${val} `);
this.queryForm.pageSize = val;
this.getData();
},
handleCurrentChange(val) {
// //console.log(`: ${val}`);
this.queryForm.pageNum = val;
this.getData();
},
//
async getData() {
pageassign(this.queryForm).then((res) => {
if (res.code == "000000") {
this.list = res.pageInfo.list;
this.total = res.pageInfo.total;
}
});
},
//
show(form) {
if (form) {
this.queryForm = Object.assign(form, this.queryForm);
}
this.queryForm.assignState = 0;
this.queryForm.storeId = JSON.parse(
sessionStorage.getItem("storeInfo")
).id;
this.getData();
},
},
};
</script>
<style >
.fenpai {
display: inline-block;
margin: 20px;
}
.notallote .el-radio__label {
display: none;
}
</style>
<template>
<div class="notallote">
<hr />
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="memberNum" label="编码" min-width="80" sortable></el-table-column>
<el-table-column align="center" prop="memberName" label="姓名" min-width="100" sortable></el-table-column>
<el-table-column align="center" prop="sex" label="性别" min-width="80">
<template slot-scope="scope">{{scope.row.sex==1?'男':'女'}}</template>
</el-table-column>
<el-table-column align="center" prop="label" :show-overflow-tooltip="true" label="标签" min-width="80">
<template slot-scope="scope">{{scope.row.label==null?'暂时没有标签':scope.row.label}}</template>
</el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机" min-width="150" sortable>
<template slot-scope="scope">{{scope.row.mobilePhone | phone}}</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="80" v-role='4008001'>
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="allote(scope.row,scope.$index,(visible=true))" plain>分派</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<!-- 分页组件 -->
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pageInfo.total"></el-pagination>
</div>
<!-- 分派 -->
<el-dialog :close-on-click-modal="false" v-dialogDrag title="分派" :visible.sync="visible" width="800px">
<el-form :model="allotForm" :inline="true">
<el-form-item label="会员编码:" :label-width="formLabelwidth">
<span>{{allotForm.memberNum}}</span>
</el-form-item>
<el-form-item label="会员名称:" :label-width="formLabelwidth">
<span>{{allotForm.memberName}}</span>
</el-form-item>
<el-form-item label="会员性别:" :label-width="formLabelwidth">
<span>{{allotForm.sex==1?'男':'女'}}</span>
</el-form-item>
<el-form-item label="分派人员:" :label-width="formLabelwidth">
<span>{{allotForm.allotstaff}}</span>
</el-form-item>
<div style="width:400px;margin:0px auto">
<el-table :data="staffList" style="padding-left:20px;" @current-change="changetable" @row-dblclick="confirm">
<el-table-column align="center" label="选择" width="100">
<template slot-scope="scope">
<el-radio v-model="radiotable" :label="scope.row.id" @change.native="(scope.row)"></el-radio>
</template>
</el-table-column>
<el-table-column align="center" prop="brandNumber" label="水牌号" width="80"></el-table-column>
<el-table-column align="center" prop="staffName" label="名字" min-width="100"></el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<!-- 分页组件 -->
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="visible = false"> </el-button>
<el-button size="mini" type="primary" @click="confirm(visible=false)"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { staffPage, pageassign, storeMemberassign } from "@/api/storeManage.js";
export default {
data() {
return {
visible: false, //
pageNum: 1, //
pageSize: 10, // ,
input: "", //
radiotable: "", //
allotstaffList: "", //
formLabelwidth: "130px", //
list: [], //
allotForm: {}, //
pageInfo: {
total: 0, //
tableList: [],
},
total: 0, //
queryForm: {
//
pageNum: 1,
pageSize: 10,
},
staffList: [], //
};
},
methods: {
//
allote(row, index) {
this.allotForm = { ...row };
staffPage({ state: 1 }).then((res) => {
this.staffList = res.pageInfo.list;
});
},
//
changetable(row) {
this.radiotable = row.id;
this.allotstaffList = row;
},
// assignState1
//
confirm() {
var allotForm = {
id: this.allotForm.id,
staffId: this.allotstaffList.id,
staffName: this.allotstaffList.staffName,
};
storeMemberassign(allotForm).then((res) => {
//console.log(res);
if (res.code == "000000") {
if (this.radiotable !== "") {
this.$message({
type: "success",
message: "已成功分派!",
});
this.visible = false;
} else {
this.$message({
type: "error",
message: "请选择分派人员!",
});
}
this.getData();
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
handleSizeChange(val) {
// //console.log(` ${val} `);
this.queryForm.pageSize = val;
this.getData();
},
handleCurrentChange(val) {
// //console.log(`: ${val}`);
this.queryForm.pageNum = val;
this.getData();
},
//
async getData() {
pageassign(this.queryForm).then((res) => {
if (res.code == "000000") {
this.list = res.pageInfo.list;
this.total = res.pageInfo.total;
}
});
},
//
show(form) {
if (form) {
this.queryForm = Object.assign(form, this.queryForm);
}
this.queryForm.assignState = 0;
this.queryForm.storeId = JSON.parse(
sessionStorage.getItem("storeInfo")
).id;
this.getData();
},
},
};
</script>
<style >
.fenpai {
display: inline-block;
margin: 20px;
}
.notallote .el-radio__label {
display: none;
}
</style>

Loading…
Cancel
Save