shizhongqi 4 лет назад
Родитель
Сommit
b8e0db1148

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

@@ -70,8 +70,8 @@ export default {
                     list:[
                         {name: "门店",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/shop/list"},
                         {name: "员工",img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,url: "/admin/staff/list"},
-                        {name: "调拨出库",img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,url: "/pagesStorehouse/allot/allotEx"},
-                        {name: "调拨入库",img: `${this.$constant.imgUrl}/ghs/home/dbrk.png`,url: "/pagesStorehouse/allot/allotPut"}
+                        {name: "出库记录",img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,url: "/pagesStorehouse/allot/allotEx"},
+                        {name: "入库记录",img: `${this.$constant.imgUrl}/ghs/home/dbrk.png`,url: "/pagesStorehouse/allot/allotPut"}
                     ]
                 },
                 {

+ 0 - 2
ghsApp/src/admin/home/me.vue

@@ -71,11 +71,9 @@
               <view class="tui-title">使用教程</view>
             </tui-list-cell>
 
-            <!-- #ifdef APP-PLUS -->
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/cashSet' })" class="line-cell" :hover="false" :arrow="true" >
               <view class="tui-title">提现账号</view>
             </tui-list-cell>
-            <!-- #endif -->
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/password' })" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title">密码修改</view>

+ 3 - 3
ghsApp/src/admin/home/workbench.vue

@@ -119,9 +119,9 @@ export default {
 				{ name: "采购单", img: 'ghs/home/icon_caigou.png', url: "/pagesPurchase/order" },
 				{ name: "报损单", img: 'ghs/home/kcyjs.png', url: "/admin/breakage/list" },
 				{ name: "预订单", img: 'ghs/home/kcyjs.png', url: "/admin/order/statBook" },
-				{ name: "调拨出库", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
-				{ name: "调拨入库", img: 'ghs/home/dbrk.png', url: "/pagesStorehouse/allot/allotPut" },
-				{name : "员工", img: "ghs/home/yggl.png", url : "/admin/staff/list"},
+				{ name: "新增出库", img: 'ghs/home/dbck.png', url: "/admin/shop/selectShop" },
+				{ name: "出库记录", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
+				{ name: "入库记录", img: 'ghs/home/dbrk.png', url: "/pagesStorehouse/allot/allotPut" },
 				{name : "销售结账单", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
 				{name : "采购结账单", img : "ghs/home/kcyjs.png", url : "/admin/clear/list"},
 			],

+ 1 - 1
ghsApp/src/admin/item/components/ItemStock.vue

@@ -93,7 +93,7 @@ export default {
 					console.log(JSON.stringify(e));
 				});
     	}else{
-        that.$msg("微信应用未安装")
+        this.$msg("请安装微信")
 				return false
     	}
 			// #endif

+ 284 - 0
ghsApp/src/admin/shop/selectShop.vue

@@ -0,0 +1,284 @@
+<template>
+  <div class="app-main app-content">
+    <view class="input-wrap_box">
+      <view>
+        <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
+      </view>
+    </view>
+    <block v-if="!$util.isEmpty(list.data)">
+      <block v-for="(item, index) in list.data" :key="index">
+        <tui-list-cell :arrow="true" @click="selectCurrent(item)">
+          <div class="tui-msg-box">
+            <img :src="item.avatar" class="tui-msg-pic" mode="widthFix" />
+            <div class="tui-msg-item">
+              <div class="tui-msg-name">
+                <div class="tui-user-name">{{ item.shopName }}</div>
+              </div>
+              <div class="tui-msg-content">
+                <span>{{ item.id }}</span>
+              </div>
+            </div>
+          </div>
+        </tui-list-cell>
+      </block>
+    </block>
+    <block v-else>
+      <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
+    </block>
+  </div>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import BadgeModule from "@/components/plugin/badge";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import appVipModule from "@/components/module/app-vip";
+import AppTag from "@/components/module/app-tag.vue";
+import AppSearchModule from "@/components/module/app-search";
+import { list } from "@/mixins";
+import { getList } from "@/api/shop";
+export default {
+  name: "selectShop",
+  components: {
+    TuiListCell,
+    BadgeModule,
+    AppWrapperEmpty,
+    appVipModule,
+    AppTag,
+    AppSearchModule,
+    couldScan:false
+  },
+  mixins: [list],
+  data() {
+    return {
+      tabIndex: 0,
+      selectStyle:1
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this.getShopList().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this.getShopList().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  onLoad(option) {
+    // #ifdef APP-PLUS
+    if(plus.device.vendor == 'Newland'){
+      this.couldScan = true
+    }
+    // #endif
+  },
+  methods: {
+    selectCurrent(item){
+      let style = this.option.style ? this.option.style : 1
+      this.selectStyle = style
+      if(style == 1){
+        //选择
+        if(this.$util.isScanEnv()){
+          this.$util.pageTo({url: '/pagesStorehouse/allot/addExDetails',type:2,query: {inShopId: item.id,inshopName:item.shopName}})
+        }else{
+          this.$util.pageTo({url: '/pagesStorehouse/allot/exSelect',type:2,query: {inShopId: item.id,inShopName:item.shopName}})
+        }
+      }else if(style == 2){
+        //用于返回的情况
+        let pages = getCurrentPages();
+        let prevPage = pages[ pages.length - 2 ];
+        prevPage.$vm.form.customId = item.id;
+        prevPage.$vm.form.customName = item.name;
+        uni.navigateBack({})
+      }
+    },
+    init() {
+      if(!this.no_shop_show_model) {
+        this.getShopList();
+      }
+    },
+    searchFn(e) {
+        this.resetList();
+        this.seekVal = e;
+        this.getShopList();
+    },
+    getShopList() {
+      return getList({
+          search: "",
+          type:this.tabIndex,
+          page: this.list.page,
+          name: this.seekVal,
+        }).then((res) => {
+          if (this.$util.isEmpty(res.data)){
+            return false;
+          }
+          this.completes(res);
+        });
+    },
+    change(e) {
+      if (this.tabIndex == e.index) {
+        return false;
+      }
+      this.tabIndex = e.index;
+      this.resetList();
+      this.getShopList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+  padding-top: 100upx;
+  padding-bottom: 20upx;
+}
+.tabs-wrap {
+  position: fixed;
+  .tabs-left {
+    width: 80%;
+  }
+  .tabs-right {
+    width: 19%;
+    border-left: $borderColor;
+    @include disFlex(center, center);
+  }
+}
+.input-wrap_box {
+  background-color: #fff;
+  position: fixed;
+  top: 0;
+  z-index: 10;
+  /* 手机mobile屏幕小于1000px */
+  @media screen and (max-width: 1100px) {
+    width: 100%;
+  }
+  /* 收银台cashier屏幕大于1000px */
+  @media screen and (min-width:1100px) {
+    width: 40%;
+  }
+  height: 100upx;
+  display: flex;
+  align-items: center;
+  padding: 0 30upx;
+  & > view:nth-child(1) {
+    flex: 1;
+  }
+}
+.tui-msg-box {
+  display: flex;
+  align-items: center;
+
+  .tui-msg-pic {
+    width: 80upx;
+    height: 80upx;
+    border-radius: 50%;
+    margin-right: 20upx;
+  }
+
+  .tui-msg-item {
+    max-width: 500upx;
+    min-height: 80upx;
+    overflow: hidden;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    & > div {
+      @include disFlex(center, flex-start);
+      & > div:first-child {
+        margin-right: 8upx;
+      }
+    }
+    .level-img {
+      /deep/.vip-text {
+        left: 70upx;
+        top: 8upx;
+      }
+    }
+    .normal-img {
+      width: 70upx;
+      padding: 2upx 6upx;
+      color: #999;
+      background-color: #f0f2f6;
+      border-radius: 20upx;
+      .vip-text {
+        font-size: 24upx;
+        transform: scale(0.6);
+        position: relative;
+        top: -2upx;
+        left: -8upx;
+      }
+    }
+    .member-img {
+      width: 70upx;
+      padding: 2upx 6upx;
+      color: green;
+      background-color: #f0f2f6;
+      border-radius: 20upx;
+      .vip-text {
+        font-size: 24upx;
+        transform: scale(0.6);
+        position: relative;
+        top: -2upx;
+        left: -8upx;
+      }
+    }
+    .iconfont {
+      color: #00aaed;
+    }
+  }
+
+  .tui-msg-name {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 30upx;
+    color: #262b3a;
+    .tui-user-name {
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      width: 290upx;
+    }
+  }
+
+  .tui-msg-content {
+    width:500upx;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24upx;
+    line-height: 1;
+    color: #9397a4;
+    .debt-amount{
+      margin-left:20upx;
+      .amount_num{
+        color:red;
+        margin-left:5upx;
+      }
+    }
+  }
+}
+.tui-msg-right {
+  max-width: 120upx;
+  height: 80upx;
+  margin-left: auto;
+  margin-right: 24upx;
+  text-align: right;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.user_tag {
+  border: 1upx solid #cccccc;
+  padding: 5upx 12upx 5upx 12upx;
+  border-radius: 25upx;
+  color: #bbbbbb;
+  margin-right: 10upx;
+  margin-bottom: 12upx;
+  display: inline-block;
+  font-size: 30upx;
+}
+</style>

+ 1 - 3
ghsApp/src/admin/stat/customSale.vue

@@ -24,9 +24,7 @@
 								<t-td><view>{{item.levelName}}</view></t-td>
 								<t-td><view>{{parseFloat(item.num)}}</view></t-td>
 								<t-td><view>{{parseFloat(item.amount)}}</view></t-td>
-								<t-td>
-									<button class="admin-button-com mini blue change-level" @click="updateLevel(item)">调等级</button>
-								</t-td>
+								<t-td> </t-td>
 							</t-tr>
 						</view>
 

+ 4 - 3
ghsApp/src/pages.json

@@ -155,7 +155,8 @@
 				{"path": "trumpet","style": {"navigationBarTitleText": "收款播报设置"}},
 				{"path": "changeShop","style": {"navigationBarTitleText": "切换门店"}},
 				{"path": "sk","style": {"navigationBarTitleText": "快捷开单设置"}},
-				{"path": "password","style": {"navigationBarTitleText": "密码修改"}}
+				{"path": "password","style": {"navigationBarTitleText": "密码修改"}},
+				{"path": "selectShop","style": {"navigationBarTitleText": "选择门店"}}
 			]
 		},
 		{
@@ -256,10 +257,10 @@
 			"pages": [
 				{ "path": "exDetails", "style": { "navigationBarTitleText": "出库详情" } },
 				{ "path": "addExDetails", "style": { "navigationBarTitleText": "新增" } },
-				{ "path": "allotEx", "style": { "navigationBarTitleText": "调拨出库", "enablePullDownRefresh": true } },
+				{ "path": "allotEx", "style": { "navigationBarTitleText": "出库记录", "enablePullDownRefresh": true } },
 				{ "path": "exSelect", "style": { "navigationBarTitleText": "选择商品", "enablePullDownRefresh": true } },
 				{ "path": "putDetails", "style": { "navigationBarTitleText": "入库详情" } },
-				{ "path": "allotPut", "style": { "navigationBarTitleText": "调拨入库", "enablePullDownRefresh": true } }
+				{ "path": "allotPut", "style": { "navigationBarTitleText": "入库记录", "enablePullDownRefresh": true } }
 			]
 		},
 		{

+ 383 - 151
ghsApp/src/pagesStorehouse/allot/addExDetails.vue

@@ -1,90 +1,134 @@
 <template>
 <view class="app-content">
-	<view class="ex-page">
-		<view class="main-view overscroll">
-			<view class="space-view ex-info">
-				<form>
-					<view class="module-com input-line-wrap">
-						<TuiListCell class="line-cell" :hover="false" :arrow="true">
-							<view class="tui-title ">收货门店</view>
-							<view class="tui-input">
-								<ShopSelect class="bar" top="0" :isShowMore="false" @selectShopFn="selectShopFn" />
-							</view>
-						</TuiListCell>
-						<TuiListCell class="line-cell" :hover="false" :arrow="true">
+  <view class="affirm-page">
+
+    <view class="affirm-view overscroll">
+      <!-- 花材列表 -->
+      <form>
+        <view class="module-com">
+          <view class="commodity-view">
+            <view class="commodity-list">
+              <template v-if="!$util.isEmpty(selectList)">
+                <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+                  <!-- #ifdef APP-PLUS -->
+                  <image class="item-icon" :src="item.cover" />
+                  <!-- #endif -->
+                  <!-- #ifdef MP-WEIXIN -->
+                  <image class="item-icon" :src="item.cover" />
+                  <!-- #endif -->
+                  <view class="item-info">
+                    <view class="info-line">
+                      <text class="item-name">{{ item.itemName }}</text>
+                      <text class="item-price">
+                        <text class="unit"></text>
+                        <text class="price"></text>
+                      </text>
+                    </view>
+
+                    <view style="text-align:right;">
+                      <view class="open-bx" >
+                        <i class="iconfont iconjian" @click="reduceItemFn(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
+                        <text class="num" @click="showAddModelFn(item)">
+                          <text v-if="item.bigCount > 0" style="font-size:24upx;font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
+                          <text v-if="item.smallCount > 0" style="font-size:24upx;">{{ item.smallCount }}</text>
+                        </text>
+                        <i class="iconfont iconzeng" @click="addItemFn(item)"></i>
+                      </view>
+                    </view>
+
+                  </view>
+                </view>
+              </template>
+            </view>
+            <view class="summary-bar">
+              <view class="operate-view" v-if="isScanEnv" @click="removeFromSave(option.inShopId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
+              <view class="operate-view" v-else @click="reSelectItem"><text class="iconfont icongouwuche"></text>重选花材</view>
+              <view class="describe-view">共{{ selectList.length }}种</view>
+            </view>
+          </view>
+        </view>
+
+        <view class="module-com input-line-wrap">
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+							<view class="tui-title ">收货</view>
+							<view class="tui-input"> {{shopName}} </view>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false" :arrow="true">
 							<view class="tui-title ">日期</view>
 							<AppDatePicker :dateVal.sync="form.date" :placeholder="'请选择日期'" />
-						</TuiListCell>
-						<TuiListCell class="line-cell" :hover="false" :arrow="false">
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
 							<view class="tui-title ">备注</view>
 							<input v-model="form.remark" placeholder-class="phcolor" class="tui-input" placeholder="请输入" maxlength="50" type="text" />
-						</TuiListCell>
-					</view>
-				</form>
-			</view>
-			<view class="space-view ex-table">
-				<block v-if="!$util.isEmpty(selectList)">
-					<t-table :headerBackgroundColor="'#F0F2F6'">
-						<t-tr header>
-							<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
-								{{ item.name }}
-							</t-th>
-						</t-tr>
-						<t-tr v-for="(item, index) in selectList" :key="index">
-							<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color">
-								<view v-if="column.custom == 'icon'" class="list-icon">
-									<image class="icon-image" :src="item.cover" />
-									<view class="icon-info">
-										<view class="info-name">
-											{{ item.itemName }}
-										</view>
-										<view class="info-type"></view>
-									</view>
-								</view>
-								<view v-else-if="column.custom == 'excount'" style="font-size:32upx;color:#333333;">
-									<text v-if="item.bigCount > 0">{{`${item.bigCount}`}}{{item.bigUnit}}</text>
-									<text v-if="item.smallCount > 0">{{`${item.smallCount}`}}{{item.smallUnit}}</text>
-								</view>
-								<view v-else>
-									{{ item[column.dataIndex] || "" }}
-								</view>
-							</t-td>
-						</t-tr>
-					</t-table>
-				</block>
-				<view class="btn-bar">
-					<template v-if="isScanEnv">
-						<button class="admin-button-com middle blue">请扫码</button>
-					</template>
-					<template v-else>
-					<button class="admin-button-com middle blue" v-if="!$util.isEmpty(selectList)" @click="gotoSelectPage">修改花材</button>
-					<button class="admin-button-com middle blue" v-else @click="gotoSelectPage">选择花材</button>
-					</template>
-				</view>
-			</view>
-		</view>
-		<view class="app-footer open_btn">
-			<button v-if="!$util.isEmpty(selectList)" class="admin-button-com middle default" @click="removeFromSave()">清空花材</button>
-			<button @click="stockOutFn()" class="admin-button-com middle blue">确认出库</button>
-		</view>
-
-		<view v-if="isScanEnv" @click="changeGet" style="width:125upx;height:125upx;display:flex;justify-content:center;align-items:center;font-size:60upx;
-		background:#3385ff;color:white;z-index:9999;position:fixed;bottom:160upx;right:40upx;border-radius:60upx;">{{calc=='add'?'+':'-'}}</view>
-
-	</view>
-</view>
+					</tui-list-cell>
+        </view>
+      </form>
+    </view>
+
+    <view class="under-bar">
+      <view class="price-view">
+        <text class="price-title">
+          <text></text>
+        </text>
+      </view>
+      <button v-if="!$util.isEmpty(selectList)" class="admin-button-com big default" @click="removeFromSave()">清空花材</button>
+      <button class="admin-button-com blue big" @click="stockOutFn()">确认出库</button>
+    </view>
+
+    <view v-if="isScanEnv" @click="changeGet" style="width:125upx;height:125upx;display:flex;justify-content:center;align-items:center;font-size:60upx;
+    background:#3385ff;color:white;z-index:9999;position:fixed;bottom:230upx;right:40upx;border-radius:60upx;">{{calc=='add'?'+':'-'}}</view>
+
+        <modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
+          <template slot="customContent">
+            <view class="select-cmd_bx" v-if="customData">
+              <view class="kc"><text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text><text class="unit_price"> 单价 {{ parseFloat(customData.price) }}</text>1扎={{customData.ratio}}支</view>
+
+              <view class="num_bx">
+                <input style="width: 430upx" v-model="customData.userPrice" @focus="customData.userPrice = null" type="number" placeholder="单价" />
+                <text style="font-size:35upx;font-weight:bold;color:#666666;">元</text>
+              </view>
+
+              <view class="num_bx">
+                <!-- #ifdef APP-PLUS -->
+                <input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
+                <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">扎</text>
+                <input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="number" />
+                <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">支</text>
+                <!-- #endif -->
+
+                <!-- #ifdef MP-WEIXIN -->
+                <input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" :focus="isAddInputFocus" type="number" />
+                <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">扎</text>
+                <input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
+                <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">支</text>
+                <!-- #endif -->
+
+                <image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" 
+                style="width:86upx;height:86upx;position:relative;top:-60upx;right:0upx;" mode="widthFix"></image>
+
+              </view>
+
+            </view>
+          </template>
+        </modal-module>
+
+    </view>
+  </view>
 </template>
+
 <script>
 import TuiListCell from "@/components/plugin/list-cell";
 import productMins from "@/mixins/product";
 import AppDatePicker from "@/components/app-date-picker";
-import ShopSelect from "@/components/module/shopSelect";
 import { selectShop } from "@/mixins";
 import { createStockOutOrderApi } from "@/api/storehouse/stock";
 import {mapActions, mapGetters} from "vuex";
+import ModalModule from "@/components/plugin/modal"
 const formUtil = require("@/utils/formValidation.js");
 export default {
-	components: { TuiListCell, AppDatePicker, ShopSelect },
+	components: { TuiListCell, AppDatePicker, ModalModule },
 	mixins: [productMins, selectShop],
 	computed: {
 		...mapGetters(["getLoginInfo"])
@@ -92,6 +136,7 @@ export default {
 	data() {
 		return {
 			selectJobType: "allotEx",
+			selectJobId:0,
 			autoLoad:true,
 			form: {
 				date: "",
@@ -105,11 +150,11 @@ export default {
 			],
 			typeTimeShow: true,
 			isScanEnv:false,
-      		calc:'add'
+      calc:'add',
+			isAddModel:false,
+      shopName:''
 		};
 	},
-	onShow() {
-	},
 	onLoad(){
 		// #ifdef APP-PLUS
 		if(this.$util.isScanEnv()){
@@ -117,22 +162,32 @@ export default {
 		}
 		// #endif
 		this.listenScanItem()
+
+		if (!this.$util.isEmpty(this.option.inShopId)){
+			this.selectJobId = this.option.inShopId || 0
+      this.form.inShopId = this.option.inShopId || 0
+      this.shopName = this.option.inShopName || ''
+		}
+
 	},
 	methods: {
 		...mapActions(["reSetSelectInfo"]),
+    reSelectItem () {
+      this.$util.pageTo({url: '/pagesStorehouse/allot/exSelect',type:2,query: {inShopId: this.option.inShopId}})
+    },
 		changeGet(){
 			this.calc = this.calc == 'add' ? 'sub' : 'add'
 		},
-		gotoSelectPage() {
-			uni.navigateTo({ url: `/pagesStorehouse/allot/exSelect`, success: result => {}, fail: () => {}, complete: () => {} })
+		reduceItemFn(item) {
+      this.kdType = 'HIT';
+			this.replaceItemFn(item,0,'sub')
 		},
-		selectShopFn(val) {
-			if(this.getLoginInfo.shopId == val.id) {
-				this.$msg('不能出到库到本店')
-				this.form.inShopId = ''
-				return
-			}
-			this.form.inShopId = val.id;
+		addItemFn (item) {
+      this.kdType = 'HIT';
+			this.replaceItemFn(item,0,'add')
+		},
+		gotoSelectPage() {
+			uni.navigateTo({ url: `/pagesStorehouse/allot/exSelect` })
 		},
 		stockOutFn() {
 			let rules = [ { name: "inShopId", rule: ["required"], msg: ["请选择门店"] } ];
@@ -191,84 +246,261 @@ export default {
 	}
 };
 </script>
+
 <style lang="scss" scoped>
-.ex-page {
-	height: 100%;
-	display: flex;
-	flex-direction: column;
-	.main-view {
-		flex: 1;
-		background-color: #f9fbfc;
-		.space-view {
-			margin-top: 15upx;
-			background-color: #fff;
-			.btn-bar {
-				margin-top: 30upx;
-				width: 100%;
-				text-align: center;
-			}
-		}
-		.ex-info {
-			.module-com {
-				background-color: #fff;
-				margin-bottom: 20upx;
-
-				border-radius: 10upx;
-				overflow: hidden;
-				.member-wrap {
-					.member-det {
-						font-size: 24upx;
-						margin-left: 20upx;
-					}
+.admin-button-com {
+  margin-right: 30upx;
+}
+.affirm-page {
+  position: relative;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .affirm-view {
+    flex: 1;
+    margin-bottom:90upx;
+    padding: 20upx;
+    background-color: #f0f2f6;
+
+    .commodity-view {
+      display: flex;
+      flex-direction: column;
+      .commodity-list {
+        padding: 20upx;
+        .commodity-item {
+          display: flex;
+          margin-bottom: 20upx;
+          .item-icon {
+            flex-shrink: 0;
+            width: 140upx;
+            height: 140upx;
+          }
+          .item-info {
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            flex: 1;
+            margin-left: 20upx;
+            .info-line {
+              margin-bottom: 20upx;
+              display: flex;
+              justify-content: space-between;
+              align-items: flex-end;
+              .item-name {
+                color: #666;
+                font-size: 28upx;
+              }
+              .item-price {
+                color: #333;
+                font-size: 22upx;
+                .price {
+                  font-size: 32upx;
+                  font-weight: bold;
+                }
+              }
+              .item-type {
+                color: #999;
+                font-size: 24upx;
+              }
+              .item-count {
+                color: #666;
+                font-size: 24upx;
+              }
+            }
+
+& .open-bx {
+				align-items: center;
+				& .iconfont {
+					color: #3385ff;
+					font-size: 42upx;
+				}
+
+				.position{
+					display: block;
+					width: 70upx;
+					text-align: center;
 				}
-				.remark-wrap {
-					align-items: flex-start;
-					.remark {
-						height: 240upx;
+				.iconcachu {
+					margin: 0 6upx 0 20upx;
+					color: #ccc;
+					&.edit {
+						color: #3385ff;
 					}
 				}
-			}
-		}
-		.ex-table {
-			padding-bottom:120upx;
-			/deep/.list-icon {
-				display: flex;
-				.icon-image {
-					width: 80upx;
-					height: 80upx;
-					margin-right: 20upx;
+				& > .num {
+					display: inline-block;
+					width: 120upx;
+					height:45upx;
+					text-align:center;
+					margin: 0 8upx;
+					color: #868686;
+					border-radius: 22upx;
+					background-color: #f5f5f5;
+					padding: 3upx 0;
+					font-size: 25upx;
 				}
-				.icon-info {
-					display: flex;
-					flex-direction: column;
-					justify-content: space-around;
-					.info-name {
-						font-size: 28upx;
-						font-weight: bold;
-						color: #333333;
-					}
-					.info-type {
-						font-size: 24upx;
-						color: #666666;
-					}
+				.change-input {
+					width: 164upx;
+					height: 60upx;
+					line-height: 60upx;
+					text-align: center;
+					background: #ffffff;
+					border: 1upx solid #dddddd;
+					border-radius: 4upx;
+					font-size: 25upx;
+				}
+				.btn-box{
+					width: 100upx;
+					height: 60upx;
+					line-height: 60upx;
+					color: #ffffff;
+					background: #3385ff;
+					text-align: center;
+					border-radius: 10upx;
 				}
 			}
-		}
-	}
-	.bar-view {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		padding: 0 30upx;
-		width: 100%;
-		height: 100upx;
 
-		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+          }
+        }
+      }
+      .summary-bar {
+        padding: 0 20upx;
+        height: 90upx;
+        display: flex;
+
+        align-items: center;
+        justify-content: space-between;
+        border-top: 1upx solid #eeeeee;
+        .operate-view {
+          display: flex;
+
+          align-items: center;
+          color: #3385ff;
+          font-size: 26upx;
+          .iconfont {
+            margin-right: 20upx;
+            font-size: 40upx;
+          }
+        }
+        .describe-view {
+          display: flex;
 
-		.btn-view {
+          align-items: center;
+          color: #333;
+          font-size: 24upx;
+          .price {
+            font-weight: bold;
+            font-size: 36upx;
+          }
+        }
+      }
+    }
+
+    .module-com {
+      background-color: #fff;
+      margin-bottom: 20upx;
+      border-radius: 10upx;
+      overflow: hidden;
+					.tab-box{
+						padding: 10upx 30upx 30upx;
+						.tab{
+							width: 49%;
+							height: 70upx;
+							color: #a2a2a2;
+							border: 1upx solid #dcdcdc;
+							border-radius: 10upx;
+							font-size: 28upx;
+							font-weight: 700;
+							&.active{
+								color: #ff4d4d;
+								border: 1upx solid #ff4d4d;
+							}
+						}
+					}
+      .member-wrap {
+        .member-det {
+          font-size: 24upx;
+          margin-left: 20upx;
+        }
+      }
+      .remark-wrap {
+        align-items: flex-start;
+        .remark {
+          height: 240upx;
+        }
+      }
+      // .tui-placeholder,
+      // .tui-input {
+      // 	padding-right: 30upx;
+      // 	width: 100%;
+      // 	text-align: right;
+      // }
+    }
+  }
+  .under-bar {
+    z-index:99999;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 20upx;
+    position: fixed;
+    bottom:0;
+    /* 手机mobile屏幕小于1000px */
+    @media screen and (max-width: 1100px) {
+      width: 100%;
+    }
+    /* 收银台cashier屏幕大于1000px */
+    @media screen and (min-width:1100px) {
+      width: 40%;
+    } 
+    height: 100upx;
+    background-color: #fff;
+
+    box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+    .price-view {
+      display: flex;
+      align-items: center;
+      font-size: 24upx;
+      .price-title {
+        color: #333;
+      }
+      .price-number {
+        margin: 0 20upx;
+        color: #ff2842;
+        .large {
+          font-size: 40upx;
+        }
+      }
+    }
+    .admin-button-com {
+      width: 200upx;
+    }
+  }
+	.select-cmd_bx {
+		& .kc {
+			color: #999999;
+			font-size: 28upx;
+			font-weight: 400;
+			margin-bottom: 40upx;
+			text-align: center;
+			margin-top: 30upx;
+			.unit_price{
+				padding-right:25upx;
+			}
+		}
+		& .num_bx {
 			display: flex;
-			.admin-button-com {
-				margin: 0 10upx;
+			align-items: center;
+			margin-bottom: 40upx;
+			& > input {
+				width: 212upx;
+				height: 80upx;
+				border: 1upx solid #dddddd;
+				border-radius: 4upx;
+				text-align: center;
+				margin-right: 24upx;
+				font-size: 40upx;
 			}
 		}
 	}

+ 1 - 6
ghsApp/src/pagesStorehouse/allot/allotEx.vue

@@ -120,12 +120,7 @@ export default {
 			return name;
 		},
 		addEvent() {
-			uni.navigateTo({
-				url: `/pagesStorehouse/allot/addExDetails`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+			uni.navigateTo({url: `/admin/shop/selectShop`})
 		},
 		gotoDetails(item) {
 			uni.navigateTo({

+ 6 - 19
ghsApp/src/pagesStorehouse/allot/exDetails.vue

@@ -12,18 +12,16 @@
 					<view class="cell-value"> {{ outData.updateTime?outData.updateTime.substr(5,11):'' }}</view>
 				</view>
 				<view class="info-cell">
-					<view class="cell-label"> 制单人</view>
+					<view class="cell-label"> 操作</view>
 					<view class="cell-value"> {{ outData.adminName || "" }}</view>
 				</view>
 				<view class="info-cell">
 					<view class="cell-label"> 状态</view>
-					<view :class="['cell-value',{warning:outData.status == OUT_STATUS.CONFIRM},{success:outData.status == OUT_STATUS.DONE}]">{{getItemStatusName(outData.status) || ""}}</view>
+					<view class="cell-value">{{getItemStatusName(outData.status)}}</view>
 				</view>
 				<view class="info-cell">
 					<view class="cell-label"> 备注</view>
-					<view class="cell-value">
-						{{ outData.remark || "" }}
-					</view>
+					<view class="cell-value"> {{ outData.remark || "" }} </view>
 				</view>
 			</view>
 			<view class="space-view ex-table">
@@ -68,20 +66,8 @@
 		<view class="bar-view">
 			<view class="info-view"> 出库数量:{{ sumCount }} </view>
 			<view class="btn-view" v-if="outData.status">
-				<button
-					v-if="outData.status != OUT_STATUS.CANCEL && outData.statusName != '已出库'"
-					class="admin-button-com middle"
-					@click="cancelEvent"
-				>
-					取消
-				</button>
-				<button
-					v-if="outData.status == OUT_STATUS.CONFIRM"
-					class="admin-button-com middle"
-					@click="confirmEventPop"
-				>
-					确认
-				</button>
+				<button v-if="outData.status != OUT_STATUS.CANCEL && outData.statusName != '已出库'" class="admin-button-com middle" @click="cancelEvent" > 取消 </button>
+				<button v-if="outData.status == OUT_STATUS.CONFIRM" class="admin-button-com middle" @click="confirmEventPop" > 确认 </button>
 			</view>
 		</view>
 	</view>
@@ -140,6 +126,7 @@ export default {
 					break;
 
 				default:
+					name = '';
 					break;
 			}
 			return name;

+ 7 - 2
ghsApp/src/pagesStorehouse/allot/exSelect.vue

@@ -109,6 +109,7 @@ export default {
 		return {
 			COMMODITY_TYPE,
 			selectJobType: "allotEx",
+			selectJobId:0,
 			tabIndex: 0,
 			isAddInputFocus: false,
 			isAddModel: false,
@@ -118,6 +119,11 @@ export default {
 			showSubmitModel: false
 		};
 	},
+	onLoad () {
+		if (!this.$util.isEmpty(this.option.inShopId)){
+			this.selectJobId = this.option.inShopId
+		}
+	},
 	computed: {
 		confirmContent() {
 			let content = "确认下一步?";
@@ -128,13 +134,12 @@ export default {
 		}
 	},
 	methods: {
-		//确认
 		confirmOut() {
 			if(this.$util.isEmpty(this.selectList)){
 				this.$msg('请选择花材')
 				return false
 			}
-			uni.navigateBack({ delta: 1 })			
+			this.$util.pageTo({url: '/pagesStorehouse/allot/addExDetails',type:2,query: {inShopId: this.option.inShopId,inShopName:this.option.inShopName}})	
 		}
 	}
 };

+ 3 - 0
ghsApp/src/utils/util.js

@@ -301,6 +301,8 @@ export const noStockRemind = () =>{
 
 //点击声效 shish
 export const hitRemind = () =>{
+	//微信PC端会报错,不要使用
+	//#ifdef APP-PLUS
 	const innerAudioContext = uni.createInnerAudioContext()
 	innerAudioContext.autoplay = false
 	innerAudioContext.src = "/static/hit.mp3"
@@ -310,6 +312,7 @@ export const hitRemind = () =>{
 		innerAudioContext.destroy()
 	})
 	innerAudioContext.play()
+	//#endif
 }
 
 //去重 姜枫 2021.05.05

+ 35 - 5
hdApp/src/admin/goods/add.vue

@@ -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) {
       // 表单规则

+ 44 - 3
hdApp/src/admin/goods/detail.vue

@@ -110,10 +110,33 @@
               </view>
             </view>
           </view>
+
+          <template>
+            <view style="text-align:center;">
+                <button class="admin-button-com middle blue" v-if="goodsInfo.setItemNum == 0" style="margin:0 auto;margin-top:10upx;margin-bottom:10upx;" @click="selectItem()">修改花材</button>
+                <button class="admin-button-com middle default" v-else style="margin:0 auto;margin-top:10upx;margin-bottom:10upx;">修改花材</button>
+            </view>
+          </template>
+
         </view>
       </template>
 
       <view class="module-com input-line-wrap goods-wrap">
+
+        <tui-list-cell class="line-cell" v-if="form.flower == 1 && 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" :disabled="goodsInfo.setItemNum == 1" 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" :disabled="goodsInfo.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>
@@ -149,6 +172,7 @@ import { getClass } from "@/api/category";
 import { getDetailB, addB, updateB } 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 {currentShop} from "@/api/shop"
 export default {
   name: "add",
   components: {
@@ -174,17 +198,35 @@ export default {
         briefContent: "",
         status:1,
         flower:1,
-        flowerNum:0
+        flowerNum:0,
+        setItemNum:0,
       },
-      categoryData:[]
+      categoryData:[],
+      stockModel:0
     };
   },
   onLoad() {
     const token = uni.getStorageSync('token')
     this.headers.token = token
     this.getDetail()
+
+      currentShop().then(res=>{
+        let that = this
+        if(res.code == 1){
+            if(res.data && res.data.stockModel){
+              that.stockModel = res.data.stockModel
+            }
+        }
+      })
+
   },
   methods: {
+    setItemNumChange(e){
+      this.form.setItemNum = e.detail.value;
+    },
+    selectItem(){
+      this.pageTo({url:'/admin/goods/selectItem'})
+    },
     imgDeleteFn(res){
       const index = res.index
       this.form.shopImg.splice(index,1)
@@ -216,7 +258,6 @@ export default {
             this.categoryData = res.data
           }
         })
-
       })
     },
     formSubmit(e) {

+ 7 - 0
hdApp/src/admin/home/apply.vue

@@ -40,6 +40,13 @@ export default {
                 { name: "运费规则", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goods/freight",pf:1}
             ]
         },
+        {
+          title: '制作单',
+          list: [
+            { name: "制作单", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/work/list",pf:1},
+            { name: "制作统计", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/work/statCat",pf:1},
+          ]
+        },
         {
           title: '门店仓库',
           list: [

+ 0 - 2
hdApp/src/admin/home/me.vue

@@ -66,11 +66,9 @@
               <view class="tui-title">充值记录</view>
             </tui-list-cell>
 
-            <!-- #ifdef APP-PLUS -->
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/cashSet' })" class="line-cell" :hover="false" :arrow="true" >
               <view class="tui-title">提现账号</view>
             </tui-list-cell>
-            <!-- #endif -->
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/password' })" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title">密码修改</view>

+ 19 - 0
hdApp/src/admin/shop/add.vue

@@ -19,6 +19,21 @@
 						</label>
 					</radio-group>
 				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">库存控制</view>
+					<radio-group class="tui-input" @change="stockModelChange">
+						<label class="list" for="stockModelZha">
+							<radio id="stockModelZha" value="0" style="transform:scale(0.7,0.7)" :checked="form.stockModel == 0" />
+							<span class="checkbox-text">管到扎</span>
+						</label>
+						<label class="list" for="stockModelZhaZhi">
+							<radio id="stockModelZhaZhi" value="1" style="transform:scale(0.7,0.7)" :checked="form.stockModel == 1" />
+							<span class="checkbox-text">管到支</span>
+						</label>
+					</radio-group>
+				</tui-list-cell>
+
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title">营业状态</view>
 					<view><switch style="transform:scale(0.7,0.7)" :checked="form.open == 0 ? false : true" @change="openChange" /></view>
@@ -136,6 +151,7 @@ export default {
 			end_time: '00:00',
 			form: {
 				join:0,
+				stockModel:0,
 				shopName: '',
 				province: '',
 				city: '',
@@ -240,6 +256,9 @@ export default {
 		joinChange(e){
 			this.form.join = e.detail.value
 		},
+		stockModelChange(e){
+			this.form.stockModel = e.detail.value
+		},
 		endTimeChange: function(e) {
 			this.end_time = e.detail.value
 			this.form.openEndTime = e.detail.value

+ 198 - 0
hdApp/src/admin/work/statCat.vue

@@ -0,0 +1,198 @@
+<template>
+<view class="app-content">
+	<view class="ex-page">
+		<view class="input-wrap_box">
+            <view>
+                <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
+            </view>
+		</view>
+		<view class="top-bar">
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+		</view>
+		<view class="main-view">
+			<view class="space-view ex-table">
+				<block>
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+
+						<t-tr header><t-th>名称</t-th><t-th>制作单</t-th><t-th>商品数</t-th><t-th>使用花材</t-th></t-tr>
+
+						<view v-for="(item, index) in statData" :key="index">
+							<t-tr>
+								<t-td><view>{{item.catName}}</view></t-td>
+								<t-td><view>{{item.workNum}}</view></t-td>
+								<t-td><view>{{item.num}}</view></t-td>
+								<t-td>
+									<button class="admin-button-com mini blue change-level" @click="getDetail(item)">查看明细</button>
+								</t-td>
+							</t-tr>
+						</view>
+
+					</t-table>
+				</block>
+			</view>
+		</view>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import AppSearchModule from "@/components/module/app-search";
+import { getStatWorkCat } from "@/api/stat/index";
+import {mapActions, mapGetters} from "vuex";
+export default {
+	components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
+	mixins: [list],
+	computed: {
+
+    },
+	data() {
+		return {
+			isShow:false,
+			customizationTime:[],
+			shopId:'',
+			itemId:'',
+			nowTime: "",
+			showTimeDropdown: false,
+			nowShop: "",
+			showShopDropdown: false,
+			dataList: [],
+			params:{
+				searchTime:'today',
+				startTime: "",
+				endTime: "",
+			},
+			profile:[],
+			statData:[],
+			searchContent:'',
+		};
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onLoad() {
+	},
+	methods: {
+		...mapActions(['setUserShopAll']),
+        getDetail(item){
+            this.$util.pageTo({url:'/admin/work/statCatItem',query:{...this.params,catId:item.catId}})
+        },
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
+			this.init();
+		},
+		//选择时间
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
+		},
+		async init() {
+			this.getList();
+		},
+		getList() {
+			let that = this
+			uni.showLoading()
+			getStatWorkCat(this.params).then(res => {
+				uni.hideLoading()
+				if (!this.$util.isEmpty(res.data.list)) {
+					that.statData = res.data.list
+				}else{
+					that.statData=[]
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+		position: absolute;
+		left: 0;
+		top:100upx;
+		display: flex;
+		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: 80upx;
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+			.change-level{
+				font-size:22upx;
+				padding:10upx 15upx;
+			}
+		}
+		.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 {
+			/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>

+ 162 - 0
hdApp/src/admin/work/statCatItem.vue

@@ -0,0 +1,162 @@
+<template>
+<view class="app-content">
+	<view class="ex-page">
+		<view class="main-view">
+			<view class="space-view ex-table">
+				<block>
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+
+						<t-tr header><t-th>图片</t-th><t-th>名称</t-th><t-th>数量</t-th><t-th>操作</t-th></t-tr>
+
+						<view v-for="(item, index) in statData" :key="index">
+							<t-tr>
+								<t-td><view><image :src="item.itemCover" style="width:50upx;height:50upx;border-radius:10upx;"></image></view></t-td>
+								<t-td><view>{{item.itemName}}</view></t-td>
+								<t-td><view>{{item.num?parseFloat(item.num):0}}</view></t-td>
+								<t-td><view></view></t-td>
+							</t-tr>
+						</view>
+
+					</t-table>
+				</block>
+			</view>
+		</view>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { list } from "@/mixins";
+import AppSearchModule from "@/components/module/app-search";
+import { getStatWorkCatItem } from "@/api/stat/index";
+export default {
+	components: { SelectList, AppWrapperEmpty,AppSearchModule},
+	mixins: [list],
+	data() {
+		return {
+			isShow:false,
+			customizationTime:[],
+			shopId:'',
+			itemId:'',
+			nowTime: "",
+			showTimeDropdown: false,
+			nowShop: "",
+			showShopDropdown: false,
+			dataList: [],
+			profile:[],
+			statData:[],
+			searchContent:'',
+		};
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onLoad() {
+
+	},
+	methods: {
+		async init() {
+			this.getList();
+		},
+		getList() {
+			let that = this
+			uni.showLoading()
+			getStatWorkCatItem(this.option).then(res => {
+				uni.hideLoading()
+				if (!this.$util.isEmpty(res.data.list)) {
+					that.statData = res.data.list
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+		position: absolute;
+		left: 0;
+		top:100upx;
+		display: flex;
+		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: 80upx;
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+			.change-level{
+				font-size:22upx;
+				padding:10upx 15upx;
+			}
+		}
+		.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 {
+			/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>

+ 8 - 0
hdApp/src/api/stat/index.js

@@ -1,5 +1,13 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getStatWorkCatItem = data => {
+	return https.get('/stat-work-cat-item/item-list', data)
+}
+
+export const getStatWorkCat = data => {
+	return https.get('/stat-work-cat/profile', data)
+}
+
 //数据统计
 export const getStatList = data => {
 	return https.get('/stat/list', data)

+ 2 - 0
hdApp/src/pages.json

@@ -13,6 +13,8 @@
 			"root": "admin/work",
 			"pages": [
 				{"path": "add","style": {"navigationBarTitleText": "新建制作单"}},
+				{"path": "statCat","style": {"navigationBarTitleText": "制作统计"}},
+				{"path": "statCatItem","style": {"navigationBarTitleText": "明细"}},
 				{"path": "addResult","style": {"navigationBarTitleText": "新建成功"}},
 				{"path": "list","style": {"navigationBarTitleText": "列表","enablePullDownRefresh": true}},
 				{"path": "detail","style": {"navigationBarTitleText": "详情"}}

+ 3 - 1
hdPad/src/mixins/product.js

@@ -19,7 +19,8 @@ export default {
 			checkStock:true,// 考虑库存,盘点不需要考虑库存
 			customData: { currentNum: 0, unitPrice: 0,unitType:0, unitName:'扎',property:1},
 			globalItemList:[],
-			globalAllProduct:[]
+			globalAllProduct:[],
+			calc:'add'
 		};
 	},
 	onLoad(options) {
@@ -242,6 +243,7 @@ export default {
 			if(this.$util.isEmpty(code)){
 				return false
 			}
+			code = String(code)
 			let current = null
 			let unitPrice = 0
 			let unitName = ''

+ 7 - 1
hdPad/src/pages/home/components/nav.vue

@@ -1,8 +1,10 @@
 <template>
   <view class="nav-left">
+    <template v-if="showMenu">
     <view :class="['item-list',navType==s.flag ?'selected':'']" v-for="(s, idx) in nav" @tap="goTo(s)" :key="idx">
       <view class="name">{{s.name}}</view>
      </view>
+    </template>
     <keyboard-listener v-if="device == 'PAD'" @keyup="getScan"></keyboard-listener>
   </view>
 </template>
@@ -16,7 +18,11 @@ export default {
 		navType: {
 			type: String,
 			default: ''
-		}
+		},
+	    showMenu:{
+	      type:Boolean,
+	      default:true
+	    }
   },
   data() {
     return {

+ 3 - 3
hdPad/src/pages/home/components/settlePop.vue

@@ -80,7 +80,7 @@ export default {
             form:{
                 hasPay: 0,
                 payWay:0,
-                needPrint:1,
+                needPrint:2,
                 freight: '',
                 groupName:'',
                 remark:'',
@@ -93,7 +93,7 @@ export default {
             payWayList:[ { name:'微信', id:0 }, { name:'支付宝', id:1 }, { name:'现金', id:4 }, { name:'银行卡', id:5 },{name:'其它',id:9} ],
             currentInputType:'proceeds',
             totalMoney: 0,
-            needPrintList:[ { name:'打印', id:1 }, { name:'不打印', id:2 } ],
+            needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
             getStaffList:[]
         };
     },
@@ -137,7 +137,7 @@ export default {
                 if(Number(val) == 1){
                     this.form.hasPay = 0
                     this.form.payWay = 0
-                    this.form.needPrint = 1
+                    this.form.needPrint = 2
                     this.form.groupName = ''
                     this.form.remark = ''
                     this.form.sendCost = 0

+ 11 - 7
hdPad/src/pages/home/components/workInfo.vue

@@ -27,7 +27,8 @@
     </view>
     <view class="work-item-detail">
 
-      <view class="flex-space right-detail-title">每份用材</view>
+      <view class="flex-space right-detail-title" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1">每份用材</view>
+      <view class="flex-space right-detail-title" v-else>使用花材</view>
       
       <view class="unit-use-item">
         <view class="commodity-list">
@@ -48,11 +49,11 @@
         </view>
       </view>
 
-      <view style="height:2vh;background-color:#EEEEEE;"></view>
+      <view style="height:2vh;background-color:#EEEEEE;" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1"></view>
 
-      <view class="flex-space right-detail-title"> 总共用材 </view>
+      <view class="flex-space right-detail-title" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1"> 总共用材 </view>
       
-      <view class="total-use-item">
+      <view class="total-use-item" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1">
         <view class="commodity-list">
           <view v-for="(s, idx) in orderItem" :key="idx" class="commodity-item" >
             <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})" />
@@ -72,6 +73,8 @@
           </view>
         </view>
       </view>
+
+
     </view>
 
     <view class="button-area">
@@ -107,9 +110,7 @@
 import { getFullInfo,finish,lockWork,cancelWork,print } from '@/api/work'
 import {modifyWastage} from '@/api/work-item'
 import wastageSelectNum from './wastageSelectNum.vue'
-// #ifdef APP-PLUS
-const plug = uni.requireNativePlugin('Html5app-Gprinter')
-// #endif
+import { mapGetters } from "vuex";
 export default {
 	name: "orderInfo",
 	components: {wastageSelectNum},
@@ -124,6 +125,9 @@ export default {
       today:''
     }
   },
+	computed:{
+		...mapGetters(["getMyShopInfo"]),
+	},
   methods:{
     printFn(item){
       if(item.status ==1){

+ 18 - 2
hdPad/src/pages/home/modify.vue

@@ -1,7 +1,9 @@
 <template>
     <view>
         <view class="app-casher-area">
-            <view class="nav-left"> </view>
+            <view class="nav-left">
+				<navComponent navType="work" :showMenu="false"></navComponent>
+			</view>
             <!-- 已选花材列表 -->
             <view class="itemList-box">
                 <leftArea :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"></leftArea>
@@ -32,9 +34,10 @@ import leftArea from './components/leftArea.vue'
 import productMins from "@/mixins/product"
 import { getFullInfo } from '@/api/work'
 import {modifyItem} from '@/api/work-item'
+import navComponent from './components/nav.vue'
 export default {
 	name: "modify",
-	components: { rightItem,leftArea},
+	components: { rightItem,leftArea,navComponent},
 	mixins: [productMins],
 	data() {
 		return {
@@ -48,6 +51,19 @@ export default {
 	computed: {
 		...mapGetters(["getLoginInfo"])
 	},
+	onUnload() {
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
+	onLoad() {
+		// #ifdef APP-PLUS
+		let id = this.option.id || 0
+		this.currentJobId = Number(id)
+		this.listenScanItem()
+		// #endif
+	},
 	methods: {
 		//清空花材弹框
 		clearItemFn(){

+ 12 - 0
hdPad/src/pages/home/work.vue

@@ -39,6 +39,18 @@ export default {
 			this.$refs.workInfoRef.getOrderDetail(this.selectOrderId)
 		}
 	},
+	onUnload() {
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
+	onHide(){
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
 	methods: {
 		getOrder(item){
 			this.selectOrderId = Number(item.id)