Commit 91e167fb by wangql

ERP出库需求代码提交

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