修改一些bug完善,新增app更新新功能

master
lemon橪 2021-05-21 16:45:47 +08:00
parent 38dc952a07
commit 41093b2032
14 changed files with 633 additions and 470 deletions

View File

@ -17,10 +17,10 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'http://192.168.0.103:8890/', common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn', buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn', seller: 'https://store-api.pickmall.cn',
manager: 'http://192.168.0.103:8887' manager: 'https://admin-api.pickmall.cn'
}, },
api_prod: { api_prod: {
common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',

View File

@ -202,6 +202,7 @@
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total; this.total = res.result.total;
} }
}); });
@ -239,7 +240,7 @@
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss" >
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
</style> </style>

View File

@ -40,11 +40,11 @@
<FormItem label="手机号码" prop="mobile" style="width: 90%;"> <FormItem label="手机号码" prop="mobile" style="width: 90%;">
<Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" /> <Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" />
</FormItem> </FormItem>
<FormItem label="会员名称" prop="username" style="width: 90%"> <FormItem label="会员名称" prop="uname" style="width: 90%">
<Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" /> <Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" />
</FormItem> </FormItem>
<FormItem label="会员密码" prop="password" style="width: 90%"> <FormItem label="会员密码" prop="pwd" style="width: 90%">
<Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" /> <Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
</FormItem> </FormItem>
</Form> </Form>
@ -165,8 +165,8 @@ export default {
message: "请输入正确的手机号", message: "请输入正确的手机号",
}, },
], ],
username: [{ required: true, message: "请输入会员名称" }], uname: [{ required: true, message: "请输入会员名称" }],
password: [{ required: true, message: "请输入密码" }], pwd: [{ required: true, message: "请输入密码" }],
}, },
ruleValidate: {}, // ruleValidate: {}, //
submitLoading: false, // submitLoading: false, //

View File

