|
@@ -8,23 +8,19 @@
|
|
|
<input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写名称" maxlength="50" type="text" />
|
|
<input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写名称" maxlength="50" type="text" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="true">
|
|
|
|
|
- <view class="tui-title">分类</view>
|
|
|
|
|
- <picker mode="selector" :value="form.catId" :range="plantClassData" range-key="categoryName" @change="changePlantClassFn" class="tui-input" >
|
|
|
|
|
- <input v-model="form.catId" name="catId" type="text" hidden />
|
|
|
|
|
- <view v-if="form.catId" style="height:45upx;" >{{ categorySelectedData.categoryName }}</view>
|
|
|
|
|
- <view class="tui-placeholder" style="height:45upx;" v-else>请选择</view>
|
|
|
|
|
- </picker>
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">采购单价</view>
|
|
|
|
|
+ <input v-model="form.cgPrice" placeholder-class="phcolor" class="tui-input" name="cgPrice" @focus="form.cgPrice=''" placeholder="请填写进货单价" maxlength="50" type="digit" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">数量</view>
|
|
|
|
|
- <input v-model="form.num" placeholder-class="phcolor" class="tui-input" name="num" @focus="form.num=''" placeholder="请填写数量" maxlength="50" type="number" />
|
|
|
|
|
|
|
+ <view class="tui-title">销售单价</view>
|
|
|
|
|
+ <input v-model="form.salePrice" placeholder-class="phcolor" class="tui-input" name="salePrice" @focus="form.salePrice=''" placeholder="请填写销售单价" maxlength="50" type="digit" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">进货单价</view>
|
|
|
|
|
- <input v-model="form.cgPrice" placeholder-class="phcolor" class="tui-input" name="cgPrice" @focus="form.cgPrice=''" placeholder="请填写进货单价" maxlength="50" type="digit" />
|
|
|
|
|
|
|
+ <view class="tui-title">数量</view>
|
|
|
|
|
+ <input v-model="form.num" placeholder-class="phcolor" class="tui-input" name="num" @focus="form.num=''" placeholder="请填写数量" maxlength="50" type="number" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -33,12 +29,7 @@
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">销售单价</view>
|
|
|
|
|
- <input v-model="form.salePrice" placeholder-class="phcolor" class="tui-input" name="salePrice" @focus="form.salePrice=''" placeholder="请填写销售单价" maxlength="50" type="digit" />
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">上架状态</view>
|
|
|
|
|
|
|
+ <view class="tui-title">状态</view>
|
|
|
<view class="switch_bx">
|
|
<view class="switch_bx">
|
|
|
<switch :checked="form.status == 2 ? false : true" @change="statusChange" style="transform: scale(0.8,0.8)" />
|
|
<switch :checked="form.status == 2 ? false : true" @change="statusChange" style="transform: scale(0.8,0.8)" />
|
|
|
<text v-if="form.status == 1">上架</text>
|
|
<text v-if="form.status == 1">上架</text>
|
|
@@ -46,15 +37,6 @@
|
|
|
</view>
|
|
</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">使用状态</view>
|
|
|
|
|
- <view class="switch_bx">
|
|
|
|
|
- <switch :checked="form.delStatus == 0 ? true : false" @change="delStatusChange" style="transform: scale(0.8,0.8)" />
|
|
|
|
|
- <text v-if="form.delStatus == 0">启用</text>
|
|
|
|
|
- <text v-else>停用</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="module-com input-line-wrap goods-wrap">
|
|
<view class="module-com input-line-wrap goods-wrap">
|
|
@@ -72,7 +54,7 @@
|
|
|
<view class="module-com input-line-wrap">
|
|
<view class="module-com input-line-wrap">
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">备注</view>
|
|
<view class="tui-title">备注</view>
|
|
|
- <textarea style="height: 100upx" v-model="form.remark" placeholder="这里写备注..." />
|
|
|
|
|
|
|
+ <textarea style="height: 100upx" v-model="form.remark" placeholder="..." />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -104,11 +86,9 @@ export default {
|
|
|
currentImgData: [],
|
|
currentImgData: [],
|
|
|
form: {
|
|
form: {
|
|
|
name:"",
|
|
name:"",
|
|
|
- catId:'',
|
|
|
|
|
cgPrice:'',
|
|
cgPrice:'',
|
|
|
shopImg:[],
|
|
shopImg:[],
|
|
|
- status:1,
|
|
|
|
|
- delStatus:0,
|
|
|
|
|
|
|
+ status:2,
|
|
|
salePrice:'',
|
|
salePrice:'',
|
|
|
sendCost:'',
|
|
sendCost:'',
|
|
|
num:'',
|
|
num:'',
|
|
@@ -132,16 +112,9 @@ export default {
|
|
|
statusChange(e){
|
|
statusChange(e){
|
|
|
this.form.status = e.detail.value ? 1 : 2;
|
|
this.form.status = e.detail.value ? 1 : 2;
|
|
|
},
|
|
},
|
|
|
- delStatusChange(e){
|
|
|
|
|
- this.form.delStatus = e.detail.value ? 0 : 1;
|
|
|
|
|
- },
|
|
|
|
|
goBack(){
|
|
goBack(){
|
|
|
uni.navigateBack({delta:1})
|
|
uni.navigateBack({delta:1})
|
|
|
},
|
|
},
|
|
|
- changePlantClassFn(e) {
|
|
|
|
|
- this.categorySelectedData = this.plantClassData[e.detail.value];
|
|
|
|
|
- this.form.catId = this.categorySelectedData.id;
|
|
|
|
|
- },
|
|
|
|
|
imgUploadSuccess(res) {
|
|
imgUploadSuccess(res) {
|
|
|
var imgReturn = JSON.parse(res.data)
|
|
var imgReturn = JSON.parse(res.data)
|
|
|
if(imgReturn.code == 1){
|
|
if(imgReturn.code == 1){
|
|
@@ -193,11 +166,6 @@ export default {
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|
|
|
msg: ["请填写名称"]
|
|
msg: ["请填写名称"]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- name: "catId",
|
|
|
|
|
- rule: ["required"],
|
|
|
|
|
- msg: ["请选择分类"]
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
name: "num",
|
|
name: "num",
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|