|
@@ -63,6 +63,26 @@
|
|
|
class="tui-input" name="reachNumDiscount" @focus="form.reachNumDiscount=''" placeholder="金额" type="digit" />元
|
|
class="tui-input" name="reachNumDiscount" @focus="form.reachNumDiscount=''" placeholder="金额" type="digit" />元
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
|
|
+ <view class="limit-buy-wrap">
|
|
|
|
|
+ <tui-list-cell class="line-cell limit-buy-line" :hover="false">
|
|
|
|
|
+ <view class="tui-title">每人限购</view>
|
|
|
|
|
+ <input v-model="form.limitBuy" style="width:105upx;" @focus="form.limitBuy=''" placeholder-class="phcolor" class="tui-input" name="limitBuy" placeholder="0不限购" maxlength="50" type="number" />
|
|
|
|
|
+
|
|
|
|
|
+ <button v-if="productData.id > 0" class="admin-button-com blue middle" @click.stop="clearBuyCache()" style="width:150upx;">清已购</button>
|
|
|
|
|
+ <button v-if="productData.id > 0" class="admin-button-com blue middle" style="width:180upx;margin-left:10upx;" @click.stop="hasBuyList">已购列表</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell v-if="showClearTime" class="line-cell limit-buy-line" :hover="false">
|
|
|
|
|
+ <view class="tui-title">清空时间</view>
|
|
|
|
|
+ <datetime-picker
|
|
|
|
|
+ v-model="form.limitBuyClearTime"
|
|
|
|
|
+ type="datetime"
|
|
|
|
|
+ return-type="string"
|
|
|
|
|
+ class="limit-time-picker"
|
|
|
|
|
+ placeholder="留空则不自动清空"
|
|
|
|
|
+ />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
<tui-list-cell class="line-cell" :arrow="false" :hover="false">
|
|
|
<view class="tui-title" style="color:#19b31f;">平均成本</view>
|
|
<view class="tui-title" style="color:#19b31f;">平均成本</view>
|
|
|
<view style="color:#19b31f;width:300upx;" @click="showModifyAvCost(productData)">{{productData.avCost?parseFloat(productData.avCost):0}}</view>
|
|
<view style="color:#19b31f;width:300upx;" @click="showModifyAvCost(productData)">{{productData.avCost?parseFloat(productData.avCost):0}}</view>
|
|
@@ -154,15 +174,6 @@
|
|
|
<button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="notAllowChange()">修改</button>
|
|
<button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="notAllowChange()">修改</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">每人限购</view>
|
|
|
|
|
- <input v-model="form.limitBuy" style="width:105upx;" @focus="form.limitBuy=''" placeholder-class="phcolor" class="tui-input" name="limitBuy" placeholder="0不限购" maxlength="50" type="number" />
|
|
|
|
|
-
|
|
|
|
|
- <button v-if="productData.id > 0" class="admin-button-com blue middle" @click.stop="clearBuyCache()" style="width:150upx;">清已购</button>
|
|
|
|
|
- <button v-if="productData.id > 0" class="admin-button-com blue middle" style="width:180upx;margin-left:10upx;" @click.stop="hasBuyList">已购列表</button>
|
|
|
|
|
-
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">库存预警</view>
|
|
<view class="tui-title">库存预警</view>
|
|
|
<input v-model="form.stockWarning" style="width:300upx;" @focus="form.stockWarning=''" placeholder-class="phcolor" class="tui-input" name="stockWarning" placeholder="请填写" maxlength="50" type="number" />
|
|
<input v-model="form.stockWarning" style="width:300upx;" @focus="form.stockWarning=''" placeholder-class="phcolor" class="tui-input" name="stockWarning" placeholder="请填写" maxlength="50" type="number" />
|
|
@@ -449,6 +460,7 @@ import { mapGetters } from "vuex"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
|
|
+import DatetimePicker from "@/components/mx-datepicker/datetime-picker.vue"
|
|
|
import { getAllStaff } from "@/api/shop-admin";
|
|
import { getAllStaff } from "@/api/shop-admin";
|
|
|
import { partItem } from "@/api/part";
|
|
import { partItem } from "@/api/part";
|
|
|
import { CURRENT_ENV } from '@/config'
|
|
import { CURRENT_ENV } from '@/config'
|
|
@@ -457,7 +469,8 @@ export default {
|
|
|
components: {
|
|
components: {
|
|
|
TuiListCell,
|
|
TuiListCell,
|
|
|
htzImageUpload,
|
|
htzImageUpload,
|
|
|
- ModalModule
|
|
|
|
|
|
|
+ ModalModule,
|
|
|
|
|
+ DatetimePicker
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -487,9 +500,9 @@ export default {
|
|
|
hjPrice:'',
|
|
hjPrice:'',
|
|
|
hjAddPrice:2,
|
|
hjAddPrice:2,
|
|
|
addPrice:3,
|
|
addPrice:3,
|
|
|
- discountPrice:0,
|
|
|
|
|
- hjDiscountPrice:0,
|
|
|
|
|
- skDiscountPrice:0,
|
|
|
|
|
|
|
+ discountPrice:0, // 特价
|
|
|
|
|
+ hjDiscountPrice:0, // 会员特价
|
|
|
|
|
+ skDiscountPrice:0, // 零售特价
|
|
|
reachNum:0,
|
|
reachNum:0,
|
|
|
reachNumDiscount:0,
|
|
reachNumDiscount:0,
|
|
|
cost:0,
|
|
cost:0,
|
|
@@ -498,6 +511,8 @@ export default {
|
|
|
cover: "",
|
|
cover: "",
|
|
|
images: [],
|
|
images: [],
|
|
|
limitBuy:0,
|
|
limitBuy:0,
|
|
|
|
|
+ limitBuyClearTime:'',
|
|
|
|
|
+ limitBuyExceedType:1,
|
|
|
stockWarning:5,
|
|
stockWarning:5,
|
|
|
status:2,
|
|
status:2,
|
|
|
itemId:0,
|
|
itemId:0,
|
|
@@ -549,6 +564,9 @@ export default {
|
|
|
...mapGetters(["getLoginInfo","getDictionariesInfo"]),
|
|
...mapGetters(["getLoginInfo","getDictionariesInfo"]),
|
|
|
coverImgData() {
|
|
coverImgData() {
|
|
|
return this.form.images || [];
|
|
return this.form.images || [];
|
|
|
|
|
+ },
|
|
|
|
|
+ showClearTime() {
|
|
|
|
|
+ return Number(this.form.limitBuy) > 0;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -1176,6 +1194,8 @@ export default {
|
|
|
this.form.frontUse = 0
|
|
this.form.frontUse = 0
|
|
|
this.form.virtualStock = 0
|
|
this.form.virtualStock = 0
|
|
|
this.form.limitBuy = 0
|
|
this.form.limitBuy = 0
|
|
|
|
|
+ this.form.limitBuyClearTime = ''
|
|
|
|
|
+ this.form.limitBuyExceedType = 1
|
|
|
this.cost = res.data && res.data.cost ? parseFloat(res.data.cost) : 0
|
|
this.cost = res.data && res.data.cost ? parseFloat(res.data.cost) : 0
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -1189,6 +1209,9 @@ export default {
|
|
|
Object.keys(this.form).forEach((i) => {
|
|
Object.keys(this.form).forEach((i) => {
|
|
|
this.form[i] = res.data[i]
|
|
this.form[i] = res.data[i]
|
|
|
});
|
|
});
|
|
|
|
|
+ if (![1, 2].includes(Number(this.form.limitBuyExceedType))) {
|
|
|
|
|
+ this.form.limitBuyExceedType = 1;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const imageUrls = (res.data.images || '').split(',').filter(i => i);
|
|
const imageUrls = (res.data.images || '').split(',').filter(i => i);
|
|
|
this.form.images = imageUrls;
|
|
this.form.images = imageUrls;
|
|
@@ -1495,6 +1518,21 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.limit-buy-wrap {
|
|
|
|
|
+ border: 3upx solid #eee;
|
|
|
|
|
+ border-radius: 12upx;
|
|
|
|
|
+ margin: 0 22upx 20upx;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+}
|
|
|
|
|
+.limit-buy-line {
|
|
|
|
|
+ margin-left: -20upx;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ border-bottom: none !important;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.limit-time-picker {
|
|
|
|
|
+ width: 470upx;
|
|
|
|
|
+}
|
|
|
.use-img{
|
|
.use-img{
|
|
|
font-size: 22rpx;
|
|
font-size: 22rpx;
|
|
|
color: #999999;
|
|
color: #999999;
|
|
@@ -1506,11 +1544,6 @@ export default {
|
|
|
color: #cccccc;
|
|
color: #cccccc;
|
|
|
padding: 12rpx 0;
|
|
padding: 12rpx 0;
|
|
|
}
|
|
}
|
|
|
-.summary-wrap {
|
|
|
|
|
- .goods-summary {
|
|
|
|
|
- height: 400upx;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
.app-footer {
|
|
.app-footer {
|
|
|
/* 使用固定定位确保位置稳定 */
|
|
/* 使用固定定位确保位置稳定 */
|
|
|
position: fixed;
|
|
position: fixed;
|