Commit b5daf7ed by 前端

Merge branch 'SAAS+V4.56.0-0908' into 'master'

上线合并

See merge request !29
2 parents a4411d2b 534e6e0f
...@@ -1891,51 +1891,6 @@ ...@@ -1891,51 +1891,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz",
...@@ -1944,28 +1899,6 @@ ...@@ -1944,28 +1899,6 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader-v16@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -13431,6 +13364,75 @@ ...@@ -13431,6 +13364,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
......
...@@ -68,4 +68,15 @@ const uploadFileApi = (params, callback) => { ...@@ -68,4 +68,15 @@ const uploadFileApi = (params, callback) => {
}) })
} }
export default { getGoodsList, uploadImg, getMerchantList, getZoneList, pictureUpload, uploadFileApi } const uploadImgApi = params => {
params.method = 'scrm.api.carlife.common.uploadImg'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default { getGoodsList, uploadImg, getMerchantList, getZoneList, pictureUpload, uploadFileApi, uploadImgApi }
import { http } from '@/main'
const url = 'rop-scrm-shopmall/router'
// 查询配置
const getMallmini = params => {
params.method = 'scrm.api.shopmall.scrm.mallmini.findByType'
return http({
url,
data: params,
sign: true
})
}
/** 新增或者修改积分商城首页配置 */
const insertOrUpdateMallmini = params => {
params.method = 'scrm.api.shopmall.scrm.mallmini.insertorupdate'
return http({
url,
method: 'POST',
data: params,
returnAll: true
})
}
export default {
getMallmini,
insertOrUpdateMallmini
}
...@@ -85,6 +85,25 @@ const modifyPriceApi = params => { ...@@ -85,6 +85,25 @@ const modifyPriceApi = params => {
sign: true sign: true
}) })
} }
// 平台商品置顶
const goodsUpdatePoinnt = params => {
params.method = 'scrm.api.shopmall.scrm.glgoods.updatePoinnted'
return http({
url,
data: params,
sign: true,
returnAll: true
})
}
// 门店列表
const getCurMerList = params => {
params.method = `scrm.api.shopmall.points.order.merchant.list`
return http({
url,
data: params,
sign: true
})
}
// 订单列表 // 订单列表
const getOrderList = params => { const getOrderList = params => {
...@@ -104,6 +123,15 @@ const getOrderDetail = params => { ...@@ -104,6 +123,15 @@ const getOrderDetail = params => {
sign: true sign: true
}) })
} }
// 子订单商品发货(自营商品)
const subOrderExpress = params => {
params.method = 'scrm.api.shopmall.points.sub.order.express'
return http({
url,
data: params,
returnAll: true
})
}
// 售后列表 // 售后列表
const getSaleOrderList = params => { const getSaleOrderList = params => {
...@@ -114,6 +142,32 @@ const getSaleOrderList = params => { ...@@ -114,6 +142,32 @@ const getSaleOrderList = params => {
sign: true sign: true
}) })
} }
// 自营售后订单详情
const getAfterSalesDetail = params => {
params.method = 'scrm.api.shopmall.points.afterSales.detail'
return http({
url,
data: params,
returnAll: true
})
}
// 售后订单详情【云中鹤】
const getYZHAfterSalesDetail = params => {
params.method = 'scrm.api.shopmall.platform.after.sales.order.detail'
return http({
url,
data: params
})
}
// 自营订单退款审核
const checkSubOrder = params => {
params.method = 'scrm.api.shopmall.points.afterSales.sub.order.check'
return http({
url,
data: params,
returnAll: true
})
}
// 订单详情 // 订单详情
const getSaleOrderDetail = params => { const getSaleOrderDetail = params => {
...@@ -162,6 +216,102 @@ const exportOilCouponOrderList = params => { ...@@ -162,6 +216,102 @@ const exportOilCouponOrderList = params => {
data: params data: params
}) })
} }
/** 查询所有分类分页列表 */
const getFrontendcategoryList = params => {
params.method = 'scrm.api.shopmall.scrm.frontendcategory.listWithPage'
return http({
url,
data: params
})
}
/** 查询所有分类分页 */
const getFrontendcategoryOpt = params => {
params.method = 'scrm.api.shopmall.scrm.frontendcategory.listAll'
return http({
url,
data: params
})
}
/** 保存或修改分类 */
const editFrontendCategory = params => {
params.method = 'scrm.api.shopmall.scrm.frontendcategory.saveOrUpdate'
return http({
url,
method: 'POST',
data: params,
returnAll: true
})
}
/** 删除分类 */
const deleteFrontendCategory = params => {
params.method = 'scrm.api.shopmall.scrm.frontendcategory.deleteCategory'
return http({
url,
data: params,
returnAll: true
})
}
/** 置顶分类 */
const upFrontendCategory = params => {
params.method = 'scrm.api.shopmall.scrm.frontendcategory.upCategory'
return http({
url,
data: params,
returnAll: true
})
}
/** 新增商品 */
const insertOrUpdateProApi = params => {
params.method = 'scrm.api.shopmall.scrm.glgoods.addOrUpdatePlatformGLGoods'
return http({
url,
method: 'POST',
data: params,
returnAll: true
})
}
/** 修改商品的前端分类 */
const goodsUpdateFrocategory = params => {
params.method = 'scrm.api.shopmall.scrm.glgoods.updatefrocategory'
return http({
url,
method: 'POST',
data: params,
returnAll: true
})
}
/** 获取浏览明细 */
const getBrowseRecordList = params => {
params.method = 'scrm.api.shopmall.scrm.customer.dynamic.record.getbrowseRecordResponses'
return http({
url,
data: params
})
}
/** 导出浏览明细 */
const exportBrowseRecordList = params => {
params.method = 'scrm.api.shopmall.scrm.customer.dynamic.record.getbrowseRecordResponsesexport'
return http({
url,
data: params
})
}
/** 获取访客数据 */
const getUseRecordList = params => {
params.method = 'scrm.api.shopmall.scrm.customer.dynamic.record.getUseRecordResponses'
return http({
url,
data: params
})
}
/** 导出访客数据 */
const exportUseRecordList = params => {
params.method = 'scrm.api.shopmall.scrm.customer.dynamic.record.getUseRecordResponsesexport'
return http({
url,
data: params
})
}
export default { export default {
getCategoryListApi, getCategoryListApi,
getGoodsListApi, getGoodsListApi,
...@@ -172,12 +322,29 @@ export default { ...@@ -172,12 +322,29 @@ export default {
batchOffApi, batchOffApi,
goodsDetailApi, goodsDetailApi,
modifyPriceApi, modifyPriceApi,
goodsUpdatePoinnt,
getCurMerList,
getOrderList, getOrderList,
getOrderDetail, getOrderDetail,
subOrderExpress,
getSaleOrderList, getSaleOrderList,
getAfterSalesDetail,
getYZHAfterSalesDetail,
checkSubOrder,
getSaleOrderDetail, getSaleOrderDetail,
getOilCouponList, getOilCouponList,
updateOilCoupon, updateOilCoupon,
getOilCouponOrderList, getOilCouponOrderList,
exportOilCouponOrderList exportOilCouponOrderList,
getFrontendcategoryList,
getFrontendcategoryOpt,
editFrontendCategory,
deleteFrontendCategory,
upFrontendCategory,
insertOrUpdateProApi,
goodsUpdateFrocategory,
getBrowseRecordList,
exportBrowseRecordList,
getUseRecordList,
exportUseRecordList
} }
...@@ -56,7 +56,36 @@ function uploadImg (e, _this, maxSize = 2) { ...@@ -56,7 +56,36 @@ function uploadImg (e, _this, maxSize = 2) {
} }
}) })
} }
export { // 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
exportFn, function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
uploadImg /* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/,
zNumReg: /^\d*$/
}
/* eslint-enable */
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
}
if (newValue && reg[regRule].test(newValue + '')) {
if (/\./.test(newValue)) {
newValue = newValue + ''
var interger = newValue.split('.')[0]
var point = newValue.split('.')[1]
var intergerNum = interger.length > intergerDigit ? oldValue.split('.')[0] : interger
var pointNum = point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit ? intergerNum + '.' + pointNum : newValue.split('.')[0]
} else {
newValue = newValue.length > intergerDigit ? oldValue.slice(0, intergerDigit) : newValue
if (regRule == 'zNumReg') {
newValue = newValue.split('')[0] == '0' ? '0' : newValue
}
}
return newValue
} else {
return newValue ? oldValue : ''
}
} }
export { exportFn, uploadImg, limitPrice }
\ No newline at end of file \ No newline at end of file
const categoryList = [
{
id: '1',
label: '云中鹤'
},
{
id: '2',
label: '广联自营'
}
]
export { categoryList }
...@@ -73,12 +73,12 @@ ...@@ -73,12 +73,12 @@
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length : formObj[item.name]"> <div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length : formObj[item.name]">
<span v-if="Array.isArray(formObj[item.name])"> <span v-if="Array.isArray(formObj[item.name])">
<span v-for="(subItem, subIndex) in formObj[item.name]" :key="subIndex" class="muti-imgs img-w-h"> <span v-for="(subItem, subIndex) in formObj[item.name]" :key="subIndex" class="muti-imgs img-w-h">
<video v-if="item.uploadType == 'video'" class="img-w-h activity-img" :src="typeof subItem == 'object' ? subItem.content : subItem"></video> <video v-if="item.uploadType == 'video'" class="img-w-h activity-img" :src="typeof subItem == 'object' ? subItem[item.subName || 'content'] : subItem"></video>
<img v-else class="img-w-h" :src="typeof subItem == 'object' ? subItem.content : subItem" /> <img v-else class="img-w-h" :src="typeof subItem == 'object' ? subItem[item.subName || 'content'] : subItem" />
<span class="img-btns"> <span class="img-btns">
<span class="btn-item"> <span class="btn-item">
<i v-show="!item.isDisabled" class="el-icon-delete" @click="handleImgDelete(item, subIndex)"></i> <i v-show="!item.isDisabled" class="el-icon-delete" @click="handleImgDelete(item, subIndex)"></i>
<i class="el-icon-zoom-in" @click="handleImgLook(typeof subItem == 'object' ? subItem.content : subItem, item)"></i> <i class="el-icon-zoom-in" @click="handleImgLook(typeof subItem == 'object' ? subItem[item.subName || 'content'] : subItem, item)"></i>
</span> </span>
</span> </span>
</span> </span>
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
}, },
props: { props: {
formDisable:{ formDisable: {
type: Boolean, type: Boolean,
default: false default: false
}, },
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
}, },
formObj: { formObj: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
hasTitle: { hasTitle: {
type: Boolean, type: Boolean,
...@@ -180,16 +180,16 @@ export default { ...@@ -180,16 +180,16 @@ export default {
}, },
formRules: { formRules: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
// 搜索+输入框/搜索组合组件,搜索栏绑值 // 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: { searchSelectObj: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
// 选择框-添加其他属性 // 选择框-添加其他属性
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
width: 65%; width: 65%;
} */ } */
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content { .glsx-combi-form .no-label.el-form-item--small .el-form-item__content {
width: 100%; width: 100% !important;
} }
.glsx-combi-form .el-form-item--small.el-form-item { .glsx-combi-form .el-form-item--small.el-form-item {
...@@ -371,6 +371,7 @@ export default { ...@@ -371,6 +371,7 @@ export default {
background-color: #f7f7f7; background-color: #f7f7f7;
border: 1px dotted #d9d9d9; border: 1px dotted #d9d9d9;
cursor: pointer; cursor: pointer;
border-radius: 4px;
} }
.glsx-combi-form .activity-Input { .glsx-combi-form .activity-Input {
......
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<template> <template>
<glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose"> <glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="1380px" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose">
<div class="flex"> <GLCombiForm ref="goodsRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="goodsFormObj" :formData="goodsFormData"></GLCombiForm>
<el-form :inline="true" :model="searchForm"> <GLTable class="pointTable" @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" @sortChange="sortChange" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<el-form-item label="商品名称:"> <div class="setPriceSlot" slot="setPriceSlot" slot-scope="scope">
<el-input :size="size" v-model="searchForm.name" placeholder="请输入商品名称" clearable></el-input> <span class="unedited">{{ scope.scope.redeemPoints }}积分 + {{ scope.scope.salePrice }}元</span>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="getList(true)">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
</div> </div>
<GLTable ref="mutiProRef" :tableData="productList" :searchForm="searchForm" :tableParams="tableParams" @refreshTable="getList">
<span slot="coverImgUrl" slot-scope="scope">
<img class="m-t-10 img-60" :src="scope.scope.coverImgUrl" />
</span>
</GLTable> </GLTable>
</glsx-dialog> </glsx-dialog>
</template> </template>
...@@ -31,7 +21,32 @@ export default { ...@@ -31,7 +21,32 @@ export default {
// 表格组件 // 表格组件
// getListApi: getGoodsList, // getListApi: getGoodsList,
productList: [], productList: [],
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, getListApi: this.$apis.platformGoods.getListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
goodsFormObj: {
goodsPosition: 2,
businessType: 1,
goodsSkuName: '',
goodsSource: ''
},
goodsFormData: [
{
label: '商品名称',
name: 'goodsSkuName',
type: 'input',
maxlength: 50,
isClear: true
},
{
label: '商品来源',
name: 'goodsSource',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'goodsSourceList'
}
],
// 表格参数 // 表格参数
tableParams: { tableParams: {
listName: 'list', listName: 'list',
...@@ -42,23 +57,41 @@ export default { ...@@ -42,23 +57,41 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
prop: 'name' prop: 'goodsSkuName'
},
{
label: '兑换价',
width: 220,
addHtml: 'setPriceSlot',
prop: 'salePrice'
}, },
{ {
label: '缩略图', label: '商品来源',
prop: 'coverImgUrl', prop: 'goodsSource',
addHtml: 'coverImgUrl' width: 150,
formatter: cellValue => {
return this.baseData.goodsSourceList.find(item => item.confId == cellValue.goodsSource)?.confLabel || '--'
}
}, },
{ {
label: '价格(元)', label: '库存',
prop: 'price1', width: 150,
prop: 'goodsStock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.price2 && cellValue.price1 != cellValue.price2 ? (cellValue.price1 / 100).toFixed(2) + '-' + (cellValue.price2 / 100).toFixed(2) : (cellValue.price1 / 100).toFixed(2) return cellValue.goodsStock != null ? cellValue.goodsStock : cellValue.minGoodsStock + '-' + cellValue.maxGoodsStock
} }
}
]
}, },
baseData: {
goodsSourceList: [
{ {
label: '来源门店', confId: '1',
prop: 'merchantName' confLabel: '云中鹤'
},
{
confId: '2',
confLabel: '广联自营'
} }
] ]
} }
...@@ -74,13 +107,13 @@ export default { ...@@ -74,13 +107,13 @@ export default {
type: Array, type: Array,
default: () => [] default: () => []
}, },
getListApi: { // getListApi: {
type: Function, // type: Function,
default: () => {} // default: () => { }
}, // },
searchForm: { searchForm: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
...@@ -89,39 +122,90 @@ export default { ...@@ -89,39 +122,90 @@ export default {
}, },
mounted() { mounted() {
this.getList(true) this.getOptionsList('goodsFormData')
}, },
methods: { methods: {
getList(isMounted = false) { beforeSearchFn() {
var params = { return new Promise((resolve, reject) => {
// goodsStatus: 1, var selectedData = this.$refs?.tableRef?.mutiSelectArr[this.tableParams.mutiSelectName] || []
// goodsSource: 1, let list = this.productList || []
...this.searchForm, this.selectedProList.forEach(item => {
pageNum: isMounted ? 1 : this.$refs.mutiProRef.page.pageNum, if (!list?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
pageSize: isMounted ? 10 : this.$refs.mutiProRef.page.pageSize selectedData.push(item)
} }
var that = this })
this.getListApi(params).then(res => { this.selectedProList = this.$common.utils.deepClone(selectedData)
// console.log(res) this.searchForm = this.$common.utils.deepClone(this.goodsFormObj)
this.productList = res.list resolve()
this.$refs.mutiProRef.tableTotal = res.total })
},
setTableFinishFun(list) {
this.productList = list
this.recoverySelected() this.recoverySelected()
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== "全部") {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
}) })
}
}, },
handleReset() { handleReset() {
this.searchForm.name = '' this.goodsFormObj = {
this.getList() goodsPosition: 2,
businessType: 1,
goodsSkuName: '',
goodsSource: ''
}
this.handleSearch()
},
handleSearch() {
this.$refs.tableRef.refreshTable()
}, },
recoverySelected() { recoverySelected() {
if (this.selectedProList.length) { if (this.selectedProList.length) {
this.selectedProList.forEach(row => { this.selectedProList.forEach(row => {
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row) const obj = this.productList.find(item => item.id == row.id)
obj && this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(obj, true)
}) })
} }
}, },
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName] var selectedData = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName]
this.selectedProList.forEach(item => {
if (!this.productList.map(k => k.id).includes(item.id) && !selectedData.map(k => k.id).includes(item.id)) {
selectedData.push(item)
}
})
if (selectedData && selectedData.length > 100) {
this.$message({
message: '最多选择100件商品',
type: 'error',
customClass: 'msgHierarchy'
})
return true
}
console.log(this.$common.utils.deepClone(selectedData), 'selectedData===')
this.$emit('handleMutiSelectConfirm', selectedData) this.$emit('handleMutiSelectConfirm', selectedData)
}, },
handleMutiSelectClose() { handleMutiSelectClose() {
......
...@@ -11,13 +11,15 @@ ...@@ -11,13 +11,15 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(common) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config') let params = { moduleName: 'mall', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/mall/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return common.utils.getConfig(params)
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
} }
......
...@@ -11,6 +11,7 @@ import Vue from 'vue' ...@@ -11,6 +11,7 @@ import Vue from 'vue'
import apis from './api' import apis from './api'
import './public-path' import './public-path'
import '@/assets/css/public.scss' import '@/assets/css/public.scss'
import '@/assets/css/edit.scss'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup' import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -11,7 +11,7 @@ let router = null ...@@ -11,7 +11,7 @@ let router = null
let instance = null let instance = null
Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog) Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, other_request, sign, secret } = await fetchConfig() const { response, request, other_request, sign, secret } = await fetchConfig(common)
// request.baseURL = 'https://scrm.dev.glsx.com.cn' // request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.dev.glsx.com.cn' // request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// request.baseURL = 'http://192.168.1.53:7226' // request.baseURL = 'http://192.168.1.53:7226'
......
...@@ -46,41 +46,52 @@ util.getDateStr = function(num) { ...@@ -46,41 +46,52 @@ util.getDateStr = function(num) {
return util.dateFormat(now) return util.dateFormat(now)
} }
util.getExplorer = function() { util.getExplorer = function() {
var ua = navigator.userAgent.toLocaleLowerCase(); var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null; var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) { if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = "IE"; browserType = 'IE'
} else if (ua.match(/firefox/) != null) { } else if (ua.match(/firefox/) != null) {
browserType = "火狐"; browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) { } else if (ua.match(/ubrowser/) != null) {
browserType = "UC"; browserType = 'UC'
} else if (ua.match(/opera/) != null) { } else if (ua.match(/opera/) != null) {
browserType = "欧朋"; browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) { } else if (ua.match(/bidubrowser/) != null) {
browserType = "百度"; browserType = '百度'
} else if (ua.match(/metasr/) != null) { } else if (ua.match(/metasr/) != null) {
browserType = "搜狗"; browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) { } else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = "QQ"; browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) { } else if (ua.match(/maxthon/) != null) {
browserType = "遨游"; browserType = '遨游'
} else { } else {
browserType = '谷歌' browserType = '谷歌'
} }
return browserType return browserType
} }
util.transfStatus = function(firstKey, key) { util.transfStatus = function(payStatus, orderStatus, goodsSource) {
if(firstKey==1001) return {name: '待支付', color: '#FDB757'} if (payStatus == 1001) return { name: '待支付', color: '#FDB757' }
let arr1 = [1002,1006,1007,1008] let arr1 = [1008]
let arr2 = [1003,1004,1005,1012] let arr2 = [1003, 1004, 1005, 1012]
if(arr1.includes(+key)){ if ([1002, 1006, 1007].includes(orderStatus)) {
return {name: '待收货', color: '#5850FF'} return { name: '待发货', color: '#5850FF' }
}else if(arr2.includes(+key)){
return {name: '已关闭', color: '#999999'}
}else if(key==1009){
return {name: '已完成', color: '#2CCA74'}
}else{
return {name: '售后/退款', color: '#EB4E4E'}
} }
if (arr1.includes(+orderStatus)) {
return { name: '待收货', color: '#5850FF' }
} else if (arr2.includes(+orderStatus)) {
return { name: '已关闭', color: '#999999' }
} else if (orderStatus == 1009) {
return { name: '已完成', color: '#2CCA74' }
} else {
return { name: '售后/退款', color: '#EB4E4E' }
}
}
util.checkPhone = function(mobile) {
const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
}
util.validationInput = function(str) {
const reg = /[^\w\.\/]/gi // eslint-disable-line
return reg.test(str)
} }
export default util export default util
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="stutas-wrap"> <div class="stutas-wrap">
<span>订单状态:</span> <span>订单状态:</span>
<span v-if="!isLoading" class="stutas-circle" <span v-if="!isLoading" class="stutas-circle"
:style="{backgroundColor: transfStatus(orderInfo.payStatus,orderInfo.orderStatus).color}"></span> :style="{ backgroundColor: transfStatus(orderInfo.payStatus, orderInfo.orderStatus, orderInfo.orderType).color }"></span>
<span v-if="!isLoading">{{ transfStatus(orderInfo.payStatus, orderInfo.orderStatus).name }}</span> <span v-if="!isLoading">{{ transfStatus(orderInfo.payStatus, orderInfo.orderStatus, orderInfo.orderType).name }}</span>
</div> </div>
<div class="info-wrap order-info"> <div class="info-wrap order-info">
<div class="title">订单信息</div> <div class="title">订单信息</div>
...@@ -212,6 +212,11 @@ export default { ...@@ -212,6 +212,11 @@ export default {
label: '收货人信息', label: '收货人信息',
name: 'addInfo', name: 'addInfo',
type: 'showTxt' type: 'showTxt'
},
{
label: '运费',
name: 'freightAmount',
type: 'showTxt'
} }
] ]
} }
......
<!-- 秒杀活动 --> <!-- 秒杀活动 -->
<template> <template>
<div class="ctnr"> <div class="ctnr">
<GLCombiForm class="search-wrap" rowNumber="1" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" <GLCombiForm class="search-wrap" rowNumber="1" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="orderFormObj" :formData="orderFormData">
:formObj="orderFormObj" :formData="orderFormData">
</GLCombiForm> </GLCombiForm>
<div class="main-wrap"> <div class="main-wrap">
<div class="global-title-wrap"> <div class="global-title-wrap">
<span v-for="item in titleList" :key="item.id" <span v-for="item in titleList" :key="item.id" :class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">{{ item.name }}</span>
:class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]"
@click="changeTable(item.id)">{{ item.name }}</span>
</div> </div>
<div class="table-wrap"> <div class="table-wrap">
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" <GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
:tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt=""> <img :src="scope.scope.goodsImageUrl" alt="">
<el-tooltip class="item" effect="dark" <el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
:content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<span class="name">{{ scope.scope.brandName }}{{ scope.scope.goodsSkuName }}</span> <span class="name">{{ scope.scope.brandName }}{{ scope.scope.goodsSkuName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -25,9 +20,8 @@ ...@@ -25,9 +20,8 @@
<p class="phone">{{ scope.scope.customerPhone }}</p> <p class="phone">{{ scope.scope.customerPhone }}</p>
</div> </div>
<div slot="orderStatusSlot" slot-scope="scope"> <div slot="orderStatusSlot" slot-scope="scope">
<span class="circle" <span class="circle" :style="{ backgroundColor: transfStatus(scope.scope.payStatus, scope.scope.orderStatus, scope.scope.goodsSource).color }"></span>
:style="{backgroundColor: transfStatus(scope.scope.payStatus,scope.scope.orderStatus).color}"></span> <span>{{ transfStatus(scope.scope.payStatus, scope.scope.orderStatus, scope.scope.goodsSource).name }}</span>
<span>{{ transfStatus(scope.scope.payStatus, scope.scope.orderStatus).name }}</span>
</div> </div>
<div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope"> <div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p> <p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p>
...@@ -39,12 +33,14 @@ ...@@ -39,12 +33,14 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
<SelectDialog v-if="isSelectVisible" :loading="batchLoading" :dialogConfig="dialogConfig" :batchForm="batchForm" :editFormData="batchEditForm" :editRules="batchEditRules" :visible="isSelectVisible" @handleClose="selectVisible" @confirm="handleExpressConfirm"></SelectDialog>
</div> </div>
</template> </template>
<script> <script>
import {utils} from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/util/util' import util from '@/util/util'
import SelectDialog from '../pointProducts/components/SelectDialog'
const titleList = [ const titleList = [
{ {
...@@ -56,6 +52,10 @@ const titleList = [ ...@@ -56,6 +52,10 @@ const titleList = [
name: '待支付' name: '待支付'
}, },
{ {
id: 6,
name: '待发货'
},
{
id: 1, id: 1,
name: '待收货' name: '待收货'
}, },
...@@ -89,6 +89,18 @@ export default { ...@@ -89,6 +89,18 @@ export default {
listeners: { listeners: {
click: row => this.goOrderDetaillPage(row.scope) click: row => this.goOrderDetaillPage(row.scope)
} }
},
{
type: 'el-button',
name: '商品发货',
attrs: {
type: 'text',
fn: '商品发货'
},
condition: row => row.scope.goodsSource == 2 && row.scope.orderStatus == 1007,
listeners: {
click: row => this.handleOrderExpress(row.scope)
}
} }
], ],
searchForm: {}, searchForm: {},
...@@ -120,6 +132,14 @@ export default { ...@@ -120,6 +132,14 @@ export default {
isClear: true isClear: true
}, },
{ {
label: '门店字段',
name: 'merchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName'
},
{
label: '下单时间', label: '下单时间',
name: 'time', name: 'time',
type: 'datePicker', type: 'datePicker',
...@@ -141,7 +161,7 @@ export default { ...@@ -141,7 +161,7 @@ export default {
{ {
id: '1', id: '1',
value: 'B端积分订单' value: 'B端积分订单'
},{ }, {
id: '2', id: '2',
value: 'C端积分订单' value: 'C端积分订单'
}], }],
...@@ -150,11 +170,11 @@ export default { ...@@ -150,11 +170,11 @@ export default {
}, },
], ],
getListApi: this.$apis.platformGoods.getOrderList, getListApi: this.$apis.platformGoods.getOrderList,
pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'}, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: { tableOption: {
width: 80 width: 140
}, },
tableColumns: [ tableColumns: [
{ {
...@@ -169,7 +189,7 @@ export default { ...@@ -169,7 +189,7 @@ export default {
prop: 'salePrice', prop: 'salePrice',
align: 'right', align: 'right',
formatter: cell => { formatter: cell => {
return cell.businessType == 1 || cell.businessType == 2 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice + '元' return cell.goodsSource ? cell.redeemPoints + '积分' : (cell.businessType == 1 || cell.businessType == 2 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice + '元')
} }
}, },
{ {
...@@ -183,8 +203,8 @@ export default { ...@@ -183,8 +203,8 @@ export default {
align: 'right', align: 'right',
formatter: cell => { formatter: cell => {
let price = 0 let price = 0
if(cell.payStatus==1002){ if (cell.payStatus == 1002) {
price = cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元' price = cell.goodsSource ? (cell.redeemPoints * cell.sellQty).toFixed(0) + '积分' : (cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元')
} }
return price return price
// return cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元' // return cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
...@@ -195,7 +215,7 @@ export default { ...@@ -195,7 +215,7 @@ export default {
width: 130, width: 130,
prop: 'businessType', prop: 'businessType',
formatter: cell => { formatter: cell => {
return cell.businessType == 1 || cell.businessType == 2? '积分订单' : '普通订单' return cell.businessType == 1 || cell.businessType == 2 ? '积分订单' : '普通订单'
} }
}, },
{ {
...@@ -214,6 +234,11 @@ export default { ...@@ -214,6 +234,11 @@ export default {
addHtml: 'orderNoSlot' addHtml: 'orderNoSlot'
}, },
{ {
label: '门店字段',
width: 300,
prop: 'merchantName'
},
{
label: '下单时间', label: '下单时间',
width: 200, width: 200,
formatter: cellValue => { formatter: cellValue => {
...@@ -221,13 +246,45 @@ export default { ...@@ -221,13 +246,45 @@ export default {
} }
} }
] ]
},
// 发货弹窗
isSelectVisible: false,
batchLoading: false,
dialogConfig: {
title: '商品发货',
okText: '提交',
cancelText: '取消'
},
batchForm: {},
batchEditRules: {
expressName: [{ required: true, message: '请输入快递公司', trigger: 'change' }],
expressNo: [{ required: true, message: '请输入快递单号', trigger: 'change' }]
},
batchEditForm: [
{
label: '快递公司:',
name: 'expressName',
type: 'input',
placeholder: '请输入快递公司',
maxlength: 20
},
{
label: '快递单号:',
name: 'expressNo',
type: 'input',
placeholder: '请输入快递单号',
maxlength: 20
} }
]
} }
}, },
components: {}, components: {
SelectDialog
},
mounted() { mounted() {
this.getCurMerList()
}, },
methods: { methods: {
...@@ -240,6 +297,17 @@ export default { ...@@ -240,6 +297,17 @@ export default {
this.orderFormObj.requestType = id this.orderFormObj.requestType = id
this.handleSearch() this.handleSearch()
}, },
getCurMerList() {
this.$apis.platformGoods.getCurMerList({ pageSize: 9999, currentPage: 1 }).then(res => {
console.log(res)
this.orderFormData[3].optionList = res
this.orderFormData[3].optionList.unshift({
merchantId: '',
merchantName: '全部'
})
})
},
handleReset() { handleReset() {
this.orderFormObj = { this.orderFormObj = {
customerInfo: '', customerInfo: '',
...@@ -269,7 +337,36 @@ export default { ...@@ -269,7 +337,36 @@ export default {
}) })
}, },
goOrderDetaillPage(item) { goOrderDetaillPage(item) {
this.$router.push({path: `/goodsOrder/detail/${item.subOrderCode}`}) this.$router.push({ path: `/goodsOrder/detail/${item.subOrderCode}` })
},
selectVisible() {
this.isSelectVisible = !this.isSelectVisible
},
handleOrderExpress(row) {
this.batchForm = {
subOrderCode: row.subOrderCode,
expressName: '',
expressNo: ''
}
this.selectVisible()
},
handleExpressConfirm(obj) {
this.batchLoading = true
this.$apis.platformGoods
.subOrderExpress(obj)
.then(res => {
let { code, message } = res
if (code == 0) {
this.$message.success('操作成功')
this.selectVisible()
this.handleSearch()
} else {
this.$message.error(message)
}
})
.finally(() => {
this.batchLoading = false
})
} }
} }
} }
...@@ -296,7 +393,7 @@ export default { ...@@ -296,7 +393,7 @@ export default {
} }
.phone { .phone {
font-size: 10px; font-size: 12px;
color: #999999; color: #999999;
} }
} }
......
<template>
<GLDialog class="select-dialog" :title="dialogConfig.title" mode="small" :visible.sync="visible" :show-close="true" :before-close="handleClose" @onOk="confirmPriceChange" @onCancel="handleClose" :okText="dialogConfig.okText" :cancelText="dialogConfig.cancelText">
<div class="dialog-wrap" v-loading="loading">
<glsxCombiForm ref="editFormRef" :labelWidth="labelWidth" labelPaddingRight="0" :formObj="batchForm" :formData="editFormData" :formRules="editRules" formRef="editChildRef"></glsxCombiForm>
</div>
</GLDialog>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'SelectDialog',
props: {
dialogConfig: {
type: Object,
default: () => {
return {
title: '提示',
okText: '确定',
cancelText: '取消'
}
}
},
visible: {
type: Boolean,
default: false
},
batchForm: {
type: Object,
default: () => { }
},
editFormData: {
type: Array,
default: () => []
},
editRules: {
type: Object,
default: () => { }
},
loading: {
type: Boolean,
default: false
},
labelWidth: {
type: String,
default: '154px'
}
},
components: {
glsxCombiForm
},
data() {
return {}
},
methods: {
confirmPriceChange() {
this.$refs.editFormRef.$refs.editChildRef.validate(valid => {
if (valid) {
this.$emit('confirm', this.batchForm)
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style lang="scss">
.select-dialog {
.dialog-wrap {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
span {
white-space: nowrap;
}
/deep/ .el-input {
&,
.el-input__inner {
width: 100px;
}
}
}
}
</style>
<!-- 浏览明细 -->
<template>
<div class="ctnr">
<div class="title">{{ routeInfo.goodsSkuName }}</div>
<div class="p-20">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="operate-wrap">
<span class="table-title">浏览明细</span>
<div class="operate-btn">
<el-button :size="size" @click="handleExport()">导出</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="tableRef" :getListApi="getListApi" :noDataImg="url" :pageConf="pageConf" :searchForm="tableSearchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/images/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'browseRecordList',
data() {
return {
size: 'small',
url: url,
routeInfo: {},
searchForm: {
customerName: '',
customerMobile: ''
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '客户名称',
name: 'customerName',
type: 'input',
maxlength: 50
},
{
label: '手机号',
name: 'customerMobile',
type: 'input',
maxlength: 20
}
],
// 表格
getListApi: this.$apis.platformGoods.getBrowseRecordList,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName'
},
{
label: '手机号',
prop: 'customerMobile'
},
{
label: '浏览时长',
prop: 'browseDuration',
formatter: cellValue => {
return cellValue.browseDuration + '秒'
}
},
{
label: '进入页面时间',
prop: 'enterDate',
formatter: cellValue => {
return dayjs(cellValue.enterDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '离开页面时间',
prop: 'leaveDate',
formatter: cellValue => {
return dayjs(cellValue.leaveDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
this.routeInfo = this.$route.query
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.goodsId = this.$route.query.id
// 浏览类型:1.商品浏览
params.goodsType = '1'
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun()
},
handleSearch() {
this.$refs.tableRef.refreshTable()
},
handleReset() {
this.searchForm = {
customerName: '',
customerMobile: ''
}
this.handleSearch()
},
handleExport() {
const params = this.getParams()
this.$apis.platformGoods.exportBrowseRecordList(params).then(res => {
exportFn(res)
})
}
}
}
</script>
<style scoped lang="scss">
.ctnr {
background-color: #fff;
.p-20 {
padding: 20px;
}
.title {
color: #333333;
font-size: 20px;
font-weight: bold;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
}
}
</style>
<!-- 分类管理 -->
<template>
<div class="ctnr">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="operate-wrap">
<span class="table-title">分类列表</span>
<div class="operate-btn">
<GLButton :size="size" type="primary" fn="新增分类" @click="handleEdit('add')">新增分类</GLButton>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :pageConf="pageConf" :searchForm="tableSearchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
<SelectDialog v-if="isSelectVisible" :loading="batchLoading" :dialogConfig="dialogConfig" :batchForm="batchForm" :editFormData="batchEditForm" :editRules="batchEditRules" :visible="isSelectVisible" @handleClose="selectVisible" @confirm="handleSelectConfirm"></SelectDialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/images/empty.png'
import SelectDialog from './components/SelectDialog'
export default {
name: 'classifyList',
data() {
return {
size: 'small',
url: url,
isSelectVisible: false,
batchLoading: false,
dialogConfig: {
title: '新增分类',
okText: '提交',
cancelText: '取消'
},
batchForm: {},
batchEditRules: {
categoryName: [{ required: true, message: '请选择分类名称', trigger: 'change' }]
},
batchEditForm: [
{
label: '分类名称:',
name: 'categoryName',
type: 'input',
placeholder: '请输入分类名称',
maxlength: 20
}
],
searchForm: {
categoryName: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '分类名称',
name: 'categoryName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
// isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit('edit', row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.handleTop
}
}
],
// 表格
getListApi: this.$apis.platformGoods.getFrontendcategoryList,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '分类名称',
prop: 'categoryName'
},
{
label: '创建日期',
prop: 'createdAt',
formatter: cellValue => {
return dayjs(cellValue.createdAt).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
components: {
SelectDialog
},
mounted() { },
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.StartTime = dayjs(this.searchForm.createDate[0]).format('YYYY-MM-DD')
params.endTime = dayjs(this.searchForm.createDate[1]).format('YYYY-MM-DD')
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error',
customClass: 'msgHierarchy'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
selectVisible() {
this.isSelectVisible = !this.isSelectVisible
},
handleSelectConfirm(obj) {
this.batchLoading = true
this.$apis.platformGoods
.editFrontendCategory(obj)
.then(res => {
let { code, message } = res
if (code == 0) {
this.$message.success('操作成功')
this.selectVisible()
this.handleSearch()
} else {
this.$message.error(message)
}
})
.finally(() => {
this.batchLoading = false
})
},
findIdx(formName, name) {
return this[formName].findIndex(item => item.name == name)
},
//操作类型 optType: add,edit
handleEdit(optType, row) {
this.batchForm = {}
this.dialogConfig.title = optType == 'add' ? '新增分类' : '编辑'
if (optType == 'edit') {
this.$set(this.batchForm, 'id', row.id)
this.$set(this.batchForm, 'categoryName', row.categoryName)
}
this.selectVisible()
},
handleDelete(row) {
this.secondConfirm('提示', '此功能只删除小程序对应分类区,不会删除分类下的商品,是否确定删除此分类?', 'platformGoods', 'deleteFrontendCategory', { id: row.id, deletedFlag: 'D' })
},
handleTop(row) {
this.secondConfirm('置顶', '确定置顶此分类?', 'platformGoods', 'upFrontendCategory', { id: row.id, isPinned: 1 })
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.classifyRef.data.length ? (this.$refs.classifyRef.tableHeightValues = '') : this.$refs.classifyRef.setTableHeightFun()
},
handleSearch() {
this.$refs.classifyRef.refreshTable()
},
handleReset() {
this.searchForm = {
categoryName: '',
createDate: []
}
this.handleSearch()
}
}
}
</script>
<style scoped lang="scss">
.ctnr {
background-color: #fff;
padding: 20px;
}
</style>
<template>
<GLDialog class="select-dialog" :title="dialogConfig.title" mode="small" :visible.sync="visible" :show-close="true" :before-close="handleClose" @onOk="confirmPriceChange" @onCancel="handleClose" :okText="dialogConfig.okText" :cancelText="dialogConfig.cancelText">
<div class="dialog-wrap" v-loading="loading">
<glsxCombiForm ref="editFormRef" :labelWidth="labelWidth" labelPaddingRight="0" :formObj="batchForm" :formData="editFormData" :formRules="editRules" formRef="editChildRef"></glsxCombiForm>
</div>
</GLDialog>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'SelectDialog',
props: {
dialogConfig: {
type: Object,
default: () => {
return {
title: '提示',
okText: '确定',
cancelText: '取消'
}
}
},
visible: {
type: Boolean,
default: false
},
batchForm: {
type: Object,
default: () => { }
},
editFormData: {
type: Array,
default: () => []
},
editRules: {
type: Object,
default: () => { }
},
loading: {
type: Boolean,
default: false
},
labelWidth: {
type: String,
default: '154px'
}
},
components: {
glsxCombiForm
},
data() {
return {}
},
methods: {
confirmPriceChange() {
this.$refs.editFormRef.$refs.editChildRef.validate(valid => {
if (valid) {
this.$emit('confirm', this.batchForm)
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style lang="scss">
.select-dialog {
.dialog-wrap {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
span {
white-space: nowrap;
}
/deep/ .el-input {
&,
.el-input__inner {
width: 100px;
}
}
}
}
</style>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<span>+</span> <span>+</span>
<!-- v-focus--> <!-- v-focus-->
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$') <el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" disabled
@blur="setPriceFn"> @blur="setPriceFn">
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1" <el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1"
@click="handleSale">上架销售 @click="handleSale">上架销售
</el-button> </el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button> <!-- <el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button> -->
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button> <el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button>
</div> </div>
</div> </div>
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant'
const attrList = [ const attrList = [
// { // {
// label:'商品特点', // label:'商品特点',
...@@ -158,6 +159,11 @@ export default { ...@@ -158,6 +159,11 @@ export default {
}, },
}, },
}, },
watch: {
redeemPoints(newValue, oldValue) {
this.redeemPoints = limitPrice(newValue, oldValue, 5, 0, 1, 99999)
}
},
mounted() { mounted() {
}, },
...@@ -215,9 +221,9 @@ export default { ...@@ -215,9 +221,9 @@ export default {
handleSale() { handleSale() {
this.operateFn('batchSaleApi', '上架销售') this.operateFn('batchSaleApi', '上架销售')
}, },
handleOff() { // handleOff() {
this.operateFn('batchOffApi', '下架') // this.operateFn('batchOffApi', '下架')
}, // },
handleRemove() { handleRemove() {
this.operateFn('batchRemoveApi', '移出') this.operateFn('batchRemoveApi', '移出')
}, },
......
<template> <template>
<GLDialog :title="isConversionRate ? '兑换价' : '批量改价'" mode="small" :visible.sync="visible" :show-close="true" <GLDialog :title="isConversionRate ? '兑换价' : '批量改价'" mode="small" :visible.sync="visible" :show-close="true" :before-close="handleClose" @onOk="confirmPriceChange" @onCancel="handleClose" okText="提交" cancelText="取消">
:before-close="handleClose" @onOk="confirmPriceChange" @onCancel="handleClose" okText="提交"
cancelText="取消">
<div class="dialog-wrap"> <div class="dialog-wrap">
<span> <span>
{{ isConversionRate ? '兑换价 = ' : '兑换价 = 供货价1:1积分 +' }} {{ isConversionRate ? '兑换价 = ' : '兑换价 = 供货价1:1积分 +' }}
</span> </span>
<el-input v-if="isConversionRate" size="small" type="text" <el-input v-if="isConversionRate" size="small" type="text" onkeyup="value = value.replace(/[^\d]/g,'').replace(/^[0]+[0-9]*$/gi,'')" v-model="batchCount" placeholder="请输入积分">
onkeyup="value = value.replace(/[^\d]/g,'').replace(/^[0]+[0-9]*$/gi,'')"
v-model="batchCount" placeholder="请输入积分">
<span slot="append">积分</span> <span slot="append">积分</span>
</el-input> </el-input>
<el-input v-else size="small" type="text" onkeyup="value = value.replace(/[^\d]/g,'').replace(/^0\d/g, '0')" <el-input v-else size="small" type="text" onkeyup="value = value.replace(/[^\d]/g,'').replace(/^0\d/g, '0')" v-model="batchCount" placeholder="请输入积分">
v-model="batchCount" placeholder="请输入积分">
<span slot="append">积分</span> <span slot="append">积分</span>
</el-input> </el-input>
<span>&nbsp; +</span> <span>&nbsp; +</span>
<el-input size="small" type="text" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$') <el-input size="small" type="text" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" v-model="batchPrice" placeholder="请输入金额" disabled="true">
v-model="batchPrice" placeholder="请输入金额">
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
</div> </div>
...@@ -27,6 +21,7 @@ ...@@ -27,6 +21,7 @@
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant'
export default { export default {
name: 'setPriceDialog', name: 'setPriceDialog',
props: { props: {
...@@ -51,6 +46,11 @@ export default { ...@@ -51,6 +46,11 @@ export default {
batchPrice: this.isConversionRate ? this.echoParams.salePrice : '', batchPrice: this.isConversionRate ? this.echoParams.salePrice : '',
} }
}, },
watch: {
batchCount(newValue, oldValue) {
this.batchCount = limitPrice(newValue, oldValue, 5, 0, 1, 99999)
}
},
methods: { methods: {
confirmPriceChange() { confirmPriceChange() {
...@@ -80,7 +80,8 @@ export default { ...@@ -80,7 +80,8 @@ export default {
} }
/deep/ .el-input { /deep/ .el-input {
&, .el-input__inner { &,
.el-input__inner {
width: 100px; width: 100px;
} }
......
<!-- 访客明细 -->
<template>
<div class="ctnr">
<div class="title">{{ routeInfo.goodsSkuName }}</div>
<div class="p-20">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="operate-wrap">
<span class="table-title">访客明细</span>
<div class="operate-btn">
<el-button :size="size" @click="handleExport()">导出</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="tableRef" :getListApi="getListApi" :noDataImg="url" :pageConf="pageConf" :searchForm="tableSearchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/images/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'useRecordList',
data() {
return {
size: 'small',
url: url,
routeInfo: {},
searchForm: {
customerName: '',
customerMobile: ''
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '客户名称',
name: 'customerName',
type: 'input',
maxlength: 50
},
{
label: '手机号',
name: 'customerMobile',
type: 'input',
maxlength: 20
}
],
// 表格
getListApi: this.$apis.platformGoods.getUseRecordList,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName'
},
{
label: '手机号',
prop: 'customerMobile'
},
{
label: '浏览次数',
prop: 'browseCount',
formatter: cellValue => {
return cellValue.browseCount + '次'
}
},
{
label: '最后浏览时间',
prop: 'lastBrowseTime',
formatter: cellValue => {
return dayjs(cellValue.lastBrowseTime).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
this.routeInfo = this.$route.query
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.goodsId = this.$route.query.id
// 浏览类型:1.商品浏览
params.goodsType = '1'
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun()
},
handleSearch() {
this.$refs.tableRef.refreshTable()
},
handleReset() {
this.searchForm = {
customerName: '',
customerMobile: ''
}
this.handleSearch()
},
handleExport() {
const params = this.getParams()
this.$apis.platformGoods.exportUseRecordList(params).then(res => {
exportFn(res)
})
}
}
}
</script>
<style scoped lang="scss">
.ctnr {
background-color: #fff;
.p-20 {
padding: 20px;
}
.title {
color: #333333;
font-size: 20px;
font-weight: bold;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
}
}
</style>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<span>+</span> <span>+</span>
<!-- v-focus--> <!-- v-focus-->
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$') <el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" disabled
@blur="setPriceFn('salePrice')"> @blur="setPriceFn('salePrice')">
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
...@@ -61,13 +61,13 @@ ...@@ -61,13 +61,13 @@
<span class="attr-key">{{ goodsInfo.specificationResponses[0].specValue || '--' }}</span> <span class="attr-key">{{ goodsInfo.specificationResponses[0].specValue || '--' }}</span>
</li> </li>
</ul> </ul>
<div class="operate-btn"> <!-- <div class="operate-btn">
<el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1" <el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1"
@click="handleSale">上架销售 @click="handleSale">上架销售
</el-button> </el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button> <el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button> <el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant'
const attrList = [ const attrList = [
// { // {
// label:'商品特点', // label:'商品特点',
...@@ -154,6 +155,11 @@ export default { ...@@ -154,6 +155,11 @@ export default {
}, },
}, },
}, },
watch: {
redeemPoints(newValue, oldValue) {
this.redeemPoints = limitPrice(newValue, oldValue, 5, 0, 1, 99999)
}
},
mounted() { mounted() {
}, },
......
...@@ -231,7 +231,7 @@ export default { ...@@ -231,7 +231,7 @@ export default {
this.showEmailInfo = returnType == 1001 this.showEmailInfo = returnType == 1001
res.returnType = {1001: '退货退款', 1002: '仅退款', 1003: '退货换货'}[returnType] || '--' res.returnType = {1001: '退货退款', 1002: '仅退款', 1003: '退货换货'}[returnType] || '--'
res.returnReasonType = reasonObj[returnReasonType] res.returnReasonType = reasonObj[returnReasonType]
refundStatus = returnOrderStatus != 1003 ? refundStatusObj[returnOrderStatus] : outRefundTypeObj[outRefundType] refundStatus = outRefundType != null ? (returnOrderStatus != 1003 ? refundStatusObj[returnOrderStatus] : outRefundTypeObj[outRefundType]) : refundStatusObj[returnOrderStatus]
res.goodsInfoTableDate = [{ res.goodsInfoTableDate = [{
brandName, brandName,
goodsSkuName, goodsSkuName,
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
</GLCombiForm> </GLCombiForm>
</div> </div>
<div class="operate-wrap"> <div class="operate-wrap">
<span class="table-title">选品库</span> <el-tabs v-model="activeTab">
<el-tab-pane v-for="item in baseData.tabList" :key="item.name" :label="item.label" :name="item.name"></el-tab-pane>
</el-tabs>
<el-button :size="size" type="primary" plain @click="addWarehouseFn({}, 1)">当页添加进仓库</el-button> <el-button :size="size" type="primary" plain @click="addWarehouseFn({}, 1)">当页添加进仓库</el-button>
</div> </div>
<div class="goods-wrap" v-if="goodsList && goodsList.length"> <div class="goods-wrap" v-if="goodsList && goodsList.length">
...@@ -54,15 +56,7 @@ ...@@ -54,15 +56,7 @@
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageObj.pageNum" :page-sizes="pageObj.pageSizes" :page-size="pageObj.pageSize" :total="pageObj.total" layout="total, sizes, prev, pager, next, jumper">
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageObj.pageNum"
:page-sizes="pageObj.pageSizes"
:page-size="pageObj.pageSize"
:total="pageObj.total"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -76,7 +70,8 @@ export default { ...@@ -76,7 +70,8 @@ export default {
data() { data() {
return { return {
size: 'small', size: 'small',
page:{}, activeTab: '1',
page: {},
goodsList: [], goodsList: [],
categoryVal: [], categoryVal: [],
categoryList: [], categoryList: [],
...@@ -87,7 +82,7 @@ export default { ...@@ -87,7 +82,7 @@ export default {
lazyLoad: this.getCategoryList lazyLoad: this.getCategoryList
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageObj :{ pageObj: {
total: 0, total: 0,
pageSize: 50, pageSize: 50,
pageSizes: [40, 50, 60, 70], pageSizes: [40, 50, 60, 70],
...@@ -140,6 +135,12 @@ export default { ...@@ -140,6 +135,12 @@ export default {
addHtml: 'spreadPriceSlot' addHtml: 'spreadPriceSlot'
}, },
], ],
baseData: {
tabList: [{
name: '1',
label: '云中鹤'
}]
}
} }
}, },
...@@ -147,7 +148,7 @@ export default { ...@@ -147,7 +148,7 @@ export default {
inputNumRange, inputNumRange,
categoryCascader categoryCascader
}, },
created(){ created() {
this.getGoodsList() this.getGoodsList()
// this.getCategoryList() // this.getCategoryList()
}, },
...@@ -156,15 +157,15 @@ export default { ...@@ -156,15 +157,15 @@ export default {
}, },
methods: { methods: {
handleSizeChange(e){ handleSizeChange(e) {
this.pageObj.pageSize = e this.pageObj.pageSize = e
this.getGoodsList() this.getGoodsList()
}, },
handleCurrentChange(e){ handleCurrentChange(e) {
this.pageObj.pageNum = e this.pageObj.pageNum = e
this.getGoodsList() this.getGoodsList()
}, },
getGoodsList(){ getGoodsList() {
const { pageSize, pageNum } = this.pageObj const { pageSize, pageNum } = this.pageObj
const { goodsSkuName, categoryCode, priceOrderType, startSellPrice, endSellPrice, endDiffPrice, startDiffPrice } = this.goodsFormObj const { goodsSkuName, categoryCode, priceOrderType, startSellPrice, endSellPrice, endDiffPrice, startDiffPrice } = this.goodsFormObj
const params = { const params = {
...@@ -176,7 +177,7 @@ export default { ...@@ -176,7 +177,7 @@ export default {
startDiffPrice, startDiffPrice,
pageNum, pageNum,
pageSize, pageSize,
categoryCode: categoryCode && categoryCode.length ? categoryCode[categoryCode.length-1] : '' categoryCode: categoryCode && categoryCode.length ? categoryCode[categoryCode.length - 1] : ''
} }
// if (0 < params.categoryCode.length && params.categoryCode.length < 6) { // if (0 < params.categoryCode.length && params.categoryCode.length < 6) {
...@@ -192,9 +193,9 @@ export default { ...@@ -192,9 +193,9 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
this.$apis.platformGoods.getGoodsListApi(params).then(res=>{ this.$apis.platformGoods.getGoodsListApi(params).then(res => {
loading.close() loading.close()
if(res){ if (res) {
this.goodsList = res.list this.goodsList = res.list
this.pageObj.total = res.total this.pageObj.total = res.total
} }
...@@ -203,20 +204,20 @@ export default { ...@@ -203,20 +204,20 @@ export default {
console.log(err) console.log(err)
}) })
}, },
getCategoryList(node, resolve){ getCategoryList(node, resolve) {
const params = { const params = {
categoryCode: node?.value, categoryCode: node?.value,
categoryLevel: node?.level + 1 categoryLevel: node?.level + 1
} }
this.$apis.platformGoods.getCategoryListApi(params).then(res=>{ this.$apis.platformGoods.getCategoryListApi(params).then(res => {
if(res){ if (res) {
res.map(item => item.leaf = params.categoryLevel>2) res.map(item => item.leaf = params.categoryLevel > 2)
if(params.categoryLevel == 1) this.categoryList = res if (params.categoryLevel == 1) this.categoryList = res
resolve(res) resolve(res)
} }
}) })
}, },
handleReset(){ handleReset() {
this.goodsFormObj = { this.goodsFormObj = {
goodsSkuName: '', goodsSkuName: '',
categoryCode: '', categoryCode: '',
...@@ -234,25 +235,25 @@ export default { ...@@ -234,25 +235,25 @@ export default {
} }
this.getGoodsList() this.getGoodsList()
}, },
handleSearch(){ handleSearch() {
this.pageObj.pageNum = 1 this.pageObj.pageNum = 1
this.getGoodsList() this.getGoodsList()
}, },
addWarehouseFn(item, isAll){ addWarehouseFn(item, isAll) {
let params = { let params = {
goodsSkuCodes: [item.goodsSkuCode], goodsSkuCodes: [item.goodsSkuCode],
} }
let tip = `是否把 ${item.goodsSkuName} 添加到仓库?` let tip = `是否把 ${item.goodsSkuName} 添加到仓库?`
if(isAll){ if (isAll) {
params.goodsSkuCodes = this.goodsList.map(item => item.goodsSkuCode) params.goodsSkuCodes = this.goodsList.map(item => item.goodsSkuCode)
tip = `是否把当前页${this.goodsList.length}个商品全部添加到仓库?` tip = `是否把当前页${this.goodsList.length}个商品全部添加到仓库?`
} }
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if(action=='confirm'){ if (action == 'confirm') {
this.$apis.platformGoods.addWarehouseApi(params).then(res=>{ this.$apis.platformGoods.addWarehouseApi(params).then(res => {
if(res){ if (res) {
this.$message.success('操作成功') this.$message.success('操作成功')
this.getGoodsList() this.getGoodsList()
} }
...@@ -262,15 +263,42 @@ export default { ...@@ -262,15 +263,42 @@ export default {
}) })
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctnr{ .ctnr {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
.noData{ .operate-wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
/deep/ .el-tabs__header {
margin-bottom: 0;
}
/deep/ .el-tabs__nav {
border-radius: 4px;
}
/deep/ .el-tabs__item {
box-sizing: border-box;
padding: 0 32px;
border: 4px solid #f0f2f5;
line-height: 32px;
font-weight: bold;
}
/deep/ .el-tabs__active-bar {
display: none;
}
}
.noData {
height: calc(100vh - 310px); height: calc(100vh - 310px);
min-height: 300px; min-height: 300px;
display: flex; display: flex;
...@@ -279,57 +307,57 @@ export default { ...@@ -279,57 +307,57 @@ export default {
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
color: #666; color: #666;
img{ img {
width: 320px; width: 320px;
height: 94px; height: 94px;
} }
} }
.goods-wrap{ .goods-wrap {
// display: flex; // display: flex;
// flex-wrap: wrap; // flex-wrap: wrap;
// overflow-y: auto; // overflow-y: auto;
// height: 700px; // height: 700px;
display: grid; display: grid;
grid-template-columns: 20% 20% 20% 20% 20%; grid-template-columns: 20% 20% 20% 20% 20%;
.goods-box{ .goods-box {
// flex: 0 1 216px; // flex: 0 1 216px;
// width: 216px; // width: 216px;
height: 346px; height: 346px;
background: #F9F9F9; background: #f9f9f9;
border-radius: 4px; border-radius: 4px;
margin-left: 16px; margin-left: 16px;
margin-bottom: 20px; margin-bottom: 20px;
padding: 12px; padding: 12px;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
&:nth-last-child(5n){ &:nth-last-child(5n) {
margin-left: 0; margin-left: 0;
} }
&:nth-last-child(-n+5){ &:nth-last-child(-n + 5) {
margin-bottom: 0; margin-bottom: 0;
} }
.mask{ .mask {
display: none; display: none;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
background: rgba(0,0,0,.3); background: rgba(0, 0, 0, 0.3);
border-radius: 4px; border-radius: 4px;
z-index: 2; z-index: 2;
.add-warehouse{ .add-warehouse {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
&:hover{ &:hover {
background: #8A85FF; background: #8a85ff;
border-color: #8A85FF; border-color: #8a85ff;
} }
} }
} }
.status-label{ .status-label {
z-index: 2; z-index: 2;
width: 50px; width: 50px;
height: 50px; height: 50px;
...@@ -337,23 +365,23 @@ export default { ...@@ -337,23 +365,23 @@ export default {
right: 0; right: 0;
top: 0; top: 0;
} }
.goods-img{ .goods-img {
width: 100%; width: 100%;
height: 192px; height: 192px;
border-radius: 2px; border-radius: 2px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
img{ img {
object-fit: contain; object-fit: contain;
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 2px; border-radius: 2px;
} }
} }
.info{ .info {
margin-top: 12px; margin-top: 12px;
.title{ .title {
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
...@@ -363,45 +391,43 @@ export default { ...@@ -363,45 +391,43 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
} }
p{ p {
margin: 4px 0 0; margin: 4px 0 0;
line-height: 18px; line-height: 18px;
font-size: 12px; font-size: 12px;
color: #666; color: #666;
} }
.inventory{ .inventory {
color: #333; color: #333;
} }
.supply{ .supply {
color: #EB4E4E; color: #eb4e4e;
font-weight: 500; font-weight: 500;
} }
.market{ .market {
font-weight: 500; font-weight: 500;
font-size: 13px; font-size: 13px;
color: #333; color: #333;
} }
} }
} }
.optional:hover{ .optional:hover {
.mask{ .mask {
display: block; display: block;
} }
} }
.in-warehouse{ .in-warehouse {
cursor: not-allowed; cursor: not-allowed;
.mask{ .mask {
display: block; display: block;
background: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, 0.5);
.add-warehouse{ .add-warehouse {
display: none; display: none;
} }
} }
} }
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!