|
|
@@ -22,7 +22,7 @@
|
|
|
placeholder-class="phcolor"
|
|
|
class="tui-input"
|
|
|
name="sold"
|
|
|
- placeholder="请输入"
|
|
|
+ placeholder="请输入已售数量"
|
|
|
maxlength="50"
|
|
|
type="number"
|
|
|
/>
|
|
|
@@ -34,7 +34,7 @@
|
|
|
placeholder-class="phcolor"
|
|
|
class="tui-input"
|
|
|
name="stock"
|
|
|
- placeholder="请输入"
|
|
|
+ placeholder="请输入库存,留空表示库存充足"
|
|
|
maxlength="50"
|
|
|
type="number"
|
|
|
/>
|
|
|
@@ -72,31 +72,47 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">自动涨价</div>
|
|
|
<label for="autoPrice" class="tui-input" @click="autoRiseChange(form.autoRise)">
|
|
|
- <checkbox id="autoPrice" class="ljd-checkbox" :checked="form.autoRise == 1"></checkbox>
|
|
|
+ <checkbox
|
|
|
+ id="autoPrice"
|
|
|
+ class="ljd-checkbox"
|
|
|
+ :checked="form.autoRise == 1"
|
|
|
+ style="transform: scale(0.7,0.7);"
|
|
|
+ ></checkbox>
|
|
|
<span>需要</span>
|
|
|
</label>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">配送方式</div>
|
|
|
- <label for="autoPrice" class="tui-input" @click="needSendChange(form.needSend)">
|
|
|
+ <label for="sendType" class="tui-input" @click="needSendChange(form.needSend)">
|
|
|
<checkbox
|
|
|
- id="autoPrice"
|
|
|
+ id="sendType"
|
|
|
class="ljd-checkbox"
|
|
|
:checked="form.needSend == 1"
|
|
|
@change="giftChange"
|
|
|
+ style="transform: scale(0.7,0.7);"
|
|
|
></checkbox>
|
|
|
- <span>到店自提</span>
|
|
|
+ <span>到店自取</span>
|
|
|
</label>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">运费</div>
|
|
|
<radio-group class="tui-input flex-center-between" @change="freightChange">
|
|
|
<label class="list" for="customLink">
|
|
|
- <radio id="customLink" value="0" :checked="form.freightType == 0" />
|
|
|
+ <radio
|
|
|
+ id="customLink"
|
|
|
+ value="0"
|
|
|
+ :checked="form.freightType == 0"
|
|
|
+ style="transform: scale(0.8,0.8);"
|
|
|
+ />
|
|
|
<span class="checkbox-text">按距离收费</span>
|
|
|
</label>
|
|
|
<label class="list" for="goodsLink">
|
|
|
- <radio id="goodsLink" value="1" :checked="form.freightType == 1" />
|
|
|
+ <radio
|
|
|
+ id="goodsLink"
|
|
|
+ value="1"
|
|
|
+ :checked="form.freightType == 1"
|
|
|
+ style="transform: scale(0.8,0.8);"
|
|
|
+ />
|
|
|
<span class="checkbox-text">免运费</span>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
@@ -161,8 +177,8 @@ export default {
|
|
|
autoRise: "1",
|
|
|
needSend: "0",
|
|
|
freightType: "0",
|
|
|
- shopImg: [],
|
|
|
- briefContent:""
|
|
|
+ shopImg: [],
|
|
|
+ briefContent: ""
|
|
|
// goodsStyleList: [],
|
|
|
}
|
|
|
};
|
|
|
@@ -183,10 +199,16 @@ export default {
|
|
|
},
|
|
|
_getDet() {
|
|
|
return getDetailB({ id: this.option.id }).then(res => {
|
|
|
- if (this.$util.isEmpty(res.data)) return;
|
|
|
+ if (this.$util.isEmpty(res.data)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
|
this.form[i] = res.data[i];
|
|
|
});
|
|
|
+ if (this.form.stock == -1) {
|
|
|
+ this.$set(this.form, "stock", "");
|
|
|
+ }
|
|
|
+ this.$set(this.form, "shopImg", res.data.smallImgList)
|
|
|
});
|
|
|
},
|
|
|
// 确认
|
|
|
@@ -204,6 +226,9 @@ export default {
|
|
|
let host = this.option.id ? updateB : addB;
|
|
|
let form = JSON.parse(JSON.stringify(this.form));
|
|
|
form.shopImg = this.$util.imgSubstr(form.shopImg);
|
|
|
+ if (form.stock == "") {
|
|
|
+ form.stock = -1;
|
|
|
+ }
|
|
|
host({
|
|
|
status: this.status,
|
|
|
...form
|
|
|
@@ -274,8 +299,6 @@ export default {
|
|
|
.module-tit {
|
|
|
padding: 20px 30px;
|
|
|
font-size: 28px;
|
|
|
- // font-weight: 600;
|
|
|
- // border-bottom: 1px solid $borderColor;
|
|
|
}
|
|
|
.module-det {
|
|
|
padding: 0 30px;
|