Commit fe99f62e by chenwq

秒杀价格

1 parent e5cc2c48
......@@ -15,10 +15,8 @@
</span>
</div>
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1">
</glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2">
</glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
......@@ -113,7 +111,7 @@
<script>
import * as dayjs from 'dayjs'
import url from "@/assets/empty.png"
import url from '@/assets/empty.png'
import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default {
name: 'orderManage',
......@@ -684,7 +682,7 @@ export default {
})
},
// 确认收货 - end
setTableFinishFun() {
//接收到的数据为空
this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun()
......
......@@ -11,7 +11,7 @@
</template>
<div slot="goodsHtml">
<el-button type="primary" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top:10px">
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px">
<p>
<img class="img-60" :src="selectedProInfo.goodsImage" />
&nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件
......@@ -25,8 +25,8 @@
</div>
</div>
<div slot="specificationsHtml" v-if="specificationDetailList.length" class="flex" style="min-width: 600px" id="specificationDetailList">
<div style="width: calc(100%);">
<table class="table-spesc" style="width: calc(100%);">
<div style="width: calc(100%)">
<table class="table-spesc" style="width: calc(100%)">
<tbody>
<tr>
<td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td>
......@@ -37,19 +37,17 @@
</tr>
</tbody>
</table>
<table class="table-spesc" style="max-height: 400px;">
<table class="table-spesc" style="max-height: 400px">
<tbody>
<tr style="border-bottom: 1px solid rgb(235, 235, 235);" v-for="(item, index) in nameToValSpecsList" :key="index">
<tr style="border-bottom: 1px solid rgb(235, 235, 235)" v-for="(item, index) in nameToValSpecsList" :key="index">
<td :style="{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">{{ n }}</td>
<td :style="{ width: specsWidth }">{{ item.retailPrice }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td>
<td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="秒杀价" style="width:90%" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)">
</el-input>
<el-input :disabled="isDisabled" placeholder="秒杀价" style="width: 90%" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)"></el-input>
</td>
<td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="活动库存" style="width:90%" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)">
</el-input>
<el-input :disabled="isDisabled" placeholder="活动库存" style="width: 90%" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)"></el-input>
</td>
</tr>
</tbody>
......@@ -146,18 +144,20 @@ export default {
activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }],
promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }],
activityPrice: [{ required: true, message: '请设置秒杀价', trigger: 'change' },
activityPrice: [
{ required: true, message: '请设置秒杀价', trigger: 'change' },
{
validator: (rule, value, callback) => {
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价不能大于等于零售价')) : callback()
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
},
trigger: 'change'
}
],
goodsStock: [{ required: true, message: '请设置活动库存', trigger: 'change' },
goodsStock: [
{ required: true, message: '请设置活动库存', trigger: 'change' },
{
validator: (rule, value, callback) => {
return value >= this.selectedProInfo.goodsStock ? callback(new Error('活动库存不能大于等于商品库存')) : callback()
return value > this.selectedProInfo.goodsStock ? callback(new Error('活动库存不能大于商品库存')) : callback()
},
trigger: 'change'
}
......@@ -248,10 +248,10 @@ export default {
deep: true
},
'editForm.activityPrice'(newValue, oldValue) {
this.editForm.activityPrice = limitPrice(newValue, oldValue, 5, 2, 0, (this.selectedProInfo.retailPrice / 100).toFixed(2))
this.editForm.activityPrice = limitPrice(newValue, oldValue, 5, 2, 0)
},
'editForm.goodsStock'(newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 5, 0, 0, this.selectedProInfo.goodsStock)
this.editForm.goodsStock = limitPrice(newValue, oldValue, 5, 0, 0)
}
},
......@@ -432,7 +432,7 @@ export default {
form.activityPrice = (info.activityPrice / 100).toFixed(2)
form.goodsStock = info.goodsStock
}
this.$nextTick(()=>{
this.$nextTick(() => {
this.editStatus = false
})
})
......@@ -465,7 +465,7 @@ export default {
delete param.activityPrice
delete param.goodsStock
param.specificationDetailList = []
this.nameToValSpecsList.forEach(function(item) {
this.nameToValSpecsList.forEach(function (item) {
var obj = {
retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100
stock: item.goodsStock,
......@@ -544,12 +544,13 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.cancelJump()
})
.catch(() => {})
.then(() => {
this.cancelJump()
})
.catch(() => {})
} else {
this.cancelJump()
this.cancelJump()
}
}
}
......@@ -594,6 +595,4 @@ export default {
cursor: pointer;
}
/* 规格 */
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!