|
|
@@ -0,0 +1,247 @@
|
|
|
+<template>
|
|
|
+ <view class="app-content">
|
|
|
+ <view class="ex-page">
|
|
|
+ <view class="input-wrap">
|
|
|
+ <view style="padding:0 0upx 0 20upx;" >
|
|
|
+ <button class="admin-button-com middle blue" style="background-color:green;border:1upx solid green;margin-right:20upx;" @click="allShow()">全部花材显示</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="margin-left:30upx;padding-top:10upx;padding-bottom:10upx;font-size:28upx;">点击红色的成本可以将花材显示</view>
|
|
|
+ <scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
+ <view class="space-view ex-table">
|
|
|
+ <t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
+ <t-tr header>
|
|
|
+ <t-th><view style="width:200upx;text-align:left;">花材</view></t-th>
|
|
|
+ <t-th>库存</t-th>
|
|
|
+ <t-th>路上</t-th>
|
|
|
+ <t-th>大客</t-th>
|
|
|
+ <t-th>批发</t-th>
|
|
|
+ <t-th>零售</t-th>
|
|
|
+ <t-th><view>成本</view></t-th>
|
|
|
+ </t-tr>
|
|
|
+ <block v-if="!$util.isEmpty(classItemData)">
|
|
|
+ <block v-for="(classItem,classIndex) in classItemData" :key="classIndex">
|
|
|
+ <block v-if="classItem.child && !$util.isEmpty(classItem.child)">
|
|
|
+ <t-tr>
|
|
|
+ <t-td>
|
|
|
+ <text style="color:#3385FF;font-weight:bold;width:200upx;text-align:left;">
|
|
|
+ {{ classItem.className }}
|
|
|
+ </text>
|
|
|
+ </t-td>
|
|
|
+ <t-td></t-td>
|
|
|
+ <t-td></t-td>
|
|
|
+ <t-td></t-td>
|
|
|
+ <t-td></t-td>
|
|
|
+ <t-td></t-td>
|
|
|
+ <t-td></t-td>
|
|
|
+ </t-tr>
|
|
|
+ <template v-if="classItem.child && !$util.isEmpty(classItem.child)">
|
|
|
+ <block v-for="(productItem, productIndex) in classItem.child" :key="productIndex">
|
|
|
+ <t-tr>
|
|
|
+ <t-td>
|
|
|
+ <view v-if="productItem.stock>0" style="width:200upx;text-align:left;color:black;font-size:29upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ {{productItem.name}}
|
|
|
+ </view>
|
|
|
+ <view v-else style="width:200upx;text-align:left;color:#b5b3b3;font-size:29upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ {{productItem.name}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ <t-td>
|
|
|
+ <view v-if="productItem.stock>0" style="color:#333333;font-weight:bold;font-size:29upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ {{productItem.stock?parseFloat(productItem.stock):0}}
|
|
|
+ </view>
|
|
|
+ <view v-else style="color:#b5b3b3;font-weight:bold;font-size:29upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ {{productItem.stock?parseFloat(productItem.stock):0}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ <t-td>
|
|
|
+ <text v-if="Number(productItem.onStock)>0" style="color:#0a97a9;font-size:30upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id,})">
|
|
|
+ {{productItem.onStock}}
|
|
|
+ </text>
|
|
|
+ <text v-else style="color:#0a97a9;font-size:30upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id,})">
|
|
|
+ -
|
|
|
+ </text>
|
|
|
+ </t-td>
|
|
|
+ <t-td>
|
|
|
+ <view style="font-size:28upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ ¥{{productItem.hjPrice?parseFloat(productItem.hjPrice):0}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ <t-td>
|
|
|
+ <view style="color:#3385FF;font-size:30upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ ¥{{productItem.price?parseFloat(productItem.price):0}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ <t-td>
|
|
|
+ <view style="font-size:28upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ ¥{{productItem.skPrice?parseFloat(productItem.skPrice):0}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ <t-td>
|
|
|
+ <view style="font-size:28upx;color:red;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
+ ¥{{productItem.avCost?parseFloat(productItem.avCost):0}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ </t-tr>
|
|
|
+ </block>
|
|
|
+ </template>
|
|
|
+ </block>
|
|
|
+ </block>
|
|
|
+ </block>
|
|
|
+ </t-table>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import SelectList from "@/components/plugin/selectList";
|
|
|
+import { getProductDataApi } from "@/api/product";
|
|
|
+import { allHideShow,classItemShow } from "@/api/item";
|
|
|
+import { allOut } from "@/api/stock-out"
|
|
|
+import { list } from "@/mixins";
|
|
|
+import ShopSelect from "@/components/module/shopSelect";
|
|
|
+import DateSelect from "@/components/module/dateSelect";
|
|
|
+import {mapActions, mapGetters} from "vuex";
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
+export default {
|
|
|
+ components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule},
|
|
|
+ mixins: [list],
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["getDictionariesInfo","getLoginInfo","getMyShopInfo"])
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isShow:false,
|
|
|
+ customizationTime:'',
|
|
|
+ shopId:'',
|
|
|
+ itemId:'',
|
|
|
+ nowTime: "",
|
|
|
+ showTimeDropdown: false,
|
|
|
+ nowShop: "",
|
|
|
+ showShopDropdown: false,
|
|
|
+ dataList: [],
|
|
|
+ profile:[],
|
|
|
+ storageData:[],
|
|
|
+ searchContent:'',
|
|
|
+ shopId:0,
|
|
|
+ classItemData:[],
|
|
|
+ form:{shopId:0,shopName:'',hasSelect:0},
|
|
|
+ confirmIn:0
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.showHideItem()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+ },
|
|
|
+ allShow(){
|
|
|
+ allHideShow().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg('操作成功')
|
|
|
+ this.showHideItem()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showHideItem(){
|
|
|
+ this.shopId = this.getMyShopInfo.id;
|
|
|
+ let type = '';
|
|
|
+ let that = this
|
|
|
+ uni.showLoading()
|
|
|
+ getProductDataApi({ type, shopId: this.shopId,status:0,requestType:'hideItem'}).then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ that.classItemData = res.data.classItem ? res.data.classItem : []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.ex-page {
|
|
|
+ background: white;
|
|
|
+ padding-top:20upx;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .input-wrap {
|
|
|
+ display: flex;
|
|
|
+ padding: 0upx 20upx 0upx 13upx;
|
|
|
+ .search-bar {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .top-bar {
|
|
|
+ width: 100%;
|
|
|
+ z-index: 20;
|
|
|
+ .bar{
|
|
|
+ width: 50%;
|
|
|
+ height: 100%;
|
|
|
+ text-align: center;
|
|
|
+ &:nth-child(1){
|
|
|
+ border-right: 1upx solid #eeeeec;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .main-view {
|
|
|
+ margin-top:10upx;
|
|
|
+ flex: 1;
|
|
|
+ background-color: #f9fbfc;
|
|
|
+ .space-view {
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+ .ex-info {
|
|
|
+ padding: 30upx;
|
|
|
+ .info-cell {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 28upx;
|
|
|
+ &:not(:first-child) {
|
|
|
+ margin-top: 20upx;
|
|
|
+ }
|
|
|
+ .cell-label {
|
|
|
+ width: 110upx;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ .cell-value {
|
|
|
+ margin-left: 40upx;
|
|
|
+ color: #333;
|
|
|
+ &.warning {
|
|
|
+ color: #ffaf1d;
|
|
|
+ }
|
|
|
+ &.success {
|
|
|
+ color: #27c325;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ex-table {
|
|
|
+ ::v-deep.icon-info {
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bar-view {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 30upx;
|
|
|
+ width: 100%;
|
|
|
+ height: 100upx;
|
|
|
+
|
|
|
+ box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
|
|
|
+ .info-view {
|
|
|
+ font-size: 26upx;
|
|
|
+ }
|
|
|
+ .btn-view {
|
|
|
+ display: flex;
|
|
|
+ .admin-button-com {
|
|
|
+ margin: 0 10upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|