Commit cc8541f8 authored by verestrasz's avatar verestrasz

Merge branch 'master' into dev

parents d5d80f2e 124355b4
// 信息统计导出
export const dataInfocensusexport = {
url: '/data/infocensusexport',
method: 'POST',
dealReqData: (postDTO) => {
return postDTO
}
}
\ No newline at end of file
...@@ -49,6 +49,12 @@ export const merchantAssetsPage = { ...@@ -49,6 +49,12 @@ export const merchantAssetsPage = {
method: 'GET' method: 'GET'
} }
// 商户资产列表
export const merchantinfoquerybyadminId = {
url: '/merchantApply/merchantinfoquerybyadminId',
method: 'GET'
}
// 用户资产类型 // 用户资产类型
export const userAssetsType = { export const userAssetsType = {
url: '/userAsset/assetsType', url: '/userAsset/assetsType',
...@@ -86,6 +92,11 @@ export const platAssetRecordList = { ...@@ -86,6 +92,11 @@ export const platAssetRecordList = {
url: '/platformAssetsFlow/page', url: '/platformAssetsFlow/page',
method: 'GET' method: 'GET'
} }
// 收益记录-列表查询
export const profitRecordList = {
url: '/profitRecord/list',
method: 'GET'
}
// 商户积分详情 // 商户积分详情
export const merchantIntegralDetail = { export const merchantIntegralDetail = {
url: '/integralManage/merchantIntegralDetail', url: '/integralManage/merchantIntegralDetail',
......
// 商品管理模块 // 商品管理模块
// // 商品相关 // // 商品相关
// // 获取商品列表
// export const getGoodList = {
// url: '/goods/goods/page',
// method: 'GET',
// dealReqData: ({ seriesId, addTimeHead, addTimeTail, goodsName, pageNum, pageSize }) => {
// return { seriesId, addTimeHead, addTimeTail, goodsName, pageNum, pageSize }
// }
// }
// // 编辑商品
// export const updateGood = {
// url: '/goods/goods/update',
// method: 'PUT',
// dealReqData: ({ goodsNo, seriesId, name, introduction, properties, sku, detailPictures, video, videoThumb, thumb, detailDescribe, expressTemplateNo, shareProfitTemplate, rate, typeCode }) => {
// return { goodsNo, seriesId, name, introduction, properties, sku, detailPictures, video, videoThumb, thumb, detailDescribe, expressTemplateNo, shareProfitTemplate, rate, typeCode }
// }
// }
// // 获取商品详情
// export const getGoodDetail = {
// url: '/goods/common/detailGoods',
// method: 'GET',
// dealReqData: ({ goodsNo }) => {
// return { goodsNo }
// }
// }
// // 上架下架商品
// export const onOffGoods = {
// url: '/goods/goods/onOff',
// method: 'PUT',
// dealReqData: ({ goodsNo, type }) => {
// return { goodsNo, type }
// }
// }
// // 删除商品
// export const deleteGood = {
// url: '/goods/goods/delete',
// method: 'DELETE',
// dealReqData: ({ goodsNo }) => {
// return { goodsNo }
// }
// }
// // 根据seriesId获取商品列表
// export const getGoodsBySeriesId = {
// url: '/goods/series/detailGoodsByBatch',
// method: 'GET',
// dealReqData: ({ seriesId }) => {
// return { seriesId }
// }
// }
// // 商品系列相关
// // 分页获取系列列表
// export const getSeriesPageList = {
// url: '/goods/series/page',
// method: 'GET',
// dealReqData: ({ addTimeHead, addTimeTail, keyword, pageNum, pageSize }) => {
// return { addTimeHead, addTimeTail, keyword, pageNum, pageSize }
// }
// }
// // 获取系列列表
// export const getSeriesList = {
// url: '/goods/common/seriesList',
// method: 'GET'
// }
// // 上下架商品系列
// export const onOffSeries = {
// url: '/goods/series/onOff',
// method: 'PUT',
// dealReqData: ({ seriesId, type }) => {
// return { seriesId, type }
// }
// }
// // 新增商品系列
// export const addSeries = {
// url: '/goods/series/add',
// method: 'POST',
// dealReqData: ({ seriesName }) => {
// return { seriesName }
// }
// }
// // 更新商品系列
// export const updateSeries = {
// url: '/goods/series/update',
// method: 'PUT',
// dealReqData: ({ seriesId, seriesName }) => {
// return { seriesId, seriesName }
// }
// }
// // 快递相关
// // 分页获取快递模板列表
// export const getExpressPageList = {
// url: '/goods/express/page',
// method: 'GET',
// dealReqData: ({ pageNum, pageSize }) => {
// return { pageNum, pageSize }
// }
// }
// // 新增快递模板列表
// export const addExpress = {
// url: '/goods/express/add',
// method: 'POST',
// dealReqData: ({ templateName, expressCompany, price }) => {
// return { templateName, expressCompany, price }
// }
// }
// // 编辑快递模板列表
// export const updateExpress = {
// url: '/goods/express/update',
// method: 'PUT',
// dealReqData: ({ templateNo, templateName, expressCompany, price }) => {
// return { templateNo, templateName, expressCompany, price }
// }
// }
// // 删除快递模板列表
// export const deleteExpress = {
// url: '/goods/deleteExpress',
// method: 'DELETE',
// dealReqData: ({ templateNo }) => {
// return { templateNo }
// }
// }
// // 获取快递模板详情
// export const getExpressDetail = {
// url: '/goods/express/detail',
// method: 'GET',
// dealReqData: ({ templateNo }) => {
// return { templateNo }
// }
// }
// // 获取省份列表
// export const getProvinceList = {
// url: '/goods/common/provinceList',
// method: 'GET'
// }
// // 获取城市列表
// export const getCityList = {
// url: '/goods/common/cityList',
// method: 'GET',
// dealReqData: ({ code }) => {
// return { code }
// }
// }
// // 导出证书
// export const exportGoodCer = {
// url: '/goods/common/exportCert',
// method: 'GET',
// dealReqData: ({ skuId }) => {
// return { skuId }
// }
// }
// export const getAllGoodList = {
// url: '/goods/common/goodsList',
// method: 'GET'
// }
// 查询商品类目 // 查询商品类目
export const categoryList = { export const categoryList = {
...@@ -61,6 +232,9 @@ export const addGood = { ...@@ -61,6 +232,9 @@ export const addGood = {
export const draftGood = { export const draftGood = {
url: '/goods/releaseGoods/draft', url: '/goods/releaseGoods/draft',
method: 'POST', method: 'POST',
// dealReqData: ({ auctionDTO, categoryId, description, detail, imgList, name, note, pointsExchangeDTO, preSaleDTO, prop, returnReason, returnType, skuList, templateId, thumb, type, video, videoPoster }) => {
// return { auctionDTO, categoryId, description, detail, imgList, name, note, pointsExchangeDTO, preSaleDTO, prop, returnReason, returnType, skuList, templateId, thumb, type, video, videoPoster }
// }
dealReqData: (form) => { dealReqData: (form) => {
return form return form
} }
...@@ -81,13 +255,12 @@ export const getGoodCheckList = { ...@@ -81,13 +255,12 @@ export const getGoodCheckList = {
return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize } return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }
} }
} }
// 上下架商品系列 // 上下架商品系列
export const onOffSeries = { export const onOffSeries = {
url: '/goodsList/onOff', url: '/goodsList/onOff',
method: 'PUT', method: 'PUT',
dealReqData: ({ goodsId, type, preheatEndTime }) => { dealReqData: ({ goodsId, type, preheatEndTime,autoOff }) => {
return { goodsId, type, preheatEndTime } return { goodsId, type, preheatEndTime,autoOff }
} }
} }
...@@ -101,8 +274,16 @@ export const deleteGood = { ...@@ -101,8 +274,16 @@ export const deleteGood = {
export const getGoodDetail = { export const getGoodDetail = {
url: '/goodsList/detail', url: '/goodsList/detail',
method: 'GET', method: 'GET',
dealReqData: ({ goodsId }) => { dealReqData: ({ id }) => {
return { goodsId } return { goodsId: id }
}
}
// 获取商品详情
export const getGoodDetailforouttoken = {
url: '/goods/goodsList/detailforouttoken',
method: 'GET',
dealReqData: ({ id }) => {
return { commodityPassId: id }
} }
} }
// 查询是否已建模板或店铺 // 查询是否已建模板或店铺
...@@ -168,6 +349,14 @@ export const cancelCheckGood = { ...@@ -168,6 +349,14 @@ export const cancelCheckGood = {
return `${url}/${goodsId}` return `${url}/${goodsId}`
} }
} }
// 撤回审核
export const withdrawGood = {
url: '/goods/releaseGoods/withdraw',
method: 'GET',
dealUrl: (url, goodsId) => {
return `${url}?goodsId=${goodsId}`
}
}
// 添加积分商品 // 添加积分商品
export const addIntegralGood = { export const addIntegralGood = {
...@@ -331,3 +520,9 @@ export const externnftlist = { ...@@ -331,3 +520,9 @@ export const externnftlist = {
url: '/goods/releaseGoods/externnftlist', url: '/goods/releaseGoods/externnftlist',
method: 'GET' method: 'GET'
} }
// 查询商品规格信息
export const getGoodsSkuInfo = {
url: "/goods/sku",
method: 'GET'
}
\ No newline at end of file
...@@ -17,3 +17,5 @@ export * from './logistics' ...@@ -17,3 +17,5 @@ export * from './logistics'
export * from './customer' export * from './customer'
export * from './finance' export * from './finance'
export * from './jurisdiction' export * from './jurisdiction'
export * from './help'
export * from './data-center'
...@@ -214,6 +214,14 @@ export const deleteCoupon = { ...@@ -214,6 +214,14 @@ export const deleteCoupon = {
return `${url}/${couponId}` return `${url}/${couponId}`
} }
} }
// 商品优惠券-主键查询
export const geteCouponId = {
url: `/coupon/couponPermission`,
method: 'GET',
dealUrl: (url, couponId) => {
return `${url}/${couponId}`
}
}
// 批量删除优惠券 // 批量删除优惠券
export const batchDelete = { export const batchDelete = {
url: `/coupon/couponPermission/batchDelete`, url: `/coupon/couponPermission/batchDelete`,
...@@ -233,6 +241,14 @@ export const queryByNameOrId = { ...@@ -233,6 +241,14 @@ export const queryByNameOrId = {
return goods return goods
} }
} }
// 根据商品编号或id查询商品信息
export const listByNameOrId = {
url: `/goods/listByNameOrId`,
method: 'GET',
dealReqData: (goods) => {
return goods
}
}
// 积分返现-列表查询 // 积分返现-列表查询
export const recurrencePermissionList = { export const recurrencePermissionList = {
url: '/memberIntegralRecurrence/recurrencePermission/list', url: '/memberIntegralRecurrence/recurrencePermission/list',
...@@ -316,3 +332,166 @@ export const popularizeCommissionSave = { ...@@ -316,3 +332,166 @@ export const popularizeCommissionSave = {
url: '/popularizeCommission/save', url: '/popularizeCommission/save',
method: 'POST' method: 'POST'
} }
// 购赠活动
// -购赠活动列表
export const purchaseGiftEventList = {
url: '/buyreward',
method: "GET"
}
// -新增购赠活动
export const addPurchaseGiftEvent = {
url: '/buyreward',
method: "POST",
dealReqData: ({ name, rewardGoodId, rewardSkuId, rewardNum, condGoodId, condSkuId, condNum, startDate, endDate, comm }) => {
return { name, rewardGoodId, rewardSkuId, rewardNum, condGoodId, condSkuId, condNum, startDate, endDate, comm }
}
}
// -更新购赠活动
export const updatePurchaseGiftEvent = {
url: "/buyreward",
method: "PUT",
dealReqData: ({ id, activityId, name, rewardGoodId, rewardSkuId, rewardNum, condGoodId, condSkuId, condNum, startDate, endDate, comm }) => {
return { id, activityId, name, rewardGoodId, rewardSkuId, rewardNum, condGoodId, condSkuId, condNum, startDate, endDate, comm }
}
}
// -关闭购赠活动
export const closePurchaseGiftEvent = {
url: "/buyreward",
method: "POST",
dealUrl: (url, activityId) => {
return `${url}/${activityId}/close`
}
}
// -查询购赠活动领取记录
export const purchaseGiftEventRecordList = {
url: '/buyreward/record',
method: "GET"
}
// 集齐活动
// -查询集齐活动
export const getCollectEventList = {
url: "/collectionreward",
method: "GET"
}
// -新增集齐活动
export const addCollectEvent = {
url: "/collectionreward",
method: "POST",
dealReqData: ({ condGoods, rewardGoods, name, comm, startDate, endDate, }) => {
return { condGoods, rewardGoods, name, comm, startDate, endDate }
}
}
// -更新集齐活动
export const updateCollectEvent = {
url: "/collectionreward",
method: "PUT",
dealReqData: ({ id, activityId, condGoods, rewardGoods, name, comm, startDate, endDate, }) => {
return { id, activityId, condGoods, rewardGoods, name, comm, startDate, endDate }
}
}
// -获取活动的商品 type 商品类型,1:条件商品, 2:奖励商品
export const getCollectEventGoodsList = {
url: "/collectionreward/goods",
method: "GET"
}
// -查询活动的记录
export const getCollectEventRecordList = {
url: "/collectionreward/record",
method: "GET"
}
// -取消活动
export const cancelCollectEvent = {
url: "/collectionreward",
method: "POST",
dealUrl: (url, activityId) => {
return `${url}/${activityId}/close`
}
}
// 空投活动
// 模板下载
export const AerialDeliveryExcel = {
url: "/aerialDelivery/excel/download",
method: "POST"
}
// 列表查询
export const getAerialDeliveryList = {
url: "/aerialDelivery/list",
method: "GET"
}
// 补发
export const AerialDeliveryReissue = {
url: "/aerialDelivery/reissue",
method: "POST"
}
// 新增
export const AerialDeliverySave = {
url: "/aerialDelivery/save",
method: "POST"
}
// 主键查询
export const getAerialDeliveryId = {
url: "/aerialDelivery",
method: "GET",
dealUrl: (url, {aerialDeliveryId}) => {
return `${url}/${aerialDeliveryId}`
}
}
// 空投记录-列表查询
export const getAerialDeliveryRecordList = {
url: "/aerialDeliveryRecord/list",
method: "GET"
}
// 运营中心-店铺推荐-列表查询
export const getShopList= {
url: "/shop/list",
method: "GET"
}
// 运营中心-店铺推荐-新增
export const insertShopSave = {
url: "/shop/save",
method: "POST",
dealReqData: ({ displayOrder, shopId }) => {
return { displayOrder, shopId }
}
}
// 运营中心-店铺推荐-删除
export const deleteShopRecommend = {
url: '/shop/delete',
method: 'DELETE',
dealUrl: (url, { shopId }) => {
return `${url}/${shopId}`
}
}
// 优惠券空投活动-
// 列表查询
export const getCouponDeliveryList = {
url: "/couponDelivery/list",
method: "GET"
}
// 补发
export const CouponDeliveryReissue = {
url: "/couponDelivery/reissue",
method: "POST"
}
// 新增
export const CouponDeliverySave = {
url: "/couponDelivery/save",
method: "POST"
}
// 空投记录-列表查询
export const getCouponDeliveryRecordList = {
url: "/couponDeliveryRecord/list",
method: "GET"
}
\ No newline at end of file
...@@ -49,8 +49,8 @@ export const orderRefund = { ...@@ -49,8 +49,8 @@ export const orderRefund = {
export const getPickUpList = { export const getPickUpList = {
url: '/delivery/deliveryPermission/list', url: '/delivery/deliveryPermission/list',
method: 'GET', method: 'GET',
dealReqData: ({ pageNum, pageSize, orderDeliveryId, gid, uid, deliveryState }) => { dealReqData: ({ pageNum, pageSize, orderDeliveryId, gid, uid, uname, deliveryState }) => {
return { pageNum, pageSize, orderDeliveryId, gid, uid, deliveryState } return { pageNum, pageSize, orderDeliveryId, gid, uid, uname, deliveryState }
} }
} }
......
...@@ -30,6 +30,35 @@ export const improveInfo = { ...@@ -30,6 +30,35 @@ export const improveInfo = {
return merchantDTO return merchantDTO
} }
} }
// 查询省
export const getProvincelist = {
url: '/merchantApply/provincelist',
method: 'GET'
}
// 查询市
export const getCityList = {
url: '/merchantApply/citylist',
method: 'GET',
dealUrl: (url, provinceCode) => {
return `${url}?provinceCode=${provinceCode}`
}
}
// 查询区
export const getAreaList = {
url: '/merchantApply/countylist',
method: 'GET',
dealUrl: (url, cityCode) => {
return `${url}?cityCode=${cityCode}`
}
}
// 签约
export const merchantApply = {
url: '/merchantApply/sign',
method: 'GET',
dealReqData: ({ phone, token }) => {
return { phone, token }
}
}
// 查询进度 接口参数已变 // 查询进度 接口参数已变
export const applyStatusByToken = { export const applyStatusByToken = {
url: '/merchantApply/getApplyProgressByPhoneAndToken', url: '/merchantApply/getApplyProgressByPhoneAndToken',
...@@ -81,3 +110,11 @@ export const getIsInitPwd = { ...@@ -81,3 +110,11 @@ export const getIsInitPwd = {
url: '/personalInfo/isInitPwd', url: '/personalInfo/isInitPwd',
method: 'GET' method: 'GET'
} }
// 店铺中心-模糊查询
export const shopPermissionFuzzyQueryByName = {
url: '/shop/shopPermission/fuzzyQueryByName',
method: 'GET',
dealReqData: ({ shopName }) => {
return { shopName }
}
}
\ No newline at end of file
...@@ -117,4 +117,4 @@ export const editNavigation = { ...@@ -117,4 +117,4 @@ export const editNavigation = {
dealReqData: (form) => { dealReqData: (form) => {
return form return form
} }
} }
\ No newline at end of file
...@@ -4,4 +4,4 @@ const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev.mall ...@@ -4,4 +4,4 @@ const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev.mall
export const uploadImgUrl = `${baseUrl}/upload/common/img` export const uploadImgUrl = `${baseUrl}/upload/common/img`
export const uploadVideoUrl = `${baseUrl}/upload/common/video` export const uploadVideoUrl = `${baseUrl}/upload/common/video`
export const uploadApkUrl = `${baseUrl}/upload/common/apk` export const uploadApkUrl = `${baseUrl}/upload/common/apk`
export const uploadNftUrl = `${baseUrl}/upload/common/nft` export const uploadVxUrl = `${baseUrl}/merchantApply/uploadforwx`
...@@ -95,7 +95,11 @@ export const getMerchantConfigList = { ...@@ -95,7 +95,11 @@ export const getMerchantConfigList = {
url: '/userCenterMerchant/merchantSettings/list', url: '/userCenterMerchant/merchantSettings/list',
method: 'GET' method: 'GET'
} }
// 获取商户设置列表
export const getMerchantSettinglist = {
url: '/userCenterMerchant/merchantSettings/settinglist',
method: 'GET'
}
// 编辑商户设置某些值 // 编辑商户设置某些值
export const editMerchantConfig = { export const editMerchantConfig = {
url: '/userCenterMerchant/merchantSettings/edit', url: '/userCenterMerchant/merchantSettings/edit',
...@@ -104,7 +108,14 @@ export const editMerchantConfig = { ...@@ -104,7 +108,14 @@ export const editMerchantConfig = {
return form return form
} }
} }
// 保存商户设置
export const saveMerchantSettings = {
url: '/userCenterMerchant/merchantSettings/save',
method: 'POST',
dealReqData: (form) => {
return form
}
}
// 获取用户设置列表 // 获取用户设置列表
export const getMemberList = { export const getMemberList = {
url: '/member/memberSettings/list', url: '/member/memberSettings/list',
...@@ -119,3 +130,11 @@ export const editMemberConfig = { ...@@ -119,3 +130,11 @@ export const editMemberConfig = {
return form return form
} }
} }
// 编辑商户等级
export const editLevel = {
url: '/userCenterMerchant/merchantSettings/editlevel',
method: 'POST',
dealReqData: (form) => {
return form
}
}
...@@ -117,8 +117,7 @@ class IFetch { ...@@ -117,8 +117,7 @@ class IFetch {
} }
// this.clearAdminInfo() // this.clearAdminInfo()
} else { } else {
// this.alertServerErrMsg(e.message) this.alertServerErrMsg(e.message)
this.alertServerErrMsg('系统异常,请您稍后重试~')
} }
} }
}) })
......
...@@ -7,9 +7,7 @@ ...@@ -7,9 +7,7 @@
:style="uploadStyle" :style="uploadStyle"
> >
<template v-if="item.status === 'finished'"> <template v-if="item.status === 'finished'">
<video :src="item.url" v-if="type==='video'"></video> <img :src="getImgUrl(item)"/>{{ item.url }}
<img :src="getImgUrl(item)" v-else/>
{{ item.url }}
<div class="demo-upload-list-cover" v-show="!readonly || showWatch"> <div class="demo-upload-list-cover" v-show="!readonly || showWatch">
<Icon <Icon
v-if="showWatch && type != 'apk'" v-if="showWatch && type != 'apk'"
...@@ -82,10 +80,11 @@ ...@@ -82,10 +80,11 @@
</div> </div>
</template> </template>
<script> <script>
import { uploadImgUrl, uploadVideoUrl, uploadApkUrl, uploadNftUrl } from '@/api/apiConfig' import { uploadImgUrl, uploadVideoUrl, uploadApkUrl } from '@/api/apiConfig'
import { apiVerify } from '@/api/apiVerify' import { apiVerify } from '@/api/apiVerify'
import { getNameFromUrl, getPosterFromVideoUrl } from '@/libs/tools' import { getNameFromUrl, getPosterFromVideoUrl } from '@/libs/tools'
import AndroidBg from '@/assets/images/android-bg.jpg' import AndroidBg from '@/assets/images/android-bg.jpg'
import ThreeD from '@/assets/images/3D.png'
import { put, formatTime, getFileNameUUID } from '@/libs/ali-oss' import { put, formatTime, getFileNameUUID } from '@/libs/ali-oss'
export default { export default {
props: { props: {
...@@ -102,7 +101,7 @@ export default { ...@@ -102,7 +101,7 @@ export default {
// 文件大小限制 单位MB // 文件大小限制 单位MB
maxSize: { maxSize: {
type: Number, type: Number,
default: 6 default: 50
}, },
defaultList: { defaultList: {
type: Array, type: Array,
...@@ -143,8 +142,8 @@ export default { ...@@ -143,8 +142,8 @@ export default {
return '.mp4,.mkv' return '.mp4,.mkv'
} else if (this.type === 'apk') { } else if (this.type === 'apk') {
return '.apk, .xlsx, ' return '.apk, .xlsx, '
} else if (this.type === 'NFT') { } else if (this.type === '3d') {
return '.jpg, .jpeg, .gif, .bmp, .png,.mp4, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf, .txt ' return '.jm2, .fbx, .gltf,'
} }
}, },
fileFormat () { fileFormat () {
...@@ -154,8 +153,8 @@ export default { ...@@ -154,8 +153,8 @@ export default {
return ['mp4', 'mkv'] return ['mp4', 'mkv']
} else if (this.type === 'apk') { } else if (this.type === 'apk') {
return ['apk', 'xlsx'] return ['apk', 'xlsx']
} else if (this.type === 'NFT') { } else if (this.type === '3d') {
return ['jpg', 'jpeg', 'gif', 'bmp', 'png', 'mp4', 'mp3', 'wav', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt'] return ['jm2', 'fbx', 'gltf']
} }
}, },
uploadUrl () { uploadUrl () {
...@@ -163,10 +162,8 @@ export default { ...@@ -163,10 +162,8 @@ export default {
return uploadImgUrl return uploadImgUrl
} else if (this.type === 'video') { } else if (this.type === 'video') {
return uploadVideoUrl return uploadVideoUrl
} else if (this.type === 'apk') { } else if (this.type === 'apk' || this.type==='3d') {
return uploadApkUrl return uploadApkUrl
} else if (this.type === 'NFT') {
return uploadNftUrl
} }
}, },
...@@ -198,19 +195,35 @@ export default { ...@@ -198,19 +195,35 @@ export default {
watch: { watch: {
value: { value: {
handler (val) { handler (val) {
let fileList = this.$refs.upload.fileList let flag = true
fileList.splice(0, fileList.length) if (val.length == this.uploadList.length) {
let tempIndex = 0 for (let i = 0; i <= val.length; i++) {
val.forEach((item) => { if (!this.uploadList[i] || this.uploadList[i] != val[i]) {
fileList.push({ // console.log(111111)
url: item, flag = false
name: getNameFromUrl(item), break
status: 'finished', }
percentage: 100, }
uid: Date.now() + tempIndex++ } else {
flag = false
}
if (!flag) {
this.$refs.upload.clearFiles()
let tempIndex = 0
this.$nextTick(() => {
let fileList = this.$refs.upload.fileList
val.forEach((item) => {
fileList.push({
url: item,
name: getNameFromUrl(item),
status: 'finished',
percentage: 100,
uid: Date.now() + tempIndex++
})
})
this.uploadList = fileList
}) })
}) }
this.uploadList = fileList
}, },
deep: true deep: true
} }
...@@ -223,8 +236,8 @@ export default { ...@@ -223,8 +236,8 @@ export default {
return getPosterFromVideoUrl(item.url) return getPosterFromVideoUrl(item.url)
} else if (this.type === 'apk') { } else if (this.type === 'apk') {
return AndroidBg return AndroidBg
} else if (this.type === 'NFT') { } else if (this.type === '3d') {
return AndroidBg return ThreeD
} }
}, },
handleRemove (index) { handleRemove (index) {
...@@ -312,11 +325,6 @@ export default { ...@@ -312,11 +325,6 @@ export default {
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
.demo-upload-list video {
width: 100%;
height: 100%;
object-fit: cover;
}
.demo-upload-list-cover { .demo-upload-list-cover {
display: none; display: none;
position: absolute; position: absolute;
......
export const FinancialState = { export const FinancialState = {
INTEGRAL_ISSUE: 1, INTEGRAL_ISSUE: 1,
ALIPAY_ROLLS_OUT: 2,
WX_TRANSFERRED: 3,
WX_ROLLS_OUT: 4,
DIGITAL_TRAN_IN: 5, DIGITAL_TRAN_IN: 5,
DIGITAL_TRAN_OUT: 6, DIGITAL_TRAN_OUT: 6,
INTEGRAL_RECHARGE: 7, INTEGRAL_RECHARGE: 7,
WITHDRAWAL: 8,
INTEGRAL_DEDUCTION: 9, INTEGRAL_DEDUCTION: 9,
REFUND: 10, REFUND: 10,
COMMODITY_PURCHASE: 11, COMMODITY_PURCHASE: 11,
...@@ -32,27 +29,15 @@ export const FinancialState = { ...@@ -32,27 +29,15 @@ export const FinancialState = {
ANTI_COINTERFEITING: 36, ANTI_COINTERFEITING: 36,
NFT_IN_SHOP: 37, NFT_IN_SHOP: 37,
NFT_IN_USER: 38, NFT_IN_USER: 38,
BARTER_IN: 39, BARTER_IN:39,
BARTER_OUT: 40, BARTER_OUT:40,
FREE_COLLECTION: 41 FREE_COLLECTION:41
} }
export const FinancialStateObj = { export const FinancialStateObj = {
[FinancialState.INTEGRAL_ISSUE]: { [FinancialState.INTEGRAL_ISSUE]: {
label: '平台积分-发行', label: '平台积分-发行',
color: 'default' color: 'default'
}, },
[FinancialState.ALIPAY_ROLLS_OUT]: {
label: '支付宝转账-转出',
color: 'default'
},
[FinancialState.WX_TRANSFERRED]: {
label: '微信转账-转入',
color: 'default'
},
[FinancialState.WX_ROLLS_OUT]: {
label: '微信转账-转出',
color: 'default'
},
[FinancialState.DIGITAL_TRAN_IN]: { [FinancialState.DIGITAL_TRAN_IN]: {
label: '数字资产转帐-转入', label: '数字资产转帐-转入',
color: 'default' color: 'default'
...@@ -65,10 +50,6 @@ export const FinancialStateObj = { ...@@ -65,10 +50,6 @@ export const FinancialStateObj = {
label: '积分充值', label: '积分充值',
color: 'default' color: 'default'
}, },
[FinancialState.WITHDRAWAL]: {
label: '提现',
color: 'default'
},
[FinancialState.INTEGRAL_DEDUCTION]: { [FinancialState.INTEGRAL_DEDUCTION]: {
label: '积分抵扣', label: '积分抵扣',
color: 'default' color: 'default'
...@@ -213,3 +194,22 @@ export const TransferStateObj = { ...@@ -213,3 +194,22 @@ export const TransferStateObj = {
color: 'error' color: 'error'
} }
} }
export const RevenueStatus = {
TO_SETTLED: 1,
SETTLED: 2,
REFUNDED: 3
}
export const RevenueStateObj = {
[RevenueStatus.TO_SETTLED]: {
label: '待结算',
color: 'default'
},
[RevenueStatus.SETTLED]: {
label: '已结算',
color: 'default'
},
[RevenueStatus.REFUNDED]: {
label: '已退款',
color: 'default'
}
}
...@@ -19,8 +19,7 @@ export const MerchantStatus = { ...@@ -19,8 +19,7 @@ export const MerchantStatus = {
'CHECK': 3, 'CHECK': 3,
'CHECK_FAIL': 4, 'CHECK_FAIL': 4,
'TO_BE_PAID': 5, 'TO_BE_PAID': 5,
'PAY_FAIL': 6, 'PAY_FAIL': 6
'TO_BE_SET_PASSWORD': 7
} }
export const MerchantStatusObject = { export const MerchantStatusObject = {
...@@ -45,11 +44,7 @@ export const MerchantStatusObject = { ...@@ -45,11 +44,7 @@ export const MerchantStatusObject = {
color: 'error' color: 'error'
}, },
[MerchantStatus.TO_BE_PAID]: { [MerchantStatus.TO_BE_PAID]: {
name: '待设置密码', name: '待缴费',
color: 'default'
},
[MerchantStatus.TO_BE_SET_PASSWORD]: {
name: '待设置密码',
color: 'default' color: 'default'
}, },
[MerchantStatus.PAY_FAIL]: { [MerchantStatus.PAY_FAIL]: {
......
import {
SalesType
} from "./Goods"
// 订单状态,0->待支付,1->交易成功待提货,2提货成功待收货,3->交易关闭,4->申请退款,5->待退款,6->已退款,7->已完成, 8->退款审核未通过 // 订单状态,0->待支付,1->交易成功待提货,2提货成功待收货,3->交易关闭,4->申请退款,5->待退款,6->已退款,7->已完成, 8->退款审核未通过
// export const OrderState = { // export const OrderState = {
// UN_PAY: 0, // UN_PAY: 0,
...@@ -115,6 +118,56 @@ export const DeliveryStatusObj = { ...@@ -115,6 +118,56 @@ export const DeliveryStatusObj = {
color: 'default' color: 'default'
} }
} }
export const PickDeliveryStatus = {
// UN_SHIP: 0,
UN_PICK_UP: 1,
FINISH: 2,
CANCEL: 3,
UN_REFUND: 4,
REFUND_SUCCESS: 5,
CLOSED: 6,
REJECT: 7,
TO_BE_SIGNED: 8
}
export const PickDeliveryStatusObj = {
// [PickDeliveryStatus.UN_SHIP]: {
// label: '待发货',
// color: 'default'
// },
[PickDeliveryStatus.UN_PICK_UP]: {
label: '已发货',
color: 'blue'
},
[PickDeliveryStatus.FINISH]: {
label: '已收货',
color: 'green'
},
[PickDeliveryStatus.CANCEL]: {
label: '已撤销',
color: 'default'
},
[PickDeliveryStatus.UN_REFUND]: {
label: '待退货',
color: 'default'
},
[PickDeliveryStatus.REFUND_SUCCESS]: {
label: '已退货',
color: 'green'
},
[PickDeliveryStatus.CLOSED]: {
label: '交易结束',
color: 'gray'
},
[PickDeliveryStatus.REJECT]: {
label: '商家驳回',
color: 'warning'
},
[PickDeliveryStatus.TO_BE_SIGNED]: {
label: '退货待签收',
color: 'default'
}
}
// 已上 旧模板 // 已上 旧模板
...@@ -133,7 +186,7 @@ export const OrderState = { ...@@ -133,7 +186,7 @@ export const OrderState = {
ONLINE_REFUND_FAILED: 11, ONLINE_REFUND_FAILED: 11,
REFUND_PROGRESS: 12, REFUND_PROGRESS: 12,
REFUND_FAILED: 13, REFUND_FAILED: 13,
ORDER_FINISH: 14 ORDER_COMPLETE: 14
} }
export const OrderStateObj = { export const OrderStateObj = {
[OrderState.SUCCESS]: { [OrderState.SUCCESS]: {
...@@ -184,23 +237,44 @@ export const OrderStateObj = { ...@@ -184,23 +237,44 @@ export const OrderStateObj = {
label: '退款失败', label: '退款失败',
color: 'default' color: 'default'
}, },
[OrderState.ORDER_FINISH]: { [OrderState.ORDER_COMPLETE]: {
label: '订单完成', label: '订单完成',
color: 'success' color: 'success'
} }
} }
export const PayType = { export const PayType = {
INTEGRAL: 0,
ZFB: 1, ZFB: 1,
WX: 2, WX: 2,
CCNY: 3 CCNY: 3,
INTEGRAL: 4
} }
export const TransactionTypeObj = {
[SalesType.ORDINARY]: {
label: '正常',
color: 'default'
},
[SalesType.PRE_SALE]: {
label: '正常',
color: 'default'
},
[SalesType.AUCTION]: {
label: '正常',
color: 'default'
},
[SalesType.FREE]: {
label: '领取',
color: 'default'
}
}
export const PayTypeObj = { export const PayTypeObj = {
[PayType.INTEGRAL]: '积分支付',
[PayType.ZFB]: '支付宝', [PayType.ZFB]: '支付宝',
[PayType.WX]: '微信', [PayType.WX]: '微信',
[PayType.CCNY]: 'ccny' [PayType.CCNY]: 'ccny',
[PayType.INTEGRAL]: '积分支付'
} }
export const ComplaintStatus = { export const ComplaintStatus = {
......
This diff is collapsed.
<template> <template>
<div class="good-list-con"> <div class="good-list-con">
<Card> <Card>
<div class="top-info">
<div class="left">
<label class="label">商户通证地址:</label>
<span class="value">
{{tokenImgData.externalTokenAddr}}
</span>
&nbsp;<Button type="default" size="small" @click="handleCopy">复制</Button>
</div>
<div class="right">
<label class="label">地址二维码:</label>
<img :src="tokenImgData.qrUrl" alt="" @click="clickImg" style="width:40px;height:40px ">
</div>
</div>
<div class="search-con"> <div class="search-con">
<Input <Input
placeholder="请输入流水号" placeholder="请输入流水号"
...@@ -10,12 +23,12 @@ ...@@ -10,12 +23,12 @@
clearable clearable
/> />
<Select <Select
placeholder="请选择资产类型" placeholder="请选择通证ID"
class="search-input" class="search-input"
filterable
v-model="searchContent.coin" v-model="searchContent.coin"
style="width:200px" style="width:200px"
> >
<!-- <Option value>全部</Option> -->
<Option <Option
v-for="(item, index) of assetType" v-for="(item, index) of assetType"
:value="item.series_id" :value="item.series_id"
...@@ -24,8 +37,9 @@ ...@@ -24,8 +37,9 @@
> >
</Select> </Select>
<Select <Select
placeholder="请选择记录类型" placeholder="请选择交易类型"
class="search-input" class="search-input"
filterable
v-model="searchContent.type" v-model="searchContent.type"
style="width:200px" style="width:200px"
> >
...@@ -56,18 +70,23 @@ ...@@ -56,18 +70,23 @@
:loading="loading" :loading="loading"
@on-change="handleCurrentChange" @on-change="handleCurrentChange"
/> />
<bigImg v-if="showImg" @clickit="viewImg" :imgSrc="tokenImgData.qrUrl" @click="viewImg"></bigImg>
</Card> </Card>
</div> </div>
</template> </template>
<script> <script>
import Tables from '_c/tables' import Tables from '_c/tables'
import bigImg from '../good-mgr/big-img.vue'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums' import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums'
import config from '@/config'
const HOST = config.chainExploreUrl
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
Tables Tables,
bigImg
}, },
computed: { computed: {
}, },
...@@ -76,13 +95,10 @@ export default { ...@@ -76,13 +95,10 @@ export default {
FinancialState, FinancialState,
FinancialStateObj, FinancialStateObj,
searchContent: { searchContent: {
goodsId: '',
goodsName: '',
status: '',
addTimeHead: '',
addTimeTail: '',
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
flowId: '',
coin: '',
type: '' type: ''
}, },
createTime: [], createTime: [],
...@@ -98,10 +114,10 @@ export default { ...@@ -98,10 +114,10 @@ export default {
], ],
columns: [ columns: [
{ title: '流水号', key: 'flowId', minWidth: 180, align: 'left' }, { title: '流水号', key: 'flowId', minWidth: 180, align: 'left' },
{ title: '资产类型', key: 'assetsType', minWidth: 80, align: 'center' }, { title: '通证ID', key: 'assetsType', minWidth: 160, align: 'left' },
{ title: '金额', key: 'amount', minWidth: 80, align: 'center' }, { title: '数量', key: 'amount', minWidth: 80, align: 'center' },
{ title: '对方', key: 'otherSide', minWidth: 180, align: 'left' }, { title: '对方地址', key: 'otherSide', minWidth: 180, align: 'left' },
{ title: '记录类型', { title: '交易类型',
key: 'type', key: 'type',
minWidth: 160, minWidth: 160,
align: 'center', align: 'center',
...@@ -117,7 +133,7 @@ export default { ...@@ -117,7 +133,7 @@ export default {
obj.label obj.label
) )
} }, } },
{ title: '转账结果', { title: '交易状态',
key: 'status', key: 'status',
minWidth: 100, minWidth: 100,
align: 'center', align: 'center',
...@@ -134,21 +150,77 @@ export default { ...@@ -134,21 +150,77 @@ export default {
) )
} }, } },
{ {
title: '记录时间', title: '交易时间',
align: 'center', align: 'center',
width: 180, width: 180,
render: (h, params) => { render: (h, params) => {
return h('span', formatTime(params.row.createTime)) return h('span', formatTime(params.row.createTime))
} }
},
{ title: '操作',
key: 'goodsId',
width: 180,
align: 'center',
fixed: 'right',
render: (h, params) => {
let flowDetailBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
style: {
margin: '5px'
},
on: {
click: this.handleDetaild(params.row)
}
},
'查看详情'
)
return h('div', [flowDetailBtn])
}
} }
], ],
tableData: [], tableData: [],
totalSize: 0, totalSize: 0,
loading: false, loading: false,
selectCount: 0 selectCount: 0,
tokenImgData: {},
showImg: false
} }
}, },
methods: { methods: {
handleCopy () {
// console.log(1)
this.$copyText(this.tokenImgData.externalTokenAddr).then((e) => {
this.$Message.success('复制成功')
})
},
clickImg (e) {
this.showImg = true
// 获取当前图片地址
this.imgSrc = e.currentTarget.src
},
viewImg () {
this.showImg = false
},
tokenRead () {
this.api({
apiName: 'externalTokenRead',
success: (res) => {
this.tokenImgData = res.data
}
})
},
handleDetaild (row) {
return () => {
let id = row.hash
let url = `${HOST}/#/tx-detail?hash=${id}`
window.location.href = url
}
},
// 获取资产类型 // 获取资产类型
getAssetsType () { getAssetsType () {
let type = {} let type = {}
...@@ -168,6 +240,7 @@ export default { ...@@ -168,6 +240,7 @@ export default {
}, },
capitalFlow () { capitalFlow () {
this.loading = true this.loading = true
this.searchContent.flowId = this.searchContent.flowId.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'merchantAssetsFlowList', apiName: 'merchantAssetsFlowList',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -193,16 +266,26 @@ export default { ...@@ -193,16 +266,26 @@ export default {
} }
}, },
created () { created () {
console.log(this.type) // console.log(this.type)
this.capitalFlow() this.capitalFlow()
this.getAssetsType() this.getAssetsType()
this.tokenRead()
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.good-list-con .top-info {
display: flex;
justify-content: space-between;
.left,.right{
display: flex;
align-items: center;
}
}
.good-list-con .search-con { .good-list-con .search-con {
padding: 10px 0; padding: 10px 0;
.search { .search {
&-col { &-col {
display: inline-block; display: inline-block;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="integral_management"> <div class="integral_management">
<!-- 商户积分管理 --> <!-- 商户积分管理 -->
<Card class="item_management" style="margin-bottom:30px"> <Card class="item_management" style="margin-bottom:30px">
<div class="heard"> <div class="head">
<h2> 平台积分</h2> <h2> 平台积分</h2>
<Button type="primary" v-if="this.platformInfo != null" @click="platMerchant">转账</Button> <Button type="primary" v-if="this.platformInfo != null" @click="platMerchant">转账</Button>
</div> </div>
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
</div> </div>
</Card> </Card>
<Card class="item_management" v-if="this.shopInfo==null"> <Card class="item_management" v-if="this.shopInfo==null">
<div class="heard"> <div class="head">
<h2 class="merchant_title">商户积分</h2> <h2 class="merchant_title">商户积分</h2>
<Button type="primary" @click="issuingMerchant = true" class="issue">发行</Button> <Button type="primary" @click="issuingMerchant = true" class="issue">发行</Button>
</div> </div>
</Card> </Card>
<Card class="item_management" v-else> <Card class="item_management" v-else>
<div class="heard"> <div class="head">
<h2>商户积分</h2> <h2>商户积分</h2>
<Button type="primary" @click="merchantTransfer" v-if="shopInfo.status==5">转账</Button> <Button type="primary" @click="merchantTransfer" v-if="shopInfo.status==5">转账</Button>
<Button type="primary" @click="issuingMerchant = true" class="issue" v-if="shopInfo.status==2||shopInfo.status==4">重新发行</Button> <Button type="primary" @click="issuingMerchant = true" class="issue" v-if="shopInfo.status==2||shopInfo.status==4">重新发行</Button>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
> >
<FormItem label="标识" prop="label" class="shopList"> <FormItem label="标识" prop="label" class="shopList">
<Input <Input
placeholder="请输入标识(6位 以大写字母开头 纯大写字母或者大写字母和数字组合)" placeholder="请输入标识(1-15位 以大写字母开头 纯大写字母或者大写字母和数字)"
:maxlength="30" :maxlength="30"
v-model="dto.label" v-model="dto.label"
/> />
...@@ -442,9 +442,10 @@ export default{ ...@@ -442,9 +442,10 @@ export default{
return this.$Notice.warning({ title: '请输入发行量' }) return this.$Notice.warning({ title: '请输入发行量' })
} else if (dto.description == '') { } else if (dto.description == '') {
return this.$Notice.warning({ title: '请输入描述' }) return this.$Notice.warning({ title: '请输入描述' })
} else if (!/^[A-Z][A-Z0-9]{5}$/.test(dto.label)) { } else if (!/^[A-Z][A-Z0-9]{0,14}$/.test(dto.label)) {
return this.$Notice.warning({ title: '请输入正确标识' }) return this.$Notice.warning({ title: '请输入正确标识' })
} }
// console.log('111111111', dto)
this.api({ this.api({
apiName: 'issueMerchantIntegral', apiName: 'issueMerchantIntegral',
postdata: dto, postdata: dto,
...@@ -488,7 +489,7 @@ export default{ ...@@ -488,7 +489,7 @@ export default{
min-width: 1200px; min-width: 1200px;
.item_management{ .item_management{
// width: 80%; // width: 80%;
.heard{ .head{
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<div class="search-con"> <div class="search-con">
<Input placeholder="请输入商户编号" class="search-input" v-model="searchContent.merchantId" style="width: 200px"/> <Input placeholder="请输入商户编号" class="search-input" v-model="searchContent.merchantId" style="width: 200px"/>
<Input placeholder="请输入商户登录编号" class="search-input" v-model="searchContent.account" style="width: 200px"/> <Input placeholder="请输入商户登录编号" class="search-input" v-model="searchContent.account" style="width: 200px"/>
<Select class="search-input" v-model="searchContent.type" placeholder="请选择资产类型" style="width: 200px"> <Select class="search-input"
v-model="searchContent.type"
filterable
placeholder="请选择通证ID"
style="width: 200px">
<Option value="">全部</Option> <Option value="">全部</Option>
<Option v-for="(item, index) in assetsData" <Option v-for="(item, index) in assetsData"
:value="item" :value="item"
...@@ -38,6 +42,8 @@ ...@@ -38,6 +42,8 @@
<script> <script>
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import config from '@/config'
const HOST = config.chainExploreUrl
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
...@@ -46,8 +52,8 @@ export default { ...@@ -46,8 +52,8 @@ export default {
data () { data () {
return { return {
searchContent: { searchContent: {
merchantId: null, merchantId: '',
account: null, account: '',
type: null, type: null,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
...@@ -59,9 +65,9 @@ export default { ...@@ -59,9 +65,9 @@ export default {
{ title: '商户登录账号', key: 'loginAccount', align: 'center', minWidth: 130 }, { title: '商户登录账号', key: 'loginAccount', align: 'center', minWidth: 130 },
{ title: '商户名称', key: 'merchantName', align: 'center', width: 110 }, { title: '商户名称', key: 'merchantName', align: 'center', width: 110 },
{ title: '账户', key: 'account', align: 'left', minWidth: 150 }, { title: '账户', key: 'account', align: 'left', minWidth: 150 },
{ title: '资产类型', key: 'assetsType', align: 'center', width: 100 }, { title: '通证ID', key: 'assetsType', align: 'left', minWidth: 130 },
{ title: '可用余额', key: 'amount', align: 'center', width: 90 }, { title: '可用余额', key: 'amount', align: 'center', width: 100 },
{ title: '冻结余额', key: 'frozen', align: 'center', width: 90 }, { title: '冻结余额', key: 'frozen', align: 'center', width: 100 },
{ title: '更新时间', { title: '更新时间',
key: 'updateTime', key: 'updateTime',
align: 'center', align: 'center',
...@@ -69,47 +75,31 @@ export default { ...@@ -69,47 +75,31 @@ export default {
render: (h, params) => { render: (h, params) => {
return h('span', formatTime(params.row.updateTime)) return h('span', formatTime(params.row.updateTime))
} }
},
{ title: '操作',
key: 'index',
align: 'center',
minWidth: 150,
render: (h, params) => {
let flowDetailBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
style: {
margin: '5px'
},
on: {
click: this.handleDetaild(params.row)
}
},
'查看详情'
)
return h('div', [flowDetailBtn])
}
} }
// { title: '操作',
// key: 'index',
// align: 'center',
// minWidth: 150,
// render: (h, params) => {
// let rechargeBtn = h(
// 'Button',
// {
// props: {
// type: 'primary',
// size: 'small'
// },
// on: {
// click: this.handleRecharge(params.row)
// },
// style: {
// marginRight: '5px'
// }
// },
// '充 值'
// )
// let deductionBtn = h(
// 'Button',
// {
// props: {
// type: 'primary',
// size: 'small'
// },
// on: {
// click: this.handleDeduction(params.row)
// },
// style: {
// marginRight: '5px'
// }
// },
// '扣 除'
// )
// return h('div', [rechargeBtn, deductionBtn])
// }
// }
], ],
loading: false, loading: false,
totalSize: 0 totalSize: 0
...@@ -118,6 +108,8 @@ export default { ...@@ -118,6 +108,8 @@ export default {
methods: { methods: {
requestData () { requestData () {
this.loading = true this.loading = true
this.searchContent.merchantId = this.searchContent.merchantId.replace(/\s+/g, '')
this.searchContent.account = this.searchContent.account.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'merchantAssetsPage', apiName: 'merchantAssetsPage',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -138,6 +130,13 @@ export default { ...@@ -138,6 +130,13 @@ export default {
} }
}) })
}, },
handleDetaild (row) {
return () => {
let id = row.account
let url = `${HOST}/#/addr-detail?addr=${id}`
window.location.href = url
}
},
handleSearch () { handleSearch () {
this.requestData() this.requestData()
}, },
......
...@@ -17,9 +17,10 @@ ...@@ -17,9 +17,10 @@
clearable clearable
/> />
<Select <Select
placeholder="请选择资产类型" placeholder="请选择通证ID"
class="search-input" class="search-input"
v-model="searchContent.coin" v-model="searchContent.coin"
filterable
style="width: 200px" style="width: 200px"
> >
<!-- <Option value>全部</Option> --> <!-- <Option value>全部</Option> -->
...@@ -31,9 +32,10 @@ ...@@ -31,9 +32,10 @@
> >
</Select> </Select>
<Select <Select
placeholder="请选择记录类型" placeholder="请选择交易类型"
class="search-input" class="search-input"
v-model="searchContent.type" v-model="searchContent.type"
filterable
style="width: 200px" style="width: 200px"
> >
<Option value>全部</Option> <Option value>全部</Option>
...@@ -71,6 +73,8 @@ ...@@ -71,6 +73,8 @@
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums' import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums'
import config from '@/config'
const HOST = config.chainExploreUrl
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
...@@ -95,10 +99,10 @@ export default { ...@@ -95,10 +99,10 @@ export default {
{ title: '流水号', key: 'flowId', minWidth: 180, align: 'left' }, { title: '流水号', key: 'flowId', minWidth: 180, align: 'left' },
{ title: '商户编号', key: 'merchantId', minWidth: 180, align: 'left' }, { title: '商户编号', key: 'merchantId', minWidth: 180, align: 'left' },
{ title: '商户登录账号', key: 'loginAccount', minWidth: 150, align: 'center' }, { title: '商户登录账号', key: 'loginAccount', minWidth: 150, align: 'center' },
{ title: '资产类型', key: 'assetsType', minWidth: 100, align: 'center' }, { title: '通证ID', key: 'assetsType', minWidth: 150, align: 'left' },
{ title: '金额', key: 'amount', minWidth: 80, align: 'center' }, { title: '数量', key: 'amount', minWidth: 80, align: 'center' },
{ title: '对方', key: 'otherSide', minWidth: 180, align: 'left' }, { title: '对方地址', key: 'otherSide', minWidth: 180, align: 'left' },
{ title: '记录类型', { title: '交易类型',
key: 'type', key: 'type',
minWidth: 160, minWidth: 160,
align: 'center', align: 'center',
...@@ -114,7 +118,7 @@ export default { ...@@ -114,7 +118,7 @@ export default {
obj.label obj.label
) )
} }, } },
{ title: '转账结果', { title: '交易状态',
key: 'status', key: 'status',
minWidth: 160, minWidth: 160,
align: 'center', align: 'center',
...@@ -131,12 +135,36 @@ export default { ...@@ -131,12 +135,36 @@ export default {
) )
} }, } },
{ {
title: '记录时间', title: '交易时间',
align: 'center', align: 'center',
width: 180, width: 180,
render: (h, params) => { render: (h, params) => {
return h('span', formatTime(params.row.createTime)) return h('span', formatTime(params.row.createTime))
} }
},
{ title: '操作',
key: 'index',
align: 'center',
minWidth: 150,
render: (h, params) => {
let flowDetailBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
style: {
margin: '5px'
},
on: {
click: this.handleDetaild(params.row)
}
},
'查看详情'
)
return h('div', [flowDetailBtn])
}
} }
], ],
tableData: [], tableData: [],
...@@ -167,6 +195,8 @@ export default { ...@@ -167,6 +195,8 @@ export default {
}, },
businessFlow () { businessFlow () {
this.loading = true this.loading = true
this.searchContent.flowId = this.searchContent.flowId.replace(/\s+/g, '')
this.searchContent.merchantId = this.searchContent.merchantId.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'merchantAssetsFlowList', apiName: 'merchantAssetsFlowList',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -179,6 +209,13 @@ export default { ...@@ -179,6 +209,13 @@ export default {
} }
}) })
}, },
handleDetaild (row) {
return () => {
let id = row.hash
let url = `${HOST}/#/tx-detail?hash=${id}`
window.location.href = url
}
},
handleSearch () { handleSearch () {
this.searchContent.pageNum = 1 this.searchContent.pageNum = 1
this.businessFlow() this.businessFlow()
......
<template>
<div class="merchant-management-page">
<Card>
<div class="info-item">
<h3>商户信息</h3>
<tables
ref="tables"
v-model="tableData"
:columns="columns"
:loading="loading"
/>
</div>
<div class="info-item">
<h3>超级管理员信息</h3>
<div class="info-flex">
<p>姓名:{{merchantInfo.contactName}}</p>
<p>身份证号:{{merchantInfo.contactIdCardNumber}}</p>
</div>
<div class="info-flex">
<p>手机号:{{merchantInfo.mobilePhone}}</p>
<p>邮箱:{{merchantInfo.contactEmail}}</p>
</div>
</div>
<div class="info-item">
<h3>结算银行卡信息</h3>
<div class="info-flex">
<p>开户名称:{{merchantInfo.accountName}}</p>
<p>银行卡号:{{merchantInfo.accountNumber}}</p>
</div>
<div class="info-flex">
<p>开户行所在地:{{merchantInfo.bankAddressCode}}</p>
<p>开户行名称:{{merchantInfo.bankName}}</p>
</div>
</div>
</Card>
</div>
</template>
<script>
import Tables from '_c/tables'
import { formatTime } from '@/libs/tools'
export default {
components: {
Tables
},
data () {
return {
tableData: [],
merchantInfo: '',
loading: false,
columns: [
{ title: '商户号', key: 'subMchid', align: 'center', minWidth: 130 },
{ title: '商户类型',
key: 'type',
align: 'center',
minWidth: 130,
render: (h, params) => {
return h('span', params.row.type == 2401 ? '小微商户' : params.row.type == 4 ? '个体工商户' : '企业')
}
},
{ title: '商户渠道', key: 'shopChannel', align: 'center', minWidth: 130 },
{ title: '申请时间',
key: 'createTime',
align: 'center',
minWidth: 130,
render: (h, params) => {
return h('span', formatTime(params.row.createTime))
}
},
// { title: '管理', key: 'orderId', align: 'center', minWidth: 200 }
{ title: '管理',
minWidth: 190,
align: 'center',
render: (h, params) => {
return h('span', {
domProps: {
innerHTML: "请使用超级管理员的微信号扫码登录:<a href='https://pay.weixin.qq.com/partner/public/home'>微信支付商户管理</a>"
}
})
}
}
]
}
},
methods: {
requestData () {
this.loading = true
this.api({
apiName: 'merchantinfoquerybyadminId',
complete: () => {
this.loading = false
},
success: (res) => {
this.tableData = []
let obj = {
subMchid: res.data.subMchid,
type: res.data.type,
shopChannel: '微信支付',
createTime: res.data.createTime
// url: 'https://pay.weixin.qq.com/partner/public/home'
}
this.tableData.push(obj)
this.merchantInfo = res.data
// this.totalSize = res.total
}
})
}
// handleDetaild (row) {
// return () => {
// window.location.href = 'https://pay.weixin.qq.com/partner/public/home'
// }
// }
},
created () {
this.requestData()
}
}
</script>
<style lang="less" scoped>
.info-item {
padding: 20px 36px;
border: 1px solid #dcdee2;
border-radius: 5px;
margin-bottom: 15px;
}
.info-flex {
display: flex;
p {
width: 50%;
margin: 15px 0;
}
}
</style>
<template>
<div class="notice-page">
<Card>
<div class="search-con">
<Input
placeholder="请输入订单编号"
class="search-input"
v-model="searchContent.oid"
style="width: 180px"
clearable
/>
<Input
placeholder="请输入商户账号"
class="search-input"
v-model="searchContent.account"
style="width: 180px"
clearable
/>
<Select
placeholder="请选择状态"
class="search-input"
v-model="searchContent.recordState"
style="width:200px"
>
<Option value>全部</Option>
<Option
v-for="(item, index) of RevenueStatus"
:value="item"
:key="'series-option-' + index"
>{{RevenueStateObj[item].label}}</Option
>
</Select>
<DatePicker
placeholder="开始时间至结束时间"
v-model="createTime"
type="daterange"
placement="bottom-start"
class="search-date"
style="width:200px"
@on-change="handleDateChange(createTime)"
:editable="false"
separator=" ~ "
></DatePicker>
<ButtonGroup class="search-btngroup">
<Button type="primary" style="margin-left: 20px" @click="handleSearch">查 找</Button>
<Button type="primary" @click="handleRefresh">
<Icon type="md-refresh" />
</Button>
</ButtonGroup>
</div>
<tables
ref="tables"
editable
pagable
v-model="tableData"
:columns="columns"
:currentPage="searchContent.pageNum"
:pageSize="searchContent.pageSize"
:totalSize="totalSize"
:loading="loading"
@on-change="handleCurrentChange"
/>
</Card>
</div>
</template>
<script>
import Tables from '_c/tables'
import { formatTime } from '@/libs/tools'
import { RevenueStatus, RevenueStateObj, PayTypeObj } from '@/enums'
export default {
inject: ['reload'],
components: {
Tables
},
data () {
return {
RevenueStatus,
RevenueStateObj,
PayTypeObj,
searchContent: {
oid: '',
pageNum: 1,
pageSize: 10,
recordState: '',
timeStart: '',
timeEnd: '',
account: ''
},
createTime: [],
tableData: [],
columns: [
{ title: '订单号', key: 'oid', align: 'left', minWidth: 180 },
{ title: '商户账号', key: 'account', align: 'center', minWidth: 150 },
{ title: '商家收益', key: 'merchantProfit', align: 'center', minWidth: 120 },
{ title: '结算方式',
key: 'payType',
align: 'center',
minWidth: 120,
render: (h, params) => {
return h('div', PayTypeObj[params.row.payType])
}
},
{ title: '订单金额', key: 'orderTotal', align: 'center', minWidth: 120 },
{ title: '用户支付', key: 'userPayAmount', align: 'center', minWidth: 120 },
{ title: '商家收款', key: 'merchantCollection', align: 'center', minWidth: 120 },
{ title: '平台提成', key: 'platCommission', align: 'center', minWidth: 120 },
{ title: '商家补贴', key: 'merchantSubsidy', align: 'center', minWidth: 120 },
{ title: '平台补贴', key: 'platSubsidy', align: 'center', minWidth: 120 },
{ title: '状态',
key: 'type',
minWidth: 160,
align: 'center',
render: (h, params) => {
let obj = RevenueStateObj[params.row.recordState]
return h(
'Tag',
{
props: {
color: obj.color
}
},
obj.label
)
} },
{ title: '记录时间',
key: 'createTime',
align: 'center',
minWidth: 150,
render: (h, params) => {
return h('span', formatTime(params.row.createTime))
}
}
],
loading: false,
totalSize: 0
}
},
methods: {
handleSearch () {
this.searchContent.pageNum = 1
this.requestData()
},
requestData () {
this.loading = true
this.searchContent.oid = this.searchContent.oid.replace(/\s+/g, '')
this.searchContent.account = this.searchContent.account.replace(/\s+/g, '')
this.api({
apiName: 'profitRecordList',
postdata: this.searchContent,
complete: () => {
this.loading = false
},
success: (res) => {
this.tableData = res.data.records
this.totalSize = res.data.total
}
})
},
handleRefresh () {
this.reload()
},
handleDateChange (createTime) {
if (createTime && createTime.length == 2 && createTime[0] && createTime[1]) {
this.searchContent.timeStart = new Date(createTime[0]).getTime()
this.searchContent.timeEnd =
new Date(createTime[1]).getTime() + 24 * 60 * 60 * 1000 - 1
} else {
this.searchContent.timeStart = ''
this.searchContent.timeEnd = ''
}
},
handleCurrentChange () {
}
},
created () {
this.requestData()
}
}
</script>
<style scoped lang="less">
.notice-page .search-con {
display: flex;
padding: 10px 0;
.search-input {
width: 300px;
margin-right: 10px;
}
}
</style>
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
clearable clearable
/> />
<Select <Select
placeholder="请选择资产类型" placeholder="请选择通证ID"
class="search-input" class="search-input"
v-model="searchContent.coin" v-model="searchContent.coin"
filterable
style="width: 200px" style="width: 200px"
> >
<Option value>全部</Option> <Option value>全部</Option>
...@@ -24,9 +25,10 @@ ...@@ -24,9 +25,10 @@
> >
</Select> </Select>
<Select <Select
placeholder="请选择记录类型" placeholder="请选择交易类型"
class="search-input" class="search-input"
v-model="searchContent.type" v-model="searchContent.type"
filterable
style="width: 200px" style="width: 200px"
> >
<Option value>全部</Option> <Option value>全部</Option>
...@@ -64,6 +66,8 @@ ...@@ -64,6 +66,8 @@
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums' import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums'
import config from '@/config'
const HOST = config.chainExploreUrl
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
...@@ -86,10 +90,10 @@ export default { ...@@ -86,10 +90,10 @@ export default {
assetType: [], assetType: [],
columns: [ columns: [
{ title: '流水号', key: 'flowId', minWidth: 180, align: 'left' }, { title: '流水号', key: 'flowId', minWidth: 180, align: 'left' },
{ title: '资产类型', key: 'assetsType', minWidth: 90, align: 'center' }, { title: '通证ID', key: 'assetsType', minWidth: 150, align: 'left' },
{ title: '金额', key: 'amount', minWidth: 80, align: 'center' }, { title: '数量', key: 'amount', minWidth: 80, align: 'center' },
{ title: '对方', key: 'otherSide', minWidth: 180, align: 'left' }, { title: '对方地址', key: 'otherSide', minWidth: 180, align: 'left' },
{ title: '记录类型', { title: '交易类型',
key: 'type', key: 'type',
minWidth: 160, minWidth: 160,
align: 'center', align: 'center',
...@@ -105,7 +109,7 @@ export default { ...@@ -105,7 +109,7 @@ export default {
obj.label obj.label
) )
} }, } },
{ title: '转账结果', { title: '交易状态',
key: 'status', key: 'status',
minWidth: 130, minWidth: 130,
align: 'center', align: 'center',
...@@ -122,12 +126,36 @@ export default { ...@@ -122,12 +126,36 @@ export default {
) )
} }, } },
{ {
title: '记录时间', title: '交易时间',
align: 'center', align: 'center',
width: 180, width: 180,
render: (h, params) => { render: (h, params) => {
return h('span', formatTime(params.row.createTime)) return h('span', formatTime(params.row.createTime))
} }
},
{ title: '操作',
key: 'index',
align: 'center',
minWidth: 150,
render: (h, params) => {
let flowDetailBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
style: {
margin: '5px'
},
on: {
click: this.handleDetaild(params.row)
}
},
'查看详情'
)
return h('div', [flowDetailBtn])
}
} }
], ],
tableData: [], tableData: [],
...@@ -155,6 +183,7 @@ export default { ...@@ -155,6 +183,7 @@ export default {
}, },
platRequestData () { platRequestData () {
this.loading = true this.loading = true
this.searchContent.flowId = this.searchContent.flowId.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'platAssetRecordList', apiName: 'platAssetRecordList',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -167,6 +196,13 @@ export default { ...@@ -167,6 +196,13 @@ export default {
} }
}) })
}, },
handleDetaild (row) {
return () => {
let id = row.hash
let url = `${HOST}/#/tx-detail?hash=${id}`
window.location.href = url
}
},
handleSearch () { handleSearch () {
this.searchContent.pageNum = 1 this.searchContent.pageNum = 1
this.platRequestData() this.platRequestData()
......
...@@ -45,11 +45,12 @@ ...@@ -45,11 +45,12 @@
</Option> </Option>
</Select> </Select>
<ButtonGroup class="search-btngroup"> <ButtonGroup class="search-btngroup">
<Button type="primary" style="margin-left: 20px" @click="handleSearch">查 找</Button> <Button type="primary" style="margin-left: 15px" @click="handleSearch">查 找</Button>
<Button type="primary" @click="handleRefresh"> <Button type="primary" @click="handleRefresh">
<Icon type="md-refresh" /> <Icon type="md-refresh" />
</Button> </Button>
</ButtonGroup> </ButtonGroup>
<!-- <Button type="primary" @click="issuingMerchant = true" style="margin-left:15px">发行</Button> -->
</div> </div>
<tables <tables
ref="tables" ref="tables"
...@@ -224,7 +225,72 @@ ...@@ -224,7 +225,72 @@
> >
</div> </div>
</Modal> </Modal>
<Modal
title="发行积分"
v-model="issuingMerchant"
:styles="{top: '200px'}"
@on-cancel="issuing"
>
<Form
ref="platformDto"
:model="platformDto"
:label-width="100"
>
<FormItem label="标 识" prop="label" class="shopList">
<Input
placeholder="请输入标识(1-15位 以大写字母开头 纯大写字母或大写字母和数字)"
:maxlength="30"
v-model="platformDto.label"
/>
</FormItem>
<FormItem label="名 称" prop="name" class="shopList">
<Input
placeholder="请输入名称"
:maxlength="30"
v-model="platformDto.name"
/>
</FormItem>
<FormItem label="LOGO" prop="logo" class="shopList">
<file-upload
:maxNum="1"
:defaultList="defauleLogoImg"
v-model="logoImg"
/>
</FormItem>
<FormItem label="发行量" prop="issueNum" class="shopList">
<Input
placeholder="请输入发行量"
:maxlength="30"
v-model="platformDto.issueNum"
/>
</FormItem>
<FormItem label="发行地址" prop="addr" class="shopList">
<Input
placeholder="请输入地址"
:maxlength="30"
v-model="platformDto.addr"
/>
</FormItem>
<FormItem label="描 述" prop="description" class="shopList">
<Input
placeholder="请输入描述"
:maxlength="30"
type="textarea"
v-model="platformDto.description"
/>
</FormItem>
</Form>
<div slot="footer">
<Button
@click="updateShopIntegral"
:loading="updatePwdLoading"
type="primary"
long
>确 定</Button
>
</div>
</Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -246,6 +312,7 @@ export default{ ...@@ -246,6 +312,7 @@ export default{
}, },
data () { data () {
return { return {
issuingMerchant: false,
currentTab: 'single', currentTab: 'single',
exchangeModal: false, exchangeModal: false,
setPriceModal: false, setPriceModal: false,
...@@ -267,6 +334,16 @@ export default{ ...@@ -267,6 +334,16 @@ export default{
label: '', label: '',
price: '' price: ''
}, },
platformDto: {
description: '',
issueNum: '',
logo: '',
name: '',
label: '',
addr: ''
},
logoImg: [],
defauleLogoImg: [],
trans: { trans: {
phone: '', phone: '',
amount: '', amount: '',
...@@ -414,6 +491,10 @@ export default{ ...@@ -414,6 +491,10 @@ export default{
} }
}, },
methods: { methods: {
issuing () {
this.$refs.platformDto.resetFields()
this.logoImg = []
},
// 下载批量转账文件 // 下载批量转账文件
downloadFile () { downloadFile () {
axios({ axios({
...@@ -458,6 +539,36 @@ export default{ ...@@ -458,6 +539,36 @@ export default{
this.optModal = false this.optModal = false
this.opt.amount = '' this.opt.amount = ''
}, },
// 发行积分
updateShopIntegral () {
let { platformDto } = this
platformDto.logo = this.logoImg[0]
if (platformDto.label == '') {
return this.$Notice.warning({ title: '请输入标识' })
} else if (platformDto.name == '') {
return this.$Notice.warning({ title: '请输入名称' })
} else if (platformDto.logo == '') {
return this.$Notice.warning({ title: '请上传LOGO' })
} else if (platformDto.issueNum == '') {
return this.$Notice.warning({ title: '请输入发行量' })
} else if (platformDto.addr == '') {
return this.$Notice.warning({ title: '请输入发行地址' })
} else if (platformDto.description == '') {
return this.$Notice.warning({ title: '请输入描述' })
} else if (!/^[A-Z][A-Z0-9]{0,14}$/.test(platformDto.label)) {
return this.$Notice.warning({ title: '请输入正确标识' })
}
// this.api({
// apiName: 'issueMerchantIntegral',
// postdata: platformDto,
// success: (res) => {
// this.issuingMerchant = false
// this.$Notice.success({ title: '积分发行成功' })
// this.getPlatformBaseIntegralDetail()
// this.requestData()
// }
// })
},
handleOpt () { handleOpt () {
let apiName = this.optType == 1 ? 'addPlatFormIntegral' : 'recoverPlatFormIntegral' let apiName = this.optType == 1 ? 'addPlatFormIntegral' : 'recoverPlatFormIntegral'
if (!this.opt.amount) { if (!this.opt.amount) {
...@@ -533,6 +644,8 @@ export default{ ...@@ -533,6 +644,8 @@ export default{
}, },
requestData () { requestData () {
this.loading = true this.loading = true
this.searchContent.label = this.searchContent.label.replace(/\s+/g, '')
this.searchContent.merchantName = this.searchContent.merchantName.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'getIntegralManageList', apiName: 'getIntegralManageList',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -601,9 +714,9 @@ export default{ ...@@ -601,9 +714,9 @@ export default{
if (!this.trans.phone) { if (!this.trans.phone) {
return this.$Message.warning(`请输入转账手机号码`) return this.$Message.warning(`请输入转账手机号码`)
} }
if (!/^1[3|4|5|7|8][0-9]{9}$/.test(this.trans.phone)) { // if (!/^1[3|4|5|7|8|9][0-9]{9}$/.test(this.trans.phone)) {
return this.$Message.warning(`手机号码格式输入有误`) // return this.$Message.warning(`手机号码格式输入有误`)
} // }
if (!this.trans.amount) { if (!this.trans.amount) {
return this.$Message.warning(`请输入转账数量`) return this.$Message.warning(`请输入转账数量`)
} }
......
...@@ -2,18 +2,25 @@ ...@@ -2,18 +2,25 @@
<div class="notice-page"> <div class="notice-page">
<Card> <Card>
<div class="search-con"> <div class="search-con">
<Input
placeholder="请输入订单编号"
class="search-input"
v-model="searchContent.oid"
style="width: 180px"
clearable
/>
<Select <Select
placeholder="请选择状态" placeholder="请选择状态"
class="search-input" class="search-input"
v-model="searchContent.status" v-model="searchContent.recordState"
style="width:200px" style="width:200px"
> >
<Option value>全部</Option> <Option value>全部</Option>
<Option <Option
v-for="(item, index) of recordList" v-for="(item, index) of RevenueStatus"
:value="item.label" :value="item"
:key="'series-option-' + index" :key="'series-option-' + index"
>{{ item.label }}</Option >{{RevenueStateObj[item].label}}</Option
> >
</Select> </Select>
<DatePicker <DatePicker
...@@ -52,6 +59,7 @@ ...@@ -52,6 +59,7 @@
<script> <script>
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import { RevenueStatus, RevenueStateObj, PayTypeObj } from '@/enums'
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
...@@ -59,34 +67,59 @@ export default { ...@@ -59,34 +67,59 @@ export default {
}, },
data () { data () {
return { return {
RevenueStatus,
RevenueStateObj,
PayTypeObj,
searchContent: { searchContent: {
name: '', oid: '',
page: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
addTimeHead: '', recordState: '',
addTimeTail: '' timeStart: '',
timeEnd: ''
}, },
createTime: [], createTime: [],
tableData: [], tableData: [],
columns: [ columns: [
{ title: '记录号', key: 'index', align: 'left', minWidth: 180 }, { title: '订单号', key: 'oid', align: 'left', minWidth: 180 },
{ title: '订单号', key: 'index', align: 'left', minWidth: 180 }, { title: '商家收益', key: 'merchantProfit', align: 'center', minWidth: 120 },
{ title: '结算类型', key: 'index', align: 'center', minWidth: 120 }, { title: '结算方式',
{ title: '金额', key: 'index', align: 'center', minWidth: 120 }, key: 'payType',
{ title: '用户支付', key: 'index', align: 'center', minWidth: 120 }, align: 'center',
{ title: '平台提成', key: 'index', align: 'center', minWidth: 120 }, minWidth: 120,
{ title: '平台贴补', key: 'index', align: 'center', minWidth: 120 }, render: (h, params) => {
{ title: '状态', key: 'index', align: 'center', minWidth: 120 }, return h('div', PayTypeObj[params.row.payType])
{ title: '记录时间', key: 'index', align: 'center', minWidth: 150 } }
],
recordList: [
{
label: '已结算',
index: 1
}, },
{ { title: '订单金额', key: 'orderTotal', align: 'center', minWidth: 120 },
label: '待结算', { title: '用户支付', key: 'userPayAmount', align: 'center', minWidth: 120 },
index: 2 { title: '商家收款', key: 'merchantCollection', align: 'center', minWidth: 120 },
{ title: '平台提成', key: 'platCommission', align: 'center', minWidth: 120 },
{ title: '商家补贴', key: 'merchantSubsidy', align: 'center', minWidth: 120 },
{ title: '平台补贴', key: 'platSubsidy', align: 'center', minWidth: 120 },
{ title: '状态',
key: 'type',
minWidth: 160,
align: 'center',
render: (h, params) => {
let obj = RevenueStateObj[params.row.recordState]
return h(
'Tag',
{
props: {
color: obj.color
}
},
obj.label
)
} },
{ title: '记录时间',
key: 'createTime',
align: 'center',
minWidth: 150,
render: (h, params) => {
return h('span', formatTime(params.row.createTime))
}
} }
], ],
loading: false, loading: false,
...@@ -94,20 +127,36 @@ export default { ...@@ -94,20 +127,36 @@ export default {
} }
}, },
methods: { methods: {
handleSearch () {
this.searchContent.pageNum = 1
this.requestData()
},
requestData () { requestData () {
this.loading = true
this.searchContent.oid = this.searchContent.oid.replace(/\s+/g, '')
this.api({
apiName: 'profitRecordList',
postdata: this.searchContent,
complete: () => {
this.loading = false
},
success: (res) => {
this.tableData = res.data.records
this.totalSize = res.data.total
}
})
}, },
handleRefresh () { handleRefresh () {
this.reload() this.reload()
}, },
handleDateChange (createTime) { handleDateChange (createTime) {
if (createTime && createTime.length == 2 && createTime[0] && createTime[1]) { if (createTime && createTime.length == 2 && createTime[0] && createTime[1]) {
this.searchContent.addTimeHead = new Date(createTime[0]).getTime() this.searchContent.timeStart = new Date(createTime[0]).getTime()
this.searchContent.addTimeTail = this.searchContent.timeEnd =
new Date(createTime[1]).getTime() + 24 * 60 * 60 * 1000 - 1 new Date(createTime[1]).getTime() + 24 * 60 * 60 * 1000 - 1
} else { } else {
this.searchContent.addTimeHead = '' this.searchContent.timeStart = ''
this.searchContent.addTimeTail = '' this.searchContent.timeEnd = ''
} }
}, },
handleCurrentChange () { handleCurrentChange () {
......
<template>
<div>
<Card>
<p slot="title">交易信息</p>
<div class="main-info">
<p class="detail-info">
<span class="label">交易类型</span>
<span class="info">发行</span>
</p>
<p class="detail-info">
<span class="label">交易哈希</span>
<span class="info">0xe14279390e765fec689dec953f4e7622c320ebc9a958674b84a5245cc548b943</span>
</p>
<p class="detail-info">
<span class="label">发行时间</span>
<span class="info">2021-12-08 12:01:24</span>
</p>
<p class="detail-info">
<span class="label">发行状态</span>
<span class="info">成功</span>
</p>
<p class="detail-info">
<span class="label">发行方</span>
<span class="info">西湖龙井茶叶有限公司</span>
</p>
<p class="detail-info">
<span class="label">发行地址</span>
<span class="info">16JKWMzd21rLmuZKrKGt4MbmGqAbxAr2EA</span>
</p>
</div>
</Card>
<Card style="margin-top:30px">
<p slot="title">通证信息</p>
<div class="main-info">
<p class="detail-info">
<span class="label">商品名称</span>
<span class="info">雨前西湖龙井</span>
</p>
<p class="detail-info">
<span class="label">通证ID</span>
<span class="info">SLC0001-FT0036</span>
</p>
<p class="detail-info">
<span class="label">通证类型</span>
<span class="info">FT</span>
</p>
<p class="detail-info">
<span class="label">通证数量</span>
<span class="info">10</span>
</p>
<p class="detail-info">
<span class="label">通证价值</span>
<span class="info">1000元</span>
</p>
<p class="detail-info">
<span class="label">溯源哈希</span>
<span class="info">0xd242606d4c4423d5ea0e44f17783746d6fc2effddb6fabd03fe1b441574d7f2e</span>
</p>
</div>
</Card>
</div>
</template>
<script>
export default{
}
</script>
<style scoped lang="less">
.main-info{
margin-left:60px ;
.detail-info{
margin-bottom: 10px;
.label{
display: inline-block;
width: 100px;
}
}
}
</style>
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<div class="search-con"> <div class="search-con">
<Input placeholder="请输入用户编号" class="search-input" v-model="searchContent.uid" style="width: 200px"/> <Input placeholder="请输入用户编号" class="search-input" v-model="searchContent.uid" style="width: 200px"/>
<Input placeholder="请输入用户登录账号" class="search-input" v-model="searchContent.account" style="width: 200px"/> <Input placeholder="请输入用户登录账号" class="search-input" v-model="searchContent.account" style="width: 200px"/>
<Select class="search-input" v-model="searchContent.type" placeholder="请选择资产类型" style="width: 200px"> <Select class="search-input"
v-model="searchContent.type"
filterable
placeholder="请选择通证ID"
style="width: 200px">
<Option value="">全部</Option> <Option value="">全部</Option>
<Option v-for="(item, index) in assetsData" <Option v-for="(item, index) in assetsData"
:value="item" :value="item"
...@@ -65,6 +69,8 @@ ...@@ -65,6 +69,8 @@
<script> <script>
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import config from '@/config'
const HOST = config.chainExploreUrl
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
...@@ -73,8 +79,8 @@ export default { ...@@ -73,8 +79,8 @@ export default {
data () { data () {
return { return {
searchContent: { searchContent: {
uid: null, uid: '',
account: null, account: '',
type: null, type: null,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
...@@ -86,8 +92,8 @@ export default { ...@@ -86,8 +92,8 @@ export default {
{ title: '用户编号', key: 'uid', align: 'left', minWidth: 180 }, { title: '用户编号', key: 'uid', align: 'left', minWidth: 180 },
{ title: '用户登录账号', key: 'loginAccount', align: 'center', width: 130 }, { title: '用户登录账号', key: 'loginAccount', align: 'center', width: 130 },
{ title: '用户昵称', key: 'nickName', align: 'center', width: 120 }, { title: '用户昵称', key: 'nickName', align: 'center', width: 120 },
{ title: '账户', key: 'account', align: 'left', minWidth: 180 }, { title: '账户地址', key: 'account', align: 'left', minWidth: 180 },
{ title: '资产类型', key: 'assetsType', align: 'center', width: 100 }, { title: '通证ID', key: 'assetsType', align: 'left', minWidth: 150 },
{ title: '可用余额', key: 'amount', align: 'center', width: 100 }, { title: '可用余额', key: 'amount', align: 'center', width: 100 },
{ title: '冻结余额', key: 'frozen', align: 'center', width: 100 }, { title: '冻结余额', key: 'frozen', align: 'center', width: 100 },
{ title: '更新时间', { title: '更新时间',
...@@ -101,7 +107,7 @@ export default { ...@@ -101,7 +107,7 @@ export default {
{ title: '操作', { title: '操作',
key: 'index', key: 'index',
align: 'center', align: 'center',
minWidth: 160, minWidth: 180,
render: (h, params) => { render: (h, params) => {
let rechargeBtn = h( let rechargeBtn = h(
'Button', 'Button',
...@@ -114,7 +120,7 @@ export default { ...@@ -114,7 +120,7 @@ export default {
click: this.handleRecharge(params.row) click: this.handleRecharge(params.row)
}, },
style: { style: {
marginRight: '5px' margin: '5px'
} }
}, },
'充 值' '充 值'
...@@ -130,12 +136,28 @@ export default { ...@@ -130,12 +136,28 @@ export default {
click: this.handleDeduction(params.row) click: this.handleDeduction(params.row)
}, },
style: { style: {
marginRight: '5px' margin: '5px'
} }
}, },
'扣 除' '扣 除'
) )
return h('div', params.row.assetsType == 'BASE' ? [rechargeBtn, deductionBtn] : '--') let flowDetailBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
style: {
margin: '5px'
},
on: {
click: this.handleDetaild(params.row)
}
},
'查看详情'
)
return h('div', params.row.assetsType == 'SLG' ? [rechargeBtn, deductionBtn, flowDetailBtn] : '--')
} }
} }
], ],
...@@ -151,6 +173,8 @@ export default { ...@@ -151,6 +173,8 @@ export default {
methods: { methods: {
requestData () { requestData () {
this.loading = true this.loading = true
this.searchContent.uid = this.searchContent.uid.replace(/\s+/g, '')
this.searchContent.account = this.searchContent.account.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'userAssetsPage', apiName: 'userAssetsPage',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -191,10 +215,10 @@ export default { ...@@ -191,10 +215,10 @@ export default {
if (!this.amount) { if (!this.amount) {
return this.$Message.warning(`请输入${this.title}金额`) return this.$Message.warning(`请输入${this.title}金额`)
} }
if ((this.amount <= 0 || this.originalPrice > 999999)) { if ((this.amount <= 0 || this.amount > 999999)) {
return this.$Message.warning(`金额格式输入有误!`) return this.$Message.warning(`金额格式输入有误!`)
} }
this.originalPrice = parseFloat(this.amount) this.amount = parseFloat(this.amount)
if (!/^[0-9]+(.[0-9]{1,2})?$/.test(this.amount)) { if (!/^[0-9]+(.[0-9]{1,2})?$/.test(this.amount)) {
return this.$Message.warning(`金额格式最多至小数点后两位!`) return this.$Message.warning(`金额格式最多至小数点后两位!`)
} }
...@@ -231,6 +255,13 @@ export default { ...@@ -231,6 +255,13 @@ export default {
this.account = account this.account = account
this.modalStatus = true this.modalStatus = true
} }
},
handleDetaild (row) {
return () => {
let id = row.account
let url = `${HOST}/#/addr-detail?addr=${id}`
window.location.href = url
}
} }
}, },
created () { created () {
......
...@@ -17,9 +17,10 @@ ...@@ -17,9 +17,10 @@
clearable clearable
/> />
<Select <Select
placeholder="请选择资产类型" placeholder="请选择通证ID"
class="search-input" class="search-input"
v-model="searchContent.coin" v-model="searchContent.coin"
filterable
style="width: 200px" style="width: 200px"
> >
<!-- <Option value>全部</Option> --> <!-- <Option value>全部</Option> -->
...@@ -31,9 +32,10 @@ ...@@ -31,9 +32,10 @@
> >
</Select> </Select>
<Select <Select
placeholder="请选择记录类型" placeholder="请选择交易类型"
class="search-input" class="search-input"
v-model="searchContent.type" v-model="searchContent.type"
filterable
style="width: 200px" style="width: 200px"
> >
<Option value>全部</Option> <Option value>全部</Option>
...@@ -71,6 +73,8 @@ ...@@ -71,6 +73,8 @@
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums' import { FinancialState, FinancialStateObj, TransferStatus, TransferStateObj } from '@/enums'
import config from '@/config'
const HOST = config.chainExploreUrl
export default { export default {
inject: ['reload'], inject: ['reload'],
components: { components: {
...@@ -96,14 +100,14 @@ export default { ...@@ -96,14 +100,14 @@ export default {
{ title: '流水号', key: 'flowId', minWidth: 180, align: 'left' }, { title: '流水号', key: 'flowId', minWidth: 180, align: 'left' },
{ title: '用户编号', key: 'uid', minWidth: 180, align: 'left' }, { title: '用户编号', key: 'uid', minWidth: 180, align: 'left' },
{ title: '用户登录账号', key: 'loginAccount', minWidth: 160, align: 'center' }, { title: '用户登录账号', key: 'loginAccount', minWidth: 160, align: 'center' },
{ title: '资产类型', { title: '通证ID',
key: 'assetsType', key: 'assetsType',
minWidth: 100, minWidth: 150,
align: 'center' align: 'left'
}, },
{ title: '金额', key: 'amount', minWidth: 80, align: 'center' }, { title: '数量', key: 'amount', minWidth: 80, align: 'center' },
{ title: '对方', key: 'otherSide', minWidth: 180, align: 'left' }, { title: '对方地址', key: 'otherSide', minWidth: 180, align: 'left' },
{ title: '记录类型', { title: '交易类型',
key: 'type', key: 'type',
minWidth: 160, minWidth: 160,
align: 'center', align: 'center',
...@@ -119,7 +123,7 @@ export default { ...@@ -119,7 +123,7 @@ export default {
obj.label obj.label
) )
} }, } },
{ title: '转账结果', { title: '交易状态',
key: 'status', key: 'status',
minWidth: 160, minWidth: 160,
align: 'center', align: 'center',
...@@ -136,12 +140,36 @@ export default { ...@@ -136,12 +140,36 @@ export default {
) )
} }, } },
{ {
title: '记录时间', title: '交易时间',
align: 'center', align: 'center',
width: 180, width: 180,
render: (h, params) => { render: (h, params) => {
return h('span', formatTime(params.row.createTime)) return h('span', formatTime(params.row.createTime))
} }
},
{ title: '操作',
key: 'index',
align: 'center',
minWidth: 150,
render: (h, params) => {
let flowDetailBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
style: {
margin: '5px'
},
on: {
click: this.handleDetaild(params.row)
}
},
'查看详情'
)
return h('div', [flowDetailBtn])
}
} }
], ],
tableData: [], tableData: [],
...@@ -171,6 +199,8 @@ export default { ...@@ -171,6 +199,8 @@ export default {
}, },
getUserList () { getUserList () {
this.loading = true this.loading = true
this.searchContent.flowId = this.searchContent.flowId.replace(/\s+/g, '')
this.searchContent.uid = this.searchContent.uid.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'userAssetRecordList', apiName: 'userAssetRecordList',
postdata: this.searchContent, postdata: this.searchContent,
...@@ -183,6 +213,13 @@ export default { ...@@ -183,6 +213,13 @@ export default {
} }
}) })
}, },
handleDetaild (row) {
return () => {
let id = row.hash
let url = `${HOST}/#/tx-detail?hash=${id}`
window.location.href = url
}
},
handleSearch () { handleSearch () {
this.searchContent.pageNum = 1 this.searchContent.pageNum = 1
this.getUserList() this.getUserList()
......
...@@ -464,7 +464,7 @@ export default { ...@@ -464,7 +464,7 @@ export default {
margin-right: 5px; margin-right: 5px;
} }
} }
} }
.search-con{ .search-con{
width: 100%; width: 100%;
......
...@@ -354,8 +354,10 @@ export default { ...@@ -354,8 +354,10 @@ export default {
}, },
methods: { methods: {
requestData () { requestData () {
console.log(this.searchCon) // console.log(this.searchCon)
this.loading = true this.loading = true
this.searchCon.uid = this.searchCon.uid.replace(/\s+/g, '')
this.searchCon.accounts = this.searchCon.accounts.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'accountManage', apiName: 'accountManage',
postdata: this.searchCon, postdata: this.searchCon,
......
...@@ -196,6 +196,8 @@ export default { ...@@ -196,6 +196,8 @@ export default {
methods: { methods: {
requestData () { requestData () {
this.loading = true this.loading = true
this.searchContent.roleId = this.searchContent.roleId.replace(/\s+/g, '')
this.searchContent.roleName = this.searchContent.roleName.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'roleManageList', apiName: 'roleManageList',
postdata: this.searchContent, postdata: this.searchContent,
......
<template>
<div class="information-export-con">
<Form ref="formData" :model="formData" :rules="ruleValidate" :label-width="0">
<FormItem prop="sql">
<Input v-model="formData.sql" type="textarea" :rows="5" placeholder="请输入要执行的SQL..." />
</FormItem>
</Form>
<div class="form-btn">
<Button>清空</Button>
<Button type="primary" @click="submitData">确定</Button>
</div>
<div class="form-down" v-if="exportData.url">
<p>SQL执行成功,请点击右侧按钮,下载检索数据</p>
<Button :size="10" icon="md-download" shape="circle" @click="downLoad"></Button>
</div>
<div class="sql-error" v-if="exportData.error">
<p class="label">SQL执行失败,异常信息如下:</p>
<p>{{exportData.error}}</p>
</div>
</div>
</template>
<script>
export default {
data(){
const validateSql = (rule, value, callback) => {
if (!value) {
callback(new Error('请输入要执行的SQL'));
} else {
var re= /update|delete|insert|%/i;
if (re.test(value.toLowerCase())){
callback(new Error('禁止输入update/delete/insert'));
}
callback();
}
};
return{
formData:{
sql:""
},
exportData:{
error:'',
url:""
},
ruleValidate:{
sql: [
{ validator: validateSql, trigger: 'blur' }
],
}
}
},
methods:{
submitData(){
this.exportData={
error:'',
url:""
}
this.$refs['formData'].validate((valid) => {
if (valid) {
this.api({
apiName: 'dataInfocensusexport',
postdata: this.formData,
complete: () => {
this.loading = false
},
success: (res) => {
this.$Notice.success({ title: '提交成功,请点击下载!' })
this.exportData.url=res.data
},
error:(err)=>{
console.log(err)
this.$Notice.success({ title: 'sql语句错误' })
this.exportData.error=err.data
}
})
} else {
this.formModal = true
}
})
},
downLoad(){
if(!this.exportData.url){
this.$Message.error('请提交sql!')
}
window.open(this.exportData.url)
}
}
}
</script>
<style lang="less" scoped>
.information-export-con{
padding-top: 10px;
.form-btn{
display: flex;
justify-content: center;
.ivu-btn{
margin:0 30px;
width: 200px;
height: 50px;
}
}
.form-down{
display: flex;
align-items: center;
padding: 10px;
.ivu-btn{
margin-left: 10px;
border: 0;
background-color: transparent;
}
}
.sql-error{
padding: 20px 10px;
.label{
font-size: 14px;
margin-bottom: 10px;
}
}
}
</style>
\ No newline at end of file
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
<div class="item"> <div class="item">
<label class="label">商品类型:</label> <label class="label">商品类型:</label>
<RadioGroup v-model="data.type" :readonly="isDetail || isEdit"> <RadioGroup v-model="data.type" :readonly="isDetail || isEdit">
<Radio label="1" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">普通</Radio> <Radio label="1" :disabled="isDetail || isEdit || isAgain" class="ivu-radio">普通</Radio>
<Radio label="2" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">虚拟(不支持提货)</Radio> <Radio label="2" :disabled="isDetail || isEdit || isAgain" class="ivu-radio">虚拟(不支持提货)</Radio>
<!-- <Radio label="3" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">打包</Radio> --> <!-- <Radio label="3" :disabled="isDetail || isEdit || isAgain" class="ivu-radio">打包</Radio> -->
<!-- <Radio label="5" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">打包</Radio> --> <!-- <Radio label="5" :disabled="isDetail || isEdit || isAgain" class="ivu-radio">打包</Radio> -->
<!-- <Radio label="6" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">NFT</Radio> --> <!-- <Radio label="6" :disabled="isDetail || isEdit || isAgain" class="ivu-radio">NFT</Radio> -->
</RadioGroup> </RadioGroup>
</div> </div>
<div class="item"> <div class="item">
......
...@@ -49,6 +49,25 @@ ...@@ -49,6 +49,25 @@
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<label class="label">商品3D展示:</label>
<div class="upload-con">
<!-- <Input type="text" v-model="data.threeDUrl" placeholder="请输入商品3D展示地址" /> -->
<file-upload
:width="150"
:iconSize="26"
:height="32"
:maxNum="1"
v-model="data.threeDUrl"
:readonly="isDetail"
:defaultList="data.defaultthreeDUrl"
type="3d"
:maxSize="60"
/>
<div class="tip" v-if="!isDetail">提示:如果有3D展示,商品图片和视频将不会在商品详情中展示。</div>
<!-- {{data.thumbList}} -->
</div>
</div>
<div class="item">
<label class="label">详情描述:</label> <label class="label">详情描述:</label>
<div class="editor-con"> <div class="editor-con">
<Spin fix v-if="editorLoading"> <Spin fix v-if="editorLoading">
...@@ -117,7 +136,8 @@ export default { ...@@ -117,7 +136,8 @@ export default {
defaultDetailPicture: [], defaultDetailPicture: [],
defaultVideoList: [], defaultVideoList: [],
defaultVideoThumbList: [], defaultVideoThumbList: [],
defaultThumbList: [] defaultThumbList: [],
threeDUrl:[]
} }
}, },
isDetail: { isDetail: {
...@@ -176,8 +196,8 @@ export default { ...@@ -176,8 +196,8 @@ export default {
this.editorUploadPercent = parseFloat(event.percent).toFixed(1) this.editorUploadPercent = parseFloat(event.percent).toFixed(1)
}, },
imgBoforeUpload (file) { imgBoforeUpload (file) {
if (file.size >= 5 * 1024 * 1024) { if (file.size >= 50 * 1024 * 1024) {
this.$Notice.warning({ title: '上传图片不得超过5MB!' }) this.$Notice.warning({ title: '上传图片不得超过50MB!' })
return false return false
} }
this.editorUploadPercent = 0 this.editorUploadPercent = 0
...@@ -252,6 +272,13 @@ export default { ...@@ -252,6 +272,13 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
&.threeDUrl{
align-items: flex-start;
.label{
height: 32px;
line-height: 32px;
}
}
} }
.item .label { .item .label {
display: block; display: block;
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
<div class="series-info"> <div class="series-info">
<label class="label">退换货类型:</label> <label class="label">退换货类型:</label>
<RadioGroup v-model="backType"> <RadioGroup v-model="backType">
<Radio label="1" :disabled="isDetail || isEdit || isDraft" class="ivu-radio">不支持</Radio> <Radio label="1" :disabled="isDetail || isEdit" class="ivu-radio">不支持</Radio>
<Radio label="2" :disabled="isDetail || isEdit || isDraft" class="ivu-radio">七天无理由退货</Radio> <Radio label="2" :disabled="isDetail || isEdit" class="ivu-radio">七天无理由退货</Radio>
<Radio label="3" :disabled="isDetail || isEdit || isDraft" class="ivu-radio"> <Radio label="3" :disabled="isDetail || isEdit" class="ivu-radio">
自定义 自定义
<Input v-model="customDays" :disabled="isDetail || isEdit || isDraft" style="width: 80px" /> <Input v-model="customDays" :disabled="isDetail || isEdit" style="width: 80px" />
无理由退款 无理由退款
</Radio> </Radio>
...@@ -182,7 +182,9 @@ export default { ...@@ -182,7 +182,9 @@ export default {
detailDescribe: '', detailDescribe: '',
defaultDetailPicture: [], defaultDetailPicture: [],
defaultVideoList: [], defaultVideoList: [],
defaultThumbList: [] defaultThumbList: [],
threeDUrl:[],
defaultthreeDUrl:[]
// statu:this.status // statu:this.status
}, },
returnType: '', // 退货类型 returnType: '', // 退货类型
...@@ -267,7 +269,9 @@ export default { ...@@ -267,7 +269,9 @@ export default {
commodityPass, commodityPass,
useNft, useNft,
salesType, salesType,
goodsId goodsId,
threeDUrl,
purchaseLimit
} = res.data } = res.data
this.form.goodsId = goodsId this.form.goodsId = goodsId
this.form.brandId = brandId this.form.brandId = brandId
...@@ -325,6 +329,7 @@ export default { ...@@ -325,6 +329,7 @@ export default {
this.availableNumber = skus[0].availableNumber this.availableNumber = skus[0].availableNumber
this.form.saleInfo.commodityPass = commodityPass this.form.saleInfo.commodityPass = commodityPass
this.form.saleInfo.salesType = salesType this.form.saleInfo.salesType = salesType
this.form.saleInfo.purchaseLimit = purchaseLimit
this.form.deciptInfo = { this.form.deciptInfo = {
video, video,
videoList: [video], videoList: [video],
...@@ -333,10 +338,11 @@ export default { ...@@ -333,10 +338,11 @@ export default {
thumbList: thumb ? [thumb] : [], thumbList: thumb ? [thumb] : [],
detailPictures: JSON.parse(imgList), detailPictures: JSON.parse(imgList),
detailDescribe: detail, detailDescribe: detail,
threeDUrl: threeDUrl? [threeDUrl] : [],
defaultDetailPicture: JSON.parse(imgList), defaultDetailPicture: JSON.parse(imgList),
defaultVideoList: [video], defaultVideoList: [video],
defaultThumbList: thumb ? [thumb] : [] defaultThumbList: thumb ? [thumb] : [],
defaultthreeDUrl: threeDUrl? [threeDUrl] : [],
} }
if (!video) { if (!video) {
this.form.deciptInfo.video = '' this.form.deciptInfo.video = ''
...@@ -590,6 +596,11 @@ export default { ...@@ -590,6 +596,11 @@ export default {
form.video = deciptInfo.videoList[0] form.video = deciptInfo.videoList[0]
form.videoPoster = getPosterFromVideoUrl(form.video) form.videoPoster = getPosterFromVideoUrl(form.video)
} }
if(deciptInfo.threeDUrl&&deciptInfo.threeDUrl.length>0){
form.threeDUrl=deciptInfo.threeDUrl[0]
}else{
form.threeDUrl=''
}
// console.log('form',form) // console.log('form',form)
// 快递模板 // 快递模板
// if (!templateId) { // if (!templateId) {
......
...@@ -3,21 +3,15 @@ ...@@ -3,21 +3,15 @@
<div class="item"> <div class="item">
<label class="label">销售模式:</label> <label class="label">销售模式:</label>
<RadioGroup v-model="data.salesType"> <RadioGroup v-model="data.salesType">
<Radio :label="1" style="width:200px" :disabled="isDetail || isEdit || isDraft">普通</Radio> <Radio :label="1" style="width:200px" :disabled="isDetail || isEdit">普通</Radio>
<Radio :label="2" style="width:200px" :disabled="isDetail || isEdit || isDraft || packType">预售</Radio> <Radio :label="2" style="width:200px" :disabled="isDetail || isEdit || packType">预售</Radio>
<!-- <Radio :label="3" style="width:200px" :disabled="isDetail || isEdit || isDraft || packType">拍卖</Radio> --> <!-- <Radio :label="3" style="width:200px" :disabled="isDetail || isEdit || packType">拍卖</Radio> -->
<Radio :label="5" style="width: 200px" :disabled="isDetail || isEdit || isDraft ">免费领取</Radio> <Radio :label="5" style="width: 200px" :disabled="isDetail || isEdit ">免费领取</Radio>
</RadioGroup> </RadioGroup>
</div> </div>
<div class="item" v-if="shopStatus != 4"> <div class="item" v-if="shopStatus != 4">
<label class="label">限购数量:</label> <label class="label">限购数量:</label>
<Input <InputNumber :min="0" style="width: 400px" :disabled="isDetail" placeholder="请输入限购数量" v-model.number="data.purchaseLimit"></InputNumber>
v-model.number="data.purchaseLimit"
type="number"
:disabled="isDetail"
placeholder="请输入限购数量"
style="width: 400px"
/>
</div> </div>
<div class="item" v-if="data.salesType==2"> <div class="item" v-if="data.salesType==2">
<label class="label">预售价格:</label> <label class="label">预售价格:</label>
...@@ -102,8 +96,8 @@ ...@@ -102,8 +96,8 @@
<div class="item"> <div class="item">
<label class="label">NFT销售方式:</label> <label class="label">NFT销售方式:</label>
<RadioGroup v-model="data.nftSalesType"> <RadioGroup v-model="data.nftSalesType">
<Radio :label="1" style="width:200px" :disabled="isDetail || isEdit || isDraft || isAgain">原商品销售</Radio> <Radio :label="1" style="width:200px" :disabled="isDetail || isEdit || isAgain">原商品销售</Radio>
<Radio :label="2" style="width:200px" :disabled="isDetail || isEdit || isDraft || isAgain|| availableNumber != 1">使用权销售</Radio> <Radio :label="2" style="width:200px" :disabled="isDetail || isEdit || isAgain|| availableNumber != 1">使用权销售</Radio>
</RadioGroup> </RadioGroup>
</div> </div>
<div class="item" v-if="data.nftSalesType==2"> <div class="item" v-if="data.nftSalesType==2">
......
...@@ -5,17 +5,17 @@ ...@@ -5,17 +5,17 @@
<Input <Input
placeholder="请填写商品名称" placeholder="请填写商品名称"
v-model="data.name" v-model="data.name"
:readonly="isDetail || isEdit || isDraft|| isAgain" :readonly="isDetail || isEdit|| isAgain"
:maxlength="30" :maxlength="30"
/> />
</div> </div>
<div class="item"> <div class="item">
<label class="label">商品类型:</label> <label class="label">商品类型:</label>
<RadioGroup v-model="data.type" @on-change="changeType" :readonly="isDetail || isEdit || isDraft|| isAgain"> <RadioGroup v-model="data.type" @on-change="changeType" :readonly="isDetail || isEdit|| isAgain">
<Radio label="1" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">普通</Radio> <Radio label="2" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">虚拟(不支持提货)</Radio>
<Radio label="2" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">虚拟(不支持提货)</Radio> <Radio label="1" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">普通</Radio>
<!-- <Radio label="3" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">打包</Radio> --> <!-- <Radio label="3" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">打包</Radio> -->
<Radio label="4" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">NFT</Radio> <Radio label="4" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">NFT</Radio>
</RadioGroup> </RadioGroup>
</div> </div>
<div class="item"> <div class="item">
...@@ -86,15 +86,15 @@ ...@@ -86,15 +86,15 @@
<!-- <div class="item"> <!-- <div class="item">
<label class="label">应用NFT:</label> <label class="label">应用NFT:</label>
<RadioGroup v-model="data.useNft"> <RadioGroup v-model="data.useNft">
<Radio label="0" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio"></Radio> <Radio label="0" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio"></Radio>
<Radio label="1" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio"></Radio> <Radio label="1" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio"></Radio>
</RadioGroup> </RadioGroup>
</div> --> </div> -->
<!-- <div class="item"> <!-- <div class="item">
<label class="label">正品认证:</label> <label class="label">正品认证:</label>
<RadioGroup v-model="data.type"> <RadioGroup v-model="data.type">
<Radio label="1" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">申请</Radio> <Radio label="1" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">申请</Radio>
<Radio label="2" :disabled="isDetail || isEdit || isDraft|| isAgain" class="ivu-radio">不申请</Radio> <Radio label="2" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">不申请</Radio>
</RadioGroup> </RadioGroup>
</div> --> </div> -->
</info-con> </info-con>
......
...@@ -48,6 +48,27 @@ ...@@ -48,6 +48,27 @@
<!-- {{data.thumbList}} --> <!-- {{data.thumbList}} -->
</div> </div>
</div> </div>
<!-- {{data.threeDUrl}} -->
<div class="item">
<label class="label">商品3D展示:</label>
<div class="upload-con">
<!-- <Input type="text" v-model="data.threeDUrl" placeholder="请输入商品3D展示地址" /> -->
<file-upload
:width="150"
:iconSize="26"
:height="32"
:maxNum="1"
v-model="data.threeDUrl"
:defaultList="data.defaultthreeDUrl"
:readonly="isDetail"
type="3d"
:maxSize="60"
/>
<div class="tip" v-if="!isDetail">提示:如果有3D展示,商品图片和视频将不会在商品详情中展示。</div>
<!-- {{data.thumbList}} -->
</div>
</div>
<div class="item"> <div class="item">
<label class="label">详情描述:</label> <label class="label">详情描述:</label>
<div class="editor-con"> <div class="editor-con">
...@@ -117,7 +138,8 @@ export default { ...@@ -117,7 +138,8 @@ export default {
defaultDetailPicture: [], defaultDetailPicture: [],
defaultVideoList: [], defaultVideoList: [],
defaultVideoThumbList: [], defaultVideoThumbList: [],
defaultThumbList: [] defaultThumbList: [],
threeDUrl:[]
} }
}, },
isDetail: { isDetail: {
...@@ -176,7 +198,7 @@ export default { ...@@ -176,7 +198,7 @@ export default {
this.editorUploadPercent = parseFloat(event.percent).toFixed(1) this.editorUploadPercent = parseFloat(event.percent).toFixed(1)
}, },
imgBoforeUpload (file) { imgBoforeUpload (file) {
if (file.size >= 5 * 1024 * 1024) { if (file.size >= 50 * 1024 * 1024) {
this.$Notice.warning({ title: '上传图片不得超过5MB!' }) this.$Notice.warning({ title: '上传图片不得超过5MB!' })
return false return false
} }
...@@ -252,6 +274,13 @@ export default { ...@@ -252,6 +274,13 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
&.threeDUrl{
align-items: flex-start;
.label{
height: 32px;
line-height: 32px;
}
}
} }
.item .label { .item .label {
display: block; display: block;
......
...@@ -46,25 +46,25 @@ ...@@ -46,25 +46,25 @@
<label class="label">是否允许延后提货:</label> <label class="label">是否允许延后提货:</label>
<i-switch <i-switch
v-model="form.delayDelivery" v-model="form.delayDelivery"
:disabled="delayDeliveryDisabled || isDetail || isEdit|| isAgain ||isDraft" :disabled="delayDeliveryDisabled || isDetail || isEdit|| isAgain"
/> />
</div> </div>
<div class="series-info" v-if="form.baseInfo.type != 4"> <div class="series-info" v-if="form.baseInfo.type != 4">
<label class="label">退换货类型:</label> <label class="label">退换货类型:</label>
<RadioGroup v-model="backType"> <RadioGroup v-model="backType">
<Radio label="1" :disabled="isDetail || isEdit|| isAgain||isDraft" class="ivu-radio" <Radio label="1" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio"
>不支持</Radio >不支持</Radio
> >
<Radio label="2" :disabled="isDetail || isEdit|| isAgain||isDraft" class="ivu-radio" <Radio label="2" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio"
>七天无理由退货</Radio >七天无理由退货</Radio
> >
<Radio label="3" :disabled="isDetail || isEdit|| isAgain||isDraft" class="ivu-radio"> <Radio label="3" :disabled="isDetail || isEdit|| isAgain" class="ivu-radio">
自定义 自定义
<Input <Input
v-model="customDays" v-model="customDays"
type="number" type="number"
:max="15" :max="15"
:disabled="isDetail || isEdit|| isAgain||isDraft" :disabled="isDetail || isEdit|| isAgain"
style="width: 80px" style="width: 80px"
/> />
无理由退款 无理由退款
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
// prop: [{ name: '', val: '' }], // 商品属性 // prop: [{ name: '', val: '' }], // 商品属性
prop: [], prop: [],
categoryId: [], // 类目选择 categoryId: [], // 类目选择
type: "1", // 商品类型 type: "2", // 商品类型
useNft: "0", useNft: "0",
}, },
saleInfo: { saleInfo: {
...@@ -233,6 +233,8 @@ export default { ...@@ -233,6 +233,8 @@ export default {
defaultDetailPicture: [], defaultDetailPicture: [],
defaultVideoList: [], defaultVideoList: [],
defaultThumbList: [], defaultThumbList: [],
defaultthreeDUrl:[],
threeDUrl:[]
// statu:this.status // statu:this.status
}, },
returnType: "", // 退货类型 returnType: "", // 退货类型
...@@ -324,6 +326,8 @@ export default { ...@@ -324,6 +326,8 @@ export default {
this.form.deciptInfo.defaultDetailPicture = []; this.form.deciptInfo.defaultDetailPicture = [];
this.form.deciptInfo.defaultVideoList = []; this.form.deciptInfo.defaultVideoList = [];
this.form.deciptInfo.defaultThumbList = []; this.form.deciptInfo.defaultThumbList = [];
this.form.deciptInfo.threeDUrl = []
this.form.deciptInfo.defaultthreeDUrl = []
this.backType = "1"; this.backType = "1";
this.customDays = ""; this.customDays = "";
this.form.note = ""; this.form.note = "";
...@@ -421,6 +425,7 @@ export default { ...@@ -421,6 +425,7 @@ export default {
useNft, useNft,
salesType, salesType,
purchaseLimit, purchaseLimit,
threeDUrl
} = res.data; } = res.data;
this.form.brandId = brandId; this.form.brandId = brandId;
...@@ -519,7 +524,8 @@ export default { ...@@ -519,7 +524,8 @@ export default {
thumbList: thumb ? [thumb] : [], thumbList: thumb ? [thumb] : [],
detailPictures: JSON.parse(imgList), detailPictures: JSON.parse(imgList),
detailDescribe: detail, detailDescribe: detail,
threeDUrl: threeDUrl ? [threeDUrl] : [],
defaultthreeDUrl: threeDUrl ? [threeDUrl] : [],
defaultDetailPicture: JSON.parse(imgList), defaultDetailPicture: JSON.parse(imgList),
defaultVideoList: [video], defaultVideoList: [video],
defaultThumbList: thumb ? [thumb] : [], defaultThumbList: thumb ? [thumb] : [],
...@@ -550,7 +556,11 @@ export default { ...@@ -550,7 +556,11 @@ export default {
: ""; : "";
} }
if (salesType == 4) { if (salesType == 4) {
this.form.saleInfo.commodityPass = commodityPass || 1; if(commodityPass==4){
this.form.saleInfo.commodityPass=1
}else{
this.form.saleInfo.commodityPass=2
}
this.form.saleInfo.price = blindBoxPrice || 0; this.form.saleInfo.price = blindBoxPrice || 0;
this.form.saleInfo.difficulty = difficulty || 1; this.form.saleInfo.difficulty = difficulty || 1;
let sku = []; let sku = [];
...@@ -568,7 +578,6 @@ export default { ...@@ -568,7 +578,6 @@ export default {
} }
this.form.saleInfo.sku = sku; this.form.saleInfo.sku = sku;
} }
console.log(this.form)
if (goodsPackageVO) { if (goodsPackageVO) {
goodsPackageVO.resource.forEach((item, index) => { goodsPackageVO.resource.forEach((item, index) => {
item.name = item.goodsName; item.name = item.goodsName;
...@@ -770,9 +779,15 @@ export default { ...@@ -770,9 +779,15 @@ export default {
) { ) {
errMsg = "首付固定金额不能大于商品预售价格"; errMsg = "首付固定金额不能大于商品预售价格";
} }
<<<<<<< HEAD
if (!item.stock) { if (!item.stock) {
errMsg = "请填写 规格信息 - 库存!"; errMsg = "请填写 规格信息 - 库存!";
} }
=======
// if (!item.stock) {
// errMsg = "请填写 规格信息 - 库存!";
// }
>>>>>>> master
if (!item.hash) { if (!item.hash) {
errMsg = "请填写 规格信息 - 溯源哈希!"; errMsg = "请填写 规格信息 - 溯源哈希!";
} }
...@@ -823,6 +838,11 @@ export default { ...@@ -823,6 +838,11 @@ export default {
} }
if (saleInfo.salesType === 4) { if (saleInfo.salesType === 4) {
form.commodityPass = this.form.saleInfo.commodityPass; form.commodityPass = this.form.saleInfo.commodityPass;
if(this.form.saleInfo.commodityPass==1){
form.commodityPass=4
}else{
form.commodityPass=5
}
form.blindBoxPrice = this.form.saleInfo.price; form.blindBoxPrice = this.form.saleInfo.price;
form.blindBoxRule = this.form.saleInfo.blindBoxRule; form.blindBoxRule = this.form.saleInfo.blindBoxRule;
form.difficulty=this.form.saleInfo.difficulty || 3 form.difficulty=this.form.saleInfo.difficulty || 3
...@@ -830,6 +850,7 @@ export default { ...@@ -830,6 +850,7 @@ export default {
for (let item of this.form.saleInfo.sku) { for (let item of this.form.saleInfo.sku) {
let obj = { let obj = {
...item, ...item,
originalPrice:form.blindBoxPrice,
isHide: item.isHide ? 1 : 0, isHide: item.isHide ? 1 : 0,
propertyList: [ propertyList: [
{ {
...@@ -877,6 +898,7 @@ export default { ...@@ -877,6 +898,7 @@ export default {
errMsg = "规格信息 - 重量 格式不正确!"; errMsg = "规格信息 - 重量 格式不正确!";
break; break;
} }
<<<<<<< HEAD
if (!item.stock) { if (!item.stock) {
errMsg = "请填写 规格信息 - 库存!"; errMsg = "请填写 规格信息 - 库存!";
break; break;
...@@ -885,6 +907,16 @@ export default { ...@@ -885,6 +907,16 @@ export default {
item.stock < 0 || item.stock < 0 ||
!/^\d+$/.test(item.stock) || !/^\d+$/.test(item.stock) ||
item.stock > 99999999 item.stock > 99999999
=======
// if (!item.stock) {
// errMsg = "请填写 规格信息 - 库存!";
// break;
// }
if (
item.stock < 0 ||
!/^\d+$/.test(item.stock) ||
item.stock > 20000
>>>>>>> master
) { ) {
errMsg = "规格信息 - 库存 格式不正确!"; errMsg = "规格信息 - 库存 格式不正确!";
break; break;
...@@ -1005,6 +1037,15 @@ export default { ...@@ -1005,6 +1037,15 @@ export default {
form.video = deciptInfo.videoList[0]; form.video = deciptInfo.videoList[0];
form.videoPoster = getPosterFromVideoUrl(form.video); form.videoPoster = getPosterFromVideoUrl(form.video);
} }
<<<<<<< HEAD
=======
if(deciptInfo.threeDUrl&&deciptInfo.threeDUrl.length>0){
form.threeDUrl=deciptInfo.threeDUrl[0]
}else{
form.threeDUrl=''
}
>>>>>>> master
// console.log('form',form) // console.log('form',form)
// 快递模板 // 快递模板
// if (!templateId) { // if (!templateId) {
...@@ -1291,7 +1332,10 @@ export default { ...@@ -1291,7 +1332,10 @@ export default {
item.commodityPassId = this.form.saleInfo.id; item.commodityPassId = this.form.saleInfo.id;
}); });
} }
<<<<<<< HEAD
console.log("111111", form.skuList); console.log("111111", form.skuList);
=======
>>>>>>> master
this.draftLoading = true; this.draftLoading = true;
this.api({ this.api({
apiName: "draftGood", apiName: "draftGood",
......
This diff is collapsed.
...@@ -132,12 +132,35 @@ ...@@ -132,12 +132,35 @@
type="datetime" type="datetime"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
:options="optionsDate" :options="optionsDate"
@on-change="changeFormDataDate" @on-change="changeFormDataDate($event,'preheatEndTime')"
v-model="formData.date" v-model="formData.date"
placeholder="请选择日期" placeholder="请选择日期"
style="width: 200px" style="width: 200px"
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
<!-- <FormItem prop="account">
<RadioGroup v-model="formData.autoOff_type">
<Radio :label="0">手动下架</Radio>
</RadioGroup>
</FormItem> -->
<FormItem prop="password">
<label class="label" style="margin-right:10px">自动下架(可选)</label>
<!-- <RadioGroup v-model="formData.autoOff_type"> -->
<!-- <Radio :label="1">自动下架<span
style="display: inline-block; width: 10px"
></span>
</Radio> -->
<!-- </RadioGroup> -->
<DatePicker
type="datetime"
format="yyyy-MM-dd HH:mm"
:options="optionsDate"
@on-change="changeFormDataDate($event,'autoOff')"
v-model="formData.autoOff"
placeholder="请选择日期"
style="width: 200px"
></DatePicker>
</FormItem>
</Form> </Form>
</template> </template>
</div> </div>
...@@ -376,9 +399,76 @@ export default { ...@@ -376,9 +399,76 @@ export default {
] ]
); );
}, },
<<<<<<< HEAD
=======
},
{
title: "状态",
key: "status",
align: "center",
width: 100,
render: (h, params) => {
let obj = OffShelfTypeObj[params.row.status] || {};
const statusObj=h(
"Tag",
{
props: {
color: obj.color,
},
},
obj.label
)
if(params.row.status===OffShelfType.ISSUE){
const slots=h(
"div",
{
slot:"content",
style:{
'textAlign':"left"
}
},
[
h(
"p",
'目标发行token:500个'
),
h(
"p",
'已发行token:500个'
),
]
)
return h(
'Poptip',
{
props:{
trigger:"hover",
title:'发行进度'
}
},
[statusObj,slots]
)
}else{
return statusObj
}
//
// return h(
// "Tag",
// {
// props: {
// color: obj.color,
// },
// },
// obj.label
// );
},
>>>>>>> master
}, },
{ {
<<<<<<< HEAD
title: "状态", title: "状态",
key: "status", key: "status",
align: "center", align: "center",
...@@ -397,6 +487,8 @@ export default { ...@@ -397,6 +487,8 @@ export default {
}, },
}, },
{ {
=======
>>>>>>> master
title: "失败理由", title: "失败理由",
width: 130, width: 130,
align: "center", align: "center",
...@@ -475,7 +567,10 @@ export default { ...@@ -475,7 +567,10 @@ export default {
// display: this.isBrand ? 'inline-block' : 'none' // display: this.isBrand ? 'inline-block' : 'none'
display: display:
status == OffShelfType.DRAFT || status == OffShelfType.DRAFT ||
<<<<<<< HEAD
status == OffShelfType.OFFERING || status == OffShelfType.OFFERING ||
=======
>>>>>>> master
status == OffShelfType.CHECK_FAIL || status == OffShelfType.CHECK_FAIL ||
status == OffShelfType.FAIL status == OffShelfType.FAIL
? "inline-block" ? "inline-block"
...@@ -594,9 +689,14 @@ export default { ...@@ -594,9 +689,14 @@ export default {
title: "", title: "",
name: "", name: "",
date: "", date: "",
autoOff:''
}, },
optionsDate: { optionsDate: {
<<<<<<< HEAD
disabledDate(date) { disabledDate(date) {
=======
disabledDate (date) {
>>>>>>> master
return date && date.valueOf() < Date.now() - 86400000; return date && date.valueOf() < Date.now() - 86400000;
}, },
}, },
...@@ -781,7 +881,12 @@ export default { ...@@ -781,7 +881,12 @@ export default {
title, title,
row.name, row.name,
row.preheatEndTime, row.preheatEndTime,
<<<<<<< HEAD
row.status row.status
=======
row.status,
row.autoOff
>>>>>>> master
); );
} else { } else {
this.$Modal.confirm({ this.$Modal.confirm({
...@@ -801,13 +906,21 @@ export default { ...@@ -801,13 +906,21 @@ export default {
} }
}; };
}, },
<<<<<<< HEAD
OffShelfModal(goodsId, type, title, name, preheatEndTime = 0, status) { OffShelfModal(goodsId, type, title, name, preheatEndTime = 0, status) {
=======
OffShelfModal(goodsId, type, title, name, preheatEndTime = 0, status, autoOff) {
>>>>>>> master
this.formData = { this.formData = {
title, title,
goodsId, goodsId,
type, type,
preheatEndTime: "", preheatEndTime: "",
name, name,
<<<<<<< HEAD
=======
autoOff
>>>>>>> master
}; };
if (preheatEndTime && status === 10) { if (preheatEndTime && status === 10) {
let date = formatTime(preheatEndTime, "yyyy-MM-dd hh:mm"); let date = formatTime(preheatEndTime, "yyyy-MM-dd hh:mm");
...@@ -817,50 +930,51 @@ export default { ...@@ -817,50 +930,51 @@ export default {
this.detailModal = true; this.detailModal = true;
}, },
OffShelfModalOk() { OffShelfModalOk() {
let date = new Date().getTime()
let { goodsId, type, preheatEndTime } = this.formData
let postdata = {goodsId,type}
if (this.formData.type === 10) { if (this.formData.type === 10) {
let date = new Date().getTime();
let flag = true;
if (!this.formData.preheatEndTime) { if (!this.formData.preheatEndTime) {
this.$Notice.error({ title: `请选择日期` }); this.$Notice.error({ title: `请选择日期` });
flag = false; this.showModal()
return
} }
if (flag) { let preheatEndTime = new Date(this.formData.preheatEndTime).getTime();
let preheatEndTime = new Date(this.formData.preheatEndTime).getTime(); if (preheatEndTime <= date) {
if (preheatEndTime <= date) { this.$Notice.error({ title: `预热时间不能小于当前时间!` });
this.$Notice.error({ title: `预热时间不能小于当前时间!` }); this.showModal()
flag = false; return
}
} }
if (flag) { postdata.preheatEndTime = preheatEndTime
}
let { goodsId, type, preheatEndTime } = this.formData; console.log(this.formData.autoOff)
preheatEndTime = new Date(preheatEndTime).getTime(); if (this.formData.autoOff) {
this.api({ let autoOff = new Date(this.formData.autoOff).getTime();
apiName: "onOffSeries", if (autoOff <= date) {
postdata: { goodsId, type,preheatEndTime }, this.$Notice.error({ title: `预热时间不能小于当前时间!` });
success: () => { this.showModal()
this.requestData(); return
this.$Notice.success({ title: `操作成功!` });
},
});
} else {
setTimeout(() => {
this.detailModal = true;
}, 200);
return;
} }
} else { postdata.autoOff = autoOff
let { goodsId, type } = this.formData;
this.api({
apiName: "onOffSeries",
postdata: { goodsId, type },
success: () => {
this.requestData();
this.$Notice.success({ title: `操作成功!` });
},
});
} }
this.api({
apiName: "onOffSeries",
postdata:postdata,
success: () => {
this.requestData();
this.$Notice.success({ title: `操作成功!` });
},
});
},
<<<<<<< HEAD
=======
showModal(){
setTimeout(() => {
this.detailModal = true;
}, 200);
}, },
>>>>>>> master
handleCancel(row) { handleCancel(row) {
return () => { return () => {
let goodsId = row.goodsId; let goodsId = row.goodsId;
...@@ -879,15 +993,18 @@ export default { ...@@ -879,15 +993,18 @@ export default {
}); });
}; };
}, },
changeFormDataDate(val) { changeFormDataDate(e,val) {
console.log(val); this.formData[val] = e;
this.formData.preheatEndTime = val; },
console.log(this.formData); handleRecommend(row) {
// this.formData.date = val; // return () => {}
}, },
<<<<<<< HEAD
handleRecommend(row) { handleRecommend(row) {
// return () => {} // return () => {}
}, },
=======
>>>>>>> master
}, },
created() { created() {
console.log(this.type); console.log(this.type);
......
...@@ -292,8 +292,8 @@ export default { ...@@ -292,8 +292,8 @@ export default {
this.editorUploadPercent = parseFloat(event.percent).toFixed(1) this.editorUploadPercent = parseFloat(event.percent).toFixed(1)
}, },
imgBoforeUpload (file) { imgBoforeUpload (file) {
if (file.size >= 5 * 1024 * 1024) { if (file.size >= 50 * 1024 * 1024) {
this.$Notice.warning({ title: '上传图片不得超过5MB!' }) this.$Notice.warning({ title: '上传图片不得超过50MB!' })
return false return false
} }
this.editorUploadPercent = 0 this.editorUploadPercent = 0
......
<template> <template>
<div> <div>
<div class="home-con" v-if="platform"> <div class="home-con" v-if="platform">
<Row :gutter="12"> <Row :gutter="12">
<ul class="head-info" style="height:200px"> <ul class="head-info" style="height:200px">
<li class="head-item"> <li class="head-item">
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
<ul v-for="(item,i) in saleTop10" :key="i"> <ul v-for="(item,i) in saleTop10" :key="i">
<li class="commodity-info"> <li class="commodity-info">
<span class="title-ranking">{{item.sort}}</span> <span class="title-ranking">{{item.sort}}</span>
<span class="title-commodity">{{item.goodsName}}</span> <span class="title-commodity" :title="item.goodsName">{{item.goodsName}}</span>
<span class="title-sales">{{item.sales}}</span> <span class="title-sales">{{item.sales}}</span>
</li> </li>
</ul> </ul>
...@@ -735,6 +735,9 @@ export default { ...@@ -735,6 +735,9 @@ export default {
width:50%; width:50%;
text-align:center; text-align:center;
display:block; display:block;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
} }
.title-sales{ .title-sales{
width:25%; width:25%;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Card> <Card>
<div class="search-con"> <div class="search-con">
<Input <Input
placeholder="包裹单号" placeholder="快递单号"
class="search-input" class="search-input"
v-model="searchContent.packageNum" v-model="searchContent.packageNum"
style="width: 200px" style="width: 200px"
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
> >
<Option value>全部</Option> <Option value>全部</Option>
<Option <Option
v-for="(item, index) of DeliveryStatus" v-for="(item, index) of PickDeliveryStatus"
:value="item" :value="item"
:key="'state-option-' + index" :key="'state-option-' + index"
>{{ DeliveryStatusObj[item].label }}</Option >{{ PickDeliveryStatusObj[item].label }}</Option
> >
</Select> </Select>
<ButtonGroup class="search-btngroup"> <ButtonGroup class="search-btngroup">
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</template> </template>
<script> <script>
import { DeliveryStatus, DeliveryStatusObj } from '@/enums' import { PickDeliveryStatus, PickDeliveryStatusObj } from '@/enums'
import Tables from '_c/tables' import Tables from '_c/tables'
import { formatTime } from '@/libs/tools' import { formatTime } from '@/libs/tools'
export default { export default {
...@@ -73,8 +73,8 @@ export default { ...@@ -73,8 +73,8 @@ export default {
}, },
data () { data () {
return { return {
DeliveryStatus, PickDeliveryStatus,
DeliveryStatusObj, PickDeliveryStatusObj,
loading: false, loading: false,
searchContent: { searchContent: {
packageNum: '', packageNum: '',
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
}, },
tableData: [], tableData: [],
columns: [ columns: [
{ title: '包裹单号', key: 'expressNo', minWidth: 180, align: 'left' }, { title: '快递单号', key: 'expressNo', minWidth: 180, align: 'left' },
{ title: '用户ID', key: 'uid', minWidth: 180, align: 'left' }, { title: '用户ID', key: 'uid', minWidth: 180, align: 'left' },
{ title: '提货单号', key: 'orderDeliveryId', minWidth: 180, align: 'left' }, { title: '提货单号', key: 'orderDeliveryId', minWidth: 180, align: 'left' },
{ title: '商品编号', key: 'goodsId', minWidth: 180, align: 'left' }, { title: '商品编号', key: 'goodsId', minWidth: 180, align: 'left' },
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
width: 130, width: 130,
align: 'center', align: 'center',
render: (h, params) => { render: (h, params) => {
let obj = DeliveryStatusObj[params.row.deliveryState] || {} let obj = PickDeliveryStatusObj[params.row.deliveryState] || {}
return h('Tag', { props: { color: obj.color } }, obj.label) return h('Tag', { props: { color: obj.color } }, obj.label)
} }
}, },
...@@ -138,6 +138,9 @@ export default { ...@@ -138,6 +138,9 @@ export default {
methods: { methods: {
requestData () { requestData () {
this.loading = true this.loading = true
this.searchContent.packageNum = this.searchContent.packageNum.replace(/\s+/g, '')
this.searchContent.orderDeliveryId = this.searchContent.orderDeliveryId.replace(/\s+/g, '')
this.searchContent.uid = this.searchContent.uid.replace(/\s+/g, '')
this.api({ this.api({
apiName: 'getParcelList', apiName: 'getParcelList',
postdata: this.searchContent, postdata: this.searchContent,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="info-item"> <div class="info-item">
<div class="base-info"> <div class="base-info">
<div class="left-order-no"> <div class="left-order-no">
包裹编号:{{parcelDetailObj.expressNo}} 快递编号:{{parcelDetailObj.expressNo}}
</div> </div>
<div class="left-order-no"> <div class="left-order-no">
提货单号:{{parcelDetailObj.orderDeliveryId}} 提货单号:{{parcelDetailObj.orderDeliveryId}}
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<Input <Input
placeholder="请填写广告banner名称" placeholder="请填写广告banner名称"
v-model="form.bannerName" v-model="form.bannerName"
:disabled="isDetail || isEdit" :readonly="isDetail || isEdit"
:maxlength="30" :maxlength="30"
clearable clearable
style="width: 400px" style="width: 400px"
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
<RadioGroup v-model="form.bannerType"> <RadioGroup v-model="form.bannerType">
<Radio :label="1" :disabled="isDetail" class="ivu-radio">产品</Radio> <Radio :label="1" :disabled="isDetail" class="ivu-radio">产品</Radio>
<Radio :label="2" :disabled="isDetail" class="ivu-radio">活动</Radio> <Radio :label="2" :disabled="isDetail" class="ivu-radio">活动</Radio>
<Radio :label="3" :disabled="isDetail" class="ivu-radio">无链接</Radio>
</RadioGroup> </RadioGroup>
</div> </div>
<div class="item" v-if="form.bannerType == 1"> <div class="item" v-if="form.bannerType == 1">
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
<Input <Input
placeholder="请填写产品编号" placeholder="请填写产品编号"
v-model="form.number" v-model="form.number"
:disabled="isDetail" :readonly="isDetail"
:maxlength="100" :maxlength="100"
clearable clearable
style="width: 400px" style="width: 400px"
...@@ -57,8 +58,8 @@ ...@@ -57,8 +58,8 @@
<Input <Input
placeholder="请填写活动链接" placeholder="请填写活动链接"
v-model="form.url" v-model="form.url"
:disabled="isDetail" :readonly="isDetail"
:maxlength="100" :maxlength="500"
clearable clearable
style="width: 400px" style="width: 400px"
/> />
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
<div class="item"> <div class="item">
<label class="label">显示顺序:</label> <label class="label">显示顺序:</label>
<!-- <InputNumber :min="1" v-model="form.displayOrder"></InputNumber>--> <!-- <InputNumber :min="1" v-model="form.displayOrder"></InputNumber>-->
<Input v-model="form.displayOrder" :disabled="isDetail" type="number" style="width: 400px;"/> <Input v-model="form.displayOrder" :readonly="isDetail" type="number" style="width: 400px;"/>
</div> </div>
<div class="footer-con"> <div class="footer-con">
<Button <Button
...@@ -139,7 +140,7 @@ export default { ...@@ -139,7 +140,7 @@ export default {
apiName: 'bannerDetail', apiName: 'bannerDetail',
postdata: operationBannerId, postdata: operationBannerId,
success: (res) => { success: (res) => {
// console.log(res) console.log(res)
let { bannerName, bannerType, bannerImage, displayOrder, number, url, operationBannerId, updateTime } = res.data let { bannerName, bannerType, bannerImage, displayOrder, number, url, operationBannerId, updateTime } = res.data
this.form.bannerName = bannerName this.form.bannerName = bannerName
this.form.bannerType = bannerType this.form.bannerType = bannerType
...@@ -171,12 +172,12 @@ export default { ...@@ -171,12 +172,12 @@ export default {
bannerType, bannerType,
bannerImage, bannerImage,
displayOrder, displayOrder,
number,
url, url,
updateTime updateTime
} }
form.operationBannerId = operationBannerId form.operationBannerId = operationBannerId
form.bannerImage = bannerImage.join() form.bannerImage = bannerImage.join()
form.number = number.replace(/\s+/g, '')
let errMsg = '' let errMsg = ''
if (!bannerName) { if (!bannerName) {
return { errMsg: '请填写banner名称!' } return { errMsg: '请填写banner名称!' }
...@@ -190,6 +191,9 @@ export default { ...@@ -190,6 +191,9 @@ export default {
if (bannerType && bannerType == 2 && !url) { if (bannerType && bannerType == 2 && !url) {
return { errMsg: '请填写活动链接!' } return { errMsg: '请填写活动链接!' }
} }
if (bannerType && bannerType == 2 && !/(http|https):\/\/([\w.]+\/?)\S*/.test(url)) {
return { errMsg: '链接格式有误(以http或者htpps://开头)!' }
}
if (bannerType && bannerType == 1 && !number) { if (bannerType && bannerType == 1 && !number) {
return { errMsg: '请填写产品编号!' } return { errMsg: '请填写产品编号!' }
} }
...@@ -214,7 +218,6 @@ export default { ...@@ -214,7 +218,6 @@ export default {
} }
if (!errMsg) { if (!errMsg) {
form.bannerType = JSON.parse(form.bannerType) form.bannerType = JSON.parse(form.bannerType)
form.number = form.number.replace(/\s+/g, '')
} }
let apiName = this.isAdd ? 'addBanner' : 'updateBanner' let apiName = this.isAdd ? 'addBanner' : 'updateBanner'
let title = this.isAdd ? '添加成功!' : '编辑成功!' let title = this.isAdd ? '添加成功!' : '编辑成功!'
...@@ -265,7 +268,7 @@ export default { ...@@ -265,7 +268,7 @@ export default {
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
.ivu-radio{ .ivu-radio{
width: 200px; width: 150px;
} }
} }
.item .label { .item .label {
......
...@@ -60,6 +60,18 @@ ...@@ -60,6 +60,18 @@
</Select> </Select>
</div> </div>
<div class="item"> <div class="item">
<label class="label">开始领取时间:</label>
<Row class="time">
<Col>
<DatePicker type="date" :readonly="isDetail" :options="drawStartOption" v-model="form.receiveStartTime" placeholder="请选择开始领取时间"></DatePicker>
</Col>
<span></span>
<Col>
<DatePicker type="date" :readonly="isDetail" :options="drawEndOption" v-model="form.receiveEndTime" placeholder="请选择领取结束时间"></DatePicker>
</Col>
</Row>
</div>
<div class="item">
<label class="label">有效时间:</label> <label class="label">有效时间:</label>
<Row class="time"> <Row class="time">
<Col> <Col>
...@@ -192,6 +204,7 @@ export default { ...@@ -192,6 +204,7 @@ export default {
} }
}, },
data () { data () {
let dateNow = new Date().setHours(0, 0, 0, 0);
return { return {
routeName: '', routeName: '',
loading: false, loading: false,
...@@ -216,7 +229,9 @@ export default { ...@@ -216,7 +229,9 @@ export default {
couponSkuList: [], // 指定商品 couponSkuList: [], // 指定商品
exchangePrice: '', // 优惠券兑换价格(仅旅游消费) exchangePrice: '', // 优惠券兑换价格(仅旅游消费)
updateTime: '', // 更新时间 updateTime: '', // 更新时间
couponId: '' couponId: '',
receiveEndTime: '', // 领取结束时间
receiveStartTime: ''// 领取开始时间
}, },
condition: '', // 使用条件 condition: '', // 使用条件
typeList: [ typeList: [
...@@ -276,13 +291,13 @@ export default { ...@@ -276,13 +291,13 @@ export default {
drawStartOption: { drawStartOption: {
// 指定开始限制时间 // 指定开始限制时间
disabledDate: (date) => { disabledDate: (date) => {
return date && date.valueOf() < Date.now() return date && date.valueOf() < dateNow
} }
}, },
drawEndOption: { drawEndOption: {
// 指定终止日期 // 指定终止日期
disabledDate: (date) => { disabledDate: (date) => {
return date && date.valueOf() < Date.now() return date && date.valueOf() < dateNow
} }
} }
} }
...@@ -301,7 +316,7 @@ export default { ...@@ -301,7 +316,7 @@ export default {
success: (res) => { success: (res) => {
// debugger // debugger
// console.log(res) // console.log(res)
let { name, type, couponVal, conditionVal, scope, startTime, endTime, circulation, remark, rangeType, categoryList, couponSkuList, updateTime, couponId } = res.data let { name, type, couponVal, conditionVal, receiveEndTime, receiveStartTime, scope, startTime, endTime, circulation, remark, rangeType, categoryList, couponSkuList, updateTime, couponId } = res.data
this.form.name = name this.form.name = name
this.form.type = JSON.stringify(type) this.form.type = JSON.stringify(type)
this.form.couponVal = couponVal this.form.couponVal = couponVal
...@@ -309,6 +324,8 @@ export default { ...@@ -309,6 +324,8 @@ export default {
this.form.scope = JSON.stringify(scope) this.form.scope = JSON.stringify(scope)
this.form.startTime = formatTime(startTime) this.form.startTime = formatTime(startTime)
this.form.endTime = formatTime(endTime) this.form.endTime = formatTime(endTime)
this.form.receiveEndTime = formatTime(receiveEndTime)
this.form.receiveStartTime = formatTime(receiveStartTime)
this.form.circulation = circulation this.form.circulation = circulation
this.form.remark = remark this.form.remark = remark
this.form.rangeType = rangeType this.form.rangeType = rangeType
...@@ -340,7 +357,7 @@ export default { ...@@ -340,7 +357,7 @@ export default {
}, },
initData () { initData () {
let routeName = this.$route.name let routeName = this.$route.name
console.log(routeName) // console.log(routeName)
let couponId = this.$route.query.couponId let couponId = this.$route.query.couponId
this.routeName = routeName this.routeName = routeName
if (routeName == 'update_coupon' || routeName == 'coupon_detail') { if (routeName == 'update_coupon' || routeName == 'coupon_detail') {
...@@ -375,7 +392,7 @@ export default { ...@@ -375,7 +392,7 @@ export default {
getGoods () { getGoods () {
let { goods } = this let { goods } = this
this.api({ this.api({
apiName: 'queryByNameOrId', apiName: 'listByNameOrId',
postdata: { goods }, postdata: { goods },
complete: () => { complete: () => {
this.loading = false this.loading = false
...@@ -405,6 +422,8 @@ export default { ...@@ -405,6 +422,8 @@ export default {
scope: this.form.scope, scope: this.form.scope,
startTime: new Date(this.form.startTime).getTime(), startTime: new Date(this.form.startTime).getTime(),
endTime: new Date(this.form.endTime).getTime() + 86399000, endTime: new Date(this.form.endTime).getTime() + 86399000,
receiveStartTime: new Date(this.form.receiveStartTime).getTime(),
receiveEndTime: new Date(this.form.receiveEndTime).getTime() + 86399000,
circulation: this.form.circulation, circulation: this.form.circulation,
remark: this.form.remark, remark: this.form.remark,
rangeType: this.form.rangeType, rangeType: this.form.rangeType,
...@@ -463,6 +482,16 @@ export default { ...@@ -463,6 +482,16 @@ export default {
this.form.startTime = '' this.form.startTime = ''
this.form.endTime = '' this.form.endTime = ''
return false return false
} else if (couponSaveDTO.receiveStartTime > couponSaveDTO.startTime) {
this.$Notice.warning({ title: '有效开始时间不能大于领取开始时间' })
this.form.startTime = ''
this.form.endTime = ''
return false
} else if (couponSaveDTO.receiveEndTime > couponSaveDTO.endTime) {
this.$Notice.warning({ title: '领取结束时间不能大于有效结束时间' })
this.form.startTime = ''
this.form.endTime = ''
return false
} else if (couponSaveDTO.categoryList.length == 0 && couponSaveDTO.rangeType == 2) { } else if (couponSaveDTO.categoryList.length == 0 && couponSaveDTO.rangeType == 2) {
this.$Notice.warning({ title: '请选择指定类目' }) this.$Notice.warning({ title: '请选择指定类目' })
return false return false
......
<template>
<div class="collect-add-event-con">
<Card v-if="loading" class="loading-card">
<Spin fix size="large" />
</Card>
<Card v-else class="main_card">
<div class="main_info">
<div class="head">
<Icon type="md-bookmark" color="#2d8cf0" :size="28" />
<label>{{ title }}</label>
</div>
<Form ref="addForm" :model="form" :rules="formRules" :label-width="120">
<Form-item label="活动名称:" prop="name">
<Input v-model="form.name" :readonly="aerialDeliveryId?true:false" placeholder="请输入活动名称" />
</Form-item>
<Form-item label="商品编号:" prop="goodsId">
<Input
v-model="form.goodsId"
placeholder="请输入商品编号"
:readonly="aerialDeliveryId?true:false"
@on-change="handleGoodsIdChange"
/>
</Form-item>
<Form-item label="规格:" prop="skuId" v-if="form.salesType!==4">
<Select placeholder="请选择商品规格" v-model="form.skuId">
<Option
v-for="item in skuList"
:value="item.skuId"
:readonly="aerialDeliveryId?true:false"
:key="item.skuId"
>
{{ item.label }}
</Option>
</Select>
</Form-item>
<Form-item label="数量:" prop="number">
<Input
v-model.number="form.number"
:readonly="aerialDeliveryId?true:false"
type="number"
placeholder="请输入数量"
/>
</Form-item>
<!-- <Form-item label="备注:" prop="comm">
<Input v-model="form.comm" placeholder="请输入备注信息" />
</Form-item> -->
<Form-item label="数据:" prop="excelUrl">
<div class="form-upload-data">
<Upload
ref="uploadFile"
:action="uploadImgUrl"
:headers="{
token: $store.state.admin.token,
adminId: $store.state.admin.uid,
}"
accept=".xlsx"
:on-success="handleSuccess"
:on-error="handleErr"
:on-progress="handleOnProgress"
:before-upload="beforeUpload"
>
<Input
:value="form.excelUrl"
readonly
placeholder="请选择数据文件"
>
<span slot="append">上 传</span>
</Input>
</Upload>
<Button type="text" class="down-excle" @click="downloadTemplate"
>下载模板</Button
>
</div>
</Form-item>
</Form>
<div class="footer-con">
<Button type="default" @click="handleCancel"> 取消 </Button>
<Button type="primary" @click="handleSubmit" :loading="submitLoading">
确定
</Button>
</div>
</div>
</Card>
</div>
</template>
<script>
import { mapMutations } from "vuex";
import { apiVerify } from "@/api/apiVerify";
import { uploadImgUrl } from "@/api/apiConfig";
import { formatTime } from "@/libs/tools";
export default {
name: "airdrop_add_airdrop",
computed: {
title() {
return this.aerialDeliveryId ? "补发空投活动" : "新增空投活动";
},
},
data() {
return {
uploadImgUrl,
aerialDeliveryId: "",
loading: false,
submitLoading: false,
form: {
name: "",
excelUrl: "",
goodsId: "",
merchantId: "",
number: null,
skuId: "",
},
formRules: {
name: [
{ required: true, message: "活动名称不能为空!", trigger: "blur" },
],
skuId: [
{ required: true, message: "规格不能为空!", trigger: "change" },
],
excelUrl: [
{ required: true, message: "数据文件不能为空!", trigger: "change" },
],
goodsId: [
{ required: true, message: "商品编号不能为空!", trigger: "change" },
],
number: [
{
type: "number",
required: true,
message: "数量不能为空!",
trigger: "blur",
},
],
},
SKU_MAX_NUM: 20,
skuList: [],
dateOptions: {
disabledDate: (date) => {
return date && date.valueOf() < Date.now();
},
},
};
},
mounted() {
this.requestDetail();
},
methods: {
...mapMutations(["closeTag"]),
handleGoodsIdChange() {
if (this.form.goodsId && this.form.goodsId.length > 30) {
this._getGoodsSkuInfo();
}
},
_getGoodsSkuInfo(type,skuId) {
this.api({
apiName: "getGoodDetail",
postdata: {
id: this.form.goodsId.trim(),
},
success: (res) => {
let list = [];
let arr=res.data.skus || []
arr.forEach((item)=>{
let propertyList=item.propertyList || []
list.push({
skuId:item.skuId,
label: propertyList.map((p) => `${p.propKey}: ${p.propVal}`)
.join("-"),
});
})
this.form.salesType=res.data.salesType
this.skuList = list;
if(type==='reissue'){
this.form.skuId = skuId;
}else{
this.form.skuId = "";
}
if(res.data.salesType===4){
this.form.skuId=""
this.form.number=1
}
},
});
},
downloadTemplate() {
this.api({
apiName: "AerialDeliveryExcel",
success: (res) => {
window.open(res.data, "_blank");
},
});
},
requestDetail() {
this.aerialDeliveryId = this.$route.query.aerialDeliveryId;
this.form.aerialDeliveryId = this.aerialDeliveryId;
this.form.id = this.$route.query.id;
if (this.aerialDeliveryId) {
this.loading = true;
this.api({
apiName: "getAerialDeliveryId",
postdata: {
aerialDeliveryId: this.aerialDeliveryId,
},
complete: () => {
this.loading = false;
},
success: (res) => {
if (res.data) {
this.form.name=res.data.name
this.form.number=res.data.circulation
this.form.goodsId=res.data.goodsId
this.form.excelUrl=res.data.excelUrl
this._getGoodsSkuInfo("reissue",res.data.skuId)
}
},
});
}
},
handleSubmit() {
let title = "添加成功~";
let apiName = "AerialDeliverySave";
if (this.aerialDeliveryId) {
title = "补发成功~";
apiName = "AerialDeliveryReissue";
}
this.$refs.addForm.validate((valid) => {
if (valid) {
this.submitLoading = true;
this.genSubmitForm();
this.api({
apiName,
postdata: this.form,
success: () => {
this.handleCancel();
this.$Notice.success({ title });
},
complete: () => {
this.submitLoading = false;
},
});
}
});
},
genSubmitForm() {
this.form.name = this.form.name.trim();
this.form.goodsId = this.form.goodsId.trim();
},
handleCancel() {
let route = this.$route;
let toRouteName = "airdrop_activity";
this.closeTag({ route, toRouteName });
},
beforeUpload(file) {
if(this.aerialDeliveryId){
return false
}
this.$refs.uploadFile.clearFiles()
},
handleOnProgress(event, file) {
console.log(event,file)
},
handleErr() {
this.$Notice.error({ title: "上传失败,请稍后再试!" });
},
handleSuccess(res, file) {
if (res.code === "00000") {
this.form.excelUrl = res.data;
} else {
this.$Notice.error({ title: res.msg });
}
},
},
};
</script>
<style scoped lang="less">
.collect-add-event-con {
height: 100%;
min-width: 1000px;
// position: relative;
.loading-card {
height: 100%;
}
.main_card {
overflow: hidden;
.main_info {
float: left;
width: 68%;
.head {
color: #17233d;
font-size: 18px;
font-weight: bold;
display: flex;
align-items: center;
margin-bottom: 15px;
i {
margin-right: 10px;
}
}
.time {
display: flex;
justify-content: space-between;
align-items: center;
}
.footer-con {
display: flex;
padding: 20px;
justify-content: center;
> button:first-of-type {
margin-right: 20px;
}
}
}
.form-upload-data {
display: flex;
margin-bottom: 5px;
> .ivu-form-item {
flex: 1;
margin-right: 5px;
margin-bottom: 15px;
}
> button {
height: 33px;
}
}
}
}
</style>
<template>
<div class="purchase-gift-event-list-con">
<Card>
<div class="search-con">
<Input
placeholder="活动编号"
class="search-input"
v-model="searchContent.aerialDeliveryId"
style="width: 200px"
clearable
/>
<Input
placeholder="活动名称"
class="search-input"
v-model="searchContent.name"
style="width: 200px"
clearable
/>
<Select
placeholder="活动状态"
class="search-input"
v-model="searchContent.status"
style="width: 200px"
>
<!-- <Option value="">全部</Option> -->
<Option
v-for="(item, index) in EventState"
:value="item"
:key="'state-option-' + index"
>
{{ EventStateObj[item].label }}
</Option>
</Select>
<ButtonGroup class="search-btngroup">
<Button @click="handleSearch" type="primary">搜索</Button>
<Button type="primary" @click="handleRefresh">
<Icon type="md-refresh" />
</Button>
</ButtonGroup>
<Button @click="handleAdd" type="info">+ 新增</Button>
</div>
<tables
ref="tables"
class="order-table-con"
pagable
v-model="tableData"
:columns="columns"
:currentPage="searchContent.pageNum"
:pageSize="searchContent.pageSize"
:totalSize="totalSize"
:loading="loading"
@on-change="handleCurrentChange"
/>
</Card>
</div>
</template>
<script>
import Tables from "_c/tables";
import { formatTime } from "@/libs/tools";
export default {
inject: ["reload"],
components: {
Tables,
},
computed: {
isBrand() {
return this.$store.getters.isBrand;
},
},
data() {
const EventState = {
SUCCESS: 1,
PROCESSING: 2,
FAIL: 3,
PARTIALSUCCESS: 4,
};
const EventStateObj = {
[EventState.SUCCESS]: {
label: "成功" ,
color: "default",
btn: ["recordBtn"]
},
[EventState.PROCESSING]: {
label: "处理中",
color: "default",
btn: ["recordBtn"],
},
[EventState.FAIL]: {
label: "失败",
color: "primary",
btn: ["recordBtn", "reissueBtn"],
},
[EventState.PARTIALSUCCESS]: {
label: "部分成功",
color: "success",
btn: ["recordBtn", "reissueBtn"],
},
};
return {
EventState,
EventStateObj,
searchContent: {
aerialDeliveryId: "",
name: "",
status: EventState.ALL,
pageNum: 1,
pageSize: 10,
},
columns: [
{ title: "编号", key: "aerialDeliveryId", minWidth: 180 },
{ title: "名称", key: "name", minWidth: 180 },
{ title: "商品", key: "goodsId", minWidth: 180 },
{ title: "数量", key: "number", minWidth: 100 },
{
title: "导入文件",
minWidth: 200,
render: (h, params) => {
return h(
"Button",
{
props: {
type: "text",
size: "small",
},
style: {
"margin-right": "5px",
},
on: {
click: this.downLoadExcel(params),
},
},
"<excel>文件,点击下载"
);
}
},
{ title: "总数", key: "circulation", minWidth: 100 },
{ title: "成功数量", key: "succeedTotal", minWidth: 100 },
{
title: "状态",
key: "status",
width: 100,
render: (h, params) => {
let obj = EventStateObj[params.row.status];
return h(
"Tag",
{
props: {
color: obj.color,
},
},
obj.label
);
},
},
{
title: "备注",
key: "remark",
minWidth: 150,
render: (h, { row }) => {
return h("span", row.remark ? row.remark : "--");
},
},
{
title: "开始时间",
width: 180,
render: (h, params) => {
return h("span", formatTime(params.row.createTime, "yyyy-MM-dd hh:mm:ss"));
},
},
{
title: "操作",
width: 180,
fixed: "right",
render: (h, params) => {
let recordBtn = h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
"margin-right": "5px",
},
on: {
click: this.handleDetail(params),
},
},
"记 录"
);
let reissueBtn = h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
"margin-right": "5px",
},
on: {
click: this.handleReissue(params),
},
},
"补 发"
);
let btnMap = {
recordBtn: recordBtn,
reissueBtn: reissueBtn,
};
let arr = [];
EventStateObj[params.row.status].btn.forEach((item) => {
arr.push(btnMap[item]);
});
return arr.length == 0 ? h("span", "--") : h("div", arr);
}
},
],
tableData: [],
totalSize: 0,
loading: true,
};
},
methods: {
requestData() {
this.loading = true;
this.searchContent.aerialDeliveryId = this.searchContent.aerialDeliveryId.trim();
this.searchContent.name = this.searchContent.name.trim();
this.api({
apiName: "getAerialDeliveryList",
postdata: this.searchContent,
complete: () => {
this.loading = false;
},
success: (res) => {
this.tableData = res.data.records;
this.totalSize = res.data.total;
},
});
},
handleSearch() {
this.searchContent.pageNum = 1;
this.requestData();
},
handleRefresh() {
this.reload();
},
handleCurrentChange(pageNum) {
this.searchContent.pageNum = pageNum;
this.requestData();
},
handleAdd() {
this.$router.push({ name: "airdrop_add_airdrop" });
},
handleReissue({ row, index }) {
return () => {
let query = { aerialDeliveryId: row.aerialDeliveryId, id: row.id };
this.$router.push({ name: "airdrop_add_airdrop", query });
// this.api({
// apiName:'AerialDeliveryReissue',
// postdata: this.form,
// success: () => {
// this.handleCancel();
// this.$Notice.success({ '补发成功~' });
// },
// complete: () => {
// this.submitLoading = false;
// },
// });
};
},
handleDetail({ row, index }) {
return () => {
let query = { aerialDeliveryId: row.aerialDeliveryId };
this.$router.push({ name: "airdrop_activity_record_list", query });
};
},
downLoadExcel({row}){
return ()=>{
window.open(row.excelUrl,'_blank')
}
},
},
created() {
this.requestData();
},
};
</script>
<style lang="less">
.purchase-gift-event-list-con .search-con {
padding: 10px 0;
.search {
&-col {
display: inline-block;
width: 150px;
margin-right: 5px;
}
&-input {
display: inline-block;
width: 150px;
margin-right: 5px;
}
&-date {
margin-right: 5px;
}
&-btngroup {
margin-right: 5px;
}
}
}
.purchase-gift-event-list-con .order-table-con {
.ivu-table-expanded-cell {
padding: 0 40px 10px 40px;
}
}
.vertical-center-modal {
display: flex;
align-items: center;
justify-content: center;
.ivu-modal {
top: 0;
}
}
</style>
<template>
<div class="collect-record-list-con">
<Card>
<div class="search-con">
<Input
placeholder="请输入用户手机号"
class="search-input"
v-model="searchContent.phone"
style="width: 200px"
clearable
/>
<Select
placeholder="活动状态"
class="search-input"
v-model="searchContent.status"
style="width: 200px"
>
<Option value="">全部</Option>
<Option
v-for="(item, index) in RecordState"
:value="item"
:key="'state-option-' + index"
>
{{ RecordStateObj[item].label }}
</Option>
</Select>
<ButtonGroup class="search-btngroup">
<Button @click="handleSearch" type="primary">搜索</Button>
<Button type="primary" @click="handleRefresh">
<Icon type="md-refresh" />
</Button>
</ButtonGroup>
</div>
<div class="total-con">总计:{{ totalSize }} 条记录</div>
<tables
ref="tables"
pagable
v-model="tableData"
:columns="columns"
:currentPage="searchContent.pageNum"
:pageSize="searchContent.pageSize"
:totalSize="totalSize"
:loading="loading"
@on-change="handleCurrentChange"
/>
</Card>
</div>
</template>
<script>
import Tables from '_c/tables'
import { formatTime } from '@/libs/tools'
export default {
inject: ['reload'],
components: {
Tables
},
data () {
const RecordState = {
SUCCESS: 1,
WAIT: 2,
FAIL: 3
}
const RecordStateObj = {
[RecordState.SUCCESS]: {
label: '成功',
color: 'success'
},
[RecordState.WAIT]: {
label: '处理中',
color: 'default'
},
[RecordState.FAIL]: {
label: '失败',
color: 'warning'
}
}
return {
RecordState,
RecordStateObj,
searchContent: {
aerialDeliveryId: '',
phone: '',
status:'',
pageNum: 1,
pageSize: 10
},
columns: [
{ title: '编号', key: 'aerialDeliveryRecordId', minWidth: 180 },
{ title: '手机号', key: 'phone', minWidth: 180 },
{ title: '应发数量', key: 'number', minWidth: 180 },
{ title: '实发数量', key: 'succeedNumber', minWidth: 180 },
// { title: '订单编号', key: 'oid', minWidth: 180 },
// { title: '通证编号', key: 'tokenId', minWidth: 180 },
{
title: '状态',
key: 'status',
width: 120,
render: (h, params) => {
let obj = RecordStateObj[params.row.status]
return h(
'Tag',
{
props: {
color: obj.color
}
},
obj.label
)
}
},
{
title: "备注",
key: "remark",
minWidth: 150,
render: (h, { row }) => {
return h("span", row.remark ? row.remark : "--");
},
},
{
title: '开始时间',
minWidth: 180,
render: (h, params) => {
return h('span', formatTime(params.row.createTime))
}
}
],
tableData: [],
totalSize: 0,
loading: true
}
},
methods: {
requestData () {
this.loading = true
this.searchContent.phone = this.searchContent.phone.trim()
this.api({
apiName: 'getAerialDeliveryRecordList',
postdata: this.searchContent,
complete: () => {
this.loading = false
},
success: (res) => {
console.log(res)
this.tableData = res.data.records
this.totalSize = res.data.total
}
})
},
handleSearch () {
this.searchContent.pageNum = 1
this.requestData()
},
handleRefresh () {
this.reload()
},
handleCurrentChange (pageNum) {
this.searchContent.pageNum = pageNum
this.requestData()
}
},
created () {
this.searchContent.aerialDeliveryId = this.$route.query.aerialDeliveryId
this.requestData()
}
}
</script>
<style lang="less">
.collect-record-list-con {
.search-con {
padding: 10px 0;
.search {
&-col {
display: inline-block;
width: 150px;
margin-right: 5px;
}
&-input {
display: inline-block;
width: 150px;
margin-right: 5px;
}
&-date {
margin-right: 5px;
}
&-btngroup {
margin-right: 5px;
}
}
}
.total-con {
margin-bottom: 10px;
}
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment