wangfukang 2 weeks ago
parent
commit
65dc1ea65b
  1. 8
      src/api/app.js
  2. 1
      src/api/planet.js
  3. 271
      src/views/app/business/bus/addEdit.vue
  4. 125
      src/views/app/business/bus/bus.vue
  5. 4
      src/views/app/business/logistics/logistics.vue
  6. 15
      src/views/app/business/logiticsCompany/addEdit.vue
  7. 18
      src/views/app/business/logiticsCompany/logiticsCompany.vue
  8. 62
      src/views/app/business/luckey/luckey.vue
  9. 12
      src/views/app/business/problemFeedback/problemFeedback.vue
  10. 175
      src/views/app/shop/addEdit.vue
  11. 37
      src/views/app/shop/shop.vue
  12. 98
      src/views/sys/order-manage/orderManage.vue

8
src/api/app.js

@ -221,6 +221,14 @@ export const addCoupon = (params) => {
export const editCoupon = (params) => { export const editCoupon = (params) => {
return postBodyRequest('/mall/coupon/update', params) return postBodyRequest('/mall/coupon/update', params)
} }
export const upCoupon = (params) => {
return postRequest('/mall/coupon/up', params)
}
export const downCoupon = (params) => {
return postRequest('/mall/coupon/down', params)
}
//新增线路 //新增线路
export const addLogisticsRoute = (params) => { export const addLogisticsRoute = (params) => {
return postBodyRequest('/app/logisticsRoute/addLogisticsRoute', params) return postBodyRequest('/app/logisticsRoute/addLogisticsRoute', params)

1
src/api/planet.js

@ -80,3 +80,4 @@ export const planetAdventureEventSave = (params) => postBodyRequest(`${PREFIX}/a
export const planetAdventureEventDelete = (id) => postRequest(`${PREFIX}/adventure/event/delete`, { id }); export const planetAdventureEventDelete = (id) => postRequest(`${PREFIX}/adventure/event/delete`, { id });
export const planetAdventureRankPage = (params) => getRequest(`${PREFIX}/adventure/rank/page`, params); export const planetAdventureRankPage = (params) => getRequest(`${PREFIX}/adventure/rank/page`, params);
export const planetAdventureRewardPage = (params) => postBodyRequest('/mall/coupon/selectRewardByRegionId', params); export const planetAdventureRewardPage = (params) => postBodyRequest('/mall/coupon/selectRewardByRegionId', params);
export const planetAdventureParticipationPage = (params) => postBodyRequest('/app/planet/adventure/participation/page', params);

271
src/views/app/business/bus/addEdit.vue

@ -6,11 +6,11 @@
<div class="drawer-header"> <div class="drawer-header">
<div style="margin-right: 16px">优惠券配置</div> <div style="margin-right: 16px">优惠券配置</div>
</div> </div>
<Form ref="form" :model="form" :rules="formValidate" label-position="top"> <Form ref="form" :model="form" :rules="currentFormValidate" label-position="top">
<Row :gutter="32"> <Row :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="优惠券名称" prop="name"> <FormItem label="优惠券名称" prop="name">
<Input v-model="form.name" /> <Input v-model="form.name" :maxlength="10" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
@ -21,10 +21,10 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row v-if="!isEdit" :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="适用范围" prop="applyScene"> <FormItem label="适用范围" prop="applyScene">
<RadioGroup v-model="form.applyScene"> <RadioGroup v-model="form.applyScene" :disabled="isEdit">
<Radio label="0">全部</Radio> <Radio label="0">全部</Radio>
<Radio label="1">外卖/买饭</Radio> <Radio label="1">外卖/买饭</Radio>
<Radio label="2">快递/跑腿</Radio> <Radio label="2">快递/跑腿</Radio>
@ -33,48 +33,48 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row v-if="!isEdit" :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="使用门槛"> <FormItem label="使用门槛" prop="type">
<RadioGroup v-model="form.type"> <RadioGroup v-model="form.type" :disabled="isEdit">
<Radio label="2">无门槛</Radio> <Radio label="2">无门槛</Radio>
<Radio label="1"><Input v-model='form.minAmount' style="width: 50px;"></Input >使</Radio> <Radio label="1"><Input v-model='form.minAmount' style="width: 70px;" :disabled="isEdit"></Input >使</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row v-if="!isEdit" :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="规则类型"> <FormItem label="规则类型">
<RadioGroup v-model="form.ruleType"> <RadioGroup v-model="form.ruleType" :disabled="isEdit">
<Radio label="1">其他</Radio> <Radio label="1">其他</Radio>
<Radio label="0">邀新奖励</Radio> <Radio label="0">邀新奖励</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row v-if="!isEdit" :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="优惠金额"> <FormItem label="优惠金额" prop="discountAmount">
<Input v-model='form.discountAmount'></Input> <Input v-model='form.discountAmount' :disabled="isEdit"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row v-if="!isEdit" :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="每人限领数量"> <FormItem label="每人限领数量" prop="limitPerUser">
<Input v-model='form.limitPerUser'></Input> <Input v-model='form.limitPerUser' :disabled="isEdit"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row v-if="!isEdit" :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="有效期"> <FormItem label="有效期" prop="validType">
<RadioGroup v-model="form.validType" vertical> <RadioGroup v-model="form.validType" vertical :disabled="isEdit">
<Radio label="1">固定日期</Radio> <Radio label="1">固定日期</Radio>
<DatePicker @on-change="changeDate" v-if="form.validType == '1'" type="daterange" split-panels placeholder="选择起始时间" style="width: 200px"></DatePicker> <DatePicker @on-change="changeDate" v-if="form.validType == '1'" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" split-panels placeholder="选择起止时间" style="width: 320px" :options="datePickerOptions" :disabled="isEdit"></DatePicker>
<Radio label="2">领券后<Input v-model='form.validDays' style="width: 50px;"></Input ></Radio> <Radio label="2">领券后<Input v-model='form.validDays' style="width: 70px;" :disabled="isEdit"></Input ></Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
@ -119,6 +119,70 @@
}, },
}, },
data() { data() {
const validateIntegerRange = (value, min, max, message, callback) => {
const val = String(value === undefined || value === null ? "" : value).trim();
if (!/^\d+$/.test(val)) {
callback(new Error(message));
return false;
}
const num = Number(val);
if (num < min || num > max) {
callback(new Error(message));
return false;
}
return true;
};
const validateMinAmount = (rule, value, callback) => {
if (this.form.type !== "1") {
callback();
return;
}
if (validateIntegerRange(this.form.minAmount, 1, 200, "满多少可用金额必须是1-200的整数", callback)) {
callback();
}
};
const validateDiscountAmount = (rule, value, callback) => {
const val = String(value === undefined || value === null ? "" : value).trim();
if (!/^\d+(\.\d{1,2})?$/.test(val)) {
callback(new Error("优惠金额最多2位小数,范围0.1-200"));
return;
}
const num = Number(val);
if (num < 0.1 || num > 200) {
callback(new Error("优惠金额最多2位小数,范围0.1-200"));
return;
}
callback();
};
const validateLimitPerUser = (rule, value, callback) => {
if (validateIntegerRange(value, 1, 99, "每人限领数量必须是1-99的整数", callback)) {
callback();
}
};
const validateValidType = (rule, value, callback) => {
if (this.form.validType === "1") {
if (!this.form.validStartTime || !this.form.validEndTime) {
callback(new Error("请选择固定日期有效期"));
return;
}
const startTime = this.parseDateTime(this.form.validStartTime).getTime();
const endTime = this.parseDateTime(this.form.validEndTime).getTime();
const now = Date.now();
if (!startTime || !endTime || startTime <= now || endTime <= now || endTime <= startTime) {
callback(new Error("固定日期必须设置为当前时间之后,且结束时间晚于开始时间"));
return;
}
callback();
return;
}
if (this.form.validType === "2") {
if (validateIntegerRange(this.form.validDays, 1, 200, "领券后有效天数必须是1-200的整数", callback)) {
callback();
}
return;
}
callback(new Error("请选择有效期"));
};
return { return {
menkan:'', menkan:'',
xianzhi:'', xianzhi:'',
@ -131,59 +195,170 @@
passColor: "", passColor: "",
submitLoading: false, submitLoading: false,
maxHeight: 510, maxHeight: 510,
form: { datePickerOptions: {
name: '', // disabledDate(date) {
applyScene:'', //0-1-/2-/3-4 const today = new Date();
type:'', //1-2- today.setHours(0, 0, 0, 0);
minAmount:'', //使 return date && date.valueOf() < today.valueOf();
discountAmount:'', // }
totalCount:'', //
limitPerUser:1, //
validType:'', //1-2-
validStartTime:'', //
validEndTime:'', //
validDays:'', //
ruleType:1,
issuerType:1, //1-2-
issuerId:0, //ID 0-
status:1, //0-/1-
regionId:JSON.parse(this.getStore("user")).departmentId, //id
}, },
form: this.getDefaultForm(),
formValidate: { formValidate: {
// //
name: [{ name: [{
required: true, required: true,
message: "请输入优惠券名称", message: "请输入优惠券名称",
trigger: "change" trigger: "change"
}, {
max: 10,
message: "优惠券名称不能超过10个字",
trigger: "change"
}, ],
totalCount: [{
required: true,
message: "请输入发券总数量",
trigger: "change"
}, ],
applyScene: [{
required: true,
message: "请选择适用范围",
trigger: "change"
}, ],
type: [{
required: true,
message: "请选择使用门槛",
trigger: "change"
}, {
validator: validateMinAmount,
trigger: "change"
}, ], }, ],
contacts: [{ discountAmount: [{
required: true, required: true,
message: "请输入联系人", message: "请输入优惠金额",
trigger: "change"
}, {
validator: validateDiscountAmount,
trigger: "change" trigger: "change"
}, ], }, ],
mobile: [{ limitPerUser: [{
required: true, required: true,
message: "请输入手机号", message: "请输入每人限领数量",
trigger: "change"
}, {
validator: validateLimitPerUser,
trigger: "change"
}, ],
validType: [{
validator: validateValidType,
trigger: "change" trigger: "change"
}, ], }, ],
}, },
}; };
}, },
computed: {
isEdit() {
return this.type == "1";
},
currentFormValidate() {
if (this.isEdit) {
return {
name: this.formValidate.name,
totalCount: this.formValidate.totalCount,
};
}
return this.formValidate;
},
},
methods: { methods: {
getDefaultForm() {
return {
name: '', //
applyScene:'', //0-1-/2-/3-4
type:'', //1-2-
minAmount:'', //使
discountAmount:'', //
totalCount:'', //
limitPerUser:1, //
validType:'', //1-2-
validStartTime:'', //
validEndTime:'', //
validDays:'', //
ruleType:"1",
issuerType:1, //1-2-
issuerId:0, //ID 0-
status:1, //0-/1-
regionId:JSON.parse(this.getStore("user")).departmentId, //id
};
},
init() { init() {
}, },
changeDate(v){ changeDate(v){
this.form.validStartTime = v[0] this.form.validStartTime = v[0]
this.form.validEndTime = v[1] this.form.validEndTime = v[1]
this.$refs.form.validateField("validType");
},
parseDateTime(value) {
if (!value) {
return null;
}
if (value instanceof Date) {
return isNaN(value.getTime()) ? null : value;
}
const match = String(value).match(/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})$/);
if (match) {
const parts = match.map(Number);
const date = new Date(parts[1], parts[2] - 1, parts[3], parts[4], parts[5], parts[6]);
return isNaN(date.getTime()) ? null : date;
}
const date = new Date(value);
return isNaN(date.getTime()) ? null : date;
},
formatDateTimeForSubmit(value) {
const date = this.parseDateTime(value);
if (!date) {
return value;
}
const pad = (num, size = 2) => String(num).padStart(size, "0");
const offset = -date.getTimezoneOffset();
const sign = offset >= 0 ? "+" : "-";
const offsetHour = pad(Math.floor(Math.abs(offset) / 60));
const offsetMinute = pad(Math.abs(offset) % 60);
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}.${pad(date.getMilliseconds(), 3)}${sign}${offsetHour}:${offsetMinute}`;
},
getSubmitForm() {
const form = Object.assign({}, this.form);
if (this.type == "1") {
return {
id: form.id,
name: form.name,
totalCount: form.totalCount,
};
}
if (this.type != "1") {
delete form.id;
}
if (form.type !== "1") {
form.minAmount = "";
}
if (form.validType === "1") {
form.validStartTime = this.formatDateTimeForSubmit(form.validStartTime);
form.validEndTime = this.formatDateTimeForSubmit(form.validEndTime);
form.validDays = "";
} else if (form.validType === "2") {
form.validStartTime = "";
form.validEndTime = "";
}
return form;
}, },
submit() { submit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const submitForm = this.getSubmitForm();
if (this.type == "1") { if (this.type == "1") {
// //
this.submitLoading = true; this.submitLoading = true;
editCoupon(this.form).then((res) => { editCoupon(submitForm).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
@ -194,7 +369,7 @@
} else { } else {
// 1 // 1
this.submitLoading = true; this.submitLoading = true;
addCoupon(this.form).then((res) => { addCoupon(submitForm).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
@ -223,15 +398,19 @@
this.maxHeight = "100%"; this.maxHeight = "100%";
} }
// //
this.$refs.form.resetFields(); if (this.$refs.form) {
this.$refs.form.resetFields();
}
this.form = this.getDefaultForm();
if (this.type == "0" || this.type == "1") { if (this.type == "0" || this.type == "1") {
// //
let data = this.data; let data = this.data;
// //
this.form = data; this.form = Object.assign(this.getDefaultForm(), data);
this.form.applyScene = JSON.stringify(this.form.applyScene) this.form.applyScene = JSON.stringify(this.form.applyScene)
this.form.type = JSON.stringify(this.form.type) this.form.type = JSON.stringify(this.form.type)
this.form.validType = JSON.stringify(this.form.validType) this.form.validType = JSON.stringify(this.form.validType)
this.form.ruleType = JSON.stringify(this.form.ruleType)
} }
this.visible = value; this.visible = value;

125
src/views/app/business/bus/bus.vue

@ -14,6 +14,12 @@
}}</Option> }}</Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="状态" prop="status">
<Select v-model="searchForm.status" style="width:200px">
<Option :value="1">发放中</Option>
<Option :value="0">已下架/停发</Option>
</Select>
</FormItem>
<FormItem label="优惠券名称" prop="name"> <FormItem label="优惠券名称" prop="name">
<Input v-model="searchForm.name"></Input> <Input v-model="searchForm.name"></Input>
</FormItem> </FormItem>
@ -76,15 +82,13 @@
</div> </div>
<div> <div>
<div style="font-size: 20px;font-weight: 700;line-height: 43px;">{{couponsData.name}}</div> <div style="font-size: 20px;font-weight: 700;line-height: 43px;">{{couponsData.name}}</div>
<div v-if="couponsData.validType == '2'" style="color: #777;">领到券当日开始{{couponsData.validDays}}天内有效</div> <div style="color: #777;">{{getCouponValidText(couponsData, true)}}</div>
<div v-if="couponsData.validType == '1'" style="color: #777;">{{getTime(couponsData.validStartTime)}}{{getTime(couponsData.validEndTime)}}期间使用</div>
</div> </div>
</div> </div>
<div style="border-top: 1px solid #777;background: #f5f5f5;padding: 5px 10px;"> <div style="border-top: 1px solid #777;background: #f5f5f5;padding: 5px 10px;">
<div> <div>
有效期 有效期
<span v-if="couponsData.validType == '2'">{{getTime(couponsData.validStartTime)}}{{getTime(couponsData.validEndTime)}}</span> <span>{{getCouponValidText(couponsData)}}</span>
<span v-if="couponsData.validType == '1'">领到券当日开始{{couponsData.validDays}}天内有效</span>
</div> </div>
<div>券ID{{couponsData.id}}</div> <div>券ID{{couponsData.id}}</div>
</div> </div>
@ -132,7 +136,7 @@
<span>优惠券名称{{detailCoupon.name}}</span> <span>优惠券名称{{detailCoupon.name}}</span>
<span style="margin-left: 24px;">券ID{{detailCoupon.id}}</span> <span style="margin-left: 24px;">券ID{{detailCoupon.id}}</span>
</div> </div>
<Form inline :label-width="80"> <Form inline :label-width="100">
<FormItem label="用户手机号"> <FormItem label="用户手机号">
<Input v-model="detailSearchForm.mobile" clearable style="width: 200px" @on-enter="handleIssueSearch"></Input> <Input v-model="detailSearchForm.mobile" clearable style="width: 200px" @on-enter="handleIssueSearch"></Input>
</FormItem> </FormItem>
@ -160,6 +164,8 @@
getCouponData, getCouponData,
giveCoupon, giveCoupon,
getCouponIssueRecords, getCouponIssueRecords,
upCoupon,
downCoupon,
} from "@/api/app"; } from "@/api/app";
import addEdit from "./addEdit.vue"; import addEdit from "./addEdit.vue";
export default { export default {
@ -216,6 +222,7 @@
pageSize: 10, pageSize: 10,
regionId: JSON.parse(this.getStore("user")).departmentId, regionId: JSON.parse(this.getStore("user")).departmentId,
applyScene: '', applyScene: '',
status: 1,
name: '' name: ''
}, },
selectDate: null, selectDate: null,
@ -258,6 +265,23 @@
key: "discountAmount", key: "discountAmount",
minWidth: 80, minWidth: 80,
}, },
{
title: "使用门槛",
key: "minAmount",
minWidth: 120,
render: (h, params) => {
let re = "";
if (params.row.type == 1) {
re = params.row.minAmount ? `${params.row.minAmount}元使用` : "";
} else if (params.row.type == 2) {
re = "无门槛";
}
return h(
"div",
re
);
}
},
{ {
title: "剩余数量", title: "剩余数量",
key: "remainCount", key: "remainCount",
@ -268,17 +292,9 @@
key: "validStartTime", key: "validStartTime",
width: 175, width: 175,
render: (h, params) => { render: (h, params) => {
let re = ""
//1-2-
if(params.row.validType == 1){
re = this.getTime(params.row.validStartTime) + '-' + this.getTime(params.row.validEndTime)
}else{
re = params.row.validDays
}
return h( return h(
"div", "div",
re this.getCouponValidText(params.row)
); );
} }
}, },
@ -345,7 +361,7 @@
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 200, width: 260,
align: "center", align: "center",
fixed: "right", fixed: "right",
render: (h, params) => { render: (h, params) => {
@ -390,6 +406,21 @@
}, },
"编辑" "编辑"
), ),
h("Divider", {
props: {
type: "vertical",
},
}),
h(
"a", {
on: {
click: () => {
this.changeCouponStatus(params.row);
},
},
},
params.row.status == 1 ? "下架" : "上架"
),
]); ]);
}, },
}, },
@ -519,6 +550,23 @@
this.detailSearchForm.mobile = ""; this.detailSearchForm.mobile = "";
this.getIssueRecords(); this.getIssueRecords();
}, },
changeCouponStatus(row) {
const isUp = row.status == 1;
const actionName = isUp ? "下架" : "上架";
this.$Modal.confirm({
title: `${actionName}优惠券`,
content: `确认${actionName}该优惠券吗?`,
onOk: () => {
const request = isUp ? downCoupon : upCoupon;
request({ id: row.id }).then((res) => {
if (res.success) {
this.$Message.success(`${actionName}成功`);
this.getDataList();
}
});
},
});
},
submit(){ submit(){
this.loading = true; this.loading = true;
if(this.giveData.type == 0){ if(this.giveData.type == 0){
@ -533,8 +581,34 @@
} }
}); });
}, },
parseDateTime(v) {
if (!v) {
return null;
}
if (v instanceof Date) {
return isNaN(v.getTime()) ? null : v;
}
const str = String(v).trim();
const match = str.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2}))?/);
if (match) {
const date = new Date(
Number(match[1]),
Number(match[2]) - 1,
Number(match[3]),
Number(match[4] || 0),
Number(match[5] || 0),
Number(match[6] || 0)
);
return isNaN(date.getTime()) ? null : date;
}
const date = new Date(str);
return isNaN(date.getTime()) ? null : date;
},
getTime(v) { getTime(v) {
const date = new Date(v); const date = this.parseDateTime(v);
if (!date) {
return "";
}
// //
const year = date.getFullYear(); const year = date.getFullYear();
// (getMonth 0-11 +1)0 // (getMonth 0-11 +1)0
@ -550,6 +624,23 @@
// -- :: // -- ::
return `${year}-${month}-${day} ${hour}:${minute}:${second}`; return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}, },
getCouponValidText(coupon, withPrefix) {
if (!coupon) {
return "";
}
if (coupon.validType == 1) {
const startTime = this.getTime(coupon.validStartTime);
const endTime = this.getTime(coupon.validEndTime);
if (!startTime || !endTime) {
return "";
}
return `${withPrefix ? "限" : ""}${startTime}${endTime}${withPrefix ? "期间使用" : ""}`;
}
if (coupon.validDays !== undefined && coupon.validDays !== null && coupon.validDays !== "") {
return `领到券当日开始${coupon.validDays}天内有效`;
}
return "";
},
getCouponStatus(status) { getCouponStatus(status) {
if (status == 0) { if (status == 0) {
return "未使用"; return "未使用";
@ -605,10 +696,12 @@
this.selectDate = null; this.selectDate = null;
this.searchForm.startDate = ""; this.searchForm.startDate = "";
this.searchForm.endDate = ""; this.searchForm.endDate = "";
this.searchForm.status = 1;
// //
this.getDataList(); this.getDataList();
}, },
add() { add() {
this.form = {};
this.showType = "2"; this.showType = "2";
this.showCompany = true; this.showCompany = true;
}, },

4
src/views/app/business/logistics/logistics.vue

@ -101,11 +101,11 @@
</Tooltip> </Tooltip>
</div> </div>
</Row> </Row>
<Alert show-icon v-if="isOrderTab" v-show="openTip"> <!-- <Alert show-icon v-if="isOrderTab" v-show="openTip">
已选择 已选择
<span class="select-count">{{ selectList.length }}</span> <span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a> <a class="select-clear" @click="clearSelectAll">清空</a>
</Alert> </Alert> -->
<Table v-if="isOrderTab" :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom" <Table v-if="isOrderTab" :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> @on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<Row v-if="isOrderTab" type="flex" justify="end" class="page"> <Row v-if="isOrderTab" type="flex" justify="end" class="page">

15
src/views/app/business/logiticsCompany/addEdit.vue

@ -6,10 +6,7 @@
<FormItem label="分类名称" prop="categoryName"> <FormItem label="分类名称" prop="categoryName">
<Input v-model="form.categoryName" placeholder="请输入分类名称" /> <Input v-model="form.categoryName" placeholder="请输入分类名称" />
</FormItem> </FormItem>
<FormItem label="分类图标"> <FormItem label="排名">
<Input v-model="form.categoryIcon" placeholder="请输入图标地址" />
</FormItem>
<FormItem label="排序">
<InputNumber v-model="form.sort" :min="0" style="width: 100%" /> <InputNumber v-model="form.sort" :min="0" style="width: 100%" />
</FormItem> </FormItem>
<FormItem label="状态"> <FormItem label="状态">
@ -72,7 +69,6 @@ export default {
defaultForm() { defaultForm() {
return { return {
categoryName: "", categoryName: "",
categoryIcon: "",
regionId: JSON.parse(this.getStore("user")).departmentId, regionId: JSON.parse(this.getStore("user")).departmentId,
sort: 0, sort: 0,
status: 1, status: 1,
@ -84,7 +80,11 @@ export default {
if (!valid) return; if (!valid) return;
this.submitLoading = true; this.submitLoading = true;
const request = this.type == "1" ? editSeckill : addSeckill; const request = this.type == "1" ? editSeckill : addSeckill;
request(this.form).then((res) => { const params = Object.assign({}, this.form, {
categoryName: this.form.categoryName ? this.form.categoryName.trim() : "",
categoryIcon: "",
});
request(params).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
@ -100,12 +100,13 @@ export default {
if (value === this.visible) return; if (value === this.visible) return;
this.maxHeight = Number(document.documentElement.clientHeight - 121) + "px"; this.maxHeight = Number(document.documentElement.clientHeight - 121) + "px";
this.title = this.type == "1" ? "编辑秒杀团分类" : this.type == "2" ? "新增秒杀团分类" : "秒杀团分类详情"; this.title = this.type == "1" ? "编辑秒杀团分类" : this.type == "2" ? "新增秒杀团分类" : "秒杀团分类详情";
this.form = this.type == "1" || this.type == "0" const nextForm = this.type == "1" || this.type == "0"
? Object.assign(this.defaultForm(), JSON.parse(JSON.stringify(this.data || {}))) ? Object.assign(this.defaultForm(), JSON.parse(JSON.stringify(this.data || {})))
: this.defaultForm(); : this.defaultForm();
this.visible = value; this.visible = value;
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.form) this.$refs.form.resetFields(); if (this.$refs.form) this.$refs.form.resetFields();
this.form = nextForm;
}); });
}, },
}, },

18
src/views/app/business/logiticsCompany/logiticsCompany.vue

@ -75,23 +75,7 @@ export default {
fixed: "left", fixed: "left",
}, },
{ {
title: "分类图标", title: "排名",
key: "categoryIcon",
minWidth: 160,
render: (h, params) => {
if (!params.row.categoryIcon) return h("span", "-");
return h("img", {
attrs: { src: params.row.categoryIcon },
style: {
width: "60px",
height: "40px",
objectFit: "contain",
},
});
},
},
{
title: "排序",
key: "sort", key: "sort",
minWidth: 100, minWidth: 100,
}, },

62
src/views/app/business/luckey/luckey.vue

@ -21,13 +21,13 @@
</TabPane> </TabPane>
<!-- 开奖记录 --> <!-- 开奖记录 -->
<TabPane label="开奖记录" name="draw"> <!-- <TabPane label="开奖记录" name="draw">
<Table border :loading="draw.loading" :columns="drawColumns" :data="draw.data"></Table> <Table border :loading="draw.loading" :columns="drawColumns" :data="draw.data"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="draw.pageNumber" :total="draw.total" :page-size="draw.pageSize" <Page :current="draw.pageNumber" :total="draw.total" :page-size="draw.pageSize"
@on-change="p => changePage('draw', p)" size="small" show-total></Page> @on-change="p => changePage('draw', p)" size="small" show-total></Page>
</Row> </Row>
</TabPane> </TabPane> -->
<!-- 中奖记录 --> <!-- 中奖记录 -->
<TabPane label="中奖记录" name="winner"> <TabPane label="中奖记录" name="winner">
@ -62,6 +62,20 @@
@on-change="p => changePage('adventureSession', p)" size="small" show-total></Page> @on-change="p => changePage('adventureSession', p)" size="small" show-total></Page>
</Row> </Row>
</TabPane> </TabPane>
<TabPane label="学院排位赛参与记录" name="adventureParticipation">
<Row style="margin-bottom:12px;">
<DatePicker type="date" v-model="adventureParticipation.playDate" format="yyyy-MM-dd"
placeholder="选择参与日期" style="width:180px;margin-right:8px"
@on-change="v => adventureParticipation.playDate = v"></DatePicker>
<Button type="primary" icon="ios-search" @click="searchAdventureParticipation">查询</Button>
<Button style="margin-left:8px" @click="resetAdventureParticipation">重置</Button>
</Row>
<Table border :loading="adventureParticipation.loading" :columns="adventureParticipationColumns" :data="adventureParticipation.data"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="adventureParticipation.pageNumber" :total="adventureParticipation.total" :page-size="adventureParticipation.pageSize"
@on-change="p => changePage('adventureParticipation', p)" size="small" show-total></Page>
</Row>
</TabPane>
<!-- BUFF --> <!-- BUFF -->
<!-- <TabPane label="BUFF配置" name="buff"> <!-- <TabPane label="BUFF配置" name="buff">
@ -386,7 +400,7 @@
planetCollegePage, planetCollegeSave, planetCollegeDelete, planetCollegePage, planetCollegeSave, planetCollegeDelete,
planetEconomyPage, planetEconomyPage,
planetAdventureEventPage, planetAdventureEventSave, planetAdventureEventDelete, planetAdventureEventPage, planetAdventureEventSave, planetAdventureEventDelete,
planetAdventureRankPage, planetAdventureRewardPage planetAdventureRankPage, planetAdventureRewardPage, planetAdventureParticipationPage
} from '@/api/planet'; } from '@/api/planet';
export default { export default {
@ -415,6 +429,7 @@
adventureEvent: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 }, adventureEvent: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 },
adventureRank: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 }, adventureRank: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 },
adventureSession: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 }, adventureSession: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 },
adventureParticipation: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10, playDate: '' },
// //
poolModal: false, poolModal: false,
poolForm: {}, poolForm: {},
@ -781,6 +796,23 @@
{ title: '备注', key: 'remark', minWidth: 180 }, { title: '备注', key: 'remark', minWidth: 180 },
{ title: '发放时间', key: 'dealingsTime', minWidth: 160 } { title: '发放时间', key: 'dealingsTime', minWidth: 160 }
] ]
},
adventureParticipationColumns() {
return [
{ title: '日期', key: 'playDate', width: 120 },
{ title: '用户ID', key: 'userId', minWidth: 120 },
{ title: '昵称', key: 'nickname', minWidth: 120 },
{ title: '学院', key: 'college', minWidth: 120 },
{ title: '分数', key: 'score', width: 90 },
{ title: '耗时(秒)', key: 'durationSeconds', width: 100 },
{ title: '普通/金/钻/彩', minWidth: 130, render: (h, p) => h('span', `${p.row.normalCount || 0}/${p.row.goldenCount || 0}/${p.row.diamondCount || 0}/${p.row.rainbowCount || 0}`) },
{ title: '券袋', key: 'ticketBagCount', width: 80 },
{ title: '状态', width: 90, render: (h, p) => h('Tag', { props: { color: p.row.status === 1 ? 'green' : 'blue' } }, p.row.status === 1 ? '已提交' : '进行中') },
{ title: '异常', width: 80, render: (h, p) => h('Tag', { props: { color: p.row.cheatFlag === 'Y' ? 'red' : 'green' } }, p.row.cheatFlag === 'Y' ? '异常' : '正常') },
{ title: '原因', key: 'cheatReason', minWidth: 160 },
{ title: '开始时间', key: 'startTime', minWidth: 160 },
{ title: '提交时间', key: 'endTime', minWidth: 160 }
]
} }
}, },
mounted() { mounted() {
@ -815,7 +847,8 @@
tree: this.loadTree, warehouse: this.loadWarehouse, tower: this.loadTower, tree: this.loadTree, warehouse: this.loadWarehouse, tower: this.loadTower,
search: this.loadSearch, stamina: this.loadStamina, landmark: this.loadLandmark, search: this.loadSearch, stamina: this.loadStamina, landmark: this.loadLandmark,
college: this.loadCollege, economy: this.loadEconomy, adventureEvent: this.loadAdventureEvent, college: this.loadCollege, economy: this.loadEconomy, adventureEvent: this.loadAdventureEvent,
adventureRank: this.loadAdventureRank, adventureSession: this.loadAdventureSession adventureRank: this.loadAdventureRank, adventureSession: this.loadAdventureSession,
adventureParticipation: this.loadAdventureParticipation
} }
map[name] && map[name]() map[name] && map[name]()
}, },
@ -887,6 +920,21 @@
dealingsWay: '学院排位赛排名奖励' dealingsWay: '学院排位赛排名奖励'
})).then(r => this.fill('adventureSession', r)) })).then(r => this.fill('adventureSession', r))
}, },
loadAdventureParticipation() {
if (!this.guardRegion('adventureParticipation')) return
this.adventureParticipation.loading = true
planetAdventureParticipationPage(Object.assign({}, this.baseParams('adventureParticipation'), {
playDate: this.formatDateParam(this.adventureParticipation.playDate)
})).then(r => this.fill('adventureParticipation', r))
},
searchAdventureParticipation() {
this.adventureParticipation.pageNumber = 1
this.loadAdventureParticipation()
},
resetAdventureParticipation() {
this.adventureParticipation.playDate = ''
this.searchAdventureParticipation()
},
// ---- ---- // ---- ----
openPool(row) { openPool(row) {
this.poolForm = row ? Object.assign({}, row) : { this.poolForm = row ? Object.assign({}, row) : {
@ -1062,6 +1110,12 @@
const p = n => (n < 10 ? '0' + n : n) const p = n => (n < 10 ? '0' + n : n)
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}` return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
}, },
formatDateParam(value) {
if (!value) return undefined
if (typeof value === 'string') return value
const p = n => (n < 10 ? '0' + n : n)
return `${value.getFullYear()}-${p(value.getMonth() + 1)}-${p(value.getDate())}`
},
defaultDrawTime(value) { defaultDrawTime(value) {
let d = value instanceof Date ? value : new Date() let d = value instanceof Date ? value : new Date()
if (!(value instanceof Date) && typeof value === 'string' && value.length >= 10) { if (!(value instanceof Date) && typeof value === 'string' && value.length >= 10) {

12
src/views/app/business/problemFeedback/problemFeedback.vue

@ -4,6 +4,9 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Alert v-if="isOpen" type="warning" show-icon>
当前未开启免单奖励请填写完成单数和免单金额后点击开启
</Alert>
<Row> <Row>
<Form ref="searchForm" :model="searchForm" inline :label-width="100"> <Form ref="searchForm" :model="searchForm" inline :label-width="100">
@ -161,7 +164,11 @@
if (res.success) { if (res.success) {
if(res.result == null){ if(res.result == null){
this.isOpen = true this.isOpen = true
this.form.orderNumber = ''
this.form.freeAmount = ''
this.$Message.warning("当前未开启免单奖励,请配置后点击开启");
}else{ }else{
this.isOpen = false
this.form = res.result; this.form = res.result;
} }
} }
@ -201,7 +208,7 @@
addMiandan(this.form).then((res) => { addMiandan(this.form).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getJiangLiList(); this.init();
} }
}); });
}, },
@ -225,9 +232,10 @@
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.init();
} }
this.$Modal.remove();
}); });
this.$Modal.remove();
}, },
}); });
}, },

175
src/views/app/shop/addEdit.vue

@ -31,6 +31,24 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32">
<Col span="12">
<FormItem label="商家类型" prop="merchantType">
<Select v-model="form.merchantType" transfer>
<Option :value="1">外卖商家</Option>
<Option :value="2">团购商家</Option>
</Select>
</FormItem>
</Col>
<Col span="12">
<FormItem label="学生商家" prop="isStudent">
<RadioGroup v-model="form.isStudent">
<Radio :label="1"></Radio>
<Radio :label="0"></Radio>
</RadioGroup>
</FormItem>
</Col>
</Row>
<Row :gutter="32"> <Row :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="店铺详细地址" prop="shopAddress"> <FormItem label="店铺详细地址" prop="shopAddress">
@ -40,24 +58,31 @@
</Row> </Row>
<Row :gutter="32"> <Row :gutter="32">
<Col span="12"> <Col span="12">
<FormItem label="联系方式" prop="contactPhone"> <FormItem label="联系人" prop="nickname">
<Input v-model="form.nickname" autocomplete="off" :maxlength="16" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="联系电话" prop="contactPhone">
<Input v-model="form.contactPhone" autocomplete="off" :maxlength="16" /> <Input v-model="form.contactPhone" autocomplete="off" :maxlength="16" />
</FormItem> </FormItem>
</Col> </Col>
</Row>
<Row :gutter="32">
<Col span="12"> <Col span="12">
<FormItem label="副标题" prop="contactPhone"> <FormItem label="副标题">
<Input v-model="form.subtitle" autocomplete="off" :maxlength="16" /> <Input v-model="form.subtitle" autocomplete="off" :maxlength="16" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row :gutter="32">
<Col span="12"> <Col span="12">
<FormItem label="支付宝账号" prop="contactPhone"> <FormItem label="支付宝账号" prop="aliAccount">
<Input v-model="form.aliAccount" autocomplete="off" :maxlength="16" /> <Input v-model="form.aliAccount" autocomplete="off" :maxlength="16" />
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="支付宝户名" prop="contactPhone"> <FormItem label="支付宝户名" prop="aliName">
<Input v-model="form.aliName" autocomplete="off" :maxlength="16" /> <Input v-model="form.aliName" autocomplete="off" :maxlength="16" />
</FormItem> </FormItem>
</Col> </Col>
@ -69,8 +94,51 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Divider>商家自配送</Divider> <Divider>商家资质</Divider>
<Row :gutter="32">
<Col span="12">
<FormItem label="法人身份证正面" class="form-noheight">
<upload-pic-input v-model="form.zhengzhao"></upload-pic-input>
</FormItem>
</Col>
<Col span="12">
<FormItem label="法人身份证反面" class="form-noheight">
<upload-pic-input v-model="form.fanzhao"></upload-pic-input>
</FormItem>
</Col>
</Row>
<Row :gutter="32"> <Row :gutter="32">
<Col span="12">
<FormItem label="法人姓名" prop="shopLename">
<Input v-model="form.shopLename" autocomplete="off" :maxlength="16" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="法人身份证" prop="shopLecard">
<Input v-model="form.shopLecard" autocomplete="off" :maxlength="32" />
</FormItem>
</Col>
</Row>
<Row :gutter="32">
<Col span="12">
<FormItem label="营业执照" class="form-noheight">
<upload-pic-input v-model="form.yingyezhizhao"></upload-pic-input>
</FormItem>
</Col>
</Row>
<Row :gutter="32">
<Col span="24">
<FormItem label="其他补充证照" class="form-noheight">
<div v-for="(item, index) in form.qita" :key="index" style="display: flex; margin-bottom: 8px;">
<upload-pic-input :value="item" @input="setOtherImage(index, $event)"></upload-pic-input>
<Button style="margin-left: 8px;" @click="removeOtherImage(index)">删除</Button>
</div>
<Button icon="md-add" @click="addOtherImage">添加证照</Button>
</FormItem>
</Col>
</Row>
<Divider v-if="form.merchantType == 1">商家自配送</Divider>
<Row :gutter="32" v-if="form.merchantType == 1">
<Col span="12"> <Col span="12">
<FormItem label="是否支持商家自配送" prop="supportShopDelivery"> <FormItem label="是否支持商家自配送" prop="supportShopDelivery">
<RadioGroup v-model="form.supportShopDelivery"> <RadioGroup v-model="form.supportShopDelivery">
@ -85,7 +153,7 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32" v-if="form.supportShopDelivery == 1"> <Row :gutter="32" v-if="form.merchantType == 1 && form.supportShopDelivery == 1">
<Col span="12"> <Col span="12">
<FormItem label="送达位置" prop="shopDeliveryLocation"> <FormItem label="送达位置" prop="shopDeliveryLocation">
<Select v-model="form.shopDeliveryLocation" transfer> <Select v-model="form.shopDeliveryLocation" transfer>
@ -100,7 +168,7 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32" v-if="form.supportShopDelivery == 1"> <Row :gutter="32" v-if="form.merchantType == 1 && form.supportShopDelivery == 1">
<Col span="12"> <Col span="12">
<FormItem label="配送员手机号"> <FormItem label="配送员手机号">
<Input v-model="workerMobile" autocomplete="off" :maxlength="16" placeholder="输入配送员手机号"> <Input v-model="workerMobile" autocomplete="off" :maxlength="16" placeholder="输入配送员手机号">
@ -114,8 +182,8 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Divider>中转配送</Divider> <Divider v-if="form.merchantType == 1">中转配送</Divider>
<Row :gutter="32"> <Row :gutter="32" v-if="form.merchantType == 1">
<Col span="12"> <Col span="12">
<FormItem label="是否支持中转配送" prop="supportTransferDelivery"> <FormItem label="是否支持中转配送" prop="supportTransferDelivery">
<RadioGroup v-model="form.supportTransferDelivery"> <RadioGroup v-model="form.supportTransferDelivery">
@ -130,7 +198,7 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32" v-if="form.supportTransferDelivery == 1"> <Row :gutter="32" v-if="form.merchantType == 1 && form.supportTransferDelivery == 1">
<Col span="24"> <Col span="24">
<FormItem label="中转地点" prop="transferAddressId" class="form-noheight"> <FormItem label="中转地点" prop="transferAddressId" class="form-noheight">
<shopArea-tree-choose @on-change="handleSelectTransferAddress" <shopArea-tree-choose @on-change="handleSelectTransferAddress"
@ -220,6 +288,9 @@
maxHeight: 510, maxHeight: 510,
form: { form: {
address: [], address: [],
merchantType: 1,
isStudent: 0,
qita: [],
supportShopDelivery: 0, supportShopDelivery: 0,
orderBkge: 0, orderBkge: 0,
supportTransferDelivery: 0, supportTransferDelivery: 0,
@ -402,6 +473,21 @@
const numberValue = Number(value || 0); const numberValue = Number(value || 0);
this.$set(this.form, "orderBkge", Number(numberValue.toFixed(1))); this.$set(this.form, "orderBkge", Number(numberValue.toFixed(1)));
}, },
addOtherImage() {
const images = Array.isArray(this.form.qita) ? this.form.qita : [];
images.push("");
this.$set(this.form, "qita", images);
},
setOtherImage(index, value) {
const images = Array.isArray(this.form.qita) ? this.form.qita.slice() : [];
images.splice(index, 1, value);
this.$set(this.form, "qita", images);
},
removeOtherImage(index) {
const images = Array.isArray(this.form.qita) ? this.form.qita.slice() : [];
images.splice(index, 1);
this.$set(this.form, "qita", images);
},
findWorker() { findWorker() {
if (!this.workerMobile) { if (!this.workerMobile) {
this.$Message.warning("请输入配送员手机号"); this.$Message.warning("请输入配送员手机号");
@ -424,7 +510,56 @@
this.workerLoading = false; this.workerLoading = false;
}); });
}, },
parseOtherImages(value) {
if (Array.isArray(value)) return value;
if (!value) return [];
if (typeof value != "string") return [];
try {
const data = JSON.parse(value);
return Array.isArray(data) ? data : [];
} catch (e) {
return value.split(",").filter(item => item);
}
},
applyShopImages(data) {
const form = Object.assign({}, data);
if (form.shopImages) {
const images = form.shopImages.split("@@");
form.zhengzhao = form.zhengzhao || images[0] || "";
form.fanzhao = form.fanzhao || images[1] || "";
form.yingyezhizhao = form.yingyezhizhao || images[2] || "";
form.qita = form.qita || images[3] || [];
}
form.qita = this.parseOtherImages(form.qita);
return form;
},
normalizeRegisterFields() {
if (this.form.merchantType == null || this.form.merchantType === "") {
this.$set(this.form, "merchantType", 1);
}
if (this.form.isStudent == null || this.form.isStudent === "") {
this.$set(this.form, "isStudent", 0);
}
this.form.merchantType = Number(this.form.merchantType);
this.form.isStudent = Number(this.form.isStudent);
if (!this.form.contactPhone && this.form.mobile) {
this.form.contactPhone = this.form.mobile;
}
if (!this.form.mobile && this.form.contactPhone) {
this.form.mobile = this.form.contactPhone;
}
this.form.qita = Array.isArray(this.form.qita) ? this.form.qita.filter(item => item) : [];
this.form.shopImages = [
this.form.zhengzhao || "",
this.form.fanzhao || "",
this.form.yingyezhizhao || "",
JSON.stringify(this.form.qita)
].join("@@");
},
normalizeSelfDeliveryForm() { normalizeSelfDeliveryForm() {
if (this.form.merchantType != 1) {
this.form.supportShopDelivery = 0;
}
if (this.form.supportShopDelivery == null) { if (this.form.supportShopDelivery == null) {
this.$set(this.form, "supportShopDelivery", 0); this.$set(this.form, "supportShopDelivery", 0);
} }
@ -440,6 +575,9 @@
} }
}, },
normalizeTransferDeliveryForm() { normalizeTransferDeliveryForm() {
if (this.form.merchantType != 1) {
this.form.supportTransferDelivery = 0;
}
if (this.form.supportTransferDelivery == null) { if (this.form.supportTransferDelivery == null) {
this.$set(this.form, "supportTransferDelivery", 0); this.$set(this.form, "supportTransferDelivery", 0);
} }
@ -466,6 +604,7 @@
this.form.passStrength = strength; this.form.passStrength = strength;
}, },
submit() { submit() {
this.normalizeRegisterFields();
this.normalizeSelfDeliveryForm(); this.normalizeSelfDeliveryForm();
this.normalizeTransferDeliveryForm(); this.normalizeTransferDeliveryForm();
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
@ -547,7 +686,18 @@
data.address = []; data.address = [];
} }
// //
this.form = Object.assign({}, data, { const registerData = this.applyShopImages(data);
this.form = Object.assign({}, registerData, {
merchantType: registerData.merchantType == null ? 1 : Number(registerData.merchantType),
isStudent: registerData.isStudent == null ? 0 : Number(registerData.isStudent),
contactPhone: registerData.contactPhone || registerData.mobile || "",
mobile: registerData.mobile || registerData.contactPhone || "",
zhengzhao: registerData.zhengzhao || "",
fanzhao: registerData.fanzhao || "",
yingyezhizhao: registerData.yingyezhizhao || "",
shopLename: registerData.shopLename || "",
shopLecard: registerData.shopLecard || "",
qita: registerData.qita || [],
supportShopDelivery: data.supportShopDelivery == null ? 0 : Number(data.supportShopDelivery), supportShopDelivery: data.supportShopDelivery == null ? 0 : Number(data.supportShopDelivery),
orderBkge: data.orderBkge == null ? 0 : Number(data.orderBkge), orderBkge: data.orderBkge == null ? 0 : Number(data.orderBkge),
shopDeliveryLocation: data.shopDeliveryLocation == null ? null : Number(data.shopDeliveryLocation), shopDeliveryLocation: data.shopDeliveryLocation == null ? null : Number(data.shopDeliveryLocation),
@ -571,6 +721,9 @@
/*type: 0, /*type: 0,
sex: "", sex: "",
address: [],*/ address: [],*/
merchantType: 1,
isStudent: 0,
qita: [],
supportShopDelivery: 0, supportShopDelivery: 0,
orderBkge: 0, orderBkge: 0,
supportTransferDelivery: 0, supportTransferDelivery: 0,

37
src/views/app/shop/shop.vue

@ -7,10 +7,16 @@
<Card> <Card>
<Row v-show="openSearch"> <Row v-show="openSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> <Form ref="searchForm" :model="searchForm" inline :label-width="70">
<FormItem label="店铺名称" prop="nickname"> <FormItem label="店铺名称" prop="keyWord">
<Input type="text" v-model="searchForm.keyWord" clearable placeholder="请输入店铺名称" <Input type="text" v-model="searchForm.keyWord" clearable placeholder="请输入店铺名称"
style="width: 200px" /> style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="商家类型" prop="merchantType">
<Select v-model="searchForm.merchantType" clearable placeholder="请选择商家类型" style="width: 200px">
<Option :value="1">外卖商家</Option>
<Option :value="2">团购商家</Option>
</Select>
</FormItem>
<FormItem style="margin-left: -35px" class="br"> <FormItem style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button> <Button @click="handleReset">重置</Button>
@ -18,9 +24,9 @@
</Form> </Form>
</Row> </Row>
<Row align="middle" justify="space-between" class="operation"> <Row align="middle" justify="space-between" class="operation">
<div> <!-- <div>
<Button @click="add" type="primary" icon="md-add">添加店铺</Button> <Button @click="add" type="primary" icon="md-add">添加店铺</Button>
</div> </div> -->
<div class="icons"> <div class="icons">
<Tooltip content="刷新" placement="top" transfer> <Tooltip content="刷新" placement="top" transfer>
<Icon type="md-refresh" size="18" class="item" @click="getDataList" /> <Icon type="md-refresh" size="18" class="item" @click="getDataList" />
@ -28,9 +34,9 @@
<Tooltip :content="openSearch ? '关闭搜索' : '开启搜索'" placement="top" transfer> <Tooltip :content="openSearch ? '关闭搜索' : '开启搜索'" placement="top" transfer>
<Icon type="ios-search" size="18" class="item tip" @click="openSearch = !openSearch" /> <Icon type="ios-search" size="18" class="item tip" @click="openSearch = !openSearch" />
</Tooltip> </Tooltip>
<Tooltip :content="openTip ? '关闭提示' : '开启提示'" placement="top" transfer> <!-- <Tooltip :content="openTip ? '关闭提示' : '开启提示'" placement="top" transfer>
<Icon type="md-bulb" size="18" class="item tip" @click="openTip = !openTip" /> <Icon type="md-bulb" size="18" class="item tip" @click="openTip = !openTip" />
</Tooltip> </Tooltip> -->
<Tooltip content="表格密度" placement="top" transfer> <Tooltip content="表格密度" placement="top" transfer>
<Dropdown @on-click="changeTableSize" trigger="click"> <Dropdown @on-click="changeTableSize" trigger="click">
<Icon type="md-list" size="18" class="item" /> <Icon type="md-list" size="18" class="item" />
@ -143,14 +149,17 @@
contactPhone: "", contactPhone: "",
shopIcon: "1111", shopIcon: "1111",
shopAddress: "", shopAddress: "",
merchantType: "",
yearFee: "", yearFee: "",
chargeTime: "", chargeTime: "",
startTime: "", startTime: "",
endTime: "", endTime: "",
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
sort: "createTime", sort: "shoprank",
order: "desc", order: "desc",
sortOrder: 'shoprank',
orderOrder: 'desc',
startDate: "", startDate: "",
endDate: "", endDate: "",
regionId:JSON.parse(this.getStore("userInfo")).departmentId, regionId:JSON.parse(this.getStore("userInfo")).departmentId,
@ -186,6 +195,18 @@
key: "shopTypeTitle", key: "shopTypeTitle",
minWidth: 120, minWidth: 120,
}, },
{
title: "商家类型",
key: "merchantType",
minWidth: 110,
render: (h, params) => {
const typeMap = {
1: "外卖商家",
2: "团购商家",
};
return h("span", typeMap[params.row.merchantType] || "-");
},
},
{ {
title: "联系方式", title: "联系方式",
key: "contactPhone", key: "contactPhone",
@ -404,7 +425,9 @@
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.searchForm.startDate = ""; this.searchForm.startDate = "";
this.searchForm.endDate = ""; this.searchForm.endDate = "";
this.$refs.dep.clearSelect(); if (this.$refs.dep) {
this.$refs.dep.clearSelect();
}
this.searchForm.departmentId = ""; this.searchForm.departmentId = "";
// //
this.getDataList(); this.getDataList();

98
src/views/sys/order-manage/orderManage.vue

@ -94,12 +94,12 @@
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="100"> <Form ref="searchForm" :model="searchForm" inline :label-width="100">
<FormItem label="店铺名称" prop="orderLogistics"> <FormItem label="店铺名称" prop="shopName">
<Input type="text" v-model="searchForm.shopName" clearable placeholder="请输入店铺名称" <Input type="text" v-model="searchForm.shopName" clearable placeholder="请输入店铺名称"
style="width: 200px" /> style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="收货人手机号" prop="kdOrderId1"> <FormItem label="收货人手机号" prop="receiverPhone">
<Input type="text" v-model="searchForm.receiverPhone" clearable placeholder="请输入店铺名称" <Input type="text" v-model="searchForm.receiverPhone" clearable placeholder="请输入收货人手机号"
style="width: 200px" /> style="width: 200px" />
</FormItem> </FormItem>
<FormItem style="margin-left: -35px" class="br"> <FormItem style="margin-left: -35px" class="br">
@ -116,9 +116,9 @@
<Tooltip :content="openSearch ? '关闭搜索' : '开启搜索'" placement="top" transfer> <Tooltip :content="openSearch ? '关闭搜索' : '开启搜索'" placement="top" transfer>
<Icon type="ios-search" size="18" class="item tip" @click="openSearch = !openSearch" /> <Icon type="ios-search" size="18" class="item tip" @click="openSearch = !openSearch" />
</Tooltip> </Tooltip>
<Tooltip :content="openTip ? '关闭提示' : '开启提示'" placement="top" transfer> <!-- <Tooltip :content="openTip ? '关闭提示' : '开启提示'" placement="top" transfer>
<Icon type="md-bulb" size="18" class="item tip" @click="openTip = !openTip" /> <Icon type="md-bulb" size="18" class="item tip" @click="openTip = !openTip" />
</Tooltip> </Tooltip> -->
<Tooltip content="表格密度" placement="top" transfer> <Tooltip content="表格密度" placement="top" transfer>
<Dropdown @on-click="changeTableSize" trigger="click"> <Dropdown @on-click="changeTableSize" trigger="click">
<Icon type="md-list" size="18" class="item" /> <Icon type="md-list" size="18" class="item" />
@ -476,6 +476,7 @@
searchType: "1", searchType: "1",
searchStatus:10, searchStatus:10,
shopName: "", shopName: "",
receiverPhone: "",
mobile:'', mobile:'',
userId: "" userId: ""
}, },
@ -487,10 +488,42 @@
fixed: "left", fixed: "left",
}, },
{ {
title: "订单编号", title: "订单状态",
key: "id", key: "status",
width: 200, width: 130,
align: "center", align: "center",
render: (h, params) => {
let re = ""
if (params.row.status == 0) {
re = "待支付";
} else if (params.row.status == 2) {
re = "待接单";
} else if (params.row.status == 3 && params.row.deliveryType == 1) {
re = "待取货";
} else if (params.row.status == 3 && params.row.deliveryType == 2) {
re = "待消费";
} else if (params.row.status == 4) {
re = "待送达";
} else if (params.row.status == 5) {
re = "已完成";
} else if (params.row.status == 6) {
re = "已取消";
} else if (params.row.status == 7) {
re = "待退款";
} else if (params.row.status == 8) {
re = "已退款";
} else if (params.row.status == 10) {
re = "待成团";
} else if (params.row.status == 11) {
re = "售后中";
} else if (params.row.status == 12) {
re = "已售后";
}
return h(
"div",
re
);
}
}, },
{ {
title: "预计送达时间", title: "预计送达时间",
@ -498,6 +531,9 @@
width: 200, width: 200,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
if (params.row.deliveryType != 1 || !params.row.deliveryInfo) {
return h("div", "");
}
return h( return h(
"div", "div",
this.formatDateTime(params.row.deliveryInfo.mustFinishTime) this.formatDateTime(params.row.deliveryInfo.mustFinishTime)
@ -528,12 +564,6 @@
width: 130, width: 130,
align: "center", align: "center",
}, },
{
title: "平台优惠券金额",
key: "weight",
width: 150,
align: "center",
},
{ {
title: "完成支付时间", title: "完成支付时间",
key: "createTime", key: "createTime",
@ -546,44 +576,6 @@
); );
} }
}, },
{
title: "订单状态",
key: "status",
width: 130,
align: "center",
render: (h, params) => {
let re = ""
if (params.row.status == 0) {
re = "待支付";
} else if (params.row.status == 2) {
re = "待接单";
} else if (params.row.status == 3 && params.row.deliveryType == 1) {
re = "待取货";
} else if (params.row.status == 3 && params.row.deliveryType == 2) {
re = "待消费";
} else if (params.row.status == 4) {
re = "待送达";
} else if (params.row.status == 5) {
re = "已完成";
} else if (params.row.status == 6) {
re = "已取消";
} else if (params.row.status == 7) {
re = "待退款";
} else if (params.row.status == 8) {
re = "已退款";
} else if (params.row.status == 10) {
re = "待成团";
} else if (params.row.status == 11) {
re = "售后中";
} else if (params.row.status == 12) {
re = "已售后";
}
return h(
"div",
re
);
}
},
{ {
title: "操作", title: "操作",
key: "action", key: "action",
@ -1145,6 +1137,8 @@
}, },
handleReset() { handleReset() {
this.$refs.searchForm.resetFields(); this.$refs.searchForm.resetFields();
this.searchForm.shopName = "";
this.searchForm.receiverPhone = "";
this.searchForm.pageNum = 1; this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.returnForm.pageNum = 1; this.returnForm.pageNum = 1;

Loading…
Cancel
Save