@ -231,21 +231,21 @@
</TabPane> </TabPane>
<TabPane label="TA的余额" name="wallet"> <TabPane label="TA的余额" name="wallet">
<div class="pointsTitle" style="justify-content: flex-start; text-align: left;"> <div class="pointsTitle" style="justify-content: flex-start; text-align: left;">
<div style="width: 120px;"> <div style="min-width: 120px; margin-right:20px">
<div class="points-top-title"> <div class="points-top-title">
余额 余额
</div> </div>
<div class="points-top-text"> <div class="points-top-text">
{{memberWalletInfo.memberDeposit?memberWalletInfo.memberDeposit:0 | unitPrice('¥')}} {{memberWalletInfo.memberWallet?memberWalletInfo.memberWallet:0 | unitPrice('¥')}}
</div> </div>
</div> </div>
<div style="width: 120px;"> <div style="min-width: 120px;">
<div class="points-top-title"> <div class="points-top-title">
冻结余额 冻结余额
</div> </div>
<div class="points-top-text"> <div class="points-top-text">
{{memberWalletInfo.frozenDeposit?memberWalletInfo.frozenDeposit:0 | unitPrice('¥')}} {{memberWalletInfo.memberFrozenWallet?memberWalletInfo.memberFrozenWallet:0 | unitPrice('¥')}}
</div> </div>
</div> </div>
</div> </div>
@ -750,23 +750,23 @@
minWidth: 120, minWidth: 120,
}, },
{ {
title: "业务类型", title: "业务类型",
key: "serviceType", key: "serviceType",
width: 150, width: 200,
render: (h, params) => { render: (h, params) => {
if (params.row.serviceType == "BALANCE_WITHDRAWAL") { if (params.row.serviceType == "WALLET_WITHDRAWAL") {
return h('div', [h('span', {}, '余额提现'),]); return h("div", [h("span", {}, "余额提现")]);
} else if (params.row.serviceType == "BALANCE_PAY") { } else if (params.row.serviceType == "WALLET_PAY") {
return h('div', [h('span', {}, '余额支付'),]); return h("div", [h("span", {}, "余额支付")]);
} else if (params.row.serviceType == "BALANCE_REFUND") { } else if (params.row.serviceType == "WALLET_REFUND") {
return h('div', [h('span', {}, '余额退款'),]); return h("div", [h("span", {}, "余额退款")]);
} else if (params.row.serviceType == "BALANCE_RECHARGE") { } else if (params.row.serviceType == "WALLET_RECHARGE") {
return h('div', [h('span', {}, '余额充值'),]); return h("div", [h("span", {}, "余额充值")]);
} else if (params.row.serviceType == "BALANCE_COMMISSION") { } else {
return h('div', [h('span', {}, '佣金提成'),]); return h("div", [h("span", {}, "佣金提成")]);
}
} }
}, },
},
{ {
title: "变动金额", title: "变动金额",
key: "money", key: "money",

View File

@ -29,10 +29,8 @@
<Option value="PASS">通过售后</Option> <Option value="PASS">通过售后</Option>
<Option value="REFUSE">拒绝售后</Option> <Option value="REFUSE">拒绝售后</Option>
<Option value="BUYER_RETURN">买家退货待卖家收货</Option> <Option value="BUYER_RETURN">买家退货待卖家收货</Option>
<Option value="SELLER_RE_DELIVERY">商家换货/补发</Option>
<Option value="SELLER_CONFIRM">卖家确认收货</Option> <Option value="SELLER_CONFIRM">卖家确认收货</Option>
<Option value="SELLER_TERMINATION">卖家终止售后</Option> <Option value="SELLER_TERMINATION">卖家终止售后</Option>
<Option value="BUYER_CONFIRM">买家确认收货</Option>
<Option value="BUYER_CANCEL">买家取消售后</Option> <Option value="BUYER_CANCEL">买家取消售后</Option>
<Option value="COMPLETE">完成售后</Option> <Option value="COMPLETE">完成售后</Option>
</Select> </Select>

View File

@ -93,6 +93,20 @@ export default {
title: "订单来源", title: "订单来源",
key: "clientType", key: "clientType",
width: 95, width: 95,
render: (h, params) => {
if (params.row.clientType == "H5") {
return h("div",{},"移动端");
}else if(params.row.clientType == "PC") {
return h("div",{},"PC端");
}else if(params.row.clientType == "WECHAT_MP") {
return h("div",{},"小程序端");
}else if(params.row.clientType == "APP") {
return h("div",{},"移动应用端");
}
else{
return h("div",{},params.row.clientType);
}
},
}, },
{ {
title: "买家名称", title: "买家名称",
@ -251,7 +265,8 @@ export default {
confirmPrice(v) { confirmPrice(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "提示", title: "提示",
content: "<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>", content:
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
onOk: () => { onOk: () => {
API_Order.orderPay(v.sn).then((res) => { API_Order.orderPay(v.sn).then((res) => {
if (res.success) { if (res.success) {

View File

@ -41,38 +41,38 @@
</Page> </Page>
</Row> </Row>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1100"> <Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1100">
<Form ref="form" :model="form" :label-width="100"> <Form ref="form" :model="form" :label-width="100">
<FormItem label="文章标题" prop="title"> <FormItem label="文章标题" prop="title">
<Input v-model="form.title" clearable style="width: 40%" /> <Input v-model="form.title" clearable style="width: 40%" />
</FormItem> </FormItem>
<FormItem label="文章分类" prop="categoryId"> <FormItem label="文章分类" prop="categoryId">
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px"> <Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
<Option :value="treeValue" style="display: none">{{ <Option :value="treeValue" style="display: none">{{
treeValue treeValue
}} }}
</Option> </Option>
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree> <Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="文章排序" prop="sort"> <FormItem label="文章排序" prop="sort">
<Input type="number" v-model="form.sort" clearable style="width: 10%" /> <Input type="number" v-model="form.sort" clearable style="width: 10%" />
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content"> <FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor v-model="form.content"></editor> <editor v-model="form.content"></editor>
</FormItem> </FormItem>
<FormItem label="是否展示" prop="openStatus"> <FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close"> <i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
<span slot="open">展示</span> <span slot="open">展示</span>
<span slot="close">隐藏</span> <span slot="close">隐藏</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button> <Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button> <Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</div> </div>
</Modal> </Modal>
</Card> </Card>
</Col> </Col>
@ -123,6 +123,7 @@ export default {
searchTreeValue: "", // searchTreeValue: "", //
form: { form: {
// //
openStatus:false,
title: "", title: "",
categoryId: "", categoryId: "",
sort: 1, sort: 1,
@ -347,7 +348,7 @@ export default {
level: 0, level: 0,
children: [], children: [],
id: "0", id: "0",
categoryId: 0 categoryId: 0,
}); });
} }
}); });
@ -379,13 +380,7 @@ export default {
// //
this.data = []; this.data = [];
if (res.result.records.length > 0) { if (res.result.records.length > 0) {
res.result.records.forEach((item) => {
if (item.openStatus == "OPEN") {
item.openStatus = true;
} else {
item.openStatus = false;
}
})
this.data = res.result.records; this.data = res.result.records;
} }
} }
@ -395,11 +390,7 @@ export default {
}, },
handleSubmit() { handleSubmit() {
if (this.form.openStatus) {
this.form.openStatus = "OPEN";
} else {
this.form.openStatus = "CLOSE";
}
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.submitLoading = true; this.submitLoading = true;
@ -412,6 +403,7 @@ export default {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} }
}); });
} else { } else {
@ -422,6 +414,8 @@ export default {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} }
}); });
} }
@ -449,11 +443,7 @@ export default {
this.form.content = res.result.content; this.form.content = res.result.content;
this.form.title = res.result.title; this.form.title = res.result.title;
this.form.sort = res.result.sort; this.form.sort = res.result.sort;
if (res.result.openStatus == "OPEN") { this.form.openStatus = res.result.openStatus
this.form.openStatus = true;
} else {
this.form.openStatus = false;
}
} }
}); });
}, },

