Răsfoiți Sursa

Merge branch 'master' of git.huaml.com:zhh/front-end

shizhongqi 4 ani în urmă
părinte
comite
5cd2aad741

+ 1 - 0
ghsApp/src/admin/changePrice/components/Item.vue

@@ -111,6 +111,7 @@ export default {
 		left: 0upx;
 		top: 0upx;
 		.sold-out{
+			z-index:99999;
 			width:160upx;
 			height:160upx;
 			background-color:black;

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

@@ -47,7 +47,7 @@
         <view class="module-com content_box user-open_bx">
           <view class="input-line-wrap">
 
-            <tui-list-cell @click="pageTo({ url: '/admin/shop/changeShop' })" class="line-cell" :hover="false" :arrow="true" v-if="shopInfo.adminId == 2 || shopInfo.adminId == 4 || shopInfo.adminId == 497" >
+            <tui-list-cell @click="pageTo({ url: '/admin/shop/changeShop' })" class="line-cell" :hover="false" :arrow="true" v-if="getLoginInfo.lookAllShop && getLoginInfo.lookAllShop == 1" >
               <view class="tui-title">切换门店</view>
             </tui-list-cell>
 

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

@@ -101,6 +101,7 @@ export default {
 		left: 0upx;
 		top: 0upx;
 		.sold-out{
+			z-index:99999;
 			width:160upx;
 			height:160upx;
 			background-color:black;

+ 11 - 0
ghsApp/src/admin/item/detail.vue

@@ -89,6 +89,11 @@
           <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="printLabel(productData)">打标签</button>
         </tui-list-cell>
 
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title">扫码增加</view>
+          <input v-model="form.scanNum" style="width:300upx;" @focus="form.scanNum=''" placeholder-class="phcolor" class="tui-input" name="scanNum" placeholder="0表示增加1扎,大于0表示增加多少支" maxlength="50" type="number" />
+        </tui-list-cell>
+
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">上架状态</view>
           <view class="switch_bx">
@@ -171,6 +176,7 @@ export default {
         status:2,
         delStatus:0,
         itemId:0,
+        scanNum:0
       },
       itemClassSelectedData:{},
       itemClassData:[],
@@ -500,6 +506,11 @@ export default {
           name: "stockWarning",
           rule: ["required"],
           msg: ["请填写库存预警值"]
+        },
+        {
+          name: "scanNum",
+          rule: ["required"],
+          msg: ["请填写扫码增加数量"]
         }
       ];
       // 进行表单检查

+ 2 - 2
ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "批发进销存及财务管理系统",
-    "versionName" : "1.0.24",
-    "versionCode" : 124,
+    "versionName" : "1.0.25",
+    "versionCode" : 125,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 23 - 17
hdApp/src/admin/order/workOrder.vue

@@ -8,7 +8,7 @@
 
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">名称</view>
-          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" @focus="form.name=''" placeholder="请填写" maxlength="50" type="number" />
+          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" @focus="form.name=''" placeholder="请填写" maxlength="50" type="text" />
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :arrow="true">
@@ -39,8 +39,8 @@
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-            <view class="tui-title">金额</view>
-            <input type="digit" @focus="modifyPrice=''" :focus="true" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
+            <view class="tui-title">单价</view>
+            <input type="digit" @focus="goodsPrice=''" :focus="true" v-model="goodsPrice" placeholder-class="tui-placeholder"/>
           </tui-list-cell>
 
         </view>
@@ -63,7 +63,7 @@
     </view>
     <view class="under-bar">
       <view class="price-view"></view>
-      <button class="admin-button-com blue middle" @click="confirmToSubmit">提交</button>
+      <button class="admin-button-com blue big" @click="confirmToSubmit">提交</button>
     </view>
   </view>
 </view>
@@ -86,6 +86,7 @@ export default {
   mixins: [productMins],
   data () {
     return {
+      headers:{token:''},
       selectJobType: "addOrder",
       form: {
         hasPay:1,
@@ -98,7 +99,7 @@ export default {
         remark:'',
         flowerNum:''
       },
-      modifyPrice:'',
+      goodsPrice:'',
 			payWayindex:0,
 			payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
       plantClassData:[],
@@ -107,7 +108,8 @@ export default {
     };
   },
   onLoad (option) {
-
+    const token = uni.getStorageSync('token')
+    this.headers.token = token
   },
 	onShow(){
 	},
@@ -167,23 +169,27 @@ export default {
     confirmToSubmit () {
       let that = this
 
-      if(this.$util.isEmpty(this.modifyPrice) || Number(this.modifyPrice)<=0){
-        this.$msg("请输入金额")
+      if(this.$util.isEmpty(this.goodsPrice) || Number(this.goodsPrice)<=0){
+        this.$msg("请输入单价")
         return false
       }
-      if (this.$util.isEmpty(this.form.cover)) {
-        this.$msg("请上传图片")
-        return false
+      //允许不传图片
+      if (!this.$util.isEmpty(this.form.cover)) {
+        if(Array.isArray(this.form.cover)){
+          this.form.cover = this.form.cover[0]
+        }
       }
-      if(Array.isArray(this.form.cover)){
-        this.form.cover = this.form.cover[0]
+      if(this.$util.isEmpty(this.form.num) || Number(this.form.num)<0){
+        this.$msg('请填写数量')
+        return false
       }
-
+      let modifyPrice = Number(this.goodsPrice)*Number(this.form.num)
+      modifyPrice = modifyPrice.toFixed(2)
       that.form = {...that.$refs.appDelivery.form,...that.form}
       that.$util.confirmModal({content:'确认提交?'},() => {
-          createOrder({...that.form,lsGoodsPrice:this.modifyPrice}).then((res) => {
-            that.pageTo({url: '/admin/order/addOrderResult',type:2,query:{id:res.data.id}})
-          });
+          createOrder({...that.form,unitGoodsPrice:this.goodsPrice,modifyPrice:modifyPrice}).then((res) => {
+            that.pageTo({url: '/admin/order/workOrderResult',type:2,query:{id:res.data.id}})
+          })
       })
     }
   },

+ 84 - 0
hdApp/src/admin/order/workOrderResult.vue

@@ -0,0 +1,84 @@
+<template>
+	<view class="app-content">
+		<view class="billing_box_bg">
+			<view class="top-view"> </view>
+			<view class="result-view">
+				<view class="iconfont iconchenggong"></view>
+				<view class="result-title">操作成功</view>
+				<view class="result-title" v-if="sn!=''">制作单序号:{{sn}}</view>
+				<button class="admin-button-com big blue" style="width:45vw;" @click="goBackHome">返回</button>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { getInfoByOrderId } from "@/api/work";
+export default {
+    name: "success",
+  	data () {
+		return {
+			sn:''
+		}
+	},
+	onLoad (option) {
+		let id = option.id
+		getInfoByOrderId({orderId:id}).then(res=>{
+			if(res.code == 1){
+				this.sn = res.data.info.sn
+			}
+		})
+	},
+	methods: {
+		goBackHome() {
+			uni.navigateBack({})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.go-back{
+	width: 80%;
+	height: 80upx;
+	color: #FFFFFF;
+	margin-top: 50upx;
+	background: #3385FF;
+	border-radius: 10upx;
+	font-size:30upx;
+}
+.billing_box_bg {
+	position: relative;
+	padding: 60upx 30upx;
+	display: flex;
+	background: white;
+	flex-direction: column;
+    background-color: #f5f5f5;
+	.top-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 299upx;
+		background: #3385ff;
+		border-radius: 0upx 0upx 83upx 83upx;
+	}
+	.result-view {
+		position: relative;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 70upx;
+		width: 100%;
+		background: #ffffff;
+		border-radius: 20upx;
+		z-index: 1;
+		.iconchenggong {
+			font-size: 170upx;
+			color: $mainColor1;
+		}
+		.result-title {
+			margin: 50upx 0 70upx;
+			font-size: 32upx;
+		}
+	}
+}
+</style>

+ 4 - 0
hdApp/src/admin/work/detail.vue

@@ -20,6 +20,10 @@
 					<view>制单状态:</view>
 					<view>{{ detailInfo.status==0?'待完成':detailInfo.status==1?'已完成':detailInfo.status==2?'已取消':'待完成' }}</view>
 				</view>
+				<view class="order-info_box" v-if="Number(detailInfo.orderPrice)>0">
+					<view>订单金额:</view>
+					<view>{{ detailInfo.orderPrice ? parseFloat(detailInfo.orderPrice) : 0 }}</view>
+				</view>
 			</view>
 			<view class="flex-space title" v-if="!$util.isEmpty(goodsInfo)"> 作品 </view>
 			<view class="module-com content-box" v-if="!$util.isEmpty(goodsInfo)">

+ 0 - 4
hdApp/src/admin/work/list.vue

@@ -28,10 +28,6 @@
       </block>
     </div>
 
-    <view class="app-footer">
-      <view class="admin-button-com middle blue" style="margin-right:60upx;font-size:32upx;height:80upx;line-height:80upx;width:165upx;" @click="pageTo({url:'/admin/work/add'})">新增</view>
-    </view>
-
   </view>
 </template>
 <script>

+ 4 - 0
hdApp/src/api/work/index.js

@@ -23,4 +23,8 @@ export const cancelWork = data => {
 //选款制作 ssh 20220426
 export const goodsCreateFn = data =>{
 	return https.post('/work/goods-create',data)
+}
+
+export const getInfoByOrderId = data =>{
+	return https.get('/work/get-info-by-order-id', data)
 }

+ 2 - 2
hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "1.1.3",
-    "versionCode" : 113,
+    "versionName" : "1.1.4",
+    "versionCode" : 114,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 1 - 0
hdApp/src/pages.json

@@ -285,6 +285,7 @@
 				{ "path": "addOrder", "style": { "navigationBarTitleText": "开单" } },
 				{ "path": "addOrderConfirm", "style": { "navigationBarTitleText": "确认" } },
 				{ "path": "addOrderResult", "style": { "navigationBarTitleText": "结果" } },
+				{ "path": "workOrderResult", "style": { "navigationBarTitleText": "结果" } },
 				{ "path": "refund", "style": { "navigationBarTitleText": "退款" } },
 				{ "path": "refundList", "style": { "navigationBarTitleText": "退款记录" } },
 				{ "path": "refundDetail", "style": { "navigationBarTitleText": "退款详情" } },

+ 3 - 3
hdPad/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "1.0.9",
-    "versionCode" : 109,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -163,7 +163,7 @@
     "quickapp" : {},
     /* 小程序特有相关 线上(花掌柜) wx0d42f5f1dcb3a370 开发(花美玲) wxe4675bab299a52f7 */
     "mp-weixin" : {
-        "appid" : "wxe4675bab299a52f7",
+        "appid" : "wx0d42f5f1dcb3a370",
         "setting" : {
             "urlCheck" : false
         },

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

@@ -274,10 +274,17 @@ export default {
 				if(this.$util.isEmpty(current)){
 					return false
 				}
+				this.$util.hitVoice()
 				unitName = current.bigUnit
 				unitPrice = current.bigPrice
-				this.$util.hitVoice()
 				let num = this.calc == 'add' ? 1 : -1
+				//百合扫一下5支的情况
+				if(current.scanNum && Number(current.scanNum)>0){
+					num = this.calc == 'add' ? Number(current.scanNum) : -Number(current.scanNum)
+					unitName = current.smallUnit
+					unitPrice = current.smallPrice
+					current.unitType = 1
+				}
 				let params = {...current,unitName:unitName,unitPrice:unitPrice,currentNum:num}
 				this.replaceItemFn(params,1)
 			}

+ 4 - 4
hdPad/src/pages/home/components/createWork.vue

@@ -107,10 +107,10 @@ export default {
         confirmCreate(){
             let that = this
             this.$util.hitVoice()
-            if(this.form.cover == ''){
-                this.$msg('请上传图片')
-                return false
-            }
+            //if(this.form.cover == ''){
+                //this.$msg('请上传图片')
+                //return false
+            //}
 			if(this.$util.isEmpty(this.selectList)){
 				this.$msg('请选择花材')
 				return false

+ 2 - 2
hdPad/src/pages/home/components/nav.vue

@@ -29,8 +29,8 @@ export default {
       nav: [
         { name: "开单", page: "/pages/home/cash",flag:'casher' },
         { name: "制作单", page: "/pages/home/work",flag:'work' },
-        { name: "选品建单", page: "/pages/home/selectMake",flag:'selGoods' },
-        { name: "选材制作", page: "/pages/home/make",flag:'selItem' }
+        { name: "选材制作", page: "/pages/home/make",flag:'selItem' },
+        //{ name: "选品建单", page: "/pages/home/selectMake",flag:'selGoods' }
       ],
       device:'',
     };

+ 1 - 1
hdPad/src/pages/home/components/selectNum.vue

@@ -45,7 +45,7 @@ export default {
             fillType:0,
             currentNum:'',
             unitPrice:'',
-            unitType:1,
+            unitType:0,
             unitName:'',
             //全选类型 0 数值全选 1 价格全选 2 没有任何全选
             checkType:0,

+ 21 - 12
hdPad/src/pages/home/components/workInfo.vue

@@ -12,13 +12,23 @@
         <view v-if="orderInfo.hasReachTime == 1"><text class="left">配送</text>
           <text class="right" style="color:red;font-weight:bold;">{{orderInfo.reachDate == today ? '今天' : orderInfo.reachDate.substr(5,9)}} {{orderInfo.reachPeriod == 0 ? '上午':orderInfo.reachPeriod==1?'下午':orderInfo.reachPeriod==2?'晚上':'其它'}}</text>
         </view>
-        <view v-if="!$util.isEmpty(orderInfo.remark)"><text class="left">备注</text><text class="right" style="color:red;font-weight:bold;">{{orderInfo.remark}}</text></view>
-        <view><text class="left">支数</text><text class="right">{{orderInfo.flowerNum}}</text></view>
+        <view v-if="!$util.isEmpty(orderInfo.remark)">
+          <text class="left">备注</text>
+          <text class="right" style="color:red;font-weight:bold;">{{orderInfo.remark}}</text>
+        </view>
+        <view v-if="Number(orderInfo.orderPrice)>0">
+          <text class="left">订单金额</text>
+          <text class="right" style="color:red;font-weight:bold;">
+          ¥{{orderInfo.orderPrice && Number(orderInfo.orderPrice)>0 ? parseFloat(orderInfo.orderPrice) : ''}}
+          </text>
+        </view>
+        <view><text class="left">数量</text>
+        <text class="right" style="color:red;font-weight:bold;">{{orderInfo.num}}</text>
+        </view>
         <view><text class="left">分类</text><text class="right">{{orderInfo.catName}}</text></view>
         <view><text class="left">名称</text><text class="right">{{orderInfo.name}}</text></view>
-        <view><text class="left">数量</text><text class="right">{{orderInfo.num}}</text></view>
+        <view><text class="left">支数</text><text class="right">{{orderInfo.flowerNum}}</text></view>
         <view><text class="left">商品编号</text><text class="right">{{orderInfo.goodsSn}}</text></view>
-        <view><text class="left">售价</text><text class="right">{{orderInfo.price||''}}</text></view>
         <view><text class="left">制单号</text><text class="right">{{orderInfo.workSn}}</text></view>
         <view><text class="left">订单号</text><text class="right">{{orderInfo.orderSn}}</text></view>
         <view><text class="left">状态</text><text class="right">{{getStatus(orderInfo.status)}}</text></view>
@@ -230,16 +240,15 @@ export default {
       }
     },
     confirmFinish(){
-
-      if(this.$util.isEmpty(this.selectList)){
-        this.$msg('请选择花材')
-        return false
+      let params = {id:this.orderInfo.id}
+      if(!this.$util.isEmpty(this.selectList)){
+        const newItem = this.selectList.map(ele=>{
+          return {productId:ele.id,num:ele.currentNum,unitType:ele.unitType,unitPrice:ele.unitPrice}
+        })
+        params = {...params,itemList:JSON.stringify(newItem)}
       }
-      const newItem = this.selectList.map(ele=>{
-        return {productId:ele.id,num:ele.currentNum,unitType:ele.unitType,unitPrice:ele.unitPrice}
-      })
       uni.showLoading({mask:true})
-      finish({id:this.orderInfo.id,itemList:JSON.stringify(newItem)}).then(res=>{
+      finish(params).then(res=>{
         uni.hideLoading()
         if(res.code == 1){
           this.$msg(res.msg)

+ 3 - 1
hdPad/src/pages/home/components/workList.vue

@@ -11,7 +11,9 @@
             <view v-for="item in list.data" :key="item.id" class="show-item_box" @click="getOrder(item,1)">
                 <view :class="[selectOrderId==item.id ? 'active' : 'not-active', 'item-body_box']">
                     <view class="flower-name_box">
-                        <view class="current-item-title"><text>{{item.name}}</text></view>
+                        <view class="current-item-title">
+                            <text>{{item.staffName}} {{item.name}}</text>
+                        </view>
                         <image class="flower-image" :src="item.cover"></image>
                         <text style="position:absolute;top:2upx;left:90upx;font-size:11upx;">{{item.sn}}</text>
                     </view>

+ 2 - 2
开发/ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "批发进销存及财务管理系统",
-    "versionName" : "1.0.24",
-    "versionCode" : 124,
+    "versionName" : "1.0.25",
+    "versionCode" : 125,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
开发/hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "1.1.3",
-    "versionCode" : 113,
+    "versionName" : "1.1.4",
+    "versionCode" : 114,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
开发/hdPad/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "1.0.9",
-    "versionCode" : 109,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
线上/ghsApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "销花宝",
     "appid" : "__UNI__BD781B0",
     "description" : "批发进销存及财务管理系统",
-    "versionName" : "1.0.24",
-    "versionCode" : 124,
+    "versionName" : "1.0.28",
+    "versionCode" : 128,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
线上/hdApp/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "1.1.3",
-    "versionCode" : 113,
+    "versionName" : "1.1.5",
+    "versionCode" : 115,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 2
线上/hdPad/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
-    "versionName" : "1.0.9",
-    "versionCode" : 109,
+    "versionName" : "1.1.1",
+    "versionCode" : 111,
     "transformPx" : true,
     /* 5+App特有相关 */
     "app-plus" : {