uview 更新

pull/2/head
Jruome 2023-05-16 18:22:32 +08:00
parent b71fff7e00
commit 19dd57f4dd
29 changed files with 1936 additions and 198 deletions

View File

@ -1,6 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 使用租户名,获得租户编号 // 使用店铺名,获得店铺编号
export function getTenantIdByName(name) { export function getTenantIdByName(name) {
return request({ return request({
url: '/system/tenant/get-id-by-name', url: '/system/tenant/get-id-by-name',
@ -11,7 +11,7 @@ export function getTenantIdByName(name) {
}) })
} }
// 创建租户 // 创建店铺
export function createTenant(data) { export function createTenant(data) {
return request({ return request({
url: '/system/tenant/create', url: '/system/tenant/create',
@ -20,7 +20,7 @@ export function createTenant(data) {
}) })
} }
// 更新租户 // 更新店铺
export function updateTenant(data) { export function updateTenant(data) {
return request({ return request({
url: '/system/tenant/update', url: '/system/tenant/update',
@ -29,7 +29,7 @@ export function updateTenant(data) {
}) })
} }
// 删除租户 // 删除店铺
export function deleteTenant(id) { export function deleteTenant(id) {
return request({ return request({
url: '/system/tenant/delete?id=' + id, url: '/system/tenant/delete?id=' + id,
@ -37,7 +37,7 @@ export function deleteTenant(id) {
}) })
} }
// 获得租户 // 获得店铺
export function getTenant(id) { export function getTenant(id) {
return request({ return request({
url: '/system/tenant/get?id=' + id, url: '/system/tenant/get?id=' + id,
@ -45,7 +45,7 @@ export function getTenant(id) {
}) })
} }
// 获得租户分页 // 获得店铺分页
export function getTenantPage(query) { export function getTenantPage(query) {
return request({ return request({
url: '/system/tenant/page', url: '/system/tenant/page',
@ -54,7 +54,7 @@ export function getTenantPage(query) {
}) })
} }
// 导出租户 Excel // 导出店铺 Excel
export function exportTenantExcel(query) { export function exportTenantExcel(query) {
return request({ return request({
url: '/system/tenant/export-excel', url: '/system/tenant/export-excel',

View File

@ -1,6 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 创建租户套餐 // 创建店铺套餐
export function createTenantPackage(data) { export function createTenantPackage(data) {
return request({ return request({
url: '/system/tenant-package/create', url: '/system/tenant-package/create',
@ -9,7 +9,7 @@ export function createTenantPackage(data) {
}) })
} }
// 更新租户套餐 // 更新店铺套餐
export function updateTenantPackage(data) { export function updateTenantPackage(data) {
return request({ return request({
url: '/system/tenant-package/update', url: '/system/tenant-package/update',
@ -18,7 +18,7 @@ export function updateTenantPackage(data) {
}) })
} }
// 删除租户套餐 // 删除店铺套餐
export function deleteTenantPackage(id) { export function deleteTenantPackage(id) {
return request({ return request({
url: '/system/tenant-package/delete?id=' + id, url: '/system/tenant-package/delete?id=' + id,
@ -26,7 +26,7 @@ export function deleteTenantPackage(id) {
}) })
} }
// 获得租户套餐 // 获得店铺套餐
export function getTenantPackage(id) { export function getTenantPackage(id) {
return request({ return request({
url: '/system/tenant-package/get?id=' + id, url: '/system/tenant-package/get?id=' + id,
@ -34,7 +34,7 @@ export function getTenantPackage(id) {
}) })
} }
// 获得租户套餐分页 // 获得店铺套餐分页
export function getTenantPackagePage(query) { export function getTenantPackagePage(query) {
return request({ return request({
url: '/system/tenant-package/page', url: '/system/tenant-package/page',
@ -43,7 +43,7 @@ export function getTenantPackagePage(query) {
}) })
} }
// 获取租户套餐精简信息列表 // 获取店铺套餐精简信息列表
export function getTenantPackageList() { export function getTenantPackageList() {
return request({ return request({
url: '/system/tenant-package/get-simple-list', url: '/system/tenant-package/get-simple-list',

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-form ref="editPram" :model="editPram" label-width="130px"> <el-form ref="editPram" :model="editPram" label-width="160px">
<el-form-item <el-form-item
label="分类名称" label="分类名称"
prop="name" prop="name"

View File

@ -66,7 +66,7 @@ export function removeRememberMe() {
localStorage.removeItem(RememberMeKey) localStorage.removeItem(RememberMeKey)
} }
// ========== 租户相关 ========== // ========== 店铺相关 ==========
const TenantIdKey = 'TENANT_ID' const TenantIdKey = 'TENANT_ID'
const TenantNameKey = 'TENANT_NAME' const TenantNameKey = 'TENANT_NAME'

View File

@ -37,7 +37,7 @@ service.interceptors.request.use(config => {
if (getAccessToken() && !isToken) { if (getAccessToken() && !isToken) {
config.headers['Authorization'] = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改 config.headers['Authorization'] = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改
} }
// 设置租户 // 设置店铺
if (getTenantEnable()) { if (getTenantEnable()) {
const tenantId = getTenantId(); const tenantId = getTenantId();
if (tenantId) { if (tenantId) {

View File

@ -174,7 +174,7 @@ export function getNowDateTime(timeStr) {
} }
/** /**
* 获得租户功能是否开启 * 获得店铺功能是否开启
*/ */
export function getTenantEnable() { export function getTenantEnable() {
// console.log("enable: " + process.env.VUE_APP_TENANT_ENABLE) // console.log("enable: " + process.env.VUE_APP_TENANT_ENABLE)

View File

@ -469,7 +469,8 @@ export default {
} }
if (this.ruleForm.noDelivery) { if (this.ruleForm.noDelivery) {
param.shippingTemplatesNoDeliveryRespVOS = this.ruleForm.shippingTemplatesNoDeliveryRespVOS.map(a => { param.shippingTemplatesNoDeliveryRespVOS = this.ruleForm.shippingTemplatesNoDeliveryRespVOS.map(a => {
return a.slice(0, 2).join(',') console.log(a)
return a.slice(1, 3).join(',')
}).join(',') }).join(',')
} }
if (this.type === 0) { if (this.type === 0) {

View File

@ -70,8 +70,8 @@
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="bindEdit(scope.row)" v-hasPermi="['admin:shipping:templates:info']"></el-button> <el-button type="text" size="small" @click="bindEdit(scope.row)" v-hasPermi="['deliverGoods:freightSet:update']"></el-button>
<el-button type="text" size="small" @click="bindDelete(scope.row)" v-hasPermi="['admin:shipping:templates:delete']"></el-button> <el-button type="text" size="small" @click="bindDelete(scope.row)" v-hasPermi="['deliverGoods:freightSet:delete']"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -23,7 +23,7 @@
<div> <div>
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
<el-form-item prop="tenantName" v-if="tenantEnable"> <el-form-item prop="tenantName" v-if="tenantEnable">
<el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'> <el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='店铺'>
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon"/> <svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon"/>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -162,18 +162,18 @@ export default {
} }
], ],
tenantName: [ tenantName: [
{required: true, trigger: "blur", message: "租户不能为空"}, {required: true, trigger: "blur", message: "店铺不能为空"},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
// debugger // debugger
getTenantIdByName(value).then(res => { getTenantIdByName(value).then(res => {
const tenantId = res.data; const tenantId = res.data;
if (tenantId && tenantId >= 0) { if (tenantId && tenantId >= 0) {
// //
setTenantId(tenantId) setTenantId(tenantId)
callback(); callback();
} else { } else {
callback('租户不存在'); callback('店铺不存在');
} }
}); });
}, },
@ -188,10 +188,10 @@ export default {
}; };
}, },
created() { created() {
// //
this.tenantEnable = getTenantEnable(); this.tenantEnable = getTenantEnable();
if (this.tenantEnable) { if (this.tenantEnable) {
getTenantIdByName(this.loginForm.tenantName).then(res => { // getTenantIdByName(this.loginForm.tenantName).then(res => { //
const tenantId = res.data; const tenantId = res.data;
if (tenantId && tenantId >= 0) { if (tenantId && tenantId >= 0) {
setTenantId(tenantId) setTenantId(tenantId)
@ -262,7 +262,7 @@ export default {
this.loading = true; this.loading = true;
let tenant = false; let tenant = false;
if (this.tenantEnable) { if (this.tenantEnable) {
await this.$prompt('请输入租户名称', "提示", { await this.$prompt('请输入店铺名称', "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消" cancelButtonText: "取消"
}).then(async ({value}) => { }).then(async ({value}) => {

View File

@ -0,0 +1,720 @@
<template>
<div class="divBox relative">
<el-card class="box-card">
<div class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form-item label="订单状态:" v-if="checkPermi(['trade:order:type'])">
<el-radio-group v-model="tableFrom.status" type="button" @change="seachList">
<el-radio-button label="all">全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
<el-radio-button label="unPaid">未支付 {{ '(' +orderChartType.unPaid?orderChartType.unPaid:0+ ')' }}</el-radio-button>
<el-radio-button label="notShipped">未发货 {{ '(' +orderChartType.notShipped?orderChartType.notShipped:0+ ')' }}</el-radio-button>
<el-radio-button label="spike">待收货 {{ '(' +orderChartType.spike?orderChartType.spike:0+ ')' }}</el-radio-button>
<el-radio-button label="bargain">待评价 {{ '(' +orderChartType.bargain?orderChartType.bargain:0+ ')' }}</el-radio-button>
<el-radio-button label="complete">交易完成 {{ '(' +orderChartType.complete?orderChartType.complete:0+ ')' }}</el-radio-button>
<el-radio-button label="toBeWrittenOff">待核销 {{ '(' +orderChartType.toBeWrittenOff?orderChartType.toBeWrittenOff:0+ ')' }}</el-radio-button>
<el-radio-button label="refunding">退款中 {{ '(' +orderChartType.refunding?orderChartType.refunding:0+ ')' }}</el-radio-button>
<el-radio-button label="refunded">已退款 {{ '(' +orderChartType.refunded?orderChartType.refunded:0+ ')' }}</el-radio-button>
<el-radio-button label="deleted">已删除 {{ '(' +orderChartType.deleted?orderChartType.deleted:0+ ')' }}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @change="onchangeTime" />
</el-form-item>
<!-- <el-form-item label="订单类型:" class="width100">
<el-select v-model="tableFrom.type" clearable placeholder="请选择" class="selWidth" @change="seachList">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="订单编号:" class="width100">
<el-input v-model="tableFrom.orderNo" placeholder="请输入订单编号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
<el-form-item label="商品名称:" class="width100">
<el-input v-model="tableFrom.orderNo" placeholder="请输入商品名称" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
<el-form-item label="商品编号:" class="width100">
<el-input v-model="tableFrom.orderNo" placeholder="请输入商品编号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
<el-form-item label="订单编号:" class="width100">
<el-input v-model="tableFrom.orderNo" placeholder="请输入订单编号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
<el-form-item label="收货人:" class="width100">
<el-input v-model="tableFrom.orderNo" placeholder="请输入收货人" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
<el-form-item label="收货电话:" class="width100">
<el-input v-model="tableFrom.orderNo" placeholder="请输入收货电话" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
<el-form-item class="width100">
<el-button size="small" @click="exports" v-hasPermi="['admin:export:excel:order']"></el-button>
</el-form-item>
</el-form>
</div>
</div>
</el-card>
<div class="mt20">
<!-- <cards-data :cardLists="cardLists" v-if="checkPermi(['admin:order:list:data'])"></cards-data> -->
</div>
<el-card class="box-card">
<el-table
v-loading="listLoading"
:data="tableData.data"
size="mini"
class="table"
highlight-current-row
:header-cell-style=" {fontWeight:'bold'}"
:row-key="(row)=>{ return row.orderId}"
>
<!-- @selection-change="handleSelectionChange" -->
<!-- <el-table-column
type="selection"
:reserve-selection="true"
width="55"
/> -->
<el-table-column
label="订单编号"
min-width="210"
>
<template slot-scope="scope">
<span style="display: block;" v-text="scope.row.orderId" />
<span v-show="scope.row.isDel" style="color: #ED4014;display: block;"></span>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="下单时间"
min-width="150"
/>
<el-table-column
prop="realName"
label="收货人"
min-width="100"
/>
<el-table-column
prop="orderType"
label="卖家id"
min-width="110"
/>
<el-table-column
label="商品信息"
min-width="400"
>
<template slot-scope="scope">
<el-popover trigger="hover" placement="right" :open-delay="800">
<div v-if=" scope.row.productList && scope.row.productList.length" slot="reference">
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;">
<div class="demo-image__preview mr10">
<el-image
:src="val.info.image"
:preview-src-list="[val.info.image]"
/>
</div>
<div class="text_overflow">
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.sku ? val.info.sku:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
</div>
</div>
</div>
<div class="pup_card" v-if=" scope.row.productList && scope.row.productList.length">
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;">
<div class="">
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.sku ? val.info.sku:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
</div>
</div>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column
prop="payPrice"
label="实际支付"
min-width="80"
/>
<el-table-column
label="支付方式"
min-width="80"
>
<template slot-scope="scope">
<span>{{ scope.row.payTypeStr }}</span>
</template>
</el-table-column>
<el-table-column
label="订单状态"
min-width="100"
>
<template slot-scope="scope">
<div>
<div v-if="scope.row.refundStatus === 1 || scope.row.refundStatus === 2" class="refunding" >
<template>
<el-popover trigger="hover" placement="left" :open-delay="800">
<b style="color: #f124c7;" slot="reference">{{scope.row.statusStr.value}}</b>
<div class="pup_card flex-column">
<span>退款原因{{scope.row.refundReasonWap}}</span>
<span>备注说明{{scope.row.refundReasonWapExplain}}</span>
<span>退款时间{{scope.row.refundReasonTime}}</span>
<span class="acea-row">
退款凭证
<template v-if="scope.row.refundReasonWapImg">
<div v-for="(item, index) in scope.row.refundReasonWapImg.split(',')" :key="index" class="demo-image__preview" style="width: 35px;height: auto;display: inline-block;">
<el-image
:src="item"
:preview-src-list="[item]"
/>
</div>
</template>
<span v-else style="display: inline-block"></span>
</span>
</div>
</el-popover>
</template>
</div>
<span v-else>{{ scope.row.statusStr.value }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.paid === false" type="text" size="small" @click="edit(scope.row)" class="mr10" v-hasPermi="['admin:order:update:price']"></el-button>
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.refundStatus ===0" type="text" size="small" class="mr10" @click="sendOrder(scope.row)" v-hasPermi="['admin:order:send']"></el-button>
<el-button v-if=" scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" v-hasPermi="['admin:order:write:update']" @click="onWriteOff(scope.row)"></el-button>
<el-dropdown trigger="click">
<span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onOrderDetails(scope.row.orderId)" v-if="checkPermi(['admin:order:info'])"></el-dropdown-item>
<el-dropdown-item @click.native="onOrderLog(scope.row.orderId)" v-if="checkPermi(['admin:order:status:list'])"></el-dropdown-item>
<el-dropdown-item @click.native="onOrderMark(scope.row)" v-if="checkPermi(['admin:order:mark'])"></el-dropdown-item>
<el-dropdown-item v-if="scope.row.refundStatus === 1 && checkPermi(['admin:order:refund:refuse'])" @click.native="onOrderRefuse(scope.row)">退</el-dropdown-item>
<!--v-show="((scope.row.statusStr.key !== 'refunded' && scope.row.statusStr.key !== 'unPaid') && (parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice))) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)"-->
<el-dropdown-item v-if="scope.row.refundStatus === 1 && checkPermi(['admin:order:refund'])" @click.native="onOrderRefund(scope.row)" >立即退款</el-dropdown-item>
<el-dropdown-item v-if="scope.row.statusStr.key === 'deleted' && checkPermi(['admin:order:delete'])" @click.native="handleDelete(scope.row, scope.$index)"></el-dropdown-item>
<el-dropdown-item v-if="scope.row.statusStr.key !== 'unPaid'" @click.native="onOrderPrint(scope.row)" >打印小票</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:page-sizes="[20, 40, 60, 80]"
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-card>
<!--编辑-->
<el-dialog
title="编辑订单"
:visible.sync="dialogVisible"
width="500px"
:before-close="handleClose">
<zb-parser
v-if="dialogVisible"
:form-id="104"
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
</el-dialog>
<!--记录-->
<el-dialog
title="操作记录"
:visible.sync="dialogVisibleJI"
width="700px"
>
<el-table
v-loading="LogLoading"
border
:data="tableDataLog.data"
style="width: 100%"
>
<el-table-column
prop="oid"
align="center"
label="ID"
min-width="80"
/>
<el-table-column
prop="changeMessage"
label="操作记录"
align="center"
min-width="280"
/>
<el-table-column
prop="createTime"
label="操作时间"
align="center"
min-width="280"
/>
</el-table>
<div class="block">
<el-pagination
:page-sizes="[10, 20, 30, 40]"
:page-size="tableFromLog.limit"
:current-page="tableFromLog.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableDataLog.total"
@size-change="handleSizeChangeLog"
@current-change="pageChangeLog"
/>
</div>
</el-dialog>
<!--详情-->
<details-from ref="orderDetail" :orderId="orderId"/>
<!-- 发送货 -->
<order-send ref="send" :orderId="orderId" @submitFail="getList"></order-send>
<!-- 发送货视频号商品 -->
<order-video-send ref="videoSend" :orderId="orderId" @submitFail="getList"></order-video-send>
<!--拒绝退款-->
<el-dialog
title="拒绝退款原因"
v-if="RefuseVisible"
:visible.sync="RefuseVisible"
width="500px"
:before-close="RefusehandleClose">
<zb-parser
:form-id="106"
:is-create="1"
:edit-data="RefuseData"
@submit="RefusehandlerSubmit"
@resetForm="resetFormRefusehand"
/>
</el-dialog>
<!--立即退款-->
<el-dialog
title="退款处理"
:visible.sync="refundVisible"
width="500px"
:before-close="refundhandleClose">
<zb-parser
:form-id="107"
:is-create="1"
:edit-data="refundData"
@submit="refundhandlerSubmit"
v-if="refundVisible"
@resetForm="resetFormRefundhandler"
/>
</el-dialog>
</div>
</template>
<script>
import { orderListDataApi, orderStatusNumApi, writeUpdateApi, orderListApi, updatePriceApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi,orderPrint } from '@/api/cremb/order'
import cardsData from '@/components/cards/index'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
import detailsFrom from './orderDetail'
import orderSend from './orderSend'
import orderVideoSend from './orderVideoSend'
import { storeStaffListApi } from '@/api/storePoint'
import Cookies from 'js-cookie'
import { isWriteOff } from "@/utils";
import {orderExcelApi} from '@/api/cremb/store'
import { checkPermi } from "@/utils/permission"; //
export default {
name: 'orderlistDetails',
components: {
cardsData,
zbParser,
detailsFrom,
orderSend,
orderVideoSend
},
data() {
return {
RefuseVisible: false,
RefuseData:{},
orderId: '',
refundVisible: false,
refundData: {},
dialogVisibleJI: false,
tableDataLog: {
data: [],
total: 0
},
tableFromLog: {
page: 1,
limit: 10,
orderNo: 0
},
LogLoading: false,
isCreate: 1,
editData: null,
dialogVisible: false,
tableData: {
data: [],
total: 0
},
listLoading: true,
tableFrom: {
status: 'all',
dateLimit: '',
orderNo: '',
page: 1,
limit: 10,
type: 0
},
orderChartType: {},
timeVal: [],
fromList: this.$constants.fromList,
fromType:[
{value:'all',text:'全部'},
{value:'info',text:'普通'},
{value:'pintuan',text:'拼团'},
{value:'bragin',text:'砍价'},
{value:'miaosha',text:'秒杀'},
],
selectionList: [],
ids: '',
orderids: '',
cardLists: [],
isWriteOff: isWriteOff(),
proType: 0,
active:false,
}
},
mounted() {
this.getList();
this.getOrderStatusNum();
// this.getOrderListData();
},
methods: {
checkPermi,
resetFormRefundhandler(){
this.refundVisible = false
},
resetFormRefusehand(){
this.RefuseVisible = false
},
resetForm(formValue) {
this.dialogVisible = false
},
//
onWriteOff(row) {
this.$modalSure('核销订单吗').then(() => {
writeUpdateApi(row.verifyCode).then(() => {
this.$message.success('核销成功')
this.tableFrom.page = 1
this.getList()
})
})
},
seachList() {
this.tableFrom.page = 1
this.getList()
this.getOrderStatusNum()
},
// 退
RefusehandleClose() {
this.RefuseVisible = false
},
onOrderRefuse(row) {
this.orderids = row.orderId
this.RefuseData = {
orderId: row.orderId,
reason: ''
}
this.RefuseVisible = true
},
RefusehandlerSubmit(formValue) {
orderRefuseApi({ orderNo: this.orderids, reason: formValue.reason}).then(data => {
this.$message.success('操作成功')
this.RefuseVisible = false
this.getList()
})
},
// 退
refundhandleClose() {
this.refundVisible = false
},
onOrderRefund(row) {
this.refundData = {
orderId: row.orderId,
amount: row.payPrice,
type: ''
}
this.orderids = row.orderId
this.refundVisible = true
},
refundhandlerSubmit(formValue) {
orderRefundApi({ amount: formValue.amount, orderNo: this.orderids}).then(data => {
this.$message.success('操作成功')
this.refundVisible = false
this.getList()
})
},
//
sendOrder(row) {
if(row.type===0){
this.$refs.send.modals = true;
this.$refs.send.getList();
this.$refs.send.sheetInfo();
}else{
this.$refs.videoSend.modals = true;
if(!JSON.parse(sessionStorage.getItem('videoExpress'))) this.$refs.videoSend.companyGetList();
}
this.orderId = row.orderId;
},
//
handleDelete(row, idx) {
if (row.isDel) {
this.$modalSure().then(() => {
orderDeleteApi({ orderNo: row.orderId }).then(() => {
this.$message.success('删除成功')
this.tableData.data.splice(idx, 1)
})
})
} else {
this.$confirm('您选择的的订单存在用户未删除的订单,无法删除用户未删除的订单!', '提示', {
confirmButtonText: '确定',
type: 'error'
})
}
},
//
onOrderDetails(id) {
this.orderId = id
this.$refs.orderDetail.getDetail(id)
this.$refs.orderDetail.dialogVisible = true
},
//
onOrderLog(id) {
this.dialogVisibleJI = true
this.LogLoading = true
this.tableFromLog.orderNo = id
orderLogApi( this.tableFromLog ).then(res => {
this.tableDataLog.data = res.list
this.tableDataLog.total = res.total
this.LogLoading = false
}).catch(() => {
this.LogLoading = false
})
},
pageChangeLog(page) {
this.tableFromLog.page = page
this.onOrderLog()
},
handleSizeChangeLog(val) {
this.tableFromLog.limit = val
this.onOrderLog()
},
handleClose() {
this.dialogVisible = false;
},
//
onOrderMark(row) {
this.$prompt('订单备注', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputErrorMessage: '请输入订单备注',
inputType: 'textarea',
inputValue: row.remark,
inputPlaceholder: '请输入订单备注',
inputValidator: (value) => { if(!value) return '输入不能为空'}
}).then(({value}) => {
orderMarkApi({ mark : value, orderNo: row.orderId}).then(() => {
this.$message.success('操作成功')
this.getList();
})
}).catch(() => {
this.$message.info('取消输入')
})
},
handleSelectionChange(val) {
this.selectionList = val
const data = []
this.selectionList.map((item) => {
data.push(item.orderId)
})
this.ids = data.join(',')
},
//
selectChange (tab) {
this.timeVal = [];
this.tableFrom.page = 1
this.getList();
this.getOrderStatusNum();
// this.getOrderListData();
},
//
onchangeTime (e) {
this.timeVal = e;
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
this.tableFrom.page = 1
this.getList();
this.getOrderStatusNum();
// this.getOrderListData();
},
//
edit(row) {
this.orderId = row.orderId
this.editData = {
orderId: row.orderId,
totalPrice: row.totalPrice,
totalPostage: row.totalPostage,
payPrice: row.payPrice,
payPostage: row.payPostage,
gainIntegral: row.gainIntegral,
}
this.dialogVisible = true
},
handlerSubmit(formValue) {
let data = {
orderNo:formValue.orderId,
payPrice:formValue.payPrice
}
updatePriceApi(data).then(data => {
this.$message.success('编辑数据成功')
this.dialogVisible = false
this.getList()
})
},
//
getList() {
this.listLoading = true
orderListApi(this.tableFrom).then(res => {
this.tableData.data = res.data.list || [];
this.tableData.total = res.data.total;
this.listLoading = false
this.checkedCities = this.$cache.local.has('order_stroge') ? this.$cache.local.getJSON('order_stroge') : this.checkedCities;
}).catch(() => {
this.listLoading = false
})
},
//
getOrderListData() {
orderListDataApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
this.cardLists = [
{ name: '订单数量', count: res.count,color:'#1890FF',class:'one',icon:'icondingdan' },
{ name: '订单金额', count: res.amount, color:'#A277FF',class:'two',icon:'icondingdanjine' },
{ name: '微信支付金额', count: res.weChatAmount, color:'#EF9C20',class:'three',icon:'iconweixinzhifujine' },
{ name: '余额支付金额', count: res.yueAmount,color:'#1BBE6B',class:'four',icon:'iconyuezhifujine2' }
]
});
},
//
getOrderStatusNum() {
orderStatusNumApi({dateLimit:this.tableFrom.dateLimit,type:this.tableFrom.type}).then(res => {
this.orderChartType = res;
});
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
},
exports(){
let data = {
dateLimit:this.tableFrom.dateLimit,
orderNo:this.tableFrom.orderNo,
status:this.tableFrom.status,
type:this.tableFrom.type
};
orderExcelApi(data).then(res=>{
window.open(res.fileName);
})
},
//
onOrderPrint(data){
orderPrint(data.orderId).then(res=>{
this.$modal.msgSuccess('打印成功');
}).catch(error=>{
this.$modal.msgError(error.message)
})
}
}
}
</script>
<style lang="scss" scoped>
.el-table__body {
width: 100%;
table-layout: fixed !important;
}
.demo-table-expand{
::v-deeplabel{
width: 83px !important;
}
}
.refunding{
span{
display: block;
}
}
.selWidth{
width: 300px;
}
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
font-size: 12px;
}
.el-icon-arrow-down {
font-size: 12px;
}
.tabBox_tit {
font-size: 12px !important;
/*margin: 0 2px 0 10px;*/
letter-spacing: 1px;
/*padding: 5px 0;*/
box-sizing: border-box;
}
.text_overflow{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 400px;
}
.pup_card{
width: 200px;
border-radius: 5px;
padding: 5px;
box-sizing: border-box;
font-size: 12px;
line-height: 16px;
}
.flex-column{
display: flex;
flex-direction: column;
}
.mt20{
margin-top:20px
}
.relative{
position: relative;
}
</style>

View File

@ -0,0 +1,220 @@
<template>
<div>
<el-dialog
title="订单信息"
:visible.sync="dialogVisible"
width="700px"
v-if="orderDatalist"
>
<div class="description" v-loading="loading">
<div class="title">用户信息</div>
<div class="acea-row">
<div class="description-term">用户昵称{{orderDatalist.nikeName}}</div>
<div class="description-term">绑定电话{{orderDatalist.phone ? orderDatalist.phone : '无'}}</div>
</div>
<el-divider></el-divider>
<div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div>
<div class="acea-row">
<div class="description-term">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货人': '收货人'}}{{orderDatalist.realName}}</div>
<div class="description-term">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货电话': '收货电话'}}{{orderDatalist.userPhone}}</div>
<div class="description-term" v-if="orderDatalist.statusStr.key !== 'toBeWrittenOff'">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'': ''}}{{orderDatalist.userAddress}}</div>
</div>
<el-divider></el-divider>
<div class="title">订单信息</div>
<div class="acea-row">
<div class="description-term">订单编号{{orderDatalist.orderId}}</div>
<div class="description-term" style="color: red">订单状态{{orderDatalist.statusStr.value}}</div>
<div class="description-term">商品总数{{orderDatalist.totalNum}}</div>
<div class="description-term">商品总价{{orderDatalist.proTotalPrice}}</div>
<div class="description-term">支付邮费{{orderDatalist.payPostage}}</div>
<div class="description-term">优惠券金额{{orderDatalist.couponPrice}}</div>
<div class="description-term">实际支付{{orderDatalist.payPrice}}</div>
<div class="description-term">抵扣金额{{orderDatalist.deductionPrice}}</div>
<div class="description-term fontColor3" v-if="orderDatalist.refundPrice">退{{orderDatalist.refundPrice}}</div>
<div class="description-term" v-if="orderDatalist.useIntegral">使{{orderDatalist.useIntegral}}</div>
<div class="description-term" v-if="orderDatalist.backIntegral">退{{orderDatalist.backIntegral}}</div>
<div class="description-term">创建时间{{orderDatalist.createTime}}</div>
<div class="description-term" v-if="orderDatalist.refundReasonTime">退{{orderDatalist.refundReasonTime}}</div>
<div class="description-term">支付方式{{orderDatalist.payTypeStr}}</div>
<div class="description-term">推广人{{orderDatalist.spreadName | filterEmpty}}</div>
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">{{orderDatalist.storeName}}</div>
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">{{orderDatalist.user_phone}}</div>
<div class="description-term">商家备注{{orderDatalist.remark}}</div>
<template v-if="orderDatalist.statusStr.key === 'toBeWrittenOff' && orderDatalist.systemStore">
<div class="description-term">提货码{{orderDatalist.verifyCode}}</div>
<div class="description-term">门店名称{{orderDatalist.systemStore.name}}</div>
<div class="description-term">门店电话{{orderDatalist.systemStore.phone}}</div>
<div class="description-term">门店地址{{orderDatalist.systemStore.address + orderDatalist.systemStore.detailedAddress}}</div>
</template>
</div>
<template v-if="orderDatalist.deliveryType === 'express'">
<el-divider></el-divider>
<div class="title">物流信息</div>
<div class="acea-row">
<div class="description-term">快递公司{{orderDatalist.deliveryName}}</div>
<div class="description-term">快递单号{{orderDatalist.deliveryId}}
<el-button type="primary" size="mini" @click="openLogistics" style="margin-left: 5px" v-hasPermi="['admin:order:logistics:info']"></el-button>
</div>
</div>
</template>
<template v-if="orderDatalist.deliveryType === 'send'">
<el-divider></el-divider>
<div class="title">配送信息</div>
<div class="acea-row">
<div class="description-term">送货人姓名{{orderDatalist.deliveryName}}</div>
<div class="description-term">送货人电话{{orderDatalist.deliveryId}}</div>
</div>
</template>
<template v-if="orderDatalist.mark">
<el-divider></el-divider>
<div class="title">用户备注</div>
<div class="acea-row">
<div class="description-term">{{orderDatalist.mark}}</div>
</div>
</template>
</div>
</el-dialog>
<el-dialog
v-if="orderDatalist"
title="提示"
:visible.sync="modal2"
width="30%">
<div class="logistics acea-row row-top">
<div class="logistics_img"><img src="@/assets/imgs/expressi.jpg"></div>
<div class="logistics_cent">
<span class="mb10">物流公司{{orderDatalist.deliveryName}}</span>
<span>物流单号{{orderDatalist.deliveryId}}</span>
</div>
</div>
<div class="acea-row row-column-around trees-coadd">
<div class="scollhide">
<el-timeline :reverse="reverse">
<el-timeline-item v-for="(item,i) in result" :key="i">
<p class="time" v-text="item.time"></p>
<p class="content" v-text="item.status"></p>
</el-timeline-item>
</el-timeline >
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="modal2 = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>0
import { orderDetailApi, getLogisticsInfoApi } from '@/api/cremb/order'
export default {
name: 'OrderDetail',
props: {
orderId: {
type: String,
default: 0
}
},
data() {
return {
reverse: true,
dialogVisible: false,
orderDatalist: null,
loading: false,
modal2: false,
result: []
}
},
mounted() {
},
methods: {
openLogistics () {
this.getOrderData()
this.modal2 = true;
},
//
getOrderData () {
getLogisticsInfoApi({orderNo:this.orderId}).then(async res => {
this.result = res.list;
})
},
getDetail(id) {
this.loading = true
orderDetailApi({orderNo: id}).then(res => {
this.orderDatalist = res
this.loading = false
}).catch(() => {
this.orderDatalist = null
this.loading = false
})
}
}
}
</script>
<style scoped lang="scss">
.logistics {
align-items: center;
padding: 10px 0px;
.logistics_img {
width: 45px;
height: 45px;
margin-right: 12px;
img {
width: 100%;
height: 100%;
}
}
.logistics_cent {
span {
display: block;
font-size: 12px;
}
}
}
.trees-coadd {
width: 100%;
height: 400px;
border-radius: 4px;
overflow: hidden;
.scollhide {
width: 100%;
height: 100%;
overflow: auto;
margin-left: 18px;
padding: 10px 0 10px 0;
box-sizing: border-box;
.content {
font-size: 12px;
}
.time {
font-size: 12px;
color: #2d8cf0;
}
}
}
.title {
margin-bottom: 14px;
color: #303133;
font-weight: 500;
font-size: 14px;
}
.description {
&-term {
display: table-cell;
padding-bottom: 5px;
line-height: 20px;
width: 50%;
font-size: 12px;
color: #606266;
}
::v-deep .el-divider--horizontal {
margin: 12px 0 !important;
}
}
</style>

View File

@ -0,0 +1,252 @@
<template>
<el-dialog :visible.sync="modals" title="发送货" class="order_box" :before-close="handleClose" width="600px">
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent :rules="rules">
<el-form-item label="选择类型:">
<el-radio-group v-model="formItem.type" @change="changeRadioType(formItem.type)">
<el-radio label="1">发货</el-radio>
<el-radio label="2">送货</el-radio>
<el-radio label="3">虚拟</el-radio>
</el-radio-group>
</el-form-item>
<div v-if="formItem.type==='1'">
<el-form-item label="发货类型:" prop="expressId">
<el-radio-group v-model="formItem.expressRecordType" @change="changeRadio(formItem.expressRecordType)">
<el-radio label="1">手动填写</el-radio>
<el-radio label="2" v-if="checkPermi(['admin:order:sheet:info'])"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="快递公司:" prop="expressCode">
<el-select v-model="formItem.expressCode" filterable style="width:80%;"
@change="onChangeExport(formItem.expressCode)">
<el-option v-for="(item,i) in express" :value="item.code" :key="i" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="formItem.expressRecordType === '1'" label="快递单号:" prop="expressNumber">
<el-input v-model="formItem.expressNumber" placeholder="请输入快递单号" style="width:80%;"></el-input>
</el-form-item>
<template v-if="formItem.expressRecordType === '2'">
<el-form-item label="电子面单:" class="express_temp_id" prop="expressTempId">
<div class="acea-row">
<el-select v-model="formItem.expressTempId" placeholder="请选择电子面单"
:class="[formItem.expressTempId?'width9':'width8']" @change="onChangeImg">
<el-option v-for="(item,i) in exportTempList" :value="item.temp_id" :key="i"
:label="item.title"></el-option>
</el-select>
<div v-if="formItem.expressTempId" style="position: relative;">
<!--<span class="tempImg" @click="">预览</span>-->
<div class="tempImgList ml10">
<div class="demo-image__preview">
<el-image
style="width: 36px; height: 36px"
:src="tempImg"
:preview-src-list="[tempImg]"
/>
</div>
</div>
</div>
<!--<Button v-if="formItem.expressTempId" type="text" @click="preview"></Button>-->
</div>
</el-form-item>
<el-form-item label="寄件人姓名:" prop="toName">
<el-input v-model="formItem.toName" placeholder="请输入寄件人姓名" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="寄件人电话:" prop="toTel">
<el-input v-model="formItem.toTel" placeholder="请输入寄件人电话" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="寄件人地址:" prop="toAddr">
<el-input v-model="formItem.toAddr" placeholder="请输入寄件人地址" style="width:80%;"></el-input>
</el-form-item>
</template>
</div>
<div v-if="formItem.type==='2'">
<el-form-item label="送货人姓名:" prop="deliveryName">
<el-input v-model="formItem.deliveryName" placeholder="请输入送货人姓名" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="送货人电话:" prop="deliveryTel">
<el-input v-model="formItem.deliveryTel" placeholder="请输入送货人电话" style="width:80%;"></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="" >
<div style="color:#CECECE;">顺丰请输入单号收件人或寄件人手机号后四位</div>
<div style="color:#CECECE;">例如SF000000000000:3941</div>
</el-form-item>
</div>
</el-form>
<div slot="footer">
<el-button type="primary" @click="putSend('formItem')"></el-button>
<el-button @click="cancel('formItem')"></el-button>
</div>
</el-dialog>
</template>
<script>
import {orderSendApi, sheetInfoApi} from '@/api/cremb/order'
import {expressAllApi, exportTempApi} from '@/api/cremb/sms'
import { checkPermi } from "@/utils/permission"; //
import {Debounce} from '@/utils/validate'
const validatePhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('请填写手机号'));
} else if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('手机号格式不正确!'));
} else {
callback();
}
};
export default {
name: 'orderSend',
props: {
orderId: String
},
data() {
return {
formItem: {
type: '1',
expressRecordType: '1',
expressId: '',
expressCode: '',
deliveryName: '',
deliveryTel: '',
// expressName: '',
expressNumber: '',
expressTempId: '',
toAddr: '',
toName: '',
toTel: '',
orderNo: ''
},
modals: false,
express: [],
exportTempList: [],
tempImg: '',
rules: {
toName: [
{required: true, message: '请输寄件人姓名', trigger: 'blur'}
],
toTel: [
{required: true, validator: validatePhone, trigger: 'blur'}
],
toAddr: [
{required: true, message: '请输入寄件人地址', trigger: 'blur'}
],
expressCode: [
{required: true, message: '请选择快递公司', trigger: 'change'}
],
expressNumber: [
{required: true, message: '请输入快递单号', trigger: 'blur'}
],
expressTempId: [
{required: true, message: '请选择电子面单', trigger: 'change'}
],
deliveryName: [
{required: true, message: '请输入送货人姓名', trigger: 'blur'}
],
deliveryTel: [
{required: true, validator: validatePhone, trigger: 'blur'}
]
},
expressType: 'normal'
}
},
mounted() {
},
methods: {
checkPermi,
//
sheetInfo() {
sheetInfoApi().then(async res => {
this.formItem.toAddr = res.exportToAddress || '';
this.formItem.toName = res.exportToName || '';
this.formItem.toTel = res.exportToTel || '';
})
},
//
onChangeExport(val) {
this.formItem.expressTempId = '';
if (this.formItem.expressRecordType === '2') this.exportTemp(val);
},
//
exportTemp(val) {
exportTempApi({com: val}).then(async res => {
this.exportTempList = res.data.data || [];
})
},
onChangeImg(item) {
this.exportTempList.map(i => {
if (i.temp_id === item) this.tempImg = i.pic
})
},
changeRadioType() {
this.formItem.expressId = ''
this.formItem.expressCode = ''
},
changeRadio(o) {
if (o == 2){
this.expressType = 'elec'
}else{
this.expressType = 'normal'
}
this.formItem.expressId = ''
this.formItem.expressCode = ''
this.getList();
},
//
getList() {
expressAllApi({type: this.expressType}).then(async res => {
this.express = res
})
},
//
putSend:Debounce(function(name) {
this.formItem.orderNo = this.orderId;
this.$refs[name].validate((valid) => {
if (valid) {
orderSendApi(this.formItem).then(async => {
this.$message.success('发送货成功');
this.modals = false;
this.$refs[name].resetFields();
this.$emit('submitFail')
})
} else {
this.$message.error('请填写信息');
}
})
}),
handleClose() {
this.cancel('formItem');
},
cancel(name) {
this.modals = false;
this.$refs[name].resetFields();
this.formItem.type = '1';
this.formItem.expressRecordType = '1';
}
}
}
</script>
<style scoped lang="scss">
.width8 {
width: 80%;
}
.width9 {
width: 70%;
}
.tempImgList {
// opacity: 1;
width: 38px !important;
height: 30px !important;
// margin-top: -30px;
cursor: pointer;
position: absolute;
z-index: 11;
img {
width: 38px !important;
height: 30px !important;
}
}
</style>

View File

@ -0,0 +1,121 @@
<template>
<el-dialog :visible.sync="modals" title="发送货" class="order_box" :before-close="handleClose" width="600px">
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent :rules="rules">
<el-form-item label="快递公司:" prop="expressCode">
<el-select v-model="formItem.deliveryId" filterable style="width:80%;">
<el-option v-for="(item,i) in express" :value="item.deliveryId" :key="i" :label="item.deliveryName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="快递单号:" prop="waybillId">
<el-input v-model="formItem.waybillId" placeholder="请输入快递单号" style="width:80%;"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button size="mini" type="primary" @click="putSend('formItem')" v-hasPermi="['admin:order:video:send']"></el-button>
<el-button size="mini" @click="cancel('formItem')"></el-button>
</div>
</el-dialog>
</template>
<script>
import {videoSendApi, sheetInfoApi, companyGetListApi} from '@/api/cremb/order'
import {Debounce} from '@/utils/validate'
const validatePhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('请填写手机号'));
} else if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('手机号格式不正确!'));
} else {
callback();
}
};
export default {
name: 'orderSend',
props: {
orderId: String
},
data() {
return {
formItem: {
deliveryId: '',
orderNo: '',
waybillId: ''
},
modals: false,
express: [],
exportTempList: [],
tempImg: '',
rules: {
deliveryId: [
{required: true, message: '请选择快递公司', trigger: 'change'}
],
waybillId: [
{required: true, message: '请输入快递单号', trigger: 'blur'}
]
},
expressType: 'normal'
}
},
mounted() {
this.express = JSON.parse(sessionStorage.getItem('videoExpress'));
},
methods: {
//
companyGetList() {
companyGetListApi().then(async res => {
this.express = res;
sessionStorage.setItem('videoExpress', JSON.stringify(res))
})
},
//
putSend:Debounce(function(name) {
this.formItem.orderNo = this.orderId;
this.$refs[name].validate((valid) => {
if (valid) {
videoSendApi(this.formItem).then(async => {
this.$message.success('发送货成功');
this.modals = false;
this.$refs[name].resetFields();
this.$emit('submitFail')
})
} else {
this.$message.error('请填写信息');
}
})
}),
handleClose() {
this.cancel('formItem');
},
cancel(name) {
this.modals = false;
this.$refs[name].resetFields();
this.formItem.type = '1';
this.formItem.expressRecordType = '1';
}
}
}
</script>
<style scoped lang="scss">
.width8 {
width: 80%;
}
.width9 {
width: 70%;
}
.tempImgList {
// opacity: 1;
width: 38px !important;
height: 30px !important;
// margin-top: -30px;
cursor: pointer;
position: absolute;
z-index: 11;
img {
width: 38px !important;
height: 30px !important;
}
}
</style>

View File

@ -4,7 +4,7 @@
<div class="clearfix"> <div class="clearfix">
<div class="container"> <div class="container">
<el-form size="small" label-width="100px"> <el-form size="small" label-width="100px">
<el-form-item label="订单状态:" v-if="checkPermi(['admin:order:status:num'])"> <el-form-item label="订单状态:" v-if="checkPermi(['trade:order:type'])">
<el-radio-group v-model="tableFrom.status" type="button" @change="seachList"> <el-radio-group v-model="tableFrom.status" type="button" @change="seachList">
<el-radio-button label="all">全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button> <el-radio-button label="all">全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
<el-radio-button label="unPaid">未支付 {{ '(' +orderChartType.unPaid?orderChartType.unPaid:0+ ')' }}</el-radio-button> <el-radio-button label="unPaid">未支付 {{ '(' +orderChartType.unPaid?orderChartType.unPaid:0+ ')' }}</el-radio-button>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<doc-alert title="SaaS 多租户" url="https://doc.iocoder.cn/saas-tenant/" /> <doc-alert title="SaaS 多店铺" url="https://doc.iocoder.cn/saas-tenant/" />
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="套餐名" prop="name"> <el-form-item label="套餐名" prop="name">
@ -108,7 +108,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
list: [], list: [],
// //
title: "", title: "",
@ -195,7 +195,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加租户套餐"; this.title = "添加店铺套餐";
// 使 // 使
this.menuCheckStrictly = false; this.menuCheckStrictly = false;
}, },
@ -204,7 +204,7 @@ export default {
this.reset(); this.reset();
const id = row.id; const id = row.id;
this.open = true; this.open = true;
this.title = "修改租户套餐"; this.title = "修改店铺套餐";
// //
getTenantPackage(id).then(response => { getTenantPackage(id).then(response => {
this.form = response.data; this.form = response.data;
@ -258,7 +258,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除租户套餐编号为"' + id + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除店铺套餐编号为"' + id + '"的数据项?').then(function() {
return deleteTenantPackage(id); return deleteTenantPackage(id);
}).then(() => { }).then(() => {
this.getList(); this.getList();

View File

@ -26,8 +26,8 @@ export function _toLogin(push, pathLogin) {
path = location.pathname + location.search; path = location.pathname + location.search;
// #endif // #endif
if(!pathLogin){ if(!pathLogin){
pathLogin = '/page/users/login/index' // pathLogin = '/page/users/login/index'
Cache.set('login_back_url',path); // Cache.set('login_back_url',path);
} }
// #ifdef H5 // #ifdef H5
@ -49,9 +49,9 @@ export function _toLogin(push, pathLogin) {
} }
} else { } else {
if (['/pages/user/index'].indexOf(login_back_url) == -1) { if (['/pages/user/index'].indexOf(login_back_url) == -1) {
uni.navigateTo({ // uni.navigateTo({
url: '/pages/users/login/index' // url: '/pages/users/login/index'
}) // })
} }
} }
// #endif // #endif

View File

@ -54,6 +54,9 @@ if (vconsole !== undefined && vconsole === md5Crmeb) {
App.mpType = 'app' App.mpType = 'app'
import uView from 'uni_modules/uview-ui'
Vue.use(uView)
uni.$u.config.unit = 'rpx'
const app = new Vue({ const app = new Vue({
...App, ...App,
store, store,

View File

@ -10,6 +10,18 @@
// } // }
} }
}, },
{
"path": "pages/member_equity/index",
"style": {
"navigationBarTitleText": "会员申请"
}
},
{
"path": "pages/member_application/index",
"style": {
"navigationBarTitleText": "会员权益"
}
},
{ {
"path": "pages/order_addcart/order_addcart", "path": "pages/order_addcart/order_addcart",
"style": { "style": {
@ -529,9 +541,9 @@
"text": "分类" "text": "分类"
}, },
{ {
"pagePath": "pages/order_addcart/order_addcart", "pagePath": "pages/member_application/index",
"iconPath": "static/images/3-001.png", "iconPath": "static/images/2-001.png",
"selectedIconPath": "static/images/3-002.png", "selectedIconPath": "static/images/2-002.png",
"text": "会员申请" "text": "会员申请"
}, },
{ {
@ -557,3 +569,4 @@
}] }]
} }
} }

View File

@ -0,0 +1,198 @@
<template>
<view class="box">
<view class="box-phone">
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100">
<u-form-item label="手机号" prop="phone">
<u--input v-model="form.phone" placeholder="请输入您的手机号"></u--input>
</u-form-item>
<u-form-item label="手机号" prop="phone">
<u--input v-model="form.phone" placeholder="请输入您的手机号"></u--input>
</u-form-item>
</u--form>
</view>
<view class="box-member">
<view class="member-item" v-for="(item,index) in 3" :key="index">
<view class="member-image">
<image src='../../static/images/f.png'></image>
</view>
<view class="member-text">
<text class="text-title">办理240得<text style="color: red;">360</text></text>
<text class="text-content">办理档次240可享连续12个月每个月返利30元</text>
</view>
</view>
</view>
<view class="box-privilege">
<view class="privilege-item" v-for="(item,index) in 4" :key="index">
<image src='../../static/images/f.png'></image>
<text class="privilege-text">
开通立享大额话费返送
</text>
</view>
</view>
<button class="box-submit" @click="submit"></button>
</view>
</template>
<script>
export default {
name: "member_application",
data() {
return {
form: {
phone:''
},
rules: {
phone: [
{
type: 'string',
min: 2,
max: 12,
required: true,
message: '请填写收件人名称',
trigger: ['blur', 'change']
},
{
message: '收件人名称不能为空',
// blurchange
trigger: ['change', 'blur']
}
]
}
};
},
mounted() {
},
onLoad() {
},
methods: {
submit() {
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
}).catch(errors => {
uni.$u.toast('校验失败')
})
}
}
};
</script>
<style lang="scss" scoped>
.box {
// position: relative;
padding: 0 24rpx;
.box-phone {
.u-form-item{
margin-bottom: 20rpx;
}
::v-deep .u-form-item__body {
height: 100rpx;
border-radius: 20rpx;
padding: 0 30rpx;
background: #fff;
margin-bottom: 10rpx;
}
}
.box-member {
border-radius: 20rpx;
width: 100%;
margin-top: 40%;
padding: 100rpx 20rpx 30rpx 20rpx;
// position: absolute;
// top: 20%;
// left: 0;
background: rgb(255, 210, 91);
.member-item {
display: flex;
justify-content: space-between;
background: #fff;
margin-bottom: 20rpx;
padding: 30rpx;
border-radius: 20rpx;
.member-image {
width: 120rpx;
height: 120rpx;
border-radius: 34rpx;
background: red;
padding: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.member-text {
display: flex;
flex-direction: column;
justify-content: space-between;
flex: .9;
.text-title {
margin-top: -16rpx;
font-size: 40rpx;
font-weight: bolder;
transform: skew(-6deg, 0);
}
.text-content {
font-size: 24rpx;
color: #aaa;
}
}
}
}
.box-privilege {
border-radius: 20rpx;
width: 100%;
margin-top: 10%;
padding: 100rpx 10rpx 30rpx 10rpx;
background: rgb(255, 210, 91);
display: flex;
flex: 1;
.privilege-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 30rpx 20rpx;
border-radius: 20rpx;
margin: 10rpx;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-bottom: 10rpx;
}
.privilege-text {
line-height: 36rpx;
text-align: center;
font-size: 24rpx;
}
}
}
.box-submit {
margin-top: 10%;
margin-bottom: 6%;
display: flex;
justify-content: center;
align-items: center;
height: 90rpx;
border-radius: 60rpx;
background: royalblue;
color: #fff;
}
}
</style>

View File

@ -0,0 +1,178 @@
<template>
<view class="box">
<view class="box-member">
<view class="member-left">
<view class="left-title">
<text>创盈普通会员</text>
<text>152****0693</text>
</view>
<text>会员积分240/640</text>
<text>再升1级即可获得XX等6项权益</text>
</view>
<view class="member-right">
<image src='../../static/images/f.png'></image>
<text >
立即续费
</text>
</view>
</view>
<view class="box-equity">
<view class="equity-text">
<text class="equity-title">我的会员权益</text>
<text class="equity-look">查看权益></text>
</view>
<view class="equity-item" v-for="(item,index) in 2" :key="index">
<view class="equity-grade">
<text>办理档次640</text>
<text>办理日期2021.12.30</text>
</view>
<view class="equity-money">
<view class="money-text">
<text>已返回金额</text>
<view>
<text>80</text>
<text class="money-detailed">查看明细></text>
</view>
</view>
<view class="money-text">
<text>已返回金额</text>
<text>80</text>
</view>
<view class="money-text">
<text>已返回金额</text>
<text>80</text>
</view>
<view class="money-text">
<text>已返回金额</text>
<text>80</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "member_application",
data() {
return {
form: {
phone:''
},
rules: {
phone: [
{
type: 'string',
min: 2,
max: 12,
required: true,
message: '请填写收件人名称',
trigger: ['blur', 'change']
},
{
message: '收件人名称不能为空',
// blurchange
trigger: ['change', 'blur']
}
]
}
};
},
mounted() {
},
onLoad() {
},
methods: {
submit() {
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
}).catch(errors => {
uni.$u.toast('校验失败')
})
}
}
};
</script>
<style lang="scss" scoped>
.box {
padding: 10rpx 24rpx;
.box-member {
border-radius: 20rpx;
width: 100%;
padding: 20rpx 20rpx 30rpx 20rpx;
background: rgb(255, 210, 91);
display: flex;
justify-content: space-between;
.member-left{
display: flex;
flex-direction: column;
justify-content: space-between;
flex: .8;
}
.member-right{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
flex: .2;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-bottom: 10rpx;
}
}
}
.box-equity {
border-radius: 20rpx;
width: 100%;
margin-top: 10%;
padding: 40rpx 10rpx 40rpx 10rpx;
background: #fff;
display: flex;
flex-direction: column;
.equity-text{
display: flex;
justify-content: space-between;
.equity-title{
font-size: 36rpx;
font-weight: bolder;
}
}
.equity-item {
background: #eee;
display: flex;
flex-direction: column;
justify-content: space-between;
border-radius: 20rpx;
margin: 10rpx;
.equity-grade{
background: greenyellow;
border-radius: 10rpx 10rpx;
padding: 20rpx;
display: flex;
justify-content: space-between;
}
.equity-money {
// background: #fff;
// line-height: 36rpx;
// text-align: center;
// font-size: 24rpx;
.equity-money{
background: #fff;
}
}
}
}
}
</style>

View File

@ -14,6 +14,7 @@
/* 颜色变量 */ /* 颜色变量 */
@import "uni_modules/uview-ui/theme.scss";
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;
$uni-color-success: #4cd964; $uni-color-success: #4cd964;

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020 www.uviewui.com Copyright (c) 2023 www.uviewui.com
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,9 @@
## 2.0.342022-09-25 ## 2.0.362023-03-27
# uView2.0重磅发布,利剑出鞘,一统江湖
1. 重构`deepClone` & `deepMerge`方法
2. 其他优化
## 2.0.342022-09-24
# uView2.0重磅发布,利剑出鞘,一统江湖 # uView2.0重磅发布,利剑出鞘,一统江湖
1. `u-input`、`u-textarea`增加`ignoreCompositionEvent`属性 1. `u-input`、`u-textarea`增加`ignoreCompositionEvent`属性

View File

@ -114,7 +114,7 @@
* @event {Function} confirm 点击确认按钮时触发 * @event {Function} confirm 点击确认按钮时触发
* @event {Function} cancel 点击取消按钮时触发 * @event {Function} cancel 点击取消按钮时触发
* @event {Function} close 点击遮罩关闭出发closeOnClickOverlay为true有效 * @event {Function} close 点击遮罩关闭出发closeOnClickOverlay为true有效
* @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" /> * @example <u-modal :show="true" title="title" content="content"></u-modal>
*/ */
export default { export default {
name: 'u-modal', name: 'u-modal',
@ -146,7 +146,7 @@
}, },
// //
// modal // modal
// modalpopupflex // modalpopupflex
// popup // popup
// .stop // .stop
clickHandler() { clickHandler() {

View File

@ -83,7 +83,7 @@ export default {
}, },
// 文字装饰,下划线,中划线等,可选值 none|underline|line-through // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
decoration: { decoration: {
tepe: String, type: String,
default: uni.$u.props.text.decoration default: uni.$u.props.text.decoration
}, },
// 外边距,对象、字符串,数值形式均可 // 外边距,对象、字符串,数值形式均可

View File

@ -1,5 +1,5 @@
// 此版本发布于2022-00-24 // 此版本发布于2023-03-27
const version = '2.0.34' const version = '2.0.36'
// 开发环境才提示,生产环境不会提示 // 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {

View File

@ -179,22 +179,34 @@ function addUnit(value = 'auto', unit = uni?.$u?.config?.unit ?? 'px') {
/** /**
* @description 深度克隆 * @description 深度克隆
* @param {object} obj 需要深度克隆的对象 * @param {object} obj 需要深度克隆的对象
* @param cache 缓存
* @returns {*} 克隆后的对象或者原值不是对象 * @returns {*} 克隆后的对象或者原值不是对象
*/ */
function deepClone(obj) { function deepClone(obj, cache = new WeakMap()) {
// 对常见的“非”值,直接返回原来值 if (obj === null || typeof obj !== 'object') return obj;
if ([null, undefined, NaN, false].includes(obj)) return obj if (cache.has(obj)) return cache.get(obj);
if (typeof obj !== 'object' && typeof obj !== 'function') { let clone;
// 原始类型直接返回 if (obj instanceof Date) {
return obj clone = new Date(obj.getTime());
} else if (obj instanceof RegExp) {
clone = new RegExp(obj);
} else if (obj instanceof Map) {
clone = new Map(Array.from(obj, ([key, value]) => [key, deepClone(value, cache)]));
} else if (obj instanceof Set) {
clone = new Set(Array.from(obj, value => deepClone(value, cache)));
} else if (Array.isArray(obj)) {
clone = obj.map(value => deepClone(value, cache));
} else if (Object.prototype.toString.call(obj) === '[object Object]') {
clone = Object.create(Object.getPrototypeOf(obj));
cache.set(obj, clone);
for (const [key, value] of Object.entries(obj)) {
clone[key] = deepClone(value, cache);
} }
const o = test.array(obj) ? [] : {} } else {
for (const i in obj) { clone = Object.assign({}, obj);
if (obj.hasOwnProperty(i)) {
o[i] = typeof obj[i] === 'object' ? deepClone(obj[i]) : obj[i]
} }
} cache.set(obj, clone);
return o return clone;
} }
/** /**
@ -205,24 +217,27 @@ function deepClone(obj) {
*/ */
function deepMerge(target = {}, source = {}) { function deepMerge(target = {}, source = {}) {
target = deepClone(target) target = deepClone(target)
if (typeof target !== 'object' || typeof source !== 'object') return false if (typeof target !== 'object' || target === null || typeof source !== 'object' || source === null) return target;
const merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
for (const prop in source) { for (const prop in source) {
if (!source.hasOwnProperty(prop)) continue if (!source.hasOwnProperty(prop)) continue;
if (prop in target) { const sourceValue = source[prop];
if (typeof target[prop] !== 'object') { const targetValue = merged[prop];
target[prop] = source[prop] if (sourceValue instanceof Date) {
} else if (typeof source[prop] !== 'object') { merged[prop] = new Date(sourceValue);
target[prop] = source[prop] } else if (sourceValue instanceof RegExp) {
} else if (target[prop].concat && source[prop].concat) { merged[prop] = new RegExp(sourceValue);
target[prop] = target[prop].concat(source[prop]) } else if (sourceValue instanceof Map) {
merged[prop] = new Map(sourceValue);
} else if (sourceValue instanceof Set) {
merged[prop] = new Set(sourceValue);
} else if (typeof sourceValue === 'object' && sourceValue !== null) {
merged[prop] = deepMerge(targetValue, sourceValue);
} else { } else {
target[prop] = deepMerge(target[prop], source[prop]) merged[prop] = sourceValue;
}
} else {
target[prop] = source[prop]
} }
} }
return target return merged;
} }
/** /**
@ -650,6 +665,16 @@ function pages() {
return pages return pages
} }
/**
* 获取页面历史栈指定层实例
* @param back {number} [0] - 0或者负数表示获取历史栈的哪一层0表示获取当前页面实例-1 表示获取上一个页面实例默认0
*/
function getHistoryPage(back = 0) {
const pages = getCurrentPages()
const len = pages.length
return pages[len - 1 + back]
}
/** /**
* @description 修改uView内置属性值 * @description 修改uView内置属性值
* @param {object} props 修改内置props属性 * @param {object} props 修改内置props属性
@ -701,5 +726,6 @@ export default {
setProperty, setProperty,
page, page,
pages, pages,
getHistoryPage,
setConfig setConfig
} }

View File

@ -53,7 +53,7 @@ class Router {
mergeConfig.url = this.mixinParam(options, params) mergeConfig.url = this.mixinParam(options, params)
mergeConfig.type = 'navigateTo' mergeConfig.type = 'navigateTo'
} else { } else {
mergeConfig = uni.$u.deepMerge(options, this.config) mergeConfig = uni.$u.deepMerge(this.config, options)
// 否则正常使用mergeConfig中的url和params进行拼接 // 否则正常使用mergeConfig中的url和params进行拼接
mergeConfig.url = this.mixinParam(options.url, options.params) mergeConfig.url = this.mixinParam(options.url, options.params)
} }

View File

@ -2,7 +2,7 @@
"id": "uview-ui", "id": "uview-ui",
"name": "uview-ui", "name": "uview-ui",
"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖", "displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
"version": "2.0.34", "version": "2.0.36",
"description": "uView UI已完美兼容nvue全面的组件和便捷的工具会让您信手拈来如鱼得水", "description": "uView UI已完美兼容nvue全面的组件和便捷的工具会让您信手拈来如鱼得水",
"keywords": [ "keywords": [
"uview", "uview",