Commit 136f36fc by 王志慧

Merge branch 'v4.20.0' into v4.21.1

2 parents 9b618a17 d2df42ee
...@@ -18,7 +18,7 @@ export const fetchConfig = function (common) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function (common) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
let params = { moduleName: 'purchase', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } } let params = { moduleName: 'purchase', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config',httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return common.utils.getConfig(params) return common.utils.getConfig(params)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res) // return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
......
<template> <template>
<!-- <div>商品详情</div> --> <!-- <div>商品详情</div> -->
<GLDialog destroy-on-close="true" :visible.sync="dialogShow" :hasFooter="false" mode="big" bigTitle="产品详情" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose"> <GLDialog destroy-on-close="true" :visible.sync="dialogShow" :hasFooter="false" mode="big" bigTitle="产品详情"
:close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose">
<div class="detail-content"> <div class="detail-content">
<!-- 商品详情 --> <!-- 商品详情 -->
<div class="goodsInfoCom"> <div class="goodsInfoCom">
...@@ -22,16 +23,11 @@ ...@@ -22,16 +23,11 @@
<div class="skuCon"> <div class="skuCon">
<div class="label">规格:</div> <div class="label">规格:</div>
<div class="itemCon"> <div class="itemCon">
<div <div class="skuItem one-line-ellipsis pointer" :class="{ active: index === selectIndex }"
class="skuItem one-line-ellipsis pointer" v-for="(item, index) in goodsInfo.upgradeGoodsList" :key="index" @click="
:class="{ active: index === selectIndex }"
v-for="(item, index) in goodsInfo.upgradeGoodsList"
:key="index"
@click="
selectIndex = index selectIndex = index
setHandleItemInfo(item) setHandleItemInfo(item)
" ">
>
{{ item.upgradeGoodsName }} {{ item.upgradeGoodsName }}
</div> </div>
</div> </div>
...@@ -50,7 +46,7 @@ ...@@ -50,7 +46,7 @@
</div> </div>
<!-- <i class="carIcon"></i> --> <!-- <i class="carIcon"></i> -->
</div> </div>
<div class="table-wrap"> <div class="table-wrap" v-if="tableInfo.length">
<h3>适用门店</h3> <h3>适用门店</h3>
<GLTable :hasNum="false" :hasPage="false" :tableParams="tableParams" :table-data="tableInfo"></GLTable> <GLTable :hasNum="false" :hasPage="false" :tableParams="tableParams" :table-data="tableInfo"></GLTable>
</div> </div>
...@@ -79,7 +75,7 @@ export default { ...@@ -79,7 +75,7 @@ export default {
}, },
selectItemInfo: { selectItemInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
goodsId: { goodsId: {
type: [String, Number] type: [String, Number]
...@@ -106,7 +102,7 @@ export default { ...@@ -106,7 +102,7 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商户名称', label: '商户名称',
prop: 'merchantNames' prop: 'merchantName'
}, },
{ {
label: '商户号', label: '商户号',
...@@ -114,7 +110,7 @@ export default { ...@@ -114,7 +110,7 @@ export default {
}, },
{ {
label: '商品别名', label: '商品别名',
prop: 'upgradeGoodsAlias' prop: 'goodsAlias'
} }
] ]
}, },
...@@ -172,6 +168,8 @@ export default { ...@@ -172,6 +168,8 @@ export default {
upgradeGoodsId: id, upgradeGoodsId: id,
purchasePrice purchasePrice
}) })
// this.tableInfo = item.merchantGoodsInfo
this.tableInfo = item.merchantGoodsInfo.filter(item => item.goodsAlias)
}, },
handleDetailClose() { handleDetailClose() {
this.dialogShow = false this.dialogShow = false
...@@ -321,12 +319,14 @@ export default { ...@@ -321,12 +319,14 @@ export default {
background: #5850ff; background: #5850ff;
border-radius: 4px; border-radius: 4px;
} }
.table-wrap { .table-wrap {
margin-top:24px; margin-top: 24px;
h3 { h3 {
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
margin-bottom:16px; margin-bottom: 16px;
} }
} }
</style> </style>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</template> </template>
<template slot="goodsNumber" slot-scope="scope"> <template slot="goodsNumber" slot-scope="scope">
<el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.goodsNumber'" :rules="rules.goodsNumber"> <el-form-item style="margin-bottom: 0px" :prop="'tableData.' + scope.index + '.goodsNumber'" :rules="rules.goodsNumber">
<el-input v-model="scope.scope.goodsNumber" placeholder="请输入" @input="handleCalculate(scope.scope, 'goodsNumber')"></el-input> <el-input v-model="scope.scope.goodsNumber" placeholder="请输入" @blur="handleCalculate(scope.scope, 'goodsNumber')"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template slot="upgradePurchasePrice" slot-scope="scope"> <template slot="upgradePurchasePrice" slot-scope="scope">
...@@ -191,13 +191,15 @@ export default { ...@@ -191,13 +191,15 @@ export default {
if (key == 'goodsNumber') { if (key == 'goodsNumber') {
data[key] = data[key]?new BigNumber(data[key]).dp(0).toNumber():'' data[key] = data[key]?new BigNumber(data[key]).dp(0).toNumber():''
data.goodsTotalPrice = '' data.goodsTotalPrice = data.upgradePurchasePrice&&data.goodsNumber?new BigNumber(data.upgradePurchasePrice)
data.upgradePurchasePrice = '' .times(data.goodsNumber)
.dp(2)
.toNumber():''
return return
} }
if (!data.goodsNumber) return if (!data.goodsNumber) return
data[key] = data[key]?new BigNumber(data[key]).dp(0).toNumber():'' data[key] = data[key]?new BigNumber(data[key]).dp(2).toNumber():''
let params = { let params = {
upgradePurchasePrice: data => { upgradePurchasePrice: data => {
data.goodsTotalPrice = data.upgradePurchasePrice?new BigNumber(data.upgradePurchasePrice) data.goodsTotalPrice = data.upgradePurchasePrice?new BigNumber(data.upgradePurchasePrice)
...@@ -251,5 +253,8 @@ export default { ...@@ -251,5 +253,8 @@ export default {
z-index: 9999999; z-index: 9999999;
position: static; position: static;
} }
/deep/ td.el-table__cell {
height: 64px;
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!