Browse Source

选款式

shish 4 years ago
parent
commit
e3d43baf6f

+ 105 - 0
hdApp/src/admin/goodsManage/components/flower-item.vue

@@ -0,0 +1,105 @@
+<template>
+    <view class="goods-list-top" @click="showAddModelFn()">
+        <view class="img-blo">
+        <image :src="goodsInfo.smallImgList[0]" mode="aspectFit" ></image>
+        </view>
+        <view class="goods-det">
+        <view class="goods-det-top" style="margin-bottom:4upx;">
+            <view class="goods-name" style="font-size:29upx;font-weight:bold;">{{ goodsInfo.name }}</view>
+        </view>
+        <view class="operate-wrap" style="margin-bottom:15upx;">
+            <view class="goods-price" style="font-size:23upx;">¥{{goodsInfo.price ? parseFloat(goodsInfo.price):0}}</view>
+            <view style="float:right;display:inlin-block;padding-right:30upx;color:#CCCCCC;">
+                <text @click.stop="delItemFn" style="border:1upx solid #CCCCCC;border-radius:30upx;padding:0upx 12upx;">-</text>
+                <text style="width:90upx;display:inline-block;text-align:center;">
+                  <text v-if="Number(goodsInfo.bigCount)>0">{{goodsInfo.bigCount}}</text>
+                </text>
+                <text style="border:1upx solid #CCCCCC;border-radius:30upx;padding:0upx 12upx;">+</text>
+            </view>
+        </view>
+        <view class="operate-wrap">
+            <view style="font-size:23upx;color:#666666;">
+            <text>库存</text> <text style="font-weight:bold;margin-left:8upx;">{{goodsInfo.stock}}</text>
+            </view>
+        </view>
+        </view>
+    </view>
+</template>
+<script>
+export default {
+	name: "plant-item",
+	components: {},
+	mixins: [],
+	props: {
+		goodsInfo: {
+			required: true,
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+    },
+	methods: {
+    delItemFn () {
+      this.goodsInfo.bigCount = 0
+      this.$emit("replaceItemFn", this.goodsInfo,1)
+    },
+		addItemFn () {
+			this.$emit("replaceItemFn", this.goodsInfo,0,'add')
+		},
+		reduceItemFn() {
+			this.$emit("replaceItemFn", this.goodsInfo,0,'sub')
+		},
+		showAddModelFn() {
+			this.$emit("showAddModelFn", { ...this.goodsInfo})
+		}
+	}
+}
+</script>
+<style lang="scss" scoped>
+      .goods-list-top {
+        position: relative;
+        @include disFlex(flex-start, flex-start);
+      }
+      .goods-list-bottom {
+        width: 96%;
+        margin-top: 16upx;
+        color: #bebebe;
+        text{
+          border:1px solid rgb(218, 216, 216);
+          border-radius: 20upx;
+          font-size:22upx;
+          padding:6upx 25upx 6upx 25upx;
+        }
+      }
+      .img-blo {
+        width: 130upx;
+        height: 130upx;
+        margin-right: 20upx;
+        & > image {
+          height: 100%;
+          width: 100%;
+        }
+      }
+      .goods-det {
+        width: calc(100% - 150upx);
+        font-size: 28upx;
+        .operate-wrap {
+          @include disFlex(flex-end, space-between);
+        }
+        .operate-icon-wrap {
+          left: -20upx;
+        }
+        .goods-name {
+          margin-bottom: 10upx;
+        }
+        .goods-sales {
+          color: $fontColor3;
+          font-size: 24upx;
+        }
+        .goods-price {
+          color: #ff2842;
+          font-weight: bold;
+        }
+      }
+</style>

+ 286 - 0
hdApp/src/admin/goodsManage/flower.vue

@@ -0,0 +1,286 @@
+<template>
+  <view class="app-content">
+
+    <view class="input-wrap" >
+      <view class="search-bar">
+        <app-search-module v-model="py" placeholder="输入英文字母搜索" @input="searchFn" />
+      </view>
+      <view style="float:right">
+        <button class="admin-button-com middle blue" style="margin-right:10upx;" @click="clearSelect()">清除已选</button>
+      </view>
+    </view>
+
+    <view class="app-middle">
+      <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
+        <view v-for="(item,index) in tabbar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']" :data-current="index" @tap.stop="swichTab($event ,item)" >
+          <text>{{item.categoryName || ''}}</text>
+        </view>
+      </scroll-view>
+      <block v-for="(item,index) in tabbar" :key="index">
+        <scroll-view scroll-y class="right-box" v-if="currentTab==index" @scrolltolower="goBottom">
+          <block v-if="!$util.isEmpty(list.data)">
+            <view class="page-view">
+              <view class="goods-list" v-for="(goodsItem, idx) in list.data" :key="idx">
+
+				        <flowerItem :goodsInfo="goodsItem" @showAddModelFn="showAddModelFn" @replaceItemFn="replaceItemFn"></flowerItem>
+
+              </view>
+            </view>
+          </block>
+          <block v-else>
+            <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+          </block>
+        </scroll-view>
+      </block>
+    </view>
+
+    <modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
+      <template slot="customContent">
+        <view class="select-cmd_bx">
+          <view class="kc"><text class="unit_price">库存 {{ customData.stock }}</text></view>
+        </view>
+        <view class="select-cmd_bx">
+          <view class="num_bx"> 
+            <text style="font-size:35upx;font-weight:bold;color:#666666;margin-right:20upx;">数量</text>
+            <input style="width: 430upx" v-model="customData.bigCount" @focus="customData.bigCount=''" :focus="isAddInputFocus" type="number" />
+          </view>
+        </view>
+      </template>
+    </modal-module>
+
+	  <FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" :showPrice="false" ></FooterCart>
+
+  </view>
+</template>
+<script>
+import AppSearchModule from "@/components/module/app-search";
+import OperateModule from "@/admin/home/components/module/operate";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import ModalModule from "@/components/plugin/modal";
+import flowerItem from "./components/flower-item";
+import {categoryListB,getCategoryGoodsB,changeStatusB} from "@/api/goods";
+import FooterCart from "@/components/module/app-footer-cg-plant-cart";
+import { list } from "@/mixins";
+import productMins from "@/mixins/cgPlantProduct";
+export default {
+  name: "flower",
+  components: {
+    OperateModule,
+    AppWrapperEmpty,
+    ModalModule,
+    AppSearchModule,
+	flowerItem,
+	FooterCart
+  },
+  mixins: [list,productMins],
+  data() {
+    return {
+      selectJobType: "flower",
+      tabbar: [],
+      height: 0,
+      currentTab: 0,
+      scrollTop: 0,
+      form: {
+        catId: ""
+      },
+      delModal: false,
+      operateData: {},
+      operateShow: false,
+      operateIndex: null,
+      operateTop: 0,
+      checkStock:false
+    };
+  },
+  computed: {
+  },
+  onLoad: function() {
+
+  },
+  methods: {
+    clearSelect(){
+        let that = this
+        that.$util.confirmModal({content:'确认清除?'},() => {
+              that.removeFromSaveDirect()
+        })      
+    },
+    confirmToSave(){
+      if (this.$util.isEmpty(this.selectList)){
+        this.$msg('请选择商品')
+        return false
+      }
+      this.$util.pageTo({url:"/admin/goodsManage/flowerConfirm",type:2})
+    },
+    goBottom(){
+      if (!this.list.finished) {
+        this.getPlantList().then((res) => {
+          uni.stopPullDownRefresh();
+        });
+      } else {
+        uni.stopPullDownRefresh();
+      }
+    },
+    newCg(){
+      this.$util.pageTo({url:"/admin/goodsManage/cgNewPlant",type:2})
+    },
+    init() {
+      this.getPlantClass()
+    },
+    getPlantClass() {
+      categoryListB({flower:1}).then(res => {
+        this.tabbar = res.data;
+        if(this.tabbar && this.tabbar[0] && this.tabbar[0].id){
+          this.form.catId = this.tabbar[0].id
+          this.getPlantList()
+        }
+      })
+    },
+    getPlantList() {
+      return getCategoryGoodsB({status:1,page:this.list.page,...this.form,flower:1}).then(res => {
+        this.completes(res)
+      })
+    },
+    swichTab(e, item) {
+      let cur = e.currentTarget.dataset.current;
+      if (this.currentTab == cur) {
+        return false;
+      } else {
+        this.currentTab = cur;
+        this.form.catId = item.id;
+        this.resetList();
+        this.getPlantList();
+      }
+    },
+    changeStatus(item) {
+      let status = item.status == 0 ? 1 : 0
+      changeStatusB({id: item.id,status: status}).then(res => {
+        if(res.code == 1){
+          this.$msg("修改成功")
+          item.status = status
+        }
+      });
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 80upx);
+  background-color: #fff;
+}
+page {
+  background: #fff;
+}
+::-webkit-scrollbar {
+  width: 0;
+  height: 0;
+  color: transparent;
+}
+.tab-view {
+	height: 100vh;
+  width: 200upx;
+  position: fixed;
+  left: 0;
+  z-index: 10;
+  background-color: #f0f2f6;
+  .tab-bar-item {
+    width: 200upx;
+    height: 110upx;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 26upx;
+    color: #444;
+    font-weight: 400;
+  }
+  .active {
+    position: relative;
+    color: $mainColor;
+    font-size: 26upx;
+    background: #fff;
+  }
+  .active::before {
+    content: "";
+    position: absolute;
+    border-left: 8upx solid $mainColor;
+    height: 100%;
+    left: 0;
+  }
+}
+.right-box {
+  width: 100%;
+  height:100vh;
+  position:fixed;
+  padding-left:220upx;
+  padding-bottom:200upx;
+  box-sizing: border-box;
+  left: 0;
+  .page-view {
+    width: 100%;
+    overflow: hidden;
+    box-sizing: border-box;
+    padding-bottom: env(safe-area-inset-bottom);
+    .goods-list {
+      margin: 40upx 0;
+    }
+  }
+}
+.app-footer {
+  justify-content: space-between;
+  .btn-list {
+    width: 100%;
+    &:first-child {
+      border-left: 0;
+    }
+    .admin-button-com {
+      width: 160upx;
+      padding-top: 16upx;
+      padding-bottom: 16upx;
+      float:right;
+      margin-right:30upx;
+    }
+  }
+  .other-btn {
+    color: $fontColor2;
+    .iconfont {
+      font-size: 24upx;
+      color: $fontColor3;
+      transform: scale(0.4);
+    }
+  }
+}
+.input-wrap {
+	padding: 22upx 20upx 22upx 30upx;
+	.search-bar {
+		display:inline-block;
+		width:520upx;
+	}
+}
+.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;
+		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;
+		}
+	}
+}
+</style>

