|
|
@@ -41,15 +41,16 @@
|
|
|
<span>自取商品</span>
|
|
|
</label>
|
|
|
</tui-list-cell>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">运费</view>
|
|
|
<radio-group class="tui-input" @change="freightChange">
|
|
|
<label class="list" for="customLink">
|
|
|
- <radio id="customLink" value="0" :checked="form.freightType == 0" style="transform: scale(0.8,0.8);" />
|
|
|
+ <radio id="customLink" value="0" :checked="form.freightType == 0" style="transform: scale(0.7,0.7);" />
|
|
|
<span class="checkbox-text">按距离收费</span>
|
|
|
</label>
|
|
|
<label class="list" for="goodsLink">
|
|
|
- <radio id="goodsLink" value="1" :checked="form.freightType == 1" style="transform: scale(0.8,0.8);" />
|
|
|
+ <radio id="goodsLink" value="1" :checked="form.freightType == 1" style="transform: scale(0.7,0.7);" />
|
|
|
<span class="checkbox-text">免运费</span>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
@@ -104,6 +105,21 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="module-com input-line-wrap goods-wrap">
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" v-if="stockModel == 1" :hover="false">
|
|
|
+ <view class="tui-title">使用花材数</view>
|
|
|
+ <radio-group class="tui-input" @change="setItemNumChange">
|
|
|
+ <label class="list" for="setItemNumNotOk">
|
|
|
+ <radio id="setItemNumNotOk" value="0" :checked="form.setItemNum == 0" style="transform: scale(0.7,0.7);" />
|
|
|
+ <span class="checkbox-text">以后再改</span>
|
|
|
+ </label>
|
|
|
+ <label class="list" for="setItemNumOk">
|
|
|
+ <radio id="setItemNumOk" value="1" :checked="form.setItemNum == 1" style="transform: scale(0.7,0.7);" />
|
|
|
+ <span class="checkbox-text">好了,可上架</span>
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
<view class="module-tit">
|
|
|
<span>图片</span>
|
|
|
<span class="app-color-3">(最多4张)</span>
|
|
|
@@ -136,10 +152,11 @@ import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import AppUploader from "@/components/app-uploader";
|
|
|
const form = require("@/utils/formValidation.js");
|
|
|
import { getClass } from "@/api/category";
|
|
|
-import { getDetailB, addB, updateB } from "@/api/goods"
|
|
|
+import { addB } from "@/api/goods"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
import htzImageUpload from './components/htz-image-upload/htz-image-upload.vue'
|
|
|
import productMins from "@/mixins/product";
|
|
|
+import {currentShop} from "@/api/shop"
|
|
|
export default {
|
|
|
name: "add",
|
|
|
components: { TuiListCell, AppUploader,htzImageUpload },
|
|
|
@@ -159,10 +176,12 @@ export default {
|
|
|
shopImg: [],
|
|
|
briefContent: "",
|
|
|
status:1,
|
|
|
- cover:''
|
|
|
+ cover:'',
|
|
|
+ setItemNum:0
|
|
|
},
|
|
|
categoryData:[],
|
|
|
- currentImgData:[]
|
|
|
+ currentImgData:[],
|
|
|
+ stockModel:0
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -195,6 +214,14 @@ export default {
|
|
|
this.categoryData = res.data
|
|
|
}
|
|
|
})
|
|
|
+ currentShop().then(res=>{
|
|
|
+ let that = this
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data && res.data.stockModel){
|
|
|
+ that.stockModel = res.data.stockModel
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
confirmFn() {
|
|
|
let that = this
|
|
|
@@ -254,6 +281,9 @@ export default {
|
|
|
freightChange(e) {
|
|
|
this.form.freightType = e.detail.value;
|
|
|
},
|
|
|
+ setItemNumChange(e){
|
|
|
+ this.form.setItemNum = e.detail.value;
|
|
|
+ },
|
|
|
// 表单验证
|
|
|
formSubmit(e) {
|
|
|
// 表单规则
|