Commit da0b845d by 前端

Merge branch 'SAAS+V5.5.0' into 'master'

上线合并

See merge request !22
2 parents 0c35c54d 03f6f08b
...@@ -379,7 +379,8 @@ const refundSave = params => { ...@@ -379,7 +379,8 @@ const refundSave = params => {
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
...@@ -406,4 +407,29 @@ const refundExport = params => { ...@@ -406,4 +407,29 @@ const refundExport = params => {
sign: true sign: true
}) })
} }
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockCount, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingCount, getGoodsWarehousingList, getMerchantGoodsStockMonthCount, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper, exportStatementOfAccount, getRoleTechnician, technicianUpdate, refundDetailPage, refundSave, refundPage, refundExport }
// 退货管理 - 提交审核/作废
const refundUpdateStatus = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path3}stock.refund.updateStatus`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 退货管理 - 获取退货单详情
const refundDetail = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path3}stock.refund.getDetail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockCount, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingCount, getGoodsWarehousingList, getMerchantGoodsStockMonthCount, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper, exportStatementOfAccount, getRoleTechnician, technicianUpdate, refundDetailPage, refundSave, refundPage, refundExport, refundUpdateStatus, refundDetail }
...@@ -50,8 +50,9 @@ ...@@ -50,8 +50,9 @@
v-if="item.type === 'textarea'" v-if="item.type === 'textarea'"
type="textarea" type="textarea"
v-model.trim="formData[item.name]" v-model.trim="formData[item.name]"
:style="{'width': item.width || formItemWidth}"
:placeholder="item.label" :placeholder="item.label"
:rows="4" :rows="item.rows || 4"
:maxlength="item.maxlength" :maxlength="item.maxlength"
show-word-limit /> show-word-limit />
<!-- 选择框 --> <!-- 选择框 -->
...@@ -384,7 +385,7 @@ ...@@ -384,7 +385,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-form-item style="margin-top: 40px;text-align: center;"> <el-form-item style="margin-top: 40px;text-align: center;" v-if="isShowBtn">
<el-button type="primary" <el-button type="primary"
@click="handleUp" @click="handleUp"
class="ok-btn"> class="ok-btn">
...@@ -519,6 +520,10 @@ export default { ...@@ -519,6 +520,10 @@ export default {
} }
} }
}, },
isShowBtn: {
type: Boolean,
default: true
},
formItemWidth: { formItemWidth: {
type: String, type: String,
default: '100%' default: '100%'
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<div slot="auth-button" <div slot="auth-button"
slot-scope="scope"> slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="cancelAllocation(scope.row, scope.$index)">取消</el-button> @click="cancelAllocation(scope.scope, scope.index)">取消</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -271,7 +271,9 @@ export default { ...@@ -271,7 +271,9 @@ export default {
{ {
name: 'remark', name: 'remark',
label: '备注说明', label: '备注说明',
width: '432px',
type: 'textarea', type: 'textarea',
rows: 5,
maxlength: 100 maxlength: 100
} }
] ]
...@@ -526,7 +528,8 @@ export default { ...@@ -526,7 +528,8 @@ export default {
// 取消 // 取消
cancelAllocation(row, index) { cancelAllocation(row, index) {
this.chooseDataList.splice(index, 1) console.log(row, index)
this.chooseDataList = this.chooseDataList.filter(item => item.id != row.id)
}, },
handleAddConfirm(data) { handleAddConfirm(data) {
......
const refundStatusList = [
{
confId: 1,
confLabel: '待提交'
},
{
confId: 2,
confLabel: '待总部审核'
},
{
confId: 3,
confLabel: '驳回待提交'
},
{
confId: 4,
confLabel: '总部审核通过'
},
{
confId: 5,
confLabel: '作废'
}
]
export default {
refundStatusList
}
<!-- 退货详情弹窗弹窗 --> <!-- 退货详情弹窗弹窗 -->
<template> <template>
<GLDialog bigTitle="详细信息" <GLDialog bigTitle="详细信息" width="1500px" :visible.sync="detailVisible" :hasFooter="false" :before-close="handleClose" class="detailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
width="1500px"
:visible.sync="detailVisible"
:hasFooter="false"
:before-close="handleClose"
class="detailDailog"
mode="big"
okText="关闭"
@onCancel="handleClose"
@onOk="handleClose">
<div> <div>
<div class="header" <div>
slot="header" 单据状态:
style="padding: 10px 20px"> <span :class="refundClassName()" />
{{ baseData.refundStatusList.find(item => item.confId == recordInfo.refundStatus)?.confLabel || '-' }}
</div>
<div class="header" slot="header" style="padding: 10px 20px">
<!-- <GLCombiForm ref="showSearch" <!-- <GLCombiForm ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
...@@ -21,20 +15,12 @@ ...@@ -21,20 +15,12 @@
:form-data="showFormData"></GLCombiForm> --> :form-data="showFormData"></GLCombiForm> -->
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<GLTable ref="recordTable" <GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
:getListApi="getListApi" <template slot="profitAndLoss" slot-scope="scope">
:searchForm="searchFormSearch"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
<template slot="profitAndLoss"
slot-scope="scope">
<span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0"> <span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0">
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" <span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
style="color: blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span> <span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" <span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
style="color: red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
<span
v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
</span> </span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
...@@ -46,6 +32,7 @@ ...@@ -46,6 +32,7 @@
<script> <script>
// import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
import constData from './constant/data.js'
export default { export default {
name: 'DetailDialog', name: 'DetailDialog',
data() { data() {
...@@ -110,7 +97,9 @@ export default { ...@@ -110,7 +97,9 @@ export default {
} }
] ]
}, },
baseData: {} baseData: {
refundStatusList: constData.refundStatusList
}
} }
}, },
...@@ -137,13 +126,24 @@ export default { ...@@ -137,13 +126,24 @@ export default {
}) })
}, },
refundClassName() {
console.log(this.recordInfo.refundStatus)
return {
1: 'yellowSpot',
2: 'yellowSpot',
3: 'redSpot',
4: 'greenSpot',
5: 'ashSpot'
}[this.recordInfo.refundStatus]
},
handleClose() { handleClose() {
this.$emit('dialogClose') this.$emit('dialogClose')
} }
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.count-txt { .count-txt {
font-weight: 700; font-weight: 700;
color: #2a58ad; color: #2a58ad;
...@@ -154,4 +154,30 @@ export default { ...@@ -154,4 +154,30 @@ export default {
margin-top: 20vh !important; margin-top: 20vh !important;
min-width: 700px; min-width: 700px;
} }
@mixin spotBase {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 5px;
display: inline-block;
}
.ashSpot {
@include spotBase();
background: #c6c8cc;
}
.greenSpot {
@include spotBase();
background: #2cca74;
}
.yellowSpot {
@include spotBase();
background: #fdb757;
}
.redSpot {
@include spotBase();
background: #eb4e4e;
}
</style> </style>
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>退货列表</h2> <h2>退货列表</h2>
<div> <div>
<GLButton type="primary" <GLButton type="primary" plain size="small" @click="handleAdd" fn="创建退货">创建退货</GLButton>
plain <el-button size="small" @click="exportExcel">导出</el-button>
size="small"
@click="handleAdd"
fn="创建退货">创建退货</GLButton>
<el-button size="small"
@click="exportExcel">导出</el-button>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="checkRef" <GLTable ref="checkRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
:getListApi="getListApi" <template slot="refundStatus" slot-scope="scope">
:noDataImg="url" <div>
:searchForm="tableSearchForm" <span :class="tableParams.tableColumns[refundStatusIdx].className(scope.scope)" />
:tableParams="tableParams" <span>{{ tableParams.tableColumns[refundStatusIdx].formatter(scope.scope) }}</span>
:pageConf="pageConf" </div>
:beforeSearchFn="beforeSearchFn" </template>
@setTableFinishFun="setTableFinishFun"> <div slot="img" slot-scope="scope" v-if="scope.scope.voucherPic">
<div slot="img" <img class="img-36" :src="scope.scope.voucherPic" @click="handleEnlargeImg(scope.scope.voucherPic)" />
slot-scope="scope"
v-if="scope.scope.voucherPic">
<img class="img-36"
:src="scope.scope.voucherPic"
@click="handleEnlargeImg(scope.scope.voucherPic)" />
</div> </div>
<div class="table-btns" <div class="table-btns" slot="auth-button" slot-scope="scope">
slot="auth-button" <!-- <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> -->
slot-scope="scope"> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope"></GLTableButton>
<el-button type="text"
@click="handleDetail(scope.scope)">查看</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 预览图片 --> <!-- 预览图片 -->
<el-dialog :visible="imgVisible" <el-dialog :visible="imgVisible" :before-close="handleCloseImg">
:before-close="handleCloseImg"> <img width="100%" :src="previewImgUrl" alt="图片" />
<img width="100%"
:src="previewImgUrl"
alt="图片" />
</el-dialog> </el-dialog>
<!-- 查看 --> <!-- 查看 -->
<detailDialog :detail-visible="detailVisible" <detailDialog :detail-visible="detailVisible" :recordInfo="recordInfo" v-if="detailVisible" @dialogClose="dialogClose" />
:recordInfo="recordInfo"
v-if="detailVisible"
@dialogClose="dialogClose" />
</div> </div>
</template> </template>
...@@ -64,6 +41,7 @@ ...@@ -64,6 +41,7 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
// import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
import constData from './constant/data.js'
import detailDialog from './detailDialog' import detailDialog from './detailDialog'
export default { export default {
name: 'warehousing', name: 'warehousing',
...@@ -79,7 +57,8 @@ export default { ...@@ -79,7 +57,8 @@ export default {
refundTime: '', refundTime: '',
refundCode: '', refundCode: '',
yqMerchantId: '', yqMerchantId: '',
merchantId: '' merchantId: '',
refundStatus: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
recordInfo: {}, recordInfo: {},
...@@ -122,6 +101,15 @@ export default { ...@@ -122,6 +101,15 @@ export default {
optionId: 'merchantId', optionId: 'merchantId',
optionLabel: 'merchantName', optionLabel: 'merchantName',
optionsName: 'merchantIdList' optionsName: 'merchantIdList'
},
{
label: '单据状态',
name: 'refundStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'refundStatusList'
} }
], ],
// 表格 // 表格
...@@ -132,11 +120,13 @@ export default { ...@@ -132,11 +120,13 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '退货单号', label: '退货单号',
prop: 'refundCode' prop: 'refundCode',
width: 180
}, },
{ {
label: '退货时间', label: '退货时间',
prop: 'refundTime', prop: 'refundTime',
width: 180,
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.refundTime).format('YYYY-MM-DD HH:mm:ss') return dayjs(cellValue.refundTime).format('YYYY-MM-DD HH:mm:ss')
} }
...@@ -161,6 +151,24 @@ export default { ...@@ -161,6 +151,24 @@ export default {
prop: 'merchantName' prop: 'merchantName'
}, },
{ {
label: '单据状态',
prop: 'refundStatus',
width: 150,
addHtml: 'refundStatus',
formatter: cellValue => {
return this.baseData.refundStatusList.find(item => item.confId === cellValue.refundStatus)?.confLabel || '-'
},
className: cellValue => {
return {
1: 'yellowSpot',
2: 'yellowSpot',
3: 'redSpot',
4: 'greenSpot',
5: 'ashSpot'
}[cellValue.refundStatus]
}
},
{
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
width: 200, width: 200,
...@@ -173,7 +181,85 @@ export default { ...@@ -173,7 +181,85 @@ export default {
} }
] ]
}, },
refundStatusIdx: 6,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleDetail(row)
}
},
{
type: 'GLButton',
name: '提交审核',
attrs: {
type: 'text',
fn: '提交审核'
},
condition: row => {
return [1, 3].includes(row.refundStatus)
},
listeners: {
click: row => {
this.$confirm('退货申请单,确认提交申请?', '提交确定', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row)
this.updateStatus(row, 2, '提交审核成功')
})
.catch(() => { })
}
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
condition: row => {
return [1, 3].includes(row.refundStatus)
},
listeners: {
click: row => this.handleEdit(row)
}
},
{
type: 'GLButton',
name: '作废',
attrs: {
type: 'text',
fn: '作废'
},
condition: row => {
return [1, 3].includes(row.refundStatus)
},
listeners: {
click: row => {
this.$confirm('作废后无法恢复退货单,是否确认作废?', '退货申请作废确定', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row)
this.updateStatus(row, 5, '作废成功')
})
.catch(() => { })
}
}
}
],
// 基本数据 // 基本数据
baseData: { baseData: {
yqMerchantList: [], yqMerchantList: [],
...@@ -187,13 +273,18 @@ export default { ...@@ -187,13 +273,18 @@ export default {
confId: 2, confId: 2,
confLabel: '呆滞退货' confLabel: '呆滞退货'
} }
] ],
refundStatusList: constData.refundStatusList
}, },
imgVisible: false, imgVisible: false,
previewImgUrl: '' previewImgUrl: ''
} }
}, },
created() {
this.refundStatusIdx = this.tableParams.tableColumns.findIndex(item => item.prop === 'refundStatus')
},
mounted() { mounted() {
// 获取当前登录账号可见的园区店列表 // 获取当前登录账号可见的园区店列表
this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => { this.$apis.stockManage.getyqMerchantList({ mainPartnerMerchant: true }).then(res => {
...@@ -243,8 +334,37 @@ export default { ...@@ -243,8 +334,37 @@ export default {
this.recordInfo = row this.recordInfo = row
this.detailVisible = true this.detailVisible = true
}, },
updateStatus(row, refundStatus, okMessage = '提交成功') {
this.$apis.stockManage
.refundUpdateStatus({
id: row.id,
refundStatus
})
.then(res => {
this.$notify({
message: res.code == '0' ? okMessage : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$refs.checkRef.refreshTable()
})
},
handleAdd() { handleAdd() {
this.$router.push({ path: '/sendBack/add' }) this.$router.push({
path: '/sendBack/add',
query: {
$title: '创建退货'
}
})
},
handleEdit(row) {
this.$router.push({
path: '/sendBack/add',
query: {
$title: '编辑退货',
row: row
}
})
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
...@@ -290,7 +410,8 @@ export default { ...@@ -290,7 +410,8 @@ export default {
refundTime: '', refundTime: '',
refundCode: '', refundCode: '',
yqMerchantId: '', yqMerchantId: '',
merchantId: '' merchantId: '',
refundStatus: ''
} }
this.showFormData[this.findFormIdx('merchantId')].optionList = [] this.showFormData[this.findFormIdx('merchantId')].optionList = []
this.handleSearch() this.handleSearch()
...@@ -331,4 +452,30 @@ export default { ...@@ -331,4 +452,30 @@ export default {
} }
} }
} }
@mixin spotBase {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 5px;
display: inline-block;
}
.ashSpot {
@include spotBase();
background: #c6c8cc;
}
.greenSpot {
@include spotBase();
background: #2cca74;
}
.yellowSpot {
@include spotBase();
background: #fdb757;
}
.redSpot {
@include spotBase();
background: #eb4e4e;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!