+ 264 - 0
hdApp/src/admin/goodsManage/flowerConfirm.vue

@@ -0,0 +1,264 @@
+<template>
+<view class="app-content">
+  <view class="affirm-page">
+    <view class="affirm-view overscroll">
+      <form>
+        <view class="module-com">
+          <view class="commodity-view">
+            <view class="commodity-list">
+              <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+                <image class="item-icon" :src="item.cover"></image>
+                <view class="item-info">
+                  <view class="info-line">
+                    <text class="item-name">{{ item.name }}</text>
+                    <text class="item-price">
+                      <text class="unit"></text>
+                      <text class="price">
+                        <text>{{item.bigCount}}份</text>
+                      </text>
+                    </text>
+                  </view>
+                  <view class="info-line">
+                    <text class="item-type"></text>
+                    <text class="item-count">
+                    </text>
+                  </view>
+                </view>
+              </view>
+            </view>
+            <view class="summary-bar">
+              <view class="operate-view" @click="gobackEvent"><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>
+						<input type="text" v-model="form.remark" placeholder="选填"/>
+					</tui-list-cell>
+        </view>
+      </form>
+    </view>
+    <view class="under-bar">
+      <view class="price-view"></view>
+      <button class="admin-button-com blue middle" @click="confirmToSubmit">提交</button>
+    </view>
+  </view>
+</view>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import productMins from "@/mixins/cgPlantProduct";
+import { goodsCreateFn } from "@/api/work/index";
+import { mapActions, mapGetters } from "vuex";
+export default {
+  name: "plantConfirm",
+  components: {
+    TuiListCell
+  },
+  mixins: [productMins],
+  data () {
+    return {
+      selectJobType: "flower",
+      form: { remark:"" }
+    };
+  },
+  onLoad (option) {
+
+  },
+	onShow(){
+	},
+	onUnload(){
+
+	},
+  computed: {
+    ...mapGetters(["getLoginInfo"]),
+  },
+  methods: {
+    init () {
+
+    },
+    confirmToSubmit () {
+      let that = this
+      let goods = this.selectList.map((ele) => {
+        return { productId: ele.id, num: ele.bigCount }
+      })
+      that.$util.confirmModal({content:'确认提交?'},() => {
+          goodsCreateFn({goods:JSON.stringify(goods),remark:that.form.remark}).then((res) => {
+            that.removeFromSaveDirect()
+            that.pageTo({url: '/admin/goodsManage/flowerResult',type:2})
+          });
+      })
+    },
+    gobackEvent () {
+      this.pageTo({url: '/admin/goodsManage/flower',type:2})
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.admin-button-com {
+  margin-right: 20upx;
+}
+.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;
+              }
+            }
+          }
+        }
+      }
+      .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;
+          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;
+        }
+      }
+    }
+  }
+  .under-bar {
+    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;
+    }
+  }
+}
+</style>

