Commit 63ac1305 by chenwq

fix(商品管理): 修复商品编辑页规格值显示问题并优化样式

- 修复规格值显示换行问题并调整样式
- 优化商品编辑页表单验证逻辑
- 调整批量操作商品数量限制为100件
- 修复价格输入框禁用状态及验证提示
- 优化专场商品选择弹窗宽度及样式
1 parent fb2055e6
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
width: 65%; width: 65%;
} */ } */
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content { .glsx-combi-form .no-label.el-form-item--small .el-form-item__content {
width: 100%; width: 100% !important;
} }
.glsx-combi-form .el-form-item--small.el-form-item { .glsx-combi-form .el-form-item--small.el-form-item {
......
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<template> <template>
<glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose"> <glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="1380px" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose">
<div class="flex"> <GLCombiForm ref="goodsRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="goodsFormObj" :formData="goodsFormData"></GLCombiForm>
<GLCombiForm ref="goodsRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="goodsFormObj" :formData="goodsFormData"></GLCombiForm>
</div>
<GLTable class="pointTable" @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" @sortChange="sortChange" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn"> <GLTable class="pointTable" @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" @sortChange="sortChange" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div class="setPriceSlot" slot="setPriceSlot" slot-scope="scope"> <div class="setPriceSlot" slot="setPriceSlot" slot-scope="scope">
<span class="unedited">{{ scope.scope.redeemPoints }}积分 + {{ scope.scope.salePrice }}元</span> <span class="unedited">{{ scope.scope.redeemPoints }}积分 + {{ scope.scope.salePrice }}元</span>
...@@ -135,9 +133,9 @@ export default { ...@@ -135,9 +133,9 @@ export default {
}) })
}, },
setTableFinishFun() { setTableFinishFun() {
this.recoverySelected() this.recoverySelected()
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -178,17 +176,21 @@ export default { ...@@ -178,17 +176,21 @@ export default {
recoverySelected() { recoverySelected() {
if (this.selectedProList.length) { if (this.selectedProList.length) {
this.selectedProList.forEach(row => { this.selectedProList.forEach(row => {
const obj = this.productList.find(item => item.id == row.id) const obj = this.productList.find(item => item.id == row.id)
this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row, true) this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row, true)
}) })
} }
}, },
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
var selectedData = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] var selectedData = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName]
if(selectedData && selectedData.length > 10) { if (selectedData && selectedData.length > 100) {
this.$message.error('最多选择10件商品') this.$message({
return true message: '最多选择100件商品',
} type: 'error',
customClass: 'msgHierarchy'
})
return true
}
this.$emit('handleMutiSelectConfirm', selectedData) this.$emit('handleMutiSelectConfirm', selectedData)
}, },
handleMutiSelectClose() { handleMutiSelectClose() {
......
...@@ -132,6 +132,12 @@ export default { ...@@ -132,6 +132,12 @@ export default {
isClear: true isClear: true
}, },
{ {
label: '门店字段',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '下单时间', label: '下单时间',
name: 'time', name: 'time',
type: 'datePicker', type: 'datePicker',
...@@ -196,7 +202,7 @@ export default { ...@@ -196,7 +202,7 @@ export default {
formatter: cell => { formatter: cell => {
let price = 0 let price = 0
if (cell.payStatus == 1002) { if (cell.payStatus == 1002) {
price = cell.goodsSource ? cell.redeemPoints + '积分' : (cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元') price = cell.goodsSource ? (cell.redeemPoints * cell.sellQty).toFixed(0) + '积分' : (cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元')
} }
return price return price
// return cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元' // return cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
...@@ -226,6 +232,11 @@ export default { ...@@ -226,6 +232,11 @@ export default {
addHtml: 'orderNoSlot' addHtml: 'orderNoSlot'
}, },
{ {
label: '门店字段',
width: 300,
prop: 'merchantName'
},
{
label: '下单时间', label: '下单时间',
width: 200, width: 200,
formatter: cellValue => { formatter: cellValue => {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</template> </template>
<template slot="specialEvents"> <template slot="specialEvents">
<div class="banner-box"> <div class="banner-box">
<el-button type="primary" plain class="add-banner-btn" :size="size" @click="handleBannerAdd" @change="handleBannerChange">新增banner</el-button> <el-button type="primary" plain class="add-banner-btn" :size="size" @click="handleBannerAdd" @change="handleBannerChange">+ 新增专场</el-button>
<el-tabs v-if="editForm.specialEvents.length" v-model="bannerIdx" type="card" class="home-set-tabs" closable @tab-remove="handleBannerDelete"> <el-tabs v-if="editForm.specialEvents.length" v-model="bannerIdx" type="card" class="home-set-tabs" closable @tab-remove="handleBannerDelete">
<el-tab-pane v-for="(subItem, subIndex) in editForm.specialEvents" :key="subIndex" :label="subItem.eventName" :name="subIndex"> <el-tab-pane v-for="(subItem, subIndex) in editForm.specialEvents" :key="subIndex" :label="subItem.eventName" :name="subIndex">
<div class="item-box"> <div class="item-box">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.specialEvents[bannerIdx].specialEventGoodsList.length ? '更换商品' : '+选择商品' }}</el-button> <el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.specialEvents[bannerIdx].specialEventGoodsList.length ? '更换商品' : '+选择商品' }}</el-button>
</div> </div>
<div slot="proTable" v-if="editForm.specialEvents[bannerIdx].specialEventGoodsList.length" class="select-pro" :style="{ 'margin-left': defaultLabelWidth, width: `calc(100% - ${defaultLabelWidth} )` }"> <div slot="proTable" v-if="editForm.specialEvents[bannerIdx].specialEventGoodsList.length" class="select-pro" :style="{ 'margin-left': defaultLabelWidth, width: `calc(100% - ${defaultLabelWidth} )` }">
<GLTable :hasPage="false" :tableParams="tableParams" :tableData="editForm.specialEvents[bannerIdx].specialEventGoodsList"> <GLTable class="proTable" :hasPage="false" :tableParams="tableParams" :tableData="editForm.specialEvents[bannerIdx].specialEventGoodsList">
<div class="setPriceSlot" slot="setPriceSlot" slot-scope="scope"> <div class="setPriceSlot" slot="setPriceSlot" slot-scope="scope">
<span class="unedited">{{ scope.scope.redeemPoints }}积分 + {{ scope.scope.salePrice }}元</span> <span class="unedited">{{ scope.scope.redeemPoints }}积分 + {{ scope.scope.salePrice }}元</span>
</div> </div>
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
<el-button class="p-0 m-l-10" type="text" @click="handleProTop(scope)">置顶</el-button> <el-button class="p-0 m-l-10" type="text" @click="handleProTop(scope)">置顶</el-button>
</span> </span>
</GLTable> </GLTable>
<el-button style="margin-top: 20px;" type="primary" plain :size="size" @click="handleUpEvent(subIndex)">置顶专场</el-button>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<el-button type="primary" plain :size="size" @click="handleUpEvent(subIndex)">置顶专场</el-button>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -439,7 +439,7 @@ export default { ...@@ -439,7 +439,7 @@ export default {
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
border-radius: 0 4px 4px 4px; border-radius: 0 4px 4px 4px;
border-top: none; border-top: none;
padding: 20px; /* padding: 20px; */
} }
.home-set .banner-img { .home-set .banner-img {
display: flex; display: flex;
...@@ -450,6 +450,26 @@ export default { ...@@ -450,6 +450,26 @@ export default {
font-weight: 400; font-weight: 400;
color: #666; color: #666;
} }
.home-set .banner-box {
position: relative;
width: calc(100vw - 100px);
}
.home-set .add-banner-btn {
position: absolute;
right: 0px;
top: 0px;
width: 114px;
height: 40px;
border-radius: 4px 4px 0 0;
color: #666666;
font-size: 14px;
border: 1px solid #e8e8ea;
background: #fafafa;
z-index: 999;
}
.home-set .proTable {
width: calc(100vw - 300px);
}
.home-set .home-set-form .item-box .home-set-tabs.el-tabs--card > .el-tabs__header .el-tabs__nav { .home-set .home-set-form .item-box .home-set-tabs.el-tabs--card > .el-tabs__header .el-tabs__nav {
border: none !important; border: none !important;
} }
......
...@@ -163,7 +163,8 @@ export default { ...@@ -163,7 +163,8 @@ export default {
this.$apis[apiModule][apiName](apiParams).then(res => { this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error',
customClass: 'msgHierarchy'
}) })
if (res.code == '0') { if (res.code == '0') {
fn && fn() fn && fn()
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<span>+</span> <span>+</span>
<!-- v-focus--> <!-- v-focus-->
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$') <el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" disabled
@blur="setPriceFn"> @blur="setPriceFn">
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1" <el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1"
@click="handleSale">上架销售 @click="handleSale">上架销售
</el-button> </el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button> <!-- <el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button> -->
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button> <el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button>
</div> </div>
</div> </div>
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant'
const attrList = [ const attrList = [
// { // {
// label:'商品特点', // label:'商品特点',
...@@ -158,6 +159,11 @@ export default { ...@@ -158,6 +159,11 @@ export default {
}, },
}, },
}, },
watch: {
redeemPoints(newValue, oldValue) {
this.redeemPoints = limitPrice(newValue, oldValue, 5, 0, 1, 99999)
}
},
mounted() { mounted() {
}, },
...@@ -215,9 +221,9 @@ export default { ...@@ -215,9 +221,9 @@ export default {
handleSale() { handleSale() {
this.operateFn('batchSaleApi', '上架销售') this.operateFn('batchSaleApi', '上架销售')
}, },
handleOff() { // handleOff() {
this.operateFn('batchOffApi', '下架') // this.operateFn('batchOffApi', '下架')
}, // },
handleRemove() { handleRemove() {
this.operateFn('batchRemoveApi', '移出') this.operateFn('batchRemoveApi', '移出')
}, },
......
...@@ -59,17 +59,17 @@ ...@@ -59,17 +59,17 @@
<div> <div>
<span class="specs-title">规格名:</span> <span class="specs-title">规格名:</span>
<span class="specs-item">{{ subItem.specificationName }}</span> <span class="specs-item">{{ subItem.specificationName }}</span>
<div style="position: absolute; right: 10px; top: 10px;"> <div style="position: absolute; right: -50px; top: 50%;">
<el-button v-show="!isDisabled" type="text" @click="handleSpecsEdit(2, subItem, subIndex)">编辑</el-button> <el-button class="el-icon-edit-outline" style="padding: 0 0" v-show="!isDisabled" type="text" @click="handleSpecsEdit(2, subItem, subIndex)"></el-button>
<el-button v-show="!isDisabled" type="text" @click="handleSpecsDelete(subIndex)">删除</el-button> <el-button class="el-icon-delete" style="padding: 0; margin-left: 8px" v-show="!isDisabled" type="text" @click="handleSpecsDelete(subIndex)"></el-button>
</div> </div>
</div> </div>
<div class="flex"> <div class="flex">
<span style="width: 56px;">规格值:</span> <span style="width: 56px;">规格值:</span>
<div style="width: calc(100% - 56px);"> <div class="flex-default" style="width: calc(100% - 56px); flex-wrap: wrap;">
<div> <!-- <div> -->
<span class="specs-item" v-for="(n, idx) in subItem.platformSpecificationValueList" :key="idx">{{ n.specificationValue }}</span> <div class="specs-item" style="display: inline-block; margin-bottom: 12px;" v-for="(n, idx) in subItem.platformSpecificationValueList" :key="idx">{{ n.specificationValue }}</div>
</div> <!-- </div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -92,7 +92,11 @@ ...@@ -92,7 +92,11 @@
<tr style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" v-for="(subItem, subIndex) in nameToValSpecsList" :key="subIndex"> <tr style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" v-for="(subItem, subIndex) in nameToValSpecsList" :key="subIndex">
<td :style="{ width: specsWidth }" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td> <td :style="{ width: specsWidth }" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" class="w-100-per" placeholder="供货价" v-model="subItem.retailPrice" @input.native="e => handleRetailPriceInput(e, subIndex)" @blur="handleRetailPriceBlur"></el-input> <el-input :disabled="isDisabled" :class="{ 'w-100-per': true, 'border-red': !(subItem.retailPrice + '') && submitted }" placeholder="供货价" v-model="subItem.retailPrice" @input.native="e => handleRetailPriceInput(e, subIndex)" @blur="handleRetailPriceBlur">
<el-popover v-show="!(subItem.retailPrice + '') && submitted" slot="suffix" placement="top" title width="90" trigger="hover" content="供货价是必填项">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="库存" v-model="subItem.stock" :class="{ 'w-100-per': true, 'border-red': !(subItem.stock + '') && submitted }" @input.native="e => handleStockInput(e, subIndex)"> <el-input :disabled="isDisabled" placeholder="库存" v-model="subItem.stock" :class="{ 'w-100-per': true, 'border-red': !(subItem.stock + '') && submitted }" @input.native="e => handleStockInput(e, subIndex)">
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
<p class="edit-tips">作为商品划线展示的价格</p> <p class="edit-tips">作为商品划线展示的价格</p>
</template> </template>
<template slot="serviceDescHtml"> <template slot="serviceDescHtml">
<el-input type="textarea" v-model="editForm.serviceDesc" placeholder="请输入服务说明" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="30" :disabled="isDisabled" /> <el-input type="textarea" v-model="editForm.serviceDesc" placeholder="请输入服务说明" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="isDisabled" />
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -830,6 +834,7 @@ export default { ...@@ -830,6 +834,7 @@ export default {
...res, ...res,
sellPrice: res.sellPrice + '', sellPrice: res.sellPrice + '',
stockNum: res.goodsStock + '', stockNum: res.goodsStock + '',
expressFee: res.expressFee + '',
describeTxt: '', describeTxt: '',
descImgList: [], descImgList: [],
// businessType: [], // businessType: [],
...@@ -839,7 +844,7 @@ export default { ...@@ -839,7 +844,7 @@ export default {
specificationList: this.$common.utils.deepClone(res.platformGlGoodsSpecificationList), specificationList: this.$common.utils.deepClone(res.platformGlGoodsSpecificationList),
specificationDetailList: this.$common.utils.deepClone(res.platformGlGoodsSpecifications) specificationDetailList: this.$common.utils.deepClone(res.platformGlGoodsSpecifications)
} }
console.log(this.editForm, 'editform') // console.log(this.editForm, 'editform')
// 规格 // 规格
if (this.editForm.specificationList.length) { if (this.editForm.specificationList.length) {
this.specificationDetailList = this.$common.utils.deepClone(this.editForm.specificationList) this.specificationDetailList = this.$common.utils.deepClone(this.editForm.specificationList)
...@@ -945,9 +950,6 @@ export default { ...@@ -945,9 +950,6 @@ export default {
var isJump = false var isJump = false
this.submitted = true this.submitted = true
for (var i = 0; i < this.externalFormList.length; i++) { for (var i = 0; i < this.externalFormList.length; i++) {
if (isJump) {
return true
}
this.$refs.editFormRef[i].$refs['editProRef' + i].validate((valid, errorObj) => { this.$refs.editFormRef[i].$refs['editProRef' + i].validate((valid, errorObj) => {
// 规格值验证 // 规格值验证
if (i == 1) { if (i == 1) {
...@@ -965,6 +967,9 @@ export default { ...@@ -965,6 +967,9 @@ export default {
this.whereToGo(Object.keys(errorObj)[0]) this.whereToGo(Object.keys(errorObj)[0])
} }
}) })
if (isJump) {
return true
}
} }
var params = this.$common.utils.deepClone(this.editForm) var params = this.$common.utils.deepClone(this.editForm)
var deleteAttrList = ['descImgList', 'describeTxt', 'specificationList', 'goodsDetailImageList'] var deleteAttrList = ['descImgList', 'describeTxt', 'specificationList', 'goodsDetailImageList']
...@@ -1000,7 +1005,6 @@ export default { ...@@ -1000,7 +1005,6 @@ export default {
}) })
params.specificationDetailList.push({ params.specificationDetailList.push({
specificationData: specificationData, specificationData: specificationData,
// retailPrice: (item.retailPrice * 100).toFixed(0),
retailPrice: item.retailPrice, retailPrice: item.retailPrice,
stock: item.stock stock: item.stock
}) })
...@@ -1100,6 +1104,8 @@ export default { ...@@ -1100,6 +1104,8 @@ export default {
padding: 2px 6px; padding: 2px 6px;
vertical-align: center; vertical-align: center;
text-align: center; text-align: center;
word-break: break-all;
line-height: 20px;
} }
.edit-pro .table-spesc .el-input--small .el-input__inner { .edit-pro .table-spesc .el-input--small .el-input__inner {
text-align: center !important; text-align: center !important;
...@@ -1213,10 +1219,12 @@ export default { ...@@ -1213,10 +1219,12 @@ export default {
} }
.edit-pro .sepce-box { .edit-pro .sepce-box {
position: relative; position: relative;
padding: 30px 34px; box-sizing: border-box;
width: 684px;
padding: 22px 20px;
color: #3a3a3a; color: #3a3a3a;
background: #f7f7f7; background: #f9f9f9;
border: 1px solid #dcdfe6; border: 1px solid #f9f9f9;
margin-bottom: 10px; margin-bottom: 10px;
} }
.edit-pro .sepce-box .specs-title { .edit-pro .sepce-box .specs-title {
...@@ -1224,11 +1232,12 @@ export default { ...@@ -1224,11 +1232,12 @@ export default {
line-height: 60px; line-height: 60px;
} }
.edit-pro .sepce-box .specs-item { .edit-pro .sepce-box .specs-item {
background: #e6e9ff; background: #fafbfe;
border-radius: 4px; border-radius: 4px;
padding: 9px 16px; padding: 6px 12px;
color: #717171; color: #666666;
margin-right: 12px; margin-right: 8px;
border: 1px solid #e8e8ea;
} }
.color-red { .color-red {
color: #eb4e4e; color: #eb4e4e;
......
...@@ -438,10 +438,10 @@ export default { ...@@ -438,10 +438,10 @@ export default {
let list = this.getAllData() let list = this.getAllData()
params = { params = {
modifyPriceRequestList: list.map(item => { modifyPriceRequestList: list.map(item => {
let curPrice = Math.ceil(item.sellPrice) || 0 // let curPrice = Math.ceil(item.sellPrice) || 0
let disposePrice = this.batchPrice || 0 let disposePrice = this.batchPrice || 0
let count = this.batchCount || 0 // let count = this.batchCount || 0
let disposeCount = Number(((+count) + (+curPrice)).toFixed(2)) let disposeCount = Number((+this.batchCount || 0).toFixed(2))
// let addPrice = this.batchPrice || 0 // let addPrice = this.batchPrice || 0
// let priceAmount = Number(((+curPrice) + (+addPrice)).toFixed(2)) // let priceAmount = Number(((+curPrice) + (+addPrice)).toFixed(2))
...@@ -555,7 +555,7 @@ export default { ...@@ -555,7 +555,7 @@ export default {
goDetaillPage(row) { goDetaillPage(row) {
if (row.goodsSource == 2) { if (row.goodsSource == 2) {
this.$router.push({ this.$router.push({
path: '/pointProducts/editProduct', path: '/pointProducts/editProductSJZ',
query: { query: {
backPath: '/pointProducts/index', backPath: '/pointProducts/index',
addOrEdit: 'detail', addOrEdit: 'detail',
......
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
}, },
watch: { watch: {
batchCount(newValue, oldValue) { batchCount(newValue, oldValue) {
this.batchCount = limitPrice(newValue, oldValue, 4, 0, 0, 1000) this.batchCount = limitPrice(newValue, oldValue, 5, 0, 1, 99999)
} }
}, },
......
...@@ -66,9 +66,9 @@ export default { ...@@ -66,9 +66,9 @@ export default {
}, },
{ {
label: '浏览次数', label: '浏览次数',
prop: 'visitorCount', prop: 'browseCount',
formatter: cellValue => { formatter: cellValue => {
return cellValue.visitorCount + '次' return cellValue.browseCount + '次'
} }
}, },
{ {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<span>+</span> <span>+</span>
<!-- v-focus--> <!-- v-focus-->
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$') <el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text" disabled
@blur="setPriceFn('salePrice')"> @blur="setPriceFn('salePrice')">
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant'
const attrList = [ const attrList = [
// { // {
// label:'商品特点', // label:'商品特点',
...@@ -154,6 +155,11 @@ export default { ...@@ -154,6 +155,11 @@ export default {
}, },
}, },
}, },
watch: {
redeemPoints(newValue, oldValue) {
this.redeemPoints = limitPrice(newValue, oldValue, 5, 0, 1, 99999)
}
},
mounted() { mounted() {
}, },
......
...@@ -392,10 +392,10 @@ export default { ...@@ -392,10 +392,10 @@ export default {
let list = this.getAllData() let list = this.getAllData()
params = { params = {
modifyPriceRequestList: list.map(item => { modifyPriceRequestList: list.map(item => {
let curPrice = Math.ceil(item.sellPrice) || 0 // let curPrice = Math.ceil(item.sellPrice) || 0
let disposePrice = this.batchPrice || 0 let disposePrice = this.batchPrice || 0
let count = this.batchCount || 0 // let count = this.batchCount || 0
let disposeCount = Number(((+count) + (+curPrice)).toFixed(2)) let disposeCount = Number((+this.batchCount || 0).toFixed(2))
// let addPrice = this.batchPrice || 0 // let addPrice = this.batchPrice || 0
// let priceAmount = Number(((+curPrice) + (+addPrice)).toFixed(2)) // let priceAmount = Number(((+curPrice) + (+addPrice)).toFixed(2))
...@@ -425,8 +425,8 @@ export default { ...@@ -425,8 +425,8 @@ export default {
} }
}) })
}, },
judgeCategory(item) { judgeCategory(item, isAll) {
const list = item ? [item] : this.getAllData() const list = !isAll ? [item] : this.getAllData()
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
if (!list[i].fronCategoryId) { if (!list[i].fronCategoryId) {
return true return true
...@@ -438,7 +438,7 @@ export default { ...@@ -438,7 +438,7 @@ export default {
// 点击批量上架 // 点击批量上架
batchSale(item, isAll) { batchSale(item, isAll) {
// 有未设置前端分类的 // 有未设置前端分类的
if (this.judgeCategory(item)) { if (this.judgeCategory(item, isAll)) {
!isAll ? this.editCategory(item) : this.$message.error('有商品未设置前端分类') !isAll ? this.editCategory(item) : this.$message.error('有商品未设置前端分类')
return true return true
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
</div> </div>
<GLDialog :title="dialogConfig.title" mode="mid" :visible.sync="isSelectVisible" :show-close="true" :before-close="selectVisible" @onOk="handleAllowOrRefuse('allow')" @onCancel="dialogConfig.btnOpt == 'check' ? handleAllowOrRefuse('refuse') : selectVisible()" :okText="dialogConfig.okText" :cancelText="dialogConfig.cancelText"> <GLDialog :title="dialogConfig.title" mode="mid" :visible.sync="isSelectVisible" :show-close="true" :before-close="selectVisible" @onOk="handleAllowOrRefuse('allow')" @onCancel="dialogConfig.btnOpt == 'check' ? handleAllowOrRefuse('refuse') : selectVisible()" :okText="dialogConfig.okText" :cancelText="dialogConfig.cancelText">
<div class="dialog-wrap" v-loading="batchLoading"> <div v-loading="batchLoading">
<glsxCombiForm ref="editFormRef" isEdit="true" :formObj="batchForm" :formData="batchEditForm" :formRules="batchEditRules" formRef="editChildRef"></glsxCombiForm> <glsxCombiForm ref="editFormRef" isEdit="true" :formObj="batchForm" :formData="batchEditForm" :formRules="batchEditRules" formRef="editChildRef"></glsxCombiForm>
</div> </div>
</GLDialog> </GLDialog>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!