8 Commits

39 changed files with 3771 additions and 246 deletions

View File

@@ -9,6 +9,7 @@ import appConfig from '@/config/appConfig.js';
import { provide, onMounted } from 'vue';
import WebsocketUtil from '@/commons/utils/websocket.js';
console.log('appConfig.wss',appConfig.wss);
const websocketUtil = new WebsocketUtil(appConfig.wss, 5000); // 创建 WebSocket 工具类实例
provide('websocketUtil', websocketUtil); // 提供给所有子组件
onMounted(() => {});

View File

@@ -0,0 +1,59 @@
<template>
<view>
<view class="u-flex date-filter-box " @click="show">
<view>
<text class="color-999" v-if="!startDate">开始日期</text>
<text class="" v-else>
{{ showDate(startDate)}}
</text>
</view>
<text></text>
<view>
<text class="color-999" v-if="!endDate">结束日期</text>
<text class="" v-else>
{{ showDate(endDate)}}
</text>
</view>
</view>
<my-date-pickerview mode="date" @confirm="datePickerConfirm" ref="datePicker"
style="z-index: 999"></my-date-pickerview>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import dayjs from 'dayjs';
const startDate = defineModel('start')
const endDate = defineModel('end')
const datePicker = ref(null)
function show() {
datePicker.value.open()
}
function datePickerConfirm(e) {
console.log(e);
startDate.value = e.start
endDate.value = e.end
}
function showDate(str){
if(str){
return str.split(' ')[0]
}
return ''
}
</script>
<style lang="scss">
.date-filter-box {
border: 1px solid #eee;
padding: 10rpx 32rpx;
justify-content: space-between;
border-radius: 12rpx;
}
</style>

28
activationCode/data.js Normal file
View File

@@ -0,0 +1,28 @@
export const shopTypes = {
'only': '单店',
'chain': '连锁店',
'join': '加盟店',
}
export const registerTypes = {
'before': '快餐版',
'after': '餐饮版',
}
export const profiless = {
probation: '试用',
release: '正式',
}
export const statuss = {
1: '开启',
0: '关闭'
}
export const tubeTypes = {
1: '直接管理',
0: '不可直接管理'
}
export const channels = {
'poly': '聚合支付',
'native': '支付进件',
}

View File

@@ -0,0 +1,395 @@
<template>
<view class="min-page bg-f7 u-font-28 color-333">
<up-sticky>
<view class="top u-flex gap-20">
<!-- <up-select :options="types" @select="typesSelect">
<template #text>
<text v-if="query.type!==''">{{returnTypesLabel(query.type)}}</text>
<text v-else>类型</text>
</template>
</up-select> -->
<up-select :options="statusList" @select="statusListSelect">
<template #text>
<text v-if="query.state!==''">{{returnStatusLabel(query.state)}}</text>
<text v-else>状态</text>
</template>
</up-select>
<view class="u-flex-1">
<datePickerSelect v-model:start="query.startTime" v-model:end="query.endTime">
</datePickerSelect>
</view>
</view>
</up-sticky>
<view class="box">
<view class="container" v-for="(item,index) in list" :key="index">
<view class="u-flex u-row-between">
<view>
<text class="color-666">创建时间</text>
<text class="font-bold">{{item.createTime}}</text>
</view>
<view class="status" :class="returnStatusClass(item.status)">{{item.status?'已使用':'未使用'}}</view>
</view>
<view class="u-flex u-row-between u-m-t-24">
<view>
<text class="color-666">激活时长()</text>
<text class="font-bold">{{item.periodMonth}}个月</text>
</view>
</view>
<view class="u-flex u-m-t-32" v-if="item.shopName">
<view>
<text class="color-666">使用店铺名称</text>
<text class="font-bold">{{item.shopName}}</text>
<text class="u-m-l-10">({{item.registerType=='before'?'快餐版':'餐饮版'}})</text>
</view>
</view>
<view class="u-m-t-32">
<view class="u-m-t-24 u-flex u-col-center">
<text class="color-666">激活码</text>
<view class="status success u-font-24">{{item.registerCode}}</view>
</view>
<view class="u-flex u-m-t-32 u-row-right gap-20">
<view style="min-width: 160rpx;">
<my-button @click="oncopy(item.registerCode)">复制激活码</my-button>
</view>
</view>
</view>
</view>
<template v-if="query.shopName">
<up-empty v-if="list.length<=0" text="未搜索到相关信息"></up-empty>
<up-loadmore :status="isEnd?'nomore':'loading'" v-else></up-loadmore>
</template>
<template v-else>
<up-empty v-if="list.length<=0" text="未搜索到相关信息"></up-empty>
<up-loadmore v-else :status="isEnd?'nomore':'loading'"></up-loadmore>
</template>
</view>
<view style="height: 140rpx;"></view>
<view class="bottom">
<my-button @click="toAdd()">添加激活码</my-button>
</view>
<up-popup :show="addShow" mode="center"
@close="addShow=false" round="16rpx" :close-on-click-overlay="true">
<view class="add-box">
<view class="font-bold u-font-32 text-center">生成激活码</view>
<view class="u-p-l-20 u-p-r-20 u-m-r-32">
<up-form label-width="auto">
<up-form-item label="激活时长" required>
<up-number-box input-width="200rpx" v-model="form.periodMonth" :integer="true" :step="1" ></up-number-box>
</up-form-item>
</up-form>
<up-form label-width="auto">
<up-form-item label="生产数量" required>
<up-number-box input-width="200rpx" v-model="form.num" :integer="true" :step="1" ></up-number-box>
</up-form-item>
</up-form>
</view>
<view class="u-flex gap-20 u-m-t-42">
<view class="u-flex-1">
<my-button type="default" @click="addShow=false">取消</my-button>
</view>
<view class="u-flex-1">
<my-button @click="submit">生产激活码</my-button>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
reactive,
ref,
watch
} from 'vue';
import {
onReachBottom,
onShow
} from '@dcloudio/uni-app'
import * as Api from '@/http/api/account/merchantRegister.js'
import datePickerSelect from '../components/date-picker-select.vue'
const code = ref('')
const addShow = ref(false)
const form =reactive({
periodMonth:1,
num:1,
})
watch(()=>addShow.value,(newval)=>{
if(!newval){
form.periodMonth=1;
form.num=1;
}
})
const codeType = ref('')
const datePicker = ref(null)
function datePickerConfirm(e) {
}
function submit(){
Api.addMerchantRegister(form).then(res=>{
if(res){
uni.$u.toast('添加成功')
addShow.value=false
search()
}
})
}
const statusList = [{
value: 1,
name: '已激活',
},
{
value: 0,
name: '待激活',
},
]
const types = [{
value: 'before',
name: '快餐版',
},
{
value: 'after',
name: '餐饮版',
},
]
function oncopy(code) {
uni.setClipboardData({
data: code
})
}
function statusListSelect(e) {
query.state = e.value
}
function typesSelect(e) {
query.type = e.value
}
const statusLabelJson = {
'REJECTED': '已拒绝'
}
const statusClassJson = {
'REJECTED': 'error'
}
function returnStatusLabel(state) {
const item = statusList.find(v => v.value == state)
if (item) {
return item.name
}
return ''
}
function returnTypesLabel(state) {
const item = types.find(v => v.value == state)
if (item) {
return item.name
}
return ''
}
function returnStatusClass(state) {
if (state == 1) {
return 'success'
}
return 'gray'
}
function showCode(item, type) {
if (type == 'wx') {
code.value = item.wechatSignUrl
}
if (type == 'aliPay') {
code.value = item.alipaySignUrl
}
codeType.value = type
addShow.value = true
}
const showShopSelect = ref(false)
const query = reactive({
page: 1,
size: 10,
state: '',
type: '',
startTime:'',
endTime:'',
})
watch(() => query.state, (newval) => {
search()
})
watch(() => query.startTime, (newval) => {
search()
})
watch(() => query.endTime, (newval) => {
search()
})
watch(() => query.type, (newval) => {
search()
})
const isEnd = ref(false)
const list = ref([])
function search() {
isEnd.value = false
query.page = 1
getData()
}
function toAdd(shop) {
addShow.value = true
}
function toEdit(shop) {
console.log(shop)
uni.navigateTo({
url: '/pagesShops/add/add?id=' + shop.id
})
}
let isAjaxIng=ref(false)
function getData() {
if(isAjaxIng.value){
return
}
isAjaxIng.value=true
Api.getMerchantRegister({
...query,
startTime:'',
endTime:'',
createdAt:query.startTime&&query.endTime?( [query.startTime,query.endTime]):''
}).then(res => {
isAjaxIng.value=false
isEnd.value = query.page >= res.totalPage * 1
if (query.page == 1) {
list.value = res.records
} else {
list.value.push(...res.records)
}
})
}
function queryStatus(item) {
queryEntry({
licenceNo: item.licenceNo,
shopId: item.shopId
}).then(res => {
isEnd.value = false
query.page = 1;
getData()
})
}
onReachBottom(() => {
if (!isEnd.value) {
query.page++
getData()
}
})
onShow(getData)
</script>
<style lang="scss" scoped>
.min-page {
.box {
padding: 32rpx 28rpx;
}
}
.container {
padding: 32rpx 28rpx;
border-radius: 16rpx;
margin-bottom: 32rpx;
background-color: #fff;
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
z-index: 100;
padding: 32rpx 28rpx;
padding-bottom: 40rpx;
}
.types {}
.status {
padding: 8rpx 18rpx;
border-radius: 8rpx;
border: 2rpx solid #333;
&.success {
border-color: rgba(123, 209, 54, 1);
color: rgba(123, 209, 54, 1);
background: rgba(123, 209, 54, 0.12);
}
&.warning {
border-color: rgba(255, 141, 40, 1);
color: rgba(255, 141, 40, 1);
background: rgba(255, 141, 40, 0.12);
}
&.error {
border-color: #FF1C1C;
color: #FF1C1C;
background: rgba(255, 28, 28, 0.18);
}
&.gray {
color: #bbb;
background-color: #f7f7f7;
border-color: #bbb;
}
}
.top {
padding: 32rpx 28rpx;
background-color: #fff;
}
.add-box {
background-color: #fff;
width: 690rpx;
background-color: #fff;
padding: 32rpx 28rpx;
border-radius: 16rpx;
}
</style>

View File

@@ -0,0 +1,73 @@
export const userTypes = {
'0': '个体商户',
'1': '企业商户',
}
export const contactPersonTypes = {
'LEGAL': '经营者/法定代表人',
'SUPER': '经办人',
}
export const certTypes = {
'0': '身份证'
}
export const companyChildTypes = {
'1': '普通企业',
'2': '事业单位',
'3': '政府机关',
'4': '社会组织',
}
export const sexs = {
'0': '男',
'1': '女'
}
export const settlementTypes = {
'0': '非法人结算',
'1': '法人结算'
}
export const settlementCardTypes = {
'11': '对私借记卡',
'21': '对公借记卡',
}
// WAIT 待提交
// INIT 待处理
// AUDIT 待审核
// SIGN 待签约
// FINISH 已完成
// REJECTED 失败
export const statusList = [{
value: 'WAIT',
name: '待提交',
class: 'gray'
},
{
value: 'INIT',
name: '待处理',
class: 'warning'
},
{
value: 'AUDIT',
name: '待审核',
class: 'warning'
},
{
value: 'SIGN',
name: '待签约',
class: 'warning'
},
{
value: 'FINISH',
name: '已完成',
class: 'success'
},
{
value: 'REJECTED',
name: '失败',
class: 'error'
},
]

View File