+ 70 - 0
hdApp/src/admin/goodsManage/flowerResult.vue

@@ -0,0 +1,70 @@
+<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>
+				<button class="admin-button-com big blue" style="width:45vh;" @click="goBackHome">返回</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+    name: "success",
+	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/add.vue

@@ -6,6 +6,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" placeholder="请填写名称" maxlength="50" type="text" />
+          <button class="admin-button-com middle blue" style="width:180upx;" @click="selectMake()">选款</button>
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
@@ -103,6 +104,9 @@ export default {
   watch:{
   },
   methods: {
+    selectMake(){
+      this.$util.pageTo({ url: "/admin/goodsManage/flower", type: 2 })
+    },
     flowerNumChange(e){
       let index = e.detail.value
       this.form.flowerNum = this.flowerNumList[index].num

+ 5 - 4
hdApp/src/admin/work/components/workItem.vue

@@ -1,7 +1,7 @@
 <template>
     <view  @click="pageTo({url:'/admin/work/detail',query: {id: item.id}})">
         <view class="order-top_box" style="position:relative;">
-        <image style="width:130upx;position:absolute;top:80upx;right:20upx;" @click.stop="previewImage(item.bigCover)" mode="widthFix" :src="item.cover"></image>
+        <image style="width:130upx;position:absolute;top:80upx;right:20upx;border-radius:10upx;" @click.stop="previewImage(item.bigCover)" mode="widthFix" :src="item.cover"></image>
         <view class="tit"> {{ item.name || "" }}</view>
         <view style="color:#666666;">{{ statusFormat(item.status) }}</view>
         </view>
@@ -57,14 +57,15 @@ export default {
       this.$emit('cancel', item)
     },
     statusFormat(status) {
+        status = Number(status)
         switch (status) {
-            case "0":
+            case 0:
             return "待完成";
             break;
-            case "1":
+            case 1:
             return "已完成";
             break;
-            case "2":
+            case 2:
             return "已取消";
             break;
             default:

+ 16 - 5
hdApp/src/admin/work/detail.vue

@@ -35,7 +35,7 @@
 									<text class="item-price">
 										<text class="unit"></text>
 										<text class="price">
-											<text>6</text>
+											<text>{{ detailInfo.num }}份</text>
 										</text>
 									</text>
 								</view>
@@ -46,7 +46,7 @@
 			</view>
 
 			<view class="flex-space title">
-				使
+				用材
 			</view>
 			<view class="module-com content-box">
 				<view class="commodity-view">
@@ -92,15 +92,15 @@
 			</view>
 		</view>
 		<div class="app-footer">
-			<button class="admin-button-com bule" v-if="detailInfo.status == 0">123</button>
-			<button class="admin-button-com default" style="color:#CCCCCC;border-color:#CCCCCC;" v-else>123</button>
+			<button class="admin-button-com bule" v-if="detailInfo.status == 0" @click="cancelFn(detailInfo)">取消</button>
+			<button class="admin-button-com default" style="color:#CCCCCC;border-color:#CCCCCC;" v-else>取消</button>
 		</div>
 	</view>
 </template>
 <script>
 import { mapGetters } from "vuex";
 import TuiListCell from "@/components/plugin/list-cell";
-import { fullInfo } from "@/api/work/index";
+import { fullInfo,cancelWork } from "@/api/work/index";
 export default {
 	name: "detail",
 	components: { TuiListCell },
@@ -124,6 +124,17 @@ export default {
 		...mapGetters({ loginInfo: "getLoginInfo" }),
 	},
 	methods: {
+		cancelFn(item){
+			let that = this
+			that.$util.confirmModal({content:'确认取消?'},() => {
+				cancelWork({id:item.id}).then(res=>{
+					if(res.code == 1){
+						item.status = 2
+						that.$msg('取消成功')
+					}
+				})
+			})
+		},
 		copy(val) {
 			const self = this;
 			uni.setClipboardData({

+ 12 - 10
hdApp/src/admin/work/list.vue

@@ -68,17 +68,17 @@ export default {
       tabs: [
         {
           name: "全部",
-          value: 0,
+          value: '',
           id: -1,
         },
         {
           name: "待完成",
-          value: 0,
+          value: '',
           id: 0,
         },
         {
           name: "已完成",
-          value: 0,
+          value: '',
           id: 1,
         }
       ],
@@ -126,13 +126,15 @@ export default {
   },
   methods: {
     cancel(item){
-      let that = this
-      cancelWork({id:item.id}).then(res=>{
-        if(res.code == 1){
-          item.status = 2
-          that.$msg('取消成功')
-        }
-      })
+			let that = this
+			that.$util.confirmModal({content:'确认取消?'},() => {
+						cancelWork({id:item.id}).then(res=>{
+							if(res.code == 1){
+								item.status = 2
+								that.$msg('取消成功')
+							}
+						})
+			})
     },
     setSearchType(){
       let that = this

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

@@ -14,4 +14,9 @@ export const fullInfo = data => {
 
 export const cancelWork = data => {
 	return https.get('/work/cancel', data)
+}
+
+//选款制作 ssh 20220426
+export const goodsCreateFn = data =>{
+	return https.post('/work/goods-create',data)
 }

+ 10 - 2
hdApp/src/components/module/app-footer-cg-plant-cart.vue

@@ -6,8 +6,8 @@
 					<i class="iconfont icongouwuche"></i>
 				</view>
 				<view class="price" v-if="!offPrice">
-					<text>数量 {{count.bigLength}}</text>
-					<text style="margin-left:20upx;">¥{{ price }}</text>
+					<text v-if="showNum">数量 {{count.bigLength}}</text>
+					<text style="margin-left:20upx;" v-if="showPrice">¥{{ price }}</text>
 				</view>
 			</view>
 			<view class="cart-rg_bx" @click="confirmEvent"> 选好了 </view>
@@ -33,6 +33,14 @@ export default {
 		count: {
 			type: Object,
 			default: {}
+		},
+		showPrice:{
+			type: Boolean,
+			default: true
+		},
+		showNum:{
+			type: Boolean,
+			default: true
 		}
 	},
 	methods: {

+ 3 - 0
hdApp/src/pages.json

@@ -201,6 +201,9 @@
 				{ "path": "freight", "style": { "navigationBarTitleText": "运费设置" } },
 				{ "path": "price-increase", "style": { "navigationBarTitleText": "节日自动涨价" } },
 				{ "path": "plant", "style": { "navigationBarTitleText": "盆栽绿植资材" } },
+				{ "path": "flower", "style": { "navigationBarTitleText": "鲜花成品" } },
+				{ "path": "flowerConfirm", "style": { "navigationBarTitleText": "确认" } },
+				{ "path": "flowerResult", "style": { "navigationBarTitleText": "结果" } },
 				{ "path": "plantConfirm", "style": { "navigationBarTitleText": "确认采购" } },
 				{ "path": "plantResult", "style": { "navigationBarTitleText": "结果" } },
 				{ "path": "cgNewPlant", "style": { "navigationBarTitleText": "新采购" } },

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

@@ -24,16 +24,17 @@
 
             </view>
           </view>
-          <view class="item">
-              <text class="left">打印</text>
-              <switch :checked="form.needPrint == 1 ? true : false" @change="changePrint" style="transform: scale(0.9,0.8)" />
-          </view>
 
           <view class="item">
               <text class="left">直接完成</text>
               <switch :checked="form.complete == 1 ? true : false" @change="changeComplete" style="transform: scale(0.9,0.8)" />
           </view>
 
+          <view class="item" v-if="form.complete == 1">
+              <text class="left">打印</text>
+              <switch :checked="form.needPrint == 1 ? true : false" @change="changePrint" style="transform: scale(0.9,0.8)" />
+          </view>
+
         </view>
         <view class="footer">
             <button @click="cancelCreate()">取消</button>

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

@@ -106,6 +106,10 @@
         <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认锁定?" @confirm="confirmLock"></uni-popup-dialog>
     </uni-popup>
 
+    <uni-popup ref="finishRef" type="dialog">
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认完成?" @confirm="confirmFinish"></uni-popup-dialog>
+    </uni-popup>
+
   </view>
 </view>
 </template>
@@ -193,6 +197,9 @@ export default {
       this.$refs.wastageSelectNumRef.close()
     },
     finishFn(){
+      this.$refs.finishRef.open('center')
+    },
+    confirmFinish(){
       uni.showLoading({mask:true})
       finish({id:this.orderInfo.id}).then(res=>{
         uni.hideLoading()