View File

@ -17,16 +17,9 @@
primary-key="id" primary-key="id"
> >
<template slot="action" slot-scope="scope"> <template slot="action" slot-scope="scope">
<Dropdown transfer="true" trigger="click"> <Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
<Button type="primary" size="small"> <Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
操作
<Icon type="ios-arrow-down"></Icon>
</Button>
<DropdownMenu slot="list">
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
</DropdownMenu>
</Dropdown>
</template> </template>
</tree-table> </tree-table>

View File

@ -12,6 +12,7 @@
<DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"> <DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px">
</DatePicker> </DatePicker>
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>

View File

@ -6,18 +6,20 @@
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="账单编号" prop="sn"> <Form-item label="账单编号" prop="sn">
<Input <Input type="text" v-model="searchForm.sn" placeholder="请输入账单编号" clearable style="width: 200px" />
type="text"
v-model="searchForm.sn"
placeholder="请输入账单编号"
clearable
style="width: 200px"
/>
</Form-item> </Form-item>
<Form-item label="出帐时间" prop="createTime"> <Form-item label="出帐时间" prop="createTime">
<DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"> <DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px">
</DatePicker> </DatePicker>
</Form-item> </Form-item>
<Form-item label="筛选状态">
<Select v-model="searchForm.billStatus" style="width:160px">
<Option value="">全部</Option>
<Option value="OUT">已出账</Option>
<Option value="CHECK">已核对</Option>
<Option value="COMPLETE">已完成</Option>
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
@ -26,14 +28,11 @@
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
</Row> </Row>
<Row> <Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
@on-sort-change="changeSort"
@on-selection-change="changeSelect">
</Table> </Table>
</Row> </Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>
@ -88,6 +87,7 @@ export default {
order: "desc", // order: "desc", //
startDate: "", // startDate: "", //
endDate: "", // endDate: "", //
billStatus:"" //
}, },
selectDate: null, // selectDate: null, //
form: { form: {
@ -114,7 +114,7 @@ export default {
title: "账单号", title: "账单号",
key: "sn", key: "sn",
minWidth: 200, minWidth: 200,
tooltip: true tooltip: true,
}, },
{ {
title: "生成时间", title: "生成时间",
@ -126,14 +126,14 @@ export default {
key: "startTime", key: "startTime",
width: 200, width: 200,
render: (h, params) => { render: (h, params) => {
return h('div', params.row.startTime +"~"+params.row.endTime) return h("div", params.row.startTime + "~" + params.row.endTime);
} },
}, },
{ {
title: "店铺名称", title: "店铺名称",
key: "storeName", key: "storeName",
minWidth: 120, minWidth: 120,
tooltip: true tooltip: true,
}, },
{ {
@ -152,16 +152,16 @@ export default {
key: "billStatus", key: "billStatus",
width: 100, width: 100,
render: (h, params) => { render: (h, params) => {
if(params.row.billStatus == 'OUT'){ if (params.row.billStatus == "OUT") {
return h('div', '已出账') return h("div", "已出账");
} else if (params.row.billStatus == 'CHECK') { } else if (params.row.billStatus == "CHECK") {
return h('div', '已对账') return h("div", "已对账");
} else if (params.row.billStatus == 'EXAMINE') { } else if (params.row.billStatus == "EXAMINE") {
return h('div', '已审核') return h("div", "已审核");
}else{ } else {
return h('div', '已付款') return h("div", "已付款");
} }
} },
}, },
{ {
title: "操作", title: "操作",

View File

@ -2,84 +2,46 @@
<div class="search"> <div class="search">
<Row> <Row>
<Col> <Col>
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="系统类型" prop="orderSn"> <Form-item label="系统类型" prop="orderSn">
<Select <Select v-model="searchForm.type" placeholder="请选择系统类型" clearable style="width: 200px">
v-model="searchForm.type" <Option value="IOS">苹果</Option>
placeholder="请选择系统类型" <Option value="ANDROID">安卓</Option>
clearable </Select>
style="width: 200px" </Form-item>
> <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Option value="IOS">苹果</Option> </Form>
<Option value="ANDROID">安卓</Option> </Row>
</Select> <Row class="operation" style="margin-top: 20px">
</Form-item> <Button @click="addAppVersion" type="primary">添加</Button>
<Form-item style="margin-left:-35px;" class="br"> </Row>
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> <Row class="padding-row">
</Form-item> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Form> </Row>
</Row> <Row type="flex" justify="end" class="page">
<Row class="operation" style="margin-top: 20px"> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Button @click="addAppVersion" type="primary">添加</Button> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
<Row class="padding-row"> </Card>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
</Row>
<Row type="flex" justify="end" class="page">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
</Col> </Col>
</Row> </Row>
<Modal <Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1000">
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="1000"
>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate"> <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="版本名称" prop="versionName"> <FormItem label="版本名称" prop="versionName">
<Input v-model="form.versionName" maxlength="15" clearable style="width: 40%"/> <Input v-model="form.versionName" maxlength="15" clearable style="width: 40%" />
</FormItem> </FormItem>
<FormItem label="版本号" prop="version"> <FormItem label="版本号" prop="version">
<Input v-model="form.version" maxlength="15" clearable style="width: 40%"/> <Input v-model="form.version" maxlength="15" clearable style="width: 40%" />
</FormItem> </FormItem>
<FormItem label="更新时间" prop="versionUpdateDate"> <FormItem label="更新时间" prop="versionUpdateDate">
<DatePicker <DatePicker v-model="form.versionUpdateDate" type="datetime" format="yyyy-MM-dd HH:mm:ss" clearable placeholder="请选择" style="width: 200px"></DatePicker>
v-model="form.versionUpdateDate"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
clearable
placeholder="请选择"
style="width: 200px"
></DatePicker>
</FormItem> </FormItem>
<FormItem label="强制更新"> <FormItem label="强制更新">
<RadioGroup type="button" button-style="solid" v-model="form.forceUpdate"> <RadioGroup type="button" button-style="solid" v-model="form.forceUpdate">
<Radio label="1">强制更新</Radio> <Radio :label="true">强制更新</Radio>
<Radio label="0">非强制更新</Radio> <Radio :label="false">非强制更新</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem label="类型"> <FormItem label="类型">
@ -89,10 +51,10 @@
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem label="下载地址" prop="downloadUrl"> <FormItem label="下载地址" prop="downloadUrl">
<Input v-model="form.downloadUrl" maxlength="100" clearable style="width: 40%"/> <Input v-model="form.downloadUrl" maxlength="100" clearable style="width: 40%" />
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="更新内容" prop="content"> <FormItem class="form-item-view-el" label="更新内容" prop="content">
<editor v-model="form.content"></editor> <Input v-model="form.content" :rows="6" maxlength="100" show-word-limit type="textarea" placeholder="Enter something..." />
</FormItem> </FormItem>
</Form> </Form>
<div slot="footer"> <div slot="footer">
@ -102,11 +64,7 @@
</Modal> </Modal>
<div> <div>
<!-- 查看版本信息 --> <!-- 查看版本信息 -->
<Modal <Modal :title="queryModalTitle" v-model="queryModalVisible" :width="700">
:title="queryModalTitle"
v-model="queryModalVisible"
:width="700"
>
<Form> <Form>
<div class="div-version"> <div class="div-version">
<FormItem label="版本名称:"> <FormItem label="版本名称:">
@ -150,315 +108,308 @@
</template> </template>
<script> <script>
import * as API_Setting from "@/api/setting"; import * as API_Setting from "@/api/setting";
import editor from "@/views/my-components/lili/editor";
export default {
name: "orderList",
components: {
export default { },
name: "orderList", data() {
components: { return {
editor queryModalVisible: false, // modal
}, queryModalTitle: "查看更新信息", // modal
data() { loading: true, //
return { modalVisible: false, // app
queryModalVisible: false, // modal modalTitle: "", // app
queryModalTitle: "查看更新信息", // modal modalType: 0, //
loading: true, // searchForm: {
modalVisible: false, // app //
modalTitle: "", // app pageNumber: 1, //
modalType: 0, // pageSize: 10, //
searchForm: { sort: "createTime", //
// order: "desc", //
pageNumber: 1, // type: "",
pageSize: 10, // },
sort: "createTime", // form: {
order: "desc", // //
type: "" versionName: "",
version: "",
forceUpdate: 1,
type: "IOS",
downloadUrl: "",
content: "",
versionUpdateDate: "",
},
versionUpdateDate: "", //
//
formValidate: {
version: [
{ required: true, message: "版本号不能为空", trigger: "blur" },
],
versionName: [
{ required: true, message: "版本名称不能为空", trigger: "blur" },
],
downloadUrl: [
{ required: true, message: "下载地址不能为空", trigger: "blur" },
],
versionUpdateDate: [{ required: true, message: "更新时间不能为空" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
{
title: "版本名称",
key: "versionName",
minWidth: 100,
}, },
form: { {
// title: "版本号",
versionName: "", key: "version",
version: "", minWidth: 120,
forceUpdate: 1,
type: "IOS",
downloadUrl: "",
content: "",
versionUpdateDate: ""
}, },
versionUpdateDate: "", // {
// title: "强制更新",
formValidate: { key: "forceUpdate",
version: [ width: 100,
{required: true, message: '版本号不能为空', trigger: 'blur'}, render: (h, params) => {
], return h(
versionName: [ "div",
{required: true, message: '版本名称不能为空', trigger: 'blur'}, {
], props: {
downloadUrl: [ color: params.row.forceUpdate ? "primary" : "default",
{required: true, message: '下载地址不能为空', trigger: 'blur'}, },
], },
versionUpdateDate: [{required: true, message: "更新时间不能为空"}], params.row.forceUpdate == 0 ? "非强制" : "强制"
);
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
{
title: "版本名称",
key: "versionName",
minWidth: 100,
}, },
{ },
title: "版本号", {
key: "version", title: "类型",
minWidth: 120, key: "type",
minWidth: 80,
render: (h, params) => {
if (params.row.type == "IOS") {
return h("div", [h("span", {}, "苹果")]);
} else {
return h("div", [h("span", {}, "安卓")]);
}
}, },
{ },
title: "强制更新",
key: "forceUpdate",
width: 100,
render: (h, params) => {
return h( {
"div", title: "更新时间",
key: "versionUpdateDate",
minWidth: 120,
sortable: true,
},
{
title: "操作",
key: "action",
align: "center",
width: 230,
render: (h, params) => {
return h("div", [
h(
"Button",
{ {
props: { props: {
color: params.row.forceUpdate ? "primary" : "default", type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.detail(params.row);
},
}, },
}, },
params.row.forceUpdate == 0 ? "非强制" : "强制" "查看"
); ),
h(
"Button",
{
} props: {
}, type: "info",
{ size: "small",
title: "类型", ghost: true,
key: "type", },
minWidth: 80, style: {
render: (h, params) => { marginRight: "5px",
if (params.row.type == "IOS") { },
return h('div', [h('span', {}, '苹果'),]); on: {
} else { click: () => {
return h('div', [h('span', {}, '安卓'),]); this.editAppVersion(params.row);
}
}
},
{
title: "更新时间",
key: "versionUpdateDate",
minWidth: 120,
sortable: true,
},
{
title: "操作",
key: "action",
align: "center",
width: 230,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.detail(params.row);
},
}, },
}, },
"查看" },
), "修改"
h( ),
"Button", h(
"Button",
{ {
props: { props: {
type: "info", type: "error",
size: "small", size: "small",
ghost:true },
}, style: {
style: { marginRight: "5px",
marginRight: "5px", },
}, on: {
on: { click: () => {
click: () => { this.remove(params.row);
this.editAppVersion(params.row);
},
}, },
}, },
"修改" },
), "删除"
h( ),
"Button", ]);
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
]);
},
}, },
], },
data: [], // ],
total: 0, // data: [], //
total: 0, //
};
},
methods: {
init() {
this.getData();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getData();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getData();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getData();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getData();
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getData() {
this.loading = true;
API_Setting.appVersionPage(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
//app
addAppVersion() {
this.modalVisible = true;
this.modalTitle = "添加APP版本信息";
const versionUpdateDate = this.$options.filters.unixToDate(
new Date() / 1000
);
this.form = {
forceUpdate: 0,
type: "IOS",
versionUpdateDate: versionUpdateDate,
content: " ",
}; };
}, },
methods: { //app
init() { editAppVersion(v) {
this.getData(); this.modalVisible = true;
}, this.modalTitle = "修改APP版本信息";
changePage(v) { this.modalType = 1;
this.searchForm.pageNumber = v; this.form = v;
this.getData(); },
}, //app
changePageSize(v) { saveAppVersion() {
this.searchForm.pageSize = v; this.$refs.form.validate((valid) => {
this.getData(); if (valid) {
}, this.submitLoading = true;
handleSearch() { const versionUpdateDate = this.$options.filters.unixToDate(
this.searchForm.pageNumber = 1; this.form.versionUpdateDate / 1000
this.searchForm.pageSize = 10; );
this.getData(); this.form.versionUpdateDate = versionUpdateDate;
}, this.form.updateTime = versionUpdateDate;
changeSort(e) { if (this.modalType == 0) {
this.searchForm.sort = e.key; // id
this.searchForm.order = e.order; delete this.form.id;
if (e.order === "normal") { API_Setting.addVersion(this.form).then((res) => {
this.searchForm.order = ""; this.submitLoading = false;
} if (res && res.success) {
this.getData(); this.$Message.success("添加成功");
}, this.modalVisible = false;
changeSelect(e) { this.getData();
this.selectList = e; }
this.selectCount = e.length; });
}, } else {
getData() { API_Setting.editVersion(this.form, this.form.id).then((res) => {
this.loading = true; this.submitLoading = false;
API_Setting.appVersionPage(this.searchForm).then((res) => { if (res && res.success) {
this.loading = false; this.$Message.success("修改成功");
if (res.success) { this.modalVisible = false;
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
//app
addAppVersion() {
this.modalVisible = true;
this.modalTitle = "添加APP版本信息"
const versionUpdateDate = this.$options.filters.unixToDate(
new Date() / 1000
);
this.form = {
forceUpdate: 0,
type: "IOS",
versionUpdateDate: versionUpdateDate,
content: " "
}
},
//app
editAppVersion(v) {
this.modalVisible = true;
this.modalTitle = "修改APP版本信息"
this.modalType = 1
this.form = v
},
//app
saveAppVersion() {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
const versionUpdateDate = this.$options.filters.unixToDate(
this.form.versionUpdateDate / 1000
);
this.form.versionUpdateDate = versionUpdateDate
this.form.updateTime = versionUpdateDate
if (this.modalType == 0) {
// id
delete this.form.id;
API_Setting.addVersion(this.form).then((res) => {
this.submitLoading = false;
if (res && res.success) {
this.$Message.success("添加成功");
this.modalVisible = false
this.getData();
}
});
} else {
API_Setting.editVersion(this.form, this.form.id).then((res) => {
this.submitLoading = false;
if (res && res.success) {
this.$Message.success("修改成功");
this.modalVisible = false
this.getData();
}
});
}
}
})
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
API_Setting.deleteVersion(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("删除成功");
this.getData(); this.getData();
} }
}); });
} }
}); }
}, });
detail(v) {
this.queryModalVisible = true
this.form = JSON.parse(JSON.stringify(v))
//
this.versionUpdateDate = this.form.versionUpdateDate
},
}, },
mounted() { remove(v) {
this.init(); this.$Modal.confirm({
title: "确认删除",
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
API_Setting.deleteVersion(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("删除成功");
this.getData();
}
});
},
});
}, },
}; detail(v) {
this.queryModalVisible = true;
this.form = JSON.parse(JSON.stringify(v));
//
this.versionUpdateDate = this.form.versionUpdateDate;
},
},
mounted() {
this.init();
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ivu-form-item { .ivu-form-item {
margin-bottom: 14px; margin-bottom: 14px;
vertical-align: top; vertical-align: top;
zoom: 1; zoom: 1;
} }
.search-form{ .search-form {
width: 100%; width: 100%;
} }
// //
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
</style> </style>

View File

@ -51,7 +51,7 @@ export const getDistributionSetting = (id, params) => {
//获取分销订单列表 //获取分销订单列表
export const getDistributionOrder = (params) => { export const getDistributionOrder = (params) => {
return getRequest('/distribution/order/getByPage', params) return getRequest('/distributionOrder', params)
} }

View File

@ -145,7 +145,7 @@ export const result = [
url: "", url: "",
children: null, children: null,
permTypes: [] permTypes: []
} }
] ]
}, },
{ {
@ -454,6 +454,20 @@ export const result = [
url: "", url: "",
permTypes: [], permTypes: [],
children: null children: null
},
{
name: "distributionOrder",
showAlways: true,
level: 2,
type: 0,
title: "分销订单",
path: "distributionOrder",
component: "distribution/distributionOrder",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null
} }
] ]
} }