@@ -0,0 +1,254 @@
<template>
<up-popup :show="modelValue" mode="bottom" :popup="false"
:mask="true" :closeable="true" :safe-area-inset-bottom="true"
close-icon-color="#ffffff" :z-index="uZIndex"
:maskCloseAble="maskCloseAble" @close="close">
<up-tabs v-if="modelValue" :list="genTabsList"
:scrollable="true" :current="tabsIndex" @change="tabsChange" ref="tabs"></up-tabs>
<view class="area-box">
<view class="u-flex" :class="{ 'change':isChange }">
<view class="area-item">
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
<scroll-view :scroll-y="true" style="height: 100%">
<up-cell-group>
<up-cell v-for="(item,index) in provinces"
:title="item.regionName" :arrow="false"
:index="index" :key="index"
@click="provinceChange(index)">
<template v-slot:right-icon>
<up-icon v-if="isChooseP&&province===index"
size="17" name="checkbox-mark"></up-icon>
</template>
</up-cell>
</up-cell-group>
</scroll-view>
</view>
</view>
<view class="area-item">
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
<scroll-view :scroll-y="true" style="height: 100%">
<up-cell-group v-if="isChooseP">
<up-cell v-for="(item,index) in citys"
:title="item.regionName" :arrow="false"
:index="index" :key="index"
@click="cityChange(index)">
<template v-slot:right-icon>
<up-icon v-if="isChooseC&&city===index"
size="17" name="checkbox-mark"></up-icon>
</template>
</up-cell>
</up-cell-group>
</scroll-view>
</view>
</view>
<view class="area-item">
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
<scroll-view :scroll-y="true" style="height: 100%">
<up-cell-group v-if="isChooseC">
<up-cell v-for="(item,index) in areas"
:title="item.regionName" :arrow="false"
:index="index" :key="index"
@click="areaChange(index)">
<template v-slot:right-icon>
<up-icon v-if="isChooseA&&area===index"
size="17" name="checkbox-mark"></up-icon>
</template>
</up-cell>
</up-cell-group>
</scroll-view>
</view>
</view>
</view>
</view>
</up-popup>
</template>
<script>
import {region} from '@/http/api/system/region.js'
/**
* city-select 省市区级联选择器
* @property {String Number} z-index 弹出时的z-index值默认1075
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker默认true
* @property {String} default-region 默认选中的地区,中文形式
* @property {String} default-code 默认选中的地区,编号形式
*/
export default {
name: 'my-address-select',
props: {
// 通过双向绑定控制组件的弹出与收起
modelValue: {
type: Boolean,
default: false
},
// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
defaultRegion: {
type: Array,
default () {
return [];
}
},
// 默认显示地区的编码defaultRegion和areaCode同时存在areaCode优先可传类似["13", "1303", "130304"]
areaCode: {
type: Array,
default () {
return [];
}
},
// 是否允许通过点击遮罩关闭Picker
maskCloseAble: {
type: Boolean,
default: true
},
// 弹出的z-index值
zIndex: {
type: [String, Number],
default: 0
}
},
data() {
return {
cityValue: "",
isChooseP: false, //是否已经选择了省
province: 0, //省级下标
provinces: [],
isChooseC: false, //是否已经选择了市
city: 0, //市级下标
citys: [],
isChooseA: false, //是否已经选择了区
area: 0, //区级下标
areas: [],
tabsIndex: 0,
list:[]
}
},
async mounted() {
await this.getRegon()
this.init();
},
computed: {
isChange() {
return this.tabsIndex > 1;
},
genTabsList() {
let tabsList = [{
name: "请选择"
}];
if (this.isChooseP) {
console.log(this.province)
tabsList[0]['name'] = this.provinces[this.province]['regionName'];
tabsList[1] = {
name: "请选择"
};
}
if (this.isChooseC) {
tabsList[1]['name'] = this.citys[this.city]['regionName'];
tabsList[2] = {
name: "请选择"
};
}
if (this.isChooseA) {
tabsList[2]['name'] = this.areas[this.area]['regionName'];
}
return tabsList;
},
uZIndex() {
// 如果用户有传递z-index值优先使用
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
}
},
emits: ['city-change'],
methods: {
async getRegon(){
const res=await region()
this.provinces=res||[]
},
init() {
if (this.areaCode.length == 3) {
this.setProvince("", this.areaCode[0]);
this.setCity("", this.areaCode[1]);
this.setArea("", this.areaCode[2]);
} else if (this.defaultRegion.length == 3) {
this.setProvince(this.defaultRegion[0], "");
this.setCity(this.defaultRegion[1], "");
this.setArea(this.defaultRegion[2], "");
};
},
setProvince(regionName = "", value = "") {
this.provinces.map((v, k) => {
if (value ? v.value == value : v.regionName == regionName) {
this.provinceChange(k);
}
})
},
setCity(regionName = "", value = "") {
this.citys.map((v, k) => {
if (value ? v.value == value : v.regionName == regionName) {
this.cityChange(k);
}
})
},
setArea(regionName = "", value = "") {
this.areas.map((v, k) => {
if (value ? v.value == value : v.regionName == regionName) {
this.isChooseA = true;
this.area = k;
}
})
},
close() {
this.$emit('update:modelValue', false);
},
tabsChange(index) {
this.tabsIndex = index;
},
provinceChange(index) {
this.isChooseP = true;
this.isChooseC = false;
this.isChooseA = false;
this.province = index;
this.citys =this.provinces[index].children
this.tabsIndex = 1;
},
cityChange(index) {
this.isChooseC = true;
this.isChooseA = false;
this.city = index;
this.areas =this.provinces[this.province].children[index].children
this.tabsIndex = 2;
},
areaChange(index) {
this.isChooseA = true;
this.area = index;
let result = {};
result.province = this.provinces[this.province];
result.city = this.citys[this.city];
result.area = this.areas[this.area];
this.$emit('city-change', result);
this.close();
}
}
}
</script>
<style lang="scss">
.area-box {
width: 100%;
overflow: hidden;
height: 800rpx;
>view {
width: 150%;
transition: transform 0.3s ease-in-out 0s;
transform: translateX(0);
&.change {
transform: translateX(-33.3333333%);
}
}
.area-item {
width: 33.3333333%;
height: 800rpx;
}
}
</style>

View File

@@ -6,16 +6,17 @@
class="fixed-bottom u-flex gap-20"
:class="[direction == 'column' ? 'u-flex-column' : '']"
>
<view class="u-flex-1">
<my-button type="primary" @click="save" shape="circle">
保存
</my-button>
</view>
<view class="u-flex-1">
<my-button bgColor="#fff" type="default" @click="cancel" shape="circle">
取消
</my-button>
</view>
<view class="u-flex-1">
<my-button type="primary" @click="save" shape="circle">
保存
</my-button>
</view>
</view>
</view>
</template>

View File

