shish пре 3 година
родитељ
комит
0de26c63a4
3 измењених фајлова са 17 додато и 3 уклоњено
  1. 1 1
      ghsApp/src/admin/item/add.vue
  2. 1 1
      ghsApp/src/admin/item/copy.vue
  3. 15 1
      ghsApp/src/admin/item/detail.vue

+ 1 - 1
ghsApp/src/admin/item/add.vue

@@ -150,7 +150,7 @@
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">拆散单价</view>
+          <view class="tui-title">拆散单价</view>
           <input v-model="form.smallRatio" @focus="form.smallRatio=''" placeholder-class="phcolor" class="tui-input" name="smallRatio" placeholder="请填写" maxlength="50" 
           type="number" style="width:160upx;border:1upx solid #cccccc;text-align:center;" />
           <text style="margin-left:12upx;" v-if="Number(form.ratio)>0">X ¥{{parseFloat((Number(form.price)/Number(form.ratio)).toFixed(2))}} = ¥{{parseFloat((Number(form.smallRatio)*((Number(form.price)/Number(form.ratio)).toFixed(2))).toFixed(2))}}</text>

+ 1 - 1
ghsApp/src/admin/item/copy.vue

@@ -150,7 +150,7 @@
           </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">拆散单价</view>
+          <view class="tui-title">拆散单价</view>
           <input v-model="form.smallRatio" @focus="form.smallRatio=''" placeholder-class="phcolor" class="tui-input" name="smallRatio" placeholder="请填写" maxlength="50" 
           type="number" style="width:160upx;border:1upx solid #cccccc;text-align:center;" />
           <text style="margin-left:12upx;" v-if="Number(form.ratio)>0">X ¥{{parseFloat((Number(form.price)/Number(form.ratio)).toFixed(2))}} = ¥{{parseFloat((Number(form.smallRatio)*((Number(form.price)/Number(form.ratio)).toFixed(2))).toFixed(2))}}</text>

+ 15 - 1
ghsApp/src/admin/item/detail.vue

@@ -152,7 +152,7 @@
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false">
-            <view class="tui-title">拆散单价</view>
+            <view class="tui-title">拆散单价</view>
             <input v-model="form.smallRatio" @focus="form.smallRatio=''" placeholder-class="phcolor" class="tui-input" name="smallRatio" placeholder="填写数值" 
             type="number" style="width:160upx;border:1upx solid #cccccc;text-align:center;" />
             <text style="margin-left:12upx;" v-if="Number(form.ratio)>0">X ¥{{parseFloat((Number(form.price)/Number(form.ratio)).toFixed(2))}} = ¥{{parseFloat((Number(form.smallRatio)*((Number(form.price)/Number(form.ratio)).toFixed(2))).toFixed(2))}}</text>
@@ -167,6 +167,15 @@
             </view>
           </tui-list-cell>
 
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">虚拟库存</view>
+            <view class="switch_bx">
+              <switch :checked="form.virtualStock == 0 ? false : true" @change="virtualStockChange" style="transform: scale(0.8,0.8)" />
+              <text v-if="form.virtualStock == 0">关闭</text>
+              <text v-else>开启</text>
+            </view>
+          </tui-list-cell>
+
       </view>
 
       <view class="app-footer">
@@ -242,6 +251,7 @@ export default {
         itemId:0,
         smallRatio:1,
         frontHide:0,
+        virtualStock:0,
         ratioType:0,
         inTurn:100
       },
@@ -406,6 +416,9 @@ export default {
     goStockDetail(item){
 				this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+item.id+'&name='+item.name})
 		},
+    virtualStockChange(){
+      this.form.virtualStock = e.detail.value ? 1 : 0;
+    },
     frontHideChange(e){
       this.form.frontHide = e.detail.value ? 1 : 0;
     },
@@ -488,6 +501,7 @@ export default {
         this.form.cost = 0
         this.form.smallRatio = 1
         this.form.frontHide = 0
+        this.form.virtualStock = 0
         this.cost = res.data && res.data.cost ? parseFloat(res.data.cost) : 0
       })
     },