Commit 6e929fa4 by 前端

Merge branch 'dev_v4.7.2' into 'dev_v4.8.0'

Dev v4.7.2

See merge request !24
2 parents 761a6351 5cc315c6
......@@ -2,8 +2,18 @@
node_modules
/dist
/.history
<<<<<<< HEAD
<<<<<<< HEAD
/cache
/copyDirTarget
=======
/copyDirTarget
/cache
>>>>>>> dev_v4.7.1
=======
/copyDirTarget
/cache
>>>>>>> f81240335293fde6e6360bb9dc5570d1d01e7660
# Log files
npm-debug.log*
......
......@@ -10416,6 +10416,11 @@
}
}
},
"moment": {
"version": "2.29.3",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
......
import request from './request'
const path = 'dj.api.smartcarlife.'
//出库订单查询
export function getIssueOrder(data) {
data.method = `${path}goodsOrder.getIssueOrder`
return request(data, 'post')
}
//erp订单查询
export function getErpOrderDetail(data) {
data.method = `${path}goodsOrder.getErpOrderDetail`
return request(data, 'post')
}
//替换升级产品查询
export function getReplaceUpgrade(data) {
data.method = `${path}goodsOrder.getReplaceUpgrade`
return request(data, 'post')
}
//erp销售升级订单
export function ErpUpgradeSales(data) {
data.method = `${path}goodsOrder.ErpUpgradeSales`
return request(data, 'post')
}
......@@ -37,6 +37,7 @@ export function getServicerefApi(data) {
return request(data)
}
/** 服务商查询 */
export function getServiceListApi(data) {
data.method = `${path2}goodsOrderProfitAllocation.page.bySubOrder`
return request(data)
......
......@@ -328,6 +328,26 @@ export const withdrawChannelList = [
}
]
// 出库状态
export const warehouseStatusList = [
{
confId: 1,
confLabel: '待出库'
},
{
confId: 3,
confLabel: '出库中'
},
{
confId: 4,
confLabel: '出库成功'
},
{
confId: 5,
confLabel: '出库失败'
}
]
// 获取最近n个月,默认6个月
export function getCurrentSixMonth(n = 5) {
return [new Date(new Date().setMonth(new Date().getMonth() - n)), new Date()]
......
......@@ -260,6 +260,56 @@ export const Util = {
document.body.append(Temp)
Temp.click()
document.body.removeChild(Temp)
},
/**
* @param {Object} json
* @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写
* 将json的key值进行大小写转换
*/
jsonKeysToCase: function(json, type) {
if (typeof json == 'object') {
var tempJson = JSON.parse(JSON.stringify(json))
toCase(tempJson)
return tempJson
} else {
return json
}
function toCase(json) {
if (typeof json == 'object') {
if (Array.isArray(json)) {
json.forEach(function(item) {
toCase(item)
})
} else {
for (var key in json) {
var item = json[key]
if (typeof item == 'object') {
toCase(item)
}
delete json[key]
switch (type) {
case 1:
//key值全部大写
json[key.toLocaleUpperCase()] = item
break
case 2:
//key值首字母大写,其余小写
json[
key.substring(0, 1).toLocaleUpperCase() +
key.substring(1).toLocaleLowerCase()
] = item
break
default:
//默认key值全部小写
json[key.toLocaleLowerCase()] = item
break
}
}
}
}
}
}
}
......
......@@ -109,8 +109,8 @@ export default {
disabled: btn.ruleObj
? btn.ruleObj.hasOwnProperty('disabledStatusList')
? btn.ruleObj.disabledStatusList.includes(
data[btn.ruleObj.attr]
)
data[btn.ruleObj.attr]
)
: false
: false
},
......
<template>
<div class="row-center captcha_input_wrapper">
<input v-for="(item,index) in captchas"
:key="index"
v-model="item.num"
:id="'captcha'+index"
@input="inputFinash(index)"
@focus="adjust(index)"
@keydown="inputDirection(index)"
class="captcha_input_box row-center"
:style="customStyle"
type="tel"
maxlength="1" />
</div>
</template>
<script>
export default {
name: 'captchaInput',
props: {
customStyle: {
type: String,
required: false,
default: ''
},
captchasLenght: {
type: Number,
required: false,
default: 4
},
captchaList: {
type: String,
required: true
}
},
data() {
return {
// 当前输入框
activeInput: 0,
captchas: [
// { num: '' },
// { num: '' },
// { num: '' },
// { num: '' },
// { num: '' },
// { num: '' }
]
}
},
watch: {
'captchas': {
handler: function (value) {
console.log(value)
const str = value.map((item) => {
return item.num
}).join('')
this.$emit('update:captchaList', str)
},
deep: true
},
'captchasLenght': {
handler: function (value) {
for (let index = 0; index < this.captchasLenght; index++) {
// const element = array[index];
// list[index] = this.item
// this.captchas[index] = { num: '' }
this.$set(this.captchas, index, { num: '' })
}
},
immediate: true
}
},
computed: {
test() {
const list = []
for (let index = 0; index < this.captchasLenght; index++) {
// const element = array[index];
list[index] = this.item
}
return list
// return list.map((item) => {
// item = this.item
// return item
// })
}
},
methods: {
// 自动校准输入顺序
adjust(index) {
const dom = document.getElementById('captcha' + this.activeInput)
if (index !== this.activeInput && dom) {
dom.focus()
}
},
// 控制前后方向
inputDirection(index) {
const val = this.captchas[index].num
// debugger
console.log(event.keyCode)
// 回退键处理
if (event.keyCode == 8 && val == '') {
console.log(index)
// 重新校准
const dom = document.getElementById('captcha' + (index - 1))
// 解决第一位为-1 导致能选其他空的位置输入
index = index - 1
this.activeInput = index == -1 ? 0 : index
if (dom) dom.focus()
}
if (event.keyCode != 8 && val != '') {
const dom = document.getElementById('captcha' + (index + 1))
this.activeInput = index + 1
if (dom) dom.focus()
}
},
// 输入框相互联动
inputFinash(index) {
const val = this.captchas[index].num
this.activeInput = val ? index + 1 : index - 1
const dom = document.getElementById('captcha' + this.activeInput)
if (dom) dom.focus()
if (index == this.captchas.length - 1) {
const code = this.captchas.map((x) => x.num).join('')
if (code.length == 6) {
this.$emit('finish', code)
}
}
}
}
}
</script>
<style lang='scss'>
.row-center {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.captcha_input_wrapper {
width: 100%;
}
.captcha_input_box {
width: 48px;
height: 60px;
margin-right: 12px;
background: rgba(255, 255, 255, 1);
border-radius: 6px;
border: 1px solid #dddddd;
font-size: 40px;
text-align: center;
color: #1e243a;
}
</style>
......@@ -294,7 +294,17 @@
</el-table-column>
<!-- </el-table-column> -->
</el-table-column>
<el-table-column label="流量方"
<el-table-column prop="outboundStatus"
label="出库状态"
width="120"
align="center">
<template slot-scope="scope">
<span :class="outboundStatusClass[scope.row.outboundStatus]"></span>
<span>{{ outboundStatusShow[scope.row.outboundStatus] }}</span>
</template>
</el-table-column>
<el-table-column label="
4S店分账"
align="center">
<el-table-column prop="shopMerchantName"
label="流量方"
......@@ -504,8 +514,14 @@
</el-table-column>
<el-table-column align="center"
label="操作"
width="120"
fixed="right">
<template slot-scope="scope">
<el-button type="text"
size="mini"
style="margin-right: 10px;"
v-if="scope.row.hasOwnProperty('subOrderProfitAllocations') && scope.row.channelType == 2"
@click="exWarehouse(scope.row)">出库</el-button>
<auth-button :data="scope"></auth-button>
</template>
</el-table-column>
......@@ -523,6 +539,11 @@
<download-account-dialog :accountVisible="accountVisible"
v-if="accountVisible"
@accountClose="accountClose"></download-account-dialog>
<!-- 出库面板 -->
<warehouse-detail v-if="warehouseVisible"
:warehouseVisible="warehouseVisible"
:orderInfoId="orderId"
@handleDrawerClose="handleDrawerClose"></warehouse-detail>
</div>
</template>
......@@ -538,14 +559,17 @@ import { mapActions } from 'vuex'
import {
divisionTypeList,
payTypeList,
orderTypeList
orderTypeList,
warehouseStatusList
} from '@/common/constants.js'
import downloadAccountDialog from './downloadAccountDialog'
import warehouseDetail from './warehouseDetail'
import * as echarts from 'echarts'
export default {
name: 'financeList',
components: {
downloadAccountDialog
downloadAccountDialog,
warehouseDetail
},
data() {
......@@ -562,7 +586,8 @@ export default {
merchantId: '',
orderCode: '',
divisionType: '',
platformMerchantId: ''
platformMerchantId: '',
outboundStatus: ''
},
searchSelectObj: {
orderOrTrade: {
......@@ -670,6 +695,15 @@ export default {
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList'
},
{
label: '出库状态',
name: 'outboundStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'warehouseStatusList'
}],
tableData: [],
......@@ -678,6 +712,7 @@ export default {
storeIdList: [],
divisionTypeList: _.cloneDeep(divisionTypeList),
orderTypeList: _.cloneDeep(orderTypeList),
warehouseStatusList: _.cloneDeep(warehouseStatusList),
PlatformMerchantList: []
},
total: 0,
......@@ -698,7 +733,23 @@ export default {
toShopTransfer: '',
upgradeTransfer: ''
},
accountVisible: false
accountVisible: false,
warehouseVisible: false,
orderId: '',
outboundStatusShow: {
'1': '待出库',
'2': '待出库',
'3': '出库中',
'4': '已出库',
'5': '出库失败'
},
outboundStatusClass: {
'1': 'ashSpot',
'2': 'ashSpot',
'3': 'yellowSpot',
'4': 'greenSpot',
'5': 'redSpot'
}
}
},
......@@ -760,7 +811,8 @@ export default {
merchantId: '',
orderCode: '',
divisionType: '',
platformMerchantId: ''
platformMerchantId: '',
outboundStatus: ''
}
this.searchSelectObj = {
orderOrTrade: {
......@@ -922,6 +974,7 @@ export default {
},
getParams() {
var params = this.getSelectInputParams()
if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId
}
......@@ -947,9 +1000,9 @@ export default {
params.platformMerchantId = this.searchForm.platformMerchantId
}
// if (this.searchForm.divisionType) {
// params.divisionType = this.searchForm.divisionType
// }
if (this.searchForm.outboundStatus) {
params.outboundStatus = this.searchForm.outboundStatus
}
return params
},
getTotal() {
......@@ -977,6 +1030,19 @@ export default {
accountClose(isRefresh) {
this.accountVisible = !this.accountVisible
// isRefresh && this.handleSearch()
},
exWarehouse(row) {
this.orderId = row.orderCode
// this.orderId = '2203150922321960'
this.warehouseVisible = true
},
handleDrawerClose(isExamineOp) {
this.warehouseVisible = false
// if (isExamineOp) {
// this.$refs.commodityTable.refreshTable()
// }
}
}
}
......@@ -1097,4 +1163,37 @@ export default {
.search-icon {
margin: 0;
}
.ashSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #c6c8cc;
margin-right: 5px;
display: inline-block;
}
.greenSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #2cca74;
margin-right: 5px;
display: inline-block;
}
.yellowSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #fdb757;
margin-right: 5px;
display: inline-block;
}
.redSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #eb4e4e;
margin-right: 5px;
display: inline-block;
}
</style>
<!-- 服务商 = 财务列表 -->
<template>
<div class="service_finance_list">
<!-- <captchaInput :captchaList.sync="captchaList"></captchaInput> -->
<div v-show="!isSingle"
class="header"
slot="header"
......@@ -193,6 +194,15 @@
label="总分账金额"
align="center">
</el-table-column>
<el-table-column prop="outboundStatus"
label="出库状态"
width="120"
align="center">
<template slot-scope="scope">
<span :class="outboundStatusClass[scope.row.outboundStatus]"></span>
<span>{{ outboundStatusShow[scope.row.outboundStatus] }}</span>
</template>
</el-table-column>
<!-- </el-table-column> -->
</el-table-column>
<el-table-column label="流量方"
......@@ -394,6 +404,11 @@
label="操作"
fixed="right">
<template slot-scope="scope">
<el-button type="text"
size="mini"
style="margin-right: 10px;"
v-if="scope.row.hasOwnProperty('subOrderProfitAllocations')"
@click="exWarehouse(scope.row)">出库</el-button>
<auth-button :data="scope"></auth-button>
</template>
</el-table-column>
......@@ -411,6 +426,11 @@
<service-detail-dialog :isVisible="serviceVisible"
:date="summaryDate"
@handleStoreClose="handleStoreDetail"></service-detail-dialog>
<!-- 出库面板 -->
<warehouse-detail v-if="warehouseVisible"
:warehouseVisible="warehouseVisible"
:orderInfoId="orderId"
@handleDrawerClose="handleDrawerClose"></warehouse-detail>
</div>
</template>
......@@ -418,6 +438,7 @@
// import moment from 'moment'
import dayjs from 'dayjs'
import serviceDetailDialog from './serviceDetailDialog'
import warehouseDetail from './warehouseDetail'
import { getServiceListApi, exportFile, getListTotal, getServicerefApi, getServiceSummaryApi, getList } from '@api/finance'
import { getPartnerYqListApi } from '@/api/account'
import { getServiceStore } from '@api/editCustomer'
......@@ -428,6 +449,23 @@ export default {
name: 'serviceFinanceList',
data() {
return {
// captchaList: '',
orderId: '',
warehouseVisible: false,
outboundStatusShow: {
'1': '待出库',
'2': '待出库',
'3': '出库中',
'4': '已出库',
'5': '出库失败'
},
outboundStatusClass: {
'1': 'ashSpot',
'2': 'ashSpot',
'3': 'yellowSpot',
'4': 'greenSpot',
'5': 'redSpot'
},
userInfo: this.$store.state.d2admin.user.info,
// 单店或多店
isSingle: true,
......@@ -586,7 +624,9 @@ export default {
},
components: {
serviceDetailDialog
serviceDetailDialog,
warehouseDetail
// captchaInput
},
mounted() {
......@@ -616,6 +656,18 @@ export default {
handleAddClose(isRefresh = false) {
},
handleDrawerClose(isExamineOp) {
this.warehouseVisible = false
// if (isExamineOp) {
// this.$refs.commodityTable.refreshTable()
// }
},
exWarehouse(row) {
this.orderId = row.orderCode
// this.orderId = '2203150922321960'
this.warehouseVisible = true
},
drawFunnelChart() {
this.option.yAxis.data = this.summayData.countList.slice(0, 10).map(item => item.yqMerchantName)
this.option.series[0].data = this.summayData.countList.slice(0, 10).map(item => item.totalFranchiseeProfitMoney)
......
<!-- 查看详情 -->
<template>
<el-drawer size="60%"
class="drawerContainer"
:with-header="false"
:visible.sync="drawerDetailVisible"
:before-close="handleDrawerClose">
......@@ -221,110 +222,112 @@ export default {
}
</script>
<style lang="scss">
.el-drawer__body {
overflow: scroll;
}
.d2-drawer-content .close-icon {
font-size: 24px;
height: 22px;
line-height: 22px;
cursor: pointer;
}
.d2-drawer-content .d2-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
}
.d2-drawer-content .d2-drawer-block.title-block {
position: relative;
display: flex;
justify-content: space-between;
padding: 20px 20px;
background: #ffffff;
}
.d2-drawer-block .d2-drawer-item {
width: 47%;
margin-bottom: 0;
}
.d2-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
}
.parentGoods {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #333333;
line-height: 28px;
font-weight: 600;
}
.parent-type {
font-family: PingFangSC-Regular;
font-size: 16px;
color: #666666;
line-height: 24px;
font-weight: 400;
padding-left: 15px;
}
.car-txt .examineP {
font-family: PingFangSC-Regular;
font-size: 16px;
margin-left: auto;
margin-right: 40px;
padding: 3px;
}
.d2-drawer-content .child-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 20px 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 10px 8px 0 10px;
}
.child-drawer-block .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 30%;
margin: 0 0 0 0;
}
/* .child-drawer-block .d2-drawer-row {
<style lang="scss" scoped>
::v-deep.drawerContainer {
.el-drawer__body {
overflow: scroll;
}
.d2-drawer-content .close-icon {
font-size: 24px;
height: 22px;
line-height: 22px;
cursor: pointer;
}
.d2-drawer-content .d2-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
}
.d2-drawer-content .d2-drawer-block.title-block {
position: relative;
display: flex;
justify-content: space-between;
padding: 20px 20px;
background: #ffffff;
}
.d2-drawer-block .d2-drawer-item {
width: 47%;
margin-bottom: 0;
}
.d2-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
}
.parentGoods {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #333333;
line-height: 28px;
font-weight: 600;
}
.parent-type {
font-family: PingFangSC-Regular;
font-size: 16px;
color: #666666;
line-height: 24px;
font-weight: 400;
padding-left: 15px;
}
.car-txt .examineP {
font-family: PingFangSC-Regular;
font-size: 16px;
margin-left: auto;
margin-right: 40px;
padding: 3px;
}
.d2-drawer-content .child-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 20px 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 10px 8px 0 10px;
}
.child-drawer-block .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 30%;
margin: 0 0 0 0;
}
/* .child-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
} */
.child-drawer-block .car-sub-head {
font-family: PingFangSC-Medium;
font-size: 16px;
color: #333333;
line-height: 24px;
font-weight: 600;
}
.timeline-item_wrapper {
.el-form-item__content {
width: calc(100% - 110px);
.child-drawer-block .car-sub-head {
font-family: PingFangSC-Medium;
font-size: 16px;
color: #333333;
line-height: 24px;
font-weight: 600;
}
.el-timeline-item__wrapper {
display: flex;
align-items: center;
justify-content: space-between;
// margin-top: 5px;
.timeline-item_wrapper {
.el-form-item__content {
width: calc(100% - 110px);
}
.el-timeline-item__wrapper {
display: flex;
align-items: center;
justify-content: space-between;
// margin-top: 5px;
}
.el-timeline-item__timestamp.is-bottom {
margin-top: 0;
}
}
.el-timeline-item__timestamp.is-bottom {
margin-top: 0;
.timeline-item_wrapper .el-timeline-item__tail {
position: absolute;
left: 4px;
height: 100%;
top: 8px;
border-left: 2px solid #e4e7ed;
}
.timeline-item_wrapper .el-timeline-item__node--normal {
left: -1px;
top: 8px;
width: 12px;
height: 12px;
}
}
.timeline-item_wrapper .el-timeline-item__tail {
position: absolute;
left: 4px;
height: 100%;
top: 8px;
border-left: 2px solid #e4e7ed;
}
.timeline-item_wrapper .el-timeline-item__node--normal {
left: -1px;
top: 8px;
width: 12px;
height: 12px;
}
</style>
......@@ -65,7 +65,7 @@ const cdn = {
module.exports = {
publicPath, // 根据你的实际情况更改这里
outputDir: 'copyDirTarget',
// outputDir: 'copyDirTarget',
lintOnSave: false,
devServer: {
// publicPath, // 和 publicPath 保持一致
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!