@@ -0,0 +1,35 @@
<template>
<view class="min-page u-flex u-col-center u-row-center">
<view class="loader">
</view>
</view>
</template>
<script>
</script>
<style lang="scss">
/* HTML: <div class="loader"></div> */
.loader {
width: 50px;
--b: 8px;
aspect-ratio: 1;
border-radius: 50%;
padding: 1px;
background: conic-gradient(#0000 10%, #f03355) content-box;
-webkit-mask:
repeating-conic-gradient(#0000 0deg, #000 1deg 20deg, #0000 21deg 36deg),
radial-gradient(farthest-side, #0000 calc(100% - var(--b) - 1px), #000 calc(100% - var(--b)));
-webkit-mask-composite: destination-in;
mask-composite: intersect;
animation: l4 1s infinite steps(10);
}
@keyframes l4 {
to {
transform: rotate(1turn)
}
}
</style>

View File

@@ -25,8 +25,8 @@ export function returnBaseUrl(param) {
env,
apiType
} = param
if(!env){
env=ENV
if (!env) {
env = ENV
}
console.log('env', env);
console.log('apiType', apiType);
@@ -70,6 +70,23 @@ export function returnBaseUrl(param) {
}
function returnWss(env) {
// #ifdef H5
if (env === 'test') {
return 'http://192.168.1.42:2348'
} else {
return 'https://czgeatws.sxczgkj.com/wss'
}
// #endif
// #ifndef H5
if (env === 'test') {
return 'ws://192.168.1.42:2348'
} else {
return 'wss://czgeatws.sxczgkj.com/wss'
}
// #endif
}
const appConfig = {
@@ -85,7 +102,7 @@ const appConfig = {
env: {},
// wss: "wss://sockets.sxczgkj.com/wss", //测试环境
wss: "wss://czgeatws.sxczgkj.com/wss", //正式环境
wss: returnWss(), //正式环境
// 环境变量常量
ENV_ENUM: {
DEVELOPMENT: 'development', // 本地调试地址

View File

@@ -27,6 +27,7 @@
<up-loadmore :status="isEnd?'nomore':'loading'"></up-loadmore>
</scroll-view>
<!-- <view :style="{height:slotHeight+'px'}"></view> -->
<view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button>
@@ -60,17 +61,16 @@
const bankInstId = defineModel('bankInstId');
const bankAliasCode=defineModel('bankAliasCode')
const wxProvinceCode=defineModel('wxProvinceCode')
const bankAliasCode = defineModel('bankAliasCode')
const selid = ref('')
function returnLabel() {
const findShop = list.value.find(v => v.bankAlias == modelValue.value)
return findShop ? findShop.bankAlias : ''
return findShop ? findShop.bankAlias : modelValue.value
}
const selItem = ref(null)
@@ -89,7 +89,7 @@
function submit() {
modelValue.value = selItem.value.bankAlias
bankInstId.value = selItem.value.bankCode
bankAliasCode.value=selItem.value.bankAliasCode;
bankAliasCode.value = selItem.value.bankAliasCode;
console.log('modelValue', modelValue.value);
console.log('bankInstId', bankInstId.value);
show.value = false;
@@ -111,7 +111,6 @@
selItem.value = findShop
bankInstId.value = findShop.bankCode
bankAliasCode.value = findShop.bankAliasCode
wxProvinceCode.value=findShop.wxProvinceCode
}
}
@@ -186,6 +185,11 @@
}
}
const slotHeight = ref(0)
uni.onKeyboardHeightChange(res => {
console.log('onKeyboardHeightChange', res.height)
slotHeight.value = res.height
})
onMounted(init);
</script>
<style lang="scss">

View File

@@ -7,7 +7,7 @@
<view class="icon">
<up-icon name="arrow-down" size="14" color="#999"></up-icon>
</view>
</view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
@@ -19,13 +19,13 @@
<scroll-view scroll-with-animation :scroll-into-view="selid" class="scroll-view u-m-t-30"
scroll-y="true" style="max-height :60vh;">
<template v-if="list.length">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.bankCode"
@click="itemClick(item)" :id="'shop_'+item.bankCode"
:class="{active:selItem&&selItem.bankCode==item.bankCode}">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.bank_branch_id"
@click="itemClick(item)" :id="'shop_'+item.bank_branch_id"
:class="{active:selItem&&selItem.bank_branch_id==item.bank_branch_id}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.branchName}}</view>
<view class="u-flex-1">{{item.bank_branch_name}}</view>
</view>
<view class="u-p-20 u-flex u-row-center">
<up-loadmore status="nomore"></up-loadmore>
@@ -33,11 +33,11 @@
</template>
<template v-else>
<template v-if="keywords">
<up-empty text="未搜索到相关支行"></up-empty>
<up-empty text="未搜索到相关支行"></up-empty>
</template>
<up-empty v-else text="暂无支行"></up-empty>
</template>
</scroll-view>
@@ -71,15 +71,19 @@
const show = ref(false);
const modelValue = defineModel();
const bankBranchName = defineModel('bankBranchName', {
const bank_branch_name = defineModel('bank_branch_name', {
default: '',
});
const selid = ref('')
function returnLabel() {
const findShop = list.value.find(v => v.bankCode == modelValue.value)
return findShop ? findShop.branchName : ''
const findShop = list.value.find(v => v.bank_branch_id == modelValue.value)
if(findShop){
return findShop ? findShop.bank_branch_name : ''
}else{
return bank_branch_name.value||'请选择'
}
}
const selItem = ref(null)
@@ -87,9 +91,9 @@
selItem.value = data
}
function returnbranchName(bankCode) {
const item = list.value.find((v) => v.bankCode == bankCode);
return item?.branchName || '';
function returnbank_branch_name(bank_branch_id) {
const item = list.value.find((v) => v.bank_branch_id == bank_branch_id);
return item?.bank_branch_name || '';
}
function close() {
@@ -97,8 +101,8 @@
}
function submit() {
modelValue.value = selItem.value.bankCode
bankBranchName.value = selItem.value.branchName
modelValue.value = selItem.value.bank_branch_id
bank_branch_name.value = selItem.value.bank_branch_name
show.value = false;
}
@@ -165,10 +169,12 @@
const list = ref([]);
function openPopup() {
async function openPopup() {
await init()
selid.value = 'shop_' + modelValue.value
const findShop = list.value.find(v => v.bankCode == modelValue.value)
selItem.value=findShop?findShop:null
console.log('list.value',list.value);
const findShop = list.value.find(v => v.bank_branch_id == modelValue.value)
selItem.value = findShop ? findShop : null
show.value = true;
}
@@ -208,23 +214,20 @@
query: {
type: Object,
default: () => ({
province: '',
city: '',
instId: '',
bankAliceCode: '',
cityCode: ''
})
}
})
watch(() => show.value, (newval) => {
init()
})
let allList = []
async function init() {
const res = await bankBranchList(props.query);
list.value = res
allList = res
list.value = res.data
allList = res.data
}
</script>
<style lang="scss">

View File

@@ -14,7 +14,7 @@
</up-radio-group>
</view>
<view class="form-item required">
<view class="form-item required" v-if="form.userType=='1'">
<view class="title">企业类型</view>
<up-radio-group v-model="form.companyChildType">
<up-radio v-for="(value,key) in companyChildTypes" :label="value" :name="key">
@@ -46,7 +46,7 @@
</up-radio-group>
</view>
<template v-if="form.contactPersonType=='SUPER'">
<template v-if="true">
<view class="form-item required">
<view class="title"> 联系人身份证正面国徽</view>
<my-upload-img v-model="form.contactIdCardFrontPic.url" :size="200"
@@ -54,7 +54,7 @@
</view>
<view class="form-item required">
<view class="title"> 联系人身份证头像</view>
<view class="title"> 联系人身份证头像</view>
<my-upload-img v-model="form.contactIdCardBackPic.url" :size="200"
@uploadSuccess="uploadSuccess($event,'IdCard','contactIdCardBackPic')"></my-upload-img>
</view>

View File

@@ -13,7 +13,7 @@
></my-upload-img>
</view>
<view class="form-item required">
<view class="title"> 身份证反面国徽</view>
<view class="title"> 身份证反面人像</view>
<my-upload-img v-model="form.idCardBackPic.url" :size="200" :maxSize="maxSize"
@uploadSuccess="uploadSuccess($event,'IdCard','idCardBackPic')"
></my-upload-img>

View File

@@ -49,7 +49,7 @@
</template>
<view class="form-item required" >
<view class="form-item required">
<view class="title"> 结算卡类型</view>
<up-radio-group v-model="form.settlementCardType">
<up-radio v-for="(value,key) in settlementCardTypes" :label="value" :name="key">
@@ -71,7 +71,7 @@
<view class="form-item required">
<view class="title"> </view>
<view class="title"> 开户行省市</view>
<view class="input-box u-flex u-row-between u-col-center" @click="showCitySelect=true">
<text class="color-999" v-if="!pro_city_area">请选择</text>
<text class="color-333" v-else>{{pro_city_area}}</text>
@@ -79,25 +79,23 @@
</view>
</view>
<view class="form-item required">
<view class="title"> </view>
<view class="title"> 开户</view>
<bankSelect v-model="form.bankName" v-model:bankInstId="form.bankInstId"
v-model:wxProvinceCode="wxProvinceCode"
v-model:bankAliasCode="form.bankType"
></bankSelect>
v-model:bankAliasCode="form.bankType"></bankSelect>
</view>
<view class="form-item " v-if="pro_city_area&&form.bankName">
<view class="title"> 支行</view>
<bankBranchList :query="bankBranchListQuery" v-model:bankBranchName="form.bankBranchName"
v-model:bankBranchCode="form.bankBranchCode"></bankBranchList>
<bankBranchList :query="bankBranchListQuery" v-model:bank_branch_name="form.bankBranchName"
v-model="form.bankBranchCode"></bankBranchList>
</view>
<view class="form-item required">
<view class="title"> 结算账户卡号</view>
<up-input placeholder="结算账户卡号" :placeholder-class="placeholderClass"
<view class="title"> 结算卡号</view>
<up-input placeholder="结算卡号" :placeholder-class="placeholderClass"
v-model="form.settlementCardNo"></up-input>
</view>
<view class="form-item required">
<view class="title"> 结算账户户名</view>
<up-input placeholder="结算账户户名" :placeholder-class="placeholderClass"
<view class="title"> 户名</view>
<up-input placeholder="户名" :placeholder-class="placeholderClass"
v-model="form.settlementName"></up-input>
</view>
<view class="form-item required">
@@ -154,7 +152,7 @@
</view>
<citySelect v-model="showCitySelect" @city-change="cityChange"></citySelect>
<citySelect v-model="showCitySelect" @city-change="cityChange" @init="getRegionData"></citySelect>
</view>
@@ -165,7 +163,8 @@
computed,
reactive,
watch,
ref
ref,
watchEffect
} from 'vue';
import shopSelect from './shop-select.vue'
import citySelect from '../../components/u-city-select.vue'
@@ -183,10 +182,18 @@
import {
getInfoByImg
} from '@/http/api/order/entryManager.js'
import list from 'uview-plus/components/u-list/list';
const regions = ref([])
function getRegionData(arr) {
regions.value = arr
}
const showCitySelect = ref(false)
const showBankSelect = ref(true)
const wxProvinceCode=ref('')
const wxProvinceCode = ref('')
function uploadSuccess(url, type, key) {
uni.showLoading({
@@ -213,7 +220,7 @@
form.openAccProvince = e.province.regionName;
form.openAccCity = e.city.regionName;
form.openAccArea = e.area.regionName;
wxProvinceCode.value = e.city.wxProvinceCode;
form.openAccProvinceId = e.province.regionId;
form.openAccCityId = e.city.regionId;
form.openAccAreaId = e.area.regionId;
@@ -288,9 +295,8 @@
const isRequired = ref('required')
const bankBranchListQuery = computed(() => {
return {
province: form.openAccProvince,
city: form.openAccCity,
instId: form.bankInstId,
bankAliceCode: form.bankType,
cityCode: wxProvinceCode.value
}
})
@@ -303,7 +309,17 @@
}
})
watchEffect(() => {
if (regions.value.length && form.openAccCityId) {
if (!wxProvinceCode.value) {
const findPItem= regions.value.find(v=>v.regionId==form.openAccProvinceId)
const cityIyem=findPItem?(findPItem.children.find(v=>v.regionId==form.openAccCityId)):null
if(cityIyem){
wxProvinceCode.value =cityIyem.wxProvinceCode
}
}
}
})
watch(() => props.data, (newval) => {
console.log('watch 变', newval);

View File

@@ -15,6 +15,42 @@ export const rules = {
alipayAccount: {
required: true,
errorMsg: '请填写支付宝账号',
},
'contactIdCardFrontPic.url': {
required: true,
errorMsg: '请上传联系人身份证正面',
},
'contactIdCardBackPic.url': {
required: true,
errorMsg: '联系人身份证反面',
},
contactName: {
required: true,
errorMsg: '请填写联系人姓名',
},
contactPersonId: {
required: true,
errorMsg: '请填写联系人身份证号',
},
contactPersonIdStartDate: {
required: true,
errorMsg: '请填写联系人身份证开始日期',
},
contactPersonIdEndDate: {
required: true,
errorMsg: '请填写联系人身份证到期日期',
},
contactPhone: {
required: true,
errorMsg: '请填写联系人电话',
},
contactAddr: {
required: true,
errorMsg: '请填写联系人通讯地址',
},
contactEmail: {
required: true,
errorMsg: '请填写联系人邮箱',
}
},
legalPersonInfo: {
@@ -64,26 +100,26 @@ export const rules = {
},
},
businessLicenceInfo:{
'licensePic.url':{
businessLicenceInfo: {
'licensePic.url': {
required: true,
errorMsg:'请上传营业执照照片'
errorMsg: '请上传营业执照照片'
},
licenceName:{
licenceName: {
required: true,
errorMsg:'请输入营业执照全称'
errorMsg: '请输入营业执照全称'
},
licenceNo:{
licenceNo: {
required: true,
errorMsg:'请输入营业执照号码'
errorMsg: '请输入营业执照号码'
},
licenceStartDate:{
licenceStartDate: {
required: true,
errorMsg:'请选择营业执照开始日期'
errorMsg: '请选择营业执照开始日期'
},
registeredAddress:{
registeredAddress: {
required: true,
errorMsg:'请填写营业执照注册地址'
errorMsg: '请填写营业执照注册地址'
}
},
storeInfo: {
@@ -143,47 +179,47 @@ export const rules = {
},
openAccProvinceId: {
required: true,
errorMsg: '请选择区',
errorMsg: '请选择开户行省市区',
},
openAccCityId: {
required: true,
errorMsg: '请选择区',
errorMsg: '请选择开户行省市区',
},
openAccAreaId: {
required: true,
errorMsg: '请选择区',
errorMsg: '请选择开户行省市区',
},
openAccProvince: {
required: true,
errorMsg: '请选择区',
errorMsg: '请选择开户行省市区',
},
openAccCity: {
required: true,
errorMsg: '请选择区',
errorMsg: '请选择开户行省市区',
},
openAccArea: {
required: true,
errorMsg: '请选择区',
errorMsg: '请选择开户行省市区',
},
bankType: {
required: true,
errorMsg: '请选择行',
errorMsg: '请选择开户行',
},
bankInstId: {
required: true,
errorMsg: '请选择行',
errorMsg: '请选择开户行',
},
bankName: {
required: true,
errorMsg: '请选择行',
errorMsg: '请选择开户行',
},
settlementCardNo: {
required: true,
errorMsg: '请填写结算账户卡号',
errorMsg: '请填写结算卡号',
},
settlementName: {
required: true,
errorMsg: '请填写结算账户户名',
errorMsg: '请填写户名',
},
bankMobile: {
required: true,

View File

@@ -159,11 +159,12 @@
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
}
},
emits: ['city-change'],
emits: ['city-change','init'],
methods: {
async getRegon(){
const res=await region()
this.provinces=res||[]
this.$emit('init',res)
},
init() {
if (this.areaCode.length == 3) {

View File

@@ -1,35 +1,73 @@
export const userTypes={
'0':'个体商户',
'1':'企业商户',
export const userTypes = {
'0': '个体商户',
'1': '企业商户',
}
export const contactPersonTypes={
'LEGAL':'经营者/法定代表人',
'SUPER':'经办人',
export const contactPersonTypes = {
'LEGAL': '经营者/法定代表人',
'SUPER': '经办人',
}
export const certTypes={
'0':'身份证'
export const certTypes = {
'0': '身份证'
}
export const companyChildTypes={
'1':'普通企业',
'2':'事业单位',
'3':'政府机关',
'4':'社会组织',
export const companyChildTypes = {
'1': '普通企业',
'2': '事业单位',
'3': '政府机关',
'4': '社会组织',
}
export const sexs={
'0':'男',
'1':'女'
export const sexs = {
'0': '男',
'1': '女'
}
export const settlementTypes={
'0':'非法人结算',
'1':'法人结算'
export const settlementTypes = {
'0': '非法人结算',
'1': '法人结算'
}
export const settlementCardTypes={
'11':'对私借记卡',
'21':'对公借记卡',
}
export const settlementCardTypes = {
'11': '对私借记卡',
'21': '对公借记卡',
}
// WAIT 待提交
// INIT 待处理
// AUDIT 待审核
// SIGN 待签约
// FINISH 已完成
// REJECTED 失败
export const statusList = [{
value: 'WAIT',
name: '待提交',
class: 'gray'
},
{
value: 'INIT',
name: '待处理',
class: 'warning'
},
{
value: 'AUDIT',
name: '待审核',
class: 'warning'
},
{
value: 'SIGN',
name: '待签约',
class: 'warning'
},
{
value: 'FINISH',
name: '已完成',
class: 'success'
},
{
value: 'REJECTED',
name: '失败',
class: 'error'
},
]

View File

@@ -117,7 +117,7 @@
<script setup>
import {
userTypes
userTypes,statusList
} from '../data.js'
const code = ref('')
@@ -145,43 +145,7 @@
queryEntry
} from '@/http/api/order/entryManager.js'
// WAIT 待提交
// INIT 待处理
// AUDIT 待审核
// SIGN 待签约
// FINISH 已完成
// REJECTED 失败
const statusList = [{
value: 'WAIT',
name: '待提交',
class: 'gray'
},
{
value: 'INIT',
name: '待处理',
class: 'warning'
},
{
value: 'AUDIT',
name: '待审核',
class: 'warning'
},
{
value: 'SIGN',
name: '待签约',
class: 'warning'
},
{
value: 'FINISH',
name: '已完成',
class: 'success'
},
{
value: 'REJECTED',
name: '失败',
class: 'error'
},
]
function statusListSelect(e) {
query.status = e.value
@@ -280,6 +244,7 @@
onReachBottom(() => {
if (!isEnd.value) {
query.page++
getData()
}
})

2
env/config.js vendored
View File

@@ -30,7 +30,7 @@ const processEnv = process.env.NODE_ENV
// 改变env环境
function changeEnv(envMode){
appConfig.env = allEnvMap[envMode || processEnv]
appConfig.wss = allEnvMap[envMode || processEnv].JEEPAY_BASE_URL_WSS
// appConfig.wss = allEnvMap[envMode || processEnv].JEEPAY_BASE_URL_WSS
}
export default { changeEnv: changeEnv }

View File

@@ -0,0 +1,23 @@
import http from "@/http/http.js";
const request = http.request;
const urlType = "account";
export function getMerchantRegister(data) {
return request({
url: `${urlType}/admin/merchantRegister`,
method: "GET",
data: {
...data,
},
});
}
export function addMerchantRegister(data) {
return request({
url: `${urlType}/admin/merchantRegister`,
method: "POST",
data: {
...data,
},
});
}

View File

@@ -0,0 +1,50 @@
import http from "@/http/http.js";
const request = http.request;
const urlType = "account";
export function allShopList(data) {
return request({
url: `${urlType}/admin/shopInfo`,
method: "GET",
data: {
...data,
},
});
}
export function addShop(data) {
return request({
url: `${urlType}/admin/shopInfo`,
method: "post",
data: {
...data,
},
});
}
export function editShop(data) {
return request({
url: `${urlType}/admin/shopInfo`,
method: "put",
data: {
...data,
},
});
}
export function getShopDetail(data) {
return request({
url: `${urlType}/admin/shopInfo/detail`,
method: "get",
data: {
...data,
},
});
}
export function delShop(data) {
return request({
url: `${urlType}/admin/shopInfo`,
method: "DELETE",
data: {
...data,
},
});
}

View File

@@ -0,0 +1,33 @@
import http from "@/http/http.js";
const request = http.request;
const urlType = "order";
export function shopMerchant(data) {
return request({
url: `${urlType}/admin/shopMerchant`,
method: "GET",
data: {
...data,
},
});
}
export function editShopMerchant(data) {
return request({
url: `${urlType}/admin/shopMerchant`,
method: "PUT",
data: {
...data,
},
});
}
//获取当前店铺的主店进件信息
export function getMainMerchant(data) {
return request({
url: `${urlType}/admin/shopMerchant/getMainMerchant`,
method: "GET",
data: {
...data,
},
});
}

129
package-lock.json generated
View File

@@ -14,10 +14,11 @@
"jsbn": "^1.1.0",
"jsencrypt": "^3.3.2",
"lodash": "^4.17.21",
"marked": "4.x",
"pinia-plugin-unistorage": "^0.1.2",
"to-arraybuffer": "^1.0.1",
"uview-plus": "^3.3.32",
"ysk-utils": "^1.0.78"
"ysk-utils": "^1.0.85"
},
"devDependencies": {
"copy-webpack-plugin": "^12.0.2",
@@ -30,7 +31,6 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/set-array": "^1.2.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
@@ -45,7 +45,6 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6.0.0"
}
@@ -55,7 +54,6 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz",
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6.0.0"
}
@@ -65,7 +63,6 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz",
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25"
@@ -75,15 +72,13 @@
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.25",
"resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
@@ -141,7 +136,6 @@
"resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-9.6.1.tgz",
"integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==",
"dev": true,
"peer": true,
"dependencies": {
"@types/estree": "*",
"@types/json-schema": "*"
@@ -152,7 +146,6 @@
"resolved": "https://registry.npmmirror.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
"integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
"dev": true,
"peer": true,
"dependencies": {
"@types/eslint": "*",
"@types/estree": "*"
@@ -162,8 +155,7 @@
"version": "1.0.7",
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.7.tgz",
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@types/json-schema": {
"version": "7.0.15",
@@ -176,7 +168,6 @@
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.14.1.tgz",
"integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==",
"dev": true,
"peer": true,
"dependencies": {
"undici-types": "~6.21.0"
}
@@ -186,7 +177,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.14.1.tgz",
"integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/helper-numbers": "1.13.2",
"@webassemblyjs/helper-wasm-bytecode": "1.13.2"
@@ -196,29 +186,25 @@
"version": "1.13.2",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz",
"integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@webassemblyjs/helper-api-error": {
"version": "1.13.2",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz",
"integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@webassemblyjs/helper-buffer": {
"version": "1.14.1",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz",
"integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@webassemblyjs/helper-numbers": {
"version": "1.13.2",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz",
"integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/floating-point-hex-parser": "1.13.2",
"@webassemblyjs/helper-api-error": "1.13.2",
@@ -229,15 +215,13 @@
"version": "1.13.2",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz",
"integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@webassemblyjs/helper-wasm-section": {
"version": "1.14.1",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz",
"integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@webassemblyjs/helper-buffer": "1.14.1",
@@ -250,7 +234,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz",
"integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==",
"dev": true,
"peer": true,
"dependencies": {
"@xtuc/ieee754": "^1.2.0"
}
@@ -260,7 +243,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz",
"integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==",
"dev": true,
"peer": true,
"dependencies": {
"@xtuc/long": "4.2.2"
}
@@ -269,15 +251,13 @@
"version": "1.13.2",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz",
"integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@webassemblyjs/wasm-edit": {
"version": "1.14.1",
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz",
"integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@webassemblyjs/helper-buffer": "1.14.1",
@@ -294,7 +274,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz",
"integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
@@ -308,7 +287,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz",
"integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@webassemblyjs/helper-buffer": "1.14.1",
@@ -321,7 +299,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz",
"integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@webassemblyjs/helper-api-error": "1.13.2",
@@ -336,7 +313,6 @@
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz",
"integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==",
"dev": true,
"peer": true,
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@xtuc/long": "4.2.2"
@@ -346,22 +322,19 @@
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
"integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/@xtuc/long": {
"version": "4.2.2",
"resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz",
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/acorn": {
"version": "8.14.1",
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz",
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
"dev": true,
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -374,6 +347,7 @@
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.16.0.tgz",
"integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.3",
"json-schema-traverse": "^1.0.0",
@@ -547,8 +521,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/caniuse-lite": {
"version": "1.0.30001715",
@@ -568,8 +541,7 @@
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"peer": true
]
},
"node_modules/chokidar": {
"version": "3.6.0",
@@ -612,7 +584,6 @@
"resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
"integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6.0"
}
@@ -631,8 +602,7 @@
"version": "2.20.3",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/copy-webpack-plugin": {
"version": "12.0.2",
@@ -672,8 +642,7 @@
"version": "1.5.141",
"resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.141.tgz",
"integrity": "sha512-qS+qH9oqVYc1ooubTiB9l904WVyM6qNYxtOEEGReoZXw3xlqeYdFr5GclNzbkAufWgwWLEPoDi3d9MoRwwIjGw==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/emojis-list": {
"version": "3.0.0",
@@ -689,7 +658,6 @@
"resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
"integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==",
"dev": true,
"peer": true,
"dependencies": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
@@ -702,15 +670,13 @@
"version": "1.7.0",
"resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
"integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6"
}
@@ -720,7 +686,6 @@
"resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz",
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
"dev": true,
"peer": true,
"dependencies": {
"esrecurse": "^4.3.0",
"estraverse": "^4.1.1"
@@ -734,7 +699,6 @@
"resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz",
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
"dev": true,
"peer": true,
"dependencies": {
"estraverse": "^5.2.0"
},
@@ -747,7 +711,6 @@
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"dev": true,
"peer": true,
"engines": {
"node": ">=4.0"
}
@@ -757,7 +720,6 @@
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true,
"peer": true,
"engines": {
"node": ">=4.0"
}
@@ -767,7 +729,6 @@
"resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.8.x"
}
@@ -863,8 +824,7 @@
"version": "0.4.1",
"resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/globby": {
"version": "14.0.2",
@@ -908,15 +868,13 @@
"version": "4.2.11",
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"peer": true,
"engines": {
"node": ">=8"
}
@@ -1001,7 +959,6 @@
"resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz",
"integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
"dev": true,
"peer": true,
"dependencies": {
"@types/node": "*",
"merge-stream": "^2.0.0",
@@ -1030,8 +987,7 @@
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/json-schema-traverse": {
"version": "1.0.0",
@@ -1065,7 +1021,6 @@
"resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
"integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6.11.5"
}
@@ -1095,12 +1050,23 @@
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/marked": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/marked/-/marked-4.3.0.tgz",
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz",
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/merge2": {
"version": "1.4.1",
@@ -1129,7 +1095,6 @@
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true,
"peer": true,
"engines": {
"node": ">= 0.6"
}
@@ -1139,7 +1104,6 @@
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"peer": true,
"dependencies": {
"mime-db": "1.52.0"
},
@@ -1157,8 +1121,7 @@
"version": "2.0.19",
"resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz",
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/normalize-path": {
"version": "3.0.0",
@@ -1185,8 +1148,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -1322,6 +1284,7 @@
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.78.0.tgz",
"integrity": "sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==",
"dev": true,
"peer": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
@@ -1376,6 +1339,7 @@
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -1482,7 +1446,6 @@
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -1501,7 +1464,6 @@
"resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
"peer": true,
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
@@ -1512,7 +1474,6 @@
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dev": true,
"peer": true,
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -1528,7 +1489,6 @@
"resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz",
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6"
}
@@ -1538,7 +1498,6 @@
"resolved": "https://registry.npmmirror.com/terser/-/terser-5.39.0.tgz",
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
"acorn": "^8.8.2",
@@ -1557,7 +1516,6 @@
"resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz",
"integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==",
"dev": true,
"peer": true,
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
"jest-worker": "^27.4.5",
@@ -1613,8 +1571,7 @@
"version": "6.21.0",
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/unicorn-magic": {
"version": "0.1.0",
@@ -1647,7 +1604,6 @@
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"escalade": "^3.2.0",
"picocolors": "^1.1.1"
@@ -1685,7 +1641,6 @@
"resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.2.tgz",
"integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
"dev": true,
"peer": true,
"dependencies": {
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.1.2"
@@ -1746,15 +1701,15 @@
"resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz",
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
"dev": true,
"peer": true,
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/ysk-utils": {
"version": "1.0.78",
"resolved": "https://registry.npmmirror.com/ysk-utils/-/ysk-utils-1.0.78.tgz",
"integrity": "sha512-Bgr5B3WWiy0nbgL91QVKoVPYm4wt13Rlav757zEjMVRHbmTjwFEhi3wJlYus0JGd52mbknSxXHMazAPHXwA7uQ==",
"version": "1.0.85",
"resolved": "https://registry.npmmirror.com/ysk-utils/-/ysk-utils-1.0.85.tgz",
"integrity": "sha512-HkbV4Jidi3G6DAuGAN972tClUYtC2zVoxo4crrxexfn0rZa8HjXatUfEbawHOeEzyl6G1CdC+160I2bKfxEBlA==",
"license": "ISC",
"dependencies": {
"bignumber.js": "^9.3.1",
"loadsh": "^0.0.4",

View File

@@ -13,7 +13,7 @@
"pinia-plugin-unistorage": "^0.1.2",
"to-arraybuffer": "^1.0.1",
"uview-plus": "^3.3.32",
"ysk-utils": "^1.0.82"
"ysk-utils": "^1.0.85"
},
"devDependencies": {
"copy-webpack-plugin": "^12.0.2",

View File

@@ -274,6 +274,7 @@ onLoad((opt) => {
);
optiopns.index = index;
const item = superVipStore.vipLevelList.find((item) => item.id == opt.id);
item.cycleRewardCouponList=item.cycleRewardCouponList||[]
Object.assign(form, item);
}
});

View File

@@ -928,6 +928,41 @@
}
}
]
},
{
"root": "pagesShops",
"pages": [
{
"path": "index/index",
"style": {
"navigationBarTitleText": "店铺管理"
}
},
{
"path": "add/add",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pay-config/pay-config",
"style": {
"navigationBarTitleText": "支付配置"
}
}
]
},
{
"root": "activationCode",
"pages": [
{
"path": "index/index",
"style": {
"navigationBarTitleText": "激活码列表"
}
}
]
}
// ,

View File

@@ -41,7 +41,7 @@
:key="index"
>
<view>
<view class="up-line-1" style="max-width: 240rpx;">{{ item.name }}</view>
<view class="up-line-1" :style="returnStyle(item)">{{ item.name }}</view>
<view class="u-m-t-10 u-font-24 color-666 up-line-1">{{
item.specInfo || ""
}}</view>
@@ -234,6 +234,20 @@ const props = defineProps({
});
function returnStyle(item){
let width=360
let priceLen=0
if(item.is_time_discount){
priceLen+=`${formatPrice(item.lowPrice * item.number)}`.length
priceLen+=`${returnLimitTotalPrice(item)}`.length
}else{
priceLen+=`${formatPrice(item.lowPrice * item.number)}`.length
}
width-=16*priceLen
return {
width:width+'rpx'
}
}
function returnLimitPrice(data) {
const price = yskUtils.limitUtils.returnPrice({

View File

@@ -51,6 +51,9 @@
const integer=computed(()=>{
if(!props.goods){
return true
}
if(props.goods.product_type=="weight"){
return false
}

View File

@@ -43,7 +43,7 @@
</view>
<view class="u-flex u-row-between u-m-t-24 u-col-top">
<view class="no-wrap">打印状态</view>
<view class="u-p-l-32" style="max-width: 522rpx; word-wrap: break-word; color: red">
<view class="u-p-l-32" style="max-width: 522rpx; word-wrap: break-word; color: red" v-if="data.printStatus">
<template v-if="JSON.parse(data.printStatus).length > 0">
打印失败{{
JSON.parse(data.printStatus)

354
pagesShops/add/add.vue Normal file
View File

@@ -0,0 +1,354 @@
<template>
<view class="min-page u-font-28 color-333 bg-f7">
<view class="container">
<up-form labelPosition="top" :model="form" :rules="rules" ref="refForm" label-width="700rpx"
errorType="toast" :label-style="labelStyle">
<up-form-item prop="shopName" label="店铺名称" :required="returnIsRequired('shopName')">
<up-input v-model="form.shopName" placeholder="请输入店铺名称"></up-input>
</up-form-item>
<up-form-item prop="shopType" label="店铺类型" :required="returnIsRequired('shopType')">
<up-radio-group v-model="form.shopType" :disabled="isDisabledEdit()">
<up-radio v-for="(value,key) in shopTypes" :label="value" :name="key"></up-radio>
</up-radio-group>
</up-form-item>
<up-form-item prop="isHeadShop" label="是否为主店" :required="returnIsRequired('isHeadShop')"
v-if="form.shopType != 'only'">
<up-switch v-model="form.isHeadShop" :size="20" :disabled="isDisabledEdit()" :inactive-value="0"
:active-value="1"></up-switch>
</up-form-item>
<template v-if="form.isHeadShop == 0 && form.shopType != 'only'">
<up-form-item label="选择主店" prop="mainId" :required="returnIsRequired('mainId')">
<headShopSelect v-model="form.mainId" :disabled="isDisabledEdit('mainId')"></headShopSelect>
</up-form-item>
</template>
<up-form-item prop="chainName" label="连锁店扩展店名" :required="returnIsRequired('chainName')">
<up-input v-model="form.chainName" placeholder="连锁店扩展店名"></up-input>
</up-form-item>
<up-form-item prop="logo" label="门店logo" :required="returnIsRequired('logo')">
<my-upload-img v-model="form.logo" :size="200"></my-upload-img>
</up-form-item>
<up-form-item prop="frontImg" label="门店照片" :required="returnIsRequired('frontImg')">
<my-upload-img v-model="form.frontImg" :size="200"></my-upload-img>
</up-form-item>
<up-form-item prop="registerType" label="经营模式" :required="returnIsRequired('registerType')">
<up-radio-group v-model="form.registerType">
<up-radio v-for="(value,key) in registerTypes" :label="value" :name="key"></up-radio>
</up-radio-group>
<up-alert description="请谨慎修改" type="warning" :show-icon="true"></up-alert>
</up-form-item>
<up-form-item prop="tubeType" label="管理方式" :required="returnIsRequired('tubeType')"
v-if="form.shopType != 'only'">
<up-radio-group v-model="form.tubeType">
<up-radio v-for="(value,key) in tubeTypes" :label="value" :name="key*1"></up-radio>
</up-radio-group>
<up-alert description="请谨慎修改" type="warning" :show-icon="true"></up-alert>
</up-form-item>
<up-form-item prop="profiles" label="试用/正式" :required="returnIsRequired('profiles')">
<up-radio-group v-model="form.profiles">
<up-radio v-for="(value,key) in profiless" :label="value" :name="key"></up-radio>
</up-radio-group>
</up-form-item>
<up-form-item prop="activateCode" label="激活码" :required="returnIsRequired('activateCode')">
<view>
<up-input v-model="form.activateCode" placeholder="激活码"></up-input>
<view class="u-font-24 u-m-t-14 color-666">
输入有效激活码表示添加的同时直接激活该店铺
</view>
</view>
</up-form-item>
<up-form-item prop="accountName" label="登录账号" :required="returnIsRequired('accountName')">
<up-input v-model="form.accountName" placeholder="登录账号"></up-input>
</up-form-item>
<up-form-item prop="accountPwd" label="登录密码" :required="returnIsRequired('accountPwd')">
<up-input v-model="form.accountPwd" placeholder="登录密码"></up-input>
</up-form-item>
<up-form-item prop="phone" label="联系电话" :required="returnIsRequired('phone')">
<up-input v-model="form.phone" placeholder="联系电话"></up-input>
</up-form-item>
<up-form-item prop="supportDeviceNumber" label="设备数量"
:required="returnIsRequired('supportDeviceNumber')">
<up-number-box v-model="form.supportDeviceNumber" input-width="100"></up-number-box>
</up-form-item>
<up-form-item prop="districts" label="店铺地址" :required="returnIsRequired('districts')">
<view class="u-relative w-full">
<up-input :modelValue="address" placeholder="店铺地址"></up-input>
<view class="u-absolute position-all" style="z-index: 10;" @click="showAddressSelect=true">
</view>
</view>
</up-form-item>
<up-form-item prop="lng" label="店铺经度" :required="returnIsRequired('lng')">
<view class="u-flex u-col-center gap-20">
<up-input v-model="form.lng" placeholder="经度" disabled></up-input>
<up-input v-model="form.lat" placeholder="维度" disabled></up-input>
<my-button @click="chooseLng">选择坐标</my-button>
</view>
</up-form-item>
<up-form-item prop="address" label="店铺详细地址" :required="returnIsRequired('address')">
<up-input v-model="form.address" placeholder="店铺详细地址"></up-input>
</up-form-item>
<up-form-item prop="detail" label="店铺简介" :required="returnIsRequired('detail')">
<up-textarea v-model="form.detail" placeholder="店铺简介"></up-textarea>
</up-form-item>
<up-form-item prop="status" label="状态" :required="returnIsRequired('status')">
<up-radio-group v-model="form.status">
<up-radio v-for="(value,key) in statuss" :label="value" :name="key*1"></up-radio>
</up-radio-group>
</up-form-item>
</up-form>
</view>
<my-address-select v-model="showAddressSelect" @city-change="cityChange"></my-address-select>
<my-bottom-btn-group @cancel="uni.navigateBack()" @save="submit"></my-bottom-btn-group>
</view>
</template>
<script setup>
import {
onLoad,onShow
} from '@dcloudio/uni-app'
import {
computed,
reactive,
ref,
watch,
watchEffect
} from 'vue';
import {
statuss,
shopTypes,
profiless,
registerTypes,
tubeTypes
} from '../data.js'
import headShopSelect from './components/head-shop-select.vue'
import * as shopInfoApi from '@/http/api/account/shopInfo.js'
function chooseLng() {
uni.chooseLocation({
keyword: address.value,
success(res) {
console.log('res', res);
form.lat = '' + res.latitude
form.lng = '' + res.longitude
}
})
}
function cityChange(e) {
console.log(e);
form.provinces = e.province.regionName
form.cities = e.city.regionName
form.districts = e.area.regionName
}
const showAddressSelect = ref(false)
const labelStyle = {
fontWeight: "700"
}
const refForm = ref(null)
const form = reactive({
id: null,
shopName: "",
mainId: "",
shopType: "only",
tubeType: 0,
registerType: "before",
profiles: "release",
activateCode: "",
accountName: "",
accountPwd: "",
phone: "",
supportDeviceNumber: 1,
lat: "",
lng: "",
address: "",
detail: "",
status: 1,
logo: "",
frontImg: "",
provinces: "",
cities: "",
districts: "",
chainName: "",
isHeadShop: 0,
})
watch(() => form.isHeadShop, (newval) => {
form.mainId = ''
})
function isDisabledEdit(key) {
if(options.type==='addBranch'){
return true
}
if (form.id) {
return true
} else {
false
}
}
const address = computed(() => {
if (form.provinces && form.cities && form.districts) {
return form.provinces + '-' + form.cities + '-' + form.districts
}
})
const rules = reactive({
'shopName': {
type: 'string',
max: 30,
required: true,
message: '请输入店铺名称',
trigger: ['blur', 'change'],
},
'logo': {
type: 'string',
required: true,
message: '请上传门店logo',
trigger: ['blur', 'change'],
},
accountName: {
max: 30,
required: true,
message: '请输入登录账号',
trigger: ['blur', 'change'],
},
phone: {
max: 30,
required: true,
message: '请输入联系电话',
trigger: ['blur', 'change'],
},
districts: {
max: 30,
required: true,
message: '请选择店铺地址',
trigger: ['blur', 'change'],
},
lng: {
max: 30,
required: true,
message: '请选择店铺坐标',
trigger: ['blur', 'change'],
// 自定义验证函数,见上说明
// validator: (rule, value, callback) => {
// return !form.lng?false:true;
// },
},
tubeType: {
type: 'number',
max: 30,
required: true,
message: '请选择管理方式',
trigger: ['blur', 'change'],
},
mainId: {
max: 30,
required: true,
message: '请选择主店铺',
trigger: ['blur', 'change'],
}
})
function returnIsRequired(key) {
if (rules[key] && rules[key].required) {
return true
}
return false
}
function submit() {
refForm.value.validate().then(valid => {
console.log('valid', valid);
if (valid) {
// uni.$u.toast('校验通过')
save()
} else {}
}).catch(() => {
// 处理验证错误
});
}
async function save() {
const res = (form.id) ? await shopInfoApi.editShop(form) : await shopInfoApi.addShop(form)
if (res) {
uni.$u.toast(form.id ? '修改成功' : '添加成功')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
}
const options=reactive({})
onLoad(async (opt) => {
Object.assign(options,opt)
})
onShow(async()=>{
if(options.type=='addBranch'){
// 添加分店
const res = await await shopInfoApi.getShopDetail({
id: options.id
})
form.isHeadShop=0
form.mainId=res.id
form.shopType=res.shopType
uni.setNavigationBarTitle({
title: '添加店铺'
})
return
}else{
if (options.id) {
rules.accountName.required = false
const res = await await shopInfoApi.getShopDetail({
id: options.id
})
for (let key in form) {
form[key] = res[key]
}
uni.setNavigationBarTitle({
title: '编辑店铺'
})
} else {
uni.setNavigationBarTitle({
title: '添加店铺'
})
}
}
})
watchEffect(()=>{
console.log(form.shopType)
if(form.shopType!='only'&&!form.isHeadShop){
rules.mainId.required=true
}
})
</script>
<style lang="scss" scoped>
.min-page {
padding: 32rpx 28rpx;
}
.container {
background-color: #fff;
padding: 12rpx 28rpx;
border-radius: 16rpx;
}
:deep(.input-placeholder) {
font-size: 28rpx;
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<view class="w-full">
<view class="box u-flex u-row-between" @click="showPop" :class="{disabled:disabled}">
<text class="color-999 " v-if="!modelValue">请选择</text>
<text v-else class="u-m-r-30">{{shopName}}</text>
<up-icon name="arrow-down"></up-icon>
</view>
<popupHeadShop v-model="show" @confirm="confirm"></popupHeadShop>
</view>
</template>
<script setup>
import {
computed,
onMounted,
ref
} from 'vue';
import popupHeadShop from './popup-head-shop.vue'
import * as shopInfoApi from '@/http/api/account/shopInfo.js'
const props = defineProps({
disabled: {
type: Boolean,
default: false
}
})
const show = ref(false)
function showPop() {
if (props.disabled) {
return
}
show.value = true
}
const modelValue = defineModel()
function confirm(e) {
console.log(e);
modelValue.value = e.shopId
selShopInfo.value = e
}
const selShopInfo = ref(null)
const shopName = computed(() => {
if (selShopInfo.value) {
return selShopInfo.value.shopName
}
return ''
})
onMounted(async () => {
if (modelValue.value) {
const res = await shopInfoApi.getShopDetail({
id: modelValue.value
})
if (res) {
selShopInfo.value = res
}
}
})
</script>
<style lang="scss" scoped>
.box {
padding: 9px 9px;
border: 1px solid #dadbde;
display: flex;
border-radius: 4px;
&.disabled {
background-color: rgb(245, 247, 250);
}
}
</style>

View File

@@ -0,0 +1,209 @@
<template>
<view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
<view class="font-bold color-333 u-font-32">选择门店</view>
<view class="u-m-t-24">
<up-search v-model="query.shopName" @search="search" @clear="search" @custom="search"></up-search>
</view>
<scroll-view @scrolltolower="scrolltolower" scroll-with-animation :scroll-into-view="selShopId"
class="scroll-view u-m-t-30" scroll-y="true" style="max-height :60vh;">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.shopId" @click="itemClick(item)"
:id="'shop_'+item.shopId" :class="{active:selShop==item.shopId}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.shopName}}</view>
</view>
<template v-if="query.shopName!==''">
<up-empty v-if="list.length==0" text="未搜索到相关店铺"></up-empty>
<up-loadmore v-else :status="isEnd?'nomor':'loading'"></up-loadmore>
</template>
<template v-else>
<up-loadmore :status="isEnd?'nomor':'loading'"></up-loadmore>
</template>
</scroll-view>
<view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button>
</view>
<view class="u-flex-1">
<my-button type="primary" @click="submit">确定</my-button>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
computed,
onMounted,
reactive,
ref,
watch
} from 'vue';
import {
adminShopList
} from '@/http/api/shop.js';
const customStyle = ref({
marginRight: '20px'
});
const show = defineModel(false)
let selShop = defineModel('selShop', {
default: '',
});
watch(() => show.value, (newval) => {
if (newval) {
init()
}
})
const selShopId = ref('')
function returnLabel() {
const findShop = list.value.find(v => v.shopId == selShop.value)
return findShop ? findShop.shopName : ''
}
function itemClick(shop) {
selShop.value = shop.shopId
}
function returnShopName(shopId) {
const item = list.value.find((v) => v.shopId == shopId);
return item?.shopName || '';
}
function close() {
show.value = false;
}
const emits = defineEmits(['confirm'])
function submit() {
show.value = false;
if (!selShop.value) {
return uni.showToast({
title: '请选择门店',
icon: 'none'
})
}
const findShop = list.value.find(v => v.shopId == selShop.value)
emits('confirm', findShop)
}
const list = ref([]);
function openPopup() {
selShopId.value = 'shop_' + selShop.value
show.value = true;
}
const query = reactive({
page: 1,
size: 10,
shopName: '',
type: 'only',
isHeadShop: 1
})
const isEnd = ref(false)
function scrolltolower() {
if (!isEnd.value) {
query.page++
init()
}
}
function search() {
selShop.value = '';
query.page = 1;
isEnd.value = false
init()
}
async function init() {
const res = await adminShopList(query);
if (res) {
const arr = res.records.map((item) => ({
shopId: item.id,
shopName: item.shopName,
}));
isEnd.value = query.page >= res.totalPage * 1
if (query.page == 1) {
list.value = arr
} else {
list.value.push(...arr)
}
}
}
</script>
<style lang="scss">
.box {
border-radius: 8upx;
display: flex;
flex-direction: row;
align-items: top;
flex-wrap: wrap;
padding: 10rpx 24rpx;
border: 2rpx solid #e5e5e5;
position: relative;
.icon {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
}
}
.shop-item {
padding: 4rpx 8rpx 4rpx 16rpx;
border-radius: 4rpx;
border: 2rpx solid #f0f0f0;
background-color: #f5f5f5;
margin-bottom: 16rpx;
margin-left: 16rpx;
}
.scroll-view {
.item {
border: 1px solid #eee;
padding: 20rpx;
border-radius: 12rpx;
&.active {
border-color: $my-main-color;
}
}
}
.checkbox {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 6rpx;
border: 1px solid #999;
}
.item {
&.active {
.checkbox {
background-color: $my-main-color;
border-color: $my-main-color;
}
}
}
</style>

View File

@@ -0,0 +1,302 @@
<template>
<view>
<view class="box" @click.stop="openPopup">
<text class="u-font-28 color-999 u-p-r-16" v-if="selArr[0]===null||selArr[1]===null">请选择</text>
<text class="u-font-28 color-333 u-p-r-16" v-else>{{returnLabel()}}</text>
<view class="icon">
<up-icon name="arrow-down" size="14" color="#999"></up-icon>
</view>
</view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
<view class="font-bold color-333 u-font-32">选择行业类目</view>
<view class="u-m-t-24">
<up-search v-model="query.bankName" @search="search" @change="bankNameChange" @custom="search"
@clear="search"></up-search>
</view>
<view class="u-flex u-m-t-30 gap-20 u-col-top">
<view class="u-flex-1">
<view class="u-p-b-24 font-bold text-center">一级类目</view>
<scroll-view @scrolltolower="scrolltolower" scroll-with-animation :scroll-into-view="oneSelId"
class="scroll-view " scroll-y="true" style="max-height :60vh;">
<view class="u-m-b-10 u-flex item" v-for="(item,index) in list" :key="item.id"
@click="oneCategoryClick(index)" :id="'cateOne_'+index"
:class="{active:selArr[0]===index}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.firstCategory}}</view>
</view>
<up-empty v-if="list.length==0" text="暂无相关分类"></up-empty>
</scroll-view>
</view>
<view class="u-flex-1">
<view class="u-p-b-24 font-bold text-center">二级类目</view>
<scroll-view @scrolltolower="scrolltolower" scroll-with-animation :scroll-into-view="twoSelId"
class="scroll-view " scroll-y="true" style="max-height :60vh;">
<view class="u-m-b-10 u-flex item" v-for="(item,index) in sendList" :key="item.id"
@click="selArr[1]=index" :id="'cateTwo_'+index" :class="{active:selArr[1]==index}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.secondCategory}}</view>
</view>
<up-empty v-if="list.length==0" text="暂无相关分类"></up-empty>
</scroll-view>
</view>
</view>
<view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button>
</view>
<view class="u-flex-1">
<my-button type="primary" @click="submit">确定</my-button>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
computed,
nextTick,
onMounted,
reactive,
ref,
watch
} from 'vue';
import {
mccCategory
} from '@/http/api/system/common.js';
const customStyle = ref({
marginRight: '20px'
});
const show = ref(false);
const modelValue = defineModel();
const oneSelId = ref('')
const twoSelId = ref('')
const allCategoryArr = computed(() => {
return list.value.reduce((prve, cur) => {
prve.push(...cur.child)
return prve
}, [])
})
function returnLabel() {
const [index1, index2] = selArr.value
console.log('selArr', selArr.value);
if (index1 !== null && index2 !== null) {
return list.value[index1].firstCategory + '/' + list.value[index1].child[index2].secondCategory
}
return ''
}
function oneCategoryClick(index) {
selArr.value[0] = index
selArr.value[1] = null
}
const selItem = ref(null)
function itemClick(bank) {
selItem.value = bank;
}
function close() {
show.value = false;
}
function submit() {
if (selArr.value[0] === null || selArr.value[1] === null) {
return uni.showToast({
title: '请选择行业类目',
icon: 'none'
})
}
const [oneIndex, twoIndex] = selArr.value
const item = list.value[oneIndex].child[twoIndex]
modelValue.value = item.firstCategoryCode + '_' + item.secondCategoryCode
show.value = false;
}
function search() {
init()
}
const list = ref([]);
function openPopup() {
show.value = true;
}
// --------------- 核心新增:节流函数实现 ---------------
/**
* 节流函数:限制函数在指定时间内只触发一次
* @param {Function} fn - 要节流的函数
* @param {number} delay - 节流延迟时间(毫秒)
* @returns {Function} 节流后的函数
*/
function throttle(fn, delay = 300) {
let timer = null; // 定时器标识
return function(...args) {
// 如果已有定时器,直接返回(未到触发时间)
if (timer) return;
// 执行函数并设置新定时器
fn.apply(this, args);
timer = setTimeout(() => {
clearTimeout(timer);
timer = null;
}, delay);
};
}
// --------------- 核心修改创建节流后的search方法 ---------------
// 300ms内只触发一次search可根据需求调整delay值如500ms
const throttledSearch = throttle(search, 300);
// --------------- 改造bankNameChange调用节流后的搜索 ---------------
function bankNameChange() {
// 输入变化时,调用节流后的搜索方法
throttledSearch();
}
const query = reactive({
bankName: ''
})
const isEnd = ref(false)
function scrolltolower() {
}
async function init() {
const res = await mccCategory(query);
if (res) {
list.value = res.map(v => {
return {
...v,
firstCategoryCode: v.child[0].firstCategoryCode
}
})
startWatch()
}
}
const selArr = ref([null, null])
const sendList = computed(() => {
if (selArr.value[0] !== null) {
return list.value[selArr.value[0]].child
}
})
function startWatch() {
watch(() => modelValue.value, (newval) => {
if (newval) {
const arr = modelValue.value.split('_')
const [oneCode, twoCode] = arr
console.log('oneCode',oneCode);
console.log('twoCode',twoCode);
const oneIndex = list.value.findIndex(v => v.firstCategoryCode == oneCode)
if (oneIndex != -1) {
selArr.value[0] = oneIndex
oneSelId.value = 'cateOne_' + oneIndex
const twoIndex = list.value[oneIndex].child.findIndex(v => v.secondCategoryCode==twoCode)
if (twoIndex != -1) {
selArr.value[1] = twoIndex
twoSelId.value = 'cateTwo_' + twoIndex
}
}
console.log('watch selArr',selArr.value);
} else {
selArr.value = [null, null]
}
}, {
immediate: true
})
}
onMounted(init);
</script>
<style lang="scss">
.box {
border-radius: 8upx;
display: flex;
flex-direction: row;
align-items: top;
flex-wrap: wrap;
padding: 20rpx 24rpx;
border: 2rpx solid #e5e5e5;
position: relative;
.icon {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
}
}
.shop-item {
padding: 4rpx 8rpx 4rpx 16rpx;
border-radius: 4rpx;
border: 2rpx solid #f0f0f0;
background-color: #f5f5f5;
margin-bottom: 16rpx;
margin-left: 16rpx;
}
.scroll-view {
.item {
border: 1px solid #eee;
padding: 20rpx;
border-radius: 12rpx;
&.active {
border-color: $my-main-color;
}
}
}
.checkbox {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 6rpx;
border: 1px solid #999;
}
.item {
&.active {
.checkbox {
background-color: $my-main-color;
border-color: $my-main-color;
}
}
}
</style>

View File

@@ -0,0 +1,203 @@
<template>
<view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
<view class="font-bold color-333 u-font-32">选择门店</view>
<view class="u-m-t-24">
<up-search v-model="query.shopName" @search="search" @clear="search" @custom="search"></up-search>
</view>
<scroll-view @scrolltolower="scrolltolower" scroll-with-animation :scroll-into-view="selShopId"
class="scroll-view u-m-t-30" scroll-y="true" style="max-height :60vh;">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.shopId" @click="itemClick(item)"
:id="'shop_'+item.shopId" :class="{active:selShop==item.shopId}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.shopName}}</view>
</view>
<template v-if="query.shopName!==''">
<up-empty v-if="list.length==0" text="未搜索到相关店铺"></up-empty>
<up-loadmore v-else :status="isEnd?'nomor':'loading'"></up-loadmore>
</template>
<template v-else>
<up-loadmore :status="isEnd?'nomor':'loading'"></up-loadmore>
</template>
</scroll-view>
<view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button>
</view>
<view class="u-flex-1">
<my-button type="primary" @click="submit">确定</my-button>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
computed,
onMounted,
reactive,
ref,
watch
} from 'vue';
import {
adminShopList
} from '@/http/api/shop.js';
const customStyle = ref({
marginRight: '20px'
});
const show = defineModel(false)
let selShop = defineModel('selShop', {
default: '',
});
const selShopId = ref('')
function returnLabel() {
const findShop = list.value.find(v => v.shopId == selShop.value)
return findShop ? findShop.shopName : ''
}
function itemClick(shop) {
selShop.value = shop.shopId
}
function returnShopName(shopId) {
const item = list.value.find((v) => v.shopId == shopId);
return item?.shopName || '';
}
function close() {
show.value = false;
}
const emits=defineEmits(['confirm'])
function submit() {
show.value = false;
if(!selShop.value){
return uni.showToast({
title:'请选择门店',
icon:'none'
})
}
const findShop = list.value.find(v => v.shopId == selShop.value)
emits('confirm',findShop)
}
const list = ref([]);
function openPopup() {
selShopId.value = 'shop_' + selShop.value
show.value = true;
}
const query = reactive({
page: 1,
size: 10,
shopName: '',
})
const isEnd = ref(false)
function scrolltolower() {
if (!isEnd.value) {
query.page++
init()
}
}
function search() {
selShop.value = '';
query.page = 1;
isEnd.value = false
init()
}
async function init() {
const res = await adminShopList(query);
if (res) {
const arr = res.records.map((item) => ({
shopId: item.id,
shopName: item.shopName,
}));
isEnd.value = query.page >= res.totalPage * 1
if (query.page == 1) {
list.value = arr
} else {
list.value.push(...arr)
}
}
}
onMounted(init);
</script>
<style lang="scss">
.box {
border-radius: 8upx;
display: flex;
flex-direction: row;
align-items: top;
flex-wrap: wrap;
padding: 10rpx 24rpx;
border: 2rpx solid #e5e5e5;
position: relative;
.icon {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
}
}
.shop-item {
padding: 4rpx 8rpx 4rpx 16rpx;
border-radius: 4rpx;
border: 2rpx solid #f0f0f0;
background-color: #f5f5f5;
margin-bottom: 16rpx;
margin-left: 16rpx;
}
.scroll-view {
.item {
border: 1px solid #eee;
padding: 20rpx;
border-radius: 12rpx;
&.active {
border-color: $my-main-color;
}
}
}
.checkbox {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 6rpx;
border: 1px solid #999;
}
.item {
&.active {
.checkbox {
background-color: $my-main-color;
border-color: $my-main-color;
}
}
}
</style>

View File

@@ -0,0 +1,257 @@
<template>
<up-popup :show="modelValue" mode="bottom" :popup="false"
:mask="true" :closeable="true" :safe-area-inset-bottom="true"
close-icon-color="#ffffff" :z-index="uZIndex"
:maskCloseAble="maskCloseAble" @close="close">
<up-tabs v-if="modelValue" :list="genTabsList"
:scrollable="true" :current="tabsIndex" @change="tabsChange" ref="tabs"></up-tabs>
<view class="area-box">
<view class="u-flex" :class="{ 'change':isChange }">
<view class="area-item">
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
<scroll-view :scroll-y="true" style="height: 100%">
<up-cell-group>
<up-cell v-for="(item,index) in provinces"
:title="item.regionName" :arrow="false"
:index="index" :key="index"
@click="provinceChange(index)">
<template v-slot:right-icon>
<up-icon v-if="isChooseP&&province===index"
size="17" name="checkbox-mark"></up-icon>
</template>
</up-cell>
</up-cell-group>
</scroll-view>
</view>
</view>
<view class="area-item">
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
<scroll-view :scroll-y="true" style="height: 100%">
<up-cell-group v-if="isChooseP">
<up-cell v-for="(item,index) in citys"
:title="item.regionName" :arrow="false"
:index="index" :key="index"
@click="cityChange(index)">
<template v-slot:right-icon>
<up-icon v-if="isChooseC&&city===index"
size="17" name="checkbox-mark"></up-icon>
</template>
</up-cell>
</up-cell-group>
</scroll-view>
</view>
</view>
<view class="area-item">
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
<scroll-view :scroll-y="true" style="height: 100%">
<up-cell-group v-if="isChooseC">
<up-cell v-for="(item,index) in areas"
:title="item.regionName" :arrow="false"
:index="index" :key="index"
@click="areaChange(index)">
<template v-slot:right-icon>
<up-icon v-if="isChooseA&&area===index"
size="17" name="checkbox-mark"></up-icon>
</template>
</up-cell>
</up-cell-group>
</scroll-view>
</view>
</view>
</view>
</view>
</up-popup>
</template>
<script>
import {region} from '@/http/api/system/region.js'
import provinces from "../common/province.js";
import citys from "../common/city.js";
import areas from "../common/area.js";
/**
* city-select 省市区级联选择器
* @property {String Number} z-index 弹出时的z-index值默认1075
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker默认true
* @property {String} default-region 默认选中的地区,中文形式
* @property {String} default-code 默认选中的地区,编号形式
*/
export default {
name: 'u-city-select',
props: {
// 通过双向绑定控制组件的弹出与收起
modelValue: {
type: Boolean,
default: false
},
// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
defaultRegion: {
type: Array,
default () {
return [];
}
},
// 默认显示地区的编码defaultRegion和areaCode同时存在areaCode优先可传类似["13", "1303", "130304"]
areaCode: {
type: Array,
default () {
return [];
}
},
// 是否允许通过点击遮罩关闭Picker
maskCloseAble: {
type: Boolean,
default: true
},
// 弹出的z-index值
zIndex: {
type: [String, Number],
default: 0
}
},
data() {
return {
cityValue: "",
isChooseP: false, //是否已经选择了省
province: 0, //省级下标
provinces: [],
isChooseC: false, //是否已经选择了市
city: 0, //市级下标
citys: citys[0],
isChooseA: false, //是否已经选择了区
area: 0, //区级下标
areas: areas[0][0],
tabsIndex: 0,
list:[]
}
},
async mounted() {
await this.getRegon()
this.init();
},
computed: {
isChange() {
return this.tabsIndex > 1;
},
genTabsList() {
let tabsList = [{
name: "请选择"
}];
if (this.isChooseP) {
console.log(this.province)
tabsList[0]['name'] = this.provinces[this.province]['regionName'];
tabsList[1] = {
name: "请选择"
};
}
if (this.isChooseC) {
tabsList[1]['name'] = this.citys[this.city]['regionName'];
tabsList[2] = {
name: "请选择"
};
}
if (this.isChooseA) {
tabsList[2]['name'] = this.areas[this.area]['regionName'];
}
return tabsList;
},
uZIndex() {
// 如果用户有传递z-index值优先使用
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
}
},
emits: ['city-change'],
methods: {
async getRegon(){
const res=await region()
this.provinces=res||[]
},
init() {
if (this.areaCode.length == 3) {
this.setProvince("", this.areaCode[0]);
this.setCity("", this.areaCode[1]);
this.setArea("", this.areaCode[2]);
} else if (this.defaultRegion.length == 3) {
this.setProvince(this.defaultRegion[0], "");
this.setCity(this.defaultRegion[1], "");
this.setArea(this.defaultRegion[2], "");
};
},
setProvince(regionName = "", value = "") {
this.provinces.map((v, k) => {
if (value ? v.value == value : v.regionName == regionName) {
this.provinceChange(k);
}
})
},
setCity(regionName = "", value = "") {
this.citys.map((v, k) => {
if (value ? v.value == value : v.regionName == regionName) {
this.cityChange(k);
}
})
},
setArea(regionName = "", value = "") {
this.areas.map((v, k) => {
if (value ? v.value == value : v.regionName == regionName) {
this.isChooseA = true;
this.area = k;
}
})
},
close() {
this.$emit('update:modelValue', false);
},
tabsChange(index) {
this.tabsIndex = index;
},
provinceChange(index) {
this.isChooseP = true;
this.isChooseC = false;
this.isChooseA = false;
this.province = index;
this.citys =this.provinces[index].children
this.tabsIndex = 1;
},
cityChange(index) {
this.isChooseC = true;
this.isChooseA = false;
this.city = index;
this.areas =this.provinces[this.province].children[index].children
this.tabsIndex = 2;
},
areaChange(index) {
this.isChooseA = true;
this.area = index;
let result = {};
result.province = this.provinces[this.province];
result.city = this.citys[this.city];
result.area = this.areas[this.area];
this.$emit('city-change', result);
this.close();
}
}
}
</script>
<style lang="scss">
.area-box {
width: 100%;
overflow: hidden;
height: 800rpx;
>view {
width: 150%;
transition: transform 0.3s ease-in-out 0s;
transform: translateX(0);
&.change {
transform: translateX(-33.3333333%);
}
}
.area-item {
width: 33.3333333%;
height: 800rpx;
}
}
</style>

28
pagesShops/data.js Normal file
View File

@@ -0,0 +1,28 @@
export const shopTypes = {
'only': '单店',
'chain': '连锁店',
'join': '加盟店',
}
export const registerTypes = {
'before': '快餐版',
'after': '餐饮版',
}
export const profiless = {
probation: '试用',
release: '正式',
}
export const statuss = {
1: '开启',
0: '关闭'
}
export const tubeTypes = {
1: '直接管理',
0: '不可直接管理'
}
export const channels = {
'poly': '聚合支付',
'native': '支付进件',
}

415
pagesShops/index/index.vue Normal file
View File

@@ -0,0 +1,415 @@
<template>
<view class="min-page bg-f7 u-font-28 color-333">
<up-sticky>
<view class="top u-flex">
<up-select :options="statusList" @select="statusListSelect">
<template #text>
<text v-if="query.status">{{returnStatusLabel(query.status)}}</text>
<text v-else>状态</text>
</template>
</up-select>
<view class="u-flex-1 u-p-l-32">
<up-search placeholder="店铺名称" v-model="query.shopName" @search="search" @clear="search"
@custom="search"></up-search>
</view>
</view>
</up-sticky>
<view class="box">
<view class="container" v-for="(item,index) in list" :key="index">
<view class="u-flex u-row-between">
<view>
<text class="color-666">到期时间</text>
<text class="font-bold">{{item.expireTime}}</text>
</view>
<view class="status" :class="returnStatusClass(item.status)">{{item.status?'正式':'试用'}}</view>
</view>
<view class="u-flex u-m-t-10">
<up-avatar :src="item.logo" size="120rpx" shape="square"></up-avatar>
<view class="u-flex-1 u-p-l-32">
<view class="font-bold u-line-1">{{item.shopName}}</view>
<view class="u-m-t-10">{{item.provinces}}-{{item.cities}}-{{item.districts}} {{item.address}}
</view>
</view>
</view>
<view class="u-m-t-32">
<view class="">
<text class="color-666">经营模式</text>
<text class="font-bold">{{returnRegisterType(item.registerType) }}</text>
</view>
<view class="u-m-t-24">
<text class="color-666">店铺类型</text>
<text class="font-bold">{{returnShopType(item.shopType) }}</text>
<text class="font-bold"
v-if="item.shopType!='only'&&item.isHeadShop==0">(主店{{item.headShopName}})</text>
</view>
<view class="u-m-t-24 u-flex">
<text class="color-666">店铺状态</text>
<up-switch disabled v-model="item.status" :active-value="1" :inactive-value="0"
size="20"></up-switch>
</view>
<view class="u-m-t-24 u-flex u-col-center">
<text class="color-666">创建时间</text>
<view class=" font-bold">{{item.createTime}}</view>
</view>
<view class="u-flex u-m-t-32 u-row-right gap-20">
<view style="min-width: 160rpx;">
<my-button @click="toEdit(item)">编辑</my-button>
</view>
<view style="min-width: 160rpx;">
<my-button @click="showaAtivationCode(item)">激活</my-button>
</view>
<view style="min-width: 160rpx;">
<my-button @click="showMore(item)">
<text class="u-m-r-10">更多</text>
<up-icon name="arrow-down" color="#fff"></up-icon>
</my-button>
</view>
</view>
</view>
</view>
<template v-if="query.shopName">
<up-empty v-if="list.length<=0" text="未搜索到相关信息"></up-empty>
<up-loadmore :status="isEnd?'nomore':'loading'" v-else></up-loadmore>
</template>
<template v-else>
<up-empty v-if="list.length<=0" text="未搜索到相关信息"></up-empty>
<up-loadmore v-else :status="isEnd?'nomore':'loading'"></up-loadmore>
</template>
</view>
<view style="height: 140rpx;"></view>
<view class="bottom">
<my-button @click="toAdd()">添加店铺</my-button>
</view>
<shopSelect v-model="showShopSelect" @confirm="toAdd"></shopSelect>
<up-popup :show="codeShow" mode="center" @close="codeShow=false" round="16rpx" :close-on-click-overlay="true">
<view style="border-radius: 16rpx;overflow: hidden;" class="u-p-b-30">
<up-image width="200" height="200" :src="code"></up-image>
<view class="u-m-t-0 text-center" v-if="codeType=='wx'">请打开微信扫码</view>
<view class="u-m-t-0 text-center" v-if="codeType=='aliPay'">请打开支付宝扫码</view>
</view>
</up-popup>
<up-popup :show="activationCode.show" mode="center" @close="activationCode.show=false" round="16rpx"
:close-on-click-overlay="true">
<view class="popup-box">
<view class="font-bold u-font-32 text-center">生成激活码</view>
<view class="u-p-l-20 u-p-r-20 u-m-r-32">
<up-form label-width="auto">
<up-form-item label="激活码" required>
<up-input v-model="activationCode.form.activateCode"></up-input>
</up-form-item>
</up-form>
</view>
<view class="u-flex gap-20 u-m-t-42">
<view class="u-flex-1">
<my-button type="default" @click="activationCode.show=false">取消</my-button>
</view>
<view class="u-flex-1">
<my-button @click="activationCodeSubmit">确认</my-button>
</view>
</view>
</view>
</up-popup>
<up-action-sheet :actions="moreMenus.list" round="16rpx" @select="moreMenusSelect" @close="moreMenus.show=false"
cancelText="取消" :show="moreMenus.show"></up-action-sheet>
</view>
</template>
<script setup>
import {
shopTypes,
registerTypes
} from '../data.js'
const code = ref('')
const codeShow = ref(false)
const codeType = ref('')
import {
reactive,
ref,
watch
} from 'vue';
import shopSelect from '../components/shop-select.vue'
import {
onReachBottom,
onShow
} from '@dcloudio/uni-app'
import * as shopInfoApi from '@/http/api/account/shopInfo.js'
const activationCode = reactive({
show: false,
form: {
activateCode: '',
id: '',
},
})
async function activationCodeSubmit(){
if (!activationCode.form.activateCode) {
return uni.$u.toast('请填写激活码')
}
const res = await shopInfoApi.editShop(activationCode.form)
if (res) {
uni.$u.toast('激活成功')
search()
}
}
function showaAtivationCode(item) {
activationCode.form.id = item.id
activationCode.show=true
}
const statusList = [{
value: 1,
name: '开启',
},
{
value: 0,
name: '关闭',
},
]
const moreMenusList = [{
name: '添加分店',
},
{
name: '支付配置',
},
// {
// name: '续费记录',
// },
// {
// name: '重置密码',
// },
// {
// name: '删除',
// color: '#FF1C1C'
// },
]
const moreMenus = reactive({
list: moreMenusList,
selItem: null,
show: false
})
function moreMenusSelect(e) {
console.log(e);
if (e.name == '支付配置') {
uni.navigateTo({
url: '/pagesShops/pay-config/pay-config?shopId=' + moreMenus.selItem.id + '&licenceNo=' + moreMenus
.selItem.licenceNo
})
}
if (e.name == '添加分店') {
uni.navigateTo({
url: '/pagesShops/add/add?id=' + moreMenus.selItem.id + '&type=addBranch'
})
}
}
function showMore(item) {
if (item.shopType != 'only' && item.isHeadShop) {
moreMenus.list = moreMenusList
} else {
moreMenus.list = moreMenusList.filter(v => v.name != '添加分店')
}
moreMenus.selItem = item
moreMenus.show = true
}
function returnRegisterType(registerTyp) {
return registerTypes[registerTyp] ? registerTypes[registerTyp] : ''
}
function returnShopType(shopType) {
return shopTypes[shopType] ? shopTypes[shopType] : ''
}
function statusListSelect(e) {
query.status = e.value
}
const statusLabelJson = {
'REJECTED': '已拒绝'
}
const statusClassJson = {
'REJECTED': 'error'
}
function returnStatusLabel(state) {
const item = statusList.find(v => v.value == state)
if (item) {
return item.name
}
return ''
}
function returnStatusClass(state) {
if (state == 1) {
return 'success'
}
return 'warning'
}
function showCode(item, type) {
if (type == 'wx') {
code.value = item.wechatSignUrl
}
if (type == 'aliPay') {
code.value = item.alipaySignUrl
}
codeType.value = type
codeShow.value = true
}
const showShopSelect = ref(false)
const query = reactive({
page: 1,
size: 10,
shopName: '',
status: ''
})
watch(() => query.status, (newval) => {
search()
})
const isEnd = ref(false)
const list = ref([])
function search() {
isEnd.value = false
query.page = 1
getData()
}
function toAdd(shop) {
console.log(shop)
uni.navigateTo({
url: '/pagesShops/add/add'
})
}
function toEdit(shop) {
console.log(shop)
uni.navigateTo({
url: '/pagesShops/add/add?id=' + shop.id
})
}
function getData() {
shopInfoApi.allShopList(query).then(res => {
isEnd.value = query.page >= res.totalPage * 1
if (query.page == 1) {
list.value = res.records
} else {
list.value.push(...res.records)
}
})
}
function queryStatus(item) {
queryEntry({
licenceNo: item.licenceNo,
shopId: item.shopId
}).then(res => {
isEnd.value = false
query.page = 1;
getData()
})
}
onReachBottom(() => {
if (!isEnd.value) {
query.page++
getData()
}
})
onShow(getData)
</script>
<style lang="scss" scoped>
.min-page {
.box {
padding: 32rpx 28rpx;
}
}
.container {
padding: 32rpx 28rpx;
border-radius: 16rpx;
margin-bottom: 32rpx;
background-color: #fff;
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
z-index: 100;
padding: 32rpx 28rpx;
padding-bottom: 40rpx;
}
.types {}
.status {
padding: 8rpx 18rpx;
border-radius: 8rpx;
border: 2rpx solid #333;
&.success {
border-color: rgba(123, 209, 54, 1);
color: rgba(123, 209, 54, 1);
background: rgba(123, 209, 54, 0.12);
}
&.warning {
border-color: rgba(255, 141, 40, 1);
color: rgba(255, 141, 40, 1);
background: rgba(255, 141, 40, 0.12);
}
&.error {
border-color: #FF1C1C;
color: #FF1C1C;
background: rgba(255, 28, 28, 0.18);
}
&.gray {
color: #bbb;
background-color: #f7f7f7;
border-color: #bbb;
}
}
.top {
padding: 32rpx 28rpx;
background-color: #fff;
}
.popup-box {
background-color: #fff;
width: 690rpx;
background-color: #fff;
padding: 32rpx 28rpx;
border-radius: 16rpx;
}
</style>

View File

@@ -0,0 +1,638 @@
<template>
<view class="min-page bg-f7 u-font-28">
<template v-if="loadingFinish">
<up-form :model="form" :rules="rules" ref="refForm" label-width="auto" label-position="top"
errorType="toast" :label-style="labelStyle">
<view class="container">
<up-form-item label="当前模式">
<up-radio-group v-model="form.channel">
<up-radio v-for="(value,key) in channels" :key="key" :name="key" :label="value"></up-radio>
</up-radio-group>
</up-form-item>
<template v-if="form.channel=='native'">
<up-form-item label="使用信息"
v-if="shopInfo.shopType!='only'&& !shopInfo.isHeadShop && mainEntryManagerRes">
<up-radio-group v-model="useInfo">
<up-radio v-for="(value,key) in useInfos" :key="key" :name="key*1"
:label="value"></up-radio>
</up-radio-group>
</up-form-item>
</template>
</view>
<template v-if="form.channel=='poly'">
<view class="container">
<up-form-item label="店铺id" prop="polyMerchantDTO.storeId"
:required="returnIsRequired('polyMerchantDTO.storeId')">
<up-input v-model="form.polyMerchantDTO.storeId"></up-input>
</up-form-item>
<up-form-item label="商户名称" prop="polyMerchantDTO.merchantName"
:required="returnIsRequired('polyMerchantDTO.merchantName')">
<up-input v-model="form.polyMerchantDTO.merchantName"></up-input>
</up-form-item>
<up-form-item label="商户应用id" prop="polyMerchantDTO.appId"
:required="returnIsRequired('polyMerchantDTO.appId')">
<up-input v-model="form.polyMerchantDTO.appId"></up-input>
</up-form-item>
<up-form-item label="商户密钥" prop="polyMerchantDTO.appSecret"
:required="returnIsRequired('polyMerchantDTO.appSecret')">
<up-input v-model="form.polyMerchantDTO.appSecret"></up-input>
</up-form-item>
<!-- <up-form-item label="支付密码" prop="polyMerchantDTO.payPassword"
:required="returnIsRequired('polyMerchantDTO.payPassword')">
<up-input v-model="form.polyMerchantDTO.payPassword"></up-input>
</up-form-item> -->
</view>
</template>
<template v-else>
<template v-if="useInfo==0">
<template v-if="entryManagerRes">
<view class="container container1">
<view class="u-flex u-row-between">
<text class="font-bold">商户号</text>
<text class="">{{entryManagerRes.merchantCode}}</text>
</view>
<view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">商户类型</text>
<text class="">{{returnType(entryManagerRes.userType)}}</text>
</view>
<view class="status">
<view class="u-flex u-row-between ">
<text class="font-bold">支付宝进件状态</text>
<view class="state" :class="returnStatusClass(entryManagerRes.alipayStatus)">
{{returnStatusLabel(entryManagerRes.alipayStatus)}}
</view>
</view>
<view v-if="entryManagerRes.alipayStatus==='SIGN'" class="u-m-t-16">
<my-button @click="showCode(entryManagerRes,'aliPay')">查看签约码</my-button>
</view>
<view class="u-m-t-14" v-if="entryManagerRes.alipayErrorMsg">
<up-alert title="拒绝原因" type="error"
:description="entryManagerRes.alipayErrorMsg"></up-alert>
</view>
</view>
<view class="status">
<view class="">
<view class="u-flex u-row-between">
<text class="font-bold">微信进件状态</text>
<view class="state"
:class="returnStatusClass(entryManagerRes.wechatStatus)">
{{returnStatusLabel(entryManagerRes.wechatStatus)}}
</view>
</view>
<view v-if="entryManagerRes.wechatStatus==='SIGN'" class="u-m-t-16">
<my-button @click="showCode(entryManagerRes,'wx')">查看签约码</my-button>
</view>
</view>
<view class="u-m-t-14" v-if="entryManagerRes.wechatErrorMsg">
<up-alert title="拒绝原因" type="error"
:description="entryManagerRes.wechatErrorMsg"></up-alert>
</view>
</view>
<view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">最后提交时间</text>
<text class="">{{entryManagerRes.updateTime}}</text>
</view>
<view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">创建时间</text>
<text class="">{{entryManagerRes.createTime}}</text>
</view>
<view class="u-flex u-row-right gap-20 u-m-t-32">
<my-button @click="toEdit(entryManagerRes)">查看详情</my-button>
<my-button @click="toEdit(entryManagerRes)">修改</my-button>
</view>
</view>
</template>
<view class="container container1" v-if="!entryManagerRes">
<view class="color-red font-bold text-center">您还未申请进件</view>
<view class="u-m-t-32">
<my-button @click="toEdit()">去申请</my-button>
</view>
</view>
</template>
<template v-if="useInfo==1">
<view class="container container1">
<view class="u-flex u-row-between u-m-b-24">
<text class="font-bold">复用信息</text>
<up-tag type="primary" plain text="复用主店信息"></up-tag>
</view>
<view class="u-flex u-row-between">
<text class="font-bold">商户号</text>
<text class="">{{mainEntryManagerRes.merchantCode}}</text>
</view>
<view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">商户类型</text>
<text class="">{{returnType(mainEntryManagerRes.userType)}}</text>
</view>
<view class="status">
<view class="u-flex u-row-between ">
<text class="font-bold">支付宝进件状态</text>
<view class="state" :class="returnStatusClass(mainEntryManagerRes.alipayStatus)">
{{returnStatusLabel(mainEntryManagerRes.alipayStatus)}}
</view>
</view>
<view v-if="mainEntryManagerRes.alipayStatus==='SIGN'" class="u-m-t-16">
<my-button @click="showCode(mainEntryManagerRes,'aliPay')">查看签约码</my-button>
</view>
<view class="u-m-t-14" v-if="mainEntryManagerRes.alipayErrorMsg">
<up-alert title="拒绝原因" type="error"
:description="mainEntryManagerRes.alipayErrorMsg"></up-alert>
</view>
</view>
<view class="status">
<view class="">
<view class="u-flex u-row-between">
<text class="font-bold">微信进件状态</text>
<view class="state"
:class="returnStatusClass(mainEntryManagerRes.wechatStatus)">
{{returnStatusLabel(mainEntryManagerRes.wechatStatus)}}
</view>
</view>
<view v-if="mainEntryManagerRes.wechatStatus==='SIGN'" class="u-m-t-16">
<my-button @click="showCode(mainEntryManagerRes,'wx')">查看签约码</my-button>
</view>
</view>
<view class="u-m-t-14" v-if="mainEntryManagerRes.wechatErrorMsg">
<up-alert title="拒绝原因" type="error"
:description="mainEntryManagerRes.wechatErrorMsg"></up-alert>
</view>
</view>
<view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">最后提交时间</text>
<text class="">{{mainEntryManagerRes.updateTime}}</text>
</view>
<view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">创建时间</text>
<text class="">{{mainEntryManagerRes.createTime}}</text>
</view>
</view>
</template>
</template>
<!-- <up-form-item label="微信appid" prop="polyMerchantDTO.wechatSmallAppid"
:required="returnIsRequired('polyMerchantDTO.wechatSmallAppid')">
<up-input v-model="form.polyMerchantDTO.wechatSmallAppid"></up-input>
</up-form-item>
<up-form-item label="微信支付宝appid" prop="polyMerchantDTO.alipaySmallAppid"
:required="returnIsRequired('polyMerchantDTO.alipaySmallAppid')">
<up-input v-model="form.polyMerchantDTO.alipaySmallAppid"></up-input>
</up-form-item> -->
</up-form>
<up-popup :show="codeShow" mode="center" @close="codeShow=false" round="16rpx"
:close-on-click-overlay="true">
<view style="border-radius: 16rpx;overflow: hidden;" class="u-p-b-30">
<up-image width="200" height="200" :src="code"></up-image>
<view class="u-m-t-0 text-center" v-if="codeType=='wx'">请打开微信扫码</view>
<view class="u-m-t-0 text-center" v-if="codeType=='aliPay'">请打开支付宝扫码</view>
</view>
</up-popup>
<my-bottom-btn-group @cancel="uni.navigateBack()" @save="submit"></my-bottom-btn-group>
</template>
<my-page-loading v-else></my-page-loading>
</view>
</template>
<script setup>
import {
reactive,
ref,
watch
} from 'vue'
import {
companyChildTypes,
userTypes,
statusList
} from '@/commons/data/entryManager.js'
import * as shopMerchantApi from '@/http/api/order/shopMerchant.js'
import {
getEntryManager
} from '@/http/api/order/entryManager.js'
import {
channels
} from '../data.js'
import {
onLoad
} from '@dcloudio/uni-app'
import * as shopInfoApi from '@/http/api/account/shopInfo.js'
const useInfo = ref(0)
const useInfos = {
0: '当前店铺',
1: '主店'
}
function toEdit(shop) {
console.log(shop)
if (shop) {
uni.navigateTo({
url: '/entryManager/add/add?shopId=' + shop.shopId + '&licenceNo=' + shop.businessLicenceInfo
.licenceNo
})
} else {
return uni.navigateTo({
url: '/entryManager/add/add?shopId=' + query.shopId
})
// if (mainEntryManagerRes.value) {
// uni.showModal({
// title: '提示',
// content: '是否复用主店信息',
// showCancel: true,
// cancelText: '复用主店信息',
// confirmText: '继续进件',
// success(res) {
// if (res.confirm) {
// uni.navigateTo({
// url: '/entryManager/add/add?shopId=' + query.shopId
// })
// } else {
// mainEntryManagerRes = mainEntryManagerRes.value
// }
// }
// })
// return
// } else {
// uni.navigateTo({
// url: '/entryManager/add/add?shopId=' + query.shopId
// })
// }
}
}
const code = ref('')
const codeShow = ref(false)
const codeType = ref('')
function returnStatusLabel(state) {
const item = statusList.find(v => v.value == state)
if (item) {
return item.name
}
return ''
}
function returnIsRequired(key) {
if (rules[key] && rules[key].required) {
return true
}
return false
}
function returnType(type) {
if (userTypes[type]) {
return userTypes[type]
}
return ''
}
function showCode(item, type) {
if (type == 'wx') {
code.value = item.wechatSignUrl
}
if (type == 'aliPay') {
code.value = item.alipaySignUrl
}
codeType.value = type
codeShow.value = true
}
function returnStatusClass(state) {
const item = statusList.find(v => v.value == state)
if (item) {
return item.class
}
return ''
}
const labelStyle = {
fontWeight: "700"
}
const query = reactive({
shopId: ''
})
const rules = reactive({
"polyMerchantDTO.merchantName": {
type: 'string',
required: true,
message: '请输入商户名称',
trigger: ['blur', 'change'],
},
"polyMerchantDTO.storeId": {
type: 'string',
required: true,
message: '请输入店铺id',
trigger: ['blur', 'change'],
},
"polyMerchantDTO.appId": {
type: 'string',
required: true,
message: '请输入商户应用id',
trigger: ['blur', 'change'],
},
"polyMerchantDTO.appSecret": {
type: 'string',
required: true,
message: '请输入商户密钥',
trigger: ['blur', 'change'],
},
// "polyMerchantDTO.payPassword": {
// type: 'string',
// required: true,
// message: '请输入支付密钥',
// trigger: ['blur', 'change'],
// },
// "polyMerchantDTO.wechatSmallAppid": {
// type: 'string',
// required: true,
// message: '请输入微信小程序appid',
// trigger: ['blur', 'change'],
// },
// "polyMerchantDTO.alipaySmallAppid": {
// type: 'string',
// required: true,
// message: '请输入支付宝小程序appid',
// trigger: ['blur', 'change'],
// }
})
const form = reactive({
shopId: 0,
channel: "native",
relatedId: "",
nativeMerchantDTO: {
wechatMerchantId: "",
alipayMerchantId: "",
alipayAuthInfo: {
user_id: "",
open_id: "",
auth_app_id: "",
app_auth_token: "",
expires_in: "",
app_refresh_token: "",
re_expires_in: "",
order_no: "",
},
},
polyMerchantDTO: {
storeId: "",
merchantName: "",
appId: "",
appSecret: "",
payPassword: "",
wechatSmallAppid: "",
alipaySmallAppid: "",
},
shopDirectMerchant: {
shopId: 0,
shopName: "",
licenceNo: "",
alipayAccount: "",
merchantCode: "",
userType: "",
shortName: "",
merchantBaseInfo: "",
legalPersonInfo: "",
businessLicenceInfo: "",
storeInfo: "",
settlementInfo: "",
createTime: "",
updateTime: "",
errorMsg: "",
wechatApplyId: "",
wechatStatus: "",
wechatErrorMsg: "",
wechatSignUrl: "",
alipayOrderId: "",
alipayStatus: "",
alipayErrorMsg: "",
alipaySignUrl: "",
alipayAuthInfo: "",
wechatMerchantId: "",
alipayMerchantId: "",
},
});
const refForm = ref(null)
const entryManagerRes = ref(null)
const mainEntryManagerRes = ref(null)
const shopInfo = ref(null)
const shopMerchant = ref(null)
async function init() {
const shopInfoRes = await shopInfoApi.getShopDetail({
id: query.shopId
})
shopInfo.value = shopInfoRes
//不是单店且不是主店
if (shopInfoRes && shopInfo.shopType != 'only' && !shopInfoRes.isHeadShop) {
const res = await shopMerchantApi.getMainMerchant({
shopId: query.shopId
})
mainEntryManagerRes.value = res
}
const res = await getEntryManager({
shopId: query.shopId
})
entryManagerRes.value = res
shopMerchantApi.shopMerchant({
shopId: query.shopId
}).then(res => {
if (res) {
if (res.shopDirectMerchant) {
useInfo.value = 1
} else {
useInfo.value = 0
}
shopMerchant.value = res
if (res.relatedId == shopInfo.value.id) {
useInfo.value = 0
}
if (mainEntryManagerRes.value && res.relatedId == mainEntryManagerRes.value.shopId) {
useInfo.value = 1
}
Object.assign(form, res)
}
loadingFinish.value = true
})
}
const loadingFinish = ref(false)
onLoad((opt) => {
query.shopId = opt.shopId
form.shopId = opt.shopId
init()
})
async function save() {
let res = null
if (form.channel == 'poly') {
res = await shopMerchantApi.editShopMerchant({
shopId: form.shopId,
channel: form.channel,
relatedId:shopInfo.value.id,
polyMerchantDTO: {
storeId: form.polyMerchantDTO.storeId,
merchantName: form.polyMerchantDTO.merchantName,
appId: form.polyMerchantDTO.appId,
appSecret: form.polyMerchantDTO.appSecret,
}
})
} else {
if (useInfo.value == 1) {
//使用主店
}
res = await shopMerchantApi.editShopMerchant({
shopId: form.shopId,
channel: form.channel,
relatedId: useInfo.value == 1 ? mainEntryManagerRes.value.shopId : query.shopId,
// nativeMerchantDTO: {
// wechatMerchantId: form.nativeMerchantDTO.wechatMerchantId,
// alipayMerchantId: form.nativeMerchantDTO.alipayMerchantId,
// alipayAuthInfo: {
// user_id: form.nativeMerchantDTO.alipayAuthInfo.user_id,
// open_id: form.nativeMerchantDTO.alipayAuthInfo.open_id,
// auth_app_id: form.nativeMerchantDTO.alipayAuthInfo.auth_app_id,
// app_auth_token: form.nativeMerchantDTO.alipayAuthInfo.app_auth_token,
// expires_in: form.nativeMerchantDTO.alipayAuthInfo.expires_in,
// app_refresh_token: form.nativeMerchantDTO.alipayAuthInfo.app_refresh_token,
// re_expires_in: form.nativeMerchantDTO.alipayAuthInfo.re_expires_in,
// order_no: form.nativeMerchantDTO.alipayAuthInfo.order_no,
// }
// }
})
}
if (res) {
uni.$u.toast('保存成功')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
}
function submit() {
if (useInfo.value == 0 && form.channel == 'native' && !entryManagerRes.value) {
return uni.$u.toast('您还未申请进件,清先申请进件')
}
refForm.value.validate().then(valid => {
console.log('valid', valid);
if (valid) {
// uni.$u.toast('校验通过')
save()
} else {}
}).catch(() => {
// 处理验证错误
});
}
watch(() => form.channel, (newval) => {
for (let key in rules) {
console.log('key', key)
rules[key].required = newval == 'poly' ? true : false;
}
if (newval == 'poly') {
form.polyMerchantDTO =shopMerchant.value.polyMerchantDTO|| {
storeId: "",
merchantName: "",
appId: "",
appSecret: "",
payPassword: "",
wechatSmallAppid: "",
alipaySmallAppid: "",
}
}
})
watch(() => useInfo.value, (newval) => {
console.log('newval', newval);
if (newval) {
} else {
}
})
</script>
<style lang="scss" scoped>
.min-page {
padding: 32rpx 28rpx;
}
.container {
background-color: #fff;
padding: 12rpx 28rpx;
border-radius: 16rpx;
margin-bottom: 32rpx;
&.container1 {
padding: 32rpx 28rpx;
}
}
:deep(.input-placeholder) {
font-size: 28rpx;
}
:deep(.u-form-item__body) {
padding: 10px 0 0 0;
}
.status {
margin-top: 24rpx;
background-color: #f7f7f7;
padding: 24rpx 28rpx;
border-radius: 4rpx;
.state {
padding: 8rpx 18rpx;
border-radius: 8rpx;
border: 2rpx solid #333;
&.success {
border-color: rgba(123, 209, 54, 1);
color: rgba(123, 209, 54, 1);
background: rgba(123, 209, 54, 0.12);
}
&.warning {
border-color: rgba(255, 141, 40, 1);
color: rgba(255, 141, 40, 1);
background: rgba(255, 141, 40, 0.12);
}
&.error {
border-color: #FF1C1C;
color: #FF1C1C;
background: rgba(255, 28, 28, 0.18);
}
&.gray {
color: #bbb;
background-color: #f7f7f7;
border-color: #bbb;
}
}
}
:deep(.u-alert__content__desc) {
word-break: break-all;
}
</style>

16
pnpm-lock.yaml generated
View File

@@ -48,8 +48,8 @@ importers:
specifier: ^3.3.32
version: 3.6.15
ysk-utils:
specifier: ^1.0.82
version: 1.0.82
specifier: ^1.0.85
version: 1.0.85
devDependencies:
copy-webpack-plugin:
specifier: ^12.0.2
@@ -120,36 +120,42 @@ packages:
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm-musl@2.5.1':
resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-arm64-glibc@2.5.1':
resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm64-musl@2.5.1':
resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-x64-glibc@2.5.1':
resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-x64-musl@2.5.1':
resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [musl]
'@parcel/watcher-win32-arm64@2.5.1':
resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==}
@@ -708,8 +714,8 @@ packages:
webpack-cli:
optional: true
ysk-utils@1.0.82:
resolution: {integrity: sha512-rIds6x9PnvNmNcAVN/uR6KbhzhElS0f79qvpsO/wPSgnTORTGyKnb6aMLPBgcfDI7SaZXUoyKdljjznXH+O+cw==}
ysk-utils@1.0.85:
resolution: {integrity: sha512-HkbV4Jidi3G6DAuGAN972tClUYtC2zVoxo4crrxexfn0rZa8HjXatUfEbawHOeEzyl6G1CdC+160I2bKfxEBlA==}
snapshots:
@@ -1324,7 +1330,7 @@ snapshots:
- esbuild
- uglify-js
ysk-utils@1.0.82:
ysk-utils@1.0.85:
dependencies:
bignumber.js: 9.3.1
loadsh: 0.0.4