View File

@ -0,0 +1,200 @@
<template>
<div class="search">
<Row>
<Col>
<Card>
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="订单编号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单编号" clearable style="width: 200px" />
</Form-item>
<Form-item label="订单时间">
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" style="width: 210px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<Row class="padding-row">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
</Row>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small"
show-total show-elevator show-sizer></Page>
</Row>
</Card>
</Col>
</Row>
</div>
</template>
<script>
import { getDistributionOrder } from "@/api/distribution";
import { orderStatusList } from "./dataJson";
export default {
name: "distributionOrder",
components: {},
data() {
return {
timeRange: [], //
orderStatusList, //
distributionId: this.$route.query.id, // id
openSearch: true, //
openTip: true, //
loading: true, //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
},
columns: [
{
title: "订单编号",
key: "orderSn",
minWidth: 120,
tooltip: true,
},
{
title: "实付金额",
key: "orderPrice",
width: 130,
sortable: false,
render: (h, params) => {
if (params.row.orderPrice == null) {
return h("div", this.$options.filters.unitPrice(0, "¥"));
} else {
return h(
"div",
this.$options.filters.unitPrice(params.row.orderPrice, "¥")
);
}
},
},
{
title: "退款金额",
key: "returnMoney",
width: 130,
sortable: false,
render: (h, params) => {
if (params.row.orderPrice == null) {
return h("div", this.$options.filters.unitPrice(0, "¥"));
} else {
return h(
"div",
this.$options.filters.unitPrice(params.row.returnMoney, "¥")
);
}
},
},
{
title: "商品名称",
key: "goodsName",
minWidth: 120,
tooltip: true,
},
{
title: "状态",
key: "distributionOrderStatus",
width: 100,
sortable: false,
render: (h, params) => {
if (params.row.distributionOrderStatus == "COMPLETE_CASH") {
return h("div", "提现完成");
} else if (params.row.distributionOrderStatus == "WAIT_BILL") {
return h("div", "待结算");
} else if (params.row.distributionOrderStatus == "WAIT_CASH") {
return h("div", "待提现");
}
},
},
{
title: "佣金金额",
key: "rebateGrade",
width: 120,
sortable: false,
render: (h, params) => {
if (params.row.rebateGrade == null) {
return h("div", this.$options.filters.unitPrice(0, "¥"));
} else {
return h(
"div",
this.$options.filters.unitPrice(params.row.rebateGrade, "¥")
);
}
},
},
{
title: "创建时间",
key: "createTime",
width: 180,
sortable: false,
},
],
data: [], //
total: 0, //
};
},
methods: {
init() {
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
getDataList() {
this.searchForm.distributionId = this.distributionId;
this.loading = true;
if (this.timeRange && this.timeRange[0]) {
let startTime = this.timeRange[0];
let endTime = this.timeRange[1];
this.searchForm.startTime = this.$options.filters.unixToDate(
startTime / 1000
);
this.searchForm.endTime = this.$options.filters.unixToDate(
endTime / 1000
);
}
console.log(this.searchForm);
//
getDistributionOrder(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
},
mounted() {
this.init();
},
watch: {
$route(e) {
this.distributionId = e.query.id ? e.query.id : undefined;
this.getDataList();
},
},
};
</script>
<style lang="scss" >
@import "@/styles/table-common.scss";
</style>