shish 3 лет назад
Родитель
Сommit
abf92cb59d

+ 0 - 10
hdApp/src/admin/billing/index.vue

@@ -82,13 +82,10 @@
 				</view>
 			</template>
 		</modal-module>
-		<modal-module :show="showSubmitModel" @cancel="cancelEvent" @click="submitEvent" :title="confirmContent" color="#333" :size="32" padding="30rpx 30rpx" >
-		</modal-module>
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent"></FooterCart>
 
    		<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
-
 	</view>
 </template>
 
@@ -130,13 +127,6 @@ export default {
 		};
 	},
 	computed: {
-		confirmContent() {
-			let content = "确认下一步?";
-			if (this.hasNoStock) {
-				content = "有花材库存不足,确认下一步?";
-			}
-			return content;
-		}
 	},
 	onLoad(){
 		this.initData()

+ 1 - 1
hdApp/src/admin/home/workbench.vue

@@ -284,7 +284,7 @@ export default {
       })
     },
     fillCg(item){
-      this.$msg('开发中')
+      this.pageTo({url:'/pagesPurchase/addCg?ghsId='+item.id+'&ghsName='+item.name})
     },
     enterShop(item) {
       if(item.isOpen == 0){

+ 219 - 0
hdApp/src/components/module/app-cg-commodity.vue

@@ -0,0 +1,219 @@
+<template>
+	<view class="item-cmd_bx" @click="showAddModelFn()">
+		<view class="img_bx" style="background:#eeeeee">
+			<image :src="info.cover" lazy-load="true" :lazy-load-margin="0"></image>
+		</view>
+		<view class="cmd-info_bx">
+			<view class="tit" >{{ info.name || "" }}</view>
+			<view class="kc num-open_bx flex-end">
+				<view class="price csss">¥{{ parseFloat(info.price) }}</view>
+				<view style="text-align: right;margin-right:20upx;" >
+					<view class="open-bx" >
+						<i class="iconfont iconjian" @click.stop="delItemFn()" v-if="bigCount > 0 || smallCount > 0"></i>
+						<text class="num" >
+							<text style="font-size:24upx;font-weight:bold;color:#3385ff;" v-if="bigCount > 0">{{ `${bigCount}` }}</text>
+							<text style="font-size:24upx;" v-if="smallCount > 0">{{ `${smallCount}` }}</text>
+						</text>
+						<i class="iconfont iconzeng" @click.stop="showAddModelFn()"></i>
+					</view>
+					<text v-if="Number(info.stock) > Number(info.stockWarning)" style="padding-right: 55upx">还剩 {{ parseFloat(info.stock) }}</text>
+					<text v-else style="padding-right: 55upx;color:red;font-weight:450;">还剩 {{ parseFloat(info.stock) }}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	name: "Commodity",
+	components: {},
+	mixins: [],
+	props: {
+		info: {
+			required: true,
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		scrollTop: {
+			type: Number,
+			default: 0
+		},
+		autoPrice: {},
+		isActive: {
+			type: Boolean,
+			default: false
+		},
+		checkStock: {
+			type: Boolean,
+			default: false
+		},
+		isAlterPrice: {
+			type: Boolean,
+			default: false
+		},
+		selectJobType:{
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			isAlterMoney:false,
+			isAloneAllActive: false,
+			isAloneAllFocus: false,
+			changeAutoPrice:'',
+			showPrice:0.00,
+			oldPrice:0.00,
+			ifFocus:false,
+			bigCount:0,
+			smallCount:0,
+			userPrice:0
+		};
+	},
+	watch:{
+		info:{
+			handler(){
+				this.bigCount = this.info.bigCount
+				this.smallCount = this.info.smallCount
+				this.userPrice = this.info.userPrice
+			},
+			deep:true
+		}
+	},
+	created() {},
+	computed: {
+	},
+	mounted() {
+
+		if(this.info.priceLabel == 2){
+			this.changeAutoPrice = this.info.price
+		}
+		this.showPrice = this.info.priceLabel==1?null:this.info.price
+		this.oldPrice = (Number(this.info.cost) + Number(this.info.addPrice)).toFixed(2)
+
+		this.bigCount = this.info.bigCount
+		this.smallCount = this.info.smallCount
+		this.userPrice = this.info.userPrice
+
+	},
+	methods: {
+		addItemFn () {
+			this.$emit("replaceItemFn", this.info,0,'add')
+		},
+		reduceItemFn() {
+			this.$emit("replaceItemFn", this.info,0,'sub')
+		},
+		delItemFn () {
+			this.info.bigCount = 0
+			this.info.smallCount = 0
+			this.$emit("replaceItemFn", this.info,1)
+		},
+		showAddModelFn() {
+			this.$emit("showAddModelFn", { ...this.info, bigCount: this.bigCount, smallCount: this.smallCount, userPrice: this.userPrice})
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.item-cmd_bx {
+	position: relative;
+	margin-bottom: 20upx;
+	.img_bx {
+		height: 140upx;
+		width: 140upx;
+		position: absolute;
+		left: 0upx;
+		top: 0upx;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.cmd-info_bx {
+		padding-left: 160upx;
+		padding-bottom: 30upx;
+		& .tit {
+			font-size: 32upx;
+			font-weight: 700;
+			color: #333333;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			width:380upx;
+		}
+		& .kc {
+			position: relative;
+			color: #999999;
+			font-size: 24upx;
+			.price{
+				position: absolute;
+				left: 0;
+				bottom: 0;
+			}
+		}
+		& .num-open_bx {
+			display: flex;
+			align-items: center;
+			& .price {
+				font-size: 28upx;
+				color: #ff2842;
+				flex: 1;
+			}
+			& .open-bx {
+				display: flex;
+				align-items: center;
+				& .iconfont {
+					color: #3385ff;
+					font-size: 42upx;
+				}
+				.position{
+					display: block;
+					width: 70upx;
+					text-align: center;
+				}
+				.iconcachu {
+					margin: 0 6upx 0 20upx;
+					color: #ccc;
+					&.edit {
+						color: #3385ff;
+					}
+				}
+				& > .num {
+					display: inline-block;
+					width: 120upx;
+					height:45upx;
+					text-align:center;
+					margin: 0 20upx;
+					color: #868686;
+					border-radius: 22upx;
+					background-color: #f5f5f5;
+					padding: 3upx 0;
+					font-size: 25upx;
+				}
+				.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;
+				}
+			}
+		}
+	}
+}
+</style>

+ 4 - 1
hdApp/src/pages.json

@@ -405,7 +405,10 @@
 				{ "path": "bookProduct", "style": { "navigationBarTitleText": "预订花材", "enablePullDownRefresh": false } },
 				{ "path": "bookExplain", "style": { "navigationBarTitleText": "预订说明", "enablePullDownRefresh": true } },
 				{ "path": "refundList","style": {"navigationBarTitleText": "退款记录", "enablePullDownRefresh": true } },
-				{ "path": "readMe","style": {"navigationBarTitleText": "购买须知", "enablePullDownRefresh": true } }
+				{ "path": "readMe","style": {"navigationBarTitleText": "购买须知", "enablePullDownRefresh": true } },
+				{ "path": "addCg","style": {"navigationBarTitleText": "新增采购", "enablePullDownRefresh": false } },
+				{ "path": "addCgConfirm","style": {"navigationBarTitleText": "确认订单", "enablePullDownRefresh": false } },
+				{ "path": "addCgResult","style": {"navigationBarTitleText": "结果", "enablePullDownRefresh": false } }
 			]
 		},
 		{

+ 323 - 0
hdApp/src/pagesPurchase/addCg.vue

@@ -0,0 +1,323 @@
+<!--姜枫 2021.04.11-->
+<template>
+	<view class="billing_box_bg">
+		<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" @click="removeFromSave(0)">清除花材</button>
+			</view>
+		</view>
+		<view class="scroll-middle_bx">
+
+			<scroll-view scroll-y scroll-with-animation class="tab-view">
+				<div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
+					<text>{{ item.className || "" }}</text>
+				</div>
+				<view style="height: 120upx"></view>
+			</scroll-view>
+			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" 
+									scroll-with-animation="true"
+									@scroll="scroll_detail"
+									lower-threshold="100"
+									@scrolltolower="scroll_bottom">
+				<block v-if="!$util.isEmpty(globalClassItemList)">
+					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
+						<view class="item_list_title">
+							{{ classItem.className }}
+						</view>
+						<template v-for="(productItem, productIndex) in classItem.child">
+							<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+								<Commondity v-if="classItem.isActive"
+									:offVerifyRepertory = 'true'
+									:info="productItem"
+									:checkStock="true"
+									:selectJobType="selectJobType"
+									@showAddModelFn="showAddModelFn"
+									@replaceItemFn="replaceItemFn"
+								></Commondity>
+							</view>
+						</template>
+					</view>
+				</block>
+				<block v-else>
+					<app-wrapper-empty title="加载中..." :is-empty="$util.isEmpty(globalClassItemList)" />
+				</block>
+			</scroll-view>
+		</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" v-if="customData">
+					<view class="kc">
+						<text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text>
+						<text>{{customData.ratio}}{{customData.smallUnit}}/{{customData.bigUnit}}</text>
+					</view>
+					<view class="num_bx">
+						<!-- #ifdef APP-PLUS -->
+						<input style="width: 280upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">{{customData.bigUnit}}</text>
+						<input style="width: 280upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
+						<!-- #endif -->
+
+						<!-- #ifdef MP-WEIXIN -->
+						<input style="width: 280upx" 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">{{customData.bigUnit}}</text>
+						<input style="width: 280upx" 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">{{customData.smallUnit}}</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 class="num_bx">
+						<input style="width: 280upx" v-model="customData.userPrice" @focus="customData.userPrice = null" 
+						:disabled="false" type="digit" placeholder="单价" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;">元</text>
+					</view>
+                    <view style="text-align:center;margin-bottom:30upx;font-size:33upx;">¥{{calcPrice}}</view>
+				</view>
+			</template>
+		</modal-module>
+
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent"></FooterCart>
+
+   		<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
+
+	</view>
+</template>
+
+<script>
+import AppSearchModule from "@/components/module/app-search";
+import AppTabs from "@/components/plugin/tabs";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import Commondity from "@/components/module/app-cg-commodity";
+import FooterCart from "@/components/module/app-footer-cart";
+import ModalModule from "@/components/plugin/modal";
+import SelPopup from "@/components/sel-popup.vue";
+import { COMMODITY_TYPE } from "@/utils/declare";
+import productMins from "@/mixins/product";
+export default {
+	name: "addCg",
+	components: {
+		AppTabs,
+		AppSearchModule,
+		AppWrapperEmpty,
+		Commondity,
+		ModalModule,
+		FooterCart,
+		SelPopup
+	},
+	mixins: [productMins],
+	data() {
+		return {
+			COMMODITY_TYPE,
+			isSmallCount:false,
+			isFocus: false,
+			offVerifyRepertory: true,
+			customData: {
+				bigCount: 0,
+				smallCount: 0
+			},
+			showSubmitModel: false,
+			popupShow:false,
+			infoData:{},
+            selectJobType:'cgItem',
+            checkStock:false
+		};
+	},
+	computed: {
+        calcPrice() {
+			if(Number(this.customData.userPrice)>0 && (Number(this.customData.bigCount)>0 || Number(this.customData.smallCount)>0)){
+                let num = Number(this.customData.bigCount)>0 ? this.customData.bigCount : this.customData.smallCount
+                return parseFloat((this.customData.userPrice*num).toFixed(2))
+            }
+			return 0
+		}
+	},
+	onLoad(){
+        if(this.option.ghsId){
+            this.selectJobId = this.option.ghsId
+        }
+		this.initData()
+	},
+	methods: {
+	    showPopup() {
+	        this.popupShow = true;
+	    },
+	    hidePopup() {
+	      this.popupShow = false;
+	    },
+		modalCancel() {
+			this.isAddModel = false;
+			this.customData = {};
+		},
+		cancelEvent() {
+			this.showSubmitModel = false;
+		},
+		submitEvent(val) {
+			if (val.index === 0) {
+				this.cancelEvent();
+			} else {
+				console.log(444, this.selectList);
+				uni.navigateTo({
+					url: "/admin/billing/affirm"
+				});
+				this.cancelEvent();
+			}
+		},
+		confirmSelectGoodsEvent() {
+			if (this.selectList.length > 0) {
+				uni.navigateTo({
+					url: "/admin/billing/affirmGoods"
+				});
+			} else {
+				this.$msg("请选择花材");
+			}
+		},
+		confirmSelectEvent() {
+			if(this.$util.isEmpty(this.selectList)){
+				this.$msg('请选择花材')
+				return false
+			}
+			//因历史遗留原因,打开花材页马上点花材出现数量0或null的情况,需要过滤 shish 20210716
+			let selectList = this.selectList;
+			let list = [];
+			for (let i=0;i<selectList.length;i++){
+				if(/(^[1-9]\d*$)/.test(selectList[i].bigCount) == false && /(^[1-9]\d*$)/.test(selectList[i].smallCount) == false){
+					continue
+				}
+				list.push(selectList[i])
+			}
+			if(list.length <= 0){
+				this.$msg("请选择花材")
+				return
+			}
+			let ghsName = this.option.ghsName ? this.option.ghsName : '';
+			let ghsId = this.option.ghsId ? this.option.ghsId : 0
+			this.$util.pageTo({ url: '/pagesPurchase/addCgConfirm?ghsId='+ghsId+'&ghsName='+ghsName,type:2})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.billing_box_bg {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.input-wrap {
+		padding: 22upx 20upx 22upx 30upx;
+		.search-bar {
+			display:inline-block;
+			width:530upx;
+		}
+	}
+	.scroll-middle_bx {
+		flex: 1;
+		display: flex;
+		width: 100%;
+		height: 100%;
+		overflow: hidden;
+	}
+	.tab-view {
+		height: calc(100vh - 140upx);
+		width: 170upx;
+		flex-shrink: 0;
+		background-color: #f0f2f6;
+		.tab-bar-item {
+			position: relative;
+			width: 170upx;
+			height: 90upx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-size: 26upx;
+			color: #444;
+			font-weight: 400;
+			.tag {
+				display: flex;
+				padding: 0 20upx;
+				align-items: center;
+				position: absolute;
+				right: 0;
+				top: 0;
+				height: 32upx;
+				background: #ff2842;
+				border-radius: 16upx;
+				color: #fff;
+				font-size: 20upx;
+			}
+      &:last-child{
+        margin-bottom: 110upx;
+      }
+		}
+
+		.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 {
+		height: calc(100vh - 140upx);
+		flex: 1;
+		box-sizing: border-box;
+	}
+	.item_list_bx {
+		padding: 40upx 16upx;
+    &:last-child{
+      margin-bottom: 70upx;
+    }
+	}
+	.item_list_title {
+		margin-bottom: 20upx;
+		font-size: 24upx;
+		font-weight: 600;
+		color: #666666;
+	}
+	.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:30upx;
+			padding-left:110upx;
+			& > input {
+				width: 212upx;
+				height: 80upx;
+				border: 1upx solid #dddddd;
+				border-radius: 4upx;
+				text-align: center;
+				margin-right: 24upx;
+				font-size: 40upx;
+			}
+		}
+	}
+	.PxClass-box{
+		width: 100%;
+	}
+}
+</style>

+ 336 - 0
hdApp/src/pagesPurchase/addCgConfirm.vue

@@ -0,0 +1,336 @@
+<template>
+	<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" />
+								<view class="item-info">
+									<view class="info-line">
+										<text class="item-name">{{ item.itemName }}</text>
+										<text class="item-price">
+											<text class="price">
+												¥
+												<text v-if="Number(item.bigCount) > 0">{{ parseFloat(Number(item.bigCount)*Number(item.userPrice).toFixed(2)) }}</text>
+												<text v-if="Number(item.smallCount) > 0">{{ parseFloat(Number(item.smallCount)*Number(item.userPrice).toFixed(2)) }}</text>
+											</text>
+										</text>
+									</view>
+									<view class="info-line">
+										<text class="item-type" v-if="item.ratioType == 0">{{item.ratio}}{{item.smallUnit}}/{{item.bigUnit}}</text>
+										<text class="item-type" v-else>若干{{item.smallUnit}}/{{item.bigUnit}}</text>
+										<text class="item-count">
+											¥{{ item.userPrice ? parseFloat(item.userPrice) : 0 }}&nbsp;x&nbsp;
+											<text v-if="Number(item.bigCount) > 0">{{ item.bigCount }}{{item.bigUnit}}</text>
+											<text v-if="Number(item.smallCount) > 0">{{ item.smallCount }}{{item.smallUnit}}</text>
+										</text>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="summary-bar">
+							<view class="operate-view" @click="goBackChange">
+								<text class="iconfont icongouwuche"></text>返回修改
+							</view>
+							<view class="describe-view">
+								共<text v-if="Number(allCount.bigLength)>0">{{ allCount.bigLength }}扎</text>
+								<text v-if="Number(allCount.smallLength)>0">{{ allCount.smallLength }}支</text>,
+								合计 <text class="price">¥{{ allPrice }}</text>
+							</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" v-if="Number(ghsId)>0" @click="showCustomer = true">{{ ghsName }}</view>
+						<view class="tui-placeholder" style="width: 100%" v-else @click="showCustomer = true">没有供货商</view>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+						<view class="tui-title ">付款方式</view>
+						<button class="admin-button-com mini-btn" :class="payType==res.id?'blue':'default'" 
+						style="margin-right: 10upx" @tap="payType=res.id"  v-for="(res,i) in getDictionariesInfo.htPayWayOption" :key="i">
+							{{ res.name }}
+						</button>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+						<view class="tui-title ">运费</view>
+						<input type="number" placeholder="选填" v-model="freight" @input="countAllPrices()" placeholder-class="tui-placeholder">
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+						<view class="tui-title">总金额</view>
+						<text style="color: #3385FF" >{{(allPrice+Number(freight)).toFixed(2)}}</text>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+						<view class="tui-title">实收金额</view>
+						<view class="flex-space" style="width: 100%;">
+							<input type="number" @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
+						</view>
+					</tui-list-cell>
+
+				</view>
+			</form>
+		</view>
+		<view class="under-bar">
+			<view class="price-view">
+				<text class="price-title">总金额</text>
+				<text class="price-number">
+					<text class="large">¥{{ modifyPrice }}</text>
+				</text>
+			</view>
+			<button class="admin-button-com blue big" @click="affirmFormSubmit">提交</button>
+		</view>
+	</view>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import AppAvatarModule from "@/components/module/app-avatar";
+import SimpleAddress from "@/components/plugin/simple-address";
+import AppAreaSel from "@/components/app-area-sel";
+import productMins from "@/mixins/product";
+import appAddressGroup from "@/components/app-address-group";
+import appSendTime from "@/components/app-send-time";
+import { createOrder } from "@/api/order/index";
+import { mapActions, mapGetters } from "vuex";
+export default {
+	name: "addCgConfirm",
+	components: {
+		TuiListCell,
+		AppAvatarModule,
+		SimpleAddress,
+		AppAreaSel,
+		appAddressGroup,
+		appSendTime
+	},
+	mixins: [productMins],
+	data() {
+		return {
+			autoLoad: false,
+			freight:'',
+			modifyPrice:0,
+			payType:0,
+			showCustomer: false,
+			sendType:1,
+			selectJobType:'cgItem',
+			ghsId:0,
+			ghsName:''
+		};
+	},
+	onLoad() {
+        this.selectJobId = this.option.ghsId ? this.option.ghsId : 0
+		this.ghsId = this.option.ghsId ? this.option.ghsId : 0
+		this.ghsName = this.option.ghsName ? this.option.ghsName : ''
+		if (!this.getMerchantInfo) {
+			this.initMerchantInfo().then(data => {
+				uni.setNavigationBarTitle({title:data.name})
+			});
+		} else {
+			uni.setNavigationBarTitle({
+				title: this.getMerchantInfo.name
+			});
+		}
+		this.modifyPrice = this.allPrice.toFixed(2);
+		this.modifyPrice = parseFloat(this.modifyPrice)
+	},
+	computed: {
+		...mapGetters(["getMerchantInfo", "getLoginInfo","getDictionariesInfo"])
+	},
+	methods: {
+		...mapActions(["initMerchantInfo"]),
+		countAllPrices(){
+			let allPrices = this.allPrice.toFixed(2)
+			this.modifyPrice = (Number(allPrices) + Number(this.freight)).toFixed(2);
+			this.modifyPrice = parseFloat(this.modifyPrice)
+		},
+		affirmFormSubmit(){
+			if(this.$util.isEmpty(this.selectList)){
+				this.$msg('请选择花材')
+				return false
+			}
+			let product = []
+			this.selectList.forEach((item,idx,arr) => {
+				let unitType = Number(item.bigCount)>0 ? 0 : 1
+				let num = Number(item.bigCount)>0 ? Number(item.bigCount) : Number(item.smallCount)
+				let unitPrice = item.userPrice ? item.userPrice : 0
+				let current = {productId:item.id,bigNum:item.bigCount,smallNum:item.smallCount,classId:item.classId,num:num,
+				itemId:item.itemId,property:item.property,unitType:unitType,unitPrice:unitPrice}
+				product.push(current)
+			})
+			let options = {
+				sendCost:this.freight,
+				ghsId:this.ghsId,
+				payWay:this.payType,
+				sendType:this.sendType,
+				modifyPrice: this.modifyPrice,
+				product:JSON.stringify(product),
+				hasPay:1
+			};
+			let that = this;
+			uni.showModal({
+				title: '提示',
+				content: '确认提交?',
+				success: function (res) {
+					if (res.confirm) {
+						createOrder(options).then(res => {
+							that.removeFromSaveDirect()
+							let url = '/pagesPurchase/addCgResult'
+							uni.redirectTo({url: url})
+						});
+					}
+				}
+			});
+		},
+		goBackChange() {
+			this.$util.pageTo({url: '/pagesPurchase/addCg',type:2,query: {ghsId: this.ghsId,ghsName:this.ghsName}})
+		}
+	}
+};
+</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;
+		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: #333333;
+								font-size:30upx;
+								font-weight:bold;
+							}
+							.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: 1px solid #eeeeee;
+				.operate-view {
+					display: flex;
+					align-items: center;
+					color: #3385ff;
+					font-size: 30upx;
+					font-weight:bold;
+					.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: 34upx;
+						margin-left:8upx;
+					}
+				}
+			}
+		}
+		.module-com {
+			background-color: #fff;
+			margin-bottom: 20upx;
+			border-radius: 10upx;
+			overflow: hidden;
+			.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;
+		width: 100%;
+		height: 100upx;
+		background-color: #fff;
+		box-shadow: 0upx -1px 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>

+ 263 - 0
hdApp/src/pagesPurchase/addCgResult.vue

@@ -0,0 +1,263 @@
+<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>
+
+				<template v-if="status == 4">
+					<view style="margin-left:150upx;">
+						<view class="flex title">
+							确认销售价:
+						</view>
+						<view class="flex title">
+							<text style="font-size:30upx;font-weight:bold;color:red;">
+								红色为进货价,<text style="color:blue;">蓝色为成本价</text>
+							</text>
+						</view>
+						<checkbox-group @change="checkboxChange">
+							<view v-for="(res,i) in flowersList" :key="i">
+								<view class="product-area">
+									<view class="first-area">
+										<text class="name">{{res.name}}</text>
+										<text class="cg-cost">¥{{itemPriceList[res.id].cgPrice?parseFloat(itemPriceList[res.id].cgPrice):0}}</text>
+										<text class="cost-price">¥{{itemPriceList[res.id].cost?parseFloat(itemPriceList[res.id].cost):0}}</text>
+										<input type="digit" v-model="res.autoPrice" placeholder="花店价" @focus="priceFocus(i,res)" @input="modifyPrice(i,res)" />
+										<input type="digit" v-model="res.autoSkPrice" placeholder="个人价" @focus="skPriceFocus(i,res)" @input="modifySkPrice(res)" />
+									</view>
+								</view>
+							</view>
+						</checkbox-group>
+					</view>
+					<button class="admin-button-com big blue" style="width:40vh;margin-top:50upx;" @click="commitChange">确认修改</button>
+				</template>
+
+				<button class="admin-button-com big default" style="width:40vh;margin-top:30upx;" @click="goBackFn">返回</button>
+
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { getAllProductDataApi,batchChangePrice } from "@/api/product";
+import { getCgItemList } from "@/api/purchase";
+export default {
+    name: "pageSuccess",
+	data() {
+		return {
+			cgItemList:[],
+			flowersList:[],
+			productList:[],
+			itemPriceList:[],
+			status:0
+		};
+	},
+	onShow(){
+		this.getList();
+	},
+	onLoad(){
+		this.status = this.option.status ? Number(this.option.status) : 0
+	},
+	methods: {
+		priceFocus(i,res){
+			this.flowersList[i].autoPrice = ''
+			if(!this.$util.isEmpty(this.productList)){
+				this.productList.forEach((item,idx,arr) => {
+					if(item.id == res.id){
+						arr[idx].price = ''
+					}
+				})
+			}
+		},
+		skPriceFocus(i,res){
+			this.flowersList[i].autoSkPrice = ''
+			if(!this.$util.isEmpty(this.productList)){
+				this.productList.forEach((item,idx,arr) => {
+					if(item.id == res.id){
+						arr[idx].skPrice = ''
+					}
+				})
+			}
+		},
+		getList(){
+			let productIdArr = '';
+			let that = this
+			getCgItemList({id:this.option.id}).then(res=>{
+				if(res.code == 1){
+					let list = res.data.list
+					if(!this.$util.isEmpty(list)){
+
+						list.forEach((ele)=>{
+							productIdArr += ele.productId+','
+							that.itemPriceList[ele.productId] = {cgPrice:ele.bigPrice,cost:ele.cost}
+						})
+
+						getAllProductDataApi({ids : productIdArr.substring(0, productIdArr.lastIndexOf(',')),}).then((res)=>{
+							that.flowersList = res.data.list;
+							that.productList = [];
+							that.flowersList.forEach(function(item){
+								that.productList.push({id:item.id,price:parseFloat(item.autoPrice),skPrice:parseFloat(item.autoSkPrice),skMore:item.skMore})
+							})
+						});
+
+					}
+				}
+			})
+		},
+		modifyPrice(i,res){
+			let id = res.id
+			let price = res.autoPrice
+			let skMore = res.skMore
+			let skPrice = Number(res.autoPrice)+Number(skMore)
+			skPrice = parseFloat(skPrice.toFixed(2))
+			this.flowersList[i].autoSkPrice = skPrice
+			let arr = this.productList.map((ele)=>{
+				if(ele.id == id){
+					return {id:id,price:price,skPrice:skPrice,skMore:skMore}
+				}
+				return ele
+			})
+			this.productList = arr
+		},
+		modifySkPrice(res){
+			let id = res.id
+			let price = res.autoPrice
+			let skPrice = res.autoSkPrice
+			let skMore = res.skMore
+			let arr = this.productList.map((ele)=>{
+				if(ele.id == id){
+					return {id:id,price:price,skPrice:skPrice,skMore:skMore}
+				}
+				return ele
+			})
+			this.productList = arr
+		},
+		commitChange(){
+			let that = this
+			this.$util.confirmModal({content:'确认修改?'},() => {
+				that.commitModify()
+			})
+		},
+		commitModify(){
+			let that = this
+			let targetId = this.option.id ||0
+			batchChangePrice({data:JSON.stringify(this.productList),changeType:'cg',targetId:targetId}).then(res => {
+				if(res.code == 1){
+					that.$msg('修改成功')
+				}
+			})
+		},
+		goBackFn() {
+			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;
+}
+.title{
+	font-weight:700;
+	margin-bottom:30upx;
+	font-size:30upx;
+}
+.product-area{
+	width:750upx;
+	height:90upx;
+	display:flex;
+	align-items:center;
+	.first-area{
+		border-bottom:1upx solid #e4e2e2;
+		position:relative;
+		.name{
+			width:180upx;
+			overflow: hidden;
+			text-overflow:ellipsis;
+			white-space: nowrap;
+			display:inline-block;
+			font-weight:bold;
+			font-size:28upx;
+		}
+		.cg-cost{
+			font-weight:bold;
+			font-size:27upx;
+			color:red;
+			position:absolute;
+			left:515upx;
+			top:-20upx;
+		}
+		.cost-price{
+			font-weight:bold;
+			font-size:27upx;
+			color:blue;
+			position:absolute;
+			left:515upx;
+			top:18upx;
+		}
+		input{
+			border:1upx solid #cccccc;
+			display:inline-block;
+			width:135upx;
+			margin-left:10upx;
+			margin-right:30upx;
+			text-align:center;
+			font-size:30upx;
+		}
+	}
+	.second-area{
+		float:left;
+		color:#646464;
+		margin-top:10upx;
+		.one{
+			color:red;
+		}
+		.two{
+			color:#CCCCCC;
+		}
+	}
+}
+.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: 150upx;
+			color: $mainColor1;
+		}
+		.result-title {
+			margin: 50upx 0 70upx;
+			font-size: 32upx;
+		}
+	}
+}
+</style>

+ 1 - 1
hdApp/src/pagesPurchase/order.vue

@@ -113,7 +113,7 @@ export default {
       })
     },
     fillCg(item){
-      this.$msg('开发中')
+      this.pageTo({url: '/pagesPurchase/addCg?ghsId='+item.id+'&ghsName='+item.name})
     },
     enterShop(item) {
       if(item.isOpen == 0){