Commit 91e167fb by wangql

ERP出库需求代码提交

1 parent dc51c1d9
......@@ -332,15 +332,19 @@ export const withdrawChannelList = [
export const warehouseStatusList = [
{
confId: 1,
confLabel: '已出库'
confLabel: '待出库'
},
{
confId: 2,
confId: 3,
confLabel: '出库中'
},
{
confId: 3,
confLabel: '未出库'
confId: 4,
confLabel: '出库成功'
},
{
confId: 5,
confLabel: '出库失败'
}
]
......
......@@ -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
}
}
}
}
}
}
}
......
......@@ -142,10 +142,6 @@
<!-- <span style="position: absolute; right: 41px; top: 42px; z-index: 999;"> -->
<el-button type="primary"
size="mini"
style="padding:0px 13px;height:30px;margin-top:6px"
@click="exWarehouse">出库</el-button>&nbsp;
<el-button type="primary"
size="mini"
icon="el-icon-download"
style="padding:0px 13px;height:30px;margin-top:6px"
v-if="userInfo.beSuper"
......@@ -298,11 +294,17 @@
</el-table-column>
<!-- </el-table-column> -->
</el-table-column>
<el-table-column prop="warehouseStatus"
<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店分账"
<el-table-column label="
4S店分账"
align="center">
<el-table-column prop="shopMerchantName"
label="流量方"
......@@ -584,7 +586,8 @@ export default {
merchantId: '',
orderCode: '',
divisionType: '',
platformMerchantId: ''
platformMerchantId: '',
outboundStatus: ''
},
searchSelectObj: {
orderOrTrade: {
......@@ -694,7 +697,7 @@ export default {
optionsName: 'PlatformMerchantList'
}, {
label: '出库状态',
name: 'warehouseStatus',
name: 'outboundStatus',
type: 'select',
optionList: [],
optionId: 'confId',
......@@ -731,7 +734,21 @@ export default {
},
accountVisible: false,
warehouseVisible: false,
orderId: ''
orderId: '',
outboundStatusShow: {
'1': '待出库',
'2': '待出库',
'3': '出库中',
'4': '已出库',
'5': '出库失败'
},
outboundStatusClass: {
'1': 'ashSpot',
'2': 'ashSpot',
'3': 'yellowSpot',
'4': 'greenSpot',
'5': 'redSpot'
}
}
},
......@@ -793,7 +810,8 @@ export default {
merchantId: '',
orderCode: '',
divisionType: '',
platformMerchantId: ''
platformMerchantId: '',
outboundStatus: ''
}
this.searchSelectObj = {
orderOrTrade: {
......@@ -954,6 +972,7 @@ export default {
},
getParams() {
var params = this.getSelectInputParams()
if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId
}
......@@ -979,9 +998,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() {
......@@ -1142,4 +1161,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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!