Commit 9fcc4330 by zhangquan

完成联调

1 parent e0f1c306
......@@ -22,7 +22,7 @@
<div class="info-wrap">
<div class="title">发货信息</div>
<div class="detail">
<GLTable ref="shipmentsRef" :tableParams="shipmentsParams" :getListApi="getListApi">
<GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.subOrderGoodsList">
</GLTable>
</div>
......@@ -47,25 +47,34 @@ export default {
tableColumns: [
{
label: '发货商品',
prop: 'goodsName'
prop: 'goodsName',
formatter: cell => {
return cell.brandName + cell.goodsSkuName
}
},
{
label: '发货数量',
prop: 'price'
prop: 'sellQty'
},
{
label: '快递公司',
formatter: cell => {
return cell.denomination ? Number((Number(cell.denomination) / 100).toFixed(2)) : 0
return this.orderInfo.expressName || '--'
}
},
{
label: '快递单号',
prop: 'effectiveDays'
prop: 'effectiveDays',
formatter: cell => {
return this.orderInfo.expressNo || '--'
}
},
{
label: '物流状态',
prop: 'effectiveDays'
prop: 'effectiveDays',
formatter: cell =>{
return {1000:'待揽件',1001:'已揽件',1002:'运输中',1003:'已签收',1004:'拒收'}[this.orderInfo.logisticsStatus] || '--'
}
}
]
},
......@@ -96,7 +105,10 @@ export default {
},
{
label: '实收金额 (元)',
prop: 'orderAmount'
prop: 'orderAmount',
formatter: cell => {
return this.orderInfo.totalOrderAmount || '--'
}
}
]
},
......@@ -118,7 +130,7 @@ export default {
},
{
label: '支付金额',
name: 'stock',
name: 'payPrice',
type: 'showTxt'
},
{
......@@ -175,6 +187,7 @@ export default {
res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}`
res.addInfo = res.addInfo.replaceAll('null','')
res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : []
// res.logisticsStatus = undefined
this.orderInfo = res
}
})
......
......@@ -18,7 +18,8 @@
<div class="sale-price">
<div class="set-price">
<label for="">销售价</label>
<el-input clearable v-model="goodsInfo.salePrice"></el-input>
<el-input clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" @blur="setPriceFn"></el-input>
</div>
<span class="buy-num">起购数量:{{goodsInfo.startQty}}件</span>
</div>
......@@ -86,6 +87,7 @@ export default {
data() {
return {
attrList,
salePrice: '',
curImgIdx: 0,
curTitle: 1,
goodsInfo: {}
......@@ -111,9 +113,29 @@ export default {
this.$apis.platformGoods.goodsDetailApi({id}).then(res =>{
if(res?.id){
this.goodsInfo = res
this.salePrice = res.salePrice
}
})
},
setPriceFn(e){
if(!(+e.target.value)){
this.salePrice = this.goodsInfo.salePrice
this.$message.error('请输入大于0的金额')
return
}
let params = {
modifyPriceRequestList: [{
id: this.goodsInfo.id,
salePrice: e.target.value
}],
}
this.$apis.platformGoods.modifyPriceApi(params).then(res=>{
if(res){
this.$message.success('操作成功')
}
this.getDetailById()
})
},
handleSale(){
this.operateFn('batchSaleApi', '上架销售')
},
......
......@@ -19,7 +19,7 @@
<el-button :size="size" type="primary" plain @click="batchPriceChange">批量改价</el-button>
</div>
</div>
<GLTable ref="tableRef" :pageConf="pageConf" :searchForm="goodsFormObj" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<GLTable ref="tableRef" :pageConf="pageConf" @sortChange="sortChange" :searchForm="goodsFormObj" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImgUrl" alt="">{{ scope.scope.goodsSkuName }}
</div>
......@@ -55,17 +55,19 @@ export default {
batchPrice: '',
goodsFormObj: {
goodsPosition: 2,
info: '',
goodsSkuName: '',
categoryCode: [],
startSellPrice: '',
endSellPrice: '',
startDiffPrice: '',
endDiffPrice: ''
endDiffPrice: '',
orderBySalePrice: '',
orderBySaleAmount: ''
},
goodsFormData: [
{
label: '商品信息',
name: 'info',
name: 'goodsSkuName',
placeholder: '商品名称/spu/sku/品牌名称',
type: 'input',
maxlength: 50,
......@@ -125,7 +127,7 @@ export default {
label: '设置销售价',
addHtml: 'setPriceSlot',
prop: 'salePrice',
sortable: true,
sortable: 'custom',
},
{
label: '供货价(元)',
......@@ -138,7 +140,7 @@ export default {
{
label: '真实销量',
prop: 'saleAmount',
sortable: true,
sortable: 'custom',
},
{
label: '库存',
......@@ -190,6 +192,19 @@ export default {
},
methods: {
sortChange(e){
console.log(e)
const {order, prop} = e
if(prop=='saleAmount'){
this.goodsFormObj.orderBySaleAmount = order=='ascending' ? 1 : 2
this.goodsFormObj.orderBySalePrice = ''
}
if(prop=='salePrice'){
this.goodsFormObj.orderBySalePrice = order=='ascending' ? 1 : 2
this.goodsFormObj.orderBySaleAmount = ''
}
this.handleReset()
},
editPrice(row){
this.curEditId = row.id
},
......@@ -200,7 +215,7 @@ export default {
// 确认批量改价弹框
confirmPriceChange(e){
this.batchPrice = e
if(!this.batchPrice) return this.$message.error('请输入大于0的金额')
if(!(+this.batchPrice)) return this.$message.error('请输入大于0的金额')
this.setPriceFn({}, {}, true)
this.handleClose()
},
......@@ -215,7 +230,6 @@ export default {
const list = this.getAllData()
if(!list?.length) return this.$message.error(`请选择要批量改价的商品`)
this.isVisible = true
console.log( this.isVisible)
},
handleShelf(item, isAll){
const api = this.$apis.platformGoods.batchOffApi
......@@ -254,6 +268,12 @@ export default {
modifyPriceRequestList : list.map(item => {return { id: item.id, salePrice: this.batchPrice}})
}
}else{
if(!(+e.target.value)){
this.handleClose()
this.handleSearch()
this.$message.error('请输入大于0的金额')
return
}
params = {
modifyPriceRequestList: [{
id: item.id,
......@@ -265,19 +285,21 @@ export default {
if(res){
this.$message.success('操作成功')
this.handleClose()
this.handleReset()
}
this.handleSearch()
})
},
handleReset(){
this.goodsFormObj = {
goodsPosition: 2,
info: '',
goodsSkuName: '',
categoryCode: [],
startSellPrice: '',
endSellPrice: '',
startDiffPrice: '',
endDiffPrice: ''
endDiffPrice: '',
orderBySalePrice: this.goodsFormObj.orderBySalePrice,
orderBySaleAmount: this.goodsFormObj.orderBySaleAmount
}
this.handleSearch()
},
......
......@@ -51,7 +51,7 @@ export default {
batchPrice: '',
goodsFormObj: {
goodsPosition: 1,
info: '',
goodsSkuName: '',
categoryCode: [],
shelvesStatus: '',
startSellPrice: '',
......@@ -63,7 +63,7 @@ export default {
goodsFormData: [
{
label: '商品信息',
name: 'info',
name: 'goodsSkuName',
placeholder: '商品名称/spu/sku/品牌名称',
type: 'input',
maxlength: 50,
......@@ -143,7 +143,7 @@ export default {
label: '商品状态',
prop: 'shelvesStatus',
formatter: cellValue => {
return cellValue.shelvesStatus== 1001 ? '上架': '下架'
return cellValue.shelvesStatus== 1001 ? '可上架': '可下架'
}
}
]
......@@ -203,7 +203,7 @@ export default {
// 确认批量改价弹框
confirmPriceChange(e){
this.batchPrice = e
if(!this.batchPrice) return this.$message.error('请输入大于0的金额')
if(!(+this.batchPrice)) return this.$message.error('请输入大于0的金额')
this.setPriceFn({}, {}, true)
this.handleClose()
},
......@@ -226,6 +226,12 @@ export default {
modifyPriceRequestList : list.map(item => {return { id: item.id, salePrice: this.batchPrice}})
}
}else{
if(!(+e.target.value)){
this.handleClose()
this.handleSearch()
this.$message.error('请输入大于0的金额')
return
}
params = {
modifyPriceRequestList: [{
id: item.id,
......@@ -237,8 +243,8 @@ export default {
if(res){
this.$message.success('操作成功')
this.handleClose()
this.handleReset()
}
this.handleSearch()
})
},
// 点击批量上架
......@@ -279,7 +285,7 @@ export default {
handleReset(){
this.goodsFormObj = {
goodsPosition: 1,
info: '',
goodsSkuName: '',
categoryCode: [],
shelvesStatus: '',
startSellPrice: '',
......
......@@ -3,19 +3,24 @@
<div class="ctnr">
<div class="stutas-wrap">
<span>售后状态:</span>
<span class="stutas-circle"></span>
<span>售后中</span>
<span class="stutas-circle" :style="{backgroundColor: orderInfo.refundStatus==1006 ? '#2CCA74': '#5850FF'}"></span>
<span>{{ orderInfo.refundStatus==1006 ? '售后完成': '售后中'}}</span>
</div>
<div class="info-wrap order-info">
<div class="title">售后信息</div>
<div class="detail">
<glsxCombiForm ref="editFormRef" labelWidth="154px" defaultWidth="214px" :formObj="editForm" :formData="editFormData"></glsxCombiForm>
<glsxCombiForm ref="editFormRef" labelWidth="154px" defaultWidth="214px" :formObj="orderInfo" :formData="editFormData">
<div slot="addDescImgSlot" class="addDescImgSlot">
<img v-for="(item,index) in orderInfo.imgUrlList" :key="index" :src="item" alt="">
<span v-if="orderInfo.imgUrlList.length==0">--</span>
</div>
</glsxCombiForm>
</div>
</div>
<div class="info-wrap">
<div class="title">商品信息</div>
<div class="detail">
<GLTable ref="goodsTableRef" :tableParams="tableParams" :getListApi="getListApi">
<GLTable :hasPage="false" ref="goodsTableRef" :tableParams="tableParams" :tableData="orderInfo.goodsInfoTableDate">
</GLTable>
</div>
......@@ -23,7 +28,7 @@
<div class="info-wrap">
<div class="title">商品寄回</div>
<div class="detail">
<GLTable ref="shipmentsRef" :tableParams="shipmentsParams" :getListApi="getListApi">
<GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.expressInfo">
</GLTable>
</div>
......@@ -33,6 +38,9 @@
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
const reasonObj = {1001:'商品无货',1002:'发货时间问题',1003:'不想要了/不喜欢',1004:'商品信息填写错误',1005:'地址信息填写错误',1006:'商品降价',1007:'其他',1008:'尺码不合适',1009:'无理由退货',1010:'发票问题',1011:'商品与页面描述不符',1012:'发错货',1013:'质量问题',1014:'买错尺码/颜色/型号',1015:'商品缺少或破损',1016:'买错了'}
const refundStatusObj = {1000:'待审核',1001: '审核通过',1002: '已收货',1003: '已退款',1004: '已生成新订单',1005: '审核不通过'}
export default {
name: 'goodsOrderDetail',
data() {
......@@ -40,21 +48,22 @@ export default {
editForm: {
name: 123
},
orderInfo: {},
shipmentsParams: {
listName: 'shipments',
tableOption: false,
tableColumns: [
{
label: '快递公司',
prop: 'price'
prop: 'expressName'
},
{
label: '快递单号',
prop: 'effectiveDays'
prop: 'expressNo'
},
{
label: '寄回时间',
prop: 'effectiveDays'
prop: 'refundedDate'
}
]
},
......@@ -64,76 +73,74 @@ export default {
tableColumns: [
{
label: '商品名称',
prop: 'goodsName'
prop: 'goodsName',
formatter: cell => {
return cell.brandName + cell.goodsSkuName
}
},
{
label: '申请数量',
prop: 'price'
prop: 'applyQty'
},
{
label: '申请金额 (元)',
prop: 'price'
prop: 'refundPrice'
},
{
label: '平台订单编号',
prop: 'effectiveDays'
prop: 'tparReturnOrderCode'
},
{
label: '订单状态',
prop: 'effectiveDays'
prop: 'refundStatus'
}
]
},
editFormData: [
{
label: '第三方售后编号',
name: 'name',
name: 'thirdSubOrderCode',
type: 'showTxt'
},
{
label: '平台订单编号',
name: 'remarkName',
name: 'tparReturnOrderCode',
type: 'showTxt'
},
{
label: '申请时间',
name: 'name',
name: 'createdDate',
type: 'showTxt'
},
{
label: '售后类型',
name: 'stock',
name: 'returnType',
type: 'showTxt'
},
{
label: '售后原因',
name: 'stock',
name: 'returnReasonType',
type: 'showTxt'
},
{
label: '用户名称',
name: 'name',
name: 'accountName',
type: 'showTxt'
},
{
label: '用户手机号',
name: 'stock',
type: 'showTxt'
},
{
label: '用户手机号',
name: 'name',
name: 'customerPhone',
type: 'showTxt'
},
{
label: '申请描述',
name: 'stock',
name: 'returnContent',
type: 'showTxt'
},
{
label: '描述图片',
name: 'name',
type: 'showTxt'
name: 'imgUrlList',
addHtml: 'addDescImgSlot'
}
]
}
......@@ -154,10 +161,14 @@ export default {
this.$apis.platformGoods.getSaleOrderDetail({afterSalesOrderCode:id}).then(res =>{
console.log(res)
if(res?.id){
const {receiveName, receiveMobile, provinceName, cityName, townName, address}= res?.receiveAddress || {}
res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}`
res.addInfo = res.addInfo.replaceAll('null','')
res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : []
let {applyQty, refundPrice, refundStatus, tparReturnOrderCode, returnType, returnReasonType, refundedDate} = res || {}
const {brandName, goodsSkuName} = res.orderGoods || {}
res.returnType = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'}[returnType] || '--'
res.returnReasonType = reasonObj[returnReasonType]
refundStatus = refundStatusObj[refundStatus] || '--'
res.goodsInfoTableDate = [{brandName, goodsSkuName,applyQty,refundPrice, refundStatus, tparReturnOrderCode}]
res.refundedDate = refundedDate ? util.dateFormat(refundedDate, 'YYYY-MM-DD HH:mm:ss') : '--'
res.expressInfo = [{expressName: res.expressName, expressNo: res.expressNo, refundedDate: res.refundedDate}]
this.orderInfo = res
}
})
......@@ -200,6 +211,13 @@ export default {
}
.detail{
padding: 20px;
.addDescImgSlot{
img{
width: 36px;
height: 36px;
margin-right: 8px;
}
}
}
}
.order-info{
......
......@@ -10,7 +10,7 @@
<div class="table-wrap">
<GLTable ref="tableRef" :pageConf="pageConf" :searchForm="orderFormObj" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt="">{{ scope.scope.goodsSkuName }}
<img v-if="scope.scope.goodsImageUrl" :src="scope.scope.goodsImageUrl" alt="">{{ scope.scope.goodsSkuName || '--' }}
</div>
<div slot="userInfoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">{{ scope.scope.receiveName || '--' }}</p>
......@@ -21,8 +21,8 @@
<span>{{ scope.scope.refundStatus==1006 ? '售后完成': '售后中' }}</span>
</div>
<div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p>
<p class="name">平台:{{ scope.scope.orderCode || '--'}}</p>
<p class="name">第三方:{{ scope.scope.returnOrderCode || '--' }}</p>
<p class="name">平台:{{ scope.scope.tparReturnOrderCode || '--'}}</p>
</div>
<div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
......@@ -224,7 +224,7 @@ export default {
})
},
goOrderDetaillPage(item){
this.$router.push({ path: `/saleOrder/detail/${item.subOrderCode}`})
this.$router.push({ path: `/saleOrder/detail/${item.tparReturnOrderCode}`})
},
}
}
......
......@@ -92,7 +92,7 @@ export default {
pageNum: 1
},
goodsFormObj: {
info: '',
goodsSkuName: '',
categoryCode: '',
priceOrderType: '',
startSellPrice: '',
......@@ -103,7 +103,7 @@ export default {
goodsFormData: [
{
label: '商品信息',
name: 'info',
name: 'goodsSkuName',
placeholder: '商品名称/spu/sku/品牌名称',
type: 'input',
maxlength: 50,
......@@ -163,8 +163,9 @@ export default {
},
getGoodsList(){
const { pageSize, pageNum } = this.pageObj
const { info, categoryCode, priceOrderType, startSellPrice, endSellPrice, endDiffPrice, startDiffPrice } = this.goodsFormObj
const { goodsSkuName, categoryCode, priceOrderType, startSellPrice, endSellPrice, endDiffPrice, startDiffPrice } = this.goodsFormObj
const params = {
goodsSkuName,
priceOrderType,
startSellPrice,
endSellPrice,
......@@ -196,7 +197,7 @@ export default {
},
handleReset(){
this.goodsFormObj = {
info: '',
goodsSkuName: '',
categoryCode: '',
priceOrderType: '',
startSellPrice: '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!