Commit 67be202f by 前端

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

上线合并

See merge request !23
2 parents da0b845d 3eb89c51
...@@ -195,6 +195,44 @@ const stockAllocateDetailPage = params => { ...@@ -195,6 +195,44 @@ const stockAllocateDetailPage = params => {
sign: true sign: true
}) })
} }
// 调拨详情
const stockAllocateInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.h5.detail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 更新调拨单
const updateStockAllocate = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.update`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 更新调拨单状态
const updateStockAllocateStatus = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.stock.allocate.updateStatus`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//导出 //导出
const exportExcel = params => { const exportExcel = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -270,7 +308,8 @@ const saveStockAllocate = params => { ...@@ -270,7 +308,8 @@ const saveStockAllocate = 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
}) })
} }
...@@ -432,4 +471,43 @@ const refundDetail = params => { ...@@ -432,4 +471,43 @@ const refundDetail = 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, refundUpdateStatus, refundDetail } export default {
inventoryWarningList,
exportaInventExcel,
exportaAllocateExcel,
exportCheckExcel,
exportReduceExcel,
exportMerchantExcel,
exportExcel,
saveStockAllocate,
stockAllocateDetailPage,
stockAllocateInfo,
updateStockAllocate,
updateStockAllocateStatus,
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
}
$color-yellow:#fdb757; $color-yellow:#F59619;
$color-green:#2cca74; $color-green:#2cca74;
$color-gray:#999; $color-gray:#B8B8B8;
$color-red:#EB4E4E;
//背景图片 100% //背景图片 100%
@mixin bkgMaxSize($url) { @mixin bkgMaxSize($url) {
background-image: url($url); background-image: url($url);
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
:style="{'margin-bottom': !item.type ? '0px' : '22px'}"> :style="{'margin-bottom': !item.type ? '0px' : '22px'}">
<el-input v-if="item.type === 'input'" <el-input v-if="item.type === 'input'"
v-model.trim="formData[item.name]" v-model.trim="formData[item.name]"
:placeholder="item.label" :placeholder="item.placeholder || '请输入' + item.label"
:maxlength="item.maxlength" :maxlength="item.maxlength"
:style="{'width': item.width || formItemWidth}" :style="{'width': item.width || formItemWidth}"
:disabled="item.isDisabled" :disabled="item.isDisabled"
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
type="textarea" type="textarea"
v-model.trim="formData[item.name]" v-model.trim="formData[item.name]"
:style="{'width': item.width || formItemWidth}" :style="{'width': item.width || formItemWidth}"
:placeholder="item.label" :placeholder="item.placeholder || '请输入' + item.label"
:rows="item.rows || 4" :rows="item.rows || 4"
:maxlength="item.maxlength" :maxlength="item.maxlength"
show-word-limit /> show-word-limit />
......
<!-- 盘点详情弹窗弹窗 --> <!-- 盘点详情弹窗弹窗 -->
<template> <template>
<GLDialog bigTitle="详细信息" <GLDialog bigTitle="详细信息" width="1008px" :visible.sync="allocationDetailVisible" class="inventoryDetailDailog" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose" :before-close="handleClose" :hasFooter="false">
width="1500px"
:visible.sync="allocationDetailVisible"
class="inventoryDetailDailog"
mode="big"
okText="关闭"
@onCancel="handleClose"
@onOk="handleClose"
:before-close="handleClose"
:hasFooter="false">
<div> <div>
<div>
单据状态:
<span :class="billStatusName()" style="margin-right: 4px;" />
{{ baseData.billStatusObj[allocationInfo.billStatus]?.name || '-' }}
</div>
<div class="receipt-box">
<div v-for="(item, index) in infoForm" :class="item.class" :key="index">
<span :style="{ 'flex-shrink': 0, display: 'inline-block', ...item.labelStyle }">{{ item.label }}</span>
<el-tooltip v-if="allocationInfo[item.name]" class="item" effect="light" :content="allocationInfo[item.name]" placement="top">
<span class="ellipsis">{{ allocationInfo[item.name] }}</span>
</el-tooltip>
<span v-else>-</span>
</div>
</div>
<div class="header" slot="header" style="padding: 10px 20px"></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" :pageConf="pageConf"></GLTable>
:getListApi="getListApi"
:searchForm="searchFormSearch"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn"></GLTable>
</div> </div>
</div> </div>
<!-- <span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
...@@ -27,11 +29,17 @@ ...@@ -27,11 +29,17 @@
<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: 'allocationDetailDialog', name: 'allocationDetailDialog',
data() { data() {
return { return {
// membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
infoForm: [
{ name: 'receiver', label: '收货人:', class: 'receiver', labelStyle: { width: '56px' } },
{ name: 'phone', label: '收货人电话:', class: 'phone', labelStyle: { width: '84px' } },
{ name: 'address', label: '收货地址:', class: 'address', labelStyle: { width: '70px' } }
],
searchForm: { searchForm: {
id: '' id: ''
}, },
...@@ -82,7 +90,10 @@ export default { ...@@ -82,7 +90,10 @@ export default {
} }
] ]
}, },
baseData: {} pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {
billStatusObj: constData.billStatusObj
}
} }
}, },
...@@ -111,13 +122,19 @@ export default { ...@@ -111,13 +122,19 @@ export default {
}) })
}, },
billStatusName() {
console.log(this.allocationInfo.billStatus)
return this.baseData.billStatusObj[this.allocationInfo.billStatus]?.class || '-'
},
handleClose() { handleClose() {
this.$emit('dialogClose') this.$emit('dialogClose')
} }
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.count-txt { .count-txt {
font-weight: 700; font-weight: 700;
color: #2a58ad; color: #2a58ad;
...@@ -128,4 +145,58 @@ export default { ...@@ -128,4 +145,58 @@ export default {
margin-top: 20vh !important; margin-top: 20vh !important;
min-width: 700px; min-width: 700px;
} }
/* 深度选择器不生效时,可改用 ::v-deep 或 :deep() 写法 */
.inventoryDetailDailog {
/deep/.el-dialog__body {
max-height: 660px;
}
}
.receipt-box {
display: flex;
margin-top: 9.5px;
color: #666666;
font-size: 14px;
line-height: 16px;
.receiver {
display: flex;
width: 210px;
margin-right: 20px;
}
.phone {
display: flex;
width: 257px;
margin-right: 20px;
}
.address {
display: flex;
width: 461px;
}
.ellipsis {
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.greenSpot {
@include dot;
background: $color-green;
}
.yellowSpot {
@include dot;
background: $color-yellow;
}
.ashSpot {
@include dot;
background: $color-gray;
}
.redSpot {
@include dot;
background: $color-red;
}
</style> </style>
<!-- 盘点 --> <!-- 盘点 -->
<template> <template>
<GLDialog title="调拨" :visible.sync="allocationNumVisible" class="allocationNumDailog" okText="确定" @onCancel="handleClose" @onOk="handleAddConfirm"> <GLDialog title="调拨" :visible.sync="allocationNumVisible" :before-close="e => handleClose(undefined, true)" class="allocationNumDailog" okText="确定" @onCancel="e => handleClose(e, true)" @onOk="handleAddConfirm">
<div class="gl-form-page gl-form-min"> <div class="gl-form-page gl-form-min">
<el-form ref="allocationNumForm" size="small" :model="infoForm" :rules="formRules" label-width="154px"> <el-form ref="allocationNumForm" size="small" :model="infoForm" :rules="formRules" label-width="154px">
<el-form-item label="调拨数量:" prop="allocationNum"> <el-form-item label="调拨数量:" prop="allocationNum">
...@@ -38,18 +38,18 @@ export default { ...@@ -38,18 +38,18 @@ export default {
}, },
allocationInfo: { allocationInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
watch: {}, watch: {},
created() {}, created() { },
components: {}, components: {},
computed: {}, computed: {},
mounted() {}, mounted() { },
methods: { methods: {
handleUpgradeNum(newVal) { handleUpgradeNum(newVal) {
...@@ -66,8 +66,8 @@ export default { ...@@ -66,8 +66,8 @@ export default {
}) })
}, },
handleClose(info) { handleClose(info, isClose = false) {
this.$emit('dialogClose', info) this.$emit('dialogClose', isClose ? undefined : info)
} }
} }
} }
......
const billStatusList = [
{ confId: 0, confLabel: '待提交' },
{ confId: 1, confLabel: '运营审核' },
{ confId: 2, confLabel: '商务审核' },
{ confId: '4,6,7', confLabel: '审核驳回' },
{ confId: 5, confLabel: '审核通过' },
{ confId: -1, confLabel: '作废' }
]
const billStatusObj = {
0: {
class: 'yellowSpot',
name: '待提交'
},
1: {
class: 'yellowSpot',
name: '运营审核'
},
2: {
class: 'yellowSpot',
name: '商务审核'
},
4: {
class: 'redSpot',
name: '审核驳回'
},
5: {
class: 'greenSpot',
name: '审核通过'
},
6: {
class: 'redSpot',
name: '审核驳回'
},
7: {
class: 'redSpot',
name: '审核驳回'
},
'-1': {
class: 'ashSpot',
name: '作废'
}
}
export default {
billStatusList,
billStatusObj
}
...@@ -13,8 +13,21 @@ ...@@ -13,8 +13,21 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="allocationRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="allocationRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="billStatus" slot-scope="scope">
<div>
<span :class="billStatusObj[scope.scope.billStatus]?.class || ''"></span>
<span>{{ scope.scope.billStatusName }}</span>
</div>
</template>
<template slot="deliveryStatus" slot-scope="scope">
<div>
<span :class="deliveryStatusObj[scope.scope.deliveryStatus]?.class || ''"></span>
<span>{{ scope.scope.deliveryStatusName }}</span>
</div>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> <!-- <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -25,6 +38,7 @@ ...@@ -25,6 +38,7 @@
</template> </template>
<script> <script>
import constData from './constant/data.js'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import allocationDetailDialog from './allocationDetailDialog' import allocationDetailDialog from './allocationDetailDialog'
...@@ -43,11 +57,28 @@ export default { ...@@ -43,11 +57,28 @@ export default {
callOutYqMerchantId: '', callOutYqMerchantId: '',
callInYqMerchantId: '', callInYqMerchantId: '',
callOutMerchantId: '', callOutMerchantId: '',
callInMerchantId: '' callInMerchantId: '',
billStatusList: '',
deliveryStatus: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
allocationInfo: {}, allocationInfo: {},
allocationDetailVisible: false, allocationDetailVisible: false,
billStatusObj: constData.billStatusObj,
deliveryStatusObj: {
1: {
class: 'ashSpot',
name: '待发货'
},
2: {
class: 'greenSpot',
name: '全部发货'
},
3: {
class: 'yellowSpot',
name: '部分发货'
}
},
showFormData: [ showFormData: [
{ {
label: '调拨单号', label: '调拨单号',
...@@ -110,6 +141,24 @@ export default { ...@@ -110,6 +141,24 @@ export default {
optionId: 'merchantId', optionId: 'merchantId',
optionLabel: 'merchantName', optionLabel: 'merchantName',
optionsName: 'inMerchantList' optionsName: 'inMerchantList'
},
{
label: '单据状态',
name: 'billStatusList',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'billStatusList'
},
{
label: '发货状态',
name: 'deliveryStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'deliveryStatusList'
} }
], ],
// 表格 // 表格
...@@ -121,14 +170,25 @@ export default { ...@@ -121,14 +170,25 @@ export default {
{ {
label: '调拨单号', label: '调拨单号',
prop: 'allocateCode', prop: 'allocateCode',
width: 200 width: 111
},
{
label: '单据时间',
prop: 'submitTime',
width: 112
},
{
label: '单据状态',
prop: 'billStatusName',
addHtml: 'billStatus',
width: 130
}, },
{ {
label: '调拨时间', label: '调拨时间',
prop: 'allocateTime', prop: 'allocateTime',
width: 170, width: 112,
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.allocateTime).format('YYYY-MM-DD HH:mm:ss') return cellValue.allocateTime ? dayjs(cellValue.allocateTime).format('YYYY-MM-DD HH:mm:ss') : '--'
} }
}, },
{ {
...@@ -159,27 +219,135 @@ export default { ...@@ -159,27 +219,135 @@ export default {
{ {
label: '承运单号', label: '承运单号',
prop: 'deliveryNumber', prop: 'deliveryNumber',
width: 150 width: 150,
line: 1
}, },
{ {
label: '承运公司', label: '承运公司',
prop: 'deliveryCompany', prop: 'deliveryCompany',
width: 150 width: 150,
line: 1
},
{
label: '发货状态',
prop: 'deliveryStatusName',
addHtml: 'deliveryStatus',
width: 130
}, },
{ {
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
width: 200, width: 200,
line: 1 line: 1
},
{
label: '收货人',
prop: 'receiver',
width: 200,
line: 1
},
{
label: '收货人电话',
prop: 'phone',
width: 140
},
{
label: '收货地址',
prop: 'address',
width: 200,
line: 1
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
condition: row => {
return [0].includes(row.billStatus)
},
listeners: {
click: row => this.handleEdit(row)
}
},
{
type: 'GLButton',
name: '提交审核',
attrs: {
type: 'text',
fn: '提交审核'
},
condition: row => {
return [0].includes(row.billStatus)
},
listeners: {
click: row => {
this.$confirm('调拨申请单,确认提交申请?', '提交确定', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row)
this.updateStatus(row, 1, '提交审核成功')
})
.catch(() => { })
}
}
},
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleDetail(row)
}
},
{
type: 'GLButton',
name: '作废',
attrs: {
type: 'text',
fn: '作废'
},
condition: row => {
return [0].includes(row.billStatus)
},
listeners: {
click: row => {
this.$confirm('作废后无法恢复调拨单,是否确认作废?', '调拨申请作废确定', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row)
this.updateStatus(row, '-1', '作废成功')
})
.catch(() => { })
}
}
}
],
// 基本数据 // 基本数据
baseData: { baseData: {
yqRelatedMerchantList: [], yqRelatedMerchantList: [],
outMerchantList: [], //调出门店 outMerchantList: [], //调出门店
inMerchantList: [] //调入门店 inMerchantList: [], //调入门店
billStatusList: constData.billStatusList,
deliveryStatusList: [
{ confId: 1, confLabel: '未发货' },
{ confId: 3, confLabel: '部分发货' },
{ confId: 2, confLabel: '全部发货' }
]
}, },
imgVisible: false, imgVisible: false,
previewImgUrl: '' previewImgUrl: ''
...@@ -206,6 +374,17 @@ export default { ...@@ -206,6 +374,17 @@ export default {
params.allocateTimeEnd = new Date(this.searchForm.allocateTime[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.allocateTimeEnd = new Date(this.searchForm.allocateTime[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
delete params.allocateTime delete params.allocateTime
if (this.searchForm.billStatusList !== '' && this.searchForm.billStatusList !== null && this.searchForm.billStatusList !== undefined) {
if (String(this.searchForm.billStatusList).indexOf(',') !== -1) {
params.billStatusList = this.searchForm.billStatusList.split(',').map(item => Number(item))
} else {
params.billStatusList = [Number(this.searchForm.billStatusList)]
}
} else {
delete params.billStatusList
}
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -250,8 +429,36 @@ export default { ...@@ -250,8 +429,36 @@ export default {
this.allocationDetailVisible = true this.allocationDetailVisible = true
console.log(this.allocationDetailVisible) console.log(this.allocationDetailVisible)
}, },
updateStatus(row, billStatus, okMessage = '提交成功') {
this.$apis.stockManage
.updateStockAllocateStatus({
id: row.id,
billStatus
})
.then(res => {
this.$notify({
message: res.code == '0' ? okMessage : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$refs.allocationRef.refreshTable()
})
},
handleAdd() { handleAdd() {
this.$router.push({ path: '/allocation/add' }) this.$router.push({
path: '/allocation/add',
query: {
$title: '创建调拨'
}
})
},
handleEdit(row) {
this.$router.push({
path: '/allocation/add',
query: {
$title: '编辑调拨',
row: row
}
})
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
...@@ -299,7 +506,9 @@ export default { ...@@ -299,7 +506,9 @@ export default {
callOutYqMerchantId: '', callOutYqMerchantId: '',
callInYqMerchantId: '', callInYqMerchantId: '',
callOutMerchantId: '', callOutMerchantId: '',
callInMerchantId: '' callInMerchantId: '',
billStatusList: '',
deliveryStatus: ''
} }
this.showFormData[this.findFormIdx('callOutMerchantId')].optionList = [] this.showFormData[this.findFormIdx('callOutMerchantId')].optionList = []
this.showFormData[this.findFormIdx('callInMerchantId')].optionList = [] this.showFormData[this.findFormIdx('callInMerchantId')].optionList = []
...@@ -338,5 +547,25 @@ export default { ...@@ -338,5 +547,25 @@ export default {
color: #333; color: #333;
} }
} }
.greenSpot {
@include dot;
background: $color-green;
}
.yellowSpot {
@include dot;
background: $color-yellow;
}
.ashSpot {
@include dot;
background: $color-gray;
}
.redSpot {
@include dot;
background: $color-red;
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!