shish 2 лет назад
Родитель
Сommit
d013d37a7f
3 измененных файлов с 14 добавлено и 10 удалено
  1. 1 1
      ghsApp/src/admin/home/apply.vue
  2. 12 8
      ghsApp/src/admin/item/detail.vue
  3. 1 1
      ghsApp/src/pages.json

+ 1 - 1
ghsApp/src/admin/home/apply.vue

@@ -67,7 +67,7 @@ export default {
                         {name: "损耗花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/wastage"},
                         {name: "损耗总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/waste"},
                         {name: "结账跟踪",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/clear"},
-                        {name: "分类收",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/classProfit"},
+                        {name: "分类收",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/classProfit"},
                     ]
                 },
                 {

+ 12 - 8
ghsApp/src/admin/item/detail.vue

@@ -235,14 +235,18 @@
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false">
-            <view class="tui-title">卖出后算</view>
-            <view class="switch_bx">
-              <switch :checked="belongCost == 0 ? true : false" @change="belongCostChange" style="transform: scale(0.8,0.8)" />
-              <text v-if="belongCost == 0">收入</text>
-              <text v-else>成本</text>
-            </view>
+            <view class="tui-title">单独统计</view>
+            <radio-group class="tui-input" @change="belongCostChange">
+            <label class="list" for="noLink">
+              <radio id="noLink" value="0" :checked="belongCost == 0" style="transform: scale(0.7,0.7);" />
+              <span class="checkbox-text" style="font-size:30upx;">不要</span>
+            </label>
+            <label class="list" for="needLink">
+              <radio id="needLink" value="1" :checked="belongCost == 1" style="transform: scale(0.7,0.7);" />
+              <span class="checkbox-text" style="font-size:30upx;">需要</span>
+            </label>
+            </radio-group>
           </tui-list-cell>
-
       </view>
 
       <view class="app-footer">
@@ -698,7 +702,7 @@ export default {
     },
     belongCostChange(e){
       let that = this
-      this.belongCost = e.detail.value == true ? 0 : 1
+      this.belongCost = e.detail.value
       changeBelongCost({id:this.productData.id,belongCost:this.belongCost}).then(res=>{
         if(res.code == 1){
           that.$msg(res.msg)

+ 1 - 1
ghsApp/src/pages.json

@@ -269,7 +269,7 @@
 			"root": "admin/stat",
 			"pages": [
 				{"path": "profit","style": {"navigationBarTitleText": "利润表"}},
-				{"path": "classProfit","style": {"navigationBarTitleText": "分类收"}},
+				{"path": "classProfit","style": {"navigationBarTitleText": "分类收"}},
 				{"path": "productSale","style": {"navigationBarTitleText": "花材销量"}},
 				{"path": "kdIncome","style": {"navigationBarTitleText": "收入统计"}},
 				{"path": "customSale","style": {"navigationBarTitleText": "客户下单排行"}},