BUG 29673
This commit is contained in:
@@ -9,45 +9,47 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<div class="form_div">
|
<div class="form_div">
|
||||||
<el-form
|
<el-form
|
||||||
ref="rules"
|
ref="rules"
|
||||||
:model="forms"
|
:model="forms"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
size="small"
|
size="small"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-form-item label="店铺名称" prop="shopId">
|
<el-form-item label="店铺名称" prop="shopId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="forms.shopId"
|
v-model="forms.shopId"
|
||||||
placeholder="请选择..."
|
placeholder="请选择..."
|
||||||
@change="(forms.merchandiseList = []), (goodIntegral = {})"
|
@change="(forms.merchandiseList = []), (goodIntegral = {})"
|
||||||
clearable>
|
clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, i) in shopList"
|
v-for="(item, i) in shopList"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="item.shopName"
|
:label="item.shopName"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="兑换家庭" prop="name">
|
<el-form-item label="兑换家庭" prop="name">
|
||||||
<el-row type="flex" :gutter="8">
|
<el-row type="flex" :gutter="8">
|
||||||
<el-col
|
<el-col
|
||||||
><el-input v-model="forms.name" disabled clearable
|
>
|
||||||
/></el-col>
|
<el-input v-model="forms.name" disabled clearable
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
<ai-person-select
|
<ai-person-select
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
url="/app/appvillagerintegralfamilymember/list"
|
url="/app/appvillagerintegralfamilymember/list"
|
||||||
headerTitle="家庭列表"
|
headerTitle="家庭列表"
|
||||||
dialogTitle="选择家庭"
|
dialogTitle="选择家庭"
|
||||||
@selectPerson="getSelect"
|
@selectPerson="getSelect"
|
||||||
>
|
>
|
||||||
<template name="option" v-slot:option="{ item }">
|
<template name="option" v-slot:option="{ item }">
|
||||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||||
<ai-id
|
<ai-id
|
||||||
mode="show"
|
mode="show"
|
||||||
:show-eyes="false"
|
:show-eyes="false"
|
||||||
:value="item.idNumber"
|
:value="item.idNumber"
|
||||||
/>
|
/>
|
||||||
<span>{{ item.phone }}</span>
|
<span>{{ item.phone }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -65,40 +67,40 @@
|
|||||||
<el-button @click="showGoodsList()" :disabled="!forms.shopId || !forms.name">选择商品</el-button>
|
<el-button @click="showGoodsList()" :disabled="!forms.shopId || !forms.name">选择商品</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="forms.merchandiseList"
|
:tableData="forms.merchandiseList"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:isShowPagination="false">
|
:isShowPagination="false">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="商品图"
|
label="商品图"
|
||||||
slot="photo"
|
slot="photo"
|
||||||
align="center"
|
align="center"
|
||||||
width="150">
|
width="150">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
v-model="row.photo"
|
v-model="row.photo"
|
||||||
:limit="9">
|
:limit="9">
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="兑换数量"
|
label="兑换数量"
|
||||||
width="180"
|
width="180"
|
||||||
slot="merchandiseNumber"
|
slot="merchandiseNumber"
|
||||||
align="center">
|
align="center">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="row.inventoryNumber"
|
:max="row.inventoryNumber"
|
||||||
size="mini"
|
size="mini"
|
||||||
v-model="merchandiseNumbers[row.id]"
|
v-model="merchandiseNumbers[row.id]"
|
||||||
@change="
|
@change="
|
||||||
(currentValue, oldValue) =>
|
(currentValue, oldValue) =>
|
||||||
changeNumber(currentValue, oldValue, row)
|
changeNumber(currentValue, oldValue, row)
|
||||||
"
|
"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -108,18 +110,18 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
slot="options"
|
slot="options"
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
width="60"
|
width="60"
|
||||||
>
|
>
|
||||||
<template slot-scope="row">
|
<template slot-scope="row">
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
class="icon-color89B"
|
class="icon-color89B"
|
||||||
icon="iconfont iconDelete"
|
icon="iconfont iconDelete"
|
||||||
title="删除"
|
title="删除"
|
||||||
@click="deleteGood(row)"
|
@click="deleteGood(row)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -149,33 +151,33 @@
|
|||||||
<ai-info-item label="店铺名"><span>{{ detailInfo.shopName }}</span></ai-info-item>
|
<ai-info-item label="店铺名"><span>{{ detailInfo.shopName }}</span></ai-info-item>
|
||||||
<ai-info-item label="状态">
|
<ai-info-item label="状态">
|
||||||
<span :style="{ color: dict.getColor('integralOrderStatus', detailInfo.orderStatus)}">
|
<span :style="{ color: dict.getColor('integralOrderStatus', detailInfo.orderStatus)}">
|
||||||
{{ dict.getLabel("integralOrderStatus", detailInfo.orderStatus)}}
|
{{ dict.getLabel("integralOrderStatus", detailInfo.orderStatus) }}
|
||||||
</span>
|
</span>
|
||||||
</ai-info-item>
|
</ai-info-item>
|
||||||
</ai-wrapper>
|
</ai-wrapper>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="detailInfo.merchandiseList"
|
:tableData="detailInfo.merchandiseList"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:isShowPagination="false">
|
:isShowPagination="false">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="商品图"
|
label="商品图"
|
||||||
slot="photo"
|
slot="photo"
|
||||||
align="center"
|
align="center"
|
||||||
width="150">
|
width="150">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
v-model="row.merchandisePhoto"
|
v-model="row.merchandisePhoto"
|
||||||
:limit="9">
|
:limit="9">
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="兑换数量"
|
label="兑换数量"
|
||||||
width="200"
|
width="200"
|
||||||
slot="merchandiseNumber"
|
slot="merchandiseNumber"
|
||||||
align="center">
|
align="center">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
{{ row.merchandiseNumber }}
|
{{ row.merchandiseNumber }}
|
||||||
</template>
|
</template>
|
||||||
@@ -227,47 +229,34 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
title="选择商品"
|
title="选择商品"
|
||||||
:visible.sync="showGoods"
|
:visible.sync="showGoods"
|
||||||
:customFooter="true"
|
:customFooter="true"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
class="goods"
|
class="goods"
|
||||||
@close="init"
|
@close="init"
|
||||||
border
|
border
|
||||||
width="780px">
|
width="780px">
|
||||||
<div class="border_div">
|
<div class="border_div">
|
||||||
<header>
|
<header>
|
||||||
<span>商品列表</span>
|
<span>商品列表</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="keyWord"
|
v-model="keyWord"
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="商品关键字"
|
placeholder="商品关键字"
|
||||||
@keyup.enter.native="showGoodsList()"
|
@keyup.enter.native="showGoodsList()"
|
||||||
clearable
|
clearable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
suffix-icon="iconfont iconSearch"
|
suffix-icon="iconfont iconSearch"
|
||||||
/>
|
/>
|
||||||
</header>
|
</header>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="goodList"
|
:tableData="goodList"
|
||||||
:col-configs="goodsConfig"
|
:col-configs="goodsConfig"
|
||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column slot="selection" type="selection" width="55" :selectable="(row)=>Number(row.inventoryNumber)>0"/>
|
||||||
slot="selection"
|
|
||||||
type="selection"
|
|
||||||
width="55"
|
|
||||||
:selectable="
|
|
||||||
(row, index) => {
|
|
||||||
if (Number(row.inventoryNumber) > 0) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"
|
|
||||||
></el-table-column>
|
|
||||||
</ai-table>
|
</ai-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-footer" slot="footer">
|
<div class="dialog-footer" slot="footer">
|
||||||
@@ -279,7 +268,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex";
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "addOrder",
|
name: "addOrder",
|
||||||
props: {
|
props: {
|
||||||
@@ -316,18 +306,18 @@ export default {
|
|||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
formRules() {
|
formRules() {
|
||||||
return {
|
return {
|
||||||
shopId: [{ required: true, message: "请选择店铺", trigger: "change" }],
|
shopId: [{required: true, message: "请选择店铺", trigger: "change"}],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: "请选择兑换家庭", trigger: "change" },
|
{required: true, message: "请选择兑换家庭", trigger: "change"},
|
||||||
],
|
],
|
||||||
merchandiseList: [
|
merchandiseList: [
|
||||||
{ required: true, message: "请选择商品", trigger: "change" },
|
{required: true, message: "请选择商品", trigger: "change"},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{ slot: "photo", prop: "photo", label: "商品图", align: "center" },
|
{slot: "photo", prop: "photo", label: "商品图", align: "center"},
|
||||||
{
|
{
|
||||||
prop: "merchandiseName",
|
prop: "merchandiseName",
|
||||||
label: "商品名",
|
label: "商品名",
|
||||||
@@ -360,15 +350,15 @@ export default {
|
|||||||
label: "消耗积分",
|
label: "消耗积分",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{ slot: "options", label: "操作", align: "center" },
|
{slot: "options", label: "操作", align: "center"},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
goodsConfig() {
|
goodsConfig() {
|
||||||
return [
|
return [
|
||||||
{ slot: "selection", label: "", align: "center" },
|
{slot: "selection", label: "", align: "center"},
|
||||||
{ prop: "merchandiseName", label: "商品名", align: "left", width: 350 },
|
{prop: "merchandiseName", label: "商品名", align: "left", width: 350},
|
||||||
{ prop: "costIntegral", label: "单价", align: "left" },
|
{prop: "costIntegral", label: "单价", align: "left"},
|
||||||
{ prop: "inventoryNumber", align: "center", label: "库存" },
|
{prop: "inventoryNumber", align: "center", label: "库存"},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
allIntegral() {
|
allIntegral() {
|
||||||
@@ -424,13 +414,14 @@ export default {
|
|||||||
this.$confirm("是否删除该商品?", {
|
this.$confirm("是否删除该商品?", {
|
||||||
type: "error",
|
type: "error",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.forms.merchandiseList.splice(row.$index, 1);
|
this.forms.merchandiseList.splice(row.$index, 1);
|
||||||
this.$delete(this.goodIntegral, row.row.id);
|
this.$delete(this.goodIntegral, row.row.id);
|
||||||
this.$delete(this.merchandiseNumbers, row.row.id);
|
this.$delete(this.merchandiseNumbers, row.row.id);
|
||||||
return this.$message.success("删除成功");
|
return this.$message.success("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
selectGoodsInit(val) {
|
selectGoodsInit(val) {
|
||||||
return new Promise((reslove) => {
|
return new Promise((reslove) => {
|
||||||
@@ -441,7 +432,7 @@ export default {
|
|||||||
this.$set(this.goodIntegral, e.id, Number(e.costIntegral));
|
this.$set(this.goodIntegral, e.id, Number(e.costIntegral));
|
||||||
if (e.photo) {
|
if (e.photo) {
|
||||||
e.merchandisePhoto = e.photo;
|
e.merchandisePhoto = e.photo;
|
||||||
e.photo = [{ ...JSON.parse(e.photo)[0] }];
|
e.photo = [{...JSON.parse(e.photo)[0]}];
|
||||||
} else {
|
} else {
|
||||||
e.photo = [];
|
e.photo = [];
|
||||||
}
|
}
|
||||||
@@ -454,51 +445,51 @@ export default {
|
|||||||
},
|
},
|
||||||
showGoodsList() {
|
showGoodsList() {
|
||||||
this.instance
|
this.instance
|
||||||
.post(`/app/appvillagerintegralmerchandise/list`, null, {
|
.post(`/app/appvillagerintegralmerchandise/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
size: 100000,
|
size: 100000,
|
||||||
shopId: this.forms.shopId,
|
shopId: this.forms.shopId,
|
||||||
merchandiseName: this.keyWord,
|
merchandiseName: this.keyWord,
|
||||||
status: "1",
|
status: "1",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (this.forms.merchandiseList.length > 0) {
|
if (this.forms.merchandiseList.length > 0) {
|
||||||
this.forms.merchandiseList.forEach((e1, index1) => {
|
this.forms.merchandiseList.forEach((e1, index1) => {
|
||||||
res.data.records.forEach((e2, index2) => {
|
res.data.records.forEach((e2, index2) => {
|
||||||
if (e1.id == e2.id) {
|
if (e1.id == e2.id) {
|
||||||
res.data.records.splice(index2, 1);
|
res.data.records.splice(index2, 1);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
this.goodList = res.data.records;
|
|
||||||
this.showGoods = true;
|
|
||||||
}
|
}
|
||||||
});
|
this.goodList = res.data.records;
|
||||||
|
this.showGoods = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
changeNumber(currentValue, oldValue, row) {
|
changeNumber(currentValue, oldValue, row) {
|
||||||
console.log(currentValue, oldValue, row);
|
console.log(currentValue, oldValue, row);
|
||||||
this.$set(
|
this.$set(
|
||||||
this.goodIntegral,
|
this.goodIntegral,
|
||||||
row.id,
|
row.id,
|
||||||
Number(currentValue) * Number(row.costIntegral)
|
Number(currentValue) * Number(row.costIntegral)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getShopList() {
|
getShopList() {
|
||||||
this.instance
|
this.instance
|
||||||
.post(`/app/appvillagerintegralshop/listForOperator`, null, {
|
.post(`/app/appvillagerintegralshop/listForOperator`, null, {
|
||||||
params: {
|
params: {
|
||||||
size: 100000,
|
size: 100000,
|
||||||
areaId: this.areaId,
|
areaId: this.areaId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.shopList = res.data.records;
|
this.shopList = res.data.records;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
save(formName) {
|
save(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
@@ -507,13 +498,13 @@ export default {
|
|||||||
Object.keys(this.merchandiseNumbers).forEach((e2, index2) => {
|
Object.keys(this.merchandiseNumbers).forEach((e2, index2) => {
|
||||||
if (e1.id == e2) {
|
if (e1.id == e2) {
|
||||||
this.forms.merchandiseList[
|
this.forms.merchandiseList[
|
||||||
index1
|
index1
|
||||||
].merchandiseNumber = this.merchandiseNumbers[e2];
|
].merchandiseNumber = this.merchandiseNumbers[e2];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.instance
|
this.instance
|
||||||
.post(
|
.post(
|
||||||
`/app/appvillagerintegralshoporder/addOrder`,
|
`/app/appvillagerintegralshoporder/addOrder`,
|
||||||
{
|
{
|
||||||
...this.forms,
|
...this.forms,
|
||||||
@@ -521,15 +512,15 @@ export default {
|
|||||||
orderIntegral: this.allIntegral,
|
orderIntegral: this.allIntegral,
|
||||||
},
|
},
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success("提交成功");
|
this.$message.success("提交成功");
|
||||||
this.$emit("goBack");
|
this.$emit("goBack");
|
||||||
} else {
|
} else {
|
||||||
return this.$message.error(res.msg);
|
return this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -537,20 +528,20 @@ export default {
|
|||||||
},
|
},
|
||||||
searchDetail(id) {
|
searchDetail(id) {
|
||||||
this.instance
|
this.instance
|
||||||
.post(`/app/appvillagerintegralshoporder/queryDetailById`, null, {
|
.post(`/app/appvillagerintegralshoporder/queryDetailById`, null, {
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.detailInfo = { ...res.data };
|
this.detailInfo = {...res.data};
|
||||||
this.detailInfo.merchandiseList.map((e) => {
|
this.detailInfo.merchandiseList.map((e) => {
|
||||||
let arr = JSON.parse(e.merchandisePhoto);
|
let arr = JSON.parse(e.merchandisePhoto);
|
||||||
e.merchandisePhoto = [{ ...arr[0] }];
|
e.merchandisePhoto = [{...arr[0]}];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -559,31 +550,39 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.add_order {
|
.add_order {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.form_div {
|
.form_div {
|
||||||
padding: 16px 0;
|
padding: 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods {
|
.goods {
|
||||||
::v-deep .el-table td {
|
::v-deep .el-table td {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-table th {
|
::v-deep .el-table th {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.total {
|
.total {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 32px 0;
|
padding: 32px 0;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
span:nth-child(2) {
|
span:nth-child(2) {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
color: #2266ff;
|
color: #2266ff;
|
||||||
@@ -591,14 +590,17 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
color: #ff4466;
|
color: #ff4466;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.border_div {
|
.border_div {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: 1px solid #d0d4dc;
|
border: 1px solid #d0d4dc;
|
||||||
|
|
||||||
header {
|
header {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
@@ -608,12 +610,14 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #d0d4dc;
|
border-bottom: 1px solid #d0d4dc;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
padding: 16px 0;
|
padding: 16px 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,61 +5,60 @@
|
|||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template slot="left">
|
<template slot="left">
|
||||||
<el-select
|
<el-select
|
||||||
size="small"
|
size="small"
|
||||||
v-model="searchObj.shopId"
|
v-model="searchObj.shopId"
|
||||||
placeholder="请选择店铺"
|
placeholder="请选择店铺"
|
||||||
clearable
|
clearable
|
||||||
@change="(page.current = 1), getList()">
|
@change="(page.current = 1), getList()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, i) in shopList"
|
v-for="(item, i) in shopList"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="item.shopName"
|
:label="item.shopName"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
size="small"
|
size="small"
|
||||||
v-model="searchObj.orderStatus"
|
v-model="searchObj.orderStatus"
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
clearable
|
clearable
|
||||||
@change="(page.current = 1), getList()">
|
@change="(page.current = 1), getList()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, i) in dict.getDict('integralOrderStatus')"
|
v-for="(item, i) in dict.getDict('integralOrderStatus')"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="item.dictName"
|
:label="item.dictName"
|
||||||
:value="item.dictValue">
|
:value="item.dictValue">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<div class="times_div">
|
<ai-search label="创建时间">
|
||||||
<p class="times">创建时间</p>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchObj.createTimeStart"
|
v-model="searchObj.createTimeStart"
|
||||||
type="date"
|
type="date"
|
||||||
size="small"
|
size="small"
|
||||||
@change="(page.current = 1), getList()"
|
@change="(page.current = 1), getList()"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="开始日期">
|
placeholder="开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchObj.createTimeEnd"
|
v-model="searchObj.createTimeEnd"
|
||||||
type="date"
|
type="date"
|
||||||
size="small"
|
size="small"
|
||||||
@change="(page.current = 1), getList()"
|
@change="(page.current = 1), getList()"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="结束日期">
|
placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</ai-search>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchObj.name"
|
v-model="searchObj.name"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="订单号/商品名/兑换家庭"
|
placeholder="订单号/商品名/兑换家庭"
|
||||||
v-throttle="() => {page.current = 1, getList()}"
|
v-throttle="() => {page.current = 1, getList()}"
|
||||||
@clear="page.current = 1, searchObj.name = '', getList()"
|
@clear="page.current = 1, searchObj.name = '', getList()"
|
||||||
clearable
|
clearable
|
||||||
suffix-icon="iconfont iconSearch"
|
suffix-icon="iconfont iconSearch"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
@@ -67,18 +66,18 @@
|
|||||||
<template slot="left">
|
<template slot="left">
|
||||||
<!-- <el-button type="primary" icon="iconfont iconAdd" @click="add()">添加</el-button> -->
|
<!-- <el-button type="primary" icon="iconfont iconAdd" @click="add()">添加</el-button> -->
|
||||||
<ai-download
|
<ai-download
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
url="/app/appvillagerintegralshoporder/listExport"
|
url="/app/appvillagerintegralshoporder/listExport"
|
||||||
:params="{ ...searchObj, areaId: areaId, ids: ids.join(',') }"
|
:params="{ ...searchObj, areaId: areaId, ids: ids.join(',') }"
|
||||||
fileName="订单管理"
|
fileName="订单管理"
|
||||||
v-if="$permissions('app_appvillagerintegralshoporder_export')">
|
v-if="$permissions('app_appvillagerintegralshoporder_export')">
|
||||||
</ai-download>
|
</ai-download>
|
||||||
<el-dropdown @command="handleCommand">
|
<el-dropdown @command="handleCommand">
|
||||||
<el-button type="primary">
|
<el-button type="primary">
|
||||||
变更状态<i class="el-icon-arrow-down el-icon--right"></i>
|
变更状态<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="1">批量完成</el-dropdown-item>
|
<el-dropdown-item command="1">批量兑换</el-dropdown-item>
|
||||||
<el-dropdown-item command="2">批量取消</el-dropdown-item>
|
<el-dropdown-item command="2">批量取消</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -86,30 +85,29 @@
|
|||||||
<template slot="right"></template>
|
<template slot="right"></template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="page.total"
|
:total="page.total"
|
||||||
ref="aitableex"
|
:current.sync="page.current"
|
||||||
:current.sync="page.current"
|
@select="onRowClick"
|
||||||
@select="onRowClick"
|
@select-all="onRowClick"
|
||||||
@select-all="onRowClick"
|
row-key="id"
|
||||||
row-key="id"
|
:default-expand-all="false"
|
||||||
:default-expand-all="false"
|
:tree-props="{ children: 'merchandiseList' }"
|
||||||
:tree-props="{ children: 'merchandiseList' }"
|
:size.sync="page.size"
|
||||||
:size.sync="page.size"
|
@getList="getList">
|
||||||
@getList="getList">
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
type="selection"
|
type="selection"
|
||||||
:selectable="(row,index)=>row.orderStatus==0"
|
:selectable="(row,index)=>row.orderStatus==0"
|
||||||
width="55"
|
width="55"
|
||||||
slot="selection">
|
slot="selection">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="订单号/创建时间"
|
label="订单号/创建时间"
|
||||||
slot="orderCode"
|
slot="orderCode"
|
||||||
align="center"
|
align="center"
|
||||||
width="150">
|
width="150">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>{{ row.orderCode }}</el-col>
|
<el-col>{{ row.orderCode }}</el-col>
|
||||||
@@ -118,16 +116,16 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="商品图"
|
label="商品图"
|
||||||
slot="merchandisePhoto"
|
slot="merchandisePhoto"
|
||||||
align="center"
|
align="center"
|
||||||
width="130">
|
width="130">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
v-model="row.merchandisePhoto"
|
v-model="row.merchandisePhoto"
|
||||||
:limit="9">
|
:limit="9">
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -144,30 +142,30 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col style="width: 100%">{{ row.createUserName }}</el-col>
|
<el-col style="width: 100%">{{ row.createUserName }}</el-col>
|
||||||
<el-col style="color: #999999">{{
|
<el-col style="color: #999999">{{
|
||||||
row.createUserPhone
|
row.createUserPhone
|
||||||
}}
|
}}
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="订单状态"
|
label="订单状态"
|
||||||
slot="orderStatus"
|
slot="orderStatus"
|
||||||
align="center"
|
align="center"
|
||||||
width="130"
|
width="130"
|
||||||
fixed="right">
|
fixed="right">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-row v-if="row.isParent">
|
<el-row v-if="row.isParent">
|
||||||
<el-col
|
<el-col
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:style="{
|
:style="{
|
||||||
color: dict.getColor(
|
color: dict.getColor(
|
||||||
'integralOrderStatus',
|
'integralOrderStatus',
|
||||||
row.orderStatus
|
row.orderStatus
|
||||||
),
|
),
|
||||||
}"
|
}"
|
||||||
>{{
|
>{{
|
||||||
dict.getLabel("integralOrderStatus", row.orderStatus)
|
dict.getLabel("integralOrderStatus", row.orderStatus)
|
||||||
}}
|
}}
|
||||||
</el-col
|
</el-col
|
||||||
>
|
>
|
||||||
@@ -177,11 +175,11 @@
|
|||||||
>
|
>
|
||||||
<el-col style="color: #2266ff; width: 100%" v-if="row.remark">
|
<el-col style="color: #2266ff; width: 100%" v-if="row.remark">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
:disabled="!row.remark"
|
:disabled="!row.remark"
|
||||||
class="item"
|
class="item"
|
||||||
effect="light"
|
effect="light"
|
||||||
:content="row.remark"
|
:content="row.remark"
|
||||||
placement="left-end"
|
placement="left-end"
|
||||||
>
|
>
|
||||||
<el-link type="primary">备注</el-link>
|
<el-link type="primary">备注</el-link>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@@ -190,19 +188,19 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
slot="options"
|
slot="options"
|
||||||
align="center"
|
align="center"
|
||||||
width="120"
|
width="120"
|
||||||
fixed="right">
|
fixed="right">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="row.orderCode"
|
v-if="row.orderCode"
|
||||||
type="text"
|
type="text"
|
||||||
@click="goDetail(row)"
|
@click="goDetail(row)"
|
||||||
title="详情"
|
title="详情"
|
||||||
:disabled="!$permissions('app_appvillagerintegralshoporder_detail')">
|
:disabled="!$permissions('app_appvillagerintegralshoporder_detail')">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -215,278 +213,278 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "orderManagement",
|
name: "orderManagement",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
permissions: Function,
|
permissions: Function,
|
||||||
areaId: String,
|
areaId: String,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchObj: {
|
searchObj: {
|
||||||
name: "",
|
name: "",
|
||||||
orderStatus: "",
|
orderStatus: "",
|
||||||
createTimeStart: null,
|
createTimeStart: null,
|
||||||
createTimeEnd: null,
|
createTimeEnd: null,
|
||||||
shopId: "",
|
shopId: "",
|
||||||
},
|
|
||||||
page: {
|
|
||||||
size: 10,
|
|
||||||
current: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
tableData: [],
|
|
||||||
shopList: [],
|
|
||||||
ids: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
colConfigs() {
|
|
||||||
let _ = this;
|
|
||||||
return [
|
|
||||||
{slot: "selection"},
|
|
||||||
{
|
|
||||||
prop: "orderCode",
|
|
||||||
align: "center",
|
|
||||||
slot: "orderCode",
|
|
||||||
label: "订单号/创建时间",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "merchandisePhoto",
|
|
||||||
slot: "merchandisePhoto",
|
|
||||||
align: "center",
|
|
||||||
label: "商品图",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "merchandiseName",
|
|
||||||
align: "left",
|
|
||||||
label: "商品名",
|
|
||||||
width: 180,
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "costIntegral",
|
|
||||||
align: "center",
|
|
||||||
label: "单价",
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "merchandiseNumber",
|
|
||||||
align: "center",
|
|
||||||
label: "数量",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "allCostIntegral",
|
|
||||||
align: "center",
|
|
||||||
label: "消耗积分",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "familyName",
|
|
||||||
align: "center",
|
|
||||||
label: "兑换家庭",
|
|
||||||
slot: "familyName",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "createUserName",
|
|
||||||
align: "center",
|
|
||||||
label: "操作人",
|
|
||||||
slot: "createUserName",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "orderStatus",
|
|
||||||
align: "center",
|
|
||||||
label: "订单状态",
|
|
||||||
fixed: "right",
|
|
||||||
slot: "orderStatus",
|
|
||||||
// render(h, {row}) {
|
|
||||||
// return h('span', {style: {color: _.dict.getColor('integralOrderStatus', row.orderStatus)}}, _.dict.getLabel('integralOrderStatus', row.orderStatus))
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
},
|
page: {
|
||||||
created() {
|
size: 10,
|
||||||
this.getList();
|
current: 1,
|
||||||
this.dict.load("integralOrderStatus");
|
total: 0,
|
||||||
this.getShopList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onRowClick(row) {
|
|
||||||
this.ids = row.map(e => e.id)
|
|
||||||
},
|
},
|
||||||
handleCommand(val) {
|
tableData: [],
|
||||||
if (this.ids.length == 0) {
|
shopList: [],
|
||||||
return this.$message.error("请选择商品")
|
ids: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
colConfigs() {
|
||||||
|
let _ = this;
|
||||||
|
return [
|
||||||
|
{slot: "selection"},
|
||||||
|
{
|
||||||
|
prop: "orderCode",
|
||||||
|
align: "center",
|
||||||
|
slot: "orderCode",
|
||||||
|
label: "订单号/创建时间",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "merchandisePhoto",
|
||||||
|
slot: "merchandisePhoto",
|
||||||
|
align: "center",
|
||||||
|
label: "商品图",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "merchandiseName",
|
||||||
|
align: "left",
|
||||||
|
label: "商品名",
|
||||||
|
width: 180,
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "costIntegral",
|
||||||
|
align: "center",
|
||||||
|
label: "单价",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "merchandiseNumber",
|
||||||
|
align: "center",
|
||||||
|
label: "数量",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "allCostIntegral",
|
||||||
|
align: "center",
|
||||||
|
label: "消耗积分",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "familyName",
|
||||||
|
align: "center",
|
||||||
|
label: "兑换家庭",
|
||||||
|
slot: "familyName",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "createUserName",
|
||||||
|
align: "center",
|
||||||
|
label: "操作人",
|
||||||
|
slot: "createUserName",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "orderStatus",
|
||||||
|
align: "center",
|
||||||
|
label: "订单状态",
|
||||||
|
fixed: "right",
|
||||||
|
slot: "orderStatus",
|
||||||
|
// render(h, {row}) {
|
||||||
|
// return h('span', {style: {color: _.dict.getColor('integralOrderStatus', row.orderStatus)}}, _.dict.getLabel('integralOrderStatus', row.orderStatus))
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.dict.load("integralOrderStatus");
|
||||||
|
this.getShopList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onRowClick(row) {
|
||||||
|
this.ids = row.map(e => e.id)
|
||||||
|
},
|
||||||
|
handleCommand(val) {
|
||||||
|
if (this.ids.length == 0) {
|
||||||
|
return this.$message.error("请选择商品")
|
||||||
|
}
|
||||||
|
this.instance.post(`/app/appvillagerintegralshoporder/changeOrderStatus`, null, {
|
||||||
|
params: {
|
||||||
|
ids: this.ids.join(","),
|
||||||
|
status: val
|
||||||
}
|
}
|
||||||
this.instance.post(`/app/appvillagerintegralshoporder/changeOrderStatus`, null, {
|
}).then(res => {
|
||||||
params: {
|
if (res.code == 0) {
|
||||||
ids: this.ids.join(","),
|
this.$message.success(`批量${val == 1 ? '完成' : '取消'}成功`)
|
||||||
status: val
|
this.getList()
|
||||||
}
|
}
|
||||||
}).then(res => {
|
})
|
||||||
if (res.code == 0) {
|
},
|
||||||
this.$message.success(`批量${val == 1 ? '完成' : '取消'}成功`)
|
getList() {
|
||||||
this.getList()
|
this.instance
|
||||||
}
|
.post(`/app/appvillagerintegralshoporder/list`, null, {
|
||||||
})
|
params: {
|
||||||
},
|
...this.searchObj,
|
||||||
getList() {
|
...this.page,
|
||||||
this.instance
|
areaId: this.areaId,
|
||||||
.post(`/app/appvillagerintegralshoporder/list`, null, {
|
},
|
||||||
params: {
|
})
|
||||||
...this.searchObj,
|
.then((res) => {
|
||||||
...this.page,
|
if (res.code == 0) {
|
||||||
areaId: this.areaId,
|
this.tableData = res.data.records;
|
||||||
},
|
this.tableData.map((e) => {
|
||||||
})
|
e.merchandiseName = e.merchandiseList[0].merchandiseName;
|
||||||
.then((res) => {
|
e.merchandiseNumber = e.merchandiseList[0].merchandiseNumber;
|
||||||
if (res.code == 0) {
|
e.merchandisePhoto = [
|
||||||
this.tableData = res.data.records;
|
{...JSON.parse(e.merchandiseList[0].merchandisePhoto)[0]},
|
||||||
this.tableData.map((e) => {
|
];
|
||||||
e.merchandiseName = e.merchandiseList[0].merchandiseName;
|
e.idForWeb = e.merchandiseList[0].idForWeb;
|
||||||
e.merchandiseNumber = e.merchandiseList[0].merchandiseNumber;
|
e.costIntegral = e.merchandiseList[0].costIntegral;
|
||||||
e.merchandisePhoto = [
|
e.allCostIntegral =
|
||||||
{...JSON.parse(e.merchandiseList[0].merchandisePhoto)[0]},
|
Number(e.merchandiseList[0].costIntegral) *
|
||||||
];
|
Number(e.merchandiseNumber);
|
||||||
e.idForWeb = e.merchandiseList[0].idForWeb;
|
e.merchandiseList.splice(0, 1);
|
||||||
e.costIntegral = e.merchandiseList[0].costIntegral;
|
e.isParent = true;
|
||||||
e.allCostIntegral =
|
if (e.merchandiseList.length > 0) {
|
||||||
Number(e.merchandiseList[0].costIntegral) *
|
e.merchandiseList.map((e2) => {
|
||||||
Number(e.merchandiseNumber);
|
e2.createTime = "";
|
||||||
e.merchandiseList.splice(0, 1);
|
let arr = JSON.parse(e2.merchandisePhoto);
|
||||||
e.isParent = true;
|
e2.merchandisePhoto = [{...arr[0]}];
|
||||||
if (e.merchandiseList.length > 0) {
|
e2.allCostIntegral =
|
||||||
e.merchandiseList.map((e2) => {
|
Number(e2.costIntegral) * Number(e2.merchandiseNumber);
|
||||||
e2.createTime = "";
|
e2.isParent = false;
|
||||||
let arr = JSON.parse(e2.merchandisePhoto);
|
// e2.id = e2.orderId
|
||||||
e2.merchandisePhoto = [{...arr[0]}];
|
|
||||||
e2.allCostIntegral =
|
|
||||||
Number(e2.costIntegral) * Number(e2.merchandiseNumber);
|
|
||||||
e2.isParent = false;
|
|
||||||
// e2.id = e2.orderId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.page.total = res.data.total;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
this.page.total = res.data.total;
|
||||||
getShopList() {
|
}
|
||||||
return new Promise((reslove) => {
|
});
|
||||||
this.instance
|
|
||||||
.post(`/app/appvillagerintegralshop/list`, null, {
|
|
||||||
params: {
|
|
||||||
size: 100000,
|
|
||||||
areaId: this.areaId,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.shopList = res.data.records;
|
|
||||||
reslove();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
Object.keys(this.searchObj).forEach((e) => {
|
|
||||||
this.searchObj[e] = "";
|
|
||||||
});
|
|
||||||
this.searchObj.createTimeStart = null;
|
|
||||||
this.searchObj.createTimeEnd = null;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
add() {
|
|
||||||
this.$emit("showDetail", {isAdd: true});
|
|
||||||
},
|
|
||||||
goDetail(row) {
|
|
||||||
console.log(row);
|
|
||||||
this.$emit("showDetail", {isAdd: false, ...row});
|
|
||||||
},
|
|
||||||
finishOrder(row) {
|
|
||||||
this.$confirm(`是否完成此订单?`, {
|
|
||||||
type: "error",
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.instance
|
|
||||||
.post(`/app/appvillagerintegralshoporder/FinishOrder`, null, {
|
|
||||||
params: {
|
|
||||||
orderId: row.id,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success("已完成!");
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
});
|
|
||||||
},
|
|
||||||
overOrder(row) {
|
|
||||||
this.$confirm(`是否结束此订单?`, {
|
|
||||||
type: "error",
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.instance
|
|
||||||
.post(`/app/appvillagerintegralshoporder/overOrder`, null, {
|
|
||||||
params: {
|
|
||||||
orderId: row.id,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success("已结束!");
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
getShopList() {
|
||||||
|
return new Promise((reslove) => {
|
||||||
|
this.instance
|
||||||
|
.post(`/app/appvillagerintegralshop/list`, null, {
|
||||||
|
params: {
|
||||||
|
size: 100000,
|
||||||
|
areaId: this.areaId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.shopList = res.data.records;
|
||||||
|
reslove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
Object.keys(this.searchObj).forEach((e) => {
|
||||||
|
this.searchObj[e] = "";
|
||||||
|
});
|
||||||
|
this.searchObj.createTimeStart = null;
|
||||||
|
this.searchObj.createTimeEnd = null;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
this.$emit("showDetail", {isAdd: true});
|
||||||
|
},
|
||||||
|
goDetail(row) {
|
||||||
|
console.log(row);
|
||||||
|
this.$emit("showDetail", {isAdd: false, ...row});
|
||||||
|
},
|
||||||
|
finishOrder(row) {
|
||||||
|
this.$confirm(`是否完成此订单?`, {
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.instance
|
||||||
|
.post(`/app/appvillagerintegralshoporder/FinishOrder`, null, {
|
||||||
|
params: {
|
||||||
|
orderId: row.id,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success("已完成!");
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
overOrder(row) {
|
||||||
|
this.$confirm(`是否结束此订单?`, {
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.instance
|
||||||
|
.post(`/app/appvillagerintegralshoporder/overOrder`, null, {
|
||||||
|
params: {
|
||||||
|
orderId: row.id,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success("已结束!");
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.order_management {
|
.order_management {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #f3f6f9;
|
background: #f3f6f9;
|
||||||
|
|
||||||
.times_div {
|
.times_div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.times {
|
.times {
|
||||||
display: block;
|
display: block;
|
||||||
width: 72px;
|
width: 72px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 2px 0px 0px 2px;
|
border-radius: 2px 0px 0px 2px;
|
||||||
border: 1px solid #d0d4dc;
|
border: 1px solid #d0d4dc;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconCorrect {
|
|
||||||
color: #53b43b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconReject {
|
|
||||||
color: #e75555;
|
|
||||||
padding: 0 8px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconCorrect {
|
||||||
|
color: #53b43b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconReject {
|
||||||
|
color: #e75555;
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择人员" prop="userId" v-if="form.objectType">
|
<el-form-item label="选择人员" prop="userId" v-if="form.objectType">
|
||||||
<ai-person-select v-if="form.objectType==1" :instance="instance" url="/admin/user/userIntegralList" customClicker
|
<ai-person-select v-if="form.objectType==1" :instance="instance" url="/admin/user/userIntegralList" customClicker
|
||||||
@selectPerson="handleResidentSelect"/>
|
@selectPerson="handleResidentSelect" headerTitle="员工列表"/>
|
||||||
<ai-person-select v-if="form.objectType==0" :instance="instance" :url="`/app/appresident/list?areaId=${user.info.areaId}`"
|
<ai-person-select v-if="form.objectType==0" :instance="instance" :url="`/app/appresident/list?areaId=${user.info.areaId}`"
|
||||||
@selectPerson="handleResidentSelect" customClicker/>
|
@selectPerson="handleResidentSelect" customClicker/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user